Socket
Socket
Sign inDemoInstall

@datadog/browser-rum

Package Overview
Dependencies
4
Maintainers
1
Versions
249
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.7.5 to 1.8.1

cjs/newSessionChecks.d.ts

2

bundle/datadog-rum-us.js

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

!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=4)}([function(t,e,n){(function(t,n){var r=200,o="__lodash_hash_undefined__",i=800,u=16,a=9007199254740991,c="[object Arguments]",s="[object AsyncFunction]",f="[object Function]",l="[object GeneratorFunction]",d="[object Null]",p="[object Object]",h="[object Proxy]",v="[object Undefined]",m=/^\[object .+?Constructor\]$/,y=/^(?:0|[1-9]\d*)$/,g={};g["[object Float32Array]"]=g["[object Float64Array]"]=g["[object Int8Array]"]=g["[object Int16Array]"]=g["[object Int32Array]"]=g["[object Uint8Array]"]=g["[object Uint8ClampedArray]"]=g["[object Uint16Array]"]=g["[object Uint32Array]"]=!0,g[c]=g["[object Array]"]=g["[object ArrayBuffer]"]=g["[object Boolean]"]=g["[object DataView]"]=g["[object Date]"]=g["[object Error]"]=g[f]=g["[object Map]"]=g["[object Number]"]=g[p]=g["[object RegExp]"]=g["[object Set]"]=g["[object String]"]=g["[object WeakMap]"]=!1;var b="object"==typeof t&&t&&t.Object===Object&&t,E="object"==typeof self&&self&&self.Object===Object&&self,_=b||E||Function("return this")(),T=e&&!e.nodeType&&e,w=T&&"object"==typeof n&&n&&!n.nodeType&&n,O=w&&w.exports===T,R=O&&b.process,S=function(){try{var t=w&&w.require&&w.require("util").types;return t||R&&R.binding&&R.binding("util")}catch(t){}}(),C=S&&S.isTypedArray;function x(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var L,j,A,k=Array.prototype,M=Function.prototype,U=Object.prototype,I=_["__core-js_shared__"],D=M.toString,N=U.hasOwnProperty,B=(L=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"",F=U.toString,z=D.call(Object),P=RegExp("^"+D.call(N).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),H=O?_.Buffer:void 0,W=_.Symbol,$=_.Uint8Array,K=H?H.allocUnsafe:void 0,q=(j=Object.getPrototypeOf,A=Object,function(t){return j(A(t))}),G=Object.create,X=U.propertyIsEnumerable,J=k.splice,V=W?W.toStringTag:void 0,Y=function(){try{var t=Tt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Q=H?H.isBuffer:void 0,Z=Math.max,tt=Date.now,et=Tt(_,"Map"),nt=Tt(Object,"create"),rt=function(){function t(){}return function(e){if(!Ut(e))return{};if(G)return G(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function ot(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function it(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function ut(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function at(t){var e=this.__data__=new it(t);this.size=e.size}function ct(t,e){var n=Lt(t),r=!n&&xt(t),o=!n&&!r&&At(t),i=!n&&!r&&!o&&Dt(t),u=n||r||o||i,a=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],c=a.length;for(var s in t)!e&&!N.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||wt(s,c))||a.push(s);return a}function st(t,e,n){(void 0===n||Ct(t[e],n))&&(void 0!==n||e in t)||dt(t,e,n)}function ft(t,e,n){var r=t[e];N.call(t,e)&&Ct(r,n)&&(void 0!==n||e in t)||dt(t,e,n)}function lt(t,e){for(var n=t.length;n--;)if(Ct(t[n][0],e))return n;return-1}function dt(t,e,n){"__proto__"==e&&Y?Y(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}ot.prototype.clear=function(){this.__data__=nt?nt(null):{},this.size=0},ot.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ot.prototype.get=function(t){var e=this.__data__;if(nt){var n=e[t];return n===o?void 0:n}return N.call(e,t)?e[t]:void 0},ot.prototype.has=function(t){var e=this.__data__;return nt?void 0!==e[t]:N.call(e,t)},ot.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=nt&&void 0===e?o:e,this},it.prototype.clear=function(){this.__data__=[],this.size=0},it.prototype.delete=function(t){var e=this.__data__,n=lt(e,t);return!(n<0)&&(n==e.length-1?e.pop():J.call(e,n,1),--this.size,!0)},it.prototype.get=function(t){var e=this.__data__,n=lt(e,t);return n<0?void 0:e[n][1]},it.prototype.has=function(t){return lt(this.__data__,t)>-1},it.prototype.set=function(t,e){var n=this.__data__,r=lt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},ut.prototype.clear=function(){this.size=0,this.__data__={hash:new ot,map:new(et||it),string:new ot}},ut.prototype.delete=function(t){var e=_t(this,t).delete(t);return this.size-=e?1:0,e},ut.prototype.get=function(t){return _t(this,t).get(t)},ut.prototype.has=function(t){return _t(this,t).has(t)},ut.prototype.set=function(t,e){var n=_t(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},at.prototype.clear=function(){this.__data__=new it,this.size=0},at.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},at.prototype.get=function(t){return this.__data__.get(t)},at.prototype.has=function(t){return this.__data__.has(t)},at.prototype.set=function(t,e){var n=this.__data__;if(n instanceof it){var o=n.__data__;if(!et||o.length<r-1)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new ut(o)}return n.set(t,e),this.size=n.size,this};var pt,ht=function(t,e,n){for(var r=-1,o=Object(t),i=n(t),u=i.length;u--;){var a=i[pt?u:++r];if(!1===e(o[a],a,o))break}return t};function vt(t){return null==t?void 0===t?v:d:V&&V in Object(t)?function(t){var e=N.call(t,V),n=t[V];try{t[V]=void 0;var r=!0}catch(t){}var o=F.call(t);r&&(e?t[V]=n:delete t[V]);return o}(t):function(t){return F.call(t)}(t)}function mt(t){return It(t)&&vt(t)==c}function yt(t){return!(!Ut(t)||function(t){return!!B&&B in t}(t))&&(kt(t)?P:m).test(function(t){if(null!=t){try{return D.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function gt(t){if(!Ut(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Ot(t),n=[];for(var r in t)("constructor"!=r||!e&&N.call(t,r))&&n.push(r);return n}function bt(t,e,n,r,o){t!==e&&ht(e,(function(i,u){if(o||(o=new at),Ut(i))!function(t,e,n,r,o,i,u){var a=Rt(t,n),c=Rt(e,n),s=u.get(c);if(s)return void st(t,n,s);var f=i?i(a,c,n+"",t,e,u):void 0,l=void 0===f;if(l){var d=Lt(c),h=!d&&At(c),v=!d&&!h&&Dt(c);f=c,d||h||v?Lt(a)?f=a:It(E=a)&&jt(E)?f=function(t,e){var n=-1,r=t.length;e||(e=Array(r));for(;++n<r;)e[n]=t[n];return e}(a):h?(l=!1,f=function(t,e){if(e)return t.slice();var n=t.length,r=K?K(n):new t.constructor(n);return t.copy(r),r}(c,!0)):v?(l=!1,m=c,y=!0?(g=m.buffer,b=new g.constructor(g.byteLength),new $(b).set(new $(g)),b):m.buffer,f=new m.constructor(y,m.byteOffset,m.length)):f=[]:function(t){if(!It(t)||vt(t)!=p)return!1;var e=q(t);if(null===e)return!0;var n=N.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&D.call(n)==z}(c)||xt(c)?(f=a,xt(a)?f=function(t){return function(t,e,n,r){var o=!n;n||(n={});var i=-1,u=e.length;for(;++i<u;){var a=e[i],c=r?r(n[a],t[a],a,n,t):void 0;void 0===c&&(c=t[a]),o?dt(n,a,c):ft(n,a,c)}return n}(t,Nt(t))}(a):Ut(a)&&!kt(a)||(f=function(t){return"function"!=typeof t.constructor||Ot(t)?{}:rt(q(t))}(c))):l=!1}var m,y,g,b;var E;l&&(u.set(c,f),o(f,c,r,i,u),u.delete(c));st(t,n,f)}(t,e,u,n,bt,r,o);else{var a=r?r(Rt(t,u),i,u+"",t,e,o):void 0;void 0===a&&(a=i),st(t,u,a)}}),Nt)}function Et(t,e){return St(function(t,e,n){return e=Z(void 0===e?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=Z(r.length-e,0),u=Array(i);++o<i;)u[o]=r[e+o];o=-1;for(var a=Array(e+1);++o<e;)a[o]=r[o];return a[e]=n(u),x(t,this,a)}}(t,e,zt),t+"")}function _t(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function Tt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return yt(n)?n:void 0}function wt(t,e){var n=typeof t;return!!(e=null==e?a:e)&&("number"==n||"symbol"!=n&&y.test(t))&&t>-1&&t%1==0&&t<e}function Ot(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||U)}function Rt(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var St=function(t){var e=0,n=0;return function(){var r=tt(),o=u-(r-n);if(n=r,o>0){if(++e>=i)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Y?function(t,e){return Y(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:zt);function Ct(t,e){return t===e||t!=t&&e!=e}var xt=mt(function(){return arguments}())?mt:function(t){return It(t)&&N.call(t,"callee")&&!X.call(t,"callee")},Lt=Array.isArray;function jt(t){return null!=t&&Mt(t.length)&&!kt(t)}var At=Q||function(){return!1};function kt(t){if(!Ut(t))return!1;var e=vt(t);return e==f||e==l||e==s||e==h}function Mt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=a}function Ut(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function It(t){return null!=t&&"object"==typeof t}var Dt=C?function(t){return function(e){return t(e)}}(C):function(t){return It(t)&&Mt(t.length)&&!!g[vt(t)]};function Nt(t){return jt(t)?ct(t,!0):gt(t)}var Bt,Ft=(Bt=function(t,e,n){bt(t,e,n)},Et((function(t,e){var n=-1,r=e.length,o=r>1?e[r-1]:void 0,i=r>2?e[2]:void 0;for(o=Bt.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(t,e,n){if(!Ut(n))return!1;var r=typeof e;return!!("number"==r?jt(n)&&wt(e,n.length):"string"==r&&e in n)&&Ct(n[e],t)}(e[0],e[1],i)&&(o=r<3?void 0:o,r=1),t=Object(t);++n<r;){var u=e[n];u&&Bt(t,u,n,o)}return t})));function zt(t){return t}n.exports=Ft}).call(this,n(2),n(3)(t))},function(t,e){var n=9007199254740991,r="[object Arguments]",o="[object Function]",i="[object GeneratorFunction]",u=/^(?:0|[1-9]\d*)$/;function a(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var c,s,f=Object.prototype,l=f.hasOwnProperty,d=f.toString,p=f.propertyIsEnumerable,h=(c=Object.keys,s=Object,function(t){return c(s(t))}),v=Math.max,m=!p.call({valueOf:1},"valueOf");function y(t,e){var n=T(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&w(t)}(t)&&l.call(t,"callee")&&(!p.call(t,"callee")||d.call(t)==r)}(t)?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],o=n.length,i=!!o;for(var u in t)!e&&!l.call(t,u)||i&&("length"==u||b(u,o))||n.push(u);return n}function g(t,e,n){var r=t[e];l.call(t,e)&&_(r,n)&&(void 0!==n||e in t)||(t[e]=n)}function b(t,e){return!!(e=null==e?n:e)&&("number"==typeof t||u.test(t))&&t>-1&&t%1==0&&t<e}function E(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||f)}function _(t,e){return t===e||t!=t&&e!=e}var T=Array.isArray;function w(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}(t.length)&&!function(t){var e=O(t)?d.call(t):"";return e==o||e==i}(t)}function O(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var R,S=(R=function(t,e){if(m||E(e)||w(e))!function(t,e,n,r){n||(n={});for(var o=-1,i=e.length;++o<i;){var u=e[o],a=r?r(n[u],t[u],u,n,t):void 0;g(n,u,void 0===a?t[u]:a)}}(e,function(t){return w(t)?y(t):function(t){if(!E(t))return h(t);var e=[];for(var n in Object(t))l.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}(e),t);else for(var n in e)l.call(e,n)&&g(t,n,e[n])},function(t,e){return e=v(void 0===e?t.length-1:e,0),function(){for(var n=arguments,r=-1,o=v(n.length-e,0),i=Array(o);++r<o;)i[r]=n[e+r];r=-1;for(var u=Array(e+1);++r<e;)u[r]=n[r];return u[e]=i,a(t,this,u)}}((function(t,e){var n=-1,r=e.length,o=r>1?e[r-1]:void 0,i=r>2?e[2]:void 0;for(o=R.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(t,e,n){if(!O(n))return!1;var r=typeof e;return!!("number"==r?w(n)&&b(e,n.length):"string"==r&&e in n)&&_(n[e],t)}(e[0],e[1],i)&&(o=r<3?void 0:o,r=1),t=Object(t);++n<r;){var u=e[n];u&&R(t,u,n,o)}return t})));t.exports=S},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";n.r(e);var r=function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function o(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new n((function(e){e(t.value)})).then(u,a)}c((r=r.apply(t,e||[])).next())}))}function i(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var u,a,c=6e4;function s(t,e,n){var r=!n||void 0===n.leading||n.leading,o=!n||void 0===n.trailing||n.trailing,i=!1,u=!1;return function(){var n=this;i?u=!0:(r?t.apply(this):u=!0,i=!0,setTimeout((function(){o&&u&&t.apply(n),i=!1,u=!1}),e))}}function f(t){return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):(1e7+"-1000-4000-8000-100000000000").replace(/[018]/g,f)}function l(t){return 0!==t&&100*Math.random()<=t}function d(t){return+(1e6*t).toFixed(0)}function p(t){var e={};return Object.keys(t).forEach((function(n){var r;e[(r=n,r.replace(/[A-Z]/g,(function(t,e){return(0!==e?"_":"")+t.toLowerCase()})).replace(/-/g,"_"))]=function t(e){if(Array.isArray(e))return e.map((function(e){return t(e)}));if("object"==typeof e)return p(e);return e}(t[n])})),e}function h(){}function v(t,e,n){if(null==t)return JSON.stringify(t);var r=[!1,void 0];m(t)&&(r=[!0,t.toJSON],delete t.toJSON);var o,i,u=[!1,void 0];"object"==typeof t&&m(o=Object.getPrototypeOf(t))&&(u=[!0,o.toJSON],delete o.toJSON);try{i=JSON.stringify(t,void 0,n)}catch(t){i="<error: unable to serialize object>"}finally{r[0]&&(t.toJSON=r[1]),u[0]&&(o.toJSON=u[1])}return i}function m(t){return"object"==typeof t&&null!==t&&t.hasOwnProperty("toJSON")}function y(t,e){return-1!==t.indexOf(e)}function g(t){return b(t)&&t>=0&&t<=100}function b(t){return"number"==typeof t}function E(t){return Math.floor(_()+t)}function _(){return void 0===a&&(a=performance.timing.navigationStart),a}function T(t){if(t.origin)return t.origin;var e=t.host.replace(/(:80|:443)$/,"");return t.protocol+"//"+e}!function(t){t.DOCUMENT="document",t.XHR="xhr",t.BEACON="beacon",t.FETCH="fetch",t.CSS="css",t.JS="js",t.IMAGE="image",t.FONT="font",t.MEDIA="media",t.OTHER="other"}(u||(u={}));var w={enableExperimentalFeatures:!1,isCollectingError:!0,maxErrorsByMinute:3e3,maxInternalMonitoringMessagesPerPage:15,resourceSampleRate:100,sampleRate:100,silentMultipleInit:!1,requestErrorResponseLengthLimit:32768,flushTimeout:3e4,maxBatchSize:50,maxMessageSize:262144,batchBytesLimit:16384};function O(t,e,n){var r="us"===e.datacenter?"com":"eu",o="production"===e.env?"datadoghq."+r:"datad0g."+r,i="version:"+e.version;return"https://"+t+"-http-intake.logs."+o+"/v1/input/"+e.clientToken+"?ddsource="+(n||"browser")+"&ddtags="+i}var R=n(1),S=n.n(R),C=n(0),x=n.n(C),L="?",j=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function A(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var k=function(){var t,e,n,r,o,i,u=[];function a(t,e,n){var r;for(var o in u)if(A(u,o))try{u[o](t,e,n)}catch(t){r=t}if(r)throw r}function c(t,r,o,i,u){if(e)M.augmentStackTraceWithInitialElement(e,r,o,""+t),f();else if(u)a(M(u),!0,u);else{var c,s={url:r,column:i,line:o},l=t;if("[object String]"==={}.toString.call(t)){var d=l.match(j);d&&(c=d[1],l=d[2])}a({name:c,message:l,stack:[s]},!0)}return!!n&&n.apply(this,arguments)}function s(t){var e=t.reason||"Empty reason";a(M(e),!0,e)}function f(){var n=e,r=t;e=void 0,t=void 0,a(n,!1,r)}function l(n){if(e){if(t===n)return;f()}var r=M(n);throw e=r,t=n,setTimeout((function(){t===n&&f()}),r.incomplete?2e3:0),n}return l.subscribe=function(t){!function(){if(r)return;n=window.onerror,window.onerror=F(c),r=!0}(),function(){if(i)return;o=null!==window.onunhandledrejection?window.onunhandledrejection:void 0,window.onunhandledrejection=F(s),i=!0}(),u.push(t)},l.unsubscribe=function(t){for(var e=u.length-1;e>=0;e-=1)u[e]===t&&u.splice(e,1);0===u.length&&(r&&(window.onerror=n,r=!1),i&&(window.onunhandledrejection=o,i=!1))},l.traceKitWindowOnError=c,l}(),M=function(){var t=!1;function e(t){if(t.stack){for(var e,n,r,o,i=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,u=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,a=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,c=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,s=/\((\S*)(?::(\d+))(?::(\d+))\)/,f=t.stack.split("\n"),l=[],d=0,p=f.length;d<p;d+=1){if(i.exec(f[d])){var h=(r=i.exec(f[d]))[2]&&0===r[2].indexOf("native");e=r[2]&&0===r[2].indexOf("eval"),n=s.exec(r[2]),e&&n&&(r[2]=n[1],r[3]=n[2],r[4]=n[3]),o={args:h?[r[2]]:[],column:r[4]?+r[4]:void 0,func:r[1]||L,line:r[3]?+r[3]:void 0,url:h?void 0:r[2]}}else if(a.exec(f[d]))o={args:[],column:(r=a.exec(f[d]))[4]?+r[4]:void 0,func:r[1]||L,line:+r[3],url:r[2]};else{if(!u.exec(f[d]))continue;e=(r=u.exec(f[d]))[3]&&r[3].indexOf(" > eval")>-1,n=c.exec(r[3]),e&&n?(r[3]=n[1],r[4]=n[2],r[5]=void 0):0!==d||r[5]||void 0===t.columnNumber||(l[0].column=t.columnNumber+1),o={args:r[2]?r[2].split(","):[],column:r[5]?+r[5]:void 0,func:r[1]||L,line:r[4]?+r[4]:void 0,url:r[3]}}!o.func&&o.line&&(o.func=L),l.push(o)}if(l.length)return{stack:l,message:t.message,name:t.name}}}function n(t,e,n,r){var o={url:e,line:n?+n:void 0};if(o.url&&o.line){t.incomplete=!1;var i=t.stack;if(i.length>0&&i[0].url===o.url){if(i[0].line===o.line)return!1;if(!i[0].line&&i[0].func===o.func)return i[0].line=o.line,i[0].context=o.context,!1}return i.unshift(o),t.partial=!0,!0}return t.incomplete=!0,!1}function r(t,e){for(var o,i,u=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,a=[],c={},s=!1,f=r.caller;f&&!s;f=f.caller)f!==M&&f!==k&&(i={args:[],column:void 0,func:L,line:void 0,url:void 0},o=u.exec(f.toString()),f.name?i.func=f.name:o&&(i.func=o[1]),void 0===i.func&&(i.func=o?o.input.substring(0,o.input.indexOf("{")):void 0),c[""+f]?s=!0:c[""+f]=!0,a.push(i));e&&a.splice(0,e);var l={stack:a,message:t.message,name:t.name};return n(l,t.sourceURL||t.fileName,t.line||t.lineNumber,t.message||t.description),l}function o(n,o){var i,u=void 0===o?0:+o;try{if(i=function(t){var e=t.stacktrace;if(e){for(var n,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,o=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,i=e.split("\n"),u=[],a=0;a<i.length;a+=2){var c=void 0;r.exec(i[a])?c={args:[],column:void 0,func:(n=r.exec(i[a]))[3],line:+n[1],url:n[2]}:o.exec(i[a])&&(c={args:(n=o.exec(i[a]))[5]?n[5].split(","):[],column:+n[2],func:n[3]||n[4],line:+n[1],url:n[6]}),c&&(!c.func&&c.line&&(c.func=L),c.context=[i[a+1]],u.push(c))}if(u.length)return{stack:u,message:t.message,name:t.name}}}(n))return i}catch(e){if(t)throw e}try{if(i=e(n))return i}catch(e){if(t)throw e}try{if(i=function(t){var e=t.message.split("\n");if(!(e.length<4)){var n,r=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,o=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,i=/^\s*Line (\d+) of function script\s*$/i,u=[],a=window&&window.document&&window.document.getElementsByTagName("script"),c=[];for(var s in a)A(a,s)&&!a[s].src&&c.push(a[s]);for(var f=2;f<e.length;f+=2){var l=void 0;if(r.exec(e[f]))l={args:[],column:void 0,func:(n=r.exec(e[f]))[3],line:+n[1],url:n[2]};else if(o.exec(e[f]))l={args:[],column:void 0,func:(n=o.exec(e[f]))[4],line:+n[1],url:n[3]};else if(i.exec(e[f])){n=i.exec(e[f]),l={url:window.location.href.replace(/#.*$/,""),args:[],column:void 0,func:"",line:+n[1]}}l&&(l.func||(l.func=L),l.context=[e[f+1]],u.push(l))}if(u.length)return{stack:u,message:e[0],name:t.name}}}(n))return i}catch(e){if(t)throw e}try{if(i=r(n,u+1))return i}catch(e){if(t)throw e}return{message:n.message,name:n.name,stack:[]}}return o.augmentStackTraceWithInitialElement=n,o.computeStackTraceFromStackProp=e,o.ofCaller=function(t){var e=1+(void 0===t?0:+t);try{throw new Error}catch(t){return M(t,e+1)}},o}();var U=function(){function t(t,e,n){void 0===n&&(n=!1),this.endpointUrl=t,this.bytesLimit=e,this.withBatchTime=n}return t.prototype.send=function(t,e){var n=this.withBatchTime?function(t){return t+(-1===t.indexOf("?")?"?":"&")+"batch_time="+(new Date).getTime()}(this.endpointUrl):this.endpointUrl;if(navigator.sendBeacon&&e<this.bytesLimit&&navigator.sendBeacon(n,t))return;var r=new XMLHttpRequest;r.open("POST",n,!0),r.send(t)},t}();var I,D=function(){function t(t,e,n,r,o,i){this.request=t,this.maxSize=e,this.bytesLimit=n,this.maxMessageSize=r,this.flushTimeout=o,this.contextProvider=i,this.beforeFlushOnUnloadHandlers=[],this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesSize=0,this.bufferMessageCount=0,this.flushOnVisibilityHidden(),this.flushPeriodically()}return t.prototype.add=function(t){this.addOrUpdate(t)},t.prototype.upsert=function(t,e){this.addOrUpdate(t,e)},t.prototype.beforeFlushOnUnload=function(t){this.beforeFlushOnUnloadHandlers.push(t)},t.prototype.flush=function(){if(0!==this.bufferMessageCount){var t=this.pushOnlyBuffer.concat((e=this.upsertBuffer,n=[],Object.keys(e).forEach((function(t){n.push(e[t])})),n));this.request.send(t.join("\n"),this.bufferBytesSize),this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesSize=0,this.bufferMessageCount=0}var e,n},t.prototype.addOrUpdate=function(t,e){var n=this.process(t),r=n.processedMessage,o=n.messageBytesSize;o>=this.maxMessageSize?console.warn("Discarded a message whose size was bigger than the maximum allowed size "+this.maxMessageSize+"KB."):(this.hasMessageFor(e)&&this.remove(e),this.willReachedBytesLimitWith(o)&&this.flush(),this.push(r,o,e),this.isFull()&&this.flush())},t.prototype.process=function(t){var e=v(x()({},this.contextProvider(),t));return{processedMessage:e,messageBytesSize:this.sizeInBytes(e)}},t.prototype.push=function(t,e,n){this.bufferMessageCount>0&&(this.bufferBytesSize+=1),void 0!==n?this.upsertBuffer[n]=t:this.pushOnlyBuffer.push(t),this.bufferBytesSize+=e,this.bufferMessageCount+=1},t.prototype.remove=function(t){var e=this.upsertBuffer[t];delete this.upsertBuffer[t];var n=this.sizeInBytes(e);this.bufferBytesSize-=n,this.bufferMessageCount-=1,this.bufferMessageCount>0&&(this.bufferBytesSize-=1)},t.prototype.hasMessageFor=function(t){return void 0!==t&&void 0!==this.upsertBuffer[t]},t.prototype.willReachedBytesLimitWith=function(t){return this.bufferBytesSize+t+1>=this.bytesLimit},t.prototype.isFull=function(){return this.bufferMessageCount===this.maxSize||this.bufferBytesSize>=this.bytesLimit},t.prototype.sizeInBytes=function(t){return~-encodeURI(t).split(/%..|./).length},t.prototype.flushPeriodically=function(){var t=this;setTimeout((function(){t.flush(),t.flushPeriodically()}),this.flushTimeout)},t.prototype.flushOnVisibilityHidden=function(){var t=this;navigator.sendBeacon&&(window.addEventListener("beforeunload",F((function(){t.beforeFlushOnUnloadHandlers.forEach((function(t){return t()}))}))),document.addEventListener("visibilitychange",F((function(){"hidden"===document.visibilityState&&t.flush()}))),window.addEventListener("beforeunload",F((function(){return t.flush()}))))},t}();!function(t){t.info="info",t.error="error"}(I||(I={}));var N,B={maxMessagesPerPage:0,sentMessageCount:0};function F(t){return function(){try{return t.apply(this,arguments)}catch(t){W(t);try{z(t)}catch(t){W(t)}}}}function z(t){P(r({},function(t){if(t instanceof Error){var e=M(t);return{error:{kind:e.name,stack:ut(e)},message:e.message}}return{error:{stack:"Not an instance of error"},message:"Uncaught "+v(t)}}(t),{status:I.error}))}function P(t){B.batch&&B.sentMessageCount<B.maxMessagesPerPage&&(B.sentMessageCount+=1,B.batch.add(t))}function H(t){B.debugMode=t}function W(t){B.debugMode&&console.warn("[INTERNAL ERROR]",t)}var $,K,q,G,X,J,V,Y=function(){function t(){this.observers=[]}return t.prototype.subscribe=function(t){this.observers.push(t)},t.prototype.notify=function(t){this.observers.forEach((function(e){return e(t)}))},t}();function Q(t){return et(t,T(window.location)).href}function Z(t,e){return tt(t)===tt(e)}function tt(t){return T(et(t))}function et(t,e){if(function(){if(void 0!==$)return $;try{var t=new URL("http://test/path");return $="http://test/path"===t.href}catch(t){$=!1}return $}())return void 0!==e?new URL(t,e):new URL(t);if(void 0===e&&!/:/.test(t))throw new Error("Invalid URL: '"+t+"'");var n=document,r=n.createElement("a");if(void 0!==e){var o=(n=document.implementation.createHTMLDocument("")).createElement("base");o.href=e,n.head.appendChild(o),n.body.appendChild(r)}return r.href=t,r}function nt(){return q||(function(t){var e=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=F((function(t,n){return this._datadog_xhr={method:t,url:n},e.apply(this,arguments)}));var n=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(e){var r=this,o=performance.now(),i=!1,u=function(){i||(i=!0,t.notify({startTime:o,duration:performance.now()-o,method:r._datadog_xhr.method,response:r.response,status:r.status,traceId:rt(),type:K.XHR,url:Q(r._datadog_xhr.url)}))},a=this.onreadystatechange;return this.onreadystatechange=function(){this.readyState===XMLHttpRequest.DONE&&F(u)(),a&&a.apply(this,arguments)},this.addEventListener("loadend",F(u)),n.apply(this,arguments)}}(q=new Y),function(t){if(!window.fetch)return;var e=window.fetch;window.fetch=F((function(n,r){var u=this,a=r&&r.method||"object"==typeof n&&n.method||"GET",c=performance.now(),s=function(e){return o(u,void 0,void 0,(function(){var r,o,u,s,f;return i(this,(function(i){switch(i.label){case 0:return r=performance.now()-c,o=Q("object"==typeof n&&n.url||n),"stack"in e||e instanceof Error?(u=M(e),t.notify({duration:r,method:a,startTime:c,url:o,response:ut(u),status:0,traceId:rt(),type:K.FETCH}),[3,6]):[3,1];case 1:if(!("status"in e))return[3,6];s=void 0,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,e.clone().text()];case 3:return s=i.sent(),[3,5];case 4:return f=i.sent(),s="Unable to retrieve response: "+f,[3,5];case 5:t.notify({duration:r,method:a,startTime:c,url:o,response:s,responseType:e.type,status:e.status,traceId:rt(),type:K.FETCH}),i.label=6;case 6:return[2]}}))}))},f=e.call(this,n,r);return f.then(F(s),F(s)),f}))}(q)),q}function rt(){return"ddtrace"in window&&window.ddtrace.tracer.scope().active()?window.ddtrace.tracer.scope().active().context().toTraceId():void 0}function ot(t){if(!X){var e=new Y;if(t.isCollectingError)!function(t,e,n){n.subscribe((function(n){(function(t){return 0===t.status&&"opaque"!==t.responseType}(n)||function(t){return t.status>=500}(n))&&e.notify({context:{error:{origin:G.NETWORK,stack:at(n.response,t)||"Failed to load"},http:{method:n.method,status_code:n.status,url:n.url}},message:ct(n.type)+" error "+n.method+" "+n.url,startTime:n.startTime})}))}(t,e,nt()),function(t){J=console.error,console.error=F((function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];J.apply(console,[e].concat(n)),t.notify({context:{error:{origin:G.CONSOLE}},message:["console error:",e].concat(n).map(it).join(" "),startTime:performance.now()})}))}(e),function(t){V=function(e,n,r){t.notify(function(t,e){var n,r;void 0!==t.message||e instanceof Error?(n=t.message||"Empty message",r=ut(t)):(n="Uncaught "+v(e),r="No stack, consider using an instance of Error");return{message:n,context:{error:{stack:r,kind:t.name,origin:G.SOURCE}},startTime:performance.now()}}(e,r))},k.subscribe(V)}(e);X=function(t,e){var n=0,r=new Y;return e.subscribe((function(e){n<t.maxErrorsByMinute?(n+=1,r.notify(e)):n===t.maxErrorsByMinute&&(n+=1,r.notify({context:{error:{origin:G.AGENT}},message:"Reached max number of errors by minute: "+t.maxErrorsByMinute,startTime:performance.now()}))})),setInterval((function(){return n=0}),c),r}(t,e)}return X}function it(t){return"string"==typeof t?t:t instanceof Error?ut(M(t)):v(t,0,2)}function ut(t){var e=(t.name||"Error")+": "+t.message;return t.stack.forEach((function(t){var n="?"===t.func?"<anonymous>":t.func,r=t.args&&t.args.length>0?"("+t.args.join(", ")+")":"",o=t.line?":"+t.line:"",i=t.line&&t.column?":"+t.column:"";e+="\n at "+n+r+" @ "+t.url+o+i})),e}function at(t,e){return t&&t.length>e.requestErrorResponseLengthLimit?t.substring(0,e.requestErrorResponseLengthLimit)+"...":t}function ct(t){return K.XHR===t?"XHR":"Fetch"}!function(t){t.FETCH="fetch",t.XHR="xhr"}(K||(K={})),function(t){t.AGENT="agent",t.CONSOLE="console",t.NETWORK="network",t.SOURCE="source",t.LOGGER="logger"}(G||(G={}));var st=1e3;function ft(t){var e,n,r=!1,o=function(){r=!0,window.clearTimeout(e),e=window.setTimeout((function(){r=!1}),st)};return{get:function(){return r?n:(n=dt(t),o(),n)},set:function(e,r){lt(t,e,r),n=e,o()}}}function lt(t,e,n){var r=new Date;r.setTime(r.getTime()+n);var o="expires="+r.toUTCString();document.cookie=t+"="+e+";"+o+";path=/"}function dt(t){var e=document.cookie.match("(^|;)\\s*"+t+"\\s*=\\s*([^;]+)");return e?e.pop():void 0}function pt(t){console.warn("'"+t+"' not yet available, please call '.init()' first.")}function ht(t,e){var n=function(t,e){var n={clientToken:t.clientToken,datacenter:t.datacenter||e.datacenter,env:e.env,version:e.version},o=r({logsEndpoint:O("browser",n),rumEndpoint:O("rum",n),traceEndpoint:O("public-trace",n)},w);return t.internalMonitoringApiKey&&(o.internalMonitoringEndpoint=O("browser",n,"browser-agent-internal-monitoring")),"isCollectingError"in t&&(o.isCollectingError=!!t.isCollectingError),"sampleRate"in t&&(o.sampleRate=t.sampleRate),"resourceSampleRate"in t&&(o.resourceSampleRate=t.resourceSampleRate),"enableExperimentalFeatures"in t&&(o.enableExperimentalFeatures=t.enableExperimentalFeatures),"e2e-test"===n.env&&(void 0!==t.internalMonitoringEndpoint&&(o.internalMonitoringEndpoint=t.internalMonitoringEndpoint),void 0!==t.logsEndpoint&&(o.logsEndpoint=t.logsEndpoint),void 0!==t.rumEndpoint&&(o.rumEndpoint=t.rumEndpoint)),o}(t,e),o=function(t){if(t.internalMonitoringEndpoint){var e=new D(new U(t.internalMonitoringEndpoint,t.batchBytesLimit),t.maxBatchSize,t.batchBytesLimit,t.maxMessageSize,t.flushTimeout,(function(){return x()({date:(new Date).getTime(),view:{referrer:document.referrer,url:window.location.href}},void 0!==N?N():{})}));S()(B,{batch:e,maxMessagesPerPage:t.maxInternalMonitoringMessagesPerPage,sentMessageCount:0})}return{setExternalContextProvider:function(t){N=t}}}(n);return{configuration:n,errorObservable:ot(n),internalMonitoring:o}}function vt(){return!!function(){if(void 0===document.cookie||null===document.cookie)return!1;try{return lt("dd_rum_test","test",1e3),"test"===dt("dd_rum_test")}catch(t){return console.error(t),!1}}()||(console.warn("Cookies are not authorized, we will not send any data."),!1)}function mt(){return"file:"!==window.location.protocol||(console.error("Execution is not allowed in the current context."),!1)}var yt="_dd",gt=15*c,bt=[];function Et(t,e){var n=ft(yt),r=ft(t),o=new Y,i=n.get(),u=s((function(){var t=e(r.get()),u=t.type,a=t.isTracked;r.set(u,gt),a&&(n.get()?n.set(n.get(),gt):n.set(f(),gt),i!==n.get()&&(i=n.get(),o.notify()))}),st);return u(),function(t){var e={capture:!0,passive:!0};["click","touchstart","keydown","scroll"].forEach((function(n){document.addEventListener(n,t,e),bt.push((function(){return document.removeEventListener(n,t,e)}))}))}(u),{getId:function(){return n.get()},getType:function(){return r.get()},renewObservable:o}}(function(){function t(t){var e=this;this.requests=[],this.pendingFetch=0,this.whenAllCompleteFn=h,t.subscribe((function(t){e.requests.push(t),e.pendingFetch-=1,0===e.pendingFetch&&setTimeout((function(){e.whenAllCompleteFn(e.requests)}))}))}t.prototype.whenAllComplete=function(t){this.whenAllCompleteFn=t},t.prototype.getStub=function(){var t=this;return function(){var e,n;t.pendingFetch+=1;var u=new Promise((function(t,r){e=t,n=r}));return u.resolveWith=function(n){return o(t,void 0,void 0,(function(){var t=this;return i(this,(function(u){return[2,e(r({},n,{clone:function(){return{text:function(){return o(t,void 0,void 0,(function(){return i(this,(function(t){if(n.responseTextError)throw n.responseTextError;return[2,n.responseText]}))}))}}}}))]}))}))},u.rejectWith=function(e){return o(t,void 0,void 0,(function(){return i(this,(function(t){return[2,n(e)]}))}))},u}}})(),function(){function t(){}t.prototype.fakeEntry=function(t,e){var n=function(){return[t]};this.instance.callback({getEntries:n,getEntriesByName:n,getEntriesByType:function(t){return t===e?n():[]}})},t.prototype.getStub=function(){var t,e=this;return(t=function(){function t(t){this.callback=t,e.instance=this}return t.prototype.observe=function(t){},t}()).supportedEntryTypes=["navigation"],t}}();var _t,Tt={datacenter:"us",env:"production",version:"1.7.5"};!function(t){t[t.ERROR_COLLECTED=0]="ERROR_COLLECTED",t[t.PERFORMANCE_ENTRY_COLLECTED=1]="PERFORMANCE_ENTRY_COLLECTED",t[t.USER_ACTION_COLLECTED=2]="USER_ACTION_COLLECTED",t[t.REQUEST_COLLECTED=3]="REQUEST_COLLECTED",t[t.SESSION_RENEWED=4]="SESSION_RENEWED",t[t.RESOURCE_ADDED_TO_BATCH=5]="RESOURCE_ADDED_TO_BATCH"}(_t||(_t={}));var wt,Ot=function(){function t(){this.callbacks={}}return t.prototype.notify=function(t,e){var n=this.callbacks[t];n&&n.forEach((function(t){return t(e)}))},t.prototype.subscribe=function(t,e){var n=this.callbacks[t];n?n.push(e):this.callbacks[t]=[e]},t}(),Rt="initial_document",St=[[u.DOCUMENT,function(t){return Rt===t}],[u.XHR,function(t){return"xmlhttprequest"===t}],[u.FETCH,function(t){return"fetch"===t}],[u.BEACON,function(t){return"beacon"===t}],[u.CSS,function(t,e){return null!==e.match(/\.css$/i)}],[u.JS,function(t,e){return null!==e.match(/\.js$/i)}],[u.IMAGE,function(t,e){return y(["image","img","icon"],t)||null!==e.match(/\.(gif|jpg|jpeg|tiff|png|svg)$/i)}],[u.FONT,function(t,e){return null!==e.match(/\.(woff|eot|woff2|ttf)$/i)}],[u.MEDIA,function(t,e){return y(["audio","video"],t)||null!==e.match(/\.(mp3|mp4)$/i)}]];function Ct(t){var e=t.name;if(!function(t){try{return!!et(t)}catch(t){return!1}}(e))return P({message:'Failed to construct URL for "'+t.name+'"',status:I.info}),u.OTHER;for(var n=function(t){var e=et(t).pathname;return"/"===e[0]?e:"/"+e}(e),r=0,o=St;r<o.length;r++){var i=o[r],a=i[0];if((0,i[1])(t.initiatorType,n))return a}return u.OTHER}function xt(t){if(t&&Lt(t)&&0!==t.duration&&(jt(t.connectStart,t.connectEnd)&&jt(t.domainLookupStart,t.domainLookupEnd)&&jt(t.responseStart,t.responseEnd)&&jt(t.requestStart,t.responseStart)&&jt(t.redirectStart,t.redirectEnd)&&jt(t.secureConnectionStart,t.connectEnd)))return{connect:At(t.connectStart,t.connectEnd,t.fetchStart)?kt(t.connectStart,t.connectEnd):void 0,dns:At(t.domainLookupStart,t.domainLookupEnd,t.fetchStart)?kt(t.domainLookupStart,t.domainLookupEnd):void 0,download:kt(t.responseStart,t.responseEnd),firstByte:kt(t.requestStart,t.responseStart),redirect:At(t.redirectStart,t.redirectEnd,0)?kt(t.redirectStart,t.redirectEnd):void 0,ssl:0!==t.secureConnectionStart&&At(t.secureConnectionStart,t.connectEnd,t.fetchStart)?kt(t.secureConnectionStart,t.connectEnd):void 0}}function Lt(t){return t.responseStart>0}function jt(t,e){return t>=0&&e>=0&&e>=t}function At(t,e,n){return t!==n||e!==n}function kt(t,e){return{duration:d(e-t),start:d(t)}}function Mt(t){return t&&Lt(t)?t.decodedBodySize:void 0}function Ut(t,e){return t&&!function(t,e){return Z(t,e.logsEndpoint)||Z(t,e.rumEndpoint)||Z(t,e.traceEndpoint)||e.internalMonitoringEndpoint&&Z(t,e.internalMonitoringEndpoint)}(t,e)}function It(){return void 0!==window.performance&&"getEntries"in performance}function Dt(){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("navigation")}function Nt(t,e){(function(t){var e;if(Dt()&&performance.getEntriesByType("navigation").length>0){var n=performance.getEntriesByType("navigation")[0];e=r({},n.toJSON())}else e=r({},Bt(),{name:window.location.href,decodedBodySize:0,startTime:0});e.entryType="resource",e.initiatorType=Rt,e.duration=e.responseEnd,t(e)}((function(n){Ft(e,t,[n])})),It()&&Ft(e,t,performance.getEntries()),window.PerformanceObserver)&&(new PerformanceObserver(F((function(n){return Ft(e,t,n.getEntries())}))).observe({entryTypes:["resource","navigation","paint","longtask"]}),It()&&"addEventListener"in performance&&performance.addEventListener("resourcetimingbufferfull",(function(){performance.clearResourceTimings()})));Dt()||function(t){function e(){var e=r({},Bt(),{entryType:"navigation"});t(e)}if("complete"===document.readyState)e();else{var n=function(){window.removeEventListener("load",n),setTimeout(F(e))};window.addEventListener("load",n)}}((function(n){Ft(e,t,[n])}))}function Bt(){var t={},e=performance.timing;for(var n in e)b(e[n])&&(t[n]=0===e[n]?0:e[n]-_());return t}function Ft(t,e,n){function r(t){e.notify(_t.PERFORMANCE_ENTRY_COLLECTED,t)}t.isTrackedWithResource()&&n.filter((function(t){return"resource"===t.entryType})).forEach(r),n.filter((function(t){return"navigation"===t.entryType})).filter((function(t){return t.loadEventEnd>0})).forEach(r),n.filter((function(t){return"paint"===t.entryType})).forEach(r),n.filter((function(t){return"longtask"===t.entryType})).forEach(r)}function zt(t){if(performance&&"getEntriesByName"in performance){var e,n=performance.getEntriesByName(t.url,"resource").filter((function(e){return n=e,r=t.startTime,o=Pt(t),n.startTime>=r&&Pt(n)<=o;var n,r,o}));return 1===n.length?n[0]:2===n.length&&Pt((e=n)[0])<=e[1].startTime?n[1]:void 0}}function Pt(t){return t.startTime+t.duration}var Ht,Wt,$t,Kt,qt=3e3;function Gt(t,e,n,o,i){var u=s(F((function(){return Jt(o)})),qt,{leading:!1});Xt(t,n,o),function(t,e,n){var r=history.pushState;history.pushState=F((function(){r.apply(this,arguments),Yt(t,e,n)}));var o=history.replaceState;history.replaceState=F((function(){o.apply(this,arguments),Yt(t,e,n)})),window.addEventListener("popstate",(function(){Yt(t,e,n)}))}(t,n,o),function(t,e){t.subscribe(_t.PERFORMANCE_ENTRY_COLLECTED,(function(t){if("navigation"===t.entryType){var n=t;$t=r({},$t,{domComplete:d(n.domComplete),domContentLoaded:d(n.domContentLoadedEventEnd),domInteractive:d(n.domInteractive),loadEventEnd:d(n.loadEventEnd)}),e()}else if("paint"===t.entryType&&"first-contentful-paint"===t.name){$t=r({},$t,{firstContentfulPaint:d(t.startTime)}),e()}})),t.subscribe(_t.ERROR_COLLECTED,(function(){$t.errorCount+=1,e()})),t.subscribe(_t.USER_ACTION_COLLECTED,(function(){$t.userActionCount+=1,e()})),t.subscribe(_t.PERFORMANCE_ENTRY_COLLECTED,(function(t){"longtask"===t.entryType&&($t.longTaskCount+=1,e())})),t.subscribe(_t.RESOURCE_ADDED_TO_BATCH,(function(){$t.resourceCount+=1,e()}))}(e,u),function(t,e,n,r){e.subscribe(_t.SESSION_RENEWED,(function(){Jt(r),Xt(t,n,r)}))}(t,e,n,o),i((function(){return Jt(o)}))}function Xt(t,e,n){Ht=wt?performance.now():0,wt={id:f(),location:r({},t),sessionId:e.getId()},Wt=1,$t={errorCount:0,longTaskCount:0,resourceCount:0,userActionCount:0},Vt(n)}function Jt(t){Wt+=1,Vt(t)}function Vt(t){t({date:E(Ht),duration:d(performance.now()-Ht),evt:{category:Kt.VIEW},rum:{documentVersion:Wt},view:{measures:$t}},wt.id)}function Yt(t,e,n){var r,o;r=wt.location,o=t,r.pathname!==o.pathname&&(Jt(n),Xt(t,e,n))}function Qt(t,e,n,o,i){var a={};i.setExternalContextProvider((function(){return x()({application_id:t,session_id:wt.sessionId,view:{id:wt.id}},a)}));var c=function(t,e,n,r){var o=new D(new U(t.rumEndpoint,t.batchBytesLimit,!0),t.maxBatchSize,t.batchBytesLimit,t.maxMessageSize,t.flushTimeout,(function(){return x()(p(n()),r())}));return{addRumEvent:function(t){e.isTracked()&&o.add(p(t))},addUserEvent:function(t){e.isTracked()&&o.add(t)},beforeFlushOnUnload:function(t){return o.beforeFlushOnUnload(t)},upsertRumEvent:function(t,n){e.isTracked()&&o.upsert(p(t),n)}}}(n,o,(function(){return{applicationId:t,date:(new Date).getTime(),sessionId:wt.sessionId,view:{id:wt.id,referrer:document.referrer,url:wt.location.href}}}),(function(){return a}));return Gt(window.location,e,o,c.upsertRumEvent,c.beforeFlushOnUnload),function(t,e){t.subscribe(_t.ERROR_COLLECTED,(function(t){var n=t.message,o=t.startTime,i=t.context;e(r({message:n,date:E(o),evt:{category:Kt.ERROR}},i))}))}(e,c.addRumEvent),function(t,e,n,r){e.subscribe(_t.REQUEST_COLLECTED,(function(o){if(n.isTrackedWithResource()&&Ut(o.url,t)){var i=zt(o),a=o.type===K.XHR?u.XHR:u.FETCH;r({date:E(i?i.startTime:o.startTime),duration:d(i?i.duration:o.duration),evt:{category:Kt.RESOURCE},http:{method:o.method,performance:xt(i),statusCode:o.status,url:o.url},network:{bytesWritten:Mt(i)},resource:{kind:a},traceId:o.traceId}),e.notify(_t.RESOURCE_ADDED_TO_BATCH)}}))}(n,e,o,c.addRumEvent),function(t,e,n){e.subscribe(_t.PERFORMANCE_ENTRY_COLLECTED,(function(r){switch(r.entryType){case"resource":!function(t,e,n,r){if(!Ut(e.name,t))return;var o=Ct(e);if(y([u.XHR,u.FETCH],o))return;n({date:E(e.startTime),duration:d(e.duration),evt:{category:Kt.RESOURCE},http:{performance:xt(e),url:e.name},network:{bytesWritten:Mt(e)},resource:{kind:o}}),r.notify(_t.RESOURCE_ADDED_TO_BATCH)}(t,r,n,e);break;case"longtask":!function(t,e){e({date:E(t.startTime),duration:d(t.duration),evt:{category:Kt.LONG_TASK}})}(r,n)}}))}(n,e,c.addRumEvent),function(t,e){t.subscribe(_t.USER_ACTION_COLLECTED,(function(t){var n=t.name,o=t.context;e(r({},o,{evt:{name:n,category:Kt.USER_ACTION}}))}))}(e,c.addUserEvent),{addRumGlobalContext:F((function(t,e){a[t]=e})),addUserAction:F((function(t,n){e.notify(_t.USER_ACTION_COLLECTED,{name:t,context:n})})),getInternalContext:F((function(){return{application_id:t,session_id:wt.sessionId,view:{id:wt.id}}})),setRumGlobalContext:F((function(t){a=t}))}}!function(t){t.USER_ACTION="user_action",t.ERROR="error",t.LONG_TASK="long_task",t.VIEW="view",t.RESOURCE="resource"}(Kt||(Kt={}));var Zt,te="_dd_r";function ee(t,e){var n=Et(te,(function(e){return function(t,e){var n;r=e,n=r===Zt.NOT_TRACKED||r===Zt.TRACKED_WITH_RESOURCES||r===Zt.TRACKED_WITHOUT_RESOURCES?e:l(t.sampleRate)?l(t.resourceSampleRate)?Zt.TRACKED_WITH_RESOURCES:Zt.TRACKED_WITHOUT_RESOURCES:Zt.NOT_TRACKED;var r;return{isTracked:ne(n),type:n}}(t,e)}));return n.renewObservable.subscribe((function(){e.notify(_t.SESSION_RENEWED)})),{getId:n.getId,isTracked:function(){return void 0!==n.getId()&&ne(n.getType())},isTrackedWithResource:function(){return void 0!==n.getId()&&n.getType()===Zt.TRACKED_WITH_RESOURCES}}}function ne(t){return t===Zt.TRACKED_WITH_RESOURCES||t===Zt.TRACKED_WITHOUT_RESOURCES}!function(t){t.NOT_TRACKED="0",t.TRACKED_WITH_RESOURCES="1",t.TRACKED_WITHOUT_RESOURCES="2"}(Zt||(Zt={})),n.d(e,"datadogRum",(function(){return oe}));var re,oe=(re=r({},{init:function(t){pt("core.init")},addRumGlobalContext:function(t,e){pt("addRumGlobalContext")},setRumGlobalContext:function(t){pt("setRumGlobalContext")},addUserAction:function(t,e){pt("addUserAction")},getInternalContext:function(){pt("getInternalContext")}}),Object.defineProperty(re,"_setDebug",{get:function(){return H},enumerable:!1}),re),ie=!1;oe.init=F((function(t){if(vt()&&mt()&&function(t){if(ie)return t.silentMultipleInit||console.error("DD_RUM is already initialized."),!1;if(!t||!t.clientToken&&!t.publicApiKey)return console.error("Client Token is not configured, we will not send any data."),!1;if(!t.applicationId)return console.error("Application ID is not configured, no RUM data will be collected."),!1;if(void 0!==t.sampleRate&&!g(t.sampleRate))return console.error("Sample Rate should be a number between 0 and 100"),!1;if(void 0!==t.resourceSampleRate&&!g(t.resourceSampleRate))return console.error("Resource Sample Rate should be a number between 0 and 100"),!1;return!0}(t)){t.publicApiKey&&(t.clientToken=t.publicApiKey);var e=r({},t,{isCollectingError:!0}),n=new Ot,o=ht(e,Tt),i=o.errorObservable,u=o.configuration,a=o.internalMonitoring,c=ee(u,n),s=Qt(e.applicationId,n,u,c,a),f=nt();Nt(n,c),i.subscribe((function(t){return n.notify(_t.ERROR_COLLECTED,t)})),f.subscribe((function(t){return n.notify(_t.REQUEST_COLLECTED,t)})),S()(oe,s),ie=!0}})),("object"==typeof globalThis?globalThis:Function("return this")()).DD_RUM=oe}]);
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=4)}([function(t,e,n){(function(t,n){var r=200,o="__lodash_hash_undefined__",i=800,u=16,a=9007199254740991,c="[object Arguments]",s="[object AsyncFunction]",f="[object Function]",l="[object GeneratorFunction]",d="[object Null]",p="[object Object]",h="[object Proxy]",v="[object Undefined]",m=/^\[object .+?Constructor\]$/,y=/^(?:0|[1-9]\d*)$/,g={};g["[object Float32Array]"]=g["[object Float64Array]"]=g["[object Int8Array]"]=g["[object Int16Array]"]=g["[object Int32Array]"]=g["[object Uint8Array]"]=g["[object Uint8ClampedArray]"]=g["[object Uint16Array]"]=g["[object Uint32Array]"]=!0,g[c]=g["[object Array]"]=g["[object ArrayBuffer]"]=g["[object Boolean]"]=g["[object DataView]"]=g["[object Date]"]=g["[object Error]"]=g[f]=g["[object Map]"]=g["[object Number]"]=g[p]=g["[object RegExp]"]=g["[object Set]"]=g["[object String]"]=g["[object WeakMap]"]=!1;var b="object"==typeof t&&t&&t.Object===Object&&t,E="object"==typeof self&&self&&self.Object===Object&&self,_=b||E||Function("return this")(),T=e&&!e.nodeType&&e,w=T&&"object"==typeof n&&n&&!n.nodeType&&n,O=w&&w.exports===T,R=O&&b.process,S=function(){try{var t=w&&w.require&&w.require("util").types;return t||R&&R.binding&&R.binding("util")}catch(t){}}(),C=S&&S.isTypedArray;function x(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var A,j,L,k=Array.prototype,M=Function.prototype,I=Object.prototype,N=_["__core-js_shared__"],U=M.toString,D=I.hasOwnProperty,B=(A=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",F=I.toString,z=U.call(Object),P=RegExp("^"+U.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),H=O?_.Buffer:void 0,W=_.Symbol,$=_.Uint8Array,G=H?H.allocUnsafe:void 0,K=(j=Object.getPrototypeOf,L=Object,function(t){return j(L(t))}),q=Object.create,X=I.propertyIsEnumerable,J=k.splice,V=W?W.toStringTag:void 0,Y=function(){try{var t=Tt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Q=H?H.isBuffer:void 0,Z=Math.max,tt=Date.now,et=Tt(_,"Map"),nt=Tt(Object,"create"),rt=function(){function t(){}return function(e){if(!It(e))return{};if(q)return q(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function ot(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function it(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function ut(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function at(t){var e=this.__data__=new it(t);this.size=e.size}function ct(t,e){var n=At(t),r=!n&&xt(t),o=!n&&!r&&Lt(t),i=!n&&!r&&!o&&Ut(t),u=n||r||o||i,a=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],c=a.length;for(var s in t)!e&&!D.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||wt(s,c))||a.push(s);return a}function st(t,e,n){(void 0===n||Ct(t[e],n))&&(void 0!==n||e in t)||dt(t,e,n)}function ft(t,e,n){var r=t[e];D.call(t,e)&&Ct(r,n)&&(void 0!==n||e in t)||dt(t,e,n)}function lt(t,e){for(var n=t.length;n--;)if(Ct(t[n][0],e))return n;return-1}function dt(t,e,n){"__proto__"==e&&Y?Y(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}ot.prototype.clear=function(){this.__data__=nt?nt(null):{},this.size=0},ot.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ot.prototype.get=function(t){var e=this.__data__;if(nt){var n=e[t];return n===o?void 0:n}return D.call(e,t)?e[t]:void 0},ot.prototype.has=function(t){var e=this.__data__;return nt?void 0!==e[t]:D.call(e,t)},ot.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=nt&&void 0===e?o:e,this},it.prototype.clear=function(){this.__data__=[],this.size=0},it.prototype.delete=function(t){var e=this.__data__,n=lt(e,t);return!(n<0)&&(n==e.length-1?e.pop():J.call(e,n,1),--this.size,!0)},it.prototype.get=function(t){var e=this.__data__,n=lt(e,t);return n<0?void 0:e[n][1]},it.prototype.has=function(t){return lt(this.__data__,t)>-1},it.prototype.set=function(t,e){var n=this.__data__,r=lt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},ut.prototype.clear=function(){this.size=0,this.__data__={hash:new ot,map:new(et||it),string:new ot}},ut.prototype.delete=function(t){var e=_t(this,t).delete(t);return this.size-=e?1:0,e},ut.prototype.get=function(t){return _t(this,t).get(t)},ut.prototype.has=function(t){return _t(this,t).has(t)},ut.prototype.set=function(t,e){var n=_t(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},at.prototype.clear=function(){this.__data__=new it,this.size=0},at.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},at.prototype.get=function(t){return this.__data__.get(t)},at.prototype.has=function(t){return this.__data__.has(t)},at.prototype.set=function(t,e){var n=this.__data__;if(n instanceof it){var o=n.__data__;if(!et||o.length<r-1)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new ut(o)}return n.set(t,e),this.size=n.size,this};var pt,ht=function(t,e,n){for(var r=-1,o=Object(t),i=n(t),u=i.length;u--;){var a=i[pt?u:++r];if(!1===e(o[a],a,o))break}return t};function vt(t){return null==t?void 0===t?v:d:V&&V in Object(t)?function(t){var e=D.call(t,V),n=t[V];try{t[V]=void 0;var r=!0}catch(t){}var o=F.call(t);r&&(e?t[V]=n:delete t[V]);return o}(t):function(t){return F.call(t)}(t)}function mt(t){return Nt(t)&&vt(t)==c}function yt(t){return!(!It(t)||function(t){return!!B&&B in t}(t))&&(kt(t)?P:m).test(function(t){if(null!=t){try{return U.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function gt(t){if(!It(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Ot(t),n=[];for(var r in t)("constructor"!=r||!e&&D.call(t,r))&&n.push(r);return n}function bt(t,e,n,r,o){t!==e&&ht(e,(function(i,u){if(o||(o=new at),It(i))!function(t,e,n,r,o,i,u){var a=Rt(t,n),c=Rt(e,n),s=u.get(c);if(s)return void st(t,n,s);var f=i?i(a,c,n+"",t,e,u):void 0,l=void 0===f;if(l){var d=At(c),h=!d&&Lt(c),v=!d&&!h&&Ut(c);f=c,d||h||v?At(a)?f=a:Nt(E=a)&&jt(E)?f=function(t,e){var n=-1,r=t.length;e||(e=Array(r));for(;++n<r;)e[n]=t[n];return e}(a):h?(l=!1,f=function(t,e){if(e)return t.slice();var n=t.length,r=G?G(n):new t.constructor(n);return t.copy(r),r}(c,!0)):v?(l=!1,m=c,y=!0?(g=m.buffer,b=new g.constructor(g.byteLength),new $(b).set(new $(g)),b):m.buffer,f=new m.constructor(y,m.byteOffset,m.length)):f=[]:function(t){if(!Nt(t)||vt(t)!=p)return!1;var e=K(t);if(null===e)return!0;var n=D.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&U.call(n)==z}(c)||xt(c)?(f=a,xt(a)?f=function(t){return function(t,e,n,r){var o=!n;n||(n={});var i=-1,u=e.length;for(;++i<u;){var a=e[i],c=r?r(n[a],t[a],a,n,t):void 0;void 0===c&&(c=t[a]),o?dt(n,a,c):ft(n,a,c)}return n}(t,Dt(t))}(a):It(a)&&!kt(a)||(f=function(t){return"function"!=typeof t.constructor||Ot(t)?{}:rt(K(t))}(c))):l=!1}var m,y,g,b;var E;l&&(u.set(c,f),o(f,c,r,i,u),u.delete(c));st(t,n,f)}(t,e,u,n,bt,r,o);else{var a=r?r(Rt(t,u),i,u+"",t,e,o):void 0;void 0===a&&(a=i),st(t,u,a)}}),Dt)}function Et(t,e){return St(function(t,e,n){return e=Z(void 0===e?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=Z(r.length-e,0),u=Array(i);++o<i;)u[o]=r[e+o];o=-1;for(var a=Array(e+1);++o<e;)a[o]=r[o];return a[e]=n(u),x(t,this,a)}}(t,e,zt),t+"")}function _t(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function Tt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return yt(n)?n:void 0}function wt(t,e){var n=typeof t;return!!(e=null==e?a:e)&&("number"==n||"symbol"!=n&&y.test(t))&&t>-1&&t%1==0&&t<e}function Ot(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||I)}function Rt(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var St=function(t){var e=0,n=0;return function(){var r=tt(),o=u-(r-n);if(n=r,o>0){if(++e>=i)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Y?function(t,e){return Y(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:zt);function Ct(t,e){return t===e||t!=t&&e!=e}var xt=mt(function(){return arguments}())?mt:function(t){return Nt(t)&&D.call(t,"callee")&&!X.call(t,"callee")},At=Array.isArray;function jt(t){return null!=t&&Mt(t.length)&&!kt(t)}var Lt=Q||function(){return!1};function kt(t){if(!It(t))return!1;var e=vt(t);return e==f||e==l||e==s||e==h}function Mt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=a}function It(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Nt(t){return null!=t&&"object"==typeof t}var Ut=C?function(t){return function(e){return t(e)}}(C):function(t){return Nt(t)&&Mt(t.length)&&!!g[vt(t)]};function Dt(t){return jt(t)?ct(t,!0):gt(t)}var Bt,Ft=(Bt=function(t,e,n){bt(t,e,n)},Et((function(t,e){var n=-1,r=e.length,o=r>1?e[r-1]:void 0,i=r>2?e[2]:void 0;for(o=Bt.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(t,e,n){if(!It(n))return!1;var r=typeof e;return!!("number"==r?jt(n)&&wt(e,n.length):"string"==r&&e in n)&&Ct(n[e],t)}(e[0],e[1],i)&&(o=r<3?void 0:o,r=1),t=Object(t);++n<r;){var u=e[n];u&&Bt(t,u,n,o)}return t})));function zt(t){return t}n.exports=Ft}).call(this,n(2),n(3)(t))},function(t,e){var n=9007199254740991,r="[object Arguments]",o="[object Function]",i="[object GeneratorFunction]",u=/^(?:0|[1-9]\d*)$/;function a(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var c,s,f=Object.prototype,l=f.hasOwnProperty,d=f.toString,p=f.propertyIsEnumerable,h=(c=Object.keys,s=Object,function(t){return c(s(t))}),v=Math.max,m=!p.call({valueOf:1},"valueOf");function y(t,e){var n=T(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&w(t)}(t)&&l.call(t,"callee")&&(!p.call(t,"callee")||d.call(t)==r)}(t)?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],o=n.length,i=!!o;for(var u in t)!e&&!l.call(t,u)||i&&("length"==u||b(u,o))||n.push(u);return n}function g(t,e,n){var r=t[e];l.call(t,e)&&_(r,n)&&(void 0!==n||e in t)||(t[e]=n)}function b(t,e){return!!(e=null==e?n:e)&&("number"==typeof t||u.test(t))&&t>-1&&t%1==0&&t<e}function E(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||f)}function _(t,e){return t===e||t!=t&&e!=e}var T=Array.isArray;function w(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}(t.length)&&!function(t){var e=O(t)?d.call(t):"";return e==o||e==i}(t)}function O(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var R,S=(R=function(t,e){if(m||E(e)||w(e))!function(t,e,n,r){n||(n={});for(var o=-1,i=e.length;++o<i;){var u=e[o],a=r?r(n[u],t[u],u,n,t):void 0;g(n,u,void 0===a?t[u]:a)}}(e,function(t){return w(t)?y(t):function(t){if(!E(t))return h(t);var e=[];for(var n in Object(t))l.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}(e),t);else for(var n in e)l.call(e,n)&&g(t,n,e[n])},function(t,e){return e=v(void 0===e?t.length-1:e,0),function(){for(var n=arguments,r=-1,o=v(n.length-e,0),i=Array(o);++r<o;)i[r]=n[e+r];r=-1;for(var u=Array(e+1);++r<e;)u[r]=n[r];return u[e]=i,a(t,this,u)}}((function(t,e){var n=-1,r=e.length,o=r>1?e[r-1]:void 0,i=r>2?e[2]:void 0;for(o=R.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(t,e,n){if(!O(n))return!1;var r=typeof e;return!!("number"==r?w(n)&&b(e,n.length):"string"==r&&e in n)&&_(n[e],t)}(e[0],e[1],i)&&(o=r<3?void 0:o,r=1),t=Object(t);++n<r;){var u=e[n];u&&R(t,u,n,o)}return t})));t.exports=S},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";n.r(e);var r=function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function o(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new n((function(e){e(t.value)})).then(u,a)}c((r=r.apply(t,e||[])).next())}))}function i(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var u,a,c=6e4,s=60*c,f=24*s;function l(t,e,n){var r=!n||void 0===n.leading||n.leading,o=!n||void 0===n.trailing||n.trailing,i=!1,u=!1;return function(){var n=this;i?u=!0:(r?t.apply(this):u=!0,i=!0,setTimeout((function(){o&&u&&t.apply(n),i=!1,u=!1}),e))}}function d(t){return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):(1e7+"-1000-4000-8000-100000000000").replace(/[018]/g,d)}function p(t){return 0!==t&&100*Math.random()<=t}function h(t){return+(1e6*t).toFixed(0)}function v(t){var e={};return Object.keys(t).forEach((function(n){var r;e[(r=n,r.replace(/[A-Z]/g,(function(t,e){return(0!==e?"_":"")+t.toLowerCase()})).replace(/-/g,"_"))]=function t(e){if(Array.isArray(e))return e.map((function(e){return t(e)}));if("object"==typeof e)return v(e);return e}(t[n])})),e}function m(){}function y(t,e,n){if(null==t)return JSON.stringify(t);var r=[!1,void 0];g(t)&&(r=[!0,t.toJSON],delete t.toJSON);var o,i,u=[!1,void 0];"object"==typeof t&&g(o=Object.getPrototypeOf(t))&&(u=[!0,o.toJSON],delete o.toJSON);try{i=JSON.stringify(t,void 0,n)}catch(t){i="<error: unable to serialize object>"}finally{r[0]&&(t.toJSON=r[1]),u[0]&&(o.toJSON=u[1])}return i}function g(t){return"object"==typeof t&&null!==t&&t.hasOwnProperty("toJSON")}function b(t,e){return-1!==t.indexOf(e)}function E(t){return _(t)&&t>=0&&t<=100}function _(t){return"number"==typeof t}function T(t){return Math.floor(w()+t)}function w(){return void 0===a&&(a=performance.timing.navigationStart),a}function O(t){if(t.origin)return t.origin;var e=t.host.replace(/(:80|:443)$/,"");return t.protocol+"//"+e}!function(t){t.DOCUMENT="document",t.XHR="xhr",t.BEACON="beacon",t.FETCH="fetch",t.CSS="css",t.JS="js",t.IMAGE="image",t.FONT="font",t.MEDIA="media",t.OTHER="other"}(u||(u={}));var R={isCollectingError:!0,maxErrorsByMinute:3e3,maxInternalMonitoringMessagesPerPage:15,resourceSampleRate:100,sampleRate:100,silentMultipleInit:!1,requestErrorResponseLengthLimit:32768,flushTimeout:3e4,maxBatchSize:50,maxMessageSize:262144,batchBytesLimit:16384};function S(t,e,n){var r="us"===e.datacenter?"com":"eu",o="production"===e.env?"datadoghq."+r:"datad0g."+r,i="version:"+e.version;return"https://"+t+"-http-intake.logs."+o+"/v1/input/"+e.clientToken+"?ddsource="+(n||"browser")+"&ddtags="+i}var C=n(1),x=n.n(C),A=n(0),j=n.n(A),L="?",k=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function M(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var I=function(){var t,e,n,r,o,i,u=[];function a(t,e,n){var r;for(var o in u)if(M(u,o))try{u[o](t,e,n)}catch(t){r=t}if(r)throw r}function c(t,r,o,i,u){if(e)N.augmentStackTraceWithInitialElement(e,r,o,""+t),f();else if(u)a(N(u),!0,u);else{var c,s={url:r,column:i,line:o},l=t;if("[object String]"==={}.toString.call(t)){var d=l.match(k);d&&(c=d[1],l=d[2])}a({name:c,message:l,stack:[s]},!0)}return!!n&&n.apply(this,arguments)}function s(t){var e=t.reason||"Empty reason";a(N(e),!0,e)}function f(){var n=e,r=t;e=void 0,t=void 0,a(n,!1,r)}function l(n){if(e){if(t===n)return;f()}var r=N(n);throw e=r,t=n,setTimeout((function(){t===n&&f()}),r.incomplete?2e3:0),n}return l.subscribe=function(t){!function(){if(r)return;n=window.onerror,window.onerror=P(c),r=!0}(),function(){if(i)return;o=null!==window.onunhandledrejection?window.onunhandledrejection:void 0,window.onunhandledrejection=P(s),i=!0}(),u.push(t)},l.unsubscribe=function(t){for(var e=u.length-1;e>=0;e-=1)u[e]===t&&u.splice(e,1);0===u.length&&(r&&(window.onerror=n,r=!1),i&&(window.onunhandledrejection=o,i=!1))},l.traceKitWindowOnError=c,l}(),N=function(){var t=!1;function e(t){if(t.stack){for(var e,n,r,o,i=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,u=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,a=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,c=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,s=/\((\S*)(?::(\d+))(?::(\d+))\)/,f=t.stack.split("\n"),l=[],d=0,p=f.length;d<p;d+=1){if(i.exec(f[d])){var h=(r=i.exec(f[d]))[2]&&0===r[2].indexOf("native");e=r[2]&&0===r[2].indexOf("eval"),n=s.exec(r[2]),e&&n&&(r[2]=n[1],r[3]=n[2],r[4]=n[3]),o={args:h?[r[2]]:[],column:r[4]?+r[4]:void 0,func:r[1]||L,line:r[3]?+r[3]:void 0,url:h?void 0:r[2]}}else if(a.exec(f[d]))o={args:[],column:(r=a.exec(f[d]))[4]?+r[4]:void 0,func:r[1]||L,line:+r[3],url:r[2]};else{if(!u.exec(f[d]))continue;e=(r=u.exec(f[d]))[3]&&r[3].indexOf(" > eval")>-1,n=c.exec(r[3]),e&&n?(r[3]=n[1],r[4]=n[2],r[5]=void 0):0!==d||r[5]||void 0===t.columnNumber||(l[0].column=t.columnNumber+1),o={args:r[2]?r[2].split(","):[],column:r[5]?+r[5]:void 0,func:r[1]||L,line:r[4]?+r[4]:void 0,url:r[3]}}!o.func&&o.line&&(o.func=L),l.push(o)}if(l.length)return{stack:l,message:t.message,name:t.name}}}function n(t,e,n,r){var o={url:e,line:n?+n:void 0};if(o.url&&o.line){t.incomplete=!1;var i=t.stack;if(i.length>0&&i[0].url===o.url){if(i[0].line===o.line)return!1;if(!i[0].line&&i[0].func===o.func)return i[0].line=o.line,i[0].context=o.context,!1}return i.unshift(o),t.partial=!0,!0}return t.incomplete=!0,!1}function r(t,e){for(var o,i,u=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,a=[],c={},s=!1,f=r.caller;f&&!s;f=f.caller)f!==N&&f!==I&&(i={args:[],column:void 0,func:L,line:void 0,url:void 0},o=u.exec(f.toString()),f.name?i.func=f.name:o&&(i.func=o[1]),void 0===i.func&&(i.func=o?o.input.substring(0,o.input.indexOf("{")):void 0),c[""+f]?s=!0:c[""+f]=!0,a.push(i));e&&a.splice(0,e);var l={stack:a,message:t.message,name:t.name};return n(l,t.sourceURL||t.fileName,t.line||t.lineNumber,t.message||t.description),l}function o(n,o){var i,u=void 0===o?0:+o;try{if(i=function(t){var e=t.stacktrace;if(e){for(var n,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,o=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,i=e.split("\n"),u=[],a=0;a<i.length;a+=2){var c=void 0;r.exec(i[a])?c={args:[],column:void 0,func:(n=r.exec(i[a]))[3],line:+n[1],url:n[2]}:o.exec(i[a])&&(c={args:(n=o.exec(i[a]))[5]?n[5].split(","):[],column:+n[2],func:n[3]||n[4],line:+n[1],url:n[6]}),c&&(!c.func&&c.line&&(c.func=L),c.context=[i[a+1]],u.push(c))}if(u.length)return{stack:u,message:t.message,name:t.name}}}(n))return i}catch(e){if(t)throw e}try{if(i=e(n))return i}catch(e){if(t)throw e}try{if(i=function(t){var e=t.message.split("\n");if(!(e.length<4)){var n,r=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,o=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,i=/^\s*Line (\d+) of function script\s*$/i,u=[],a=window&&window.document&&window.document.getElementsByTagName("script"),c=[];for(var s in a)M(a,s)&&!a[s].src&&c.push(a[s]);for(var f=2;f<e.length;f+=2){var l=void 0;if(r.exec(e[f]))l={args:[],column:void 0,func:(n=r.exec(e[f]))[3],line:+n[1],url:n[2]};else if(o.exec(e[f]))l={args:[],column:void 0,func:(n=o.exec(e[f]))[4],line:+n[1],url:n[3]};else if(i.exec(e[f])){n=i.exec(e[f]),l={url:window.location.href.replace(/#.*$/,""),args:[],column:void 0,func:"",line:+n[1]}}l&&(l.func||(l.func=L),l.context=[e[f+1]],u.push(l))}if(u.length)return{stack:u,message:e[0],name:t.name}}}(n))return i}catch(e){if(t)throw e}try{if(i=r(n,u+1))return i}catch(e){if(t)throw e}return{message:n.message,name:n.name,stack:[]}}return o.augmentStackTraceWithInitialElement=n,o.computeStackTraceFromStackProp=e,o.ofCaller=function(t){var e=1+(void 0===t?0:+t);try{throw new Error}catch(t){return N(t,e+1)}},o}();var U=function(){function t(t,e,n){void 0===n&&(n=!1),this.endpointUrl=t,this.bytesLimit=e,this.withBatchTime=n}return t.prototype.send=function(t,e){var n=this.withBatchTime?function(t){return t+(-1===t.indexOf("?")?"?":"&")+"batch_time="+(new Date).getTime()}(this.endpointUrl):this.endpointUrl;if(navigator.sendBeacon&&e<this.bytesLimit&&navigator.sendBeacon(n,t))return;var r=new XMLHttpRequest;r.open("POST",n,!0),r.send(t)},t}();var D,B=function(){function t(t,e,n,r,o,i){this.request=t,this.maxSize=e,this.bytesLimit=n,this.maxMessageSize=r,this.flushTimeout=o,this.contextProvider=i,this.beforeFlushOnUnloadHandlers=[],this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesSize=0,this.bufferMessageCount=0,this.flushOnVisibilityHidden(),this.flushPeriodically()}return t.prototype.add=function(t){this.addOrUpdate(t)},t.prototype.upsert=function(t,e){this.addOrUpdate(t,e)},t.prototype.beforeFlushOnUnload=function(t){this.beforeFlushOnUnloadHandlers.push(t)},t.prototype.flush=function(){if(0!==this.bufferMessageCount){var t=this.pushOnlyBuffer.concat((e=this.upsertBuffer,n=[],Object.keys(e).forEach((function(t){n.push(e[t])})),n));this.request.send(t.join("\n"),this.bufferBytesSize),this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesSize=0,this.bufferMessageCount=0}var e,n},t.prototype.addOrUpdate=function(t,e){var n=this.process(t),r=n.processedMessage,o=n.messageBytesSize;o>=this.maxMessageSize?console.warn("Discarded a message whose size was bigger than the maximum allowed size "+this.maxMessageSize+"KB."):(this.hasMessageFor(e)&&this.remove(e),this.willReachedBytesLimitWith(o)&&this.flush(),this.push(r,o,e),this.isFull()&&this.flush())},t.prototype.process=function(t){var e=y(j()({},this.contextProvider(),t));return{processedMessage:e,messageBytesSize:this.sizeInBytes(e)}},t.prototype.push=function(t,e,n){this.bufferMessageCount>0&&(this.bufferBytesSize+=1),void 0!==n?this.upsertBuffer[n]=t:this.pushOnlyBuffer.push(t),this.bufferBytesSize+=e,this.bufferMessageCount+=1},t.prototype.remove=function(t){var e=this.upsertBuffer[t];delete this.upsertBuffer[t];var n=this.sizeInBytes(e);this.bufferBytesSize-=n,this.bufferMessageCount-=1,this.bufferMessageCount>0&&(this.bufferBytesSize-=1)},t.prototype.hasMessageFor=function(t){return void 0!==t&&void 0!==this.upsertBuffer[t]},t.prototype.willReachedBytesLimitWith=function(t){return this.bufferBytesSize+t+1>=this.bytesLimit},t.prototype.isFull=function(){return this.bufferMessageCount===this.maxSize||this.bufferBytesSize>=this.bytesLimit},t.prototype.sizeInBytes=function(t){return~-encodeURI(t).split(/%..|./).length},t.prototype.flushPeriodically=function(){var t=this;setTimeout((function(){t.flush(),t.flushPeriodically()}),this.flushTimeout)},t.prototype.flushOnVisibilityHidden=function(){var t=this;navigator.sendBeacon&&(window.addEventListener("beforeunload",P((function(){t.beforeFlushOnUnloadHandlers.forEach((function(t){return t()}))}))),document.addEventListener("visibilitychange",P((function(){"hidden"===document.visibilityState&&t.flush()}))),window.addEventListener("beforeunload",P((function(){return t.flush()}))))},t}();!function(t){t.info="info",t.error="error"}(D||(D={}));var F,z={maxMessagesPerPage:0,sentMessageCount:0};function P(t){return function(){try{return t.apply(this,arguments)}catch(t){K(t);try{W(t)}catch(t){K(t)}}}}function H(t){!function(t){z.debugMode&&console.log("[MONITORING MESSAGE]",t)}(t),$({message:t,status:D.info})}function W(t){$(r({},function(t){if(t instanceof Error){var e=N(t);return{error:{kind:e.name,stack:st(e)},message:e.message}}return{error:{stack:"Not an instance of error"},message:"Uncaught "+y(t)}}(t),{status:D.error}))}function $(t){z.batch&&z.sentMessageCount<z.maxMessagesPerPage&&(z.sentMessageCount+=1,z.batch.add(t))}function G(t){z.debugMode=t}function K(t){z.debugMode&&console.warn("[INTERNAL ERROR]",t)}var q,X,J,V,Y,Q,Z,tt=function(){function t(){this.observers=[]}return t.prototype.subscribe=function(t){this.observers.push(t)},t.prototype.notify=function(t){this.observers.forEach((function(e){return e(t)}))},t}();function et(t){return ot(t,O(window.location)).href}function nt(t,e){return rt(t)===rt(e)}function rt(t){return O(ot(t))}function ot(t,e){if(function(){if(void 0!==q)return q;try{var t=new URL("http://test/path");return q="http://test/path"===t.href}catch(t){q=!1}return q}())return void 0!==e?new URL(t,e):new URL(t);if(void 0===e&&!/:/.test(t))throw new Error("Invalid URL: '"+t+"'");var n=document,r=n.createElement("a");if(void 0!==e){var o=(n=document.implementation.createHTMLDocument("")).createElement("base");o.href=e,n.head.appendChild(o),n.body.appendChild(r)}return r.href=t,r}function it(){return J||(function(t){var e=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=P((function(t,n){return this._datadog_xhr={method:t,url:n},e.apply(this,arguments)}));var n=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(e){var r=this,o=performance.now(),i=!1,u=function(){i||(i=!0,t.notify({startTime:o,duration:performance.now()-o,method:r._datadog_xhr.method,response:r.response,status:r.status,traceId:ut(),type:X.XHR,url:et(r._datadog_xhr.url)}))},a=this.onreadystatechange;return this.onreadystatechange=function(){this.readyState===XMLHttpRequest.DONE&&P(u)(),a&&a.apply(this,arguments)},this.addEventListener("loadend",P(u)),n.apply(this,arguments)}}(J=new tt),function(t){if(!window.fetch)return;var e=window.fetch;window.fetch=P((function(n,r){var u=this,a=r&&r.method||"object"==typeof n&&n.method||"GET",c=performance.now(),s=function(e){return o(u,void 0,void 0,(function(){var r,o,u,s,f;return i(this,(function(i){switch(i.label){case 0:return r=performance.now()-c,o=et("object"==typeof n&&n.url||n),"stack"in e||e instanceof Error?(u=N(e),t.notify({duration:r,method:a,startTime:c,url:o,response:st(u),status:0,traceId:ut(),type:X.FETCH}),[3,6]):[3,1];case 1:if(!("status"in e))return[3,6];s=void 0,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,e.clone().text()];case 3:return s=i.sent(),[3,5];case 4:return f=i.sent(),s="Unable to retrieve response: "+f,[3,5];case 5:t.notify({duration:r,method:a,startTime:c,url:o,response:s,responseType:e.type,status:e.status,traceId:ut(),type:X.FETCH}),i.label=6;case 6:return[2]}}))}))},f=e.call(this,n,r);return f.then(P(s),P(s)),f}))}(J)),J}function ut(){return"ddtrace"in window&&window.ddtrace.tracer.scope().active()?window.ddtrace.tracer.scope().active().context().toTraceId():void 0}function at(t){if(!Y){var e=new tt;if(t.isCollectingError)!function(t,e,n){n.subscribe((function(n){(function(t){return 0===t.status&&"opaque"!==t.responseType}(n)||function(t){return t.status>=500}(n))&&e.notify({context:{error:{origin:V.NETWORK,stack:ft(n.response,t)||"Failed to load"},http:{method:n.method,status_code:n.status,url:n.url}},message:lt(n.type)+" error "+n.method+" "+n.url,startTime:n.startTime})}))}(t,e,it()),function(t){Q=console.error,console.error=P((function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];Q.apply(console,[e].concat(n)),t.notify({context:{error:{origin:V.CONSOLE}},message:["console error:",e].concat(n).map(ct).join(" "),startTime:performance.now()})}))}(e),function(t){Z=function(e,n,r){t.notify(function(t,e){var n,r;void 0!==t.message||e instanceof Error?(n=t.message||"Empty message",r=st(t)):(n="Uncaught "+y(e),r="No stack, consider using an instance of Error");return{message:n,context:{error:{stack:r,kind:t.name,origin:V.SOURCE}},startTime:performance.now()}}(e,r))},I.subscribe(Z)}(e);Y=function(t,e){var n=0,r=new tt;return e.subscribe((function(e){n<t.maxErrorsByMinute?(n+=1,r.notify(e)):n===t.maxErrorsByMinute&&(n+=1,r.notify({context:{error:{origin:V.AGENT}},message:"Reached max number of errors by minute: "+t.maxErrorsByMinute,startTime:performance.now()}))})),setInterval((function(){return n=0}),c),r}(t,e)}return Y}function ct(t){return"string"==typeof t?t:t instanceof Error?st(N(t)):y(t,0,2)}function st(t){var e=(t.name||"Error")+": "+t.message;return t.stack.forEach((function(t){var n="?"===t.func?"<anonymous>":t.func,r=t.args&&t.args.length>0?"("+t.args.join(", ")+")":"",o=t.line?":"+t.line:"",i=t.line&&t.column?":"+t.column:"";e+="\n at "+n+r+" @ "+t.url+o+i})),e}function ft(t,e){return t&&t.length>e.requestErrorResponseLengthLimit?t.substring(0,e.requestErrorResponseLengthLimit)+"...":t}function lt(t){return X.XHR===t?"XHR":"Fetch"}!function(t){t.FETCH="fetch",t.XHR="xhr"}(X||(X={})),function(t){t.AGENT="agent",t.CONSOLE="console",t.NETWORK="network",t.SOURCE="source",t.LOGGER="logger"}(V||(V={}));var dt=1e3;function pt(t){var e,n,r=!1,o=function(){r=!0,window.clearTimeout(e),e=window.setTimeout((function(){r=!1}),dt)};return{get:function(){return r?n:(n=vt(t),o(),n)},set:function(e,r){ht(t,e,r),n=e,o()}}}function ht(t,e,n){var r=new Date;r.setTime(r.getTime()+n);var o="expires="+r.toUTCString();document.cookie=t+"="+e+";"+o+";path=/"}function vt(t){var e=document.cookie.match("(^|;)\\s*"+t+"\\s*=\\s*([^;]+)");return e?e.pop():void 0}function mt(t){console.warn("'"+t+"' not yet available, please call '.init()' first.")}function yt(t,e){var n=function(t,e){var n={clientToken:t.clientToken,datacenter:t.datacenter||e.datacenter,env:e.env,version:e.version},o=Array.isArray(t.enableExperimentalFeatures)?t.enableExperimentalFeatures:[],i=r({isEnabled:function(t){return b(o,t)},logsEndpoint:S("browser",n),rumEndpoint:S("rum",n),traceEndpoint:S("public-trace",n)},R);return t.internalMonitoringApiKey&&(i.internalMonitoringEndpoint=S("browser",n,"browser-agent-internal-monitoring")),"isCollectingError"in t&&(i.isCollectingError=!!t.isCollectingError),"sampleRate"in t&&(i.sampleRate=t.sampleRate),"resourceSampleRate"in t&&(i.resourceSampleRate=t.resourceSampleRate),"e2e-test"===n.env&&(void 0!==t.internalMonitoringEndpoint&&(i.internalMonitoringEndpoint=t.internalMonitoringEndpoint),void 0!==t.logsEndpoint&&(i.logsEndpoint=t.logsEndpoint),void 0!==t.rumEndpoint&&(i.rumEndpoint=t.rumEndpoint)),i}(t,e),o=function(t){if(t.internalMonitoringEndpoint){var e=new B(new U(t.internalMonitoringEndpoint,t.batchBytesLimit),t.maxBatchSize,t.batchBytesLimit,t.maxMessageSize,t.flushTimeout,(function(){return j()({date:(new Date).getTime(),view:{referrer:document.referrer,url:window.location.href}},void 0!==F?F():{})}));x()(z,{batch:e,maxMessagesPerPage:t.maxInternalMonitoringMessagesPerPage,sentMessageCount:0})}return{setExternalContextProvider:function(t){F=t}}}(n);return{configuration:n,errorObservable:at(n),internalMonitoring:o}}function gt(){return!!function(){if(void 0===document.cookie||null===document.cookie)return!1;try{return ht("dd_rum_test","test",1e3),"test"===vt("dd_rum_test")}catch(t){return console.error(t),!1}}()||(console.warn("Cookies are not authorized, we will not send any data."),!1)}function bt(){return"file:"!==window.location.protocol||(console.error("Execution is not allowed in the current context."),!1)}var Et="_dd",_t=15*c,Tt=[];function wt(t,e){var n=pt(Et),r=pt(t),o=new tt,i=n.get(),u=l((function(){var t=e(r.get()),u=t.type,a=t.isTracked;r.set(u,_t),a&&(n.get()?n.set(n.get(),_t):n.set(d(),_t),i!==n.get()&&(i=n.get(),o.notify()))}),dt);return u(),function(t){var e={capture:!0,passive:!0};["click","touchstart","keydown","scroll"].forEach((function(n){document.addEventListener(n,t,e),Tt.push((function(){return document.removeEventListener(n,t,e)}))}))}(u),{getId:function(){return n.get()},getType:function(){return r.get()},renewObservable:o}}(function(){function t(t){var e=this;this.requests=[],this.pendingFetch=0,this.whenAllCompleteFn=m,t.subscribe((function(t){e.requests.push(t),e.pendingFetch-=1,0===e.pendingFetch&&setTimeout((function(){e.whenAllCompleteFn(e.requests)}))}))}t.prototype.whenAllComplete=function(t){this.whenAllCompleteFn=t},t.prototype.getStub=function(){var t=this;return function(){var e,n;t.pendingFetch+=1;var u=new Promise((function(t,r){e=t,n=r}));return u.resolveWith=function(n){return o(t,void 0,void 0,(function(){var t=this;return i(this,(function(u){return[2,e(r({},n,{clone:function(){return{text:function(){return o(t,void 0,void 0,(function(){return i(this,(function(t){if(n.responseTextError)throw n.responseTextError;return[2,n.responseText]}))}))}}}}))]}))}))},u.rejectWith=function(e){return o(t,void 0,void 0,(function(){return i(this,(function(t){return[2,n(e)]}))}))},u}}})(),function(){function t(){}t.prototype.fakeEntry=function(t,e){var n=function(){return[t]};this.instance.callback({getEntries:n,getEntriesByName:n,getEntriesByType:function(t){return t===e?n():[]}})},t.prototype.getStub=function(){var t,e=this;return(t=function(){function t(t){this.callback=t,e.instance=this}return t.prototype.observe=function(t){},t}()).supportedEntryTypes=["navigation"],t}}();var Ot,Rt={datacenter:"us",env:"production",version:"1.8.1"};!function(t){t[t.ERROR_COLLECTED=0]="ERROR_COLLECTED",t[t.PERFORMANCE_ENTRY_COLLECTED=1]="PERFORMANCE_ENTRY_COLLECTED",t[t.USER_ACTION_COLLECTED=2]="USER_ACTION_COLLECTED",t[t.REQUEST_COLLECTED=3]="REQUEST_COLLECTED",t[t.SESSION_RENEWED=4]="SESSION_RENEWED",t[t.RESOURCE_ADDED_TO_BATCH=5]="RESOURCE_ADDED_TO_BATCH"}(Ot||(Ot={}));var St=function(){function t(){this.callbacks={}}return t.prototype.notify=function(t,e){var n=this.callbacks[t];n&&n.forEach((function(t){return t(e)}))},t.prototype.subscribe=function(t,e){var n=this.callbacks[t];n?n.push(e):this.callbacks[t]=[e]},t}(),Ct="_dd_exp_s",xt=4*s,At=c,jt=[],Lt=!1,kt=!1,Mt=!1;function It(t){t.subscribe(Ot.SESSION_RENEWED,(function(){ht(Ct,Date.now().toString(),f),Lt=!1,kt=!1,Mt=!1})),Ut((function(){!Lt&&!Dt()&&Bt()&&Nt()<xt&&(H("[session check][expanded] session should have been expanded"),Lt=!0)})),setInterval(P((function(){Dt()&&Bt()&&Nt()>xt&&(H("[session check][timeout] session duration above timeout"),ht(Ct,"",1))})),At),Ut((function(){!kt&&!Dt()&&Bt()&&Nt()>xt&&(H("[session check][timeout] page still visible after session timeout"),kt=!0)})),function(t){var e=Dt(),n=!0;Ut((function(){Mt||Dt()||(H("[session check][renewed] page visible after session expiration"),Mt=!0)})),t.subscribe(Ot.SESSION_RENEWED,(function(){(e||!n)&&H("[session check][renewed] session renewed by user interaction"),n=!1}))}(t),function(){var t;function e(){jt.forEach((function(t){return t()})),t=window.setInterval(P((function(){jt.forEach((function(t){return t()}))})),At)}function n(){clearInterval(t)}document.addEventListener("visibilitychange",P((function(){"visible"===document.visibilityState?e():n()}))),"visible"===document.visibilityState?e():n()}()}function Nt(){return Date.now()-parseInt(vt(Ct),10)}function Ut(t){jt.push(t)}function Dt(){return!!vt(Et)}function Bt(){return!!vt(Ct)}var Ft,zt="initial_document",Pt=[[u.DOCUMENT,function(t){return zt===t}],[u.XHR,function(t){return"xmlhttprequest"===t}],[u.FETCH,function(t){return"fetch"===t}],[u.BEACON,function(t){return"beacon"===t}],[u.CSS,function(t,e){return null!==e.match(/\.css$/i)}],[u.JS,function(t,e){return null!==e.match(/\.js$/i)}],[u.IMAGE,function(t,e){return b(["image","img","icon"],t)||null!==e.match(/\.(gif|jpg|jpeg|tiff|png|svg)$/i)}],[u.FONT,function(t,e){return null!==e.match(/\.(woff|eot|woff2|ttf)$/i)}],[u.MEDIA,function(t,e){return b(["audio","video"],t)||null!==e.match(/\.(mp3|mp4)$/i)}]];function Ht(t){var e=t.name;if(!function(t){try{return!!ot(t)}catch(t){return!1}}(e))return H('Failed to construct URL for "'+t.name+'"'),u.OTHER;for(var n=function(t){var e=ot(t).pathname;return"/"===e[0]?e:"/"+e}(e),r=0,o=Pt;r<o.length;r++){var i=o[r],a=i[0];if((0,i[1])(t.initiatorType,n))return a}return u.OTHER}function Wt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=1;n<t.length;n+=1)if(t[n-1]>t[n])return!1;return!0}function $t(t){var e=t.duration,n=t.startTime,r=t.responseEnd;return h(0===e&&n<r?r-n:e)}function Gt(t){var e=t.startTime,n=t.fetchStart,r=t.domainLookupStart,o=t.domainLookupEnd,i=t.connectStart,u=t.secureConnectionStart,a=t.connectEnd,c=t.requestStart,s=t.responseStart,f=t.responseEnd,l=t.redirectStart,d=t.redirectEnd;if(Wt(e,n,r,o,i,a,c,s,f)){var p=n!==e;if(!p||(l<e&&(l=e),d<e&&(d=n),Wt(e,l,d,n))){var h={download:Kt(e,s,f),firstByte:Kt(e,c,s)};return a!==n&&(h.connect=Kt(e,i,a),Wt(i,u,a)&&(h.ssl=Kt(e,u,a))),o!==n&&(h.dns=Kt(e,r,o)),p&&(h.redirect=Kt(e,l,d)),h}}}function Kt(t,e,n){return{duration:h(n-e),start:h(e-t)}}function qt(t){if(t.startTime<t.responseStart)return t.decodedBodySize}function Xt(t,e){return t&&!function(t,e){return nt(t,e.logsEndpoint)||nt(t,e.rumEndpoint)||nt(t,e.traceEndpoint)||e.internalMonitoringEndpoint&&nt(t,e.internalMonitoringEndpoint)}(t,e)}function Jt(){return void 0!==window.performance&&"getEntries"in performance}function Vt(){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("navigation")}function Yt(t,e){(function(t){var e;if(Vt()&&performance.getEntriesByType("navigation").length>0){var n=performance.getEntriesByType("navigation")[0];e=r({},n.toJSON())}else e=r({},Qt(),{name:window.location.href,decodedBodySize:0,startTime:0});e.entryType="resource",e.initiatorType=zt,e.duration=e.responseEnd,t(e)}((function(n){Zt(e,t,[n])})),Jt()&&Zt(e,t,performance.getEntries()),window.PerformanceObserver)&&(new PerformanceObserver(P((function(n){return Zt(e,t,n.getEntries())}))).observe({entryTypes:["resource","navigation","paint","longtask"]}),Jt()&&"addEventListener"in performance&&performance.addEventListener("resourcetimingbufferfull",(function(){performance.clearResourceTimings()})));Vt()||function(t){function e(){var e=r({},Qt(),{entryType:"navigation"});t(e)}if("complete"===document.readyState)e();else{var n=function(){window.removeEventListener("load",n),setTimeout(P(e))};window.addEventListener("load",n)}}((function(n){Zt(e,t,[n])}))}function Qt(){var t={},e=performance.timing;for(var n in e)_(e[n])&&(t[n]=0===e[n]?0:e[n]-w());return t}function Zt(t,e,n){function r(t){e.notify(Ot.PERFORMANCE_ENTRY_COLLECTED,t)}t.isTrackedWithResource()&&n.filter((function(t){return"resource"===t.entryType})).forEach(r),n.filter((function(t){return"navigation"===t.entryType})).filter((function(t){return t.loadEventEnd>0})).forEach(r),n.filter((function(t){return"paint"===t.entryType})).forEach(r),n.filter((function(t){return"longtask"===t.entryType})).forEach(r)}function te(t){if(performance&&"getEntriesByName"in performance){var e,n=performance.getEntriesByName(t.url,"resource").filter((function(e){return n=e,r=t.startTime,o=ee(t),n.startTime>=r&&ee(n)<=o;var n,r,o}));return 1===n.length?n[0]:2===n.length&&ee((e=n)[0])<=e[1].startTime?n[1]:void 0}}function ee(t){return t.startTime+t.duration}var ne,re,oe,ie,ue=3e3;function ae(t,e,n,o,i){var u=l(P((function(){return se(o)})),ue,{leading:!1});ce(t,n,o),function(t,e,n){var r=history.pushState;history.pushState=P((function(){r.apply(this,arguments),le(t,e,n)}));var o=history.replaceState;history.replaceState=P((function(){o.apply(this,arguments),le(t,e,n)})),window.addEventListener("popstate",(function(){le(t,e,n)}))}(t,n,o),function(t,e){t.subscribe(Ot.PERFORMANCE_ENTRY_COLLECTED,(function(t){if("navigation"===t.entryType){var n=t;oe=r({},oe,{domComplete:h(n.domComplete),domContentLoaded:h(n.domContentLoadedEventEnd),domInteractive:h(n.domInteractive),loadEventEnd:h(n.loadEventEnd)}),e()}else if("paint"===t.entryType&&"first-contentful-paint"===t.name){oe=r({},oe,{firstContentfulPaint:h(t.startTime)}),e()}})),t.subscribe(Ot.ERROR_COLLECTED,(function(){oe.errorCount+=1,e()})),t.subscribe(Ot.USER_ACTION_COLLECTED,(function(){oe.userActionCount+=1,e()})),t.subscribe(Ot.PERFORMANCE_ENTRY_COLLECTED,(function(t){"longtask"===t.entryType&&(oe.longTaskCount+=1,e())})),t.subscribe(Ot.RESOURCE_ADDED_TO_BATCH,(function(){oe.resourceCount+=1,e()}))}(e,u),function(t,e,n,r){e.subscribe(Ot.SESSION_RENEWED,(function(){se(r),ce(t,n,r)}))}(t,e,n,o),i((function(){return se(o)}))}function ce(t,e,n){ne=Ft?performance.now():0,Ft={id:d(),location:r({},t),sessionId:e.getId()},re=1,oe={errorCount:0,longTaskCount:0,resourceCount:0,userActionCount:0},fe(n)}function se(t){re+=1,fe(t)}function fe(t){t({date:T(ne),duration:h(performance.now()-ne),evt:{category:ie.VIEW},rum:{documentVersion:re},view:{measures:oe}},Ft.id)}function le(t,e,n){var r,o;r=Ft.location,o=t,r.pathname!==o.pathname&&(se(n),ce(t,e,n))}function de(t,e,n,o,i){var a={};i.setExternalContextProvider((function(){return j()({application_id:t,session_id:Ft.sessionId,view:{id:Ft.id}},a)}));var c=function(t,e,n,r){var o=new B(new U(t.rumEndpoint,t.batchBytesLimit,!0),t.maxBatchSize,t.batchBytesLimit,t.maxMessageSize,t.flushTimeout,(function(){return j()(v(n()),r())}));return{addRumEvent:function(t){e.isTracked()&&o.add(v(t))},addUserEvent:function(t){e.isTracked()&&o.add(t)},beforeFlushOnUnload:function(t){return o.beforeFlushOnUnload(t)},upsertRumEvent:function(t,n){e.isTracked()&&o.upsert(v(t),n)}}}(n,o,(function(){return{applicationId:t,date:(new Date).getTime(),sessionId:Ft.sessionId,view:{id:Ft.id,referrer:document.referrer,url:Ft.location.href}}}),(function(){return a}));return ae(window.location,e,o,c.upsertRumEvent,c.beforeFlushOnUnload),function(t,e){t.subscribe(Ot.ERROR_COLLECTED,(function(t){var n=t.message,o=t.startTime,i=t.context;e(r({message:n,date:T(o),evt:{category:ie.ERROR}},i))}))}(e,c.addRumEvent),function(t,e,n,r){e.subscribe(Ot.REQUEST_COLLECTED,(function(o){if(n.isTrackedWithResource()&&Xt(o.url,t)){var i=te(o),a=o.type===X.XHR?u.XHR:u.FETCH;r({date:T(i?i.startTime:o.startTime),duration:i?$t(i):h(o.duration),evt:{category:ie.RESOURCE},http:{method:o.method,performance:i?Gt(i):void 0,statusCode:o.status,url:o.url},network:{bytesWritten:i?qt(i):void 0},resource:{kind:a},traceId:o.traceId}),e.notify(Ot.RESOURCE_ADDED_TO_BATCH)}}))}(n,e,o,c.addRumEvent),function(t,e,n){e.subscribe(Ot.PERFORMANCE_ENTRY_COLLECTED,(function(r){switch(r.entryType){case"resource":!function(t,e,n,r){if(!Xt(e.name,t))return;var o=Ht(e);if(b([u.XHR,u.FETCH],o))return;n({date:T(e.startTime),duration:$t(e),evt:{category:ie.RESOURCE},http:{performance:Gt(e),url:e.name},network:{bytesWritten:qt(e)},resource:{kind:o}}),r.notify(Ot.RESOURCE_ADDED_TO_BATCH)}(t,r,n,e);break;case"longtask":!function(t,e){e({date:T(t.startTime),duration:h(t.duration),evt:{category:ie.LONG_TASK}})}(r,n)}}))}(n,e,c.addRumEvent),function(t,e){t.subscribe(Ot.USER_ACTION_COLLECTED,(function(t){var n=t.name,o=t.context;e(r({},o,{evt:{name:n,category:ie.USER_ACTION}}))}))}(e,c.addUserEvent),{addRumGlobalContext:P((function(t,e){a[t]=e})),addUserAction:P((function(t,n){e.notify(Ot.USER_ACTION_COLLECTED,{name:t,context:n})})),getInternalContext:P((function(){return{application_id:t,session_id:Ft.sessionId,view:{id:Ft.id}}})),setRumGlobalContext:P((function(t){a=t}))}}!function(t){t.USER_ACTION="user_action",t.ERROR="error",t.LONG_TASK="long_task",t.VIEW="view",t.RESOURCE="resource"}(ie||(ie={}));var pe,he="_dd_r";function ve(t,e){var n=wt(he,(function(e){return function(t,e){var n;r=e,n=r===pe.NOT_TRACKED||r===pe.TRACKED_WITH_RESOURCES||r===pe.TRACKED_WITHOUT_RESOURCES?e:p(t.sampleRate)?p(t.resourceSampleRate)?pe.TRACKED_WITH_RESOURCES:pe.TRACKED_WITHOUT_RESOURCES:pe.NOT_TRACKED;var r;return{isTracked:me(n),type:n}}(t,e)}));return n.renewObservable.subscribe((function(){e.notify(Ot.SESSION_RENEWED)})),{getId:n.getId,isTracked:function(){return void 0!==n.getId()&&me(n.getType())},isTrackedWithResource:function(){return void 0!==n.getId()&&n.getType()===pe.TRACKED_WITH_RESOURCES}}}function me(t){return t===pe.TRACKED_WITH_RESOURCES||t===pe.TRACKED_WITHOUT_RESOURCES}!function(t){t.NOT_TRACKED="0",t.TRACKED_WITH_RESOURCES="1",t.TRACKED_WITHOUT_RESOURCES="2"}(pe||(pe={})),n.d(e,"datadogRum",(function(){return ge}));var ye,ge=(ye=r({},{init:function(t){mt("core.init")},addRumGlobalContext:function(t,e){mt("addRumGlobalContext")},setRumGlobalContext:function(t){mt("setRumGlobalContext")},addUserAction:function(t,e){mt("addUserAction")},getInternalContext:function(){mt("getInternalContext")}}),Object.defineProperty(ye,"_setDebug",{get:function(){return G},enumerable:!1}),ye),be=!1;ge.init=P((function(t){if(gt()&&bt()&&function(t){if(be)return t.silentMultipleInit||console.error("DD_RUM is already initialized."),!1;if(!t||!t.clientToken&&!t.publicApiKey)return console.error("Client Token is not configured, we will not send any data."),!1;if(!t.applicationId)return console.error("Application ID is not configured, no RUM data will be collected."),!1;if(void 0!==t.sampleRate&&!E(t.sampleRate))return console.error("Sample Rate should be a number between 0 and 100"),!1;if(void 0!==t.resourceSampleRate&&!E(t.resourceSampleRate))return console.error("Resource Sample Rate should be a number between 0 and 100"),!1;return!0}(t)){t.publicApiKey&&(t.clientToken=t.publicApiKey);var e=r({},t,{isCollectingError:!0}),n=new St,o=yt(e,Rt),i=o.errorObservable,u=o.configuration,a=o.internalMonitoring;u.isEnabled("new-session-checks")&&It(n);var c=ve(u,n),s=de(e.applicationId,n,u,c,a),f=it();Yt(n,c),i.subscribe((function(t){return n.notify(Ot.ERROR_COLLECTED,t)})),f.subscribe((function(t){return n.notify(Ot.REQUEST_COLLECTED,t)})),x()(ge,s),be=!0}})),("object"==typeof globalThis?globalThis:Function("return this")()).DD_RUM=ge}]);

@@ -6,4 +6,4 @@ "use strict";

env: 'production',
version: '1.7.5',
version: '1.8.1',
};
//# sourceMappingURL=buildEnv.js.map

@@ -5,4 +5,5 @@ import { Configuration, ResourceKind } from '@datadog/browser-core';

export declare function computeResourceKind(timing: PerformanceResourceTiming): ResourceKind | ResourceKind.OTHER;
export declare function computePerformanceResourceDetails(entry?: PerformanceResourceTiming): PerformanceResourceDetails | undefined;
export declare function computeSize(entry?: PerformanceResourceTiming): number | undefined;
export declare function computePerformanceResourceDuration(entry: PerformanceResourceTiming): number;
export declare function computePerformanceResourceDetails(entry: PerformanceResourceTiming): PerformanceResourceDetails | undefined;
export declare function computeSize(entry: PerformanceResourceTiming): number | undefined;
export declare function isValidResource(url: string, configuration: Configuration): boolean | "";

@@ -42,54 +42,83 @@ "use strict";

exports.computeResourceKind = computeResourceKind;
function areInOrder() {
var numbers = [];
for (var _i = 0; _i < arguments.length; _i++) {
numbers[_i] = arguments[_i];
}
for (var i = 1; i < numbers.length; i += 1) {
if (numbers[i - 1] > numbers[i]) {
return false;
}
}
return true;
}
function computePerformanceResourceDuration(entry) {
var duration = entry.duration, startTime = entry.startTime, responseEnd = entry.responseEnd;
// Safari duration is always 0 on timings blocked by cross origin policies.
if (duration === 0 && startTime < responseEnd) {
return browser_core_1.msToNs(responseEnd - startTime);
}
return browser_core_1.msToNs(duration);
}
exports.computePerformanceResourceDuration = computePerformanceResourceDuration;
function computePerformanceResourceDetails(entry) {
if (!entry || !hasTimingAllowedAttributes(entry) || isCached(entry)) {
var startTime = entry.startTime, fetchStart = entry.fetchStart, domainLookupStart = entry.domainLookupStart, domainLookupEnd = entry.domainLookupEnd, connectStart = entry.connectStart, secureConnectionStart = entry.secureConnectionStart, connectEnd = entry.connectEnd, requestStart = entry.requestStart, responseStart = entry.responseStart, responseEnd = entry.responseEnd;
var redirectStart = entry.redirectStart, redirectEnd = entry.redirectEnd;
// Ensure timings are in the right order. On top of filtering out potential invalid
// PerformanceResourceTiming, it will ignore entries from requests where timings cannot be
// collected, for example cross origin requests without a "Timing-Allow-Origin" header allowing
// it.
if (!areInOrder(startTime, fetchStart, domainLookupStart, domainLookupEnd, connectStart, connectEnd, requestStart, responseStart, responseEnd)) {
return undefined;
}
if (!isValidTiming(entry.connectStart, entry.connectEnd) ||
!isValidTiming(entry.domainLookupStart, entry.domainLookupEnd) ||
!isValidTiming(entry.responseStart, entry.responseEnd) ||
!isValidTiming(entry.requestStart, entry.responseStart) ||
!isValidTiming(entry.redirectStart, entry.redirectEnd) ||
!isValidTiming(entry.secureConnectionStart, entry.connectEnd)) {
return undefined;
// The only time fetchStart is different than startTime is if a redirection occured.
var hasRedirectionOccured = fetchStart !== startTime;
if (hasRedirectionOccured) {
// Firefox doesn't provide redirect timings on cross origin requests. Provide a default for
// those.
if (redirectStart < startTime) {
redirectStart = startTime;
}
if (redirectEnd < startTime) {
redirectEnd = fetchStart;
}
// Make sure redirect timings are in order
if (!areInOrder(startTime, redirectStart, redirectEnd, fetchStart)) {
return undefined;
}
}
return {
connect: isRelevantTiming(entry.connectStart, entry.connectEnd, entry.fetchStart)
? formatTiming(entry.connectStart, entry.connectEnd)
: undefined,
dns: isRelevantTiming(entry.domainLookupStart, entry.domainLookupEnd, entry.fetchStart)
? formatTiming(entry.domainLookupStart, entry.domainLookupEnd)
: undefined,
download: formatTiming(entry.responseStart, entry.responseEnd),
firstByte: formatTiming(entry.requestStart, entry.responseStart),
redirect: isRelevantTiming(entry.redirectStart, entry.redirectEnd, 0)
? formatTiming(entry.redirectStart, entry.redirectEnd)
: undefined,
ssl: entry.secureConnectionStart !== 0 &&
isRelevantTiming(entry.secureConnectionStart, entry.connectEnd, entry.fetchStart)
? formatTiming(entry.secureConnectionStart, entry.connectEnd)
: undefined,
var details = {
download: formatTiming(startTime, responseStart, responseEnd),
firstByte: formatTiming(startTime, requestStart, responseStart),
};
// Make sure a connection occured
if (connectEnd !== fetchStart) {
details.connect = formatTiming(startTime, connectStart, connectEnd);
// Make sure a secure connection occured
if (areInOrder(connectStart, secureConnectionStart, connectEnd)) {
details.ssl = formatTiming(startTime, secureConnectionStart, connectEnd);
}
}
// Make sure a domain lookup occured
if (domainLookupEnd !== fetchStart) {
details.dns = formatTiming(startTime, domainLookupStart, domainLookupEnd);
}
if (hasRedirectionOccured) {
details.redirect = formatTiming(startTime, redirectStart, redirectEnd);
}
return details;
}
exports.computePerformanceResourceDetails = computePerformanceResourceDetails;
function hasTimingAllowedAttributes(timing) {
return timing.responseStart > 0;
function formatTiming(origin, start, end) {
return {
duration: browser_core_1.msToNs(end - start),
start: browser_core_1.msToNs(start - origin),
};
}
function isCached(timing) {
return timing.duration === 0;
}
function isValidTiming(start, end) {
return start >= 0 && end >= 0 && end >= start;
}
/**
* Do not collect timing when persistent connection, cache, ...
* https://developer.mozilla.org/en-US/docs/Web/Performance/Navigation_and_resource_timings
*/
function isRelevantTiming(start, end, reference) {
return start !== reference || end !== reference;
}
function formatTiming(start, end) {
return { duration: browser_core_1.msToNs(end - start), start: browser_core_1.msToNs(start) };
}
function computeSize(entry) {
return entry && hasTimingAllowedAttributes(entry) ? entry.decodedBodySize : undefined;
// Make sure a request actually occured
if (entry.startTime < entry.responseStart) {
return entry.decodedBodySize;
}
return undefined;
}

@@ -96,0 +125,0 @@ exports.computeSize = computeSize;

@@ -8,2 +8,3 @@ "use strict";

var lifeCycle_1 = require("./lifeCycle");
var newSessionChecks_1 = require("./newSessionChecks");
var performanceCollection_1 = require("./performanceCollection");

@@ -42,2 +43,5 @@ var rum_1 = require("./rum");

var _a = browser_core_1.commonInit(rumUserConfiguration, buildEnv_1.buildEnv), errorObservable = _a.errorObservable, configuration = _a.configuration, internalMonitoring = _a.internalMonitoring;
if (configuration.isEnabled('new-session-checks')) {
newSessionChecks_1.startNewSessionChecks(lifeCycle);
}
var session = rumSession_1.startRumSession(configuration, lifeCycle);

@@ -44,0 +48,0 @@ var globalApi = rum_1.startRum(rumUserConfiguration.applicationId, lifeCycle, configuration, session, internalMonitoring);

@@ -116,3 +116,3 @@ "use strict";

date: browser_core_1.getTimestamp(timing ? timing.startTime : requestDetails.startTime),
duration: browser_core_1.msToNs(timing ? timing.duration : requestDetails.duration),
duration: timing ? resourceUtils_1.computePerformanceResourceDuration(timing) : browser_core_1.msToNs(requestDetails.duration),
evt: {

@@ -123,3 +123,3 @@ category: RumEventCategory.RESOURCE,

method: requestDetails.method,
performance: resourceUtils_1.computePerformanceResourceDetails(timing),
performance: timing ? resourceUtils_1.computePerformanceResourceDetails(timing) : undefined,
statusCode: requestDetails.status,

@@ -129,3 +129,3 @@ url: requestDetails.url,

network: {
bytesWritten: resourceUtils_1.computeSize(timing),
bytesWritten: timing ? resourceUtils_1.computeSize(timing) : undefined,
},

@@ -165,3 +165,3 @@ resource: {

date: browser_core_1.getTimestamp(entry.startTime),
duration: browser_core_1.msToNs(entry.duration),
duration: resourceUtils_1.computePerformanceResourceDuration(entry),
evt: {

@@ -168,0 +168,0 @@ category: RumEventCategory.RESOURCE,

export var buildEnv = {
datacenter: 'us',
env: 'production',
version: '1.7.5',
version: '1.8.1',
};
//# sourceMappingURL=buildEnv.js.map

@@ -5,4 +5,5 @@ import { Configuration, ResourceKind } from '@datadog/browser-core';

export declare function computeResourceKind(timing: PerformanceResourceTiming): ResourceKind | ResourceKind.OTHER;
export declare function computePerformanceResourceDetails(entry?: PerformanceResourceTiming): PerformanceResourceDetails | undefined;
export declare function computeSize(entry?: PerformanceResourceTiming): number | undefined;
export declare function computePerformanceResourceDuration(entry: PerformanceResourceTiming): number;
export declare function computePerformanceResourceDetails(entry: PerformanceResourceTiming): PerformanceResourceDetails | undefined;
export declare function computeSize(entry: PerformanceResourceTiming): number | undefined;
export declare function isValidResource(url: string, configuration: Configuration): boolean | "";

@@ -39,53 +39,81 @@ import { addMonitoringMessage, getPathName, haveSameOrigin, includes, isValidUrl, msToNs, ResourceKind, } from '@datadog/browser-core';

}
function areInOrder() {
var numbers = [];
for (var _i = 0; _i < arguments.length; _i++) {
numbers[_i] = arguments[_i];
}
for (var i = 1; i < numbers.length; i += 1) {
if (numbers[i - 1] > numbers[i]) {
return false;
}
}
return true;
}
export function computePerformanceResourceDuration(entry) {
var duration = entry.duration, startTime = entry.startTime, responseEnd = entry.responseEnd;
// Safari duration is always 0 on timings blocked by cross origin policies.
if (duration === 0 && startTime < responseEnd) {
return msToNs(responseEnd - startTime);
}
return msToNs(duration);
}
export function computePerformanceResourceDetails(entry) {
if (!entry || !hasTimingAllowedAttributes(entry) || isCached(entry)) {
var startTime = entry.startTime, fetchStart = entry.fetchStart, domainLookupStart = entry.domainLookupStart, domainLookupEnd = entry.domainLookupEnd, connectStart = entry.connectStart, secureConnectionStart = entry.secureConnectionStart, connectEnd = entry.connectEnd, requestStart = entry.requestStart, responseStart = entry.responseStart, responseEnd = entry.responseEnd;
var redirectStart = entry.redirectStart, redirectEnd = entry.redirectEnd;
// Ensure timings are in the right order. On top of filtering out potential invalid
// PerformanceResourceTiming, it will ignore entries from requests where timings cannot be
// collected, for example cross origin requests without a "Timing-Allow-Origin" header allowing
// it.
if (!areInOrder(startTime, fetchStart, domainLookupStart, domainLookupEnd, connectStart, connectEnd, requestStart, responseStart, responseEnd)) {
return undefined;
}
if (!isValidTiming(entry.connectStart, entry.connectEnd) ||
!isValidTiming(entry.domainLookupStart, entry.domainLookupEnd) ||
!isValidTiming(entry.responseStart, entry.responseEnd) ||
!isValidTiming(entry.requestStart, entry.responseStart) ||
!isValidTiming(entry.redirectStart, entry.redirectEnd) ||
!isValidTiming(entry.secureConnectionStart, entry.connectEnd)) {
return undefined;
// The only time fetchStart is different than startTime is if a redirection occured.
var hasRedirectionOccured = fetchStart !== startTime;
if (hasRedirectionOccured) {
// Firefox doesn't provide redirect timings on cross origin requests. Provide a default for
// those.
if (redirectStart < startTime) {
redirectStart = startTime;
}
if (redirectEnd < startTime) {
redirectEnd = fetchStart;
}
// Make sure redirect timings are in order
if (!areInOrder(startTime, redirectStart, redirectEnd, fetchStart)) {
return undefined;
}
}
var details = {
download: formatTiming(startTime, responseStart, responseEnd),
firstByte: formatTiming(startTime, requestStart, responseStart),
};
// Make sure a connection occured
if (connectEnd !== fetchStart) {
details.connect = formatTiming(startTime, connectStart, connectEnd);
// Make sure a secure connection occured
if (areInOrder(connectStart, secureConnectionStart, connectEnd)) {
details.ssl = formatTiming(startTime, secureConnectionStart, connectEnd);
}
}
// Make sure a domain lookup occured
if (domainLookupEnd !== fetchStart) {
details.dns = formatTiming(startTime, domainLookupStart, domainLookupEnd);
}
if (hasRedirectionOccured) {
details.redirect = formatTiming(startTime, redirectStart, redirectEnd);
}
return details;
}
function formatTiming(origin, start, end) {
return {
connect: isRelevantTiming(entry.connectStart, entry.connectEnd, entry.fetchStart)
? formatTiming(entry.connectStart, entry.connectEnd)
: undefined,
dns: isRelevantTiming(entry.domainLookupStart, entry.domainLookupEnd, entry.fetchStart)
? formatTiming(entry.domainLookupStart, entry.domainLookupEnd)
: undefined,
download: formatTiming(entry.responseStart, entry.responseEnd),
firstByte: formatTiming(entry.requestStart, entry.responseStart),
redirect: isRelevantTiming(entry.redirectStart, entry.redirectEnd, 0)
? formatTiming(entry.redirectStart, entry.redirectEnd)
: undefined,
ssl: entry.secureConnectionStart !== 0 &&
isRelevantTiming(entry.secureConnectionStart, entry.connectEnd, entry.fetchStart)
? formatTiming(entry.secureConnectionStart, entry.connectEnd)
: undefined,
duration: msToNs(end - start),
start: msToNs(start - origin),
};
}
function hasTimingAllowedAttributes(timing) {
return timing.responseStart > 0;
}
function isCached(timing) {
return timing.duration === 0;
}
function isValidTiming(start, end) {
return start >= 0 && end >= 0 && end >= start;
}
/**
* Do not collect timing when persistent connection, cache, ...
* https://developer.mozilla.org/en-US/docs/Web/Performance/Navigation_and_resource_timings
*/
function isRelevantTiming(start, end, reference) {
return start !== reference || end !== reference;
}
function formatTiming(start, end) {
return { duration: msToNs(end - start), start: msToNs(start) };
}
export function computeSize(entry) {
return entry && hasTimingAllowedAttributes(entry) ? entry.decodedBodySize : undefined;
// Make sure a request actually occured
if (entry.startTime < entry.responseStart) {
return entry.decodedBodySize;
}
return undefined;
}

@@ -92,0 +120,0 @@ export function isValidResource(url, configuration) {

@@ -6,2 +6,3 @@ import * as tslib_1 from "tslib";

import { LifeCycle, LifeCycleEventType } from './lifeCycle';
import { startNewSessionChecks } from './newSessionChecks';
import { startPerformanceCollection } from './performanceCollection';

@@ -40,2 +41,5 @@ import { startRum } from './rum';

var _a = commonInit(rumUserConfiguration, buildEnv), errorObservable = _a.errorObservable, configuration = _a.configuration, internalMonitoring = _a.internalMonitoring;
if (configuration.isEnabled('new-session-checks')) {
startNewSessionChecks(lifeCycle);
}
var session = startRumSession(configuration, lifeCycle);

@@ -42,0 +46,0 @@ var globalApi = startRum(rumUserConfiguration.applicationId, lifeCycle, configuration, session, internalMonitoring);

@@ -6,3 +6,3 @@ import * as tslib_1 from "tslib";

import { matchRequestTiming } from './matchRequestTiming';
import { computePerformanceResourceDetails, computeResourceKind, computeSize, isValidResource } from './resourceUtils';
import { computePerformanceResourceDetails, computePerformanceResourceDuration, computeResourceKind, computeSize, isValidResource, } from './resourceUtils';
import { trackView, viewContext } from './viewTracker';

@@ -114,3 +114,3 @@ export var RumEventCategory;

date: getTimestamp(timing ? timing.startTime : requestDetails.startTime),
duration: msToNs(timing ? timing.duration : requestDetails.duration),
duration: timing ? computePerformanceResourceDuration(timing) : msToNs(requestDetails.duration),
evt: {

@@ -121,3 +121,3 @@ category: RumEventCategory.RESOURCE,

method: requestDetails.method,
performance: computePerformanceResourceDetails(timing),
performance: timing ? computePerformanceResourceDetails(timing) : undefined,
statusCode: requestDetails.status,

@@ -127,3 +127,3 @@ url: requestDetails.url,

network: {
bytesWritten: computeSize(timing),
bytesWritten: timing ? computeSize(timing) : undefined,
},

@@ -162,3 +162,3 @@ resource: {

date: getTimestamp(entry.startTime),
duration: msToNs(entry.duration),
duration: computePerformanceResourceDuration(entry),
evt: {

@@ -165,0 +165,0 @@ category: RumEventCategory.RESOURCE,

{
"name": "@datadog/browser-rum",
"version": "1.7.5",
"version": "1.8.1",
"license": "Apache-2.0",

@@ -16,3 +16,3 @@ "main": "cjs/index.js",

"dependencies": {
"@datadog/browser-core": "1.7.5",
"@datadog/browser-core": "1.8.1",
"lodash.assign": "4.2.0",

@@ -33,3 +33,3 @@ "lodash.merge": "4.6.2",

},
"gitHead": "3435357532f6ed2b88a701dc6e860cb4b22e1485"
"gitHead": "c68cf97ab0700eceadb4675a6c1a97b70fad1bbd"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc