highlight.run
Version:
Open source, fullstack monitoring. Capture frontend errors, record server side logs, and visualize what broke with session replay.
9 lines • 665 kB
JavaScript
(function(M,A){typeof exports=="object"&&typeof module!="undefined"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(M=typeof globalThis!="undefined"?globalThis:M||self,A(M.H={}))})(this,function(M){"use strict";var zV=Object.defineProperty,KV=Object.defineProperties;var jV=Object.getOwnPropertyDescriptors;var Qs=Object.getOwnPropertySymbols;var gg=Object.prototype.hasOwnProperty,yg=Object.prototype.propertyIsEnumerable;var mu=(M,A)=>(A=Symbol[M])?A:Symbol.for("Symbol."+M),QV=M=>{throw TypeError(M)};var gu=(M,A,le)=>A in M?zV(M,A,{enumerable:!0,configurable:!0,writable:!0,value:le}):M[A]=le,I=(M,A)=>{for(var le in A||(A={}))gg.call(A,le)&&gu(M,le,A[le]);if(Qs)for(var le of Qs(A))yg.call(A,le)&&gu(M,le,A[le]);return M},H=(M,A)=>KV(M,jV(A));var Oe=(M,A)=>{var le={};for(var ve in M)gg.call(M,ve)&&A.indexOf(ve)<0&&(le[ve]=M[ve]);if(M!=null&&Qs)for(var ve of Qs(M))A.indexOf(ve)<0&&yg.call(M,ve)&&(le[ve]=M[ve]);return le};var Z=(M,A,le)=>gu(M,typeof A!="symbol"?A+"":A,le);var ee=(M,A,le)=>new Promise((ve,Xe)=>{var We=Ae=>{try{Pt(le.next(Ae))}catch(Mt){Xe(Mt)}},je=Ae=>{try{Pt(le.throw(Ae))}catch(Mt){Xe(Mt)}},Pt=Ae=>Ae.done?ve(Ae.value):Promise.resolve(Ae.value).then(We,je);Pt((le=le.apply(M,A)).next())}),$V=function(M,A){this[0]=M,this[1]=A};var yu=M=>{var A=M[mu("asyncIterator")],le=!1,ve,Xe={};return A==null?(A=M[mu("iterator")](),ve=We=>Xe[We]=je=>A[We](je)):(A=A.call(M),ve=We=>Xe[We]=je=>{if(le){if(le=!1,We==="throw")throw je;return je}return le=!0,{done:!1,value:new $V(new Promise(Pt=>{var Ae=A[We](je);Ae instanceof Object||QV("Object expected"),Pt(Ae)}),1)}}),Xe[mu("iterator")]=()=>Xe,ve("next"),"throw"in A?ve("throw"):Xe.throw=We=>{throw We},"return"in A&&ve("return"),Xe};function A(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in r)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}function le(r,e,t){try{if(!(e in r))return()=>{};const n=r[e],i=t(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),r[e]=i,()=>{r[e]=n}}catch(n){return()=>{}}}function ve(r){if(!r||!r.outerHTML)return"";let e="";for(;r.parentElement;){let t=r.localName;if(!t)break;t=t.toLowerCase();let n=r.parentElement,i=[];if(n.children&&n.children.length>0)for(let s=0;s<n.children.length;s++){let o=n.children[s];o.localName&&o.localName.toLowerCase&&o.localName.toLowerCase()===t&&i.push(o)}i.length>1&&(t+=":eq("+i.indexOf(r)+")"),e=t+(e?">"+e:""),r=n}return e}function Xe(r){return Object.prototype.toString.call(r)==="[object Object]"}function We(r,e){if(e===0)return!0;const t=Object.keys(r);for(const n of t)if(Xe(r[n])&&We(r[n],e-1))return!0;return!1}function je(r,e){const t={numOfKeysLimit:50,depthOfLimit:4};Object.assign(t,e);const n=[],i=[];return JSON.stringify(r,function(a,l){if(n.length>0){const u=n.indexOf(this);~u?n.splice(u+1):n.push(this),~u?i.splice(u,1/0,a):i.push(a),~n.indexOf(l)&&(n[0]===l?l="[Circular ~]":l="[Circular ~."+i.slice(0,n.indexOf(l)).join(".")+"]")}else n.push(l);if(l==null)return l;if(s(l))return o(l);if(l instanceof Event){const u={};for(const c in l){const d=l[c];Array.isArray(d)?u[c]=ve(d.length?d[0]:null):u[c]=d}return u}else{if(l instanceof Node)return l instanceof HTMLElement?l?l.outerHTML:"":l.nodeName;if(l instanceof Error)return l.name+": "+l.message}return l});function s(a){return Xe(a)&&Object.keys(a).length>t.numOfKeysLimit||typeof a=="function"?!0:a instanceof Event&&a.isTrusted===!1?Object.keys(a).length===1:!!(Xe(a)&&We(a,t.depthOfLimit))}function o(a){let l=a.toString();return t.stringLengthLimit&&l.length>t.stringLengthLimit&&(l=`${l.slice(0,t.stringLengthLimit)}...`),l}}function Pt(){var r=document.createElement("canvas");return r.getContext&&r.getContext("2d")?r.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function Ae(){return Pt()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}var Mt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function $s(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var bu={exports:{}},qs={exports:{}},vu;function Ig(){return vu||(vu=1,function(r,e){(function(t,n){r.exports=n()})(Mt,function(){function t(p){return!isNaN(parseFloat(p))&&isFinite(p)}function n(p){return p.charAt(0).toUpperCase()+p.substring(1)}function i(p){return function(){return this[p]}}var s=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],a=["fileName","functionName","source"],l=["args"],u=["evalOrigin"],c=s.concat(o,a,l,u);function d(p){if(p)for(var g=0;g<c.length;g++)p[c[g]]!==void 0&&this["set"+n(c[g])](p[c[g]])}d.prototype={getArgs:function(){return this.args},setArgs:function(p){if(Object.prototype.toString.call(p)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=p},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(p){if(p instanceof d)this.evalOrigin=p;else if(p instanceof Object)this.evalOrigin=new d(p);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var p=this.getFileName()||"",g=this.getLineNumber()||"",y=this.getColumnNumber()||"",_=this.getFunctionName()||"";return this.getIsEval()?p?"[eval] ("+p+":"+g+":"+y+")":"[eval]:"+g+":"+y:_?_+" ("+p+":"+g+":"+y+")":p+":"+g+":"+y}},d.fromString=function(g){var y=g.indexOf("("),_=g.lastIndexOf(")"),S=g.substring(0,y),E=g.substring(y+1,_).split(","),R=g.substring(_+1);if(R.indexOf("@")===0)var L=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(R,""),k=L[1],x=L[2],T=L[3];return new d({functionName:S,args:E||void 0,fileName:k,lineNumber:x||void 0,columnNumber:T||void 0})};for(var h=0;h<s.length;h++)d.prototype["get"+n(s[h])]=i(s[h]),d.prototype["set"+n(s[h])]=function(p){return function(g){this[p]=!!g}}(s[h]);for(var f=0;f<o.length;f++)d.prototype["get"+n(o[f])]=i(o[f]),d.prototype["set"+n(o[f])]=function(p){return function(g){if(!t(g))throw new TypeError(p+" must be a Number");this[p]=Number(g)}}(o[f]);for(var m=0;m<a.length;m++)d.prototype["get"+n(a[m])]=i(a[m]),d.prototype["set"+n(a[m])]=function(p){return function(g){this[p]=String(g)}}(a[m]);return d})}(qs)),qs.exports}(function(r,e){(function(t,n){r.exports=n(Ig())})(Mt,function(n){var i=/(^|@)\S+:\d+/,s=/^\s*at .*(\S+:\d+|\(native\))/m,o=/^(eval@)?(\[native code])?$/;return{parse:function(l){if(typeof l.stacktrace!="undefined"||typeof l["opera#sourceloc"]!="undefined")return this.parseOpera(l);if(l.stack&&l.stack.match(s))return this.parseV8OrIE(l);if(l.stack)return this.parseFFOrSafari(l);throw new Error("Cannot parse given Error object")},extractLocation:function(l){if(l.indexOf(":")===-1)return[l];var u=/(.+?)(?::(\d+))?(?::(\d+))?$/,c=u.exec(l.replace(/[()]/g,""));return[c[1],c[2]||void 0,c[3]||void 0]},parseV8OrIE:function(l){var u=l.stack.split(`
`).filter(function(c){return!!c.match(s)},this);return u.map(function(c){c.indexOf("(eval ")>-1&&(c=c.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var d=c.replace(/^\s+/,"").replace(/\(eval code/g,"("),h=d.match(/ (\((.+):(\d+):(\d+)\)$)/);d=h?d.replace(h[0],""):d;var f=d.split(/\s+/).slice(1),m=this.extractLocation(h?h[1]:f.pop()),p=f.join(" ")||void 0,g=["eval","<anonymous>"].indexOf(m[0])>-1?void 0:m[0];return new n({functionName:p,fileName:g,lineNumber:m[1],columnNumber:m[2],source:c})},this)},parseFFOrSafari:function(l){var u=l.stack.split(`
`).filter(function(c){return!c.match(o)},this);return u.map(function(c){if(c.indexOf(" > eval")>-1&&(c=c.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),c.indexOf("@")===-1&&c.indexOf(":")===-1)return new n({functionName:c});var d=/((.*".+"[^@]*)?[^@]*)(?:@)/,h=c.match(d),f=h&&h[1]?h[1]:void 0,m=this.extractLocation(c.replace(d,""));return new n({functionName:f,fileName:m[0],lineNumber:m[1],columnNumber:m[2],source:c})},this)},parseOpera:function(l){return!l.stacktrace||l.message.indexOf(`
`)>-1&&l.message.split(`
`).length>l.stacktrace.split(`
`).length?this.parseOpera9(l):l.stack?this.parseOpera11(l):this.parseOpera10(l)},parseOpera9:function(l){for(var u=/Line (\d+).*script (?:in )?(\S+)/i,c=l.message.split(`
`),d=[],h=2,f=c.length;h<f;h+=2){var m=u.exec(c[h]);m&&d.push(new n({fileName:m[2],lineNumber:m[1],source:c[h]}))}return d},parseOpera10:function(l){for(var u=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,c=l.stacktrace.split(`
`),d=[],h=0,f=c.length;h<f;h+=2){var m=u.exec(c[h]);m&&d.push(new n({functionName:m[3]||void 0,fileName:m[2],lineNumber:m[1],source:c[h]}))}return d},parseOpera11:function(l){var u=l.stack.split(`
`).filter(function(c){return!!c.match(i)&&!c.match(/^Error created at/)},this);return u.map(function(c){var d=c.split("@"),h=this.extractLocation(d.pop()),f=d.shift()||"",m=f.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,p;f.match(/\(([^)]*)\)/)&&(p=f.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var g=p===void 0||p==="[arguments not available]"?void 0:p.split(",");return new n({functionName:m,args:g,fileName:h[0],lineNumber:h[1],columnNumber:h[2],source:c})},this)}}})})(bu);var Tg=bu.exports;const Su=$s(Tg);function Dn(r){try{return Su.parse(r)}catch(e){try{return Su.parse(new Error)}catch(t){return console.warn("Highlight Warning: failed to parse error",{originalError:e,secondaryError:t}),[]}}}function Eg(r,e){const t=e.logger;let n;n=window[t];const i=[];if(e.level.includes("error")&&window){const o=a=>{const{message:l,error:u}=a;let c=[];u&&(c=Dn(u));const d=[je(l,e.stringifyOptions)];r({type:"Error",trace:c,time:Date.now(),value:d})};window.addEventListener("error",o),i.push(()=>{window&&window.removeEventListener("error",o)})}for(const o of e.level)i.push(s(n,o));return()=>{i.forEach(o=>o())};function s(o,a){return o[a]?le(o,a,l=>(...u)=>{l.apply(this,u);try{const c=Dn(new Error),d=e.serializeConsoleAttributes?u.map(h=>typeof h=="object"?je(h,e.stringifyOptions):h):u.filter(h=>typeof h!="object").map(h=>`${h}`);r({type:a,trace:c.slice(1),value:d,attributes:je(u.filter(h=>typeof h=="object").reduce((h,f)=>I(I({},h),f),{}),e.stringifyOptions),time:Date.now()})}catch(c){l("highlight logger error:",c,...u)}}):()=>{}}}var eo={exports:{}};(function(r,e){e=r.exports=t,e.getSerialize=n;function t(i,s,o,a){return JSON.stringify(i,n(s,a),o)}function n(i,s){var o=[],a=[];return s==null&&(s=function(l,u){return o[0]===u?"[Circular ~]":"[Circular ~."+a.slice(0,o.indexOf(u)).join(".")+"]"}),function(l,u){if(o.length>0){var c=o.indexOf(this);~c?o.splice(c+1):o.push(this),~c?a.splice(c,1/0,l):a.push(l),~o.indexOf(u)&&(u=s.call(this,l,u))}else o.push(u);return i==null?u:i.call(this,l,u)}}})(eo,eo.exports);var Zg=eo.exports;const At=$s(Zg);function to(r,e,t,n){var a,l,u,c;let i=Dn(n!=null?n:e),s={};e instanceof Error&&(e=e.message,e.cause&&(s={"exception.cause":e.cause}));const o=Gg(i);r({event:At(e),type:"window.onerror",url:window.location.href,source:t!=null?t:"",lineNumber:(a=o[0])!=null&&a.lineNumber?(l=o[0])==null?void 0:l.lineNumber:0,columnNumber:(u=o[0])!=null&&u.columnNumber?(c=o[0])==null?void 0:c.columnNumber:0,stackTrace:o,timestamp:new Date().toISOString(),payload:s?At(s):void 0})}const Cg=(r,{enablePromisePatch:e})=>{if(typeof window=="undefined")return()=>{};const t=window.onerror=(o,a,l,u,c)=>{to(r,o,a,c)},n=window.onunhandledrejection=o=>{if(o.reason){const a=o.promise;a.getStack?to(r,o.reason,o.type,a.getStack()):to(r,o.reason,o.type)}},i=window.Promise,s=class extends i{constructor(l){super(l);Z(this,"promiseCreationError");this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){const l=typeof window.Zone=="undefined";return e&&l}};return s.shouldPatch()&&(window.Promise=s),()=>{window.Promise=i,window.onunhandledrejection=n,window.onerror=t}},Gg=r=>{var t,n;if(r.length===0)return r;const e=r[0];return(t=e.fileName)!=null&&t.includes("highlight.run")||(n=e.fileName)!=null&&n.includes("highlight.io")||e.functionName==="new highlightPromise"?r.slice(1):r},wu=['["\\"Script error.\\""]','"Script error."','["\\"Load failed.\\""]','"Load failed."','["\\"Network request failed.\\""]','"Network request failed."','["\\"Document is not focused.\\""]','"Document is not focused."','["\\"Failed to fetch\\""]','"Failed to fetch"','[{"isTrusted":true}]','{"isTrusted":true}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],_u=["websocket error",'\\"ResizeObserver loop'];var Lg=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Ut="1.9.0",Ru=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function Ng(r){var e=new Set([r]),t=new Set,n=r.match(Ru);if(!n)return function(){return!1};var i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null)return function(l){return l===r};function s(a){return t.add(a),!1}function o(a){return e.add(a),!0}return function(l){if(e.has(l))return!0;if(t.has(l))return!1;var u=l.match(Ru);if(!u)return s(l);var c={major:+u[1],minor:+u[2],patch:+u[3],prerelease:u[4]};return c.prerelease!=null||i.major!==c.major?s(l):i.major===0?i.minor===c.minor&&i.patch<=c.patch?o(l):s(l):i.minor<=c.minor?o(l):s(l)}}var Vg=Ng(Ut),xg=Ut.split(".")[0],Ur=Symbol.for("opentelemetry.js.api."+xg),Fr=Lg;function Yr(r,e,t,n){var i;n===void 0&&(n=!1);var s=Fr[Ur]=(i=Fr[Ur])!==null&&i!==void 0?i:{version:Ut};if(!n&&s[r]){var o=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+r);return t.error(o.stack||o.message),!1}if(s.version!==Ut){var o=new Error("@opentelemetry/api: Registration of version v"+s.version+" for "+r+" does not match previously registered API v"+Ut);return t.error(o.stack||o.message),!1}return s[r]=e,t.debug("@opentelemetry/api: Registered a global for "+r+" v"+Ut+"."),!0}function Ft(r){var e,t,n=(e=Fr[Ur])===null||e===void 0?void 0:e.version;if(!(!n||!Vg(n)))return(t=Fr[Ur])===null||t===void 0?void 0:t[r]}function Hr(r,e){e.debug("@opentelemetry/api: Unregistering a global for "+r+" v"+Ut+".");var t=Fr[Ur];t&&delete t[r]}var Og=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Xg=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))},Wg=function(){function r(e){this._namespace=e.namespace||"DiagComponentLogger"}return r.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Jr("debug",this._namespace,e)},r.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Jr("error",this._namespace,e)},r.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Jr("info",this._namespace,e)},r.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Jr("warn",this._namespace,e)},r.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Jr("verbose",this._namespace,e)},r}();function Jr(r,e,t){var n=Ft("diag");if(n)return t.unshift(e),n[r].apply(n,Xg([],Og(t),!1))}var ye;(function(r){r[r.NONE=0]="NONE",r[r.ERROR=30]="ERROR",r[r.WARN=50]="WARN",r[r.INFO=60]="INFO",r[r.DEBUG=70]="DEBUG",r[r.VERBOSE=80]="VERBOSE",r[r.ALL=9999]="ALL"})(ye||(ye={}));function kg(r,e){r<ye.NONE?r=ye.NONE:r>ye.ALL&&(r=ye.ALL),e=e||{};function t(n,i){var s=e[n];return typeof s=="function"&&r>=i?s.bind(e):function(){}}return{error:t("error",ye.ERROR),warn:t("warn",ye.WARN),info:t("info",ye.INFO),debug:t("debug",ye.DEBUG),verbose:t("verbose",ye.VERBOSE)}}var Pg=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Mg=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))},Ag="diag",st=function(){function r(){function e(i){return function(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];var a=Ft("diag");if(a)return a[i].apply(a,Mg([],Pg(s),!1))}}var t=this,n=function(i,s){var o,a,l;if(s===void 0&&(s={logLevel:ye.INFO}),i===t){var u=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return t.error((o=u.stack)!==null&&o!==void 0?o:u.message),!1}typeof s=="number"&&(s={logLevel:s});var c=Ft("diag"),d=kg((a=s.logLevel)!==null&&a!==void 0?a:ye.INFO,i);if(c&&!s.suppressOverrideMessage){var h=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";c.warn("Current logger will be overwritten from "+h),d.warn("Current logger will overwrite one already registered from "+h)}return Yr("diag",d,t,!0)};t.setLogger=n,t.disable=function(){Hr(Ag,t)},t.createComponentLogger=function(i){return new Wg(i)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return r.instance=function(){return this._instance||(this._instance=new r),this._instance},r}(),Ug=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Fg=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Yg=function(){function r(e){this._entries=e?new Map(e):new Map}return r.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},r.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var t=Ug(e,2),n=t[0],i=t[1];return[n,i]})},r.prototype.setEntry=function(e,t){var n=new r(this._entries);return n._entries.set(e,t),n},r.prototype.removeEntry=function(e){var t=new r(this._entries);return t._entries.delete(e),t},r.prototype.removeEntries=function(){for(var e,t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s=new r(this._entries);try{for(var o=Fg(n),a=o.next();!a.done;a=o.next()){var l=a.value;s._entries.delete(l)}}catch(u){e={error:u}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return s},r.prototype.clear=function(){return new r},r}(),Hg=Symbol("BaggageEntryMetadata"),Jg=st.instance();function Bg(r){return r===void 0&&(r={}),new Yg(new Map(Object.entries(r)))}function Dg(r){return typeof r!="string"&&(Jg.error("Cannot create baggage metadata from unknown type: "+typeof r),r=""),{__TYPE__:Hg,toString:function(){return r}}}function ro(r){return Symbol.for(r)}var zg=function(){function r(e){var t=this;t._currentContext=e?new Map(e):new Map,t.getValue=function(n){return t._currentContext.get(n)},t.setValue=function(n,i){var s=new r(t._currentContext);return s._currentContext.set(n,i),s},t.deleteValue=function(n){var i=new r(t._currentContext);return i._currentContext.delete(n),i}}return r}(),Yt=new zg,Ht=function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Kg=function(){function r(){}return r.prototype.createGauge=function(e,t){return iy},r.prototype.createHistogram=function(e,t){return sy},r.prototype.createCounter=function(e,t){return ny},r.prototype.createUpDownCounter=function(e,t){return oy},r.prototype.createObservableGauge=function(e,t){return ly},r.prototype.createObservableCounter=function(e,t){return ay},r.prototype.createObservableUpDownCounter=function(e,t){return uy},r.prototype.addBatchObservableCallback=function(e,t){},r.prototype.removeBatchObservableCallback=function(e){},r}(),zn=function(){function r(){}return r}(),jg=function(r){Ht(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.add=function(t,n){},e}(zn),Qg=function(r){Ht(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.add=function(t,n){},e}(zn),$g=function(r){Ht(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.record=function(t,n){},e}(zn),qg=function(r){Ht(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.record=function(t,n){},e}(zn),no=function(){function r(){}return r.prototype.addCallback=function(e){},r.prototype.removeCallback=function(e){},r}(),ey=function(r){Ht(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(no),ty=function(r){Ht(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(no),ry=function(r){Ht(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(no),Iu=new Kg,ny=new jg,iy=new $g,sy=new qg,oy=new Qg,ay=new ey,ly=new ty,uy=new ry;function cy(){return Iu}var Et;(function(r){r[r.INT=0]="INT",r[r.DOUBLE=1]="DOUBLE"})(Et||(Et={}));var dy={get:function(r,e){if(r!=null)return r[e]},keys:function(r){return r==null?[]:Object.keys(r)}},hy={set:function(r,e,t){r!=null&&(r[e]=t)}},fy=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},py=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))},my=function(){function r(){}return r.prototype.active=function(){return Yt},r.prototype.with=function(e,t,n){for(var i=[],s=3;s<arguments.length;s++)i[s-3]=arguments[s];return t.call.apply(t,py([n],fy(i),!1))},r.prototype.bind=function(e,t){return t},r.prototype.enable=function(){return this},r.prototype.disable=function(){return this},r}(),gy=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},yy=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))},io="context",by=new my,Kn=function(){function r(){}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalContextManager=function(e){return Yr(io,e,st.instance())},r.prototype.active=function(){return this._getContextManager().active()},r.prototype.with=function(e,t,n){for(var i,s=[],o=3;o<arguments.length;o++)s[o-3]=arguments[o];return(i=this._getContextManager()).with.apply(i,yy([e,t,n],gy(s),!1))},r.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},r.prototype._getContextManager=function(){return Ft(io)||by},r.prototype.disable=function(){this._getContextManager().disable(),Hr(io,st.instance())},r}(),mt;(function(r){r[r.NONE=0]="NONE",r[r.SAMPLED=1]="SAMPLED"})(mt||(mt={}));var Tu="0000000000000000",Eu="00000000000000000000000000000000",Zu={traceId:Eu,spanId:Tu,traceFlags:mt.NONE},Br=function(){function r(e){e===void 0&&(e=Zu),this._spanContext=e}return r.prototype.spanContext=function(){return this._spanContext},r.prototype.setAttribute=function(e,t){return this},r.prototype.setAttributes=function(e){return this},r.prototype.addEvent=function(e,t){return this},r.prototype.addLink=function(e){return this},r.prototype.addLinks=function(e){return this},r.prototype.setStatus=function(e){return this},r.prototype.updateName=function(e){return this},r.prototype.end=function(e){},r.prototype.isRecording=function(){return!1},r.prototype.recordException=function(e,t){},r}(),so=ro("OpenTelemetry Context Key SPAN");function oo(r){return r.getValue(so)||void 0}function vy(){return oo(Kn.getInstance().active())}function ao(r,e){return r.setValue(so,e)}function Sy(r){return r.deleteValue(so)}function wy(r,e){return ao(r,new Br(e))}function Cu(r){var e;return(e=oo(r))===null||e===void 0?void 0:e.spanContext()}var _y=/^([0-9a-f]{32})$/i,Ry=/^[0-9a-f]{16}$/i;function Gu(r){return _y.test(r)&&r!==Eu}function Iy(r){return Ry.test(r)&&r!==Tu}function jn(r){return Gu(r.traceId)&&Iy(r.spanId)}function Ty(r){return new Br(r)}var lo=Kn.getInstance(),Lu=function(){function r(){}return r.prototype.startSpan=function(e,t,n){n===void 0&&(n=lo.active());var i=!!(t!=null&&t.root);if(i)return new Br;var s=n&&Cu(n);return Ey(s)&&jn(s)?new Br(s):new Br},r.prototype.startActiveSpan=function(e,t,n,i){var s,o,a;if(!(arguments.length<2)){arguments.length===2?a=t:arguments.length===3?(s=t,a=n):(s=t,o=n,a=i);var l=o!=null?o:lo.active(),u=this.startSpan(e,s,l),c=ao(l,u);return lo.with(c,a,void 0,u)}},r}();function Ey(r){return typeof r=="object"&&typeof r.spanId=="string"&&typeof r.traceId=="string"&&typeof r.traceFlags=="number"}var Zy=new Lu,Cy=function(){function r(e,t,n,i){this._provider=e,this.name=t,this.version=n,this.options=i}return r.prototype.startSpan=function(e,t,n){return this._getTracer().startSpan(e,t,n)},r.prototype.startActiveSpan=function(e,t,n,i){var s=this._getTracer();return Reflect.apply(s.startActiveSpan,s,arguments)},r.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Zy},r}(),Gy=function(){function r(){}return r.prototype.getTracer=function(e,t,n){return new Lu},r}(),Ly=new Gy,Nu=function(){function r(){}return r.prototype.getTracer=function(e,t,n){var i;return(i=this.getDelegateTracer(e,t,n))!==null&&i!==void 0?i:new Cy(this,e,t,n)},r.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:Ly},r.prototype.setDelegate=function(e){this._delegate=e},r.prototype.getDelegateTracer=function(e,t,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,t,n)},r}(),Qn;(function(r){r[r.NOT_RECORD=0]="NOT_RECORD",r[r.RECORD=1]="RECORD",r[r.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Qn||(Qn={}));var Dr;(function(r){r[r.INTERNAL=0]="INTERNAL",r[r.SERVER=1]="SERVER",r[r.CLIENT=2]="CLIENT",r[r.PRODUCER=3]="PRODUCER",r[r.CONSUMER=4]="CONSUMER"})(Dr||(Dr={}));var uo;(function(r){r[r.UNSET=0]="UNSET",r[r.OK=1]="OK",r[r.ERROR=2]="ERROR"})(uo||(uo={}));var K=Kn.getInstance(),N=st.instance(),Ny=function(){function r(){}return r.prototype.getMeter=function(e,t,n){return Iu},r}(),Vy=new Ny,co="metrics",xy=function(){function r(){}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalMeterProvider=function(e){return Yr(co,e,st.instance())},r.prototype.getMeterProvider=function(){return Ft(co)||Vy},r.prototype.getMeter=function(e,t,n){return this.getMeterProvider().getMeter(e,t,n)},r.prototype.disable=function(){Hr(co,st.instance())},r}(),zr=xy.getInstance(),Oy=function(){function r(){}return r.prototype.inject=function(e,t){},r.prototype.extract=function(e,t){return e},r.prototype.fields=function(){return[]},r}(),ho=ro("OpenTelemetry Baggage Key");function Vu(r){return r.getValue(ho)||void 0}function Xy(){return Vu(Kn.getInstance().active())}function Wy(r,e){return r.setValue(ho,e)}function ky(r){return r.deleteValue(ho)}var fo="propagation",Py=new Oy,My=function(){function r(){this.createBaggage=Bg,this.getBaggage=Vu,this.getActiveBaggage=Xy,this.setBaggage=Wy,this.deleteBaggage=ky}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalPropagator=function(e){return Yr(fo,e,st.instance())},r.prototype.inject=function(e,t,n){return n===void 0&&(n=hy),this._getGlobalPropagator().inject(e,t,n)},r.prototype.extract=function(e,t,n){return n===void 0&&(n=dy),this._getGlobalPropagator().extract(e,t,n)},r.prototype.fields=function(){return this._getGlobalPropagator().fields()},r.prototype.disable=function(){Hr(fo,st.instance())},r.prototype._getGlobalPropagator=function(){return Ft(fo)||Py},r}(),Ue=My.getInstance(),po="trace",Ay=function(){function r(){this._proxyTracerProvider=new Nu,this.wrapSpanContext=Ty,this.isSpanContextValid=jn,this.deleteSpan=Sy,this.getSpan=oo,this.getActiveSpan=vy,this.getSpanContext=Cu,this.setSpan=ao,this.setSpanContext=wy}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalTracerProvider=function(e){var t=Yr(po,this._proxyTracerProvider,st.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},r.prototype.getTracerProvider=function(){return Ft(po)||this._proxyTracerProvider},r.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},r.prototype.disable=function(){Hr(po,st.instance()),this._proxyTracerProvider=new Nu},r}(),re=Ay.getInstance(),xu=ro("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Ou(r){return r.setValue(xu,!0)}function mo(r){return r.getValue(xu)===!0}var Uy="=",go=";",yo=",",bo="baggage",Fy=180,Yy=4096,Hy=8192,Jy=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s};function By(r){return r.reduce(function(e,t){var n=""+e+(e!==""?yo:"")+t;return n.length>Hy?e:n},"")}function Dy(r){return r.getAllEntries().map(function(e){var t=Jy(e,2),n=t[0],i=t[1],s=encodeURIComponent(n)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(s+=go+i.metadata.toString()),s})}function zy(r){var e=r.split(go);if(!(e.length<=0)){var t=e.shift();if(t){var n=t.indexOf(Uy);if(!(n<=0)){var i=decodeURIComponent(t.substring(0,n).trim()),s=decodeURIComponent(t.substring(n+1).trim()),o;return e.length>0&&(o=Dg(e.join(go))),{key:i,value:s,metadata:o}}}}}var Xu=function(){function r(){}return r.prototype.inject=function(e,t,n){var i=Ue.getBaggage(e);if(!(!i||mo(e))){var s=Dy(i).filter(function(a){return a.length<=Yy}).slice(0,Fy),o=By(s);o.length>0&&n.set(t,bo,o)}},r.prototype.extract=function(e,t,n){var i=n.get(t,bo),s=Array.isArray(i)?i.join(yo):i;if(!s)return e;var o={};if(s.length===0)return e;var a=s.split(yo);return a.forEach(function(l){var u=zy(l);if(u){var c={value:u.value};u.metadata&&(c.metadata=u.metadata),o[u.key]=c}}),Object.entries(o).length===0?e:Ue.setBaggage(e,Ue.createBaggage(o))},r.prototype.fields=function(){return[bo]},r}(),Wu=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ky=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s};function $n(r){var e,t,n={};if(typeof r!="object"||r==null)return n;try{for(var i=Wu(Object.entries(r)),s=i.next();!s.done;s=i.next()){var o=Ky(s.value,2),a=o[0],l=o[1];if(!jy(a)){N.warn("Invalid attribute key: "+a);continue}if(!ku(l)){N.warn("Invalid attribute value set for key: "+a);continue}Array.isArray(l)?n[a]=l.slice():n[a]=l}}catch(u){e={error:u}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return n}function jy(r){return typeof r=="string"&&r.length>0}function ku(r){return r==null?!0:Array.isArray(r)?Qy(r):Pu(r)}function Qy(r){var e,t,n;try{for(var i=Wu(r),s=i.next();!s.done;s=i.next()){var o=s.value;if(o!=null){if(!n){if(Pu(o)){n=typeof o;continue}return!1}if(typeof o!==n)return!1}}}catch(a){e={error:a}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return!0}function Pu(r){switch(typeof r){case"number":case"boolean":case"string":return!0}return!1}function $y(){return function(r){N.error(qy(r))}}function qy(r){return typeof r=="string"?r:JSON.stringify(eb(r))}function eb(r){for(var e={},t=r;t!==null;)Object.getOwnPropertyNames(t).forEach(function(n){if(!e[n]){var i=t[n];i&&(e[n]=String(i))}}),t=Object.getPrototypeOf(t);return e}var tb=$y();function Zt(r){try{tb(r)}catch(e){}}var ot;(function(r){r.AlwaysOff="always_off",r.AlwaysOn="always_on",r.ParentBasedAlwaysOff="parentbased_always_off",r.ParentBasedAlwaysOn="parentbased_always_on",r.ParentBasedTraceIdRatio="parentbased_traceidratio",r.TraceIdRatio="traceidratio"})(ot||(ot={}));var rb=",",nb=["OTEL_SDK_DISABLED"];function ib(r){return nb.indexOf(r)>-1}var sb=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function ob(r){return sb.indexOf(r)>-1}var ab=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function lb(r){return ab.indexOf(r)>-1}var qn=1/0,ei=128,ub=128,cb=128,Mu={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:ye.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:qn,OTEL_ATTRIBUTE_COUNT_LIMIT:ei,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:qn,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:ei,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:qn,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:ei,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:ub,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:cb,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ot.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function db(r,e,t){if(typeof t[r]!="undefined"){var n=String(t[r]);e[r]=n.toLowerCase()==="true"}}function hb(r,e,t,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof t[r]!="undefined"){var s=Number(t[r]);isNaN(s)||(s<n?e[r]=n:s>i?e[r]=i:e[r]=s)}}function fb(r,e,t,n){n===void 0&&(n=rb);var i=t[r];typeof i=="string"&&(e[r]=i.split(n).map(function(s){return s.trim()}))}var pb={ALL:ye.ALL,VERBOSE:ye.VERBOSE,DEBUG:ye.DEBUG,INFO:ye.INFO,WARN:ye.WARN,ERROR:ye.ERROR,NONE:ye.NONE};function mb(r,e,t){var n=t[r];if(typeof n=="string"){var i=pb[n.toUpperCase()];i!=null&&(e[r]=i)}}function Au(r){var e={};for(var t in Mu){var n=t;switch(n){case"OTEL_LOG_LEVEL":mb(n,e,r);break;default:if(ib(n))db(n,e,r);else if(ob(n))hb(n,e,r);else if(lb(n))fb(n,e,r);else{var i=r[n];typeof i!="undefined"&&i!==null&&(e[n]=String(i))}}}return e}var Kr=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function ur(){var r=Au(Kr);return Object.assign({},Mu,r)}function gb(){return Au(Kr)}function Uu(r){return r>=48&&r<=57?r-48:r>=97&&r<=102?r-87:r-55}function vo(r){for(var e=new Uint8Array(r.length/2),t=0,n=0;n<r.length;n+=2){var i=Uu(r.charCodeAt(n)),s=Uu(r.charCodeAt(n+1));e[t++]=i<<4|s}return e}var Fe=performance,yb="1.30.1",bb="process.runtime.name",vb="telemetry.sdk.name",Sb="telemetry.sdk.language",wb="telemetry.sdk.version",_b=bb,Rb=vb,Ib=Sb,Tb=wb,Eb="webjs",Zb=Eb,cr,So=(cr={},cr[Rb]="opentelemetry",cr[_b]="browser",cr[Ib]=Zb,cr[Tb]=yb,cr),Cb=9,Gb=6,Lb=Math.pow(10,Gb),ti=Math.pow(10,Cb);function Ye(r){var e=r/1e3,t=Math.trunc(e),n=Math.round(r%1e3*Lb);return[t,n]}function wo(){var r=Fe.timeOrigin;if(typeof r!="number"){var e=Fe;r=e.timing&&e.timing.fetchStart}return r}function Jt(r){var e=Ye(wo()),t=Ye(typeof r=="number"?r:Fe.now());return Yu(e,t)}function jr(r){if(_o(r))return r;if(typeof r=="number")return r<wo()?Jt(r):Ye(r);if(r instanceof Date)return Ye(r.getTime());throw TypeError("Invalid input type")}function Nb(r,e){var t=e[0]-r[0],n=e[1]-r[1];return n<0&&(t-=1,n+=ti),[t,n]}function gt(r){return r[0]*ti+r[1]}function ri(r){return r[0]*1e6+r[1]/1e3}function _o(r){return Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}function Fu(r){return _o(r)||typeof r=="number"||r instanceof Date}function Yu(r,e){var t=[r[0]+e[0],r[1]+e[1]];return t[1]>=ti&&(t[1]-=ti,t[0]+=1),t}var ke;(function(r){r[r.SUCCESS=0]="SUCCESS",r[r.FAILED=1]="FAILED"})(ke||(ke={}));var Vb=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Hu=function(){function r(e){e===void 0&&(e={});var t;this._propagators=(t=e.propagators)!==null&&t!==void 0?t:[],this._fields=Array.from(new Set(this._propagators.map(function(n){return typeof n.fields=="function"?n.fields():[]}).reduce(function(n,i){return n.concat(i)},[])))}return r.prototype.inject=function(e,t,n){var i,s;try{for(var o=Vb(this._propagators),a=o.next();!a.done;a=o.next()){var l=a.value;try{l.inject(e,t,n)}catch(u){N.warn("Failed to inject with "+l.constructor.name+". Err: "+u.message)}}}catch(u){i={error:u}}finally{try{a&&!a.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}},r.prototype.extract=function(e,t,n){return this._propagators.reduce(function(i,s){try{return s.extract(i,t,n)}catch(o){N.warn("Failed to extract with "+s.constructor.name+". Err: "+o.message)}return i},e)},r.prototype.fields=function(){return this._fields.slice()},r}(),Ro="[_0-9a-z-*/]",xb="[a-z]"+Ro+"{0,255}",Ob="[a-z0-9]"+Ro+"{0,240}@[a-z]"+Ro+"{0,13}",Xb=new RegExp("^(?:"+xb+"|"+Ob+")$"),Wb=/^[ -~]{0,255}[!-~]$/,kb=/,|=/;function Pb(r){return Xb.test(r)}function Mb(r){return Wb.test(r)&&!kb.test(r)}var Ju=32,Ab=512,Bu=",",Du="=",Ub=function(){function r(e){this._internalState=new Map,e&&this._parse(e)}return r.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},r.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},r.prototype.get=function(e){return this._internalState.get(e)},r.prototype.serialize=function(){var e=this;return this._keys().reduce(function(t,n){return t.push(n+Du+e.get(n)),t},[]).join(Bu)},r.prototype._parse=function(e){e.length>Ab||(this._internalState=e.split(Bu).reverse().reduce(function(t,n){var i=n.trim(),s=i.indexOf(Du);if(s!==-1){var o=i.slice(0,s),a=i.slice(s+1,n.length);Pb(o)&&Mb(a)&&t.set(o,a)}return t},new Map),this._internalState.size>Ju&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Ju))))},r.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},r.prototype._clone=function(){var e=new r;return e._internalState=new Map(this._internalState),e},r}(),ni="traceparent",Io="tracestate",Fb="00",Yb="(?!ff)[\\da-f]{2}",Hb="(?![0]{32})[\\da-f]{32}",Jb="(?![0]{16})[\\da-f]{16}",Bb="[\\da-f]{2}",Db=new RegExp("^\\s?("+Yb+")-("+Hb+")-("+Jb+")-("+Bb+")(-.*)?\\s?$");function zb(r){var e=Db.exec(r);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var zu=function(){function r(){}return r.prototype.inject=function(e,t,n){var i=re.getSpanContext(e);if(!(!i||mo(e)||!jn(i))){var s=Fb+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||mt.NONE).toString(16);n.set(t,ni,s),i.traceState&&n.set(t,Io,i.traceState.serialize())}},r.prototype.extract=function(e,t,n){var i=n.get(t,ni);if(!i)return e;var s=Array.isArray(i)?i[0]:i;if(typeof s!="string")return e;var o=zb(s);if(!o)return e;o.isRemote=!0;var a=n.get(t,Io);if(a){var l=Array.isArray(a)?a.join(","):a;o.traceState=new Ub(typeof l=="string"?l:void 0)}return re.setSpanContext(e,o)},r.prototype.fields=function(){return[ni,Io]},r}(),Kb="[object Object]",jb="[object Null]",Qb="[object Undefined]",$b=Function.prototype,Ku=$b.toString,qb=Ku.call(Object),ev=tv(Object.getPrototypeOf,Object),ju=Object.prototype,Qu=ju.hasOwnProperty,Bt=Symbol?Symbol.toStringTag:void 0,$u=ju.toString;function tv(r,e){return function(t){return r(e(t))}}function qu(r){if(!rv(r)||nv(r)!==Kb)return!1;var e=ev(r);if(e===null)return!0;var t=Qu.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Ku.call(t)===qb}function rv(r){return r!=null&&typeof r=="object"}function nv(r){return r==null?r===void 0?Qb:jb:Bt&&Bt in Object(r)?iv(r):sv(r)}function iv(r){var e=Qu.call(r,Bt),t=r[Bt],n=!1;try{r[Bt]=void 0,n=!0}catch(s){}var i=$u.call(r);return n&&(e?r[Bt]=t:delete r[Bt]),i}function sv(r){return $u.call(r)}var ov=20;function av(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=r.shift(),n=new WeakMap;r.length>0;)t=ec(t,r.shift(),0,n);return t}function To(r){return ii(r)?r.slice():r}function ec(r,e,t,n){t===void 0&&(t=0);var i;if(!(t>ov)){if(t++,si(r)||si(e)||rc(e))i=To(e);else if(ii(r)){if(i=r.slice(),ii(e))for(var s=0,o=e.length;s<o;s++)i.push(To(e[s]));else if(Qr(e))for(var a=Object.keys(e),s=0,o=a.length;s<o;s++){var l=a[s];i[l]=To(e[l])}}else if(Qr(r))if(Qr(e)){if(!lv(r,e))return e;i=Object.assign({},r);for(var a=Object.keys(e),s=0,o=a.length;s<o;s++){var l=a[s],u=e[l];if(si(u))typeof u=="undefined"?delete i[l]:i[l]=u;else{var c=i[l],d=u;if(tc(r,l,n)||tc(e,l,n))delete i[l];else{if(Qr(c)&&Qr(d)){var h=n.get(c)||[],f=n.get(d)||[];h.push({obj:r,key:l}),f.push({obj:e,key:l}),n.set(c,h),n.set(d,f)}i[l]=ec(i[l],u,t,n)}}}}else i=e;return i}}function tc(r,e,t){for(var n=t.get(r[e])||[],i=0,s=n.length;i<s;i++){var o=n[i];if(o.key===e&&o.obj===r)return!0}return!1}function ii(r){return Array.isArray(r)}function rc(r){return typeof r=="function"}function Qr(r){return!si(r)&&!ii(r)&&!rc(r)&&typeof r=="object"}function si(r){return typeof r=="string"||typeof r=="number"||typeof r=="boolean"||typeof r=="undefined"||r instanceof Date||r instanceof RegExp||r===null}function lv(r,e){return!(!qu(r)||!qu(e))}var uv=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function nc(r,e){return typeof e=="string"?r===e:!!r.match(e)}function ic(r,e){var t,n;if(!e)return!1;try{for(var i=uv(e),s=i.next();!s.done;s=i.next()){var o=s.value;if(nc(r,o))return!0}}catch(a){t={error:a}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return!1}var cv=function(){function r(){var e=this;this._promise=new Promise(function(t,n){e._resolve=t,e._reject=n})}return Object.defineProperty(r.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),r.prototype.resolve=function(e){this._resolve(e)},r.prototype.reject=function(e){this._reject(e)},r}(),dv=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},hv=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))},fv=function(){function r(e,t){this._callback=e,this._that=t,this._isCalled=!1,this._deferred=new cv}return Object.defineProperty(r.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),r.prototype.call=function(){for(var e,t=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,hv([this._that],dv(n),!1))).then(function(s){return t._deferred.resolve(s)},function(s){return t._deferred.reject(s)})}catch(s){this._deferred.reject(s)}}return this._deferred.promise},r}();function pv(r,e){return new Promise(function(t){K.with(Ou(K.active()),function(){r.export(e,function(n){t(n)})})})}var mv={_export:pv},sc=function(){function r(){}return r.prototype.emit=function(e){},r}(),gv=new sc,yv=function(){function r(){}return r.prototype.getLogger=function(e,t,n){return new sc},r}(),oc=new yv,bv=function(){function r(e,t,n,i){this._provider=e,this.name=t,this.version=n,this.options=i}return r.prototype.emit=function(e){this._getLogger().emit(e)},r.prototype._getLogger=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):gv},r}(),ac=function(){function r(){}return r.prototype.getLogger=function(e,t,n){var i;return(i=this.getDelegateLogger(e,t,n))!==null&&i!==void 0?i:new bv(this,e,t,n)},r.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:oc},r.prototype.setDelegate=function(e){this._delegate=e},r.prototype.getDelegateLogger=function(e,t,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(e,t,n)},r}(),vv=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},oi=Symbol.for("io.opentelemetry.js.api.logs"),$r=vv;function Sv(r,e,t){return function(n){return n===r?e:t}}var lc=1,wv=function(){function r(){this._proxyLoggerProvider=new ac}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalLoggerProvider=function(e){return $r[oi]?this.getLoggerProvider():($r[oi]=Sv(lc,e,oc),this._proxyLoggerProvider.setDelegate(e),e)},r.prototype.getLoggerProvider=function(){var e,t;return(t=(e=$r[oi])===null||e===void 0?void 0:e.call($r,lc))!==null&&t!==void 0?t:this._proxyLoggerProvider},r.prototype.getLogger=function(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)},r.prototype.disable=function(){delete $r[oi],this._proxyLoggerProvider=new ac},r}(),uc=wv.getInstance();function _v(r,e,t,n){for(var i=0,s=r.length;i<s;i++){var o=r[i];e&&o.setTracerProvider(e),t&&o.setMeterProvider(t),n&&o.setLoggerProvider&&o.setLoggerProvider(n),o.getConfig().enabled||o.enable()}}function Rv(r){r.forEach(function(e){return e.disabl