(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,944568,712505,t=>{"use strict";var e,r,n,o,i,a,u,s,c,l,f,p,h,d,_,y,v,m,g,b,E,T,O,w,S,R,L,A,M,x,P,C,I=t.i(376054),N=t.i(136927),U=t.i(42297),k=t.i(474754),B=t.i(868275),D=(e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),G=function(){function t(){}return t.prototype.createGauge=function(t,e){return $},t.prototype.createHistogram=function(t,e){return Z},t.prototype.createCounter=function(t,e){return q},t.prototype.createUpDownCounter=function(t,e){return Q},t.prototype.createObservableGauge=function(t,e){return te},t.prototype.createObservableCounter=function(t,e){return tt},t.prototype.createObservableUpDownCounter=function(t,e){return tr},t.prototype.addBatchObservableCallback=function(t,e){},t.prototype.removeBatchObservableCallback=function(t){},t}(),j=function(){},V=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return D(e,t),e.prototype.add=function(t,e){},e}(j),X=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return D(e,t),e.prototype.add=function(t,e){},e}(j),H=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return D(e,t),e.prototype.record=function(t,e){},e}(j),F=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return D(e,t),e.prototype.record=function(t,e){},e}(j),z=function(){function t(){}return t.prototype.addCallback=function(t){},t.prototype.removeCallback=function(t){},t}(),W=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return D(e,t),e}(z),Y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return D(e,t),e}(z),K=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return D(e,t),e}(z),J=new G,q=new V,$=new H,Z=new F,Q=new X,tt=new W,te=new Y,tr=new K,tn=new(function(){function t(){}return t.prototype.getMeter=function(t,e,r){return J},t}()),to="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:t.g,ti="1.9.0",ta=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,tu=function(t){var e=new Set([t]),r=new Set,n=t.match(ta);if(!n)return function(){return!1};var o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(null!=o.prerelease)return function(e){return e===t};function i(t){return r.add(t),!1}return function(t){if(e.has(t))return!0;if(r.has(t))return!1;var n=t.match(ta);if(!n)return i(t);var a={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(null!=a.prerelease||o.major!==a.major)return i(t);if(0===o.major)return o.minor===a.minor&&o.patch<=a.patch?(e.add(t),!0):i(t);return o.minor<=a.minor?(e.add(t),!0):i(t)}}(ti),ts=Symbol.for("opentelemetry.js.api."+ti.split(".")[0]);function tc(t,e,r,n){void 0===n&&(n=!1);var o,i=to[ts]=null!=(o=to[ts])?o:{version:ti};if(!n&&i[t]){var a=Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return r.error(a.stack||a.message),!1}if(i.version!==ti){var a=Error("@opentelemetry/api: Registration of version v"+i.version+" for "+t+" does not match previously registered API v"+ti);return r.error(a.stack||a.message),!1}return i[t]=e,r.debug("@opentelemetry/api: Registered a global for "+t+" v"+ti+"."),!0}function tl(t){var e,r,n=null==(e=to[ts])?void 0:e.version;if(n&&tu(n))return null==(r=to[ts])?void 0:r[t]}function tf(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+ti+".");var r=to[ts];r&&delete r[t]}var tp=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},th=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},td=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 t_("debug",this._namespace,t)},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t_("error",this._namespace,t)},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t_("info",this._namespace,t)},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t_("warn",this._namespace,t)},t.prototype.verbose=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t_("verbose",this._namespace,t)},t}();function t_(t,e,r){var n=tl("diag");if(n)return r.unshift(e),n[t].apply(n,th([],tp(r),!1))}(r=O||(O={}))[r.NONE=0]="NONE",r[r.ERROR=30]="ERROR",r[r.WARN=50]="WARN",r[r.INFO=60]="INFO",r[r.DEBUG=70]="DEBUG",r[r.VERBOSE=80]="VERBOSE",r[r.ALL=9999]="ALL";var ty=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},tv=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},tm=function(){function t(){function t(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=tl("diag");if(n)return n[t].apply(n,tv([],ty(e),!1))}}var e=this;e.setLogger=function(t,r){if(void 0===r&&(r={logLevel:O.INFO}),t===e){var n,o,i,a=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return e.error(null!=(n=a.stack)?n:a.message),!1}"number"==typeof r&&(r={logLevel:r});var u=tl("diag"),s=function(t,e){function r(r,n){var o=e[r];return"function"==typeof o&&t>=n?o.bind(e):function(){}}return t<O.NONE?t=O.NONE:t>O.ALL&&(t=O.ALL),e=e||{},{error:r("error",O.ERROR),warn:r("warn",O.WARN),info:r("info",O.INFO),debug:r("debug",O.DEBUG),verbose:r("verbose",O.VERBOSE)}}(null!=(o=r.logLevel)?o:O.INFO,t);if(u&&!r.suppressOverrideMessage){var c=null!=(i=Error().stack)?i:"<failed to generate stacktrace>";u.warn("Current logger will be overwritten from "+c),s.warn("Current logger will overwrite one already registered from "+c)}return tc("diag",s,e,!0)},e.disable=function(){tf("diag",e)},e.createComponentLogger=function(t){return new td(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}(),tg="metrics",tb=(function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(t){return tc(tg,t,tm.instance())},t.prototype.getMeterProvider=function(){return tl(tg)||tn},t.prototype.getMeter=function(t,e,r){return this.getMeterProvider().getMeter(t,e,r)},t.prototype.disable=function(){tf(tg,tm.instance())},t})().getInstance(),tE=tm.instance(),tT="telemetry.sdk.name",tO="telemetry.sdk.language",tw="telemetry.sdk.version",tS=((w={})[tT]="opentelemetry",w["process.runtime.name"]="browser",w[tO]="webjs",w[tw]="1.30.1",w),tR=function(){return(tR=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},tL=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var s=[i,u];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}},tA=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},tM=function(){function t(t,e){var r,n=this;this._attributes=t,this.asyncAttributesPending=null!=e,this._syncAttributes=null!=(r=this._attributes)?r:{},this._asyncAttributesPromise=null==e?void 0:e.then(function(t){return n._attributes=Object.assign({},n._attributes,t),n.asyncAttributesPending=!1,t},function(t){return tE.debug("a resource's async attributes promise rejected: %s",t),n.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t(((e={})["service.name"]="unknown_service",e[tO]=tS[tO],e[tT]=tS[tT],e[tw]=tS[tw],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&tE.error("Accessing resource attributes before async attributes settled"),null!=(t=this._attributes)?t:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){var t,e,r,n;return t=this,e=void 0,r=void 0,n=function(){return tL(this,function(t){switch(t.label){case 0:if(!this.asyncAttributesPending)return[3,2];return[4,this._asyncAttributesPromise];case 1:t.sent(),t.label=2;case 2:return[2]}})},new(r||(r=Promise))(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,u)}s((n=n.apply(t,e||[])).next())})},t.prototype.merge=function(e){var r,n=this;if(!e)return this;var o=tR(tR({},this._syncAttributes),null!=(r=e._syncAttributes)?r:e.attributes);return this._asyncAttributesPromise||e._asyncAttributesPromise?new t(o,Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(function(t){var r,o=tA(t,2),i=o[0],a=o[1];return tR(tR(tR(tR({},n._syncAttributes),i),null!=(r=e._syncAttributes)?r:e.attributes),a)})):new t(o)},t.EMPTY=new t({}),t}(),tx=(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),tP=function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,u)}s((n=n.apply(t,e||[])).next())})},tC=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var s=[i,u];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}},tI=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},tN=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},tU=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function tk(t){return null!=t}function tB(t){var e=Object.keys(t);return 0===e.length?"":JSON.stringify((e=e.sort()).map(function(e){return[e,t[e]]}))}var tD=function(t){function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return tx(e,t),e}(Error);function tG(t,e){var r;return Promise.race([t,new Promise(function(t,n){r=setTimeout(function(){n(new tD("Operation timed out."))},e)})]).then(function(t){return clearTimeout(r),t},function(t){throw clearTimeout(r),t})}function tj(t){return"rejected"===t.status}function tV(t,e){var r=[];return t.forEach(function(t){r.push.apply(r,tN([],tI(e(t)),!1))}),r}var tX=function(){function t(){this._registeredViews=[]}return t.prototype.addView=function(t){this._registeredViews.push(t)},t.prototype.findViews=function(t,e){var r=this;return this._registeredViews.filter(function(n){return r._matchInstrument(n.instrumentSelector,t)&&r._matchMeter(n.meterSelector,e)})},t.prototype._matchInstrument=function(t,e){return(void 0===t.getType()||e.type===t.getType())&&t.getNameFilter().match(e.name)&&t.getUnitFilter().match(e.unit)},t.prototype._matchMeter=function(t,e){return t.getNameFilter().match(e.name)&&(void 0===e.version||t.getVersionFilter().match(e.version))&&(void 0===e.schemaUrl||t.getSchemaUrlFilter().match(e.schemaUrl))},t}();function tH(t,e,r){var n,o,i,a;return null==t.match(tF)&&tE.warn('Invalid metric name: "'+t+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:t,type:e,description:null!=(n=null==r?void 0:r.description)?n:"",unit:null!=(o=null==r?void 0:r.unit)?o:"",valueType:null!=(i=null==r?void 0:r.valueType)?i:S.DOUBLE,advice:null!=(a=null==r?void 0:r.advice)?a:{}}}(o=S||(S={}))[o.INT=0]="INT",o[o.DOUBLE=1]="DOUBLE",(i=R||(R={})).COUNTER="COUNTER",i.GAUGE="GAUGE",i.HISTOGRAM="HISTOGRAM",i.UP_DOWN_COUNTER="UP_DOWN_COUNTER",i.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",i.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",i.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER";var tF=/^[a-z][a-z0-9_.\-/]{0,254}$/i,tz=new function t(e){var r=this;r._currentContext=e?new Map(e):new Map,r.getValue=function(t){return r._currentContext.get(t)},r.setValue=function(e,n){var o=new t(r._currentContext);return o._currentContext.set(e,n),o},r.deleteValue=function(e){var n=new t(r._currentContext);return n._currentContext.delete(e),n}},tW=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},tY=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},tK=function(){function t(){}return t.prototype.active=function(){return tz},t.prototype.with=function(t,e,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];return e.call.apply(e,tY([r],tW(n),!1))},t.prototype.bind=function(t,e){return e},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t}(),tJ=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},tq=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},t$="context",tZ=new tK,tQ=(function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(t){return tc(t$,t,tm.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(t,e,r){for(var n,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];return(n=this._getContextManager()).with.apply(n,tq([t,e,r],tJ(o),!1))},t.prototype.bind=function(t,e){return this._getContextManager().bind(t,e)},t.prototype._getContextManager=function(){return tl(t$)||tZ},t.prototype.disable=function(){this._getContextManager().disable(),tf(t$,tm.instance())},t})().getInstance();function t0(t){return[Math.trunc(t/1e3),Math.round(t%1e3*1e6)]}function t1(t){return 1e6*t[0]+t[1]/1e3}var t2=(a=function(t,e){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),t3=function(){function t(t,e){this._writableMetricStorage=t,this._descriptor=e}return t.prototype._record=function(t,e,r){(void 0===e&&(e={}),void 0===r&&(r=tQ.active()),"number"!=typeof t)?tE.warn("non-number value provided to metric "+this._descriptor.name+": "+t):(this._descriptor.valueType!==S.INT||Number.isInteger(t)||(tE.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),Number.isInteger(t=Math.trunc(t))))&&this._writableMetricStorage.record(t,e,r,t0(Date.now()))},t}(),t4=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return t2(e,t),e.prototype.add=function(t,e,r){this._record(t,e,r)},e}(t3),t5=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return t2(e,t),e.prototype.add=function(t,e,r){t<0?tE.warn("negative value provided to counter "+this._descriptor.name+": "+t):this._record(t,e,r)},e}(t3),t6=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return t2(e,t),e.prototype.record=function(t,e,r){this._record(t,e,r)},e}(t3),t7=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return t2(e,t),e.prototype.record=function(t,e,r){t<0?tE.warn("negative value provided to histogram "+this._descriptor.name+": "+t):this._record(t,e,r)},e}(t3),t8=function(){function t(t,e,r){this._observableRegistry=r,this._descriptor=t,this._metricStorages=e}return t.prototype.addCallback=function(t){this._observableRegistry.addCallback(t,this)},t.prototype.removeCallback=function(t){this._observableRegistry.removeCallback(t,this)},t}(),t9=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return t2(e,t),e}(t8),et=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return t2(e,t),e}(t8),ee=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return t2(e,t),e}(t8);function er(t){return t instanceof t8}var en=function(){function t(t){this._meterSharedState=t}return t.prototype.createGauge=function(t,e){var r=tH(t,R.GAUGE,e);return new t6(this._meterSharedState.registerMetricStorage(r),r)},t.prototype.createHistogram=function(t,e){var r=tH(t,R.HISTOGRAM,e);return new t7(this._meterSharedState.registerMetricStorage(r),r)},t.prototype.createCounter=function(t,e){var r=tH(t,R.COUNTER,e);return new t5(this._meterSharedState.registerMetricStorage(r),r)},t.prototype.createUpDownCounter=function(t,e){var r=tH(t,R.UP_DOWN_COUNTER,e);return new t4(this._meterSharedState.registerMetricStorage(r),r)},t.prototype.createObservableGauge=function(t,e){var r=tH(t,R.OBSERVABLE_GAUGE,e),n=this._meterSharedState.registerAsyncMetricStorage(r);return new et(r,n,this._meterSharedState.observableRegistry)},t.prototype.createObservableCounter=function(t,e){var r=tH(t,R.OBSERVABLE_COUNTER,e),n=this._meterSharedState.registerAsyncMetricStorage(r);return new t9(r,n,this._meterSharedState.observableRegistry)},t.prototype.createObservableUpDownCounter=function(t,e){var r=tH(t,R.OBSERVABLE_UP_DOWN_COUNTER,e),n=this._meterSharedState.registerAsyncMetricStorage(r);return new ee(r,n,this._meterSharedState.observableRegistry)},t.prototype.addBatchObservableCallback=function(t,e){this._meterSharedState.observableRegistry.addBatchCallback(t,e)},t.prototype.removeBatchObservableCallback=function(t,e){this._meterSharedState.observableRegistry.removeBatchCallback(t,e)},t}(),eo=function(){function t(t){this._instrumentDescriptor=t}return t.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},t.prototype.updateDescription=function(t){this._instrumentDescriptor=tH(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:t,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},t}(),ei=(u=function(t,e){return(u=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}u(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),ea=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var s=[i,u];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}},eu=function(t){function e(){return t.call(this,tB)||this}return ei(e,t),e}(function(){function t(t){this._hash=t,this._valueMap=new Map,this._keyMap=new Map}return t.prototype.get=function(t,e){return null!=e||(e=this._hash(t)),this._valueMap.get(e)},t.prototype.getOrDefault=function(t,e){var r=this._hash(t);if(this._valueMap.has(r))return this._valueMap.get(r);var n=e();return this._keyMap.has(r)||this._keyMap.set(r,t),this._valueMap.set(r,n),n},t.prototype.set=function(t,e,r){null!=r||(r=this._hash(t)),this._keyMap.has(r)||this._keyMap.set(r,t),this._valueMap.set(r,e)},t.prototype.has=function(t,e){return null!=e||(e=this._hash(t)),this._valueMap.has(e)},t.prototype.keys=function(){var t,e;return ea(this,function(r){switch(r.label){case 0:e=(t=this._keyMap.entries()).next(),r.label=1;case 1:if(!0===e.done)return[3,3];return[4,[e.value[1],e.value[0]]];case 2:return r.sent(),e=t.next(),[3,1];case 3:return[2]}})},t.prototype.entries=function(){var t,e;return ea(this,function(r){switch(r.label){case 0:e=(t=this._valueMap.entries()).next(),r.label=1;case 1:if(!0===e.done)return[3,3];return[4,[this._keyMap.get(e.value[0]),e.value[1],e.value[0]]];case 2:return r.sent(),e=t.next(),[3,1];case 3:return[2]}})},Object.defineProperty(t.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),t}()),es=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},ec=function(){function t(t,e){this._aggregator=t,this._activeCollectionStorage=new eu,this._cumulativeMemoStorage=new eu,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(null!=e?e:2e3)-1,this._overflowHashCode=tB(this._overflowAttributes)}return t.prototype.record=function(t,e,r,n){var o=this,i=this._activeCollectionStorage.get(e);if(!i){if(this._activeCollectionStorage.size>=this._cardinalityLimit){var a=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,function(){return o._aggregator.createAccumulation(n)});null==a||a.record(t);return}i=this._aggregator.createAccumulation(n),this._activeCollectionStorage.set(e,i)}null==i||i.record(t)},t.prototype.batchCumulate=function(t,e){var r=this;Array.from(t.entries()).forEach(function(t){var n=es(t,3),o=n[0],i=n[1],a=n[2],u=r._aggregator.createAccumulation(e);null==u||u.record(i);var s=u;if(r._cumulativeMemoStorage.has(o,a)){var c=r._cumulativeMemoStorage.get(o,a);s=r._aggregator.diff(c,u)}else if(r._cumulativeMemoStorage.size>=r._cardinalityLimit&&(o=r._overflowAttributes,a=r._overflowHashCode,r._cumulativeMemoStorage.has(o,a))){var c=r._cumulativeMemoStorage.get(o,a);s=r._aggregator.diff(c,u)}if(r._activeCollectionStorage.has(o,a)){var l=r._activeCollectionStorage.get(o,a);s=r._aggregator.merge(l,s)}r._cumulativeMemoStorage.set(o,u,a),r._activeCollectionStorage.set(o,s,a)})},t.prototype.collect=function(){var t=this._activeCollectionStorage;return this._activeCollectionStorage=new eu,t},t}();(s=L||(L={}))[s.DELTA=0]="DELTA",s[s.CUMULATIVE=1]="CUMULATIVE";var el=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ef=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},ep=function(){function t(t,e){var r=this;this._aggregator=t,this._unreportedAccumulations=new Map,this._reportHistory=new Map,e.forEach(function(t){r._unreportedAccumulations.set(t,[])})}return t.prototype.buildMetrics=function(e,r,n,o){this._stashAccumulations(n);var i,a=this._getMergedUnreportedAccumulations(e),u=a;if(this._reportHistory.has(e)){var s=this._reportHistory.get(e),c=s.collectionTime;u=(i=s.aggregationTemporality)===L.CUMULATIVE?t.merge(s.accumulations,a,this._aggregator):t.calibrateStartTime(s.accumulations,a,c)}else i=e.selectAggregationTemporality(r.type);this._reportHistory.set(e,{accumulations:u,collectionTime:o,aggregationTemporality:i});var l=Array.from(u.entries());if(0!==l.length)return this._aggregator.toMetricData(r,i,l,o)},t.prototype._stashAccumulations=function(t){var e,r,n=this._unreportedAccumulations.keys();try{for(var o=el(n),i=o.next();!i.done;i=o.next()){var a=i.value,u=this._unreportedAccumulations.get(a);void 0===u&&(u=[],this._unreportedAccumulations.set(a,u)),u.push(t)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}},t.prototype._getMergedUnreportedAccumulations=function(e){var r,n,o=new eu,i=this._unreportedAccumulations.get(e);if(this._unreportedAccumulations.set(e,[]),void 0===i)return o;try{for(var a=el(i),u=a.next();!u.done;u=a.next()){var s=u.value;o=t.merge(o,s,this._aggregator)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},t.merge=function(t,e,r){for(var n=e.entries(),o=n.next();!0!==o.done;){var i=ef(o.value,3),a=i[0],u=i[1],s=i[2];if(t.has(a,s)){var c=t.get(a,s),l=r.merge(c,u);t.set(a,l,s)}else t.set(a,u,s);o=n.next()}return t},t.calibrateStartTime=function(t,e,r){var n,o;try{for(var i=el(t.keys()),a=i.next();!a.done;a=i.next()){var u=ef(a.value,2),s=u[0],c=u[1],l=e.get(s,c);null==l||l.setStartTime(r)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return e},t}(),eh=(c=function(t,e){return(c=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),ed=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},e_=function(t){function e(e,r,n,o,i){var a=t.call(this,e)||this;return a._attributesProcessor=n,a._aggregationCardinalityLimit=i,a._deltaMetricStorage=new ec(r,a._aggregationCardinalityLimit),a._temporalMetricStorage=new ep(r,o),a}return eh(e,t),e.prototype.record=function(t,e){var r=this,n=new eu;Array.from(t.entries()).forEach(function(t){var e=ed(t,2),o=e[0],i=e[1];n.set(r._attributesProcessor.process(o),i)}),this._deltaMetricStorage.batchCumulate(n,e)},e.prototype.collect=function(t,e){var r=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(t,this._instrumentDescriptor,r,e)},e}(eo);function ey(t,e){var r="";return t.unit!==e.unit&&(r+="	- Unit '"+t.unit+"' does not match '"+e.unit+"'\n"),t.type!==e.type&&(r+="	- Type '"+t.type+"' does not match '"+e.type+"'\n"),t.valueType!==e.valueType&&(r+="	- Value Type '"+t.valueType+"' does not match '"+e.valueType+"'\n"),t.description!==e.description&&(r+="	- Description '"+t.description+"' does not match '"+e.description+"'\n"),r}function ev(t,e){var r,n;return t.valueType!==e.valueType?"	- use valueType '"+t.valueType+"' on instrument creation or use an instrument name other than '"+e.name+"'":t.unit!==e.unit?"	- use unit '"+t.unit+"' on instrument creation or use an instrument name other than '"+e.name+"'":t.type!==e.type?(r=JSON.stringify({name:e.name,type:e.type,unit:e.unit}),"	- create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+r+"'"):t.description!==e.description?(n=JSON.stringify({name:e.name,type:e.type,unit:e.unit}),"	- create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+n+"'\n    	- OR - create a new view with the name "+t.name+" and description '"+t.description+"' and InstrumentSelector "+n+"\n    	- OR - create a new view with the name "+e.name+" and description '"+t.description+"' and InstrumentSelector "+n):""}var em=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},eg=function(){function t(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}return t.create=function(){return new t},t.prototype.getStorages=function(t){var e,r,n,o,i=[];try{for(var a=em(this._sharedRegistry.values()),u=a.next();!u.done;u=a.next()){var s=u.value;i=i.concat(s)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}var c=this._perCollectorRegistry.get(t);if(null!=c)try{for(var l=em(c.values()),f=l.next();!f.done;f=l.next()){var s=f.value;i=i.concat(s)}}catch(t){n={error:t}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}return i},t.prototype.register=function(t){this._registerStorage(t,this._sharedRegistry)},t.prototype.registerForCollector=function(t,e){var r=this._perCollectorRegistry.get(t);null==r&&(r=new Map,this._perCollectorRegistry.set(t,r)),this._registerStorage(e,r)},t.prototype.findOrUpdateCompatibleStorage=function(t){var e=this._sharedRegistry.get(t.name);return void 0===e?null:this._findOrUpdateCompatibleStorage(t,e)},t.prototype.findOrUpdateCompatibleCollectorStorage=function(t,e){var r=this._perCollectorRegistry.get(t);if(void 0===r)return null;var n=r.get(e.name);return void 0===n?null:this._findOrUpdateCompatibleStorage(e,n)},t.prototype._registerStorage=function(t,e){var r=t.getInstrumentDescriptor(),n=e.get(r.name);void 0===n?e.set(r.name,[t]):n.push(t)},t.prototype._findOrUpdateCompatibleStorage=function(t,e){var r,n,o=null;try{for(var i=em(e),a=i.next();!a.done;a=i.next()){var u=a.value,s=u.getInstrumentDescriptor();!function(t,e){var r,n;return r=t.name,n=e.name,r.toLowerCase()===n.toLowerCase()&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType}(s,t)?tE.warn("A view or instrument with the name ",t.name," has already been registered and is incompatible with another registered view.\n","Details:\n",ey(s,t),"To resolve the conflict:\n",ev(s,t)):(s.description!==t.description&&(t.description.length>s.description.length&&u.updateDescription(t.description),tE.warn("A view or instrument with the name ",t.name," has already been registered, but has a different description and is incompatible with another registered view.\n","Details:\n",ey(s,t),"The longer description will be used.\nTo resolve the conflict:",ev(s,t))),o=u)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o},t}(),eb=function(){function t(t){this._backingStorages=t}return t.prototype.record=function(t,e,r,n){this._backingStorages.forEach(function(o){o.record(t,e,r,n)})},t}(),eE=function(){function t(t,e){this._instrumentName=t,this._valueType=e,this._buffer=new eu}return t.prototype.observe=function(t,e){(void 0===e&&(e={}),"number"!=typeof t)?tE.warn("non-number value provided to metric "+this._instrumentName+": "+t):(this._valueType!==S.INT||Number.isInteger(t)||(tE.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),Number.isInteger(t=Math.trunc(t))))&&this._buffer.set(e,t)},t}(),eT=function(){function t(){this._buffer=new Map}return t.prototype.observe=function(t,e,r){if(void 0===r&&(r={}),er(t)){var n=this._buffer.get(t);if(null==n&&(n=new eu,this._buffer.set(t,n)),"number"!=typeof e)return void tE.warn("non-number value provided to metric "+t._descriptor.name+": "+e);(t._descriptor.valueType!==S.INT||Number.isInteger(e)||(tE.warn("INT value type cannot accept a floating-point value for "+t._descriptor.name+", ignoring the fractional digits."),Number.isInteger(e=Math.trunc(e))))&&n.set(r,e)}},t}(),eO=function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,u)}s((n=n.apply(t,e||[])).next())})},ew=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var s=[i,u];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}},eS=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},eR=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},eL=function(){function t(){this._callbacks=[],this._batchCallbacks=[]}return t.prototype.addCallback=function(t,e){this._findCallback(t,e)>=0||this._callbacks.push({callback:t,instrument:e})},t.prototype.removeCallback=function(t,e){var r=this._findCallback(t,e);r<0||this._callbacks.splice(r,1)},t.prototype.addBatchCallback=function(t,e){var r=new Set(e.filter(er));0===r.size?tE.error("BatchObservableCallback is not associated with valid instruments",e):this._findBatchCallback(t,r)>=0||this._batchCallbacks.push({callback:t,instruments:r})},t.prototype.removeBatchCallback=function(t,e){var r=new Set(e.filter(er)),n=this._findBatchCallback(t,r);n<0||this._batchCallbacks.splice(n,1)},t.prototype.observe=function(t,e){return eO(this,void 0,void 0,function(){var r,n;return ew(this,function(o){switch(o.label){case 0:return r=this._observeCallbacks(t,e),n=this._observeBatchCallbacks(t,e),[4,function(t){return tP(this,void 0,void 0,function(){var e=this;return tC(this,function(r){return[2,Promise.all(t.map(function(t){return tP(e,void 0,void 0,function(){return tC(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,t];case 1:return[2,{status:"fulfilled",value:e.sent()}];case 2:return[2,{status:"rejected",reason:e.sent()}];case 3:return[2]}})})}))]})})}(eR(eR([],eS(r),!1),eS(n),!1))];case 1:return[2,o.sent().filter(tj).map(function(t){return t.reason})]}})})},t.prototype._observeCallbacks=function(t,e){var r=this;return this._callbacks.map(function(n){var o=n.callback,i=n.instrument;return eO(r,void 0,void 0,function(){var r,n;return ew(this,function(a){switch(a.label){case 0:return n=Promise.resolve(o(r=new eE(i._descriptor.name,i._descriptor.valueType))),null!=e&&(n=tG(n,e)),[4,n];case 1:return a.sent(),i._metricStorages.forEach(function(e){e.record(r._buffer,t)}),[2]}})})})},t.prototype._observeBatchCallbacks=function(t,e){var r=this;return this._batchCallbacks.map(function(n){var o=n.callback,i=n.instruments;return eO(r,void 0,void 0,function(){var r,n;return ew(this,function(a){switch(a.label){case 0:return n=Promise.resolve(o(r=new eT)),null!=e&&(n=tG(n,e)),[4,n];case 1:return a.sent(),i.forEach(function(e){var n=r._buffer.get(e);null!=n&&e._metricStorages.forEach(function(e){e.record(n,t)})}),[2]}})})})},t.prototype._findCallback=function(t,e){return this._callbacks.findIndex(function(r){return r.callback===t&&r.instrument===e})},t.prototype._findBatchCallback=function(t,e){return this._batchCallbacks.findIndex(function(r){return r.callback===t&&function(t,e){var r,n;if(t.size!==e.size)return!1;try{for(var o=tU(t),i=o.next();!i.done;i=o.next()){var a=i.value;if(!e.has(a))return!1}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!0}(r.instruments,e)})},t}(),eA=(l=function(t,e){return(l=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),eM=function(t){function e(e,r,n,o,i){var a=t.call(this,e)||this;return a._attributesProcessor=n,a._aggregationCardinalityLimit=i,a._deltaMetricStorage=new ec(r,a._aggregationCardinalityLimit),a._temporalMetricStorage=new ep(r,o),a}return eA(e,t),e.prototype.record=function(t,e,r,n){e=this._attributesProcessor.process(e,r),this._deltaMetricStorage.record(t,e,r,n)},e.prototype.collect=function(t,e){var r=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(t,this._instrumentDescriptor,r,e)},e}(eo),ex=(f=function(t,e){return(f=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}f(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),eP=function(){function t(){}return t.Noop=function(){return eN},t}(),eC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ex(e,t),e.prototype.process=function(t,e){return t},e}(eP);function eI(t){var e=eP.call(this)||this;return e._allowedAttributeNames=t,e}ex(eI,eP),eI.prototype.process=function(t,e){var r=this,n={};return Object.keys(t).filter(function(t){return r._allowedAttributeNames.includes(t)}).forEach(function(e){return n[e]=t[e]}),n};var eN=new eC,eU=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var s=[i,u];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}},ek=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},eB=function(){function t(t,e){this._meterProviderSharedState=t,this._instrumentationScope=e,this.metricStorageRegistry=new eg,this.observableRegistry=new eL,this.meter=new en(this)}return t.prototype.registerMetricStorage=function(t){var e=this._registerMetricStorage(t,eM);return 1===e.length?e[0]:new eb(e)},t.prototype.registerAsyncMetricStorage=function(t){return this._registerMetricStorage(t,e_)},t.prototype.collect=function(t,e,r){var n,o,i,a;return n=this,o=void 0,i=void 0,a=function(){var n,o,i;return eU(this,function(a){switch(a.label){case 0:return[4,this.observableRegistry.observe(e,null==r?void 0:r.timeoutMillis)];case 1:if(n=a.sent(),0===(o=this.metricStorageRegistry.getStorages(t)).length)return[2,null];if(0===(i=o.map(function(r){return r.collect(t,e)}).filter(tk)).length)return[2,{errors:n}];return[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:i},errors:n}]}})},new(i||(i=Promise))(function(t,e){function r(t){try{s(a.next(t))}catch(t){e(t)}}function u(t){try{s(a.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(r,u)}s((a=a.apply(n,o||[])).next())})},t.prototype._registerMetricStorage=function(t,e){var r=this,n=this._meterProviderSharedState.viewRegistry.findViews(t,this._instrumentationScope).map(function(n){var o,i,a={name:null!=(o=n.name)?o:t.name,description:null!=(i=n.description)?i:t.description,type:t.type,unit:t.unit,valueType:t.valueType,advice:t.advice},u=r.metricStorageRegistry.findOrUpdateCompatibleStorage(a);if(null!=u)return u;var s=n.aggregation.createAggregator(a),c=new e(a,s,n.attributesProcessor,r._meterProviderSharedState.metricCollectors,n.aggregationCardinalityLimit);return r.metricStorageRegistry.register(c),c});if(0===n.length){var o=this._meterProviderSharedState.selectAggregations(t.type).map(function(n){var o=ek(n,2),i=o[0],a=o[1],u=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(i,t);if(null!=u)return u;var s=a.createAggregator(t),c=i.selectCardinalityLimit(t.type),l=new e(t,s,eP.Noop(),[i],c);return r.metricStorageRegistry.registerForCollector(i,l),l});n=n.concat(o)}return n},t}(),eD=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},eG=function(){function t(t){this.resource=t,this.viewRegistry=new tX,this.metricCollectors=[],this.meterSharedStates=new Map}return t.prototype.getMeterSharedState=function(t){var e,r,n=t.name+":"+(null!=(e=t.version)?e:"")+":"+(null!=(r=t.schemaUrl)?r:""),o=this.meterSharedStates.get(n);return null==o&&(o=new eB(this,t),this.meterSharedStates.set(n,o)),o},t.prototype.selectAggregations=function(t){var e,r,n=[];try{for(var o=eD(this.metricCollectors),i=o.next();!i.done;i=o.next()){var a=i.value;n.push([a,a.selectAggregation(t)])}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t}(),ej=function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,u)}s((n=n.apply(t,e||[])).next())})},eV=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var s=[i,u];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}},eX=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},eH=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},eF=function(){function t(t,e){this._sharedState=t,this._metricReader=e}return t.prototype.collect=function(t){return ej(this,void 0,void 0,function(){var e,r,n,o=this;return eV(this,function(i){switch(i.label){case 0:return e=t0(Date.now()),r=[],n=[],[4,Promise.all(Array.from(this._sharedState.meterSharedStates.values()).map(function(i){return ej(o,void 0,void 0,function(){var o;return eV(this,function(a){switch(a.label){case 0:return[4,i.collect(this,e,t)];case 1:return(null==(o=a.sent())?void 0:o.scopeMetrics)!=null&&r.push(o.scopeMetrics),(null==o?void 0:o.errors)!=null&&n.push.apply(n,eH([],eX(o.errors),!1)),[2]}})})}))];case 1:return i.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:r},errors:n}]}})})},t.prototype.forceFlush=function(t){return ej(this,void 0,void 0,function(){return eV(this,function(e){switch(e.label){case 0:return[4,this._metricReader.forceFlush(t)];case 1:return e.sent(),[2]}})})},t.prototype.shutdown=function(t){return ej(this,void 0,void 0,function(){return eV(this,function(e){switch(e.label){case 0:return[4,this._metricReader.shutdown(t)];case 1:return e.sent(),[2]}})})},t.prototype.selectAggregationTemporality=function(t){return this._metricReader.selectAggregationTemporality(t)},t.prototype.selectAggregation=function(t){return this._metricReader.selectAggregation(t)},t.prototype.selectCardinalityLimit=function(t){var e,r,n;return null!=(n=null==(r=(e=this._metricReader).selectCardinalityLimit)?void 0:r.call(e,t))?n:2e3},t}(),ez=function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,u)}s((n=n.apply(t,e||[])).next())})},eW=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var s=[i,u];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}},eY=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},eK=function(){function t(t){if(this._shutdown=!1,this._sharedState=new eG((e=null==(s=null==t?void 0:t.mergeResourceWithDefaults)||s,n=null!=(r=null==t?void 0:t.resource)?r:tM.empty(),e?tM.default().merge(n):n)),(null==t?void 0:t.views)!=null&&t.views.length>0)try{for(var e,r,n,o,i,a,u,s,c=eY(t.views),l=c.next();!l.done;l=c.next()){var f=l.value;this._sharedState.viewRegistry.addView(f)}}catch(t){o={error:t}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}if((null==t?void 0:t.readers)!=null&&t.readers.length>0)try{for(var p=eY(t.readers),h=p.next();!h.done;h=p.next()){var d=h.value;this.addMetricReader(d)}}catch(t){a={error:t}}finally{try{h&&!h.done&&(u=p.return)&&u.call(p)}finally{if(a)throw a.error}}}return t.prototype.getMeter=function(t,e,r){return(void 0===e&&(e=""),void 0===r&&(r={}),this._shutdown)?(tE.warn("A shutdown MeterProvider cannot provide a Meter"),J):this._sharedState.getMeterSharedState({name:t,version:e,schemaUrl:r.schemaUrl}).meter},t.prototype.addMetricReader=function(t){var e=new eF(this._sharedState,t);t.setMetricProducer(e),this._sharedState.metricCollectors.push(e)},t.prototype.shutdown=function(t){return ez(this,void 0,void 0,function(){return eW(this,function(e){switch(e.label){case 0:if(this._shutdown)return tE.warn("shutdown may only be called once per MeterProvider"),[2];return this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(e){return e.shutdown(t)}))];case 1:return e.sent(),[2]}})})},t.prototype.forceFlush=function(t){return ez(this,void 0,void 0,function(){return eW(this,function(e){switch(e.label){case 0:if(this._shutdown)return tE.warn("invalid attempt to force flush after MeterProvider shutdown"),[2];return[4,Promise.all(this._sharedState.metricCollectors.map(function(e){return e.forceFlush(t)}))];case 1:return e.sent(),[2]}})})},t}();Symbol("BaggageEntryMetadata"),tm.instance();var eJ=Symbol.for("OpenTelemetry SDK Context Key SUPPRESS_TRACING");(p=A||(A={}))[p.SUCCESS=0]="SUCCESS",p[p.FAILED=1]="FAILED";var eq=function(t){var e;tE.error("string"==typeof(e=t)?e:JSON.stringify(function(t){for(var e={},r=t;null!==r;)Object.getOwnPropertyNames(r).forEach(function(t){if(!e[t]){var n=r[t];n&&(e[t]=String(n))}}),r=Object.getPrototypeOf(r);return e}(e)))};function e$(t){try{eq(t)}catch(t){}}(h=M||(M={}))[h.DROP=0]="DROP",h[h.SUM=1]="SUM",h[h.LAST_VALUE=2]="LAST_VALUE",h[h.HISTOGRAM=3]="HISTOGRAM",h[h.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM",(d=x||(x={}))[d.HISTOGRAM=0]="HISTOGRAM",d[d.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",d[d.GAUGE=2]="GAUGE",d[d.SUM=3]="SUM";var eZ=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},eQ=function(){function t(t,e,r,n){void 0===r&&(r=0),void 0===n&&(n=!1),this.startTime=t,this.monotonic=e,this._current=r,this.reset=n}return t.prototype.record=function(t){this.monotonic&&t<0||(this._current+=t)},t.prototype.setStartTime=function(t){this.startTime=t},t.prototype.toPointValue=function(){return this._current},t}(),e0=function(){function t(t){this.monotonic=t,this.kind=M.SUM}return t.prototype.createAccumulation=function(t){return new eQ(t,this.monotonic)},t.prototype.merge=function(t,e){var r=t.toPointValue(),n=e.toPointValue();return e.reset?new eQ(e.startTime,this.monotonic,n,e.reset):new eQ(t.startTime,this.monotonic,r+n)},t.prototype.diff=function(t,e){var r=t.toPointValue(),n=e.toPointValue();return this.monotonic&&r>n?new eQ(e.startTime,this.monotonic,n,!0):new eQ(e.startTime,this.monotonic,n-r)},t.prototype.toMetricData=function(t,e,r,n){return{descriptor:t,aggregationTemporality:e,dataPointType:x.SUM,dataPoints:r.map(function(t){var e=eZ(t,2),r=e[0],o=e[1];return{attributes:r,startTime:o.startTime,endTime:n,value:o.toPointValue()}}),isMonotonic:this.monotonic}},t}(),e1=function(){function t(){this.kind=M.DROP}return t.prototype.createAccumulation=function(){},t.prototype.merge=function(t,e){},t.prototype.diff=function(t,e){},t.prototype.toMetricData=function(t,e,r,n){},t}(),e2=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},e3=function(){function t(t,e,r){void 0===e&&(e=0),void 0===r&&(r=[0,0]),this.startTime=t,this._current=e,this.sampleTime=r}return t.prototype.record=function(t){this._current=t,this.sampleTime=t0(Date.now())},t.prototype.setStartTime=function(t){this.startTime=t},t.prototype.toPointValue=function(){return this._current},t}(),e4=function(){function t(){this.kind=M.LAST_VALUE}return t.prototype.createAccumulation=function(t){return new e3(t)},t.prototype.merge=function(t,e){var r=t1(e.sampleTime)>=t1(t.sampleTime)?e:t;return new e3(t.startTime,r.toPointValue(),r.sampleTime)},t.prototype.diff=function(t,e){var r=t1(e.sampleTime)>=t1(t.sampleTime)?e:t;return new e3(e.startTime,r.toPointValue(),r.sampleTime)},t.prototype.toMetricData=function(t,e,r,n){return{descriptor:t,aggregationTemporality:e,dataPointType:x.GAUGE,dataPoints:r.map(function(t){var e=e2(t,2),r=e[0],o=e[1];return{attributes:r,startTime:o.startTime,endTime:n,value:o.toPointValue()}})}},t}(),e5=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},e6=function(){function t(t,e,r,n){var o;void 0===r&&(r=!0),void 0===n&&((o=e.map(function(){return 0})).push(0),n={buckets:{boundaries:e,counts:o},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}),this.startTime=t,this._boundaries=e,this._recordMinMax=r,this._current=n}return t.prototype.record=function(t){if(!Number.isNaN(t)){this._current.count+=1,this._current.sum+=t,this._recordMinMax&&(this._current.min=Math.min(t,this._current.min),this._current.max=Math.max(t,this._current.max),this._current.hasMinMax=!0);var e=function(t,e){for(var r=0,n=t.length-1,o=t.length;n>=r;){var i=r+Math.trunc((n-r)/2);t[i]<e?r=i+1:(o=i,n=i-1)}return o}(this._boundaries,t);this._current.buckets.counts[e]+=1}},t.prototype.setStartTime=function(t){this.startTime=t},t.prototype.toPointValue=function(){return this._current},t}(),e7=function(){function t(t,e){this._boundaries=t,this._recordMinMax=e,this.kind=M.HISTOGRAM}return t.prototype.createAccumulation=function(t){return new e6(t,this._boundaries,this._recordMinMax)},t.prototype.merge=function(t,e){for(var r=t.toPointValue(),n=e.toPointValue(),o=r.buckets.counts,i=n.buckets.counts,a=Array(o.length),u=0;u<o.length;u++)a[u]=o[u]+i[u];var s=1/0,c=-1/0;return this._recordMinMax&&(r.hasMinMax&&n.hasMinMax?(s=Math.min(r.min,n.min),c=Math.max(r.max,n.max)):r.hasMinMax?(s=r.min,c=r.max):n.hasMinMax&&(s=n.min,c=n.max)),new e6(t.startTime,r.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:r.buckets.boundaries,counts:a},count:r.count+n.count,sum:r.sum+n.sum,hasMinMax:this._recordMinMax&&(r.hasMinMax||n.hasMinMax),min:s,max:c})},t.prototype.diff=function(t,e){for(var r=t.toPointValue(),n=e.toPointValue(),o=r.buckets.counts,i=n.buckets.counts,a=Array(o.length),u=0;u<o.length;u++)a[u]=i[u]-o[u];return new e6(e.startTime,r.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:r.buckets.boundaries,counts:a},count:n.count-r.count,sum:n.sum-r.sum,hasMinMax:!1,min:1/0,max:-1/0})},t.prototype.toMetricData=function(t,e,r,n){return{descriptor:t,aggregationTemporality:e,dataPointType:x.HISTOGRAM,dataPoints:r.map(function(e){var r=e5(e,2),o=r[0],i=r[1],a=i.toPointValue(),u=t.type===R.GAUGE||t.type===R.UP_DOWN_COUNTER||t.type===R.OBSERVABLE_GAUGE||t.type===R.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:o,startTime:i.startTime,endTime:n,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:u?void 0:a.sum,buckets:a.buckets,count:a.count}}})}},t}(),e8=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},e9=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},rt=function(){function t(t,e,r,n){void 0===t&&(t=new re),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),this.backing=t,this.indexBase=e,this.indexStart=r,this.indexEnd=n}return Object.defineProperty(t.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return 0===this.backing.length||this.indexEnd===this.indexStart&&0===this.at(0)?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),t.prototype.counts=function(){var t=this;return Array.from({length:this.length},function(e,r){return t.at(r)})},t.prototype.at=function(t){var e=this.indexBase-this.indexStart;return t<e&&(t+=this.backing.length),t-=e,this.backing.countAt(t)},t.prototype.incrementBucket=function(t,e){this.backing.increment(t,e)},t.prototype.decrementBucket=function(t,e){this.backing.decrement(t,e)},t.prototype.trim=function(){for(var t=0;t<this.length;t++)if(0!==this.at(t)){this.indexStart+=t;break}else if(t===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var t=this.length-1;t>=0;t--)if(0!==this.at(t)){this.indexEnd-=this.length-t-1;break}this._rotate()},t.prototype.downscale=function(t){this._rotate();for(var e=1+this.indexEnd-this.indexStart,r=1<<t,n=0,o=0,i=this.indexStart;i<=this.indexEnd;){var a=i%r;a<0&&(a+=r);for(var u=a;u<r&&n<e;u++)this._relocateBucket(o,n),n++,i++;o++}this.indexStart>>=t,this.indexEnd>>=t,this.indexBase=this.indexStart},t.prototype.clone=function(){return new t(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},t.prototype._rotate=function(){var t=this.indexBase-this.indexStart;0!==t&&(t>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,t),this.backing.reverse(t,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+t)),this.indexBase=this.indexStart)},t.prototype._relocateBucket=function(t,e){t!==e&&this.incrementBucket(t,this.backing.emptyBucket(e))},t}(),re=function(){function t(t){void 0===t&&(t=[0]),this._counts=t}return Object.defineProperty(t.prototype,"length",{get:function(){return this._counts.length},enumerable:!1,configurable:!0}),t.prototype.countAt=function(t){return this._counts[t]},t.prototype.growTo=function(t,e,r){var n=Array(t).fill(0);n.splice.apply(n,e9([r,this._counts.length-e],e8(this._counts.slice(e)),!1)),n.splice.apply(n,e9([0,e],e8(this._counts.slice(0,e)),!1)),this._counts=n},t.prototype.reverse=function(t,e){for(var r=Math.floor((t+e)/2)-t,n=0;n<r;n++){var o=this._counts[t+n];this._counts[t+n]=this._counts[e-n-1],this._counts[e-n-1]=o}},t.prototype.emptyBucket=function(t){var e=this._counts[t];return this._counts[t]=0,e},t.prototype.increment=function(t,e){this._counts[t]+=e},t.prototype.decrement=function(t,e){this._counts[t]>=e?this._counts[t]-=e:this._counts[t]=0},t.prototype.clone=function(){return new t(e9([],e8(this._counts),!1))},t}();function rr(t){var e=new DataView(new ArrayBuffer(8));return e.setFloat64(0,t),((0x7ff00000&e.getUint32(0))>>20)-1023}function rn(t){var e=new DataView(new ArrayBuffer(8));return e.setFloat64(0,t),(1048575&e.getUint32(0))*0x100000000+e.getUint32(4)}function ro(t,e){return 0===t||t===1/0||t===-1/0||Number.isNaN(t)?t:t*Math.pow(2,e)}var ri=(_=function(t,e){return(_=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}_(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),ra=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ri(e,t),e}(Error),ru=function(){function t(t){this._shift=-t}return t.prototype.mapToIndex=function(t){return t<22250738585072014e-324?this._minNormalLowerBoundaryIndex():rr(t)+this._rightShift(rn(t)-1,52)>>this._shift},t.prototype.lowerBoundary=function(t){var e=this._minNormalLowerBoundaryIndex();if(t<e)throw new ra("underflow: "+t+" is < minimum lower boundary: "+e);var r=this._maxNormalLowerBoundaryIndex();if(t>r)throw new ra("overflow: "+t+" is > maximum lower boundary: "+r);return ro(1,t<<this._shift)},Object.defineProperty(t.prototype,"scale",{get:function(){return 0===this._shift?0:-this._shift},enumerable:!1,configurable:!0}),t.prototype._minNormalLowerBoundaryIndex=function(){var t=-1022>>this._shift;return this._shift<2&&t--,t},t.prototype._maxNormalLowerBoundaryIndex=function(){return 1023>>this._shift},t.prototype._rightShift=function(t,e){return Math.floor(t*Math.pow(2,-e))},t}(),rs=function(){function t(t){this._scale=t,this._scaleFactor=ro(Math.LOG2E,t),this._inverseFactor=ro(Math.LN2,-t)}return t.prototype.mapToIndex=function(t){if(t<=22250738585072014e-324)return this._minNormalLowerBoundaryIndex()-1;if(0===rn(t))return(rr(t)<<this._scale)-1;var e=Math.floor(Math.log(t)*this._scaleFactor),r=this._maxNormalLowerBoundaryIndex();return e>=r?r:e},t.prototype.lowerBoundary=function(t){var e=this._maxNormalLowerBoundaryIndex();if(t>=e){if(t===e)return 2*Math.exp((t-(1<<this._scale))/this._scaleFactor);throw new ra("overflow: "+t+" is > maximum lower boundary: "+e)}var r=this._minNormalLowerBoundaryIndex();if(t<=r){if(t===r)return 22250738585072014e-324;if(t===r-1)return Math.exp((t+(1<<this._scale))/this._scaleFactor)/2;throw new ra("overflow: "+t+" is < minimum lower boundary: "+r)}return Math.exp(t*this._inverseFactor)},Object.defineProperty(t.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),t.prototype._minNormalLowerBoundaryIndex=function(){return -1022<<this._scale},t.prototype._maxNormalLowerBoundaryIndex=function(){return(1024<<this._scale)-1},t}(),rc=Array.from({length:31},function(t,e){return e>10?new rs(e-10):new ru(e-10)});function rl(t){if(t>20||t<-10)throw new ra("expected scale >= -10 && <= 20, got: "+t);return rc[t+10]}var rf=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},rp=function(){function t(t,e){this.low=t,this.high=e}return t.combine=function(e,r){return new t(Math.min(e.low,r.low),Math.max(e.high,r.high))},t}(),rh=function(){function t(t,e,r,n,o,i,a,u,s,c,l){void 0===e&&(e=160),void 0===r&&(r=!0),void 0===n&&(n=0),void 0===o&&(o=0),void 0===i&&(i=0),void 0===a&&(a=1/0),void 0===u&&(u=-1/0),void 0===s&&(s=new rt),void 0===c&&(c=new rt),void 0===l&&(l=rl(20)),this.startTime=t,this._maxSize=e,this._recordMinMax=r,this._sum=n,this._count=o,this._zeroCount=i,this._min=a,this._max=u,this._positive=s,this._negative=c,this._mapping=l,this._maxSize<2&&(tE.warn("Exponential Histogram Max Size set to "+this._maxSize+",                 changing to the minimum size of: 2"),this._maxSize=2)}return t.prototype.record=function(t){this.updateByIncrement(t,1)},t.prototype.setStartTime=function(t){this.startTime=t},t.prototype.toPointValue=function(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}},Object.defineProperty(t.prototype,"sum",{get:function(){return this._sum},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zeroCount",{get:function(){return this._zeroCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this._count===this._zeroCount?0:this._mapping.scale},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"positive",{get:function(){return this._positive},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"negative",{get:function(){return this._negative},enumerable:!1,configurable:!0}),t.prototype.updateByIncrement=function(t,e){if(!Number.isNaN(t)){if(t>this._max&&(this._max=t),t<this._min&&(this._min=t),this._count+=e,0===t){this._zeroCount+=e;return}this._sum+=t*e,t>0?this._updateBuckets(this._positive,t,e):this._updateBuckets(this._negative,-t,e)}},t.prototype.merge=function(t){0===this._count?(this._min=t.min,this._max=t.max):0!==t.count&&(t.min<this.min&&(this._min=t.min),t.max>this.max&&(this._max=t.max)),this.startTime=t.startTime,this._sum+=t.sum,this._count+=t.count,this._zeroCount+=t.zeroCount;var e=this._minScale(t);this._downscale(this.scale-e),this._mergeBuckets(this.positive,t,t.positive,e),this._mergeBuckets(this.negative,t,t.negative,e)},t.prototype.diff=function(t){this._min=1/0,this._max=-1/0,this._sum-=t.sum,this._count-=t.count,this._zeroCount-=t.zeroCount;var e=this._minScale(t);this._downscale(this.scale-e),this._diffBuckets(this.positive,t,t.positive,e),this._diffBuckets(this.negative,t,t.negative,e)},t.prototype.clone=function(){return new t(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)},t.prototype._updateBuckets=function(t,e,r){var n=this._mapping.mapToIndex(e),o=!1,i=0,a=0;if(0===t.length?(t.indexStart=n,t.indexEnd=t.indexStart,t.indexBase=t.indexStart):n<t.indexStart&&t.indexEnd-n>=this._maxSize?(o=!0,a=n,i=t.indexEnd):n>t.indexEnd&&n-t.indexStart>=this._maxSize&&(o=!0,a=t.indexStart,i=n),o){var u=this._changeScale(i,a);this._downscale(u),n=this._mapping.mapToIndex(e)}this._incrementIndexBy(t,n,r)},t.prototype._incrementIndexBy=function(t,e,r){if(0!==r){if(0===t.length&&(t.indexStart=t.indexEnd=t.indexBase=e),e<t.indexStart){var n=t.indexEnd-e;n>=t.backing.length&&this._grow(t,n+1),t.indexStart=e}else if(e>t.indexEnd){var n=e-t.indexStart;n>=t.backing.length&&this._grow(t,n+1),t.indexEnd=e}var o=e-t.indexBase;o<0&&(o+=t.backing.length),t.incrementBucket(o,r)}},t.prototype._grow=function(t,e){var r,n=t.backing.length,o=t.indexBase-t.indexStart,i=(r=e,r--,r|=r>>1,r|=r>>2,r|=r>>4,r|=r>>8,r|=r>>16,++r);i>this._maxSize&&(i=this._maxSize);var a=i-o;t.backing.growTo(i,n-o,a)},t.prototype._changeScale=function(t,e){for(var r=0;t-e>=this._maxSize;)t>>=1,e>>=1,r++;return r},t.prototype._downscale=function(t){if(0!==t){if(t<0)throw Error("impossible change of scale: "+this.scale);var e=this._mapping.scale-t;this._positive.downscale(t),this._negative.downscale(t),this._mapping=rl(e)}},t.prototype._minScale=function(t){var e=Math.min(this.scale,t.scale),r=rp.combine(this._highLowAtScale(this.positive,this.scale,e),this._highLowAtScale(t.positive,t.scale,e)),n=rp.combine(this._highLowAtScale(this.negative,this.scale,e),this._highLowAtScale(t.negative,t.scale,e));return Math.min(e-this._changeScale(r.high,r.low),e-this._changeScale(n.high,n.low))},t.prototype._highLowAtScale=function(t,e,r){if(0===t.length)return new rp(0,-1);var n=e-r;return new rp(t.indexStart>>n,t.indexEnd>>n)},t.prototype._mergeBuckets=function(t,e,r,n){for(var o=r.offset,i=e.scale-n,a=0;a<r.length;a++)this._incrementIndexBy(t,o+a>>i,r.at(a))},t.prototype._diffBuckets=function(t,e,r,n){for(var o=r.offset,i=e.scale-n,a=0;a<r.length;a++){var u=(o+a>>i)-t.indexBase;u<0&&(u+=t.backing.length),t.decrementBucket(u,r.at(a))}t.trim()},t}(),rd=function(){function t(t,e){this._maxSize=t,this._recordMinMax=e,this.kind=M.EXPONENTIAL_HISTOGRAM}return t.prototype.createAccumulation=function(t){return new rh(t,this._maxSize,this._recordMinMax)},t.prototype.merge=function(t,e){var r=e.clone();return r.merge(t),r},t.prototype.diff=function(t,e){var r=e.clone();return r.diff(t),r},t.prototype.toMetricData=function(t,e,r,n){return{descriptor:t,aggregationTemporality:e,dataPointType:x.EXPONENTIAL_HISTOGRAM,dataPoints:r.map(function(e){var r=rf(e,2),o=r[0],i=r[1],a=i.toPointValue(),u=t.type===R.GAUGE||t.type===R.UP_DOWN_COUNTER||t.type===R.OBSERVABLE_GAUGE||t.type===R.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:o,startTime:i.startTime,endTime:n,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:u?void 0:a.sum,positive:{offset:a.positive.offset,bucketCounts:a.positive.bucketCounts},negative:{offset:a.negative.offset,bucketCounts:a.negative.bucketCounts},count:a.count,scale:a.scale,zeroCount:a.zeroCount}}})}},t}(),r_=(y=function(t,e){return(y=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}y(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),ry=function(){function t(){}return t.Drop=function(){return rw},t.Sum=function(){return rS},t.LastValue=function(){return rR},t.Histogram=function(){return rL},t.ExponentialHistogram=function(){return rA},t.Default=function(){return rM},t}(),rv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r_(e,t),e.prototype.createAggregator=function(t){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new e1,e}(ry),rm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r_(e,t),e.prototype.createAggregator=function(t){switch(t.type){case R.COUNTER:case R.OBSERVABLE_COUNTER:case R.HISTOGRAM:return e.MONOTONIC_INSTANCE;default:return e.NON_MONOTONIC_INSTANCE}},e.MONOTONIC_INSTANCE=new e0(!0),e.NON_MONOTONIC_INSTANCE=new e0(!1),e}(ry),rg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r_(e,t),e.prototype.createAggregator=function(t){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new e4,e}(ry),rb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r_(e,t),e.prototype.createAggregator=function(t){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new e7([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),e}(ry),rE=function(t){function e(e,r){void 0===r&&(r=!0);var n=t.call(this)||this;if(n._recordMinMax=r,null==e)throw Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");var o=(e=(e=e.concat()).sort(function(t,e){return t-e})).lastIndexOf(-1/0),i=e.indexOf(1/0);return -1===i&&(i=void 0),n._boundaries=e.slice(o+1,i),n}return r_(e,t),e.prototype.createAggregator=function(t){return new e7(this._boundaries,this._recordMinMax)},e}(ry),rT=function(t){function e(e,r){void 0===e&&(e=160),void 0===r&&(r=!0);var n=t.call(this)||this;return n._maxSize=e,n._recordMinMax=r,n}return r_(e,t),e.prototype.createAggregator=function(t){return new rd(this._maxSize,this._recordMinMax)},e}(ry),rO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r_(e,t),e.prototype._resolve=function(t){switch(t.type){case R.COUNTER:case R.UP_DOWN_COUNTER:case R.OBSERVABLE_COUNTER:case R.OBSERVABLE_UP_DOWN_COUNTER:return rS;case R.GAUGE:case R.OBSERVABLE_GAUGE:return rR;case R.HISTOGRAM:if(t.advice.explicitBucketBoundaries)return new rE(t.advice.explicitBucketBoundaries);return rL}return tE.warn("Unable to recognize instrument type: "+t.type),rw},e.prototype.createAggregator=function(t){return this._resolve(t).createAggregator(t)},e}(ry),rw=new rv,rS=new rm,rR=new rg,rL=new rb,rA=new rT,rM=new rO,rx=function(t){return ry.Default()},rP=function(t){return L.CUMULATIVE},rC=function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,u)}s((n=n.apply(t,e||[])).next())})},rI=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var s=[i,u];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}},rN=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},rU=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},rk=function(){function t(t){var e,r,n;this._shutdown=!1,this._aggregationSelector=null!=(e=null==t?void 0:t.aggregationSelector)?e:rx,this._aggregationTemporalitySelector=null!=(r=null==t?void 0:t.aggregationTemporalitySelector)?r:rP,this._metricProducers=null!=(n=null==t?void 0:t.metricProducers)?n:[],this._cardinalitySelector=null==t?void 0:t.cardinalitySelector}return t.prototype.setMetricProducer=function(t){if(this._sdkMetricProducer)throw Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=t,this.onInitialized()},t.prototype.selectAggregation=function(t){return this._aggregationSelector(t)},t.prototype.selectAggregationTemporality=function(t){return this._aggregationTemporalitySelector(t)},t.prototype.selectCardinalityLimit=function(t){return this._cardinalitySelector?this._cardinalitySelector(t):2e3},t.prototype.onInitialized=function(){},t.prototype.collect=function(t){return rC(this,void 0,void 0,function(){var e,r,n,o;return rI(this,function(i){switch(i.label){case 0:if(void 0===this._sdkMetricProducer)throw Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw Error("MetricReader is shutdown");return[4,Promise.all(rU([this._sdkMetricProducer.collect({timeoutMillis:null==t?void 0:t.timeoutMillis})],rN(this._metricProducers.map(function(e){return e.collect({timeoutMillis:null==t?void 0:t.timeoutMillis})})),!1))];case 1:return r=(e=rN.apply(void 0,[i.sent()]))[0],n=e.slice(1),o=r.errors.concat(tV(n,function(t){return t.errors})),[2,{resourceMetrics:{resource:r.resourceMetrics.resource,scopeMetrics:r.resourceMetrics.scopeMetrics.concat(tV(n,function(t){return t.resourceMetrics.scopeMetrics}))},errors:o}]}})})},t.prototype.shutdown=function(t){return rC(this,void 0,void 0,function(){return rI(this,function(e){switch(e.label){case 0:if(this._shutdown)return tE.error("Cannot call shutdown twice."),[2];if((null==t?void 0:t.timeoutMillis)!=null)return[3,2];return[4,this.onShutdown()];case 1:return e.sent(),[3,4];case 2:return[4,tG(this.onShutdown(),t.timeoutMillis)];case 3:e.sent(),e.label=4;case 4:return this._shutdown=!0,[2]}})})},t.prototype.forceFlush=function(t){return rC(this,void 0,void 0,function(){return rI(this,function(e){switch(e.label){case 0:if(this._shutdown)return tE.warn("Cannot forceFlush on already shutdown MetricReader."),[2];if((null==t?void 0:t.timeoutMillis)!=null)return[3,2];return[4,this.onForceFlush()];case 1:case 3:return e.sent(),[2];case 2:return[4,tG(this.onForceFlush(),t.timeoutMillis)]}})})},t}(),rB=(v=function(t,e){return(v=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),rD=function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,u)}s((n=n.apply(t,e||[])).next())})},rG=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var s=[i,u];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}},rj=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},rV=function(t,e,r){if(r||2==arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},rX=function(t){function e(e){var r,n,o,i,a=t.call(this,{aggregationSelector:null==(r=e.exporter.selectAggregation)?void 0:r.bind(e.exporter),aggregationTemporalitySelector:null==(n=e.exporter.selectAggregationTemporality)?void 0:n.bind(e.exporter),metricProducers:e.metricProducers})||this;if(void 0!==e.exportIntervalMillis&&e.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(void 0!==e.exportTimeoutMillis&&e.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(void 0!==e.exportTimeoutMillis&&void 0!==e.exportIntervalMillis&&e.exportIntervalMillis<e.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return a._exportInterval=null!=(o=e.exportIntervalMillis)?o:6e4,a._exportTimeout=null!=(i=e.exportTimeoutMillis)?i:3e4,a._exporter=e.exporter,a}return rB(e,t),e.prototype._runOnce=function(){return rD(this,void 0,void 0,function(){var t;return rG(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,tG(this._doRun(),this._exportTimeout)];case 1:return e.sent(),[3,3];case 2:if((t=e.sent())instanceof tD)return tE.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2];return e$(t),[3,3];case 3:return[2]}})})},e.prototype._doRun=function(){var t,e;return rD(this,void 0,void 0,function(){var r,n,o,i,a,u;return rG(this,function(s){switch(s.label){case 0:return[4,this.collect({timeoutMillis:this._exportTimeout})];case 1:if(n=(r=s.sent()).resourceMetrics,(o=r.errors).length>0&&(u=tE).error.apply(u,rV(["PeriodicExportingMetricReader: metrics collection errors"],rj(o),!1)),!n.resource.asyncAttributesPending)return[3,5];s.label=2;case 2:return s.trys.push([2,4,,5]),[4,null==(e=(t=n.resource).waitForAsyncAttributes)?void 0:e.call(t)];case 3:return s.sent(),[3,5];case 4:return i=s.sent(),tE.debug("Error while resolving async portion of resource: ",i),e$(i),[3,5];case 5:var c,l;if(0===n.scopeMetrics.length)return[2];return[4,(c=this._exporter,l=n,new Promise(function(t){tQ.with(tQ.active().setValue(eJ,!0),function(){c.export(l,function(e){t(e)})})}))];case 6:if((a=s.sent()).code!==A.SUCCESS)throw Error("PeriodicExportingMetricReader: metrics export failed (error "+a.error+")");return[2]}})})},e.prototype.onInitialized=function(){var t=this;this._interval=setInterval(function(){t._runOnce()},this._exportInterval),this._interval},e.prototype.onForceFlush=function(){return rD(this,void 0,void 0,function(){return rG(this,function(t){switch(t.label){case 0:return[4,this._runOnce()];case 1:return t.sent(),[4,this._exporter.forceFlush()];case 2:return t.sent(),[2]}})})},e.prototype.onShutdown=function(){return rD(this,void 0,void 0,function(){return rG(this,function(t){switch(t.label){case 0:return this._interval&&clearInterval(this._interval),[4,this.onForceFlush()];case 1:return t.sent(),[4,this._exporter.shutdown()];case 2:return t.sent(),[2]}})})},e}(rk);(m=P||(P={}))[m.DELTA=0]="DELTA",m[m.CUMULATIVE=1]="CUMULATIVE",m[m.LOWMEMORY=2]="LOWMEMORY",(g=C||(C={})).AlwaysOff="always_off",g.AlwaysOn="always_on",g.ParentBasedAlwaysOff="parentbased_always_off",g.ParentBasedAlwaysOn="parentbased_always_on",g.ParentBasedTraceIdRatio="parentbased_traceidratio",g.TraceIdRatio="traceidratio";var rH=["OTEL_SDK_DISABLED"],rF=["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"],rz=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"],rW=1/0,rY={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:O.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:rW,OTEL_ATTRIBUTE_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:rW,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:128,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:rW,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:C.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]},rK={ALL:O.ALL,VERBOSE:O.VERBOSE,DEBUG:O.DEBUG,INFO:O.INFO,WARN:O.WARN,ERROR:O.ERROR,NONE:O.NONE},rJ="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:t.g,rq=function(){function t(t){this._delegate=t}return t.prototype.export=function(t,e){this._delegate.export(t,e)},t.prototype.forceFlush=function(){return this._delegate.forceFlush()},t.prototype.shutdown=function(){return this._delegate.shutdown()},t}(),r$=(b=function(t,e){return(b=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}b(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),rZ=function(){return L.CUMULATIVE},rQ=function(t){switch(t){case R.COUNTER:case R.OBSERVABLE_COUNTER:case R.GAUGE:case R.HISTOGRAM:case R.OBSERVABLE_GAUGE:return L.DELTA;case R.UP_DOWN_COUNTER:case R.OBSERVABLE_UP_DOWN_COUNTER:return L.CUMULATIVE}},r0=function(t){switch(t){case R.COUNTER:case R.HISTOGRAM:return L.DELTA;case R.GAUGE:case R.UP_DOWN_COUNTER:case R.OBSERVABLE_UP_DOWN_COUNTER:case R.OBSERVABLE_COUNTER:case R.OBSERVABLE_GAUGE:return L.CUMULATIVE}},r1=function(t){function e(e,r){var n,o,i,a,u=t.call(this,e)||this;return u._aggregationSelector=(null==r?void 0:r.aggregationPreference)?r.aggregationPreference:function(t){return ry.Default()},u._aggregationTemporalitySelector=null!=(n=null==r?void 0:r.temporalityPreference)?n===P.DELTA?rQ:n===P.LOWMEMORY?r0:rZ:"cumulative"===(a=(o=function(t){var e={};for(var r in rY)if("OTEL_LOG_LEVEL"===r)!function(t,e,r){var n=r[t];if("string"==typeof n){var o=rK[n.toUpperCase()];null!=o&&(e[t]=o)}}(r,e,t);else if(rH.indexOf(r)>-1)!function(t,e,r){if(void 0!==r[t]){var n=String(r[t]);e[t]="true"===n.toLowerCase()}}(r,e,t);else if(rF.indexOf(r)>-1)!function(t,e,r,n,o){if(void 0===n&&(n=-1/0),void 0===o&&(o=1/0),void 0!==r[t]){var i=Number(r[t]);isNaN(i)||(i<n?e[t]=n:i>o?e[t]=o:e[t]=i)}}(r,e,t);else if(rz.indexOf(r)>-1)!function(t,e,r,n){void 0===n&&(n=",");var o=r[t];"string"==typeof o&&(e[t]=o.split(n).map(function(t){return t.trim()}))}(r,e,t);else{var n=t[r];null!=n&&(e[r]=String(n))}return e}(rJ),i=Object.assign({},rY,o)).OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase())?rZ:"delta"===a?rQ:"lowmemory"===a?r0:(tE.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+i.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),rZ),u}return r$(e,t),e.prototype.selectAggregation=function(t){return this._aggregationSelector(t)},e.prototype.selectAggregationTemporality=function(t){return this._aggregationTemporalitySelector(t)},e}(rq);function r2(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function r3(t){for(var e=new Uint8Array(t.length/2),r=0,n=0;n<t.length;n+=2){var o=r2(t.charCodeAt(n)),i=r2(t.charCodeAt(n+1));e[r++]=o<<4|i}return e}function r4(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function r5(t){var e;return{low:Number(BigInt.asUintN(32,e=r4(t))),high:Number(BigInt.asUintN(32,e>>BigInt(32)))}}var r6="u">typeof BigInt?function(t){return r4(t).toString()}:function(t){return 1e9*t[0]+t[1]};function r7(t){return t}function r8(t){if(void 0!==t)return r3(t)}var r9={encodeHrTime:r5,encodeSpanContext:r3,encodeOptionalSpanContext:r8},nt=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function ne(t){return Object.keys(t).map(function(e){return function t(e,r){return{key:e,value:function e(r){var n=typeof r;return"string"===n?{stringValue:r}:"number"===n?Number.isInteger(r)?{intValue:r}:{doubleValue:r}:"boolean"===n?{boolValue:r}:r instanceof Uint8Array?{bytesValue:r}:Array.isArray(r)?{arrayValue:{values:r.map(e)}}:"object"===n&&null!=r?{kvlistValue:{values:Object.entries(r).map(function(e){var r=nt(e,2);return t(r[0],r[1])})}}:{}}(r)}}(e,t[e])})}function nr(t,e){return t.dataPoints.map(function(r){var n=t.descriptor.valueType,o={attributes:ne(r.attributes),startTimeUnixNano:e.encodeHrTime(r.startTime),timeUnixNano:e.encodeHrTime(r.endTime)};switch(n){case S.INT:o.asInt=r.value;break;case S.DOUBLE:o.asDouble=r.value}return o})}var nn={serializeRequest:function(t){var e,r=(e={useLongBits:!1},{resourceMetrics:[t].map(function(t){var r,n,o=function(t){if(void 0===t)return r9;var e,r,n=null==(e=t.useLongBits)||e,o=null!=(r=t.useHex)&&r;return{encodeHrTime:n?r5:r6,encodeSpanContext:o?r7:r3,encodeOptionalSpanContext:o?r7:r8}}(e);return{resource:{attributes:ne(t.resource.attributes),droppedAttributesCount:0},schemaUrl:void 0,scopeMetrics:(r=t.scopeMetrics,n=o,Array.from(r.map(function(t){var e;return{scope:{name:(e=t.scope).name,version:e.version},metrics:t.metrics.map(function(t){return function(t,e){var r,n,o,i,a={name:t.descriptor.name,description:t.descriptor.description,unit:t.descriptor.unit},u=function(t){switch(t){case L.DELTA:return 1;case L.CUMULATIVE:return 2}}(t.aggregationTemporality);switch(t.dataPointType){case x.SUM:a.sum={aggregationTemporality:u,isMonotonic:t.isMonotonic,dataPoints:nr(t,e)};break;case x.GAUGE:a.gauge={dataPoints:nr(t,e)};break;case x.HISTOGRAM:a.histogram={aggregationTemporality:u,dataPoints:(r=t,n=e,r.dataPoints.map(function(t){var e=t.value;return{attributes:ne(t.attributes),bucketCounts:e.buckets.counts,explicitBounds:e.buckets.boundaries,count:e.count,sum:e.sum,min:e.min,max:e.max,startTimeUnixNano:n.encodeHrTime(t.startTime),timeUnixNano:n.encodeHrTime(t.endTime)}}))};break;case x.EXPONENTIAL_HISTOGRAM:a.exponentialHistogram={aggregationTemporality:u,dataPoints:(o=t,i=e,o.dataPoints.map(function(t){var e=t.value;return{attributes:ne(t.attributes),count:e.count,min:e.min,max:e.max,sum:e.sum,positive:{offset:e.positive.offset,bucketCounts:e.positive.bucketCounts},negative:{offset:e.negative.offset,bucketCounts:e.negative.bucketCounts},scale:e.scale,zeroCount:e.zeroCount,startTimeUnixNano:i.encodeHrTime(t.startTime),timeUnixNano:i.encodeHrTime(t.endTime)}}))}}return a}(t,n)}),schemaUrl:t.scope.schemaUrl}})))}})});return new TextEncoder().encode(JSON.stringify(r))},deserializeResponse:function(t){return JSON.parse(new TextDecoder().decode(t))}},no=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var s=[i,u];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}},ni=function(){function t(t){this._transport=t}return t.prototype.retry=function(t,e,r){var n=this;return new Promise(function(o,i){setTimeout(function(){n._transport.send(t,e).then(o,i)},r)})},t.prototype.send=function(t,e){var r,n,o,i,a;return n=this,o=void 0,i=void 0,a=function(){var n,o,i,a,u,s,c;return no(this,function(l){switch(l.label){case 0:return n=Date.now()+e,[4,this._transport.send(t,e)];case 1:o=l.sent(),i=5,a=1e3,l.label=2;case 2:if(!("retryable"===o.status&&i>0))return[3,4];if(i--,u=Math.max(Math.min(a,5e3)+(.4*Math.random()-.2),0),a*=1.5,(s=null!=(r=o.retryInMillis)?r:u)>(c=n-Date.now()))return[2,o];return[4,this.retry(t,c,s)];case 3:return o=l.sent(),[3,2];case 4:return[2,o]}})},new(i||(i=Promise))(function(t,e){function r(t){try{s(a.next(t))}catch(t){e(t)}}function u(t){try{s(a.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(r,u)}s((a=a.apply(n,o||[])).next())})},t.prototype.shutdown=function(){return this._transport.shutdown()},t}();function na(t){return new ni(t.transport)}var nu=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},ns=function(){function t(t){this._parameters=t}return t.prototype.send=function(t,e){var r=this;return new Promise(function(n){var o=new XMLHttpRequest;o.timeout=e,o.open("POST",r._parameters.url),Object.entries(r._parameters.headers()).forEach(function(t){var e=nu(t,2),r=e[0],n=e[1];o.setRequestHeader(r,n)}),o.ontimeout=function(t){n({status:"failure",error:Error("XHR request timed out")})},o.onreadystatechange=function(){o.status>=200&&o.status<=299?(tE.debug("XHR success"),n({status:"success"})):o.status&&[429,502,503,504].includes(o.status)?n({status:"retryable",retryInMillis:function(t){if(null!=t){var e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?1e3*e:-1;var r=new Date(t).getTime()-Date.now();return r>=0?r:0}}(o.getResponseHeader("Retry-After"))}):0!==o.status&&n({status:"failure",error:Error("XHR request failed with non-retryable status")})},o.onabort=function(){n({status:"failure",error:Error("XHR request aborted")})},o.onerror=function(){n({status:"failure",error:Error("XHR request errored")})},o.send(t)})},t.prototype.shutdown=function(){},t}(),nc=function(){function t(t){this._params=t}return t.prototype.send=function(t){var e=this;return new Promise(function(r){navigator.sendBeacon(e._params.url,new Blob([t],{type:e._params.blobType}))?(tE.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:Error("SendBeacon failed")})})},t.prototype.shutdown=function(){},t}(),nl=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var s=[i,u];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}},nf=function(){function t(t){this._sendingPromises=[],this._concurrencyLimit=t}return t.prototype.pushPromise=function(t){var e=this;if(this.hasReachedLimit())throw Error("Concurrency Limit reached");this._sendingPromises.push(t);var r=function(){var r=e._sendingPromises.indexOf(t);e._sendingPromises.splice(r,1)};t.then(r,r)},t.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},t.prototype.awaitAll=function(){var t,e,r,n;return t=this,e=void 0,r=void 0,n=function(){return nl(this,function(t){switch(t.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return t.sent(),[2]}})},new(r||(r=Promise))(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,u)}s((n=n.apply(t,e||[])).next())})},t}(),np=(E=function(t,e){return(E=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}E(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),nh=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.name="OTLPExporterError",o.data=n,o.code=r,o}return np(e,t),e}(Error),nd=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var s=[i,u];if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}},n_=function(){function t(t,e,r,n,o){this._transport=t,this._serializer=e,this._responseHandler=r,this._promiseQueue=n,this._timeout=o,this._diagLogger=tE.createComponentLogger({namespace:"OTLPExportDelegate"})}return t.prototype.export=function(t,e){var r=this;if(this._diagLogger.debug("items to be sent",t),this._promiseQueue.hasReachedLimit())return void e({code:A.FAILED,error:Error("Concurrent export limit reached")});var n=this._serializer.serializeRequest(t);null==n?e({code:A.FAILED,error:Error("Nothing to send")}):this._promiseQueue.pushPromise(this._transport.send(n,this._timeout).then(function(t){if("success"===t.status){if(null!=t.data)try{r._responseHandler.handleResponse(r._serializer.deserializeResponse(t.data))}catch(e){r._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",e,t.data)}e({code:A.SUCCESS});return}"failure"===t.status&&t.error?e({code:A.FAILED,error:t.error}):"retryable"===t.status?e({code:A.FAILED,error:new nh("Export failed with retryable status")}):e({code:A.FAILED,error:new nh("Export failed with unknown error")})},function(t){return e({code:A.FAILED,error:t})}))},t.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},t.prototype.shutdown=function(){var t,e,r,n;return t=this,e=void 0,r=void 0,n=function(){return nd(this,function(t){switch(t.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return t.sent(),this._transport.shutdown(),[2]}})},new(r||(r=Promise))(function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,u)}s((n=n.apply(t,e||[])).next())})},t}();function ny(t,e,r){var n,o;return n={transport:r,serializer:e,promiseHandler:new nf(t.concurrencyLimit)},o={timeout:t.timeoutMillis},new n_(n.transport,n.serializer,{handleResponse:function(t){null!=t&&Object.prototype.hasOwnProperty.call(t,"partialSuccess")&&null!=t.partialSuccess&&0!==Object.keys(t.partialSuccess).length&&tE.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}},n.promiseHandler,o.timeout)}var nv=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},nm=function(){return(nm=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ng=(T=function(t,e){return(T=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}T(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),nb=function(t){function e(e){return t.call(this,function(t,e,r,n){var o,i,a,u,s,c,l,f,p,h,d,_,y,v,m,g,b,E,T,O=!!t.headers||"function"!=typeof navigator.sendBeacon,w=(o={url:t.url,timeoutMillis:t.timeoutMillis,headers:function(t){if(null!=t)return function(){return t}}(t.headers),concurrencyLimit:t.concurrencyLimit},i={},a=nm(nm({},{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}),{headers:function(){return n},url:"http://localhost:4318/"+r,agentOptions:{keepAlive:!0}}),nm(nm({},{timeoutMillis:function(t){if(!Number.isNaN(t)&&Number.isFinite(t)&&t>0)return t;throw Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+t+"')")}(null!=(p=null!=(f=o.timeoutMillis)?f:i.timeoutMillis)?p:a.timeoutMillis),concurrencyLimit:null!=(d=null!=(h=o.concurrencyLimit)?h:i.concurrencyLimit)?d:a.concurrencyLimit,compression:null!=(y=null!=(_=o.compression)?_:i.compression)?y:a.compression}),{headers:(v=o.headers,m=function(){var t,e={};return Object.entries(null!=(t=null==v?void 0:v())?t:{}).forEach(function(t){var r=nv(t,2),n=r[0],o=r[1];void 0!==o?e[n]=String(o):tE.warn('Header "'+n+'" has invalid value ('+o+") and will be ignored")}),e},g=i.headers,b=a.headers,E=nm({},b()),T={},function(){return null!=g&&Object.assign(T,g()),null!=m&&Object.assign(T,m()),Object.assign(T,E)}),url:null!=(s=null!=(u=function(t){if(null!=t)try{return new URL(t),t}catch(e){throw Error("Configuration: Could not parse user-provided export URL: '"+t+"'")}}(o.url))?u:i.url)?s:a.url,agentOptions:null!=(l=null!=(c=o.agentOptions)?c:i.agentOptions)?l:a.agentOptions}));return O?ny(w,e,na({transport:new ns(w)})):ny(w,e,na({transport:new nc({url:w.url,blobType:w.headers()["Content-Type"]})}))}(null!=e?e:{},nn,"v1/metrics",{"Content-Type":"application/json"}),e)||this}return ng(e,t),e}(r1),nE=new WeakSet,nT=new WeakSet,nO=new WeakSet,nw=new WeakMap,nS=new WeakMap,nR=new WeakMap;function nL(t){let{serviceName:e,env:r,version:n,collectorUrl:o,samplingRate:i=1,token:a,shouldUseBeacon:u=!1}=t;this.collectorUrl=o,this.serviceName=e,this.shouldUseBeacon=u,this.environment=r,this.version=n,this.token=a,this.isEnabled=!this.isServerSide&&Math.random()<=i}function nA(){let{serviceName:t,environment:e,version:r}=this;return tM.default().merge(new tM({"service.name":t,version:r,env:e}))}function nM(){let{collectorUrl:t,shouldUseBeacon:e,token:r}=this,n={"Content-Type":"application/json"};return!e&&r&&(n.Authorization=`Bearer ${this.token}`),[new rX({exporter:new nb({url:e?`${t}/v1/metrics?key=${r}`:`${t}/v1/metrics`,concurrencyLimit:1,temporalityPreference:P.DELTA,headers:e?void 0:n}),exportIntervalMillis:3e4})]}let nx=new class{initialize(t){if((0,U._)(this,nE,nL).call(this,t),!this.isEnabled)return;this.isServerSide||(document.addEventListener("visibilitychange",(0,I._)(this,nw)),window.addEventListener("pagehide",(0,I._)(this,nS)),window.addEventListener("beforeunload",(0,I._)(this,nS)));let e=(0,U._)(this,nT,nA).call(this);this.metricReaders=(0,U._)(this,nO,nM).call(this);let r=new eK({resource:e,readers:this.metricReaders});tb.setGlobalMeterProvider(r)}counter(t){let{name:e,value:r,labels:n,unit:o,forceFlush:i}=t;this.isEnabled&&(tb.getMeter(e).createCounter(e,{unit:o}).add(r,{...n}),(0,I._)(this,nR).call(this,i))}gauge(t){let{name:e,value:r,labels:n,unit:o,forceFlush:i}=t;this.isEnabled&&(tb.getMeter(e).createObservableGauge(e,{unit:o}).addCallback(t=>{t.observe(r,{...n})}),(0,I._)(this,nR).call(this,i))}histogram(t){let{name:e,value:r,buckets:n,labels:o,unit:i,forceFlush:a}=t;this.isEnabled&&(tb.getMeter(e).createHistogram(e,{unit:i,advice:{explicitBucketBoundaries:n}}).record(r,{...o}),(0,I._)(this,nR).call(this,a))}constructor(){(0,k._)(this,nE),(0,k._)(this,nT),(0,k._)(this,nO),(0,B._)(this,"isServerSide","u"<typeof window),(0,B._)(this,"isEnabled","u"<typeof window),(0,B._)(this,"collectorUrl","unknown"),(0,B._)(this,"serviceName","unknown"),(0,B._)(this,"token",""),(0,B._)(this,"environment",void 0),(0,B._)(this,"version",void 0),(0,B._)(this,"shouldUseBeacon",!1),(0,B._)(this,"hasFlushed",!1),(0,B._)(this,"metricReaders",[]),(0,N._)(this,nw,{writable:!0,value:()=>{"hidden"===document.visibilityState?this.hasFlushed||(this.hasFlushed=!0,this.metricReaders.forEach(t=>t.forceFlush())):this.hasFlushed=!1}}),(0,N._)(this,nS,{writable:!0,value:()=>{this.hasFlushed=!0,this.metricReaders.forEach(t=>t.shutdown())}}),(0,N._)(this,nR,{writable:!0,value:t=>{t&&this.metricReaders.forEach(t=>t.forceFlush())}})}};t.s([],944568),t.s(["ClientMetrics",0,nx],712505)},951768,t=>{"use strict";t.i(944568);var e=t.i(712505),r=t.i(869390),n=t.i(807999);let o=t=>({...{env:window.location.host.includes("sandbox")||window.location.host.includes("localhost")?"sandbox":"production"},...t}),i={counter:(t,i,a,u)=>({increment:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;r.serverSide?(0,n.logMessage)(`Client side metric ${t} was used server-side`):e.ClientMetrics.counter({name:t,value:s,labels:o(i),unit:a,forceFlush:u})}}),gauge:(t,i,a,u)=>({set:s=>{r.serverSide?(0,n.logMessage)(`Client side metric ${t} was used server-side`):e.ClientMetrics.gauge({name:t,value:s,labels:o(i),unit:a,forceFlush:u})}}),histogram:function(t,a){let u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[.005,.01,.025,.05,.1,.25,.5,1,2,3,4,5,6,7,8,9,10,15,20],s=arguments.length>3?arguments[3]:void 0,c=arguments.length>4?arguments[4]:void 0;return{observe:i=>{r.serverSide?(0,n.logMessage)(`Client side metric ${t} was used server-side`):e.ClientMetrics.histogram({name:t,value:i,buckets:u,labels:o(a),unit:s,forceFlush:c})},startTimer:()=>{let e=performance.now();return()=>{if(r.serverSide)return(0,n.logMessage)(`Client side metric ${t} was used server-side`),0;let o=(performance.now()-e)/1e3;return i.histogram(t,a,u,s,c).observe(o),o}}}}};t.s(["clientSideMetrics",0,i],951768)}]);