@dash0/sdk-web 0.18.4 → 0.18.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dash0.iife.js +1 -1
- package/dist/dash0.iife.js.map +1 -1
- package/dist/dash0.js +1 -1
- package/dist/dash0.js.map +1 -1
- package/dist/dash0.umd.cjs +1 -1
- package/dist/dash0.umd.cjs.map +1 -1
- package/dist/modules/api/init.js +4 -1
- package/dist/modules/api/init_test.js +16 -1
- package/dist/modules/semantic-conventions.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/semantic-conventions.d.ts +1 -0
- package/dist/types/types/options.d.ts +1 -0
- package/package.json +1 -1
- package/src/api/init.ts +5 -0
- package/src/api/init_test.ts +20 -1
- package/src/semantic-conventions.ts +1 -0
- package/src/types/options.ts +1 -0
package/dist/dash0.iife.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){"use strict";function t(){}function e(t){return t}var n={debug:0,info:1,warn:2,error:3},r=n.warn;var i=s("info"),o=s("warn"),a=s("error"),u=s("debug");function s(e){if("undefined"!=typeof console&&console[e]&&"function"==typeof console[e].apply){var i=n[e];return function(){i>=r&&console[e].apply(console,arguments)}}return t}var c=Object.prototype.hasOwnProperty;function l(t,e){return c.call(t,e)}var f="undefined"!=typeof window?window:void 0,d=null==f?void 0:f.document,v=null==f?void 0:f.navigator,p="undefined"!=typeof location?location:void 0,h=(null==f?void 0:f.performance)||(null==f?void 0:f.webkitPerformance)||(null==f?void 0:f.msPerformance)||(null==f?void 0:f.mozPerformance);null==f||f.encodeURIComponent;var m=null==f?void 0:f.fetch,y=function(){try{var t;return null!==(t=null==f?void 0:f.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),g=function(){try{var t;return null!==(t=null==f?void 0:f.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),b=Array(32);function T(t){for(var e=0;e<2*t;e++)b[e]=Math.floor(16*Math.random())+48,b[e]>=58&&(b[e]+=39);return String.fromCharCode.apply(null,b.slice(0,2*t))}function E(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var w=null!=y&&"function"==typeof y.getItem&&"function"==typeof y.setItem;function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function A(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function O(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){A(o,r,i,a,u,"next",t)}function u(t){A(o,r,i,a,u,"throw",t)}a(void 0)}))}}function I(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,P(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function L(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=j(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function C(t,e,n){return(e=P(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function R(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _(){_=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),u=new R(r||[]);return i(a,"_invoke",{value:I(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",v="suspendedYield",p="executing",h="completed",m={};function y(){}function g(){}function b(){}var T={};c(T,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(x([])));w&&w!==n&&r.call(w,a)&&(T=w);var S=b.prototype=y.prototype=Object.create(T);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,u){var s=f(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function I(e,n,r){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===h){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?h:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=h,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function x(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},A(O.prototype),c(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=x,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:x(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e);else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||j(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(t){return function(t){if(Array.isArray(t))return S(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||j(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function j(t,e){if(t){if("string"==typeof t)return S(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(t,e):void 0}}function U(){return(new Date).getTime()}function M(){var t=V(),e=new Date;if(t){var n=h.now()+t,r=e.getTime();if(Math.abs(n-r)<6e4)return String(1e6*n)}return F(e)}function F(t){return"object"===D(t)?F(t.getTime()):String(t)+"000000"}function V(){var t,e=null==h?void 0:h.timeOrigin;"number"!=typeof e&&(e=null==h||null===(t=h.timing)||void 0===t?void 0:t.fetchStart);return e}var B={setTimeout:null==f?void 0:f.setTimeout,clearTimeout:null==f?void 0:f.clearTimeout,setInterval:null==f?void 0:f.setInterval,clearInterval:null==f?void 0:f.clearInterval},H=null!=f&&null!=f.Zone&&null!=f.Zone.root&&"function"==typeof f.Zone.root.run;function W(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return G.apply("setTimeout",arguments)}function q(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return G.apply("clearTimeout",arguments)}function z(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return G.apply("setInterval",arguments)}function G(){var t,e=this;if(H)try{var n=Array.prototype.slice.apply(arguments);return f.Zone.root.run(B[e],f,n)}catch(t){o("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=B[e])||void 0===t?void 0:t.apply(f,arguments)}H&&u("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");h&&h.getEntriesByType;var K=h&&"function"==typeof f.PerformanceObserver&&"function"==typeof h.now,Z=Object.freeze({CONNECT_END:"connectEnd",CONNECT_START:"connectStart",DECODED_BODY_SIZE:"decodedBodySize",DOM_COMPLETE:"domComplete",DOM_CONTENT_LOADED_EVENT_END:"domContentLoadedEventEnd",DOM_CONTENT_LOADED_EVENT_START:"domContentLoadedEventStart",DOM_INTERACTIVE:"domInteractive",DOMAIN_LOOKUP_END:"domainLookupEnd",DOMAIN_LOOKUP_START:"domainLookupStart",ENCODED_BODY_SIZE:"encodedBodySize",FETCH_START:"fetchStart",LOAD_EVENT_END:"loadEventEnd",LOAD_EVENT_START:"loadEventStart",NAVIGATION_START:"navigationStart",REDIRECT_END:"redirectEnd",REDIRECT_START:"redirectStart",REQUEST_START:"requestStart",RESPONSE_END:"responseEnd",RESPONSE_START:"responseStart",SECURE_CONNECTION_START:"secureConnectionStart",START_TIME:"startTime",UNLOAD_EVENT_END:"unloadEventEnd",UNLOAD_EVENT_START:"unloadEventStart"}),Y=new WeakSet;function X(e){if(!K)return function(e){var n=0;return{start:function(){n=U()},end:function(){return e({duration:U()-n})},cancel:t}}(e.onEnd);var n,r,i,o,a,u=[];return{start:function(){n=h.now();try{var t,e=null==f?void 0:f.PerformanceObserver;if(e)null===(t=i=new e(c))||void 0===t||t.observe({type:"resource"})}catch(t){}a=W(v,6e5)},end:function(t){if(r)return;if(r=null!=t?t:h.now(),p(),!Q())return s();W((function(){return s()}),Math.min(300,e.maxWaitForResourceMillis)),E(d,"visibilitychange",l),o=W(s,e.maxWaitForResourceMillis)},cancel:v};function s(){v();var t=function(){if(!u.length)return;var t,i,o=u.filter((function(t){return t.responseEnd<=r+e.maxToleranceForResourceTimingsMillis&&!Y.has(t)}));if(!o.length)return;1===o.length&&(t=o[0]);if(!t){var a,s=L(o);try{for(s.s();!(a=s.n()).done;){var c=a.value,l=Math.abs(r-n-c.duration)+Math.abs(c.responseEnd-r);(void 0===i||l<i)&&(i=l,t=c)}}catch(t){s.e(t)}finally{s.f()}}if(!t)return;return Y.add(t),t}();null!=t&&t.duration&&t.duration<864e5?e.onEnd({resource:t,duration:t.duration}):e.onEnd({resource:t,duration:r-n})}function c(t){t.getEntriesByType("resource").filter((function(t){var r=t;return r.startTime>=n&&e.resourceMatcher(r)})).forEach((function(t){u.length>=100&&u.shift(),u.push(t)}))}function l(){Q()||s()}function v(){!function(){if(i){try{var t;null===(t=i)||void 0===t||t.disconnect()}catch(t){}i=void 0}}(),o&&(clearTimeout(o),o=void 0),p(),function(){if(!d)return;t=d,e="visibilitychange",n=l,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function p(){a&&(clearTimeout(a),a=void 0)}}function Q(){return"visible"===(null==d?void 0:d.visibilityState)||"prerender"===(null==d?void 0:d.visibilityState)}var $="undefined";function J(t){return Math.round(100*t)/100}function tt(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==d?void 0:d.baseURI)&&void 0!==e?e:null==p?void 0:p.href)}function et(t){try{return tt(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var nt=Symbol.for("INSTRUMENTED_BY_DASH0");function rt(t,e,n){var r=t[e];r?!0!==r[nt]?(!function(t){t[nt]=!0}(r),t[e]=n(r)):u("".concat(String(e)," has already been instrumented, skipping")):u("".concat(String(e)," is not defined, unable to instrument"))}var it={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.18.4",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:50,headersToCapture:[],urlAttributeScrubber:e,pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]},enableTransportCompression:!1};function ot(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var at="data:";function ut(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===at||(!!function(t){for(var e=t.toLowerCase(),n=0,r=it.endpoints.length;n<r;n++){var i=it.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||ot(it.ignoreUrls,t))))}var st=!1;function ct(t){var e,n,r=[];return n=i,st&&n(),d&&f&&(E(d,"visibilitychange",(function(){"visible"!==d.visibilityState&&n()})),E(f,"pagehide",(function(){st=!0,n()})),E(f,"beforeunload",(function(){st=!0,n()}))),{send:function(n){"visible"===(null==d?void 0:d.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=W(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}var lt=0,ft=0;function dt(t,e){return vt.apply(this,arguments)}function vt(){return vt=O(_().mark((function e(n,r){var i,a,s,c;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u("Transmitting telemetry to endpoints",r),i=JSON.stringify(r),a=i,s=new Blob([i]).size,c=!1,"undefined"==typeof CompressionStream||!it.enableTransportCompression){e.next=11;break}return e.next=8,pt(i);case 8:a=e.sent,s=a.byteLength,c=!0;case 11:return e.next=13,Promise.all(it.endpoints.map(function(){var e=O(_().mark((function e(r){var i,u,l;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(i=new URL(r.url)).pathname=i.pathname+(i.pathname.endsWith("/")?n.substring(1):n),u={"Content-Type":"application/json",Authorization:"Bearer ".concat(r.authToken)},r.dataset&&(u["Dash0-Dataset"]=r.dataset),c&&(u["Content-Encoding"]="gzip"),m){e.next=9;break}return o("Unable to send telemetry, fetch is not defined"),e.abrupt("return");case 9:return lt+=s,ft++,e.next=13,m(i,{method:"POST",headers:u,body:a,keepalive:lt<=6e4&&ft<=15});case 13:(l=e.sent).text().catch(t),l.ok||o("Failed to send telemetry to ".concat(i,": ").concat(l.status," ").concat(l.statusText)),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),o("Error sending telemetry to ".concat(r.url).concat(n,":"),e.t0);case 21:return e.prev=21,lt-=s,ft--,e.finish(21);case 25:case"end":return e.stop()}}),e,null,[[0,18,21,25]])})));return function(t){return e.apply(this,arguments)}}()));case 13:case"end":return e.stop()}}),e)}))),vt.apply(this,arguments)}function pt(t){return ht.apply(this,arguments)}function ht(){return(ht=O(_().mark((function t(e){var n,r,i;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new Blob([e]),r=n.stream(),i=r.pipeThrough(new CompressionStream("gzip")),t.abrupt("return",new Response(i).arrayBuffer());case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var mt,yt=ct((function(t){dt("/v1/logs",{resourceLogs:[{resource:it.resource,scopeLogs:[{scope:it.scope,logRecords:t}]}]}).catch((function(t){a("Failed to transmit logs",t)}))})),gt=ct((function(t){dt("/v1/traces",{resourceSpans:[{resource:it.resource,scopeSpans:[{scope:it.scope,spans:t}]}]}).catch((function(t){a("Failed to transmit spans",t)}))}));function bt(){var t,e,n,r,i;return mt||(e=(t={maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCallsPerTenMinutes,n=t.maxCallsPerTenSeconds,r=0,i=0,z((function(){r=0}),6e5),z((function(){i=0}),1e4),mt=function(){return++r>e||++i>n}),mt()}function Tt(t){bt()?u("Transport rate limit. Will not send item.",t):yt.send(t)}function Et(t){t&&(bt()?u("Transport rate limit. Will not send item.",t):gt.send(t))}var wt="service.name",St="service.version",At="deployment.environment.name",Ot="deployment.name",It="deployment.id",Nt="event.name",Lt="dash0.web.event.id",Ct="page.load.id",Rt="user_agent.original",_t="user.id",xt="user.name",kt="user.full_name",Pt="user.email",Dt="user.hash",jt="user.roles",Ut="exception.message",Mt="exception.type",Ft="exception.stacktrace",Vt="url.full",Bt={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},Ht={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},Wt=0,qt=1,zt="pushState",Gt="replaceState",Kt=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function Zt(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return Zt(t)}))}:"string"==typeof t?e.stringValue=t:"number"==typeof t?e.doubleValue=t:"boolean"==typeof t?e.boolValue=t:!function(t){if(null==t||"object"!==D(t))return!1;var e=Object.keys(t);return 1===e.length&&Kt.includes(e[0])}(t)?"object"===D(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=x(t,2);return Yt(e[0],e[1])}))}):e=t,e}}function Yt(t,e){return{key:t,value:Zt(e)}}function Xt(t,e,n){e&&t.push(Yt(e,n))}function Qt(t,e){e&&Object.entries(e).forEach((function(e){var n=x(e,2),r=n[0],i=n[1];return Xt(t,r,i)}))}function $t(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var Jt="traceparent",te=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function ee(){var t,e,n=((null===(t=Array.from(null!==(e=null==d?void 0:d.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===Jt})))||void 0===t?void 0:t.content.trim())||"").match(te)||function(){var t=h.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===Jt)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(te);if(n)return{traceId:n[1],spanId:n[2]}}function ne(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}function re(t,e,n){var r,i,o,a=(r=n.traceId,i=r.substring(0,8),o=r.substring(8,32),"1-".concat(i,"-").concat(o)),u="Root=".concat(a,";Parent=").concat(n.spanId,";Sampled=1");t.call(e,"X-Amzn-Trace-Id",u)}var ie=1;function oe(){var t,e;return"".concat((t={ephemeralSession:!w},e=0,t.ephemeralSession&&(e|=ie),e.toString(16).padStart(2,"0"))).concat(T(7))}var ae="d0_session",ue="#",se=864e5,ce=null;function le(t,e){if(!w)return u("Storage API is not available and session tracking is therefore not supported."),void(ce=oe());t||(t=108e5),e||(e=216e5),t=Math.min(t,se),e=Math.min(e,se);try{var n=function(t){return w&&y?y.getItem(t):null}(ae),r=function(t){if(!t)return null;var e=t.split(ue);if(e.length<3)return null;var n=e[0],r=parseInt(e[1],10),i=parseInt(e[2],10);if(!n||isNaN(r)||isNaN(i))return null;return{id:n,startTime:r,lastActivityTime:i}}(n);r&&!function(t,e,n){var r=U()-e;if(t.lastActivityTime<r)return!1;var i=U()-n;return t.startTime>=i}(r,t,e)&&(r=null),r?r.lastActivityTime=U():r={id:oe(),startTime:U(),lastActivityTime:U()},function(t,e){w&&y&&y.setItem(t,e)}(ae,function(t){return t.id+ue+t.startTime+ue+t.lastActivityTime}(r)),ce=r.id}catch(t){o("Failed to record session information",t)}}var fe="d042",de=1;function ve(t){var e=0;return t.withoutSession&&(e|=de),e.toString(16).padStart(2,"0")}for(var pe=new Uint32Array(256),he=0;he<256;he++){for(var me=he,ye=0;ye<8;ye++)me=1&me?3988292384^me>>>1:me>>>1;pe[he]=me>>>0}function ge(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^pe[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(T(4))}function be(t){var e=function(t){return t?"".concat(fe).concat(ve({withoutSession:!1})).concat(t).concat(T(5)):"".concat(fe).concat(ve({withoutSession:!0})).concat(T(13))}(ce),n=ge(e),r=[];return Xt(r,Lt,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:M(),attributes:r,events:[],links:[],status:{code:0}}}function Te(t,e,n){var r=t;if(!r.endTimeUnixNano)return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):M(),r;u("Attempting to end already ended span. Dropping...",r)}function Ee(t,e,n,r){var i=void 0,o=void 0;"string"==typeof n?i=n:Array.isArray(n)&&(o=n),t.events.push({name:e,timeUnixNano:null!=i?i:M(),attributes:null!=o?o:[]})}function we(t,n,r){var i=function(t){return t?Array.isArray(t)?function(e){return[].concat(k(t),[e]).join(".")}:function(e){return"".concat(t,".").concat(e)}:function(t){return t}}(r);try{var o=tt(n);o.username&&(o.username="REDACTED"),o.password&&(o.password="REDACTED");var a=it.urlAttributeScrubber(C(C(C(C(C(C({},Vt,o.href),"url.path",o.pathname),"url.domain",o.hostname),"url.scheme",o.protocol.replace(":","")),"url.fragment",o.hash?o.hash.replace("#",""):void 0),"url.query",o.search?o.search.replace("?",""):void 0));Object.entries(a).forEach((function(e){var n=x(e,2),r=n[0],o=n[1];void 0!==o&&Xt(t,i(r),o)}))}catch(r){it.urlAttributeScrubber===e&&Xt(t,i(Vt),String(n))}}var Se=null!=g&&"function"==typeof g.getItem&&"function"==typeof g.setItem;var Ae="d0_tab",Oe=null;function Ie(){if(Se)try{var t=function(t){return Se&&g?g.getItem(t):null}(Ae);if(t)return void(Oe=t);Oe=T(8),function(t,e){Se&&g&&g.setItem(t,e)}(Ae,Oe)}catch(t){o("Failed to record tab ID information",t)}else u("Storage API is not available and tab tracking is therefore not supported.")}function Ne(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===Lt}))&&Xt(t,Lt,T(8));for(var u=0;u<it.signalAttributes.length;u++)t.push(it.signalAttributes[u]);we(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==f?void 0:f.location.href)&&void 0!==n?n:$,"page"),ce&&Xt(t,"session.id",ce),Oe&&Xt(t,"browser.tab.id",Oe),Xt(t,"browser.window.width",null!==(i=null==f?void 0:f.innerWidth)&&void 0!==i?i:$),Xt(t,"browser.window.height",null!==(o=null==f?void 0:f.innerHeight)&&void 0!==o?o:$);var s=null==v||null===(a=v.connection)||void 0===a?void 0:a.effectiveType;s&&Xt(t,"network.connection.subtype",s)}var Le,Ce=0,Re=0,_e={},xe=!1;function ke(){xe=!0}function Pe(t,e){t&&De("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function De(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(Ce>100)&&!function(t){return!t||ot(it.ignoreErrorMessages,t)}(e)){Re>=20&&(_e={},Re=0);var o=(e=String(e).substring(0,300))+(r=function(t){return String(t||"").split("\n").slice(0,30).join("\n")}(r))+(null==f?void 0:f.location.href),a=_e[o];if(a)a.seenCount++;else{var u=[];Ne(u),Xt(u,Nt,Bt.ERROR),Xt(u,Ut,e),n&&Xt(u,Mt,n),r&&Xt(u,Ft,r),null!=i&&i.componentStack&&Xt(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),Qt(u,null==i?void 0:i.attributes),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:M(),attributes:u,severityNumber:Ht.ERROR,severityText:"ERROR",body:{stringValue:e}}},_e[o]=a,Re++}!function(){if(Le)return;Le=setTimeout(je,1e3)}()}}function je(){for(var t in Le&&(clearTimeout(Le),Le=null),_e)if(l(_e,t)){var e=_e[t];e.seenCount>e.transmittedCount&&(Tt(e.log),Ce++)}_e={},Re=0}var Ue=-1,Me=function(t){addEventListener("pageshow",(function(e){e.persisted&&(Ue=e.timeStamp,t(e))}),!0)},Fe=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)))}},Ve=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Be=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},He=function(){var t,e=Be();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},We=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Be(),r="navigate";return Ue>=0?r="back-forward-cache":n&&(document.prerendering||He()>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}},qe=new WeakMap;function ze(t,e){return qe.get(t)||qe.set(t,new e),qe.get(t)}var Ge,Ke=function(){return N((function t(){I(this,t),C(this,"t",void 0),C(this,"i",0),C(this,"o",[])}),[{key:"h",value:function(t){var e;if(!t.hadRecentInput){var n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),null===(e=this.t)||void 0===e||e.call(this,t)}}}])}(),Ze=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?R(Object(n),!0).forEach((function(e){C(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:t,buffered:!0},n)),r}}catch(t){}},Ye=function(t){var e=!1;return function(){e||(t(),e=!0)}},Xe=-1,Qe=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},$e=function(t){"hidden"===document.visibilityState&&Xe>-1&&(Xe="visibilitychange"===t.type?t.timeStamp:0,tn())},Je=function(){addEventListener("visibilitychange",$e,!0),addEventListener("prerenderingchange",$e,!0)},tn=function(){removeEventListener("visibilitychange",$e,!0),removeEventListener("prerenderingchange",$e,!0)},en=function(){if(Xe<0){var t,e=He(),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;Xe=null!=n?n:Qe(),Je(),Me((function(){setTimeout((function(){Xe=Qe(),Je()}))}))}return{get firstHiddenTime(){return Xe}}},nn=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},rn=[1800,3e3],on=[.1,.25],an=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]:{};nn((function(){var n,r=en(),i=We("FCP"),o=Ze("paint",(function(t){var e,a=L(t);try{for(a.s();!(e=a.n()).done;){var u=e.value;"first-contentful-paint"===u.name&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-He(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=Fe(t,i,rn,e.reportAllChanges),Me((function(r){i=We("FCP"),n=Fe(t,i,rn,e.reportAllChanges),Ve((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(Ye((function(){var n,r=We("CLS",0),i=ze(e,Ke),o=function(t){var e,o=L(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;i.h(a)}}catch(t){o.e(t)}finally{o.f()}i.i>r.value&&(r.value=i.i,r.entries=i.o,n())},a=Ze("layout-shift",o);a&&(n=Fe(t,r,on,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),Me((function(){i.i=0,r=We("CLS",0),n=Fe(t,r,on,e.reportAllChanges),Ve((function(){return n()}))})),setTimeout(n))})))},un=0,sn=1/0,cn=0,ln=function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(sn=Math.min(sn,r.interactionId),cn=Math.max(cn,r.interactionId),un=cn?(cn-sn)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},fn=function(){var t;return Ge?un:null!==(t=performance.interactionCount)&&void 0!==t?t:0},dn=0,vn=function(){return N((function t(){I(this,t),C(this,"u",[]),C(this,"l",new Map),C(this,"m",void 0),C(this,"v",void 0)}),[{key:"p",value:function(){dn=fn(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((fn()-dn)/50));return this.u[t]}},{key:"h",value:function(t){var e;if(null!==(e=this.m)&&void 0!==e&&e.call(this,t),t.interactionId||"first-input"===t.entryType){var n=this.u.at(-1),r=this.l.get(t.interactionId);if(r||this.u.length<10||t.duration>n.T){var i;if(r?t.duration>r.T?(r.entries=[t],r.T=t.duration):t.duration===r.T&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],T:t.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((function(t,e){return e.T-t.T})),this.u.length>10){var o,a=L(this.u.splice(10));try{for(a.s();!(o=a.n()).done;){var u=o.value;this.l.delete(u.id)}}catch(t){a.e(t)}finally{a.f()}}null===(i=this.v)||void 0===i||i.call(this,r)}}}}])}(),pn=function(t){var e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=Ye(t),document.addEventListener("visibilitychange",t,{once:!0}),e((function(){t(),document.removeEventListener("visibilitychange",t)})))},hn=[200,500],mn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&nn((function(){var n;"interactionCount"in performance||Ge||(Ge=Ze("event",ln,{type:"event",buffered:!0,durationThreshold:0}));var r,i=We("INP"),o=ze(e,vn),a=function(t){pn((function(){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;o.h(a)}}catch(t){n.e(t)}finally{n.f()}var u=o.P();u&&u.T!==i.value&&(i.value=u.T,i.entries=u.entries,r())}))},u=Ze("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Fe(t,i,hn,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),Me((function(){o.p(),i=We("INP"),r=Fe(t,i,hn,e.reportAllChanges)})))}))},yn=function(){return N((function t(){I(this,t),C(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),gn=[2500,4e3];function bn(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};nn((function(){var n,r=en(),i=We("LCP"),o=ze(e,yn),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=L(t);try{for(u.s();!(a=u.n()).done;){var s=a.value;o.h(s),s.startTime<r.firstHiddenTime&&(i.value=Math.max(s.startTime-He(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=Ze("largest-contentful-paint",a);if(u){n=Fe(t,i,gn,e.reportAllChanges);for(var s=Ye((function(){a(u.takeRecords()),u.disconnect(),n(!0)})),c=0,l=["keydown","click","visibilitychange"];c<l.length;c++)addEventListener(l[c],(function(){return pn(s)}),{capture:!0,once:!0});Me((function(r){i=We("LCP"),n=Fe(t,i,gn,e.reportAllChanges),Ve((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}(Tn,{reportAllChanges:!0}),mn(Tn,{reportAllChanges:!0}),an(Tn,{reportAllChanges:!0})}function Tn(t){var e=[];Xt(e,Nt,Bt.WEB_VITAL);var n=[];Xt(n,"name",t.name),Xt(n,"value",J(t.value)),Xt(n,"delta",J(t.delta));var r={timeUnixNano:M(),attributes:e,severityNumber:Ht.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Ne(r.attributes),Tt(r)}var En="Unhandled promise rejection: ",wn="<unavailable because Promise wasn't rejected with an Error object>";function Sn(t){null==t.reason?Pe({message:En+"<no reason defined>",stack:wn}):"string"==typeof t.reason.message?Pe({message:En+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:wn}):"object"!==D(t.reason)&&Pe({message:En+t.reason,stack:wn})}var An="__dash0OriginalFunctions";function On(t,e){for(var n=t[An],r=0;r<n.length;r++){if(In(n[r].valuesForEqualityCheck,e))return r}return-1}function In(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Nn(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[An]=t[An]||[],i=On(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,Ln(n,r,i))}function Ln(t,e,n){return[t,e,Cn(n)]}function Cn(t){return null!=t&&("object"===D(t)?Boolean(t.capture):Boolean(t))}function Rn(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[An];if(null==r)return n;var i=On(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,Ln(e,n,r),i)}function _n(){it.wrapEventHandlers&&function(t){if(!t||"function"!=typeof t.prototype.addEventListener||"function"!=typeof t.prototype.removeEventListener)return;var e=t.prototype.addEventListener,n=t.prototype.removeEventListener;t.prototype.addEventListener=function(t,n,r){if("function"!=typeof n)return e.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=function(){try{return n.apply(this,arguments)}catch(t){throw Pe(t),ke(),t}},i[1]=Nn(this,i[1],t,n,r),e.apply(this,i)},t.prototype.removeEventListener=function(t,e,r){if("function"!=typeof e)return n.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=Rn(this,t,e,r,e),n.apply(this,i)}}(null==f?void 0:f.EventTarget)}function xn(t){var e=null==f?void 0:f[t];"function"==typeof e&&(f[t]=function(t){for(var n=new Array(arguments.length),r=0;r<arguments.length;r++)n[r]=arguments[r];return n[0]=function(t){if("function"!=typeof t)return t;return function(){try{return t.apply(this,arguments)}catch(t){throw reportError(t),ke(),t}}}(t),e.apply(this,n)})}function kn(){!function(){if(f){var t=f.onerror;f.onerror=function(e,n,r,i,o){if(xe)return xe=!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)),De({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==f?void 0:f.addEventListener)&&f.addEventListener("unhandledrejection",Sn),_n(),function(){if(it.wrapTimers){if(H)return void o("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");xn("setTimeout"),xn("setInterval")}}()}var Pn=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function Dn(t){return Pn.includes(t)}function jn(t,e){var n=0!==e.startTime;Un(t,Z.FETCH_START,e,n),Un(t,Z.DOMAIN_LOOKUP_START,e,n),Un(t,Z.DOMAIN_LOOKUP_END,e,n),Un(t,Z.CONNECT_START,e,n),Un(t,Z.SECURE_CONNECTION_START,e,n),Un(t,Z.CONNECT_END,e,n),Un(t,Z.REQUEST_START,e,n),Un(t,Z.RESPONSE_START,e,n),Un(t,Z.RESPONSE_END,e,n)}function Un(t,e,n){var r,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];!(e in n)||"number"!=typeof n[e]||i&&0===n[e]||Ee(t,e,(r=n[e],String(Math.round(1e6*(r+V())))))}function Mn(t,e){var n=e.encodedBodySize;null!=n&&Xt(t.attributes,"http.response.body.size",n)}function Fn(t){return function(){var e=O(_().mark((function e(n,r){var i,o,a,s,c,l,f,d,v,p,h,m,y,g,b;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r?Object.assign({},r):r,s=null,null!==(i=a)&&void 0!==i&&i.body&&(s=a.body,a.body=void 0),c=new Request(n,a),s&&a&&(a.body=s),!ut(l=c.url)){e.next=9;break}return u("Not creating span for fetch call because the url is ignored, URL: ".concat(l)),e.abrupt("return",t(n instanceof Request?c:n,r));case 9:return f=null!==(o=c.method)&&void 0!==o?o:"GET",d=Dn(f),v=Dn(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",Ne((h=be("HTTP ".concat(p))).attributes),we(h.attributes,l),Vn(n,r),Xt(h.attributes,"http.request.method",p),d||Xt(h.attributes,"http.request.method_original",f),m=zn(l),m.length>0&&(null!==(y=a)&&void 0!==y&&y.headers?(a.headers=new Headers(a.headers),Gn(a.headers.append,a.headers,h,m)):n instanceof Request?Gn(c.headers.append,c.headers,h,m):(a||(a={}),a.headers=new Headers,Gn(a.headers.append,a.headers,h,m))),Bn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(g=X({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===tt(l).href},maxWaitForResourceMillis:it.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:it.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(jn(h,n),Mn(h,n)),Et(Te(h,void 0,1e6*e))}})).start(),e.prev=25,e.next=28,t(n instanceof Request?c:n,a);case 28:return b=e.sent,Hn(h,b),e.abrupt("return",Wn(b,it.maxToleranceForResourceTimingsMillis,(function(){return g.end()}),(function(t){g.cancel(),qn(h,t)})));case 33:throw e.prev=33,e.t0=e.catch(25),g.cancel(),qn(h,e.t0),e.t0;case 38:case"end":return e.stop()}}),e,null,[[25,33]])})));return function(t,n){return e.apply(this,arguments)}}()}function Vn(t,e,n){try{return void 0}catch(n){u("failed to analyze request for GraphQL insights",n,t,e)}}function Bn(t,e,n){try{if(!it.headersToCapture.length)return;t.forEach((function(t,r){it.headersToCapture.some((function(t){return t.test(r)}))&&Xt(e.attributes,n(r),t)}))}catch(t){u("unable to capture http headers due to CORS policy")}}function Hn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2),0===n&&Xt(t.attributes,"error.type",e.type),Xt(t.attributes,"http.response.status_code",String(n)),Bn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function Wn(t,e,n,r){var i,o,a=h.now(),u=t.body;if(!(u&&(i=t,o=i.status,o>=200&&204!=o&&205!=o&&304!=o)))return n(),t;var s=!1,c=function(t){s||(n(t),s=!0)},l=function(t){s||(r(t),s=!0)},f=W((function(){return c(a)}),e),d=u.getReader(),v=new ReadableStream({pull:function(t){return O(_().mark((function n(){var r,i;return _().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,q(f),n.next=4,d.read();case 4:r=n.sent,i=r.value,r.done?(d.releaseLock(),t.close(),c()):(a=h.now(),f=W((function(){return c(a)}),e),t.enqueue(i)),n.next=15;break;case 10:n.prev=10,n.t0=n.catch(0),l(n.t0),t.error(n.t0);try{d.releaseLock()}catch(t){}case 15:case"end":return n.stop()}}),n,null,[[0,10]])})))()},cancel:function(t){return q(f),c(),d.cancel(t)}});return new Response(v,{status:t.status,statusText:t.statusText,headers:t.headers})}function qn(t,e){!function(t,e){var n=[];"string"==typeof e?Xt(n,Ut,e):e&&(e.code?Xt(n,Mt,e.code.toString()):e.name&&Xt(n,Mt,e.name),e.message&&Xt(n,Ut,e.message),e.stack&&Xt(n,Ft,e.stack),Ee(t,"exception",n))}(t,e),Et(Te(t,function(t){return{code:2,message:t&&"object"===D(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function zn(t){var e=[];if(et(t)){if(e.push("traceparent"),it.propagators){var n,r=L(it.propagators);try{for(r.s();!(n=r.n()).done;){var i=n.value;"traceparent"===i.type||e.includes(i.type)||e.push(i.type)}}catch(t){r.e(t)}finally{r.f()}}return e}if(it.propagators){var o,a=L(it.propagators);try{for(a.s();!(o=a.n()).done;){var u=o.value;ot(u.match,t)&&(e.includes(u.type)||e.push(u.type))}}catch(t){a.e(t)}finally{a.f()}return e}return[]}function Gn(t,e,n,r){var i,o=L(r);try{for(o.s();!(i=o.n()).done;){"xray"===i.value?re(t,e,n):ne(t,e,n)}}catch(t){o.e(t)}finally{o.f()}}function Kn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=it.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];Xt(u,Nt,Bt.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=x(t,2),n=e[0],r=e[1];return Xt(u,n,r)})),Ne(u,{url:e});var s=[];Xt(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==d?void 0:d.title)&&void 0!==i?i:$),null!=d&&d.referrer&&Xt(s,"referrer",d.referrer),Xt(s,"type",n?qt:Wt),Xt(s,"change_state",r?Gt:zt);var c={timeUnixNano:t,attributes:u,severityNumber:Ht.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},l=ee();l&&(c.traceId=l.traceId,c.spanId=l.spanId),Tt(c)}function Zn(){var t=null==f?void 0:f.performance.getEntriesByType("navigation")[0];if(t){var e=[];Xt(e,Nt,Bt.NAVIGATION_TIMING);var n=[];Xt(n,"name",t.name),Yn(n,t,"responseStatus"),Yn(n,t,"fetchStart"),Yn(n,t,"requestStart"),Yn(n,t,"responseStart"),Yn(n,t,"domInteractive"),Yn(n,t,"domContentLoadedEventEnd"),Yn(n,t,"domComplete"),Yn(n,t,"loadEventEnd"),Yn(n,t,"transferSize"),Yn(n,t,"encodedBodySize"),Yn(n,t,"decodedBodySize");var r={timeUnixNano:Xn(),attributes:e,severityNumber:Ht.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Ne(r.attributes);var i=ee();i&&(r.traceId=i.traceId,r.spanId=i.spanId),Tt(r)}else u("Navigation timings not available. Cannot emit navigation timing log")}function Yn(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||Xt(t,n,Number.isInteger(r)?r:J(r))}function Xn(){return F(Math.round(V()))}var Qn={},$n=!1,Jn=!1;function tr(){nr(null==f?void 0:f.location.href)}function er(t){nr(t.newURL)}function nr(t,e){var n;if(t)try{var r=new URL(t,null==f?void 0:f.location.href);((n=r).pathname!==Qn.path||Jn&&n.search!==Qn.search||$n&&n.hash!==Qn.hash)&&(rr(r),Kn(M(),r,!0,Boolean(e)))}catch(t){u("Failed to handle url change",t)}}function rr(t){Qn.path=t.pathname,Qn.search=t.search,Qn.hash=t.hash}function ir(){!function(){try{Kn(Xn(),null!=f&&f.location.href?new URL(null==f?void 0:f.location.href):void 0)}catch(t){a("Failed to transmit initial page view event",t)}if("complete"===(null==d?void 0:d.readyState))return Zn();f&&E(f,"load",(function(){setTimeout(Zn,0)}))}(),function(){var t,e,n,r;if(f&&f.history){if(it.pageViewInstrumentation.trackVirtualPageViews){Jn=null!==(t=null===(e=it.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,$n=null!==(n=null===(r=it.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,rt(f.history,"replaceState",(function(t){return function(e,n,r){return nr(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),rt(f.history,"pushState",(function(t){return function(e,n,r){return nr(r?String(r):void 0),t.apply(this,[e,n,r])}})),f.addEventListener("hashchange",er),f.addEventListener("popstate",tr);try{rr(new URL(f.location.href))}catch(t){}}}else u("Browser does not support history API, skipping instrumentation")}()}var or=function(t){if("object"===D(t)&&null!==t){if("function"==typeof Object.getPrototypeOf){var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1},ar=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce((function(t,e){if(void 0===e)return t;if(Array.isArray(e))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(e).forEach((function(n){["__proto__","constructor","prototype"].includes(n)||(Array.isArray(t[n])&&Array.isArray(e[n])?t[n]=ar.options.mergeArrays?ar.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(k(t[n]),k(e[n])):e[n]:or(t[n])&&or(e[n])?t[n]=ar(t[n],e[n]):!or(t[n])&&or(e[n])?t[n]=ar(e[n],void 0):t[n]=void 0===e[n]?ar.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},ur={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};ar.options=ur,ar.withOptions=function(t){ar.options=Object.assign(Object.assign({},ur),t);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=ar.apply(void 0,n);return ar.options=ur,i};var sr=!1;function cr(t,e){var n=e.enabledInstrumentations;return!n||n.includes(t)}var lr={init:function(t){if(sr)u("Dash0 SDK is being reinitialized, skipping ...");else if(null!=f)if("function"==typeof m&&h&&h.getEntriesByType){var e;if(!t.serviceName.trim())u("Missing or empty serviceName value. Falling back to location.hostname."),t.serviceName=null!==(e=null==p?void 0:p.hostname)&&void 0!==e?e:"unknown";it.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==it.endpoints.length?(Object.assign(it,ar(it,function(t,e){var n,r={},i=L(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;o in t&&(r[o]=t[o])}}catch(t){i.e(t)}finally{i.f()}return r}(t,["ignoreUrls","ignoreErrorMessages","wrapEventHandlers","wrapTimers","propagateTraceHeadersCorsURLs","maxWaitForResourceTimingsMillis","maxToleranceForResourceTimingsMillis","headersToCapture","urlAttributeScrubber","pageViewInstrumentation","enableTransportCompression"]))),function(t){t.propagators?(t.propagateTraceHeadersCorsURLs&&o("Both 'propagators' and deprecated 'propagateTraceHeadersCorsURLs' were provided. Using 'propagators' configuration. Please migrate to the new 'propagators' config."),it.propagators=t.propagators):t.propagateTraceHeadersCorsURLs&&t.propagateTraceHeadersCorsURLs.length>0?(o("'propagateTraceHeadersCorsURLs' is deprecated. Please use the new 'propagators' configuration."),it.propagators=[{type:"traceparent",match:k(t.propagateTraceHeadersCorsURLs)}]):it.propagators=[{type:"traceparent",match:[]}]}(t),function(t){Xt(it.resource.attributes,wt,t.serviceName),t.serviceVersion&&Xt(it.resource.attributes,St,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&&Xt(it.resource.attributes,At,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&&Xt(it.resource.attributes,Ot,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&&Xt(it.resource.attributes,It,r)}(t),function(t){var e;Xt(it.signalAttributes,Ct,T(16)),Xt(it.signalAttributes,Rt,null!==(e=null==v?void 0:v.userAgent)&&void 0!==e?e:$),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=x(t,2),n=e[0],r=e[1];Xt(it.signalAttributes,n,r)}))}(t),Ie(),le(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),cr("@dash0/navigation",t)&&ir(),cr("@dash0/web-vitals",t)&&bn(),cr("@dash0/error",t)&&kn(),cr("@dash0/fetch",t)&&(f&&f.fetch&&f.Request?rt(f,"fetch",Fn):u("Browser does not support the Fetch API, skipping instrumentation")),sr=!0):o("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")}else u("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs.");else u("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")},debug:function(){u("Dash0 Web SDK configuration state:",it)},identify:function(t,e){$t(it.signalAttributes,_t),null!=t&&Xt(it.signalAttributes,_t,t),$t(it.signalAttributes,xt),null!=(null==e?void 0:e.name)&&Xt(it.signalAttributes,xt,e.name),$t(it.signalAttributes,kt),null!=(null==e?void 0:e.fullName)&&Xt(it.signalAttributes,kt,e.fullName),$t(it.signalAttributes,Pt),null!=(null==e?void 0:e.email)&&Xt(it.signalAttributes,Pt,e.email),$t(it.signalAttributes,Dt),null!=(null==e?void 0:e.hash)&&Xt(it.signalAttributes,Dt,e.hash),$t(it.signalAttributes,jt),null!=(null==e?void 0:e.roles)&&Xt(it.signalAttributes,jt,e.roles)},terminateSession:function(){if(w)try{!function(t){w&&y&&y.removeItem(t)}(ae)}catch(t){i("Failed to terminate session",t)}},reportError:function(t,e){Pe(t,e)},addSignalAttribute:function(t,e){Xt(it.signalAttributes,t,e)},removeSignalAttribute:function(t){$t(it.signalAttributes,t)},setActiveLogLevel:function(t){var e;r=null!==(e=n[t])&&void 0!==e?e:n.warn},sendEvent:function(t,e){if(Object.values(Bt).includes(t))o("Unable to send custom event ".concat(t,". You are not allowed to use an internal event name while sending a custom event. Dropping event..."));else{var n=[];Ne(n),Xt(n,Nt,t),null!=e&&e.title&&Xt(n,"dash0.web.event.title",e.title),Qt(n,null==e?void 0:e.attributes),Tt({timeUnixNano:null!=(null==e?void 0:e.timestamp)?F(e.timestamp):M(),attributes:n,body:Zt(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?Ht[e.severity]:void 0})}}};function fr(t){var e=t[0],n=lr[e];if(n){for(var r=[],i=1;i<t.length;i++)r.push(t[i]);n.apply(null,r)}else o("Unsupported Dash0 Web SDK api: ",t[0])}!function(){u("".concat("Initializing Dash0 Web SDK"," (via Script)"));var t=f.dash0;if(!t)return void o("global 'dash0' not found. Did you use the correct Dash0 Web SDK initializer?");if(!t._q)return void o("Dash0 Web SDK command queue not defined. Did you add the script tag multiple times to your website?");(function(t){for(var e=0,n=t.length;e<n;e++)fr(t[e])})(t._q),f.dash0=function(){return fr(arguments)}}()}();
|
|
1
|
+
!function(){"use strict";function t(){}function e(t){return t}var n={debug:0,info:1,warn:2,error:3},r=n.warn;var i=s("info"),o=s("warn"),a=s("error"),u=s("debug");function s(e){if("undefined"!=typeof console&&console[e]&&"function"==typeof console[e].apply){var i=n[e];return function(){i>=r&&console[e].apply(console,arguments)}}return t}var c=Object.prototype.hasOwnProperty;function l(t,e){return c.call(t,e)}var f="undefined"!=typeof window?window:void 0,d=null==f?void 0:f.document,v=null==f?void 0:f.navigator,p="undefined"!=typeof location?location:void 0,h=(null==f?void 0:f.performance)||(null==f?void 0:f.webkitPerformance)||(null==f?void 0:f.msPerformance)||(null==f?void 0:f.mozPerformance);null==f||f.encodeURIComponent;var m=null==f?void 0:f.fetch,y=function(){try{var t;return null!==(t=null==f?void 0:f.localStorage)&&void 0!==t?t:null}catch(t){return null}}(),g=function(){try{var t;return null!==(t=null==f?void 0:f.sessionStorage)&&void 0!==t?t:null}catch(t){return null}}(),b=Array(32);function T(t){for(var e=0;e<2*t;e++)b[e]=Math.floor(16*Math.random())+48,b[e]>=58&&(b[e]+=39);return String.fromCharCode.apply(null,b.slice(0,2*t))}function E(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,n)}var w=null!=y&&"function"==typeof y.getItem&&"function"==typeof y.setItem;function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function A(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function O(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){A(o,r,i,a,u,"next",t)}function u(t){A(o,r,i,a,u,"throw",t)}a(void 0)}))}}function I(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,P(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function L(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=j(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function C(t,e,n){return(e=P(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function R(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _(){_=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),u=new R(r||[]);return i(a,"_invoke",{value:I(t,n,u)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",v="suspendedYield",p="executing",h="completed",m={};function y(){}function g(){}function b(){}var T={};c(T,a,(function(){return this}));var E=Object.getPrototypeOf,w=E&&E(E(x([])));w&&w!==n&&r.call(w,a)&&(T=w);var S=b.prototype=y.prototype=Object.create(T);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,u){var s=f(t[i],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function I(e,n,r){var i=d;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===h){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var s=N(u,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?h:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=h,r.method="throw",r.arg=c.arg)}}}function N(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function x(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=b,i(S,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},A(O.prototype),c(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(S),c(S,s,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=x,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:x(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e);else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(t,e)||j(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(t){return function(t){if(Array.isArray(t))return S(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||j(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function j(t,e){if(t){if("string"==typeof t)return S(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(t,e):void 0}}function U(){return(new Date).getTime()}function M(){var t=V(),e=new Date;if(t){var n=h.now()+t,r=e.getTime();if(Math.abs(n-r)<6e4)return String(1e6*n)}return F(e)}function F(t){return"object"===D(t)?F(t.getTime()):String(t)+"000000"}function V(){var t,e=null==h?void 0:h.timeOrigin;"number"!=typeof e&&(e=null==h||null===(t=h.timing)||void 0===t?void 0:t.fetchStart);return e}var B={setTimeout:null==f?void 0:f.setTimeout,clearTimeout:null==f?void 0:f.clearTimeout,setInterval:null==f?void 0:f.setInterval,clearInterval:null==f?void 0:f.clearInterval},H=null!=f&&null!=f.Zone&&null!=f.Zone.root&&"function"==typeof f.Zone.root.run;function W(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return G.apply("setTimeout",arguments)}function q(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return G.apply("clearTimeout",arguments)}function z(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return G.apply("setInterval",arguments)}function G(){var t,e=this;if(H)try{var n=Array.prototype.slice.apply(arguments);return f.Zone.root.run(B[e],f,n)}catch(t){o("Failed to execute %s inside of zone (via Zone.js). Falling back to execution inside currently active zone.",e,t)}return null===(t=B[e])||void 0===t?void 0:t.apply(f,arguments)}H&&u("Discovered Zone.js globals. Will attempt to register all timers inside the root Zone.");h&&h.getEntriesByType;var K=h&&"function"==typeof f.PerformanceObserver&&"function"==typeof h.now,Z=Object.freeze({CONNECT_END:"connectEnd",CONNECT_START:"connectStart",DECODED_BODY_SIZE:"decodedBodySize",DOM_COMPLETE:"domComplete",DOM_CONTENT_LOADED_EVENT_END:"domContentLoadedEventEnd",DOM_CONTENT_LOADED_EVENT_START:"domContentLoadedEventStart",DOM_INTERACTIVE:"domInteractive",DOMAIN_LOOKUP_END:"domainLookupEnd",DOMAIN_LOOKUP_START:"domainLookupStart",ENCODED_BODY_SIZE:"encodedBodySize",FETCH_START:"fetchStart",LOAD_EVENT_END:"loadEventEnd",LOAD_EVENT_START:"loadEventStart",NAVIGATION_START:"navigationStart",REDIRECT_END:"redirectEnd",REDIRECT_START:"redirectStart",REQUEST_START:"requestStart",RESPONSE_END:"responseEnd",RESPONSE_START:"responseStart",SECURE_CONNECTION_START:"secureConnectionStart",START_TIME:"startTime",UNLOAD_EVENT_END:"unloadEventEnd",UNLOAD_EVENT_START:"unloadEventStart"}),Y=new WeakSet;function X(e){if(!K)return function(e){var n=0;return{start:function(){n=U()},end:function(){return e({duration:U()-n})},cancel:t}}(e.onEnd);var n,r,i,o,a,u=[];return{start:function(){n=h.now();try{var t,e=null==f?void 0:f.PerformanceObserver;if(e)null===(t=i=new e(c))||void 0===t||t.observe({type:"resource"})}catch(t){}a=W(v,6e5)},end:function(t){if(r)return;if(r=null!=t?t:h.now(),p(),!Q())return s();W((function(){return s()}),Math.min(300,e.maxWaitForResourceMillis)),E(d,"visibilitychange",l),o=W(s,e.maxWaitForResourceMillis)},cancel:v};function s(){v();var t=function(){if(!u.length)return;var t,i,o=u.filter((function(t){return t.responseEnd<=r+e.maxToleranceForResourceTimingsMillis&&!Y.has(t)}));if(!o.length)return;1===o.length&&(t=o[0]);if(!t){var a,s=L(o);try{for(s.s();!(a=s.n()).done;){var c=a.value,l=Math.abs(r-n-c.duration)+Math.abs(c.responseEnd-r);(void 0===i||l<i)&&(i=l,t=c)}}catch(t){s.e(t)}finally{s.f()}}if(!t)return;return Y.add(t),t}();null!=t&&t.duration&&t.duration<864e5?e.onEnd({resource:t,duration:t.duration}):e.onEnd({resource:t,duration:r-n})}function c(t){t.getEntriesByType("resource").filter((function(t){var r=t;return r.startTime>=n&&e.resourceMatcher(r)})).forEach((function(t){u.length>=100&&u.shift(),u.push(t)}))}function l(){Q()||s()}function v(){!function(){if(i){try{var t;null===(t=i)||void 0===t||t.disconnect()}catch(t){}i=void 0}}(),o&&(clearTimeout(o),o=void 0),p(),function(){if(!d)return;t=d,e="visibilitychange",n=l,t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent&&t.detachEvent("on"+e,n);var t,e,n}()}function p(){a&&(clearTimeout(a),a=void 0)}}function Q(){return"visible"===(null==d?void 0:d.visibilityState)||"prerender"===(null==d?void 0:d.visibilityState)}var $="undefined";function J(t){return Math.round(100*t)/100}function tt(t){var e;return"string"!=typeof t?t:new URL(t,null!==(e=null==d?void 0:d.baseURI)&&void 0!==e?e:null==p?void 0:p.href)}function et(t){try{return tt(t).origin===("undefined"!=typeof location?location.origin:void 0)}catch(t){return!1}}var nt=Symbol.for("INSTRUMENTED_BY_DASH0");function rt(t,e,n){var r=t[e];r?!0!==r[nt]?(!function(t){t[nt]=!0}(r),t[e]=n(r)):u("".concat(String(e)," has already been instrumented, skipping")):u("".concat(String(e)," is not defined, unable to instrument"))}var it={endpoints:[],resource:{attributes:[]},scope:{name:"dash0-web-sdk",version:"0.18.5",attributes:[]},signalAttributes:[],ignoreUrls:[],ignoreErrorMessages:[],wrapEventHandlers:!0,wrapTimers:!0,propagateTraceHeadersCorsURLs:[],maxWaitForResourceTimingsMillis:1e4,maxToleranceForResourceTimingsMillis:50,headersToCapture:[],urlAttributeScrubber:e,pageViewInstrumentation:{trackVirtualPageViews:!0,includeParts:[]},enableTransportCompression:!1};function ot(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].test(e))return!0;return!1}var at="data:";function ut(t){return!t||(!(t=String(t))||(null==t.substring||t.substring(0,5).toLowerCase()===at||(!!function(t){for(var e=t.toLowerCase(),n=0,r=it.endpoints.length;n<r;n++){var i=it.endpoints[n];if(e.startsWith(i.url))return!0}return!1}(t)||ot(it.ignoreUrls,t))))}var st=!1;function ct(t){var e,n,r=[];return n=i,st&&n(),d&&f&&(E(d,"visibilitychange",(function(){"visible"!==d.visibilityState&&n()})),E(f,"pagehide",(function(){st=!0,n()})),E(f,"beforeunload",(function(){st=!0,n()}))),{send:function(n){"visible"===(null==d?void 0:d.visibilityState)?(r.push(n),r.length>=15?i():null==e&&(e=W(i,1e3))):t([n])}};function i(){null!=e&&(clearTimeout(e),e=null),r.length>0&&(t(r.slice()),r.length=0)}}var lt=0,ft=0;function dt(t,e){return vt.apply(this,arguments)}function vt(){return vt=O(_().mark((function e(n,r){var i,a,s,c;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u("Transmitting telemetry to endpoints",r),i=JSON.stringify(r),a=i,s=new Blob([i]).size,c=!1,"undefined"==typeof CompressionStream||!it.enableTransportCompression){e.next=11;break}return e.next=8,pt(i);case 8:a=e.sent,s=a.byteLength,c=!0;case 11:return e.next=13,Promise.all(it.endpoints.map(function(){var e=O(_().mark((function e(r){var i,u,l;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(i=new URL(r.url)).pathname=i.pathname+(i.pathname.endsWith("/")?n.substring(1):n),u={"Content-Type":"application/json",Authorization:"Bearer ".concat(r.authToken)},r.dataset&&(u["Dash0-Dataset"]=r.dataset),c&&(u["Content-Encoding"]="gzip"),m){e.next=9;break}return o("Unable to send telemetry, fetch is not defined"),e.abrupt("return");case 9:return lt+=s,ft++,e.next=13,m(i,{method:"POST",headers:u,body:a,keepalive:lt<=6e4&&ft<=15});case 13:(l=e.sent).text().catch(t),l.ok||o("Failed to send telemetry to ".concat(i,": ").concat(l.status," ").concat(l.statusText)),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),o("Error sending telemetry to ".concat(r.url).concat(n,":"),e.t0);case 21:return e.prev=21,lt-=s,ft--,e.finish(21);case 25:case"end":return e.stop()}}),e,null,[[0,18,21,25]])})));return function(t){return e.apply(this,arguments)}}()));case 13:case"end":return e.stop()}}),e)}))),vt.apply(this,arguments)}function pt(t){return ht.apply(this,arguments)}function ht(){return(ht=O(_().mark((function t(e){var n,r,i;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new Blob([e]),r=n.stream(),i=r.pipeThrough(new CompressionStream("gzip")),t.abrupt("return",new Response(i).arrayBuffer());case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var mt,yt=ct((function(t){dt("/v1/logs",{resourceLogs:[{resource:it.resource,scopeLogs:[{scope:it.scope,logRecords:t}]}]}).catch((function(t){a("Failed to transmit logs",t)}))})),gt=ct((function(t){dt("/v1/traces",{resourceSpans:[{resource:it.resource,scopeSpans:[{scope:it.scope,spans:t}]}]}).catch((function(t){a("Failed to transmit spans",t)}))}));function bt(){var t,e,n,r,i;return mt||(e=(t={maxCallsPerTenMinutes:4096,maxCallsPerTenSeconds:128}).maxCallsPerTenMinutes,n=t.maxCallsPerTenSeconds,r=0,i=0,z((function(){r=0}),6e5),z((function(){i=0}),1e4),mt=function(){return++r>e||++i>n}),mt()}function Tt(t){bt()?u("Transport rate limit. Will not send item.",t):yt.send(t)}function Et(t){t&&(bt()?u("Transport rate limit. Will not send item.",t):gt.send(t))}var wt="service.name",St="service.namespace",At="service.version",Ot="deployment.environment.name",It="deployment.name",Nt="deployment.id",Lt="event.name",Ct="dash0.web.event.id",Rt="page.load.id",_t="user_agent.original",xt="user.id",kt="user.name",Pt="user.full_name",Dt="user.email",jt="user.hash",Ut="user.roles",Mt="exception.message",Ft="exception.type",Vt="exception.stacktrace",Bt="url.full",Ht={PAGE_VIEW:"browser.page_view",NAVIGATION_TIMING:"browser.navigation_timing",WEB_VITAL:"browser.web_vital",ERROR:"browser.error"},Wt={UNSPECIFIED:0,TRACE:1,DEBUG:5,INFO:9,WARN:13,ERROR:17,FATAL:21},qt=0,zt=1,Gt="pushState",Kt="replaceState",Zt=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"];function Yt(t){if(null!=t){var e={};return Array.isArray(t)?e.arrayValue={values:t.map((function(t){return Yt(t)}))}:"string"==typeof t?e.stringValue=t:"number"==typeof t?e.doubleValue=t:"boolean"==typeof t?e.boolValue=t:!function(t){if(null==t||"object"!==D(t))return!1;var e=Object.keys(t);return 1===e.length&&Zt.includes(e[0])}(t)?"object"===D(t)&&(e.kvlistValue={values:Object.entries(t).map((function(t){var e=x(t,2);return Xt(e[0],e[1])}))}):e=t,e}}function Xt(t,e){return{key:t,value:Yt(e)}}function Qt(t,e,n){e&&t.push(Xt(e,n))}function $t(t,e){e&&Object.entries(e).forEach((function(e){var n=x(e,2),r=n[0],i=n[1];return Qt(t,r,i)}))}function Jt(t,e){var n=t.findIndex((function(t){return t.key===e}));-1!==n&&t.splice(n,1)}var te="traceparent",ee=/^00-([a-f0-9]{32})-([a-f0-9]{16})-[0-9]{1,2}$/;function ne(){var t,e,n=((null===(t=Array.from(null!==(e=null==d?void 0:d.getElementsByTagName("meta"))&&void 0!==e?e:[]).find((function(t){var e;return(null===(e=t.getAttribute("name"))||void 0===e?void 0:e.toLowerCase())===te})))||void 0===t?void 0:t.content.trim())||"").match(ee)||function(){var t=h.getEntriesByType("navigation")[0];if(!t)return"";if(!t.serverTiming)return"";return function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.name===te)return r.description.trim()}}catch(t){n.e(t)}finally{n.f()}return""}(t.serverTiming)}().match(ee);if(n)return{traceId:n[1],spanId:n[2]}}function re(t,e,n){t.call(e,"traceparent","00-".concat(n.traceId,"-").concat(n.spanId,"-01"))}function ie(t,e,n){var r,i,o,a=(r=n.traceId,i=r.substring(0,8),o=r.substring(8,32),"1-".concat(i,"-").concat(o)),u="Root=".concat(a,";Parent=").concat(n.spanId,";Sampled=1");t.call(e,"X-Amzn-Trace-Id",u)}var oe=1;function ae(){var t,e;return"".concat((t={ephemeralSession:!w},e=0,t.ephemeralSession&&(e|=oe),e.toString(16).padStart(2,"0"))).concat(T(7))}var ue="d0_session",se="#",ce=864e5,le=null;function fe(t,e){if(!w)return u("Storage API is not available and session tracking is therefore not supported."),void(le=ae());t||(t=108e5),e||(e=216e5),t=Math.min(t,ce),e=Math.min(e,ce);try{var n=function(t){return w&&y?y.getItem(t):null}(ue),r=function(t){if(!t)return null;var e=t.split(se);if(e.length<3)return null;var n=e[0],r=parseInt(e[1],10),i=parseInt(e[2],10);if(!n||isNaN(r)||isNaN(i))return null;return{id:n,startTime:r,lastActivityTime:i}}(n);r&&!function(t,e,n){var r=U()-e;if(t.lastActivityTime<r)return!1;var i=U()-n;return t.startTime>=i}(r,t,e)&&(r=null),r?r.lastActivityTime=U():r={id:ae(),startTime:U(),lastActivityTime:U()},function(t,e){w&&y&&y.setItem(t,e)}(ue,function(t){return t.id+se+t.startTime+se+t.lastActivityTime}(r)),le=r.id}catch(t){o("Failed to record session information",t)}}var de="d042",ve=1;function pe(t){var e=0;return t.withoutSession&&(e|=ve),e.toString(16).padStart(2,"0")}for(var he=new Uint32Array(256),me=0;me<256;me++){for(var ye=me,ge=0;ge<8;ge++)ye=1&ye?3988292384^ye>>>1:ye>>>1;he[me]=ye>>>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^he[255&(r^o)]}return(4294967295^r)>>>0}(t).toString(16).padStart(8,"0");return"".concat(e).concat(T(4))}function Te(t){var e=function(t){return t?"".concat(de).concat(pe({withoutSession:!1})).concat(t).concat(T(5)):"".concat(de).concat(pe({withoutSession:!0})).concat(T(13))}(le),n=be(e),r=[];return Qt(r,Ct,n),{traceId:e,spanId:n,name:t,kind:3,startTimeUnixNano:M(),attributes:r,events:[],links:[],status:{code:0}}}function Ee(t,e,n){var r=t;if(!r.endTimeUnixNano)return e&&(r.status=e),r.endTimeUnixNano=null!=n?String(Math.round(parseInt(r.startTimeUnixNano)+n)):M(),r;u("Attempting to end already ended span. Dropping...",r)}function we(t,e,n,r){var i=void 0,o=void 0;"string"==typeof n?i=n:Array.isArray(n)&&(o=n),t.events.push({name:e,timeUnixNano:null!=i?i:M(),attributes:null!=o?o:[]})}function Se(t,n,r){var i=function(t){return t?Array.isArray(t)?function(e){return[].concat(k(t),[e]).join(".")}:function(e){return"".concat(t,".").concat(e)}:function(t){return t}}(r);try{var o=tt(n);o.username&&(o.username="REDACTED"),o.password&&(o.password="REDACTED");var a=it.urlAttributeScrubber(C(C(C(C(C(C({},Bt,o.href),"url.path",o.pathname),"url.domain",o.hostname),"url.scheme",o.protocol.replace(":","")),"url.fragment",o.hash?o.hash.replace("#",""):void 0),"url.query",o.search?o.search.replace("?",""):void 0));Object.entries(a).forEach((function(e){var n=x(e,2),r=n[0],o=n[1];void 0!==o&&Qt(t,i(r),o)}))}catch(r){it.urlAttributeScrubber===e&&Qt(t,i(Bt),String(n))}}var Ae=null!=g&&"function"==typeof g.getItem&&"function"==typeof g.setItem;var Oe="d0_tab",Ie=null;function Ne(){if(Ae)try{var t=function(t){return Ae&&g?g.getItem(t):null}(Oe);if(t)return void(Ie=t);Ie=T(8),function(t,e){Ae&&g&&g.setItem(t,e)}(Oe,Ie)}catch(t){o("Failed to record tab ID information",t)}else u("Storage API is not available and tab tracking is therefore not supported.")}function Le(t,e){var n,r,i,o,a;void 0===t.find((function(t){return t.key===Ct}))&&Qt(t,Ct,T(8));for(var u=0;u<it.signalAttributes.length;u++)t.push(it.signalAttributes[u]);Se(t,null!==(n=null!==(r=null==e?void 0:e.url)&&void 0!==r?r:null==f?void 0:f.location.href)&&void 0!==n?n:$,"page"),le&&Qt(t,"session.id",le),Ie&&Qt(t,"browser.tab.id",Ie),Qt(t,"browser.window.width",null!==(i=null==f?void 0:f.innerWidth)&&void 0!==i?i:$),Qt(t,"browser.window.height",null!==(o=null==f?void 0:f.innerHeight)&&void 0!==o?o:$);var s=null==v||null===(a=v.connection)||void 0===a?void 0:a.effectiveType;s&&Qt(t,"network.connection.subtype",s)}var Ce,Re=0,_e=0,xe={},ke=!1;function Pe(){ke=!0}function De(t,e){t&&je("string"==typeof t?{message:t,opts:e}:{message:t.message,type:t.name,stack:t.stack,opts:e})}function je(t){var e=t.message,n=t.type,r=t.stack,i=t.opts;if(e&&!(Re>100)&&!function(t){return!t||ot(it.ignoreErrorMessages,t)}(e)){_e>=20&&(xe={},_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==f?void 0:f.location.href),a=xe[o];if(a)a.seenCount++;else{var u=[];Le(u),Qt(u,Lt,Ht.ERROR),Qt(u,Mt,e),n&&Qt(u,Ft,n),r&&Qt(u,Vt,r),null!=i&&i.componentStack&&Qt(u,"exception.component_stack",null==i?void 0:i.componentStack.substring(0,2048)),$t(u,null==i?void 0:i.attributes),a={seenCount:1,transmittedCount:0,log:{timeUnixNano:M(),attributes:u,severityNumber:Wt.ERROR,severityText:"ERROR",body:{stringValue:e}}},xe[o]=a,_e++}!function(){if(Ce)return;Ce=setTimeout(Ue,1e3)}()}}function Ue(){for(var t in Ce&&(clearTimeout(Ce),Ce=null),xe)if(l(xe,t)){var e=xe[t];e.seenCount>e.transmittedCount&&(Tt(e.log),Re++)}xe={},_e=0}var Me=-1,Fe=function(t){addEventListener("pageshow",(function(e){e.persisted&&(Me=e.timeStamp,t(e))}),!0)},Ve=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)))}},Be=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},He=function(){var t=performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},We=function(){var t,e=He();return null!==(t=null==e?void 0:e.activationStart)&&void 0!==t?t:0},qe=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=He(),r="navigate";return Me>=0?r="back-forward-cache":n&&(document.prerendering||We()>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}},ze=new WeakMap;function Ge(t,e){return ze.get(t)||ze.set(t,new e),ze.get(t)}var Ke,Ze=function(){return N((function t(){I(this,t),C(this,"t",void 0),C(this,"i",0),C(this,"o",[])}),[{key:"h",value:function(t){var e;if(!t.hadRecentInput){var n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),null===(e=this.t)||void 0===e||e.call(this,t)}}}])}(),Ye=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?R(Object(n),!0).forEach((function(e){C(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({type:t,buffered:!0},n)),r}}catch(t){}},Xe=function(t){var e=!1;return function(){e||(t(),e=!0)}},Qe=-1,$e=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Je=function(t){"hidden"===document.visibilityState&&Qe>-1&&(Qe="visibilitychange"===t.type?t.timeStamp:0,en())},tn=function(){addEventListener("visibilitychange",Je,!0),addEventListener("prerenderingchange",Je,!0)},en=function(){removeEventListener("visibilitychange",Je,!0),removeEventListener("prerenderingchange",Je,!0)},nn=function(){if(Qe<0){var t,e=We(),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;Qe=null!=n?n:$e(),tn(),Fe((function(){setTimeout((function(){Qe=$e(),tn()}))}))}return{get firstHiddenTime(){return Qe}}},rn=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},on=[1800,3e3],an=[.1,.25],un=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]:{};rn((function(){var n,r=nn(),i=qe("FCP"),o=Ye("paint",(function(t){var e,a=L(t);try{for(a.s();!(e=a.n()).done;){var u=e.value;"first-contentful-paint"===u.name&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-We(),0),i.entries.push(u),n(!0)))}}catch(t){a.e(t)}finally{a.f()}}));o&&(n=Ve(t,i,on,e.reportAllChanges),Fe((function(r){i=qe("FCP"),n=Ve(t,i,on,e.reportAllChanges),Be((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(Xe((function(){var n,r=qe("CLS",0),i=Ge(e,Ze),o=function(t){var e,o=L(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;i.h(a)}}catch(t){o.e(t)}finally{o.f()}i.i>r.value&&(r.value=i.i,r.entries=i.o,n())},a=Ye("layout-shift",o);a&&(n=Ve(t,r,an,e.reportAllChanges),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(o(a.takeRecords()),n(!0))})),Fe((function(){i.i=0,r=qe("CLS",0),n=Ve(t,r,an,e.reportAllChanges),Be((function(){return n()}))})),setTimeout(n))})))},sn=0,cn=1/0,ln=0,fn=function(t){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.interactionId&&(cn=Math.min(cn,r.interactionId),ln=Math.max(ln,r.interactionId),sn=ln?(ln-cn)/7+1:0)}}catch(t){n.e(t)}finally{n.f()}},dn=function(){var t;return Ke?sn:null!==(t=performance.interactionCount)&&void 0!==t?t:0},vn=0,pn=function(){return N((function t(){I(this,t),C(this,"u",[]),C(this,"l",new Map),C(this,"m",void 0),C(this,"v",void 0)}),[{key:"p",value:function(){vn=dn(),this.u.length=0,this.l.clear()}},{key:"P",value:function(){var t=Math.min(this.u.length-1,Math.floor((dn()-vn)/50));return this.u[t]}},{key:"h",value:function(t){var e;if(null!==(e=this.m)&&void 0!==e&&e.call(this,t),t.interactionId||"first-input"===t.entryType){var n=this.u.at(-1),r=this.l.get(t.interactionId);if(r||this.u.length<10||t.duration>n.T){var i;if(r?t.duration>r.T?(r.entries=[t],r.T=t.duration):t.duration===r.T&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],T:t.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((function(t,e){return e.T-t.T})),this.u.length>10){var o,a=L(this.u.splice(10));try{for(a.s();!(o=a.n()).done;){var u=o.value;this.l.delete(u.id)}}catch(t){a.e(t)}finally{a.f()}}null===(i=this.v)||void 0===i||i.call(this,r)}}}}])}(),hn=function(t){var e=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?t():(t=Xe(t),document.addEventListener("visibilitychange",t,{once:!0}),e((function(){t(),document.removeEventListener("visibilitychange",t)})))},mn=[200,500],yn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&rn((function(){var n;"interactionCount"in performance||Ke||(Ke=Ye("event",fn,{type:"event",buffered:!0,durationThreshold:0}));var r,i=qe("INP"),o=Ge(e,pn),a=function(t){hn((function(){var e,n=L(t);try{for(n.s();!(e=n.n()).done;){var a=e.value;o.h(a)}}catch(t){n.e(t)}finally{n.f()}var u=o.P();u&&u.T!==i.value&&(i.value=u.T,i.entries=u.entries,r())}))},u=Ye("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=Ve(t,i,mn,e.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))})),Fe((function(){o.p(),i=qe("INP"),r=Ve(t,i,mn,e.reportAllChanges)})))}))},gn=function(){return N((function t(){I(this,t),C(this,"m",void 0)}),[{key:"h",value:function(t){var e;null===(e=this.m)||void 0===e||e.call(this,t)}}])}(),bn=[2500,4e3];function Tn(){!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};rn((function(){var n,r=nn(),i=qe("LCP"),o=Ge(e,gn),a=function(t){e.reportAllChanges||(t=t.slice(-1));var a,u=L(t);try{for(u.s();!(a=u.n()).done;){var s=a.value;o.h(s),s.startTime<r.firstHiddenTime&&(i.value=Math.max(s.startTime-We(),0),i.entries=[s],n())}}catch(t){u.e(t)}finally{u.f()}},u=Ye("largest-contentful-paint",a);if(u){n=Ve(t,i,bn,e.reportAllChanges);for(var s=Xe((function(){a(u.takeRecords()),u.disconnect(),n(!0)})),c=0,l=["keydown","click","visibilitychange"];c<l.length;c++)addEventListener(l[c],(function(){return hn(s)}),{capture:!0,once:!0});Fe((function(r){i=qe("LCP"),n=Ve(t,i,bn,e.reportAllChanges),Be((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))}(En,{reportAllChanges:!0}),yn(En,{reportAllChanges:!0}),un(En,{reportAllChanges:!0})}function En(t){var e=[];Qt(e,Lt,Ht.WEB_VITAL);var n=[];Qt(n,"name",t.name),Qt(n,"value",J(t.value)),Qt(n,"delta",J(t.delta));var r={timeUnixNano:M(),attributes:e,severityNumber:Wt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Le(r.attributes),Tt(r)}var wn="Unhandled promise rejection: ",Sn="<unavailable because Promise wasn't rejected with an Error object>";function An(t){null==t.reason?De({message:wn+"<no reason defined>",stack:Sn}):"string"==typeof t.reason.message?De({message:wn+t.reason.message,stack:"string"==typeof t.reason.stack?t.reason.stack:Sn}):"object"!==D(t.reason)&&De({message:wn+t.reason,stack:Sn})}var On="__dash0OriginalFunctions";function In(t,e){for(var n=t[On],r=0;r<n.length;r++){if(Nn(n[r].valuesForEqualityCheck,e))return r}return-1}function Nn(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 Ln(t,e,n,r,i){return function(t,e,n){if(!t)return e;var r=t[On]=t[On]||[],i=In(t,n);return-1!==i?r[i].wrappedFunction:(r.push({wrappedFunction:e,valuesForEqualityCheck:n}),e)}(t,e,Cn(n,r,i))}function Cn(t,e,n){return[t,e,Rn(n)]}function Rn(t){return null!=t&&("object"===D(t)?Boolean(t.capture):Boolean(t))}function _n(t,e,n,r,i){return function(t,e,n){var r=null==t?void 0:t[On];if(null==r)return n;var i=In(t,e);if(-1===i)return n;var o=r[i];return r.splice(i,1),o.wrappedFunction}(t,Cn(e,n,r),i)}function xn(){it.wrapEventHandlers&&function(t){if(!t||"function"!=typeof t.prototype.addEventListener||"function"!=typeof t.prototype.removeEventListener)return;var e=t.prototype.addEventListener,n=t.prototype.removeEventListener;t.prototype.addEventListener=function(t,n,r){if("function"!=typeof n)return e.apply(this,arguments);for(var i=new Array(arguments.length),o=0;o<arguments.length;o++)i[o]=arguments[o];return i[1]=function(){try{return n.apply(this,arguments)}catch(t){throw De(t),Pe(),t}},i[1]=Ln(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]=_n(this,t,e,r,e),n.apply(this,i)}}(null==f?void 0:f.EventTarget)}function kn(t){var e=null==f?void 0:f[t];"function"==typeof e&&(f[t]=function(t){for(var n=new Array(arguments.length),r=0;r<arguments.length;r++)n[r]=arguments[r];return n[0]=function(t){if("function"!=typeof t)return t;return function(){try{return t.apply(this,arguments)}catch(t){throw reportError(t),Pe(),t}}}(t),e.apply(this,n)})}function Pn(){!function(){if(f){var t=f.onerror;f.onerror=function(e,n,r,i,o){if(ke)return ke=!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)),je({message:String(e),stack:a}),"function"==typeof t?t.apply(this,arguments):void 0}}}(),"function"==typeof(null==f?void 0:f.addEventListener)&&f.addEventListener("unhandledrejection",An),xn(),function(){if(it.wrapTimers){if(H)return void o("We discovered a usage of Zone.js. In order to avoid any incompatibility issues timer wrapping is not going to be enabled.");kn("setTimeout"),kn("setInterval")}}()}var Dn=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"];function jn(t){return Dn.includes(t)}function Un(t,e){var n=0!==e.startTime;Mn(t,Z.FETCH_START,e,n),Mn(t,Z.DOMAIN_LOOKUP_START,e,n),Mn(t,Z.DOMAIN_LOOKUP_END,e,n),Mn(t,Z.CONNECT_START,e,n),Mn(t,Z.SECURE_CONNECTION_START,e,n),Mn(t,Z.CONNECT_END,e,n),Mn(t,Z.REQUEST_START,e,n),Mn(t,Z.RESPONSE_START,e,n),Mn(t,Z.RESPONSE_END,e,n)}function Mn(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]||we(t,e,(r=n[e],String(Math.round(1e6*(r+V())))))}function Fn(t,e){var n=e.encodedBodySize;null!=n&&Qt(t.attributes,"http.response.body.size",n)}function Vn(t){return function(){var e=O(_().mark((function e(n,r){var i,o,a,s,c,l,f,d,v,p,h,m,y,g,b;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r?Object.assign({},r):r,s=null,null!==(i=a)&&void 0!==i&&i.body&&(s=a.body,a.body=void 0),c=new Request(n,a),s&&a&&(a.body=s),!ut(l=c.url)){e.next=9;break}return u("Not creating span for fetch call because the url is ignored, URL: ".concat(l)),e.abrupt("return",t(n instanceof Request?c:n,r));case 9:return f=null!==(o=c.method)&&void 0!==o?o:"GET",d=jn(f),v=jn(f.toUpperCase()),p=v?f.toUpperCase():"_OTHER",Le((h=Te("HTTP ".concat(p))).attributes),Se(h.attributes,l),Bn(n,r),Qt(h.attributes,"http.request.method",p),d||Qt(h.attributes,"http.request.method_original",f),m=Gn(l),m.length>0&&(null!==(y=a)&&void 0!==y&&y.headers?(a.headers=new Headers(a.headers),Kn(a.headers.append,a.headers,h,m)):n instanceof Request?Kn(c.headers.append,c.headers,h,m):(a||(a={}),a.headers=new Headers,Kn(a.headers.append,a.headers,h,m))),Hn(c.headers,h,(function(t){return e=t,"".concat("http.request.header",".").concat(e.toLowerCase());var e})),(g=X({resourceMatcher:function(t){var e=t.initiatorType,n=t.name;return("fetch"===e||"xmlhttprequest"===e)&&n===tt(l).href},maxWaitForResourceMillis:it.maxWaitForResourceTimingsMillis,maxToleranceForResourceTimingsMillis:it.maxToleranceForResourceTimingsMillis,onEnd:function(t){var e=t.duration,n=t.resource;n&&(Un(h,n),Fn(h,n)),Et(Ee(h,void 0,1e6*e))}})).start(),e.prev=25,e.next=28,t(n instanceof Request?c:n,a);case 28:return b=e.sent,Wn(h,b),e.abrupt("return",qn(b,it.maxToleranceForResourceTimingsMillis,(function(){return g.end()}),(function(t){g.cancel(),zn(h,t)})));case 33:throw e.prev=33,e.t0=e.catch(25),g.cancel(),zn(h,e.t0),e.t0;case 38:case"end":return e.stop()}}),e,null,[[25,33]])})));return function(t,n){return e.apply(this,arguments)}}()}function Bn(t,e,n){try{return void 0}catch(n){u("failed to analyze request for GraphQL insights",n,t,e)}}function Hn(t,e,n){try{if(!it.headersToCapture.length)return;t.forEach((function(t,r){it.headersToCapture.some((function(t){return t.test(r)}))&&Qt(e.attributes,n(r),t)}))}catch(t){u("unable to capture http headers due to CORS policy")}}function Wn(t,e){var n=e.status;!function(t,e,n){t.status={code:e,message:n}}(t,n>=200&&n<400?0:2),0===n&&Qt(t.attributes,"error.type",e.type),Qt(t.attributes,"http.response.status_code",String(n)),Hn(e.headers,t,(function(t){return e=t,"".concat("http.response.header",".").concat(e.toLowerCase());var e}))}function qn(t,e,n,r){var i,o,a=h.now(),u=t.body;if(!(u&&(i=t,o=i.status,o>=200&&204!=o&&205!=o&&304!=o)))return n(),t;var s=!1,c=function(t){s||(n(t),s=!0)},l=function(t){s||(r(t),s=!0)},f=W((function(){return c(a)}),e),d=u.getReader(),v=new ReadableStream({pull:function(t){return O(_().mark((function n(){var r,i;return _().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,q(f),n.next=4,d.read();case 4:r=n.sent,i=r.value,r.done?(d.releaseLock(),t.close(),c()):(a=h.now(),f=W((function(){return c(a)}),e),t.enqueue(i)),n.next=15;break;case 10:n.prev=10,n.t0=n.catch(0),l(n.t0),t.error(n.t0);try{d.releaseLock()}catch(t){}case 15:case"end":return n.stop()}}),n,null,[[0,10]])})))()},cancel:function(t){return q(f),c(),d.cancel(t)}});return new Response(v,{status:t.status,statusText:t.statusText,headers:t.headers})}function zn(t,e){!function(t,e){var n=[];"string"==typeof e?Qt(n,Mt,e):e&&(e.code?Qt(n,Ft,e.code.toString()):e.name&&Qt(n,Ft,e.name),e.message&&Qt(n,Mt,e.message),e.stack&&Qt(n,Vt,e.stack),we(t,"exception",n))}(t,e),Et(Ee(t,function(t){return{code:2,message:t&&"object"===D(t)&&"message"in t?t.message:String(t)}}(e),void 0))}function Gn(t){var e=[];if(et(t)){if(e.push("traceparent"),it.propagators){var n,r=L(it.propagators);try{for(r.s();!(n=r.n()).done;){var i=n.value;"traceparent"===i.type||e.includes(i.type)||e.push(i.type)}}catch(t){r.e(t)}finally{r.f()}}return e}if(it.propagators){var o,a=L(it.propagators);try{for(a.s();!(o=a.n()).done;){var u=o.value;ot(u.match,t)&&(e.includes(u.type)||e.push(u.type))}}catch(t){a.e(t)}finally{a.f()}return e}return[]}function Kn(t,e,n,r){var i,o=L(r);try{for(o.s();!(i=o.n()).done;){"xray"===i.value?ie(t,e,n):re(t,e,n)}}catch(t){o.e(t)}finally{o.f()}}function Zn(t,e,n,r){var i,o,a=function(t){var e,n,r;return t&&null!==(e=null===(n=(r=it.pageViewInstrumentation).generateMetadata)||void 0===n?void 0:n.call(r,t))&&void 0!==e?e:{}}(e),u=[];Qt(u,Lt,Ht.PAGE_VIEW),a.attributes&&Object.entries(a.attributes).forEach((function(t){var e=x(t,2),n=e[0],r=e[1];return Qt(u,n,r)})),Le(u,{url:e});var s=[];Qt(s,"title",null!==(i=null!==(o=a.title)&&void 0!==o?o:null==d?void 0:d.title)&&void 0!==i?i:$),null!=d&&d.referrer&&Qt(s,"referrer",d.referrer),Qt(s,"type",n?zt:qt),Qt(s,"change_state",r?Kt:Gt);var c={timeUnixNano:t,attributes:u,severityNumber:Wt.INFO,severityText:"INFO",body:{kvlistValue:{values:s}}},l=ne();l&&(c.traceId=l.traceId,c.spanId=l.spanId),Tt(c)}function Yn(){var t=null==f?void 0:f.performance.getEntriesByType("navigation")[0];if(t){var e=[];Qt(e,Lt,Ht.NAVIGATION_TIMING);var n=[];Qt(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:Qn(),attributes:e,severityNumber:Wt.INFO,severityText:"INFO",body:{kvlistValue:{values:n}}};Le(r.attributes);var i=ne();i&&(r.traceId=i.traceId,r.spanId=i.spanId),Tt(r)}else u("Navigation timings not available. Cannot emit navigation timing log")}function Xn(t,e,n){var r=e[n];"number"!=typeof r||isNaN(r)||Qt(t,n,Number.isInteger(r)?r:J(r))}function Qn(){return F(Math.round(V()))}var $n={},Jn=!1,tr=!1;function er(){rr(null==f?void 0:f.location.href)}function nr(t){rr(t.newURL)}function rr(t,e){var n;if(t)try{var r=new URL(t,null==f?void 0:f.location.href);((n=r).pathname!==$n.path||tr&&n.search!==$n.search||Jn&&n.hash!==$n.hash)&&(ir(r),Zn(M(),r,!0,Boolean(e)))}catch(t){u("Failed to handle url change",t)}}function ir(t){$n.path=t.pathname,$n.search=t.search,$n.hash=t.hash}function or(){!function(){try{Zn(Qn(),null!=f&&f.location.href?new URL(null==f?void 0:f.location.href):void 0)}catch(t){a("Failed to transmit initial page view event",t)}if("complete"===(null==d?void 0:d.readyState))return Yn();f&&E(f,"load",(function(){setTimeout(Yn,0)}))}(),function(){var t,e,n,r;if(f&&f.history){if(it.pageViewInstrumentation.trackVirtualPageViews){tr=null!==(t=null===(e=it.pageViewInstrumentation.includeParts)||void 0===e?void 0:e.includes("SEARCH"))&&void 0!==t&&t,Jn=null!==(n=null===(r=it.pageViewInstrumentation.includeParts)||void 0===r?void 0:r.includes("HASH"))&&void 0!==n&&n,rt(f.history,"replaceState",(function(t){return function(e,n,r){return rr(r?String(r):void 0,!0),t.apply(this,[e,n,r])}})),rt(f.history,"pushState",(function(t){return function(e,n,r){return rr(r?String(r):void 0),t.apply(this,[e,n,r])}})),f.addEventListener("hashchange",nr),f.addEventListener("popstate",er);try{ir(new URL(f.location.href))}catch(t){}}}else u("Browser does not support history API, skipping instrumentation")}()}var ar=function(t){if("object"===D(t)&&null!==t){if("function"==typeof Object.getPrototypeOf){var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1},ur=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]=ur.options.mergeArrays?ur.options.uniqueArrayItems?Array.from(new Set(t[n].concat(e[n]))):[].concat(k(t[n]),k(e[n])):e[n]:ar(t[n])&&ar(e[n])?t[n]=ur(t[n],e[n]):!ar(t[n])&&ar(e[n])?t[n]=ur(e[n],void 0):t[n]=void 0===e[n]?ur.options.allowUndefinedOverrides?e[n]:t[n]:e[n])})),t}),{})},sr={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};ur.options=sr,ur.withOptions=function(t){ur.options=Object.assign(Object.assign({},sr),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=ur.apply(void 0,n);return ur.options=sr,i};var cr=!1;function lr(t,e){var n=e.enabledInstrumentations;return!n||n.includes(t)}var fr={init:function(t){if(cr)u("Dash0 SDK is being reinitialized, skipping ...");else if(null!=f)if("function"==typeof m&&h&&h.getEntriesByType){var e;if(!t.serviceName.trim())u("Missing or empty serviceName value. Falling back to location.hostname."),t.serviceName=null!==(e=null==p?void 0:p.hostname)&&void 0!==e?e:"unknown";it.endpoints=t.endpoint instanceof Array?t.endpoint:[t.endpoint],0!==it.endpoints.length?(Object.assign(it,ur(it,function(t,e){var n,r={},i=L(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;o in t&&(r[o]=t[o])}}catch(t){i.e(t)}finally{i.f()}return r}(t,["ignoreUrls","ignoreErrorMessages","wrapEventHandlers","wrapTimers","propagateTraceHeadersCorsURLs","maxWaitForResourceTimingsMillis","maxToleranceForResourceTimingsMillis","headersToCapture","urlAttributeScrubber","pageViewInstrumentation","enableTransportCompression"]))),function(t){t.propagators?(t.propagateTraceHeadersCorsURLs&&o("Both 'propagators' and deprecated 'propagateTraceHeadersCorsURLs' were provided. Using 'propagators' configuration. Please migrate to the new 'propagators' config."),it.propagators=t.propagators):t.propagateTraceHeadersCorsURLs&&t.propagateTraceHeadersCorsURLs.length>0?(o("'propagateTraceHeadersCorsURLs' is deprecated. Please use the new 'propagators' configuration."),it.propagators=[{type:"traceparent",match:k(t.propagateTraceHeadersCorsURLs)}]):it.propagators=[{type:"traceparent",match:[]}]}(t),function(t){Qt(it.resource.attributes,wt,t.serviceName),t.serviceNamespace&&Qt(it.resource.attributes,St,t.serviceNamespace);t.serviceVersion&&Qt(it.resource.attributes,At,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&&Qt(it.resource.attributes,Ot,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&&Qt(it.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&&Qt(it.resource.attributes,Nt,r)}(t),function(t){var e;Qt(it.signalAttributes,Rt,T(16)),Qt(it.signalAttributes,_t,null!==(e=null==v?void 0:v.userAgent)&&void 0!==e?e:$),t.additionalSignalAttributes&&Object.entries(t.additionalSignalAttributes).forEach((function(t){var e=x(t,2),n=e[0],r=e[1];Qt(it.signalAttributes,n,r)}))}(t),Ne(),fe(t.sessionInactivityTimeoutMillis,t.sessionTerminationTimeoutMillis),lr("@dash0/navigation",t)&&or(),lr("@dash0/web-vitals",t)&&Tn(),lr("@dash0/error",t)&&Pn(),lr("@dash0/fetch",t)&&(f&&f.fetch&&f.Request?rt(f,"fetch",Vn):u("Browser does not support the Fetch API, skipping instrumentation")),cr=!0):o("No telemetry endpoint configured. Aborting Dash0 Web SDK initialization process.")}else u("Stopping Dash0 Web SDK initialization. This browser does not support the necessary APIs.");else u("Looks like we are not running in a browser context. Stopping Dash0 Web SDK initialization.")},debug:function(){u("Dash0 Web SDK configuration state:",it)},identify:function(t,e){Jt(it.signalAttributes,xt),null!=t&&Qt(it.signalAttributes,xt,t),Jt(it.signalAttributes,kt),null!=(null==e?void 0:e.name)&&Qt(it.signalAttributes,kt,e.name),Jt(it.signalAttributes,Pt),null!=(null==e?void 0:e.fullName)&&Qt(it.signalAttributes,Pt,e.fullName),Jt(it.signalAttributes,Dt),null!=(null==e?void 0:e.email)&&Qt(it.signalAttributes,Dt,e.email),Jt(it.signalAttributes,jt),null!=(null==e?void 0:e.hash)&&Qt(it.signalAttributes,jt,e.hash),Jt(it.signalAttributes,Ut),null!=(null==e?void 0:e.roles)&&Qt(it.signalAttributes,Ut,e.roles)},terminateSession:function(){if(w)try{!function(t){w&&y&&y.removeItem(t)}(ue)}catch(t){i("Failed to terminate session",t)}},reportError:function(t,e){De(t,e)},addSignalAttribute:function(t,e){Qt(it.signalAttributes,t,e)},removeSignalAttribute:function(t){Jt(it.signalAttributes,t)},setActiveLogLevel:function(t){var e;r=null!==(e=n[t])&&void 0!==e?e:n.warn},sendEvent:function(t,e){if(Object.values(Ht).includes(t))o("Unable to send custom event ".concat(t,". You are not allowed to use an internal event name while sending a custom event. Dropping event..."));else{var n=[];Le(n),Qt(n,Lt,t),null!=e&&e.title&&Qt(n,"dash0.web.event.title",e.title),$t(n,null==e?void 0:e.attributes),Tt({timeUnixNano:null!=(null==e?void 0:e.timestamp)?F(e.timestamp):M(),attributes:n,body:Yt(null==e?void 0:e.data),severityText:null==e?void 0:e.severity,severityNumber:null!=e&&e.severity?Wt[e.severity]:void 0})}}};function dr(t){var e=t[0],n=fr[e];if(n){for(var r=[],i=1;i<t.length;i++)r.push(t[i]);n.apply(null,r)}else o("Unsupported Dash0 Web SDK api: ",t[0])}!function(){u("".concat("Initializing Dash0 Web SDK"," (via Script)"));var t=f.dash0;if(!t)return void o("global 'dash0' not found. Did you use the correct Dash0 Web SDK initializer?");if(!t._q)return void o("Dash0 Web SDK command queue not defined. Did you add the script tag multiple times to your website?");(function(t){for(var e=0,n=t.length;e<n;e++)dr(t[e])})(t._q),f.dash0=function(){return dr(arguments)}}()}();
|
|
2
2
|
//# sourceMappingURL=dash0.iife.js.map
|