@dash0/sdk-web 0.11.2 → 0.12.1

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(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(){}a("log");var n=a("info"),r=a("warn"),i=a("error"),o=a("debug");function a(t){return"undefined"==typeof console||"function"!=typeof console.log||"function"!=typeof console.log.apply?e:console[t]&&"function"==typeof console[t].apply?function(){console[t].apply(console,arguments)}:function(){console.log.apply(console,arguments)}}var u=Object.prototype.hasOwnProperty;function s(t,e){return u.call(t,e)}var c="undefined"!=typeof window?window:void 0,l=null==c?void 0:c.document,f=null==c?void 0:c.navigator,d="undefined"!=typeof location?location:void 0,v=(null==c?void 0:c.performance)||(null==c?void 0:c.webkitPerformance)||(null==c?void 0:c.msPerformance)||(null==c?void 0:c.mozPerformance);null==c||c.encodeURIComponent;var p=null==c?void 0:c.fetch,h=function(){try{var t;return null!==(t=null==c?void 0:c.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),m=function(){try{var t;return null!==(t=null==c?void 0:c.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),y=Array(32);function g(t){for(var e=0;e<2*t;e++)y[e]=Math.floor(16*Math.random())+48,y[e]>=58&&(y[e]+=39);return String.fromCharCode.apply(null,y.slice(0,2*t))}function b(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var T=null!=h&&"function"==typeof h.getItem&&"function"==typeof h.setItem;function E(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 w(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 S(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){w(o,r,i,a,u,"next",t)}function u(t){w(o,r,i,a,u,"throw",t)}a(void 0)}))}}function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function O(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,x(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function I(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=P(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 N(t,e,n){return(e=x(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(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 L(){L=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 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 _(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 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(_),!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),_(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;_(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 _(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)||P(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 R(t){return function(t){if(Array.isArray(t))return E(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||P(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 x(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 k(t){return k="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},k(t)}function P(t,e){if(t){if("string"==typeof t)return E(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)?E(t,e):void 0}}function j(){return(new Date).getTime()}function D(){var t=U();return t?String(1e6*(v.now()+t)):M(new Date)}function M(t){return"object"===k(t)?M(t.getTime()):String(t)+"000000"}function U(){var t,e=null==v?void 0:v.timeOrigin;"number"!=typeof e&&(e=null==v||null===(t=v.timing)||void 0===t?void 0:t.fetchStart);return e}var F={setTimeout:null==c?void 0:c.setTimeout,clearTimeout:null==c?void 0:c.clearTimeout,setInterval:null==c?void 0:c.setInterval,clearInterval:null==c?void 0:c.clearInterval},V=null!=c&&null!=c.Zone&&null!=c.Zone.root&&"function"==typeof c.Zone.root.run;function B(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return W.apply("setTimeout",arguments)}function H(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return W.apply("setInterval",arguments)}function W(){var t,e=this;if(V)try{var n=Array.prototype.slice.apply(arguments);return c.Zone.root.run(F[e],c,n)}catch(t){r("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=F[e])||void 0===t?void 0:t.apply(c,arguments)}V&&o("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");v&&v.getEntriesByType;var q=v&&"function"==typeof c.PerformanceObserver&&"function"==typeof v.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"});function G(t){return q?{start:function(){n=v.now();try{var t,e=null==c?void 0:c.PerformanceObserver;if(e)null===(t=o=new e(f))||void 0===t||t.observe({type:"resource"})}catch(t){}u=B(p,6e5)},end:function(){r=v.now(),h(),i||!K()?s():(b(l,"visibilitychange",d),a=B(s,t.maxWaitForResourceMillis))},cancel:p}:function(t){var n=0;return{start:function(){n=j()},end:function(){return t({duration:j()-n})},cancel:e}}(t.onEnd);var n,r,i,o,a,u;function s(){var e;p(),null!==(e=i)&&void 0!==e&&e.duration&&i.duration<864e5?t.onEnd({resource:i,duration:Math.round(i.duration)}):t.onEnd({resource:i,duration:Math.round(r-n)})}function f(e){var o=e.getEntriesByType("resource").find((function(e){var i=e;return i.startTime>=n&&(!r||r+t.maxToleranceForResourceTimingsMillis>=i.responseEnd)&&t.resourceMatcher(i)}));o&&(i=o,r&&s())}function d(){K()||s()}function p(){!function(){if(o){try{var t;null===(t=o)||void 0===t||t.disconnect()}catch(t){}o=void 0}}(),a&&(clearTimeout(a),a=void 0),h(),function(){if(!l)return;t=l,e="visibilitychange",n=d,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function h(){u&&(clearTimeout(u),u=void 0)}}function K(){return"visible"===(null==l?void 0:l.visibilityState)||"prerender"===(null==l?void 0:l.visibilityState)}var Z="undefined";function Y(t){return Math.round(100*t)/100}function Q(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==l?void 0:l.baseURI)&&void 0!==e?e:null==d?void 0:d.href)}function X(t){try{return Q(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var $=Symbol.for("INSTRUMENTED_BY_DASH0");function J(t,e,n){var r=t[e];r?(!0===r[$]&&o("".concat(String(e)," has already been instrumented, skipping")),function(t){t[$]=!0}(r),t[e]=n(r)):o("".concat(String(e)," is not defined, unable to instrument"))}var tt={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.11.2",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:3e3,headersToCapture:[],pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]}},et="service.name",nt="service.version",rt="deployment.environment.name",it="deployment.name",ot="deployment.id",at="event.name",ut="page.load.id",st="user_agent.original",ct="user.id",lt="user.name",ft="user.full_name",dt="user.email",vt="user.hash",pt="user.roles",ht="exception.message",mt="exception.type",yt="exception.stacktrace",gt="url.full",bt={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},Tt={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},Et=0,wt=1,St="pushState",At="replaceState",Ot=1;function It(){var t,e;return"".concat((t={ephemeralSession:!T},e=0,t.ephemeralSession&&(e|=Ot),e.toString(16).padStart(2,"0"))).concat(g(7))}var Nt="d0_session",Ct="#",Lt=864e5,_t=null;function Rt(t,e){if(!T)return o("Storage API is not available and session tracking is therefore not supported."),void(_t=It());t||(t=108e5),e||(e=216e5),t=Math.min(t,Lt),e=Math.min(e,Lt);try{var n=function(t){return T&&h?h.getItem(t):null}(Nt),i=function(t){if(!t)return null;var e=t.split(Ct);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);i&&!function(t,e,n){var r=j()-e;if(t.lastActivityTime<r)return!1;var i=j()-n;return t.startTime>=i}(i,t,e)&&(i=null),i?i.lastActivityTime=j():i={id:It(),startTime:j(),lastActivityTime:j()},function(t,e){T&&h&&h.setItem(t,e)}(Nt,function(t){return t.id+Ct+t.startTime+Ct+t.lastActivityTime}(i)),_t=i.id}catch(t){r("Failed to record session information",t)}}var xt=-1,kt=function(t){addEventListener("pageshow",(function(e){e.persisted&&(xt=e.timeStamp,t(e))}),!0)},Pt=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)))}},jt=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Dt=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},Mt=function(){var t,e=Dt();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},Ut=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Dt(),r="navigate";return xt>=0?r="back-forward-cache":n&&(document.prerendering||Mt()>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}},Ft=new WeakMap;function Vt(t,e){return Ft.get(t)||Ft.set(t,new e),Ft.get(t)}var Bt,Ht=function(){return O((function t(){A(this,t),N(this,"t",void 0),N(this,"i",0),N(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)}}}])}(),Wt=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?C(Object(n),!0).forEach((function(e){N(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(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)}},zt=-1,Gt=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Kt=function(t){"hidden"===document.visibilityState&&zt>-1&&(zt="visibilitychange"===t.type?t.timeStamp:0,Yt())},Zt=function(){addEventListener("visibilitychange",Kt,!0),addEventListener("prerenderingchange",Kt,!0)},Yt=function(){removeEventListener("visibilitychange",Kt,!0),removeEventListener("prerenderingchange",Kt,!0)},Qt=function(){if(zt<0){var t,e=Mt(),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;zt=null!=n?n:Gt(),Zt(),kt((function(){setTimeout((function(){zt=Gt(),Zt()}))}))}return{get firstHiddenTime(){return zt}}},Xt=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},$t=[1800,3e3],Jt=[.1,.25],te=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]:{};Xt((function(){var n,r=Qt(),i=Ut("FCP"),o=Wt("paint",(function(t){var e,a=I(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-Mt(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=Pt(t,i,$t,e.reportAllChanges),kt((function(r){i=Ut("FCP"),n=Pt(t,i,$t,e.reportAllChanges),jt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(qt((function(){var n,r=Ut("CLS",0),i=Vt(e,Ht),o=function(t){var e,o=I(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=Wt("layout-shift",o);a&&(n=Pt(t,r,Jt,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),kt((function(){i.i=0,r=Ut("CLS",0),n=Pt(t,r,Jt,e.reportAllChanges),jt((function(){return n()}))})),setTimeout(n))})))},ee=0,ne=1/0,re=0,ie=function(t){var e,n=I(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(ne=Math.min(ne,r.interactionId),re=Math.max(re,r.interactionId),ee=re?(re-ne)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},oe=function(){var t;return Bt?ee:null!==(t=performance.interactionCount)&&void 0!==t?t:0},ae=0,ue=function(){return O((function t(){A(this,t),N(this,"u",[]),N(this,"l",new Map),N(this,"m",void 0),N(this,"v",void 0)}),[{key:"p",value:function(){ae=oe(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((oe()-ae)/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=I(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)}}}}])}(),se=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)})))},ce=[200,500],le=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&Xt((function(){var n;"interactionCount"in performance||Bt||(Bt=Wt("event",ie,{type:"event",buffered:!0,durationThreshold:0}));var r,i=Ut("INP"),o=Vt(e,ue),a=function(t){se((function(){var e,n=I(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=Wt("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Pt(t,i,ce,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),kt((function(){o.p(),i=Ut("INP"),r=Pt(t,i,ce,e.reportAllChanges)})))}))},fe=function(){return O((function t(){A(this,t),N(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),de=[2500,4e3],ve=!1;function pe(t){var e,n,r=[];return n=i,ve&&n(),l&&c&&(b(l,"visibilitychange",(function(){"visible"!==l.visibilityState&&n()})),b(c,"pagehide",(function(){ve=!0,n()})),b(c,"beforeunload",(function(){ve=!0,n()}))),{send:function(n){"visible"===(null==l?void 0:l.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=B(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}function he(t,e){return me.apply(this,arguments)}function me(){return me=S(L().mark((function t(n,i){var o,a,u,s;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=JSON.stringify(i),a=o,u=o.length,s=!1,"undefined"==typeof CompressionStream){t.next=10;break}return t.next=7,ye(o);case 7:a=t.sent,u=a.byteLength,s=!0;case 10:return t.next=12,Promise.all(tt.endpoints.map(function(){var t=S(L().mark((function t(i){var o,c,l;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,(o=new URL(i.url)).pathname=o.pathname+(o.pathname.endsWith("/")?n.substring(1):n),c={"Content-Type":"application/json",Authorization:"Bearer ".concat(i.authToken)},i.dataset&&(c["Dash0-Dataset"]=i.dataset),s&&(c["Content-Encoding"]="gzip"),p){t.next=9;break}return r("Unable to send telemetry, fetch is not defined"),t.abrupt("return");case 9:return t.next=11,p(o,{method:"POST",headers:c,body:a,keepalive:u<=6e4});case 11:(l=t.sent).text().catch(e),l.ok||r("Failed to send telemetry to ".concat(o,": ").concat(l.status," ").concat(l.statusText)),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(0),r("Error sending telemetry to ".concat(i.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 12:case"end":return t.stop()}}),t)}))),me.apply(this,arguments)}function ye(t){return ge.apply(this,arguments)}function ge(){return(ge=S(L().mark((function t(e){var n,r,i;return L().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 be,Te=pe((function(t){he("/v1/logs",{resourceLogs:[{resource:tt.resource,scopeLogs:[{scope:tt.scope,logRecords:t}]}]}).catch((function(t){i("Failed to transmit logs",t)}))})),Ee=pe((function(t){he("/v1/traces",{resourceSpans:[{resource:tt.resource,scopeSpans:[{scope:tt.scope,spans:t}]}]}).catch((function(t){i("Failed to transmit spans",t)}))}));function we(){var t,e,n,r,i,o,a;return be||(e=(t={maxCalls:8096,maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCalls,n=t.maxCallsPerTenMinutes,r=t.maxCallsPerTenSeconds,i=0,o=0,a=0,H((function(){o=0}),6e5),H((function(){a=0}),1e4),be=function(){return++i>e||++o>n||++a>r}),be()}function Se(t){we()?o("Transport rate limit. Will not send item.",t):Te.send(t)}function Ae(t){we()?o("Transport rate limit. Will not send item.",t):Ee.send(t)}var Oe=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function Ie(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return Ie(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"!==k(t))return!1;var e=Object.keys(t);return 1===e.length&&Oe.includes(e[0])}(t)?"object"===k(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=_(t,2);return Ne(e[0],e[1])}))}):e=t,e}}function Ne(t,e){return{key:t,value:Ie(e)}}function Ce(t,e,n){e&&t.push(Ne(e,n))}function Le(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var _e="traceparent",Re=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function xe(){var t,e,n=((null===(t=Array.from(null!==(e=null==l?void 0:l.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===_e})))||void 0===t?void 0:t.content.trim())||"").match(Re)||function(){var t=v.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=I(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===_e)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(Re);if(n)return{traceId:n[1],spanId:n[2]}}function ke(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}var Pe="d042",je=1;function De(t){var e=0;return t.withoutSession&&(e|=je),e.toString(16).padStart(2,"0")}function Me(t){return t?"".concat(Pe).concat(De({withoutSession:!1})).concat(t).concat(g(5)):"".concat(Pe).concat(De({withoutSession:!0})).concat(g(13))}function Ue(t,e,n){var r=t;return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):D(),r}function Fe(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:D(),attributes:null!=o?o:[]})}var Ve=null!=m&&"function"==typeof m.getItem&&"function"==typeof m.setItem;var Be="d0_tab",He=null;function We(){if(Ve)try{var t=function(t){return Ve&&m?m.getItem(t):null}(Be);if(t)return void(He=t);He=g(8),function(t,e){Ve&&m&&m.setItem(t,e)}(Be,He)}catch(t){r("Failed to record tab ID information",t)}else o("Storage API is not available and tab tracking is therefore not supported.")}function qe(t,e){for(var n,r,i,o,a,u=0;u<tt.signalAttributes.length;u++)t.push(tt.signalAttributes[u]);!function(t,e){try{var n=Q(e);n.username&&(n.username="REDACTED"),n.password&&(n.password="REDACTED"),Ce(t,gt,n.href),Ce(t,"url.path",n.pathname),Ce(t,"url.domain",n.hostname),Ce(t,"url.scheme",n.protocol.replace(":","")),n.hash&&Ce(t,"url.fragment",n.hash.replace("#","")),n.search&&Ce(t,"url.query",n.search.replace("?",""))}catch(n){Ce(t,gt,String(e))}}(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==c?void 0:c.location.href)&&void 0!==n?n:Z),_t&&Ce(t,"session.id",_t),He&&Ce(t,"browser.tab.id",He),Ce(t,"browser.window.width",null!==(i=null==c?void 0:c.innerWidth)&&void 0!==i?i:Z),Ce(t,"browser.window.height",null!==(o=null==c?void 0:c.innerHeight)&&void 0!==o?o:Z);var s=null==f||null===(a=f.connection)||void 0===a?void 0:a.effectiveType;s&&Ce(t,"network.connection.subtype",s)}function ze(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Xt((function(){var n,r=Qt(),i=Ut("LCP"),o=Vt(e,fe),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=I(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-Mt(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=Wt("largest-contentful-paint",a);if(u){n=Pt(t,i,de,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 se(s)}),{capture:!0,once:!0});kt((function(r){i=Ut("LCP"),n=Pt(t,i,de,e.reportAllChanges),jt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}(Ge,{reportAllChanges:!0}),le(Ge,{reportAllChanges:!0}),te(Ge,{reportAllChanges:!0})}function Ge(t){var e=[];Ce(e,at,bt.WEB_VITAL);var n=[];Ce(n,"name",t.name),Ce(n,"value",Y(t.value)),Ce(n,"delta",Y(t.delta));var r={timeUnixNano:D(),attributes:e,severityNumber:Tt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};qe(r.attributes),Se(r)}function Ke(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var Ze="data:";function Ye(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===Ze||(!!function(t){for(var e=t.toLowerCase(),n=0,r=tt.endpoints.length;n<r;n++){var i=tt.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||Ke(tt.ignoreUrls,t))))}var Qe,Xe=0,$e=0,Je={},tn=!1;function en(){tn=!0}function nn(t,e){t&&rn("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function rn(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(Xe>100)&&!function(t){return!t||Ke(tt.ignoreErrorMessages,t)}(e)){$e>=20&&(Je={},$e=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==c?void 0:c.location.href),a=Je[o];if(a)a.seenCount++;else{var u=[];Ce(u,at,bt.ERROR),Ce(u,ht,e),n&&Ce(u,mt,n),r&&Ce(u,yt,r),null!=i&&i.componentStack&&Ce(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),qe(u),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:D(),attributes:u,severityNumber:Tt.ERROR,severityText:"ERROR",body:{stringValue:e}}},Je[o]=a,$e++}!function(){if(Qe)return;Qe=setTimeout(on,1e3)}()}}function on(){for(var t in Qe&&(clearTimeout(Qe),Qe=null),Je)if(s(Je,t)){var e=Je[t];e.seenCount>e.transmittedCount&&(Se(e.log),Xe++)}Je={},$e=0}var an="Unhandled promise rejection: ",un="<unavailable because Promise wasn't rejected with an Error object>";function sn(t){null==t.reason?nn({message:an+"<no reason defined>",stack:un}):"string"==typeof t.reason.message?nn({message:an+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:un}):"object"!==k(t.reason)&&nn({message:an+t.reason,stack:un})}var cn="__dash0OriginalFunctions";function ln(t,e){for(var n=t[cn],r=0;r<n.length;r++){if(fn(n[r].valuesForEqualityCheck,e))return r}return-1}function fn(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 dn(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[cn]=t[cn]||[],i=ln(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,vn(n,r,i))}function vn(t,e,n){return[t,e,pn(n)]}function pn(t){return null!=t&&("object"===k(t)?Boolean(t.capture):Boolean(t))}function hn(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[cn];if(null==r)return n;var i=ln(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,vn(e,n,r),i)}function mn(){tt.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 reportError(t),en(),t}},i[1]=dn(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]=hn(this,t,e,r,e),n.apply(this,i)}}(null==c?void 0:c.EventTarget)}function yn(t){var e=null==c?void 0:c[t];"function"==typeof e&&(c[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),en(),t}}}(t),e.apply(this,n)})}function gn(){!function(){if(c){var t=c.onerror;c.onerror=function(e,n,r,i,o){if(tn)return tn=!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)),rn({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==c?void 0:c.addEventListener)&&c.addEventListener("unhandledrejection",sn),mn(),function(){if(tt.wrapTimers){if(V)return void r("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");yn("setTimeout"),yn("setInterval")}}()}var bn=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function Tn(t){return bn.includes(t)}function En(t,e){var n=0!==e.startTime;wn(t,z.FETCH_START,e,n),wn(t,z.DOMAIN_LOOKUP_START,e,n),wn(t,z.DOMAIN_LOOKUP_END,e,n),wn(t,z.CONNECT_START,e,n),wn(t,z.SECURE_CONNECTION_START,e,n),wn(t,z.CONNECT_END,e,n),wn(t,z.REQUEST_START,e,n),wn(t,z.RESPONSE_START,e,n),wn(t,z.RESPONSE_END,e,n)}function wn(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]||Fe(t,e,(r=n[e],String(Math.round(1e6*(r+U())))))}function Sn(t,e){var n=e.encodedBodySize;null!=n&&Ce(t.attributes,"http.response.body.size",n)}function An(t){return function(){var e=S(L().mark((function e(n,r){var i,a,u,s,c,l,f,d,v,p,h,m,y,b;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=r?Object.assign({},r):r,s=null,null!==(i=u)&&void 0!==i&&i.body&&(s=u.body,u.body=void 0),c=new Request(n,u),s&&u&&(u.body=s),!Ye(l=c.url)){e.next=9;break}return o("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!==(a=c.method)&&void 0!==a?a:"GET",d=Tn(f),v=Tn(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",T="HTTP ".concat(p),qe((h={traceId:Me(_t),spanId:g(8),name:T,kind:3,startTimeUnixNano:D(),attributes:[],events:[],links:[],status:{code:0}}).attributes,{url:l}),On(n,r),Ce(h.attributes,"http.request.method",p),d||Ce(h.attributes,"http.request.method_original",f),(X(l)||Ke(tt.propagateTraceHeadersCorsURLs,l))&&(null!==(m=u)&&void 0!==m&&m.headers?(u.headers=new Headers(u.headers),ke(u.headers.append,u.headers,h)):n instanceof Request?ke(c.headers.append,c.headers,h):(u||(u={}),u.headers=new Headers,ke(u.headers.append,u.headers,h))),In(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),y=G({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===Q(l).href},maxWaitForResourceMillis:tt.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:tt.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(En(h,n),Sn(h,n)),Ae(Ue(h,void 0,1e6*e))}}),y.start(),e.prev=23,e.next=26,t(n instanceof Request?c:n,u);case 26:return b=e.sent,Nn(h,b),Cn(b).then((function(){return y.end()})).catch((function(t){y.cancel(),Ln(h,t)})),e.abrupt("return",b);case 32:throw e.prev=32,e.t0=e.catch(23),y.cancel(),Ln(h,e.t0),e.t0;case 37:case"end":return e.stop()}var T}),e,null,[[23,32]])})));return function(t,n){return e.apply(this,arguments)}}()}function On(t,e,n){try{return void 0}catch(n){o("failed to analyze request for GraphQL insights",n,t,e)}}function In(t,e,n){try{t.forEach((function(t,r){tt.headersToCapture.some((function(t){return t.test(r)}))&&Ce(e.attributes,n(r),t)}))}catch(t){o("unable to capture http headers due to CORS policy")}}function Nn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2,e.statusText),Ce(t.attributes,"http.response.status_code",String(n)),In(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function Cn(t){return new Promise((function(e){var n=t.clone().body;if(!n)return e();var r=n.getReader(),i=function(){var t=S(L().mark((function t(){var n;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.read();case 2:if(n=t.sent,!n.done){t.next=6;break}return t.abrupt("return",e());case 6:return t.abrupt("return",i());case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return i()}))}function Ln(t,e){!function(t,e){var n=[];"string"==typeof e?Ce(n,ht,e):e&&(e.code?Ce(n,mt,e.code.toString()):e.name&&Ce(n,mt,e.name),e.message&&Ce(n,ht,e.message),e.stack&&Ce(n,yt,e.stack),Fe(t,"exception",n))}(t,e),Ae(Ue(t,function(t){return{code:2,message:t&&"object"===k(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function _n(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=tt.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];Ce(u,at,bt.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=_(t,2),n=e[0],r=e[1];return Ce(u,n,r)})),qe(u,{url:e});var s=[];Ce(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==l?void 0:l.title)&&void 0!==i?i:Z),null!=l&&l.referrer&&Ce(s,"referrer",l.referrer),Ce(s,"type",n?wt:Et),Ce(s,"change_state",r?At:St);var c={timeUnixNano:t,attributes:u,severityNumber:Tt.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},f=xe();f&&(c.traceId=f.traceId,c.spanId=f.spanId),Se(c)}function Rn(){var t=null==c?void 0:c.performance.getEntriesByType("navigation")[0];if(t){var e=[];Ce(e,at,bt.NAVIGATION_TIMING);var n=[];Ce(n,"name",t.name),xn(n,t,"responseStatus"),xn(n,t,"fetchStart"),xn(n,t,"requestStart"),xn(n,t,"responseStart"),xn(n,t,"domInteractive"),xn(n,t,"domContentLoadedEventEnd"),xn(n,t,"domComplete"),xn(n,t,"loadEventEnd"),xn(n,t,"transferSize"),xn(n,t,"encodedBodySize"),xn(n,t,"decodedBodySize");var r={timeUnixNano:kn(),attributes:e,severityNumber:Tt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};qe(r.attributes);var i=xe();i&&(r.traceId=i.traceId,r.spanId=i.spanId),Se(r)}else o("Navigation timings not available. Cannot emit navigation timing log")}function xn(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||Ce(t,n,Number.isInteger(r)?r:Y(r))}function kn(){return M(Math.round(U()))}var Pn={},jn=!1,Dn=!1;function Mn(){Fn(null==c?void 0:c.location.href)}function Un(t){Fn(t.newURL)}function Fn(t,e){var n;if(t)try{var r=new URL(t,null==c?void 0:c.location.href);((n=r).pathname!==Pn.path||Dn&&n.search!==Pn.search||jn&&n.hash!==Pn.hash)&&(Vn(r),_n(D(),r,!0,Boolean(e)))}catch(t){o("Failed to handle url change",t)}}function Vn(t){Pn.path=t.pathname,Pn.search=t.search,Pn.hash=t.hash}function Bn(){!function(){try{_n(kn(),null!=c&&c.location.href?new URL(null==c?void 0:c.location.href):void 0)}catch(t){i("Failed to transmit initial page view event",t)}if("complete"===(null==l?void 0:l.readyState))return Rn();c&&b(c,"load",(function(){setTimeout(Rn,0)}))}(),function(){var t,e,n,r;if(c&&c.history){if(tt.pageViewInstrumentation.trackVirtualPageViews){Dn=null!==(t=null===(e=tt.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,jn=null!==(n=null===(r=tt.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,J(c.history,"replaceState",(function(t){return function(e,n,r){return Fn(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),J(c.history,"pushState",(function(t){return function(e,n,r){return Fn(r?String(r):void 0),t.apply(this,[e,n,r])}})),c.addEventListener("hashchange",Un),c.addEventListener("popstate",Mn);try{Vn(new URL(c.location.href))}catch(t){}}}else o("Browser does not support history API, skipping instrumentation")}()}var Hn=function(t){if("object"===k(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},Wn=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]=Wn.options.mergeArrays?Wn.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(R(t[n]),R(e[n])):e[n]:Hn(t[n])&&Hn(e[n])?t[n]=Wn(t[n],e[n]):!Hn(t[n])&&Hn(e[n])?t[n]=Wn(e[n],void 0):t[n]=void 0===e[n]?Wn.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},qn={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};Wn.options=qn,Wn.withOptions=function(t){Wn.options=Object.assign(Object.assign({},qn),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=Wn.apply(void 0,n);return Wn.options=qn,i};var zn=!1;function Gn(t){zn?o("Dash0 SDK is being reinitialized, skipping ..."):null!=c?"function"==typeof p&&v&&v.getEntriesByType?(tt.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==tt.endpoints.length?(Object.assign(tt,Wn(tt,function(t,e){var n,r={},i=I(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","pageViewInstrumentation"]))),function(t){Ce(tt.resource.attributes,et,t.serviceName),t.serviceVersion&&Ce(tt.resource.attributes,nt,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&&Ce(tt.resource.attributes,rt,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&&Ce(tt.resource.attributes,it,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&&Ce(tt.resource.attributes,ot,r)}(t),function(t){var e;Ce(tt.signalAttributes,ut,g(16)),Ce(tt.signalAttributes,st,null!==(e=null==f?void 0:f.userAgent)&&void 0!==e?e:Z),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=_(t,2),n=e[0],r=e[1];Ce(tt.signalAttributes,n,r)}))}(t),We(),Rt(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),Bn(),ze(),gn(),c&&c.fetch&&c.Request?J(c,"fetch",An):o("Browser does not support the Fetch API, skipping instrumentation"),zn=!0):r("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")):o("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs"):o("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")}t.addSignalAttribute=function(t,e){Ce(tt.signalAttributes,t,e)},t.debug=function(){o("Dash0 Web SDK configuration state:",tt)},t.identify=function(t,e){Le(tt.signalAttributes,ct),null!=t&&Ce(tt.signalAttributes,ct,t),Le(tt.signalAttributes,lt),null!=(null==e?void 0:e.name)&&Ce(tt.signalAttributes,lt,e.name),Le(tt.signalAttributes,ft),null!=(null==e?void 0:e.fullName)&&Ce(tt.signalAttributes,ft,e.fullName),Le(tt.signalAttributes,dt),null!=(null==e?void 0:e.email)&&Ce(tt.signalAttributes,dt,e.email),Le(tt.signalAttributes,vt),null!=(null==e?void 0:e.hash)&&Ce(tt.signalAttributes,vt,e.hash),Le(tt.signalAttributes,pt),null!=(null==e?void 0:e.roles)&&Ce(tt.signalAttributes,pt,e.roles)},t.init=function(t){o("".concat("Initializing Dash0 Web SDK"," (via package)")),Gn(t)},t.removeSignalAttribute=function(t){Le(tt.signalAttributes,t)},t.reportError=function(t,e){nn(t,e)},t.sendEvent=function(t,e){var n;if(Object.values(bt).includes(t))r("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 i=[];qe(i),Object.entries(null!==(n=null==e?void 0:e.attributes)&&void 0!==n?n:{}).forEach((function(t){var e=_(t,2),n=e[0],r=e[1];return Ce(i,n,r)})),Ce(i,at,t),null!=e&&e.title&&Ce(i,"dash0.web.event.title",e.title),Se({timeUnixNano:null!=(null==e?void 0:e.timestamp)?M(e.timestamp):D(),attributes:i,body:Ie(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?Tt[e.severity]:void 0})}},t.terminateSession=function(){if(T)try{!function(t){T&&h&&h.removeItem(t)}(Nt)}catch(t){n("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(){}a("log");var n=a("info"),r=a("warn"),i=a("error"),o=a("debug");function a(t){return"undefined"==typeof console||"function"!=typeof console.log||"function"!=typeof console.log.apply?e:console[t]&&"function"==typeof console[t].apply?function(){console[t].apply(console,arguments)}:function(){console.log.apply(console,arguments)}}var u=Object.prototype.hasOwnProperty;function s(t,e){return u.call(t,e)}var c="undefined"!=typeof window?window:void 0,l=null==c?void 0:c.document,f=null==c?void 0:c.navigator,d="undefined"!=typeof location?location:void 0,v=(null==c?void 0:c.performance)||(null==c?void 0:c.webkitPerformance)||(null==c?void 0:c.msPerformance)||(null==c?void 0:c.mozPerformance);null==c||c.encodeURIComponent;var p=null==c?void 0:c.fetch,h=function(){try{var t;return null!==(t=null==c?void 0:c.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),y=function(){try{var t;return null!==(t=null==c?void 0:c.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),m=Array(32);function g(t){for(var e=0;e<2*t;e++)m[e]=Math.floor(16*Math.random())+48,m[e]>=58&&(m[e]+=39);return String.fromCharCode.apply(null,m.slice(0,2*t))}function b(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var T=null!=h&&"function"==typeof h.getItem&&"function"==typeof h.setItem;function E(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 w(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 S(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){w(o,r,i,a,u,"next",t)}function u(t){w(o,r,i,a,u,"throw",t)}a(void 0)}))}}function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function O(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,x(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function I(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=P(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 N(t,e,n){return(e=x(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(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 L(){L=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 m?e:m,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",y={};function m(){}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=m.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===y)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===y)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")),y;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;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,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}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 _(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 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(_),!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,y):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),y},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),_(n),y}},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;_(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),y}},e}function _(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)||P(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 R(t){return function(t){if(Array.isArray(t))return E(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||P(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 x(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 k(t){return k="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},k(t)}function P(t,e){if(t){if("string"==typeof t)return E(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)?E(t,e):void 0}}function j(){return(new Date).getTime()}function D(){var t=U();return t?String(1e6*(v.now()+t)):M(new Date)}function M(t){return"object"===k(t)?M(t.getTime()):String(t)+"000000"}function U(){var t,e=null==v?void 0:v.timeOrigin;"number"!=typeof e&&(e=null==v||null===(t=v.timing)||void 0===t?void 0:t.fetchStart);return e}var F={setTimeout:null==c?void 0:c.setTimeout,clearTimeout:null==c?void 0:c.clearTimeout,setInterval:null==c?void 0:c.setInterval,clearInterval:null==c?void 0:c.clearInterval},V=null!=c&&null!=c.Zone&&null!=c.Zone.root&&"function"==typeof c.Zone.root.run;function B(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return W.apply("setTimeout",arguments)}function H(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return W.apply("setInterval",arguments)}function W(){var t,e=this;if(V)try{var n=Array.prototype.slice.apply(arguments);return c.Zone.root.run(F[e],c,n)}catch(t){r("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=F[e])||void 0===t?void 0:t.apply(c,arguments)}V&&o("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");v&&v.getEntriesByType;var q=v&&"function"==typeof c.PerformanceObserver&&"function"==typeof v.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"});function G(t){return q?{start:function(){n=v.now();try{var t,e=null==c?void 0:c.PerformanceObserver;if(e)null===(t=o=new e(f))||void 0===t||t.observe({type:"resource"})}catch(t){}u=B(p,6e5)},end:function(){r=v.now(),h(),i||!K()?s():(b(l,"visibilitychange",d),a=B(s,t.maxWaitForResourceMillis))},cancel:p}:function(t){var n=0;return{start:function(){n=j()},end:function(){return t({duration:j()-n})},cancel:e}}(t.onEnd);var n,r,i,o,a,u;function s(){var e;p(),null!==(e=i)&&void 0!==e&&e.duration&&i.duration<864e5?t.onEnd({resource:i,duration:Math.round(i.duration)}):t.onEnd({resource:i,duration:Math.round(r-n)})}function f(e){var o=e.getEntriesByType("resource").find((function(e){var i=e;return i.startTime>=n&&(!r||r+t.maxToleranceForResourceTimingsMillis>=i.responseEnd)&&t.resourceMatcher(i)}));o&&(i=o,r&&s())}function d(){K()||s()}function p(){!function(){if(o){try{var t;null===(t=o)||void 0===t||t.disconnect()}catch(t){}o=void 0}}(),a&&(clearTimeout(a),a=void 0),h(),function(){if(!l)return;t=l,e="visibilitychange",n=d,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function h(){u&&(clearTimeout(u),u=void 0)}}function K(){return"visible"===(null==l?void 0:l.visibilityState)||"prerender"===(null==l?void 0:l.visibilityState)}var Z="undefined";function Y(t){return Math.round(100*t)/100}function Q(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==l?void 0:l.baseURI)&&void 0!==e?e:null==d?void 0:d.href)}function X(t){try{return Q(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var $=Symbol.for("INSTRUMENTED_BY_DASH0");function J(t,e,n){var r=t[e];r?(!0===r[$]&&o("".concat(String(e)," has already been instrumented, skipping")),function(t){t[$]=!0}(r),t[e]=n(r)):o("".concat(String(e)," is not defined, unable to instrument"))}var tt={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.12.1",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:3e3,headersToCapture:[],pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]}},et="service.name",nt="service.version",rt="deployment.environment.name",it="deployment.name",ot="deployment.id",at="event.name",ut="page.load.id",st="user_agent.original",ct="user.id",lt="user.name",ft="user.full_name",dt="user.email",vt="user.hash",pt="user.roles",ht="exception.message",yt="exception.type",mt="exception.stacktrace",gt="url.full",bt={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},Tt={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},Et=0,wt=1,St="pushState",At="replaceState",Ot=1;function It(){var t,e;return"".concat((t={ephemeralSession:!T},e=0,t.ephemeralSession&&(e|=Ot),e.toString(16).padStart(2,"0"))).concat(g(7))}var Nt="d0_session",Ct="#",Lt=864e5,_t=null;function Rt(t,e){if(!T)return o("Storage API is not available and session tracking is therefore not supported."),void(_t=It());t||(t=108e5),e||(e=216e5),t=Math.min(t,Lt),e=Math.min(e,Lt);try{var n=function(t){return T&&h?h.getItem(t):null}(Nt),i=function(t){if(!t)return null;var e=t.split(Ct);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);i&&!function(t,e,n){var r=j()-e;if(t.lastActivityTime<r)return!1;var i=j()-n;return t.startTime>=i}(i,t,e)&&(i=null),i?i.lastActivityTime=j():i={id:It(),startTime:j(),lastActivityTime:j()},function(t,e){T&&h&&h.setItem(t,e)}(Nt,function(t){return t.id+Ct+t.startTime+Ct+t.lastActivityTime}(i)),_t=i.id}catch(t){r("Failed to record session information",t)}}var xt=-1,kt=function(t){addEventListener("pageshow",(function(e){e.persisted&&(xt=e.timeStamp,t(e))}),!0)},Pt=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)))}},jt=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Dt=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},Mt=function(){var t,e=Dt();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},Ut=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Dt(),r="navigate";return xt>=0?r="back-forward-cache":n&&(document.prerendering||Mt()>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}},Ft=new WeakMap;function Vt(t,e){return Ft.get(t)||Ft.set(t,new e),Ft.get(t)}var Bt,Ht=function(){return O((function t(){A(this,t),N(this,"t",void 0),N(this,"i",0),N(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)}}}])}(),Wt=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?C(Object(n),!0).forEach((function(e){N(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(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)}},zt=-1,Gt=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Kt=function(t){"hidden"===document.visibilityState&&zt>-1&&(zt="visibilitychange"===t.type?t.timeStamp:0,Yt())},Zt=function(){addEventListener("visibilitychange",Kt,!0),addEventListener("prerenderingchange",Kt,!0)},Yt=function(){removeEventListener("visibilitychange",Kt,!0),removeEventListener("prerenderingchange",Kt,!0)},Qt=function(){if(zt<0){var t,e=Mt(),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;zt=null!=n?n:Gt(),Zt(),kt((function(){setTimeout((function(){zt=Gt(),Zt()}))}))}return{get firstHiddenTime(){return zt}}},Xt=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},$t=[1800,3e3],Jt=[.1,.25],te=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]:{};Xt((function(){var n,r=Qt(),i=Ut("FCP"),o=Wt("paint",(function(t){var e,a=I(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-Mt(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=Pt(t,i,$t,e.reportAllChanges),kt((function(r){i=Ut("FCP"),n=Pt(t,i,$t,e.reportAllChanges),jt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(qt((function(){var n,r=Ut("CLS",0),i=Vt(e,Ht),o=function(t){var e,o=I(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=Wt("layout-shift",o);a&&(n=Pt(t,r,Jt,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),kt((function(){i.i=0,r=Ut("CLS",0),n=Pt(t,r,Jt,e.reportAllChanges),jt((function(){return n()}))})),setTimeout(n))})))},ee=0,ne=1/0,re=0,ie=function(t){var e,n=I(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(ne=Math.min(ne,r.interactionId),re=Math.max(re,r.interactionId),ee=re?(re-ne)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},oe=function(){var t;return Bt?ee:null!==(t=performance.interactionCount)&&void 0!==t?t:0},ae=0,ue=function(){return O((function t(){A(this,t),N(this,"u",[]),N(this,"l",new Map),N(this,"m",void 0),N(this,"v",void 0)}),[{key:"p",value:function(){ae=oe(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((oe()-ae)/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=I(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)}}}}])}(),se=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)})))},ce=[200,500],le=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&Xt((function(){var n;"interactionCount"in performance||Bt||(Bt=Wt("event",ie,{type:"event",buffered:!0,durationThreshold:0}));var r,i=Ut("INP"),o=Vt(e,ue),a=function(t){se((function(){var e,n=I(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=Wt("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Pt(t,i,ce,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),kt((function(){o.p(),i=Ut("INP"),r=Pt(t,i,ce,e.reportAllChanges)})))}))},fe=function(){return O((function t(){A(this,t),N(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),de=[2500,4e3],ve=!1;function pe(t){var e,n,r=[];return n=i,ve&&n(),l&&c&&(b(l,"visibilitychange",(function(){"visible"!==l.visibilityState&&n()})),b(c,"pagehide",(function(){ve=!0,n()})),b(c,"beforeunload",(function(){ve=!0,n()}))),{send:function(n){"visible"===(null==l?void 0:l.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=B(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}function he(t,e){return ye.apply(this,arguments)}function ye(){return ye=S(L().mark((function t(n,i){var o,a,u,s;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=JSON.stringify(i),a=o,u=o.length,s=!1,"undefined"==typeof CompressionStream){t.next=10;break}return t.next=7,me(o);case 7:a=t.sent,u=a.byteLength,s=!0;case 10:return t.next=12,Promise.all(tt.endpoints.map(function(){var t=S(L().mark((function t(i){var o,c,l;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,(o=new URL(i.url)).pathname=o.pathname+(o.pathname.endsWith("/")?n.substring(1):n),c={"Content-Type":"application/json",Authorization:"Bearer ".concat(i.authToken)},i.dataset&&(c["Dash0-Dataset"]=i.dataset),s&&(c["Content-Encoding"]="gzip"),p){t.next=9;break}return r("Unable to send telemetry, fetch is not defined"),t.abrupt("return");case 9:return t.next=11,p(o,{method:"POST",headers:c,body:a,keepalive:u<=6e4});case 11:(l=t.sent).text().catch(e),l.ok||r("Failed to send telemetry to ".concat(o,": ").concat(l.status," ").concat(l.statusText)),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(0),r("Error sending telemetry to ".concat(i.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 12:case"end":return t.stop()}}),t)}))),ye.apply(this,arguments)}function me(t){return ge.apply(this,arguments)}function ge(){return(ge=S(L().mark((function t(e){var n,r,i;return L().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 be,Te=pe((function(t){he("/v1/logs",{resourceLogs:[{resource:tt.resource,scopeLogs:[{scope:tt.scope,logRecords:t}]}]}).catch((function(t){i("Failed to transmit logs",t)}))})),Ee=pe((function(t){he("/v1/traces",{resourceSpans:[{resource:tt.resource,scopeSpans:[{scope:tt.scope,spans:t}]}]}).catch((function(t){i("Failed to transmit spans",t)}))}));function we(){var t,e,n,r,i,o,a;return be||(e=(t={maxCalls:8096,maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCalls,n=t.maxCallsPerTenMinutes,r=t.maxCallsPerTenSeconds,i=0,o=0,a=0,H((function(){o=0}),6e5),H((function(){a=0}),1e4),be=function(){return++i>e||++o>n||++a>r}),be()}function Se(t){we()?o("Transport rate limit. Will not send item.",t):Te.send(t)}function Ae(t){we()?o("Transport rate limit. Will not send item.",t):Ee.send(t)}var Oe=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function Ie(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return Ie(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"!==k(t))return!1;var e=Object.keys(t);return 1===e.length&&Oe.includes(e[0])}(t)?"object"===k(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=_(t,2);return Ne(e[0],e[1])}))}):e=t,e}}function Ne(t,e){return{key:t,value:Ie(e)}}function Ce(t,e,n){e&&t.push(Ne(e,n))}function Le(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var _e="traceparent",Re=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function xe(){var t,e,n=((null===(t=Array.from(null!==(e=null==l?void 0:l.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===_e})))||void 0===t?void 0:t.content.trim())||"").match(Re)||function(){var t=v.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=I(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===_e)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(Re);if(n)return{traceId:n[1],spanId:n[2]}}function ke(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}var Pe="d042",je=1;function De(t){var e=0;return t.withoutSession&&(e|=je),e.toString(16).padStart(2,"0")}for(var Me=new Uint32Array(256),Ue=0;Ue<256;Ue++){for(var Fe=Ue,Ve=0;Ve<8;Ve++)Fe=1&Fe?3988292384^Fe>>>1:Fe>>>1;Me[Ue]=Fe>>>0}function Be(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^Me[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(g(4))}function He(t){var e=function(t){return t?"".concat(Pe).concat(De({withoutSession:!1})).concat(t).concat(g(5)):"".concat(Pe).concat(De({withoutSession:!0})).concat(g(13))}(_t);return{traceId:e,spanId:Be(e),name:t,kind:3,startTimeUnixNano:D(),attributes:[],events:[],links:[],status:{code:0}}}function We(t,e,n){var r=t;return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):D(),r}function qe(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:D(),attributes:null!=o?o:[]})}var ze=null!=y&&"function"==typeof y.getItem&&"function"==typeof y.setItem;var Ge="d0_tab",Ke=null;function Ze(){if(ze)try{var t=function(t){return ze&&y?y.getItem(t):null}(Ge);if(t)return void(Ke=t);Ke=g(8),function(t,e){ze&&y&&y.setItem(t,e)}(Ge,Ke)}catch(t){r("Failed to record tab ID information",t)}else o("Storage API is not available and tab tracking is therefore not supported.")}function Ye(t,e){for(var n,r,i,o,a,u=0;u<tt.signalAttributes.length;u++)t.push(tt.signalAttributes[u]);!function(t,e){try{var n=Q(e);n.username&&(n.username="REDACTED"),n.password&&(n.password="REDACTED"),Ce(t,gt,n.href),Ce(t,"url.path",n.pathname),Ce(t,"url.domain",n.hostname),Ce(t,"url.scheme",n.protocol.replace(":","")),n.hash&&Ce(t,"url.fragment",n.hash.replace("#","")),n.search&&Ce(t,"url.query",n.search.replace("?",""))}catch(n){Ce(t,gt,String(e))}}(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==c?void 0:c.location.href)&&void 0!==n?n:Z),_t&&Ce(t,"session.id",_t),Ke&&Ce(t,"browser.tab.id",Ke),Ce(t,"browser.window.width",null!==(i=null==c?void 0:c.innerWidth)&&void 0!==i?i:Z),Ce(t,"browser.window.height",null!==(o=null==c?void 0:c.innerHeight)&&void 0!==o?o:Z);var s=null==f||null===(a=f.connection)||void 0===a?void 0:a.effectiveType;s&&Ce(t,"network.connection.subtype",s)}function Qe(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Xt((function(){var n,r=Qt(),i=Ut("LCP"),o=Vt(e,fe),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=I(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-Mt(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=Wt("largest-contentful-paint",a);if(u){n=Pt(t,i,de,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 se(s)}),{capture:!0,once:!0});kt((function(r){i=Ut("LCP"),n=Pt(t,i,de,e.reportAllChanges),jt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}(Xe,{reportAllChanges:!0}),le(Xe,{reportAllChanges:!0}),te(Xe,{reportAllChanges:!0})}function Xe(t){var e=[];Ce(e,at,bt.WEB_VITAL);var n=[];Ce(n,"name",t.name),Ce(n,"value",Y(t.value)),Ce(n,"delta",Y(t.delta));var r={timeUnixNano:D(),attributes:e,severityNumber:Tt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Ye(r.attributes),Se(r)}function $e(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var Je="data:";function tn(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===Je||(!!function(t){for(var e=t.toLowerCase(),n=0,r=tt.endpoints.length;n<r;n++){var i=tt.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||$e(tt.ignoreUrls,t))))}var en,nn=0,rn=0,on={},an=!1;function un(){an=!0}function sn(t,e){t&&cn("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function cn(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(nn>100)&&!function(t){return!t||$e(tt.ignoreErrorMessages,t)}(e)){rn>=20&&(on={},rn=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==c?void 0:c.location.href),a=on[o];if(a)a.seenCount++;else{var u=[];Ce(u,at,bt.ERROR),Ce(u,ht,e),n&&Ce(u,yt,n),r&&Ce(u,mt,r),null!=i&&i.componentStack&&Ce(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),Ye(u),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:D(),attributes:u,severityNumber:Tt.ERROR,severityText:"ERROR",body:{stringValue:e}}},on[o]=a,rn++}!function(){if(en)return;en=setTimeout(ln,1e3)}()}}function ln(){for(var t in en&&(clearTimeout(en),en=null),on)if(s(on,t)){var e=on[t];e.seenCount>e.transmittedCount&&(Se(e.log),nn++)}on={},rn=0}var fn="Unhandled promise rejection: ",dn="<unavailable because Promise wasn't rejected with an Error object>";function vn(t){null==t.reason?sn({message:fn+"<no reason defined>",stack:dn}):"string"==typeof t.reason.message?sn({message:fn+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:dn}):"object"!==k(t.reason)&&sn({message:fn+t.reason,stack:dn})}var pn="__dash0OriginalFunctions";function hn(t,e){for(var n=t[pn],r=0;r<n.length;r++){if(yn(n[r].valuesForEqualityCheck,e))return r}return-1}function yn(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 mn(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[pn]=t[pn]||[],i=hn(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,gn(n,r,i))}function gn(t,e,n){return[t,e,bn(n)]}function bn(t){return null!=t&&("object"===k(t)?Boolean(t.capture):Boolean(t))}function Tn(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[pn];if(null==r)return n;var i=hn(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,gn(e,n,r),i)}function En(){tt.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 reportError(t),un(),t}},i[1]=mn(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]=Tn(this,t,e,r,e),n.apply(this,i)}}(null==c?void 0:c.EventTarget)}function wn(t){var e=null==c?void 0:c[t];"function"==typeof e&&(c[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),un(),t}}}(t),e.apply(this,n)})}function Sn(){!function(){if(c){var t=c.onerror;c.onerror=function(e,n,r,i,o){if(an)return an=!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)),cn({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==c?void 0:c.addEventListener)&&c.addEventListener("unhandledrejection",vn),En(),function(){if(tt.wrapTimers){if(V)return void r("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");wn("setTimeout"),wn("setInterval")}}()}var An=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function On(t){return An.includes(t)}function In(t,e){var n=0!==e.startTime;Nn(t,z.FETCH_START,e,n),Nn(t,z.DOMAIN_LOOKUP_START,e,n),Nn(t,z.DOMAIN_LOOKUP_END,e,n),Nn(t,z.CONNECT_START,e,n),Nn(t,z.SECURE_CONNECTION_START,e,n),Nn(t,z.CONNECT_END,e,n),Nn(t,z.REQUEST_START,e,n),Nn(t,z.RESPONSE_START,e,n),Nn(t,z.RESPONSE_END,e,n)}function Nn(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]||qe(t,e,(r=n[e],String(Math.round(1e6*(r+U())))))}function Cn(t,e){var n=e.encodedBodySize;null!=n&&Ce(t.attributes,"http.response.body.size",n)}function Ln(t){return function(){var e=S(L().mark((function e(n,r){var i,a,u,s,c,l,f,d,v,p,h,y,m,g;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=r?Object.assign({},r):r,s=null,null!==(i=u)&&void 0!==i&&i.body&&(s=u.body,u.body=void 0),c=new Request(n,u),s&&u&&(u.body=s),!tn(l=c.url)){e.next=9;break}return o("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!==(a=c.method)&&void 0!==a?a:"GET",d=On(f),v=On(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",Ye((h=He("HTTP ".concat(p))).attributes,{url:l}),_n(n,r),Ce(h.attributes,"http.request.method",p),d||Ce(h.attributes,"http.request.method_original",f),(X(l)||$e(tt.propagateTraceHeadersCorsURLs,l))&&(null!==(y=u)&&void 0!==y&&y.headers?(u.headers=new Headers(u.headers),ke(u.headers.append,u.headers,h)):n instanceof Request?ke(c.headers.append,c.headers,h):(u||(u={}),u.headers=new Headers,ke(u.headers.append,u.headers,h))),Rn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(m=G({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===Q(l).href},maxWaitForResourceMillis:tt.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:tt.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(In(h,n),Cn(h,n)),Ae(We(h,void 0,1e6*e))}})).start(),e.prev=23,e.next=26,t(n instanceof Request?c:n,u);case 26:return g=e.sent,xn(h,g),kn(g).then((function(){return m.end()})).catch((function(t){m.cancel(),Pn(h,t)})),e.abrupt("return",g);case 32:throw e.prev=32,e.t0=e.catch(23),m.cancel(),Pn(h,e.t0),e.t0;case 37:case"end":return e.stop()}}),e,null,[[23,32]])})));return function(t,n){return e.apply(this,arguments)}}()}function _n(t,e,n){try{return void 0}catch(n){o("failed to analyze request for GraphQL insights",n,t,e)}}function Rn(t,e,n){try{t.forEach((function(t,r){tt.headersToCapture.some((function(t){return t.test(r)}))&&Ce(e.attributes,n(r),t)}))}catch(t){o("unable to capture http headers due to CORS policy")}}function xn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2,e.statusText),Ce(t.attributes,"http.response.status_code",String(n)),Rn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function kn(t){return new Promise((function(e){var n=t.clone().body;if(!n)return e();var r=n.getReader(),i=function(){var t=S(L().mark((function t(){var n;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.read();case 2:if(n=t.sent,!n.done){t.next=6;break}return t.abrupt("return",e());case 6:return t.abrupt("return",i());case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return i()}))}function Pn(t,e){!function(t,e){var n=[];"string"==typeof e?Ce(n,ht,e):e&&(e.code?Ce(n,yt,e.code.toString()):e.name&&Ce(n,yt,e.name),e.message&&Ce(n,ht,e.message),e.stack&&Ce(n,mt,e.stack),qe(t,"exception",n))}(t,e),Ae(We(t,function(t){return{code:2,message:t&&"object"===k(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function jn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=tt.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];Ce(u,at,bt.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=_(t,2),n=e[0],r=e[1];return Ce(u,n,r)})),Ye(u,{url:e});var s=[];Ce(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==l?void 0:l.title)&&void 0!==i?i:Z),null!=l&&l.referrer&&Ce(s,"referrer",l.referrer),Ce(s,"type",n?wt:Et),Ce(s,"change_state",r?At:St);var c={timeUnixNano:t,attributes:u,severityNumber:Tt.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},f=xe();f&&(c.traceId=f.traceId,c.spanId=f.spanId),Se(c)}function Dn(){var t=null==c?void 0:c.performance.getEntriesByType("navigation")[0];if(t){var e=[];Ce(e,at,bt.NAVIGATION_TIMING);var n=[];Ce(n,"name",t.name),Mn(n,t,"responseStatus"),Mn(n,t,"fetchStart"),Mn(n,t,"requestStart"),Mn(n,t,"responseStart"),Mn(n,t,"domInteractive"),Mn(n,t,"domContentLoadedEventEnd"),Mn(n,t,"domComplete"),Mn(n,t,"loadEventEnd"),Mn(n,t,"transferSize"),Mn(n,t,"encodedBodySize"),Mn(n,t,"decodedBodySize");var r={timeUnixNano:Un(),attributes:e,severityNumber:Tt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Ye(r.attributes);var i=xe();i&&(r.traceId=i.traceId,r.spanId=i.spanId),Se(r)}else o("Navigation timings not available. Cannot emit navigation timing log")}function Mn(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||Ce(t,n,Number.isInteger(r)?r:Y(r))}function Un(){return M(Math.round(U()))}var Fn={},Vn=!1,Bn=!1;function Hn(){qn(null==c?void 0:c.location.href)}function Wn(t){qn(t.newURL)}function qn(t,e){var n;if(t)try{var r=new URL(t,null==c?void 0:c.location.href);((n=r).pathname!==Fn.path||Bn&&n.search!==Fn.search||Vn&&n.hash!==Fn.hash)&&(zn(r),jn(D(),r,!0,Boolean(e)))}catch(t){o("Failed to handle url change",t)}}function zn(t){Fn.path=t.pathname,Fn.search=t.search,Fn.hash=t.hash}function Gn(){!function(){try{jn(Un(),null!=c&&c.location.href?new URL(null==c?void 0:c.location.href):void 0)}catch(t){i("Failed to transmit initial page view event",t)}if("complete"===(null==l?void 0:l.readyState))return Dn();c&&b(c,"load",(function(){setTimeout(Dn,0)}))}(),function(){var t,e,n,r;if(c&&c.history){if(tt.pageViewInstrumentation.trackVirtualPageViews){Bn=null!==(t=null===(e=tt.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,Vn=null!==(n=null===(r=tt.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,J(c.history,"replaceState",(function(t){return function(e,n,r){return qn(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),J(c.history,"pushState",(function(t){return function(e,n,r){return qn(r?String(r):void 0),t.apply(this,[e,n,r])}})),c.addEventListener("hashchange",Wn),c.addEventListener("popstate",Hn);try{zn(new URL(c.location.href))}catch(t){}}}else o("Browser does not support history API, skipping instrumentation")}()}var Kn=function(t){if("object"===k(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},Zn=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]=Zn.options.mergeArrays?Zn.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(R(t[n]),R(e[n])):e[n]:Kn(t[n])&&Kn(e[n])?t[n]=Zn(t[n],e[n]):!Kn(t[n])&&Kn(e[n])?t[n]=Zn(e[n],void 0):t[n]=void 0===e[n]?Zn.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},Yn={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};Zn.options=Yn,Zn.withOptions=function(t){Zn.options=Object.assign(Object.assign({},Yn),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=Zn.apply(void 0,n);return Zn.options=Yn,i};var Qn=!1;function Xn(t){Qn?o("Dash0 SDK is being reinitialized, skipping ..."):null!=c?"function"==typeof p&&v&&v.getEntriesByType?(tt.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==tt.endpoints.length?(Object.assign(tt,Zn(tt,function(t,e){var n,r={},i=I(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","pageViewInstrumentation"]))),function(t){Ce(tt.resource.attributes,et,t.serviceName),t.serviceVersion&&Ce(tt.resource.attributes,nt,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&&Ce(tt.resource.attributes,rt,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&&Ce(tt.resource.attributes,it,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&&Ce(tt.resource.attributes,ot,r)}(t),function(t){var e;Ce(tt.signalAttributes,ut,g(16)),Ce(tt.signalAttributes,st,null!==(e=null==f?void 0:f.userAgent)&&void 0!==e?e:Z),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=_(t,2),n=e[0],r=e[1];Ce(tt.signalAttributes,n,r)}))}(t),Ze(),Rt(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),Gn(),Qe(),Sn(),c&&c.fetch&&c.Request?J(c,"fetch",Ln):o("Browser does not support the Fetch API, skipping instrumentation"),Qn=!0):r("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")):o("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs"):o("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")}t.addSignalAttribute=function(t,e){Ce(tt.signalAttributes,t,e)},t.debug=function(){o("Dash0 Web SDK configuration state:",tt)},t.identify=function(t,e){Le(tt.signalAttributes,ct),null!=t&&Ce(tt.signalAttributes,ct,t),Le(tt.signalAttributes,lt),null!=(null==e?void 0:e.name)&&Ce(tt.signalAttributes,lt,e.name),Le(tt.signalAttributes,ft),null!=(null==e?void 0:e.fullName)&&Ce(tt.signalAttributes,ft,e.fullName),Le(tt.signalAttributes,dt),null!=(null==e?void 0:e.email)&&Ce(tt.signalAttributes,dt,e.email),Le(tt.signalAttributes,vt),null!=(null==e?void 0:e.hash)&&Ce(tt.signalAttributes,vt,e.hash),Le(tt.signalAttributes,pt),null!=(null==e?void 0:e.roles)&&Ce(tt.signalAttributes,pt,e.roles)},t.init=function(t){o("".concat("Initializing Dash0 Web SDK"," (via package)")),Xn(t)},t.removeSignalAttribute=function(t){Le(tt.signalAttributes,t)},t.reportError=function(t,e){sn(t,e)},t.sendEvent=function(t,e){var n;if(Object.values(bt).includes(t))r("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 i=[];Ye(i),Object.entries(null!==(n=null==e?void 0:e.attributes)&&void 0!==n?n:{}).forEach((function(t){var e=_(t,2),n=e[0],r=e[1];return Ce(i,n,r)})),Ce(i,at,t),null!=e&&e.title&&Ce(i,"dash0.web.event.title",e.title),Se({timeUnixNano:null!=(null==e?void 0:e.timestamp)?M(e.timestamp):D(),attributes:i,body:Ie(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?Tt[e.severity]:void 0})}},t.terminateSession=function(){if(T)try{!function(t){T&&h&&h.removeItem(t)}(Nt)}catch(t){n("Failed to terminate session",t)}}}));
2
2
  //# sourceMappingURL=dash0.umd.cjs.map