Socket
Socket
Sign inDemoInstall

@datadog/browser-logs

Package Overview
Dependencies
Maintainers
1
Versions
254
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datadog/browser-logs - npm Package Compare versions

Comparing version 1.11.1 to 1.11.2

2

bundle/datadog-logs-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]",g=/^\[object .+?Constructor\]$/,y=/^(?:0|[1-9]\d*)$/,b={};b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b[c]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object Boolean]"]=b["[object DataView]"]=b["[object Date]"]=b["[object Error]"]=b[f]=b["[object Map]"]=b["[object Number]"]=b[p]=b["[object RegExp]"]=b["[object Set]"]=b["[object String]"]=b["[object WeakMap]"]=!1;var m="object"==typeof t&&t&&t.Object===Object&&t,w="object"==typeof self&&self&&self.Object===Object&&self,_=m||w||Function("return this")(),x=e&&!e.nodeType&&e,E=x&&"object"==typeof n&&n&&!n.nodeType&&n,O=E&&E.exports===x,T=O&&m.process,j=function(){try{var t=E&&E.require&&E.require("util").types;return t||T&&T.binding&&T.binding("util")}catch(t){}}(),S=j&&j.isTypedArray;function C(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,R,A,M=Array.prototype,k=Function.prototype,I=Object.prototype,B=_["__core-js_shared__"],z=k.toString,P=I.hasOwnProperty,N=(L=/[^.]+$/.exec(B&&B.keys&&B.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"",D=I.toString,F=z.call(Object),U=RegExp("^"+z.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),H=O?_.Buffer:void 0,G=_.Symbol,$=_.Uint8Array,q=H?H.allocUnsafe:void 0,K=(R=Object.getPrototypeOf,A=Object,function(t){return R(A(t))}),W=Object.create,X=I.propertyIsEnumerable,J=M.splice,V=G?G.toStringTag:void 0,Y=function(){try{var t=xt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Z=H?H.isBuffer:void 0,Q=Math.max,tt=Date.now,et=xt(_,"Map"),nt=xt(Object,"create"),rt=function(){function t(){}return function(e){if(!It(e))return{};if(W)return W(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&&Ct(t),o=!n&&!r&&At(t),i=!n&&!r&&!o&&zt(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&&!P.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Et(s,c))||a.push(s);return a}function st(t,e,n){(void 0===n||St(t[e],n))&&(void 0!==n||e in t)||dt(t,e,n)}function ft(t,e,n){var r=t[e];P.call(t,e)&&St(r,n)&&(void 0!==n||e in t)||dt(t,e,n)}function lt(t,e){for(var n=t.length;n--;)if(St(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 P.call(e,t)?e[t]:void 0},ot.prototype.has=function(t){var e=this.__data__;return nt?void 0!==e[t]:P.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=P.call(t,V),n=t[V];try{t[V]=void 0;var r=!0}catch(t){}var o=D.call(t);r&&(e?t[V]=n:delete t[V]);return o}(t):function(t){return D.call(t)}(t)}function gt(t){return Bt(t)&&vt(t)==c}function yt(t){return!(!It(t)||function(t){return!!N&&N in t}(t))&&(Mt(t)?U:g).test(function(t){if(null!=t){try{return z.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function bt(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&&P.call(t,r))&&n.push(r);return n}function mt(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=Tt(t,n),c=Tt(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&&zt(c);f=c,d||h||v?Lt(a)?f=a:Bt(w=a)&&Rt(w)?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=q?q(n):new t.constructor(n);return t.copy(r),r}(c,!0)):v?(l=!1,g=c,y=!0?(b=g.buffer,m=new b.constructor(b.byteLength),new $(m).set(new $(b)),m):g.buffer,f=new g.constructor(y,g.byteOffset,g.length)):f=[]:function(t){if(!Bt(t)||vt(t)!=p)return!1;var e=K(t);if(null===e)return!0;var n=P.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&z.call(n)==F}(c)||Ct(c)?(f=a,Ct(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,Pt(t))}(a):It(a)&&!Mt(a)||(f=function(t){return"function"!=typeof t.constructor||Ot(t)?{}:rt(K(t))}(c))):l=!1}var g,y,b,m;var w;l&&(u.set(c,f),o(f,c,r,i,u),u.delete(c));st(t,n,f)}(t,e,u,n,mt,r,o);else{var a=r?r(Tt(t,u),i,u+"",t,e,o):void 0;void 0===a&&(a=i),st(t,u,a)}}),Pt)}function wt(t,e){return jt(function(t,e,n){return e=Q(void 0===e?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=Q(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),C(t,this,a)}}(t,e,Ft),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 xt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return yt(n)?n:void 0}function Et(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 Tt(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var jt=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}:Ft);function St(t,e){return t===e||t!=t&&e!=e}var Ct=gt(function(){return arguments}())?gt:function(t){return Bt(t)&&P.call(t,"callee")&&!X.call(t,"callee")},Lt=Array.isArray;function Rt(t){return null!=t&&kt(t.length)&&!Mt(t)}var At=Z||function(){return!1};function Mt(t){if(!It(t))return!1;var e=vt(t);return e==f||e==l||e==s||e==h}function kt(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 Bt(t){return null!=t&&"object"==typeof t}var zt=S?function(t){return function(e){return t(e)}}(S):function(t){return Bt(t)&&kt(t.length)&&!!b[vt(t)]};function Pt(t){return Rt(t)?ct(t,!0):bt(t)}var Nt,Dt=(Nt=function(t,e,n){mt(t,e,n)},wt((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=Nt.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?Rt(n)&&Et(e,n.length):"string"==r&&e in n)&&St(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&&Nt(t,u,n,o)}return t})));function Ft(t){return t}n.exports=Dt}).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,g=!p.call({valueOf:1},"valueOf");function y(t,e){var n=x(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&E(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||m(u,o))||n.push(u);return n}function b(t,e,n){var r=t[e];l.call(t,e)&&_(r,n)&&(void 0!==n||e in t)||(t[e]=n)}function m(t,e){return!!(e=null==e?n:e)&&("number"==typeof t||u.test(t))&&t>-1&&t%1==0&&t<e}function w(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 x=Array.isArray;function E(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 T,j=(T=function(t,e){if(g||w(e)||E(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;b(n,u,void 0===a?t[u]:a)}}(e,function(t){return E(t)?y(t):function(t){if(!w(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)&&b(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=T.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?E(n)&&m(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&&T(t,u,n,o)}return t})));t.exports=j},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),n.d(e,"datadogLogs",(function(){return $t}));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])}}}function u(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r}var a,c,s,f=6e4,l=60*f;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(){}function h(t,e,n){if(null==t)return JSON.stringify(t);var r=[!1,void 0];v(t)&&(r=[!0,t.toJSON],delete t.toJSON);var o,i,u=[!1,void 0];"object"==typeof t&&v(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 v(t){return"object"==typeof t&&null!==t&&t.hasOwnProperty("toJSON")}function g(){return void 0===s&&(s=performance.timing.navigationStart),s}function y(t){if(t.origin)return t.origin;var e=t.host.replace(/(:80|:443)$/,"");return t.protocol+"//"+e}!function(t){t.BEFORE_UNLOAD="beforeunload",t.CLICK="click",t.KEY_DOWN="keydown",t.LOAD="load",t.POP_STATE="popstate",t.SCROLL="scroll",t.TOUCH_START="touchstart",t.VISIBILITY_CHANGE="visibilitychange"}(a||(a={})),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"}(c||(c={}));var b={isCollectingError:!0,maxErrorsByMinute:3e3,maxInternalMonitoringMessagesPerPage:15,resourceSampleRate:100,sampleRate:100,silentMultipleInit:!1,requestErrorResponseLengthLimit:32768,flushTimeout:3e4,maxBatchSize:50,maxMessageSize:262144,batchBytesLimit:16384};function m(t,e,n){var r="us"===e.datacenter?"com":"eu",o="production"===e.env?"datadoghq."+r:"datad0g."+r,i="version:"+e.version,u=t+"-http-intake.logs."+o,a=e.proxyHost?e.proxyHost:u,c=e.proxyHost?"ddhost="+u+"&":"";return"https://"+a+"/v1/input/"+e.clientToken+"?"+c+"ddsource="+(n||"browser")+"&ddtags="+i}var w=n(1),_=n.n(w),x=n(0),E=n.n(x),O="?",T=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var S=function(){var t,e,n,r,o,i,u=[];function a(t,e,n){var r;for(var o in u)if(j(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)C.augmentStackTraceWithInitialElement(e,r,o,""+t),f();else if(u)a(C(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(T);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(C(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=C(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=B(c),r=!0}(),function(){if(i)return;o=null!==window.onunhandledrejection?window.onunhandledrejection:void 0,window.onunhandledrejection=B(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}(),C=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]||O,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]||O,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]||O,line:r[4]?+r[4]:void 0,url:r[3]}}!o.func&&o.line&&(o.func=O),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!==C&&f!==S&&(i={args:[],column:void 0,func:O,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=O),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)j(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=O),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 C(t,e+1)}},o}();var L=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 R,A=function(){function t(t,e,n,r,o,i,u){void 0===u&&(u=p),this.request=t,this.maxSize=e,this.bytesLimit=n,this.maxMessageSize=r,this.flushTimeout=o,this.contextProvider=i,this.beforeUnloadCallback=u,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.flush=function(){if(0!==this.bufferMessageCount){var t=u(this.pushOnlyBuffer,(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=h(E()({},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(a.BEFORE_UNLOAD,B(this.beforeUnloadCallback)),document.addEventListener(a.VISIBILITY_CHANGE,B((function(){"hidden"===document.visibilityState&&t.flush()}))),window.addEventListener(a.BEFORE_UNLOAD,B((function(){return t.flush()}))))},t}();!function(t){t.info="info",t.error="error"}(R||(R={}));var M,k={maxMessagesPerPage:0,sentMessageCount:0};function I(t,e,n){var r=n.value;n.value=function(){var t=k.batch?B(r):r;return t.apply(this,arguments)}}function B(t){return function(){try{return t.apply(this,arguments)}catch(t){D(t);try{z(t)}catch(t){D(t)}}}}function z(t){P(r(r({},function(t){if(t instanceof Error){var e=C(t);return{error:{kind:e.name,stack:nt(e)},message:e.message}}return{error:{stack:"Not an instance of error"},message:"Uncaught "+h(t)}}(t)),{status:R.error}))}function P(t){k.batch&&k.sentMessageCount<k.maxMessagesPerPage&&(k.sentMessageCount+=1,k.batch.add(t))}function N(t){k.debugMode=t}function D(t){k.debugMode&&console.warn("[INTERNAL ERROR]",t)}var F,U,H=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 G(t){return $(t,y(window.location)).href}function $(t,e){if(function(){if(void 0!==F)return F;try{var t=new URL("http://test/path");return F="http://test/path"===t.href}catch(t){F=!1}return F}())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(t){t.FETCH="fetch",t.XHR="xhr"}(U||(U={}));var q,K,W,X,J,V=1;function Y(){var t=V;return V+=1,t}function Z(){return q||(function(t){var e=t[0],n=t[1],r=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=B((function(t,e){return this._datadog_xhr={method:t,url:e},r.apply(this,arguments)}));var o=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(t){var r=this,i=performance.now(),u=Y();e.notify({requestId:u});var a=!1,c=function(){a||(a=!0,n.notify({requestId:u,startTime:i,duration:performance.now()-i,method:r._datadog_xhr.method,response:r.response,status:r.status,traceId:Q(),type:U.XHR,url:G(r._datadog_xhr.url)}))},s=this.onreadystatechange;return this.onreadystatechange=function(){this.readyState===XMLHttpRequest.DONE&&B(c)(),s&&s.apply(this,arguments)},this.addEventListener("loadend",B(c)),o.apply(this,arguments)}}(q=[new H,new H]),function(t){var e=t[0],n=t[1];if(!window.fetch)return;var r=window.fetch;window.fetch=B((function(t,u){var a=this,c=u&&u.method||"object"==typeof t&&t.method||"GET",s=performance.now(),f=Y();e.notify({requestId:f});var l=function(e){return o(a,void 0,void 0,(function(){var r,o,u,a,l;return i(this,(function(i){switch(i.label){case 0:return r=performance.now()-s,o=G("object"==typeof t&&t.url||t),"stack"in e||e instanceof Error?(u=C(e),n.notify({duration:r,method:c,requestId:f,startTime:s,url:o,response:nt(u),status:0,traceId:Q(),type:U.FETCH}),[3,6]):[3,1];case 1:if(!("status"in e))return[3,6];a=void 0,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,e.clone().text()];case 3:return a=i.sent(),[3,5];case 4:return l=i.sent(),a="Unable to retrieve response: "+l,[3,5];case 5:n.notify({duration:r,method:c,requestId:f,startTime:s,url:o,response:a,responseType:e.type,status:e.status,traceId:Q(),type:U.FETCH}),i.label=6;case 6:return[2]}}))}))},d=r.call(this,t,u);return d.then(B(l),B(l)),d}))}(q)),q}function Q(){return"ddtrace"in window&&window.ddtrace.tracer.scope().active()?window.ddtrace.tracer.scope().active().context().toTraceId():void 0}function tt(t){if(!W){var e=new H;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:K.NETWORK,stack:rt(n.response,t)||"Failed to load"},http:{method:n.method,status_code:n.status,url:n.url}},message:ot(n.type)+" error "+n.method+" "+n.url,startTime:n.startTime})}))}(t,e,Z()[1]),function(t){X=console.error,console.error=B((function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];X.apply(console,u([e],n)),t.notify({context:{error:{origin:K.CONSOLE}},message:u(["console error:",e],n).map(et).join(" "),startTime:performance.now()})}))}(e),function(t){J=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=nt(t)):(n="Uncaught "+h(e),r="No stack, consider using an instance of Error");return{message:n,context:{error:{stack:r,kind:t.name,origin:K.SOURCE}},startTime:performance.now()}}(e,r))},S.subscribe(J)}(e);W=function(t,e){var n=0,r=new H;return e.subscribe((function(e){n<t.maxErrorsByMinute?(n+=1,r.notify(e)):n===t.maxErrorsByMinute&&(n+=1,r.notify({context:{error:{origin:K.AGENT}},message:"Reached max number of errors by minute: "+t.maxErrorsByMinute,startTime:performance.now()}))})),setInterval((function(){return n=0}),f),r}(t,e)}return W}function et(t){return"string"==typeof t?t:t instanceof Error?nt(C(t)):h(t,0,2)}function nt(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 rt(t,e){return t&&t.length>e.requestErrorResponseLengthLimit?t.substring(0,e.requestErrorResponseLengthLimit)+"...":t}function ot(t){return U.XHR===t?"XHR":"Fetch"}!function(t){t.AGENT="agent",t.CONSOLE="console",t.NETWORK="network",t.SOURCE="source",t.LOGGER="logger"}(K||(K={}));var it=1e3;function ut(t,e,n){var r=new Date;r.setTime(r.getTime()+n);var o="expires="+r.toUTCString();document.cookie=t+"="+e+";"+o+";path=/"}function at(t){var e=document.cookie.match("(^|;)\\s*"+t+"\\s*=\\s*([^;]+)");return e?e.pop():void 0}function ct(){if(void 0===document.cookie||null===document.cookie)return!1;try{return ut("dd_rum_test","test",1e3),"test"===at("dd_rum_test")}catch(t){return console.error(t),!1}}function st(t){console.warn("'"+t+"' not yet available, please call '.init()' first.")}function ft(t,e){var n=function(t,e){var n={clientToken:t.clientToken,datacenter:t.datacenter||e.datacenter,env:e.env,proxyHost:t.proxyHost,version:e.version},o=Array.isArray(t.enableExperimentalFeatures)?t.enableExperimentalFeatures:[],i=r({isEnabled:function(t){return e=t,-1!==o.indexOf(e);var e},logsEndpoint:m("browser",n),rumEndpoint:m("rum",n),traceEndpoint:m("public-trace",n)},b);return t.internalMonitoringApiKey&&(i.internalMonitoringEndpoint=m("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 A(new L(t.internalMonitoringEndpoint,t.batchBytesLimit),t.maxBatchSize,t.batchBytesLimit,t.maxMessageSize,t.flushTimeout,(function(){return E()({date:(new Date).getTime(),view:{referrer:document.referrer,url:window.location.href}},void 0!==M?M():{})}));_()(k,{batch:e,maxMessagesPerPage:t.maxInternalMonitoringMessagesPerPage,sentMessageCount:0})}return{setExternalContextProvider:function(t){M=t}}}(n);return{configuration:n,errorObservable:tt(n),internalMonitoring:o}}function lt(){return"file:"!==window.location.protocol||(console.error("Execution is not allowed in the current context."),!1)}var dt="_dd",pt="_dd_r",ht="_dd_l",vt="rum",gt="logs";var yt="_dd_s",bt=15*f,mt=4*l,wt=f;function _t(t,e){var n,r,o,i,u,c=(n=yt,i=!1,u=function(){i=!0,window.clearTimeout(r),r=window.setTimeout((function(){i=!1}),it)},{get:function(){return i?o:(o=at(n),u(),o)},set:function(t,e){ut(n,t,e),o=t,u()}});!function(t){var e=t.get(),n=at(dt),r=at(pt),o=at(ht);if(!e){var i={};n&&(i.id=n),o&&/^[01]$/.test(o)&&(i[gt]=o),r&&/^[012]$/.test(r)&&(i[vt]=r),Tt(i,t)}}(c);var s,f,l,p,h,v,g,y,b,m=new H,w=Ot(c).id,_=(s=function(){var n=Ot(c),r=e(n[t]),o=r.type,i=r.isTracked;n[t]=o,i&&!n.id&&(n.id=d(),n.created=String(Date.now())),Tt(n,c),i&&w!==n.id&&(w=n.id,m.notify())},f=it,h=!l||void 0===l.leading||l.leading,v=!l||void 0===l.trailing||l.trailing,g=!1,y=!1,b=!1,{throttled:function(){var t=this;b||(g?y=!0:(h?s.apply(this):y=!0,g=!0,p=window.setTimeout((function(){v&&y&&s.apply(t),g=!1,y=!1}),f)))},stop:function(){window.clearTimeout(p),b=!0}}).throttled;return _(),function(t){var e=B(t),n={capture:!0,passive:!0};[a.CLICK,a.TOUCH_START,a.KEY_DOWN,a.SCROLL].forEach((function(t){document.addEventListener(t,e,n),St.push((function(){return document.removeEventListener(t,e,n)}))}))}(_),function(t){var e=B((function(){"visible"===document.visibilityState&&t()})),n=window.setInterval(e,wt);document.addEventListener(a.VISIBILITY_CHANGE,e),St.push((function(){clearInterval(n),document.removeEventListener(a.VISIBILITY_CHANGE,e)}))}((function(){Tt(Ot(c),c)})),{getId:function(){return Ot(c).id},getType:function(){return Ot(c)[t]},renewObservable:m}}var xt=/^([a-z]+)=([a-z0-9-]+)$/,Et="&";function Ot(t){var e=function(t){var e=t.get(),n={};(function(t){return void 0!==t&&(-1!==t.indexOf(Et)||xt.test(t))})(e)&&e.split(Et).forEach((function(t){var e=xt.exec(t);if(null!==e){var r=e[1],o=e[2];n[r]=o}}));return n}(t);return function(t){return(void 0===t.created||Date.now()-Number(t.created)<mt)&&(void 0===t.expire||Date.now()<Number(t.expire))}(e)?e:(jt(t),{})}function Tt(t,e){if(n=t,0!==Object.keys(n).length){var n;t.expire=String(Date.now()+bt);var r=function(t){return Object.keys(t).map((function(e){return[e,t[e]]}))}(t).map((function(t){return t[0]+"="+t[1]})).join(Et);e.set(r,bt)}else jt(e)}function jt(t){t.set("",0)}var St=[];(function(){function t(t){var e=this,n=t[0],r=t[1];this.requests=[],this.whenAllCompleteFn=p;var o=0;n.subscribe((function(){o+=1})),r.subscribe((function(t){e.requests.push(t),0===(o-=1)&&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,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(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 Ct,Lt,Rt={datacenter:"us",env:"production",version:"1.11.1"};!function(t){t.debug="debug",t.info="info",t.warn="warn",t.error="error"}(Lt||(Lt={}));var At,Mt,kt=((Ct={})[Lt.debug]=0,Ct[Lt.info]=1,Ct[Lt.warn]=2,Ct[Lt.error]=3,Ct);Object.keys(Lt);function It(t,e,n,o){var i,u={};o.setExternalContextProvider((function(){return E()({session_id:n.getId()},u,Pt())}));var a=new A(new L(e.logsEndpoint,e.batchBytesLimit),e.maxBatchSize,e.batchBytesLimit,e.maxMessageSize,e.flushTimeout,(function(){return E()({date:(new Date).getTime(),session_id:n.getId(),view:{referrer:document.referrer,url:window.location.href}},u,Pt())})),c=((i={})[At.console]=function(t){return console.log(t.status+": "+t.message)},i[At.http]=function(t){return a.add(t)},i[At.silent]=p,i),s=new zt(n,c);Mt={},t.subscribe((function(t){return s.error(t.message,r({date:(e=t.startTime,Math.floor(g()+e))},t.context));var e}));var f={setLoggerGlobalContext:function(t){u=t},addLoggerGlobalContext:function(t,e){u[t]=e}};return f.createLogger=function(t,e){return function(n,o){return void 0===o&&(o={}),Mt[n]=new zt(t,e,o.handler,o.level,r(r({},o.context),{logger:{name:n}})),Mt[n]}}(n,c),f.getLogger=Bt,f.logger=s,f}function Bt(t){return Mt[t]}!function(t){t.http="http",t.console="console",t.silent="silent"}(At||(At={}));var zt=function(){function t(t,e,n,r,o){void 0===n&&(n=At.http),void 0===r&&(r=Lt.debug),void 0===o&&(o={}),this.session=t,this.handlers=e,this.level=r,this.loggerContext=o,this.handler=this.handlers[n]}return t.prototype.log=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n=Lt.info),this.session.isTracked()&&kt[n]>=kt[this.level]&&this.handler(r({message:t,status:n},E()({},this.loggerContext,e)))},t.prototype.debug=function(t,e){void 0===e&&(e={}),this.log(t,e,Lt.debug)},t.prototype.info=function(t,e){void 0===e&&(e={}),this.log(t,e,Lt.info)},t.prototype.warn=function(t,e){void 0===e&&(e={}),this.log(t,e,Lt.warn)},t.prototype.error=function(t,e){void 0===e&&(e={});var n={error:{origin:K.LOGGER}};this.log(t,E()({},n,e),Lt.error)},t.prototype.setContext=function(t){this.loggerContext=t},t.prototype.addContext=function(t,e){this.loggerContext[t]=e},t.prototype.setHandler=function(t){this.handler=this.handlers[t]},t.prototype.setLevel=function(t){this.level=t},function(t,e,n,r){var o,i=arguments.length,u=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(u=(i<3?o(u):i>3?o(e,n,u):o(e,n))||u);i>3&&u&&Object.defineProperty(e,n,u)}([I],t.prototype,"log",null),t}();function Pt(){var t=window.DD_RUM;return t&&t.getInternalContext?t.getInternalContext():void 0}var Nt,Dt="logs";function Ft(t,e){if(!e){var n=Ut(t)===Nt.TRACKED;return{getId:function(){},isTracked:function(){return n}}}var r=_t(Dt,(function(e){return function(t,e){var n=(r=e,r===Nt.NOT_TRACKED||r===Nt.TRACKED?e:Ut(t));var r;return{isTracked:n===Nt.TRACKED,type:n}}(t,e)}));return{getId:r.getId,isTracked:function(){return r.getType()===Nt.TRACKED}}}function Ut(t){return 0!==(e=t.sampleRate)&&100*Math.random()<=e?Nt.TRACKED:Nt.NOT_TRACKED;var e}!function(t){t.NOT_TRACKED="0",t.TRACKED="1"}(Nt||(Nt={}));var Ht,Gt={debug:function(t,e){st("logs.logger.debug")},error:function(t,e){st("logs.logger.error")},info:function(t,e){st("logs.logger.info")},log:function(t,e,n){st("logs.logger.log")},warn:function(t,e){st("logs.logger.warn")},setContext:function(t){st("logs.logger.setContext")},addContext:function(t,e){st("logs.logger.addContext")},setHandler:function(t){st("logs.logger.setHandler")},setLevel:function(t){st("logs.logger.setLevel")}},$t=(Ht=r({},{logger:Gt,init:function(t){st("core.init")},addLoggerGlobalContext:function(t,e){st("addLoggerGlobalContext")},setLoggerGlobalContext:function(t){st("setLoggerGlobalContext")},createLogger:function(t,e){return st("createLogger"),Gt},getLogger:function(t){st("getLogger")}}),Object.defineProperty(Ht,"_setDebug",{get:function(){return N},enumerable:!1}),Ht),qt=!1;$t.init=B((function(t){if(lt()&&function(t){if(qt)return t.silentMultipleInit||console.error("DD_LOGS is already initialized."),!1;if(!t||!t.publicApiKey&&!t.clientToken)return console.error("Client Token is not configured, we will not send any data."),!1;if(void 0!==t.sampleRate&&(e=t.sampleRate,!(function(t){return"number"==typeof t}(e)&&e>=0&&e<=100)))return console.error("Sample Rate should be a number between 0 and 100"),!1;var e;return!0}(t)){t.publicApiKey&&(t.clientToken=t.publicApiKey,console.warn("Public API Key is deprecated. Please use Client Token instead."));var e=!1!==t.forwardErrorsToLogs,n=ft(r(r({},t),{isCollectingError:e}),Rt),o=n.errorObservable,i=n.configuration,u=n.internalMonitoring,a=It(o,i,Ft(i,ct()),u);_()($t,a),qt=!0}})),(function(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var t=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof t&&(t="object"==typeof self?self:"object"==typeof window?window:{}),t}()).DD_LOGS=$t}]);
!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]",g=/^\[object .+?Constructor\]$/,y=/^(?:0|[1-9]\d*)$/,b={};b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b[c]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object Boolean]"]=b["[object DataView]"]=b["[object Date]"]=b["[object Error]"]=b[f]=b["[object Map]"]=b["[object Number]"]=b[p]=b["[object RegExp]"]=b["[object Set]"]=b["[object String]"]=b["[object WeakMap]"]=!1;var m="object"==typeof t&&t&&t.Object===Object&&t,w="object"==typeof self&&self&&self.Object===Object&&self,_=m||w||Function("return this")(),x=e&&!e.nodeType&&e,E=x&&"object"==typeof n&&n&&!n.nodeType&&n,O=E&&E.exports===x,T=O&&m.process,j=function(){try{var t=E&&E.require&&E.require("util").types;return t||T&&T.binding&&T.binding("util")}catch(t){}}(),S=j&&j.isTypedArray;function C(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,R,A,k=Array.prototype,M=Function.prototype,I=Object.prototype,B=_["__core-js_shared__"],z=M.toString,P=I.hasOwnProperty,N=(L=/[^.]+$/.exec(B&&B.keys&&B.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"",D=I.toString,F=z.call(Object),U=RegExp("^"+z.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),H=O?_.Buffer:void 0,G=_.Symbol,$=_.Uint8Array,q=H?H.allocUnsafe:void 0,K=(R=Object.getPrototypeOf,A=Object,function(t){return R(A(t))}),W=Object.create,X=I.propertyIsEnumerable,J=k.splice,V=G?G.toStringTag:void 0,Y=function(){try{var t=xt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Z=H?H.isBuffer:void 0,Q=Math.max,tt=Date.now,et=xt(_,"Map"),nt=xt(Object,"create"),rt=function(){function t(){}return function(e){if(!It(e))return{};if(W)return W(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&&Ct(t),o=!n&&!r&&At(t),i=!n&&!r&&!o&&zt(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&&!P.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Et(s,c))||a.push(s);return a}function st(t,e,n){(void 0===n||St(t[e],n))&&(void 0!==n||e in t)||dt(t,e,n)}function ft(t,e,n){var r=t[e];P.call(t,e)&&St(r,n)&&(void 0!==n||e in t)||dt(t,e,n)}function lt(t,e){for(var n=t.length;n--;)if(St(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 P.call(e,t)?e[t]:void 0},ot.prototype.has=function(t){var e=this.__data__;return nt?void 0!==e[t]:P.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=P.call(t,V),n=t[V];try{t[V]=void 0;var r=!0}catch(t){}var o=D.call(t);r&&(e?t[V]=n:delete t[V]);return o}(t):function(t){return D.call(t)}(t)}function gt(t){return Bt(t)&&vt(t)==c}function yt(t){return!(!It(t)||function(t){return!!N&&N in t}(t))&&(kt(t)?U:g).test(function(t){if(null!=t){try{return z.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function bt(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&&P.call(t,r))&&n.push(r);return n}function mt(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=Tt(t,n),c=Tt(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&&zt(c);f=c,d||h||v?Lt(a)?f=a:Bt(w=a)&&Rt(w)?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=q?q(n):new t.constructor(n);return t.copy(r),r}(c,!0)):v?(l=!1,g=c,y=!0?(b=g.buffer,m=new b.constructor(b.byteLength),new $(m).set(new $(b)),m):g.buffer,f=new g.constructor(y,g.byteOffset,g.length)):f=[]:function(t){if(!Bt(t)||vt(t)!=p)return!1;var e=K(t);if(null===e)return!0;var n=P.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&z.call(n)==F}(c)||Ct(c)?(f=a,Ct(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,Pt(t))}(a):It(a)&&!kt(a)||(f=function(t){return"function"!=typeof t.constructor||Ot(t)?{}:rt(K(t))}(c))):l=!1}var g,y,b,m;var w;l&&(u.set(c,f),o(f,c,r,i,u),u.delete(c));st(t,n,f)}(t,e,u,n,mt,r,o);else{var a=r?r(Tt(t,u),i,u+"",t,e,o):void 0;void 0===a&&(a=i),st(t,u,a)}}),Pt)}function wt(t,e){return jt(function(t,e,n){return e=Q(void 0===e?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=Q(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),C(t,this,a)}}(t,e,Ft),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 xt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return yt(n)?n:void 0}function Et(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 Tt(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var jt=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}:Ft);function St(t,e){return t===e||t!=t&&e!=e}var Ct=gt(function(){return arguments}())?gt:function(t){return Bt(t)&&P.call(t,"callee")&&!X.call(t,"callee")},Lt=Array.isArray;function Rt(t){return null!=t&&Mt(t.length)&&!kt(t)}var At=Z||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 Bt(t){return null!=t&&"object"==typeof t}var zt=S?function(t){return function(e){return t(e)}}(S):function(t){return Bt(t)&&Mt(t.length)&&!!b[vt(t)]};function Pt(t){return Rt(t)?ct(t,!0):bt(t)}var Nt,Dt=(Nt=function(t,e,n){mt(t,e,n)},wt((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=Nt.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?Rt(n)&&Et(e,n.length):"string"==r&&e in n)&&St(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&&Nt(t,u,n,o)}return t})));function Ft(t){return t}n.exports=Dt}).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,g=!p.call({valueOf:1},"valueOf");function y(t,e){var n=x(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&E(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||m(u,o))||n.push(u);return n}function b(t,e,n){var r=t[e];l.call(t,e)&&_(r,n)&&(void 0!==n||e in t)||(t[e]=n)}function m(t,e){return!!(e=null==e?n:e)&&("number"==typeof t||u.test(t))&&t>-1&&t%1==0&&t<e}function w(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 x=Array.isArray;function E(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 T,j=(T=function(t,e){if(g||w(e)||E(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;b(n,u,void 0===a?t[u]:a)}}(e,function(t){return E(t)?y(t):function(t){if(!w(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)&&b(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=T.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?E(n)&&m(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&&T(t,u,n,o)}return t})));t.exports=j},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),n.d(e,"datadogLogs",(function(){return $t}));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])}}}function u(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r}var a,c,s,f=6e4,l=60*f;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(){}function h(t,e,n){if(null==t)return JSON.stringify(t);var r=[!1,void 0];v(t)&&(r=[!0,t.toJSON],delete t.toJSON);var o,i,u=[!1,void 0];"object"==typeof t&&v(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 v(t){return"object"==typeof t&&null!==t&&t.hasOwnProperty("toJSON")}function g(){return void 0===s&&(s=performance.timing.navigationStart),s}function y(t){if(t.origin)return t.origin;var e=t.host.replace(/(:80|:443)$/,"");return t.protocol+"//"+e}!function(t){t.BEFORE_UNLOAD="beforeunload",t.CLICK="click",t.KEY_DOWN="keydown",t.LOAD="load",t.POP_STATE="popstate",t.SCROLL="scroll",t.TOUCH_START="touchstart",t.VISIBILITY_CHANGE="visibilitychange"}(a||(a={})),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"}(c||(c={}));var b={isCollectingError:!0,maxErrorsByMinute:3e3,maxInternalMonitoringMessagesPerPage:15,resourceSampleRate:100,sampleRate:100,silentMultipleInit:!1,requestErrorResponseLengthLimit:32768,flushTimeout:3e4,maxBatchSize:50,maxMessageSize:262144,batchBytesLimit:16384};function m(t,e,n){var r="us"===e.datacenter?"com":"eu",o="production"===e.env?"datadoghq."+r:"datad0g."+r,i="version:"+e.version,u=t+"-http-intake.logs."+o,a=e.proxyHost?e.proxyHost:u,c=e.proxyHost?"ddhost="+u+"&":"";return"https://"+a+"/v1/input/"+e.clientToken+"?"+c+"ddsource="+(n||"browser")+"&ddtags="+i}var w=n(1),_=n.n(w),x=n(0),E=n.n(x),O="?",T=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var S=function(){var t,e,n,r,o,i,u=[];function a(t,e,n){var r;for(var o in u)if(j(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)C.augmentStackTraceWithInitialElement(e,r,o,""+t),f();else if(u)a(C(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(T);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(C(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=C(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=B(c),r=!0}(),function(){if(i)return;o=null!==window.onunhandledrejection?window.onunhandledrejection:void 0,window.onunhandledrejection=B(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}(),C=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]||O,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]||O,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]||O,line:r[4]?+r[4]:void 0,url:r[3]}}!o.func&&o.line&&(o.func=O),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!==C&&f!==S&&(i={args:[],column:void 0,func:O,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=O),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)j(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=O),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 C(t,e+1)}},o}();var L=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 R,A=function(){function t(t,e,n,r,o,i,u){void 0===u&&(u=p),this.request=t,this.maxSize=e,this.bytesLimit=n,this.maxMessageSize=r,this.flushTimeout=o,this.contextProvider=i,this.beforeUnloadCallback=u,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.flush=function(){if(0!==this.bufferMessageCount){var t=u(this.pushOnlyBuffer,(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=h(E()({},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(a.BEFORE_UNLOAD,B(this.beforeUnloadCallback)),document.addEventListener(a.VISIBILITY_CHANGE,B((function(){"hidden"===document.visibilityState&&t.flush()}))),window.addEventListener(a.BEFORE_UNLOAD,B((function(){return t.flush()}))))},t}();!function(t){t.info="info",t.error="error"}(R||(R={}));var k,M={maxMessagesPerPage:0,sentMessageCount:0};function I(t,e,n){var r=n.value;n.value=function(){var t=M.batch?B(r):r;return t.apply(this,arguments)}}function B(t){return function(){try{return t.apply(this,arguments)}catch(t){D(t);try{z(t)}catch(t){D(t)}}}}function z(t){P(r(r({},function(t){if(t instanceof Error){var e=C(t);return{error:{kind:e.name,stack:nt(e)},message:e.message}}return{error:{stack:"Not an instance of error"},message:"Uncaught "+h(t)}}(t)),{status:R.error}))}function P(t){M.batch&&M.sentMessageCount<M.maxMessagesPerPage&&(M.sentMessageCount+=1,M.batch.add(t))}function N(t){M.debugMode=t}function D(t){M.debugMode&&console.warn("[INTERNAL ERROR]",t)}var F,U,H=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 G(t){return $(t,y(window.location)).href}function $(t,e){if(function(){if(void 0!==F)return F;try{var t=new URL("http://test/path");return F="http://test/path"===t.href}catch(t){F=!1}return F}())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(t){t.FETCH="fetch",t.XHR="xhr"}(U||(U={}));var q,K,W,X,J,V=1;function Y(){var t=V;return V+=1,t}function Z(){return q||(function(t){var e=t[0],n=t[1],r=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=B((function(t,e){return this._datadog_xhr={method:t,url:e},r.apply(this,arguments)}));var o=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(t){var r=this,i=performance.now(),u=Y();e.notify({requestId:u});var a=!1,c=function(){a||(a=!0,n.notify({requestId:u,startTime:i,duration:performance.now()-i,method:r._datadog_xhr.method,response:r.response,status:r.status,traceId:Q(),type:U.XHR,url:G(r._datadog_xhr.url)}))},s=this.onreadystatechange;return this.onreadystatechange=function(){this.readyState===XMLHttpRequest.DONE&&B(c)(),s&&s.apply(this,arguments)},this.addEventListener("loadend",B(c)),o.apply(this,arguments)}}(q=[new H,new H]),function(t){var e=t[0],n=t[1];if(!window.fetch)return;var r=window.fetch;window.fetch=B((function(t,u){var a=this,c=u&&u.method||"object"==typeof t&&t.method||"GET",s=performance.now(),f=Y();e.notify({requestId:f});var l=function(e){return o(a,void 0,void 0,(function(){var r,o,u,a,l;return i(this,(function(i){switch(i.label){case 0:return r=performance.now()-s,o=G("object"==typeof t&&t.url||t),"stack"in e||e instanceof Error?(u=C(e),n.notify({duration:r,method:c,requestId:f,startTime:s,url:o,response:nt(u),status:0,traceId:Q(),type:U.FETCH}),[3,6]):[3,1];case 1:if(!("status"in e))return[3,6];a=void 0,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,e.clone().text()];case 3:return a=i.sent(),[3,5];case 4:return l=i.sent(),a="Unable to retrieve response: "+l,[3,5];case 5:n.notify({duration:r,method:c,requestId:f,startTime:s,url:o,response:a,responseType:e.type,status:e.status,traceId:Q(),type:U.FETCH}),i.label=6;case 6:return[2]}}))}))},d=r.call(this,t,u);return d.then(B(l),B(l)),d}))}(q)),q}function Q(){return"ddtrace"in window&&window.ddtrace.tracer.scope().active()?window.ddtrace.tracer.scope().active().context().toTraceId():void 0}function tt(t){if(!W){var e=new H;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:K.NETWORK,stack:rt(n.response,t)||"Failed to load"},http:{method:n.method,status_code:n.status,url:n.url}},message:ot(n.type)+" error "+n.method+" "+n.url,startTime:n.startTime})}))}(t,e,Z()[1]),function(t){X=console.error,console.error=B((function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];X.apply(console,u([e],n)),t.notify({context:{error:{origin:K.CONSOLE}},message:u(["console error:",e],n).map(et).join(" "),startTime:performance.now()})}))}(e),function(t){J=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=nt(t)):(n="Uncaught "+h(e),r="No stack, consider using an instance of Error");return{message:n,context:{error:{stack:r,kind:t.name,origin:K.SOURCE}},startTime:performance.now()}}(e,r))},S.subscribe(J)}(e);W=function(t,e){var n=0,r=new H;return e.subscribe((function(e){n<t.maxErrorsByMinute?(n+=1,r.notify(e)):n===t.maxErrorsByMinute&&(n+=1,r.notify({context:{error:{origin:K.AGENT}},message:"Reached max number of errors by minute: "+t.maxErrorsByMinute,startTime:performance.now()}))})),setInterval((function(){return n=0}),f),r}(t,e)}return W}function et(t){return"string"==typeof t?t:t instanceof Error?nt(C(t)):h(t,0,2)}function nt(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 rt(t,e){return t&&t.length>e.requestErrorResponseLengthLimit?t.substring(0,e.requestErrorResponseLengthLimit)+"...":t}function ot(t){return U.XHR===t?"XHR":"Fetch"}!function(t){t.AGENT="agent",t.CONSOLE="console",t.NETWORK="network",t.SOURCE="source",t.LOGGER="logger"}(K||(K={}));var it=1e3;function ut(t,e,n){var r=new Date;r.setTime(r.getTime()+n);var o="expires="+r.toUTCString();document.cookie=t+"="+e+";"+o+";path=/"}function at(t){var e=document.cookie.match("(^|;)\\s*"+t+"\\s*=\\s*([^;]+)");return e?e.pop():void 0}function ct(){if(void 0===document.cookie||null===document.cookie)return!1;try{return ut("dd_rum_test","test",1e3),"test"===at("dd_rum_test")}catch(t){return console.error(t),!1}}function st(t){console.warn("'"+t+"' not yet available, please call '.init()' first.")}function ft(t,e){var n=function(t,e){var n={clientToken:t.clientToken,datacenter:t.datacenter||e.datacenter,env:e.env,proxyHost:t.proxyHost,version:e.version},o=Array.isArray(t.enableExperimentalFeatures)?t.enableExperimentalFeatures:[],i=r({isEnabled:function(t){return e=t,-1!==o.indexOf(e);var e},logsEndpoint:m("browser",n),rumEndpoint:m("rum",n),traceEndpoint:m("public-trace",n)},b);return t.internalMonitoringApiKey&&(i.internalMonitoringEndpoint=m("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 A(new L(t.internalMonitoringEndpoint,t.batchBytesLimit),t.maxBatchSize,t.batchBytesLimit,t.maxMessageSize,t.flushTimeout,(function(){return E()({date:(new Date).getTime(),view:{referrer:document.referrer,url:window.location.href}},void 0!==k?k():{})}));_()(M,{batch:e,maxMessagesPerPage:t.maxInternalMonitoringMessagesPerPage,sentMessageCount:0})}return{setExternalContextProvider:function(t){k=t}}}(n);return{configuration:n,errorObservable:tt(n),internalMonitoring:o}}function lt(){return"file:"!==window.location.protocol||(console.error("Execution is not allowed in the current context."),!1)}var dt="_dd",pt="_dd_r",ht="_dd_l",vt="rum",gt="logs";var yt="_dd_s",bt=15*f,mt=4*l,wt=f;function _t(t,e){var n,r,o,i,u,c=(n=yt,i=!1,u=function(){i=!0,window.clearTimeout(r),r=window.setTimeout((function(){i=!1}),it)},{get:function(){return i?o:(o=at(n),u(),o)},set:function(t,e){ut(n,t,e),o=t,u()}});!function(t){var e=t.get(),n=at(dt),r=at(pt),o=at(ht);if(!e){var i={};n&&(i.id=n),o&&/^[01]$/.test(o)&&(i[gt]=o),r&&/^[012]$/.test(r)&&(i[vt]=r),Tt(i,t)}}(c);var s,f,l,p,h,v,g,y,b,m=new H,w=Ot(c).id,_=(s=function(){var n=Ot(c),r=e(n[t]),o=r.trackingType,i=r.isTracked;n[t]=o,i&&!n.id&&(n.id=d(),n.created=String(Date.now())),Tt(n,c),i&&w!==n.id&&(w=n.id,m.notify())},f=it,h=!l||void 0===l.leading||l.leading,v=!l||void 0===l.trailing||l.trailing,g=!1,y=!1,b=!1,{throttled:function(){var t=this;b||(g?y=!0:(h?s.apply(this):y=!0,g=!0,p=window.setTimeout((function(){v&&y&&s.apply(t),g=!1,y=!1}),f)))},stop:function(){window.clearTimeout(p),b=!0}}).throttled;return _(),function(t){var e=B(t),n={capture:!0,passive:!0};[a.CLICK,a.TOUCH_START,a.KEY_DOWN,a.SCROLL].forEach((function(t){document.addEventListener(t,e,n),St.push((function(){return document.removeEventListener(t,e,n)}))}))}(_),function(t){var e=B((function(){"visible"===document.visibilityState&&t()})),n=window.setInterval(e,wt);document.addEventListener(a.VISIBILITY_CHANGE,e),St.push((function(){clearInterval(n),document.removeEventListener(a.VISIBILITY_CHANGE,e)}))}((function(){Tt(Ot(c),c)})),{getId:function(){return Ot(c).id},getTrackingType:function(){return Ot(c)[t]},renewObservable:m}}var xt=/^([a-z]+)=([a-z0-9-]+)$/,Et="&";function Ot(t){var e=function(t){var e=t.get(),n={};(function(t){return void 0!==t&&(-1!==t.indexOf(Et)||xt.test(t))})(e)&&e.split(Et).forEach((function(t){var e=xt.exec(t);if(null!==e){var r=e[1],o=e[2];n[r]=o}}));return n}(t);return function(t){return(void 0===t.created||Date.now()-Number(t.created)<mt)&&(void 0===t.expire||Date.now()<Number(t.expire))}(e)?e:(jt(t),{})}function Tt(t,e){if(n=t,0!==Object.keys(n).length){var n;t.expire=String(Date.now()+bt);var r=function(t){return Object.keys(t).map((function(e){return[e,t[e]]}))}(t).map((function(t){return t[0]+"="+t[1]})).join(Et);e.set(r,bt)}else jt(e)}function jt(t){t.set("",0)}var St=[];(function(){function t(t){var e=this,n=t[0],r=t[1];this.requests=[],this.whenAllCompleteFn=p;var o=0;n.subscribe((function(){o+=1})),r.subscribe((function(t){e.requests.push(t),0===(o-=1)&&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,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(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 Ct,Lt,Rt={datacenter:"us",env:"production",version:"1.11.2"};!function(t){t.debug="debug",t.info="info",t.warn="warn",t.error="error"}(Lt||(Lt={}));var At,kt,Mt=((Ct={})[Lt.debug]=0,Ct[Lt.info]=1,Ct[Lt.warn]=2,Ct[Lt.error]=3,Ct);Object.keys(Lt);function It(t,e,n,o){var i,u={};o.setExternalContextProvider((function(){return E()({session_id:n.getId()},u,Pt())}));var a=new A(new L(e.logsEndpoint,e.batchBytesLimit),e.maxBatchSize,e.batchBytesLimit,e.maxMessageSize,e.flushTimeout,(function(){return E()({date:(new Date).getTime(),session_id:n.getId(),view:{referrer:document.referrer,url:window.location.href}},u,Pt())})),c=((i={})[At.console]=function(t){return console.log(t.status+": "+t.message)},i[At.http]=function(t){return a.add(t)},i[At.silent]=p,i),s=new zt(n,c);kt={},t.subscribe((function(t){return s.error(t.message,r({date:(e=t.startTime,Math.floor(g()+e))},t.context));var e}));var f={setLoggerGlobalContext:function(t){u=t},addLoggerGlobalContext:function(t,e){u[t]=e}};return f.createLogger=function(t,e){return function(n,o){return void 0===o&&(o={}),kt[n]=new zt(t,e,o.handler,o.level,r(r({},o.context),{logger:{name:n}})),kt[n]}}(n,c),f.getLogger=Bt,f.logger=s,f}function Bt(t){return kt[t]}!function(t){t.http="http",t.console="console",t.silent="silent"}(At||(At={}));var zt=function(){function t(t,e,n,r,o){void 0===n&&(n=At.http),void 0===r&&(r=Lt.debug),void 0===o&&(o={}),this.session=t,this.handlers=e,this.level=r,this.loggerContext=o,this.handler=this.handlers[n]}return t.prototype.log=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n=Lt.info),this.session.isTracked()&&Mt[n]>=Mt[this.level]&&this.handler(r({message:t,status:n},E()({},this.loggerContext,e)))},t.prototype.debug=function(t,e){void 0===e&&(e={}),this.log(t,e,Lt.debug)},t.prototype.info=function(t,e){void 0===e&&(e={}),this.log(t,e,Lt.info)},t.prototype.warn=function(t,e){void 0===e&&(e={}),this.log(t,e,Lt.warn)},t.prototype.error=function(t,e){void 0===e&&(e={});var n={error:{origin:K.LOGGER}};this.log(t,E()({},n,e),Lt.error)},t.prototype.setContext=function(t){this.loggerContext=t},t.prototype.addContext=function(t,e){this.loggerContext[t]=e},t.prototype.setHandler=function(t){this.handler=this.handlers[t]},t.prototype.setLevel=function(t){this.level=t},function(t,e,n,r){var o,i=arguments.length,u=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(u=(i<3?o(u):i>3?o(e,n,u):o(e,n))||u);i>3&&u&&Object.defineProperty(e,n,u)}([I],t.prototype,"log",null),t}();function Pt(){var t=window.DD_RUM;return t&&t.getInternalContext?t.getInternalContext():void 0}var Nt,Dt="logs";function Ft(t,e){if(!e){var n=Ut(t)===Nt.TRACKED;return{getId:function(){},isTracked:function(){return n}}}var r=_t(Dt,(function(e){return function(t,e){var n=function(t){return t===Nt.NOT_TRACKED||t===Nt.TRACKED}(e)?e:Ut(t);return{trackingType:n,isTracked:n===Nt.TRACKED}}(t,e)}));return{getId:r.getId,isTracked:function(){return r.getTrackingType()===Nt.TRACKED}}}function Ut(t){return 0!==(e=t.sampleRate)&&100*Math.random()<=e?Nt.TRACKED:Nt.NOT_TRACKED;var e}!function(t){t.NOT_TRACKED="0",t.TRACKED="1"}(Nt||(Nt={}));var Ht,Gt={debug:function(t,e){st("logs.logger.debug")},error:function(t,e){st("logs.logger.error")},info:function(t,e){st("logs.logger.info")},log:function(t,e,n){st("logs.logger.log")},warn:function(t,e){st("logs.logger.warn")},setContext:function(t){st("logs.logger.setContext")},addContext:function(t,e){st("logs.logger.addContext")},setHandler:function(t){st("logs.logger.setHandler")},setLevel:function(t){st("logs.logger.setLevel")}},$t=(Ht=r({},{logger:Gt,init:function(t){st("core.init")},addLoggerGlobalContext:function(t,e){st("addLoggerGlobalContext")},setLoggerGlobalContext:function(t){st("setLoggerGlobalContext")},createLogger:function(t,e){return st("createLogger"),Gt},getLogger:function(t){st("getLogger")}}),Object.defineProperty(Ht,"_setDebug",{get:function(){return N},enumerable:!1}),Ht),qt=!1;$t.init=B((function(t){if(lt()&&function(t){if(qt)return t.silentMultipleInit||console.error("DD_LOGS is already initialized."),!1;if(!t||!t.publicApiKey&&!t.clientToken)return console.error("Client Token is not configured, we will not send any data."),!1;if(void 0!==t.sampleRate&&(e=t.sampleRate,!(function(t){return"number"==typeof t}(e)&&e>=0&&e<=100)))return console.error("Sample Rate should be a number between 0 and 100"),!1;var e;return!0}(t)){t.publicApiKey&&(t.clientToken=t.publicApiKey,console.warn("Public API Key is deprecated. Please use Client Token instead."));var e=!1!==t.forwardErrorsToLogs,n=ft(r(r({},t),{isCollectingError:e}),Rt),o=n.errorObservable,i=n.configuration,u=n.internalMonitoring,a=It(o,i,Ft(i,ct()),u);_()($t,a),qt=!0}})),(function(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var t=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof t&&(t="object"==typeof self?self:"object"==typeof window?window:{}),t}()).DD_LOGS=$t}]);

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

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

@@ -7,3 +7,3 @@ import { Configuration } from '@datadog/browser-core';

}
export declare enum LoggerSessionType {
export declare enum LoggerTrackingType {
NOT_TRACKED = "0",

@@ -10,0 +10,0 @@ TRACKED = "1"

@@ -5,10 +5,10 @@ "use strict";

exports.LOGGER_SESSION_KEY = 'logs';
var LoggerSessionType;
(function (LoggerSessionType) {
LoggerSessionType["NOT_TRACKED"] = "0";
LoggerSessionType["TRACKED"] = "1";
})(LoggerSessionType = exports.LoggerSessionType || (exports.LoggerSessionType = {}));
var LoggerTrackingType;
(function (LoggerTrackingType) {
LoggerTrackingType["NOT_TRACKED"] = "0";
LoggerTrackingType["TRACKED"] = "1";
})(LoggerTrackingType = exports.LoggerTrackingType || (exports.LoggerTrackingType = {}));
function startLoggerSession(configuration, areCookieAuthorized) {
if (!areCookieAuthorized) {
var isTracked_1 = computeSessionType(configuration) === LoggerSessionType.TRACKED;
var isTracked_1 = computeTrackingType(configuration) === LoggerTrackingType.TRACKED;
return {

@@ -19,25 +19,27 @@ getId: function () { return undefined; },

}
var session = browser_core_1.startSessionManagement(exports.LOGGER_SESSION_KEY, function (rawType) { return computeSessionState(configuration, rawType); });
var session = browser_core_1.startSessionManagement(exports.LOGGER_SESSION_KEY, function (rawTrackingType) {
return computeSessionState(configuration, rawTrackingType);
});
return {
getId: session.getId,
isTracked: function () { return session.getType() === LoggerSessionType.TRACKED; },
isTracked: function () { return session.getTrackingType() === LoggerTrackingType.TRACKED; },
};
}
exports.startLoggerSession = startLoggerSession;
function computeSessionType(configuration) {
function computeTrackingType(configuration) {
if (!browser_core_1.performDraw(configuration.sampleRate)) {
return LoggerSessionType.NOT_TRACKED;
return LoggerTrackingType.NOT_TRACKED;
}
return LoggerSessionType.TRACKED;
return LoggerTrackingType.TRACKED;
}
function computeSessionState(configuration, rawSessionType) {
var sessionType = hasValidLoggerSession(rawSessionType) ? rawSessionType : computeSessionType(configuration);
var trackingType = hasValidLoggerSession(rawSessionType) ? rawSessionType : computeTrackingType(configuration);
return {
isTracked: sessionType === LoggerSessionType.TRACKED,
type: sessionType,
trackingType: trackingType,
isTracked: trackingType === LoggerTrackingType.TRACKED,
};
}
function hasValidLoggerSession(type) {
return type === LoggerSessionType.NOT_TRACKED || type === LoggerSessionType.TRACKED;
function hasValidLoggerSession(trackingType) {
return trackingType === LoggerTrackingType.NOT_TRACKED || trackingType === LoggerTrackingType.TRACKED;
}
//# sourceMappingURL=loggerSession.js.map
export var buildEnv = {
datacenter: 'us',
env: 'production',
version: '1.11.1',
version: '1.11.2',
};
//# sourceMappingURL=buildEnv.js.map

@@ -7,3 +7,3 @@ import { Configuration } from '@datadog/browser-core';

}
export declare enum LoggerSessionType {
export declare enum LoggerTrackingType {
NOT_TRACKED = "0",

@@ -10,0 +10,0 @@ TRACKED = "1"

import { performDraw, startSessionManagement } from '@datadog/browser-core';
export var LOGGER_SESSION_KEY = 'logs';
export var LoggerSessionType;
(function (LoggerSessionType) {
LoggerSessionType["NOT_TRACKED"] = "0";
LoggerSessionType["TRACKED"] = "1";
})(LoggerSessionType || (LoggerSessionType = {}));
export var LoggerTrackingType;
(function (LoggerTrackingType) {
LoggerTrackingType["NOT_TRACKED"] = "0";
LoggerTrackingType["TRACKED"] = "1";
})(LoggerTrackingType || (LoggerTrackingType = {}));
export function startLoggerSession(configuration, areCookieAuthorized) {
if (!areCookieAuthorized) {
var isTracked_1 = computeSessionType(configuration) === LoggerSessionType.TRACKED;
var isTracked_1 = computeTrackingType(configuration) === LoggerTrackingType.TRACKED;
return {

@@ -16,24 +16,26 @@ getId: function () { return undefined; },

}
var session = startSessionManagement(LOGGER_SESSION_KEY, function (rawType) { return computeSessionState(configuration, rawType); });
var session = startSessionManagement(LOGGER_SESSION_KEY, function (rawTrackingType) {
return computeSessionState(configuration, rawTrackingType);
});
return {
getId: session.getId,
isTracked: function () { return session.getType() === LoggerSessionType.TRACKED; },
isTracked: function () { return session.getTrackingType() === LoggerTrackingType.TRACKED; },
};
}
function computeSessionType(configuration) {
function computeTrackingType(configuration) {
if (!performDraw(configuration.sampleRate)) {
return LoggerSessionType.NOT_TRACKED;
return LoggerTrackingType.NOT_TRACKED;
}
return LoggerSessionType.TRACKED;
return LoggerTrackingType.TRACKED;
}
function computeSessionState(configuration, rawSessionType) {
var sessionType = hasValidLoggerSession(rawSessionType) ? rawSessionType : computeSessionType(configuration);
var trackingType = hasValidLoggerSession(rawSessionType) ? rawSessionType : computeTrackingType(configuration);
return {
isTracked: sessionType === LoggerSessionType.TRACKED,
type: sessionType,
trackingType: trackingType,
isTracked: trackingType === LoggerTrackingType.TRACKED,
};
}
function hasValidLoggerSession(type) {
return type === LoggerSessionType.NOT_TRACKED || type === LoggerSessionType.TRACKED;
function hasValidLoggerSession(trackingType) {
return trackingType === LoggerTrackingType.NOT_TRACKED || trackingType === LoggerTrackingType.TRACKED;
}
//# sourceMappingURL=loggerSession.js.map
{
"name": "@datadog/browser-logs",
"version": "1.11.1",
"version": "1.11.2",
"license": "Apache-2.0",

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

"dependencies": {
"@datadog/browser-core": "1.11.1",
"@datadog/browser-core": "1.11.2",
"lodash.assign": "4.2.0",

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

},
"gitHead": "e830e0bef74d1e30585a03ff032b0bba7bb8364d"
"gitHead": "b5cff10e609243eebd48c1b916b3af17fe0115d3"
}

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc