@grafana/faro-web-tracing 1.1.3 → 1.2.0

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.4.1",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,_=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},h=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 T=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},v=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,v([],T(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},O=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.")},m=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=O(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 m(new Map(Object.entries(t)))}function L(t){return Symbol.for(t)}var P,A=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 A,w=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)}}(),I=function(){function t(){}return t.prototype.createHistogram=function(t,e){return F},t.prototype.createCounter=function(t,e){return Z},t.prototype.createUpDownCounter=function(t,e){return H},t.prototype.createObservableGauge=function(t,e){return G},t.prototype.createObservableCounter=function(t,e){return z},t.prototype.createObservableUpDownCounter=function(t,e){return V},t.prototype.addBatchObservableCallback=function(t,e){},t.prototype.removeBatchObservableCallback=function(t){},t}(),N=function(){},k=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return w(e,t),e.prototype.add=function(t,e){},e}(N),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return w(e,t),e.prototype.add=function(t,e){},e}(N),D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return w(e,t),e.prototype.record=function(t,e){},e}(N),x=function(){function t(){}return t.prototype.addCallback=function(t){},t.prototype.removeCallback=function(t){},t}(),U=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return w(e,t),e}(x),j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return w(e,t),e}(x),B=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return w(e,t),e}(x),X=new I,Z=new k,F=new D,H=new M,z=new U,G=new j,V=new B,q={get:function(t,e){if(null!=t)return t[e]},keys:function(t){return null==t?[]:Object.keys(t)}},W={set:function(t,e,n){null!=t&&(t[e]=n)}},K=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},Y=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))},Q=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,Y([n],K(r),!1))},t.prototype.bind=function(t,e){return e},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t}(),$=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="context",et=new Q,nt=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(t){return c(tt,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,J([t,e,n],$(o),!1))},t.prototype.bind=function(t,e){return this._getContextManager().bind(t,e)},t.prototype._getContextManager=function(){return l(tt)||et},t.prototype.disable=function(){this._getContextManager().disable(),p(tt,y.instance())},t}();!function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"}(P||(P={}));var rt="0000000000000000",ot="00000000000000000000000000000000",it={traceId:ot,spanId:rt,traceFlags:P.NONE},at=function(){function t(t){void 0===t&&(t=it),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}(),st=L("OpenTelemetry Context Key SPAN");function ut(t){return t.getValue(st)||void 0}function ct(){return ut(nt.getInstance().active())}function lt(t,e){return t.setValue(st,e)}function pt(t){return t.deleteValue(st)}function ft(t,e){return lt(t,new at(e))}function _t(t){var e;return null===(e=ut(t))||void 0===e?void 0:e.spanContext()}var ht=/^([0-9a-f]{32})$/i,dt=/^[0-9a-f]{16}$/i;function Et(t){return ht.test(t)&&t!==ot}function Tt(t){return Et(t.traceId)&&(e=t.spanId,dt.test(e)&&e!==rt);var e}function vt(t){return new at(t)}var yt=nt.getInstance(),gt=function(){function t(){}return t.prototype.startSpan=function(t,e,n){if(void 0===n&&(n=yt.active()),Boolean(null==e?void 0:e.root))return new at;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 at(o):new at},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:yt.active(),u=this.startSpan(t,o,s),c=lt(s,u);return yt.with(c,a,void 0,u)}},t}();var Ot,mt,St,bt=new gt,Rt=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):bt},t}(),Lt=new(function(){function t(){}return t.prototype.getTracer=function(t,e,n){return new gt},t}()),Pt=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 Rt(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"}(mt||(mt={})),function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"}(St||(St={}));var At=nt.getInstance(),Ct=y.instance(),wt=new(function(){function t(){}return t.prototype.getMeter=function(t,e,n){return X},t}()),It="metrics",Nt=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(t){return c(It,t,y.instance())},t.prototype.getMeterProvider=function(){return l(It)||wt},t.prototype.getMeter=function(t,e,n){return this.getMeterProvider().getMeter(t,e,n)},t.prototype.disable=function(){p(It,y.instance())},t}().getInstance(),kt=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=L("OpenTelemetry Baggage Key");function Dt(t){return t.getValue(Mt)||void 0}function xt(){return Dt(nt.getInstance().active())}function Ut(t,e){return t.setValue(Mt,e)}function jt(t){return t.deleteValue(Mt)}var Bt="propagation",Xt=new kt,Zt=function(){function t(){this.createBaggage=R,this.getBaggage=Dt,this.getActiveBaggage=xt,this.setBaggage=Ut,this.deleteBaggage=jt}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=W),this._getGlobalPropagator().inject(t,e,n)},t.prototype.extract=function(t,e,n){return void 0===n&&(n=q),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)||Xt},t}(),Ft=Zt.getInstance(),Ht="trace",zt=function(){function t(){this._proxyTracerProvider=new Pt,this.wrapSpanContext=vt,this.isSpanContextValid=Tt,this.deleteSpan=pt,this.getSpan=ut,this.getActiveSpan=ct,this.getSpanContext=_t,this.setSpan=lt,this.setSpanContext=ft}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(t){var e=c(Ht,this._proxyTracerProvider,y.instance());return e&&this._proxyTracerProvider.setDelegate(t),e},t.prototype.getTracerProvider=function(){return l(Ht)||this._proxyTracerProvider},t.prototype.getTracer=function(t,e){return this.getTracerProvider().getTracer(t,e)},t.prototype.disable=function(){p(Ht,y.instance()),this._proxyTracerProvider=new Pt},t}().getInstance(),Gt=L("OpenTelemetry SDK Context Key SUPPRESS_TRACING");var Vt,qt=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 Wt(t){try{qt(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"}(Vt||(Vt={}));var Kt="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},Yt=["OTEL_SDK_DISABLED"];function Qt(t){return Yt.indexOf(t)>-1}var $t=["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 Jt(t){return $t.indexOf(t)>-1}var te=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function ee(t){return te.indexOf(t)>-1}var ne=1/0,re={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:ne,OTEL_ATTRIBUTE_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:ne,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:128,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:ne,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:128,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:Vt.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 oe(t,e,n){if(void 0!==n[t]){var r=String(n[t]);e[t]="true"===r.toLowerCase()}}function ie(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 ae(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 se={ALL:f.ALL,VERBOSE:f.VERBOSE,DEBUG:f.DEBUG,INFO:f.INFO,WARN:f.WARN,ERROR:f.ERROR,NONE:f.NONE};function ue(t,e,n){var r=n[t];if("string"==typeof r){var o=se[r.toUpperCase()];null!=o&&(e[t]=o)}}function ce(){var t=function(t){var e={};for(var n in re){var r=n;if("OTEL_LOG_LEVEL"===r)ue(r,e,t);else if(Qt(r))oe(r,e,t);else if(Jt(r))ie(r,e,t);else if(ee(r))ae(r,e,t);else{var o=t[r];null!=o&&(e[r]=String(o))}}return e}(Kt);return Object.assign({},re,t)}function le(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 pe,fe="process.runtime.name",_e="service.name",he="service.version",de="telemetry.sdk.name",Ee="telemetry.sdk.language",Te="telemetry.sdk.version",ve=((pe={})[de]="opentelemetry",pe[fe]="browser",pe[Ee]="webjs",pe[Te]="1.15.2",pe);var ye,ge=Math.pow(10,9);function Oe(t){return t[0]*ge+t[1]}!function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"}(ye||(ye={}));var me="[_0-9a-z-*/]",Se=new RegExp("^(?:"+("[a-z]"+me+"{0,255}")+"|"+("[a-z0-9]"+me+"{0,240}@[a-z]"+me+"{0,13}")+")$"),be=/^[ -~]{0,255}[!-~]$/,Re=/,|=/;var Le=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 Se.test(t)})(o)&&function(t){return be.test(t)&&!Re.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}(),Pe="traceparent",Ae="tracestate",Ce=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");var we=function(){function t(){}return t.prototype.inject=function(t,e,n){var r=zt.getSpanContext(t);if(r&&!function(t){return!0===t.getValue(Gt)}(t)&&Tt(r)){var o="00-"+r.traceId+"-"+r.spanId+"-0"+Number(r.traceFlags||P.NONE).toString(16);n.set(e,Pe,o),r.traceState&&n.set(e,Ae,r.traceState.serialize())}},t.prototype.extract=function(t,e,n){var r=n.get(e,Pe);if(!r)return t;var o=Array.isArray(r)?r[0]:r;if("string"!=typeof o)return t;var i=function(t){var e=Ce.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,Ae);if(a){var s=Array.isArray(a)?a.join(","):a;i.traceState=new Le("string"==typeof s?s:void 0)}return zt.setSpanContext(t,i)},t.prototype.fields=function(){return[Pe,Ae]},t}(),Ie=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}(),Ne=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},ke=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))},Me=function(){function t(t,e){this._callback=t,this._that=e,this._isCalled=!1,this._deferred=new Ie}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,ke([this._that],Ne(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}(),De=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 xe(t){return Object.keys(t).map((function(e){return Ue(e,t[e])}))}function Ue(t,e){return{key:t,value:je(e)}}function je(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(je)}}:"object"===e&&null!=t?{kvlistValue:{values:Object.entries(t).map((function(t){var e=De(t,2);return Ue(e[0],e[1])}))}}:{}}function Be(t,e){var n,r=t.spanContext(),o=t.status,i=e?t.parentSpanId:null!=t.parentSpanId?le(t.parentSpanId):void 0;return{traceId:e?r.traceId:le(r.traceId),spanId:e?r.spanId:le(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:Oe(t.startTime),endTimeUnixNano:Oe(t.endTime),attributes:xe(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(Xe),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?xe(t.attributes):[],spanId:e?t.context.spanId:le(t.context.spanId),traceId:e?t.context.traceId:le(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 Xe(t){return{attributes:t.attributes?xe(t.attributes):[],name:t.name,timeUnixNano:Oe(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}var Ze=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.")},Fe=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 He(t,e){for(var n=function(t){var e,n,r=new Map;try{for(var o=Ze(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=Fe(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,_=f.name,h=f.version,d=f.schemaUrl,E=p.map((function(t){return Be(t,e)}));u.push({scope:{name:_,version:h},spans:E,schemaUrl:d})}l=c.next()}var T={resource:{attributes:xe(s.attributes),droppedAttributesCount:0},scopeSpans:u,schemaUrl:void 0};r.push(T),i=o.next()}return r}var ze=function(){return ze=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},ze.apply(this,arguments)},Ge=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())}))},Ve=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])}}},qe=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},We=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={})[_e]="unknown_service",e[Ee]=ve[Ee],e[de]=ve[de],e[Te]=ve[Te],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 Ge(this,void 0,void 0,(function(){return Ve(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=ze(ze({},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=qe(t,2),i=o[0],a=o[1];return ze(ze(ze(ze({},r._syncAttributes),i),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes),a)}));return new t(o,i)},t.EMPTY=new t({}),t}();class Ke{constructor(t){this.config=t}export(t,e){const n=function(t,e){return{resourceSpans:He(t,e)}}(t,!0);this.config.api.pushTraces(n),e({code:ye.SUCCESS})}shutdown(){return Promise.resolve(void 0)}}class Ye{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 Qe=function(t,e){return Qe=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])},Qe(t,e)};var $e=performance,Je="http.url",tn="http.user_agent",en=L("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function nn(t){return!0===t.getValue(en)}var rn="baggage",on=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 an(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 sn=function(){function t(){}return t.prototype.inject=function(t,e,n){var r=Ft.getBaggage(t);if(r&&!nn(t)){var o=function(t){return t.getAllEntries().map((function(t){var e=on(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,rn,i)}},t.prototype.extract=function(t,e,n){var r=n.get(e,rn),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=an(t);if(e){var n={value:e.value};e.metadata&&(n.metadata=e.metadata),i[e.key]=n}})),0===Object.entries(i).length?t:Ft.setBaggage(t,Ft.createBaggage(i)))},t.prototype.fields=function(){return[rn]},t}(),un=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.")},cn=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 ln(t){var e,n,r={};if("object"!=typeof t||null==t)return r;try{for(var o=un(Object.entries(t)),i=o.next();!i.done;i=o.next()){var a=cn(i.value,2),s=a[0],u=a[1];pn(s)?fn(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 pn(t){return"string"==typeof t&&t.length>0}function fn(t){return null==t||(Array.isArray(t)?function(t){var e,n,r;try{for(var o=un(t),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){if(!r){if(_n(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):_n(t))}function _n(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}var hn,dn=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 En(t){try{dn(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"}(hn||(hn={}));var Tn="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},vn=["OTEL_SDK_DISABLED"];function yn(t){return vn.indexOf(t)>-1}var gn=["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 On(t){return gn.indexOf(t)>-1}var mn=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function Sn(t){return mn.indexOf(t)>-1}var bn=1/0,Rn=128,Ln={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:bn,OTEL_ATTRIBUTE_COUNT_LIMIT:Rn,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:bn,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Rn,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:bn,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Rn,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:hn.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 Pn(t,e,n){if(void 0!==n[t]){var r=String(n[t]);e[t]="true"===r.toLowerCase()}}function An(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 Cn(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 wn={ALL:f.ALL,VERBOSE:f.VERBOSE,DEBUG:f.DEBUG,INFO:f.INFO,WARN:f.WARN,ERROR:f.ERROR,NONE:f.NONE};function In(t,e,n){var r=n[t];if("string"==typeof r){var o=wn[r.toUpperCase()];null!=o&&(e[t]=o)}}function Nn(t){var e={};for(var n in Ln){var r=n;if("OTEL_LOG_LEVEL"===r)In(r,e,t);else if(yn(r))Pn(r,e,t);else if(On(r))An(r,e,t);else if(Sn(r))Cn(r,e,t);else{var o=t[r];null!=o&&(e[r]=String(o))}}return e}function kn(){var t=Nn(Tn);return Object.assign({},Ln,t)}var Mn,Dn=performance,xn="exception.type",Un="exception.message",jn="exception.stacktrace",Bn="http.response_content_length",Xn="http.response_content_length_uncompressed",Zn="process.runtime.name",Fn="service.name",Hn="telemetry.sdk.name",zn="telemetry.sdk.language",Gn="telemetry.sdk.version",Vn=((Mn={})[Hn]="opentelemetry",Mn[Zn]="browser",Mn[zn]="webjs",Mn[Gn]="1.15.2",Mn);var qn,Wn=Math.pow(10,6),Kn=Math.pow(10,9);function Yn(t){var e=t/1e3;return[Math.trunc(e),Math.round(t%1e3*Wn)]}function Qn(){var t=Dn.timeOrigin;if("number"!=typeof t){var e=Dn;t=e.timing&&e.timing.fetchStart}return t}function $n(t){return rr(Yn(Qn()),Yn("number"==typeof t?t:Dn.now()))}function Jn(t){if(er(t))return t;if("number"==typeof t)return t<Qn()?$n(t):Yn(t);if(t instanceof Date)return Yn(t.getTime());throw TypeError("Invalid input type")}function tr(t){return t[0]*Kn+t[1]}function er(t){return Array.isArray(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]}function nr(t){return er(t)||"number"==typeof t||t instanceof Date}function rr(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=Kn&&(n[1]-=Kn,n[0]+=1),n}!function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"}(qn||(qn={}));var or=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.")},ir=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=or(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}(),ar="[_0-9a-z-*/]",sr=new RegExp("^(?:"+("[a-z]"+ar+"{0,255}")+"|"+("[a-z0-9]"+ar+"{0,240}@[a-z]"+ar+"{0,13}")+")$"),ur=/^[ -~]{0,255}[!-~]$/,cr=/,|=/;var lr=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 sr.test(t)})(o)&&function(t){return ur.test(t)&&!cr.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}(),pr="traceparent",fr="tracestate",_r=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");var hr,dr,Er=function(){function t(){}return t.prototype.inject=function(t,e,n){var r=zt.getSpanContext(t);if(r&&!nn(t)&&Tt(r)){var o="00-"+r.traceId+"-"+r.spanId+"-0"+Number(r.traceFlags||P.NONE).toString(16);n.set(e,pr,o),r.traceState&&n.set(e,fr,r.traceState.serialize())}},t.prototype.extract=function(t,e,n){var r=n.get(e,pr);if(!r)return t;var o=Array.isArray(r)?r[0]:r;if("string"!=typeof o)return t;var i=function(t){var e=_r.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,fr);if(a){var s=Array.isArray(a)?a.join(","):a;i.traceState=new lr("string"==typeof s?s:void 0)}return zt.setSpanContext(t,i)},t.prototype.fields=function(){return[pr,fr]},t}(),Tr="[object Null]",vr="[object Undefined]",yr=Function.prototype.toString,gr=yr.call(Object),Or=(hr=Object.getPrototypeOf,dr=Object,function(t){return hr(dr(t))}),mr=Object.prototype,Sr=mr.hasOwnProperty,br=Symbol?Symbol.toStringTag:void 0,Rr=mr.toString;function Lr(t){if(!function(t){return null!=t&&"object"==typeof t}(t)||"[object Object]"!==function(t){if(null==t)return void 0===t?vr:Tr;return br&&br in Object(t)?function(t){var e=Sr.call(t,br),n=t[br],r=!1;try{t[br]=void 0,r=!0}catch(t){}var o=Rr.call(t);r&&(e?t[br]=n:delete t[br]);return o}(t):function(t){return Rr.call(t)}(t)}(t))return!1;var e=Or(t);if(null===e)return!0;var n=Sr.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&yr.call(n)===gr}function Pr(t){return wr(t)?t.slice():t}function Ar(t,e,n,r){var o;if(void 0===n&&(n=0),!(n>20)){if(n++,kr(t)||kr(e)||Ir(e))o=Pr(e);else if(wr(t)){if(o=t.slice(),wr(e))for(var i=0,a=e.length;i<a;i++)o.push(Pr(e[i]));else if(Nr(e))for(i=0,a=(s=Object.keys(e)).length;i<a;i++){o[u=s[i]]=Pr(e[u])}}else if(Nr(t))if(Nr(e)){if(!function(t,e){if(!Lr(t)||!Lr(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(kr(c))void 0===c?delete o[u]:o[u]=c;else{var l=o[u],p=c;if(Cr(t,u,r)||Cr(e,u,r))delete o[u];else{if(Nr(l)&&Nr(p)){var f=r.get(l)||[],_=r.get(p)||[];f.push({obj:t,key:u}),_.push({obj:e,key:u}),r.set(l,f),r.set(p,_)}o[u]=Ar(o[u],c,n,r)}}}}else o=e;return o}}function Cr(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 wr(t){return Array.isArray(t)}function Ir(t){return"function"==typeof t}function Nr(t){return!kr(t)&&!wr(t)&&!Ir(t)&&"object"==typeof t}function kr(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t||void 0===t||t instanceof Date||t instanceof RegExp||null===t}var Mr,Dr=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}(),xr=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},Ur=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))},jr=function(){function t(t,e){this._callback=t,this._that=e,this._isCalled=!1,this._deferred=new Dr}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,Ur([this._that],xr(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}(),Br=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.")},Xr=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},Zr=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:St.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=Dn.now(),this._performanceOffset=c-(this._performanceStartTime+Qn()),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):fn(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=Br(Object.entries(t)),o=r.next();!o.done;o=r.next()){var i=Xr(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++),nr(e)&&(nr(n)||(n=e),e=void 0);var r=ln(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+=Kn),[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<Dn.now())return $n(t+this._performanceOffset);if("number"==typeof t)return Yn(t);if(t instanceof Date)return Yn(t.getTime());if(er(t))return t;if(this._startTimeProvided)return Yn(Date.now());var e=Dn.now()-this._performanceStartTime;return rr(this.startTime,Yn(e))},t.prototype.isRecording=function(){return!1===this._ended},t.prototype.recordException=function(t,e){var n={};"string"==typeof t?n[Un]=t:t&&(t.code?n[xn]=t.code.toString():t.name&&(n[xn]=t.name),t.message&&(n[Un]=t.message),t.stack&&(n[jn]=t.stack)),n[xn]||n[Un]?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"}(Mr||(Mr={}));var Fr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Mr.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),Hr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:Mr.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),zr=function(){function t(t){var e,n,r,o;this._root=t.root,this._root||(En(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Hr),this._remoteParentSampled=null!==(e=t.remoteParentSampled)&&void 0!==e?e:new Hr,this._remoteParentNotSampled=null!==(n=t.remoteParentNotSampled)&&void 0!==n?n:new Fr,this._localParentSampled=null!==(r=t.localParentSampled)&&void 0!==r?r:new Hr,this._localParentNotSampled=null!==(o=t.localParentNotSampled)&&void 0!==o?o:new Fr}return t.prototype.shouldSample=function(t,e,n,r,o,i){var a=zt.getSpanContext(t);return a&&Tt(a)?a.isRemote?a.traceFlags&P.SAMPLED?this._remoteParentSampled.shouldSample(t,e,n,r,o,i):this._remoteParentNotSampled.shouldSample(t,e,n,r,o,i):a.traceFlags&P.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}(),Gr=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:Et(e)&&this._accumulate(e)<this._upperBound?Mr.RECORD_AND_SAMPLED:Mr.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}(),Vr=kn(),qr=hn.AlwaysOn;function Wr(){return{sampler:Kr(Vr),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:kn().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:kn().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:kn().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:kn().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:kn().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:kn().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:kn().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:kn().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function Kr(t){switch(void 0===t&&(t=kn()),t.OTEL_TRACES_SAMPLER){case hn.AlwaysOn:return new Hr;case hn.AlwaysOff:return new Fr;case hn.ParentBasedAlwaysOn:return new zr({root:new Hr});case hn.ParentBasedAlwaysOff:return new zr({root:new Fr});case hn.TraceIdRatio:return new Gr(Yr(t));case hn.ParentBasedTraceIdRatio:return new zr({root:new Gr(Yr(t))});default:return Ct.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+qr+'".'),new Hr}}function Yr(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 Qr(t){var e,n,r,o,i,a,s,u,c,l,p,f,_=Object.assign({},t.spanLimits),h="undefined"!=typeof process&&process&&process.env?Nn(process.env):Nn(Tn);return _.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:h.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==i?i:h.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==a?a:Rn,_.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:h.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==p?p:h.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==f?f:bn,Object.assign({},t,{spanLimits:_})}var $r=function(){function t(t,e){this._exporter=t,this._finishedSpans=[],this._droppedSpansCount=0;var n=kn();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 jr(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&P.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);At.with(function(t){return t.setValue(en,!0)}(At.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===qn.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){En(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){En(t)}))}),this._scheduledDelayMillis),this._timer)},t.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},t}(),Jr=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)}}(),to=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.onInit(n),r}return Jr(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}($r),eo=function(){this.generateTraceId=ro(16),this.generateSpanId=ro(8)},no=Array(32);function ro(t){return function(){for(var e=0;e<2*t;e++)no[e]=Math.floor(16*Math.random())+48,no[e]>=58&&(no[e]+=39);return String.fromCharCode.apply(null,no.slice(0,2*t))}}var oo=function(){function t(t,e,n){this._tracerProvider=n;var r,o,i,a,s=(r=e,o={sampler:Kr()},i=Wr(),(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 eo,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=At.active()),e.root&&(n=zt.deleteSpan(n));var a=zt.getSpan(n);if(nn(n))return Ct.debug("Instrumentation suppressed, returning Noop Span"),zt.wrapSpanContext(it);var s,u,c,l=null==a?void 0:a.spanContext(),p=this._idGenerator.generateSpanId();l&&zt.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:mt.INTERNAL,_=(null!==(o=e.links)&&void 0!==o?o:[]).map((function(t){return{context:t.context,attributes:ln(t.attributes)}})),h=ln(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?P.SAMPLED:P.NONE,traceState:u};if(d.decision===Ot.NOT_RECORD)return Ct.debug("Recording is off, propagating context in a non-recording span"),zt.wrapSpanContext(E);var T=new Zr(this,n,t,E,f,c,_,e.startTime),v=ln(Object.assign(h,d.attributes));return T.setAttributes(v),T},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:At.active(),u=this.startSpan(t,o,s),c=zt.setSpan(s,u);return At.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 io,ao=function(){return ao=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},ao.apply(this,arguments)},so=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())}))},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])}}},co=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},lo=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={})[Fn]="unknown_service",e[zn]=Vn[zn],e[Hn]=Vn[Hn],e[Gn]=Vn[Gn],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 so(this,void 0,void 0,(function(){return uo(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=ao(ao({},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=co(t,2),i=o[0],a=o[1];return ao(ao(ao(ao({},r._syncAttributes),i),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes),a)}));return new t(o,i)},t.EMPTY=new t({}),t}(),po=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.")},fo=function(){function t(t){this._spanProcessors=t}return t.prototype.forceFlush=function(){var t,e,n=[];try{for(var r=po(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){En(e||new Error("MultiSpanProcessor: forceFlush failed")),t()}))}))},t.prototype.onStart=function(t,e){var n,r;try{for(var o=po(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=po(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=po(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}(),_o=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"}(io||(io={}));var ho,Eo,To=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=Ar(n,t.shift(),0,r);return n}({},Wr(),Qr(t));this.resource=null!==(e=n.resource)&&void 0!==e?e:lo.empty(),this.resource=lo.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var r=this._buildExporterFromEnv();if(void 0!==r){var o=new to(r);this.activeSpanProcessor=o}else this.activeSpanProcessor=new _o}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 oo({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 fo(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(t){void 0===t&&(t={}),zt.setGlobalTracerProvider(this),void 0===t.propagator&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&At.setGlobalContextManager(t.contextManager),t.propagator&&Ft.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=io.timeout}),t);e.forceFlush().then((function(){clearTimeout(o),r!==io.timeout&&(r=io.resolved,n(r))})).catch((function(t){clearTimeout(o),r=io.error,n(t)}))}))}));return new Promise((function(t,n){Promise.all(e).then((function(e){var r=e.filter((function(t){return t!==io.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(kn().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 ir({propagators:n})},t.prototype._buildExporterFromEnv=function(){var t=kn().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 Er}],["baggage",function(){return new sn}]]),t._registeredExporters=new Map,t}(),vo=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},yo=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))},go=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,yo([n],vo(r),!1))}finally{this._currentContext=i}},t}(),Oo=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)}}(),mo=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 Oo(e,t),e.prototype.register=function(e){void 0===e&&(e={}),void 0===e.contextManager&&(e.contextManager=new go),e.contextManager&&e.contextManager.enable(),t.prototype.register.call(this,e)},e}(To);function So(t,e){return e in t}function bo(t,e,n){if(So(n,e)&&"number"==typeof n[e])return t.addEvent(e,n[e]),t}function Ro(t,e){bo(t,ho.FETCH_START,e),bo(t,ho.DOMAIN_LOOKUP_START,e),bo(t,ho.DOMAIN_LOOKUP_END,e),bo(t,ho.CONNECT_START,e),So(e,"name")&&e.name.startsWith("https:")&&bo(t,ho.SECURE_CONNECTION_START,e),bo(t,ho.CONNECT_END,e),bo(t,ho.REQUEST_START,e),bo(t,ho.RESPONSE_START,e),bo(t,ho.RESPONSE_END,e);var n=e[ho.ENCODED_BODY_SIZE];void 0!==n&&t.setAttribute(Bn,n);var r=e[ho.DECODED_BODY_SIZE];void 0!==r&&n!==r&&t.setAttribute(Xn,r)}function Lo(t,e,n,r,o,i){void 0===o&&(o=new WeakSet);var a=Po(t),s=function(t,e,n,r,o,i){var a=tr(e),s=tr(n),u=r.filter((function(e){var n=tr(Jn(e[ho.FETCH_START])),r=tr(Jn(e[ho.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[ho.FETCH_START],r=e[ho.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=tr(n),i=tr(Jn(e)),a=t[1],s=t.length,u=1;u<s;u++){var c=t[u],l=tr(Jn(c[ho.FETCH_START])),p=o-tr(Jn(c[ho.RESPONSE_END]));l>=i&&(!r||p<r)&&(r=p,a=c)}return a}(u,c[ho.RESPONSE_END],n),p=c[ho.RESPONSE_END];return l[ho.FETCH_START]<p&&(l=c,c=void 0),{corsPreFlightRequest:c,mainRequest:l}}return{mainRequest:s[0]}}function Po(t){if("function"==typeof URL)return new URL(t,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var e=(Eo||(Eo=document.createElement("a")),Eo);return e.href=t,e}function Ao(t,e){var n=e||[];return("string"==typeof n||n instanceof RegExp)&&(n=[n]),Po(t).origin===location.origin||n.some((function(e){return n=t,"string"==typeof(r=e)?n===r:!!n.match(r);var n,r}))}function Co(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=Co(o);e=e.concat(i.instrumentations)}else"function"==typeof o?e.push(new o):o.instrumentationName&&e.push(o)}return{instrumentations:e}}function wo(t){var e=Co(t.instrumentations).instrumentations,n=t.tracerProvider||zt.getTracerProvider(),r=t.meterProvider||Nt.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"}(ho||(ho={}));var Io="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function No(t){return"function"==typeof t}var ko=console.error.bind(console);function Mo(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function Do(t){t&&t.logger&&(No(t.logger)?ko=t.logger:ko("new logger isn't a function, not replacing"))}function xo(t,e,n){if(t&&t[e]){if(!n)return ko("no wrapper function"),void ko((new Error).stack);if(No(t[e])&&No(n)){var r=t[e],o=n(r,e);return Mo(o,"__original",r),Mo(o,"__unwrap",(function(){t[e]===o&&Mo(t,e,r)})),Mo(o,"__wrapped",!0),Mo(t,e,o),o}ko("original object and wrapper must be functions")}else ko("no original function "+e+" to wrap")}function Uo(t,e){return t&&t[e]?t[e].__unwrap?t[e].__unwrap():void ko("no original to unwrap to -- has "+e+" already been unwrapped?"):(ko("no function to unwrap."),void ko((new Error).stack))}Do.wrap=xo,Do.massWrap=function(t,e,n){if(!t)return ko("must provide one or more modules to patch"),void ko((new Error).stack);Array.isArray(t)||(t=[t]),e&&Array.isArray(e)?t.forEach((function(t){e.forEach((function(e){xo(t,e,n)}))})):ko("must provide one or more functions to wrap on modules")},Do.unwrap=Uo,Do.massUnwrap=function(t,e){if(!t)return ko("must provide one or more modules to patch"),void ko((new Error).stack);Array.isArray(t)||(t=[t]),e&&Array.isArray(e)?t.forEach((function(t){e.forEach((function(e){Uo(t,e)}))})):ko("must provide one or more functions to unwrap on modules")};var jo,Bo=Do,Xo=function(){return Xo=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},Xo.apply(this,arguments)},Zo=function(){function t(t,e,n){void 0===n&&(n={}),this.instrumentationName=t,this.instrumentationVersion=e,this._wrap=Bo.wrap,this._unwrap=Bo.unwrap,this._massWrap=Bo.massWrap,this._massUnwrap=Bo.massUnwrap,this._config=Xo({enabled:!0},n),this._diag=Ct.createComponentLogger({namespace:t}),this._tracer=zt.getTracer(t,e),this._meter=Nt.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}(),Fo=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)}}(),Ho=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 Fo(e,t),e}(Zo);function zo(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 Go(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"}(jo||(jo={}));var Vo;!function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"}(Vo||(Vo={}));var qo={"first-paint":Vo.FIRST_PAINT,"first-contentful-paint":Vo.FIRST_CONTENTFUL_PAINT},Wo=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,"@opentelemetry/instrumentation-document-load","0.33.0",e)||this;return n.component="document-load",n.version="1",n.moduleName=n.component,n}return 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}Qe(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(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=$e).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"traceparent"===t.getAttribute("name")})),n=function(){var t,e,n={},r=null===(e=(t=$e).getEntriesByType)||void 0===e?void 0:e.call(t,"navigation")[0];if(r)Object.values(ho).forEach((function(t){if(So(r,t)){var e=r[t];"number"==typeof e&&(n[t]=e)}}));else{var o=$e.timing;o&&Object.values(ho).forEach((function(t){if(So(o,t)){var e=o[t];"number"==typeof e&&(n[t]=e)}}))}return n}(),r=e&&e.content||"";At.with(Ft.extract(C,{traceparent:r}),(function(){var e,r=t._startSpan(jo.DOCUMENT_LOAD,ho.FETCH_START,n);r&&(At.with(zt.setSpan(At.active(),r),(function(){var e=t._startSpan(jo.DOCUMENT_FETCH,ho.FETCH_START,n);e&&(e.setAttribute(Je,location.href),At.with(zt.setSpan(At.active(),e),(function(){var r;Ro(e,n),t._addCustomAttributesOnSpan(e,null===(r=t._getConfig().applyCustomAttributesOnSpan)||void 0===r?void 0:r.documentFetch),t._endSpan(e,ho.RESPONSE_END,n)})))})),r.setAttribute(Je,location.href),r.setAttribute(tn,navigator.userAgent),t._addResourcesSpans(r),bo(r,ho.FETCH_START,n),bo(r,ho.UNLOAD_EVENT_START,n),bo(r,ho.UNLOAD_EVENT_END,n),bo(r,ho.DOM_INTERACTIVE,n),bo(r,ho.DOM_CONTENT_LOADED_EVENT_START,n),bo(r,ho.DOM_CONTENT_LOADED_EVENT_END,n),bo(r,ho.DOM_COMPLETE,n),bo(r,ho.LOAD_EVENT_START,n),bo(r,ho.LOAD_EVENT_END,n),function(t){var e,n,r=null===(n=(e=$e).getEntriesByType)||void 0===n?void 0:n.call(e,"paint");r&&r.forEach((function(e){var n=e.name,r=e.startTime;So(qo,n)&&t.addEvent(qo[n],r)}))}(r),t._addCustomAttributesOnSpan(r,null===(e=t._getConfig().applyCustomAttributesOnSpan)||void 0===e?void 0:e.documentLoad),t._endSpan(r,ho.LOAD_EVENT_END,n))}))},e.prototype._endSpan=function(t,e,n){t&&(So(n,e)?t.end(n[e]):t.end())},e.prototype._initResourceSpan=function(t,e){var n,r=this._startSpan(jo.RESOURCE_FETCH,ho.FETCH_START,t,e);r&&(r.setAttribute(Je,t.name),Ro(r,t),this._addCustomAttributesOnResourceSpan(r,t,null===(n=this._getConfig().applyCustomAttributesOnSpan)||void 0===n?void 0:n.resourceFetch),this._endSpan(r,ho.RESPONSE_END,t))},e.prototype._startSpan=function(t,e,n,r){if(So(n,e)&&"number"==typeof n[e])return this.tracer.startSpan(t,{startTime:n[e]},r?zt.setSpan(At.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&&zo((function(){return e(t)}),(function(t){t&&n._diag.error("addCustomAttributesOnSpan",t)}),!0)},e.prototype._addCustomAttributesOnResourceSpan=function(t,e,n){var r=this;n&&zo((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}(Ho),Ko="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},Yo=performance,Qo="http.method",$o="http.url",Jo="http.host",ti="http.scheme",ei="http.status_code",ni="http.user_agent",ri=Math.pow(10,6),oi=Math.pow(10,9);function ii(t){var e=t/1e3;return[Math.trunc(e),Math.round(t%1e3*ri)]}function ai(t){return function(t,e){var n=[t[0]+e[0],t[1]+e[1]];n[1]>=oi&&(n[1]-=oi,n[0]+=1);return n}(ii(function(){var t=Yo.timeOrigin;if("number"!=typeof t){var e=Yo;t=e.timing&&e.timing.fetchStart}return t}()),ii("number"==typeof t?t:Yo.now()))}var si,ui=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 ci(t,e){return"string"==typeof e?t===e:!!t.match(e)}!function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"}(si||(si={}));var li="0.41.2",pi=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)}}(),fi=function(t){function e(e){var n=t.call(this,"@opentelemetry/instrumentation-fetch",li,e)||this;return n.component="fetch",n.version=li,n.moduleName=n.component,n._usedResources=new WeakSet,n._tasksCount=0,n}return pi(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[ho.FETCH_START]},zt.setSpan(At.active(),t));this._getConfig().ignoreNetworkEvents||Ro(n,e),n.end(e[ho.RESPONSE_END])},e.prototype._addFinalSpanAttributes=function(t,e){var n=Po(e.url);t.setAttribute(ei,e.status),null!=e.statusText&&t.setAttribute(si.HTTP_STATUS_TEXT,e.statusText),t.setAttribute(Jo,n.host),t.setAttribute(ti,n.protocol.replace(":","")),t.setAttribute(ni,navigator.userAgent)},e.prototype._addHeaders=function(t,e){if(!Ao(e,this._getConfig().propagateTraceHeaderCorsUrls)){var n={};return Ft.inject(At.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}if(t instanceof Request)Ft.inject(At.active(),t.headers,{set:function(t,e,n){return t.set(e,"string"==typeof n?n:String(n))}});else if(t.headers instanceof Headers)Ft.inject(At.active(),t.headers,{set:function(t,e,n){return t.set(e,"string"==typeof n?n:String(n))}});else{n={};Ft.inject(At.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=ui(e),i=o.next();!i.done;i=o.next())if(ci(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:mt.CLIENT,attributes:(n={},n[si.COMPONENT]=this.moduleName,n[Qo]=r,n[$o]=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=Lo(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||Ro(t,i)}},e.prototype._markResourceAsUsed=function(t){this._usedResources.add(t)},e.prototype._endSpan=function(t,e,n){var r=this,o=ii(Date.now()),i=ai();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=Po(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 At.with(zt.setSpan(At.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&&zo((function(){return o(t,e,n)}),(function(t){t&&r._diag.error("applyCustomAttributesOnSpan",t)}),!0)},e.prototype._prepareSpanData=function(t){var e=ai(),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(){Go(fetch)&&(this._unwrap(Ko,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Ko,"fetch",this._patchConstructor())},e.prototype.disable=function(){this._unwrap(Ko,"fetch"),this._usedResources=new WeakSet},e}(Ho),_i=performance,hi="http.method",di="http.url",Ei="http.host",Ti="http.scheme",vi="http.status_code",yi="http.user_agent",gi=Math.pow(10,6),Oi=Math.pow(10,9);function mi(t){var e=t/1e3;return[Math.trunc(e),Math.round(t%1e3*gi)]}function Si(t){return function(t,e){var n=[t[0]+e[0],t[1]+e[1]];n[1]>=Oi&&(n[1]-=Oi,n[0]+=1);return n}(mi(function(){var t=_i.timeOrigin;if("number"!=typeof t){var e=_i;t=e.timing&&e.timing.fetchStart}return t}()),mi("number"==typeof t?t:_i.now()))}var bi,Ri=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 Li(t,e){return"string"==typeof e?t===e:!!t.match(e)}!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"}(bi||(bi={}));var Pi,Ai="0.41.2";!function(t){t.HTTP_STATUS_TEXT="http.status_text"}(Pi||(Pi={}));var Ci=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)}}(),wi=function(t){function e(e){var n=t.call(this,"@opentelemetry/instrumentation-xml-http-request",Ai,e)||this;return n.component="xml-http-request",n.version=Ai,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return Ci(e,t),e.prototype.init=function(){},e.prototype._getConfig=function(){return this._config},e.prototype._addHeaders=function(t,e){if(!Ao(Po(e).href,this._getConfig().propagateTraceHeaderCorsUrls)){var n={};return Ft.inject(At.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}var r={};Ft.inject(At.active(),r),Object.keys(r).forEach((function(e){t.setRequestHeader(e,String(r[e]))}))},e.prototype._addChildSpan=function(t,e){var n=this;At.with(zt.setSpan(At.active(),t),(function(){var t=n.tracer.startSpan("CORS Preflight",{startTime:e[ho.FETCH_START]});Ro(t,e),t.end(e[ho.RESPONSE_END])}))},e.prototype._addFinalSpanAttributes=function(t,e,n){if("string"==typeof n){var r=Po(n);void 0!==e.status&&t.setAttribute(vi,e.status),void 0!==e.statusText&&t.setAttribute(Pi.HTTP_STATUS_TEXT,e.statusText),t.setAttribute(Ei,r.host),t.setAttribute(Ti,r.protocol.replace(":","")),t.setAttribute(yi,navigator.userAgent)}},e.prototype._applyAttributesAfterXHR=function(t,e){var n=this,r=this._getConfig().applyCustomAttributesOnSpan;"function"==typeof r&&zo((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=Po(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&&(_i.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=_i.getEntriesByType("resource"));var a=Lo(Po(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)),Ro(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=Ri(e),i=o.next();!i.done;i=o.next())if(Li(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:mt.CLIENT,attributes:(r={},r[hi]=n,r[di]=Po(e).toString(),r)});return i.addEvent(bi.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=Si(),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(bi.EVENT_ERROR,this)}function r(){e(bi.EVENT_ABORT,this)}function o(){e(bi.EVENT_TIMEOUT,this)}function i(){this.status<299?e(bi.EVENT_LOAD,this):e(bi.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&&At.with(zt.setSpan(At.active(),p),(function(){t._tasksCount++,l.sendStartTime=Si(),p.addEvent(bi.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),Go(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),Go(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}(Ho);const Ii={ignoreUrls:[],propagateTraceHeaderCorsUrls:[]};function Ni(t=Ii){return[new Wo,new fi(t),new wi(t)]}var ki="OT_ZONE_CONTEXT",Mi=function(){function t(){this._enabled=!1,this._zoneCounter=0}return t.prototype._activeContextFromZone=function(t){return t&&t.get(ki)||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[ki]=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}();
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.4.1",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 v("debug",this._namespace,t)},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return v("error",this._namespace,t)},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return v("info",this._namespace,t)},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return v("warn",this._namespace,t)},t.prototype.verbose=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return v("verbose",this._namespace,t)},t}();function v(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 E=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},y=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,y([],E(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=T.instance();function R(t){return void 0===t&&(t={}),new O(new Map(Object.entries(t)))}function L(t){return Symbol.for(t)}var w,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}},A=new P,C=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)}}(),k=function(){function t(){}return t.prototype.createHistogram=function(t,e){return H},t.prototype.createCounter=function(t,e){return F},t.prototype.createUpDownCounter=function(t,e){return z},t.prototype.createObservableGauge=function(t,e){return X},t.prototype.createObservableCounter=function(t,e){return V},t.prototype.createObservableUpDownCounter=function(t,e){return G},t.prototype.addBatchObservableCallback=function(t,e){},t.prototype.removeBatchObservableCallback=function(t){},t}(),N=function(){},I=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e.prototype.add=function(t,e){},e}(N),D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e.prototype.add=function(t,e){},e}(N),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e.prototype.record=function(t,e){},e}(N),x=function(){function t(){}return t.prototype.addCallback=function(t){},t.prototype.removeCallback=function(t){},t}(),U=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(x),j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(x),Z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(x),B=new k,F=new I,H=new M,z=new D,V=new U,X=new j,G=new Z,q={get:function(t,e){if(null!=t)return t[e]},keys:function(t){return null==t?[]:Object.keys(t)}},W={set:function(t,e,n){null!=t&&(t[e]=n)}},K=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},Y=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))},Q=function(){function t(){}return t.prototype.active=function(){return A},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,Y([n],K(r),!1))},t.prototype.bind=function(t,e){return e},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t}(),$=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="context",et=new Q,nt=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(t){return c(tt,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,J([t,e,n],$(o),!1))},t.prototype.bind=function(t,e){return this._getContextManager().bind(t,e)},t.prototype._getContextManager=function(){return l(tt)||et},t.prototype.disable=function(){this._getContextManager().disable(),p(tt,T.instance())},t}();!function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"}(w||(w={}));var rt="0000000000000000",ot="00000000000000000000000000000000",it={traceId:ot,spanId:rt,traceFlags:w.NONE},at=function(){function t(t){void 0===t&&(t=it),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}(),st=L("OpenTelemetry Context Key SPAN");function ut(t){return t.getValue(st)||void 0}function ct(){return ut(nt.getInstance().active())}function lt(t,e){return t.setValue(st,e)}function pt(t){return t.deleteValue(st)}function ft(t,e){return lt(t,new at(e))}function ht(t){var e;return null===(e=ut(t))||void 0===e?void 0:e.spanContext()}var _t=/^([0-9a-f]{32})$/i,dt=/^[0-9a-f]{16}$/i;function vt(t){return _t.test(t)&&t!==ot}function Et(t){return vt(t.traceId)&&(e=t.spanId,dt.test(e)&&e!==rt);var e}function yt(t){return new at(t)}var Tt=nt.getInstance(),gt=function(){function t(){}return t.prototype.startSpan=function(t,e,n){if(void 0===n&&(n=Tt.active()),Boolean(null==e?void 0:e.root))return new at;var r,o=n&&ht(n);return"object"==typeof(r=o)&&"string"==typeof r.spanId&&"string"==typeof r.traceId&&"number"==typeof r.traceFlags&&Et(o)?new at(o):new at},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:Tt.active(),u=this.startSpan(t,o,s),c=lt(s,u);return Tt.with(c,a,void 0,u)}},t}();var mt,Ot,St,bt=new gt,Rt=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):bt},t}(),Lt=new(function(){function t(){}return t.prototype.getTracer=function(t,e,n){return new gt},t}()),wt=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 Rt(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"}(mt||(mt={})),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"}(Ot||(Ot={})),function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"}(St||(St={}));var Pt=nt.getInstance(),At=T.instance(),Ct=new(function(){function t(){}return t.prototype.getMeter=function(t,e,n){return B},t}()),kt="metrics",Nt=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,T.instance())},t.prototype.getMeterProvider=function(){return l(kt)||Ct},t.prototype.getMeter=function(t,e,n){return this.getMeterProvider().getMeter(t,e,n)},t.prototype.disable=function(){p(kt,T.instance())},t}().getInstance(),It=function(){function t(){}return t.prototype.inject=function(t,e){},t.prototype.extract=function(t,e){return t},t.prototype.fields=function(){return[]},t}(),Dt=L("OpenTelemetry Baggage Key");function Mt(t){return t.getValue(Dt)||void 0}function xt(){return Mt(nt.getInstance().active())}function Ut(t,e){return t.setValue(Dt,e)}function jt(t){return t.deleteValue(Dt)}var Zt="propagation",Bt=new It,Ft=function(){function t(){this.createBaggage=R,this.getBaggage=Mt,this.getActiveBaggage=xt,this.setBaggage=Ut,this.deleteBaggage=jt}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(t){return c(Zt,t,T.instance())},t.prototype.inject=function(t,e,n){return void 0===n&&(n=W),this._getGlobalPropagator().inject(t,e,n)},t.prototype.extract=function(t,e,n){return void 0===n&&(n=q),this._getGlobalPropagator().extract(t,e,n)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){p(Zt,T.instance())},t.prototype._getGlobalPropagator=function(){return l(Zt)||Bt},t}(),Ht=Ft.getInstance(),zt="trace",Vt=function(){function t(){this._proxyTracerProvider=new wt,this.wrapSpanContext=yt,this.isSpanContextValid=Et,this.deleteSpan=pt,this.getSpan=ut,this.getActiveSpan=ct,this.getSpanContext=ht,this.setSpan=lt,this.setSpanContext=ft}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 wt},t}().getInstance(),Xt=L("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Gt(t){return!0===t.getValue(Xt)}var qt="baggage",Wt=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 Kt(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 Yt=function(){function t(){}return t.prototype.inject=function(t,e,n){var r=Ht.getBaggage(t);if(r&&!Gt(t)){var o=function(t){return t.getAllEntries().map((function(t){var e=Wt(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,qt,i)}},t.prototype.extract=function(t,e,n){var r=n.get(e,qt),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=Kt(t);if(e){var n={value:e.value};e.metadata&&(n.metadata=e.metadata),i[e.key]=n}})),0===Object.entries(i).length?t:Ht.setBaggage(t,Ht.createBaggage(i)))},t.prototype.fields=function(){return[qt]},t}(),Qt=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.")},$t=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 Jt(t){var e,n,r={};if("object"!=typeof t||null==t)return r;try{for(var o=Qt(Object.entries(t)),i=o.next();!i.done;i=o.next()){var a=$t(i.value,2),s=a[0],u=a[1];te(s)?ee(u)?Array.isArray(u)?r[s]=u.slice():r[s]=u:At.warn("Invalid attribute value set for key: "+s):At.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 te(t){return"string"==typeof t&&t.length>0}function ee(t){return null==t||(Array.isArray(t)?function(t){var e,n,r;try{for(var o=Qt(t),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){if(!r){if(ne(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):ne(t))}function ne(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}var re,oe=function(t){At.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 ie(t){try{oe(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"}(re||(re={}));var ae="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},se=["OTEL_SDK_DISABLED"];function ue(t){return se.indexOf(t)>-1}var ce=["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 le(t){return ce.indexOf(t)>-1}var pe=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function fe(t){return pe.indexOf(t)>-1}var he=1/0,_e=128,de={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:he,OTEL_ATTRIBUTE_COUNT_LIMIT:_e,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:he,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:_e,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:he,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:_e,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:re.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 Ee(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 Te={ALL:f.ALL,VERBOSE:f.VERBOSE,DEBUG:f.DEBUG,INFO:f.INFO,WARN:f.WARN,ERROR:f.ERROR,NONE:f.NONE};function ge(t,e,n){var r=n[t];if("string"==typeof r){var o=Te[r.toUpperCase()];null!=o&&(e[t]=o)}}function me(t){var e={};for(var n in de){var r=n;if("OTEL_LOG_LEVEL"===r)ge(r,e,t);else if(ue(r))ve(r,e,t);else if(le(r))Ee(r,e,t);else if(fe(r))ye(r,e,t);else{var o=t[r];null!=o&&(e[r]=String(o))}}return e}function Oe(){var t=me(ae);return Object.assign({},de,t)}function Se(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 be,Re=performance,Le="exception.type",we="exception.message",Pe="exception.stacktrace",Ae="http.method",Ce="http.url",ke="http.host",Ne="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.15.2",be);var Ve,Xe=Math.pow(10,6),Ge=Math.pow(10,9);function qe(t){var e=t/1e3;return[Math.trunc(e),Math.round(t%1e3*Xe)]}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]*Ge+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]>=Ge&&(n[1]-=Ge,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){At.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){At.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=Vt.getSpanContext(t);if(r&&!Gt(t)&&Et(r)){var o="00-"+r.traceId+"-"+r.spanId+"-0"+Number(r.traceFlags||w.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 Vt.setSpanContext(t,i)},t.prototype.fields=function(){return[cn,ln]},t}(),dn="[object Null]",vn="[object Undefined]",En=Function.prototype.toString,yn=En.call(Object),Tn=(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?vn: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=Tn(t);if(null===e)return!0;var n=mn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&En.call(n)===yn}function Rn(t){return Pn(t)?t.slice():t}function Ln(t,e,n,r){var o;if(void 0===n&&(n=0),!(n>20)){if(n++,kn(t)||kn(e)||An(e))o=Rn(e);else if(Pn(t)){if(o=t.slice(),Pn(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(kn(c))void 0===c?delete o[u]:o[u]=c;else{var l=o[u],p=c;if(wn(t,u,r)||wn(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]=Ln(o[u],c,n,r)}}}}else o=e;return o}}function wn(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 Pn(t){return Array.isArray(t)}function An(t){return"function"==typeof t}function Cn(t){return!kn(t)&&!Pn(t)&&!An(t)&&"object"==typeof t}function kn(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t||void 0===t||t instanceof Date||t instanceof RegExp||null===t}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.")};function In(t,e){return"string"==typeof e?t===e:!!t.match(e)}function Dn(t,e){var n,r;if(!e)return!1;try{for(var o=Nn(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}var Mn=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}(),xn=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},Un=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))},jn=function(){function t(t,e){this._callback=t,this._that=e,this._isCalled=!1,this._deferred=new Mn}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,Un([this._that],xn(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}(),Zn=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 Bn(t){return Object.keys(t).map((function(e){return Fn(e,t[e])}))}function Fn(t,e){return{key:t,value:Hn(e)}}function Hn(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(Hn)}}:"object"===e&&null!=t?{kvlistValue:{values:Object.entries(t).map((function(t){var e=Zn(t,2);return Fn(e[0],e[1])}))}}:{}}function zn(t,e){var n,r=t.spanContext(),o=t.status,i=e?t.parentSpanId:null!=t.parentSpanId?Se(t.parentSpanId):void 0;return{traceId:e?r.traceId:Se(r.traceId),spanId:e?r.spanId:Se(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:Qe(t.startTime),endTimeUnixNano:Qe(t.endTime),attributes:Bn(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(Vn),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?Bn(t.attributes):[],spanId:e?t.context.spanId:Se(t.context.spanId),traceId:e?t.context.traceId:Se(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 Vn(t){return{attributes:t.attributes?Bn(t.attributes):[],name:t.name,timeUnixNano:Qe(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}var Xn=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.")},Gn=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 qn(t,e){for(var n=function(t){var e,n,r=new Map;try{for(var o=Xn(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=Gn(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,v=p.map((function(t){return zn(t,e)}));u.push({scope:{name:h,version:_},spans:v,schemaUrl:d})}l=c.next()}var E={resource:{attributes:Bn(s.attributes),droppedAttributesCount:0},scopeSpans:u,schemaUrl:void 0};r.push(E),i=o.next()}return r}var Wn=function(){return Wn=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},Wn.apply(this,arguments)},Kn=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())}))},Yn=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])}}},Qn=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},$n=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 At.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&&At.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 Kn(this,void 0,void 0,(function(){return Yn(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=Wn(Wn({},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=Qn(t,2),i=o[0],a=o[1];return Wn(Wn(Wn(Wn({},r._syncAttributes),i),null!==(n=e._syncAttributes)&&void 0!==n?n:e.attributes),a)}));return new t(o,i)},t.EMPTY=new t({}),t}();class Jn{constructor(t){this.config=t}export(t,e){const n=function(t,e){return{resourceSpans:qn(t,e)}}(t,!0);this.config.api.pushTraces(n),e({code:Ve.SUCCESS})}shutdown(){return Promise.resolve(void 0)}}class tr{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 er=function(t,e){return er=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])},er(t,e)};var nr,rr=performance,or="http.url",ir="http.user_agent",ar=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.")},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},ur=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:St.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?(At.warn("Invalid attribute key: "+t),this):ee(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):(At.warn("Invalid attribute value set for key: "+t),this)},t.prototype.setAttributes=function(t){var e,n;try{for(var r=ar(Object.entries(t)),o=r.next();!o.done;o=r.next()){var i=sr(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 At.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(At.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),Je(e)&&(Je(n)||(n=e),e=void 0);var r=Jt(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()?At.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+=Ge),[n,r]}(this.startTime,this.endTime),this._duration[0]<0&&(At.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[we]=t:t&&(t.code?n[Le]=t.code.toString():t.name&&(n[Le]=t.name),t.message&&(n[we]=t.message),t.stack&&(n[Pe]=t.stack)),n[Le]||n[we]?this.addEvent("exception",n,e):At.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&&At.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?(At.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"}(nr||(nr={}));var cr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:nr.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),lr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:nr.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),pr=function(){function t(t){var e,n,r,o;this._root=t.root,this._root||(ie(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new lr),this._remoteParentSampled=null!==(e=t.remoteParentSampled)&&void 0!==e?e:new lr,this._remoteParentNotSampled=null!==(n=t.remoteParentNotSampled)&&void 0!==n?n:new cr,this._localParentSampled=null!==(r=t.localParentSampled)&&void 0!==r?r:new lr,this._localParentNotSampled=null!==(o=t.localParentNotSampled)&&void 0!==o?o:new cr}return t.prototype.shouldSample=function(t,e,n,r,o,i){var a=Vt.getSpanContext(t);return a&&Et(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}(),fr=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?nr.RECORD_AND_SAMPLED:nr.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}(),hr=Oe(),_r=re.AlwaysOn;function dr(){return{sampler:vr(hr),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:Oe().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:Oe().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:Oe().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:Oe().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:Oe().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:Oe().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:Oe().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:Oe().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function vr(t){switch(void 0===t&&(t=Oe()),t.OTEL_TRACES_SAMPLER){case re.AlwaysOn:return new lr;case re.AlwaysOff:return new cr;case re.ParentBasedAlwaysOn:return new pr({root:new lr});case re.ParentBasedAlwaysOff:return new pr({root:new cr});case re.TraceIdRatio:return new fr(Er(t));case re.ParentBasedTraceIdRatio:return new pr({root:new fr(Er(t))});default:return At.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+_r+'".'),new lr}}function Er(t){if(void 0===t.OTEL_TRACES_SAMPLER_ARG||""===t.OTEL_TRACES_SAMPLER_ARG)return At.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(At.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to 1."),1):e<0||e>1?(At.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 yr(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?me(process.env):me(ae);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:_e,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:he,Object.assign({},t,{spanLimits:h})}var Tr=function(){function t(t,e){this._exporter=t,this._finishedSpans=[],this._droppedSpansCount=0;var n=Oe();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 jn(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(At.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&&At.debug("maxQueueSize reached, dropping spans"),void this._droppedSpansCount++;this._droppedSpansCount>0&&(At.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){ie(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){ie(t)}))}),this._scheduledDelayMillis),this._timer)},t.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},t}(),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)}}(),mr=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.onInit(n),r}return gr(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}(Tr),Or=function(){this.generateTraceId=br(16),this.generateSpanId=br(8)},Sr=Array(32);function br(t){return function(){for(var e=0;e<2*t;e++)Sr[e]=Math.floor(16*Math.random())+48,Sr[e]>=58&&(Sr[e]+=39);return String.fromCharCode.apply(null,Sr.slice(0,2*t))}}var Rr,Lr=function(){function t(t,e,n){this._tracerProvider=n;var r,o,i,a,s=(r=e,o={sampler:vr()},i=dr(),(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 Or,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=Vt.deleteSpan(n));var a=Vt.getSpan(n);if(Gt(n))return At.debug("Instrumentation suppressed, returning Noop Span"),Vt.wrapSpanContext(it);var s,u,c,l=null==a?void 0:a.spanContext(),p=this._idGenerator.generateSpanId();l&&Vt.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:Ot.INTERNAL,h=(null!==(o=e.links)&&void 0!==o?o:[]).map((function(t){return{context:t.context,attributes:Jt(t.attributes)}})),_=Jt(e.attributes),d=this._sampler.shouldSample(n,s,t,f,_,h);u=null!==(i=d.traceState)&&void 0!==i?i:u;var v={traceId:s,spanId:p,traceFlags:d.decision===mt.RECORD_AND_SAMPLED?w.SAMPLED:w.NONE,traceState:u};if(d.decision===mt.NOT_RECORD)return At.debug("Recording is off, propagating context in a non-recording span"),Vt.wrapSpanContext(v);var E=new ur(this,n,t,v,f,c,h,e.startTime),y=Jt(Object.assign(_,d.attributes));return E.setAttributes(y),E},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=Vt.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}(),wr=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.")},Pr=function(){function t(t){this._spanProcessors=t}return t.prototype.forceFlush=function(){var t,e,n=[];try{for(var r=wr(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){ie(e||new Error("MultiSpanProcessor: forceFlush failed")),t()}))}))},t.prototype.onStart=function(t,e){var n,r;try{for(var o=wr(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=wr(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=wr(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}(),Ar=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"}(Rr||(Rr={}));var Cr,kr,Nr=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}({},dr(),yr(t));this.resource=null!==(e=n.resource)&&void 0!==e?e:$n.empty(),this.resource=$n.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var r=this._buildExporterFromEnv();if(void 0!==r){var o=new mr(r);this.activeSpanProcessor=o}else this.activeSpanProcessor=new Ar}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 Lr({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 At.error("Error while trying to shutdown current span processor",t)})),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new Pr(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(t){void 0===t&&(t={}),Vt.setGlobalTracerProvider(this),void 0===t.propagator&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&Pt.setGlobalContextManager(t.contextManager),t.propagator&&Ht.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=Rr.timeout}),t);e.forceFlush().then((function(){clearTimeout(o),r!==Rr.timeout&&(r=Rr.resolved,n(r))})).catch((function(t){clearTimeout(o),r=Rr.error,n(t)}))}))}));return new Promise((function(t,n){Promise.all(e).then((function(e){var r=e.filter((function(t){return t!==Rr.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(Oe().OTEL_PROPAGATORS)),n=e.map((function(e){var n=t._getPropagator(e);return n||At.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=Oe().OTEL_TRACES_EXPORTER;if("none"!==t&&""!==t){var e=this._getSpanExporter(t);return e||At.error('Exporter "'+t+'" requested through environment variable is unavailable.'),e}},t._registeredPropagators=new Map([["tracecontext",function(){return new _n}],["baggage",function(){return new Yt}]]),t._registeredExporters=new Map,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},Dr=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(){this._enabled=!1,this._currentContext=A}return t.prototype._bindFunction=function(t,e){void 0===t&&(t=A);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=A,this._enabled=!1,this},t.prototype.enable=function(){return this._enabled||(this._enabled=!0,this._currentContext=A),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||A;try{return e.call.apply(e,Dr([n],Ir(r),!1))}finally{this._currentContext=i}},t}(),xr=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)}}(),Ur=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 xr(e,t),e.prototype.register=function(e){void 0===e&&(e={}),void 0===e.contextManager&&(e.contextManager=new Mr),e.contextManager&&e.contextManager.enable(),t.prototype.register.call(this,e)},e}(Nr);function jr(t,e){return e in t}function Zr(t,e,n){if(jr(n,e)&&"number"==typeof n[e])return t.addEvent(e,n[e]),t}function Br(t,e){Zr(t,Cr.FETCH_START,e),Zr(t,Cr.DOMAIN_LOOKUP_START,e),Zr(t,Cr.DOMAIN_LOOKUP_END,e),Zr(t,Cr.CONNECT_START,e),jr(e,"name")&&e.name.startsWith("https:")&&Zr(t,Cr.SECURE_CONNECTION_START,e),Zr(t,Cr.CONNECT_END,e),Zr(t,Cr.REQUEST_START,e),Zr(t,Cr.RESPONSE_START,e),Zr(t,Cr.RESPONSE_END,e);var n=e[Cr.ENCODED_BODY_SIZE];void 0!==n&&t.setAttribute(Me,n);var r=e[Cr.DECODED_BODY_SIZE];void 0!==r&&n!==r&&t.setAttribute(xe,r)}function Fr(t,e,n,r,o,i){void 0===o&&(o=new WeakSet);var a=Hr(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[Cr.FETCH_START])),r=Qe(Ye(e[Cr.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[Cr.FETCH_START],r=e[Cr.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[Cr.FETCH_START])),p=o-Qe(Ye(c[Cr.RESPONSE_END]));l>=i&&(!r||p<r)&&(r=p,a=c)}return a}(u,c[Cr.RESPONSE_END],n),p=c[Cr.RESPONSE_END];return l[Cr.FETCH_START]<p&&(l=c,c=void 0),{corsPreFlightRequest:c,mainRequest:l}}return{mainRequest:s[0]}}function Hr(t){if("function"==typeof URL)return new URL(t,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var e=(kr||(kr=document.createElement("a")),kr);return e.href=t,e}function zr(t,e){var n=e||[];return("string"==typeof n||n instanceof RegExp)&&(n=[n]),Hr(t).origin===location.origin||n.some((function(e){return In(t,e)}))}function Vr(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=Vr(o);e=e.concat(i.instrumentations)}else"function"==typeof o?e.push(new o):o.instrumentationName&&e.push(o)}return{instrumentations:e}}function Xr(t){var e=Vr(t.instrumentations).instrumentations,n=t.tracerProvider||Vt.getTracerProvider(),r=t.meterProvider||Nt.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"}(Cr||(Cr={}));var Gr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function qr(t){return"function"==typeof t}var Wr=console.error.bind(console);function Kr(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function Yr(t){t&&t.logger&&(qr(t.logger)?Wr=t.logger:Wr("new logger isn't a function, not replacing"))}function Qr(t,e,n){if(t&&t[e]){if(!n)return Wr("no wrapper function"),void Wr((new Error).stack);if(qr(t[e])&&qr(n)){var r=t[e],o=n(r,e);return Kr(o,"__original",r),Kr(o,"__unwrap",(function(){t[e]===o&&Kr(t,e,r)})),Kr(o,"__wrapped",!0),Kr(t,e,o),o}Wr("original object and wrapper must be functions")}else Wr("no original function "+e+" to wrap")}function $r(t,e){return t&&t[e]?t[e].__unwrap?t[e].__unwrap():void Wr("no original to unwrap to -- has "+e+" already been unwrapped?"):(Wr("no function to unwrap."),void Wr((new Error).stack))}Yr.wrap=Qr,Yr.massWrap=function(t,e,n){if(!t)return Wr("must provide one or more modules to patch"),void Wr((new Error).stack);Array.isArray(t)||(t=[t]),e&&Array.isArray(e)?t.forEach((function(t){e.forEach((function(e){Qr(t,e,n)}))})):Wr("must provide one or more functions to wrap on modules")},Yr.unwrap=$r,Yr.massUnwrap=function(t,e){if(!t)return Wr("must provide one or more modules to patch"),void Wr((new Error).stack);Array.isArray(t)||(t=[t]),e&&Array.isArray(e)?t.forEach((function(t){e.forEach((function(e){$r(t,e)}))})):Wr("must provide one or more functions to unwrap on modules")};var Jr,to=Yr,eo=function(){return eo=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},eo.apply(this,arguments)},no=function(){function t(t,e,n){void 0===n&&(n={}),this.instrumentationName=t,this.instrumentationVersion=e,this._wrap=to.wrap,this._unwrap=to.unwrap,this._massWrap=to.massWrap,this._massUnwrap=to.massUnwrap,this._config=eo({enabled:!0},n),this._diag=At.createComponentLogger({namespace:t}),this._tracer=Vt.getTracer(t,e),this._meter=Nt.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}(),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(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 ro(e,t),e}(no);function io(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 ao(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"}(Jr||(Jr={}));var so;!function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"}(so||(so={}));var uo,co={"first-paint":so.FIRST_PAINT,"first-contentful-paint":so.FIRST_CONTENTFUL_PAINT},lo=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,"@opentelemetry/instrumentation-document-load","0.33.0",e)||this;return n.component="document-load",n.version="1",n.moduleName=n.component,n}return 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}er(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(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=rr).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"traceparent"===t.getAttribute("name")})),n=function(){var t,e,n={},r=null===(e=(t=rr).getEntriesByType)||void 0===e?void 0:e.call(t,"navigation")[0];if(r)Object.values(Cr).forEach((function(t){if(jr(r,t)){var e=r[t];"number"==typeof e&&(n[t]=e)}}));else{var o=rr.timing;o&&Object.values(Cr).forEach((function(t){if(jr(o,t)){var e=o[t];"number"==typeof e&&(n[t]=e)}}))}return n}(),r=e&&e.content||"";Pt.with(Ht.extract(A,{traceparent:r}),(function(){var e,r=t._startSpan(Jr.DOCUMENT_LOAD,Cr.FETCH_START,n);r&&(Pt.with(Vt.setSpan(Pt.active(),r),(function(){var e=t._startSpan(Jr.DOCUMENT_FETCH,Cr.FETCH_START,n);e&&(e.setAttribute(or,location.href),Pt.with(Vt.setSpan(Pt.active(),e),(function(){var r;Br(e,n),t._addCustomAttributesOnSpan(e,null===(r=t._getConfig().applyCustomAttributesOnSpan)||void 0===r?void 0:r.documentFetch),t._endSpan(e,Cr.RESPONSE_END,n)})))})),r.setAttribute(or,location.href),r.setAttribute(ir,navigator.userAgent),t._addResourcesSpans(r),Zr(r,Cr.FETCH_START,n),Zr(r,Cr.UNLOAD_EVENT_START,n),Zr(r,Cr.UNLOAD_EVENT_END,n),Zr(r,Cr.DOM_INTERACTIVE,n),Zr(r,Cr.DOM_CONTENT_LOADED_EVENT_START,n),Zr(r,Cr.DOM_CONTENT_LOADED_EVENT_END,n),Zr(r,Cr.DOM_COMPLETE,n),Zr(r,Cr.LOAD_EVENT_START,n),Zr(r,Cr.LOAD_EVENT_END,n),function(t){var e,n,r=null===(n=(e=rr).getEntriesByType)||void 0===n?void 0:n.call(e,"paint");r&&r.forEach((function(e){var n=e.name,r=e.startTime;jr(co,n)&&t.addEvent(co[n],r)}))}(r),t._addCustomAttributesOnSpan(r,null===(e=t._getConfig().applyCustomAttributesOnSpan)||void 0===e?void 0:e.documentLoad),t._endSpan(r,Cr.LOAD_EVENT_END,n))}))},e.prototype._endSpan=function(t,e,n){t&&(jr(n,e)?t.end(n[e]):t.end())},e.prototype._initResourceSpan=function(t,e){var n,r=this._startSpan(Jr.RESOURCE_FETCH,Cr.FETCH_START,t,e);r&&(r.setAttribute(or,t.name),Br(r,t),this._addCustomAttributesOnResourceSpan(r,t,null===(n=this._getConfig().applyCustomAttributesOnSpan)||void 0===n?void 0:n.resourceFetch),this._endSpan(r,Cr.RESPONSE_END,t))},e.prototype._startSpan=function(t,e,n,r){if(jr(n,e)&&"number"==typeof n[e])return this.tracer.startSpan(t,{startTime:n[e]},r?Vt.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&&io((function(){return e(t)}),(function(t){t&&n._diag.error("addCustomAttributesOnSpan",t)}),!0)},e.prototype._addCustomAttributesOnResourceSpan=function(t,e,n){var r=this;n&&io((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}(oo);!function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"}(uo||(uo={}));var po,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)}}(),_o=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[Cr.FETCH_START]},Vt.setSpan(Pt.active(),t));this._getConfig().ignoreNetworkEvents||Br(n,e),n.end(e[Cr.RESPONSE_END])},e.prototype._addFinalSpanAttributes=function(t,e){var n=Hr(e.url);t.setAttribute(Ie,e.status),null!=e.statusText&&t.setAttribute(uo.HTTP_STATUS_TEXT,e.statusText),t.setAttribute(ke,n.host),t.setAttribute(Ne,n.protocol.replace(":","")),t.setAttribute(De,navigator.userAgent)},e.prototype._addHeaders=function(t,e){if(!zr(e,this._getConfig().propagateTraceHeaderCorsUrls)){var n={};return Ht.inject(Pt.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}if(t instanceof Request)Ht.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)Ht.inject(Pt.active(),t.headers,{set:function(t,e,n){return t.set(e,"string"==typeof n?n:String(n))}});else{n={};Ht.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={}),!Dn(t,this._getConfig().ignoreUrls)){var r=(e.method||"GET").toUpperCase(),o="HTTP "+r;return this.tracer.startSpan(o,{kind:Ot.CLIENT,attributes:(n={},n[uo.COMPONENT]=this.moduleName,n[Ae]=r,n[Ce]=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=Fr(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||Br(t,i)}},e.prototype._markResourceAsUsed=function(t){this._usedResources.add(t)},e.prototype._endSpan=function(t,e,n){var r=this,o=qe(Date.now()),i=Ke();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=Hr(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(Vt.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&&io((function(){return o(t,e,n)}),(function(t){t&&r._diag.error("applyCustomAttributesOnSpan",t)}),!0)},e.prototype._prepareSpanData=function(t){var e=Ke(),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(){ao(fetch)&&(this._unwrap(ae,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(ae,"fetch",this._patchConstructor())},e.prototype.disable=function(){this._unwrap(ae,"fetch"),this._usedResources=new WeakSet},e}(oo);!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"}(po||(po={}));var vo,Eo="0.41.2";!function(t){t.HTTP_STATUS_TEXT="http.status_text"}(vo||(vo={}));var yo=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)}}(),To=function(t){function e(e){var n=t.call(this,"@opentelemetry/instrumentation-xml-http-request",Eo,e)||this;return n.component="xml-http-request",n.version=Eo,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return yo(e,t),e.prototype.init=function(){},e.prototype._getConfig=function(){return this._config},e.prototype._addHeaders=function(t,e){if(!zr(Hr(e).href,this._getConfig().propagateTraceHeaderCorsUrls)){var n={};return Ht.inject(Pt.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}var r={};Ht.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(Vt.setSpan(Pt.active(),t),(function(){var t=n.tracer.startSpan("CORS Preflight",{startTime:e[Cr.FETCH_START]});Br(t,e),t.end(e[Cr.RESPONSE_END])}))},e.prototype._addFinalSpanAttributes=function(t,e,n){if("string"==typeof n){var r=Hr(n);void 0!==e.status&&t.setAttribute(Ie,e.status),void 0!==e.statusText&&t.setAttribute(vo.HTTP_STATUS_TEXT,e.statusText),t.setAttribute(ke,r.host),t.setAttribute(Ne,r.protocol.replace(":","")),t.setAttribute(De,navigator.userAgent)}},e.prototype._applyAttributesAfterXHR=function(t,e){var n=this,r=this._getConfig().applyCustomAttributesOnSpan;"function"==typeof r&&io((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=Hr(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=Fr(Hr(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)),Br(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(!Dn(e,this._getConfig().ignoreUrls)){var o=n.toUpperCase(),i=this.tracer.startSpan(o,{kind:Ot.CLIENT,attributes:(r={},r[Ae]=n,r[Ce]=Hr(e).toString(),r)});return i.addEvent(po.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(po.EVENT_ERROR,this)}function r(){e(po.EVENT_ABORT,this)}function o(){e(po.EVENT_TIMEOUT,this)}function i(){this.status<299?e(po.EVENT_LOAD,this):e(po.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(Vt.setSpan(Pt.active(),p),(function(){t._tasksCount++,l.sendStartTime=Ke(),p.addEvent(po.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),ao(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),ao(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}(oo);const go={ignoreUrls:[],propagateTraceHeaderCorsUrls:[]};function mo(t=go){return[new lo,new _o(t),new To(t)]}var Oo="OT_ZONE_CONTEXT",So=function(){function t(){this._enabled=!1,this._zoneCounter=0}return t.prototype._activeContextFromZone=function(t){return t&&t.get(Oo)||A},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[Oo]=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 A;var t=this._getActiveZone(),e=this._activeContextFromZone(t);return e||A},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!==w.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 N.zone}static get currentTask(){return k}static __load_patch(e,o,i=!1){if(w.hasOwnProperty(e)){if(!i&&a)throw Error("Already loaded patch: "+e)}else if(!t["__Zone_disable_"+e]){const i="Zone:"+e;n(i),w[e]=o(t,s,I),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){N={parent:N,zone:this};try{return this._zoneDelegate.invoke(this,t,e,n,r)}finally{N=N.parent}}runGuarded(t,e=null,n,r){N={parent:N,zone:this};try{try{return this._zoneDelegate.invoke(this,t,e,n,r)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{N=N.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===O&&(t.type===C||t.type===A))return;const r=t.state!=b;r&&t._transitionTo(b,S),t.runCount++;const o=k;k=t,N={parent:N,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!==O&&t.state!==L&&(t.type==C||t.data&&t.data.isPeriodic?r&&t._transitionTo(S,b):(t.runCount=0,this._updateTaskCount(t,-1),r&&t._transitionTo(O,b,O))),N=N.parent,k=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(m,O);const e=[];t._zoneDelegates=e,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(e){throw t._transitionTo(L,m,O),this._zoneDelegate.handleError(this,e),e}return t._zoneDelegates===e&&this._updateTaskCount(t,1),t.state==m&&t._transitionTo(S,m),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(A,t,e,n,r,o))}scheduleEventTask(t,e,n,r,o){return this.scheduleTask(new l(C,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(L,R),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(t,-1),t._transitionTo(O,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!=P)throw new Error("Task is missing scheduleFn.");v(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===C&&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&&y(),M--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(O,m)}_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==O&&(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"),_=i("then");let h,d=[],E=!1;function T(e){if(h||t[f]&&(h=t[f].resolve(0)),h){let t=h[_];t||(t=h.then),t.call(h,e)}else t[p](e,0)}function v(t){0===M&&0===d.length&&T(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){I.onUnhandledError(t)}}}I.microtaskDrainDone(),E=!1}}const g={name:"NO ZONE"},O="notScheduled",m="scheduling",S="scheduled",b="running",R="canceling",L="unknown",P="microTask",A="macroTask",C="eventTask",w={},I={symbol:i,currentZoneFrame:()=>N,onUnhandledError:D,microtaskDrainDone:D,scheduleMicroTask:v,showUncaughtError:()=>!s[i("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:D,patchMethod:()=>D,bindArguments:()=>[],patchThen:()=>D,patchMacroTask:()=>D,patchEventPrototype:()=>D,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>D,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>D,wrapWithCurrentZone:()=>D,filterProperties:()=>[],attachOriginToPatched:()=>D,_redefineProperty:()=>D,patchCallbacks:()=>D,nativeScheduleMicroTask:T};let N={parent:null,zone:new s(null,null)},k=null,M=0;function D(){}r("Zone","Zone"),t.Zone=s}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||Io);
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 N.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,k),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){N={parent:N,zone:this};try{return this._zoneDelegate.invoke(this,t,e,n,r)}finally{N=N.parent}}runGuarded(t,e=null,n,r){N={parent:N,zone:this};try{try{return this._zoneDelegate.invoke(this,t,e,n,r)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{N=N.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===A||t.type===P))return;const r=t.state!=b;r&&t._transitionTo(b,S),t.runCount++;const o=I;I=t,N={parent:N,zone:this};try{t.type==P&&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!==L&&(t.type==A||t.data&&t.data.isPeriodic?r&&t._transitionTo(S,b):(t.runCount=0,this._updateTaskCount(t,-1),r&&t._transitionTo(m,b,m))),N=N.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(L,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(w,t,e,n,r,void 0))}scheduleMacroTask(t,e,n,r,o){return this.scheduleTask(new l(P,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||g).name+"; Execution: "+this.name+")");t._transitionTo(R,S,b);try{this._zoneDelegate.cancelTask(this,t)}catch(e){throw t._transitionTo(L,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!=w)throw new Error("Task is missing scheduleFn.");y(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),D++;try{return t.runCount++,t.zone.runTask(t,e,n)}finally{1==D&&T(),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=[],v=!1;function E(e){if(_||t[f]&&(_=t[f].resolve(0)),_){let t=_[h];t||(t=_.then),t.call(_,e)}else t[p](e,0)}function y(t){0===D&&0===d.length&&E(T),t&&d.push(t)}function T(){if(!v){for(v=!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){k.onUnhandledError(t)}}}k.microtaskDrainDone(),v=!1}}const g={name:"NO ZONE"},m="notScheduled",O="scheduling",S="scheduled",b="running",R="canceling",L="unknown",w="microTask",P="macroTask",A="eventTask",C={},k={symbol:i,currentZoneFrame:()=>N,onUnhandledError:M,microtaskDrainDone:M,scheduleMicroTask:y,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:E};let N={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||Gr);
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 Di=Object.getOwnPropertyDescriptor,xi=Object.defineProperty,Ui=Object.getPrototypeOf,ji=Object.create,Bi=Array.prototype.slice,Xi="addEventListener",Zi="removeEventListener",Fi=Zone.__symbol__(Xi),Hi=Zone.__symbol__(Zi),zi="true",Gi="false",Vi=Zone.__symbol__("");function qi(t,e){return Zone.current.wrap(t,e)}function Wi(t,e,n,r,o){return Zone.current.scheduleMacroTask(t,e,n,r,o)}const Ki=Zone.__symbol__,Yi="undefined"!=typeof window,Qi=Yi?window:void 0,$i=Yi&&Qi||"object"==typeof self&&self||Io;function Ji(t,e){for(let n=t.length-1;n>=0;n--)"function"==typeof t[n]&&(t[n]=qi(t[n],e+"_"+n));return t}function ta(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&void 0===t.set)}const ea="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,na=!("nw"in $i)&&void 0!==$i.process&&"[object process]"==={}.toString.call($i.process),ra=!na&&!ea&&!(!Yi||!Qi.HTMLElement),oa=void 0!==$i.process&&"[object process]"==={}.toString.call($i.process)&&!ea&&!(!Yi||!Qi.HTMLElement),ia={},aa=function(t){if(!(t=t||$i.event))return;let e=ia[t.type];e||(e=ia[t.type]=Ki("ON_PROPERTY"+t.type));const n=this||t.target||$i,r=n[e];let o;if(ra&&n===Qi&&"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 sa(t,e,n){let r=Di(t,e);if(!r&&n){Di(n,e)&&(r={enumerable:!0,configurable:!0})}if(!r||!r.configurable)return;const o=Ki("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=ia[s];u||(u=ia[s]=Ki("ON_PROPERTY"+s)),r.set=function(e){let n=this;if(n||t!==$i||(n=$i),!n)return;"function"==typeof n[u]&&n.removeEventListener(s,aa),a&&a.call(n,null),n[u]=e,"function"==typeof e&&n.addEventListener(s,aa,!1)},r.get=function(){let n=this;if(n||t!==$i||(n=$i),!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},xi(t,e,r),t[o]=!0}function ua(t,e,n){if(e)for(let r=0;r<e.length;r++)sa(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++)sa(t,e[r],n)}}const ca=Ki("originalInstance");function la(t){const e=$i[t];if(!e)return;$i[Ki(t)]=e,$i[t]=function(){const n=Ji(arguments,t);switch(n.length){case 0:this[ca]=new e;break;case 1:this[ca]=new e(n[0]);break;case 2:this[ca]=new e(n[0],n[1]);break;case 3:this[ca]=new e(n[0],n[1],n[2]);break;case 4:this[ca]=new e(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}},_a($i[t],e);const n=new e((function(){}));let r;for(r in n)"XMLHttpRequest"===t&&"responseBlob"===r||function(e){"function"==typeof n[e]?$i[t].prototype[e]=function(){return this[ca][e].apply(this[ca],arguments)}:xi($i[t].prototype,e,{set:function(n){"function"==typeof n?(this[ca][e]=qi(n,t+"."+e),_a(this[ca][e],n)):this[ca][e]=n},get:function(){return this[ca][e]}})}(r);for(r in e)"prototype"!==r&&e.hasOwnProperty(r)&&($i[t][r]=e[r])}function pa(t,e,n){let r=t;for(;r&&!r.hasOwnProperty(e);)r=Ui(r);!r&&t[e]&&(r=t);const o=Ki(e);let i=null;if(r&&(!(i=r[o])||!r.hasOwnProperty(o))){i=r[o]=r[e];if(ta(r&&Di(r,e))){const t=n(i,o,e);r[e]=function(){return t(this,arguments)},_a(r[e],i)}}return i}function fa(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=pa(t,e,(t=>function(e,r){const i=n(e,r);return i.cbIdx>=0&&"function"==typeof r[i.cbIdx]?Wi(i.name,r[i.cbIdx],i,o):t.apply(e,r)}))}function _a(t,e){t[Ki("OriginalDelegate")]=e}let ha=!1,da=!1;function Ea(){try{const t=Qi.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch(t){}return!1}function Ta(){if(ha)return da;ha=!0;try{const t=Qi.navigator.userAgent;-1===t.indexOf("MSIE ")&&-1===t.indexOf("Trident/")&&-1===t.indexOf("Edge/")||(da=!0)}catch(t){}return da}
22
+ const bo=Object.getOwnPropertyDescriptor,Ro=Object.defineProperty,Lo=Object.getPrototypeOf,wo=Object.create,Po=Array.prototype.slice,Ao="addEventListener",Co="removeEventListener",ko=Zone.__symbol__(Ao),No=Zone.__symbol__(Co),Io="true",Do="false",Mo=Zone.__symbol__("");function xo(t,e){return Zone.current.wrap(t,e)}function Uo(t,e,n,r,o){return Zone.current.scheduleMacroTask(t,e,n,r,o)}const jo=Zone.__symbol__,Zo="undefined"!=typeof window,Bo=Zo?window:void 0,Fo=Zo&&Bo||"object"==typeof self&&self||Gr;function Ho(t,e){for(let n=t.length-1;n>=0;n--)"function"==typeof t[n]&&(t[n]=xo(t[n],e+"_"+n));return t}function zo(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&void 0===t.set)}const Vo="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,Xo=!("nw"in Fo)&&void 0!==Fo.process&&"[object process]"==={}.toString.call(Fo.process),Go=!Xo&&!Vo&&!(!Zo||!Bo.HTMLElement),qo=void 0!==Fo.process&&"[object process]"==={}.toString.call(Fo.process)&&!Vo&&!(!Zo||!Bo.HTMLElement),Wo={},Ko=function(t){if(!(t=t||Fo.event))return;let e=Wo[t.type];e||(e=Wo[t.type]=jo("ON_PROPERTY"+t.type));const n=this||t.target||Fo,r=n[e];let o;if(Go&&n===Bo&&"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 Yo(t,e,n){let r=bo(t,e);if(!r&&n){bo(n,e)&&(r={enumerable:!0,configurable:!0})}if(!r||!r.configurable)return;const o=jo("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=Wo[s];u||(u=Wo[s]=jo("ON_PROPERTY"+s)),r.set=function(e){let n=this;if(n||t!==Fo||(n=Fo),!n)return;"function"==typeof n[u]&&n.removeEventListener(s,Ko),a&&a.call(n,null),n[u]=e,"function"==typeof e&&n.addEventListener(s,Ko,!1)},r.get=function(){let n=this;if(n||t!==Fo||(n=Fo),!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},Ro(t,e,r),t[o]=!0}function Qo(t,e,n){if(e)for(let r=0;r<e.length;r++)Yo(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++)Yo(t,e[r],n)}}const $o=jo("originalInstance");function Jo(t){const e=Fo[t];if(!e)return;Fo[jo(t)]=e,Fo[t]=function(){const n=Ho(arguments,t);switch(n.length){case 0:this[$o]=new e;break;case 1:this[$o]=new e(n[0]);break;case 2:this[$o]=new e(n[0],n[1]);break;case 3:this[$o]=new e(n[0],n[1],n[2]);break;case 4:this[$o]=new e(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}},ni(Fo[t],e);const n=new e((function(){}));let r;for(r in n)"XMLHttpRequest"===t&&"responseBlob"===r||function(e){"function"==typeof n[e]?Fo[t].prototype[e]=function(){return this[$o][e].apply(this[$o],arguments)}:Ro(Fo[t].prototype,e,{set:function(n){"function"==typeof n?(this[$o][e]=xo(n,t+"."+e),ni(this[$o][e],n)):this[$o][e]=n},get:function(){return this[$o][e]}})}(r);for(r in e)"prototype"!==r&&e.hasOwnProperty(r)&&(Fo[t][r]=e[r])}function ti(t,e,n){let r=t;for(;r&&!r.hasOwnProperty(e);)r=Lo(r);!r&&t[e]&&(r=t);const o=jo(e);let i=null;if(r&&(!(i=r[o])||!r.hasOwnProperty(o))){i=r[o]=r[e];if(zo(r&&bo(r,e))){const t=n(i,o,e);r[e]=function(){return t(this,arguments)},ni(r[e],i)}}return i}function ei(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=ti(t,e,(t=>function(e,r){const i=n(e,r);return i.cbIdx>=0&&"function"==typeof r[i.cbIdx]?Uo(i.name,r[i.cbIdx],i,o):t.apply(e,r)}))}function ni(t,e){t[jo("OriginalDelegate")]=e}let ri=!1,oi=!1;function ii(){try{const t=Bo.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch(t){}return!1}function ai(){if(ri)return oi;ri=!0;try{const t=Bo.navigator.userAgent;-1===t.indexOf("MSIE ")&&-1===t.indexOf("Trident/")&&-1===t.indexOf("Edge/")||(oi=!0)}catch(t){}return oi}
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 _(t){return t}function h(t){return N.reject(t)}const d=i("state"),E=i("value"),T=i("finally"),v=i("parentPromiseValue"),y=i("parentPromiseState"),g=null,O=!0,m=!1;function S(t,e){return n=>{try{L(t,e,n)}catch(e){L(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 L(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((()=>{L(t,!1,e)}))(),t}if(r!==m&&i instanceof N&&i.hasOwnProperty(d)&&i.hasOwnProperty(E)&&i[d]!==g)A(i),L(t,i[d],i[E]);else if(r!==m&&"function"==typeof c)try{c.call(i,u(S(t,r)),u(S(t,!1)))}catch(e){u((()=>{L(t,!1,e)}))()}else{t[d]=r;const u=t[E];if(t[E]=i,t[T]===T&&r===O&&(t[d]=t[y],t[E]=t[v]),r===m&&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;)C(t,u[e++],u[e++],u[e++],u[e++]);if(0==u.length&&r==m){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 P=i("rejectionHandledHandler");function A(t){if(0===t[d]){try{const n=e[P];n&&"function"==typeof n&&n.call(this,{rejection:t[E],promise:t})}catch(t){}t[d]=m;for(let e=0;e<a.length;e++)t===a[e].promise&&a.splice(e,1)}}function C(t,e,n,r,o){A(t);const i=t[d],a=i?"function"==typeof r?r:_:"function"==typeof o?o:h;e.scheduleMicroTask("Promise.then",(()=>{try{const r=t[E],o=!!n&&T===n[T];o&&(n[v]=r,n[y]=i);const s=e.run(a,void 0,o&&a!==h&&a!==_?[]:[r]);L(n,!0,s)}catch(t){L(n,!1,t)}}),n)}const w=function(){},I=t.AggregateError;class N{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(t){return L(new this(null),O,t)}static reject(t){return L(new this(null),m,t)}static any(t){if(!t||"function"!=typeof t[Symbol.iterator])return Promise.reject(new I([],"All promises were rejected"));const e=[];let n=0;try{for(let r of t)n++,e.push(N.resolve(r))}catch(t){return Promise.reject(new I([],"All promises were rejected"))}if(0===n)return Promise.reject(new I([],"All promises were rejected"));let r=!1;const o=[];return new N(((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 I(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 N.allWithCallback(t)}static allSettled(t){return(this&&this.prototype instanceof N?this:N).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 N))throw new Error("Must be an instanceof Promise.");e[d]=g,e[E]=[];try{const n=b();t&&t(n(S(e,O)),n(S(e,m)))}catch(t){L(e,!1,t)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return N}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||N);const i=new o(w),a=e.current;return this[d]==g?this[E].push(a,i,t,n):C(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=N);const o=new r(w);o[T]=T;const i=e.current;return this[d]==g?this[E].push(i,o,t,t):C(this,i,o,t,t),o}}N.resolve=N.resolve,N.reject=N.reject,N.race=N.race,N.all=N.all;const k=t[u]=t.Promise;t.Promise=N;const M=i("thenPatched");function D(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 N(((t,e)=>{o.call(this,t,e)})).then(t,e)},t[M]=!0}return n.patchThen=D,k&&(D(k),pa(t,"fetch",(t=>{return e=t,function(t,n){let r=e.apply(t,n);if(r instanceof N)return r;let o=r.constructor;return o[M]||D(o),r};var e}))),Promise[e.__symbol__("uncaughtPromiseErrors")]=a,N})),
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 N.reject(t)}const d=i("state"),v=i("value"),E=i("finally"),y=i("parentPromiseValue"),T=i("parentPromiseState"),g=null,m=!0,O=!1;function S(t,e){return n=>{try{L(t,e,n)}catch(e){L(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 L(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((()=>{L(t,!1,e)}))(),t}if(r!==O&&i instanceof N&&i.hasOwnProperty(d)&&i.hasOwnProperty(v)&&i[d]!==g)P(i),L(t,i[d],i[v]);else if(r!==O&&"function"==typeof c)try{c.call(i,u(S(t,r)),u(S(t,!1)))}catch(e){u((()=>{L(t,!1,e)}))()}else{t[d]=r;const u=t[v];if(t[v]=i,t[E]===E&&r===m&&(t[d]=t[T],t[v]=t[y]),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;)A(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 w=i("rejectionHandledHandler");function P(t){if(0===t[d]){try{const n=e[w];n&&"function"==typeof n&&n.call(this,{rejection:t[v],promise:t})}catch(t){}t[d]=O;for(let e=0;e<a.length;e++)t===a[e].promise&&a.splice(e,1)}}function A(t,e,n,r,o){P(t);const i=t[d],a=i?"function"==typeof r?r:h:"function"==typeof o?o:_;e.scheduleMicroTask("Promise.then",(()=>{try{const r=t[v],o=!!n&&E===n[E];o&&(n[y]=r,n[T]=i);const s=e.run(a,void 0,o&&a!==_&&a!==h?[]:[r]);L(n,!0,s)}catch(t){L(n,!1,t)}}),n)}const C=function(){},k=t.AggregateError;class N{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(t){return L(new this(null),m,t)}static reject(t){return L(new this(null),O,t)}static any(t){if(!t||"function"!=typeof t[Symbol.iterator])return Promise.reject(new k([],"All promises were rejected"));const e=[];let n=0;try{for(let r of t)n++,e.push(N.resolve(r))}catch(t){return Promise.reject(new k([],"All promises were rejected"))}if(0===n)return Promise.reject(new k([],"All promises were rejected"));let r=!1;const o=[];return new N(((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 k(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 N.allWithCallback(t)}static allSettled(t){return(this&&this.prototype instanceof N?this:N).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 N))throw new Error("Must be an instanceof Promise.");e[d]=g,e[v]=[];try{const n=b();t&&t(n(S(e,m)),n(S(e,O)))}catch(t){L(e,!1,t)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return N}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||N);const i=new o(C),a=e.current;return this[d]==g?this[v].push(a,i,t,n):A(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=N);const o=new r(C);o[E]=E;const i=e.current;return this[d]==g?this[v].push(i,o,t,t):A(this,i,o,t,t),o}}N.resolve=N.resolve,N.reject=N.reject,N.race=N.race,N.all=N.all;const I=t[u]=t.Promise;t.Promise=N;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 N(((t,e)=>{o.call(this,t,e)})).then(t,e)},t[D]=!0}return n.patchThen=M,I&&(M(I),ti(t,"fetch",(t=>{return e=t,function(t,n){let r=e.apply(t,n);if(r instanceof N)return r;let o=r.constructor;return o[D]||M(o),r};var e}))),Promise[e.__symbol__("uncaughtPromiseErrors")]=a,N})),
30
30
  /**
31
31
  * @license
32
32
  * Copyright Google LLC All Rights Reserved.
@@ -34,7 +34,7 @@ const Di=Object.getOwnPropertyDescriptor,xi=Object.defineProperty,Ui=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=Ki("OriginalDelegate"),r=Ki("Promise"),o=Ki("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)}}));
37
+ Zone.__load_patch("toString",(t=>{const e=Function.prototype.toString,n=jo("OriginalDelegate"),r=jo("Promise"),o=jo("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=Ki("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 va=!1;if("undefined"!=typeof window)try{const t=Object.defineProperty({},"passive",{get:function(){va=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){va=!1}const ya={useG:!0},ga={},Oa={},ma=new RegExp("^"+Vi+"(\\w+)(true|false)$"),Sa=Ki("propagationStopped");function ba(t,e){const n=(e?e(t):t)+Gi,r=(e?e(t):t)+zi,o=Vi+n,i=Vi+r;ga[t]={},ga[t][Gi]=o,ga[t][zi]=i}function Ra(t,e,n,r){const o=r&&r.add||Xi,i=r&&r.rm||Zi,a=r&&r.listeners||"eventListeners",s=r&&r.rmAll||"removeAllListeners",u=Ki(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 _(n,r,o){if(!(r=r||t.event))return;const i=n||r.target||t,a=i[ga[r.type][o?zi:Gi]];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[Sa]);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 h=function(t){return _(this,t,!1)},d=function(t){return _(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 _=!0;n&&void 0!==n.chkDup&&(_=n.chkDup);let E=!1;n&&void 0!==n.rt&&(E=n.rt);let T=e;for(;T&&!T.hasOwnProperty(o);)T=Ui(T);if(!T&&e[o]&&(T=e),!T)return!1;if(T[u])return!1;const v=n&&n.eventNameToString,y={},g=T[u]=T[o],O=T[Ki(i)]=T[i],m=T[Ki(a)]=T[a],S=T[Ki(s)]=T[s];let b;function R(t,e){return!va&&"object"==typeof t&&t?!!t.capture:va&&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=T[Ki(n.prepend)]=T[n.prepend]);const L=function(t){return b.call(y.target,y.eventName,t.invoke,y.options)},P=r?function(t){if(!y.isExisting)return g.call(y.target,y.eventName,y.capture?d:h,y.options)}:function(t){return g.call(y.target,y.eventName,t.invoke,y.options)},A=r?function(t){if(!t.isRemoved){const e=ga[t.eventName];let n;e&&(n=e[t.capture?zi:Gi]);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 O.call(t.target,t.eventName,t.capture?d:h,t.options)}:function(t){return O.call(t.target,t.eventName,t.invoke,t.options)},C=n&&n.diff?n.diff:function(t,e){const n=typeof e;return"function"===n&&t.callback===e||"object"===n&&t.originalDelegate===e},w=Zone[Ki("UNPATCHED_EVENTS")],I=t[Ki("PASSIVE_EVENTS")],N=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(na&&"uncaughtException"===l)return e.apply(this,arguments);let h=!1;if("function"!=typeof p){if(!p.handleEvent)return e.apply(this,arguments);h=!0}if(f&&!f(e,p,c,arguments))return;const d=va&&!!I&&-1!==I.indexOf(l),E=R(arguments[2],d);if(w)for(let t=0;t<w.length;t++)if(l===w[t])return d?e.call(c,l,p,E):e.apply(this,arguments);const T=!!E&&("boolean"==typeof E||E.capture),g=!(!E||"object"!=typeof E)&&E.once,O=Zone.current;let m=ga[l];m||(ba(l,v),m=ga[l]);const S=m[T?zi:Gi];let b,L=c[S],P=!1;if(L){if(P=!0,_)for(let t=0;t<L.length;t++)if(C(L[t],p))return}else L=c[S]=[];const A=c.constructor.name,N=Oa[A];N&&(b=N[l]),b||(b=A+o+(v?v(l):l)),y.options=E,g&&(y.options.once=!1),y.target=c,y.capture=T,y.eventName=l,y.isExisting=P;const k=r?ya:void 0;k&&(k.taskData=y);const M=O.scheduleEventTask(b,p,k,i,a);return y.target=null,k&&(k.taskData=null),g&&(E.once=!0),(va||"boolean"!=typeof M.options)&&(M.options=E),M.target=c,M.capture=T,M.eventName=l,h&&(M.originalDelegate=p),u?L.unshift(M):L.push(M),s?c:void 0}};return T[o]=N(g,c,P,A,E),b&&(T[l]=N(b,p,L,A,E,!0)),T[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 O.apply(this,arguments);if(f&&!f(O,a,e,arguments))return;const s=ga[r];let u;s&&(u=s[i?zi:Gi]);const c=u&&e[u];if(c)for(let t=0;t<c.length;t++){const n=c[t];if(C(n,a)){if(c.splice(t,1),n.isRemoved=!0,0===c.length&&(n.allRemoved=!0,e[u]=null,"string"==typeof r)){e[Vi+"ON_PROPERTY"+r]=null}return n.zone.cancelTask(n),E?e:void 0}}return O.apply(this,arguments)},T[a]=function(){const e=this||t;let r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));const o=[],i=La(e,v?v(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},T[s]=function(){const e=this||t;let r=arguments[0];if(r){n&&n.transferEventName&&(r=n.transferEventName(r));const t=ga[r];if(t){const n=t[Gi],o=t[zi],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=ma.exec(n);let o=r&&r[1];o&&"removeListener"!==o&&this[s].call(this,o)}this[s].call(this,"removeListener")}if(E)return this},_a(T[o],g),_a(T[i],O),S&&_a(T[s],S),m&&_a(T[a],m),!0}let T=[];for(let t=0;t<n.length;t++)T[t]=E(n[t],r);return T}function La(t,e){if(!e){const n=[];for(let r in t){const o=ma.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=ga[e];n||(ba(e),n=ga[e]);const r=t[n[Gi]],o=t[n[zi]];return r?o?r.concat(o):r.slice():o?o.slice():[]}function Pa(t,e){const n=t.Event;n&&n.prototype&&e.patchMethod(n.prototype,"stopImmediatePropagation",(t=>function(e,n){e[Sa]=!0,t&&t.apply(e,n)}))}
45
+ let si=!1;if("undefined"!=typeof window)try{const t=Object.defineProperty({},"passive",{get:function(){si=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){si=!1}const ui={useG:!0},ci={},li={},pi=new RegExp("^"+Mo+"(\\w+)(true|false)$"),fi=jo("propagationStopped");function hi(t,e){const n=(e?e(t):t)+Do,r=(e?e(t):t)+Io,o=Mo+n,i=Mo+r;ci[t]={},ci[t][Do]=o,ci[t][Io]=i}function _i(t,e,n,r){const o=r&&r.add||Ao,i=r&&r.rm||Co,a=r&&r.listeners||"eventListeners",s=r&&r.rmAll||"removeAllListeners",u=jo(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[ci[r.type][o?Io:Do]];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[fi]);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 v(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 v=!1;n&&void 0!==n.rt&&(v=n.rt);let E=e;for(;E&&!E.hasOwnProperty(o);)E=Lo(E);if(!E&&e[o]&&(E=e),!E)return!1;if(E[u])return!1;const y=n&&n.eventNameToString,T={},g=E[u]=E[o],m=E[jo(i)]=E[i],O=E[jo(a)]=E[a],S=E[jo(s)]=E[s];let b;function R(t,e){return!si&&"object"==typeof t&&t?!!t.capture:si&&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=E[jo(n.prepend)]=E[n.prepend]);const L=function(t){return b.call(T.target,T.eventName,t.invoke,T.options)},w=r?function(t){if(!T.isExisting)return g.call(T.target,T.eventName,T.capture?d:_,T.options)}:function(t){return g.call(T.target,T.eventName,t.invoke,T.options)},P=r?function(t){if(!t.isRemoved){const e=ci[t.eventName];let n;e&&(n=e[t.capture?Io:Do]);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)},A=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[jo("UNPATCHED_EVENTS")],k=t[jo("PASSIVE_EVENTS")],N=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(Xo&&"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=si&&!!k&&-1!==k.indexOf(l),v=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,v):e.apply(this,arguments);const E=!!v&&("boolean"==typeof v||v.capture),g=!(!v||"object"!=typeof v)&&v.once,m=Zone.current;let O=ci[l];O||(hi(l,y),O=ci[l]);const S=O[E?Io:Do];let b,L=c[S],w=!1;if(L){if(w=!0,h)for(let t=0;t<L.length;t++)if(A(L[t],p))return}else L=c[S]=[];const P=c.constructor.name,N=li[P];N&&(b=N[l]),b||(b=P+o+(y?y(l):l)),T.options=v,g&&(T.options.once=!1),T.target=c,T.capture=E,T.eventName=l,T.isExisting=w;const I=r?ui:void 0;I&&(I.taskData=T);const D=m.scheduleEventTask(b,p,I,i,a);return T.target=null,I&&(I.taskData=null),g&&(v.once=!0),(si||"boolean"!=typeof D.options)&&(D.options=v),D.target=c,D.capture=E,D.eventName=l,_&&(D.originalDelegate=p),u?L.unshift(D):L.push(D),s?c:void 0}};return E[o]=N(g,c,w,P,v),b&&(E[l]=N(b,p,L,P,v,!0)),E[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=ci[r];let u;s&&(u=s[i?Io:Do]);const c=u&&e[u];if(c)for(let t=0;t<c.length;t++){const n=c[t];if(A(n,a)){if(c.splice(t,1),n.isRemoved=!0,0===c.length&&(n.allRemoved=!0,e[u]=null,"string"==typeof r)){e[Mo+"ON_PROPERTY"+r]=null}return n.zone.cancelTask(n),v?e:void 0}}return m.apply(this,arguments)},E[a]=function(){const e=this||t;let r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));const o=[],i=di(e,y?y(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},E[s]=function(){const e=this||t;let r=arguments[0];if(r){n&&n.transferEventName&&(r=n.transferEventName(r));const t=ci[r];if(t){const n=t[Do],o=t[Io],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=pi.exec(n);let o=r&&r[1];o&&"removeListener"!==o&&this[s].call(this,o)}this[s].call(this,"removeListener")}if(v)return this},ni(E[o],g),ni(E[i],m),S&&ni(E[s],S),O&&ni(E[a],O),!0}let E=[];for(let t=0;t<n.length;t++)E[t]=v(n[t],r);return E}function di(t,e){if(!e){const n=[];for(let r in t){const o=pi.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=ci[e];n||(hi(e),n=ci[e]);const r=t[n[Do]],o=t[n[Io]];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[fi]=!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 Aa(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)}
52
+ */function Ei(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 Ca(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 wa(t,e,n,r){if(!t)return;ua(t,Ca(t,e,n),r)}function Ia(t){return Object.getOwnPropertyNames(t).filter((t=>t.startsWith("on")&&t.length>2)).map((t=>t.substring(2)))}function Na(t,e){if(na&&!oa)return;if(Zone[t.symbol("patchEvents")])return;const n=e.__Zone_ignore_on_properties;let r=[];if(ra){const t=window;r=r.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const e=Ea()?[{target:t,ignoreProperties:["error"]}]:[];wa(t,Ia(t),n?n.concat(e):n,Ui(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&&wa(o.prototype,Ia(o.prototype),n)}}
59
+ */function yi(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 Ti(t,e,n,r){if(!t)return;Qo(t,yi(t,e,n),r)}function gi(t){return Object.getOwnPropertyNames(t).filter((t=>t.startsWith("on")&&t.length>2)).map((t=>t.substring(2)))}function mi(t,e){if(Xo&&!qo)return;if(Zone[t.symbol("patchEvents")])return;const n=e.__Zone_ignore_on_properties;let r=[];if(Go){const t=window;r=r.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const e=ii()?[{target:t,ignoreProperties:["error"]}]:[];Ti(t,gi(t),n?n.concat(e):n,Lo(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&&Ti(o.prototype,gi(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=Ia(t);n.patchOnProperties=ua,n.patchMethod=pa,n.bindArguments=Ji,n.patchMacroTask=fa;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=Pa,n.patchEventTarget=Ra,n.isIEOrEdge=Ta,n.ObjectDefineProperty=xi,n.ObjectGetOwnPropertyDescriptor=Di,n.ObjectCreate=ji,n.ArraySlice=Bi,n.patchClass=la,n.wrapWithCurrentZone=qi,n.filterProperties=Ca,n.attachOriginToPatched=_a,n._redefineProperty=Object.defineProperty,n.patchCallbacks=Aa,n.getGlobalObjects=()=>({globalSources:Oa,zoneSymbolEventNames:ga,eventNames:r,isBrowser:ra,isMix:oa,isNode:na,TRUE_STR:zi,FALSE_STR:Gi,ZONE_SYMBOL_PREFIX:Vi,ADD_EVENT_LISTENER_STR:Xi,REMOVE_EVENT_LISTENER_STR:Zi})}));
66
+ */Zone.__load_patch("util",((t,e,n)=>{const r=gi(t);n.patchOnProperties=Qo,n.patchMethod=ti,n.bindArguments=Ho,n.patchMacroTask=ei;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=_i,n.isIEOrEdge=ai,n.ObjectDefineProperty=Ro,n.ObjectGetOwnPropertyDescriptor=bo,n.ObjectCreate=wo,n.ArraySlice=Po,n.patchClass=Jo,n.wrapWithCurrentZone=xo,n.filterProperties=yi,n.attachOriginToPatched=ni,n._redefineProperty=Object.defineProperty,n.patchCallbacks=Ei,n.getGlobalObjects=()=>({globalSources:li,zoneSymbolEventNames:ci,eventNames:r,isBrowser:Go,isMix:qo,isNode:Xo,TRUE_STR:Io,FALSE_STR:Do,ZONE_SYMBOL_PREFIX:Mo,ADD_EVENT_LISTENER_STR:Ao,REMOVE_EVENT_LISTENER_STR:Co})}));
67
67
  /**
68
68
  * @license
69
69
  * Copyright Google LLC All Rights Reserved.
@@ -71,7 +71,7 @@ let va=!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 ka=Ki("zoneTask");function Ma(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=pa(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[ka]=null))}};const o=Wi(e,i[0],t,s,u);if(!o)return o;const c=o.data.handleId;return"number"==typeof c?a[c]=o:c&&(c[ka]=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=pa(t,n,(e=>function(n,r){const o=r[0];let i;"number"==typeof o?i=a[o]:(i=o&&o[ka],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[ka]=null),i.zone.cancelTask(i)):e.apply(t,r)}))}
74
+ const Oi=jo("zoneTask");function Si(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=ti(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[Oi]=null))}};const o=Uo(e,i[0],t,s,u);if(!o)return o;const c=o.data.handleId;return"number"==typeof c?a[c]=o:c&&(c[Oi]=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=ti(t,n,(e=>function(n,r){const o=r[0];let i;"number"==typeof o?i=a[o]:(i=o&&o[Oi],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[Oi]=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 ka=Ki("zoneTask");function Ma(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 Da(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}
89
+ function bi(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 Da(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";Ma(t,e,n,"Timeout"),Ma(t,e,n,"Interval"),Ma(t,e,n,"Immediate")})),Zone.__load_patch("requestAnimationFrame",(t=>{Ma(t,"request","cancel","AnimationFrame"),Ma(t,"mozRequest","mozCancel","AnimationFrame"),Ma(t,"webkitRequest","webkitCancel","AnimationFrame")})),Zone.__load_patch("blocking",((t,e)=>{const n=["alert","prompt","confirm"];for(let r=0;r<n.length;r++){pa(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),Da(t,n);const r=t.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(t,n,[r.prototype])})),Zone.__load_patch("MutationObserver",((t,e,n)=>{la("MutationObserver"),la("WebKitMutationObserver")})),Zone.__load_patch("IntersectionObserver",((t,e,n)=>{la("IntersectionObserver")})),Zone.__load_patch("FileReader",((t,e,n)=>{la("FileReader")})),Zone.__load_patch("on_property",((t,e,n)=>{Na(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[Fi],p=c[Hi];if(!l){const e=t.XMLHttpRequestEventTarget;if(e){const t=e.prototype;l=t[Fi],p=t[Hi]}}const f="readystatechange",_="scheduled";function h(t){const r=t.data,a=r.target;a[i]=!1,a[s]=!1;const u=a[o];l||(l=a[Fi],p=a[Hi]),u&&p.call(a,f,u);const c=a[o]=()=>{if(a.readyState===a.DONE)if(!r.aborted&&a[i]&&t.state===_){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!==_||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,O.apply(e.target,e.args)}const T=pa(c,"open",(()=>function(t,e){return t[r]=0==e[2],t[a]=e[1],T.apply(t,e)})),v=Ki("fetchTaskAborting"),y=Ki("fetchTaskScheduling"),g=pa(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=Wi("XMLHttpRequest.send",d,e,h,E);t&&!0===t[s]&&!e.aborted&&r.state===_&&r.invoke()}})),O=pa(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[v])return O.apply(t,r)}))}(t);const n=Ki("xhrTask"),r=Ki("xhrSync"),o=Ki("xhrListener"),i=Ki("xhrScheduled"),a=Ki("xhrURL"),s=Ki("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(!ta(Di(t,o)))continue;t[o]=(t=>{const e=function(){return t.apply(this,Ji(arguments,n+"."+o))};return _a(e,t),e})(i)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])})),Zone.__load_patch("PromiseRejectionEvent",((t,e)=>{function n(e){return function(n){La(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[Ki("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),e[Ki("rejectionHandledHandler")]=n("rejectionhandled"))}));var xa=function(){function t(t,e){this._exporter=t,this._finishedSpans=[],this._droppedSpansCount=0;var n=ce();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 Me(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&P.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);At.with(function(t){return t.setValue(Gt,!0)}(At.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===ye.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){Wt(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){Wt(t)}))}),this._scheduledDelayMillis),this._timer)},t.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},t}(),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)}}(),ja=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.onInit(n),r}return Ua(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}(xa);class Ba 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[_e]=this.config.app.name),this.config.app.version&&(a[he]=this.config.app.version),Object.assign(a,i.resourceAttributes);const s=We.default().merge(new We(a)),u=new mo({resource:s});u.addSpanProcessor(null!==(t=i.spanProcessor)&&void 0!==t?t:new Ye(new ja(new Ke({api:this.api}),{scheduledDelayMillis:Ba.SCHEDULED_BATCH_DELAY_MS,maxExportBatchSize:30}),this.metas)),u.register({propagator:null!==(e=i.propagator)&&void 0!==e?e:new we,contextManager:null!==(n=i.contextManager)&&void 0!==n?n:new Mi}),wo({instrumentations:null!==(r=i.instrumentations)&&void 0!==r?r:Ni({ignoreUrls:this.getIgnoreUrls(),propagateTraceHeaderCorsUrls:null===(o=this.options.instrumentationOptions)||void 0===o?void 0:o.propagateTraceHeaderCorsUrls})}),this.api.initOTEL(zt,At)}getIgnoreUrls(){return this.transports.transports.flatMap((t=>t.getIgnoreUrls()))}}return Ba.SCHEDULED_BATCH_DELAY_MS=1e3,t.FaroSessionSpanProcessor=Ye,t.FaroTraceExporter=Ke,t.TracingInstrumentation=Ba,t.getDefaultOTELInstrumentations=Ni,t}({},GrafanaFaroWebSdk);
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";Si(t,e,n,"Timeout"),Si(t,e,n,"Interval"),Si(t,e,n,"Immediate")})),Zone.__load_patch("requestAnimationFrame",(t=>{Si(t,"request","cancel","AnimationFrame"),Si(t,"mozRequest","mozCancel","AnimationFrame"),Si(t,"webkitRequest","webkitCancel","AnimationFrame")})),Zone.__load_patch("blocking",((t,e)=>{const n=["alert","prompt","confirm"];for(let r=0;r<n.length;r++){ti(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),bi(t,n);const r=t.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(t,n,[r.prototype])})),Zone.__load_patch("MutationObserver",((t,e,n)=>{Jo("MutationObserver"),Jo("WebKitMutationObserver")})),Zone.__load_patch("IntersectionObserver",((t,e,n)=>{Jo("IntersectionObserver")})),Zone.__load_patch("FileReader",((t,e,n)=>{Jo("FileReader")})),Zone.__load_patch("on_property",((t,e,n)=>{mi(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[ko],p=c[No];if(!l){const e=t.XMLHttpRequestEventTarget;if(e){const t=e.prototype;l=t[ko],p=t[No]}}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[ko],p=a[No]),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 v(t){const e=t.data;return e.aborted=!0,m.apply(e.target,e.args)}const E=ti(c,"open",(()=>function(t,e){return t[r]=0==e[2],t[a]=e[1],E.apply(t,e)})),y=jo("fetchTaskAborting"),T=jo("fetchTaskScheduling"),g=ti(c,"send",(()=>function(t,n){if(!0===e.current[T])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=Uo("XMLHttpRequest.send",d,e,_,v);t&&!0===t[s]&&!e.aborted&&r.state===h&&r.invoke()}})),m=ti(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[y])return m.apply(t,r)}))}(t);const n=jo("xhrTask"),r=jo("xhrSync"),o=jo("xhrListener"),i=jo("xhrScheduled"),a=jo("xhrURL"),s=jo("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(!zo(bo(t,o)))continue;t[o]=(t=>{const e=function(){return t.apply(this,Ho(arguments,n+"."+o))};return ni(e,t),e})(i)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])})),Zone.__load_patch("PromiseRejectionEvent",((t,e)=>{function n(e){return function(n){di(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[jo("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),e[jo("rejectionHandledHandler")]=n("rejectionhandled"))}));class Ri 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=$n.default().merge(new $n(a)),u=new Ur({resource:s});u.addSpanProcessor(null!==(t=i.spanProcessor)&&void 0!==t?t:new tr(new mr(new Jn({api:this.api}),{scheduledDelayMillis:Ri.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 So}),Xr({instrumentations:null!==(r=i.instrumentations)&&void 0!==r?r:mo({ignoreUrls:this.getIgnoreUrls(),propagateTraceHeaderCorsUrls:null===(o=this.options.instrumentationOptions)||void 0===o?void 0:o.propagateTraceHeaderCorsUrls})}),this.api.initOTEL(Vt,Pt)}getIgnoreUrls(){return this.transports.transports.flatMap((t=>t.getIgnoreUrls()))}}return Ri.SCHEDULED_BATCH_DELAY_MS=1e3,t.FaroSessionSpanProcessor=tr,t.FaroTraceExporter=Jn,t.TracingInstrumentation=Ri,t.getDefaultOTELInstrumentations=mo,t}({},GrafanaFaroWebSdk);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/faro-web-tracing",
3
- "version": "1.1.3",
3
+ "version": "1.2.0",
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.1.3",
55
+ "@grafana/faro-web-sdk": "^1.2.0",
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": "2f3716324ce0a646a79d77a2a0bf333b4d395cb4"
76
+ "gitHead": "438d721ff86f5140d999994efbbfa9d6e51ee1be"
77
77
  }