@dash0/sdk-web 0.18.1 → 0.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(){"use strict";function t(){}function e(t){return t}var n={debug:0,info:1,warn:2,error:3},r=n.warn;var i=s("info"),o=s("warn"),a=s("error"),u=s("debug");function s(e){if("undefined"!=typeof console&&console[e]&&"function"==typeof console[e].apply){var i=n[e];return function(){i>=r&&console[e].apply(console,arguments)}}return t}var c=Object.prototype.hasOwnProperty;function l(t,e){return c.call(t,e)}var f="undefined"!=typeof window?window:void 0,d=null==f?void 0:f.document,v=null==f?void 0:f.navigator,p="undefined"!=typeof location?location:void 0,h=(null==f?void 0:f.performance)||(null==f?void 0:f.webkitPerformance)||(null==f?void 0:f.msPerformance)||(null==f?void 0:f.mozPerformance);null==f||f.encodeURIComponent;var m=null==f?void 0:f.fetch,y=function(){try{var t;return null!==(t=null==f?void 0:f.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),g=function(){try{var t;return null!==(t=null==f?void 0:f.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),b=Array(32);function T(t){for(var e=0;e<2*t;e++)b[e]=Math.floor(16*Math.random())+48,b[e]>=58&&(b[e]+=39);return String.fromCharCode.apply(null,b.slice(0,2*t))}function E(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var w=null!=y&&"function"==typeof y.getItem&&"function"==typeof y.setItem;function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function A(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function O(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){A(o,r,i,a,u,"next",t)}function u(t){A(o,r,i,a,u,"throw",t)}a(void 0)}))}}function I(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,P(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function L(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=j(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function C(t,e,n){return(e=P(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function R(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _(){_=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),u=new R(r||[]);return i(a,"_invoke",{value:I(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",v="suspendedYield",p="executing",h="completed",m={};function y(){}function g(){}function b(){}var T={};c(T,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(x([])));w&&w!==n&&r.call(w,a)&&(T=w);var S=b.prototype=y.prototype=Object.create(T);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,u){var s=f(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function I(e,n,r){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===h){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?h:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=h,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function x(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},A(O.prototype),c(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=x,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:x(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e);else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||j(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(t){return function(t){if(Array.isArray(t))return S(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||j(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function j(t,e){if(t){if("string"==typeof t)return S(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(t,e):void 0}}function U(){return(new Date).getTime()}function M(){var t=V();return t?String(1e6*(h.now()+t)):F(new Date)}function F(t){return"object"===D(t)?F(t.getTime()):String(t)+"000000"}function V(){var t,e=null==h?void 0:h.timeOrigin;"number"!=typeof e&&(e=null==h||null===(t=h.timing)||void 0===t?void 0:t.fetchStart);return e}var B={setTimeout:null==f?void 0:f.setTimeout,clearTimeout:null==f?void 0:f.clearTimeout,setInterval:null==f?void 0:f.setInterval,clearInterval:null==f?void 0:f.clearInterval},H=null!=f&&null!=f.Zone&&null!=f.Zone.root&&"function"==typeof f.Zone.root.run;function W(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return G.apply("setTimeout",arguments)}function q(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return G.apply("clearTimeout",arguments)}function z(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return G.apply("setInterval",arguments)}function G(){var t,e=this;if(H)try{var n=Array.prototype.slice.apply(arguments);return f.Zone.root.run(B[e],f,n)}catch(t){o("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=B[e])||void 0===t?void 0:t.apply(f,arguments)}H&&u("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");h&&h.getEntriesByType;var K=h&&"function"==typeof f.PerformanceObserver&&"function"==typeof h.now,Z=Object.freeze({CONNECT_END:"connectEnd",CONNECT_START:"connectStart",DECODED_BODY_SIZE:"decodedBodySize",DOM_COMPLETE:"domComplete",DOM_CONTENT_LOADED_EVENT_END:"domContentLoadedEventEnd",DOM_CONTENT_LOADED_EVENT_START:"domContentLoadedEventStart",DOM_INTERACTIVE:"domInteractive",DOMAIN_LOOKUP_END:"domainLookupEnd",DOMAIN_LOOKUP_START:"domainLookupStart",ENCODED_BODY_SIZE:"encodedBodySize",FETCH_START:"fetchStart",LOAD_EVENT_END:"loadEventEnd",LOAD_EVENT_START:"loadEventStart",NAVIGATION_START:"navigationStart",REDIRECT_END:"redirectEnd",REDIRECT_START:"redirectStart",REQUEST_START:"requestStart",RESPONSE_END:"responseEnd",RESPONSE_START:"responseStart",SECURE_CONNECTION_START:"secureConnectionStart",START_TIME:"startTime",UNLOAD_EVENT_END:"unloadEventEnd",UNLOAD_EVENT_START:"unloadEventStart"}),Y=new WeakSet;function X(e){if(!K)return function(e){var n=0;return{start:function(){n=U()},end:function(){return e({duration:U()-n})},cancel:t}}(e.onEnd);var n,r,i,o,a,u=[];return{start:function(){n=h.now();try{var t,e=null==f?void 0:f.PerformanceObserver;if(e)null===(t=i=new e(c))||void 0===t||t.observe({type:"resource"})}catch(t){}a=W(v,6e5)},end:function(t){if(r)return;if(r=null!=t?t:h.now(),p(),!Q())return s();W((function(){return s()}),Math.min(300,e.maxWaitForResourceMillis)),E(d,"visibilitychange",l),o=W(s,e.maxWaitForResourceMillis)},cancel:v};function s(){v();var t=function(){if(!u.length)return;var t,i,o=u.filter((function(t){return t.responseEnd<=r+e.maxToleranceForResourceTimingsMillis&&!Y.has(t)}));if(!o.length)return;1===o.length&&(t=o[0]);if(!t){var a,s=L(o);try{for(s.s();!(a=s.n()).done;){var c=a.value,l=Math.abs(r-n-c.duration)+Math.abs(c.responseEnd-r);(void 0===i||l<i)&&(i=l,t=c)}}catch(t){s.e(t)}finally{s.f()}}if(!t)return;return Y.add(t),t}();null!=t&&t.duration&&t.duration<864e5?e.onEnd({resource:t,duration:t.duration}):e.onEnd({resource:t,duration:r-n})}function c(t){t.getEntriesByType("resource").filter((function(t){var r=t;return r.startTime>=n&&e.resourceMatcher(r)})).forEach((function(t){u.length>=100&&u.shift(),u.push(t)}))}function l(){Q()||s()}function v(){!function(){if(i){try{var t;null===(t=i)||void 0===t||t.disconnect()}catch(t){}i=void 0}}(),o&&(clearTimeout(o),o=void 0),p(),function(){if(!d)return;t=d,e="visibilitychange",n=l,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function p(){a&&(clearTimeout(a),a=void 0)}}function Q(){return"visible"===(null==d?void 0:d.visibilityState)||"prerender"===(null==d?void 0:d.visibilityState)}var $="undefined";function J(t){return Math.round(100*t)/100}function tt(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==d?void 0:d.baseURI)&&void 0!==e?e:null==p?void 0:p.href)}function et(t){try{return tt(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var nt=Symbol.for("INSTRUMENTED_BY_DASH0");function rt(t,e,n){var r=t[e];r?!0!==r[nt]?(!function(t){t[nt]=!0}(r),t[e]=n(r)):u("".concat(String(e)," has already been instrumented, skipping")):u("".concat(String(e)," is not defined, unable to instrument"))}var it={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.18.1",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:50,headersToCapture:[],urlAttributeScrubber:e,pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]},enableTransportCompression:!1};function ot(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var at="data:";function ut(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===at||(!!function(t){for(var e=t.toLowerCase(),n=0,r=it.endpoints.length;n<r;n++){var i=it.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||ot(it.ignoreUrls,t))))}var st=!1;function ct(t){var e,n,r=[];return n=i,st&&n(),d&&f&&(E(d,"visibilitychange",(function(){"visible"!==d.visibilityState&&n()})),E(f,"pagehide",(function(){st=!0,n()})),E(f,"beforeunload",(function(){st=!0,n()}))),{send:function(n){"visible"===(null==d?void 0:d.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=W(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}function lt(t,e){return ft.apply(this,arguments)}function ft(){return ft=O(_().mark((function e(n,r){var i,a,s,c;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u("Transmitting telemetry to endpoints",r),i=JSON.stringify(r),a=i,s=i.length,c=!1,"undefined"==typeof CompressionStream||!it.enableTransportCompression){e.next=11;break}return e.next=8,dt(i);case 8:a=e.sent,s=a.byteLength,c=!0;case 11:return e.next=13,Promise.all(it.endpoints.map(function(){var e=O(_().mark((function e(r){var i,u,l;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(i=new URL(r.url)).pathname=i.pathname+(i.pathname.endsWith("/")?n.substring(1):n),u={"Content-Type":"application/json",Authorization:"Bearer ".concat(r.authToken)},r.dataset&&(u["Dash0-Dataset"]=r.dataset),c&&(u["Content-Encoding"]="gzip"),m){e.next=9;break}return o("Unable to send telemetry, fetch is not defined"),e.abrupt("return");case 9:return e.next=11,m(i,{method:"POST",headers:u,body:a,keepalive:s<=6e4});case 11:(l=e.sent).text().catch(t),l.ok||o("Failed to send telemetry to ".concat(i,": ").concat(l.status," ").concat(l.statusText)),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),o("Error sending telemetry to ".concat(r.url).concat(n,":"),e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}()));case 13:case"end":return e.stop()}}),e)}))),ft.apply(this,arguments)}function dt(t){return vt.apply(this,arguments)}function vt(){return(vt=O(_().mark((function t(e){var n,r,i;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new Blob([e]),r=n.stream(),i=r.pipeThrough(new CompressionStream("gzip")),t.abrupt("return",new Response(i).arrayBuffer());case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var pt,ht=ct((function(t){lt("/v1/logs",{resourceLogs:[{resource:it.resource,scopeLogs:[{scope:it.scope,logRecords:t}]}]}).catch((function(t){a("Failed to transmit logs",t)}))})),mt=ct((function(t){lt("/v1/traces",{resourceSpans:[{resource:it.resource,scopeSpans:[{scope:it.scope,spans:t}]}]}).catch((function(t){a("Failed to transmit spans",t)}))}));function yt(){var t,e,n,r,i;return pt||(e=(t={maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCallsPerTenMinutes,n=t.maxCallsPerTenSeconds,r=0,i=0,z((function(){r=0}),6e5),z((function(){i=0}),1e4),pt=function(){return++r>e||++i>n}),pt()}function gt(t){yt()?u("Transport rate limit. Will not send item.",t):ht.send(t)}function bt(t){t&&(yt()?u("Transport rate limit. Will not send item.",t):mt.send(t))}var Tt="service.name",Et="service.version",wt="deployment.environment.name",St="deployment.name",At="deployment.id",Ot="event.name",It="dash0.web.event.id",Nt="page.load.id",Lt="user_agent.original",Ct="user.id",Rt="user.name",_t="user.full_name",xt="user.email",kt="user.hash",Pt="user.roles",Dt="exception.message",jt="exception.type",Ut="exception.stacktrace",Mt="url.full",Ft={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},Vt={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},Bt=0,Ht=1,Wt="pushState",qt="replaceState",zt=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function Gt(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return Gt(t)}))}:"string"==typeof t?e.stringValue=t:"number"==typeof t?e.doubleValue=t:"boolean"==typeof t?e.boolValue=t:!function(t){if(null==t||"object"!==D(t))return!1;var e=Object.keys(t);return 1===e.length&&zt.includes(e[0])}(t)?"object"===D(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=x(t,2);return Kt(e[0],e[1])}))}):e=t,e}}function Kt(t,e){return{key:t,value:Gt(e)}}function Zt(t,e,n){e&&t.push(Kt(e,n))}function Yt(t,e){e&&Object.entries(e).forEach((function(e){var n=x(e,2),r=n[0],i=n[1];return Zt(t,r,i)}))}function Xt(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var Qt="traceparent",$t=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function Jt(){var t,e,n=((null===(t=Array.from(null!==(e=null==d?void 0:d.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===Qt})))||void 0===t?void 0:t.content.trim())||"").match($t)||function(){var t=h.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===Qt)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match($t);if(n)return{traceId:n[1],spanId:n[2]}}function te(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}function ee(t,e,n){var r,i,o,a=(r=n.traceId,i=r.substring(0,8),o=r.substring(8,32),"1-".concat(i,"-").concat(o)),u="Root=".concat(a,";Parent=").concat(n.spanId,";Sampled=1");t.call(e,"X-Amzn-Trace-Id",u)}var ne=1;function re(){var t,e;return"".concat((t={ephemeralSession:!w},e=0,t.ephemeralSession&&(e|=ne),e.toString(16).padStart(2,"0"))).concat(T(7))}var ie="d0_session",oe="#",ae=864e5,ue=null;function se(t,e){if(!w)return u("Storage API is not available and session tracking is therefore not supported."),void(ue=re());t||(t=108e5),e||(e=216e5),t=Math.min(t,ae),e=Math.min(e,ae);try{var n=function(t){return w&&y?y.getItem(t):null}(ie),r=function(t){if(!t)return null;var e=t.split(oe);if(e.length<3)return null;var n=e[0],r=parseInt(e[1],10),i=parseInt(e[2],10);if(!n||isNaN(r)||isNaN(i))return null;return{id:n,startTime:r,lastActivityTime:i}}(n);r&&!function(t,e,n){var r=U()-e;if(t.lastActivityTime<r)return!1;var i=U()-n;return t.startTime>=i}(r,t,e)&&(r=null),r?r.lastActivityTime=U():r={id:re(),startTime:U(),lastActivityTime:U()},function(t,e){w&&y&&y.setItem(t,e)}(ie,function(t){return t.id+oe+t.startTime+oe+t.lastActivityTime}(r)),ue=r.id}catch(t){o("Failed to record session information",t)}}var ce="d042",le=1;function fe(t){var e=0;return t.withoutSession&&(e|=le),e.toString(16).padStart(2,"0")}for(var de=new Uint32Array(256),ve=0;ve<256;ve++){for(var pe=ve,he=0;he<8;he++)pe=1&pe?3988292384^pe>>>1:pe>>>1;de[ve]=pe>>>0}function me(t){var e=function(t){for(var e=new Uint8Array(t.length/2),n=0;n<t.length;n+=2)e[n/2]=parseInt(t.substring(n,n+2),16);for(var r=4294967295,i=0;i<e.length;i++){var o=e[i];r=r>>>8^de[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(T(4))}function ye(t){var e=function(t){return t?"".concat(ce).concat(fe({withoutSession:!1})).concat(t).concat(T(5)):"".concat(ce).concat(fe({withoutSession:!0})).concat(T(13))}(ue),n=me(e),r=[];return Zt(r,It,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:M(),attributes:r,events:[],links:[],status:{code:0}}}function ge(t,e,n){var r=t;if(!r.endTimeUnixNano)return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):M(),r;u("Attempting to end already ended span. Dropping...",r)}function be(t,e,n,r){var i=void 0,o=void 0;"string"==typeof n?i=n:Array.isArray(n)&&(o=n),t.events.push({name:e,timeUnixNano:null!=i?i:M(),attributes:null!=o?o:[]})}function Te(t,n,r){var i=function(t){return t?Array.isArray(t)?function(e){return[].concat(k(t),[e]).join(".")}:function(e){return"".concat(t,".").concat(e)}:function(t){return t}}(r);try{var o=tt(n);o.username&&(o.username="REDACTED"),o.password&&(o.password="REDACTED");var a=it.urlAttributeScrubber(C(C(C(C(C(C({},Mt,o.href),"url.path",o.pathname),"url.domain",o.hostname),"url.scheme",o.protocol.replace(":","")),"url.fragment",o.hash?o.hash.replace("#",""):void 0),"url.query",o.search?o.search.replace("?",""):void 0));Object.entries(a).forEach((function(e){var n=x(e,2),r=n[0],o=n[1];void 0!==o&&Zt(t,i(r),o)}))}catch(r){it.urlAttributeScrubber===e&&Zt(t,i(Mt),String(n))}}var Ee=null!=g&&"function"==typeof g.getItem&&"function"==typeof g.setItem;var we="d0_tab",Se=null;function Ae(){if(Ee)try{var t=function(t){return Ee&&g?g.getItem(t):null}(we);if(t)return void(Se=t);Se=T(8),function(t,e){Ee&&g&&g.setItem(t,e)}(we,Se)}catch(t){o("Failed to record tab ID information",t)}else u("Storage API is not available and tab tracking is therefore not supported.")}function Oe(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===It}))&&Zt(t,It,T(8));for(var u=0;u<it.signalAttributes.length;u++)t.push(it.signalAttributes[u]);Te(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==f?void 0:f.location.href)&&void 0!==n?n:$,"page"),ue&&Zt(t,"session.id",ue),Se&&Zt(t,"browser.tab.id",Se),Zt(t,"browser.window.width",null!==(i=null==f?void 0:f.innerWidth)&&void 0!==i?i:$),Zt(t,"browser.window.height",null!==(o=null==f?void 0:f.innerHeight)&&void 0!==o?o:$);var s=null==v||null===(a=v.connection)||void 0===a?void 0:a.effectiveType;s&&Zt(t,"network.connection.subtype",s)}var Ie,Ne=0,Le=0,Ce={},Re=!1;function _e(){Re=!0}function xe(t,e){t&&ke("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function ke(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(Ne>100)&&!function(t){return!t||ot(it.ignoreErrorMessages,t)}(e)){Le>=20&&(Ce={},Le=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==f?void 0:f.location.href),a=Ce[o];if(a)a.seenCount++;else{var u=[];Oe(u),Zt(u,Ot,Ft.ERROR),Zt(u,Dt,e),n&&Zt(u,jt,n),r&&Zt(u,Ut,r),null!=i&&i.componentStack&&Zt(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),Yt(u,null==i?void 0:i.attributes),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:M(),attributes:u,severityNumber:Vt.ERROR,severityText:"ERROR",body:{stringValue:e}}},Ce[o]=a,Le++}!function(){if(Ie)return;Ie=setTimeout(Pe,1e3)}()}}function Pe(){for(var t in Ie&&(clearTimeout(Ie),Ie=null),Ce)if(l(Ce,t)){var e=Ce[t];e.seenCount>e.transmittedCount&&(gt(e.log),Ne++)}Ce={},Le=0}var De=-1,je=function(t){addEventListener("pageshow",(function(e){e.persisted&&(De=e.timeStamp,t(e))}),!0)},Ue=function(t,e,n,r){var i,o;return function(a){e.value>=0&&(a||r)&&(((o=e.value-(null!=i?i:0))||void 0===i)&&(i=e.value,e.delta=o,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,n),t(e)))}},Me=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Fe=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},Ve=function(){var t,e=Fe();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},Be=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Fe(),r="navigate";return De>=0?r="back-forward-cache":n&&(document.prerendering||Ve()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:"v5-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},He=new WeakMap;function We(t,e){return He.get(t)||He.set(t,new e),He.get(t)}var qe,ze=function(){return N((function t(){I(this,t),C(this,"t",void 0),C(this,"i",0),C(this,"o",[])}),[{key:"h",value:function(t){var e;if(!t.hadRecentInput){var n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),null===(e=this.t)||void 0===e||e.call(this,t)}}}])}(),Ge=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?R(Object(n),!0).forEach((function(e){C(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:t,buffered:!0},n)),r}}catch(t){}},Ke=function(t){var e=!1;return function(){e||(t(),e=!0)}},Ze=-1,Ye=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Xe=function(t){"hidden"===document.visibilityState&&Ze>-1&&(Ze="visibilitychange"===t.type?t.timeStamp:0,$e())},Qe=function(){addEventListener("visibilitychange",Xe,!0),addEventListener("prerenderingchange",Xe,!0)},$e=function(){removeEventListener("visibilitychange",Xe,!0),removeEventListener("prerenderingchange",Xe,!0)},Je=function(){if(Ze<0){var t,e=Ve(),n=document.prerendering||null===(t=globalThis.performance.getEntriesByType("visibility-state").filter((function(t){return"hidden"===t.name&&t.startTime>e}))[0])||void 0===t?void 0:t.startTime;Ze=null!=n?n:Ye(),Qe(),je((function(){setTimeout((function(){Ze=Ye(),Qe()}))}))}return{get firstHiddenTime(){return Ze}}},tn=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},en=[1800,3e3],nn=[.1,.25],rn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};tn((function(){var n,r=Je(),i=Be("FCP"),o=Ge("paint",(function(t){var e,a=L(t);try{for(a.s();!(e=a.n()).done;){var u=e.value;"first-contentful-paint"===u.name&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-Ve(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=Ue(t,i,en,e.reportAllChanges),je((function(r){i=Be("FCP"),n=Ue(t,i,en,e.reportAllChanges),Me((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(Ke((function(){var n,r=Be("CLS",0),i=We(e,ze),o=function(t){var e,o=L(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;i.h(a)}}catch(t){o.e(t)}finally{o.f()}i.i>r.value&&(r.value=i.i,r.entries=i.o,n())},a=Ge("layout-shift",o);a&&(n=Ue(t,r,nn,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),je((function(){i.i=0,r=Be("CLS",0),n=Ue(t,r,nn,e.reportAllChanges),Me((function(){return n()}))})),setTimeout(n))})))},on=0,an=1/0,un=0,sn=function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(an=Math.min(an,r.interactionId),un=Math.max(un,r.interactionId),on=un?(un-an)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},cn=function(){var t;return qe?on:null!==(t=performance.interactionCount)&&void 0!==t?t:0},ln=0,fn=function(){return N((function t(){I(this,t),C(this,"u",[]),C(this,"l",new Map),C(this,"m",void 0),C(this,"v",void 0)}),[{key:"p",value:function(){ln=cn(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((cn()-ln)/50));return this.u[t]}},{key:"h",value:function(t){var e;if(null!==(e=this.m)&&void 0!==e&&e.call(this,t),t.interactionId||"first-input"===t.entryType){var n=this.u.at(-1),r=this.l.get(t.interactionId);if(r||this.u.length<10||t.duration>n.T){var i;if(r?t.duration>r.T?(r.entries=[t],r.T=t.duration):t.duration===r.T&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],T:t.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((function(t,e){return e.T-t.T})),this.u.length>10){var o,a=L(this.u.splice(10));try{for(a.s();!(o=a.n()).done;){var u=o.value;this.l.delete(u.id)}}catch(t){a.e(t)}finally{a.f()}}null===(i=this.v)||void 0===i||i.call(this,r)}}}}])}(),dn=function(t){var e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=Ke(t),document.addEventListener("visibilitychange",t,{once:!0}),e((function(){t(),document.removeEventListener("visibilitychange",t)})))},vn=[200,500],pn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&tn((function(){var n;"interactionCount"in performance||qe||(qe=Ge("event",sn,{type:"event",buffered:!0,durationThreshold:0}));var r,i=Be("INP"),o=We(e,fn),a=function(t){dn((function(){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;o.h(a)}}catch(t){n.e(t)}finally{n.f()}var u=o.P();u&&u.T!==i.value&&(i.value=u.T,i.entries=u.entries,r())}))},u=Ge("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Ue(t,i,vn,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),je((function(){o.p(),i=Be("INP"),r=Ue(t,i,vn,e.reportAllChanges)})))}))},hn=function(){return N((function t(){I(this,t),C(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),mn=[2500,4e3];function yn(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};tn((function(){var n,r=Je(),i=Be("LCP"),o=We(e,hn),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=L(t);try{for(u.s();!(a=u.n()).done;){var s=a.value;o.h(s),s.startTime<r.firstHiddenTime&&(i.value=Math.max(s.startTime-Ve(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=Ge("largest-contentful-paint",a);if(u){n=Ue(t,i,mn,e.reportAllChanges);for(var s=Ke((function(){a(u.takeRecords()),u.disconnect(),n(!0)})),c=0,l=["keydown","click","visibilitychange"];c<l.length;c++)addEventListener(l[c],(function(){return dn(s)}),{capture:!0,once:!0});je((function(r){i=Be("LCP"),n=Ue(t,i,mn,e.reportAllChanges),Me((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}(gn,{reportAllChanges:!0}),pn(gn,{reportAllChanges:!0}),rn(gn,{reportAllChanges:!0})}function gn(t){var e=[];Zt(e,Ot,Ft.WEB_VITAL);var n=[];Zt(n,"name",t.name),Zt(n,"value",J(t.value)),Zt(n,"delta",J(t.delta));var r={timeUnixNano:M(),attributes:e,severityNumber:Vt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Oe(r.attributes),gt(r)}var bn="Unhandled promise rejection: ",Tn="<unavailable because Promise wasn't rejected with an Error object>";function En(t){null==t.reason?xe({message:bn+"<no reason defined>",stack:Tn}):"string"==typeof t.reason.message?xe({message:bn+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:Tn}):"object"!==D(t.reason)&&xe({message:bn+t.reason,stack:Tn})}var wn="__dash0OriginalFunctions";function Sn(t,e){for(var n=t[wn],r=0;r<n.length;r++){if(An(n[r].valuesForEqualityCheck,e))return r}return-1}function An(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function On(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[wn]=t[wn]||[],i=Sn(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,In(n,r,i))}function In(t,e,n){return[t,e,Nn(n)]}function Nn(t){return null!=t&&("object"===D(t)?Boolean(t.capture):Boolean(t))}function Ln(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[wn];if(null==r)return n;var i=Sn(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,In(e,n,r),i)}function Cn(){it.wrapEventHandlers&&function(t){if(!t||"function"!=typeof t.prototype.addEventListener||"function"!=typeof t.prototype.removeEventListener)return;var e=t.prototype.addEventListener,n=t.prototype.removeEventListener;t.prototype.addEventListener=function(t,n,r){if("function"!=typeof n)return e.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=function(){try{return n.apply(this,arguments)}catch(t){throw xe(t),_e(),t}},i[1]=On(this,i[1],t,n,r),e.apply(this,i)},t.prototype.removeEventListener=function(t,e,r){if("function"!=typeof e)return n.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=Ln(this,t,e,r,e),n.apply(this,i)}}(null==f?void 0:f.EventTarget)}function Rn(t){var e=null==f?void 0:f[t];"function"==typeof e&&(f[t]=function(t){for(var n=new Array(arguments.length),r=0;r<arguments.length;r++)n[r]=arguments[r];return n[0]=function(t){if("function"!=typeof t)return t;return function(){try{return t.apply(this,arguments)}catch(t){throw reportError(t),_e(),t}}}(t),e.apply(this,n)})}function _n(){!function(){if(f){var t=f.onerror;f.onerror=function(e,n,r,i,o){if(Re)return Re=!1,"function"==typeof t?t.apply(this,arguments):void 0;var a=o&&o.stack;return a||(a="at "+n+" "+r,null!=i&&(a+=":"+i)),ke({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==f?void 0:f.addEventListener)&&f.addEventListener("unhandledrejection",En),Cn(),function(){if(it.wrapTimers){if(H)return void o("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");Rn("setTimeout"),Rn("setInterval")}}()}var xn=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function kn(t){return xn.includes(t)}function Pn(t,e){var n=0!==e.startTime;Dn(t,Z.FETCH_START,e,n),Dn(t,Z.DOMAIN_LOOKUP_START,e,n),Dn(t,Z.DOMAIN_LOOKUP_END,e,n),Dn(t,Z.CONNECT_START,e,n),Dn(t,Z.SECURE_CONNECTION_START,e,n),Dn(t,Z.CONNECT_END,e,n),Dn(t,Z.REQUEST_START,e,n),Dn(t,Z.RESPONSE_START,e,n),Dn(t,Z.RESPONSE_END,e,n)}function Dn(t,e,n){var r,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];!(e in n)||"number"!=typeof n[e]||i&&0===n[e]||be(t,e,(r=n[e],String(Math.round(1e6*(r+V())))))}function jn(t,e){var n=e.encodedBodySize;null!=n&&Zt(t.attributes,"http.response.body.size",n)}function Un(t){return function(){var e=O(_().mark((function e(n,r){var i,o,a,s,c,l,f,d,v,p,h,m,y,g,b;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r?Object.assign({},r):r,s=null,null!==(i=a)&&void 0!==i&&i.body&&(s=a.body,a.body=void 0),c=new Request(n,a),s&&a&&(a.body=s),!ut(l=c.url)){e.next=9;break}return u("Not creating span for fetch call because the url is ignored, URL: ".concat(l)),e.abrupt("return",t(n instanceof Request?c:n,r));case 9:return f=null!==(o=c.method)&&void 0!==o?o:"GET",d=kn(f),v=kn(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",Oe((h=ye("HTTP ".concat(p))).attributes),Te(h.attributes,l),Mn(n,r),Zt(h.attributes,"http.request.method",p),d||Zt(h.attributes,"http.request.method_original",f),m=Wn(l),m.length>0&&(null!==(y=a)&&void 0!==y&&y.headers?(a.headers=new Headers(a.headers),qn(a.headers.append,a.headers,h,m)):n instanceof Request?qn(c.headers.append,c.headers,h,m):(a||(a={}),a.headers=new Headers,qn(a.headers.append,a.headers,h,m))),Fn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(g=X({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===tt(l).href},maxWaitForResourceMillis:it.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:it.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(Pn(h,n),jn(h,n)),bt(ge(h,void 0,1e6*e))}})).start(),e.prev=25,e.next=28,t(n instanceof Request?c:n,a);case 28:return b=e.sent,Vn(h,b),e.abrupt("return",Bn(b,it.maxToleranceForResourceTimingsMillis,(function(){return g.end()}),(function(t){g.cancel(),Hn(h,t)})));case 33:throw e.prev=33,e.t0=e.catch(25),g.cancel(),Hn(h,e.t0),e.t0;case 38:case"end":return e.stop()}}),e,null,[[25,33]])})));return function(t,n){return e.apply(this,arguments)}}()}function Mn(t,e,n){try{return void 0}catch(n){u("failed to analyze request for GraphQL insights",n,t,e)}}function Fn(t,e,n){try{if(!it.headersToCapture.length)return;t.forEach((function(t,r){it.headersToCapture.some((function(t){return t.test(r)}))&&Zt(e.attributes,n(r),t)}))}catch(t){u("unable to capture http headers due to CORS policy")}}function Vn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2),0===n&&Zt(t.attributes,"error.type",e.type),Zt(t.attributes,"http.response.status_code",String(n)),Fn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function Bn(t,e,n,r){var i,o,a=h.now(),u=t.body;if(!(u&&(i=t,o=i.status,o>=200&&204!=o&&205!=o&&304!=o)))return n(),t;var s=!1,c=function(t){s||(n(t),s=!0)},l=function(t){s||(r(t),s=!0)},f=W((function(){return c(a)}),e),d=u.getReader(),v=new ReadableStream({pull:function(t){return O(_().mark((function n(){var r,i;return _().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,q(f),n.next=4,d.read();case 4:r=n.sent,i=r.value,r.done?(d.releaseLock(),t.close(),c()):(a=h.now(),f=W((function(){return c(a)}),e),t.enqueue(i)),n.next=15;break;case 10:n.prev=10,n.t0=n.catch(0),l(n.t0),t.error(n.t0);try{d.releaseLock()}catch(t){}case 15:case"end":return n.stop()}}),n,null,[[0,10]])})))()},cancel:function(t){return q(f),c(),d.cancel(t)}});return new Response(v,{status:t.status,statusText:t.statusText,headers:t.headers})}function Hn(t,e){!function(t,e){var n=[];"string"==typeof e?Zt(n,Dt,e):e&&(e.code?Zt(n,jt,e.code.toString()):e.name&&Zt(n,jt,e.name),e.message&&Zt(n,Dt,e.message),e.stack&&Zt(n,Ut,e.stack),be(t,"exception",n))}(t,e),bt(ge(t,function(t){return{code:2,message:t&&"object"===D(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function Wn(t){var e=[];if(et(t)){if(e.push("traceparent"),it.propagators){var n,r=L(it.propagators);try{for(r.s();!(n=r.n()).done;){var i=n.value;"traceparent"===i.type||e.includes(i.type)||e.push(i.type)}}catch(t){r.e(t)}finally{r.f()}}return e}if(it.propagators){var o,a=L(it.propagators);try{for(a.s();!(o=a.n()).done;){var u=o.value;ot(u.match,t)&&(e.includes(u.type)||e.push(u.type))}}catch(t){a.e(t)}finally{a.f()}return e}return[]}function qn(t,e,n,r){var i,o=L(r);try{for(o.s();!(i=o.n()).done;){"xray"===i.value?ee(t,e,n):te(t,e,n)}}catch(t){o.e(t)}finally{o.f()}}function zn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=it.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];Zt(u,Ot,Ft.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=x(t,2),n=e[0],r=e[1];return Zt(u,n,r)})),Oe(u,{url:e});var s=[];Zt(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==d?void 0:d.title)&&void 0!==i?i:$),null!=d&&d.referrer&&Zt(s,"referrer",d.referrer),Zt(s,"type",n?Ht:Bt),Zt(s,"change_state",r?qt:Wt);var c={timeUnixNano:t,attributes:u,severityNumber:Vt.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},l=Jt();l&&(c.traceId=l.traceId,c.spanId=l.spanId),gt(c)}function Gn(){var t=null==f?void 0:f.performance.getEntriesByType("navigation")[0];if(t){var e=[];Zt(e,Ot,Ft.NAVIGATION_TIMING);var n=[];Zt(n,"name",t.name),Kn(n,t,"responseStatus"),Kn(n,t,"fetchStart"),Kn(n,t,"requestStart"),Kn(n,t,"responseStart"),Kn(n,t,"domInteractive"),Kn(n,t,"domContentLoadedEventEnd"),Kn(n,t,"domComplete"),Kn(n,t,"loadEventEnd"),Kn(n,t,"transferSize"),Kn(n,t,"encodedBodySize"),Kn(n,t,"decodedBodySize");var r={timeUnixNano:Zn(),attributes:e,severityNumber:Vt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Oe(r.attributes);var i=Jt();i&&(r.traceId=i.traceId,r.spanId=i.spanId),gt(r)}else u("Navigation timings not available. Cannot emit navigation timing log")}function Kn(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||Zt(t,n,Number.isInteger(r)?r:J(r))}function Zn(){return F(Math.round(V()))}var Yn={},Xn=!1,Qn=!1;function $n(){tr(null==f?void 0:f.location.href)}function Jn(t){tr(t.newURL)}function tr(t,e){var n;if(t)try{var r=new URL(t,null==f?void 0:f.location.href);((n=r).pathname!==Yn.path||Qn&&n.search!==Yn.search||Xn&&n.hash!==Yn.hash)&&(er(r),zn(M(),r,!0,Boolean(e)))}catch(t){u("Failed to handle url change",t)}}function er(t){Yn.path=t.pathname,Yn.search=t.search,Yn.hash=t.hash}function nr(){!function(){try{zn(Zn(),null!=f&&f.location.href?new URL(null==f?void 0:f.location.href):void 0)}catch(t){a("Failed to transmit initial page view event",t)}if("complete"===(null==d?void 0:d.readyState))return Gn();f&&E(f,"load",(function(){setTimeout(Gn,0)}))}(),function(){var t,e,n,r;if(f&&f.history){if(it.pageViewInstrumentation.trackVirtualPageViews){Qn=null!==(t=null===(e=it.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,Xn=null!==(n=null===(r=it.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,rt(f.history,"replaceState",(function(t){return function(e,n,r){return tr(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),rt(f.history,"pushState",(function(t){return function(e,n,r){return tr(r?String(r):void 0),t.apply(this,[e,n,r])}})),f.addEventListener("hashchange",Jn),f.addEventListener("popstate",$n);try{er(new URL(f.location.href))}catch(t){}}}else u("Browser does not support history API, skipping instrumentation")}()}var rr=function(t){if("object"===D(t)&&null!==t){if("function"==typeof Object.getPrototypeOf){var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1},ir=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce((function(t,e){if(void 0===e)return t;if(Array.isArray(e))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(e).forEach((function(n){["__proto__","constructor","prototype"].includes(n)||(Array.isArray(t[n])&&Array.isArray(e[n])?t[n]=ir.options.mergeArrays?ir.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(k(t[n]),k(e[n])):e[n]:rr(t[n])&&rr(e[n])?t[n]=ir(t[n],e[n]):!rr(t[n])&&rr(e[n])?t[n]=ir(e[n],void 0):t[n]=void 0===e[n]?ir.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},or={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};ir.options=or,ir.withOptions=function(t){ir.options=Object.assign(Object.assign({},or),t);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=ir.apply(void 0,n);return ir.options=or,i};var ar=!1;function ur(t,e){var n=e.enabledInstrumentations;return!n||n.includes(t)}var sr={init:function(t){if(ar)u("Dash0 SDK is being reinitialized, skipping ...");else if(null!=f)if("function"==typeof m&&h&&h.getEntriesByType){var e;if(!t.serviceName.trim())u("Missing or empty serviceName value. Falling back to location.hostname."),t.serviceName=null!==(e=null==p?void 0:p.hostname)&&void 0!==e?e:"unknown";it.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==it.endpoints.length?(Object.assign(it,ir(it,function(t,e){var n,r={},i=L(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;o in t&&(r[o]=t[o])}}catch(t){i.e(t)}finally{i.f()}return r}(t,["ignoreUrls","ignoreErrorMessages","wrapEventHandlers","wrapTimers","propagateTraceHeadersCorsURLs","maxWaitForResourceTimingsMillis","maxToleranceForResourceTimingsMillis","headersToCapture","urlAttributeScrubber","pageViewInstrumentation","enableTransportCompression"]))),function(t){t.propagators?(t.propagateTraceHeadersCorsURLs&&o("Both 'propagators' and deprecated 'propagateTraceHeadersCorsURLs' were provided. Using 'propagators' configuration. Please migrate to the new 'propagators' config."),it.propagators=t.propagators):t.propagateTraceHeadersCorsURLs&&t.propagateTraceHeadersCorsURLs.length>0?(o("'propagateTraceHeadersCorsURLs' is deprecated. Please use the new 'propagators' configuration."),it.propagators=[{type:"traceparent",match:k(t.propagateTraceHeadersCorsURLs)}]):it.propagators=[{type:"traceparent",match:[]}]}(t),function(t){Zt(it.resource.attributes,Tt,t.serviceName),t.serviceVersion&&Zt(it.resource.attributes,Et,t.serviceVersion);var e=function(t){if(t.environment)return t.environment;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_ENV}catch(t){return}}(t);e&&Zt(it.resource.attributes,wt,e);var n=function(t){if(t.deploymentName)return t.deploymentName;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_TARGET_ENV}catch(t){return}}(t);n&&Zt(it.resource.attributes,St,n);var r=function(t){if(t.deploymentId)return t.deploymentId;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_BRANCH_URL}catch(t){return}}(t);r&&Zt(it.resource.attributes,At,r)}(t),function(t){var e;Zt(it.signalAttributes,Nt,T(16)),Zt(it.signalAttributes,Lt,null!==(e=null==v?void 0:v.userAgent)&&void 0!==e?e:$),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=x(t,2),n=e[0],r=e[1];Zt(it.signalAttributes,n,r)}))}(t),Ae(),se(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),ur("@dash0/navigation",t)&&nr(),ur("@dash0/web-vitals",t)&&yn(),ur("@dash0/error",t)&&_n(),ur("@dash0/fetch",t)&&(f&&f.fetch&&f.Request?rt(f,"fetch",Un):u("Browser does not support the Fetch API, skipping instrumentation")),ar=!0):o("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")}else u("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs.");else u("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")},debug:function(){u("Dash0 Web SDK configuration state:",it)},identify:function(t,e){Xt(it.signalAttributes,Ct),null!=t&&Zt(it.signalAttributes,Ct,t),Xt(it.signalAttributes,Rt),null!=(null==e?void 0:e.name)&&Zt(it.signalAttributes,Rt,e.name),Xt(it.signalAttributes,_t),null!=(null==e?void 0:e.fullName)&&Zt(it.signalAttributes,_t,e.fullName),Xt(it.signalAttributes,xt),null!=(null==e?void 0:e.email)&&Zt(it.signalAttributes,xt,e.email),Xt(it.signalAttributes,kt),null!=(null==e?void 0:e.hash)&&Zt(it.signalAttributes,kt,e.hash),Xt(it.signalAttributes,Pt),null!=(null==e?void 0:e.roles)&&Zt(it.signalAttributes,Pt,e.roles)},terminateSession:function(){if(w)try{!function(t){w&&y&&y.removeItem(t)}(ie)}catch(t){i("Failed to terminate session",t)}},reportError:function(t,e){xe(t,e)},addSignalAttribute:function(t,e){Zt(it.signalAttributes,t,e)},removeSignalAttribute:function(t){Xt(it.signalAttributes,t)},setActiveLogLevel:function(t){var e;r=null!==(e=n[t])&&void 0!==e?e:n.warn},sendEvent:function(t,e){if(Object.values(Ft).includes(t))o("Unable to send custom event ".concat(t,". You are not allowed to use an internal event name while sending a custom event. Dropping event..."));else{var n=[];Oe(n),Zt(n,Ot,t),null!=e&&e.title&&Zt(n,"dash0.web.event.title",e.title),Yt(n,null==e?void 0:e.attributes),gt({timeUnixNano:null!=(null==e?void 0:e.timestamp)?F(e.timestamp):M(),attributes:n,body:Gt(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?Vt[e.severity]:void 0})}}};function cr(t){var e=t[0],n=sr[e];if(n){for(var r=[],i=1;i<t.length;i++)r.push(t[i]);n.apply(null,r)}else o("Unsupported Dash0 Web SDK api: ",t[0])}!function(){u("".concat("Initializing Dash0 Web SDK"," (via Script)"));var t=f.dash0;if(!t)return void o("global 'dash0' not found. Did you use the correct Dash0 Web SDK initializer?");if(!t._q)return void o("Dash0 Web SDK command queue not defined. Did you add the script tag multiple times to your website?");(function(t){for(var e=0,n=t.length;e<n;e++)cr(t[e])})(t._q),f.dash0=function(){return cr(arguments)}}()}();
1
+ !function(){"use strict";function t(){}function e(t){return t}var n={debug:0,info:1,warn:2,error:3},r=n.warn;var i=s("info"),o=s("warn"),a=s("error"),u=s("debug");function s(e){if("undefined"!=typeof console&&console[e]&&"function"==typeof console[e].apply){var i=n[e];return function(){i>=r&&console[e].apply(console,arguments)}}return t}var c=Object.prototype.hasOwnProperty;function l(t,e){return c.call(t,e)}var f="undefined"!=typeof window?window:void 0,d=null==f?void 0:f.document,v=null==f?void 0:f.navigator,p="undefined"!=typeof location?location:void 0,h=(null==f?void 0:f.performance)||(null==f?void 0:f.webkitPerformance)||(null==f?void 0:f.msPerformance)||(null==f?void 0:f.mozPerformance);null==f||f.encodeURIComponent;var m=null==f?void 0:f.fetch,y=function(){try{var t;return null!==(t=null==f?void 0:f.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),g=function(){try{var t;return null!==(t=null==f?void 0:f.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),b=Array(32);function T(t){for(var e=0;e<2*t;e++)b[e]=Math.floor(16*Math.random())+48,b[e]>=58&&(b[e]+=39);return String.fromCharCode.apply(null,b.slice(0,2*t))}function E(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var w=null!=y&&"function"==typeof y.getItem&&"function"==typeof y.setItem;function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function A(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function O(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){A(o,r,i,a,u,"next",t)}function u(t){A(o,r,i,a,u,"throw",t)}a(void 0)}))}}function I(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,P(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function L(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=j(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function C(t,e,n){return(e=P(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function R(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _(){_=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),u=new R(r||[]);return i(a,"_invoke",{value:I(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",v="suspendedYield",p="executing",h="completed",m={};function y(){}function g(){}function b(){}var T={};c(T,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(x([])));w&&w!==n&&r.call(w,a)&&(T=w);var S=b.prototype=y.prototype=Object.create(T);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,u){var s=f(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function I(e,n,r){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===h){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?h:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=h,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function x(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},A(O.prototype),c(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=x,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:x(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e);else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||j(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(t){return function(t){if(Array.isArray(t))return S(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||j(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function j(t,e){if(t){if("string"==typeof t)return S(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(t,e):void 0}}function U(){return(new Date).getTime()}function M(){var t=V();return t?String(1e6*(h.now()+t)):F(new Date)}function F(t){return"object"===D(t)?F(t.getTime()):String(t)+"000000"}function V(){var t,e=null==h?void 0:h.timeOrigin;"number"!=typeof e&&(e=null==h||null===(t=h.timing)||void 0===t?void 0:t.fetchStart);return e}var B={setTimeout:null==f?void 0:f.setTimeout,clearTimeout:null==f?void 0:f.clearTimeout,setInterval:null==f?void 0:f.setInterval,clearInterval:null==f?void 0:f.clearInterval},H=null!=f&&null!=f.Zone&&null!=f.Zone.root&&"function"==typeof f.Zone.root.run;function W(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return G.apply("setTimeout",arguments)}function q(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return G.apply("clearTimeout",arguments)}function z(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return G.apply("setInterval",arguments)}function G(){var t,e=this;if(H)try{var n=Array.prototype.slice.apply(arguments);return f.Zone.root.run(B[e],f,n)}catch(t){o("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=B[e])||void 0===t?void 0:t.apply(f,arguments)}H&&u("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");h&&h.getEntriesByType;var K=h&&"function"==typeof f.PerformanceObserver&&"function"==typeof h.now,Z=Object.freeze({CONNECT_END:"connectEnd",CONNECT_START:"connectStart",DECODED_BODY_SIZE:"decodedBodySize",DOM_COMPLETE:"domComplete",DOM_CONTENT_LOADED_EVENT_END:"domContentLoadedEventEnd",DOM_CONTENT_LOADED_EVENT_START:"domContentLoadedEventStart",DOM_INTERACTIVE:"domInteractive",DOMAIN_LOOKUP_END:"domainLookupEnd",DOMAIN_LOOKUP_START:"domainLookupStart",ENCODED_BODY_SIZE:"encodedBodySize",FETCH_START:"fetchStart",LOAD_EVENT_END:"loadEventEnd",LOAD_EVENT_START:"loadEventStart",NAVIGATION_START:"navigationStart",REDIRECT_END:"redirectEnd",REDIRECT_START:"redirectStart",REQUEST_START:"requestStart",RESPONSE_END:"responseEnd",RESPONSE_START:"responseStart",SECURE_CONNECTION_START:"secureConnectionStart",START_TIME:"startTime",UNLOAD_EVENT_END:"unloadEventEnd",UNLOAD_EVENT_START:"unloadEventStart"}),Y=new WeakSet;function X(e){if(!K)return function(e){var n=0;return{start:function(){n=U()},end:function(){return e({duration:U()-n})},cancel:t}}(e.onEnd);var n,r,i,o,a,u=[];return{start:function(){n=h.now();try{var t,e=null==f?void 0:f.PerformanceObserver;if(e)null===(t=i=new e(c))||void 0===t||t.observe({type:"resource"})}catch(t){}a=W(v,6e5)},end:function(t){if(r)return;if(r=null!=t?t:h.now(),p(),!Q())return s();W((function(){return s()}),Math.min(300,e.maxWaitForResourceMillis)),E(d,"visibilitychange",l),o=W(s,e.maxWaitForResourceMillis)},cancel:v};function s(){v();var t=function(){if(!u.length)return;var t,i,o=u.filter((function(t){return t.responseEnd<=r+e.maxToleranceForResourceTimingsMillis&&!Y.has(t)}));if(!o.length)return;1===o.length&&(t=o[0]);if(!t){var a,s=L(o);try{for(s.s();!(a=s.n()).done;){var c=a.value,l=Math.abs(r-n-c.duration)+Math.abs(c.responseEnd-r);(void 0===i||l<i)&&(i=l,t=c)}}catch(t){s.e(t)}finally{s.f()}}if(!t)return;return Y.add(t),t}();null!=t&&t.duration&&t.duration<864e5?e.onEnd({resource:t,duration:t.duration}):e.onEnd({resource:t,duration:r-n})}function c(t){t.getEntriesByType("resource").filter((function(t){var r=t;return r.startTime>=n&&e.resourceMatcher(r)})).forEach((function(t){u.length>=100&&u.shift(),u.push(t)}))}function l(){Q()||s()}function v(){!function(){if(i){try{var t;null===(t=i)||void 0===t||t.disconnect()}catch(t){}i=void 0}}(),o&&(clearTimeout(o),o=void 0),p(),function(){if(!d)return;t=d,e="visibilitychange",n=l,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function p(){a&&(clearTimeout(a),a=void 0)}}function Q(){return"visible"===(null==d?void 0:d.visibilityState)||"prerender"===(null==d?void 0:d.visibilityState)}var $="undefined";function J(t){return Math.round(100*t)/100}function tt(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==d?void 0:d.baseURI)&&void 0!==e?e:null==p?void 0:p.href)}function et(t){try{return tt(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var nt=Symbol.for("INSTRUMENTED_BY_DASH0");function rt(t,e,n){var r=t[e];r?!0!==r[nt]?(!function(t){t[nt]=!0}(r),t[e]=n(r)):u("".concat(String(e)," has already been instrumented, skipping")):u("".concat(String(e)," is not defined, unable to instrument"))}var it={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.18.2",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:50,headersToCapture:[],urlAttributeScrubber:e,pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]},enableTransportCompression:!1};function ot(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var at="data:";function ut(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===at||(!!function(t){for(var e=t.toLowerCase(),n=0,r=it.endpoints.length;n<r;n++){var i=it.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||ot(it.ignoreUrls,t))))}var st=!1;function ct(t){var e,n,r=[];return n=i,st&&n(),d&&f&&(E(d,"visibilitychange",(function(){"visible"!==d.visibilityState&&n()})),E(f,"pagehide",(function(){st=!0,n()})),E(f,"beforeunload",(function(){st=!0,n()}))),{send:function(n){"visible"===(null==d?void 0:d.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=W(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}function lt(t,e){return ft.apply(this,arguments)}function ft(){return ft=O(_().mark((function e(n,r){var i,a,s,c;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u("Transmitting telemetry to endpoints",r),i=JSON.stringify(r),a=i,s=i.length,c=!1,"undefined"==typeof CompressionStream||!it.enableTransportCompression){e.next=11;break}return e.next=8,dt(i);case 8:a=e.sent,s=a.byteLength,c=!0;case 11:return e.next=13,Promise.all(it.endpoints.map(function(){var e=O(_().mark((function e(r){var i,u,l;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(i=new URL(r.url)).pathname=i.pathname+(i.pathname.endsWith("/")?n.substring(1):n),u={"Content-Type":"application/json",Authorization:"Bearer ".concat(r.authToken)},r.dataset&&(u["Dash0-Dataset"]=r.dataset),c&&(u["Content-Encoding"]="gzip"),m){e.next=9;break}return o("Unable to send telemetry, fetch is not defined"),e.abrupt("return");case 9:return e.next=11,m(i,{method:"POST",headers:u,body:a,keepalive:s<=6e4});case 11:(l=e.sent).text().catch(t),l.ok||o("Failed to send telemetry to ".concat(i,": ").concat(l.status," ").concat(l.statusText)),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),o("Error sending telemetry to ".concat(r.url).concat(n,":"),e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}()));case 13:case"end":return e.stop()}}),e)}))),ft.apply(this,arguments)}function dt(t){return vt.apply(this,arguments)}function vt(){return(vt=O(_().mark((function t(e){var n,r,i;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new Blob([e]),r=n.stream(),i=r.pipeThrough(new CompressionStream("gzip")),t.abrupt("return",new Response(i).arrayBuffer());case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var pt,ht=ct((function(t){lt("/v1/logs",{resourceLogs:[{resource:it.resource,scopeLogs:[{scope:it.scope,logRecords:t}]}]}).catch((function(t){a("Failed to transmit logs",t)}))})),mt=ct((function(t){lt("/v1/traces",{resourceSpans:[{resource:it.resource,scopeSpans:[{scope:it.scope,spans:t}]}]}).catch((function(t){a("Failed to transmit spans",t)}))}));function yt(){var t,e,n,r,i;return pt||(e=(t={maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCallsPerTenMinutes,n=t.maxCallsPerTenSeconds,r=0,i=0,z((function(){r=0}),6e5),z((function(){i=0}),1e4),pt=function(){return++r>e||++i>n}),pt()}function gt(t){yt()?u("Transport rate limit. Will not send item.",t):ht.send(t)}function bt(t){t&&(yt()?u("Transport rate limit. Will not send item.",t):mt.send(t))}var Tt="service.name",Et="service.version",wt="deployment.environment.name",St="deployment.name",At="deployment.id",Ot="event.name",It="dash0.web.event.id",Nt="page.load.id",Lt="user_agent.original",Ct="user.id",Rt="user.name",_t="user.full_name",xt="user.email",kt="user.hash",Pt="user.roles",Dt="exception.message",jt="exception.type",Ut="exception.stacktrace",Mt="url.full",Ft={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},Vt={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},Bt=0,Ht=1,Wt="pushState",qt="replaceState",zt=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function Gt(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return Gt(t)}))}:"string"==typeof t?e.stringValue=t:"number"==typeof t?e.doubleValue=t:"boolean"==typeof t?e.boolValue=t:!function(t){if(null==t||"object"!==D(t))return!1;var e=Object.keys(t);return 1===e.length&&zt.includes(e[0])}(t)?"object"===D(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=x(t,2);return Kt(e[0],e[1])}))}):e=t,e}}function Kt(t,e){return{key:t,value:Gt(e)}}function Zt(t,e,n){e&&t.push(Kt(e,n))}function Yt(t,e){e&&Object.entries(e).forEach((function(e){var n=x(e,2),r=n[0],i=n[1];return Zt(t,r,i)}))}function Xt(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var Qt="traceparent",$t=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function Jt(){var t,e,n=((null===(t=Array.from(null!==(e=null==d?void 0:d.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===Qt})))||void 0===t?void 0:t.content.trim())||"").match($t)||function(){var t=h.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===Qt)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match($t);if(n)return{traceId:n[1],spanId:n[2]}}function te(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}function ee(t,e,n){var r,i,o,a=(r=n.traceId,i=r.substring(0,8),o=r.substring(8,32),"1-".concat(i,"-").concat(o)),u="Root=".concat(a,";Parent=").concat(n.spanId,";Sampled=1");t.call(e,"X-Amzn-Trace-Id",u)}var ne=1;function re(){var t,e;return"".concat((t={ephemeralSession:!w},e=0,t.ephemeralSession&&(e|=ne),e.toString(16).padStart(2,"0"))).concat(T(7))}var ie="d0_session",oe="#",ae=864e5,ue=null;function se(t,e){if(!w)return u("Storage API is not available and session tracking is therefore not supported."),void(ue=re());t||(t=108e5),e||(e=216e5),t=Math.min(t,ae),e=Math.min(e,ae);try{var n=function(t){return w&&y?y.getItem(t):null}(ie),r=function(t){if(!t)return null;var e=t.split(oe);if(e.length<3)return null;var n=e[0],r=parseInt(e[1],10),i=parseInt(e[2],10);if(!n||isNaN(r)||isNaN(i))return null;return{id:n,startTime:r,lastActivityTime:i}}(n);r&&!function(t,e,n){var r=U()-e;if(t.lastActivityTime<r)return!1;var i=U()-n;return t.startTime>=i}(r,t,e)&&(r=null),r?r.lastActivityTime=U():r={id:re(),startTime:U(),lastActivityTime:U()},function(t,e){w&&y&&y.setItem(t,e)}(ie,function(t){return t.id+oe+t.startTime+oe+t.lastActivityTime}(r)),ue=r.id}catch(t){o("Failed to record session information",t)}}var ce="d042",le=1;function fe(t){var e=0;return t.withoutSession&&(e|=le),e.toString(16).padStart(2,"0")}for(var de=new Uint32Array(256),ve=0;ve<256;ve++){for(var pe=ve,he=0;he<8;he++)pe=1&pe?3988292384^pe>>>1:pe>>>1;de[ve]=pe>>>0}function me(t){var e=function(t){for(var e=new Uint8Array(t.length/2),n=0;n<t.length;n+=2)e[n/2]=parseInt(t.substring(n,n+2),16);for(var r=4294967295,i=0;i<e.length;i++){var o=e[i];r=r>>>8^de[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(T(4))}function ye(t){var e=function(t){return t?"".concat(ce).concat(fe({withoutSession:!1})).concat(t).concat(T(5)):"".concat(ce).concat(fe({withoutSession:!0})).concat(T(13))}(ue),n=me(e),r=[];return Zt(r,It,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:M(),attributes:r,events:[],links:[],status:{code:0}}}function ge(t,e,n){var r=t;if(!r.endTimeUnixNano)return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):M(),r;u("Attempting to end already ended span. Dropping...",r)}function be(t,e,n,r){var i=void 0,o=void 0;"string"==typeof n?i=n:Array.isArray(n)&&(o=n),t.events.push({name:e,timeUnixNano:null!=i?i:M(),attributes:null!=o?o:[]})}function Te(t,n,r){var i=function(t){return t?Array.isArray(t)?function(e){return[].concat(k(t),[e]).join(".")}:function(e){return"".concat(t,".").concat(e)}:function(t){return t}}(r);try{var o=tt(n);o.username&&(o.username="REDACTED"),o.password&&(o.password="REDACTED");var a=it.urlAttributeScrubber(C(C(C(C(C(C({},Mt,o.href),"url.path",o.pathname),"url.domain",o.hostname),"url.scheme",o.protocol.replace(":","")),"url.fragment",o.hash?o.hash.replace("#",""):void 0),"url.query",o.search?o.search.replace("?",""):void 0));Object.entries(a).forEach((function(e){var n=x(e,2),r=n[0],o=n[1];void 0!==o&&Zt(t,i(r),o)}))}catch(r){it.urlAttributeScrubber===e&&Zt(t,i(Mt),String(n))}}var Ee=null!=g&&"function"==typeof g.getItem&&"function"==typeof g.setItem;var we="d0_tab",Se=null;function Ae(){if(Ee)try{var t=function(t){return Ee&&g?g.getItem(t):null}(we);if(t)return void(Se=t);Se=T(8),function(t,e){Ee&&g&&g.setItem(t,e)}(we,Se)}catch(t){o("Failed to record tab ID information",t)}else u("Storage API is not available and tab tracking is therefore not supported.")}function Oe(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===It}))&&Zt(t,It,T(8));for(var u=0;u<it.signalAttributes.length;u++)t.push(it.signalAttributes[u]);Te(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==f?void 0:f.location.href)&&void 0!==n?n:$,"page"),ue&&Zt(t,"session.id",ue),Se&&Zt(t,"browser.tab.id",Se),Zt(t,"browser.window.width",null!==(i=null==f?void 0:f.innerWidth)&&void 0!==i?i:$),Zt(t,"browser.window.height",null!==(o=null==f?void 0:f.innerHeight)&&void 0!==o?o:$);var s=null==v||null===(a=v.connection)||void 0===a?void 0:a.effectiveType;s&&Zt(t,"network.connection.subtype",s)}var Ie,Ne=0,Le=0,Ce={},Re=!1;function _e(){Re=!0}function xe(t,e){t&&ke("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function ke(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(Ne>100)&&!function(t){return!t||ot(it.ignoreErrorMessages,t)}(e)){Le>=20&&(Ce={},Le=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==f?void 0:f.location.href),a=Ce[o];if(a)a.seenCount++;else{var u=[];Oe(u),Zt(u,Ot,Ft.ERROR),Zt(u,Dt,e),n&&Zt(u,jt,n),r&&Zt(u,Ut,r),null!=i&&i.componentStack&&Zt(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),Yt(u,null==i?void 0:i.attributes),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:M(),attributes:u,severityNumber:Vt.ERROR,severityText:"ERROR",body:{stringValue:e}}},Ce[o]=a,Le++}!function(){if(Ie)return;Ie=setTimeout(Pe,1e3)}()}}function Pe(){for(var t in Ie&&(clearTimeout(Ie),Ie=null),Ce)if(l(Ce,t)){var e=Ce[t];e.seenCount>e.transmittedCount&&(gt(e.log),Ne++)}Ce={},Le=0}var De=-1,je=function(t){addEventListener("pageshow",(function(e){e.persisted&&(De=e.timeStamp,t(e))}),!0)},Ue=function(t,e,n,r){var i,o;return function(a){e.value>=0&&(a||r)&&(((o=e.value-(null!=i?i:0))||void 0===i)&&(i=e.value,e.delta=o,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,n),t(e)))}},Me=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Fe=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},Ve=function(){var t,e=Fe();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},Be=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Fe(),r="navigate";return De>=0?r="back-forward-cache":n&&(document.prerendering||Ve()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:"v5-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},He=new WeakMap;function We(t,e){return He.get(t)||He.set(t,new e),He.get(t)}var qe,ze=function(){return N((function t(){I(this,t),C(this,"t",void 0),C(this,"i",0),C(this,"o",[])}),[{key:"h",value:function(t){var e;if(!t.hadRecentInput){var n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),null===(e=this.t)||void 0===e||e.call(this,t)}}}])}(),Ge=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?R(Object(n),!0).forEach((function(e){C(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:t,buffered:!0},n)),r}}catch(t){}},Ke=function(t){var e=!1;return function(){e||(t(),e=!0)}},Ze=-1,Ye=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Xe=function(t){"hidden"===document.visibilityState&&Ze>-1&&(Ze="visibilitychange"===t.type?t.timeStamp:0,$e())},Qe=function(){addEventListener("visibilitychange",Xe,!0),addEventListener("prerenderingchange",Xe,!0)},$e=function(){removeEventListener("visibilitychange",Xe,!0),removeEventListener("prerenderingchange",Xe,!0)},Je=function(){if(Ze<0){var t,e=Ve(),n=document.prerendering||null===(t=globalThis.performance.getEntriesByType("visibility-state").filter((function(t){return"hidden"===t.name&&t.startTime>e}))[0])||void 0===t?void 0:t.startTime;Ze=null!=n?n:Ye(),Qe(),je((function(){setTimeout((function(){Ze=Ye(),Qe()}))}))}return{get firstHiddenTime(){return Ze}}},tn=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},en=[1800,3e3],nn=[.1,.25],rn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};tn((function(){var n,r=Je(),i=Be("FCP"),o=Ge("paint",(function(t){var e,a=L(t);try{for(a.s();!(e=a.n()).done;){var u=e.value;"first-contentful-paint"===u.name&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-Ve(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=Ue(t,i,en,e.reportAllChanges),je((function(r){i=Be("FCP"),n=Ue(t,i,en,e.reportAllChanges),Me((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(Ke((function(){var n,r=Be("CLS",0),i=We(e,ze),o=function(t){var e,o=L(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;i.h(a)}}catch(t){o.e(t)}finally{o.f()}i.i>r.value&&(r.value=i.i,r.entries=i.o,n())},a=Ge("layout-shift",o);a&&(n=Ue(t,r,nn,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),je((function(){i.i=0,r=Be("CLS",0),n=Ue(t,r,nn,e.reportAllChanges),Me((function(){return n()}))})),setTimeout(n))})))},on=0,an=1/0,un=0,sn=function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(an=Math.min(an,r.interactionId),un=Math.max(un,r.interactionId),on=un?(un-an)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},cn=function(){var t;return qe?on:null!==(t=performance.interactionCount)&&void 0!==t?t:0},ln=0,fn=function(){return N((function t(){I(this,t),C(this,"u",[]),C(this,"l",new Map),C(this,"m",void 0),C(this,"v",void 0)}),[{key:"p",value:function(){ln=cn(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((cn()-ln)/50));return this.u[t]}},{key:"h",value:function(t){var e;if(null!==(e=this.m)&&void 0!==e&&e.call(this,t),t.interactionId||"first-input"===t.entryType){var n=this.u.at(-1),r=this.l.get(t.interactionId);if(r||this.u.length<10||t.duration>n.T){var i;if(r?t.duration>r.T?(r.entries=[t],r.T=t.duration):t.duration===r.T&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],T:t.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((function(t,e){return e.T-t.T})),this.u.length>10){var o,a=L(this.u.splice(10));try{for(a.s();!(o=a.n()).done;){var u=o.value;this.l.delete(u.id)}}catch(t){a.e(t)}finally{a.f()}}null===(i=this.v)||void 0===i||i.call(this,r)}}}}])}(),dn=function(t){var e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=Ke(t),document.addEventListener("visibilitychange",t,{once:!0}),e((function(){t(),document.removeEventListener("visibilitychange",t)})))},vn=[200,500],pn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&tn((function(){var n;"interactionCount"in performance||qe||(qe=Ge("event",sn,{type:"event",buffered:!0,durationThreshold:0}));var r,i=Be("INP"),o=We(e,fn),a=function(t){dn((function(){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;o.h(a)}}catch(t){n.e(t)}finally{n.f()}var u=o.P();u&&u.T!==i.value&&(i.value=u.T,i.entries=u.entries,r())}))},u=Ge("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Ue(t,i,vn,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),je((function(){o.p(),i=Be("INP"),r=Ue(t,i,vn,e.reportAllChanges)})))}))},hn=function(){return N((function t(){I(this,t),C(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),mn=[2500,4e3];function yn(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};tn((function(){var n,r=Je(),i=Be("LCP"),o=We(e,hn),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=L(t);try{for(u.s();!(a=u.n()).done;){var s=a.value;o.h(s),s.startTime<r.firstHiddenTime&&(i.value=Math.max(s.startTime-Ve(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=Ge("largest-contentful-paint",a);if(u){n=Ue(t,i,mn,e.reportAllChanges);for(var s=Ke((function(){a(u.takeRecords()),u.disconnect(),n(!0)})),c=0,l=["keydown","click","visibilitychange"];c<l.length;c++)addEventListener(l[c],(function(){return dn(s)}),{capture:!0,once:!0});je((function(r){i=Be("LCP"),n=Ue(t,i,mn,e.reportAllChanges),Me((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}(gn,{reportAllChanges:!0}),pn(gn,{reportAllChanges:!0}),rn(gn,{reportAllChanges:!0})}function gn(t){var e=[];Zt(e,Ot,Ft.WEB_VITAL);var n=[];Zt(n,"name",t.name),Zt(n,"value",J(t.value)),Zt(n,"delta",J(t.delta));var r={timeUnixNano:M(),attributes:e,severityNumber:Vt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Oe(r.attributes),gt(r)}var bn="Unhandled promise rejection: ",Tn="<unavailable because Promise wasn't rejected with an Error object>";function En(t){null==t.reason?xe({message:bn+"<no reason defined>",stack:Tn}):"string"==typeof t.reason.message?xe({message:bn+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:Tn}):"object"!==D(t.reason)&&xe({message:bn+t.reason,stack:Tn})}var wn="__dash0OriginalFunctions";function Sn(t,e){for(var n=t[wn],r=0;r<n.length;r++){if(An(n[r].valuesForEqualityCheck,e))return r}return-1}function An(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function On(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[wn]=t[wn]||[],i=Sn(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,In(n,r,i))}function In(t,e,n){return[t,e,Nn(n)]}function Nn(t){return null!=t&&("object"===D(t)?Boolean(t.capture):Boolean(t))}function Ln(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[wn];if(null==r)return n;var i=Sn(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,In(e,n,r),i)}function Cn(){it.wrapEventHandlers&&function(t){if(!t||"function"!=typeof t.prototype.addEventListener||"function"!=typeof t.prototype.removeEventListener)return;var e=t.prototype.addEventListener,n=t.prototype.removeEventListener;t.prototype.addEventListener=function(t,n,r){if("function"!=typeof n)return e.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=function(){try{return n.apply(this,arguments)}catch(t){throw xe(t),_e(),t}},i[1]=On(this,i[1],t,n,r),e.apply(this,i)},t.prototype.removeEventListener=function(t,e,r){if("function"!=typeof e)return n.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=Ln(this,t,e,r,e),n.apply(this,i)}}(null==f?void 0:f.EventTarget)}function Rn(t){var e=null==f?void 0:f[t];"function"==typeof e&&(f[t]=function(t){for(var n=new Array(arguments.length),r=0;r<arguments.length;r++)n[r]=arguments[r];return n[0]=function(t){if("function"!=typeof t)return t;return function(){try{return t.apply(this,arguments)}catch(t){throw reportError(t),_e(),t}}}(t),e.apply(this,n)})}function _n(){!function(){if(f){var t=f.onerror;f.onerror=function(e,n,r,i,o){if(Re)return Re=!1,"function"==typeof t?t.apply(this,arguments):void 0;var a=o&&o.stack;return a||(a="at "+n+" "+r,null!=i&&(a+=":"+i)),ke({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==f?void 0:f.addEventListener)&&f.addEventListener("unhandledrejection",En),Cn(),function(){if(it.wrapTimers){if(H)return void o("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");Rn("setTimeout"),Rn("setInterval")}}()}var xn=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function kn(t){return xn.includes(t)}function Pn(t,e){var n=0!==e.startTime;Dn(t,Z.FETCH_START,e,n),Dn(t,Z.DOMAIN_LOOKUP_START,e,n),Dn(t,Z.DOMAIN_LOOKUP_END,e,n),Dn(t,Z.CONNECT_START,e,n),Dn(t,Z.SECURE_CONNECTION_START,e,n),Dn(t,Z.CONNECT_END,e,n),Dn(t,Z.REQUEST_START,e,n),Dn(t,Z.RESPONSE_START,e,n),Dn(t,Z.RESPONSE_END,e,n)}function Dn(t,e,n){var r,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];!(e in n)||"number"!=typeof n[e]||i&&0===n[e]||be(t,e,(r=n[e],String(Math.round(1e6*(r+V())))))}function jn(t,e){var n=e.encodedBodySize;null!=n&&Zt(t.attributes,"http.response.body.size",n)}function Un(t){return function(){var e=O(_().mark((function e(n,r){var i,o,a,s,c,l,f,d,v,p,h,m,y,g,b;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r?Object.assign({},r):r,s=null,null!==(i=a)&&void 0!==i&&i.body&&(s=a.body,a.body=void 0),c=new Request(n,a),s&&a&&(a.body=s),!ut(l=c.url)){e.next=9;break}return u("Not creating span for fetch call because the url is ignored, URL: ".concat(l)),e.abrupt("return",t(n instanceof Request?c:n,r));case 9:return f=null!==(o=c.method)&&void 0!==o?o:"GET",d=kn(f),v=kn(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",Oe((h=ye("HTTP ".concat(p))).attributes),Te(h.attributes,l),Mn(n,r),Zt(h.attributes,"http.request.method",p),d||Zt(h.attributes,"http.request.method_original",f),m=Wn(l),m.length>0&&(null!==(y=a)&&void 0!==y&&y.headers?(a.headers=new Headers(a.headers),qn(a.headers.append,a.headers,h,m)):n instanceof Request?qn(c.headers.append,c.headers,h,m):(a||(a={}),a.headers=new Headers,qn(a.headers.append,a.headers,h,m))),Fn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(g=X({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===tt(l).href},maxWaitForResourceMillis:it.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:it.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(Pn(h,n),jn(h,n)),bt(ge(h,void 0,1e6*e))}})).start(),e.prev=25,e.next=28,t(n instanceof Request?c:n,a);case 28:return b=e.sent,Vn(h,b),e.abrupt("return",Bn(b,it.maxToleranceForResourceTimingsMillis,(function(){return g.end()}),(function(t){g.cancel(),Hn(h,t)})));case 33:throw e.prev=33,e.t0=e.catch(25),g.cancel(),Hn(h,e.t0),e.t0;case 38:case"end":return e.stop()}}),e,null,[[25,33]])})));return function(t,n){return e.apply(this,arguments)}}()}function Mn(t,e,n){try{return void 0}catch(n){u("failed to analyze request for GraphQL insights",n,t,e)}}function Fn(t,e,n){try{if(!it.headersToCapture.length)return;t.forEach((function(t,r){it.headersToCapture.some((function(t){return t.test(r)}))&&Zt(e.attributes,n(r),t)}))}catch(t){u("unable to capture http headers due to CORS policy")}}function Vn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2),0===n&&Zt(t.attributes,"error.type",e.type),Zt(t.attributes,"http.response.status_code",String(n)),Fn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function Bn(t,e,n,r){var i,o,a=h.now(),u=t.body;if(!(u&&(i=t,o=i.status,o>=200&&204!=o&&205!=o&&304!=o)))return n(),t;var s=!1,c=function(t){s||(n(t),s=!0)},l=function(t){s||(r(t),s=!0)},f=W((function(){return c(a)}),e),d=u.getReader(),v=new ReadableStream({pull:function(t){return O(_().mark((function n(){var r,i;return _().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,q(f),n.next=4,d.read();case 4:r=n.sent,i=r.value,r.done?(d.releaseLock(),t.close(),c()):(a=h.now(),f=W((function(){return c(a)}),e),t.enqueue(i)),n.next=15;break;case 10:n.prev=10,n.t0=n.catch(0),l(n.t0),t.error(n.t0);try{d.releaseLock()}catch(t){}case 15:case"end":return n.stop()}}),n,null,[[0,10]])})))()},cancel:function(t){return q(f),c(),d.cancel(t)}});return new Response(v,{status:t.status,statusText:t.statusText,headers:t.headers})}function Hn(t,e){!function(t,e){var n=[];"string"==typeof e?Zt(n,Dt,e):e&&(e.code?Zt(n,jt,e.code.toString()):e.name&&Zt(n,jt,e.name),e.message&&Zt(n,Dt,e.message),e.stack&&Zt(n,Ut,e.stack),be(t,"exception",n))}(t,e),bt(ge(t,function(t){return{code:2,message:t&&"object"===D(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function Wn(t){var e=[];if(et(t)){if(e.push("traceparent"),it.propagators){var n,r=L(it.propagators);try{for(r.s();!(n=r.n()).done;){var i=n.value;"traceparent"===i.type||e.includes(i.type)||e.push(i.type)}}catch(t){r.e(t)}finally{r.f()}}return e}if(it.propagators){var o,a=L(it.propagators);try{for(a.s();!(o=a.n()).done;){var u=o.value;ot(u.match,t)&&(e.includes(u.type)||e.push(u.type))}}catch(t){a.e(t)}finally{a.f()}return e}return[]}function qn(t,e,n,r){var i,o=L(r);try{for(o.s();!(i=o.n()).done;){"xray"===i.value?ee(t,e,n):te(t,e,n)}}catch(t){o.e(t)}finally{o.f()}}function zn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=it.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];Zt(u,Ot,Ft.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=x(t,2),n=e[0],r=e[1];return Zt(u,n,r)})),Oe(u,{url:e});var s=[];Zt(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==d?void 0:d.title)&&void 0!==i?i:$),null!=d&&d.referrer&&Zt(s,"referrer",d.referrer),Zt(s,"type",n?Ht:Bt),Zt(s,"change_state",r?qt:Wt);var c={timeUnixNano:t,attributes:u,severityNumber:Vt.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},l=Jt();l&&(c.traceId=l.traceId,c.spanId=l.spanId),gt(c)}function Gn(){var t=null==f?void 0:f.performance.getEntriesByType("navigation")[0];if(t){var e=[];Zt(e,Ot,Ft.NAVIGATION_TIMING);var n=[];Zt(n,"name",t.name),Kn(n,t,"responseStatus"),Kn(n,t,"fetchStart"),Kn(n,t,"requestStart"),Kn(n,t,"responseStart"),Kn(n,t,"domInteractive"),Kn(n,t,"domContentLoadedEventEnd"),Kn(n,t,"domComplete"),Kn(n,t,"loadEventEnd"),Kn(n,t,"transferSize"),Kn(n,t,"encodedBodySize"),Kn(n,t,"decodedBodySize");var r={timeUnixNano:Zn(),attributes:e,severityNumber:Vt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Oe(r.attributes);var i=Jt();i&&(r.traceId=i.traceId,r.spanId=i.spanId),gt(r)}else u("Navigation timings not available. Cannot emit navigation timing log")}function Kn(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||Zt(t,n,Number.isInteger(r)?r:J(r))}function Zn(){return F(Math.round(V()))}var Yn={},Xn=!1,Qn=!1;function $n(){tr(null==f?void 0:f.location.href)}function Jn(t){tr(t.newURL)}function tr(t,e){var n;if(t)try{var r=new URL(t,null==f?void 0:f.location.href);((n=r).pathname!==Yn.path||Qn&&n.search!==Yn.search||Xn&&n.hash!==Yn.hash)&&(er(r),zn(M(),r,!0,Boolean(e)))}catch(t){u("Failed to handle url change",t)}}function er(t){Yn.path=t.pathname,Yn.search=t.search,Yn.hash=t.hash}function nr(){!function(){try{zn(Zn(),null!=f&&f.location.href?new URL(null==f?void 0:f.location.href):void 0)}catch(t){a("Failed to transmit initial page view event",t)}if("complete"===(null==d?void 0:d.readyState))return Gn();f&&E(f,"load",(function(){setTimeout(Gn,0)}))}(),function(){var t,e,n,r;if(f&&f.history){if(it.pageViewInstrumentation.trackVirtualPageViews){Qn=null!==(t=null===(e=it.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,Xn=null!==(n=null===(r=it.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,rt(f.history,"replaceState",(function(t){return function(e,n,r){return tr(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),rt(f.history,"pushState",(function(t){return function(e,n,r){return tr(r?String(r):void 0),t.apply(this,[e,n,r])}})),f.addEventListener("hashchange",Jn),f.addEventListener("popstate",$n);try{er(new URL(f.location.href))}catch(t){}}}else u("Browser does not support history API, skipping instrumentation")}()}var rr=function(t){if("object"===D(t)&&null!==t){if("function"==typeof Object.getPrototypeOf){var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1},ir=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce((function(t,e){if(void 0===e)return t;if(Array.isArray(e))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(e).forEach((function(n){["__proto__","constructor","prototype"].includes(n)||(Array.isArray(t[n])&&Array.isArray(e[n])?t[n]=ir.options.mergeArrays?ir.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(k(t[n]),k(e[n])):e[n]:rr(t[n])&&rr(e[n])?t[n]=ir(t[n],e[n]):!rr(t[n])&&rr(e[n])?t[n]=ir(e[n],void 0):t[n]=void 0===e[n]?ir.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},or={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};ir.options=or,ir.withOptions=function(t){ir.options=Object.assign(Object.assign({},or),t);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=ir.apply(void 0,n);return ir.options=or,i};var ar=!1;function ur(t,e){var n=e.enabledInstrumentations;return!n||n.includes(t)}var sr={init:function(t){if(ar)u("Dash0 SDK is being reinitialized, skipping ...");else if(null!=f)if("function"==typeof m&&h&&h.getEntriesByType){var e;if(!t.serviceName.trim())u("Missing or empty serviceName value. Falling back to location.hostname."),t.serviceName=null!==(e=null==p?void 0:p.hostname)&&void 0!==e?e:"unknown";it.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==it.endpoints.length?(Object.assign(it,ir(it,function(t,e){var n,r={},i=L(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;o in t&&(r[o]=t[o])}}catch(t){i.e(t)}finally{i.f()}return r}(t,["ignoreUrls","ignoreErrorMessages","wrapEventHandlers","wrapTimers","propagateTraceHeadersCorsURLs","maxWaitForResourceTimingsMillis","maxToleranceForResourceTimingsMillis","headersToCapture","urlAttributeScrubber","pageViewInstrumentation","enableTransportCompression"]))),function(t){t.propagators?(t.propagateTraceHeadersCorsURLs&&o("Both 'propagators' and deprecated 'propagateTraceHeadersCorsURLs' were provided. Using 'propagators' configuration. Please migrate to the new 'propagators' config."),it.propagators=t.propagators):t.propagateTraceHeadersCorsURLs&&t.propagateTraceHeadersCorsURLs.length>0?(o("'propagateTraceHeadersCorsURLs' is deprecated. Please use the new 'propagators' configuration."),it.propagators=[{type:"traceparent",match:k(t.propagateTraceHeadersCorsURLs)}]):it.propagators=[{type:"traceparent",match:[]}]}(t),function(t){Zt(it.resource.attributes,Tt,t.serviceName),t.serviceVersion&&Zt(it.resource.attributes,Et,t.serviceVersion);var e=function(t){if(t.environment)return t.environment;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_ENV}catch(t){return}}(t);e&&Zt(it.resource.attributes,wt,e);var n=function(t){if(t.deploymentName)return t.deploymentName;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_TARGET_ENV}catch(t){return}}(t);n&&Zt(it.resource.attributes,St,n);var r=function(t){if(t.deploymentId)return t.deploymentId;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_BRANCH_URL}catch(t){return}}(t);r&&Zt(it.resource.attributes,At,r)}(t),function(t){var e;Zt(it.signalAttributes,Nt,T(16)),Zt(it.signalAttributes,Lt,null!==(e=null==v?void 0:v.userAgent)&&void 0!==e?e:$),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=x(t,2),n=e[0],r=e[1];Zt(it.signalAttributes,n,r)}))}(t),Ae(),se(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),ur("@dash0/navigation",t)&&nr(),ur("@dash0/web-vitals",t)&&yn(),ur("@dash0/error",t)&&_n(),ur("@dash0/fetch",t)&&(f&&f.fetch&&f.Request?rt(f,"fetch",Un):u("Browser does not support the Fetch API, skipping instrumentation")),ar=!0):o("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")}else u("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs.");else u("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")},debug:function(){u("Dash0 Web SDK configuration state:",it)},identify:function(t,e){Xt(it.signalAttributes,Ct),null!=t&&Zt(it.signalAttributes,Ct,t),Xt(it.signalAttributes,Rt),null!=(null==e?void 0:e.name)&&Zt(it.signalAttributes,Rt,e.name),Xt(it.signalAttributes,_t),null!=(null==e?void 0:e.fullName)&&Zt(it.signalAttributes,_t,e.fullName),Xt(it.signalAttributes,xt),null!=(null==e?void 0:e.email)&&Zt(it.signalAttributes,xt,e.email),Xt(it.signalAttributes,kt),null!=(null==e?void 0:e.hash)&&Zt(it.signalAttributes,kt,e.hash),Xt(it.signalAttributes,Pt),null!=(null==e?void 0:e.roles)&&Zt(it.signalAttributes,Pt,e.roles)},terminateSession:function(){if(w)try{!function(t){w&&y&&y.removeItem(t)}(ie)}catch(t){i("Failed to terminate session",t)}},reportError:function(t,e){xe(t,e)},addSignalAttribute:function(t,e){Zt(it.signalAttributes,t,e)},removeSignalAttribute:function(t){Xt(it.signalAttributes,t)},setActiveLogLevel:function(t){var e;r=null!==(e=n[t])&&void 0!==e?e:n.warn},sendEvent:function(t,e){if(Object.values(Ft).includes(t))o("Unable to send custom event ".concat(t,". You are not allowed to use an internal event name while sending a custom event. Dropping event..."));else{var n=[];Oe(n),Zt(n,Ot,t),null!=e&&e.title&&Zt(n,"dash0.web.event.title",e.title),Yt(n,null==e?void 0:e.attributes),gt({timeUnixNano:null!=(null==e?void 0:e.timestamp)?F(e.timestamp):M(),attributes:n,body:Gt(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?Vt[e.severity]:void 0})}}};function cr(t){var e=t[0],n=sr[e];if(n){for(var r=[],i=1;i<t.length;i++)r.push(t[i]);n.apply(null,r)}else o("Unsupported Dash0 Web SDK api: ",t[0])}!function(){u("".concat("Initializing Dash0 Web SDK"," (via Script)"));var t=f.dash0;if(!t)return void o("global 'dash0' not found. Did you use the correct Dash0 Web SDK initializer?");if(!t._q)return void o("Dash0 Web SDK command queue not defined. Did you add the script tag multiple times to your website?");(function(t){for(var e=0,n=t.length;e<n;e++)cr(t[e])})(t._q),f.dash0=function(){return cr(arguments)}}()}();
2
2
  //# sourceMappingURL=dash0.iife.js.map
package/dist/dash0.js CHANGED
@@ -1,2 +1,2 @@
1
- function t(){}function e(t){return t}var n={debug:0,info:1,warn:2,error:3},r=n.warn;function i(t){var e;r=null!==(e=n[t])&&void 0!==e?e:n.warn}var o=c("info"),a=c("warn"),u=c("error"),s=c("debug");function c(e){if("undefined"!=typeof console&&console[e]&&"function"==typeof console[e].apply){var i=n[e];return function(){i>=r&&console[e].apply(console,arguments)}}return t}var l=Object.prototype.hasOwnProperty;function f(t,e){return l.call(t,e)}var d="undefined"!=typeof window?window:void 0,v=null==d?void 0:d.document,p=null==d?void 0:d.navigator,h="undefined"!=typeof location?location:void 0,m=(null==d?void 0:d.performance)||(null==d?void 0:d.webkitPerformance)||(null==d?void 0:d.msPerformance)||(null==d?void 0:d.mozPerformance);null==d||d.encodeURIComponent;var y=null==d?void 0:d.fetch,g=function(){try{var t;return null!==(t=null==d?void 0:d.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),b=function(){try{var t;return null!==(t=null==d?void 0:d.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),T=Array(32);function E(t){for(var e=0;e<2*t;e++)T[e]=Math.floor(16*Math.random())+48,T[e]>=58&&(T[e]+=39);return String.fromCharCode.apply(null,T.slice(0,2*t))}function w(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var S=null!=g&&"function"==typeof g.getItem&&"function"==typeof g.setItem;function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function O(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function I(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){O(o,r,i,a,u,"next",t)}function u(t){O(o,r,i,a,u,"throw",t)}a(void 0)}))}}function N(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,j(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function L(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=U(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function R(t,e,n){return(e=j(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function x(){x=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),u=new R(r||[]);return i(a,"_invoke",{value:I(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",v="suspendedYield",p="executing",h="completed",m={};function y(){}function g(){}function b(){}var T={};c(T,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(_([])));w&&w!==n&&r.call(w,a)&&(T=w);var S=b.prototype=y.prototype=Object.create(T);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,u){var s=f(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function I(e,n,r){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===h){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?h:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=h,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function _(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},A(O.prototype),c(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=_,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:_(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e);else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||U(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||U(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function U(t,e){if(t){if("string"==typeof t)return A(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}function M(){return(new Date).getTime()}function F(){var t=B();return t?String(1e6*(m.now()+t)):V(new Date)}function V(t){return"object"===D(t)?V(t.getTime()):String(t)+"000000"}function B(){var t,e=null==m?void 0:m.timeOrigin;"number"!=typeof e&&(e=null==m||null===(t=m.timing)||void 0===t?void 0:t.fetchStart);return e}var H={setTimeout:null==d?void 0:d.setTimeout,clearTimeout:null==d?void 0:d.clearTimeout,setInterval:null==d?void 0:d.setInterval,clearInterval:null==d?void 0:d.clearInterval},W=null!=d&&null!=d.Zone&&null!=d.Zone.root&&"function"==typeof d.Zone.root.run;function q(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("setTimeout",arguments)}function z(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("clearTimeout",arguments)}function G(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("setInterval",arguments)}function K(){var t,e=this;if(W)try{var n=Array.prototype.slice.apply(arguments);return d.Zone.root.run(H[e],d,n)}catch(t){a("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=H[e])||void 0===t?void 0:t.apply(d,arguments)}W&&s("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");m&&m.getEntriesByType;var Z=m&&"function"==typeof d.PerformanceObserver&&"function"==typeof m.now,Y=Object.freeze({CONNECT_END:"connectEnd",CONNECT_START:"connectStart",DECODED_BODY_SIZE:"decodedBodySize",DOM_COMPLETE:"domComplete",DOM_CONTENT_LOADED_EVENT_END:"domContentLoadedEventEnd",DOM_CONTENT_LOADED_EVENT_START:"domContentLoadedEventStart",DOM_INTERACTIVE:"domInteractive",DOMAIN_LOOKUP_END:"domainLookupEnd",DOMAIN_LOOKUP_START:"domainLookupStart",ENCODED_BODY_SIZE:"encodedBodySize",FETCH_START:"fetchStart",LOAD_EVENT_END:"loadEventEnd",LOAD_EVENT_START:"loadEventStart",NAVIGATION_START:"navigationStart",REDIRECT_END:"redirectEnd",REDIRECT_START:"redirectStart",REQUEST_START:"requestStart",RESPONSE_END:"responseEnd",RESPONSE_START:"responseStart",SECURE_CONNECTION_START:"secureConnectionStart",START_TIME:"startTime",UNLOAD_EVENT_END:"unloadEventEnd",UNLOAD_EVENT_START:"unloadEventStart"}),X=new WeakSet;function Q(e){if(!Z)return function(e){var n=0;return{start:function(){n=M()},end:function(){return e({duration:M()-n})},cancel:t}}(e.onEnd);var n,r,i,o,a,u=[];return{start:function(){n=m.now();try{var t,e=null==d?void 0:d.PerformanceObserver;if(e)null===(t=i=new e(c))||void 0===t||t.observe({type:"resource"})}catch(t){}a=q(f,6e5)},end:function(t){if(r)return;if(r=null!=t?t:m.now(),p(),!$())return s();q((function(){return s()}),Math.min(300,e.maxWaitForResourceMillis)),w(v,"visibilitychange",l),o=q(s,e.maxWaitForResourceMillis)},cancel:f};function s(){f();var t=function(){if(!u.length)return;var t,i,o=u.filter((function(t){return t.responseEnd<=r+e.maxToleranceForResourceTimingsMillis&&!X.has(t)}));if(!o.length)return;1===o.length&&(t=o[0]);if(!t){var a,s=L(o);try{for(s.s();!(a=s.n()).done;){var c=a.value,l=Math.abs(r-n-c.duration)+Math.abs(c.responseEnd-r);(void 0===i||l<i)&&(i=l,t=c)}}catch(t){s.e(t)}finally{s.f()}}if(!t)return;return X.add(t),t}();null!=t&&t.duration&&t.duration<864e5?e.onEnd({resource:t,duration:t.duration}):e.onEnd({resource:t,duration:r-n})}function c(t){t.getEntriesByType("resource").filter((function(t){var r=t;return r.startTime>=n&&e.resourceMatcher(r)})).forEach((function(t){u.length>=100&&u.shift(),u.push(t)}))}function l(){$()||s()}function f(){!function(){if(i){try{var t;null===(t=i)||void 0===t||t.disconnect()}catch(t){}i=void 0}}(),o&&(clearTimeout(o),o=void 0),p(),function(){if(!v)return;t=v,e="visibilitychange",n=l,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function p(){a&&(clearTimeout(a),a=void 0)}}function $(){return"visible"===(null==v?void 0:v.visibilityState)||"prerender"===(null==v?void 0:v.visibilityState)}var J="undefined";function tt(t){return Math.round(100*t)/100}function et(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==v?void 0:v.baseURI)&&void 0!==e?e:null==h?void 0:h.href)}function nt(t){try{return et(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var rt=Symbol.for("INSTRUMENTED_BY_DASH0");function it(t,e,n){var r=t[e];r?!0!==r[rt]?(!function(t){t[rt]=!0}(r),t[e]=n(r)):s("".concat(String(e)," has already been instrumented, skipping")):s("".concat(String(e)," is not defined, unable to instrument"))}var ot={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.18.1",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:50,headersToCapture:[],urlAttributeScrubber:e,pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]},enableTransportCompression:!1},at="service.name",ut="service.version",st="deployment.environment.name",ct="deployment.name",lt="deployment.id",ft="event.name",dt="dash0.web.event.id",vt="page.load.id",pt="user_agent.original",ht="user.id",mt="user.name",yt="user.full_name",gt="user.email",bt="user.hash",Tt="user.roles",Et="exception.message",wt="exception.type",St="exception.stacktrace",At="url.full",Ot={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},It={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},Nt=0,Ct=1,Lt="pushState",Rt="replaceState",_t=1;function xt(){var t,e;return"".concat((t={ephemeralSession:!S},e=0,t.ephemeralSession&&(e|=_t),e.toString(16).padStart(2,"0"))).concat(E(7))}var kt="d0_session",Pt="#",jt=864e5,Dt=null;function Ut(t,e){if(!S)return s("Storage API is not available and session tracking is therefore not supported."),void(Dt=xt());t||(t=108e5),e||(e=216e5),t=Math.min(t,jt),e=Math.min(e,jt);try{var n=function(t){return S&&g?g.getItem(t):null}(kt),r=function(t){if(!t)return null;var e=t.split(Pt);if(e.length<3)return null;var n=e[0],r=parseInt(e[1],10),i=parseInt(e[2],10);if(!n||isNaN(r)||isNaN(i))return null;return{id:n,startTime:r,lastActivityTime:i}}(n);r&&!function(t,e,n){var r=M()-e;if(t.lastActivityTime<r)return!1;var i=M()-n;return t.startTime>=i}(r,t,e)&&(r=null),r?r.lastActivityTime=M():r={id:xt(),startTime:M(),lastActivityTime:M()},function(t,e){S&&g&&g.setItem(t,e)}(kt,function(t){return t.id+Pt+t.startTime+Pt+t.lastActivityTime}(r)),Dt=r.id}catch(t){a("Failed to record session information",t)}}function Mt(){if(S)try{!function(t){S&&g&&g.removeItem(t)}(kt)}catch(t){o("Failed to terminate session",t)}}var Ft=-1,Vt=function(t){addEventListener("pageshow",(function(e){e.persisted&&(Ft=e.timeStamp,t(e))}),!0)},Bt=function(t,e,n,r){var i,o;return function(a){e.value>=0&&(a||r)&&(((o=e.value-(null!=i?i:0))||void 0===i)&&(i=e.value,e.delta=o,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,n),t(e)))}},Ht=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Wt=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},qt=function(){var t,e=Wt();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},zt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Wt(),r="navigate";return Ft>=0?r="back-forward-cache":n&&(document.prerendering||qt()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:"v5-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Gt=new WeakMap;function Kt(t,e){return Gt.get(t)||Gt.set(t,new e),Gt.get(t)}var Zt,Yt=function(){return C((function t(){N(this,t),R(this,"t",void 0),R(this,"i",0),R(this,"o",[])}),[{key:"h",value:function(t){var e;if(!t.hadRecentInput){var n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),null===(e=this.t)||void 0===e||e.call(this,t)}}}])}(),Xt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach((function(e){R(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:t,buffered:!0},n)),r}}catch(t){}},Qt=function(t){var e=!1;return function(){e||(t(),e=!0)}},$t=-1,Jt=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},te=function(t){"hidden"===document.visibilityState&&$t>-1&&($t="visibilitychange"===t.type?t.timeStamp:0,ne())},ee=function(){addEventListener("visibilitychange",te,!0),addEventListener("prerenderingchange",te,!0)},ne=function(){removeEventListener("visibilitychange",te,!0),removeEventListener("prerenderingchange",te,!0)},re=function(){if($t<0){var t,e=qt(),n=document.prerendering||null===(t=globalThis.performance.getEntriesByType("visibility-state").filter((function(t){return"hidden"===t.name&&t.startTime>e}))[0])||void 0===t?void 0:t.startTime;$t=null!=n?n:Jt(),ee(),Vt((function(){setTimeout((function(){$t=Jt(),ee()}))}))}return{get firstHiddenTime(){return $t}}},ie=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},oe=[1800,3e3],ae=[.1,.25],ue=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ie((function(){var n,r=re(),i=zt("FCP"),o=Xt("paint",(function(t){var e,a=L(t);try{for(a.s();!(e=a.n()).done;){var u=e.value;"first-contentful-paint"===u.name&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-qt(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=Bt(t,i,oe,e.reportAllChanges),Vt((function(r){i=zt("FCP"),n=Bt(t,i,oe,e.reportAllChanges),Ht((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(Qt((function(){var n,r=zt("CLS",0),i=Kt(e,Yt),o=function(t){var e,o=L(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;i.h(a)}}catch(t){o.e(t)}finally{o.f()}i.i>r.value&&(r.value=i.i,r.entries=i.o,n())},a=Xt("layout-shift",o);a&&(n=Bt(t,r,ae,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),Vt((function(){i.i=0,r=zt("CLS",0),n=Bt(t,r,ae,e.reportAllChanges),Ht((function(){return n()}))})),setTimeout(n))})))},se=0,ce=1/0,le=0,fe=function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(ce=Math.min(ce,r.interactionId),le=Math.max(le,r.interactionId),se=le?(le-ce)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},de=function(){var t;return Zt?se:null!==(t=performance.interactionCount)&&void 0!==t?t:0},ve=0,pe=function(){return C((function t(){N(this,t),R(this,"u",[]),R(this,"l",new Map),R(this,"m",void 0),R(this,"v",void 0)}),[{key:"p",value:function(){ve=de(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((de()-ve)/50));return this.u[t]}},{key:"h",value:function(t){var e;if(null!==(e=this.m)&&void 0!==e&&e.call(this,t),t.interactionId||"first-input"===t.entryType){var n=this.u.at(-1),r=this.l.get(t.interactionId);if(r||this.u.length<10||t.duration>n.T){var i;if(r?t.duration>r.T?(r.entries=[t],r.T=t.duration):t.duration===r.T&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],T:t.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((function(t,e){return e.T-t.T})),this.u.length>10){var o,a=L(this.u.splice(10));try{for(a.s();!(o=a.n()).done;){var u=o.value;this.l.delete(u.id)}}catch(t){a.e(t)}finally{a.f()}}null===(i=this.v)||void 0===i||i.call(this,r)}}}}])}(),he=function(t){var e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=Qt(t),document.addEventListener("visibilitychange",t,{once:!0}),e((function(){t(),document.removeEventListener("visibilitychange",t)})))},me=[200,500],ye=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&ie((function(){var n;"interactionCount"in performance||Zt||(Zt=Xt("event",fe,{type:"event",buffered:!0,durationThreshold:0}));var r,i=zt("INP"),o=Kt(e,pe),a=function(t){he((function(){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;o.h(a)}}catch(t){n.e(t)}finally{n.f()}var u=o.P();u&&u.T!==i.value&&(i.value=u.T,i.entries=u.entries,r())}))},u=Xt("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Bt(t,i,me,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),Vt((function(){o.p(),i=zt("INP"),r=Bt(t,i,me,e.reportAllChanges)})))}))},ge=function(){return C((function t(){N(this,t),R(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),be=[2500,4e3],Te=!1;function Ee(t){var e,n,r=[];return n=i,Te&&n(),v&&d&&(w(v,"visibilitychange",(function(){"visible"!==v.visibilityState&&n()})),w(d,"pagehide",(function(){Te=!0,n()})),w(d,"beforeunload",(function(){Te=!0,n()}))),{send:function(n){"visible"===(null==v?void 0:v.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=q(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}function we(t,e){return Se.apply(this,arguments)}function Se(){return Se=I(x().mark((function e(n,r){var i,o,u,c;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s("Transmitting telemetry to endpoints",r),i=JSON.stringify(r),o=i,u=i.length,c=!1,"undefined"==typeof CompressionStream||!ot.enableTransportCompression){e.next=11;break}return e.next=8,Ae(i);case 8:o=e.sent,u=o.byteLength,c=!0;case 11:return e.next=13,Promise.all(ot.endpoints.map(function(){var e=I(x().mark((function e(r){var i,s,l;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(i=new URL(r.url)).pathname=i.pathname+(i.pathname.endsWith("/")?n.substring(1):n),s={"Content-Type":"application/json",Authorization:"Bearer ".concat(r.authToken)},r.dataset&&(s["Dash0-Dataset"]=r.dataset),c&&(s["Content-Encoding"]="gzip"),y){e.next=9;break}return a("Unable to send telemetry, fetch is not defined"),e.abrupt("return");case 9:return e.next=11,y(i,{method:"POST",headers:s,body:o,keepalive:u<=6e4});case 11:(l=e.sent).text().catch(t),l.ok||a("Failed to send telemetry to ".concat(i,": ").concat(l.status," ").concat(l.statusText)),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),a("Error sending telemetry to ".concat(r.url).concat(n,":"),e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}()));case 13:case"end":return e.stop()}}),e)}))),Se.apply(this,arguments)}function Ae(t){return Oe.apply(this,arguments)}function Oe(){return(Oe=I(x().mark((function t(e){var n,r,i;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new Blob([e]),r=n.stream(),i=r.pipeThrough(new CompressionStream("gzip")),t.abrupt("return",new Response(i).arrayBuffer());case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Ie,Ne=Ee((function(t){we("/v1/logs",{resourceLogs:[{resource:ot.resource,scopeLogs:[{scope:ot.scope,logRecords:t}]}]}).catch((function(t){u("Failed to transmit logs",t)}))})),Ce=Ee((function(t){we("/v1/traces",{resourceSpans:[{resource:ot.resource,scopeSpans:[{scope:ot.scope,spans:t}]}]}).catch((function(t){u("Failed to transmit spans",t)}))}));function Le(){var t,e,n,r,i;return Ie||(e=(t={maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCallsPerTenMinutes,n=t.maxCallsPerTenSeconds,r=0,i=0,G((function(){r=0}),6e5),G((function(){i=0}),1e4),Ie=function(){return++r>e||++i>n}),Ie()}function Re(t){Le()?s("Transport rate limit. Will not send item.",t):Ne.send(t)}function _e(t){t&&(Le()?s("Transport rate limit. Will not send item.",t):Ce.send(t))}var xe=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function ke(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return ke(t)}))}:"string"==typeof t?e.stringValue=t:"number"==typeof t?e.doubleValue=t:"boolean"==typeof t?e.boolValue=t:!function(t){if(null==t||"object"!==D(t))return!1;var e=Object.keys(t);return 1===e.length&&xe.includes(e[0])}(t)?"object"===D(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=k(t,2);return Pe(e[0],e[1])}))}):e=t,e}}function Pe(t,e){return{key:t,value:ke(e)}}function je(t,e,n){e&&t.push(Pe(e,n))}function De(t,e){e&&Object.entries(e).forEach((function(e){var n=k(e,2),r=n[0],i=n[1];return je(t,r,i)}))}function Ue(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var Me="traceparent",Fe=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function Ve(){var t,e,n=((null===(t=Array.from(null!==(e=null==v?void 0:v.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===Me})))||void 0===t?void 0:t.content.trim())||"").match(Fe)||function(){var t=m.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===Me)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(Fe);if(n)return{traceId:n[1],spanId:n[2]}}function Be(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}function He(t,e,n){var r,i,o,a=(r=n.traceId,i=r.substring(0,8),o=r.substring(8,32),"1-".concat(i,"-").concat(o)),u="Root=".concat(a,";Parent=").concat(n.spanId,";Sampled=1");t.call(e,"X-Amzn-Trace-Id",u)}var We="d042",qe=1;function ze(t){var e=0;return t.withoutSession&&(e|=qe),e.toString(16).padStart(2,"0")}for(var Ge=new Uint32Array(256),Ke=0;Ke<256;Ke++){for(var Ze=Ke,Ye=0;Ye<8;Ye++)Ze=1&Ze?3988292384^Ze>>>1:Ze>>>1;Ge[Ke]=Ze>>>0}function Xe(t){var e=function(t){for(var e=new Uint8Array(t.length/2),n=0;n<t.length;n+=2)e[n/2]=parseInt(t.substring(n,n+2),16);for(var r=4294967295,i=0;i<e.length;i++){var o=e[i];r=r>>>8^Ge[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(E(4))}function Qe(t){var e=function(t){return t?"".concat(We).concat(ze({withoutSession:!1})).concat(t).concat(E(5)):"".concat(We).concat(ze({withoutSession:!0})).concat(E(13))}(Dt),n=Xe(e),r=[];return je(r,dt,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:F(),attributes:r,events:[],links:[],status:{code:0}}}function $e(t,e,n){var r=t;if(!r.endTimeUnixNano)return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):F(),r;s("Attempting to end already ended span. Dropping...",r)}function Je(t,e,n,r){var i=void 0,o=void 0;"string"==typeof n?i=n:Array.isArray(n)&&(o=n),t.events.push({name:e,timeUnixNano:null!=i?i:F(),attributes:null!=o?o:[]})}function tn(t,n,r){var i=function(t){return t?Array.isArray(t)?function(e){return[].concat(P(t),[e]).join(".")}:function(e){return"".concat(t,".").concat(e)}:function(t){return t}}(r);try{var o=et(n);o.username&&(o.username="REDACTED"),o.password&&(o.password="REDACTED");var a=ot.urlAttributeScrubber(R(R(R(R(R(R({},At,o.href),"url.path",o.pathname),"url.domain",o.hostname),"url.scheme",o.protocol.replace(":","")),"url.fragment",o.hash?o.hash.replace("#",""):void 0),"url.query",o.search?o.search.replace("?",""):void 0));Object.entries(a).forEach((function(e){var n=k(e,2),r=n[0],o=n[1];void 0!==o&&je(t,i(r),o)}))}catch(r){ot.urlAttributeScrubber===e&&je(t,i(At),String(n))}}var en=null!=b&&"function"==typeof b.getItem&&"function"==typeof b.setItem;var nn="d0_tab",rn=null;function on(){if(en)try{var t=function(t){return en&&b?b.getItem(t):null}(nn);if(t)return void(rn=t);rn=E(8),function(t,e){en&&b&&b.setItem(t,e)}(nn,rn)}catch(t){a("Failed to record tab ID information",t)}else s("Storage API is not available and tab tracking is therefore not supported.")}function an(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===dt}))&&je(t,dt,E(8));for(var u=0;u<ot.signalAttributes.length;u++)t.push(ot.signalAttributes[u]);tn(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==d?void 0:d.location.href)&&void 0!==n?n:J,"page"),Dt&&je(t,"session.id",Dt),rn&&je(t,"browser.tab.id",rn),je(t,"browser.window.width",null!==(i=null==d?void 0:d.innerWidth)&&void 0!==i?i:J),je(t,"browser.window.height",null!==(o=null==d?void 0:d.innerHeight)&&void 0!==o?o:J);var s=null==p||null===(a=p.connection)||void 0===a?void 0:a.effectiveType;s&&je(t,"network.connection.subtype",s)}function un(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ie((function(){var n,r=re(),i=zt("LCP"),o=Kt(e,ge),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=L(t);try{for(u.s();!(a=u.n()).done;){var s=a.value;o.h(s),s.startTime<r.firstHiddenTime&&(i.value=Math.max(s.startTime-qt(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=Xt("largest-contentful-paint",a);if(u){n=Bt(t,i,be,e.reportAllChanges);for(var s=Qt((function(){a(u.takeRecords()),u.disconnect(),n(!0)})),c=0,l=["keydown","click","visibilitychange"];c<l.length;c++)addEventListener(l[c],(function(){return he(s)}),{capture:!0,once:!0});Vt((function(r){i=zt("LCP"),n=Bt(t,i,be,e.reportAllChanges),Ht((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}(sn,{reportAllChanges:!0}),ye(sn,{reportAllChanges:!0}),ue(sn,{reportAllChanges:!0})}function sn(t){var e=[];je(e,ft,Ot.WEB_VITAL);var n=[];je(n,"name",t.name),je(n,"value",tt(t.value)),je(n,"delta",tt(t.delta));var r={timeUnixNano:F(),attributes:e,severityNumber:It.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};an(r.attributes),Re(r)}function cn(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var ln="data:";function fn(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===ln||(!!function(t){for(var e=t.toLowerCase(),n=0,r=ot.endpoints.length;n<r;n++){var i=ot.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||cn(ot.ignoreUrls,t))))}var dn,vn=0,pn=0,hn={},mn=!1;function yn(){mn=!0}function gn(t,e){t&&bn("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function bn(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(vn>100)&&!function(t){return!t||cn(ot.ignoreErrorMessages,t)}(e)){pn>=20&&(hn={},pn=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==d?void 0:d.location.href),a=hn[o];if(a)a.seenCount++;else{var u=[];an(u),je(u,ft,Ot.ERROR),je(u,Et,e),n&&je(u,wt,n),r&&je(u,St,r),null!=i&&i.componentStack&&je(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),De(u,null==i?void 0:i.attributes),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:F(),attributes:u,severityNumber:It.ERROR,severityText:"ERROR",body:{stringValue:e}}},hn[o]=a,pn++}!function(){if(dn)return;dn=setTimeout(Tn,1e3)}()}}function Tn(){for(var t in dn&&(clearTimeout(dn),dn=null),hn)if(f(hn,t)){var e=hn[t];e.seenCount>e.transmittedCount&&(Re(e.log),vn++)}hn={},pn=0}var En="Unhandled promise rejection: ",wn="<unavailable because Promise wasn't rejected with an Error object>";function Sn(t){null==t.reason?gn({message:En+"<no reason defined>",stack:wn}):"string"==typeof t.reason.message?gn({message:En+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:wn}):"object"!==D(t.reason)&&gn({message:En+t.reason,stack:wn})}var An="__dash0OriginalFunctions";function On(t,e){for(var n=t[An],r=0;r<n.length;r++){if(In(n[r].valuesForEqualityCheck,e))return r}return-1}function In(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Nn(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[An]=t[An]||[],i=On(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,Cn(n,r,i))}function Cn(t,e,n){return[t,e,Ln(n)]}function Ln(t){return null!=t&&("object"===D(t)?Boolean(t.capture):Boolean(t))}function Rn(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[An];if(null==r)return n;var i=On(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,Cn(e,n,r),i)}function _n(){ot.wrapEventHandlers&&function(t){if(!t||"function"!=typeof t.prototype.addEventListener||"function"!=typeof t.prototype.removeEventListener)return;var e=t.prototype.addEventListener,n=t.prototype.removeEventListener;t.prototype.addEventListener=function(t,n,r){if("function"!=typeof n)return e.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=function(){try{return n.apply(this,arguments)}catch(t){throw gn(t),yn(),t}},i[1]=Nn(this,i[1],t,n,r),e.apply(this,i)},t.prototype.removeEventListener=function(t,e,r){if("function"!=typeof e)return n.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=Rn(this,t,e,r,e),n.apply(this,i)}}(null==d?void 0:d.EventTarget)}function xn(t){var e=null==d?void 0:d[t];"function"==typeof e&&(d[t]=function(t){for(var n=new Array(arguments.length),r=0;r<arguments.length;r++)n[r]=arguments[r];return n[0]=function(t){if("function"!=typeof t)return t;return function(){try{return t.apply(this,arguments)}catch(t){throw reportError(t),yn(),t}}}(t),e.apply(this,n)})}function kn(){!function(){if(d){var t=d.onerror;d.onerror=function(e,n,r,i,o){if(mn)return mn=!1,"function"==typeof t?t.apply(this,arguments):void 0;var a=o&&o.stack;return a||(a="at "+n+" "+r,null!=i&&(a+=":"+i)),bn({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==d?void 0:d.addEventListener)&&d.addEventListener("unhandledrejection",Sn),_n(),function(){if(ot.wrapTimers){if(W)return void a("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");xn("setTimeout"),xn("setInterval")}}()}var Pn=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function jn(t){return Pn.includes(t)}function Dn(t,e){var n=0!==e.startTime;Un(t,Y.FETCH_START,e,n),Un(t,Y.DOMAIN_LOOKUP_START,e,n),Un(t,Y.DOMAIN_LOOKUP_END,e,n),Un(t,Y.CONNECT_START,e,n),Un(t,Y.SECURE_CONNECTION_START,e,n),Un(t,Y.CONNECT_END,e,n),Un(t,Y.REQUEST_START,e,n),Un(t,Y.RESPONSE_START,e,n),Un(t,Y.RESPONSE_END,e,n)}function Un(t,e,n){var r,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];!(e in n)||"number"!=typeof n[e]||i&&0===n[e]||Je(t,e,(r=n[e],String(Math.round(1e6*(r+B())))))}function Mn(t,e){var n=e.encodedBodySize;null!=n&&je(t.attributes,"http.response.body.size",n)}function Fn(t){return function(){var e=I(x().mark((function e(n,r){var i,o,a,u,c,l,f,d,v,p,h,m,y,g,b;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r?Object.assign({},r):r,u=null,null!==(i=a)&&void 0!==i&&i.body&&(u=a.body,a.body=void 0),c=new Request(n,a),u&&a&&(a.body=u),!fn(l=c.url)){e.next=9;break}return s("Not creating span for fetch call because the url is ignored, URL: ".concat(l)),e.abrupt("return",t(n instanceof Request?c:n,r));case 9:return f=null!==(o=c.method)&&void 0!==o?o:"GET",d=jn(f),v=jn(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",an((h=Qe("HTTP ".concat(p))).attributes),tn(h.attributes,l),Vn(n,r),je(h.attributes,"http.request.method",p),d||je(h.attributes,"http.request.method_original",f),m=zn(l),m.length>0&&(null!==(y=a)&&void 0!==y&&y.headers?(a.headers=new Headers(a.headers),Gn(a.headers.append,a.headers,h,m)):n instanceof Request?Gn(c.headers.append,c.headers,h,m):(a||(a={}),a.headers=new Headers,Gn(a.headers.append,a.headers,h,m))),Bn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(g=Q({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===et(l).href},maxWaitForResourceMillis:ot.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:ot.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(Dn(h,n),Mn(h,n)),_e($e(h,void 0,1e6*e))}})).start(),e.prev=25,e.next=28,t(n instanceof Request?c:n,a);case 28:return b=e.sent,Hn(h,b),e.abrupt("return",Wn(b,ot.maxToleranceForResourceTimingsMillis,(function(){return g.end()}),(function(t){g.cancel(),qn(h,t)})));case 33:throw e.prev=33,e.t0=e.catch(25),g.cancel(),qn(h,e.t0),e.t0;case 38:case"end":return e.stop()}}),e,null,[[25,33]])})));return function(t,n){return e.apply(this,arguments)}}()}function Vn(t,e,n){try{return void 0}catch(n){s("failed to analyze request for GraphQL insights",n,t,e)}}function Bn(t,e,n){try{if(!ot.headersToCapture.length)return;t.forEach((function(t,r){ot.headersToCapture.some((function(t){return t.test(r)}))&&je(e.attributes,n(r),t)}))}catch(t){s("unable to capture http headers due to CORS policy")}}function Hn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2),0===n&&je(t.attributes,"error.type",e.type),je(t.attributes,"http.response.status_code",String(n)),Bn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function Wn(t,e,n,r){var i,o,a=m.now(),u=t.body;if(!(u&&(i=t,o=i.status,o>=200&&204!=o&&205!=o&&304!=o)))return n(),t;var s=!1,c=function(t){s||(n(t),s=!0)},l=function(t){s||(r(t),s=!0)},f=q((function(){return c(a)}),e),d=u.getReader(),v=new ReadableStream({pull:function(t){return I(x().mark((function n(){var r,i;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,z(f),n.next=4,d.read();case 4:r=n.sent,i=r.value,r.done?(d.releaseLock(),t.close(),c()):(a=m.now(),f=q((function(){return c(a)}),e),t.enqueue(i)),n.next=15;break;case 10:n.prev=10,n.t0=n.catch(0),l(n.t0),t.error(n.t0);try{d.releaseLock()}catch(t){}case 15:case"end":return n.stop()}}),n,null,[[0,10]])})))()},cancel:function(t){return z(f),c(),d.cancel(t)}});return new Response(v,{status:t.status,statusText:t.statusText,headers:t.headers})}function qn(t,e){!function(t,e){var n=[];"string"==typeof e?je(n,Et,e):e&&(e.code?je(n,wt,e.code.toString()):e.name&&je(n,wt,e.name),e.message&&je(n,Et,e.message),e.stack&&je(n,St,e.stack),Je(t,"exception",n))}(t,e),_e($e(t,function(t){return{code:2,message:t&&"object"===D(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function zn(t){var e=[];if(nt(t)){if(e.push("traceparent"),ot.propagators){var n,r=L(ot.propagators);try{for(r.s();!(n=r.n()).done;){var i=n.value;"traceparent"===i.type||e.includes(i.type)||e.push(i.type)}}catch(t){r.e(t)}finally{r.f()}}return e}if(ot.propagators){var o,a=L(ot.propagators);try{for(a.s();!(o=a.n()).done;){var u=o.value;cn(u.match,t)&&(e.includes(u.type)||e.push(u.type))}}catch(t){a.e(t)}finally{a.f()}return e}return[]}function Gn(t,e,n,r){var i,o=L(r);try{for(o.s();!(i=o.n()).done;){"xray"===i.value?He(t,e,n):Be(t,e,n)}}catch(t){o.e(t)}finally{o.f()}}function Kn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=ot.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];je(u,ft,Ot.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=k(t,2),n=e[0],r=e[1];return je(u,n,r)})),an(u,{url:e});var s=[];je(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==v?void 0:v.title)&&void 0!==i?i:J),null!=v&&v.referrer&&je(s,"referrer",v.referrer),je(s,"type",n?Ct:Nt),je(s,"change_state",r?Rt:Lt);var c={timeUnixNano:t,attributes:u,severityNumber:It.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},l=Ve();l&&(c.traceId=l.traceId,c.spanId=l.spanId),Re(c)}function Zn(){var t=null==d?void 0:d.performance.getEntriesByType("navigation")[0];if(t){var e=[];je(e,ft,Ot.NAVIGATION_TIMING);var n=[];je(n,"name",t.name),Yn(n,t,"responseStatus"),Yn(n,t,"fetchStart"),Yn(n,t,"requestStart"),Yn(n,t,"responseStart"),Yn(n,t,"domInteractive"),Yn(n,t,"domContentLoadedEventEnd"),Yn(n,t,"domComplete"),Yn(n,t,"loadEventEnd"),Yn(n,t,"transferSize"),Yn(n,t,"encodedBodySize"),Yn(n,t,"decodedBodySize");var r={timeUnixNano:Xn(),attributes:e,severityNumber:It.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};an(r.attributes);var i=Ve();i&&(r.traceId=i.traceId,r.spanId=i.spanId),Re(r)}else s("Navigation timings not available. Cannot emit navigation timing log")}function Yn(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||je(t,n,Number.isInteger(r)?r:tt(r))}function Xn(){return V(Math.round(B()))}var Qn={},$n=!1,Jn=!1;function tr(){nr(null==d?void 0:d.location.href)}function er(t){nr(t.newURL)}function nr(t,e){var n;if(t)try{var r=new URL(t,null==d?void 0:d.location.href);((n=r).pathname!==Qn.path||Jn&&n.search!==Qn.search||$n&&n.hash!==Qn.hash)&&(rr(r),Kn(F(),r,!0,Boolean(e)))}catch(t){s("Failed to handle url change",t)}}function rr(t){Qn.path=t.pathname,Qn.search=t.search,Qn.hash=t.hash}function ir(){!function(){try{Kn(Xn(),null!=d&&d.location.href?new URL(null==d?void 0:d.location.href):void 0)}catch(t){u("Failed to transmit initial page view event",t)}if("complete"===(null==v?void 0:v.readyState))return Zn();d&&w(d,"load",(function(){setTimeout(Zn,0)}))}(),function(){var t,e,n,r;if(d&&d.history){if(ot.pageViewInstrumentation.trackVirtualPageViews){Jn=null!==(t=null===(e=ot.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,$n=null!==(n=null===(r=ot.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,it(d.history,"replaceState",(function(t){return function(e,n,r){return nr(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),it(d.history,"pushState",(function(t){return function(e,n,r){return nr(r?String(r):void 0),t.apply(this,[e,n,r])}})),d.addEventListener("hashchange",er),d.addEventListener("popstate",tr);try{rr(new URL(d.location.href))}catch(t){}}}else s("Browser does not support history API, skipping instrumentation")}()}var or=function(t){if("object"===D(t)&&null!==t){if("function"==typeof Object.getPrototypeOf){var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1},ar=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce((function(t,e){if(void 0===e)return t;if(Array.isArray(e))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(e).forEach((function(n){["__proto__","constructor","prototype"].includes(n)||(Array.isArray(t[n])&&Array.isArray(e[n])?t[n]=ar.options.mergeArrays?ar.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(P(t[n]),P(e[n])):e[n]:or(t[n])&&or(e[n])?t[n]=ar(t[n],e[n]):!or(t[n])&&or(e[n])?t[n]=ar(e[n],void 0):t[n]=void 0===e[n]?ar.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},ur={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};ar.options=ur,ar.withOptions=function(t){ar.options=Object.assign(Object.assign({},ur),t);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=ar.apply(void 0,n);return ar.options=ur,i};var sr=!1;function cr(t){if(sr)s("Dash0 SDK is being reinitialized, skipping ...");else if(null!=d)if("function"==typeof y&&m&&m.getEntriesByType){var e;if(!t.serviceName.trim())s("Missing or empty serviceName value. Falling back to location.hostname."),t.serviceName=null!==(e=null==h?void 0:h.hostname)&&void 0!==e?e:"unknown";ot.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==ot.endpoints.length?(Object.assign(ot,ar(ot,function(t,e){var n,r={},i=L(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;o in t&&(r[o]=t[o])}}catch(t){i.e(t)}finally{i.f()}return r}(t,["ignoreUrls","ignoreErrorMessages","wrapEventHandlers","wrapTimers","propagateTraceHeadersCorsURLs","maxWaitForResourceTimingsMillis","maxToleranceForResourceTimingsMillis","headersToCapture","urlAttributeScrubber","pageViewInstrumentation","enableTransportCompression"]))),function(t){t.propagators?(t.propagateTraceHeadersCorsURLs&&a("Both 'propagators' and deprecated 'propagateTraceHeadersCorsURLs' were provided. Using 'propagators' configuration. Please migrate to the new 'propagators' config."),ot.propagators=t.propagators):t.propagateTraceHeadersCorsURLs&&t.propagateTraceHeadersCorsURLs.length>0?(a("'propagateTraceHeadersCorsURLs' is deprecated. Please use the new 'propagators' configuration."),ot.propagators=[{type:"traceparent",match:P(t.propagateTraceHeadersCorsURLs)}]):ot.propagators=[{type:"traceparent",match:[]}]}(t),function(t){je(ot.resource.attributes,at,t.serviceName),t.serviceVersion&&je(ot.resource.attributes,ut,t.serviceVersion);var e=function(t){if(t.environment)return t.environment;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_ENV}catch(t){return}}(t);e&&je(ot.resource.attributes,st,e);var n=function(t){if(t.deploymentName)return t.deploymentName;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_TARGET_ENV}catch(t){return}}(t);n&&je(ot.resource.attributes,ct,n);var r=function(t){if(t.deploymentId)return t.deploymentId;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_BRANCH_URL}catch(t){return}}(t);r&&je(ot.resource.attributes,lt,r)}(t),function(t){var e;je(ot.signalAttributes,vt,E(16)),je(ot.signalAttributes,pt,null!==(e=null==p?void 0:p.userAgent)&&void 0!==e?e:J),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=k(t,2),n=e[0],r=e[1];je(ot.signalAttributes,n,r)}))}(t),on(),Ut(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),lr("@dash0/navigation",t)&&ir(),lr("@dash0/web-vitals",t)&&un(),lr("@dash0/error",t)&&kn(),lr("@dash0/fetch",t)&&(d&&d.fetch&&d.Request?it(d,"fetch",Fn):s("Browser does not support the Fetch API, skipping instrumentation")),sr=!0):a("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")}else s("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs.");else s("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")}function lr(t,e){var n=e.enabledInstrumentations;return!n||n.includes(t)}function fr(t,e){Ue(ot.signalAttributes,ht),null!=t&&je(ot.signalAttributes,ht,t),Ue(ot.signalAttributes,mt),null!=(null==e?void 0:e.name)&&je(ot.signalAttributes,mt,e.name),Ue(ot.signalAttributes,yt),null!=(null==e?void 0:e.fullName)&&je(ot.signalAttributes,yt,e.fullName),Ue(ot.signalAttributes,gt),null!=(null==e?void 0:e.email)&&je(ot.signalAttributes,gt,e.email),Ue(ot.signalAttributes,bt),null!=(null==e?void 0:e.hash)&&je(ot.signalAttributes,bt,e.hash),Ue(ot.signalAttributes,Tt),null!=(null==e?void 0:e.roles)&&je(ot.signalAttributes,Tt,e.roles)}function dr(){s("Dash0 Web SDK configuration state:",ot)}function vr(t,e){je(ot.signalAttributes,t,e)}function pr(t){Ue(ot.signalAttributes,t)}function hr(t,e){if(Object.values(Ot).includes(t))a("Unable to send custom event ".concat(t,". You are not allowed to use an internal event name while sending a custom event. Dropping event..."));else{var n=[];an(n),je(n,ft,t),null!=e&&e.title&&je(n,"dash0.web.event.title",e.title),De(n,null==e?void 0:e.attributes),Re({timeUnixNano:null!=(null==e?void 0:e.timestamp)?V(e.timestamp):F(),attributes:n,body:ke(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?It[e.severity]:void 0})}}function mr(t,e){gn(t,e)}function yr(t){s("".concat("Initializing Dash0 Web SDK"," (via package)")),cr(t)}export{vr as addSignalAttribute,dr as debug,fr as identify,yr as init,pr as removeSignalAttribute,mr as reportError,hr as sendEvent,i as setActiveLogLevel,Mt as terminateSession};
1
+ function t(){}function e(t){return t}var n={debug:0,info:1,warn:2,error:3},r=n.warn;function i(t){var e;r=null!==(e=n[t])&&void 0!==e?e:n.warn}var o=c("info"),a=c("warn"),u=c("error"),s=c("debug");function c(e){if("undefined"!=typeof console&&console[e]&&"function"==typeof console[e].apply){var i=n[e];return function(){i>=r&&console[e].apply(console,arguments)}}return t}var l=Object.prototype.hasOwnProperty;function f(t,e){return l.call(t,e)}var d="undefined"!=typeof window?window:void 0,v=null==d?void 0:d.document,p=null==d?void 0:d.navigator,h="undefined"!=typeof location?location:void 0,m=(null==d?void 0:d.performance)||(null==d?void 0:d.webkitPerformance)||(null==d?void 0:d.msPerformance)||(null==d?void 0:d.mozPerformance);null==d||d.encodeURIComponent;var y=null==d?void 0:d.fetch,g=function(){try{var t;return null!==(t=null==d?void 0:d.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),b=function(){try{var t;return null!==(t=null==d?void 0:d.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),T=Array(32);function E(t){for(var e=0;e<2*t;e++)T[e]=Math.floor(16*Math.random())+48,T[e]>=58&&(T[e]+=39);return String.fromCharCode.apply(null,T.slice(0,2*t))}function w(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var S=null!=g&&"function"==typeof g.getItem&&"function"==typeof g.setItem;function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function O(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function I(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){O(o,r,i,a,u,"next",t)}function u(t){O(o,r,i,a,u,"throw",t)}a(void 0)}))}}function N(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,j(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function L(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=U(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function R(t,e,n){return(e=j(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function x(){x=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),u=new R(r||[]);return i(a,"_invoke",{value:I(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",v="suspendedYield",p="executing",h="completed",m={};function y(){}function g(){}function b(){}var T={};c(T,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(_([])));w&&w!==n&&r.call(w,a)&&(T=w);var S=b.prototype=y.prototype=Object.create(T);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,u){var s=f(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function I(e,n,r){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===h){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?h:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=h,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function _(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},A(O.prototype),c(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=_,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:_(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e);else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||U(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||U(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function U(t,e){if(t){if("string"==typeof t)return A(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}function M(){return(new Date).getTime()}function F(){var t=B();return t?String(1e6*(m.now()+t)):V(new Date)}function V(t){return"object"===D(t)?V(t.getTime()):String(t)+"000000"}function B(){var t,e=null==m?void 0:m.timeOrigin;"number"!=typeof e&&(e=null==m||null===(t=m.timing)||void 0===t?void 0:t.fetchStart);return e}var H={setTimeout:null==d?void 0:d.setTimeout,clearTimeout:null==d?void 0:d.clearTimeout,setInterval:null==d?void 0:d.setInterval,clearInterval:null==d?void 0:d.clearInterval},W=null!=d&&null!=d.Zone&&null!=d.Zone.root&&"function"==typeof d.Zone.root.run;function q(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("setTimeout",arguments)}function z(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("clearTimeout",arguments)}function G(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("setInterval",arguments)}function K(){var t,e=this;if(W)try{var n=Array.prototype.slice.apply(arguments);return d.Zone.root.run(H[e],d,n)}catch(t){a("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=H[e])||void 0===t?void 0:t.apply(d,arguments)}W&&s("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");m&&m.getEntriesByType;var Z=m&&"function"==typeof d.PerformanceObserver&&"function"==typeof m.now,Y=Object.freeze({CONNECT_END:"connectEnd",CONNECT_START:"connectStart",DECODED_BODY_SIZE:"decodedBodySize",DOM_COMPLETE:"domComplete",DOM_CONTENT_LOADED_EVENT_END:"domContentLoadedEventEnd",DOM_CONTENT_LOADED_EVENT_START:"domContentLoadedEventStart",DOM_INTERACTIVE:"domInteractive",DOMAIN_LOOKUP_END:"domainLookupEnd",DOMAIN_LOOKUP_START:"domainLookupStart",ENCODED_BODY_SIZE:"encodedBodySize",FETCH_START:"fetchStart",LOAD_EVENT_END:"loadEventEnd",LOAD_EVENT_START:"loadEventStart",NAVIGATION_START:"navigationStart",REDIRECT_END:"redirectEnd",REDIRECT_START:"redirectStart",REQUEST_START:"requestStart",RESPONSE_END:"responseEnd",RESPONSE_START:"responseStart",SECURE_CONNECTION_START:"secureConnectionStart",START_TIME:"startTime",UNLOAD_EVENT_END:"unloadEventEnd",UNLOAD_EVENT_START:"unloadEventStart"}),X=new WeakSet;function Q(e){if(!Z)return function(e){var n=0;return{start:function(){n=M()},end:function(){return e({duration:M()-n})},cancel:t}}(e.onEnd);var n,r,i,o,a,u=[];return{start:function(){n=m.now();try{var t,e=null==d?void 0:d.PerformanceObserver;if(e)null===(t=i=new e(c))||void 0===t||t.observe({type:"resource"})}catch(t){}a=q(f,6e5)},end:function(t){if(r)return;if(r=null!=t?t:m.now(),p(),!$())return s();q((function(){return s()}),Math.min(300,e.maxWaitForResourceMillis)),w(v,"visibilitychange",l),o=q(s,e.maxWaitForResourceMillis)},cancel:f};function s(){f();var t=function(){if(!u.length)return;var t,i,o=u.filter((function(t){return t.responseEnd<=r+e.maxToleranceForResourceTimingsMillis&&!X.has(t)}));if(!o.length)return;1===o.length&&(t=o[0]);if(!t){var a,s=L(o);try{for(s.s();!(a=s.n()).done;){var c=a.value,l=Math.abs(r-n-c.duration)+Math.abs(c.responseEnd-r);(void 0===i||l<i)&&(i=l,t=c)}}catch(t){s.e(t)}finally{s.f()}}if(!t)return;return X.add(t),t}();null!=t&&t.duration&&t.duration<864e5?e.onEnd({resource:t,duration:t.duration}):e.onEnd({resource:t,duration:r-n})}function c(t){t.getEntriesByType("resource").filter((function(t){var r=t;return r.startTime>=n&&e.resourceMatcher(r)})).forEach((function(t){u.length>=100&&u.shift(),u.push(t)}))}function l(){$()||s()}function f(){!function(){if(i){try{var t;null===(t=i)||void 0===t||t.disconnect()}catch(t){}i=void 0}}(),o&&(clearTimeout(o),o=void 0),p(),function(){if(!v)return;t=v,e="visibilitychange",n=l,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function p(){a&&(clearTimeout(a),a=void 0)}}function $(){return"visible"===(null==v?void 0:v.visibilityState)||"prerender"===(null==v?void 0:v.visibilityState)}var J="undefined";function tt(t){return Math.round(100*t)/100}function et(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==v?void 0:v.baseURI)&&void 0!==e?e:null==h?void 0:h.href)}function nt(t){try{return et(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var rt=Symbol.for("INSTRUMENTED_BY_DASH0");function it(t,e,n){var r=t[e];r?!0!==r[rt]?(!function(t){t[rt]=!0}(r),t[e]=n(r)):s("".concat(String(e)," has already been instrumented, skipping")):s("".concat(String(e)," is not defined, unable to instrument"))}var ot={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.18.2",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:50,headersToCapture:[],urlAttributeScrubber:e,pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]},enableTransportCompression:!1},at="service.name",ut="service.version",st="deployment.environment.name",ct="deployment.name",lt="deployment.id",ft="event.name",dt="dash0.web.event.id",vt="page.load.id",pt="user_agent.original",ht="user.id",mt="user.name",yt="user.full_name",gt="user.email",bt="user.hash",Tt="user.roles",Et="exception.message",wt="exception.type",St="exception.stacktrace",At="url.full",Ot={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},It={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},Nt=0,Ct=1,Lt="pushState",Rt="replaceState",_t=1;function xt(){var t,e;return"".concat((t={ephemeralSession:!S},e=0,t.ephemeralSession&&(e|=_t),e.toString(16).padStart(2,"0"))).concat(E(7))}var kt="d0_session",Pt="#",jt=864e5,Dt=null;function Ut(t,e){if(!S)return s("Storage API is not available and session tracking is therefore not supported."),void(Dt=xt());t||(t=108e5),e||(e=216e5),t=Math.min(t,jt),e=Math.min(e,jt);try{var n=function(t){return S&&g?g.getItem(t):null}(kt),r=function(t){if(!t)return null;var e=t.split(Pt);if(e.length<3)return null;var n=e[0],r=parseInt(e[1],10),i=parseInt(e[2],10);if(!n||isNaN(r)||isNaN(i))return null;return{id:n,startTime:r,lastActivityTime:i}}(n);r&&!function(t,e,n){var r=M()-e;if(t.lastActivityTime<r)return!1;var i=M()-n;return t.startTime>=i}(r,t,e)&&(r=null),r?r.lastActivityTime=M():r={id:xt(),startTime:M(),lastActivityTime:M()},function(t,e){S&&g&&g.setItem(t,e)}(kt,function(t){return t.id+Pt+t.startTime+Pt+t.lastActivityTime}(r)),Dt=r.id}catch(t){a("Failed to record session information",t)}}function Mt(){if(S)try{!function(t){S&&g&&g.removeItem(t)}(kt)}catch(t){o("Failed to terminate session",t)}}var Ft=-1,Vt=function(t){addEventListener("pageshow",(function(e){e.persisted&&(Ft=e.timeStamp,t(e))}),!0)},Bt=function(t,e,n,r){var i,o;return function(a){e.value>=0&&(a||r)&&(((o=e.value-(null!=i?i:0))||void 0===i)&&(i=e.value,e.delta=o,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,n),t(e)))}},Ht=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Wt=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},qt=function(){var t,e=Wt();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},zt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Wt(),r="navigate";return Ft>=0?r="back-forward-cache":n&&(document.prerendering||qt()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:"v5-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Gt=new WeakMap;function Kt(t,e){return Gt.get(t)||Gt.set(t,new e),Gt.get(t)}var Zt,Yt=function(){return C((function t(){N(this,t),R(this,"t",void 0),R(this,"i",0),R(this,"o",[])}),[{key:"h",value:function(t){var e;if(!t.hadRecentInput){var n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),null===(e=this.t)||void 0===e||e.call(this,t)}}}])}(),Xt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach((function(e){R(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:t,buffered:!0},n)),r}}catch(t){}},Qt=function(t){var e=!1;return function(){e||(t(),e=!0)}},$t=-1,Jt=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},te=function(t){"hidden"===document.visibilityState&&$t>-1&&($t="visibilitychange"===t.type?t.timeStamp:0,ne())},ee=function(){addEventListener("visibilitychange",te,!0),addEventListener("prerenderingchange",te,!0)},ne=function(){removeEventListener("visibilitychange",te,!0),removeEventListener("prerenderingchange",te,!0)},re=function(){if($t<0){var t,e=qt(),n=document.prerendering||null===(t=globalThis.performance.getEntriesByType("visibility-state").filter((function(t){return"hidden"===t.name&&t.startTime>e}))[0])||void 0===t?void 0:t.startTime;$t=null!=n?n:Jt(),ee(),Vt((function(){setTimeout((function(){$t=Jt(),ee()}))}))}return{get firstHiddenTime(){return $t}}},ie=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},oe=[1800,3e3],ae=[.1,.25],ue=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ie((function(){var n,r=re(),i=zt("FCP"),o=Xt("paint",(function(t){var e,a=L(t);try{for(a.s();!(e=a.n()).done;){var u=e.value;"first-contentful-paint"===u.name&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-qt(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=Bt(t,i,oe,e.reportAllChanges),Vt((function(r){i=zt("FCP"),n=Bt(t,i,oe,e.reportAllChanges),Ht((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(Qt((function(){var n,r=zt("CLS",0),i=Kt(e,Yt),o=function(t){var e,o=L(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;i.h(a)}}catch(t){o.e(t)}finally{o.f()}i.i>r.value&&(r.value=i.i,r.entries=i.o,n())},a=Xt("layout-shift",o);a&&(n=Bt(t,r,ae,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),Vt((function(){i.i=0,r=zt("CLS",0),n=Bt(t,r,ae,e.reportAllChanges),Ht((function(){return n()}))})),setTimeout(n))})))},se=0,ce=1/0,le=0,fe=function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(ce=Math.min(ce,r.interactionId),le=Math.max(le,r.interactionId),se=le?(le-ce)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},de=function(){var t;return Zt?se:null!==(t=performance.interactionCount)&&void 0!==t?t:0},ve=0,pe=function(){return C((function t(){N(this,t),R(this,"u",[]),R(this,"l",new Map),R(this,"m",void 0),R(this,"v",void 0)}),[{key:"p",value:function(){ve=de(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((de()-ve)/50));return this.u[t]}},{key:"h",value:function(t){var e;if(null!==(e=this.m)&&void 0!==e&&e.call(this,t),t.interactionId||"first-input"===t.entryType){var n=this.u.at(-1),r=this.l.get(t.interactionId);if(r||this.u.length<10||t.duration>n.T){var i;if(r?t.duration>r.T?(r.entries=[t],r.T=t.duration):t.duration===r.T&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],T:t.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((function(t,e){return e.T-t.T})),this.u.length>10){var o,a=L(this.u.splice(10));try{for(a.s();!(o=a.n()).done;){var u=o.value;this.l.delete(u.id)}}catch(t){a.e(t)}finally{a.f()}}null===(i=this.v)||void 0===i||i.call(this,r)}}}}])}(),he=function(t){var e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=Qt(t),document.addEventListener("visibilitychange",t,{once:!0}),e((function(){t(),document.removeEventListener("visibilitychange",t)})))},me=[200,500],ye=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&ie((function(){var n;"interactionCount"in performance||Zt||(Zt=Xt("event",fe,{type:"event",buffered:!0,durationThreshold:0}));var r,i=zt("INP"),o=Kt(e,pe),a=function(t){he((function(){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;o.h(a)}}catch(t){n.e(t)}finally{n.f()}var u=o.P();u&&u.T!==i.value&&(i.value=u.T,i.entries=u.entries,r())}))},u=Xt("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Bt(t,i,me,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),Vt((function(){o.p(),i=zt("INP"),r=Bt(t,i,me,e.reportAllChanges)})))}))},ge=function(){return C((function t(){N(this,t),R(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),be=[2500,4e3],Te=!1;function Ee(t){var e,n,r=[];return n=i,Te&&n(),v&&d&&(w(v,"visibilitychange",(function(){"visible"!==v.visibilityState&&n()})),w(d,"pagehide",(function(){Te=!0,n()})),w(d,"beforeunload",(function(){Te=!0,n()}))),{send:function(n){"visible"===(null==v?void 0:v.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=q(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}function we(t,e){return Se.apply(this,arguments)}function Se(){return Se=I(x().mark((function e(n,r){var i,o,u,c;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s("Transmitting telemetry to endpoints",r),i=JSON.stringify(r),o=i,u=i.length,c=!1,"undefined"==typeof CompressionStream||!ot.enableTransportCompression){e.next=11;break}return e.next=8,Ae(i);case 8:o=e.sent,u=o.byteLength,c=!0;case 11:return e.next=13,Promise.all(ot.endpoints.map(function(){var e=I(x().mark((function e(r){var i,s,l;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(i=new URL(r.url)).pathname=i.pathname+(i.pathname.endsWith("/")?n.substring(1):n),s={"Content-Type":"application/json",Authorization:"Bearer ".concat(r.authToken)},r.dataset&&(s["Dash0-Dataset"]=r.dataset),c&&(s["Content-Encoding"]="gzip"),y){e.next=9;break}return a("Unable to send telemetry, fetch is not defined"),e.abrupt("return");case 9:return e.next=11,y(i,{method:"POST",headers:s,body:o,keepalive:u<=6e4});case 11:(l=e.sent).text().catch(t),l.ok||a("Failed to send telemetry to ".concat(i,": ").concat(l.status," ").concat(l.statusText)),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),a("Error sending telemetry to ".concat(r.url).concat(n,":"),e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}()));case 13:case"end":return e.stop()}}),e)}))),Se.apply(this,arguments)}function Ae(t){return Oe.apply(this,arguments)}function Oe(){return(Oe=I(x().mark((function t(e){var n,r,i;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new Blob([e]),r=n.stream(),i=r.pipeThrough(new CompressionStream("gzip")),t.abrupt("return",new Response(i).arrayBuffer());case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Ie,Ne=Ee((function(t){we("/v1/logs",{resourceLogs:[{resource:ot.resource,scopeLogs:[{scope:ot.scope,logRecords:t}]}]}).catch((function(t){u("Failed to transmit logs",t)}))})),Ce=Ee((function(t){we("/v1/traces",{resourceSpans:[{resource:ot.resource,scopeSpans:[{scope:ot.scope,spans:t}]}]}).catch((function(t){u("Failed to transmit spans",t)}))}));function Le(){var t,e,n,r,i;return Ie||(e=(t={maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCallsPerTenMinutes,n=t.maxCallsPerTenSeconds,r=0,i=0,G((function(){r=0}),6e5),G((function(){i=0}),1e4),Ie=function(){return++r>e||++i>n}),Ie()}function Re(t){Le()?s("Transport rate limit. Will not send item.",t):Ne.send(t)}function _e(t){t&&(Le()?s("Transport rate limit. Will not send item.",t):Ce.send(t))}var xe=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function ke(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return ke(t)}))}:"string"==typeof t?e.stringValue=t:"number"==typeof t?e.doubleValue=t:"boolean"==typeof t?e.boolValue=t:!function(t){if(null==t||"object"!==D(t))return!1;var e=Object.keys(t);return 1===e.length&&xe.includes(e[0])}(t)?"object"===D(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=k(t,2);return Pe(e[0],e[1])}))}):e=t,e}}function Pe(t,e){return{key:t,value:ke(e)}}function je(t,e,n){e&&t.push(Pe(e,n))}function De(t,e){e&&Object.entries(e).forEach((function(e){var n=k(e,2),r=n[0],i=n[1];return je(t,r,i)}))}function Ue(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var Me="traceparent",Fe=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function Ve(){var t,e,n=((null===(t=Array.from(null!==(e=null==v?void 0:v.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===Me})))||void 0===t?void 0:t.content.trim())||"").match(Fe)||function(){var t=m.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===Me)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(Fe);if(n)return{traceId:n[1],spanId:n[2]}}function Be(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}function He(t,e,n){var r,i,o,a=(r=n.traceId,i=r.substring(0,8),o=r.substring(8,32),"1-".concat(i,"-").concat(o)),u="Root=".concat(a,";Parent=").concat(n.spanId,";Sampled=1");t.call(e,"X-Amzn-Trace-Id",u)}var We="d042",qe=1;function ze(t){var e=0;return t.withoutSession&&(e|=qe),e.toString(16).padStart(2,"0")}for(var Ge=new Uint32Array(256),Ke=0;Ke<256;Ke++){for(var Ze=Ke,Ye=0;Ye<8;Ye++)Ze=1&Ze?3988292384^Ze>>>1:Ze>>>1;Ge[Ke]=Ze>>>0}function Xe(t){var e=function(t){for(var e=new Uint8Array(t.length/2),n=0;n<t.length;n+=2)e[n/2]=parseInt(t.substring(n,n+2),16);for(var r=4294967295,i=0;i<e.length;i++){var o=e[i];r=r>>>8^Ge[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(E(4))}function Qe(t){var e=function(t){return t?"".concat(We).concat(ze({withoutSession:!1})).concat(t).concat(E(5)):"".concat(We).concat(ze({withoutSession:!0})).concat(E(13))}(Dt),n=Xe(e),r=[];return je(r,dt,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:F(),attributes:r,events:[],links:[],status:{code:0}}}function $e(t,e,n){var r=t;if(!r.endTimeUnixNano)return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):F(),r;s("Attempting to end already ended span. Dropping...",r)}function Je(t,e,n,r){var i=void 0,o=void 0;"string"==typeof n?i=n:Array.isArray(n)&&(o=n),t.events.push({name:e,timeUnixNano:null!=i?i:F(),attributes:null!=o?o:[]})}function tn(t,n,r){var i=function(t){return t?Array.isArray(t)?function(e){return[].concat(P(t),[e]).join(".")}:function(e){return"".concat(t,".").concat(e)}:function(t){return t}}(r);try{var o=et(n);o.username&&(o.username="REDACTED"),o.password&&(o.password="REDACTED");var a=ot.urlAttributeScrubber(R(R(R(R(R(R({},At,o.href),"url.path",o.pathname),"url.domain",o.hostname),"url.scheme",o.protocol.replace(":","")),"url.fragment",o.hash?o.hash.replace("#",""):void 0),"url.query",o.search?o.search.replace("?",""):void 0));Object.entries(a).forEach((function(e){var n=k(e,2),r=n[0],o=n[1];void 0!==o&&je(t,i(r),o)}))}catch(r){ot.urlAttributeScrubber===e&&je(t,i(At),String(n))}}var en=null!=b&&"function"==typeof b.getItem&&"function"==typeof b.setItem;var nn="d0_tab",rn=null;function on(){if(en)try{var t=function(t){return en&&b?b.getItem(t):null}(nn);if(t)return void(rn=t);rn=E(8),function(t,e){en&&b&&b.setItem(t,e)}(nn,rn)}catch(t){a("Failed to record tab ID information",t)}else s("Storage API is not available and tab tracking is therefore not supported.")}function an(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===dt}))&&je(t,dt,E(8));for(var u=0;u<ot.signalAttributes.length;u++)t.push(ot.signalAttributes[u]);tn(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==d?void 0:d.location.href)&&void 0!==n?n:J,"page"),Dt&&je(t,"session.id",Dt),rn&&je(t,"browser.tab.id",rn),je(t,"browser.window.width",null!==(i=null==d?void 0:d.innerWidth)&&void 0!==i?i:J),je(t,"browser.window.height",null!==(o=null==d?void 0:d.innerHeight)&&void 0!==o?o:J);var s=null==p||null===(a=p.connection)||void 0===a?void 0:a.effectiveType;s&&je(t,"network.connection.subtype",s)}function un(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ie((function(){var n,r=re(),i=zt("LCP"),o=Kt(e,ge),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=L(t);try{for(u.s();!(a=u.n()).done;){var s=a.value;o.h(s),s.startTime<r.firstHiddenTime&&(i.value=Math.max(s.startTime-qt(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=Xt("largest-contentful-paint",a);if(u){n=Bt(t,i,be,e.reportAllChanges);for(var s=Qt((function(){a(u.takeRecords()),u.disconnect(),n(!0)})),c=0,l=["keydown","click","visibilitychange"];c<l.length;c++)addEventListener(l[c],(function(){return he(s)}),{capture:!0,once:!0});Vt((function(r){i=zt("LCP"),n=Bt(t,i,be,e.reportAllChanges),Ht((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}(sn,{reportAllChanges:!0}),ye(sn,{reportAllChanges:!0}),ue(sn,{reportAllChanges:!0})}function sn(t){var e=[];je(e,ft,Ot.WEB_VITAL);var n=[];je(n,"name",t.name),je(n,"value",tt(t.value)),je(n,"delta",tt(t.delta));var r={timeUnixNano:F(),attributes:e,severityNumber:It.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};an(r.attributes),Re(r)}function cn(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var ln="data:";function fn(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===ln||(!!function(t){for(var e=t.toLowerCase(),n=0,r=ot.endpoints.length;n<r;n++){var i=ot.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||cn(ot.ignoreUrls,t))))}var dn,vn=0,pn=0,hn={},mn=!1;function yn(){mn=!0}function gn(t,e){t&&bn("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function bn(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(vn>100)&&!function(t){return!t||cn(ot.ignoreErrorMessages,t)}(e)){pn>=20&&(hn={},pn=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==d?void 0:d.location.href),a=hn[o];if(a)a.seenCount++;else{var u=[];an(u),je(u,ft,Ot.ERROR),je(u,Et,e),n&&je(u,wt,n),r&&je(u,St,r),null!=i&&i.componentStack&&je(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),De(u,null==i?void 0:i.attributes),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:F(),attributes:u,severityNumber:It.ERROR,severityText:"ERROR",body:{stringValue:e}}},hn[o]=a,pn++}!function(){if(dn)return;dn=setTimeout(Tn,1e3)}()}}function Tn(){for(var t in dn&&(clearTimeout(dn),dn=null),hn)if(f(hn,t)){var e=hn[t];e.seenCount>e.transmittedCount&&(Re(e.log),vn++)}hn={},pn=0}var En="Unhandled promise rejection: ",wn="<unavailable because Promise wasn't rejected with an Error object>";function Sn(t){null==t.reason?gn({message:En+"<no reason defined>",stack:wn}):"string"==typeof t.reason.message?gn({message:En+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:wn}):"object"!==D(t.reason)&&gn({message:En+t.reason,stack:wn})}var An="__dash0OriginalFunctions";function On(t,e){for(var n=t[An],r=0;r<n.length;r++){if(In(n[r].valuesForEqualityCheck,e))return r}return-1}function In(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Nn(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[An]=t[An]||[],i=On(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,Cn(n,r,i))}function Cn(t,e,n){return[t,e,Ln(n)]}function Ln(t){return null!=t&&("object"===D(t)?Boolean(t.capture):Boolean(t))}function Rn(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[An];if(null==r)return n;var i=On(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,Cn(e,n,r),i)}function _n(){ot.wrapEventHandlers&&function(t){if(!t||"function"!=typeof t.prototype.addEventListener||"function"!=typeof t.prototype.removeEventListener)return;var e=t.prototype.addEventListener,n=t.prototype.removeEventListener;t.prototype.addEventListener=function(t,n,r){if("function"!=typeof n)return e.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=function(){try{return n.apply(this,arguments)}catch(t){throw gn(t),yn(),t}},i[1]=Nn(this,i[1],t,n,r),e.apply(this,i)},t.prototype.removeEventListener=function(t,e,r){if("function"!=typeof e)return n.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=Rn(this,t,e,r,e),n.apply(this,i)}}(null==d?void 0:d.EventTarget)}function xn(t){var e=null==d?void 0:d[t];"function"==typeof e&&(d[t]=function(t){for(var n=new Array(arguments.length),r=0;r<arguments.length;r++)n[r]=arguments[r];return n[0]=function(t){if("function"!=typeof t)return t;return function(){try{return t.apply(this,arguments)}catch(t){throw reportError(t),yn(),t}}}(t),e.apply(this,n)})}function kn(){!function(){if(d){var t=d.onerror;d.onerror=function(e,n,r,i,o){if(mn)return mn=!1,"function"==typeof t?t.apply(this,arguments):void 0;var a=o&&o.stack;return a||(a="at "+n+" "+r,null!=i&&(a+=":"+i)),bn({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==d?void 0:d.addEventListener)&&d.addEventListener("unhandledrejection",Sn),_n(),function(){if(ot.wrapTimers){if(W)return void a("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");xn("setTimeout"),xn("setInterval")}}()}var Pn=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function jn(t){return Pn.includes(t)}function Dn(t,e){var n=0!==e.startTime;Un(t,Y.FETCH_START,e,n),Un(t,Y.DOMAIN_LOOKUP_START,e,n),Un(t,Y.DOMAIN_LOOKUP_END,e,n),Un(t,Y.CONNECT_START,e,n),Un(t,Y.SECURE_CONNECTION_START,e,n),Un(t,Y.CONNECT_END,e,n),Un(t,Y.REQUEST_START,e,n),Un(t,Y.RESPONSE_START,e,n),Un(t,Y.RESPONSE_END,e,n)}function Un(t,e,n){var r,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];!(e in n)||"number"!=typeof n[e]||i&&0===n[e]||Je(t,e,(r=n[e],String(Math.round(1e6*(r+B())))))}function Mn(t,e){var n=e.encodedBodySize;null!=n&&je(t.attributes,"http.response.body.size",n)}function Fn(t){return function(){var e=I(x().mark((function e(n,r){var i,o,a,u,c,l,f,d,v,p,h,m,y,g,b;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r?Object.assign({},r):r,u=null,null!==(i=a)&&void 0!==i&&i.body&&(u=a.body,a.body=void 0),c=new Request(n,a),u&&a&&(a.body=u),!fn(l=c.url)){e.next=9;break}return s("Not creating span for fetch call because the url is ignored, URL: ".concat(l)),e.abrupt("return",t(n instanceof Request?c:n,r));case 9:return f=null!==(o=c.method)&&void 0!==o?o:"GET",d=jn(f),v=jn(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",an((h=Qe("HTTP ".concat(p))).attributes),tn(h.attributes,l),Vn(n,r),je(h.attributes,"http.request.method",p),d||je(h.attributes,"http.request.method_original",f),m=zn(l),m.length>0&&(null!==(y=a)&&void 0!==y&&y.headers?(a.headers=new Headers(a.headers),Gn(a.headers.append,a.headers,h,m)):n instanceof Request?Gn(c.headers.append,c.headers,h,m):(a||(a={}),a.headers=new Headers,Gn(a.headers.append,a.headers,h,m))),Bn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(g=Q({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===et(l).href},maxWaitForResourceMillis:ot.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:ot.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(Dn(h,n),Mn(h,n)),_e($e(h,void 0,1e6*e))}})).start(),e.prev=25,e.next=28,t(n instanceof Request?c:n,a);case 28:return b=e.sent,Hn(h,b),e.abrupt("return",Wn(b,ot.maxToleranceForResourceTimingsMillis,(function(){return g.end()}),(function(t){g.cancel(),qn(h,t)})));case 33:throw e.prev=33,e.t0=e.catch(25),g.cancel(),qn(h,e.t0),e.t0;case 38:case"end":return e.stop()}}),e,null,[[25,33]])})));return function(t,n){return e.apply(this,arguments)}}()}function Vn(t,e,n){try{return void 0}catch(n){s("failed to analyze request for GraphQL insights",n,t,e)}}function Bn(t,e,n){try{if(!ot.headersToCapture.length)return;t.forEach((function(t,r){ot.headersToCapture.some((function(t){return t.test(r)}))&&je(e.attributes,n(r),t)}))}catch(t){s("unable to capture http headers due to CORS policy")}}function Hn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2),0===n&&je(t.attributes,"error.type",e.type),je(t.attributes,"http.response.status_code",String(n)),Bn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function Wn(t,e,n,r){var i,o,a=m.now(),u=t.body;if(!(u&&(i=t,o=i.status,o>=200&&204!=o&&205!=o&&304!=o)))return n(),t;var s=!1,c=function(t){s||(n(t),s=!0)},l=function(t){s||(r(t),s=!0)},f=q((function(){return c(a)}),e),d=u.getReader(),v=new ReadableStream({pull:function(t){return I(x().mark((function n(){var r,i;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,z(f),n.next=4,d.read();case 4:r=n.sent,i=r.value,r.done?(d.releaseLock(),t.close(),c()):(a=m.now(),f=q((function(){return c(a)}),e),t.enqueue(i)),n.next=15;break;case 10:n.prev=10,n.t0=n.catch(0),l(n.t0),t.error(n.t0);try{d.releaseLock()}catch(t){}case 15:case"end":return n.stop()}}),n,null,[[0,10]])})))()},cancel:function(t){return z(f),c(),d.cancel(t)}});return new Response(v,{status:t.status,statusText:t.statusText,headers:t.headers})}function qn(t,e){!function(t,e){var n=[];"string"==typeof e?je(n,Et,e):e&&(e.code?je(n,wt,e.code.toString()):e.name&&je(n,wt,e.name),e.message&&je(n,Et,e.message),e.stack&&je(n,St,e.stack),Je(t,"exception",n))}(t,e),_e($e(t,function(t){return{code:2,message:t&&"object"===D(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function zn(t){var e=[];if(nt(t)){if(e.push("traceparent"),ot.propagators){var n,r=L(ot.propagators);try{for(r.s();!(n=r.n()).done;){var i=n.value;"traceparent"===i.type||e.includes(i.type)||e.push(i.type)}}catch(t){r.e(t)}finally{r.f()}}return e}if(ot.propagators){var o,a=L(ot.propagators);try{for(a.s();!(o=a.n()).done;){var u=o.value;cn(u.match,t)&&(e.includes(u.type)||e.push(u.type))}}catch(t){a.e(t)}finally{a.f()}return e}return[]}function Gn(t,e,n,r){var i,o=L(r);try{for(o.s();!(i=o.n()).done;){"xray"===i.value?He(t,e,n):Be(t,e,n)}}catch(t){o.e(t)}finally{o.f()}}function Kn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=ot.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];je(u,ft,Ot.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=k(t,2),n=e[0],r=e[1];return je(u,n,r)})),an(u,{url:e});var s=[];je(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==v?void 0:v.title)&&void 0!==i?i:J),null!=v&&v.referrer&&je(s,"referrer",v.referrer),je(s,"type",n?Ct:Nt),je(s,"change_state",r?Rt:Lt);var c={timeUnixNano:t,attributes:u,severityNumber:It.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},l=Ve();l&&(c.traceId=l.traceId,c.spanId=l.spanId),Re(c)}function Zn(){var t=null==d?void 0:d.performance.getEntriesByType("navigation")[0];if(t){var e=[];je(e,ft,Ot.NAVIGATION_TIMING);var n=[];je(n,"name",t.name),Yn(n,t,"responseStatus"),Yn(n,t,"fetchStart"),Yn(n,t,"requestStart"),Yn(n,t,"responseStart"),Yn(n,t,"domInteractive"),Yn(n,t,"domContentLoadedEventEnd"),Yn(n,t,"domComplete"),Yn(n,t,"loadEventEnd"),Yn(n,t,"transferSize"),Yn(n,t,"encodedBodySize"),Yn(n,t,"decodedBodySize");var r={timeUnixNano:Xn(),attributes:e,severityNumber:It.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};an(r.attributes);var i=Ve();i&&(r.traceId=i.traceId,r.spanId=i.spanId),Re(r)}else s("Navigation timings not available. Cannot emit navigation timing log")}function Yn(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||je(t,n,Number.isInteger(r)?r:tt(r))}function Xn(){return V(Math.round(B()))}var Qn={},$n=!1,Jn=!1;function tr(){nr(null==d?void 0:d.location.href)}function er(t){nr(t.newURL)}function nr(t,e){var n;if(t)try{var r=new URL(t,null==d?void 0:d.location.href);((n=r).pathname!==Qn.path||Jn&&n.search!==Qn.search||$n&&n.hash!==Qn.hash)&&(rr(r),Kn(F(),r,!0,Boolean(e)))}catch(t){s("Failed to handle url change",t)}}function rr(t){Qn.path=t.pathname,Qn.search=t.search,Qn.hash=t.hash}function ir(){!function(){try{Kn(Xn(),null!=d&&d.location.href?new URL(null==d?void 0:d.location.href):void 0)}catch(t){u("Failed to transmit initial page view event",t)}if("complete"===(null==v?void 0:v.readyState))return Zn();d&&w(d,"load",(function(){setTimeout(Zn,0)}))}(),function(){var t,e,n,r;if(d&&d.history){if(ot.pageViewInstrumentation.trackVirtualPageViews){Jn=null!==(t=null===(e=ot.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,$n=null!==(n=null===(r=ot.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,it(d.history,"replaceState",(function(t){return function(e,n,r){return nr(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),it(d.history,"pushState",(function(t){return function(e,n,r){return nr(r?String(r):void 0),t.apply(this,[e,n,r])}})),d.addEventListener("hashchange",er),d.addEventListener("popstate",tr);try{rr(new URL(d.location.href))}catch(t){}}}else s("Browser does not support history API, skipping instrumentation")}()}var or=function(t){if("object"===D(t)&&null!==t){if("function"==typeof Object.getPrototypeOf){var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1},ar=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce((function(t,e){if(void 0===e)return t;if(Array.isArray(e))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(e).forEach((function(n){["__proto__","constructor","prototype"].includes(n)||(Array.isArray(t[n])&&Array.isArray(e[n])?t[n]=ar.options.mergeArrays?ar.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(P(t[n]),P(e[n])):e[n]:or(t[n])&&or(e[n])?t[n]=ar(t[n],e[n]):!or(t[n])&&or(e[n])?t[n]=ar(e[n],void 0):t[n]=void 0===e[n]?ar.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},ur={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};ar.options=ur,ar.withOptions=function(t){ar.options=Object.assign(Object.assign({},ur),t);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=ar.apply(void 0,n);return ar.options=ur,i};var sr=!1;function cr(t){if(sr)s("Dash0 SDK is being reinitialized, skipping ...");else if(null!=d)if("function"==typeof y&&m&&m.getEntriesByType){var e;if(!t.serviceName.trim())s("Missing or empty serviceName value. Falling back to location.hostname."),t.serviceName=null!==(e=null==h?void 0:h.hostname)&&void 0!==e?e:"unknown";ot.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==ot.endpoints.length?(Object.assign(ot,ar(ot,function(t,e){var n,r={},i=L(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;o in t&&(r[o]=t[o])}}catch(t){i.e(t)}finally{i.f()}return r}(t,["ignoreUrls","ignoreErrorMessages","wrapEventHandlers","wrapTimers","propagateTraceHeadersCorsURLs","maxWaitForResourceTimingsMillis","maxToleranceForResourceTimingsMillis","headersToCapture","urlAttributeScrubber","pageViewInstrumentation","enableTransportCompression"]))),function(t){t.propagators?(t.propagateTraceHeadersCorsURLs&&a("Both 'propagators' and deprecated 'propagateTraceHeadersCorsURLs' were provided. Using 'propagators' configuration. Please migrate to the new 'propagators' config."),ot.propagators=t.propagators):t.propagateTraceHeadersCorsURLs&&t.propagateTraceHeadersCorsURLs.length>0?(a("'propagateTraceHeadersCorsURLs' is deprecated. Please use the new 'propagators' configuration."),ot.propagators=[{type:"traceparent",match:P(t.propagateTraceHeadersCorsURLs)}]):ot.propagators=[{type:"traceparent",match:[]}]}(t),function(t){je(ot.resource.attributes,at,t.serviceName),t.serviceVersion&&je(ot.resource.attributes,ut,t.serviceVersion);var e=function(t){if(t.environment)return t.environment;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_ENV}catch(t){return}}(t);e&&je(ot.resource.attributes,st,e);var n=function(t){if(t.deploymentName)return t.deploymentName;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_TARGET_ENV}catch(t){return}}(t);n&&je(ot.resource.attributes,ct,n);var r=function(t){if(t.deploymentId)return t.deploymentId;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_BRANCH_URL}catch(t){return}}(t);r&&je(ot.resource.attributes,lt,r)}(t),function(t){var e;je(ot.signalAttributes,vt,E(16)),je(ot.signalAttributes,pt,null!==(e=null==p?void 0:p.userAgent)&&void 0!==e?e:J),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=k(t,2),n=e[0],r=e[1];je(ot.signalAttributes,n,r)}))}(t),on(),Ut(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),lr("@dash0/navigation",t)&&ir(),lr("@dash0/web-vitals",t)&&un(),lr("@dash0/error",t)&&kn(),lr("@dash0/fetch",t)&&(d&&d.fetch&&d.Request?it(d,"fetch",Fn):s("Browser does not support the Fetch API, skipping instrumentation")),sr=!0):a("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")}else s("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs.");else s("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")}function lr(t,e){var n=e.enabledInstrumentations;return!n||n.includes(t)}function fr(t,e){Ue(ot.signalAttributes,ht),null!=t&&je(ot.signalAttributes,ht,t),Ue(ot.signalAttributes,mt),null!=(null==e?void 0:e.name)&&je(ot.signalAttributes,mt,e.name),Ue(ot.signalAttributes,yt),null!=(null==e?void 0:e.fullName)&&je(ot.signalAttributes,yt,e.fullName),Ue(ot.signalAttributes,gt),null!=(null==e?void 0:e.email)&&je(ot.signalAttributes,gt,e.email),Ue(ot.signalAttributes,bt),null!=(null==e?void 0:e.hash)&&je(ot.signalAttributes,bt,e.hash),Ue(ot.signalAttributes,Tt),null!=(null==e?void 0:e.roles)&&je(ot.signalAttributes,Tt,e.roles)}function dr(){s("Dash0 Web SDK configuration state:",ot)}function vr(t,e){je(ot.signalAttributes,t,e)}function pr(t){Ue(ot.signalAttributes,t)}function hr(t,e){if(Object.values(Ot).includes(t))a("Unable to send custom event ".concat(t,". You are not allowed to use an internal event name while sending a custom event. Dropping event..."));else{var n=[];an(n),je(n,ft,t),null!=e&&e.title&&je(n,"dash0.web.event.title",e.title),De(n,null==e?void 0:e.attributes),Re({timeUnixNano:null!=(null==e?void 0:e.timestamp)?V(e.timestamp):F(),attributes:n,body:ke(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?It[e.severity]:void 0})}}function mr(t,e){gn(t,e)}function yr(t){s("".concat("Initializing Dash0 Web SDK"," (via package)")),cr(t)}export{vr as addSignalAttribute,dr as debug,fr as identify,yr as init,pr as removeSignalAttribute,mr as reportError,hr as sendEvent,i as setActiveLogLevel,Mt as terminateSession};
2
2
  //# sourceMappingURL=dash0.js.map
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).dash0={})}(this,(function(t){"use strict";function e(){}function n(t){return t}var r={debug:0,info:1,warn:2,error:3},i=r.warn;var o=c("info"),a=c("warn"),u=c("error"),s=c("debug");function c(t){if("undefined"!=typeof console&&console[t]&&"function"==typeof console[t].apply){var n=r[t];return function(){n>=i&&console[t].apply(console,arguments)}}return e}var l=Object.prototype.hasOwnProperty;function f(t,e){return l.call(t,e)}var d="undefined"!=typeof window?window:void 0,v=null==d?void 0:d.document,p=null==d?void 0:d.navigator,h="undefined"!=typeof location?location:void 0,m=(null==d?void 0:d.performance)||(null==d?void 0:d.webkitPerformance)||(null==d?void 0:d.msPerformance)||(null==d?void 0:d.mozPerformance);null==d||d.encodeURIComponent;var y=null==d?void 0:d.fetch,g=function(){try{var t;return null!==(t=null==d?void 0:d.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),b=function(){try{var t;return null!==(t=null==d?void 0:d.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),T=Array(32);function E(t){for(var e=0;e<2*t;e++)T[e]=Math.floor(16*Math.random())+48,T[e]>=58&&(T[e]+=39);return String.fromCharCode.apply(null,T.slice(0,2*t))}function w(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var S=null!=g&&"function"==typeof g.getItem&&"function"==typeof g.setItem;function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function O(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function I(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){O(o,r,i,a,u,"next",t)}function u(t){O(o,r,i,a,u,"throw",t)}a(void 0)}))}}function N(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function L(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,j(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function C(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=U(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function R(t,e,n){return(e=j(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function x(){x=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),u=new R(r||[]);return i(a,"_invoke",{value:I(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",v="suspendedYield",p="executing",h="completed",m={};function y(){}function g(){}function b(){}var T={};c(T,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(_([])));w&&w!==n&&r.call(w,a)&&(T=w);var S=b.prototype=y.prototype=Object.create(T);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,u){var s=f(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function I(e,n,r){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===h){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?h:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=h,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function _(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},A(O.prototype),c(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=_,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:_(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e);else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||U(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||U(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function U(t,e){if(t){if("string"==typeof t)return A(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}function M(){return(new Date).getTime()}function F(){var t=B();return t?String(1e6*(m.now()+t)):V(new Date)}function V(t){return"object"===D(t)?V(t.getTime()):String(t)+"000000"}function B(){var t,e=null==m?void 0:m.timeOrigin;"number"!=typeof e&&(e=null==m||null===(t=m.timing)||void 0===t?void 0:t.fetchStart);return e}var H={setTimeout:null==d?void 0:d.setTimeout,clearTimeout:null==d?void 0:d.clearTimeout,setInterval:null==d?void 0:d.setInterval,clearInterval:null==d?void 0:d.clearInterval},W=null!=d&&null!=d.Zone&&null!=d.Zone.root&&"function"==typeof d.Zone.root.run;function q(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("setTimeout",arguments)}function z(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("clearTimeout",arguments)}function G(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("setInterval",arguments)}function K(){var t,e=this;if(W)try{var n=Array.prototype.slice.apply(arguments);return d.Zone.root.run(H[e],d,n)}catch(t){a("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=H[e])||void 0===t?void 0:t.apply(d,arguments)}W&&s("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");m&&m.getEntriesByType;var Z=m&&"function"==typeof d.PerformanceObserver&&"function"==typeof m.now,Y=Object.freeze({CONNECT_END:"connectEnd",CONNECT_START:"connectStart",DECODED_BODY_SIZE:"decodedBodySize",DOM_COMPLETE:"domComplete",DOM_CONTENT_LOADED_EVENT_END:"domContentLoadedEventEnd",DOM_CONTENT_LOADED_EVENT_START:"domContentLoadedEventStart",DOM_INTERACTIVE:"domInteractive",DOMAIN_LOOKUP_END:"domainLookupEnd",DOMAIN_LOOKUP_START:"domainLookupStart",ENCODED_BODY_SIZE:"encodedBodySize",FETCH_START:"fetchStart",LOAD_EVENT_END:"loadEventEnd",LOAD_EVENT_START:"loadEventStart",NAVIGATION_START:"navigationStart",REDIRECT_END:"redirectEnd",REDIRECT_START:"redirectStart",REQUEST_START:"requestStart",RESPONSE_END:"responseEnd",RESPONSE_START:"responseStart",SECURE_CONNECTION_START:"secureConnectionStart",START_TIME:"startTime",UNLOAD_EVENT_END:"unloadEventEnd",UNLOAD_EVENT_START:"unloadEventStart"}),X=new WeakSet;function Q(t){if(!Z)return function(t){var n=0;return{start:function(){n=M()},end:function(){return t({duration:M()-n})},cancel:e}}(t.onEnd);var n,r,i,o,a,u=[];return{start:function(){n=m.now();try{var t,e=null==d?void 0:d.PerformanceObserver;if(e)null===(t=i=new e(c))||void 0===t||t.observe({type:"resource"})}catch(t){}a=q(f,6e5)},end:function(e){if(r)return;if(r=null!=e?e:m.now(),p(),!$())return s();q((function(){return s()}),Math.min(300,t.maxWaitForResourceMillis)),w(v,"visibilitychange",l),o=q(s,t.maxWaitForResourceMillis)},cancel:f};function s(){f();var e=function(){if(!u.length)return;var e,i,o=u.filter((function(e){return e.responseEnd<=r+t.maxToleranceForResourceTimingsMillis&&!X.has(e)}));if(!o.length)return;1===o.length&&(e=o[0]);if(!e){var a,s=C(o);try{for(s.s();!(a=s.n()).done;){var c=a.value,l=Math.abs(r-n-c.duration)+Math.abs(c.responseEnd-r);(void 0===i||l<i)&&(i=l,e=c)}}catch(t){s.e(t)}finally{s.f()}}if(!e)return;return X.add(e),e}();null!=e&&e.duration&&e.duration<864e5?t.onEnd({resource:e,duration:e.duration}):t.onEnd({resource:e,duration:r-n})}function c(e){e.getEntriesByType("resource").filter((function(e){var r=e;return r.startTime>=n&&t.resourceMatcher(r)})).forEach((function(t){u.length>=100&&u.shift(),u.push(t)}))}function l(){$()||s()}function f(){!function(){if(i){try{var t;null===(t=i)||void 0===t||t.disconnect()}catch(t){}i=void 0}}(),o&&(clearTimeout(o),o=void 0),p(),function(){if(!v)return;t=v,e="visibilitychange",n=l,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function p(){a&&(clearTimeout(a),a=void 0)}}function $(){return"visible"===(null==v?void 0:v.visibilityState)||"prerender"===(null==v?void 0:v.visibilityState)}var J="undefined";function tt(t){return Math.round(100*t)/100}function et(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==v?void 0:v.baseURI)&&void 0!==e?e:null==h?void 0:h.href)}function nt(t){try{return et(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var rt=Symbol.for("INSTRUMENTED_BY_DASH0");function it(t,e,n){var r=t[e];r?!0!==r[rt]?(!function(t){t[rt]=!0}(r),t[e]=n(r)):s("".concat(String(e)," has already been instrumented, skipping")):s("".concat(String(e)," is not defined, unable to instrument"))}var ot={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.18.1",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:50,headersToCapture:[],urlAttributeScrubber:n,pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]},enableTransportCompression:!1},at="service.name",ut="service.version",st="deployment.environment.name",ct="deployment.name",lt="deployment.id",ft="event.name",dt="dash0.web.event.id",vt="page.load.id",pt="user_agent.original",ht="user.id",mt="user.name",yt="user.full_name",gt="user.email",bt="user.hash",Tt="user.roles",Et="exception.message",wt="exception.type",St="exception.stacktrace",At="url.full",Ot={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},It={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},Nt=0,Lt=1,Ct="pushState",Rt="replaceState",_t=1;function xt(){var t,e;return"".concat((t={ephemeralSession:!S},e=0,t.ephemeralSession&&(e|=_t),e.toString(16).padStart(2,"0"))).concat(E(7))}var kt="d0_session",Pt="#",jt=864e5,Dt=null;function Ut(t,e){if(!S)return s("Storage API is not available and session tracking is therefore not supported."),void(Dt=xt());t||(t=108e5),e||(e=216e5),t=Math.min(t,jt),e=Math.min(e,jt);try{var n=function(t){return S&&g?g.getItem(t):null}(kt),r=function(t){if(!t)return null;var e=t.split(Pt);if(e.length<3)return null;var n=e[0],r=parseInt(e[1],10),i=parseInt(e[2],10);if(!n||isNaN(r)||isNaN(i))return null;return{id:n,startTime:r,lastActivityTime:i}}(n);r&&!function(t,e,n){var r=M()-e;if(t.lastActivityTime<r)return!1;var i=M()-n;return t.startTime>=i}(r,t,e)&&(r=null),r?r.lastActivityTime=M():r={id:xt(),startTime:M(),lastActivityTime:M()},function(t,e){S&&g&&g.setItem(t,e)}(kt,function(t){return t.id+Pt+t.startTime+Pt+t.lastActivityTime}(r)),Dt=r.id}catch(t){a("Failed to record session information",t)}}var Mt=-1,Ft=function(t){addEventListener("pageshow",(function(e){e.persisted&&(Mt=e.timeStamp,t(e))}),!0)},Vt=function(t,e,n,r){var i,o;return function(a){e.value>=0&&(a||r)&&(((o=e.value-(null!=i?i:0))||void 0===i)&&(i=e.value,e.delta=o,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,n),t(e)))}},Bt=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Ht=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},Wt=function(){var t,e=Ht();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},qt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Ht(),r="navigate";return Mt>=0?r="back-forward-cache":n&&(document.prerendering||Wt()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:"v5-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},zt=new WeakMap;function Gt(t,e){return zt.get(t)||zt.set(t,new e),zt.get(t)}var Kt,Zt=function(){return L((function t(){N(this,t),R(this,"t",void 0),R(this,"i",0),R(this,"o",[])}),[{key:"h",value:function(t){var e;if(!t.hadRecentInput){var n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),null===(e=this.t)||void 0===e||e.call(this,t)}}}])}(),Yt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach((function(e){R(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:t,buffered:!0},n)),r}}catch(t){}},Xt=function(t){var e=!1;return function(){e||(t(),e=!0)}},Qt=-1,$t=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Jt=function(t){"hidden"===document.visibilityState&&Qt>-1&&(Qt="visibilitychange"===t.type?t.timeStamp:0,ee())},te=function(){addEventListener("visibilitychange",Jt,!0),addEventListener("prerenderingchange",Jt,!0)},ee=function(){removeEventListener("visibilitychange",Jt,!0),removeEventListener("prerenderingchange",Jt,!0)},ne=function(){if(Qt<0){var t,e=Wt(),n=document.prerendering||null===(t=globalThis.performance.getEntriesByType("visibility-state").filter((function(t){return"hidden"===t.name&&t.startTime>e}))[0])||void 0===t?void 0:t.startTime;Qt=null!=n?n:$t(),te(),Ft((function(){setTimeout((function(){Qt=$t(),te()}))}))}return{get firstHiddenTime(){return Qt}}},re=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},ie=[1800,3e3],oe=[.1,.25],ae=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};re((function(){var n,r=ne(),i=qt("FCP"),o=Yt("paint",(function(t){var e,a=C(t);try{for(a.s();!(e=a.n()).done;){var u=e.value;"first-contentful-paint"===u.name&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-Wt(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=Vt(t,i,ie,e.reportAllChanges),Ft((function(r){i=qt("FCP"),n=Vt(t,i,ie,e.reportAllChanges),Bt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(Xt((function(){var n,r=qt("CLS",0),i=Gt(e,Zt),o=function(t){var e,o=C(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;i.h(a)}}catch(t){o.e(t)}finally{o.f()}i.i>r.value&&(r.value=i.i,r.entries=i.o,n())},a=Yt("layout-shift",o);a&&(n=Vt(t,r,oe,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),Ft((function(){i.i=0,r=qt("CLS",0),n=Vt(t,r,oe,e.reportAllChanges),Bt((function(){return n()}))})),setTimeout(n))})))},ue=0,se=1/0,ce=0,le=function(t){var e,n=C(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(se=Math.min(se,r.interactionId),ce=Math.max(ce,r.interactionId),ue=ce?(ce-se)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},fe=function(){var t;return Kt?ue:null!==(t=performance.interactionCount)&&void 0!==t?t:0},de=0,ve=function(){return L((function t(){N(this,t),R(this,"u",[]),R(this,"l",new Map),R(this,"m",void 0),R(this,"v",void 0)}),[{key:"p",value:function(){de=fe(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((fe()-de)/50));return this.u[t]}},{key:"h",value:function(t){var e;if(null!==(e=this.m)&&void 0!==e&&e.call(this,t),t.interactionId||"first-input"===t.entryType){var n=this.u.at(-1),r=this.l.get(t.interactionId);if(r||this.u.length<10||t.duration>n.T){var i;if(r?t.duration>r.T?(r.entries=[t],r.T=t.duration):t.duration===r.T&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],T:t.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((function(t,e){return e.T-t.T})),this.u.length>10){var o,a=C(this.u.splice(10));try{for(a.s();!(o=a.n()).done;){var u=o.value;this.l.delete(u.id)}}catch(t){a.e(t)}finally{a.f()}}null===(i=this.v)||void 0===i||i.call(this,r)}}}}])}(),pe=function(t){var e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=Xt(t),document.addEventListener("visibilitychange",t,{once:!0}),e((function(){t(),document.removeEventListener("visibilitychange",t)})))},he=[200,500],me=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&re((function(){var n;"interactionCount"in performance||Kt||(Kt=Yt("event",le,{type:"event",buffered:!0,durationThreshold:0}));var r,i=qt("INP"),o=Gt(e,ve),a=function(t){pe((function(){var e,n=C(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;o.h(a)}}catch(t){n.e(t)}finally{n.f()}var u=o.P();u&&u.T!==i.value&&(i.value=u.T,i.entries=u.entries,r())}))},u=Yt("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Vt(t,i,he,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),Ft((function(){o.p(),i=qt("INP"),r=Vt(t,i,he,e.reportAllChanges)})))}))},ye=function(){return L((function t(){N(this,t),R(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),ge=[2500,4e3],be=!1;function Te(t){var e,n,r=[];return n=i,be&&n(),v&&d&&(w(v,"visibilitychange",(function(){"visible"!==v.visibilityState&&n()})),w(d,"pagehide",(function(){be=!0,n()})),w(d,"beforeunload",(function(){be=!0,n()}))),{send:function(n){"visible"===(null==v?void 0:v.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=q(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}function Ee(t,e){return we.apply(this,arguments)}function we(){return we=I(x().mark((function t(n,r){var i,o,u,c;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s("Transmitting telemetry to endpoints",r),i=JSON.stringify(r),o=i,u=i.length,c=!1,"undefined"==typeof CompressionStream||!ot.enableTransportCompression){t.next=11;break}return t.next=8,Se(i);case 8:o=t.sent,u=o.byteLength,c=!0;case 11:return t.next=13,Promise.all(ot.endpoints.map(function(){var t=I(x().mark((function t(r){var i,s,l;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,(i=new URL(r.url)).pathname=i.pathname+(i.pathname.endsWith("/")?n.substring(1):n),s={"Content-Type":"application/json",Authorization:"Bearer ".concat(r.authToken)},r.dataset&&(s["Dash0-Dataset"]=r.dataset),c&&(s["Content-Encoding"]="gzip"),y){t.next=9;break}return a("Unable to send telemetry, fetch is not defined"),t.abrupt("return");case 9:return t.next=11,y(i,{method:"POST",headers:s,body:o,keepalive:u<=6e4});case 11:(l=t.sent).text().catch(e),l.ok||a("Failed to send telemetry to ".concat(i,": ").concat(l.status," ").concat(l.statusText)),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(0),a("Error sending telemetry to ".concat(r.url).concat(n,":"),t.t0);case 19:case"end":return t.stop()}}),t,null,[[0,16]])})));return function(e){return t.apply(this,arguments)}}()));case 13:case"end":return t.stop()}}),t)}))),we.apply(this,arguments)}function Se(t){return Ae.apply(this,arguments)}function Ae(){return(Ae=I(x().mark((function t(e){var n,r,i;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new Blob([e]),r=n.stream(),i=r.pipeThrough(new CompressionStream("gzip")),t.abrupt("return",new Response(i).arrayBuffer());case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Oe,Ie=Te((function(t){Ee("/v1/logs",{resourceLogs:[{resource:ot.resource,scopeLogs:[{scope:ot.scope,logRecords:t}]}]}).catch((function(t){u("Failed to transmit logs",t)}))})),Ne=Te((function(t){Ee("/v1/traces",{resourceSpans:[{resource:ot.resource,scopeSpans:[{scope:ot.scope,spans:t}]}]}).catch((function(t){u("Failed to transmit spans",t)}))}));function Le(){var t,e,n,r,i;return Oe||(e=(t={maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCallsPerTenMinutes,n=t.maxCallsPerTenSeconds,r=0,i=0,G((function(){r=0}),6e5),G((function(){i=0}),1e4),Oe=function(){return++r>e||++i>n}),Oe()}function Ce(t){Le()?s("Transport rate limit. Will not send item.",t):Ie.send(t)}function Re(t){t&&(Le()?s("Transport rate limit. Will not send item.",t):Ne.send(t))}var _e=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function xe(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return xe(t)}))}:"string"==typeof t?e.stringValue=t:"number"==typeof t?e.doubleValue=t:"boolean"==typeof t?e.boolValue=t:!function(t){if(null==t||"object"!==D(t))return!1;var e=Object.keys(t);return 1===e.length&&_e.includes(e[0])}(t)?"object"===D(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=k(t,2);return ke(e[0],e[1])}))}):e=t,e}}function ke(t,e){return{key:t,value:xe(e)}}function Pe(t,e,n){e&&t.push(ke(e,n))}function je(t,e){e&&Object.entries(e).forEach((function(e){var n=k(e,2),r=n[0],i=n[1];return Pe(t,r,i)}))}function De(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var Ue="traceparent",Me=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function Fe(){var t,e,n=((null===(t=Array.from(null!==(e=null==v?void 0:v.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===Ue})))||void 0===t?void 0:t.content.trim())||"").match(Me)||function(){var t=m.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=C(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===Ue)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(Me);if(n)return{traceId:n[1],spanId:n[2]}}function Ve(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}function Be(t,e,n){var r,i,o,a=(r=n.traceId,i=r.substring(0,8),o=r.substring(8,32),"1-".concat(i,"-").concat(o)),u="Root=".concat(a,";Parent=").concat(n.spanId,";Sampled=1");t.call(e,"X-Amzn-Trace-Id",u)}var He="d042",We=1;function qe(t){var e=0;return t.withoutSession&&(e|=We),e.toString(16).padStart(2,"0")}for(var ze=new Uint32Array(256),Ge=0;Ge<256;Ge++){for(var Ke=Ge,Ze=0;Ze<8;Ze++)Ke=1&Ke?3988292384^Ke>>>1:Ke>>>1;ze[Ge]=Ke>>>0}function Ye(t){var e=function(t){for(var e=new Uint8Array(t.length/2),n=0;n<t.length;n+=2)e[n/2]=parseInt(t.substring(n,n+2),16);for(var r=4294967295,i=0;i<e.length;i++){var o=e[i];r=r>>>8^ze[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(E(4))}function Xe(t){var e=function(t){return t?"".concat(He).concat(qe({withoutSession:!1})).concat(t).concat(E(5)):"".concat(He).concat(qe({withoutSession:!0})).concat(E(13))}(Dt),n=Ye(e),r=[];return Pe(r,dt,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:F(),attributes:r,events:[],links:[],status:{code:0}}}function Qe(t,e,n){var r=t;if(!r.endTimeUnixNano)return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):F(),r;s("Attempting to end already ended span. Dropping...",r)}function $e(t,e,n,r){var i=void 0,o=void 0;"string"==typeof n?i=n:Array.isArray(n)&&(o=n),t.events.push({name:e,timeUnixNano:null!=i?i:F(),attributes:null!=o?o:[]})}function Je(t,e,r){var i=function(t){return t?Array.isArray(t)?function(e){return[].concat(P(t),[e]).join(".")}:function(e){return"".concat(t,".").concat(e)}:function(t){return t}}(r);try{var o=et(e);o.username&&(o.username="REDACTED"),o.password&&(o.password="REDACTED");var a=ot.urlAttributeScrubber(R(R(R(R(R(R({},At,o.href),"url.path",o.pathname),"url.domain",o.hostname),"url.scheme",o.protocol.replace(":","")),"url.fragment",o.hash?o.hash.replace("#",""):void 0),"url.query",o.search?o.search.replace("?",""):void 0));Object.entries(a).forEach((function(e){var n=k(e,2),r=n[0],o=n[1];void 0!==o&&Pe(t,i(r),o)}))}catch(r){ot.urlAttributeScrubber===n&&Pe(t,i(At),String(e))}}var tn=null!=b&&"function"==typeof b.getItem&&"function"==typeof b.setItem;var en="d0_tab",nn=null;function rn(){if(tn)try{var t=function(t){return tn&&b?b.getItem(t):null}(en);if(t)return void(nn=t);nn=E(8),function(t,e){tn&&b&&b.setItem(t,e)}(en,nn)}catch(t){a("Failed to record tab ID information",t)}else s("Storage API is not available and tab tracking is therefore not supported.")}function on(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===dt}))&&Pe(t,dt,E(8));for(var u=0;u<ot.signalAttributes.length;u++)t.push(ot.signalAttributes[u]);Je(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==d?void 0:d.location.href)&&void 0!==n?n:J,"page"),Dt&&Pe(t,"session.id",Dt),nn&&Pe(t,"browser.tab.id",nn),Pe(t,"browser.window.width",null!==(i=null==d?void 0:d.innerWidth)&&void 0!==i?i:J),Pe(t,"browser.window.height",null!==(o=null==d?void 0:d.innerHeight)&&void 0!==o?o:J);var s=null==p||null===(a=p.connection)||void 0===a?void 0:a.effectiveType;s&&Pe(t,"network.connection.subtype",s)}function an(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};re((function(){var n,r=ne(),i=qt("LCP"),o=Gt(e,ye),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=C(t);try{for(u.s();!(a=u.n()).done;){var s=a.value;o.h(s),s.startTime<r.firstHiddenTime&&(i.value=Math.max(s.startTime-Wt(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=Yt("largest-contentful-paint",a);if(u){n=Vt(t,i,ge,e.reportAllChanges);for(var s=Xt((function(){a(u.takeRecords()),u.disconnect(),n(!0)})),c=0,l=["keydown","click","visibilitychange"];c<l.length;c++)addEventListener(l[c],(function(){return pe(s)}),{capture:!0,once:!0});Ft((function(r){i=qt("LCP"),n=Vt(t,i,ge,e.reportAllChanges),Bt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}(un,{reportAllChanges:!0}),me(un,{reportAllChanges:!0}),ae(un,{reportAllChanges:!0})}function un(t){var e=[];Pe(e,ft,Ot.WEB_VITAL);var n=[];Pe(n,"name",t.name),Pe(n,"value",tt(t.value)),Pe(n,"delta",tt(t.delta));var r={timeUnixNano:F(),attributes:e,severityNumber:It.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};on(r.attributes),Ce(r)}function sn(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var cn="data:";function ln(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===cn||(!!function(t){for(var e=t.toLowerCase(),n=0,r=ot.endpoints.length;n<r;n++){var i=ot.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||sn(ot.ignoreUrls,t))))}var fn,dn=0,vn=0,pn={},hn=!1;function mn(){hn=!0}function yn(t,e){t&&gn("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function gn(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(dn>100)&&!function(t){return!t||sn(ot.ignoreErrorMessages,t)}(e)){vn>=20&&(pn={},vn=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==d?void 0:d.location.href),a=pn[o];if(a)a.seenCount++;else{var u=[];on(u),Pe(u,ft,Ot.ERROR),Pe(u,Et,e),n&&Pe(u,wt,n),r&&Pe(u,St,r),null!=i&&i.componentStack&&Pe(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),je(u,null==i?void 0:i.attributes),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:F(),attributes:u,severityNumber:It.ERROR,severityText:"ERROR",body:{stringValue:e}}},pn[o]=a,vn++}!function(){if(fn)return;fn=setTimeout(bn,1e3)}()}}function bn(){for(var t in fn&&(clearTimeout(fn),fn=null),pn)if(f(pn,t)){var e=pn[t];e.seenCount>e.transmittedCount&&(Ce(e.log),dn++)}pn={},vn=0}var Tn="Unhandled promise rejection: ",En="<unavailable because Promise wasn't rejected with an Error object>";function wn(t){null==t.reason?yn({message:Tn+"<no reason defined>",stack:En}):"string"==typeof t.reason.message?yn({message:Tn+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:En}):"object"!==D(t.reason)&&yn({message:Tn+t.reason,stack:En})}var Sn="__dash0OriginalFunctions";function An(t,e){for(var n=t[Sn],r=0;r<n.length;r++){if(On(n[r].valuesForEqualityCheck,e))return r}return-1}function On(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function In(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[Sn]=t[Sn]||[],i=An(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,Nn(n,r,i))}function Nn(t,e,n){return[t,e,Ln(n)]}function Ln(t){return null!=t&&("object"===D(t)?Boolean(t.capture):Boolean(t))}function Cn(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[Sn];if(null==r)return n;var i=An(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,Nn(e,n,r),i)}function Rn(){ot.wrapEventHandlers&&function(t){if(!t||"function"!=typeof t.prototype.addEventListener||"function"!=typeof t.prototype.removeEventListener)return;var e=t.prototype.addEventListener,n=t.prototype.removeEventListener;t.prototype.addEventListener=function(t,n,r){if("function"!=typeof n)return e.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=function(){try{return n.apply(this,arguments)}catch(t){throw yn(t),mn(),t}},i[1]=In(this,i[1],t,n,r),e.apply(this,i)},t.prototype.removeEventListener=function(t,e,r){if("function"!=typeof e)return n.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=Cn(this,t,e,r,e),n.apply(this,i)}}(null==d?void 0:d.EventTarget)}function _n(t){var e=null==d?void 0:d[t];"function"==typeof e&&(d[t]=function(t){for(var n=new Array(arguments.length),r=0;r<arguments.length;r++)n[r]=arguments[r];return n[0]=function(t){if("function"!=typeof t)return t;return function(){try{return t.apply(this,arguments)}catch(t){throw reportError(t),mn(),t}}}(t),e.apply(this,n)})}function xn(){!function(){if(d){var t=d.onerror;d.onerror=function(e,n,r,i,o){if(hn)return hn=!1,"function"==typeof t?t.apply(this,arguments):void 0;var a=o&&o.stack;return a||(a="at "+n+" "+r,null!=i&&(a+=":"+i)),gn({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==d?void 0:d.addEventListener)&&d.addEventListener("unhandledrejection",wn),Rn(),function(){if(ot.wrapTimers){if(W)return void a("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");_n("setTimeout"),_n("setInterval")}}()}var kn=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function Pn(t){return kn.includes(t)}function jn(t,e){var n=0!==e.startTime;Dn(t,Y.FETCH_START,e,n),Dn(t,Y.DOMAIN_LOOKUP_START,e,n),Dn(t,Y.DOMAIN_LOOKUP_END,e,n),Dn(t,Y.CONNECT_START,e,n),Dn(t,Y.SECURE_CONNECTION_START,e,n),Dn(t,Y.CONNECT_END,e,n),Dn(t,Y.REQUEST_START,e,n),Dn(t,Y.RESPONSE_START,e,n),Dn(t,Y.RESPONSE_END,e,n)}function Dn(t,e,n){var r,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];!(e in n)||"number"!=typeof n[e]||i&&0===n[e]||$e(t,e,(r=n[e],String(Math.round(1e6*(r+B())))))}function Un(t,e){var n=e.encodedBodySize;null!=n&&Pe(t.attributes,"http.response.body.size",n)}function Mn(t){return function(){var e=I(x().mark((function e(n,r){var i,o,a,u,c,l,f,d,v,p,h,m,y,g,b;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r?Object.assign({},r):r,u=null,null!==(i=a)&&void 0!==i&&i.body&&(u=a.body,a.body=void 0),c=new Request(n,a),u&&a&&(a.body=u),!ln(l=c.url)){e.next=9;break}return s("Not creating span for fetch call because the url is ignored, URL: ".concat(l)),e.abrupt("return",t(n instanceof Request?c:n,r));case 9:return f=null!==(o=c.method)&&void 0!==o?o:"GET",d=Pn(f),v=Pn(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",on((h=Xe("HTTP ".concat(p))).attributes),Je(h.attributes,l),Fn(n,r),Pe(h.attributes,"http.request.method",p),d||Pe(h.attributes,"http.request.method_original",f),m=qn(l),m.length>0&&(null!==(y=a)&&void 0!==y&&y.headers?(a.headers=new Headers(a.headers),zn(a.headers.append,a.headers,h,m)):n instanceof Request?zn(c.headers.append,c.headers,h,m):(a||(a={}),a.headers=new Headers,zn(a.headers.append,a.headers,h,m))),Vn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(g=Q({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===et(l).href},maxWaitForResourceMillis:ot.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:ot.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(jn(h,n),Un(h,n)),Re(Qe(h,void 0,1e6*e))}})).start(),e.prev=25,e.next=28,t(n instanceof Request?c:n,a);case 28:return b=e.sent,Bn(h,b),e.abrupt("return",Hn(b,ot.maxToleranceForResourceTimingsMillis,(function(){return g.end()}),(function(t){g.cancel(),Wn(h,t)})));case 33:throw e.prev=33,e.t0=e.catch(25),g.cancel(),Wn(h,e.t0),e.t0;case 38:case"end":return e.stop()}}),e,null,[[25,33]])})));return function(t,n){return e.apply(this,arguments)}}()}function Fn(t,e,n){try{return void 0}catch(n){s("failed to analyze request for GraphQL insights",n,t,e)}}function Vn(t,e,n){try{if(!ot.headersToCapture.length)return;t.forEach((function(t,r){ot.headersToCapture.some((function(t){return t.test(r)}))&&Pe(e.attributes,n(r),t)}))}catch(t){s("unable to capture http headers due to CORS policy")}}function Bn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2),0===n&&Pe(t.attributes,"error.type",e.type),Pe(t.attributes,"http.response.status_code",String(n)),Vn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function Hn(t,e,n,r){var i,o,a=m.now(),u=t.body;if(!(u&&(i=t,o=i.status,o>=200&&204!=o&&205!=o&&304!=o)))return n(),t;var s=!1,c=function(t){s||(n(t),s=!0)},l=function(t){s||(r(t),s=!0)},f=q((function(){return c(a)}),e),d=u.getReader(),v=new ReadableStream({pull:function(t){return I(x().mark((function n(){var r,i;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,z(f),n.next=4,d.read();case 4:r=n.sent,i=r.value,r.done?(d.releaseLock(),t.close(),c()):(a=m.now(),f=q((function(){return c(a)}),e),t.enqueue(i)),n.next=15;break;case 10:n.prev=10,n.t0=n.catch(0),l(n.t0),t.error(n.t0);try{d.releaseLock()}catch(t){}case 15:case"end":return n.stop()}}),n,null,[[0,10]])})))()},cancel:function(t){return z(f),c(),d.cancel(t)}});return new Response(v,{status:t.status,statusText:t.statusText,headers:t.headers})}function Wn(t,e){!function(t,e){var n=[];"string"==typeof e?Pe(n,Et,e):e&&(e.code?Pe(n,wt,e.code.toString()):e.name&&Pe(n,wt,e.name),e.message&&Pe(n,Et,e.message),e.stack&&Pe(n,St,e.stack),$e(t,"exception",n))}(t,e),Re(Qe(t,function(t){return{code:2,message:t&&"object"===D(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function qn(t){var e=[];if(nt(t)){if(e.push("traceparent"),ot.propagators){var n,r=C(ot.propagators);try{for(r.s();!(n=r.n()).done;){var i=n.value;"traceparent"===i.type||e.includes(i.type)||e.push(i.type)}}catch(t){r.e(t)}finally{r.f()}}return e}if(ot.propagators){var o,a=C(ot.propagators);try{for(a.s();!(o=a.n()).done;){var u=o.value;sn(u.match,t)&&(e.includes(u.type)||e.push(u.type))}}catch(t){a.e(t)}finally{a.f()}return e}return[]}function zn(t,e,n,r){var i,o=C(r);try{for(o.s();!(i=o.n()).done;){"xray"===i.value?Be(t,e,n):Ve(t,e,n)}}catch(t){o.e(t)}finally{o.f()}}function Gn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=ot.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];Pe(u,ft,Ot.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=k(t,2),n=e[0],r=e[1];return Pe(u,n,r)})),on(u,{url:e});var s=[];Pe(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==v?void 0:v.title)&&void 0!==i?i:J),null!=v&&v.referrer&&Pe(s,"referrer",v.referrer),Pe(s,"type",n?Lt:Nt),Pe(s,"change_state",r?Rt:Ct);var c={timeUnixNano:t,attributes:u,severityNumber:It.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},l=Fe();l&&(c.traceId=l.traceId,c.spanId=l.spanId),Ce(c)}function Kn(){var t=null==d?void 0:d.performance.getEntriesByType("navigation")[0];if(t){var e=[];Pe(e,ft,Ot.NAVIGATION_TIMING);var n=[];Pe(n,"name",t.name),Zn(n,t,"responseStatus"),Zn(n,t,"fetchStart"),Zn(n,t,"requestStart"),Zn(n,t,"responseStart"),Zn(n,t,"domInteractive"),Zn(n,t,"domContentLoadedEventEnd"),Zn(n,t,"domComplete"),Zn(n,t,"loadEventEnd"),Zn(n,t,"transferSize"),Zn(n,t,"encodedBodySize"),Zn(n,t,"decodedBodySize");var r={timeUnixNano:Yn(),attributes:e,severityNumber:It.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};on(r.attributes);var i=Fe();i&&(r.traceId=i.traceId,r.spanId=i.spanId),Ce(r)}else s("Navigation timings not available. Cannot emit navigation timing log")}function Zn(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||Pe(t,n,Number.isInteger(r)?r:tt(r))}function Yn(){return V(Math.round(B()))}var Xn={},Qn=!1,$n=!1;function Jn(){er(null==d?void 0:d.location.href)}function tr(t){er(t.newURL)}function er(t,e){var n;if(t)try{var r=new URL(t,null==d?void 0:d.location.href);((n=r).pathname!==Xn.path||$n&&n.search!==Xn.search||Qn&&n.hash!==Xn.hash)&&(nr(r),Gn(F(),r,!0,Boolean(e)))}catch(t){s("Failed to handle url change",t)}}function nr(t){Xn.path=t.pathname,Xn.search=t.search,Xn.hash=t.hash}function rr(){!function(){try{Gn(Yn(),null!=d&&d.location.href?new URL(null==d?void 0:d.location.href):void 0)}catch(t){u("Failed to transmit initial page view event",t)}if("complete"===(null==v?void 0:v.readyState))return Kn();d&&w(d,"load",(function(){setTimeout(Kn,0)}))}(),function(){var t,e,n,r;if(d&&d.history){if(ot.pageViewInstrumentation.trackVirtualPageViews){$n=null!==(t=null===(e=ot.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,Qn=null!==(n=null===(r=ot.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,it(d.history,"replaceState",(function(t){return function(e,n,r){return er(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),it(d.history,"pushState",(function(t){return function(e,n,r){return er(r?String(r):void 0),t.apply(this,[e,n,r])}})),d.addEventListener("hashchange",tr),d.addEventListener("popstate",Jn);try{nr(new URL(d.location.href))}catch(t){}}}else s("Browser does not support history API, skipping instrumentation")}()}var ir=function(t){if("object"===D(t)&&null!==t){if("function"==typeof Object.getPrototypeOf){var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1},or=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce((function(t,e){if(void 0===e)return t;if(Array.isArray(e))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(e).forEach((function(n){["__proto__","constructor","prototype"].includes(n)||(Array.isArray(t[n])&&Array.isArray(e[n])?t[n]=or.options.mergeArrays?or.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(P(t[n]),P(e[n])):e[n]:ir(t[n])&&ir(e[n])?t[n]=or(t[n],e[n]):!ir(t[n])&&ir(e[n])?t[n]=or(e[n],void 0):t[n]=void 0===e[n]?or.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},ar={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};or.options=ar,or.withOptions=function(t){or.options=Object.assign(Object.assign({},ar),t);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=or.apply(void 0,n);return or.options=ar,i};var ur=!1;function sr(t){if(ur)s("Dash0 SDK is being reinitialized, skipping ...");else if(null!=d)if("function"==typeof y&&m&&m.getEntriesByType){var e;if(!t.serviceName.trim())s("Missing or empty serviceName value. Falling back to location.hostname."),t.serviceName=null!==(e=null==h?void 0:h.hostname)&&void 0!==e?e:"unknown";ot.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==ot.endpoints.length?(Object.assign(ot,or(ot,function(t,e){var n,r={},i=C(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;o in t&&(r[o]=t[o])}}catch(t){i.e(t)}finally{i.f()}return r}(t,["ignoreUrls","ignoreErrorMessages","wrapEventHandlers","wrapTimers","propagateTraceHeadersCorsURLs","maxWaitForResourceTimingsMillis","maxToleranceForResourceTimingsMillis","headersToCapture","urlAttributeScrubber","pageViewInstrumentation","enableTransportCompression"]))),function(t){t.propagators?(t.propagateTraceHeadersCorsURLs&&a("Both 'propagators' and deprecated 'propagateTraceHeadersCorsURLs' were provided. Using 'propagators' configuration. Please migrate to the new 'propagators' config."),ot.propagators=t.propagators):t.propagateTraceHeadersCorsURLs&&t.propagateTraceHeadersCorsURLs.length>0?(a("'propagateTraceHeadersCorsURLs' is deprecated. Please use the new 'propagators' configuration."),ot.propagators=[{type:"traceparent",match:P(t.propagateTraceHeadersCorsURLs)}]):ot.propagators=[{type:"traceparent",match:[]}]}(t),function(t){Pe(ot.resource.attributes,at,t.serviceName),t.serviceVersion&&Pe(ot.resource.attributes,ut,t.serviceVersion);var e=function(t){if(t.environment)return t.environment;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_ENV}catch(t){return}}(t);e&&Pe(ot.resource.attributes,st,e);var n=function(t){if(t.deploymentName)return t.deploymentName;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_TARGET_ENV}catch(t){return}}(t);n&&Pe(ot.resource.attributes,ct,n);var r=function(t){if(t.deploymentId)return t.deploymentId;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_BRANCH_URL}catch(t){return}}(t);r&&Pe(ot.resource.attributes,lt,r)}(t),function(t){var e;Pe(ot.signalAttributes,vt,E(16)),Pe(ot.signalAttributes,pt,null!==(e=null==p?void 0:p.userAgent)&&void 0!==e?e:J),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=k(t,2),n=e[0],r=e[1];Pe(ot.signalAttributes,n,r)}))}(t),rn(),Ut(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),cr("@dash0/navigation",t)&&rr(),cr("@dash0/web-vitals",t)&&an(),cr("@dash0/error",t)&&xn(),cr("@dash0/fetch",t)&&(d&&d.fetch&&d.Request?it(d,"fetch",Mn):s("Browser does not support the Fetch API, skipping instrumentation")),ur=!0):a("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")}else s("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs.");else s("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")}function cr(t,e){var n=e.enabledInstrumentations;return!n||n.includes(t)}t.addSignalAttribute=function(t,e){Pe(ot.signalAttributes,t,e)},t.debug=function(){s("Dash0 Web SDK configuration state:",ot)},t.identify=function(t,e){De(ot.signalAttributes,ht),null!=t&&Pe(ot.signalAttributes,ht,t),De(ot.signalAttributes,mt),null!=(null==e?void 0:e.name)&&Pe(ot.signalAttributes,mt,e.name),De(ot.signalAttributes,yt),null!=(null==e?void 0:e.fullName)&&Pe(ot.signalAttributes,yt,e.fullName),De(ot.signalAttributes,gt),null!=(null==e?void 0:e.email)&&Pe(ot.signalAttributes,gt,e.email),De(ot.signalAttributes,bt),null!=(null==e?void 0:e.hash)&&Pe(ot.signalAttributes,bt,e.hash),De(ot.signalAttributes,Tt),null!=(null==e?void 0:e.roles)&&Pe(ot.signalAttributes,Tt,e.roles)},t.init=function(t){s("".concat("Initializing Dash0 Web SDK"," (via package)")),sr(t)},t.removeSignalAttribute=function(t){De(ot.signalAttributes,t)},t.reportError=function(t,e){yn(t,e)},t.sendEvent=function(t,e){if(Object.values(Ot).includes(t))a("Unable to send custom event ".concat(t,". You are not allowed to use an internal event name while sending a custom event. Dropping event..."));else{var n=[];on(n),Pe(n,ft,t),null!=e&&e.title&&Pe(n,"dash0.web.event.title",e.title),je(n,null==e?void 0:e.attributes),Ce({timeUnixNano:null!=(null==e?void 0:e.timestamp)?V(e.timestamp):F(),attributes:n,body:xe(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?It[e.severity]:void 0})}},t.setActiveLogLevel=function(t){var e;i=null!==(e=r[t])&&void 0!==e?e:r.warn},t.terminateSession=function(){if(S)try{!function(t){S&&g&&g.removeItem(t)}(kt)}catch(t){o("Failed to terminate session",t)}}}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).dash0={})}(this,(function(t){"use strict";function e(){}function n(t){return t}var r={debug:0,info:1,warn:2,error:3},i=r.warn;var o=c("info"),a=c("warn"),u=c("error"),s=c("debug");function c(t){if("undefined"!=typeof console&&console[t]&&"function"==typeof console[t].apply){var n=r[t];return function(){n>=i&&console[t].apply(console,arguments)}}return e}var l=Object.prototype.hasOwnProperty;function f(t,e){return l.call(t,e)}var d="undefined"!=typeof window?window:void 0,v=null==d?void 0:d.document,p=null==d?void 0:d.navigator,h="undefined"!=typeof location?location:void 0,m=(null==d?void 0:d.performance)||(null==d?void 0:d.webkitPerformance)||(null==d?void 0:d.msPerformance)||(null==d?void 0:d.mozPerformance);null==d||d.encodeURIComponent;var y=null==d?void 0:d.fetch,g=function(){try{var t;return null!==(t=null==d?void 0:d.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),b=function(){try{var t;return null!==(t=null==d?void 0:d.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),T=Array(32);function E(t){for(var e=0;e<2*t;e++)T[e]=Math.floor(16*Math.random())+48,T[e]>=58&&(T[e]+=39);return String.fromCharCode.apply(null,T.slice(0,2*t))}function w(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var S=null!=g&&"function"==typeof g.getItem&&"function"==typeof g.setItem;function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function O(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function I(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){O(o,r,i,a,u,"next",t)}function u(t){O(o,r,i,a,u,"throw",t)}a(void 0)}))}}function N(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function L(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,j(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function C(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=U(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function R(t,e,n){return(e=j(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function x(){x=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),u=new R(r||[]);return i(a,"_invoke",{value:I(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",v="suspendedYield",p="executing",h="completed",m={};function y(){}function g(){}function b(){}var T={};c(T,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(_([])));w&&w!==n&&r.call(w,a)&&(T=w);var S=b.prototype=y.prototype=Object.create(T);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,u){var s=f(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function I(e,n,r){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===h){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?h:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=h,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function _(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},A(O.prototype),c(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=_,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:_(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e);else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||U(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||U(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function U(t,e){if(t){if("string"==typeof t)return A(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}function M(){return(new Date).getTime()}function F(){var t=B();return t?String(1e6*(m.now()+t)):V(new Date)}function V(t){return"object"===D(t)?V(t.getTime()):String(t)+"000000"}function B(){var t,e=null==m?void 0:m.timeOrigin;"number"!=typeof e&&(e=null==m||null===(t=m.timing)||void 0===t?void 0:t.fetchStart);return e}var H={setTimeout:null==d?void 0:d.setTimeout,clearTimeout:null==d?void 0:d.clearTimeout,setInterval:null==d?void 0:d.setInterval,clearInterval:null==d?void 0:d.clearInterval},W=null!=d&&null!=d.Zone&&null!=d.Zone.root&&"function"==typeof d.Zone.root.run;function q(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("setTimeout",arguments)}function z(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("clearTimeout",arguments)}function G(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return K.apply("setInterval",arguments)}function K(){var t,e=this;if(W)try{var n=Array.prototype.slice.apply(arguments);return d.Zone.root.run(H[e],d,n)}catch(t){a("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=H[e])||void 0===t?void 0:t.apply(d,arguments)}W&&s("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");m&&m.getEntriesByType;var Z=m&&"function"==typeof d.PerformanceObserver&&"function"==typeof m.now,Y=Object.freeze({CONNECT_END:"connectEnd",CONNECT_START:"connectStart",DECODED_BODY_SIZE:"decodedBodySize",DOM_COMPLETE:"domComplete",DOM_CONTENT_LOADED_EVENT_END:"domContentLoadedEventEnd",DOM_CONTENT_LOADED_EVENT_START:"domContentLoadedEventStart",DOM_INTERACTIVE:"domInteractive",DOMAIN_LOOKUP_END:"domainLookupEnd",DOMAIN_LOOKUP_START:"domainLookupStart",ENCODED_BODY_SIZE:"encodedBodySize",FETCH_START:"fetchStart",LOAD_EVENT_END:"loadEventEnd",LOAD_EVENT_START:"loadEventStart",NAVIGATION_START:"navigationStart",REDIRECT_END:"redirectEnd",REDIRECT_START:"redirectStart",REQUEST_START:"requestStart",RESPONSE_END:"responseEnd",RESPONSE_START:"responseStart",SECURE_CONNECTION_START:"secureConnectionStart",START_TIME:"startTime",UNLOAD_EVENT_END:"unloadEventEnd",UNLOAD_EVENT_START:"unloadEventStart"}),X=new WeakSet;function Q(t){if(!Z)return function(t){var n=0;return{start:function(){n=M()},end:function(){return t({duration:M()-n})},cancel:e}}(t.onEnd);var n,r,i,o,a,u=[];return{start:function(){n=m.now();try{var t,e=null==d?void 0:d.PerformanceObserver;if(e)null===(t=i=new e(c))||void 0===t||t.observe({type:"resource"})}catch(t){}a=q(f,6e5)},end:function(e){if(r)return;if(r=null!=e?e:m.now(),p(),!$())return s();q((function(){return s()}),Math.min(300,t.maxWaitForResourceMillis)),w(v,"visibilitychange",l),o=q(s,t.maxWaitForResourceMillis)},cancel:f};function s(){f();var e=function(){if(!u.length)return;var e,i,o=u.filter((function(e){return e.responseEnd<=r+t.maxToleranceForResourceTimingsMillis&&!X.has(e)}));if(!o.length)return;1===o.length&&(e=o[0]);if(!e){var a,s=C(o);try{for(s.s();!(a=s.n()).done;){var c=a.value,l=Math.abs(r-n-c.duration)+Math.abs(c.responseEnd-r);(void 0===i||l<i)&&(i=l,e=c)}}catch(t){s.e(t)}finally{s.f()}}if(!e)return;return X.add(e),e}();null!=e&&e.duration&&e.duration<864e5?t.onEnd({resource:e,duration:e.duration}):t.onEnd({resource:e,duration:r-n})}function c(e){e.getEntriesByType("resource").filter((function(e){var r=e;return r.startTime>=n&&t.resourceMatcher(r)})).forEach((function(t){u.length>=100&&u.shift(),u.push(t)}))}function l(){$()||s()}function f(){!function(){if(i){try{var t;null===(t=i)||void 0===t||t.disconnect()}catch(t){}i=void 0}}(),o&&(clearTimeout(o),o=void 0),p(),function(){if(!v)return;t=v,e="visibilitychange",n=l,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function p(){a&&(clearTimeout(a),a=void 0)}}function $(){return"visible"===(null==v?void 0:v.visibilityState)||"prerender"===(null==v?void 0:v.visibilityState)}var J="undefined";function tt(t){return Math.round(100*t)/100}function et(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==v?void 0:v.baseURI)&&void 0!==e?e:null==h?void 0:h.href)}function nt(t){try{return et(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var rt=Symbol.for("INSTRUMENTED_BY_DASH0");function it(t,e,n){var r=t[e];r?!0!==r[rt]?(!function(t){t[rt]=!0}(r),t[e]=n(r)):s("".concat(String(e)," has already been instrumented, skipping")):s("".concat(String(e)," is not defined, unable to instrument"))}var ot={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.18.2",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:50,headersToCapture:[],urlAttributeScrubber:n,pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]},enableTransportCompression:!1},at="service.name",ut="service.version",st="deployment.environment.name",ct="deployment.name",lt="deployment.id",ft="event.name",dt="dash0.web.event.id",vt="page.load.id",pt="user_agent.original",ht="user.id",mt="user.name",yt="user.full_name",gt="user.email",bt="user.hash",Tt="user.roles",Et="exception.message",wt="exception.type",St="exception.stacktrace",At="url.full",Ot={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},It={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},Nt=0,Lt=1,Ct="pushState",Rt="replaceState",_t=1;function xt(){var t,e;return"".concat((t={ephemeralSession:!S},e=0,t.ephemeralSession&&(e|=_t),e.toString(16).padStart(2,"0"))).concat(E(7))}var kt="d0_session",Pt="#",jt=864e5,Dt=null;function Ut(t,e){if(!S)return s("Storage API is not available and session tracking is therefore not supported."),void(Dt=xt());t||(t=108e5),e||(e=216e5),t=Math.min(t,jt),e=Math.min(e,jt);try{var n=function(t){return S&&g?g.getItem(t):null}(kt),r=function(t){if(!t)return null;var e=t.split(Pt);if(e.length<3)return null;var n=e[0],r=parseInt(e[1],10),i=parseInt(e[2],10);if(!n||isNaN(r)||isNaN(i))return null;return{id:n,startTime:r,lastActivityTime:i}}(n);r&&!function(t,e,n){var r=M()-e;if(t.lastActivityTime<r)return!1;var i=M()-n;return t.startTime>=i}(r,t,e)&&(r=null),r?r.lastActivityTime=M():r={id:xt(),startTime:M(),lastActivityTime:M()},function(t,e){S&&g&&g.setItem(t,e)}(kt,function(t){return t.id+Pt+t.startTime+Pt+t.lastActivityTime}(r)),Dt=r.id}catch(t){a("Failed to record session information",t)}}var Mt=-1,Ft=function(t){addEventListener("pageshow",(function(e){e.persisted&&(Mt=e.timeStamp,t(e))}),!0)},Vt=function(t,e,n,r){var i,o;return function(a){e.value>=0&&(a||r)&&(((o=e.value-(null!=i?i:0))||void 0===i)&&(i=e.value,e.delta=o,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,n),t(e)))}},Bt=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Ht=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},Wt=function(){var t,e=Ht();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},qt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Ht(),r="navigate";return Mt>=0?r="back-forward-cache":n&&(document.prerendering||Wt()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:"v5-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},zt=new WeakMap;function Gt(t,e){return zt.get(t)||zt.set(t,new e),zt.get(t)}var Kt,Zt=function(){return L((function t(){N(this,t),R(this,"t",void 0),R(this,"i",0),R(this,"o",[])}),[{key:"h",value:function(t){var e;if(!t.hadRecentInput){var n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),null===(e=this.t)||void 0===e||e.call(this,t)}}}])}(),Yt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach((function(e){R(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:t,buffered:!0},n)),r}}catch(t){}},Xt=function(t){var e=!1;return function(){e||(t(),e=!0)}},Qt=-1,$t=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Jt=function(t){"hidden"===document.visibilityState&&Qt>-1&&(Qt="visibilitychange"===t.type?t.timeStamp:0,ee())},te=function(){addEventListener("visibilitychange",Jt,!0),addEventListener("prerenderingchange",Jt,!0)},ee=function(){removeEventListener("visibilitychange",Jt,!0),removeEventListener("prerenderingchange",Jt,!0)},ne=function(){if(Qt<0){var t,e=Wt(),n=document.prerendering||null===(t=globalThis.performance.getEntriesByType("visibility-state").filter((function(t){return"hidden"===t.name&&t.startTime>e}))[0])||void 0===t?void 0:t.startTime;Qt=null!=n?n:$t(),te(),Ft((function(){setTimeout((function(){Qt=$t(),te()}))}))}return{get firstHiddenTime(){return Qt}}},re=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},ie=[1800,3e3],oe=[.1,.25],ae=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};re((function(){var n,r=ne(),i=qt("FCP"),o=Yt("paint",(function(t){var e,a=C(t);try{for(a.s();!(e=a.n()).done;){var u=e.value;"first-contentful-paint"===u.name&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-Wt(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=Vt(t,i,ie,e.reportAllChanges),Ft((function(r){i=qt("FCP"),n=Vt(t,i,ie,e.reportAllChanges),Bt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(Xt((function(){var n,r=qt("CLS",0),i=Gt(e,Zt),o=function(t){var e,o=C(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;i.h(a)}}catch(t){o.e(t)}finally{o.f()}i.i>r.value&&(r.value=i.i,r.entries=i.o,n())},a=Yt("layout-shift",o);a&&(n=Vt(t,r,oe,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),Ft((function(){i.i=0,r=qt("CLS",0),n=Vt(t,r,oe,e.reportAllChanges),Bt((function(){return n()}))})),setTimeout(n))})))},ue=0,se=1/0,ce=0,le=function(t){var e,n=C(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(se=Math.min(se,r.interactionId),ce=Math.max(ce,r.interactionId),ue=ce?(ce-se)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},fe=function(){var t;return Kt?ue:null!==(t=performance.interactionCount)&&void 0!==t?t:0},de=0,ve=function(){return L((function t(){N(this,t),R(this,"u",[]),R(this,"l",new Map),R(this,"m",void 0),R(this,"v",void 0)}),[{key:"p",value:function(){de=fe(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((fe()-de)/50));return this.u[t]}},{key:"h",value:function(t){var e;if(null!==(e=this.m)&&void 0!==e&&e.call(this,t),t.interactionId||"first-input"===t.entryType){var n=this.u.at(-1),r=this.l.get(t.interactionId);if(r||this.u.length<10||t.duration>n.T){var i;if(r?t.duration>r.T?(r.entries=[t],r.T=t.duration):t.duration===r.T&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],T:t.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((function(t,e){return e.T-t.T})),this.u.length>10){var o,a=C(this.u.splice(10));try{for(a.s();!(o=a.n()).done;){var u=o.value;this.l.delete(u.id)}}catch(t){a.e(t)}finally{a.f()}}null===(i=this.v)||void 0===i||i.call(this,r)}}}}])}(),pe=function(t){var e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=Xt(t),document.addEventListener("visibilitychange",t,{once:!0}),e((function(){t(),document.removeEventListener("visibilitychange",t)})))},he=[200,500],me=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&re((function(){var n;"interactionCount"in performance||Kt||(Kt=Yt("event",le,{type:"event",buffered:!0,durationThreshold:0}));var r,i=qt("INP"),o=Gt(e,ve),a=function(t){pe((function(){var e,n=C(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;o.h(a)}}catch(t){n.e(t)}finally{n.f()}var u=o.P();u&&u.T!==i.value&&(i.value=u.T,i.entries=u.entries,r())}))},u=Yt("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Vt(t,i,he,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),Ft((function(){o.p(),i=qt("INP"),r=Vt(t,i,he,e.reportAllChanges)})))}))},ye=function(){return L((function t(){N(this,t),R(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),ge=[2500,4e3],be=!1;function Te(t){var e,n,r=[];return n=i,be&&n(),v&&d&&(w(v,"visibilitychange",(function(){"visible"!==v.visibilityState&&n()})),w(d,"pagehide",(function(){be=!0,n()})),w(d,"beforeunload",(function(){be=!0,n()}))),{send:function(n){"visible"===(null==v?void 0:v.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=q(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}function Ee(t,e){return we.apply(this,arguments)}function we(){return we=I(x().mark((function t(n,r){var i,o,u,c;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s("Transmitting telemetry to endpoints",r),i=JSON.stringify(r),o=i,u=i.length,c=!1,"undefined"==typeof CompressionStream||!ot.enableTransportCompression){t.next=11;break}return t.next=8,Se(i);case 8:o=t.sent,u=o.byteLength,c=!0;case 11:return t.next=13,Promise.all(ot.endpoints.map(function(){var t=I(x().mark((function t(r){var i,s,l;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,(i=new URL(r.url)).pathname=i.pathname+(i.pathname.endsWith("/")?n.substring(1):n),s={"Content-Type":"application/json",Authorization:"Bearer ".concat(r.authToken)},r.dataset&&(s["Dash0-Dataset"]=r.dataset),c&&(s["Content-Encoding"]="gzip"),y){t.next=9;break}return a("Unable to send telemetry, fetch is not defined"),t.abrupt("return");case 9:return t.next=11,y(i,{method:"POST",headers:s,body:o,keepalive:u<=6e4});case 11:(l=t.sent).text().catch(e),l.ok||a("Failed to send telemetry to ".concat(i,": ").concat(l.status," ").concat(l.statusText)),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(0),a("Error sending telemetry to ".concat(r.url).concat(n,":"),t.t0);case 19:case"end":return t.stop()}}),t,null,[[0,16]])})));return function(e){return t.apply(this,arguments)}}()));case 13:case"end":return t.stop()}}),t)}))),we.apply(this,arguments)}function Se(t){return Ae.apply(this,arguments)}function Ae(){return(Ae=I(x().mark((function t(e){var n,r,i;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new Blob([e]),r=n.stream(),i=r.pipeThrough(new CompressionStream("gzip")),t.abrupt("return",new Response(i).arrayBuffer());case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Oe,Ie=Te((function(t){Ee("/v1/logs",{resourceLogs:[{resource:ot.resource,scopeLogs:[{scope:ot.scope,logRecords:t}]}]}).catch((function(t){u("Failed to transmit logs",t)}))})),Ne=Te((function(t){Ee("/v1/traces",{resourceSpans:[{resource:ot.resource,scopeSpans:[{scope:ot.scope,spans:t}]}]}).catch((function(t){u("Failed to transmit spans",t)}))}));function Le(){var t,e,n,r,i;return Oe||(e=(t={maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCallsPerTenMinutes,n=t.maxCallsPerTenSeconds,r=0,i=0,G((function(){r=0}),6e5),G((function(){i=0}),1e4),Oe=function(){return++r>e||++i>n}),Oe()}function Ce(t){Le()?s("Transport rate limit. Will not send item.",t):Ie.send(t)}function Re(t){t&&(Le()?s("Transport rate limit. Will not send item.",t):Ne.send(t))}var _e=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function xe(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return xe(t)}))}:"string"==typeof t?e.stringValue=t:"number"==typeof t?e.doubleValue=t:"boolean"==typeof t?e.boolValue=t:!function(t){if(null==t||"object"!==D(t))return!1;var e=Object.keys(t);return 1===e.length&&_e.includes(e[0])}(t)?"object"===D(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=k(t,2);return ke(e[0],e[1])}))}):e=t,e}}function ke(t,e){return{key:t,value:xe(e)}}function Pe(t,e,n){e&&t.push(ke(e,n))}function je(t,e){e&&Object.entries(e).forEach((function(e){var n=k(e,2),r=n[0],i=n[1];return Pe(t,r,i)}))}function De(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var Ue="traceparent",Me=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function Fe(){var t,e,n=((null===(t=Array.from(null!==(e=null==v?void 0:v.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===Ue})))||void 0===t?void 0:t.content.trim())||"").match(Me)||function(){var t=m.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=C(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===Ue)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(Me);if(n)return{traceId:n[1],spanId:n[2]}}function Ve(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}function Be(t,e,n){var r,i,o,a=(r=n.traceId,i=r.substring(0,8),o=r.substring(8,32),"1-".concat(i,"-").concat(o)),u="Root=".concat(a,";Parent=").concat(n.spanId,";Sampled=1");t.call(e,"X-Amzn-Trace-Id",u)}var He="d042",We=1;function qe(t){var e=0;return t.withoutSession&&(e|=We),e.toString(16).padStart(2,"0")}for(var ze=new Uint32Array(256),Ge=0;Ge<256;Ge++){for(var Ke=Ge,Ze=0;Ze<8;Ze++)Ke=1&Ke?3988292384^Ke>>>1:Ke>>>1;ze[Ge]=Ke>>>0}function Ye(t){var e=function(t){for(var e=new Uint8Array(t.length/2),n=0;n<t.length;n+=2)e[n/2]=parseInt(t.substring(n,n+2),16);for(var r=4294967295,i=0;i<e.length;i++){var o=e[i];r=r>>>8^ze[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(E(4))}function Xe(t){var e=function(t){return t?"".concat(He).concat(qe({withoutSession:!1})).concat(t).concat(E(5)):"".concat(He).concat(qe({withoutSession:!0})).concat(E(13))}(Dt),n=Ye(e),r=[];return Pe(r,dt,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:F(),attributes:r,events:[],links:[],status:{code:0}}}function Qe(t,e,n){var r=t;if(!r.endTimeUnixNano)return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):F(),r;s("Attempting to end already ended span. Dropping...",r)}function $e(t,e,n,r){var i=void 0,o=void 0;"string"==typeof n?i=n:Array.isArray(n)&&(o=n),t.events.push({name:e,timeUnixNano:null!=i?i:F(),attributes:null!=o?o:[]})}function Je(t,e,r){var i=function(t){return t?Array.isArray(t)?function(e){return[].concat(P(t),[e]).join(".")}:function(e){return"".concat(t,".").concat(e)}:function(t){return t}}(r);try{var o=et(e);o.username&&(o.username="REDACTED"),o.password&&(o.password="REDACTED");var a=ot.urlAttributeScrubber(R(R(R(R(R(R({},At,o.href),"url.path",o.pathname),"url.domain",o.hostname),"url.scheme",o.protocol.replace(":","")),"url.fragment",o.hash?o.hash.replace("#",""):void 0),"url.query",o.search?o.search.replace("?",""):void 0));Object.entries(a).forEach((function(e){var n=k(e,2),r=n[0],o=n[1];void 0!==o&&Pe(t,i(r),o)}))}catch(r){ot.urlAttributeScrubber===n&&Pe(t,i(At),String(e))}}var tn=null!=b&&"function"==typeof b.getItem&&"function"==typeof b.setItem;var en="d0_tab",nn=null;function rn(){if(tn)try{var t=function(t){return tn&&b?b.getItem(t):null}(en);if(t)return void(nn=t);nn=E(8),function(t,e){tn&&b&&b.setItem(t,e)}(en,nn)}catch(t){a("Failed to record tab ID information",t)}else s("Storage API is not available and tab tracking is therefore not supported.")}function on(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===dt}))&&Pe(t,dt,E(8));for(var u=0;u<ot.signalAttributes.length;u++)t.push(ot.signalAttributes[u]);Je(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==d?void 0:d.location.href)&&void 0!==n?n:J,"page"),Dt&&Pe(t,"session.id",Dt),nn&&Pe(t,"browser.tab.id",nn),Pe(t,"browser.window.width",null!==(i=null==d?void 0:d.innerWidth)&&void 0!==i?i:J),Pe(t,"browser.window.height",null!==(o=null==d?void 0:d.innerHeight)&&void 0!==o?o:J);var s=null==p||null===(a=p.connection)||void 0===a?void 0:a.effectiveType;s&&Pe(t,"network.connection.subtype",s)}function an(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};re((function(){var n,r=ne(),i=qt("LCP"),o=Gt(e,ye),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=C(t);try{for(u.s();!(a=u.n()).done;){var s=a.value;o.h(s),s.startTime<r.firstHiddenTime&&(i.value=Math.max(s.startTime-Wt(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=Yt("largest-contentful-paint",a);if(u){n=Vt(t,i,ge,e.reportAllChanges);for(var s=Xt((function(){a(u.takeRecords()),u.disconnect(),n(!0)})),c=0,l=["keydown","click","visibilitychange"];c<l.length;c++)addEventListener(l[c],(function(){return pe(s)}),{capture:!0,once:!0});Ft((function(r){i=qt("LCP"),n=Vt(t,i,ge,e.reportAllChanges),Bt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}(un,{reportAllChanges:!0}),me(un,{reportAllChanges:!0}),ae(un,{reportAllChanges:!0})}function un(t){var e=[];Pe(e,ft,Ot.WEB_VITAL);var n=[];Pe(n,"name",t.name),Pe(n,"value",tt(t.value)),Pe(n,"delta",tt(t.delta));var r={timeUnixNano:F(),attributes:e,severityNumber:It.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};on(r.attributes),Ce(r)}function sn(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var cn="data:";function ln(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===cn||(!!function(t){for(var e=t.toLowerCase(),n=0,r=ot.endpoints.length;n<r;n++){var i=ot.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||sn(ot.ignoreUrls,t))))}var fn,dn=0,vn=0,pn={},hn=!1;function mn(){hn=!0}function yn(t,e){t&&gn("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function gn(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(dn>100)&&!function(t){return!t||sn(ot.ignoreErrorMessages,t)}(e)){vn>=20&&(pn={},vn=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==d?void 0:d.location.href),a=pn[o];if(a)a.seenCount++;else{var u=[];on(u),Pe(u,ft,Ot.ERROR),Pe(u,Et,e),n&&Pe(u,wt,n),r&&Pe(u,St,r),null!=i&&i.componentStack&&Pe(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),je(u,null==i?void 0:i.attributes),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:F(),attributes:u,severityNumber:It.ERROR,severityText:"ERROR",body:{stringValue:e}}},pn[o]=a,vn++}!function(){if(fn)return;fn=setTimeout(bn,1e3)}()}}function bn(){for(var t in fn&&(clearTimeout(fn),fn=null),pn)if(f(pn,t)){var e=pn[t];e.seenCount>e.transmittedCount&&(Ce(e.log),dn++)}pn={},vn=0}var Tn="Unhandled promise rejection: ",En="<unavailable because Promise wasn't rejected with an Error object>";function wn(t){null==t.reason?yn({message:Tn+"<no reason defined>",stack:En}):"string"==typeof t.reason.message?yn({message:Tn+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:En}):"object"!==D(t.reason)&&yn({message:Tn+t.reason,stack:En})}var Sn="__dash0OriginalFunctions";function An(t,e){for(var n=t[Sn],r=0;r<n.length;r++){if(On(n[r].valuesForEqualityCheck,e))return r}return-1}function On(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function In(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[Sn]=t[Sn]||[],i=An(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,Nn(n,r,i))}function Nn(t,e,n){return[t,e,Ln(n)]}function Ln(t){return null!=t&&("object"===D(t)?Boolean(t.capture):Boolean(t))}function Cn(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[Sn];if(null==r)return n;var i=An(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,Nn(e,n,r),i)}function Rn(){ot.wrapEventHandlers&&function(t){if(!t||"function"!=typeof t.prototype.addEventListener||"function"!=typeof t.prototype.removeEventListener)return;var e=t.prototype.addEventListener,n=t.prototype.removeEventListener;t.prototype.addEventListener=function(t,n,r){if("function"!=typeof n)return e.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=function(){try{return n.apply(this,arguments)}catch(t){throw yn(t),mn(),t}},i[1]=In(this,i[1],t,n,r),e.apply(this,i)},t.prototype.removeEventListener=function(t,e,r){if("function"!=typeof e)return n.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=Cn(this,t,e,r,e),n.apply(this,i)}}(null==d?void 0:d.EventTarget)}function _n(t){var e=null==d?void 0:d[t];"function"==typeof e&&(d[t]=function(t){for(var n=new Array(arguments.length),r=0;r<arguments.length;r++)n[r]=arguments[r];return n[0]=function(t){if("function"!=typeof t)return t;return function(){try{return t.apply(this,arguments)}catch(t){throw reportError(t),mn(),t}}}(t),e.apply(this,n)})}function xn(){!function(){if(d){var t=d.onerror;d.onerror=function(e,n,r,i,o){if(hn)return hn=!1,"function"==typeof t?t.apply(this,arguments):void 0;var a=o&&o.stack;return a||(a="at "+n+" "+r,null!=i&&(a+=":"+i)),gn({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==d?void 0:d.addEventListener)&&d.addEventListener("unhandledrejection",wn),Rn(),function(){if(ot.wrapTimers){if(W)return void a("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");_n("setTimeout"),_n("setInterval")}}()}var kn=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function Pn(t){return kn.includes(t)}function jn(t,e){var n=0!==e.startTime;Dn(t,Y.FETCH_START,e,n),Dn(t,Y.DOMAIN_LOOKUP_START,e,n),Dn(t,Y.DOMAIN_LOOKUP_END,e,n),Dn(t,Y.CONNECT_START,e,n),Dn(t,Y.SECURE_CONNECTION_START,e,n),Dn(t,Y.CONNECT_END,e,n),Dn(t,Y.REQUEST_START,e,n),Dn(t,Y.RESPONSE_START,e,n),Dn(t,Y.RESPONSE_END,e,n)}function Dn(t,e,n){var r,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];!(e in n)||"number"!=typeof n[e]||i&&0===n[e]||$e(t,e,(r=n[e],String(Math.round(1e6*(r+B())))))}function Un(t,e){var n=e.encodedBodySize;null!=n&&Pe(t.attributes,"http.response.body.size",n)}function Mn(t){return function(){var e=I(x().mark((function e(n,r){var i,o,a,u,c,l,f,d,v,p,h,m,y,g,b;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r?Object.assign({},r):r,u=null,null!==(i=a)&&void 0!==i&&i.body&&(u=a.body,a.body=void 0),c=new Request(n,a),u&&a&&(a.body=u),!ln(l=c.url)){e.next=9;break}return s("Not creating span for fetch call because the url is ignored, URL: ".concat(l)),e.abrupt("return",t(n instanceof Request?c:n,r));case 9:return f=null!==(o=c.method)&&void 0!==o?o:"GET",d=Pn(f),v=Pn(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",on((h=Xe("HTTP ".concat(p))).attributes),Je(h.attributes,l),Fn(n,r),Pe(h.attributes,"http.request.method",p),d||Pe(h.attributes,"http.request.method_original",f),m=qn(l),m.length>0&&(null!==(y=a)&&void 0!==y&&y.headers?(a.headers=new Headers(a.headers),zn(a.headers.append,a.headers,h,m)):n instanceof Request?zn(c.headers.append,c.headers,h,m):(a||(a={}),a.headers=new Headers,zn(a.headers.append,a.headers,h,m))),Vn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(g=Q({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===et(l).href},maxWaitForResourceMillis:ot.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:ot.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(jn(h,n),Un(h,n)),Re(Qe(h,void 0,1e6*e))}})).start(),e.prev=25,e.next=28,t(n instanceof Request?c:n,a);case 28:return b=e.sent,Bn(h,b),e.abrupt("return",Hn(b,ot.maxToleranceForResourceTimingsMillis,(function(){return g.end()}),(function(t){g.cancel(),Wn(h,t)})));case 33:throw e.prev=33,e.t0=e.catch(25),g.cancel(),Wn(h,e.t0),e.t0;case 38:case"end":return e.stop()}}),e,null,[[25,33]])})));return function(t,n){return e.apply(this,arguments)}}()}function Fn(t,e,n){try{return void 0}catch(n){s("failed to analyze request for GraphQL insights",n,t,e)}}function Vn(t,e,n){try{if(!ot.headersToCapture.length)return;t.forEach((function(t,r){ot.headersToCapture.some((function(t){return t.test(r)}))&&Pe(e.attributes,n(r),t)}))}catch(t){s("unable to capture http headers due to CORS policy")}}function Bn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2),0===n&&Pe(t.attributes,"error.type",e.type),Pe(t.attributes,"http.response.status_code",String(n)),Vn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function Hn(t,e,n,r){var i,o,a=m.now(),u=t.body;if(!(u&&(i=t,o=i.status,o>=200&&204!=o&&205!=o&&304!=o)))return n(),t;var s=!1,c=function(t){s||(n(t),s=!0)},l=function(t){s||(r(t),s=!0)},f=q((function(){return c(a)}),e),d=u.getReader(),v=new ReadableStream({pull:function(t){return I(x().mark((function n(){var r,i;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,z(f),n.next=4,d.read();case 4:r=n.sent,i=r.value,r.done?(d.releaseLock(),t.close(),c()):(a=m.now(),f=q((function(){return c(a)}),e),t.enqueue(i)),n.next=15;break;case 10:n.prev=10,n.t0=n.catch(0),l(n.t0),t.error(n.t0);try{d.releaseLock()}catch(t){}case 15:case"end":return n.stop()}}),n,null,[[0,10]])})))()},cancel:function(t){return z(f),c(),d.cancel(t)}});return new Response(v,{status:t.status,statusText:t.statusText,headers:t.headers})}function Wn(t,e){!function(t,e){var n=[];"string"==typeof e?Pe(n,Et,e):e&&(e.code?Pe(n,wt,e.code.toString()):e.name&&Pe(n,wt,e.name),e.message&&Pe(n,Et,e.message),e.stack&&Pe(n,St,e.stack),$e(t,"exception",n))}(t,e),Re(Qe(t,function(t){return{code:2,message:t&&"object"===D(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function qn(t){var e=[];if(nt(t)){if(e.push("traceparent"),ot.propagators){var n,r=C(ot.propagators);try{for(r.s();!(n=r.n()).done;){var i=n.value;"traceparent"===i.type||e.includes(i.type)||e.push(i.type)}}catch(t){r.e(t)}finally{r.f()}}return e}if(ot.propagators){var o,a=C(ot.propagators);try{for(a.s();!(o=a.n()).done;){var u=o.value;sn(u.match,t)&&(e.includes(u.type)||e.push(u.type))}}catch(t){a.e(t)}finally{a.f()}return e}return[]}function zn(t,e,n,r){var i,o=C(r);try{for(o.s();!(i=o.n()).done;){"xray"===i.value?Be(t,e,n):Ve(t,e,n)}}catch(t){o.e(t)}finally{o.f()}}function Gn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=ot.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];Pe(u,ft,Ot.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=k(t,2),n=e[0],r=e[1];return Pe(u,n,r)})),on(u,{url:e});var s=[];Pe(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==v?void 0:v.title)&&void 0!==i?i:J),null!=v&&v.referrer&&Pe(s,"referrer",v.referrer),Pe(s,"type",n?Lt:Nt),Pe(s,"change_state",r?Rt:Ct);var c={timeUnixNano:t,attributes:u,severityNumber:It.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},l=Fe();l&&(c.traceId=l.traceId,c.spanId=l.spanId),Ce(c)}function Kn(){var t=null==d?void 0:d.performance.getEntriesByType("navigation")[0];if(t){var e=[];Pe(e,ft,Ot.NAVIGATION_TIMING);var n=[];Pe(n,"name",t.name),Zn(n,t,"responseStatus"),Zn(n,t,"fetchStart"),Zn(n,t,"requestStart"),Zn(n,t,"responseStart"),Zn(n,t,"domInteractive"),Zn(n,t,"domContentLoadedEventEnd"),Zn(n,t,"domComplete"),Zn(n,t,"loadEventEnd"),Zn(n,t,"transferSize"),Zn(n,t,"encodedBodySize"),Zn(n,t,"decodedBodySize");var r={timeUnixNano:Yn(),attributes:e,severityNumber:It.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};on(r.attributes);var i=Fe();i&&(r.traceId=i.traceId,r.spanId=i.spanId),Ce(r)}else s("Navigation timings not available. Cannot emit navigation timing log")}function Zn(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||Pe(t,n,Number.isInteger(r)?r:tt(r))}function Yn(){return V(Math.round(B()))}var Xn={},Qn=!1,$n=!1;function Jn(){er(null==d?void 0:d.location.href)}function tr(t){er(t.newURL)}function er(t,e){var n;if(t)try{var r=new URL(t,null==d?void 0:d.location.href);((n=r).pathname!==Xn.path||$n&&n.search!==Xn.search||Qn&&n.hash!==Xn.hash)&&(nr(r),Gn(F(),r,!0,Boolean(e)))}catch(t){s("Failed to handle url change",t)}}function nr(t){Xn.path=t.pathname,Xn.search=t.search,Xn.hash=t.hash}function rr(){!function(){try{Gn(Yn(),null!=d&&d.location.href?new URL(null==d?void 0:d.location.href):void 0)}catch(t){u("Failed to transmit initial page view event",t)}if("complete"===(null==v?void 0:v.readyState))return Kn();d&&w(d,"load",(function(){setTimeout(Kn,0)}))}(),function(){var t,e,n,r;if(d&&d.history){if(ot.pageViewInstrumentation.trackVirtualPageViews){$n=null!==(t=null===(e=ot.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,Qn=null!==(n=null===(r=ot.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,it(d.history,"replaceState",(function(t){return function(e,n,r){return er(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),it(d.history,"pushState",(function(t){return function(e,n,r){return er(r?String(r):void 0),t.apply(this,[e,n,r])}})),d.addEventListener("hashchange",tr),d.addEventListener("popstate",Jn);try{nr(new URL(d.location.href))}catch(t){}}}else s("Browser does not support history API, skipping instrumentation")}()}var ir=function(t){if("object"===D(t)&&null!==t){if("function"==typeof Object.getPrototypeOf){var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1},or=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce((function(t,e){if(void 0===e)return t;if(Array.isArray(e))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(e).forEach((function(n){["__proto__","constructor","prototype"].includes(n)||(Array.isArray(t[n])&&Array.isArray(e[n])?t[n]=or.options.mergeArrays?or.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(P(t[n]),P(e[n])):e[n]:ir(t[n])&&ir(e[n])?t[n]=or(t[n],e[n]):!ir(t[n])&&ir(e[n])?t[n]=or(e[n],void 0):t[n]=void 0===e[n]?or.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},ar={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};or.options=ar,or.withOptions=function(t){or.options=Object.assign(Object.assign({},ar),t);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=or.apply(void 0,n);return or.options=ar,i};var ur=!1;function sr(t){if(ur)s("Dash0 SDK is being reinitialized, skipping ...");else if(null!=d)if("function"==typeof y&&m&&m.getEntriesByType){var e;if(!t.serviceName.trim())s("Missing or empty serviceName value. Falling back to location.hostname."),t.serviceName=null!==(e=null==h?void 0:h.hostname)&&void 0!==e?e:"unknown";ot.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==ot.endpoints.length?(Object.assign(ot,or(ot,function(t,e){var n,r={},i=C(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;o in t&&(r[o]=t[o])}}catch(t){i.e(t)}finally{i.f()}return r}(t,["ignoreUrls","ignoreErrorMessages","wrapEventHandlers","wrapTimers","propagateTraceHeadersCorsURLs","maxWaitForResourceTimingsMillis","maxToleranceForResourceTimingsMillis","headersToCapture","urlAttributeScrubber","pageViewInstrumentation","enableTransportCompression"]))),function(t){t.propagators?(t.propagateTraceHeadersCorsURLs&&a("Both 'propagators' and deprecated 'propagateTraceHeadersCorsURLs' were provided. Using 'propagators' configuration. Please migrate to the new 'propagators' config."),ot.propagators=t.propagators):t.propagateTraceHeadersCorsURLs&&t.propagateTraceHeadersCorsURLs.length>0?(a("'propagateTraceHeadersCorsURLs' is deprecated. Please use the new 'propagators' configuration."),ot.propagators=[{type:"traceparent",match:P(t.propagateTraceHeadersCorsURLs)}]):ot.propagators=[{type:"traceparent",match:[]}]}(t),function(t){Pe(ot.resource.attributes,at,t.serviceName),t.serviceVersion&&Pe(ot.resource.attributes,ut,t.serviceVersion);var e=function(t){if(t.environment)return t.environment;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_ENV}catch(t){return}}(t);e&&Pe(ot.resource.attributes,st,e);var n=function(t){if(t.deploymentName)return t.deploymentName;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_TARGET_ENV}catch(t){return}}(t);n&&Pe(ot.resource.attributes,ct,n);var r=function(t){if(t.deploymentId)return t.deploymentId;try{var e;return null===(e=process)||void 0===e||null===(e=e.env)||void 0===e?void 0:e.NEXT_PUBLIC_VERCEL_BRANCH_URL}catch(t){return}}(t);r&&Pe(ot.resource.attributes,lt,r)}(t),function(t){var e;Pe(ot.signalAttributes,vt,E(16)),Pe(ot.signalAttributes,pt,null!==(e=null==p?void 0:p.userAgent)&&void 0!==e?e:J),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=k(t,2),n=e[0],r=e[1];Pe(ot.signalAttributes,n,r)}))}(t),rn(),Ut(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),cr("@dash0/navigation",t)&&rr(),cr("@dash0/web-vitals",t)&&an(),cr("@dash0/error",t)&&xn(),cr("@dash0/fetch",t)&&(d&&d.fetch&&d.Request?it(d,"fetch",Mn):s("Browser does not support the Fetch API, skipping instrumentation")),ur=!0):a("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")}else s("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs.");else s("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")}function cr(t,e){var n=e.enabledInstrumentations;return!n||n.includes(t)}t.addSignalAttribute=function(t,e){Pe(ot.signalAttributes,t,e)},t.debug=function(){s("Dash0 Web SDK configuration state:",ot)},t.identify=function(t,e){De(ot.signalAttributes,ht),null!=t&&Pe(ot.signalAttributes,ht,t),De(ot.signalAttributes,mt),null!=(null==e?void 0:e.name)&&Pe(ot.signalAttributes,mt,e.name),De(ot.signalAttributes,yt),null!=(null==e?void 0:e.fullName)&&Pe(ot.signalAttributes,yt,e.fullName),De(ot.signalAttributes,gt),null!=(null==e?void 0:e.email)&&Pe(ot.signalAttributes,gt,e.email),De(ot.signalAttributes,bt),null!=(null==e?void 0:e.hash)&&Pe(ot.signalAttributes,bt,e.hash),De(ot.signalAttributes,Tt),null!=(null==e?void 0:e.roles)&&Pe(ot.signalAttributes,Tt,e.roles)},t.init=function(t){s("".concat("Initializing Dash0 Web SDK"," (via package)")),sr(t)},t.removeSignalAttribute=function(t){De(ot.signalAttributes,t)},t.reportError=function(t,e){yn(t,e)},t.sendEvent=function(t,e){if(Object.values(Ot).includes(t))a("Unable to send custom event ".concat(t,". You are not allowed to use an internal event name while sending a custom event. Dropping event..."));else{var n=[];on(n),Pe(n,ft,t),null!=e&&e.title&&Pe(n,"dash0.web.event.title",e.title),je(n,null==e?void 0:e.attributes),Ce({timeUnixNano:null!=(null==e?void 0:e.timestamp)?V(e.timestamp):F(),attributes:n,body:xe(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?It[e.severity]:void 0})}},t.setActiveLogLevel=function(t){var e;i=null!==(e=r[t])&&void 0!==e?e:r.warn},t.terminateSession=function(){if(S)try{!function(t){S&&g&&g.removeItem(t)}(kt)}catch(t){o("Failed to terminate session",t)}}}));
2
2
  //# sourceMappingURL=dash0.umd.cjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dash0/sdk-web",
3
- "version": "0.18.1",
3
+ "version": "0.18.2",
4
4
  "description": "Dash0's Web SDK to collect telemetry from end-users' web browsers",
5
5
  "type": "module",
6
6
  "main": "dist/dash0.umd.cjs",
@@ -68,18 +68,18 @@
68
68
  "url": "https://github.com/dash0hq/dash0-sdk-web/issues"
69
69
  },
70
70
  "dependencies": {
71
- "@babel/core": "^7.26.10",
72
- "@babel/preset-env": "^7.26.9",
73
- "@rollup/plugin-babel": "^6.0.4",
74
- "@rollup/plugin-terser": "^0.4.4",
75
71
  "web-vitals": "^5.0.3",
76
72
  "ts-deepmerge": "^7.0.3"
77
73
  },
78
74
  "devDependencies": {
79
75
  "dotenv-cli": "^8.0.0",
76
+ "@babel/core": "^7.26.10",
77
+ "@babel/preset-env": "^7.26.9",
80
78
  "@release-it/conventional-changelog": "^10.0.1",
79
+ "@rollup/plugin-babel": "^6.0.4",
81
80
  "@rollup/plugin-node-resolve": "^16.0.1",
82
81
  "@rollup/plugin-replace": "^6.0.2",
82
+ "@rollup/plugin-terser": "^0.4.4",
83
83
  "@types/body-parser": "^1.19.5",
84
84
  "@types/express": "^5.0.1",
85
85
  "@types/mocha": "^10.0.10",