@grafana/faro-web-tracing 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var GrafanaFaroWebTracing=function(t,e){"use strict";var n="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},r="1.6.0",o=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;var i=function(t){var e=new Set([t]),n=new Set,r=t.match(o);if(!r)return function(){return!1};var i=+r[1],a=+r[2],s=+r[3];if(null!=r[4])return function(e){return e===t};function u(t){return n.add(t),!1}function c(t){return e.add(t),!0}return function(t){if(e.has(t))return!0;if(n.has(t))return!1;var r=t.match(o);if(!r)return u(t);var l=+r[1],p=+r[2],f=+r[3];return null!=r[4]||i!==l?u(t):0===i?a===p&&s<=f?c(t):u(t):a<=p?c(t):u(t)}}(r),a=r.split(".")[0],s=Symbol.for("opentelemetry.js.api."+a),u=n;function c(t,e,n,o){var i;void 0===o&&(o=!1);var a=u[s]=null!==(i=u[s])&&void 0!==i?i:{version:r};if(!o&&a[t]){var c=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return n.error(c.stack||c.message),!1}if(a.version!==r){c=new Error("@opentelemetry/api: Registration of version v"+a.version+" for "+t+" does not match previously registered API v"+r);return n.error(c.stack||c.message),!1}return a[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+r+"."),!0}function l(t){var e,n,r=null===(e=u[s])||void 0===e?void 0:e.version;if(r&&i(r))return null===(n=u[s])||void 0===n?void 0:n[t]}function p(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+r+".");var n=u[s];n&&delete n[t]}var f,h=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},_=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},d=function(){function t(t){this._namespace=t.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return y("debug",this._namespace,t)},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return y("error",this._namespace,t)},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return y("info",this._namespace,t)},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return y("warn",this._namespace,t)},t.prototype.verbose=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return y("verbose",this._namespace,t)},t}();function y(t,e,n){var r=l("diag");if(r)return n.unshift(e),r[t].apply(r,_([],h(n),!1))}!function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"}(f||(f={}));var v=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},E=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},T=function(){function t(){function t(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=l("diag");if(r)return r[t].apply(r,E([],v(e),!1))}}var e=this;e.setLogger=function(t,n){var r,o,i;if(void 0===n&&(n={logLevel:f.INFO}),t===e){var a=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return e.error(null!==(r=a.stack)&&void 0!==r?r:a.message),!1}"number"==typeof n&&(n={logLevel:n});var s=l("diag"),u=function(t,e){function n(n,r){var o=e[n];return"function"==typeof o&&t>=r?o.bind(e):function(){}}return t<f.NONE?t=f.NONE:t>f.ALL&&(t=f.ALL),e=e||{},{error:n("error",f.ERROR),warn:n("warn",f.WARN),info:n("info",f.INFO),debug:n("debug",f.DEBUG),verbose:n("verbose",f.VERBOSE)}}(null!==(o=n.logLevel)&&void 0!==o?o:f.INFO,t);if(s&&!n.suppressOverrideMessage){var p=null!==(i=(new Error).stack)&&void 0!==i?i:"<failed to generate stacktrace>";s.warn("Current logger will be overwritten from "+p),u.warn("Current logger will overwrite one already registered from "+p)}return c("diag",u,e,!0)},e.disable=function(){p("diag",e)},e.createComponentLogger=function(t){return new d(t)},e.verbose=t("verbose"),e.debug=t("debug"),e.info=t("info"),e.warn=t("warn"),e.error=t("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t}(),m=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},g=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},O=function(){function t(t){this._entries=t?new Map(t):new Map}return t.prototype.getEntry=function(t){var e=this._entries.get(t);if(e)return Object.assign({},e)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map((function(t){var e=m(t,2);return[e[0],e[1]]}))},t.prototype.setEntry=function(e,n){var r=new t(this._entries);return r._entries.set(e,n),r},t.prototype.removeEntry=function(e){var n=new t(this._entries);return n._entries.delete(e),n},t.prototype.removeEntries=function(){for(var e,n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=new t(this._entries);try{for(var a=g(r),s=a.next();!s.done;s=a.next()){var u=s.value;i._entries.delete(u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return i},t.prototype.clear=function(){return new t},t}(),S=Symbol("BaggageEntryMetadata"),b=T.instance();function w(t){return void 0===t&&(t={}),new O(new Map(Object.entries(t)))}function R(t){return"string"!=typeof t&&(b.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:S,toString:function(){return t}}}function P(t){return Symbol.for(t)}var L,A,C=function t(e){var n=this;n._currentContext=e?new Map(e):new Map,n.getValue=function(t){return n._currentContext.get(t)},n.setValue=function(e,r){var o=new t(n._currentContext);return o._currentContext.set(e,r),o},n.deleteValue=function(e){var r=new t(n._currentContext);return r._currentContext.delete(e),r}},N=new C,I=(L=function(t,e){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},L(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}L(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),x=function(){function t(){}return t.prototype.createHistogram=function(t,e){return z},t.prototype.createCounter=function(t,e){return H},t.prototype.createUpDownCounter=function(t,e){return X},t.prototype.createObservableGauge=function(t,e){return q},t.prototype.createObservableCounter=function(t,e){return Z},t.prototype.createObservableUpDownCounter=function(t,e){return K},t.prototype.addBatchObservableCallback=function(t,e){},t.prototype.removeBatchObservableCallback=function(t){},t}(),M=function(){},k=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return I(e,t),e.prototype.add=function(t,e){},e}(M),D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return I(e,t),e.prototype.add=function(t,e){},e}(M),U=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return I(e,t),e.prototype.record=function(t,e){},e}(M),j=function(){function t(){}return t.prototype.addCallback=function(t){},t.prototype.removeCallback=function(t){},t}(),B=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return I(e,t),e}(j),F=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return I(e,t),e}(j),G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return I(e,t),e}(j),V=new x,H=new k,z=new U,X=new D,Z=new B,q=new F,K=new G;!function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"}(A||(A={}));var W,Y={get:function(t,e){if(null!=t)return t[e]},keys:function(t){return null==t?[]:Object.keys(t)}},Q={set:function(t,e,n){null!=t&&(t[e]=n)}},$=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},J=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},tt=function(){function t(){}return t.prototype.active=function(){return N},t.prototype.with=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];return e.call.apply(e,J([n],$(r),!1))},t.prototype.bind=function(t,e){return e},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t}(),et=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},nt=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},rt="context",ot=new tt,it=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(t){return c(rt,t,T.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(t,e,n){for(var r,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];return(r=this._getContextManager()).with.apply(r,nt([t,e,n],et(o),!1))},t.prototype.bind=function(t,e){return this._getContextManager().bind(t,e)},t.prototype._getContextManager=function(){return l(rt)||ot},t.prototype.disable=function(){this._getContextManager().disable(),p(rt,T.instance())},t}();!function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"}(W||(W={}));var at="0000000000000000",st="00000000000000000000000000000000",ut={traceId:st,spanId:at,traceFlags:W.NONE},ct=function(){function t(t){void 0===t&&(t=ut),this._spanContext=t}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(t,e){return this},t.prototype.setAttributes=function(t){return this},t.prototype.addEvent=function(t,e){return this},t.prototype.setStatus=function(t){return this},t.prototype.updateName=function(t){return this},t.prototype.end=function(t){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(t,e){},t}(),lt=P("OpenTelemetry Context Key SPAN");function pt(t){return t.getValue(lt)||void 0}function ft(){return pt(it.getInstance().active())}function ht(t,e){return t.setValue(lt,e)}function _t(t){return t.deleteValue(lt)}function dt(t,e){return ht(t,new ct(e))}function yt(t){var e;return null===(e=pt(t))||void 0===e?void 0:e.spanContext()}var vt=/^([0-9a-f]{32})$/i,Et=/^[0-9a-f]{16}$/i;function Tt(t){return vt.test(t)&&t!==st}function mt(t){return Tt(t.traceId)&&(e=t.spanId,Et.test(e)&&e!==at);var e}function gt(t){return new ct(t)}var Ot=it.getInstance(),St=function(){function t(){}return t.prototype.startSpan=function(t,e,n){if(void 0===n&&(n=Ot.active()),Boolean(null==e?void 0:e.root))return new ct;var r,o=n&&yt(n);return"object"==typeof(r=o)&&"string"==typeof r.spanId&&"string"==typeof r.traceId&&"number"==typeof r.traceFlags&&mt(o)?new ct(o):new ct},t.prototype.startActiveSpan=function(t,e,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=e:3===arguments.length?(o=e,a=n):(o=e,i=n,a=r);var s=null!=i?i:Ot.active(),u=this.startSpan(t,o,s),c=ht(s,u);return Ot.with(c,a,void 0,u)}},t}();var bt,wt,Rt,Pt=new St,Lt=function(){function t(t,e,n,r){this._provider=t,this.name=e,this.version=n,this.options=r}return t.prototype.startSpan=function(t,e,n){return this._getTracer().startSpan(t,e,n)},t.prototype.startActiveSpan=function(t,e,n,r){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Pt},t}(),At=new(function(){function t(){}return t.prototype.getTracer=function(t,e,n){return new St},t}()),Ct=function(){function t(){}return t.prototype.getTracer=function(t,e,n){var r;return null!==(r=this.getDelegateTracer(t,e,n))&&void 0!==r?r:new Lt(this,t,e,n)},t.prototype.getDelegate=function(){var t;return null!==(t=this._delegate)&&void 0!==t?t:At},t.prototype.setDelegate=function(t){this._delegate=t},t.prototype.getDelegateTracer=function(t,e,n){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getTracer(t,e,n)},t}();!function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(bt||(bt={})),function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"}(wt||(wt={})),function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"}(Rt||(Rt={}));var Nt=it.getInstance(),It=T.instance(),xt=new(function(){function t(){}return t.prototype.getMeter=function(t,e,n){return V},t}()),Mt="metrics",kt=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(t){return c(Mt,t,T.instance())},t.prototype.getMeterProvider=function(){return l(Mt)||xt},t.prototype.getMeter=function(t,e,n){return this.getMeterProvider().getMeter(t,e,n)},t.prototype.disable=function(){p(Mt,T.instance())},t}().getInstance(),Dt=function(){function t(){}return t.prototype.inject=function(t,e){},t.prototype.extract=function(t,e){return t},t.prototype.fields=function(){return[]},t}(),Ut=P("OpenTelemetry Baggage Key");function jt(t){return t.getValue(Ut)||void 0}function Bt(){return jt(it.getInstance().active())}function Ft(t,e){return t.setValue(Ut,e)}function Gt(t){return t.deleteValue(Ut)}var Vt="propagation",Ht=new Dt,zt=function(){function t(){this.createBaggage=w,this.getBaggage=jt,this.getActiveBaggage=Bt,this.setBaggage=Ft,this.deleteBaggage=Gt}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(t){return c(Vt,t,T.instance())},t.prototype.inject=function(t,e,n){return void 0===n&&(n=Q),this._getGlobalPropagator().inject(t,e,n)},t.prototype.extract=function(t,e,n){return void 0===n&&(n=Y),this._getGlobalPropagator().extract(t,e,n)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){p(Vt,T.instance())},t.prototype._getGlobalPropagator=function(){return l(Vt)||Ht},t}(),Xt=zt.getInstance(),Zt="trace",qt=function(){function t(){this._proxyTracerProvider=new Ct,this.wrapSpanContext=gt,this.isSpanContextValid=mt,this.deleteSpan=_t,this.getSpan=pt,this.getActiveSpan=ft,this.getSpanContext=yt,this.setSpan=ht,this.setSpanContext=dt}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(t){var e=c(Zt,this._proxyTracerProvider,T.instance());return e&&this._proxyTracerProvider.setDelegate(t),e},t.prototype.getTracerProvider=function(){return l(Zt)||this._proxyTracerProvider},t.prototype.getTracer=function(t,e){return this.getTracerProvider().getTracer(t,e)},t.prototype.disable=function(){p(Zt,T.instance()),this._proxyTracerProvider=new Ct},t}().getInstance(),Kt=P("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Wt(t){return!0===t.getValue(Kt)}var Yt="baggage",Qt=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};var $t=function(){function t(){}return t.prototype.inject=function(t,e,n){var r=Xt.getBaggage(t);if(r&&!Wt(t)){var o=function(t){return t.getAllEntries().map((function(t){var e=Qt(t,2),n=e[0],r=e[1],o=encodeURIComponent(n)+"="+encodeURIComponent(r.value);return void 0!==r.metadata&&(o+=";"+r.metadata.toString()),o}))}(r).filter((function(t){return t.length<=4096})).slice(0,180),i=function(t){return t.reduce((function(t,e){var n=t+(""!==t?",":"")+e;return n.length>8192?t:n}),"")}(o);i.length>0&&n.set(e,Yt,i)}},t.prototype.extract=function(t,e,n){var r=n.get(e,Yt),o=Array.isArray(r)?r.join(","):r;if(!o)return t;var i={};return 0===o.length?t:(o.split(",").forEach((function(t){var e=function(t){var e=t.split(";");if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf("=");if(!(r<=0)){var o,i=decodeURIComponent(n.substring(0,r).trim()),a=decodeURIComponent(n.substring(r+1).trim());return e.length>0&&(o=R(e.join(";"))),{key:i,value:a,metadata:o}}}}}(t);if(e){var n={value:e.value};e.metadata&&(n.metadata=e.metadata),i[e.key]=n}})),0===Object.entries(i).length?t:Xt.setBaggage(t,Xt.createBaggage(i)))},t.prototype.fields=function(){return[Yt]},t}(),Jt=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},te=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function ee(t){var e,n,r={};if("object"!=typeof t||null==t)return r;try{for(var o=Jt(Object.entries(t)),i=o.next();!i.done;i=o.next()){var a=te(i.value,2),s=a[0],u=a[1];ne(s)?re(u)?Array.isArray(u)?r[s]=u.slice():r[s]=u:It.warn("Invalid attribute value set for key: "+s):It.warn("Invalid attribute key: "+s)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}function ne(t){return"string"==typeof t&&t.length>0}function re(t){return null==t||(Array.isArray(t)?function(t){var e,n,r;try{for(var o=Jt(t),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){if(!r){if(oe(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return!0}(t):oe(t))}function oe(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}var ie,ae=function(t){It.error(function(t){return"string"==typeof t?t:JSON.stringify(function(t){for(var e={},n=t;null!==n;)Object.getOwnPropertyNames(n).forEach((function(t){if(!e[t]){var r=n[t];r&&(e[t]=String(r))}})),n=Object.getPrototypeOf(n);return e}(t))}(t))};function se(t){try{ae(t)}catch(t){}}!function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"}(ie||(ie={}));var ue="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},ce=["OTEL_SDK_DISABLED"];function le(t){return ce.indexOf(t)>-1}var pe=["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 fe(t){return pe.indexOf(t)>-1}var he=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function _e(t){return he.indexOf(t)>-1}var de=1/0,ye=128,ve={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:f.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:de,OTEL_ATTRIBUTE_COUNT_LIMIT:ye,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:de,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:ye,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:de,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:ye,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ie.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"};function Ee(t,e,n){if(void 0!==n[t]){var r=String(n[t]);e[t]="true"===r.toLowerCase()}}function Te(t,e,n,r,o){if(void 0===r&&(r=-1/0),void 0===o&&(o=1/0),void 0!==n[t]){var i=Number(n[t]);isNaN(i)||(e[t]=i<r?r:i>o?o:i)}}function me(t,e,n,r){void 0===r&&(r=",");var o=n[t];"string"==typeof o&&(e[t]=o.split(r).map((function(t){return t.trim()})))}var ge={ALL:f.ALL,VERBOSE:f.VERBOSE,DEBUG:f.DEBUG,INFO:f.INFO,WARN:f.WARN,ERROR:f.ERROR,NONE:f.NONE};function Oe(t,e,n){var r=n[t];if("string"==typeof r){var o=ge[r.toUpperCase()];null!=o&&(e[t]=o)}}function Se(t){var e={};for(var n in ve){var r=n;if("OTEL_LOG_LEVEL"===r)Oe(r,e,t);else if(le(r))Ee(r,e,t);else if(fe(r))Te(r,e,t);else if(_e(r))me(r,e,t);else{var o=t[r];null!=o&&(e[r]=String(o))}}return e}function be(){var t=Se(ue);return Object.assign({},ve,t)}Array(32);var we,Re=performance,Pe="exception.type",Le="exception.message",Ae="exception.stacktrace",Ce="http.method",Ne="http.url",Ie="http.host",xe="http.scheme",Me="http.status_code",ke="http.user_agent",De="http.response_content_length",Ue="http.response_content_length_uncompressed",je="process.runtime.name",Be="service.name",Fe="service.version",Ge="telemetry.sdk.name",Ve="telemetry.sdk.language",He="telemetry.sdk.version",ze=((we={})[Ge]="opentelemetry",we[je]="browser",we[Ve]="webjs",we[He]="1.17.1",we);var Xe,Ze=Math.pow(10,6),qe=Math.pow(10,9);function Ke(t){var e=t/1e3;return[Math.trunc(e),Math.round(t%1e3*Ze)]}function We(){var t=Re.timeOrigin;if("number"!=typeof t){var e=Re;t=e.timing&&e.timing.fetchStart}return t}function Ye(t){return en(Ke(We()),Ke("number"==typeof t?t:Re.now()))}function Qe(t){if(Je(t))return t;if("number"==typeof t)return t<We()?Ye(t):Ke(t);if(t instanceof Date)return Ke(t.getTime());throw TypeError("Invalid input type")}function $e(t){return t[0]*qe+t[1]}function Je(t){return Array.isArray(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]}function tn(t){return Je(t)||"number"==typeof t||t instanceof Date}function en(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=qe&&(n[1]-=qe,n[0]+=1),n}!function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"}(Xe||(Xe={}));var nn=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},rn=function(){function t(t){var e;void 0===t&&(t={}),this._propagators=null!==(e=t.propagators)&&void 0!==e?e:[],this._fields=Array.from(new Set(this._propagators.map((function(t){return"function"==typeof t.fields?t.fields():[]})).reduce((function(t,e){return t.concat(e)}),[])))}return t.prototype.inject=function(t,e,n){var r,o;try{for(var i=nn(this._propagators),a=i.next();!a.done;a=i.next()){var s=a.value;try{s.inject(t,e,n)}catch(t){It.warn("Failed to inject with "+s.constructor.name+". Err: "+t.message)}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},t.prototype.extract=function(t,e,n){return this._propagators.reduce((function(t,r){try{return r.extract(t,e,n)}catch(t){It.warn("Failed to inject with "+r.constructor.name+". Err: "+t.message)}return t}),t)},t.prototype.fields=function(){return this._fields.slice()},t}(),on="[_0-9a-z-*/]",an=new RegExp("^(?:"+("[a-z]"+on+"{0,255}")+"|"+("[a-z0-9]"+on+"{0,240}@[a-z]"+on+"{0,13}")+")$"),sn=/^[ -~]{0,255}[!-~]$/,un=/,|=/;var cn=function(){function t(t){this._internalState=new Map,t&&this._parse(t)}return t.prototype.set=function(t,e){var n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,e),n},t.prototype.unset=function(t){var e=this._clone();return e._internalState.delete(t),e},t.prototype.get=function(t){return this._internalState.get(t)},t.prototype.serialize=function(){var t=this;return this._keys().reduce((function(e,n){return e.push(n+"="+t.get(n)),e}),[]).join(",")},t.prototype._parse=function(t){t.length>512||(this._internalState=t.split(",").reverse().reduce((function(t,e){var n=e.trim(),r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r),i=n.slice(r+1,e.length);(function(t){return an.test(t)})(o)&&function(t){return sn.test(t)&&!un.test(t)}(i)&&t.set(o,i)}return t}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}(),ln="traceparent",pn="tracestate",fn=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");var hn,_n=function(){function t(){}return t.prototype.inject=function(t,e,n){var r=qt.getSpanContext(t);if(r&&!Wt(t)&&mt(r)){var o="00-"+r.traceId+"-"+r.spanId+"-0"+Number(r.traceFlags||W.NONE).toString(16);n.set(e,ln,o),r.traceState&&n.set(e,pn,r.traceState.serialize())}},t.prototype.extract=function(t,e,n){var r=n.get(e,ln);if(!r)return t;var o=Array.isArray(r)?r[0]:r;if("string"!=typeof o)return t;var i=function(t){var e=fn.exec(t);return e?"00"===e[1]&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}:null}(o);if(!i)return t;i.isRemote=!0;var a=n.get(e,pn);if(a){var s=Array.isArray(a)?a.join(","):a;i.traceState=new cn("string"==typeof s?s:void 0)}return qt.setSpanContext(t,i)},t.prototype.fields=function(){return[ln,pn]},t}();!function(t){t.HTTP="http"}(hn||(hn={}));var dn,yn,vn="[object Null]",En="[object Undefined]",Tn=Function.prototype.toString,mn=Tn.call(Object),gn=(dn=Object.getPrototypeOf,yn=Object,function(t){return dn(yn(t))}),On=Object.prototype,Sn=On.hasOwnProperty,bn=Symbol?Symbol.toStringTag:void 0,wn=On.toString;function Rn(t){if(!function(t){return null!=t&&"object"==typeof t}(t)||"[object Object]"!==function(t){if(null==t)return void 0===t?En:vn;return bn&&bn in Object(t)?function(t){var e=Sn.call(t,bn),n=t[bn],r=!1;try{t[bn]=void 0,r=!0}catch(t){}var o=wn.call(t);r&&(e?t[bn]=n:delete t[bn]);return o}(t):function(t){return wn.call(t)}(t)}(t))return!1;var e=gn(t);if(null===e)return!0;var n=Sn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Tn.call(n)===mn}function Pn(t){return Cn(t)?t.slice():t}function Ln(t,e,n,r){var o;if(void 0===n&&(n=0),!(n>20)){if(n++,xn(t)||xn(e)||Nn(e))o=Pn(e);else if(Cn(t)){if(o=t.slice(),Cn(e))for(var i=0,a=e.length;i<a;i++)o.push(Pn(e[i]));else if(In(e))for(i=0,a=(s=Object.keys(e)).length;i<a;i++){o[u=s[i]]=Pn(e[u])}}else if(In(t))if(In(e)){if(!function(t,e){if(!Rn(t)||!Rn(e))return!1;return!0}(t,e))return e;o=Object.assign({},t);var s;for(i=0,a=(s=Object.keys(e)).length;i<a;i++){var u,c=e[u=s[i]];if(xn(c))void 0===c?delete o[u]:o[u]=c;else{var l=o[u],p=c;if(An(t,u,r)||An(e,u,r))delete o[u];else{if(In(l)&&In(p)){var f=r.get(l)||[],h=r.get(p)||[];f.push({obj:t,key:u}),h.push({obj:e,key:u}),r.set(l,f),r.set(p,h)}o[u]=Ln(o[u],c,n,r)}}}}else o=e;return o}}function An(t,e,n){for(var r=n.get(t[e])||[],o=0,i=r.length;o<i;o++){var a=r[o];if(a.key===e&&a.obj===t)return!0}return!1}function Cn(t){return Array.isArray(t)}function Nn(t){return"function"==typeof t}function In(t){return!xn(t)&&!Cn(t)&&!Nn(t)&&"object"==typeof t}function xn(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t||void 0===t||t instanceof Date||t instanceof RegExp||null===t}var Mn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}Mn(e,t)}(Error);var kn=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Dn(t,e){return"string"==typeof e?t===e:!!t.match(e)}var Un,jn=function(){function t(){var t=this;this._promise=new Promise((function(e,n){t._resolve=e,t._reject=n}))}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(t){this._resolve(t)},t.prototype.reject=function(t){this._reject(t)},t}(),Bn=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Fn=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Gn=function(){function t(t,e){this._callback=t,this._that=e,this._isCalled=!1,this._deferred=new jn}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var t,e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,Fn([this._that],Bn(n),!1))).then((function(t){return e._deferred.resolve(t)}),(function(t){return e._deferred.reject(t)}))}catch(t){this._deferred.reject(t)}}return this._deferred.promise},t}();!function(t){t[t.SPAN_KIND_UNSPECIFIED=0]="SPAN_KIND_UNSPECIFIED",t[t.SPAN_KIND_INTERNAL=1]="SPAN_KIND_INTERNAL",t[t.SPAN_KIND_SERVER=2]="SPAN_KIND_SERVER",t[t.SPAN_KIND_CLIENT=3]="SPAN_KIND_CLIENT",t[t.SPAN_KIND_PRODUCER=4]="SPAN_KIND_PRODUCER",t[t.SPAN_KIND_CONSUMER=5]="SPAN_KIND_CONSUMER"}(Un||(Un={}));var Vn=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Hn(t){return Object.keys(t).map((function(e){return zn(e,t[e])}))}function zn(t,e){return{key:t,value:Xn(e)}}function Xn(t){var e=typeof t;return"string"===e?{stringValue:t}:"number"===e?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:"boolean"===e?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(Xn)}}:"object"===e&&null!=t?{kvlistValue:{values:Object.entries(t).map((function(t){var e=Vn(t,2);return zn(e[0],e[1])}))}}:{}}var Zn=P("OpenTelemetry SDK Context Key SUPPRESS_TRACING");var qn,Kn=function(t){It.error(function(t){return"string"==typeof t?t:JSON.stringify(function(t){for(var e={},n=t;null!==n;)Object.getOwnPropertyNames(n).forEach((function(t){if(!e[t]){var r=n[t];r&&(e[t]=String(r))}})),n=Object.getPrototypeOf(n);return e}(t))}(t))};!function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"}(qn||(qn={}));function Wn(t){for(var e=t.length,n="",r=0;r<e;r+=2){var o=t.substring(r,r+2),i=parseInt(o,16);n+=String.fromCharCode(i)}return btoa(n)}f.INFO,qn.ParentBasedAlwaysOn,f.ALL,f.VERBOSE,f.DEBUG,f.INFO,f.WARN,f.ERROR,f.NONE,Array(32);var Yn,Qn="process.runtime.name",$n="service.name",Jn="telemetry.sdk.name",tr="telemetry.sdk.language",er="telemetry.sdk.version",nr=((Yn={})[Jn]="opentelemetry",Yn[Qn]="browser",Yn[tr]="webjs",Yn[er]="1.15.2",Yn);var rr,or,ir=Math.pow(10,6),ar=Math.pow(10,9);function sr(t){var e=t/1e3;return[Math.trunc(e),Math.round(t%1e3*ir)]}function ur(t){return t[0]*ar+t[1]}function cr(t){return 1e6*t[0]+t[1]/1e3}!function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"}(rr||(rr={})),function(t){t.HTTP="http"}(or||(or={})),Function.prototype.toString.call(Object);var lr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}lr(e,t)}(Error);var pr=function(){function t(){var t=this;this._promise=new Promise((function(e,n){t._resolve=e,t._reject=n}))}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(t){this._resolve(t)},t.prototype.reject=function(t){this._reject(t)},t}(),fr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},hr=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};!function(){function t(t,e){this._callback=t,this._that=e,this._isCalled=!1,this._deferred=new pr}Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var t,e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,hr([this._that],fr(n),!1))).then((function(t){return e._deferred.resolve(t)}),(function(t){return e._deferred.reject(t)}))}catch(t){this._deferred.reject(t)}}return this._deferred.promise}}();var _r={_export:function(t,e){return new Promise((function(n){Nt.with(function(t){return t.setValue(Zn,!0)}(Nt.active()),(function(){t.export(e,(function(t){n(t)}))}))}))}};function dr(t,e){var n,r=t.spanContext(),o=t.status,i=e?t.parentSpanId:null!=t.parentSpanId?Wn(t.parentSpanId):void 0;return{traceId:e?r.traceId:Wn(r.traceId),spanId:e?r.spanId:Wn(r.spanId),parentSpanId:i,traceState:null===(n=r.traceState)||void 0===n?void 0:n.serialize(),name:t.name,kind:null==t.kind?0:t.kind+1,startTimeUnixNano:ur(t.startTime),endTimeUnixNano:ur(t.endTime),attributes:Hn(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(yr),droppedEventsCount:t.droppedEventsCount,status:{code:o.code,message:o.message},links:t.links.map((function(t){return function(t,e){var n;return{attributes:t.attributes?Hn(t.attributes):[],spanId:e?t.context.spanId:Wn(t.context.spanId),traceId:e?t.context.traceId:Wn(t.context.traceId),traceState:null===(n=t.context.traceState)||void 0===n?void 0:n.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}(t,e)})),droppedLinksCount:t.droppedLinksCount}}function yr(t){return{attributes:t.attributes?Hn(t.attributes):[],name:t.name,timeUnixNano:ur(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}var vr,Er,Tr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function gr(t,e){for(var n=function(t){var e,n,r=new Map;try{for(var o=Tr(t),i=o.next();!i.done;i=o.next()){var a=i.value,s=r.get(a.resource);s||(s=new Map,r.set(a.resource,s));var u=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),c=s.get(u);c||(c=[],s.set(u,c)),c.push(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}(t),r=[],o=n.entries(),i=o.next();!i.done;){for(var a=mr(i.value,2),s=a[0],u=[],c=a[1].values(),l=c.next();!l.done;){var p=l.value;if(p.length>0){var f=p[0].instrumentationLibrary,h=f.name,_=f.version,d=f.schemaUrl,y=p.map((function(t){return dr(t,e)}));u.push({scope:{name:h,version:_},spans:y,schemaUrl:d})}l=c.next()}var v={resource:{attributes:Hn(s.attributes),droppedAttributesCount:0},scopeSpans:u,schemaUrl:void 0};r.push(v),i=o.next()}return r}!function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE"}(vr||(vr={})),function(t){t[t.HISTOGRAM=0]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",t[t.GAUGE=2]="GAUGE",t[t.SUM=3]="SUM"}(Er||(Er={}));var Or=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Sr(t){var e=Object.keys(t);return 0===e.length?"":(e=e.sort(),JSON.stringify(e.map((function(e){return[e,t[e]]}))))}var br,wr=function(t){function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Or(e,t),e}(Error);function Rr(t,e){var n,r=new Promise((function(t,r){n=setTimeout((function(){r(new wr("Operation timed out."))}),e)}));return Promise.race([t,r]).then((function(t){return clearTimeout(n),t}),(function(t){throw clearTimeout(n),t}))}!function(t){t[t.DROP=0]="DROP",t[t.SUM=1]="SUM",t[t.LAST_VALUE=2]="LAST_VALUE",t[t.HISTOGRAM=3]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"}(br||(br={}));var Pr,Lr=function(){function t(){this.kind=br.DROP}return t.prototype.createAccumulation=function(){},t.prototype.merge=function(t,e){},t.prototype.diff=function(t,e){},t.prototype.toMetricData=function(t,e,n,r){},t}();!function(t){t.COUNTER="COUNTER",t.HISTOGRAM="HISTOGRAM",t.UP_DOWN_COUNTER="UP_DOWN_COUNTER",t.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",t.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",t.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"}(Pr||(Pr={}));var Ar=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};var Cr=function(){function t(t,e,n,r){var o,i;void 0===n&&(n=!0),void 0===r&&((i=(o=e).map((function(){return 0}))).push(0),r={buckets:{boundaries:o,counts:i},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}),this.startTime=t,this._boundaries=e,this._recordMinMax=n,this._current=r}return t.prototype.record=function(t){this._current.count+=1,this._current.sum+=t,this._recordMinMax&&(this._current.min=Math.min(t,this._current.min),this._current.max=Math.max(t,this._current.max),this._current.hasMinMax=!0);var e=function(t,e){for(var n=0,r=t.length-1;r-n>1;){var o=Math.trunc((r+n)/2);t[o]<=e?n=o:r=o-1}return t[r]<=e?r:t[n]<=e?n:-1}(this._boundaries,t);this._current.buckets.counts[e+1]+=1},t.prototype.setStartTime=function(t){this.startTime=t},t.prototype.toPointValue=function(){return this._current},t}(),Nr=function(){function t(t,e){this._boundaries=t,this._recordMinMax=e,this.kind=br.HISTOGRAM}return t.prototype.createAccumulation=function(t){return new Cr(t,this._boundaries,this._recordMinMax)},t.prototype.merge=function(t,e){for(var n=t.toPointValue(),r=e.toPointValue(),o=n.buckets.counts,i=r.buckets.counts,a=new Array(o.length),s=0;s<o.length;s++)a[s]=o[s]+i[s];var u=1/0,c=-1/0;return this._recordMinMax&&(n.hasMinMax&&r.hasMinMax?(u=Math.min(n.min,r.min),c=Math.max(n.max,r.max)):n.hasMinMax?(u=n.min,c=n.max):r.hasMinMax&&(u=r.min,c=r.max)),new Cr(t.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:a},count:n.count+r.count,sum:n.sum+r.sum,hasMinMax:this._recordMinMax&&(n.hasMinMax||r.hasMinMax),min:u,max:c})},t.prototype.diff=function(t,e){for(var n=t.toPointValue(),r=e.toPointValue(),o=n.buckets.counts,i=r.buckets.counts,a=new Array(o.length),s=0;s<o.length;s++)a[s]=i[s]-o[s];return new Cr(e.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:a},count:r.count-n.count,sum:r.sum-n.sum,hasMinMax:!1,min:1/0,max:-1/0})},t.prototype.toMetricData=function(t,e,n,r){return{descriptor:t,aggregationTemporality:e,dataPointType:Er.HISTOGRAM,dataPoints:n.map((function(e){var n=Ar(e,2),o=n[0],i=n[1],a=i.toPointValue(),s=t.type===Pr.UP_DOWN_COUNTER||t.type===Pr.OBSERVABLE_GAUGE||t.type===Pr.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:o,startTime:i.startTime,endTime:r,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:s?void 0:a.sum,buckets:a.buckets,count:a.count}}}))}},t}(),Ir=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},xr=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Mr=function(){function t(t,e,n,r){void 0===t&&(t=new kr),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.backing=t,this.indexBase=e,this.indexStart=n,this.indexEnd=r}return Object.defineProperty(t.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return 0===this.backing.length||this.indexEnd===this.indexStart&&0===this.at(0)?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),t.prototype.counts=function(){var t=this;return Array.from({length:this.length},(function(e,n){return t.at(n)}))},t.prototype.at=function(t){var e=this.indexBase-this.indexStart;return t<e&&(t+=this.backing.length),t-=e,this.backing.countAt(t)},t.prototype.incrementBucket=function(t,e){this.backing.increment(t,e)},t.prototype.decrementBucket=function(t,e){this.backing.decrement(t,e)},t.prototype.trim=function(){for(var t=0;t<this.length;t++){if(0!==this.at(t)){this.indexStart+=t;break}if(t===this.length-1)return void(this.indexStart=this.indexEnd=this.indexBase=0)}for(t=this.length-1;t>=0;t--)if(0!==this.at(t)){this.indexEnd-=this.length-t-1;break}this._rotate()},t.prototype.downscale=function(t){this._rotate();for(var e=1+this.indexEnd-this.indexStart,n=1<<t,r=0,o=0,i=this.indexStart;i<=this.indexEnd;){var a=i%n;a<0&&(a+=n);for(var s=a;s<n&&r<e;s++)this._relocateBucket(o,r),r++,i++;o++}this.indexStart>>=t,this.indexEnd>>=t,this.indexBase=this.indexStart},t.prototype.clone=function(){return new t(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},t.prototype._rotate=function(){var t=this.indexBase-this.indexStart;0!==t&&(t>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,t),this.backing.reverse(t,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+t)),this.indexBase=this.indexStart)},t.prototype._relocateBucket=function(t,e){t!==e&&this.incrementBucket(t,this.backing.emptyBucket(e))},t}(),kr=function(){function t(t){void 0===t&&(t=[0]),this._counts=t}return Object.defineProperty(t.prototype,"length",{get:function(){return this._counts.length},enumerable:!1,configurable:!0}),t.prototype.countAt=function(t){return this._counts[t]},t.prototype.growTo=function(t,e,n){var r=new Array(t).fill(0);r.splice.apply(r,xr([n,this._counts.length-e],Ir(this._counts.slice(e)),!1)),r.splice.apply(r,xr([0,e],Ir(this._counts.slice(0,e)),!1)),this._counts=r},t.prototype.reverse=function(t,e){for(var n=Math.floor((t+e)/2)-t,r=0;r<n;r++){var o=this._counts[t+r];this._counts[t+r]=this._counts[e-r-1],this._counts[e-r-1]=o}},t.prototype.emptyBucket=function(t){var e=this._counts[t];return this._counts[t]=0,e},t.prototype.increment=function(t,e){this._counts[t]+=e},t.prototype.decrement=function(t,e){this._counts[t]>=e?this._counts[t]-=e:this._counts[t]=0},t.prototype.clone=function(){return new t(xr([],Ir(this._counts),!1))},t}(),Dr=1023,Ur=Math.pow(2,-1022);function jr(t){var e=new DataView(new ArrayBuffer(8));return e.setFloat64(0,t),((2146435072&e.getUint32(0))>>20)-Dr}function Br(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=e.getUint32(4);return(1048575&n)*Math.pow(2,32)+r}function Fr(t,e){return 0===t||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||Number.isNaN(t)?t:t*Math.pow(2,e)}var Gr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Gr(e,t),e}(Error),Hr=function(){function t(t){this._shift=-t}return t.prototype.mapToIndex=function(t){return t<Ur?this._minNormalLowerBoundaryIndex():jr(t)+this._rightShift(Br(t)-1,52)>>this._shift},t.prototype.lowerBoundary=function(t){var e=this._minNormalLowerBoundaryIndex();if(t<e)throw new Vr("underflow: "+t+" is < minimum lower boundary: "+e);var n=this._maxNormalLowerBoundaryIndex();if(t>n)throw new Vr("overflow: "+t+" is > maximum lower boundary: "+n);return Fr(1,t<<this._shift)},Object.defineProperty(t.prototype,"scale",{get:function(){return 0===this._shift?0:-this._shift},enumerable:!1,configurable:!0}),t.prototype._minNormalLowerBoundaryIndex=function(){var t=-1022>>this._shift;return this._shift<2&&t--,t},t.prototype._maxNormalLowerBoundaryIndex=function(){return 1023>>this._shift},t.prototype._rightShift=function(t,e){return Math.floor(t*Math.pow(2,-e))},t}(),zr=function(){function t(t){this._scale=t,this._scaleFactor=Fr(Math.LOG2E,t),this._inverseFactor=Fr(Math.LN2,-t)}return t.prototype.mapToIndex=function(t){if(t<=Ur)return this._minNormalLowerBoundaryIndex()-1;if(0===Br(t))return(jr(t)<<this._scale)-1;var e=Math.floor(Math.log(t)*this._scaleFactor),n=this._maxNormalLowerBoundaryIndex();return e>=n?n:e},t.prototype.lowerBoundary=function(t){var e=this._maxNormalLowerBoundaryIndex();if(t>=e){if(t===e)return 2*Math.exp((t-(1<<this._scale))/this._scaleFactor);throw new Vr("overflow: "+t+" is > maximum lower boundary: "+e)}var n=this._minNormalLowerBoundaryIndex();if(t<=n){if(t===n)return Ur;if(t===n-1)return Math.exp((t+(1<<this._scale))/this._scaleFactor)/2;throw new Vr("overflow: "+t+" is < minimum lower boundary: "+n)}return Math.exp(t*this._inverseFactor)},Object.defineProperty(t.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),t.prototype._minNormalLowerBoundaryIndex=function(){return-1022<<this._scale},t.prototype._maxNormalLowerBoundaryIndex=function(){return(1024<<this._scale)-1},t}(),Xr=Array.from({length:31},(function(t,e){return e>10?new zr(e-10):new Hr(e-10)}));function Zr(t){if(t>20||t<-10)throw new Vr("expected scale >= -10 && <= 20, got: "+t);return Xr[t+10]}var qr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Kr=function(){function t(t,e){this.low=t,this.high=e}return t.combine=function(e,n){return new t(Math.min(e.low,n.low),Math.max(e.high,n.high))},t}(),Wr=function(){function t(t,e,n,r,o,i,a,s,u,c,l){void 0===e&&(e=160),void 0===n&&(n=!0),void 0===r&&(r=0),void 0===o&&(o=0),void 0===i&&(i=0),void 0===a&&(a=Number.POSITIVE_INFINITY),void 0===s&&(s=Number.NEGATIVE_INFINITY),void 0===u&&(u=new Mr),void 0===c&&(c=new Mr),void 0===l&&(l=Zr(20)),this.startTime=t,this._maxSize=e,this._recordMinMax=n,this._sum=r,this._count=o,this._zeroCount=i,this._min=a,this._max=s,this._positive=u,this._negative=c,this._mapping=l,this._maxSize<2&&(It.warn("Exponential Histogram Max Size set to "+this._maxSize+", changing to the minimum size of: 2"),this._maxSize=2)}return t.prototype.record=function(t){this.updateByIncrement(t,1)},t.prototype.setStartTime=function(t){this.startTime=t},t.prototype.toPointValue=function(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}},Object.defineProperty(t.prototype,"sum",{get:function(){return this._sum},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zeroCount",{get:function(){return this._zeroCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this._count===this._zeroCount?0:this._mapping.scale},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"positive",{get:function(){return this._positive},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"negative",{get:function(){return this._negative},enumerable:!1,configurable:!0}),t.prototype.updateByIncrement=function(t,e){t>this._max&&(this._max=t),t<this._min&&(this._min=t),this._count+=e,0!==t?(this._sum+=t*e,t>0?this._updateBuckets(this._positive,t,e):this._updateBuckets(this._negative,-t,e)):this._zeroCount+=e},t.prototype.merge=function(t){0===this._count?(this._min=t.min,this._max=t.max):0!==t.count&&(t.min<this.min&&(this._min=t.min),t.max>this.max&&(this._max=t.max)),this.startTime=t.startTime,this._sum+=t.sum,this._count+=t.count,this._zeroCount+=t.zeroCount;var e=this._minScale(t);this._downscale(this.scale-e),this._mergeBuckets(this.positive,t,t.positive,e),this._mergeBuckets(this.negative,t,t.negative,e)},t.prototype.diff=function(t){this._min=1/0,this._max=-1/0,this._sum-=t.sum,this._count-=t.count,this._zeroCount-=t.zeroCount;var e=this._minScale(t);this._downscale(this.scale-e),this._diffBuckets(this.positive,t,t.positive,e),this._diffBuckets(this.negative,t,t.negative,e)},t.prototype.clone=function(){return new t(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)},t.prototype._updateBuckets=function(t,e,n){var r=this._mapping.mapToIndex(e),o=!1,i=0,a=0;if(0===t.length?(t.indexStart=r,t.indexEnd=t.indexStart,t.indexBase=t.indexStart):r<t.indexStart&&t.indexEnd-r>=this._maxSize?(o=!0,a=r,i=t.indexEnd):r>t.indexEnd&&r-t.indexStart>=this._maxSize&&(o=!0,a=t.indexStart,i=r),o){var s=this._changeScale(i,a);this._downscale(s),r=this._mapping.mapToIndex(e)}this._incrementIndexBy(t,r,n)},t.prototype._incrementIndexBy=function(t,e,n){if(0!==n){if(e<t.indexStart)(r=t.indexEnd-e)>=t.backing.length&&this._grow(t,r+1),t.indexStart=e;else if(e>t.indexEnd){var r;(r=e-t.indexStart)>=t.backing.length&&this._grow(t,r+1),t.indexEnd=e}var o=e-t.indexBase;o<0&&(o+=t.backing.length),t.incrementBucket(o,n)}},t.prototype._grow=function(t,e){var n,r=t.backing.length,o=t.indexBase-t.indexStart,i=r-o,a=(n=e,n--,n|=n>>1,n|=n>>2,n|=n>>4,n|=n>>8,n|=n>>16,++n);a>this._maxSize&&(a=this._maxSize);var s=a-o;t.backing.growTo(a,i,s)},t.prototype._changeScale=function(t,e){for(var n=0;t-e>=this._maxSize;)t>>=1,e>>=1,n++;return n},t.prototype._downscale=function(t){if(0!==t){if(t<0)throw new Error("impossible change of scale: "+this.scale);var e=this._mapping.scale-t;this._positive.downscale(t),this._negative.downscale(t),this._mapping=Zr(e)}},t.prototype._minScale=function(t){var e=Math.min(this.scale,t.scale),n=Kr.combine(this._highLowAtScale(this.positive,this.scale,e),this._highLowAtScale(t.positive,t.scale,e)),r=Kr.combine(this._highLowAtScale(this.negative,this.scale,e),this._highLowAtScale(t.negative,t.scale,e));return Math.min(e-this._changeScale(n.high,n.low),e-this._changeScale(r.high,r.low))},t.prototype._highLowAtScale=function(t,e,n){if(0===t.length)return new Kr(0,-1);var r=e-n;return new Kr(t.indexStart>>r,t.indexEnd>>r)},t.prototype._mergeBuckets=function(t,e,n,r){for(var o=n.offset,i=e.scale-r,a=0;a<n.length;a++)this._incrementIndexBy(t,o+a>>i,n.at(a))},t.prototype._diffBuckets=function(t,e,n,r){for(var o=n.offset,i=e.scale-r,a=0;a<n.length;a++){var s=(o+a>>i)-t.indexBase;s<0&&(s+=t.backing.length),t.decrementBucket(s,n.at(a))}t.trim()},t}(),Yr=function(){function t(t,e){this._maxSize=t,this._recordMinMax=e,this.kind=br.EXPONENTIAL_HISTOGRAM}return t.prototype.createAccumulation=function(t){return new Wr(t,this._maxSize,this._recordMinMax)},t.prototype.merge=function(t,e){var n=e.clone();return n.merge(t),n},t.prototype.diff=function(t,e){var n=e.clone();return n.diff(t),n},t.prototype.toMetricData=function(t,e,n,r){return{descriptor:t,aggregationTemporality:e,dataPointType:Er.EXPONENTIAL_HISTOGRAM,dataPoints:n.map((function(e){var n=qr(e,2),o=n[0],i=n[1],a=i.toPointValue(),s=t.type===Pr.UP_DOWN_COUNTER||t.type===Pr.OBSERVABLE_GAUGE||t.type===Pr.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:o,startTime:i.startTime,endTime:r,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:s?void 0:a.sum,positive:{offset:a.positive.offset,bucketCounts:a.positive.bucketCounts},negative:{offset:a.negative.offset,bucketCounts:a.negative.bucketCounts},count:a.count,scale:a.scale,zeroCount:a.zeroCount}}}))}},t}(),Qr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},$r=function(){function t(t,e,n){void 0===e&&(e=0),void 0===n&&(n=[0,0]),this.startTime=t,this._current=e,this.sampleTime=n}return t.prototype.record=function(t){this._current=t,this.sampleTime=sr(Date.now())},t.prototype.setStartTime=function(t){this.startTime=t},t.prototype.toPointValue=function(){return this._current},t}(),Jr=function(){function t(){this.kind=br.LAST_VALUE}return t.prototype.createAccumulation=function(t){return new $r(t)},t.prototype.merge=function(t,e){var n=cr(e.sampleTime)>=cr(t.sampleTime)?e:t;return new $r(t.startTime,n.toPointValue(),n.sampleTime)},t.prototype.diff=function(t,e){var n=cr(e.sampleTime)>=cr(t.sampleTime)?e:t;return new $r(e.startTime,n.toPointValue(),n.sampleTime)},t.prototype.toMetricData=function(t,e,n,r){return{descriptor:t,aggregationTemporality:e,dataPointType:Er.GAUGE,dataPoints:n.map((function(t){var e=Qr(t,2),n=e[0],o=e[1];return{attributes:n,startTime:o.startTime,endTime:r,value:o.toPointValue()}}))}},t}(),to=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},eo=function(){function t(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=!1),this.startTime=t,this.monotonic=e,this._current=n,this.reset=r}return t.prototype.record=function(t){this.monotonic&&t<0||(this._current+=t)},t.prototype.setStartTime=function(t){this.startTime=t},t.prototype.toPointValue=function(){return this._current},t}(),no=function(){function t(t){this.monotonic=t,this.kind=br.SUM}return t.prototype.createAccumulation=function(t){return new eo(t,this.monotonic)},t.prototype.merge=function(t,e){var n=t.toPointValue(),r=e.toPointValue();return e.reset?new eo(e.startTime,this.monotonic,r,e.reset):new eo(t.startTime,this.monotonic,n+r)},t.prototype.diff=function(t,e){var n=t.toPointValue(),r=e.toPointValue();return this.monotonic&&n>r?new eo(e.startTime,this.monotonic,r,!0):new eo(e.startTime,this.monotonic,r-n)},t.prototype.toMetricData=function(t,e,n,r){return{descriptor:t,aggregationTemporality:e,dataPointType:Er.SUM,dataPoints:n.map((function(t){var e=to(t,2),n=e[0],o=e[1];return{attributes:n,startTime:o.startTime,endTime:r,value:o.toPointValue()}})),isMonotonic:this.monotonic}},t}(),ro=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oo=function(){function t(){}return t.Drop=function(){return po},t.Sum=function(){return fo},t.LastValue=function(){return ho},t.Histogram=function(){return _o},t.ExponentialHistogram=function(){return yo},t.Default=function(){return vo},t}(),io=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ro(e,t),e.prototype.createAggregator=function(t){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new Lr,e}(oo),ao=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ro(e,t),e.prototype.createAggregator=function(t){switch(t.type){case Pr.COUNTER:case Pr.OBSERVABLE_COUNTER:case Pr.HISTOGRAM:return e.MONOTONIC_INSTANCE;default:return e.NON_MONOTONIC_INSTANCE}},e.MONOTONIC_INSTANCE=new no(!0),e.NON_MONOTONIC_INSTANCE=new no(!1),e}(oo),so=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ro(e,t),e.prototype.createAggregator=function(t){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new Jr,e}(oo),uo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ro(e,t),e.prototype.createAggregator=function(t){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new Nr([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),e}(oo);!function(t){function e(e,n){void 0===n&&(n=!0);var r=t.call(this)||this;if(r._recordMinMax=n,void 0===e||0===e.length)throw new Error("HistogramAggregator should be created with boundaries.");var o=(e=(e=e.concat()).sort((function(t,e){return t-e}))).lastIndexOf(-1/0),i=e.indexOf(1/0);return-1===i&&(i=void 0),r._boundaries=e.slice(o+1,i),r}ro(e,t),e.prototype.createAggregator=function(t){return new Nr(this._boundaries,this._recordMinMax)}}(oo);var co=function(t){function e(e,n){void 0===e&&(e=160),void 0===n&&(n=!0);var r=t.call(this)||this;return r._maxSize=e,r._recordMinMax=n,r}return ro(e,t),e.prototype.createAggregator=function(t){return new Yr(this._maxSize,this._recordMinMax)},e}(oo),lo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ro(e,t),e.prototype._resolve=function(t){switch(t.type){case Pr.COUNTER:case Pr.UP_DOWN_COUNTER:case Pr.OBSERVABLE_COUNTER:case Pr.OBSERVABLE_UP_DOWN_COUNTER:return fo;case Pr.OBSERVABLE_GAUGE:return ho;case Pr.HISTOGRAM:return _o}return It.warn("Unable to recognize instrument type: "+t.type),po},e.prototype.createAggregator=function(t){return this._resolve(t).createAggregator(t)},e}(oo),po=new io,fo=new ao,ho=new so,_o=new uo,yo=new co,vo=new lo,Eo=function(t){return oo.Default()},To=function(t){return vr.CUMULATIVE},mo=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},go=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Oo=function(){function t(t){var e,n;this._shutdown=!1,this._aggregationSelector=null!==(e=null==t?void 0:t.aggregationSelector)&&void 0!==e?e:Eo,this._aggregationTemporalitySelector=null!==(n=null==t?void 0:t.aggregationTemporalitySelector)&&void 0!==n?n:To}return t.prototype.setMetricProducer=function(t){if(this._metricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._metricProducer=t,this.onInitialized()},t.prototype.selectAggregation=function(t){return this._aggregationSelector(t)},t.prototype.selectAggregationTemporality=function(t){return this._aggregationTemporalitySelector(t)},t.prototype.onInitialized=function(){},t.prototype.collect=function(t){return mo(this,void 0,void 0,(function(){return go(this,(function(e){if(void 0===this._metricProducer)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");return[2,this._metricProducer.collect({timeoutMillis:null==t?void 0:t.timeoutMillis})]}))}))},t.prototype.shutdown=function(t){return mo(this,void 0,void 0,(function(){return go(this,(function(e){switch(e.label){case 0:return this._shutdown?(It.error("Cannot call shutdown twice."),[2]):null!=(null==t?void 0:t.timeoutMillis)?[3,2]:[4,this.onShutdown()];case 1:return e.sent(),[3,4];case 2:return[4,Rr(this.onShutdown(),t.timeoutMillis)];case 3:e.sent(),e.label=4;case 4:return this._shutdown=!0,[2]}}))}))},t.prototype.forceFlush=function(t){return mo(this,void 0,void 0,(function(){return go(this,(function(e){switch(e.label){case 0:return this._shutdown?(It.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):null!=(null==t?void 0:t.timeoutMillis)?[3,2]:[4,this.onForceFlush()];case 1:case 3:return e.sent(),[2];case 2:return[4,Rr(this.onForceFlush(),t.timeoutMillis)]}}))}))},t}(),So=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bo=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},wo=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Ro=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Po=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};!function(t){function e(e){var n,r,o,i,a=t.call(this,{aggregationSelector:null===(n=e.exporter.selectAggregation)||void 0===n?void 0:n.bind(e.exporter),aggregationTemporalitySelector:null===(r=e.exporter.selectAggregationTemporality)||void 0===r?void 0:r.bind(e.exporter)})||this;if(void 0!==e.exportIntervalMillis&&e.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(void 0!==e.exportTimeoutMillis&&e.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(void 0!==e.exportTimeoutMillis&&void 0!==e.exportIntervalMillis&&e.exportIntervalMillis<e.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return a._exportInterval=null!==(o=e.exportIntervalMillis)&&void 0!==o?o:6e4,a._exportTimeout=null!==(i=e.exportTimeoutMillis)&&void 0!==i?i:3e4,a._exporter=e.exporter,a}So(e,t),e.prototype._runOnce=function(){return bo(this,void 0,void 0,(function(){var t;return wo(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,Rr(this._doRun(),this._exportTimeout)];case 1:return e.sent(),[3,3];case 2:return(t=e.sent())instanceof wr?(It.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2]):(function(t){try{Kn(t)}catch(t){}}(t),[3,3]);case 3:return[2]}}))}))},e.prototype._doRun=function(){var t,e;return bo(this,void 0,void 0,(function(){var n,r,o,i,a,s=this;return wo(this,(function(u){switch(u.label){case 0:return[4,this.collect({timeoutMillis:this._exportTimeout})];case 1:return n=u.sent(),r=n.resourceMetrics,(o=n.errors).length>0&&(a=It).error.apply(a,Po(["PeriodicExportingMetricReader: metrics collection errors"],Ro(o),!1)),i=function(){return bo(s,void 0,void 0,(function(){var t;return wo(this,(function(e){switch(e.label){case 0:return[4,_r._export(this._exporter,r)];case 1:if((t=e.sent()).code!==rr.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+t.error+")");return[2]}}))}))},r.resource.asyncAttributesPending?(null===(e=(t=r.resource).waitForAsyncAttributes)||void 0===e||e.call(t).then(i,(function(t){return It.debug("Error while resolving async portion of resource: ",t)})),[3,4]):[3,2];case 2:return[4,i()];case 3:u.sent(),u.label=4;case 4:return[2]}}))}))},e.prototype.onInitialized=function(){var t=this;this._interval=setInterval((function(){t._runOnce()}),this._exportInterval),this._interval},e.prototype.onForceFlush=function(){return bo(this,void 0,void 0,(function(){return wo(this,(function(t){switch(t.label){case 0:return[4,this._runOnce()];case 1:return t.sent(),[4,this._exporter.forceFlush()];case 2:return t.sent(),[2]}}))}))},e.prototype.onShutdown=function(){return bo(this,void 0,void 0,(function(){return wo(this,(function(t){switch(t.label){case 0:return this._interval&&clearInterval(this._interval),[4,this._exporter.shutdown()];case 1:return t.sent(),[2]}}))}))}}(Oo);var Lo=function(){return Lo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Lo.apply(this,arguments)},Ao=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},Co=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},No=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};!function(){function t(t,e){var n,r=this;this._attributes=t,this.asyncAttributesPending=null!=e,this._syncAttributes=null!==(n=this._attributes)&&void 0!==n?n:{},this._asyncAttributesPromise=null==e?void 0:e.then((function(t){return r._attributes=Object.assign({},r._attributes,t),r.asyncAttributesPending=!1,t}),(function(t){return It.debug("a resource's async attributes promise rejected: %s",t),r.asyncAttributesPending=!1,{}}))}t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t(((e={})[$n]="unknown_service",e[tr]=nr[tr],e[Jn]=nr[Jn],e[er]=nr[er],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&It.error("Accessing resource attributes before async attributes settled"),null!==(t=this._attributes)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return Ao(this,void 0,void 0,(function(){return Co(this,(function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t.prototype.merge=function(e){var n,r=this;if(!e)return this;var o=Lo(Lo({},this._syncAttributes),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(o);var i=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then((function(t){var n,o=No(t,2),i=o[0],a=o[1];return Lo(Lo(Lo(Lo({},r._syncAttributes),i),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes),a)}));return new t(o,i)},t.EMPTY=new t({})}();var Io=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xo=function(){function t(t,e){this._writableMetricStorage=t,this._descriptor=e}return t.prototype._record=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n=Nt.active()),"number"==typeof t?(this._descriptor.valueType!==A.INT||Number.isInteger(t)||(It.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),t=Math.trunc(t),Number.isInteger(t)))&&this._writableMetricStorage.record(t,e,n,sr(Date.now())):It.warn("non-number value provided to metric "+this._descriptor.name+": "+t)},t}();!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Io(e,t),e.prototype.add=function(t,e,n){this._record(t,e,n)}}(xo),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Io(e,t),e.prototype.add=function(t,e,n){t<0?It.warn("negative value provided to counter "+this._descriptor.name+": "+t):this._record(t,e,n)}}(xo),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Io(e,t),e.prototype.record=function(t,e,n){t<0?It.warn("negative value provided to histogram "+this._descriptor.name+": "+t):this._record(t,e,n)}}(xo);var Mo=function(){function t(t,e,n){this._observableRegistry=n,this._descriptor=t,this._metricStorages=e}return t.prototype.addCallback=function(t){this._observableRegistry.addCallback(t,this)},t.prototype.removeCallback=function(t){this._observableRegistry.removeCallback(t,this)},t}();!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Io(e,t)}(Mo),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Io(e,t)}(Mo),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Io(e,t)}(Mo);var ko=function(){function t(t){this._instrumentDescriptor=t}return t.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},t.prototype.updateDescription=function(t){this._instrumentDescriptor=function(t,e,n){var r,o,i;return{name:t,type:e,description:null!==(r=null==n?void 0:n.description)&&void 0!==r?r:"",unit:null!==(o=null==n?void 0:n.unit)&&void 0!==o?o:"",valueType:null!==(i=null==n?void 0:n.valueType)&&void 0!==i?i:A.DOUBLE}}(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:t,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit})},t}(),Do=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Uo=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},jo=function(){function t(t){this._hash=t,this._valueMap=new Map,this._keyMap=new Map}return t.prototype.get=function(t,e){return null!=e||(e=this._hash(t)),this._valueMap.get(e)},t.prototype.getOrDefault=function(t,e){var n=this._hash(t);if(this._valueMap.has(n))return this._valueMap.get(n);var r=e();return this._keyMap.has(n)||this._keyMap.set(n,t),this._valueMap.set(n,r),r},t.prototype.set=function(t,e,n){null!=n||(n=this._hash(t)),this._keyMap.has(n)||this._keyMap.set(n,t),this._valueMap.set(n,e)},t.prototype.has=function(t,e){return null!=e||(e=this._hash(t)),this._valueMap.has(e)},t.prototype.keys=function(){var t,e;return Uo(this,(function(n){switch(n.label){case 0:t=this._keyMap.entries(),e=t.next(),n.label=1;case 1:return!0===e.done?[3,3]:[4,[e.value[1],e.value[0]]];case 2:return n.sent(),e=t.next(),[3,1];case 3:return[2]}}))},t.prototype.entries=function(){var t,e;return Uo(this,(function(n){switch(n.label){case 0:t=this._valueMap.entries(),e=t.next(),n.label=1;case 1:return!0===e.done?[3,3]:[4,[this._keyMap.get(e.value[0]),e.value[1],e.value[0]]];case 2:return n.sent(),e=t.next(),[3,1];case 3:return[2]}}))},Object.defineProperty(t.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),t}(),Bo=function(t){function e(){return t.call(this,Sr)||this}return Do(e,t),e}(jo),Fo=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Go=function(){function t(t){this._aggregator=t,this._activeCollectionStorage=new Bo,this._cumulativeMemoStorage=new Bo}return t.prototype.record=function(t,e,n,r){var o=this,i=this._activeCollectionStorage.getOrDefault(e,(function(){return o._aggregator.createAccumulation(r)}));null==i||i.record(t)},t.prototype.batchCumulate=function(t,e){var n=this;Array.from(t.entries()).forEach((function(t){var r=Fo(t,3),o=r[0],i=r[1],a=r[2],s=n._aggregator.createAccumulation(e);null==s||s.record(i);var u=s;if(n._cumulativeMemoStorage.has(o,a)){var c=n._cumulativeMemoStorage.get(o,a);u=n._aggregator.diff(c,s)}if(n._activeCollectionStorage.has(o,a)){var l=n._activeCollectionStorage.get(o,a);u=n._aggregator.merge(l,u)}n._cumulativeMemoStorage.set(o,s,a),n._activeCollectionStorage.set(o,u,a)}))},t.prototype.collect=function(){var t=this._activeCollectionStorage;return this._activeCollectionStorage=new Bo,t},t}(),Vo=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ho=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},zo=function(){function t(t){this._aggregator=t,this._unreportedAccumulations=new Map,this._reportHistory=new Map}return t.prototype.buildMetrics=function(e,n,r,o,i){this._stashAccumulations(n,o);var a,s,u=this._getMergedUnreportedAccumulations(e),c=u;if(this._reportHistory.has(e)){var l=this._reportHistory.get(e),p=l.collectionTime;c=(a=l.aggregationTemporality)===vr.CUMULATIVE?t.merge(l.accumulations,u,this._aggregator):t.calibrateStartTime(l.accumulations,u,p)}else a=e.selectAggregationTemporality(r.type);return this._reportHistory.set(e,{accumulations:c,collectionTime:i,aggregationTemporality:a}),this._aggregator.toMetricData(r,a,(s=c,Array.from(s.entries())),i)},t.prototype._stashAccumulations=function(t,e){var n=this;t.forEach((function(t){var r=n._unreportedAccumulations.get(t);void 0===r&&(r=[],n._unreportedAccumulations.set(t,r)),r.push(e)}))},t.prototype._getMergedUnreportedAccumulations=function(e){var n,r,o=new Bo,i=this._unreportedAccumulations.get(e);if(this._unreportedAccumulations.set(e,[]),void 0===i)return o;try{for(var a=Vo(i),s=a.next();!s.done;s=a.next()){var u=s.value;o=t.merge(o,u,this._aggregator)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},t.merge=function(t,e,n){for(var r=t,o=e.entries(),i=o.next();!0!==i.done;){var a=Ho(i.value,3),s=a[0],u=a[1],c=a[2];if(t.has(s,c)){var l=t.get(s,c),p=n.merge(l,u);r.set(s,p,c)}else r.set(s,u,c);i=o.next()}return r},t.calibrateStartTime=function(t,e,n){var r,o;try{for(var i=Vo(t.keys()),a=i.next();!a.done;a=i.next()){var s=Ho(a.value,2),u=s[0],c=s[1],l=e.get(u,c);null==l||l.setStartTime(n)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return e},t}();var Xo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zo=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};!function(t){function e(e,n,r){var o=t.call(this,e)||this;return o._attributesProcessor=r,o._deltaMetricStorage=new Go(n),o._temporalMetricStorage=new zo(n),o}Xo(e,t),e.prototype.record=function(t,e){var n=this,r=new Bo;Array.from(t.entries()).forEach((function(t){var e=Zo(t,2),o=e[0],i=e[1];r.set(n._attributesProcessor.process(o),i)})),this._deltaMetricStorage.batchCumulate(r,e)},e.prototype.collect=function(t,e,n){var r=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(t,e,this._instrumentDescriptor,r,n)}}(ko);var qo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(e,n,r){var o=t.call(this,e)||this;return o._attributesProcessor=r,o._deltaMetricStorage=new Go(n),o._temporalMetricStorage=new zo(n),o}qo(e,t),e.prototype.record=function(t,e,n,r){e=this._attributesProcessor.process(e,n),this._deltaMetricStorage.record(t,e,n,r)},e.prototype.collect=function(t,e,n){var r=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(t,e,this._instrumentDescriptor,r,n)}}(ko);var Ko=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wo=function(){function t(){}return t.Noop=function(){return Qo},t}(),Yo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ko(e,t),e.prototype.process=function(t,e){return t},e}(Wo);!function(t){function e(e){var n=t.call(this)||this;return n._allowedAttributeNames=e,n}Ko(e,t),e.prototype.process=function(t,e){var n=this,r={};return Object.keys(t).filter((function(t){return n._allowedAttributeNames.includes(t)})).forEach((function(e){return r[e]=t[e]})),r}}(Wo);var Qo=new Yo;class $o{constructor(t){this.config=t}export(t,e){const n=function(t,e){return{resourceSpans:gr(t,e)}}(t,!0);this.config.api.pushTraces(n),e({code:Xe.SUCCESS})}shutdown(){return Promise.resolve(void 0)}}class Jo{constructor(t,e){this.processor=t,this.metas=e}forceFlush(){return this.processor.forceFlush()}onStart(t,e){const n=this.metas.value.session;(null==n?void 0:n.id)&&(t.attributes.session_id=n.id),this.processor.onStart(t,e)}onEnd(t){this.processor.onEnd(t)}shutdown(){return this.processor.shutdown()}}var ti,ei=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ni=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},ri=function(){function t(t,e,n,r,o,i,a,s,u){void 0===a&&(a=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Rt.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=r,this.parentSpanId=i,this.kind=o,this.links=a;var c=Date.now();this._performanceStartTime=Re.now(),this._performanceOffset=c-(this._performanceStartTime+We()),this._startTimeProvided=null!=s,this.startTime=this._getTime(null!=s?s:c),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,e),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(t,e){return null==e||this._isSpanEnded()?this:0===t.length?(It.warn("Invalid attribute key: "+t),this):re(e)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(e),this):(It.warn("Invalid attribute value set for key: "+t),this)},t.prototype.setAttributes=function(t){var e,n;try{for(var r=ei(Object.entries(t)),o=r.next();!o.done;o=r.next()){var i=ni(o.value,2),a=i[0],s=i[1];this.setAttribute(a,s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return this},t.prototype.addEvent=function(t,e,n){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return It.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(It.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),tn(e)&&(tn(n)||(n=e),e=void 0);var r=ee(e);return this.events.push({name:t,attributes:r,time:this._getTime(n),droppedAttributesCount:0}),this},t.prototype.setStatus=function(t){return this._isSpanEnded()||(this.status=t),this},t.prototype.updateName=function(t){return this._isSpanEnded()||(this.name=t),this},t.prototype.end=function(t){this._isSpanEnded()?It.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once."):(this._ended=!0,this.endTime=this._getTime(t),this._duration=function(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=qe),[n,r]}(this.startTime,this.endTime),this._duration[0]<0&&(It.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._spanProcessor.onEnd(this))},t.prototype._getTime=function(t){if("number"==typeof t&&t<Re.now())return Ye(t+this._performanceOffset);if("number"==typeof t)return Ke(t);if(t instanceof Date)return Ke(t.getTime());if(Je(t))return t;if(this._startTimeProvided)return Ke(Date.now());var e=Re.now()-this._performanceStartTime;return en(this.startTime,Ke(e))},t.prototype.isRecording=function(){return!1===this._ended},t.prototype.recordException=function(t,e){var n={};"string"==typeof t?n[Le]=t:t&&(t.code?n[Pe]=t.code.toString():t.name&&(n[Pe]=t.name),t.message&&(n[Le]=t.message),t.stack&&(n[Ae]=t.stack)),n[Pe]||n[Le]?this.addEvent("exception",n,e):It.warn("Failed to record an exception "+t)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&It.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(t,e){return t.length<=e?t:t.substr(0,e)},t.prototype._truncateToSize=function(t){var e=this,n=this._attributeValueLengthLimit;return n<=0?(It.warn("Attribute value limit must be positive, got "+n),t):"string"==typeof t?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map((function(t){return"string"==typeof t?e._truncateToLimitUtil(t,n):t})):t},t}();!function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(ti||(ti={}));var oi=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:ti.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),ii=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:ti.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),ai=function(){function t(t){var e,n,r,o;this._root=t.root,this._root||(se(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new ii),this._remoteParentSampled=null!==(e=t.remoteParentSampled)&&void 0!==e?e:new ii,this._remoteParentNotSampled=null!==(n=t.remoteParentNotSampled)&&void 0!==n?n:new oi,this._localParentSampled=null!==(r=t.localParentSampled)&&void 0!==r?r:new ii,this._localParentNotSampled=null!==(o=t.localParentNotSampled)&&void 0!==o?o:new oi}return t.prototype.shouldSample=function(t,e,n,r,o,i){var a=qt.getSpanContext(t);return a&&mt(a)?a.isRemote?a.traceFlags&W.SAMPLED?this._remoteParentSampled.shouldSample(t,e,n,r,o,i):this._remoteParentNotSampled.shouldSample(t,e,n,r,o,i):a.traceFlags&W.SAMPLED?this._localParentSampled.shouldSample(t,e,n,r,o,i):this._localParentNotSampled.shouldSample(t,e,n,r,o,i):this._root.shouldSample(t,e,n,r,o,i)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}(),si=function(){function t(t){void 0===t&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(4294967295*this._ratio)}return t.prototype.shouldSample=function(t,e){return{decision:Tt(e)&&this._accumulate(e)<this._upperBound?ti.RECORD_AND_SAMPLED:ti.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(t){return"number"!=typeof t||isNaN(t)?0:t>=1?1:t<=0?0:t},t.prototype._accumulate=function(t){for(var e=0,n=0;n<t.length/8;n++){var r=8*n;e=(e^parseInt(t.slice(r,r+8),16))>>>0}return e},t}(),ui=be(),ci=ie.AlwaysOn;function li(){return{sampler:pi(ui),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:be().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:be().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:be().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:be().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:be().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:be().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:be().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:be().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function pi(t){switch(void 0===t&&(t=be()),t.OTEL_TRACES_SAMPLER){case ie.AlwaysOn:return new ii;case ie.AlwaysOff:return new oi;case ie.ParentBasedAlwaysOn:return new ai({root:new ii});case ie.ParentBasedAlwaysOff:return new ai({root:new oi});case ie.TraceIdRatio:return new si(fi(t));case ie.ParentBasedTraceIdRatio:return new ai({root:new si(fi(t))});default:return It.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+ci+'".'),new ii}}function fi(t){if(void 0===t.OTEL_TRACES_SAMPLER_ARG||""===t.OTEL_TRACES_SAMPLER_ARG)return It.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(It.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to 1."),1):e<0||e>1?(It.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to 1."),1):e}function hi(t){var e,n,r,o,i,a,s,u,c,l,p,f,h=Object.assign({},t.spanLimits),_="undefined"!=typeof process&&process&&process.env?Se(process.env):Se(ue);return h.attributeCountLimit=null!==(a=null!==(i=null!==(o=null!==(n=null===(e=t.spanLimits)||void 0===e?void 0:e.attributeCountLimit)&&void 0!==n?n:null===(r=t.generalLimits)||void 0===r?void 0:r.attributeCountLimit)&&void 0!==o?o:_.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==i?i:_.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==a?a:ye,h.attributeValueLengthLimit=null!==(f=null!==(p=null!==(l=null!==(u=null===(s=t.spanLimits)||void 0===s?void 0:s.attributeValueLengthLimit)&&void 0!==u?u:null===(c=t.generalLimits)||void 0===c?void 0:c.attributeValueLengthLimit)&&void 0!==l?l:_.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==p?p:_.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==f?f:de,Object.assign({},t,{spanLimits:h})}var _i=function(){function t(t,e){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=be();this._maxExportBatchSize="number"==typeof(null==e?void 0:e.maxExportBatchSize)?e.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==e?void 0:e.maxQueueSize)?e.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==e?void 0:e.scheduledDelayMillis)?e.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==e?void 0:e.exportTimeoutMillis)?e.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Gn(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(It.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(t,e){},t.prototype.onEnd=function(t){this._shutdownOnce.isCalled||0!=(t.spanContext().traceFlags&W.SAMPLED)&&this._addToBuffer(t)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var t=this;return Promise.resolve().then((function(){return t.onShutdown()})).then((function(){return t._flushAll()})).then((function(){return t._exporter.shutdown()}))},t.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize)return 0===this._droppedSpansCount&&It.debug("maxQueueSize reached, dropping spans"),void this._droppedSpansCount++;this._droppedSpansCount>0&&(It.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},t.prototype._flushAll=function(){var t=this;return new Promise((function(e,n){for(var r=[],o=0,i=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize);o<i;o++)r.push(t._flushOneBatch());Promise.all(r).then((function(){e()})).catch(n)}))},t.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise((function(e,n){var r=setTimeout((function(){n(new Error("Timeout"))}),t._exportTimeoutMillis);Nt.with(function(t){return t.setValue(Kt,!0)}(Nt.active()),(function(){var o=t._finishedSpans.splice(0,t._maxExportBatchSize),i=function(){return t._exporter.export(o,(function(t){var o;clearTimeout(r),t.code===Xe.SUCCESS?e():n(null!==(o=t.error)&&void 0!==o?o:new Error("BatchSpanProcessor: span export failed"))}))},a=o.map((function(t){return t.resource})).filter((function(t){return t.asyncAttributesPending}));0===a.length?i():Promise.all(a.map((function(t){var e;return null===(e=t.waitForAsyncAttributes)||void 0===e?void 0:e.call(t)}))).then(i,(function(t){se(t),n(t)}))}))}))},t.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var e=function(){t._isExporting=!0,t._flushOneBatch().then((function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())})).catch((function(e){t._isExporting=!1,se(e)}))};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();void 0===this._timer&&(this._timer=setTimeout((function(){return e()}),this._scheduledDelayMillis),this._timer)}},t.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},t}(),di=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yi=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.onInit(n),r}return di(e,t),e.prototype.onInit=function(t){var e=this;!0!==(null==t?void 0:t.disableAutoFlushOnDocumentHide)&&"undefined"!=typeof document&&(this._visibilityChangeListener=function(){"hidden"===document.visibilityState&&e.forceFlush()},this._pageHideListener=function(){e.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},e.prototype.onShutdown=function(){"undefined"!=typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e}(_i),vi=function(){this.generateTraceId=Ti(16),this.generateSpanId=Ti(8)},Ei=Array(32);function Ti(t){return function(){for(var e=0;e<2*t;e++)Ei[e]=Math.floor(16*Math.random())+48,Ei[e]>=58&&(Ei[e]+=39);return String.fromCharCode.apply(null,Ei.slice(0,2*t))}}var mi=function(){function t(t,e,n){this._tracerProvider=n;var r,o,i,a,s=(r=e,o={sampler:pi()},i=li(),(a=Object.assign({},i,o,r)).generalLimits=Object.assign({},i.generalLimits,r.generalLimits||{}),a.spanLimits=Object.assign({},i.spanLimits,r.spanLimits||{}),a);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=e.idGenerator||new vi,this.resource=n.resource,this.instrumentationLibrary=t}return t.prototype.startSpan=function(t,e,n){var r,o,i;void 0===e&&(e={}),void 0===n&&(n=Nt.active()),e.root&&(n=qt.deleteSpan(n));var a=qt.getSpan(n);if(Wt(n))return It.debug("Instrumentation suppressed, returning Noop Span"),qt.wrapSpanContext(ut);var s,u,c,l=null==a?void 0:a.spanContext(),p=this._idGenerator.generateSpanId();l&&qt.isSpanContextValid(l)?(s=l.traceId,u=l.traceState,c=l.spanId):s=this._idGenerator.generateTraceId();var f=null!==(r=e.kind)&&void 0!==r?r:wt.INTERNAL,h=(null!==(o=e.links)&&void 0!==o?o:[]).map((function(t){return{context:t.context,attributes:ee(t.attributes)}})),_=ee(e.attributes),d=this._sampler.shouldSample(n,s,t,f,_,h);u=null!==(i=d.traceState)&&void 0!==i?i:u;var y={traceId:s,spanId:p,traceFlags:d.decision===bt.RECORD_AND_SAMPLED?W.SAMPLED:W.NONE,traceState:u};if(d.decision===bt.NOT_RECORD)return It.debug("Recording is off, propagating context in a non-recording span"),qt.wrapSpanContext(y);var v=new ri(this,n,t,y,f,c,h,e.startTime),E=ee(Object.assign(_,d.attributes));return v.setAttributes(E),v},t.prototype.startActiveSpan=function(t,e,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=e:3===arguments.length?(o=e,a=n):(o=e,i=n,a=r);var s=null!=i?i:Nt.active(),u=this.startSpan(t,o,s),c=qt.setSpan(s,u);return Nt.with(c,a,void 0,u)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}();var gi,Oi=function(){return Oi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Oi.apply(this,arguments)},Si=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},bi=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},wi=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Ri=function(){function t(t,e){var n,r=this;this._attributes=t,this.asyncAttributesPending=null!=e,this._syncAttributes=null!==(n=this._attributes)&&void 0!==n?n:{},this._asyncAttributesPromise=null==e?void 0:e.then((function(t){return r._attributes=Object.assign({},r._attributes,t),r.asyncAttributesPending=!1,t}),(function(t){return It.debug("a resource's async attributes promise rejected: %s",t),r.asyncAttributesPending=!1,{}}))}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t(((e={})[Be]="unknown_service",e[Ve]=ze[Ve],e[Ge]=ze[Ge],e[He]=ze[He],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&It.error("Accessing resource attributes before async attributes settled"),null!==(t=this._attributes)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return Si(this,void 0,void 0,(function(){return bi(this,(function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t.prototype.merge=function(e){var n,r=this;if(!e)return this;var o=Oi(Oi({},this._syncAttributes),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(o);var i=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then((function(t){var n,o=wi(t,2),i=o[0],a=o[1];return Oi(Oi(Oi(Oi({},r._syncAttributes),i),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes),a)}));return new t(o,i)},t.EMPTY=new t({}),t}(),Pi=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Li=function(){function t(t){this._spanProcessors=t}return t.prototype.forceFlush=function(){var t,e,n=[];try{for(var r=Pi(this._spanProcessors),o=r.next();!o.done;o=r.next()){var i=o.value;n.push(i.forceFlush())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return new Promise((function(t){Promise.all(n).then((function(){t()})).catch((function(e){se(e||new Error("MultiSpanProcessor: forceFlush failed")),t()}))}))},t.prototype.onStart=function(t,e){var n,r;try{for(var o=Pi(this._spanProcessors),i=o.next();!i.done;i=o.next()){i.value.onStart(t,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype.onEnd=function(t){var e,n;try{for(var r=Pi(this._spanProcessors),o=r.next();!o.done;o=r.next()){o.value.onEnd(t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.shutdown=function(){var t,e,n=[];try{for(var r=Pi(this._spanProcessors),o=r.next();!o.done;o=r.next()){var i=o.value;n.push(i.shutdown())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return new Promise((function(t,e){Promise.all(n).then((function(){t()}),e)}))},t}(),Ai=function(){function t(){}return t.prototype.onStart=function(t,e){},t.prototype.onEnd=function(t){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}();!function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"}(gi||(gi={}));var Ci,Ni,Ii=function(){function t(t){var e;void 0===t&&(t={}),this._registeredSpanProcessors=[],this._tracers=new Map;var n=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=Ln(n,t.shift(),0,r);return n}({},li(),hi(t));this.resource=null!==(e=n.resource)&&void 0!==e?e:Ri.empty(),this.resource=Ri.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var r=this._buildExporterFromEnv();if(void 0!==r){var o=new yi(r);this.activeSpanProcessor=o}else this.activeSpanProcessor=new Ai}return t.prototype.getTracer=function(t,e,n){var r=t+"@"+(e||"")+":"+((null==n?void 0:n.schemaUrl)||"");return this._tracers.has(r)||this._tracers.set(r,new mi({name:t,version:e,schemaUrl:null==n?void 0:n.schemaUrl},this._config,this)),this._tracers.get(r)},t.prototype.addSpanProcessor=function(t){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((function(t){return It.error("Error while trying to shutdown current span processor",t)})),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new Li(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(t){void 0===t&&(t={}),qt.setGlobalTracerProvider(this),void 0===t.propagator&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&Nt.setGlobalContextManager(t.contextManager),t.propagator&&Xt.setGlobalPropagator(t.propagator)},t.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,e=this._registeredSpanProcessors.map((function(e){return new Promise((function(n){var r,o=setTimeout((function(){n(new Error("Span processor did not completed within timeout period of "+t+" ms")),r=gi.timeout}),t);e.forceFlush().then((function(){clearTimeout(o),r!==gi.timeout&&(r=gi.resolved,n(r))})).catch((function(t){clearTimeout(o),r=gi.error,n(t)}))}))}));return new Promise((function(t,n){Promise.all(e).then((function(e){var r=e.filter((function(t){return t!==gi.resolved}));r.length>0?n(r):t()})).catch((function(t){return n([t])}))}))},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(t){var e;return null===(e=this.constructor._registeredPropagators.get(t))||void 0===e?void 0:e()},t.prototype._getSpanExporter=function(t){var e;return null===(e=this.constructor._registeredExporters.get(t))||void 0===e?void 0:e()},t.prototype._buildPropagatorFromEnv=function(){var t=this,e=Array.from(new Set(be().OTEL_PROPAGATORS)),n=e.map((function(e){var n=t._getPropagator(e);return n||It.warn('Propagator "'+e+'" requested through environment variable is unavailable.'),n})).reduce((function(t,e){return e&&t.push(e),t}),[]);return 0===n.length?void 0:1===e.length?n[0]:new rn({propagators:n})},t.prototype._buildExporterFromEnv=function(){var t=be().OTEL_TRACES_EXPORTER;if("none"!==t&&""!==t){var e=this._getSpanExporter(t);return e||It.error('Exporter "'+t+'" requested through environment variable is unavailable.'),e}},t._registeredPropagators=new Map([["tracecontext",function(){return new _n}],["baggage",function(){return new $t}]]),t._registeredExporters=new Map,t}(),xi=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Mi=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},ki=function(){function t(){this._enabled=!1,this._currentContext=N}return t.prototype._bindFunction=function(t,e){void 0===t&&(t=N);var n=this,r=function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return n.with(t,(function(){return e.apply(r,o)}))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:e.length}),r},t.prototype.active=function(){return this._currentContext},t.prototype.bind=function(t,e){return void 0===t&&(t=this.active()),"function"==typeof e?this._bindFunction(t,e):e},t.prototype.disable=function(){return this._currentContext=N,this._enabled=!1,this},t.prototype.enable=function(){return this._enabled||(this._enabled=!0,this._currentContext=N),this},t.prototype.with=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=this._currentContext;this._currentContext=t||N;try{return e.call.apply(e,Mi([n],xi(r),!1))}finally{this._currentContext=i}},t}(),Di=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ui=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;if(e.contextManager)throw"contextManager should be defined in register method not in constructor";if(e.propagator)throw"propagator should be defined in register method not in constructor";return n}return Di(e,t),e.prototype.register=function(e){void 0===e&&(e={}),void 0===e.contextManager&&(e.contextManager=new ki),e.contextManager&&e.contextManager.enable(),t.prototype.register.call(this,e)},e}(Ii);function ji(t,e){return e in t}function Bi(t,e,n){if(ji(n,e)&&"number"==typeof n[e])return t.addEvent(e,n[e]),t}function Fi(t,e){Bi(t,Ci.FETCH_START,e),Bi(t,Ci.DOMAIN_LOOKUP_START,e),Bi(t,Ci.DOMAIN_LOOKUP_END,e),Bi(t,Ci.CONNECT_START,e),ji(e,"name")&&e.name.startsWith("https:")&&Bi(t,Ci.SECURE_CONNECTION_START,e),Bi(t,Ci.CONNECT_END,e),Bi(t,Ci.REQUEST_START,e),Bi(t,Ci.RESPONSE_START,e),Bi(t,Ci.RESPONSE_END,e);var n=e[Ci.ENCODED_BODY_SIZE];void 0!==n&&t.setAttribute(De,n);var r=e[Ci.DECODED_BODY_SIZE];void 0!==r&&n!==r&&t.setAttribute(Ue,r)}function Gi(t,e,n,r,o,i){void 0===o&&(o=new WeakSet);var a=Vi(t),s=function(t,e,n,r,o,i){var a=$e(e),s=$e(n),u=r.filter((function(e){var n=$e(Qe(e[Ci.FETCH_START])),r=$e(Qe(e[Ci.RESPONSE_END]));return e.initiatorType.toLowerCase()===(i||"xmlhttprequest")&&e.name===t&&n>=a&&r<=s}));u.length>0&&(u=u.filter((function(t){return!o.has(t)})));return u}(t=a.toString(),e,n,r,o,i);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var u=function(t){return t.slice().sort((function(t,e){var n=t[Ci.FETCH_START],r=e[Ci.FETCH_START];return n>r?1:n<r?-1:0}))}(s);if(a.origin!==location.origin&&u.length>1){var c=u[0],l=function(t,e,n){for(var r,o=$e(n),i=$e(Qe(e)),a=t[1],s=t.length,u=1;u<s;u++){var c=t[u],l=$e(Qe(c[Ci.FETCH_START])),p=o-$e(Qe(c[Ci.RESPONSE_END]));l>=i&&(!r||p<r)&&(r=p,a=c)}return a}(u,c[Ci.RESPONSE_END],n),p=c[Ci.RESPONSE_END];return l[Ci.FETCH_START]<p&&(l=c,c=void 0),{corsPreFlightRequest:c,mainRequest:l}}return{mainRequest:s[0]}}function Vi(t){if("function"==typeof URL)return new URL(t,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var e=(Ni||(Ni=document.createElement("a")),Ni);return e.href=t,e}function Hi(t){void 0===t&&(t=[]);for(var e=[],n=0,r=t.length;n<r;n++){var o=t[n];if(Array.isArray(o)){var i=Hi(o);e=e.concat(i.instrumentations)}else"function"==typeof o?e.push(new o):o.instrumentationName&&e.push(o)}return{instrumentations:e}}function zi(t){var e=Hi(t.instrumentations).instrumentations,n=t.tracerProvider||qt.getTracerProvider(),r=t.meterProvider||kt.getMeterProvider();return function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];e&&i.setTracerProvider(e),n&&i.setMeterProvider(n),i.getConfig().enabled||i.enable()}}(e,n,r),function(){!function(t){t.forEach((function(t){return t.disable()}))}(e)}}!function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"}(Ci||(Ci={}));var Xi="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Zi(t){return"function"==typeof t}var qi=console.error.bind(console);function Ki(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function Wi(t){t&&t.logger&&(Zi(t.logger)?qi=t.logger:qi("new logger isn't a function, not replacing"))}function Yi(t,e,n){if(t&&t[e]){if(!n)return qi("no wrapper function"),void qi((new Error).stack);if(Zi(t[e])&&Zi(n)){var r=t[e],o=n(r,e);return Ki(o,"__original",r),Ki(o,"__unwrap",(function(){t[e]===o&&Ki(t,e,r)})),Ki(o,"__wrapped",!0),Ki(t,e,o),o}qi("original object and wrapper must be functions")}else qi("no original function "+e+" to wrap")}function Qi(t,e){return t&&t[e]?t[e].__unwrap?t[e].__unwrap():void qi("no original to unwrap to -- has "+e+" already been unwrapped?"):(qi("no function to unwrap."),void qi((new Error).stack))}Wi.wrap=Yi,Wi.massWrap=function(t,e,n){if(!t)return qi("must provide one or more modules to patch"),void qi((new Error).stack);Array.isArray(t)||(t=[t]),e&&Array.isArray(e)?t.forEach((function(t){e.forEach((function(e){Yi(t,e,n)}))})):qi("must provide one or more functions to wrap on modules")},Wi.unwrap=Qi,Wi.massUnwrap=function(t,e){if(!t)return qi("must provide one or more modules to patch"),void qi((new Error).stack);Array.isArray(t)||(t=[t]),e&&Array.isArray(e)?t.forEach((function(t){e.forEach((function(e){Qi(t,e)}))})):qi("must provide one or more functions to unwrap on modules")};var $i,Ji=Wi,ta=function(){return ta=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ta.apply(this,arguments)},ea=function(){function t(t,e,n){void 0===n&&(n={}),this.instrumentationName=t,this.instrumentationVersion=e,this._wrap=Ji.wrap,this._unwrap=Ji.unwrap,this._massWrap=Ji.massWrap,this._massUnwrap=Ji.massUnwrap,this._config=ta({enabled:!0},n),this._diag=It.createComponentLogger({namespace:t}),this._tracer=qt.getTracer(t,e),this._meter=kt.getMeter(t,e),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(t){void 0===t&&(t={}),this._config=Object.assign({},t)},t.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t}(),na=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ra=function(t){function e(e,n,r){void 0===r&&(r={});var o=t.call(this,e,n,r)||this;return o._config.enabled&&o.enable(),o}return na(e,t),e}(ea);function oa(t,e,n){var r,o;try{o=t()}catch(t){r=t}finally{if(e(r,o),r&&!n)throw r;return o}}function ia(t){return"function"==typeof t&&"function"==typeof t.__original&&"function"==typeof t.__unwrap&&!0===t.__wrapped}!function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"}($i||($i={}));var aa;!function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"}(aa||(aa={}));var sa={"first-paint":aa.FIRST_PAINT,"first-contentful-paint":aa.FIRST_CONTENTFUL_PAINT},ua=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ca=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,"@opentelemetry/instrumentation-document-load","0.33.2",e)||this;return n.component="document-load",n.version="1",n.moduleName=n.component,n}return ua(e,t),e.prototype.init=function(){},e.prototype._onDocumentLoaded=function(){var t=this;window.setTimeout((function(){t._collectPerformance()}))},e.prototype._addResourcesSpans=function(t){var e,n,r=this,o=null===(n=(e=Re).getEntriesByType)||void 0===n?void 0:n.call(e,"resource");o&&o.forEach((function(e){r._initResourceSpan(e,t)}))},e.prototype._collectPerformance=function(){var t=this,e=Array.from(document.getElementsByTagName("meta")).find((function(t){return t.getAttribute("name")===ln})),n=function(){var t,e,n={},r=null===(e=(t=Re).getEntriesByType)||void 0===e?void 0:e.call(t,"navigation")[0];if(r)Object.values(Ci).forEach((function(t){if(ji(r,t)){var e=r[t];"number"==typeof e&&(n[t]=e)}}));else{var o=Re.timing;o&&Object.values(Ci).forEach((function(t){if(ji(o,t)){var e=o[t];"number"==typeof e&&(n[t]=e)}}))}return n}(),r=e&&e.content||"";Nt.with(Xt.extract(N,{traceparent:r}),(function(){var e,r=t._startSpan($i.DOCUMENT_LOAD,Ci.FETCH_START,n);r&&(Nt.with(qt.setSpan(Nt.active(),r),(function(){var e=t._startSpan($i.DOCUMENT_FETCH,Ci.FETCH_START,n);e&&(e.setAttribute(Ne,location.href),Nt.with(qt.setSpan(Nt.active(),e),(function(){var r;Fi(e,n),t._addCustomAttributesOnSpan(e,null===(r=t._getConfig().applyCustomAttributesOnSpan)||void 0===r?void 0:r.documentFetch),t._endSpan(e,Ci.RESPONSE_END,n)})))})),r.setAttribute(Ne,location.href),r.setAttribute(ke,navigator.userAgent),t._addResourcesSpans(r),Bi(r,Ci.FETCH_START,n),Bi(r,Ci.UNLOAD_EVENT_START,n),Bi(r,Ci.UNLOAD_EVENT_END,n),Bi(r,Ci.DOM_INTERACTIVE,n),Bi(r,Ci.DOM_CONTENT_LOADED_EVENT_START,n),Bi(r,Ci.DOM_CONTENT_LOADED_EVENT_END,n),Bi(r,Ci.DOM_COMPLETE,n),Bi(r,Ci.LOAD_EVENT_START,n),Bi(r,Ci.LOAD_EVENT_END,n),function(t){var e,n,r=null===(n=(e=Re).getEntriesByType)||void 0===n?void 0:n.call(e,"paint");r&&r.forEach((function(e){var n=e.name,r=e.startTime;ji(sa,n)&&t.addEvent(sa[n],r)}))}(r),t._addCustomAttributesOnSpan(r,null===(e=t._getConfig().applyCustomAttributesOnSpan)||void 0===e?void 0:e.documentLoad),t._endSpan(r,Ci.LOAD_EVENT_END,n))}))},e.prototype._endSpan=function(t,e,n){t&&(ji(n,e)?t.end(n[e]):t.end())},e.prototype._initResourceSpan=function(t,e){var n,r=this._startSpan($i.RESOURCE_FETCH,Ci.FETCH_START,t,e);r&&(r.setAttribute(Ne,t.name),Fi(r,t),this._addCustomAttributesOnResourceSpan(r,t,null===(n=this._getConfig().applyCustomAttributesOnSpan)||void 0===n?void 0:n.resourceFetch),this._endSpan(r,Ci.RESPONSE_END,t))},e.prototype._startSpan=function(t,e,n,r){if(ji(n,e)&&"number"==typeof n[e])return this.tracer.startSpan(t,{startTime:n[e]},r?qt.setSpan(Nt.active(),r):void 0)},e.prototype._waitForPageLoad=function(){"complete"===window.document.readyState?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},e.prototype._getConfig=function(){return this._config},e.prototype._addCustomAttributesOnSpan=function(t,e){var n=this;e&&oa((function(){return e(t)}),(function(t){t&&n._diag.error("addCustomAttributesOnSpan",t)}),!0)},e.prototype._addCustomAttributesOnResourceSpan=function(t,e,n){var r=this;n&&oa((function(){return n(t,e)}),(function(t){t&&r._diag.error("addCustomAttributesOnResourceSpan",t)}),!0)},e.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},e.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},e}(ra),la=function(){return la=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},la.apply(this,arguments)},pa=function(){function t(t,e,n){void 0===n&&(n={}),this.instrumentationName=t,this.instrumentationVersion=e,this._wrap=Ji.wrap,this._unwrap=Ji.unwrap,this._massWrap=Ji.massWrap,this._massUnwrap=Ji.massUnwrap,this._config=la({enabled:!0},n),this._diag=It.createComponentLogger({namespace:t}),this._tracer=qt.getTracer(t,e),this._meter=kt.getMeter(t,e),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(t){void 0===t&&(t={}),this._config=Object.assign({},t)},t.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t}(),fa=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ha=function(t){function e(e,n,r){void 0===r&&(r={});var o=t.call(this,e,n,r)||this;return o._config.enabled&&o.enable(),o}return fa(e,t),e}(pa);var _a=P("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function da(t){return!0===t.getValue(_a)}var ya="baggage",va=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};var Ea=function(){function t(){}return t.prototype.inject=function(t,e,n){var r=Xt.getBaggage(t);if(r&&!da(t)){var o=function(t){return t.getAllEntries().map((function(t){var e=va(t,2),n=e[0],r=e[1],o=encodeURIComponent(n)+"="+encodeURIComponent(r.value);return void 0!==r.metadata&&(o+=";"+r.metadata.toString()),o}))}(r).filter((function(t){return t.length<=4096})).slice(0,180),i=function(t){return t.reduce((function(t,e){var n=t+(""!==t?",":"")+e;return n.length>8192?t:n}),"")}(o);i.length>0&&n.set(e,ya,i)}},t.prototype.extract=function(t,e,n){var r=n.get(e,ya),o=Array.isArray(r)?r.join(","):r;if(!o)return t;var i={};return 0===o.length?t:(o.split(",").forEach((function(t){var e=function(t){var e=t.split(";");if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf("=");if(!(r<=0)){var o,i=decodeURIComponent(n.substring(0,r).trim()),a=decodeURIComponent(n.substring(r+1).trim());return e.length>0&&(o=R(e.join(";"))),{key:i,value:a,metadata:o}}}}}(t);if(e){var n={value:e.value};e.metadata&&(n.metadata=e.metadata),i[e.key]=n}})),0===Object.entries(i).length?t:Xt.setBaggage(t,Xt.createBaggage(i)))},t.prototype.fields=function(){return[ya]},t}(),Ta=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ma=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function ga(t){var e,n,r={};if("object"!=typeof t||null==t)return r;try{for(var o=Ta(Object.entries(t)),i=o.next();!i.done;i=o.next()){var a=ma(i.value,2),s=a[0],u=a[1];Oa(s)?Sa(u)?Array.isArray(u)?r[s]=u.slice():r[s]=u:It.warn("Invalid attribute value set for key: "+s):It.warn("Invalid attribute key: "+s)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}function Oa(t){return"string"==typeof t&&t.length>0}function Sa(t){return null==t||(Array.isArray(t)?function(t){var e,n,r;try{for(var o=Ta(t),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){if(!r){if(ba(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return!0}(t):ba(t))}function ba(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}var wa,Ra=function(t){It.error(function(t){return"string"==typeof t?t:JSON.stringify(function(t){for(var e={},n=t;null!==n;)Object.getOwnPropertyNames(n).forEach((function(t){if(!e[t]){var r=n[t];r&&(e[t]=String(r))}})),n=Object.getPrototypeOf(n);return e}(t))}(t))};function Pa(t){try{Ra(t)}catch(t){}}!function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"}(wa||(wa={}));var La="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},Aa=["OTEL_SDK_DISABLED"];function Ca(t){return Aa.indexOf(t)>-1}var Na=["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 Ia(t){return Na.indexOf(t)>-1}var xa=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function Ma(t){return xa.indexOf(t)>-1}var ka=1/0,Da=128,Ua={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:f.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:ka,OTEL_ATTRIBUTE_COUNT_LIMIT:Da,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:ka,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Da,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:ka,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Da,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:wa.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"};function ja(t,e,n){if(void 0!==n[t]){var r=String(n[t]);e[t]="true"===r.toLowerCase()}}function Ba(t,e,n,r,o){if(void 0===r&&(r=-1/0),void 0===o&&(o=1/0),void 0!==n[t]){var i=Number(n[t]);isNaN(i)||(e[t]=i<r?r:i>o?o:i)}}function Fa(t,e,n,r){void 0===r&&(r=",");var o=n[t];"string"==typeof o&&(e[t]=o.split(r).map((function(t){return t.trim()})))}var Ga={ALL:f.ALL,VERBOSE:f.VERBOSE,DEBUG:f.DEBUG,INFO:f.INFO,WARN:f.WARN,ERROR:f.ERROR,NONE:f.NONE};function Va(t,e,n){var r=n[t];if("string"==typeof r){var o=Ga[r.toUpperCase()];null!=o&&(e[t]=o)}}function Ha(t){var e={};for(var n in Ua){var r=n;if("OTEL_LOG_LEVEL"===r)Va(r,e,t);else if(Ca(r))ja(r,e,t);else if(Ia(r))Ba(r,e,t);else if(Ma(r))Fa(r,e,t);else{var o=t[r];null!=o&&(e[r]=String(o))}}return e}function za(){var t=Ha(La);return Object.assign({},Ua,t)}Array(32);var Xa,Za=performance,qa="exception.type",Ka="exception.message",Wa="exception.stacktrace",Ya="http.method",Qa="http.url",$a="http.host",Ja="http.scheme",ts="http.status_code",es="http.user_agent",ns="http.response_content_length",rs="http.response_content_length_uncompressed",os="process.runtime.name",is="service.name",as="telemetry.sdk.name",ss="telemetry.sdk.language",us="telemetry.sdk.version",cs=((Xa={})[as]="opentelemetry",Xa[os]="browser",Xa[ss]="webjs",Xa[us]="1.15.2",Xa);var ls,ps=Math.pow(10,6),fs=Math.pow(10,9);function hs(t){var e=t/1e3;return[Math.trunc(e),Math.round(t%1e3*ps)]}function _s(){var t=Za.timeOrigin;if("number"!=typeof t){var e=Za;t=e.timing&&e.timing.fetchStart}return t}function ds(t){return ms(hs(_s()),hs("number"==typeof t?t:Za.now()))}function ys(t){if(Es(t))return t;if("number"==typeof t)return t<_s()?ds(t):hs(t);if(t instanceof Date)return hs(t.getTime());throw TypeError("Invalid input type")}function vs(t){return t[0]*fs+t[1]}function Es(t){return Array.isArray(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]}function Ts(t){return Es(t)||"number"==typeof t||t instanceof Date}function ms(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=fs&&(n[1]-=fs,n[0]+=1),n}!function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"}(ls||(ls={}));var gs=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Os=function(){function t(t){var e;void 0===t&&(t={}),this._propagators=null!==(e=t.propagators)&&void 0!==e?e:[],this._fields=Array.from(new Set(this._propagators.map((function(t){return"function"==typeof t.fields?t.fields():[]})).reduce((function(t,e){return t.concat(e)}),[])))}return t.prototype.inject=function(t,e,n){var r,o;try{for(var i=gs(this._propagators),a=i.next();!a.done;a=i.next()){var s=a.value;try{s.inject(t,e,n)}catch(t){It.warn("Failed to inject with "+s.constructor.name+". Err: "+t.message)}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},t.prototype.extract=function(t,e,n){return this._propagators.reduce((function(t,r){try{return r.extract(t,e,n)}catch(t){It.warn("Failed to inject with "+r.constructor.name+". Err: "+t.message)}return t}),t)},t.prototype.fields=function(){return this._fields.slice()},t}(),Ss="[_0-9a-z-*/]",bs=new RegExp("^(?:"+("[a-z]"+Ss+"{0,255}")+"|"+("[a-z0-9]"+Ss+"{0,240}@[a-z]"+Ss+"{0,13}")+")$"),ws=/^[ -~]{0,255}[!-~]$/,Rs=/,|=/;var Ps=function(){function t(t){this._internalState=new Map,t&&this._parse(t)}return t.prototype.set=function(t,e){var n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,e),n},t.prototype.unset=function(t){var e=this._clone();return e._internalState.delete(t),e},t.prototype.get=function(t){return this._internalState.get(t)},t.prototype.serialize=function(){var t=this;return this._keys().reduce((function(e,n){return e.push(n+"="+t.get(n)),e}),[]).join(",")},t.prototype._parse=function(t){t.length>512||(this._internalState=t.split(",").reverse().reduce((function(t,e){var n=e.trim(),r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r),i=n.slice(r+1,e.length);(function(t){return bs.test(t)})(o)&&function(t){return ws.test(t)&&!Rs.test(t)}(i)&&t.set(o,i)}return t}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}(),Ls="traceparent",As="tracestate",Cs=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");var Ns,Is=function(){function t(){}return t.prototype.inject=function(t,e,n){var r=qt.getSpanContext(t);if(r&&!da(t)&&mt(r)){var o="00-"+r.traceId+"-"+r.spanId+"-0"+Number(r.traceFlags||W.NONE).toString(16);n.set(e,Ls,o),r.traceState&&n.set(e,As,r.traceState.serialize())}},t.prototype.extract=function(t,e,n){var r=n.get(e,Ls);if(!r)return t;var o=Array.isArray(r)?r[0]:r;if("string"!=typeof o)return t;var i=function(t){var e=Cs.exec(t);return e?"00"===e[1]&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}:null}(o);if(!i)return t;i.isRemote=!0;var a=n.get(e,As);if(a){var s=Array.isArray(a)?a.join(","):a;i.traceState=new Ps("string"==typeof s?s:void 0)}return qt.setSpanContext(t,i)},t.prototype.fields=function(){return[Ls,As]},t}();!function(t){t.HTTP="http"}(Ns||(Ns={}));var xs="[object Null]",Ms="[object Undefined]",ks=Function.prototype.toString,Ds=ks.call(Object),Us=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object),js=Object.prototype,Bs=js.hasOwnProperty,Fs=Symbol?Symbol.toStringTag:void 0,Gs=js.toString;function Vs(t){if(!function(t){return null!=t&&"object"==typeof t}(t)||"[object Object]"!==function(t){if(null==t)return void 0===t?Ms:xs;return Fs&&Fs in Object(t)?function(t){var e=Bs.call(t,Fs),n=t[Fs],r=!1;try{t[Fs]=void 0,r=!0}catch(t){}var o=Gs.call(t);r&&(e?t[Fs]=n:delete t[Fs]);return o}(t):function(t){return Gs.call(t)}(t)}(t))return!1;var e=Us(t);if(null===e)return!0;var n=Bs.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ks.call(n)===Ds}function Hs(t){return Zs(t)?t.slice():t}function zs(t,e,n,r){var o;if(void 0===n&&(n=0),!(n>20)){if(n++,Ws(t)||Ws(e)||qs(e))o=Hs(e);else if(Zs(t)){if(o=t.slice(),Zs(e))for(var i=0,a=e.length;i<a;i++)o.push(Hs(e[i]));else if(Ks(e))for(i=0,a=(s=Object.keys(e)).length;i<a;i++){o[u=s[i]]=Hs(e[u])}}else if(Ks(t))if(Ks(e)){if(!function(t,e){if(!Vs(t)||!Vs(e))return!1;return!0}(t,e))return e;o=Object.assign({},t);var s;for(i=0,a=(s=Object.keys(e)).length;i<a;i++){var u,c=e[u=s[i]];if(Ws(c))void 0===c?delete o[u]:o[u]=c;else{var l=o[u],p=c;if(Xs(t,u,r)||Xs(e,u,r))delete o[u];else{if(Ks(l)&&Ks(p)){var f=r.get(l)||[],h=r.get(p)||[];f.push({obj:t,key:u}),h.push({obj:e,key:u}),r.set(l,f),r.set(p,h)}o[u]=zs(o[u],c,n,r)}}}}else o=e;return o}}function Xs(t,e,n){for(var r=n.get(t[e])||[],o=0,i=r.length;o<i;o++){var a=r[o];if(a.key===e&&a.obj===t)return!0}return!1}function Zs(t){return Array.isArray(t)}function qs(t){return"function"==typeof t}function Ks(t){return!Ws(t)&&!Zs(t)&&!qs(t)&&"object"==typeof t}function Ws(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t||void 0===t||t instanceof Date||t instanceof RegExp||null===t}var Ys=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}Ys(e,t)}(Error);var Qs=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function $s(t,e){return"string"==typeof e?t===e:!!t.match(e)}var Js,tu=function(){function t(){var t=this;this._promise=new Promise((function(e,n){t._resolve=e,t._reject=n}))}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(t){this._resolve(t)},t.prototype.reject=function(t){this._reject(t)},t}(),eu=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},nu=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},ru=function(){function t(t,e){this._callback=t,this._that=e,this._isCalled=!1,this._deferred=new tu}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var t,e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,nu([this._that],eu(n),!1))).then((function(t){return e._deferred.resolve(t)}),(function(t){return e._deferred.reject(t)}))}catch(t){this._deferred.reject(t)}}return this._deferred.promise},t}(),ou=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},iu=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},au=function(){function t(t,e,n,r,o,i,a,s,u){void 0===a&&(a=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Rt.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=r,this.parentSpanId=i,this.kind=o,this.links=a;var c=Date.now();this._performanceStartTime=Za.now(),this._performanceOffset=c-(this._performanceStartTime+_s()),this._startTimeProvided=null!=s,this.startTime=this._getTime(null!=s?s:c),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,e),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(t,e){return null==e||this._isSpanEnded()?this:0===t.length?(It.warn("Invalid attribute key: "+t),this):Sa(e)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(e),this):(It.warn("Invalid attribute value set for key: "+t),this)},t.prototype.setAttributes=function(t){var e,n;try{for(var r=ou(Object.entries(t)),o=r.next();!o.done;o=r.next()){var i=iu(o.value,2),a=i[0],s=i[1];this.setAttribute(a,s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return this},t.prototype.addEvent=function(t,e,n){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return It.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(It.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),Ts(e)&&(Ts(n)||(n=e),e=void 0);var r=ga(e);return this.events.push({name:t,attributes:r,time:this._getTime(n),droppedAttributesCount:0}),this},t.prototype.setStatus=function(t){return this._isSpanEnded()||(this.status=t),this},t.prototype.updateName=function(t){return this._isSpanEnded()||(this.name=t),this},t.prototype.end=function(t){this._isSpanEnded()?It.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once."):(this._ended=!0,this.endTime=this._getTime(t),this._duration=function(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=fs),[n,r]}(this.startTime,this.endTime),this._duration[0]<0&&(It.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._spanProcessor.onEnd(this))},t.prototype._getTime=function(t){if("number"==typeof t&&t<Za.now())return ds(t+this._performanceOffset);if("number"==typeof t)return hs(t);if(t instanceof Date)return hs(t.getTime());if(Es(t))return t;if(this._startTimeProvided)return hs(Date.now());var e=Za.now()-this._performanceStartTime;return ms(this.startTime,hs(e))},t.prototype.isRecording=function(){return!1===this._ended},t.prototype.recordException=function(t,e){var n={};"string"==typeof t?n[Ka]=t:t&&(t.code?n[qa]=t.code.toString():t.name&&(n[qa]=t.name),t.message&&(n[Ka]=t.message),t.stack&&(n[Wa]=t.stack)),n[qa]||n[Ka]?this.addEvent("exception",n,e):It.warn("Failed to record an exception "+t)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&It.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(t,e){return t.length<=e?t:t.substr(0,e)},t.prototype._truncateToSize=function(t){var e=this,n=this._attributeValueLengthLimit;return n<=0?(It.warn("Attribute value limit must be positive, got "+n),t):"string"==typeof t?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map((function(t){return"string"==typeof t?e._truncateToLimitUtil(t,n):t})):t},t}();!function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(Js||(Js={}));var su=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Js.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),uu=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Js.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),cu=function(){function t(t){var e,n,r,o;this._root=t.root,this._root||(Pa(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new uu),this._remoteParentSampled=null!==(e=t.remoteParentSampled)&&void 0!==e?e:new uu,this._remoteParentNotSampled=null!==(n=t.remoteParentNotSampled)&&void 0!==n?n:new su,this._localParentSampled=null!==(r=t.localParentSampled)&&void 0!==r?r:new uu,this._localParentNotSampled=null!==(o=t.localParentNotSampled)&&void 0!==o?o:new su}return t.prototype.shouldSample=function(t,e,n,r,o,i){var a=qt.getSpanContext(t);return a&&mt(a)?a.isRemote?a.traceFlags&W.SAMPLED?this._remoteParentSampled.shouldSample(t,e,n,r,o,i):this._remoteParentNotSampled.shouldSample(t,e,n,r,o,i):a.traceFlags&W.SAMPLED?this._localParentSampled.shouldSample(t,e,n,r,o,i):this._localParentNotSampled.shouldSample(t,e,n,r,o,i):this._root.shouldSample(t,e,n,r,o,i)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}(),lu=function(){function t(t){void 0===t&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(4294967295*this._ratio)}return t.prototype.shouldSample=function(t,e){return{decision:Tt(e)&&this._accumulate(e)<this._upperBound?Js.RECORD_AND_SAMPLED:Js.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(t){return"number"!=typeof t||isNaN(t)?0:t>=1?1:t<=0?0:t},t.prototype._accumulate=function(t){for(var e=0,n=0;n<t.length/8;n++){var r=8*n;e=(e^parseInt(t.slice(r,r+8),16))>>>0}return e},t}(),pu=za(),fu=wa.AlwaysOn;function hu(){return{sampler:_u(pu),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:za().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:za().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:za().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:za().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:za().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:za().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:za().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:za().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function _u(t){switch(void 0===t&&(t=za()),t.OTEL_TRACES_SAMPLER){case wa.AlwaysOn:return new uu;case wa.AlwaysOff:return new su;case wa.ParentBasedAlwaysOn:return new cu({root:new uu});case wa.ParentBasedAlwaysOff:return new cu({root:new su});case wa.TraceIdRatio:return new lu(du(t));case wa.ParentBasedTraceIdRatio:return new cu({root:new lu(du(t))});default:return It.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+fu+'".'),new uu}}function du(t){if(void 0===t.OTEL_TRACES_SAMPLER_ARG||""===t.OTEL_TRACES_SAMPLER_ARG)return It.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(It.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to 1."),1):e<0||e>1?(It.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to 1."),1):e}function yu(t){var e,n,r,o,i,a,s,u,c,l,p,f,h=Object.assign({},t.spanLimits),_="undefined"!=typeof process&&process&&process.env?Ha(process.env):Ha(La);return h.attributeCountLimit=null!==(a=null!==(i=null!==(o=null!==(n=null===(e=t.spanLimits)||void 0===e?void 0:e.attributeCountLimit)&&void 0!==n?n:null===(r=t.generalLimits)||void 0===r?void 0:r.attributeCountLimit)&&void 0!==o?o:_.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==i?i:_.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==a?a:Da,h.attributeValueLengthLimit=null!==(f=null!==(p=null!==(l=null!==(u=null===(s=t.spanLimits)||void 0===s?void 0:s.attributeValueLengthLimit)&&void 0!==u?u:null===(c=t.generalLimits)||void 0===c?void 0:c.attributeValueLengthLimit)&&void 0!==l?l:_.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==p?p:_.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==f?f:ka,Object.assign({},t,{spanLimits:h})}var vu=function(){function t(t,e){this._exporter=t,this._finishedSpans=[],this._droppedSpansCount=0;var n=za();this._maxExportBatchSize="number"==typeof(null==e?void 0:e.maxExportBatchSize)?e.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==e?void 0:e.maxQueueSize)?e.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==e?void 0:e.scheduledDelayMillis)?e.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==e?void 0:e.exportTimeoutMillis)?e.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new ru(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(It.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(t,e){},t.prototype.onEnd=function(t){this._shutdownOnce.isCalled||0!=(t.spanContext().traceFlags&W.SAMPLED)&&this._addToBuffer(t)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var t=this;return Promise.resolve().then((function(){return t.onShutdown()})).then((function(){return t._flushAll()})).then((function(){return t._exporter.shutdown()}))},t.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize)return 0===this._droppedSpansCount&&It.debug("maxQueueSize reached, dropping spans"),void this._droppedSpansCount++;this._droppedSpansCount>0&&(It.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},t.prototype._flushAll=function(){var t=this;return new Promise((function(e,n){for(var r=[],o=0,i=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize);o<i;o++)r.push(t._flushOneBatch());Promise.all(r).then((function(){e()})).catch(n)}))},t.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise((function(e,n){var r=setTimeout((function(){n(new Error("Timeout"))}),t._exportTimeoutMillis);Nt.with(function(t){return t.setValue(_a,!0)}(Nt.active()),(function(){var o=t._finishedSpans.splice(0,t._maxExportBatchSize),i=function(){return t._exporter.export(o,(function(t){var o;clearTimeout(r),t.code===ls.SUCCESS?e():n(null!==(o=t.error)&&void 0!==o?o:new Error("BatchSpanProcessor: span export failed"))}))},a=o.map((function(t){return t.resource})).filter((function(t){return t.asyncAttributesPending}));0===a.length?i():Promise.all(a.map((function(t){var e;return null===(e=t.waitForAsyncAttributes)||void 0===e?void 0:e.call(t)}))).then(i,(function(t){Pa(t),n(t)}))}))}))},t.prototype._maybeStartTimer=function(){var t=this;void 0===this._timer&&(this._timer=setTimeout((function(){t._flushOneBatch().then((function(){t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())})).catch((function(t){Pa(t)}))}),this._scheduledDelayMillis),this._timer)},t.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},t}(),Eu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tu=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.onInit(n),r}return Eu(e,t),e.prototype.onInit=function(t){var e=this;!0!==(null==t?void 0:t.disableAutoFlushOnDocumentHide)&&"undefined"!=typeof document&&(this._visibilityChangeListener=function(){"hidden"===document.visibilityState&&e.forceFlush()},this._pageHideListener=function(){e.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},e.prototype.onShutdown=function(){"undefined"!=typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e}(vu),mu=function(){this.generateTraceId=Ou(16),this.generateSpanId=Ou(8)},gu=Array(32);function Ou(t){return function(){for(var e=0;e<2*t;e++)gu[e]=Math.floor(16*Math.random())+48,gu[e]>=58&&(gu[e]+=39);return String.fromCharCode.apply(null,gu.slice(0,2*t))}}var Su=function(){function t(t,e,n){this._tracerProvider=n;var r,o,i,a,s=(r=e,o={sampler:_u()},i=hu(),(a=Object.assign({},i,o,r)).generalLimits=Object.assign({},i.generalLimits,r.generalLimits||{}),a.spanLimits=Object.assign({},i.spanLimits,r.spanLimits||{}),a);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=e.idGenerator||new mu,this.resource=n.resource,this.instrumentationLibrary=t}return t.prototype.startSpan=function(t,e,n){var r,o,i;void 0===e&&(e={}),void 0===n&&(n=Nt.active()),e.root&&(n=qt.deleteSpan(n));var a=qt.getSpan(n);if(da(n))return It.debug("Instrumentation suppressed, returning Noop Span"),qt.wrapSpanContext(ut);var s,u,c,l=null==a?void 0:a.spanContext(),p=this._idGenerator.generateSpanId();l&&qt.isSpanContextValid(l)?(s=l.traceId,u=l.traceState,c=l.spanId):s=this._idGenerator.generateTraceId();var f=null!==(r=e.kind)&&void 0!==r?r:wt.INTERNAL,h=(null!==(o=e.links)&&void 0!==o?o:[]).map((function(t){return{context:t.context,attributes:ga(t.attributes)}})),_=ga(e.attributes),d=this._sampler.shouldSample(n,s,t,f,_,h);u=null!==(i=d.traceState)&&void 0!==i?i:u;var y={traceId:s,spanId:p,traceFlags:d.decision===bt.RECORD_AND_SAMPLED?W.SAMPLED:W.NONE,traceState:u};if(d.decision===bt.NOT_RECORD)return It.debug("Recording is off, propagating context in a non-recording span"),qt.wrapSpanContext(y);var v=new au(this,n,t,y,f,c,h,e.startTime),E=ga(Object.assign(_,d.attributes));return v.setAttributes(E),v},t.prototype.startActiveSpan=function(t,e,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=e:3===arguments.length?(o=e,a=n):(o=e,i=n,a=r);var s=null!=i?i:Nt.active(),u=this.startSpan(t,o,s),c=qt.setSpan(s,u);return Nt.with(c,a,void 0,u)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}();var bu,wu=function(){return wu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},wu.apply(this,arguments)},Ru=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},Pu=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Lu=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Au=function(){function t(t,e){var n,r=this;this._attributes=t,this.asyncAttributesPending=null!=e,this._syncAttributes=null!==(n=this._attributes)&&void 0!==n?n:{},this._asyncAttributesPromise=null==e?void 0:e.then((function(t){return r._attributes=Object.assign({},r._attributes,t),r.asyncAttributesPending=!1,t}),(function(t){return It.debug("a resource's async attributes promise rejected: %s",t),r.asyncAttributesPending=!1,{}}))}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t(((e={})[is]="unknown_service",e[ss]=cs[ss],e[as]=cs[as],e[us]=cs[us],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&It.error("Accessing resource attributes before async attributes settled"),null!==(t=this._attributes)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return Ru(this,void 0,void 0,(function(){return Pu(this,(function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t.prototype.merge=function(e){var n,r=this;if(!e)return this;var o=wu(wu({},this._syncAttributes),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(o);var i=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then((function(t){var n,o=Lu(t,2),i=o[0],a=o[1];return wu(wu(wu(wu({},r._syncAttributes),i),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes),a)}));return new t(o,i)},t.EMPTY=new t({}),t}(),Cu=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Nu=function(){function t(t){this._spanProcessors=t}return t.prototype.forceFlush=function(){var t,e,n=[];try{for(var r=Cu(this._spanProcessors),o=r.next();!o.done;o=r.next()){var i=o.value;n.push(i.forceFlush())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return new Promise((function(t){Promise.all(n).then((function(){t()})).catch((function(e){Pa(e||new Error("MultiSpanProcessor: forceFlush failed")),t()}))}))},t.prototype.onStart=function(t,e){var n,r;try{for(var o=Cu(this._spanProcessors),i=o.next();!i.done;i=o.next()){i.value.onStart(t,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype.onEnd=function(t){var e,n;try{for(var r=Cu(this._spanProcessors),o=r.next();!o.done;o=r.next()){o.value.onEnd(t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.shutdown=function(){var t,e,n=[];try{for(var r=Cu(this._spanProcessors),o=r.next();!o.done;o=r.next()){var i=o.value;n.push(i.shutdown())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return new Promise((function(t,e){Promise.all(n).then((function(){t()}),e)}))},t}(),Iu=function(){function t(){}return t.prototype.onStart=function(t,e){},t.prototype.onEnd=function(t){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}();!function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"}(bu||(bu={}));var xu,Mu,ku,Du=function(){function t(t){var e;void 0===t&&(t={}),this._registeredSpanProcessors=[],this._tracers=new Map;var n=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=zs(n,t.shift(),0,r);return n}({},hu(),yu(t));this.resource=null!==(e=n.resource)&&void 0!==e?e:Au.empty(),this.resource=Au.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var r=this._buildExporterFromEnv();if(void 0!==r){var o=new Tu(r);this.activeSpanProcessor=o}else this.activeSpanProcessor=new Iu}return t.prototype.getTracer=function(t,e,n){var r=t+"@"+(e||"")+":"+((null==n?void 0:n.schemaUrl)||"");return this._tracers.has(r)||this._tracers.set(r,new Su({name:t,version:e,schemaUrl:null==n?void 0:n.schemaUrl},this._config,this)),this._tracers.get(r)},t.prototype.addSpanProcessor=function(t){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((function(t){return It.error("Error while trying to shutdown current span processor",t)})),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new Nu(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(t){void 0===t&&(t={}),qt.setGlobalTracerProvider(this),void 0===t.propagator&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&Nt.setGlobalContextManager(t.contextManager),t.propagator&&Xt.setGlobalPropagator(t.propagator)},t.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,e=this._registeredSpanProcessors.map((function(e){return new Promise((function(n){var r,o=setTimeout((function(){n(new Error("Span processor did not completed within timeout period of "+t+" ms")),r=bu.timeout}),t);e.forceFlush().then((function(){clearTimeout(o),r!==bu.timeout&&(r=bu.resolved,n(r))})).catch((function(t){clearTimeout(o),r=bu.error,n(t)}))}))}));return new Promise((function(t,n){Promise.all(e).then((function(e){var r=e.filter((function(t){return t!==bu.resolved}));r.length>0?n(r):t()})).catch((function(t){return n([t])}))}))},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(t){var e;return null===(e=this.constructor._registeredPropagators.get(t))||void 0===e?void 0:e()},t.prototype._getSpanExporter=function(t){var e;return null===(e=this.constructor._registeredExporters.get(t))||void 0===e?void 0:e()},t.prototype._buildPropagatorFromEnv=function(){var t=this,e=Array.from(new Set(za().OTEL_PROPAGATORS)),n=e.map((function(e){var n=t._getPropagator(e);return n||It.warn('Propagator "'+e+'" requested through environment variable is unavailable.'),n})).reduce((function(t,e){return e&&t.push(e),t}),[]);return 0===n.length?void 0:1===e.length?n[0]:new Os({propagators:n})},t.prototype._buildExporterFromEnv=function(){var t=za().OTEL_TRACES_EXPORTER;if("none"!==t&&""!==t){var e=this._getSpanExporter(t);return e||It.error('Exporter "'+t+'" requested through environment variable is unavailable.'),e}},t._registeredPropagators=new Map([["tracecontext",function(){return new Is}],["baggage",function(){return new Ea}]]),t._registeredExporters=new Map,t}(),Uu=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},ju=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Bu=function(){function t(){this._enabled=!1,this._currentContext=N}return t.prototype._bindFunction=function(t,e){void 0===t&&(t=N);var n=this,r=function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return n.with(t,(function(){return e.apply(r,o)}))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:e.length}),r},t.prototype.active=function(){return this._currentContext},t.prototype.bind=function(t,e){return void 0===t&&(t=this.active()),"function"==typeof e?this._bindFunction(t,e):e},t.prototype.disable=function(){return this._currentContext=N,this._enabled=!1,this},t.prototype.enable=function(){return this._enabled||(this._enabled=!0,this._currentContext=N),this},t.prototype.with=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=this._currentContext;this._currentContext=t||N;try{return e.call.apply(e,ju([n],Uu(r),!1))}finally{this._currentContext=i}},t}(),Fu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Gu(t,e){return e in t}function Vu(t,e,n){if(Gu(n,e)&&"number"==typeof n[e])return t.addEvent(e,n[e]),t}function Hu(t,e){Vu(t,xu.FETCH_START,e),Vu(t,xu.DOMAIN_LOOKUP_START,e),Vu(t,xu.DOMAIN_LOOKUP_END,e),Vu(t,xu.CONNECT_START,e),Gu(e,"name")&&e.name.startsWith("https:")&&Vu(t,xu.SECURE_CONNECTION_START,e),Vu(t,xu.CONNECT_END,e),Vu(t,xu.REQUEST_START,e),Vu(t,xu.RESPONSE_START,e),Vu(t,xu.RESPONSE_END,e);var n=e[xu.ENCODED_BODY_SIZE];void 0!==n&&t.setAttribute(ns,n);var r=e[xu.DECODED_BODY_SIZE];void 0!==r&&n!==r&&t.setAttribute(rs,r)}function zu(t,e,n,r,o,i){void 0===o&&(o=new WeakSet);var a=Xu(t),s=function(t,e,n,r,o,i){var a=vs(e),s=vs(n),u=r.filter((function(e){var n=vs(ys(e[xu.FETCH_START])),r=vs(ys(e[xu.RESPONSE_END]));return e.initiatorType.toLowerCase()===(i||"xmlhttprequest")&&e.name===t&&n>=a&&r<=s}));u.length>0&&(u=u.filter((function(t){return!o.has(t)})));return u}(t=a.toString(),e,n,r,o,i);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var u=function(t){return t.slice().sort((function(t,e){var n=t[xu.FETCH_START],r=e[xu.FETCH_START];return n>r?1:n<r?-1:0}))}(s);if(a.origin!==location.origin&&u.length>1){var c=u[0],l=function(t,e,n){for(var r,o=vs(n),i=vs(ys(e)),a=t[1],s=t.length,u=1;u<s;u++){var c=t[u],l=vs(ys(c[xu.FETCH_START])),p=o-vs(ys(c[xu.RESPONSE_END]));l>=i&&(!r||p<r)&&(r=p,a=c)}return a}(u,c[xu.RESPONSE_END],n),p=c[xu.RESPONSE_END];return l[xu.FETCH_START]<p&&(l=c,c=void 0),{corsPreFlightRequest:c,mainRequest:l}}return{mainRequest:s[0]}}function Xu(t){if("function"==typeof URL)return new URL(t,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var e=(Mu||(Mu=document.createElement("a")),Mu);return e.href=t,e}!function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;if(e.contextManager)throw"contextManager should be defined in register method not in constructor";if(e.propagator)throw"propagator should be defined in register method not in constructor";return n}Fu(e,t),e.prototype.register=function(e){void 0===e&&(e={}),void 0===e.contextManager&&(e.contextManager=new Bu),e.contextManager&&e.contextManager.enable(),t.prototype.register.call(this,e)}}(Du),function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"}(xu||(xu={})),function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"}(ku||(ku={}));var Zu,qu="0.41.2",Ku=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wu=function(t){function e(e){var n=t.call(this,"@opentelemetry/instrumentation-fetch",qu,e)||this;return n.component="fetch",n.version=qu,n.moduleName=n.component,n._usedResources=new WeakSet,n._tasksCount=0,n}return Ku(e,t),e.prototype.init=function(){},e.prototype._getConfig=function(){return this._config},e.prototype._addChildSpan=function(t,e){var n=this.tracer.startSpan("CORS Preflight",{startTime:e[xu.FETCH_START]},qt.setSpan(Nt.active(),t));this._getConfig().ignoreNetworkEvents||Hu(n,e),n.end(e[xu.RESPONSE_END])},e.prototype._addFinalSpanAttributes=function(t,e){var n=Xu(e.url);t.setAttribute(ts,e.status),null!=e.statusText&&t.setAttribute(ku.HTTP_STATUS_TEXT,e.statusText),t.setAttribute($a,n.host),t.setAttribute(Ja,n.protocol.replace(":","")),t.setAttribute(es,navigator.userAgent)},e.prototype._addHeaders=function(t,e){if(!function(t,e){var n=e||[];return("string"==typeof n||n instanceof RegExp)&&(n=[n]),Xu(t).origin===location.origin||n.some((function(e){return $s(t,e)}))}(e,this._getConfig().propagateTraceHeaderCorsUrls)){var n={};return Xt.inject(Nt.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}if(t instanceof Request)Xt.inject(Nt.active(),t.headers,{set:function(t,e,n){return t.set(e,"string"==typeof n?n:String(n))}});else if(t.headers instanceof Headers)Xt.inject(Nt.active(),t.headers,{set:function(t,e,n){return t.set(e,"string"==typeof n?n:String(n))}});else{n={};Xt.inject(Nt.active(),n),t.headers=Object.assign({},n,t.headers||{})}},e.prototype._clearResources=function(){0===this._tasksCount&&this._getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},e.prototype._createSpan=function(t,e){var n;if(void 0===e&&(e={}),!function(t,e){var n,r;if(!e)return!1;try{for(var o=Qs(e),i=o.next();!i.done;i=o.next())if($s(t,i.value))return!0}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}(t,this._getConfig().ignoreUrls)){var r=(e.method||"GET").toUpperCase(),o="HTTP "+r;return this.tracer.startSpan(o,{kind:wt.CLIENT,attributes:(n={},n[ku.COMPONENT]=this.moduleName,n[Ya]=r,n[Qa]=t,n)})}this._diag.debug("ignoring span as url matches ignored url")},e.prototype._findResourceAndAddNetworkEvents=function(t,e,n){var r=e.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType("resource")}var o=zu(e.spanUrl,e.startTime,n,r,this._usedResources,"fetch");if(o.mainRequest){var i=o.mainRequest;this._markResourceAsUsed(i);var a=o.corsPreFlightRequest;a&&(this._addChildSpan(t,a),this._markResourceAsUsed(a)),this._getConfig().ignoreNetworkEvents||Hu(t,i)}},e.prototype._markResourceAsUsed=function(t){this._usedResources.add(t)},e.prototype._endSpan=function(t,e,n){var r=this,o=hs(Date.now()),i=ds();this._addFinalSpanAttributes(t,n),setTimeout((function(){var n;null===(n=e.observer)||void 0===n||n.disconnect(),r._findResourceAndAddNetworkEvents(t,e,i),r._tasksCount--,r._clearResources(),t.end(o)}),300)},e.prototype._patchConstructor=function(){var t=this;return function(e){var n=t;return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=this,i=Xu(t[0]instanceof Request?t[0].url:String(t[0])).href,a=t[0]instanceof Request?t[0]:t[1]||{},s=n._createSpan(i,a);if(!s)return e.apply(this,t);var u=n._prepareSpanData(i);function c(t,e){n._applyAttributesAfterFetch(t,a,e),n._endSpan(t,u,{status:e.status||0,statusText:e.message,url:i})}function l(t,e){n._applyAttributesAfterFetch(t,a,e),e.status>=200&&e.status<400?n._endSpan(t,u,e):n._endSpan(t,u,{status:e.status,statusText:e.statusText,url:i})}function p(t,e,n){try{var r=n.clone(),o=n.clone(),i=r.body;if(i){var a=i.getReader(),s=function(){a.read().then((function(e){e.done?l(t,o):s()}),(function(e){c(t,e)}))};s()}else l(t,n)}finally{e(n)}}function f(t,e,n){try{c(t,n)}finally{e(n)}}return new Promise((function(t,r){return Nt.with(qt.setSpan(Nt.active(),s),(function(){return n._addHeaders(a,i),n._tasksCount++,e.apply(o,a instanceof Request?[a]:[i,a]).then(p.bind(o,s,t),f.bind(o,s,r))}))}))}}},e.prototype._applyAttributesAfterFetch=function(t,e,n){var r=this,o=this._getConfig().applyCustomAttributesOnSpan;o&&function(t,e,n){var r,o;try{o=t()}catch(t){r=t}finally{if(e(r,o),r&&!n)throw r;return o}}((function(){return o(t,e,n)}),(function(t){t&&r._diag.error("applyCustomAttributesOnSpan",t)}),!0)},e.prototype._prepareSpanData=function(t){var e=ds(),n=[];if("function"!=typeof PerformanceObserver)return{entries:n,startTime:e,spanUrl:t};var r=new PerformanceObserver((function(e){e.getEntries().forEach((function(e){"fetch"===e.initiatorType&&e.name===t&&n.push(e)}))}));return r.observe({entryTypes:["resource"]}),{entries:n,observer:r,startTime:e,spanUrl:t}},e.prototype.enable=function(){(function(t){return"function"==typeof t&&"function"==typeof t.__original&&"function"==typeof t.__unwrap&&!0===t.__wrapped})(fetch)&&(this._unwrap(La,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(La,"fetch",this._patchConstructor())},e.prototype.disable=function(){this._unwrap(La,"fetch"),this._usedResources=new WeakSet},e}(ha);!function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"}(Zu||(Zu={}));var Yu,Qu="0.44.0";!function(t){t.HTTP_STATUS_TEXT="http.status_text"}(Yu||(Yu={}));var $u=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ju=function(t){function e(e){var n=t.call(this,"@opentelemetry/instrumentation-xml-http-request",Qu,e)||this;return n.component="xml-http-request",n.version=Qu,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return $u(e,t),e.prototype.init=function(){},e.prototype._getConfig=function(){return this._config},e.prototype._addHeaders=function(t,e){if(!function(t,e){var n=e||[];return("string"==typeof n||n instanceof RegExp)&&(n=[n]),Vi(t).origin===location.origin||n.some((function(e){return Dn(t,e)}))}(Vi(e).href,this._getConfig().propagateTraceHeaderCorsUrls)){var n={};return Xt.inject(Nt.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}var r={};Xt.inject(Nt.active(),r),Object.keys(r).forEach((function(e){t.setRequestHeader(e,String(r[e]))}))},e.prototype._addChildSpan=function(t,e){var n=this;Nt.with(qt.setSpan(Nt.active(),t),(function(){var t=n.tracer.startSpan("CORS Preflight",{startTime:e[Ci.FETCH_START]});Fi(t,e),t.end(e[Ci.RESPONSE_END])}))},e.prototype._addFinalSpanAttributes=function(t,e,n){if("string"==typeof n){var r=Vi(n);void 0!==e.status&&t.setAttribute(Me,e.status),void 0!==e.statusText&&t.setAttribute(Yu.HTTP_STATUS_TEXT,e.statusText),t.setAttribute(Ie,r.host),t.setAttribute(xe,r.protocol.replace(":","")),t.setAttribute(ke,navigator.userAgent)}},e.prototype._applyAttributesAfterXHR=function(t,e){var n=this,r=this._getConfig().applyCustomAttributesOnSpan;"function"==typeof r&&oa((function(){return r(t,e)}),(function(t){t&&n._diag.error("applyCustomAttributesOnSpan",t)}),!0)},e.prototype._addResourceObserver=function(t,e){var n=this._xhrMem.get(t);n&&"function"==typeof PerformanceObserver&&"function"==typeof PerformanceResourceTiming&&(n.createdResources={observer:new PerformanceObserver((function(t){var r=t.getEntries(),o=Vi(e);r.forEach((function(t){"xmlhttprequest"===t.initiatorType&&t.name===o.href&&n.createdResources&&n.createdResources.entries.push(t)}))})),entries:[]},n.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype._clearResources=function(){0===this._tasksCount&&this._getConfig().clearTimingResources&&(Re.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},e.prototype._findResourceAndAddNetworkEvents=function(t,e,n,r,o){if(n&&r&&o&&t.createdResources){var i=t.createdResources.entries;i&&i.length||(i=Re.getEntriesByType("resource"));var a=Gi(Vi(n).href,r,o,i,this._usedResources);if(a.mainRequest){var s=a.mainRequest;this._markResourceAsUsed(s);var u=a.corsPreFlightRequest;u&&(this._addChildSpan(e,u),this._markResourceAsUsed(u)),Fi(e,s)}}},e.prototype._cleanPreviousSpanInformation=function(t){var e=this._xhrMem.get(t);if(e){var n=e.callbackToRemoveEvents;n&&n(),this._xhrMem.delete(t)}},e.prototype._createSpan=function(t,e,n){var r;if(!function(t,e){var n,r;if(!e)return!1;try{for(var o=kn(e),i=o.next();!i.done;i=o.next())if(Dn(t,i.value))return!0}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}(e,this._getConfig().ignoreUrls)){var o=n.toUpperCase(),i=this.tracer.startSpan(o,{kind:wt.CLIENT,attributes:(r={},r[Ce]=n,r[Ne]=Vi(e).toString(),r)});return i.addEvent(Zu.METHOD_OPEN),this._cleanPreviousSpanInformation(t),this._xhrMem.set(t,{span:i,spanUrl:e}),i}this._diag.debug("ignoring span as url matches ignored url")},e.prototype._markResourceAsUsed=function(t){this._usedResources.add(t)},e.prototype._patchOpen=function(){var t=this;return function(e){var n=t;return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=t[0],i=t[1];return n._createSpan(this,i,o),e.apply(this,t)}}},e.prototype._patchSend=function(){var t=this;function e(e,n){var r=t._xhrMem.get(n);if(r){r.status=n.status,r.statusText=n.statusText,t._xhrMem.delete(n),r.span&&t._applyAttributesAfterXHR(r.span,n);var o=Ye(),i=Date.now();setTimeout((function(){!function(e,n,r,o){var i=n.callbackToRemoveEvents;"function"==typeof i&&i();var a=n.span,s=n.spanUrl,u=n.sendStartTime;a&&(t._findResourceAndAddNetworkEvents(n,a,s,u,r),a.addEvent(e,o),t._addFinalSpanAttributes(a,n,s),a.end(o),t._tasksCount--),t._clearResources()}(e,r,o,i)}),300)}}function n(){e(Zu.EVENT_ERROR,this)}function r(){e(Zu.EVENT_ABORT,this)}function o(){e(Zu.EVENT_TIMEOUT,this)}function i(){this.status<299?e(Zu.EVENT_LOAD,this):e(Zu.EVENT_ERROR,this)}function a(e){e.removeEventListener("abort",r),e.removeEventListener("error",n),e.removeEventListener("load",i),e.removeEventListener("timeout",o);var a=t._xhrMem.get(e);a&&(a.callbackToRemoveEvents=void 0)}return function(e){return function(){for(var s=this,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];var l=t._xhrMem.get(this);if(!l)return e.apply(this,u);var p=l.span,f=l.spanUrl;return p&&f&&Nt.with(qt.setSpan(Nt.active(),p),(function(){t._tasksCount++,l.sendStartTime=Ye(),p.addEvent(Zu.METHOD_SEND),s.addEventListener("abort",r),s.addEventListener("error",n),s.addEventListener("load",i),s.addEventListener("timeout",o),l.callbackToRemoveEvents=function(){a(s),l.createdResources&&l.createdResources.observer.disconnect()},t._addHeaders(s,f),t._addResourceObserver(s,f)})),e.apply(this,u)}}},e.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),ia(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),ia(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},e.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},e}(ra);const tc={ignoreUrls:[],propagateTraceHeaderCorsUrls:[]};function ec(t=tc){return[new ca,new Wu(t),new Ju(t)]}var nc="OT_ZONE_CONTEXT",rc=function(){function t(){this._enabled=!1,this._zoneCounter=0}return t.prototype._activeContextFromZone=function(t){return t&&t.get(nc)||N},t.prototype._bindFunction=function(t,e){var n=this,r=function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return n.with(t,(function(){return e.apply(r,o)}))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:e.length}),r},t.prototype._bindListener=function(t,e){var n=e;return void 0!==n.__ot_listeners||(n.__ot_listeners={},"function"==typeof n.addEventListener&&(n.addEventListener=this._patchAddEventListener(n,n.addEventListener,t)),"function"==typeof n.removeEventListener&&(n.removeEventListener=this._patchRemoveEventListener(n,n.removeEventListener))),e},t.prototype._createZoneName=function(){this._zoneCounter++;var t=Math.random();return this._zoneCounter+"-"+t},t.prototype._createZone=function(t,e){var n;return Zone.current.fork({name:t,properties:(n={},n[nc]=e,n)})},t.prototype._getActiveZone=function(){return Zone.current},t.prototype._patchAddEventListener=function(t,e,n){var r=this;return function(o,i,a){void 0===t.__ot_listeners&&(t.__ot_listeners={});var s=t.__ot_listeners[o];void 0===s&&(s=new WeakMap,t.__ot_listeners[o]=s);var u=r.bind(n,i);return s.set(i,u),e.call(this,o,u,a)}},t.prototype._patchRemoveEventListener=function(t,e){return function(n,r){if(void 0===t.__ot_listeners||void 0===t.__ot_listeners[n])return e.call(this,n,r);var o=t.__ot_listeners[n],i=o.get(r);return o.delete(r),e.call(this,n,i||r)}},t.prototype.active=function(){if(!this._enabled)return N;var t=this._getActiveZone(),e=this._activeContextFromZone(t);return e||N},t.prototype.bind=function(t,e){return void 0===t&&(t=this.active()),"function"==typeof e?this._bindFunction(t,e):(void 0===(n=e)&&(n={}),"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener&&this._bindListener(t,e),e);var n},t.prototype.disable=function(){return this._enabled=!1,this},t.prototype.enable=function(){return this._enabled=!0,this},t.prototype.with=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=this._createZoneName(),a=this._createZone(i,t);return a.run(e,n,r)},t}();
|
|
1
|
+
var GrafanaFaroWebTracing=function(t,e){"use strict";var n="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},r="1.6.0",o=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;var i=function(t){var e=new Set([t]),n=new Set,r=t.match(o);if(!r)return function(){return!1};var i=+r[1],a=+r[2],s=+r[3];if(null!=r[4])return function(e){return e===t};function u(t){return n.add(t),!1}function c(t){return e.add(t),!0}return function(t){if(e.has(t))return!0;if(n.has(t))return!1;var r=t.match(o);if(!r)return u(t);var l=+r[1],p=+r[2],f=+r[3];return null!=r[4]||i!==l?u(t):0===i?a===p&&s<=f?c(t):u(t):a<=p?c(t):u(t)}}(r),a=r.split(".")[0],s=Symbol.for("opentelemetry.js.api."+a),u=n;function c(t,e,n,o){var i;void 0===o&&(o=!1);var a=u[s]=null!==(i=u[s])&&void 0!==i?i:{version:r};if(!o&&a[t]){var c=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return n.error(c.stack||c.message),!1}if(a.version!==r){c=new Error("@opentelemetry/api: Registration of version v"+a.version+" for "+t+" does not match previously registered API v"+r);return n.error(c.stack||c.message),!1}return a[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+r+"."),!0}function l(t){var e,n,r=null===(e=u[s])||void 0===e?void 0:e.version;if(r&&i(r))return null===(n=u[s])||void 0===n?void 0:n[t]}function p(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+r+".");var n=u[s];n&&delete n[t]}var f,h=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},_=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},d=function(){function t(t){this._namespace=t.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return E("debug",this._namespace,t)},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return E("error",this._namespace,t)},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return E("info",this._namespace,t)},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return E("warn",this._namespace,t)},t.prototype.verbose=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return E("verbose",this._namespace,t)},t}();function E(t,e,n){var r=l("diag");if(r)return n.unshift(e),r[t].apply(r,_([],h(n),!1))}!function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"}(f||(f={}));var v=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},T=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},y=function(){function t(){function t(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=l("diag");if(r)return r[t].apply(r,T([],v(e),!1))}}var e=this;e.setLogger=function(t,n){var r,o,i;if(void 0===n&&(n={logLevel:f.INFO}),t===e){var a=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return e.error(null!==(r=a.stack)&&void 0!==r?r:a.message),!1}"number"==typeof n&&(n={logLevel:n});var s=l("diag"),u=function(t,e){function n(n,r){var o=e[n];return"function"==typeof o&&t>=r?o.bind(e):function(){}}return t<f.NONE?t=f.NONE:t>f.ALL&&(t=f.ALL),e=e||{},{error:n("error",f.ERROR),warn:n("warn",f.WARN),info:n("info",f.INFO),debug:n("debug",f.DEBUG),verbose:n("verbose",f.VERBOSE)}}(null!==(o=n.logLevel)&&void 0!==o?o:f.INFO,t);if(s&&!n.suppressOverrideMessage){var p=null!==(i=(new Error).stack)&&void 0!==i?i:"<failed to generate stacktrace>";s.warn("Current logger will be overwritten from "+p),u.warn("Current logger will overwrite one already registered from "+p)}return c("diag",u,e,!0)},e.disable=function(){p("diag",e)},e.createComponentLogger=function(t){return new d(t)},e.verbose=t("verbose"),e.debug=t("debug"),e.info=t("info"),e.warn=t("warn"),e.error=t("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t}(),g=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},m=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},O=function(){function t(t){this._entries=t?new Map(t):new Map}return t.prototype.getEntry=function(t){var e=this._entries.get(t);if(e)return Object.assign({},e)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map((function(t){var e=g(t,2);return[e[0],e[1]]}))},t.prototype.setEntry=function(e,n){var r=new t(this._entries);return r._entries.set(e,n),r},t.prototype.removeEntry=function(e){var n=new t(this._entries);return n._entries.delete(e),n},t.prototype.removeEntries=function(){for(var e,n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=new t(this._entries);try{for(var a=m(r),s=a.next();!s.done;s=a.next()){var u=s.value;i._entries.delete(u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return i},t.prototype.clear=function(){return new t},t}(),S=Symbol("BaggageEntryMetadata"),b=y.instance();function R(t){return void 0===t&&(t={}),new O(new Map(Object.entries(t)))}function w(t){return Symbol.for(t)}var L,A,P=function t(e){var n=this;n._currentContext=e?new Map(e):new Map,n.getValue=function(t){return n._currentContext.get(t)},n.setValue=function(e,r){var o=new t(n._currentContext);return o._currentContext.set(e,r),o},n.deleteValue=function(e){var r=new t(n._currentContext);return r._currentContext.delete(e),r}},C=new P,N=(L=function(t,e){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},L(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}L(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),k=function(){function t(){}return t.prototype.createHistogram=function(t,e){return z},t.prototype.createCounter=function(t,e){return H},t.prototype.createUpDownCounter=function(t,e){return V},t.prototype.createObservableGauge=function(t,e){return X},t.prototype.createObservableCounter=function(t,e){return G},t.prototype.createObservableUpDownCounter=function(t,e){return q},t.prototype.addBatchObservableCallback=function(t,e){},t.prototype.removeBatchObservableCallback=function(t){},t}(),I=function(){},D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return N(e,t),e.prototype.add=function(t,e){},e}(I),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return N(e,t),e.prototype.add=function(t,e){},e}(I),x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return N(e,t),e.prototype.record=function(t,e){},e}(I),U=function(){function t(){}return t.prototype.addCallback=function(t){},t.prototype.removeCallback=function(t){},t}(),j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return N(e,t),e}(U),Z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return N(e,t),e}(U),B=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return N(e,t),e}(U),F=new k,H=new D,z=new x,V=new M,G=new j,X=new Z,q=new B,W={get:function(t,e){if(null!=t)return t[e]},keys:function(t){return null==t?[]:Object.keys(t)}},K={set:function(t,e,n){null!=t&&(t[e]=n)}},Y=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Q=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},$=function(){function t(){}return t.prototype.active=function(){return C},t.prototype.with=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];return e.call.apply(e,Q([n],Y(r),!1))},t.prototype.bind=function(t,e){return e},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t}(),J=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},tt=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},et="context",nt=new $,rt=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(t){return c(et,t,y.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(t,e,n){for(var r,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];return(r=this._getContextManager()).with.apply(r,tt([t,e,n],J(o),!1))},t.prototype.bind=function(t,e){return this._getContextManager().bind(t,e)},t.prototype._getContextManager=function(){return l(et)||nt},t.prototype.disable=function(){this._getContextManager().disable(),p(et,y.instance())},t}();!function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"}(A||(A={}));var ot="0000000000000000",it="00000000000000000000000000000000",at={traceId:it,spanId:ot,traceFlags:A.NONE},st=function(){function t(t){void 0===t&&(t=at),this._spanContext=t}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(t,e){return this},t.prototype.setAttributes=function(t){return this},t.prototype.addEvent=function(t,e){return this},t.prototype.setStatus=function(t){return this},t.prototype.updateName=function(t){return this},t.prototype.end=function(t){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(t,e){},t}(),ut=w("OpenTelemetry Context Key SPAN");function ct(t){return t.getValue(ut)||void 0}function lt(){return ct(rt.getInstance().active())}function pt(t,e){return t.setValue(ut,e)}function ft(t){return t.deleteValue(ut)}function ht(t,e){return pt(t,new st(e))}function _t(t){var e;return null===(e=ct(t))||void 0===e?void 0:e.spanContext()}var dt=/^([0-9a-f]{32})$/i,Et=/^[0-9a-f]{16}$/i;function vt(t){return dt.test(t)&&t!==it}function Tt(t){return vt(t.traceId)&&(e=t.spanId,Et.test(e)&&e!==ot);var e}function yt(t){return new st(t)}var gt=rt.getInstance(),mt=function(){function t(){}return t.prototype.startSpan=function(t,e,n){if(void 0===n&&(n=gt.active()),Boolean(null==e?void 0:e.root))return new st;var r,o=n&&_t(n);return"object"==typeof(r=o)&&"string"==typeof r.spanId&&"string"==typeof r.traceId&&"number"==typeof r.traceFlags&&Tt(o)?new st(o):new st},t.prototype.startActiveSpan=function(t,e,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=e:3===arguments.length?(o=e,a=n):(o=e,i=n,a=r);var s=null!=i?i:gt.active(),u=this.startSpan(t,o,s),c=pt(s,u);return gt.with(c,a,void 0,u)}},t}();var Ot,St,bt,Rt=new mt,wt=function(){function t(t,e,n,r){this._provider=t,this.name=e,this.version=n,this.options=r}return t.prototype.startSpan=function(t,e,n){return this._getTracer().startSpan(t,e,n)},t.prototype.startActiveSpan=function(t,e,n,r){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Rt},t}(),Lt=new(function(){function t(){}return t.prototype.getTracer=function(t,e,n){return new mt},t}()),At=function(){function t(){}return t.prototype.getTracer=function(t,e,n){var r;return null!==(r=this.getDelegateTracer(t,e,n))&&void 0!==r?r:new wt(this,t,e,n)},t.prototype.getDelegate=function(){var t;return null!==(t=this._delegate)&&void 0!==t?t:Lt},t.prototype.setDelegate=function(t){this._delegate=t},t.prototype.getDelegateTracer=function(t,e,n){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getTracer(t,e,n)},t}();!function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(Ot||(Ot={})),function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"}(St||(St={})),function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"}(bt||(bt={}));var Pt=rt.getInstance(),Ct=y.instance(),Nt=new(function(){function t(){}return t.prototype.getMeter=function(t,e,n){return F},t}()),kt="metrics",It=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(t){return c(kt,t,y.instance())},t.prototype.getMeterProvider=function(){return l(kt)||Nt},t.prototype.getMeter=function(t,e,n){return this.getMeterProvider().getMeter(t,e,n)},t.prototype.disable=function(){p(kt,y.instance())},t}().getInstance(),Dt=function(){function t(){}return t.prototype.inject=function(t,e){},t.prototype.extract=function(t,e){return t},t.prototype.fields=function(){return[]},t}(),Mt=w("OpenTelemetry Baggage Key");function xt(t){return t.getValue(Mt)||void 0}function Ut(){return xt(rt.getInstance().active())}function jt(t,e){return t.setValue(Mt,e)}function Zt(t){return t.deleteValue(Mt)}var Bt="propagation",Ft=new Dt,Ht=function(){function t(){this.createBaggage=R,this.getBaggage=xt,this.getActiveBaggage=Ut,this.setBaggage=jt,this.deleteBaggage=Zt}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(t){return c(Bt,t,y.instance())},t.prototype.inject=function(t,e,n){return void 0===n&&(n=K),this._getGlobalPropagator().inject(t,e,n)},t.prototype.extract=function(t,e,n){return void 0===n&&(n=W),this._getGlobalPropagator().extract(t,e,n)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){p(Bt,y.instance())},t.prototype._getGlobalPropagator=function(){return l(Bt)||Ft},t}(),zt=Ht.getInstance(),Vt="trace",Gt=function(){function t(){this._proxyTracerProvider=new At,this.wrapSpanContext=yt,this.isSpanContextValid=Tt,this.deleteSpan=ft,this.getSpan=ct,this.getActiveSpan=lt,this.getSpanContext=_t,this.setSpan=pt,this.setSpanContext=ht}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(t){var e=c(Vt,this._proxyTracerProvider,y.instance());return e&&this._proxyTracerProvider.setDelegate(t),e},t.prototype.getTracerProvider=function(){return l(Vt)||this._proxyTracerProvider},t.prototype.getTracer=function(t,e){return this.getTracerProvider().getTracer(t,e)},t.prototype.disable=function(){p(Vt,y.instance()),this._proxyTracerProvider=new At},t}().getInstance(),Xt=w("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function qt(t){return!0===t.getValue(Xt)}var Wt="baggage",Kt=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Yt(t){var e=t.split(";");if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf("=");if(!(r<=0)){var o,i,a=decodeURIComponent(n.substring(0,r).trim()),s=decodeURIComponent(n.substring(r+1).trim());return e.length>0&&("string"!=typeof(i=e.join(";"))&&(b.error("Cannot create baggage metadata from unknown type: "+typeof i),i=""),o={__TYPE__:S,toString:function(){return i}}),{key:a,value:s,metadata:o}}}}}var Qt=function(){function t(){}return t.prototype.inject=function(t,e,n){var r=zt.getBaggage(t);if(r&&!qt(t)){var o=function(t){return t.getAllEntries().map((function(t){var e=Kt(t,2),n=e[0],r=e[1],o=encodeURIComponent(n)+"="+encodeURIComponent(r.value);return void 0!==r.metadata&&(o+=";"+r.metadata.toString()),o}))}(r).filter((function(t){return t.length<=4096})).slice(0,180),i=function(t){return t.reduce((function(t,e){var n=t+(""!==t?",":"")+e;return n.length>8192?t:n}),"")}(o);i.length>0&&n.set(e,Wt,i)}},t.prototype.extract=function(t,e,n){var r=n.get(e,Wt),o=Array.isArray(r)?r.join(","):r;if(!o)return t;var i={};return 0===o.length?t:(o.split(",").forEach((function(t){var e=Yt(t);if(e){var n={value:e.value};e.metadata&&(n.metadata=e.metadata),i[e.key]=n}})),0===Object.entries(i).length?t:zt.setBaggage(t,zt.createBaggage(i)))},t.prototype.fields=function(){return[Wt]},t}(),$t=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Jt=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function te(t){var e,n,r={};if("object"!=typeof t||null==t)return r;try{for(var o=$t(Object.entries(t)),i=o.next();!i.done;i=o.next()){var a=Jt(i.value,2),s=a[0],u=a[1];ee(s)?ne(u)?Array.isArray(u)?r[s]=u.slice():r[s]=u:Ct.warn("Invalid attribute value set for key: "+s):Ct.warn("Invalid attribute key: "+s)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}function ee(t){return"string"==typeof t&&t.length>0}function ne(t){return null==t||(Array.isArray(t)?function(t){var e,n,r;try{for(var o=$t(t),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){if(!r){if(re(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return!0}(t):re(t))}function re(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}var oe,ie=function(t){Ct.error(function(t){return"string"==typeof t?t:JSON.stringify(function(t){for(var e={},n=t;null!==n;)Object.getOwnPropertyNames(n).forEach((function(t){if(!e[t]){var r=n[t];r&&(e[t]=String(r))}})),n=Object.getPrototypeOf(n);return e}(t))}(t))};function ae(t){try{ie(t)}catch(t){}}!function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"}(oe||(oe={}));var se="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},ue=["OTEL_SDK_DISABLED"];function ce(t){return ue.indexOf(t)>-1}var le=["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 pe(t){return le.indexOf(t)>-1}var fe=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function he(t){return fe.indexOf(t)>-1}var _e=1/0,de=128,Ee={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:f.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:_e,OTEL_ATTRIBUTE_COUNT_LIMIT:de,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:_e,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:de,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:_e,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:de,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:oe.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"};function ve(t,e,n){if(void 0!==n[t]){var r=String(n[t]);e[t]="true"===r.toLowerCase()}}function Te(t,e,n,r,o){if(void 0===r&&(r=-1/0),void 0===o&&(o=1/0),void 0!==n[t]){var i=Number(n[t]);isNaN(i)||(e[t]=i<r?r:i>o?o:i)}}function ye(t,e,n,r){void 0===r&&(r=",");var o=n[t];"string"==typeof o&&(e[t]=o.split(r).map((function(t){return t.trim()})))}var ge={ALL:f.ALL,VERBOSE:f.VERBOSE,DEBUG:f.DEBUG,INFO:f.INFO,WARN:f.WARN,ERROR:f.ERROR,NONE:f.NONE};function me(t,e,n){var r=n[t];if("string"==typeof r){var o=ge[r.toUpperCase()];null!=o&&(e[t]=o)}}function Oe(t){var e={};for(var n in Ee){var r=n;if("OTEL_LOG_LEVEL"===r)me(r,e,t);else if(ce(r))ve(r,e,t);else if(pe(r))Te(r,e,t);else if(he(r))ye(r,e,t);else{var o=t[r];null!=o&&(e[r]=String(o))}}return e}function Se(){var t=Oe(se);return Object.assign({},Ee,t)}var be,Re=performance,we="exception.type",Le="exception.message",Ae="exception.stacktrace",Pe="http.method",Ce="http.url",Ne="http.host",ke="http.scheme",Ie="http.status_code",De="http.user_agent",Me="http.response_content_length",xe="http.response_content_length_uncompressed",Ue="process.runtime.name",je="service.name",Ze="service.version",Be="telemetry.sdk.name",Fe="telemetry.sdk.language",He="telemetry.sdk.version",ze=((be={})[Be]="opentelemetry",be[Ue]="browser",be[Fe]="webjs",be[He]="1.17.1",be);var Ve,Ge=Math.pow(10,6),Xe=Math.pow(10,9);function qe(t){var e=t/1e3;return[Math.trunc(e),Math.round(t%1e3*Ge)]}function We(){var t=Re.timeOrigin;if("number"!=typeof t){var e=Re;t=e.timing&&e.timing.fetchStart}return t}function Ke(t){return tn(qe(We()),qe("number"==typeof t?t:Re.now()))}function Ye(t){if($e(t))return t;if("number"==typeof t)return t<We()?Ke(t):qe(t);if(t instanceof Date)return qe(t.getTime());throw TypeError("Invalid input type")}function Qe(t){return t[0]*Xe+t[1]}function $e(t){return Array.isArray(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]}function Je(t){return $e(t)||"number"==typeof t||t instanceof Date}function tn(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=Xe&&(n[1]-=Xe,n[0]+=1),n}!function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"}(Ve||(Ve={}));var en=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},nn=function(){function t(t){var e;void 0===t&&(t={}),this._propagators=null!==(e=t.propagators)&&void 0!==e?e:[],this._fields=Array.from(new Set(this._propagators.map((function(t){return"function"==typeof t.fields?t.fields():[]})).reduce((function(t,e){return t.concat(e)}),[])))}return t.prototype.inject=function(t,e,n){var r,o;try{for(var i=en(this._propagators),a=i.next();!a.done;a=i.next()){var s=a.value;try{s.inject(t,e,n)}catch(t){Ct.warn("Failed to inject with "+s.constructor.name+". Err: "+t.message)}}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},t.prototype.extract=function(t,e,n){return this._propagators.reduce((function(t,r){try{return r.extract(t,e,n)}catch(t){Ct.warn("Failed to inject with "+r.constructor.name+". Err: "+t.message)}return t}),t)},t.prototype.fields=function(){return this._fields.slice()},t}(),rn="[_0-9a-z-*/]",on=new RegExp("^(?:"+("[a-z]"+rn+"{0,255}")+"|"+("[a-z0-9]"+rn+"{0,240}@[a-z]"+rn+"{0,13}")+")$"),an=/^[ -~]{0,255}[!-~]$/,sn=/,|=/;var un=function(){function t(t){this._internalState=new Map,t&&this._parse(t)}return t.prototype.set=function(t,e){var n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,e),n},t.prototype.unset=function(t){var e=this._clone();return e._internalState.delete(t),e},t.prototype.get=function(t){return this._internalState.get(t)},t.prototype.serialize=function(){var t=this;return this._keys().reduce((function(e,n){return e.push(n+"="+t.get(n)),e}),[]).join(",")},t.prototype._parse=function(t){t.length>512||(this._internalState=t.split(",").reverse().reduce((function(t,e){var n=e.trim(),r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r),i=n.slice(r+1,e.length);(function(t){return on.test(t)})(o)&&function(t){return an.test(t)&&!sn.test(t)}(i)&&t.set(o,i)}return t}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}(),cn="traceparent",ln="tracestate",pn=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");var fn,hn,_n=function(){function t(){}return t.prototype.inject=function(t,e,n){var r=Gt.getSpanContext(t);if(r&&!qt(t)&&Tt(r)){var o="00-"+r.traceId+"-"+r.spanId+"-0"+Number(r.traceFlags||A.NONE).toString(16);n.set(e,cn,o),r.traceState&&n.set(e,ln,r.traceState.serialize())}},t.prototype.extract=function(t,e,n){var r=n.get(e,cn);if(!r)return t;var o=Array.isArray(r)?r[0]:r;if("string"!=typeof o)return t;var i=function(t){var e=pn.exec(t);return e?"00"===e[1]&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}:null}(o);if(!i)return t;i.isRemote=!0;var a=n.get(e,ln);if(a){var s=Array.isArray(a)?a.join(","):a;i.traceState=new un("string"==typeof s?s:void 0)}return Gt.setSpanContext(t,i)},t.prototype.fields=function(){return[cn,ln]},t}(),dn="[object Null]",En="[object Undefined]",vn=Function.prototype.toString,Tn=vn.call(Object),yn=(fn=Object.getPrototypeOf,hn=Object,function(t){return fn(hn(t))}),gn=Object.prototype,mn=gn.hasOwnProperty,On=Symbol?Symbol.toStringTag:void 0,Sn=gn.toString;function bn(t){if(!function(t){return null!=t&&"object"==typeof t}(t)||"[object Object]"!==function(t){if(null==t)return void 0===t?En:dn;return On&&On in Object(t)?function(t){var e=mn.call(t,On),n=t[On],r=!1;try{t[On]=void 0,r=!0}catch(t){}var o=Sn.call(t);r&&(e?t[On]=n:delete t[On]);return o}(t):function(t){return Sn.call(t)}(t)}(t))return!1;var e=yn(t);if(null===e)return!0;var n=mn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&vn.call(n)===Tn}function Rn(t){return An(t)?t.slice():t}function wn(t,e,n,r){var o;if(void 0===n&&(n=0),!(n>20)){if(n++,Nn(t)||Nn(e)||Pn(e))o=Rn(e);else if(An(t)){if(o=t.slice(),An(e))for(var i=0,a=e.length;i<a;i++)o.push(Rn(e[i]));else if(Cn(e))for(i=0,a=(s=Object.keys(e)).length;i<a;i++){o[u=s[i]]=Rn(e[u])}}else if(Cn(t))if(Cn(e)){if(!function(t,e){if(!bn(t)||!bn(e))return!1;return!0}(t,e))return e;o=Object.assign({},t);var s;for(i=0,a=(s=Object.keys(e)).length;i<a;i++){var u,c=e[u=s[i]];if(Nn(c))void 0===c?delete o[u]:o[u]=c;else{var l=o[u],p=c;if(Ln(t,u,r)||Ln(e,u,r))delete o[u];else{if(Cn(l)&&Cn(p)){var f=r.get(l)||[],h=r.get(p)||[];f.push({obj:t,key:u}),h.push({obj:e,key:u}),r.set(l,f),r.set(p,h)}o[u]=wn(o[u],c,n,r)}}}}else o=e;return o}}function Ln(t,e,n){for(var r=n.get(t[e])||[],o=0,i=r.length;o<i;o++){var a=r[o];if(a.key===e&&a.obj===t)return!0}return!1}function An(t){return Array.isArray(t)}function Pn(t){return"function"==typeof t}function Cn(t){return!Nn(t)&&!An(t)&&!Pn(t)&&"object"==typeof t}function Nn(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t||void 0===t||t instanceof Date||t instanceof RegExp||null===t}var kn=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function In(t,e){return"string"==typeof e?t===e:!!t.match(e)}var Dn=function(){function t(){var t=this;this._promise=new Promise((function(e,n){t._resolve=e,t._reject=n}))}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(t){this._resolve(t)},t.prototype.reject=function(t){this._reject(t)},t}(),Mn=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},xn=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Un=function(){function t(t,e){this._callback=t,this._that=e,this._isCalled=!1,this._deferred=new Dn}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var t,e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,xn([this._that],Mn(n),!1))).then((function(t){return e._deferred.resolve(t)}),(function(t){return e._deferred.reject(t)}))}catch(t){this._deferred.reject(t)}}return this._deferred.promise},t}(),jn=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Zn(t){return Object.keys(t).map((function(e){return Bn(e,t[e])}))}function Bn(t,e){return{key:t,value:Fn(e)}}function Fn(t){var e=typeof t;return"string"===e?{stringValue:t}:"number"===e?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:"boolean"===e?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(Fn)}}:"object"===e&&null!=t?{kvlistValue:{values:Object.entries(t).map((function(t){var e=jn(t,2);return Bn(e[0],e[1])}))}}:{}}function Hn(t){for(var e=t.length,n="",r=0;r<e;r+=2){var o=t.substring(r,r+2),i=parseInt(o,16);n+=String.fromCharCode(i)}return btoa(n)}var zn=Math.pow(10,9);function Vn(t){return t[0]*zn+t[1]}function Gn(t,e){var n,r=t.spanContext(),o=t.status,i=e?t.parentSpanId:null!=t.parentSpanId?Hn(t.parentSpanId):void 0;return{traceId:e?r.traceId:Hn(r.traceId),spanId:e?r.spanId:Hn(r.spanId),parentSpanId:i,traceState:null===(n=r.traceState)||void 0===n?void 0:n.serialize(),name:t.name,kind:null==t.kind?0:t.kind+1,startTimeUnixNano:Vn(t.startTime),endTimeUnixNano:Vn(t.endTime),attributes:Zn(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(Xn),droppedEventsCount:t.droppedEventsCount,status:{code:o.code,message:o.message},links:t.links.map((function(t){return function(t,e){var n;return{attributes:t.attributes?Zn(t.attributes):[],spanId:e?t.context.spanId:Hn(t.context.spanId),traceId:e?t.context.traceId:Hn(t.context.traceId),traceState:null===(n=t.context.traceState)||void 0===n?void 0:n.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}(t,e)})),droppedLinksCount:t.droppedLinksCount}}function Xn(t){return{attributes:t.attributes?Zn(t.attributes):[],name:t.name,timeUnixNano:Vn(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}var qn=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Wn=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Kn(t,e){for(var n=function(t){var e,n,r=new Map;try{for(var o=qn(t),i=o.next();!i.done;i=o.next()){var a=i.value,s=r.get(a.resource);s||(s=new Map,r.set(a.resource,s));var u=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),c=s.get(u);c||(c=[],s.set(u,c)),c.push(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}(t),r=[],o=n.entries(),i=o.next();!i.done;){for(var a=Wn(i.value,2),s=a[0],u=[],c=a[1].values(),l=c.next();!l.done;){var p=l.value;if(p.length>0){var f=p[0].instrumentationLibrary,h=f.name,_=f.version,d=f.schemaUrl,E=p.map((function(t){return Gn(t,e)}));u.push({scope:{name:h,version:_},spans:E,schemaUrl:d})}l=c.next()}var v={resource:{attributes:Zn(s.attributes),droppedAttributesCount:0},scopeSpans:u,schemaUrl:void 0};r.push(v),i=o.next()}return r}class Yn{constructor(t){this.config=t}export(t,e){const n=function(t,e){return{resourceSpans:Kn(t,e)}}(t,!0);this.config.api.pushTraces(n),e({code:Ve.SUCCESS})}shutdown(){return Promise.resolve(void 0)}}class Qn{constructor(t,e){this.processor=t,this.metas=e}forceFlush(){return this.processor.forceFlush()}onStart(t,e){const n=this.metas.value.session;(null==n?void 0:n.id)&&(t.attributes.session_id=n.id),this.processor.onStart(t,e)}onEnd(t){this.processor.onEnd(t)}shutdown(){return this.processor.shutdown()}}var $n,Jn=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},tr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},er=function(){function t(t,e,n,r,o,i,a,s,u){void 0===a&&(a=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:bt.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=r,this.parentSpanId=i,this.kind=o,this.links=a;var c=Date.now();this._performanceStartTime=Re.now(),this._performanceOffset=c-(this._performanceStartTime+We()),this._startTimeProvided=null!=s,this.startTime=this._getTime(null!=s?s:c),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,e),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(t,e){return null==e||this._isSpanEnded()?this:0===t.length?(Ct.warn("Invalid attribute key: "+t),this):ne(e)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(e),this):(Ct.warn("Invalid attribute value set for key: "+t),this)},t.prototype.setAttributes=function(t){var e,n;try{for(var r=Jn(Object.entries(t)),o=r.next();!o.done;o=r.next()){var i=tr(o.value,2),a=i[0],s=i[1];this.setAttribute(a,s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return this},t.prototype.addEvent=function(t,e,n){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return Ct.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(Ct.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),Je(e)&&(Je(n)||(n=e),e=void 0);var r=te(e);return this.events.push({name:t,attributes:r,time:this._getTime(n),droppedAttributesCount:0}),this},t.prototype.setStatus=function(t){return this._isSpanEnded()||(this.status=t),this},t.prototype.updateName=function(t){return this._isSpanEnded()||(this.name=t),this},t.prototype.end=function(t){this._isSpanEnded()?Ct.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once."):(this._ended=!0,this.endTime=this._getTime(t),this._duration=function(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=Xe),[n,r]}(this.startTime,this.endTime),this._duration[0]<0&&(Ct.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._spanProcessor.onEnd(this))},t.prototype._getTime=function(t){if("number"==typeof t&&t<Re.now())return Ke(t+this._performanceOffset);if("number"==typeof t)return qe(t);if(t instanceof Date)return qe(t.getTime());if($e(t))return t;if(this._startTimeProvided)return qe(Date.now());var e=Re.now()-this._performanceStartTime;return tn(this.startTime,qe(e))},t.prototype.isRecording=function(){return!1===this._ended},t.prototype.recordException=function(t,e){var n={};"string"==typeof t?n[Le]=t:t&&(t.code?n[we]=t.code.toString():t.name&&(n[we]=t.name),t.message&&(n[Le]=t.message),t.stack&&(n[Ae]=t.stack)),n[we]||n[Le]?this.addEvent("exception",n,e):Ct.warn("Failed to record an exception "+t)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&Ct.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(t,e){return t.length<=e?t:t.substr(0,e)},t.prototype._truncateToSize=function(t){var e=this,n=this._attributeValueLengthLimit;return n<=0?(Ct.warn("Attribute value limit must be positive, got "+n),t):"string"==typeof t?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map((function(t){return"string"==typeof t?e._truncateToLimitUtil(t,n):t})):t},t}();!function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}($n||($n={}));var nr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:$n.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),rr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:$n.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),or=function(){function t(t){var e,n,r,o;this._root=t.root,this._root||(ae(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new rr),this._remoteParentSampled=null!==(e=t.remoteParentSampled)&&void 0!==e?e:new rr,this._remoteParentNotSampled=null!==(n=t.remoteParentNotSampled)&&void 0!==n?n:new nr,this._localParentSampled=null!==(r=t.localParentSampled)&&void 0!==r?r:new rr,this._localParentNotSampled=null!==(o=t.localParentNotSampled)&&void 0!==o?o:new nr}return t.prototype.shouldSample=function(t,e,n,r,o,i){var a=Gt.getSpanContext(t);return a&&Tt(a)?a.isRemote?a.traceFlags&A.SAMPLED?this._remoteParentSampled.shouldSample(t,e,n,r,o,i):this._remoteParentNotSampled.shouldSample(t,e,n,r,o,i):a.traceFlags&A.SAMPLED?this._localParentSampled.shouldSample(t,e,n,r,o,i):this._localParentNotSampled.shouldSample(t,e,n,r,o,i):this._root.shouldSample(t,e,n,r,o,i)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}(),ir=function(){function t(t){void 0===t&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(4294967295*this._ratio)}return t.prototype.shouldSample=function(t,e){return{decision:vt(e)&&this._accumulate(e)<this._upperBound?$n.RECORD_AND_SAMPLED:$n.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(t){return"number"!=typeof t||isNaN(t)?0:t>=1?1:t<=0?0:t},t.prototype._accumulate=function(t){for(var e=0,n=0;n<t.length/8;n++){var r=8*n;e=(e^parseInt(t.slice(r,r+8),16))>>>0}return e},t}(),ar=Se(),sr=oe.AlwaysOn;function ur(){return{sampler:cr(ar),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:Se().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:Se().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:Se().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:Se().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:Se().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:Se().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:Se().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:Se().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function cr(t){switch(void 0===t&&(t=Se()),t.OTEL_TRACES_SAMPLER){case oe.AlwaysOn:return new rr;case oe.AlwaysOff:return new nr;case oe.ParentBasedAlwaysOn:return new or({root:new rr});case oe.ParentBasedAlwaysOff:return new or({root:new nr});case oe.TraceIdRatio:return new ir(lr(t));case oe.ParentBasedTraceIdRatio:return new or({root:new ir(lr(t))});default:return Ct.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+sr+'".'),new rr}}function lr(t){if(void 0===t.OTEL_TRACES_SAMPLER_ARG||""===t.OTEL_TRACES_SAMPLER_ARG)return Ct.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(Ct.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to 1."),1):e<0||e>1?(Ct.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to 1."),1):e}function pr(t){var e,n,r,o,i,a,s,u,c,l,p,f,h=Object.assign({},t.spanLimits),_="undefined"!=typeof process&&process&&process.env?Oe(process.env):Oe(se);return h.attributeCountLimit=null!==(a=null!==(i=null!==(o=null!==(n=null===(e=t.spanLimits)||void 0===e?void 0:e.attributeCountLimit)&&void 0!==n?n:null===(r=t.generalLimits)||void 0===r?void 0:r.attributeCountLimit)&&void 0!==o?o:_.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==i?i:_.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==a?a:de,h.attributeValueLengthLimit=null!==(f=null!==(p=null!==(l=null!==(u=null===(s=t.spanLimits)||void 0===s?void 0:s.attributeValueLengthLimit)&&void 0!==u?u:null===(c=t.generalLimits)||void 0===c?void 0:c.attributeValueLengthLimit)&&void 0!==l?l:_.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==p?p:_.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==f?f:_e,Object.assign({},t,{spanLimits:h})}var fr=function(){function t(t,e){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=Se();this._maxExportBatchSize="number"==typeof(null==e?void 0:e.maxExportBatchSize)?e.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==e?void 0:e.maxQueueSize)?e.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==e?void 0:e.scheduledDelayMillis)?e.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==e?void 0:e.exportTimeoutMillis)?e.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Un(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Ct.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(t,e){},t.prototype.onEnd=function(t){this._shutdownOnce.isCalled||0!=(t.spanContext().traceFlags&A.SAMPLED)&&this._addToBuffer(t)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var t=this;return Promise.resolve().then((function(){return t.onShutdown()})).then((function(){return t._flushAll()})).then((function(){return t._exporter.shutdown()}))},t.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize)return 0===this._droppedSpansCount&&Ct.debug("maxQueueSize reached, dropping spans"),void this._droppedSpansCount++;this._droppedSpansCount>0&&(Ct.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},t.prototype._flushAll=function(){var t=this;return new Promise((function(e,n){for(var r=[],o=0,i=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize);o<i;o++)r.push(t._flushOneBatch());Promise.all(r).then((function(){e()})).catch(n)}))},t.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise((function(e,n){var r=setTimeout((function(){n(new Error("Timeout"))}),t._exportTimeoutMillis);Pt.with(function(t){return t.setValue(Xt,!0)}(Pt.active()),(function(){var o=t._finishedSpans.splice(0,t._maxExportBatchSize),i=function(){return t._exporter.export(o,(function(t){var o;clearTimeout(r),t.code===Ve.SUCCESS?e():n(null!==(o=t.error)&&void 0!==o?o:new Error("BatchSpanProcessor: span export failed"))}))},a=o.map((function(t){return t.resource})).filter((function(t){return t.asyncAttributesPending}));0===a.length?i():Promise.all(a.map((function(t){var e;return null===(e=t.waitForAsyncAttributes)||void 0===e?void 0:e.call(t)}))).then(i,(function(t){ae(t),n(t)}))}))}))},t.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var e=function(){t._isExporting=!0,t._flushOneBatch().then((function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())})).catch((function(e){t._isExporting=!1,ae(e)}))};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();void 0===this._timer&&(this._timer=setTimeout((function(){return e()}),this._scheduledDelayMillis),this._timer)}},t.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},t}(),hr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_r=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.onInit(n),r}return hr(e,t),e.prototype.onInit=function(t){var e=this;!0!==(null==t?void 0:t.disableAutoFlushOnDocumentHide)&&"undefined"!=typeof document&&(this._visibilityChangeListener=function(){"hidden"===document.visibilityState&&e.forceFlush()},this._pageHideListener=function(){e.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},e.prototype.onShutdown=function(){"undefined"!=typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e}(fr),dr=function(){this.generateTraceId=vr(16),this.generateSpanId=vr(8)},Er=Array(32);function vr(t){return function(){for(var e=0;e<2*t;e++)Er[e]=Math.floor(16*Math.random())+48,Er[e]>=58&&(Er[e]+=39);return String.fromCharCode.apply(null,Er.slice(0,2*t))}}var Tr=function(){function t(t,e,n){this._tracerProvider=n;var r,o,i,a,s=(r=e,o={sampler:cr()},i=ur(),(a=Object.assign({},i,o,r)).generalLimits=Object.assign({},i.generalLimits,r.generalLimits||{}),a.spanLimits=Object.assign({},i.spanLimits,r.spanLimits||{}),a);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=e.idGenerator||new dr,this.resource=n.resource,this.instrumentationLibrary=t}return t.prototype.startSpan=function(t,e,n){var r,o,i;void 0===e&&(e={}),void 0===n&&(n=Pt.active()),e.root&&(n=Gt.deleteSpan(n));var a=Gt.getSpan(n);if(qt(n))return Ct.debug("Instrumentation suppressed, returning Noop Span"),Gt.wrapSpanContext(at);var s,u,c,l=null==a?void 0:a.spanContext(),p=this._idGenerator.generateSpanId();l&&Gt.isSpanContextValid(l)?(s=l.traceId,u=l.traceState,c=l.spanId):s=this._idGenerator.generateTraceId();var f=null!==(r=e.kind)&&void 0!==r?r:St.INTERNAL,h=(null!==(o=e.links)&&void 0!==o?o:[]).map((function(t){return{context:t.context,attributes:te(t.attributes)}})),_=te(e.attributes),d=this._sampler.shouldSample(n,s,t,f,_,h);u=null!==(i=d.traceState)&&void 0!==i?i:u;var E={traceId:s,spanId:p,traceFlags:d.decision===Ot.RECORD_AND_SAMPLED?A.SAMPLED:A.NONE,traceState:u};if(d.decision===Ot.NOT_RECORD)return Ct.debug("Recording is off, propagating context in a non-recording span"),Gt.wrapSpanContext(E);var v=new er(this,n,t,E,f,c,h,e.startTime),T=te(Object.assign(_,d.attributes));return v.setAttributes(T),v},t.prototype.startActiveSpan=function(t,e,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=e:3===arguments.length?(o=e,a=n):(o=e,i=n,a=r);var s=null!=i?i:Pt.active(),u=this.startSpan(t,o,s),c=Gt.setSpan(s,u);return Pt.with(c,a,void 0,u)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}();var yr,gr=function(){return gr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},gr.apply(this,arguments)},mr=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},Or=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Sr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},br=function(){function t(t,e){var n,r=this;this._attributes=t,this.asyncAttributesPending=null!=e,this._syncAttributes=null!==(n=this._attributes)&&void 0!==n?n:{},this._asyncAttributesPromise=null==e?void 0:e.then((function(t){return r._attributes=Object.assign({},r._attributes,t),r.asyncAttributesPending=!1,t}),(function(t){return Ct.debug("a resource's async attributes promise rejected: %s",t),r.asyncAttributesPending=!1,{}}))}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t(((e={})[je]="unknown_service",e[Fe]=ze[Fe],e[Be]=ze[Be],e[He]=ze[He],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&Ct.error("Accessing resource attributes before async attributes settled"),null!==(t=this._attributes)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return mr(this,void 0,void 0,(function(){return Or(this,(function(t){switch(t.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t.prototype.merge=function(e){var n,r=this;if(!e)return this;var o=gr(gr({},this._syncAttributes),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(o);var i=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then((function(t){var n,o=Sr(t,2),i=o[0],a=o[1];return gr(gr(gr(gr({},r._syncAttributes),i),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes),a)}));return new t(o,i)},t.EMPTY=new t({}),t}(),Rr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wr=function(){function t(t){this._spanProcessors=t}return t.prototype.forceFlush=function(){var t,e,n=[];try{for(var r=Rr(this._spanProcessors),o=r.next();!o.done;o=r.next()){var i=o.value;n.push(i.forceFlush())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return new Promise((function(t){Promise.all(n).then((function(){t()})).catch((function(e){ae(e||new Error("MultiSpanProcessor: forceFlush failed")),t()}))}))},t.prototype.onStart=function(t,e){var n,r;try{for(var o=Rr(this._spanProcessors),i=o.next();!i.done;i=o.next()){i.value.onStart(t,e)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype.onEnd=function(t){var e,n;try{for(var r=Rr(this._spanProcessors),o=r.next();!o.done;o=r.next()){o.value.onEnd(t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.shutdown=function(){var t,e,n=[];try{for(var r=Rr(this._spanProcessors),o=r.next();!o.done;o=r.next()){var i=o.value;n.push(i.shutdown())}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return new Promise((function(t,e){Promise.all(n).then((function(){t()}),e)}))},t}(),Lr=function(){function t(){}return t.prototype.onStart=function(t,e){},t.prototype.onEnd=function(t){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}();!function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"}(yr||(yr={}));var Ar,Pr,Cr=function(){function t(t){var e;void 0===t&&(t={}),this._registeredSpanProcessors=[],this._tracers=new Map;var n=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=wn(n,t.shift(),0,r);return n}({},ur(),pr(t));this.resource=null!==(e=n.resource)&&void 0!==e?e:br.empty(),this.resource=br.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var r=this._buildExporterFromEnv();if(void 0!==r){var o=new _r(r);this.activeSpanProcessor=o}else this.activeSpanProcessor=new Lr}return t.prototype.getTracer=function(t,e,n){var r=t+"@"+(e||"")+":"+((null==n?void 0:n.schemaUrl)||"");return this._tracers.has(r)||this._tracers.set(r,new Tr({name:t,version:e,schemaUrl:null==n?void 0:n.schemaUrl},this._config,this)),this._tracers.get(r)},t.prototype.addSpanProcessor=function(t){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((function(t){return Ct.error("Error while trying to shutdown current span processor",t)})),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new wr(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(t){void 0===t&&(t={}),Gt.setGlobalTracerProvider(this),void 0===t.propagator&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&Pt.setGlobalContextManager(t.contextManager),t.propagator&&zt.setGlobalPropagator(t.propagator)},t.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,e=this._registeredSpanProcessors.map((function(e){return new Promise((function(n){var r,o=setTimeout((function(){n(new Error("Span processor did not completed within timeout period of "+t+" ms")),r=yr.timeout}),t);e.forceFlush().then((function(){clearTimeout(o),r!==yr.timeout&&(r=yr.resolved,n(r))})).catch((function(t){clearTimeout(o),r=yr.error,n(t)}))}))}));return new Promise((function(t,n){Promise.all(e).then((function(e){var r=e.filter((function(t){return t!==yr.resolved}));r.length>0?n(r):t()})).catch((function(t){return n([t])}))}))},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(t){var e;return null===(e=this.constructor._registeredPropagators.get(t))||void 0===e?void 0:e()},t.prototype._getSpanExporter=function(t){var e;return null===(e=this.constructor._registeredExporters.get(t))||void 0===e?void 0:e()},t.prototype._buildPropagatorFromEnv=function(){var t=this,e=Array.from(new Set(Se().OTEL_PROPAGATORS)),n=e.map((function(e){var n=t._getPropagator(e);return n||Ct.warn('Propagator "'+e+'" requested through environment variable is unavailable.'),n})).reduce((function(t,e){return e&&t.push(e),t}),[]);return 0===n.length?void 0:1===e.length?n[0]:new nn({propagators:n})},t.prototype._buildExporterFromEnv=function(){var t=Se().OTEL_TRACES_EXPORTER;if("none"!==t&&""!==t){var e=this._getSpanExporter(t);return e||Ct.error('Exporter "'+t+'" requested through environment variable is unavailable.'),e}},t._registeredPropagators=new Map([["tracecontext",function(){return new _n}],["baggage",function(){return new Qt}]]),t._registeredExporters=new Map,t}(),Nr=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},kr=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Ir=function(){function t(){this._enabled=!1,this._currentContext=C}return t.prototype._bindFunction=function(t,e){void 0===t&&(t=C);var n=this,r=function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return n.with(t,(function(){return e.apply(r,o)}))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:e.length}),r},t.prototype.active=function(){return this._currentContext},t.prototype.bind=function(t,e){return void 0===t&&(t=this.active()),"function"==typeof e?this._bindFunction(t,e):e},t.prototype.disable=function(){return this._currentContext=C,this._enabled=!1,this},t.prototype.enable=function(){return this._enabled||(this._enabled=!0,this._currentContext=C),this},t.prototype.with=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=this._currentContext;this._currentContext=t||C;try{return e.call.apply(e,kr([n],Nr(r),!1))}finally{this._currentContext=i}},t}(),Dr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mr=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;if(e.contextManager)throw"contextManager should be defined in register method not in constructor";if(e.propagator)throw"propagator should be defined in register method not in constructor";return n}return Dr(e,t),e.prototype.register=function(e){void 0===e&&(e={}),void 0===e.contextManager&&(e.contextManager=new Ir),e.contextManager&&e.contextManager.enable(),t.prototype.register.call(this,e)},e}(Cr);function xr(t,e){return e in t}function Ur(t,e,n){if(xr(n,e)&&"number"==typeof n[e])return t.addEvent(e,n[e]),t}function jr(t,e){Ur(t,Ar.FETCH_START,e),Ur(t,Ar.DOMAIN_LOOKUP_START,e),Ur(t,Ar.DOMAIN_LOOKUP_END,e),Ur(t,Ar.CONNECT_START,e),xr(e,"name")&&e.name.startsWith("https:")&&Ur(t,Ar.SECURE_CONNECTION_START,e),Ur(t,Ar.CONNECT_END,e),Ur(t,Ar.REQUEST_START,e),Ur(t,Ar.RESPONSE_START,e),Ur(t,Ar.RESPONSE_END,e);var n=e[Ar.ENCODED_BODY_SIZE];void 0!==n&&t.setAttribute(Me,n);var r=e[Ar.DECODED_BODY_SIZE];void 0!==r&&n!==r&&t.setAttribute(xe,r)}function Zr(t,e,n,r,o,i){void 0===o&&(o=new WeakSet);var a=Br(t),s=function(t,e,n,r,o,i){var a=Qe(e),s=Qe(n),u=r.filter((function(e){var n=Qe(Ye(e[Ar.FETCH_START])),r=Qe(Ye(e[Ar.RESPONSE_END]));return e.initiatorType.toLowerCase()===(i||"xmlhttprequest")&&e.name===t&&n>=a&&r<=s}));u.length>0&&(u=u.filter((function(t){return!o.has(t)})));return u}(t=a.toString(),e,n,r,o,i);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var u=function(t){return t.slice().sort((function(t,e){var n=t[Ar.FETCH_START],r=e[Ar.FETCH_START];return n>r?1:n<r?-1:0}))}(s);if(a.origin!==location.origin&&u.length>1){var c=u[0],l=function(t,e,n){for(var r,o=Qe(n),i=Qe(Ye(e)),a=t[1],s=t.length,u=1;u<s;u++){var c=t[u],l=Qe(Ye(c[Ar.FETCH_START])),p=o-Qe(Ye(c[Ar.RESPONSE_END]));l>=i&&(!r||p<r)&&(r=p,a=c)}return a}(u,c[Ar.RESPONSE_END],n),p=c[Ar.RESPONSE_END];return l[Ar.FETCH_START]<p&&(l=c,c=void 0),{corsPreFlightRequest:c,mainRequest:l}}return{mainRequest:s[0]}}function Br(t){if("function"==typeof URL)return new URL(t,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var e=(Pr||(Pr=document.createElement("a")),Pr);return e.href=t,e}function Fr(t){void 0===t&&(t=[]);for(var e=[],n=0,r=t.length;n<r;n++){var o=t[n];if(Array.isArray(o)){var i=Fr(o);e=e.concat(i.instrumentations)}else"function"==typeof o?e.push(new o):o.instrumentationName&&e.push(o)}return{instrumentations:e}}function Hr(t){var e=Fr(t.instrumentations).instrumentations,n=t.tracerProvider||Gt.getTracerProvider(),r=t.meterProvider||It.getMeterProvider();return function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];e&&i.setTracerProvider(e),n&&i.setMeterProvider(n),i.getConfig().enabled||i.enable()}}(e,n,r),function(){!function(t){t.forEach((function(t){return t.disable()}))}(e)}}!function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"}(Ar||(Ar={}));var zr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Vr(t){return"function"==typeof t}var Gr=console.error.bind(console);function Xr(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function qr(t){t&&t.logger&&(Vr(t.logger)?Gr=t.logger:Gr("new logger isn't a function, not replacing"))}function Wr(t,e,n){if(t&&t[e]){if(!n)return Gr("no wrapper function"),void Gr((new Error).stack);if(Vr(t[e])&&Vr(n)){var r=t[e],o=n(r,e);return Xr(o,"__original",r),Xr(o,"__unwrap",(function(){t[e]===o&&Xr(t,e,r)})),Xr(o,"__wrapped",!0),Xr(t,e,o),o}Gr("original object and wrapper must be functions")}else Gr("no original function "+e+" to wrap")}function Kr(t,e){return t&&t[e]?t[e].__unwrap?t[e].__unwrap():void Gr("no original to unwrap to -- has "+e+" already been unwrapped?"):(Gr("no function to unwrap."),void Gr((new Error).stack))}qr.wrap=Wr,qr.massWrap=function(t,e,n){if(!t)return Gr("must provide one or more modules to patch"),void Gr((new Error).stack);Array.isArray(t)||(t=[t]),e&&Array.isArray(e)?t.forEach((function(t){e.forEach((function(e){Wr(t,e,n)}))})):Gr("must provide one or more functions to wrap on modules")},qr.unwrap=Kr,qr.massUnwrap=function(t,e){if(!t)return Gr("must provide one or more modules to patch"),void Gr((new Error).stack);Array.isArray(t)||(t=[t]),e&&Array.isArray(e)?t.forEach((function(t){e.forEach((function(e){Kr(t,e)}))})):Gr("must provide one or more functions to unwrap on modules")};var Yr,Qr=qr,$r=function(){return $r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},$r.apply(this,arguments)},Jr=function(){function t(t,e,n){void 0===n&&(n={}),this.instrumentationName=t,this.instrumentationVersion=e,this._wrap=Qr.wrap,this._unwrap=Qr.unwrap,this._massWrap=Qr.massWrap,this._massUnwrap=Qr.massUnwrap,this._config=$r({enabled:!0},n),this._diag=Ct.createComponentLogger({namespace:t}),this._tracer=Gt.getTracer(t,e),this._meter=It.getMeter(t,e),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(t){void 0===t&&(t={}),this._config=Object.assign({},t)},t.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t}(),to=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),eo=function(t){function e(e,n,r){void 0===r&&(r={});var o=t.call(this,e,n,r)||this;return o._config.enabled&&o.enable(),o}return to(e,t),e}(Jr);function no(t,e,n){var r,o;try{o=t()}catch(t){r=t}finally{if(e(r,o),r&&!n)throw r;return o}}function ro(t){return"function"==typeof t&&"function"==typeof t.__original&&"function"==typeof t.__unwrap&&!0===t.__wrapped}!function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"}(Yr||(Yr={}));var oo;!function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"}(oo||(oo={}));var io={"first-paint":oo.FIRST_PAINT,"first-contentful-paint":oo.FIRST_CONTENTFUL_PAINT},ao=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),so=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,"@opentelemetry/instrumentation-document-load","0.33.2",e)||this;return n.component="document-load",n.version="1",n.moduleName=n.component,n}return ao(e,t),e.prototype.init=function(){},e.prototype._onDocumentLoaded=function(){var t=this;window.setTimeout((function(){t._collectPerformance()}))},e.prototype._addResourcesSpans=function(t){var e,n,r=this,o=null===(n=(e=Re).getEntriesByType)||void 0===n?void 0:n.call(e,"resource");o&&o.forEach((function(e){r._initResourceSpan(e,t)}))},e.prototype._collectPerformance=function(){var t=this,e=Array.from(document.getElementsByTagName("meta")).find((function(t){return t.getAttribute("name")===cn})),n=function(){var t,e,n={},r=null===(e=(t=Re).getEntriesByType)||void 0===e?void 0:e.call(t,"navigation")[0];if(r)Object.values(Ar).forEach((function(t){if(xr(r,t)){var e=r[t];"number"==typeof e&&(n[t]=e)}}));else{var o=Re.timing;o&&Object.values(Ar).forEach((function(t){if(xr(o,t)){var e=o[t];"number"==typeof e&&(n[t]=e)}}))}return n}(),r=e&&e.content||"";Pt.with(zt.extract(C,{traceparent:r}),(function(){var e,r=t._startSpan(Yr.DOCUMENT_LOAD,Ar.FETCH_START,n);r&&(Pt.with(Gt.setSpan(Pt.active(),r),(function(){var e=t._startSpan(Yr.DOCUMENT_FETCH,Ar.FETCH_START,n);e&&(e.setAttribute(Ce,location.href),Pt.with(Gt.setSpan(Pt.active(),e),(function(){var r;jr(e,n),t._addCustomAttributesOnSpan(e,null===(r=t._getConfig().applyCustomAttributesOnSpan)||void 0===r?void 0:r.documentFetch),t._endSpan(e,Ar.RESPONSE_END,n)})))})),r.setAttribute(Ce,location.href),r.setAttribute(De,navigator.userAgent),t._addResourcesSpans(r),Ur(r,Ar.FETCH_START,n),Ur(r,Ar.UNLOAD_EVENT_START,n),Ur(r,Ar.UNLOAD_EVENT_END,n),Ur(r,Ar.DOM_INTERACTIVE,n),Ur(r,Ar.DOM_CONTENT_LOADED_EVENT_START,n),Ur(r,Ar.DOM_CONTENT_LOADED_EVENT_END,n),Ur(r,Ar.DOM_COMPLETE,n),Ur(r,Ar.LOAD_EVENT_START,n),Ur(r,Ar.LOAD_EVENT_END,n),function(t){var e,n,r=null===(n=(e=Re).getEntriesByType)||void 0===n?void 0:n.call(e,"paint");r&&r.forEach((function(e){var n=e.name,r=e.startTime;xr(io,n)&&t.addEvent(io[n],r)}))}(r),t._addCustomAttributesOnSpan(r,null===(e=t._getConfig().applyCustomAttributesOnSpan)||void 0===e?void 0:e.documentLoad),t._endSpan(r,Ar.LOAD_EVENT_END,n))}))},e.prototype._endSpan=function(t,e,n){t&&(xr(n,e)?t.end(n[e]):t.end())},e.prototype._initResourceSpan=function(t,e){var n,r=this._startSpan(Yr.RESOURCE_FETCH,Ar.FETCH_START,t,e);r&&(r.setAttribute(Ce,t.name),jr(r,t),this._addCustomAttributesOnResourceSpan(r,t,null===(n=this._getConfig().applyCustomAttributesOnSpan)||void 0===n?void 0:n.resourceFetch),this._endSpan(r,Ar.RESPONSE_END,t))},e.prototype._startSpan=function(t,e,n,r){if(xr(n,e)&&"number"==typeof n[e])return this.tracer.startSpan(t,{startTime:n[e]},r?Gt.setSpan(Pt.active(),r):void 0)},e.prototype._waitForPageLoad=function(){"complete"===window.document.readyState?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},e.prototype._getConfig=function(){return this._config},e.prototype._addCustomAttributesOnSpan=function(t,e){var n=this;e&&no((function(){return e(t)}),(function(t){t&&n._diag.error("addCustomAttributesOnSpan",t)}),!0)},e.prototype._addCustomAttributesOnResourceSpan=function(t,e,n){var r=this;n&&no((function(){return n(t,e)}),(function(t){t&&r._diag.error("addCustomAttributesOnResourceSpan",t)}),!0)},e.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},e.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},e}(eo),uo=function(){return uo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},uo.apply(this,arguments)},co=function(){function t(t,e,n){void 0===n&&(n={}),this.instrumentationName=t,this.instrumentationVersion=e,this._wrap=Qr.wrap,this._unwrap=Qr.unwrap,this._massWrap=Qr.massWrap,this._massUnwrap=Qr.massUnwrap,this._config=uo({enabled:!0},n),this._diag=Ct.createComponentLogger({namespace:t}),this._tracer=Gt.getTracer(t,e),this._meter=It.getMeter(t,e),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(t){void 0===t&&(t={}),this._config=Object.assign({},t)},t.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t}(),lo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),po=function(t){function e(e,n,r){void 0===r&&(r={});var o=t.call(this,e,n,r)||this;return o._config.enabled&&o.enable(),o}return lo(e,t),e}(co);var fo="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},ho=performance,_o="http.method",Eo="http.url",vo="http.host",To="http.scheme",yo="http.status_code",go="http.user_agent",mo="http.response_content_length",Oo="http.response_content_length_uncompressed",So=Math.pow(10,6),bo=Math.pow(10,9);function Ro(t){var e=t/1e3;return[Math.trunc(e),Math.round(t%1e3*So)]}function wo(){var t=ho.timeOrigin;if("number"!=typeof t){var e=ho;t=e.timing&&e.timing.fetchStart}return t}function Lo(t){return function(t,e){var n=[t[0]+e[0],t[1]+e[1]];n[1]>=bo&&(n[1]-=bo,n[0]+=1);return n}(Ro(wo()),Ro("number"==typeof t?t:ho.now()))}function Ao(t){if(e=t,Array.isArray(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1])return t;if("number"==typeof t)return t<wo()?Lo(t):Ro(t);if(t instanceof Date)return Ro(t.getTime());throw TypeError("Invalid input type");var e}function Po(t){return t[0]*bo+t[1]}var Co,No,ko,Io=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Do(t,e){return"string"==typeof e?t===e:!!t.match(e)}function Mo(t,e){return e in t}function xo(t,e,n){if(Mo(n,e)&&"number"==typeof n[e])return t.addEvent(e,n[e]),t}function Uo(t,e){xo(t,Co.FETCH_START,e),xo(t,Co.DOMAIN_LOOKUP_START,e),xo(t,Co.DOMAIN_LOOKUP_END,e),xo(t,Co.CONNECT_START,e),Mo(e,"name")&&e.name.startsWith("https:")&&xo(t,Co.SECURE_CONNECTION_START,e),xo(t,Co.CONNECT_END,e),xo(t,Co.REQUEST_START,e),xo(t,Co.RESPONSE_START,e),xo(t,Co.RESPONSE_END,e);var n=e[Co.ENCODED_BODY_SIZE];void 0!==n&&t.setAttribute(mo,n);var r=e[Co.DECODED_BODY_SIZE];void 0!==r&&n!==r&&t.setAttribute(Oo,r)}function jo(t,e,n,r,o,i){void 0===o&&(o=new WeakSet);var a=Zo(t),s=function(t,e,n,r,o,i){var a=Po(e),s=Po(n),u=r.filter((function(e){var n=Po(Ao(e[Co.FETCH_START])),r=Po(Ao(e[Co.RESPONSE_END]));return e.initiatorType.toLowerCase()===(i||"xmlhttprequest")&&e.name===t&&n>=a&&r<=s}));u.length>0&&(u=u.filter((function(t){return!o.has(t)})));return u}(t=a.toString(),e,n,r,o,i);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var u=function(t){return t.slice().sort((function(t,e){var n=t[Co.FETCH_START],r=e[Co.FETCH_START];return n>r?1:n<r?-1:0}))}(s);if(a.origin!==location.origin&&u.length>1){var c=u[0],l=function(t,e,n){for(var r,o=Po(n),i=Po(Ao(e)),a=t[1],s=t.length,u=1;u<s;u++){var c=t[u],l=Po(Ao(c[Co.FETCH_START])),p=o-Po(Ao(c[Co.RESPONSE_END]));l>=i&&(!r||p<r)&&(r=p,a=c)}return a}(u,c[Co.RESPONSE_END],n),p=c[Co.RESPONSE_END];return l[Co.FETCH_START]<p&&(l=c,c=void 0),{corsPreFlightRequest:c,mainRequest:l}}return{mainRequest:s[0]}}function Zo(t){if("function"==typeof URL)return new URL(t,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var e=(No||(No=document.createElement("a")),No);return e.href=t,e}!function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"}(Co||(Co={})),function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"}(ko||(ko={}));var Bo,Fo="0.41.2",Ho=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zo=function(t){function e(e){var n=t.call(this,"@opentelemetry/instrumentation-fetch",Fo,e)||this;return n.component="fetch",n.version=Fo,n.moduleName=n.component,n._usedResources=new WeakSet,n._tasksCount=0,n}return Ho(e,t),e.prototype.init=function(){},e.prototype._getConfig=function(){return this._config},e.prototype._addChildSpan=function(t,e){var n=this.tracer.startSpan("CORS Preflight",{startTime:e[Co.FETCH_START]},Gt.setSpan(Pt.active(),t));this._getConfig().ignoreNetworkEvents||Uo(n,e),n.end(e[Co.RESPONSE_END])},e.prototype._addFinalSpanAttributes=function(t,e){var n=Zo(e.url);t.setAttribute(yo,e.status),null!=e.statusText&&t.setAttribute(ko.HTTP_STATUS_TEXT,e.statusText),t.setAttribute(vo,n.host),t.setAttribute(To,n.protocol.replace(":","")),t.setAttribute(go,navigator.userAgent)},e.prototype._addHeaders=function(t,e){if(!function(t,e){var n=e||[];return("string"==typeof n||n instanceof RegExp)&&(n=[n]),Zo(t).origin===location.origin||n.some((function(e){return Do(t,e)}))}(e,this._getConfig().propagateTraceHeaderCorsUrls)){var n={};return zt.inject(Pt.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}if(t instanceof Request)zt.inject(Pt.active(),t.headers,{set:function(t,e,n){return t.set(e,"string"==typeof n?n:String(n))}});else if(t.headers instanceof Headers)zt.inject(Pt.active(),t.headers,{set:function(t,e,n){return t.set(e,"string"==typeof n?n:String(n))}});else{n={};zt.inject(Pt.active(),n),t.headers=Object.assign({},n,t.headers||{})}},e.prototype._clearResources=function(){0===this._tasksCount&&this._getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},e.prototype._createSpan=function(t,e){var n;if(void 0===e&&(e={}),!function(t,e){var n,r;if(!e)return!1;try{for(var o=Io(e),i=o.next();!i.done;i=o.next())if(Do(t,i.value))return!0}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}(t,this._getConfig().ignoreUrls)){var r=(e.method||"GET").toUpperCase(),o="HTTP "+r;return this.tracer.startSpan(o,{kind:St.CLIENT,attributes:(n={},n[ko.COMPONENT]=this.moduleName,n[_o]=r,n[Eo]=t,n)})}this._diag.debug("ignoring span as url matches ignored url")},e.prototype._findResourceAndAddNetworkEvents=function(t,e,n){var r=e.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType("resource")}var o=jo(e.spanUrl,e.startTime,n,r,this._usedResources,"fetch");if(o.mainRequest){var i=o.mainRequest;this._markResourceAsUsed(i);var a=o.corsPreFlightRequest;a&&(this._addChildSpan(t,a),this._markResourceAsUsed(a)),this._getConfig().ignoreNetworkEvents||Uo(t,i)}},e.prototype._markResourceAsUsed=function(t){this._usedResources.add(t)},e.prototype._endSpan=function(t,e,n){var r=this,o=Ro(Date.now()),i=Lo();this._addFinalSpanAttributes(t,n),setTimeout((function(){var n;null===(n=e.observer)||void 0===n||n.disconnect(),r._findResourceAndAddNetworkEvents(t,e,i),r._tasksCount--,r._clearResources(),t.end(o)}),300)},e.prototype._patchConstructor=function(){var t=this;return function(e){var n=t;return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=this,i=Zo(t[0]instanceof Request?t[0].url:String(t[0])).href,a=t[0]instanceof Request?t[0]:t[1]||{},s=n._createSpan(i,a);if(!s)return e.apply(this,t);var u=n._prepareSpanData(i);function c(t,e){n._applyAttributesAfterFetch(t,a,e),n._endSpan(t,u,{status:e.status||0,statusText:e.message,url:i})}function l(t,e){n._applyAttributesAfterFetch(t,a,e),e.status>=200&&e.status<400?n._endSpan(t,u,e):n._endSpan(t,u,{status:e.status,statusText:e.statusText,url:i})}function p(t,e,n){try{var r=n.clone(),o=n.clone(),i=r.body;if(i){var a=i.getReader(),s=function(){a.read().then((function(e){e.done?l(t,o):s()}),(function(e){c(t,e)}))};s()}else l(t,n)}finally{e(n)}}function f(t,e,n){try{c(t,n)}finally{e(n)}}return new Promise((function(t,r){return Pt.with(Gt.setSpan(Pt.active(),s),(function(){return n._addHeaders(a,i),n._tasksCount++,e.apply(o,a instanceof Request?[a]:[i,a]).then(p.bind(o,s,t),f.bind(o,s,r))}))}))}}},e.prototype._applyAttributesAfterFetch=function(t,e,n){var r=this,o=this._getConfig().applyCustomAttributesOnSpan;o&&function(t,e,n){var r,o;try{o=t()}catch(t){r=t}finally{if(e(r,o),r&&!n)throw r;return o}}((function(){return o(t,e,n)}),(function(t){t&&r._diag.error("applyCustomAttributesOnSpan",t)}),!0)},e.prototype._prepareSpanData=function(t){var e=Lo(),n=[];if("function"!=typeof PerformanceObserver)return{entries:n,startTime:e,spanUrl:t};var r=new PerformanceObserver((function(e){e.getEntries().forEach((function(e){"fetch"===e.initiatorType&&e.name===t&&n.push(e)}))}));return r.observe({entryTypes:["resource"]}),{entries:n,observer:r,startTime:e,spanUrl:t}},e.prototype.enable=function(){(function(t){return"function"==typeof t&&"function"==typeof t.__original&&"function"==typeof t.__unwrap&&!0===t.__wrapped})(fetch)&&(this._unwrap(fo,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(fo,"fetch",this._patchConstructor())},e.prototype.disable=function(){this._unwrap(fo,"fetch"),this._usedResources=new WeakSet},e}(po);!function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"}(Bo||(Bo={}));var Vo,Go="0.44.0";!function(t){t.HTTP_STATUS_TEXT="http.status_text"}(Vo||(Vo={}));var Xo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qo=function(t){function e(e){var n=t.call(this,"@opentelemetry/instrumentation-xml-http-request",Go,e)||this;return n.component="xml-http-request",n.version=Go,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return Xo(e,t),e.prototype.init=function(){},e.prototype._getConfig=function(){return this._config},e.prototype._addHeaders=function(t,e){if(!function(t,e){var n=e||[];return("string"==typeof n||n instanceof RegExp)&&(n=[n]),Br(t).origin===location.origin||n.some((function(e){return In(t,e)}))}(Br(e).href,this._getConfig().propagateTraceHeaderCorsUrls)){var n={};return zt.inject(Pt.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}var r={};zt.inject(Pt.active(),r),Object.keys(r).forEach((function(e){t.setRequestHeader(e,String(r[e]))}))},e.prototype._addChildSpan=function(t,e){var n=this;Pt.with(Gt.setSpan(Pt.active(),t),(function(){var t=n.tracer.startSpan("CORS Preflight",{startTime:e[Ar.FETCH_START]});jr(t,e),t.end(e[Ar.RESPONSE_END])}))},e.prototype._addFinalSpanAttributes=function(t,e,n){if("string"==typeof n){var r=Br(n);void 0!==e.status&&t.setAttribute(Ie,e.status),void 0!==e.statusText&&t.setAttribute(Vo.HTTP_STATUS_TEXT,e.statusText),t.setAttribute(Ne,r.host),t.setAttribute(ke,r.protocol.replace(":","")),t.setAttribute(De,navigator.userAgent)}},e.prototype._applyAttributesAfterXHR=function(t,e){var n=this,r=this._getConfig().applyCustomAttributesOnSpan;"function"==typeof r&&no((function(){return r(t,e)}),(function(t){t&&n._diag.error("applyCustomAttributesOnSpan",t)}),!0)},e.prototype._addResourceObserver=function(t,e){var n=this._xhrMem.get(t);n&&"function"==typeof PerformanceObserver&&"function"==typeof PerformanceResourceTiming&&(n.createdResources={observer:new PerformanceObserver((function(t){var r=t.getEntries(),o=Br(e);r.forEach((function(t){"xmlhttprequest"===t.initiatorType&&t.name===o.href&&n.createdResources&&n.createdResources.entries.push(t)}))})),entries:[]},n.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype._clearResources=function(){0===this._tasksCount&&this._getConfig().clearTimingResources&&(Re.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},e.prototype._findResourceAndAddNetworkEvents=function(t,e,n,r,o){if(n&&r&&o&&t.createdResources){var i=t.createdResources.entries;i&&i.length||(i=Re.getEntriesByType("resource"));var a=Zr(Br(n).href,r,o,i,this._usedResources);if(a.mainRequest){var s=a.mainRequest;this._markResourceAsUsed(s);var u=a.corsPreFlightRequest;u&&(this._addChildSpan(e,u),this._markResourceAsUsed(u)),jr(e,s)}}},e.prototype._cleanPreviousSpanInformation=function(t){var e=this._xhrMem.get(t);if(e){var n=e.callbackToRemoveEvents;n&&n(),this._xhrMem.delete(t)}},e.prototype._createSpan=function(t,e,n){var r;if(!function(t,e){var n,r;if(!e)return!1;try{for(var o=kn(e),i=o.next();!i.done;i=o.next())if(In(t,i.value))return!0}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}(e,this._getConfig().ignoreUrls)){var o=n.toUpperCase(),i=this.tracer.startSpan(o,{kind:St.CLIENT,attributes:(r={},r[Pe]=n,r[Ce]=Br(e).toString(),r)});return i.addEvent(Bo.METHOD_OPEN),this._cleanPreviousSpanInformation(t),this._xhrMem.set(t,{span:i,spanUrl:e}),i}this._diag.debug("ignoring span as url matches ignored url")},e.prototype._markResourceAsUsed=function(t){this._usedResources.add(t)},e.prototype._patchOpen=function(){var t=this;return function(e){var n=t;return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=t[0],i=t[1];return n._createSpan(this,i,o),e.apply(this,t)}}},e.prototype._patchSend=function(){var t=this;function e(e,n){var r=t._xhrMem.get(n);if(r){r.status=n.status,r.statusText=n.statusText,t._xhrMem.delete(n),r.span&&t._applyAttributesAfterXHR(r.span,n);var o=Ke(),i=Date.now();setTimeout((function(){!function(e,n,r,o){var i=n.callbackToRemoveEvents;"function"==typeof i&&i();var a=n.span,s=n.spanUrl,u=n.sendStartTime;a&&(t._findResourceAndAddNetworkEvents(n,a,s,u,r),a.addEvent(e,o),t._addFinalSpanAttributes(a,n,s),a.end(o),t._tasksCount--),t._clearResources()}(e,r,o,i)}),300)}}function n(){e(Bo.EVENT_ERROR,this)}function r(){e(Bo.EVENT_ABORT,this)}function o(){e(Bo.EVENT_TIMEOUT,this)}function i(){this.status<299?e(Bo.EVENT_LOAD,this):e(Bo.EVENT_ERROR,this)}function a(e){e.removeEventListener("abort",r),e.removeEventListener("error",n),e.removeEventListener("load",i),e.removeEventListener("timeout",o);var a=t._xhrMem.get(e);a&&(a.callbackToRemoveEvents=void 0)}return function(e){return function(){for(var s=this,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];var l=t._xhrMem.get(this);if(!l)return e.apply(this,u);var p=l.span,f=l.spanUrl;return p&&f&&Pt.with(Gt.setSpan(Pt.active(),p),(function(){t._tasksCount++,l.sendStartTime=Ke(),p.addEvent(Bo.METHOD_SEND),s.addEventListener("abort",r),s.addEventListener("error",n),s.addEventListener("load",i),s.addEventListener("timeout",o),l.callbackToRemoveEvents=function(){a(s),l.createdResources&&l.createdResources.observer.disconnect()},t._addHeaders(s,f),t._addResourceObserver(s,f)})),e.apply(this,u)}}},e.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),ro(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),ro(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},e.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},e}(eo);const Wo={ignoreUrls:[],propagateTraceHeaderCorsUrls:[]};function Ko(t=Wo){return[new so,new zo(t),new qo(t)]}var Yo="OT_ZONE_CONTEXT",Qo=function(){function t(){this._enabled=!1,this._zoneCounter=0}return t.prototype._activeContextFromZone=function(t){return t&&t.get(Yo)||C},t.prototype._bindFunction=function(t,e){var n=this,r=function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return n.with(t,(function(){return e.apply(r,o)}))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:e.length}),r},t.prototype._bindListener=function(t,e){var n=e;return void 0!==n.__ot_listeners||(n.__ot_listeners={},"function"==typeof n.addEventListener&&(n.addEventListener=this._patchAddEventListener(n,n.addEventListener,t)),"function"==typeof n.removeEventListener&&(n.removeEventListener=this._patchRemoveEventListener(n,n.removeEventListener))),e},t.prototype._createZoneName=function(){this._zoneCounter++;var t=Math.random();return this._zoneCounter+"-"+t},t.prototype._createZone=function(t,e){var n;return Zone.current.fork({name:t,properties:(n={},n[Yo]=e,n)})},t.prototype._getActiveZone=function(){return Zone.current},t.prototype._patchAddEventListener=function(t,e,n){var r=this;return function(o,i,a){void 0===t.__ot_listeners&&(t.__ot_listeners={});var s=t.__ot_listeners[o];void 0===s&&(s=new WeakMap,t.__ot_listeners[o]=s);var u=r.bind(n,i);return s.set(i,u),e.call(this,o,u,a)}},t.prototype._patchRemoveEventListener=function(t,e){return function(n,r){if(void 0===t.__ot_listeners||void 0===t.__ot_listeners[n])return e.call(this,n,r);var o=t.__ot_listeners[n],i=o.get(r);return o.delete(r),e.call(this,n,i||r)}},t.prototype.active=function(){if(!this._enabled)return C;var t=this._getActiveZone(),e=this._activeContextFromZone(t);return e||C},t.prototype.bind=function(t,e){return void 0===t&&(t=this.active()),"function"==typeof e?this._bindFunction(t,e):(void 0===(n=e)&&(n={}),"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener&&this._bindListener(t,e),e);var n},t.prototype.disable=function(){return this._enabled=!1,this},t.prototype.enable=function(){return this._enabled=!0,this},t.prototype.with=function(t,e,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=this._createZoneName(),a=this._createZone(i,t);return a.run(e,n,r)},t}();
|
|
2
2
|
/**
|
|
3
3
|
* @license Angular v14.2.0-next.0
|
|
4
4
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
@@ -11,7 +11,7 @@ var GrafanaFaroWebTracing=function(t,e){"use strict";var n="object"==typeof glob
|
|
|
11
11
|
* Use of this source code is governed by an MIT-style license that can be
|
|
12
12
|
* found in the LICENSE file at https://angular.io/license
|
|
13
13
|
*/
|
|
14
|
-
!function(t){const e=t.performance;function n(t){e&&e.mark&&e.mark(t)}function r(t,n){e&&e.measure&&e.measure(t,n)}n("Zone");const o=t.__Zone_symbol_prefix||"__zone_symbol__";function i(t){return o+t}const a=!0===t[i("forceDuplicateZoneCheck")];if(t.Zone){if(a||"function"!=typeof t.Zone.__symbol__)throw new Error("Zone already loaded.");return t.Zone}class s{constructor(t,e){this._parent=t,this._name=e?e.name||"unnamed":"<root>",this._properties=e&&e.properties||{},this._zoneDelegate=new c(this,this._parent&&this._parent._zoneDelegate,e)}static assertZonePatched(){if(t.Promise!==C.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let t=s.current;for(;t.parent;)t=t.parent;return t}static get current(){return I.zone}static get currentTask(){return x}static __load_patch(e,o,i=!1){if(C.hasOwnProperty(e)){if(!i&&a)throw Error("Already loaded patch: "+e)}else if(!t["__Zone_disable_"+e]){const i="Zone:"+e;n(i),C[e]=o(t,s,N),r(i,i)}}get parent(){return this._parent}get name(){return this._name}get(t){const e=this.getZoneWith(t);if(e)return e._properties[t]}getZoneWith(t){let e=this;for(;e;){if(e._properties.hasOwnProperty(t))return e;e=e._parent}return null}fork(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)}wrap(t,e){if("function"!=typeof t)throw new Error("Expecting function got: "+t);const n=this._zoneDelegate.intercept(this,t,e),r=this;return function(){return r.runGuarded(n,this,arguments,e)}}run(t,e,n,r){I={parent:I,zone:this};try{return this._zoneDelegate.invoke(this,t,e,n,r)}finally{I=I.parent}}runGuarded(t,e=null,n,r){I={parent:I,zone:this};try{try{return this._zoneDelegate.invoke(this,t,e,n,r)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{I=I.parent}}runTask(t,e,n){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||m).name+"; Execution: "+this.name+")");if(t.state===g&&(t.type===A||t.type===L))return;const r=t.state!=b;r&&t._transitionTo(b,S),t.runCount++;const o=x;x=t,I={parent:I,zone:this};try{t.type==L&&t.data&&!t.data.isPeriodic&&(t.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,t,e,n)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{t.state!==g&&t.state!==R&&(t.type==A||t.data&&t.data.isPeriodic?r&&t._transitionTo(S,b):(t.runCount=0,this._updateTaskCount(t,-1),r&&t._transitionTo(g,b,g))),I=I.parent,x=o}}scheduleTask(t){if(t.zone&&t.zone!==this){let e=this;for(;e;){if(e===t.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${t.zone.name}`);e=e.parent}}t._transitionTo(O,g);const e=[];t._zoneDelegates=e,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(e){throw t._transitionTo(R,O,g),this._zoneDelegate.handleError(this,e),e}return t._zoneDelegates===e&&this._updateTaskCount(t,1),t.state==O&&t._transitionTo(S,O),t}scheduleMicroTask(t,e,n,r){return this.scheduleTask(new l(P,t,e,n,r,void 0))}scheduleMacroTask(t,e,n,r,o){return this.scheduleTask(new l(L,t,e,n,r,o))}scheduleEventTask(t,e,n,r,o){return this.scheduleTask(new l(A,t,e,n,r,o))}cancelTask(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||m).name+"; Execution: "+this.name+")");t._transitionTo(w,S,b);try{this._zoneDelegate.cancelTask(this,t)}catch(e){throw t._transitionTo(R,w),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(t,-1),t._transitionTo(g,w),t.runCount=0,t}_updateTaskCount(t,e){const n=t._zoneDelegates;-1==e&&(t._zoneDelegates=null);for(let r=0;r<n.length;r++)n[r]._updateTaskCount(t.type,e)}}s.__symbol__=i;const u={name:"",onHasTask:(t,e,n,r)=>t.hasTask(n,r),onScheduleTask:(t,e,n,r)=>t.scheduleTask(n,r),onInvokeTask:(t,e,n,r,o,i)=>t.invokeTask(n,r,o,i),onCancelTask:(t,e,n,r)=>t.cancelTask(n,r)};class c{constructor(t,e,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=t,this._parentDelegate=e,this._forkZS=n&&(n&&n.onFork?n:e._forkZS),this._forkDlgt=n&&(n.onFork?e:e._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:e._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:e._interceptZS),this._interceptDlgt=n&&(n.onIntercept?e:e._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:e._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:e._invokeZS),this._invokeDlgt=n&&(n.onInvoke?e:e._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:e._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:e._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?e:e._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:e._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:e._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?e:e._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:e._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:e._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?e:e._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:e._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:e._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?e:e._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:e._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const r=n&&n.onHasTask,o=e&&e._hasTaskZS;(r||o)&&(this._hasTaskZS=r?n:u,this._hasTaskDlgt=e,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=t,n.onScheduleTask||(this._scheduleTaskZS=u,this._scheduleTaskDlgt=e,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=u,this._invokeTaskDlgt=e,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=u,this._cancelTaskDlgt=e,this._cancelTaskCurrZone=this.zone))}fork(t,e){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,t,e):new s(t,e)}intercept(t,e,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,t,e,n):e}invoke(t,e,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,t,e,n,r,o):e.apply(n,r)}handleError(t,e){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,t,e)}scheduleTask(t,e){let n=e;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,t,e),n||(n=e);else if(e.scheduleFn)e.scheduleFn(e);else{if(e.type!=P)throw new Error("Task is missing scheduleFn.");E(e)}return n}invokeTask(t,e,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,t,e,n,r):e.callback.apply(n,r)}cancelTask(t,e){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,t,e);else{if(!e.cancelFn)throw Error("Task is not cancelable");n=e.cancelFn(e)}return n}hasTask(t,e){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,t,e)}catch(e){this.handleError(t,e)}}_updateTaskCount(t,e){const n=this._taskCounts,r=n[t],o=n[t]=r+e;if(o<0)throw new Error("More tasks executed then were scheduled.");if(0==r||0==o){const e={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:t};this.hasTask(this.zone,e)}}}class l{constructor(e,n,r,o,i,a){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=e,this.source=n,this.data=o,this.scheduleFn=i,this.cancelFn=a,!r)throw new Error("callback is not defined");this.callback=r;const s=this;e===A&&o&&o.useG?this.invoke=l.invokeTask:this.invoke=function(){return l.invokeTask.call(t,s,this,arguments)}}static invokeTask(t,e,n){t||(t=this),M++;try{return t.runCount++,t.zone.runTask(t,e,n)}finally{1==M&&T(),M--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(g,O)}_transitionTo(t,e,n){if(this._state!==e&&this._state!==n)throw new Error(`${this.type} '${this.source}': can not transition to '${t}', expecting state '${e}'${n?" or '"+n+"'":""}, was '${this._state}'.`);this._state=t,t==g&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const p=i("setTimeout"),f=i("Promise"),h=i("then");let _,d=[],y=!1;function v(e){if(_||t[f]&&(_=t[f].resolve(0)),_){let t=_[h];t||(t=_.then),t.call(_,e)}else t[p](e,0)}function E(t){0===M&&0===d.length&&v(T),t&&d.push(t)}function T(){if(!y){for(y=!0;d.length;){const t=d;d=[];for(let e=0;e<t.length;e++){const n=t[e];try{n.zone.runTask(n,null,null)}catch(t){N.onUnhandledError(t)}}}N.microtaskDrainDone(),y=!1}}const m={name:"NO ZONE"},g="notScheduled",O="scheduling",S="scheduled",b="running",w="canceling",R="unknown",P="microTask",L="macroTask",A="eventTask",C={},N={symbol:i,currentZoneFrame:()=>I,onUnhandledError:k,microtaskDrainDone:k,scheduleMicroTask:E,showUncaughtError:()=>!s[i("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:k,patchMethod:()=>k,bindArguments:()=>[],patchThen:()=>k,patchMacroTask:()=>k,patchEventPrototype:()=>k,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>k,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>k,wrapWithCurrentZone:()=>k,filterProperties:()=>[],attachOriginToPatched:()=>k,_redefineProperty:()=>k,patchCallbacks:()=>k,nativeScheduleMicroTask:v};let I={parent:null,zone:new s(null,null)},x=null,M=0;function k(){}r("Zone","Zone"),t.Zone=s}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||Xi);
|
|
14
|
+
!function(t){const e=t.performance;function n(t){e&&e.mark&&e.mark(t)}function r(t,n){e&&e.measure&&e.measure(t,n)}n("Zone");const o=t.__Zone_symbol_prefix||"__zone_symbol__";function i(t){return o+t}const a=!0===t[i("forceDuplicateZoneCheck")];if(t.Zone){if(a||"function"!=typeof t.Zone.__symbol__)throw new Error("Zone already loaded.");return t.Zone}class s{constructor(t,e){this._parent=t,this._name=e?e.name||"unnamed":"<root>",this._properties=e&&e.properties||{},this._zoneDelegate=new c(this,this._parent&&this._parent._zoneDelegate,e)}static assertZonePatched(){if(t.Promise!==C.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let t=s.current;for(;t.parent;)t=t.parent;return t}static get current(){return k.zone}static get currentTask(){return I}static __load_patch(e,o,i=!1){if(C.hasOwnProperty(e)){if(!i&&a)throw Error("Already loaded patch: "+e)}else if(!t["__Zone_disable_"+e]){const i="Zone:"+e;n(i),C[e]=o(t,s,N),r(i,i)}}get parent(){return this._parent}get name(){return this._name}get(t){const e=this.getZoneWith(t);if(e)return e._properties[t]}getZoneWith(t){let e=this;for(;e;){if(e._properties.hasOwnProperty(t))return e;e=e._parent}return null}fork(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)}wrap(t,e){if("function"!=typeof t)throw new Error("Expecting function got: "+t);const n=this._zoneDelegate.intercept(this,t,e),r=this;return function(){return r.runGuarded(n,this,arguments,e)}}run(t,e,n,r){k={parent:k,zone:this};try{return this._zoneDelegate.invoke(this,t,e,n,r)}finally{k=k.parent}}runGuarded(t,e=null,n,r){k={parent:k,zone:this};try{try{return this._zoneDelegate.invoke(this,t,e,n,r)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{k=k.parent}}runTask(t,e,n){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||g).name+"; Execution: "+this.name+")");if(t.state===m&&(t.type===P||t.type===A))return;const r=t.state!=b;r&&t._transitionTo(b,S),t.runCount++;const o=I;I=t,k={parent:k,zone:this};try{t.type==A&&t.data&&!t.data.isPeriodic&&(t.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,t,e,n)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{t.state!==m&&t.state!==w&&(t.type==P||t.data&&t.data.isPeriodic?r&&t._transitionTo(S,b):(t.runCount=0,this._updateTaskCount(t,-1),r&&t._transitionTo(m,b,m))),k=k.parent,I=o}}scheduleTask(t){if(t.zone&&t.zone!==this){let e=this;for(;e;){if(e===t.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${t.zone.name}`);e=e.parent}}t._transitionTo(O,m);const e=[];t._zoneDelegates=e,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(e){throw t._transitionTo(w,O,m),this._zoneDelegate.handleError(this,e),e}return t._zoneDelegates===e&&this._updateTaskCount(t,1),t.state==O&&t._transitionTo(S,O),t}scheduleMicroTask(t,e,n,r){return this.scheduleTask(new l(L,t,e,n,r,void 0))}scheduleMacroTask(t,e,n,r,o){return this.scheduleTask(new l(A,t,e,n,r,o))}scheduleEventTask(t,e,n,r,o){return this.scheduleTask(new l(P,t,e,n,r,o))}cancelTask(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||g).name+"; Execution: "+this.name+")");t._transitionTo(R,S,b);try{this._zoneDelegate.cancelTask(this,t)}catch(e){throw t._transitionTo(w,R),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(t,-1),t._transitionTo(m,R),t.runCount=0,t}_updateTaskCount(t,e){const n=t._zoneDelegates;-1==e&&(t._zoneDelegates=null);for(let r=0;r<n.length;r++)n[r]._updateTaskCount(t.type,e)}}s.__symbol__=i;const u={name:"",onHasTask:(t,e,n,r)=>t.hasTask(n,r),onScheduleTask:(t,e,n,r)=>t.scheduleTask(n,r),onInvokeTask:(t,e,n,r,o,i)=>t.invokeTask(n,r,o,i),onCancelTask:(t,e,n,r)=>t.cancelTask(n,r)};class c{constructor(t,e,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=t,this._parentDelegate=e,this._forkZS=n&&(n&&n.onFork?n:e._forkZS),this._forkDlgt=n&&(n.onFork?e:e._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:e._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:e._interceptZS),this._interceptDlgt=n&&(n.onIntercept?e:e._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:e._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:e._invokeZS),this._invokeDlgt=n&&(n.onInvoke?e:e._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:e._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:e._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?e:e._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:e._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:e._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?e:e._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:e._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:e._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?e:e._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:e._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:e._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?e:e._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:e._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const r=n&&n.onHasTask,o=e&&e._hasTaskZS;(r||o)&&(this._hasTaskZS=r?n:u,this._hasTaskDlgt=e,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=t,n.onScheduleTask||(this._scheduleTaskZS=u,this._scheduleTaskDlgt=e,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=u,this._invokeTaskDlgt=e,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=u,this._cancelTaskDlgt=e,this._cancelTaskCurrZone=this.zone))}fork(t,e){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,t,e):new s(t,e)}intercept(t,e,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,t,e,n):e}invoke(t,e,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,t,e,n,r,o):e.apply(n,r)}handleError(t,e){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,t,e)}scheduleTask(t,e){let n=e;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,t,e),n||(n=e);else if(e.scheduleFn)e.scheduleFn(e);else{if(e.type!=L)throw new Error("Task is missing scheduleFn.");T(e)}return n}invokeTask(t,e,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,t,e,n,r):e.callback.apply(n,r)}cancelTask(t,e){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,t,e);else{if(!e.cancelFn)throw Error("Task is not cancelable");n=e.cancelFn(e)}return n}hasTask(t,e){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,t,e)}catch(e){this.handleError(t,e)}}_updateTaskCount(t,e){const n=this._taskCounts,r=n[t],o=n[t]=r+e;if(o<0)throw new Error("More tasks executed then were scheduled.");if(0==r||0==o){const e={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:t};this.hasTask(this.zone,e)}}}class l{constructor(e,n,r,o,i,a){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=e,this.source=n,this.data=o,this.scheduleFn=i,this.cancelFn=a,!r)throw new Error("callback is not defined");this.callback=r;const s=this;e===P&&o&&o.useG?this.invoke=l.invokeTask:this.invoke=function(){return l.invokeTask.call(t,s,this,arguments)}}static invokeTask(t,e,n){t||(t=this),D++;try{return t.runCount++,t.zone.runTask(t,e,n)}finally{1==D&&y(),D--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(m,O)}_transitionTo(t,e,n){if(this._state!==e&&this._state!==n)throw new Error(`${this.type} '${this.source}': can not transition to '${t}', expecting state '${e}'${n?" or '"+n+"'":""}, was '${this._state}'.`);this._state=t,t==m&&(this._zoneDelegates=null)}toString(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const p=i("setTimeout"),f=i("Promise"),h=i("then");let _,d=[],E=!1;function v(e){if(_||t[f]&&(_=t[f].resolve(0)),_){let t=_[h];t||(t=_.then),t.call(_,e)}else t[p](e,0)}function T(t){0===D&&0===d.length&&v(y),t&&d.push(t)}function y(){if(!E){for(E=!0;d.length;){const t=d;d=[];for(let e=0;e<t.length;e++){const n=t[e];try{n.zone.runTask(n,null,null)}catch(t){N.onUnhandledError(t)}}}N.microtaskDrainDone(),E=!1}}const g={name:"NO ZONE"},m="notScheduled",O="scheduling",S="scheduled",b="running",R="canceling",w="unknown",L="microTask",A="macroTask",P="eventTask",C={},N={symbol:i,currentZoneFrame:()=>k,onUnhandledError:M,microtaskDrainDone:M,scheduleMicroTask:T,showUncaughtError:()=>!s[i("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:M,patchMethod:()=>M,bindArguments:()=>[],patchThen:()=>M,patchMacroTask:()=>M,patchEventPrototype:()=>M,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>M,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>M,wrapWithCurrentZone:()=>M,filterProperties:()=>[],attachOriginToPatched:()=>M,_redefineProperty:()=>M,patchCallbacks:()=>M,nativeScheduleMicroTask:v};let k={parent:null,zone:new s(null,null)},I=null,D=0;function M(){}r("Zone","Zone"),t.Zone=s}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||zr);
|
|
15
15
|
/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -19,14 +19,14 @@ var GrafanaFaroWebTracing=function(t,e){"use strict";var n="object"==typeof glob
|
|
|
19
19
|
* Use of this source code is governed by an MIT-style license that can be
|
|
20
20
|
* found in the LICENSE file at https://angular.io/license
|
|
21
21
|
*/
|
|
22
|
-
const
|
|
22
|
+
const $o=Object.getOwnPropertyDescriptor,Jo=Object.defineProperty,ti=Object.getPrototypeOf,ei=Object.create,ni=Array.prototype.slice,ri="addEventListener",oi="removeEventListener",ii=Zone.__symbol__(ri),ai=Zone.__symbol__(oi),si="true",ui="false",ci=Zone.__symbol__("");function li(t,e){return Zone.current.wrap(t,e)}function pi(t,e,n,r,o){return Zone.current.scheduleMacroTask(t,e,n,r,o)}const fi=Zone.__symbol__,hi="undefined"!=typeof window,_i=hi?window:void 0,di=hi&&_i||"object"==typeof self&&self||zr;function Ei(t,e){for(let n=t.length-1;n>=0;n--)"function"==typeof t[n]&&(t[n]=li(t[n],e+"_"+n));return t}function vi(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&void 0===t.set)}const Ti="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,yi=!("nw"in di)&&void 0!==di.process&&"[object process]"==={}.toString.call(di.process),gi=!yi&&!Ti&&!(!hi||!_i.HTMLElement),mi=void 0!==di.process&&"[object process]"==={}.toString.call(di.process)&&!Ti&&!(!hi||!_i.HTMLElement),Oi={},Si=function(t){if(!(t=t||di.event))return;let e=Oi[t.type];e||(e=Oi[t.type]=fi("ON_PROPERTY"+t.type));const n=this||t.target||di,r=n[e];let o;if(gi&&n===_i&&"error"===t.type){const e=t;o=r&&r.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===o&&t.preventDefault()}else o=r&&r.apply(this,arguments),null==o||o||t.preventDefault();return o};function bi(t,e,n){let r=$o(t,e);if(!r&&n){$o(n,e)&&(r={enumerable:!0,configurable:!0})}if(!r||!r.configurable)return;const o=fi("on"+e+"patched");if(t.hasOwnProperty(o)&&t[o])return;delete r.writable,delete r.value;const i=r.get,a=r.set,s=e.slice(2);let u=Oi[s];u||(u=Oi[s]=fi("ON_PROPERTY"+s)),r.set=function(e){let n=this;if(n||t!==di||(n=di),!n)return;"function"==typeof n[u]&&n.removeEventListener(s,Si),a&&a.call(n,null),n[u]=e,"function"==typeof e&&n.addEventListener(s,Si,!1)},r.get=function(){let n=this;if(n||t!==di||(n=di),!n)return null;const o=n[u];if(o)return o;if(i){let t=i.call(this);if(t)return r.set.call(this,t),"function"==typeof n.removeAttribute&&n.removeAttribute(e),t}return null},Jo(t,e,r),t[o]=!0}function Ri(t,e,n){if(e)for(let r=0;r<e.length;r++)bi(t,"on"+e[r],n);else{const e=[];for(const n in t)"on"==n.slice(0,2)&&e.push(n);for(let r=0;r<e.length;r++)bi(t,e[r],n)}}const wi=fi("originalInstance");function Li(t){const e=di[t];if(!e)return;di[fi(t)]=e,di[t]=function(){const n=Ei(arguments,t);switch(n.length){case 0:this[wi]=new e;break;case 1:this[wi]=new e(n[0]);break;case 2:this[wi]=new e(n[0],n[1]);break;case 3:this[wi]=new e(n[0],n[1],n[2]);break;case 4:this[wi]=new e(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}},Ci(di[t],e);const n=new e((function(){}));let r;for(r in n)"XMLHttpRequest"===t&&"responseBlob"===r||function(e){"function"==typeof n[e]?di[t].prototype[e]=function(){return this[wi][e].apply(this[wi],arguments)}:Jo(di[t].prototype,e,{set:function(n){"function"==typeof n?(this[wi][e]=li(n,t+"."+e),Ci(this[wi][e],n)):this[wi][e]=n},get:function(){return this[wi][e]}})}(r);for(r in e)"prototype"!==r&&e.hasOwnProperty(r)&&(di[t][r]=e[r])}function Ai(t,e,n){let r=t;for(;r&&!r.hasOwnProperty(e);)r=ti(r);!r&&t[e]&&(r=t);const o=fi(e);let i=null;if(r&&(!(i=r[o])||!r.hasOwnProperty(o))){i=r[o]=r[e];if(vi(r&&$o(r,e))){const t=n(i,o,e);r[e]=function(){return t(this,arguments)},Ci(r[e],i)}}return i}function Pi(t,e,n){let r=null;function o(t){const e=t.data;return e.args[e.cbIdx]=function(){t.invoke.apply(this,arguments)},r.apply(e.target,e.args),t}r=Ai(t,e,(t=>function(e,r){const i=n(e,r);return i.cbIdx>=0&&"function"==typeof r[i.cbIdx]?pi(i.name,r[i.cbIdx],i,o):t.apply(e,r)}))}function Ci(t,e){t[fi("OriginalDelegate")]=e}let Ni=!1,ki=!1;function Ii(){try{const t=_i.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch(t){}return!1}function Di(){if(Ni)return ki;Ni=!0;try{const t=_i.navigator.userAgent;-1===t.indexOf("MSIE ")&&-1===t.indexOf("Trident/")&&-1===t.indexOf("Edge/")||(ki=!0)}catch(t){}return ki}
|
|
23
23
|
/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright Google LLC All Rights Reserved.
|
|
26
26
|
*
|
|
27
27
|
* Use of this source code is governed by an MIT-style license that can be
|
|
28
28
|
* found in the LICENSE file at https://angular.io/license
|
|
29
|
-
*/Zone.__load_patch("ZoneAwarePromise",((t,e,n)=>{const r=Object.getOwnPropertyDescriptor,o=Object.defineProperty;const i=n.symbol,a=[],s=!0===t[i("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],u=i("Promise"),c=i("then");n.onUnhandledError=t=>{if(n.showUncaughtError()){const e=t&&t.rejection;e?console.error("Unhandled Promise rejection:",e instanceof Error?e.message:e,"; Zone:",t.zone.name,"; Task:",t.task&&t.task.source,"; Value:",e,e instanceof Error?e.stack:void 0):console.error(t)}},n.microtaskDrainDone=()=>{for(;a.length;){const t=a.shift();try{t.zone.runGuarded((()=>{if(t.throwOriginal)throw t.rejection;throw t}))}catch(t){p(t)}}};const l=i("unhandledPromiseRejectionHandler");function p(t){n.onUnhandledError(t);try{const n=e[l];"function"==typeof n&&n.call(this,t)}catch(t){}}function f(t){return t&&t.then}function h(t){return t}function _(t){return
|
|
29
|
+
*/Zone.__load_patch("ZoneAwarePromise",((t,e,n)=>{const r=Object.getOwnPropertyDescriptor,o=Object.defineProperty;const i=n.symbol,a=[],s=!0===t[i("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],u=i("Promise"),c=i("then");n.onUnhandledError=t=>{if(n.showUncaughtError()){const e=t&&t.rejection;e?console.error("Unhandled Promise rejection:",e instanceof Error?e.message:e,"; Zone:",t.zone.name,"; Task:",t.task&&t.task.source,"; Value:",e,e instanceof Error?e.stack:void 0):console.error(t)}},n.microtaskDrainDone=()=>{for(;a.length;){const t=a.shift();try{t.zone.runGuarded((()=>{if(t.throwOriginal)throw t.rejection;throw t}))}catch(t){p(t)}}};const l=i("unhandledPromiseRejectionHandler");function p(t){n.onUnhandledError(t);try{const n=e[l];"function"==typeof n&&n.call(this,t)}catch(t){}}function f(t){return t&&t.then}function h(t){return t}function _(t){return k.reject(t)}const d=i("state"),E=i("value"),v=i("finally"),T=i("parentPromiseValue"),y=i("parentPromiseState"),g=null,m=!0,O=!1;function S(t,e){return n=>{try{w(t,e,n)}catch(e){w(t,!1,e)}}}const b=function(){let t=!1;return function(e){return function(){t||(t=!0,e.apply(null,arguments))}}},R=i("currentTaskTrace");function w(t,r,i){const u=b();if(t===i)throw new TypeError("Promise resolved with itself");if(t[d]===g){let c=null;try{"object"!=typeof i&&"function"!=typeof i||(c=i&&i.then)}catch(e){return u((()=>{w(t,!1,e)}))(),t}if(r!==O&&i instanceof k&&i.hasOwnProperty(d)&&i.hasOwnProperty(E)&&i[d]!==g)A(i),w(t,i[d],i[E]);else if(r!==O&&"function"==typeof c)try{c.call(i,u(S(t,r)),u(S(t,!1)))}catch(e){u((()=>{w(t,!1,e)}))()}else{t[d]=r;const u=t[E];if(t[E]=i,t[v]===v&&r===m&&(t[d]=t[y],t[E]=t[T]),r===O&&i instanceof Error){const t=e.currentTask&&e.currentTask.data&&e.currentTask.data.__creationTrace__;t&&o(i,R,{configurable:!0,enumerable:!1,writable:!0,value:t})}for(let e=0;e<u.length;)P(t,u[e++],u[e++],u[e++],u[e++]);if(0==u.length&&r==O){t[d]=0;let r=i;try{throw new Error("Uncaught (in promise): "+function(t){if(t&&t.toString===Object.prototype.toString){return(t.constructor&&t.constructor.name||"")+": "+JSON.stringify(t)}return t?t.toString():Object.prototype.toString.call(t)}(i)+(i&&i.stack?"\n"+i.stack:""))}catch(t){r=t}s&&(r.throwOriginal=!0),r.rejection=i,r.promise=t,r.zone=e.current,r.task=e.currentTask,a.push(r),n.scheduleMicroTask()}}}return t}const L=i("rejectionHandledHandler");function A(t){if(0===t[d]){try{const n=e[L];n&&"function"==typeof n&&n.call(this,{rejection:t[E],promise:t})}catch(t){}t[d]=O;for(let e=0;e<a.length;e++)t===a[e].promise&&a.splice(e,1)}}function P(t,e,n,r,o){A(t);const i=t[d],a=i?"function"==typeof r?r:h:"function"==typeof o?o:_;e.scheduleMicroTask("Promise.then",(()=>{try{const r=t[E],o=!!n&&v===n[v];o&&(n[T]=r,n[y]=i);const s=e.run(a,void 0,o&&a!==_&&a!==h?[]:[r]);w(n,!0,s)}catch(t){w(n,!1,t)}}),n)}const C=function(){},N=t.AggregateError;class k{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(t){return w(new this(null),m,t)}static reject(t){return w(new this(null),O,t)}static any(t){if(!t||"function"!=typeof t[Symbol.iterator])return Promise.reject(new N([],"All promises were rejected"));const e=[];let n=0;try{for(let r of t)n++,e.push(k.resolve(r))}catch(t){return Promise.reject(new N([],"All promises were rejected"))}if(0===n)return Promise.reject(new N([],"All promises were rejected"));let r=!1;const o=[];return new k(((t,i)=>{for(let a=0;a<e.length;a++)e[a].then((e=>{r||(r=!0,t(e))}),(t=>{o.push(t),n--,0===n&&(r=!0,i(new N(o,"All promises were rejected")))}))}))}static race(t){let e,n,r=new this(((t,r)=>{e=t,n=r}));function o(t){e(t)}function i(t){n(t)}for(let e of t)f(e)||(e=this.resolve(e)),e.then(o,i);return r}static all(t){return k.allWithCallback(t)}static allSettled(t){return(this&&this.prototype instanceof k?this:k).allWithCallback(t,{thenCallback:t=>({status:"fulfilled",value:t}),errorCallback:t=>({status:"rejected",reason:t})})}static allWithCallback(t,e){let n,r,o=new this(((t,e)=>{n=t,r=e})),i=2,a=0;const s=[];for(let o of t){f(o)||(o=this.resolve(o));const t=a;try{o.then((r=>{s[t]=e?e.thenCallback(r):r,i--,0===i&&n(s)}),(o=>{e?(s[t]=e.errorCallback(o),i--,0===i&&n(s)):r(o)}))}catch(t){r(t)}i++,a++}return i-=2,0===i&&n(s),o}constructor(t){const e=this;if(!(e instanceof k))throw new Error("Must be an instanceof Promise.");e[d]=g,e[E]=[];try{const n=b();t&&t(n(S(e,m)),n(S(e,O)))}catch(t){w(e,!1,t)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return k}then(t,n){var r;let o=null===(r=this.constructor)||void 0===r?void 0:r[Symbol.species];o&&"function"==typeof o||(o=this.constructor||k);const i=new o(C),a=e.current;return this[d]==g?this[E].push(a,i,t,n):P(this,a,i,t,n),i}catch(t){return this.then(null,t)}finally(t){var n;let r=null===(n=this.constructor)||void 0===n?void 0:n[Symbol.species];r&&"function"==typeof r||(r=k);const o=new r(C);o[v]=v;const i=e.current;return this[d]==g?this[E].push(i,o,t,t):P(this,i,o,t,t),o}}k.resolve=k.resolve,k.reject=k.reject,k.race=k.race,k.all=k.all;const I=t[u]=t.Promise;t.Promise=k;const D=i("thenPatched");function M(t){const e=t.prototype,n=r(e,"then");if(n&&(!1===n.writable||!n.configurable))return;const o=e.then;e[c]=o,t.prototype.then=function(t,e){return new k(((t,e)=>{o.call(this,t,e)})).then(t,e)},t[D]=!0}return n.patchThen=M,I&&(M(I),Ai(t,"fetch",(t=>{return e=t,function(t,n){let r=e.apply(t,n);if(r instanceof k)return r;let o=r.constructor;return o[D]||M(o),r};var e}))),Promise[e.__symbol__("uncaughtPromiseErrors")]=a,k})),
|
|
30
30
|
/**
|
|
31
31
|
* @license
|
|
32
32
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -34,7 +34,7 @@ const oc=Object.getOwnPropertyDescriptor,ic=Object.defineProperty,ac=Object.getP
|
|
|
34
34
|
* Use of this source code is governed by an MIT-style license that can be
|
|
35
35
|
* found in the LICENSE file at https://angular.io/license
|
|
36
36
|
*/
|
|
37
|
-
Zone.__load_patch("toString",(t=>{const e=Function.prototype.toString,n=
|
|
37
|
+
Zone.__load_patch("toString",(t=>{const e=Function.prototype.toString,n=fi("OriginalDelegate"),r=fi("Promise"),o=fi("Error"),i=function(){if("function"==typeof this){const i=this[n];if(i)return"function"==typeof i?e.call(i):Object.prototype.toString.call(i);if(this===Promise){const n=t[r];if(n)return e.call(n)}if(this===Error){const n=t[o];if(n)return e.call(n)}}return e.call(this)};i[n]=e,Function.prototype.toString=i;const a=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":a.call(this)}}));
|
|
38
38
|
/**
|
|
39
39
|
* @license
|
|
40
40
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -42,28 +42,28 @@ Zone.__load_patch("toString",(t=>{const e=Function.prototype.toString,n=Ec("Orig
|
|
|
42
42
|
* Use of this source code is governed by an MIT-style license that can be
|
|
43
43
|
* found in the LICENSE file at https://angular.io/license
|
|
44
44
|
*/
|
|
45
|
-
let
|
|
45
|
+
let Mi=!1;if("undefined"!=typeof window)try{const t=Object.defineProperty({},"passive",{get:function(){Mi=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){Mi=!1}const xi={useG:!0},Ui={},ji={},Zi=new RegExp("^"+ci+"(\\w+)(true|false)$"),Bi=fi("propagationStopped");function Fi(t,e){const n=(e?e(t):t)+ui,r=(e?e(t):t)+si,o=ci+n,i=ci+r;Ui[t]={},Ui[t][ui]=o,Ui[t][si]=i}function Hi(t,e,n,r){const o=r&&r.add||ri,i=r&&r.rm||oi,a=r&&r.listeners||"eventListeners",s=r&&r.rmAll||"removeAllListeners",u=fi(o),c="."+o+":",l="prependListener",p="."+l+":",f=function(t,e,n){if(t.isRemoved)return;const r=t.callback;let o;"object"==typeof r&&r.handleEvent&&(t.callback=t=>r.handleEvent(t),t.originalDelegate=r);try{t.invoke(t,e,[n])}catch(t){o=t}const a=t.options;if(a&&"object"==typeof a&&a.once){const r=t.originalDelegate?t.originalDelegate:t.callback;e[i].call(e,n.type,r,a)}return o};function h(n,r,o){if(!(r=r||t.event))return;const i=n||r.target||t,a=i[Ui[r.type][o?si:ui]];if(a){const t=[];if(1===a.length){const e=f(a[0],i,r);e&&t.push(e)}else{const e=a.slice();for(let n=0;n<e.length&&(!r||!0!==r[Bi]);n++){const o=f(e[n],i,r);o&&t.push(o)}}if(1===t.length)throw t[0];for(let n=0;n<t.length;n++){const r=t[n];e.nativeScheduleMicroTask((()=>{throw r}))}}}const _=function(t){return h(this,t,!1)},d=function(t){return h(this,t,!0)};function E(e,n){if(!e)return!1;let r=!0;n&&void 0!==n.useG&&(r=n.useG);const f=n&&n.vh;let h=!0;n&&void 0!==n.chkDup&&(h=n.chkDup);let E=!1;n&&void 0!==n.rt&&(E=n.rt);let v=e;for(;v&&!v.hasOwnProperty(o);)v=ti(v);if(!v&&e[o]&&(v=e),!v)return!1;if(v[u])return!1;const T=n&&n.eventNameToString,y={},g=v[u]=v[o],m=v[fi(i)]=v[i],O=v[fi(a)]=v[a],S=v[fi(s)]=v[s];let b;function R(t,e){return!Mi&&"object"==typeof t&&t?!!t.capture:Mi&&e?"boolean"==typeof t?{capture:t,passive:!0}:t?"object"==typeof t&&!1!==t.passive?Object.assign(Object.assign({},t),{passive:!0}):t:{passive:!0}:t}n&&n.prepend&&(b=v[fi(n.prepend)]=v[n.prepend]);const w=function(t){return b.call(y.target,y.eventName,t.invoke,y.options)},L=r?function(t){if(!y.isExisting)return g.call(y.target,y.eventName,y.capture?d:_,y.options)}:function(t){return g.call(y.target,y.eventName,t.invoke,y.options)},A=r?function(t){if(!t.isRemoved){const e=Ui[t.eventName];let n;e&&(n=e[t.capture?si:ui]);const r=n&&t.target[n];if(r)for(let e=0;e<r.length;e++){if(r[e]===t){r.splice(e,1),t.isRemoved=!0,0===r.length&&(t.allRemoved=!0,t.target[n]=null);break}}}if(t.allRemoved)return m.call(t.target,t.eventName,t.capture?d:_,t.options)}:function(t){return m.call(t.target,t.eventName,t.invoke,t.options)},P=n&&n.diff?n.diff:function(t,e){const n=typeof e;return"function"===n&&t.callback===e||"object"===n&&t.originalDelegate===e},C=Zone[fi("UNPATCHED_EVENTS")],N=t[fi("PASSIVE_EVENTS")],k=function(e,o,i,a,s=!1,u=!1){return function(){const c=this||t;let l=arguments[0];n&&n.transferEventName&&(l=n.transferEventName(l));let p=arguments[1];if(!p)return e.apply(this,arguments);if(yi&&"uncaughtException"===l)return e.apply(this,arguments);let _=!1;if("function"!=typeof p){if(!p.handleEvent)return e.apply(this,arguments);_=!0}if(f&&!f(e,p,c,arguments))return;const d=Mi&&!!N&&-1!==N.indexOf(l),E=R(arguments[2],d);if(C)for(let t=0;t<C.length;t++)if(l===C[t])return d?e.call(c,l,p,E):e.apply(this,arguments);const v=!!E&&("boolean"==typeof E||E.capture),g=!(!E||"object"!=typeof E)&&E.once,m=Zone.current;let O=Ui[l];O||(Fi(l,T),O=Ui[l]);const S=O[v?si:ui];let b,w=c[S],L=!1;if(w){if(L=!0,h)for(let t=0;t<w.length;t++)if(P(w[t],p))return}else w=c[S]=[];const A=c.constructor.name,k=ji[A];k&&(b=k[l]),b||(b=A+o+(T?T(l):l)),y.options=E,g&&(y.options.once=!1),y.target=c,y.capture=v,y.eventName=l,y.isExisting=L;const I=r?xi:void 0;I&&(I.taskData=y);const D=m.scheduleEventTask(b,p,I,i,a);return y.target=null,I&&(I.taskData=null),g&&(E.once=!0),(Mi||"boolean"!=typeof D.options)&&(D.options=E),D.target=c,D.capture=v,D.eventName=l,_&&(D.originalDelegate=p),u?w.unshift(D):w.push(D),s?c:void 0}};return v[o]=k(g,c,L,A,E),b&&(v[l]=k(b,p,w,A,E,!0)),v[i]=function(){const e=this||t;let r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));const o=arguments[2],i=!!o&&("boolean"==typeof o||o.capture),a=arguments[1];if(!a)return m.apply(this,arguments);if(f&&!f(m,a,e,arguments))return;const s=Ui[r];let u;s&&(u=s[i?si:ui]);const c=u&&e[u];if(c)for(let t=0;t<c.length;t++){const n=c[t];if(P(n,a)){if(c.splice(t,1),n.isRemoved=!0,0===c.length&&(n.allRemoved=!0,e[u]=null,"string"==typeof r)){e[ci+"ON_PROPERTY"+r]=null}return n.zone.cancelTask(n),E?e:void 0}}return m.apply(this,arguments)},v[a]=function(){const e=this||t;let r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));const o=[],i=zi(e,T?T(r):r);for(let t=0;t<i.length;t++){const e=i[t];let n=e.originalDelegate?e.originalDelegate:e.callback;o.push(n)}return o},v[s]=function(){const e=this||t;let r=arguments[0];if(r){n&&n.transferEventName&&(r=n.transferEventName(r));const t=Ui[r];if(t){const n=t[ui],o=t[si],a=e[n],s=e[o];if(a){const t=a.slice();for(let e=0;e<t.length;e++){const n=t[e];let o=n.originalDelegate?n.originalDelegate:n.callback;this[i].call(this,r,o,n.options)}}if(s){const t=s.slice();for(let e=0;e<t.length;e++){const n=t[e];let o=n.originalDelegate?n.originalDelegate:n.callback;this[i].call(this,r,o,n.options)}}}}else{const t=Object.keys(e);for(let e=0;e<t.length;e++){const n=t[e],r=Zi.exec(n);let o=r&&r[1];o&&"removeListener"!==o&&this[s].call(this,o)}this[s].call(this,"removeListener")}if(E)return this},Ci(v[o],g),Ci(v[i],m),S&&Ci(v[s],S),O&&Ci(v[a],O),!0}let v=[];for(let t=0;t<n.length;t++)v[t]=E(n[t],r);return v}function zi(t,e){if(!e){const n=[];for(let r in t){const o=Zi.exec(r);let i=o&&o[1];if(i&&(!e||i===e)){const e=t[r];if(e)for(let t=0;t<e.length;t++)n.push(e[t])}}return n}let n=Ui[e];n||(Fi(e),n=Ui[e]);const r=t[n[ui]],o=t[n[si]];return r?o?r.concat(o):r.slice():o?o.slice():[]}function Vi(t,e){const n=t.Event;n&&n.prototype&&e.patchMethod(n.prototype,"stopImmediatePropagation",(t=>function(e,n){e[Bi]=!0,t&&t.apply(e,n)}))}
|
|
46
46
|
/**
|
|
47
47
|
* @license
|
|
48
48
|
* Copyright Google LLC All Rights Reserved.
|
|
49
49
|
*
|
|
50
50
|
* Use of this source code is governed by an MIT-style license that can be
|
|
51
51
|
* found in the LICENSE file at https://angular.io/license
|
|
52
|
-
*/function
|
|
52
|
+
*/function Gi(t,e,n,r,o){const i=Zone.__symbol__(r);if(e[i])return;const a=e[i]=e[r];e[r]=function(i,s,u){return s&&s.prototype&&o.forEach((function(e){const o=`${n}.${r}::`+e,i=s.prototype;try{if(i.hasOwnProperty(e)){const n=t.ObjectGetOwnPropertyDescriptor(i,e);n&&n.value?(n.value=t.wrapWithCurrentZone(n.value,o),t._redefineProperty(s.prototype,e,n)):i[e]&&(i[e]=t.wrapWithCurrentZone(i[e],o))}else i[e]&&(i[e]=t.wrapWithCurrentZone(i[e],o))}catch(t){}})),a.call(e,i,s,u)},t.attachOriginToPatched(e[r],a)}
|
|
53
53
|
/**
|
|
54
54
|
* @license
|
|
55
55
|
* Copyright Google LLC All Rights Reserved.
|
|
56
56
|
*
|
|
57
57
|
* Use of this source code is governed by an MIT-style license that can be
|
|
58
58
|
* found in the LICENSE file at https://angular.io/license
|
|
59
|
-
*/function
|
|
59
|
+
*/function Xi(t,e,n){if(!n||0===n.length)return e;const r=n.filter((e=>e.target===t));if(!r||0===r.length)return e;const o=r[0].ignoreProperties;return e.filter((t=>-1===o.indexOf(t)))}function qi(t,e,n,r){if(!t)return;Ri(t,Xi(t,e,n),r)}function Wi(t){return Object.getOwnPropertyNames(t).filter((t=>t.startsWith("on")&&t.length>2)).map((t=>t.substring(2)))}function Ki(t,e){if(yi&&!mi)return;if(Zone[t.symbol("patchEvents")])return;const n=e.__Zone_ignore_on_properties;let r=[];if(gi){const t=window;r=r.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const e=Ii()?[{target:t,ignoreProperties:["error"]}]:[];qi(t,Wi(t),n?n.concat(e):n,ti(t))}r=r.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let t=0;t<r.length;t++){const o=e[r[t]];o&&o.prototype&&qi(o.prototype,Wi(o.prototype),n)}}
|
|
60
60
|
/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright Google LLC All Rights Reserved.
|
|
63
63
|
*
|
|
64
64
|
* Use of this source code is governed by an MIT-style license that can be
|
|
65
65
|
* found in the LICENSE file at https://angular.io/license
|
|
66
|
-
*/Zone.__load_patch("util",((t,e,n)=>{const r=
|
|
66
|
+
*/Zone.__load_patch("util",((t,e,n)=>{const r=Wi(t);n.patchOnProperties=Ri,n.patchMethod=Ai,n.bindArguments=Ei,n.patchMacroTask=Pi;const o=e.__symbol__("BLACK_LISTED_EVENTS"),i=e.__symbol__("UNPATCHED_EVENTS");t[i]&&(t[o]=t[i]),t[o]&&(e[o]=e[i]=t[o]),n.patchEventPrototype=Vi,n.patchEventTarget=Hi,n.isIEOrEdge=Di,n.ObjectDefineProperty=Jo,n.ObjectGetOwnPropertyDescriptor=$o,n.ObjectCreate=ei,n.ArraySlice=ni,n.patchClass=Li,n.wrapWithCurrentZone=li,n.filterProperties=Xi,n.attachOriginToPatched=Ci,n._redefineProperty=Object.defineProperty,n.patchCallbacks=Gi,n.getGlobalObjects=()=>({globalSources:ji,zoneSymbolEventNames:Ui,eventNames:r,isBrowser:gi,isMix:mi,isNode:yi,TRUE_STR:si,FALSE_STR:ui,ZONE_SYMBOL_PREFIX:ci,ADD_EVENT_LISTENER_STR:ri,REMOVE_EVENT_LISTENER_STR:oi})}));
|
|
67
67
|
/**
|
|
68
68
|
* @license
|
|
69
69
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -71,7 +71,7 @@ let Gc=!1;if("undefined"!=typeof window)try{const t=Object.defineProperty({},"pa
|
|
|
71
71
|
* Use of this source code is governed by an MIT-style license that can be
|
|
72
72
|
* found in the LICENSE file at https://angular.io/license
|
|
73
73
|
*/
|
|
74
|
-
const
|
|
74
|
+
const Yi=fi("zoneTask");function Qi(t,e,n,r){let o=null,i=null;n+=r;const a={};function s(e){const n=e.data;return n.args[0]=function(){return e.invoke.apply(this,arguments)},n.handleId=o.apply(t,n.args),e}function u(e){return i.call(t,e.data.handleId)}o=Ai(t,e+=r,(n=>function(o,i){if("function"==typeof i[0]){const t={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?i[1]||0:void 0,args:i},n=i[0];i[0]=function(){try{return n.apply(this,arguments)}finally{t.isPeriodic||("number"==typeof t.handleId?delete a[t.handleId]:t.handleId&&(t.handleId[Yi]=null))}};const o=pi(e,i[0],t,s,u);if(!o)return o;const c=o.data.handleId;return"number"==typeof c?a[c]=o:c&&(c[Yi]=o),c&&c.ref&&c.unref&&"function"==typeof c.ref&&"function"==typeof c.unref&&(o.ref=c.ref.bind(c),o.unref=c.unref.bind(c)),"number"==typeof c||c?c:o}return n.apply(t,i)})),i=Ai(t,n,(e=>function(n,r){const o=r[0];let i;"number"==typeof o?i=a[o]:(i=o&&o[Yi],i||(i=o)),i&&"string"==typeof i.type?"notScheduled"!==i.state&&(i.cancelFn&&i.data.isPeriodic||0===i.runCount)&&("number"==typeof o?delete a[o]:o&&(o[Yi]=null),i.zone.cancelTask(i)):e.apply(t,r)}))}
|
|
75
75
|
/**
|
|
76
76
|
* @license
|
|
77
77
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -86,7 +86,7 @@ const nl=Ec("zoneTask");function rl(t,e,n,r){let o=null,i=null;n+=r;const a={};f
|
|
|
86
86
|
* Use of this source code is governed by an MIT-style license that can be
|
|
87
87
|
* found in the LICENSE file at https://angular.io/license
|
|
88
88
|
*/
|
|
89
|
-
function
|
|
89
|
+
function $i(t,e){if(Zone[e.symbol("patchEventTarget")])return;const{eventNames:n,zoneSymbolEventNames:r,TRUE_STR:o,FALSE_STR:i,ZONE_SYMBOL_PREFIX:a}=e.getGlobalObjects();for(let t=0;t<n.length;t++){const e=n[t],s=a+(e+i),u=a+(e+o);r[e]={},r[e][i]=s,r[e][o]=u}const s=t.EventTarget;return s&&s.prototype?(e.patchEventTarget(t,e,[s&&s.prototype]),!0):void 0}
|
|
90
90
|
/**
|
|
91
91
|
* @license
|
|
92
92
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -94,4 +94,4 @@ function ol(t,e){if(Zone[e.symbol("patchEventTarget")])return;const{eventNames:n
|
|
|
94
94
|
* Use of this source code is governed by an MIT-style license that can be
|
|
95
95
|
* found in the LICENSE file at https://angular.io/license
|
|
96
96
|
*/
|
|
97
|
-
Zone.__load_patch("legacy",(t=>{const e=t[Zone.__symbol__("legacyPatch")];e&&e()})),Zone.__load_patch("queueMicrotask",((t,e,n)=>{n.patchMethod(t,"queueMicrotask",(t=>function(t,n){e.current.scheduleMicroTask("queueMicrotask",n[0])}))})),Zone.__load_patch("timers",(t=>{const e="set",n="clear";
|
|
97
|
+
Zone.__load_patch("legacy",(t=>{const e=t[Zone.__symbol__("legacyPatch")];e&&e()})),Zone.__load_patch("queueMicrotask",((t,e,n)=>{n.patchMethod(t,"queueMicrotask",(t=>function(t,n){e.current.scheduleMicroTask("queueMicrotask",n[0])}))})),Zone.__load_patch("timers",(t=>{const e="set",n="clear";Qi(t,e,n,"Timeout"),Qi(t,e,n,"Interval"),Qi(t,e,n,"Immediate")})),Zone.__load_patch("requestAnimationFrame",(t=>{Qi(t,"request","cancel","AnimationFrame"),Qi(t,"mozRequest","mozCancel","AnimationFrame"),Qi(t,"webkitRequest","webkitCancel","AnimationFrame")})),Zone.__load_patch("blocking",((t,e)=>{const n=["alert","prompt","confirm"];for(let r=0;r<n.length;r++){Ai(t,n[r],((n,r,o)=>function(r,i){return e.current.run(n,t,i,o)}))}})),Zone.__load_patch("EventTarget",((t,e,n)=>{!function(t,e){e.patchEventPrototype(t,e)}(t,n),$i(t,n);const r=t.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(t,n,[r.prototype])})),Zone.__load_patch("MutationObserver",((t,e,n)=>{Li("MutationObserver"),Li("WebKitMutationObserver")})),Zone.__load_patch("IntersectionObserver",((t,e,n)=>{Li("IntersectionObserver")})),Zone.__load_patch("FileReader",((t,e,n)=>{Li("FileReader")})),Zone.__load_patch("on_property",((t,e,n)=>{Ki(n,t)})),Zone.__load_patch("customElements",((t,e,n)=>{!function(t,e){const{isBrowser:n,isMix:r}=e.getGlobalObjects();if(!n&&!r||!t.customElements||!("customElements"in t))return;e.patchCallbacks(e,t.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(t,n)})),Zone.__load_patch("XHR",((t,e)=>{!function(t){const u=t.XMLHttpRequest;if(!u)return;const c=u.prototype;let l=c[ii],p=c[ai];if(!l){const e=t.XMLHttpRequestEventTarget;if(e){const t=e.prototype;l=t[ii],p=t[ai]}}const f="readystatechange",h="scheduled";function _(t){const r=t.data,a=r.target;a[i]=!1,a[s]=!1;const u=a[o];l||(l=a[ii],p=a[ai]),u&&p.call(a,f,u);const c=a[o]=()=>{if(a.readyState===a.DONE)if(!r.aborted&&a[i]&&t.state===h){const n=a[e.__symbol__("loadfalse")];if(0!==a.status&&n&&n.length>0){const o=t.invoke;t.invoke=function(){const n=a[e.__symbol__("loadfalse")];for(let e=0;e<n.length;e++)n[e]===t&&n.splice(e,1);r.aborted||t.state!==h||o.call(t)},n.push(t)}else t.invoke()}else r.aborted||!1!==a[i]||(a[s]=!0)};l.call(a,f,c);return a[n]||(a[n]=t),g.apply(a,r.args),a[i]=!0,t}function d(){}function E(t){const e=t.data;return e.aborted=!0,m.apply(e.target,e.args)}const v=Ai(c,"open",(()=>function(t,e){return t[r]=0==e[2],t[a]=e[1],v.apply(t,e)})),T=fi("fetchTaskAborting"),y=fi("fetchTaskScheduling"),g=Ai(c,"send",(()=>function(t,n){if(!0===e.current[y])return g.apply(t,n);if(t[r])return g.apply(t,n);{const e={target:t,url:t[a],isPeriodic:!1,args:n,aborted:!1},r=pi("XMLHttpRequest.send",d,e,_,E);t&&!0===t[s]&&!e.aborted&&r.state===h&&r.invoke()}})),m=Ai(c,"abort",(()=>function(t,r){const o=t[n];if(o&&"string"==typeof o.type){if(null==o.cancelFn||o.data&&o.data.aborted)return;o.zone.cancelTask(o)}else if(!0===e.current[T])return m.apply(t,r)}))}(t);const n=fi("xhrTask"),r=fi("xhrSync"),o=fi("xhrListener"),i=fi("xhrScheduled"),a=fi("xhrURL"),s=fi("xhrErrorBeforeScheduled")})),Zone.__load_patch("geolocation",(t=>{t.navigator&&t.navigator.geolocation&&function(t,e){const n=t.constructor.name;for(let r=0;r<e.length;r++){const o=e[r],i=t[o];if(i){if(!vi($o(t,o)))continue;t[o]=(t=>{const e=function(){return t.apply(this,Ei(arguments,n+"."+o))};return Ci(e,t),e})(i)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])})),Zone.__load_patch("PromiseRejectionEvent",((t,e)=>{function n(e){return function(n){zi(t,e).forEach((r=>{const o=t.PromiseRejectionEvent;if(o){const t=new o(e,{promise:n.promise,reason:n.rejection});r.invoke(t)}}))}}t.PromiseRejectionEvent&&(e[fi("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),e[fi("rejectionHandledHandler")]=n("rejectionhandled"))}));class Ji extends e.BaseInstrumentation{constructor(t={}){super(),this.options=t,this.name="@grafana/faro-web-tracing",this.version=e.VERSION}initialize(){var t,e,n,r,o;const i=this.options,a={};this.config.app.name&&(a[je]=this.config.app.name),this.config.app.version&&(a[Ze]=this.config.app.version),Object.assign(a,i.resourceAttributes);const s=br.default().merge(new br(a)),u=new Mr({resource:s});u.addSpanProcessor(null!==(t=i.spanProcessor)&&void 0!==t?t:new Qn(new _r(new Yn({api:this.api}),{scheduledDelayMillis:Ji.SCHEDULED_BATCH_DELAY_MS,maxExportBatchSize:30}),this.metas)),u.register({propagator:null!==(e=i.propagator)&&void 0!==e?e:new _n,contextManager:null!==(n=i.contextManager)&&void 0!==n?n:new Qo}),Hr({instrumentations:null!==(r=i.instrumentations)&&void 0!==r?r:Ko({ignoreUrls:this.getIgnoreUrls(),propagateTraceHeaderCorsUrls:null===(o=this.options.instrumentationOptions)||void 0===o?void 0:o.propagateTraceHeaderCorsUrls})}),this.api.initOTEL(Gt,Pt)}getIgnoreUrls(){return this.transports.transports.flatMap((t=>t.getIgnoreUrls()))}}return Ji.SCHEDULED_BATCH_DELAY_MS=1e3,t.FaroSessionSpanProcessor=Qn,t.FaroTraceExporter=Yn,t.TracingInstrumentation=Ji,t.getDefaultOTELInstrumentations=Ko,t}({},GrafanaFaroWebSdk);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/faro-web-tracing",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "Faro web tracing implementation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"observability",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"quality:circular-deps": "madge --circular ."
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@grafana/faro-web-sdk": "^1.2.
|
|
55
|
+
"@grafana/faro-web-sdk": "^1.2.4",
|
|
56
56
|
"@opentelemetry/api": "^1.4.1",
|
|
57
57
|
"@opentelemetry/context-zone": "^1.15.2",
|
|
58
58
|
"@opentelemetry/core": "^1.15.2",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "72cda534dc953ddaa37a0192ef956ac6ea505962"
|
|
77
77
|
}
|