文件操作 - instrumentation.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/@netlify/serverless-functions-api/dist/telemetry/instrumentation.js
编辑文件内容
import{createRequire}from"module";const require=createRequire(import.meta.url); var pY=Object.create;var uc=Object.defineProperty;var dY=Object.getOwnPropertyDescriptor;var fY=Object.getOwnPropertyNames;var AY=Object.getPrototypeOf,hY=Object.prototype.hasOwnProperty;var k=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+o+'" is not supported')});var S=(o,e)=>()=>(o&&(e=o(o=0)),e);var A=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),ge=(o,e)=>{for(var t in e)uc(o,t,{get:e[t],enumerable:!0})},TR=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of fY(e))!hY.call(o,a)&&a!==t&&uc(o,a,{get:()=>e[a],enumerable:!(i=dY(e,a))||i.enumerable});return o};var Rn=(o,e,t)=>(t=o!=null?pY(AY(o)):{},TR(e||!o||!o.__esModule?uc(t,"default",{value:o,enumerable:!0}):t,o)),$=o=>TR(uc({},"__esModule",{value:!0}),o);var SR,pR=S(()=>{SR=typeof globalThis=="object"?globalThis:global});var dR=S(()=>{pR()});var fR=S(()=>{dR()});var Zr,fS=S(()=>{Zr="1.9.0"});function vY(o){var e=new Set([o]),t=new Set,i=o.match(AR);if(!i)return function(){return!1};var a={major:+i[1],minor:+i[2],patch:+i[3],prerelease:i[4]};if(a.prerelease!=null)return function(l){return l===o};function s(r){return t.add(r),!1}function n(r){return e.add(r),!0}return function(l){if(e.has(l))return!0;if(t.has(l))return!1;var c=l.match(AR);if(!c)return s(l);var u={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return u.prerelease!=null||a.major!==u.major?s(l):a.major===0?a.minor===u.minor&&a.patch<=u.patch?n(l):s(l):a.minor<=u.minor?n(l):s(l)}}var AR,hR,vR=S(()=>{fS();AR=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;hR=vY(Zr)});function Or(o,e,t,i){var a;i===void 0&&(i=!1);var s=ss[as]=(a=ss[as])!==null&&a!==void 0?a:{version:Zr};if(!i&&s[o]){var n=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+o);return t.error(n.stack||n.message),!1}if(s.version!==Zr){var n=new Error("@opentelemetry/api: Registration of version v"+s.version+" for "+o+" does not match previously registered API v"+Zr);return t.error(n.stack||n.message),!1}return s[o]=e,t.debug("@opentelemetry/api: Registered a global for "+o+" v"+Zr+"."),!0}function yt(o){var e,t,i=(e=ss[as])===null||e===void 0?void 0:e.version;if(!(!i||!hR(i)))return(t=ss[as])===null||t===void 0?void 0:t[o]}function Nr(o,e){e.debug("@opentelemetry/api: Unregistering a global for "+o+" v"+Zr+".");var t=ss[as];t&&delete t[o]}var RY,as,ss,ho=S(()=>{fR();fS();vR();RY=Zr.split(".")[0],as=Symbol.for("opentelemetry.js.api."+RY),ss=SR});function ls(o,e,t){var i=yt("diag");if(i)return t.unshift(e),i[o].apply(i,OY([],mY(t),!1))}var mY,OY,RR,mR=S(()=>{ho();mY=function(o,e){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var i=t.call(o),a,s=[],n;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){n={error:r}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}return s},OY=function(o,e,t){if(t||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return o.concat(s||Array.prototype.slice.call(e))},RR=function(){function o(e){this._namespace=e.namespace||"DiagComponentLogger"}return o.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ls("debug",this._namespace,e)},o.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ls("error",this._namespace,e)},o.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ls("info",this._namespace,e)},o.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ls("warn",this._namespace,e)},o.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ls("verbose",this._namespace,e)},o}()});var Oe,Ec=S(()=>{(function(o){o[o.NONE=0]="NONE",o[o.ERROR=30]="ERROR",o[o.WARN=50]="WARN",o[o.INFO=60]="INFO",o[o.DEBUG=70]="DEBUG",o[o.VERBOSE=80]="VERBOSE",o[o.ALL=9999]="ALL"})(Oe||(Oe={}))});function OR(o,e){o<Oe.NONE?o=Oe.NONE:o>Oe.ALL&&(o=Oe.ALL),e=e||{};function t(i,a){var s=e[i];return typeof s=="function"&&o>=a?s.bind(e):function(){}}return{error:t("error",Oe.ERROR),warn:t("warn",Oe.WARN),info:t("info",Oe.INFO),debug:t("debug",Oe.DEBUG),verbose:t("verbose",Oe.VERBOSE)}}var NR=S(()=>{Ec()});var NY,MY,PY,st,vo=S(()=>{mR();NR();Ec();ho();NY=function(o,e){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var i=t.call(o),a,s=[],n;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){n={error:r}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}return s},MY=function(o,e,t){if(t||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return o.concat(s||Array.prototype.slice.call(e))},PY="diag",st=function(){function o(){function e(a){return function(){for(var s=[],n=0;n<arguments.length;n++)s[n]=arguments[n];var r=yt("diag");if(r)return r[a].apply(r,MY([],NY(s),!1))}}var t=this,i=function(a,s){var n,r,l;if(s===void 0&&(s={logLevel:Oe.INFO}),a===t){var c=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return t.error((n=c.stack)!==null&&n!==void 0?n:c.message),!1}typeof s=="number"&&(s={logLevel:s});var u=yt("diag"),E=OR((r=s.logLevel)!==null&&r!==void 0?r:Oe.INFO,a);if(u&&!s.suppressOverrideMessage){var d=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";u.warn("Current logger will be overwritten from "+d),E.warn("Current logger will overwrite one already registered from "+d)}return Or("diag",E,t,!0)};t.setLogger=i,t.disable=function(){Nr(PY,t)},t.createComponentLogger=function(a){return new RR(a)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return o.instance=function(){return this._instance||(this._instance=new o),this._instance},o}()});var CY,gY,MR,PR=S(()=>{CY=function(o,e){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var i=t.call(o),a,s=[],n;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){n={error:r}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}return s},gY=function(o){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&o[e],i=0;if(t)return t.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&i>=o.length&&(o=void 0),{value:o&&o[i++],done:!o}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},MR=function(){function o(e){this._entries=e?new Map(e):new Map}return o.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},o.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var t=CY(e,2),i=t[0],a=t[1];return[i,a]})},o.prototype.setEntry=function(e,t){var i=new o(this._entries);return i._entries.set(e,t),i},o.prototype.removeEntry=function(e){var t=new o(this._entries);return t._entries.delete(e),t},o.prototype.removeEntries=function(){for(var e,t,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=new o(this._entries);try{for(var n=gY(i),r=n.next();!r.done;r=n.next()){var l=r.value;s._entries.delete(l)}}catch(c){e={error:c}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return s},o.prototype.clear=function(){return new o},o}()});var CR,gR=S(()=>{CR=Symbol("BaggageEntryMetadata")});function LR(o){return o===void 0&&(o={}),new MR(new Map(Object.entries(o)))}function _c(o){return typeof o!="string"&&(LY.error("Cannot create baggage metadata from unknown type: "+typeof o),o=""),{__TYPE__:CR,toString:function(){return o}}}var LY,AS=S(()=>{vo();PR();gR();LY=st.instance()});function Yt(o){return Symbol.for(o)}var IY,Tc,cs=S(()=>{IY=function(){function o(e){var t=this;t._currentContext=e?new Map(e):new Map,t.getValue=function(i){return t._currentContext.get(i)},t.setValue=function(i,a){var s=new o(t._currentContext);return s._currentContext.set(i,a),s},t.deleteValue=function(i){var a=new o(t._currentContext);return a._currentContext.delete(i),a}}return o}(),Tc=new IY});var hS,Sc,IR=S(()=>{hS=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],Sc=function(){function o(){function e(i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];if(console){var n=console[i];if(typeof n!="function"&&(n=console.log),typeof n=="function")return n.apply(console,a)}}}for(var t=0;t<hS.length;t++)this[hS[t].n]=e(hS[t].c)}return o}()});function dc(){return RS}var Ro,yY,pc,DY,xY,UY,bY,vS,VY,wY,BY,RS,GY,kY,HY,YY,FY,KY,qY,mS=S(()=>{Ro=function(){var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(i[s]=a[s])},o(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),yY=function(){function o(){}return o.prototype.createGauge=function(e,t){return kY},o.prototype.createHistogram=function(e,t){return HY},o.prototype.createCounter=function(e,t){return GY},o.prototype.createUpDownCounter=function(e,t){return YY},o.prototype.createObservableGauge=function(e,t){return KY},o.prototype.createObservableCounter=function(e,t){return FY},o.prototype.createObservableUpDownCounter=function(e,t){return qY},o.prototype.addBatchObservableCallback=function(e,t){},o.prototype.removeBatchObservableCallback=function(e){},o}(),pc=function(){function o(){}return o}(),DY=function(o){Ro(e,o);function e(){return o!==null&&o.apply(this,arguments)||this}return e.prototype.add=function(t,i){},e}(pc),xY=function(o){Ro(e,o);function e(){return o!==null&&o.apply(this,arguments)||this}return e.prototype.add=function(t,i){},e}(pc),UY=function(o){Ro(e,o);function e(){return o!==null&&o.apply(this,arguments)||this}return e.prototype.record=function(t,i){},e}(pc),bY=function(o){Ro(e,o);function e(){return o!==null&&o.apply(this,arguments)||this}return e.prototype.record=function(t,i){},e}(pc),vS=function(){function o(){}return o.prototype.addCallback=function(e){},o.prototype.removeCallback=function(e){},o}(),VY=function(o){Ro(e,o);function e(){return o!==null&&o.apply(this,arguments)||this}return e}(vS),wY=function(o){Ro(e,o);function e(){return o!==null&&o.apply(this,arguments)||this}return e}(vS),BY=function(o){Ro(e,o);function e(){return o!==null&&o.apply(this,arguments)||this}return e}(vS),RS=new yY,GY=new DY,kY=new UY,HY=new bY,YY=new xY,FY=new VY,KY=new wY,qY=new BY});var Rt,yR=S(()=>{(function(o){o[o.INT=0]="INT",o[o.DOUBLE=1]="DOUBLE"})(Rt||(Rt={}))});var fc,Ac,OS=S(()=>{fc={get:function(o,e){if(o!=null)return o[e]},keys:function(o){return o==null?[]:Object.keys(o)}},Ac={set:function(o,e,t){o!=null&&(o[e]=t)}}});var WY,jY,DR,xR=S(()=>{cs();WY=function(o,e){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var i=t.call(o),a,s=[],n;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){n={error:r}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}return s},jY=function(o,e,t){if(t||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return o.concat(s||Array.prototype.slice.call(e))},DR=function(){function o(){}return o.prototype.active=function(){return Tc},o.prototype.with=function(e,t,i){for(var a=[],s=3;s<arguments.length;s++)a[s-3]=arguments[s];return t.call.apply(t,jY([i],WY(a),!1))},o.prototype.bind=function(e,t){return t},o.prototype.enable=function(){return this},o.prototype.disable=function(){return this},o}()});var zY,XY,NS,$Y,mn,us=S(()=>{xR();ho();vo();zY=function(o,e){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var i=t.call(o),a,s=[],n;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){n={error:r}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}return s},XY=function(o,e,t){if(t||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return o.concat(s||Array.prototype.slice.call(e))},NS="context",$Y=new DR,mn=function(){function o(){}return o.getInstance=function(){return this._instance||(this._instance=new o),this._instance},o.prototype.setGlobalContextManager=function(e){return Or(NS,e,st.instance())},o.prototype.active=function(){return this._getContextManager().active()},o.prototype.with=function(e,t,i){for(var a,s=[],n=3;n<arguments.length;n++)s[n-3]=arguments[n];return(a=this._getContextManager()).with.apply(a,XY([e,t,i],zY(s),!1))},o.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},o.prototype._getContextManager=function(){return yt(NS)||$Y},o.prototype.disable=function(){this._getContextManager().disable(),Nr(NS,st.instance())},o}()});var pe,MS=S(()=>{(function(o){o[o.NONE=0]="NONE",o[o.SAMPLED=1]="SAMPLED"})(pe||(pe={}))});var Es,_s,ii,hc=S(()=>{MS();Es="0000000000000000",_s="00000000000000000000000000000000",ii={traceId:_s,spanId:Es,traceFlags:pe.NONE}});var On,vc=S(()=>{hc();On=function(){function o(e){e===void 0&&(e=ii),this._spanContext=e}return o.prototype.spanContext=function(){return this._spanContext},o.prototype.setAttribute=function(e,t){return this},o.prototype.setAttributes=function(e){return this},o.prototype.addEvent=function(e,t){return this},o.prototype.addLink=function(e){return this},o.prototype.addLinks=function(e){return this},o.prototype.setStatus=function(e){return this},o.prototype.updateName=function(e){return this},o.prototype.end=function(e){},o.prototype.isRecording=function(){return!1},o.prototype.recordException=function(e,t){},o}()});function Rc(o){return o.getValue(PS)||void 0}function UR(){return Rc(mn.getInstance().active())}function Ts(o,e){return o.setValue(PS,e)}function bR(o){return o.deleteValue(PS)}function VR(o,e){return Ts(o,new On(e))}function mc(o){var e;return(e=Rc(o))===null||e===void 0?void 0:e.spanContext()}var PS,CS=S(()=>{cs();vc();us();PS=Yt("OpenTelemetry Context Key SPAN")});function Er(o){return JY.test(o)&&o!==_s}function mo(o){return QY.test(o)&&o!==Es}function qe(o){return Er(o.traceId)&&mo(o.spanId)}function wR(o){return new On(o)}var JY,QY,Oc=S(()=>{hc();vc();JY=/^([0-9a-f]{32})$/i,QY=/^[0-9a-f]{16}$/i});function ZY(o){return typeof o=="object"&&typeof o.spanId=="string"&&typeof o.traceId=="string"&&typeof o.traceFlags=="number"}var gS,Nc,LS=S(()=>{us();CS();vc();Oc();gS=mn.getInstance(),Nc=function(){function o(){}return o.prototype.startSpan=function(e,t,i){i===void 0&&(i=gS.active());var a=!!(t!=null&&t.root);if(a)return new On;var s=i&&mc(i);return ZY(s)&&qe(s)?new On(s):new On},o.prototype.startActiveSpan=function(e,t,i,a){var s,n,r;if(!(arguments.length<2)){arguments.length===2?r=t:arguments.length===3?(s=t,r=i):(s=t,n=i,r=a);var l=n??gS.active(),c=this.startSpan(e,s,l),u=Ts(l,c);return gS.with(u,r,void 0,c)}},o}()});var eF,Mc,IS=S(()=>{LS();eF=new Nc,Mc=function(){function o(e,t,i,a){this._provider=e,this.name=t,this.version=i,this.options=a}return o.prototype.startSpan=function(e,t,i){return this._getTracer().startSpan(e,t,i)},o.prototype.startActiveSpan=function(e,t,i,a){var s=this._getTracer();return Reflect.apply(s.startActiveSpan,s,arguments)},o.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):eF},o}()});var BR,GR=S(()=>{LS();BR=function(){function o(){}return o.prototype.getTracer=function(e,t,i){return new Nc},o}()});var tF,Ss,yS=S(()=>{IS();GR();tF=new BR,Ss=function(){function o(){}return o.prototype.getTracer=function(e,t,i){var a;return(a=this.getDelegateTracer(e,t,i))!==null&&a!==void 0?a:new Mc(this,e,t,i)},o.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:tF},o.prototype.setDelegate=function(e){this._delegate=e},o.prototype.getDelegateTracer=function(e,t,i){var a;return(a=this._delegate)===null||a===void 0?void 0:a.getTracer(e,t,i)},o}()});var mt,kR=S(()=>{(function(o){o[o.NOT_RECORD=0]="NOT_RECORD",o[o.RECORD=1]="RECORD",o[o.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(mt||(mt={}))});var Ft,HR=S(()=>{(function(o){o[o.INTERNAL=0]="INTERNAL",o[o.SERVER=1]="SERVER",o[o.CLIENT=2]="CLIENT",o[o.PRODUCER=3]="PRODUCER",o[o.CONSUMER=4]="CONSUMER"})(Ft||(Ft={}))});var Mr,YR=S(()=>{(function(o){o[o.UNSET=0]="UNSET",o[o.OK=1]="OK",o[o.ERROR=2]="ERROR"})(Mr||(Mr={}))});function FR(o){return oF.test(o)}function KR(o){return iF.test(o)&&!aF.test(o)}var DS,rF,nF,oF,iF,aF,qR=S(()=>{DS="[_0-9a-z-*/]",rF="[a-z]"+DS+"{0,255}",nF="[a-z0-9]"+DS+"{0,240}@[a-z]"+DS+"{0,13}",oF=new RegExp("^(?:"+rF+"|"+nF+")$"),iF=/^[ -~]{0,255}[!-~]$/,aF=/,|=/});var WR,sF,jR,zR,XR,$R=S(()=>{qR();WR=32,sF=512,jR=",",zR="=",XR=function(){function o(e){this._internalState=new Map,e&&this._parse(e)}return o.prototype.set=function(e,t){var i=this._clone();return i._internalState.has(e)&&i._internalState.delete(e),i._internalState.set(e,t),i},o.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},o.prototype.get=function(e){return this._internalState.get(e)},o.prototype.serialize=function(){var e=this;return this._keys().reduce(function(t,i){return t.push(i+zR+e.get(i)),t},[]).join(jR)},o.prototype._parse=function(e){e.length>sF||(this._internalState=e.split(jR).reverse().reduce(function(t,i){var a=i.trim(),s=a.indexOf(zR);if(s!==-1){var n=a.slice(0,s),r=a.slice(s+1,i.length);FR(n)&&KR(r)&&t.set(n,r)}return t},new Map),this._internalState.size>WR&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,WR))))},o.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},o.prototype._clone=function(){var e=new o;return e._internalState=new Map(this._internalState),e},o}()});function JR(o){return new XR(o)}var QR=S(()=>{$R()});var Ye,ZR=S(()=>{us();Ye=mn.getInstance()});var m,em=S(()=>{vo();m=st.instance()});var lF,tm,rm=S(()=>{mS();lF=function(){function o(){}return o.prototype.getMeter=function(e,t,i){return RS},o}(),tm=new lF});var xS,nm,om=S(()=>{rm();ho();vo();xS="metrics",nm=function(){function o(){}return o.getInstance=function(){return this._instance||(this._instance=new o),this._instance},o.prototype.setGlobalMeterProvider=function(e){return Or(xS,e,st.instance())},o.prototype.getMeterProvider=function(){return yt(xS)||tm},o.prototype.getMeter=function(e,t,i){return this.getMeterProvider().getMeter(e,t,i)},o.prototype.disable=function(){Nr(xS,st.instance())},o}()});var Oo,im=S(()=>{om();Oo=nm.getInstance()});var am,sm=S(()=>{am=function(){function o(){}return o.prototype.inject=function(e,t){},o.prototype.extract=function(e,t){return e},o.prototype.fields=function(){return[]},o}()});function bS(o){return o.getValue(US)||void 0}function lm(){return bS(mn.getInstance().active())}function cm(o,e){return o.setValue(US,e)}function um(o){return o.deleteValue(US)}var US,Em=S(()=>{us();cs();US=Yt("OpenTelemetry Baggage Key")});var VS,cF,_m,Tm=S(()=>{ho();sm();OS();Em();AS();vo();VS="propagation",cF=new am,_m=function(){function o(){this.createBaggage=LR,this.getBaggage=bS,this.getActiveBaggage=lm,this.setBaggage=cm,this.deleteBaggage=um}return o.getInstance=function(){return this._instance||(this._instance=new o),this._instance},o.prototype.setGlobalPropagator=function(e){return Or(VS,e,st.instance())},o.prototype.inject=function(e,t,i){return i===void 0&&(i=Ac),this._getGlobalPropagator().inject(e,t,i)},o.prototype.extract=function(e,t,i){return i===void 0&&(i=fc),this._getGlobalPropagator().extract(e,t,i)},o.prototype.fields=function(){return this._getGlobalPropagator().fields()},o.prototype.disable=function(){Nr(VS,st.instance())},o.prototype._getGlobalPropagator=function(){return yt(VS)||cF},o}()});var Ot,Sm=S(()=>{Tm();Ot=_m.getInstance()});var wS,pm,dm=S(()=>{ho();yS();Oc();CS();vo();wS="trace",pm=function(){function o(){this._proxyTracerProvider=new Ss,this.wrapSpanContext=wR,this.isSpanContextValid=qe,this.deleteSpan=bR,this.getSpan=Rc,this.getActiveSpan=UR,this.getSpanContext=mc,this.setSpan=Ts,this.setSpanContext=VR}return o.getInstance=function(){return this._instance||(this._instance=new o),this._instance},o.prototype.setGlobalTracerProvider=function(e){var t=Or(wS,this._proxyTracerProvider,st.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},o.prototype.getTracerProvider=function(){return yt(wS)||this._proxyTracerProvider},o.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},o.prototype.disable=function(){Nr(wS,st.instance()),this._proxyTracerProvider=new Ss},o}()});var _e,fm=S(()=>{dm();_e=pm.getInstance()});var Ze={};ge(Ze,{DiagConsoleLogger:()=>Sc,DiagLogLevel:()=>Oe,INVALID_SPANID:()=>Es,INVALID_SPAN_CONTEXT:()=>ii,INVALID_TRACEID:()=>_s,ProxyTracer:()=>Mc,ProxyTracerProvider:()=>Ss,ROOT_CONTEXT:()=>Tc,SamplingDecision:()=>mt,SpanKind:()=>Ft,SpanStatusCode:()=>Mr,TraceFlags:()=>pe,ValueType:()=>Rt,baggageEntryMetadataFromString:()=>_c,context:()=>Ye,createContextKey:()=>Yt,createNoopMeter:()=>dc,createTraceState:()=>JR,default:()=>uF,defaultTextMapGetter:()=>fc,defaultTextMapSetter:()=>Ac,diag:()=>m,isSpanContextValid:()=>qe,isValidSpanId:()=>mo,isValidTraceId:()=>Er,metrics:()=>Oo,propagation:()=>Ot,trace:()=>_e});var uF,x=S(()=>{AS();cs();IR();Ec();mS();yR();OS();IS();yS();kR();HR();YR();MS();QR();Oc();hc();ZR();em();im();Sm();fm();uF={context:Ye,diag:m,metrics:Oo,propagation:Ot,trace:_e}});var Am=S(()=>{});var hm=S(()=>{Am()});var EF,_F,TF,SF,pF,dF,fF,AF,hF,vF,RF,mF,OF,NF,MF,PF,CF,gF,LF,vm,Rm,mm,Om,Nm,Mm,Pm,Cm,gm,Lm,Im,Pc,ps,Cc,gc,ym,BS,GS,kS,Dm=S(()=>{EF="host.id",_F="host.name",TF="host.arch",SF="os.type",pF="os.version",dF="process.pid",fF="process.executable.name",AF="process.executable.path",hF="process.command",vF="process.command_args",RF="process.owner",mF="process.runtime.name",OF="process.runtime.version",NF="process.runtime.description",MF="service.name",PF="service.instance.id",CF="telemetry.sdk.name",gF="telemetry.sdk.language",LF="telemetry.sdk.version",vm=EF,Rm=_F,mm=TF,Om=SF,Nm=pF,Mm=dF,Pm=fF,Cm=AF,gm=hF,Lm=vF,Im=RF,Pc=mF,ps=OF,Cc=NF,gc=MF,ym=PF,BS=CF,GS=gF,kS=LF});var xm=S(()=>{Dm()});var Um=S(()=>{});var bm=S(()=>{});var Nn=S(()=>{hm();xm();Um();bm()});function ai(o){return o.setValue(HS,!0)}function Vm(o){return o.deleteValue(HS)}function lt(o){return o.getValue(HS)===!0}var HS,ds=S(()=>{x();HS=Yt("OpenTelemetry SDK Context Key SUPPRESS_TRACING")});var wm,Lc,si,Ic,YS=S(()=>{wm="=",Lc=";",si=",",Ic="baggage"});function yc(o){return o.reduce((e,t)=>{let i=`${e}${e!==""?si:""}${t}`;return i.length>8192?e:i},"")}function Dc(o){return o.getAllEntries().map(([e,t])=>{let i=`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`;return t.metadata!==void 0&&(i+=Lc+t.metadata.toString()),i})}function fs(o){let e=o.split(Lc);if(e.length<=0)return;let t=e.shift();if(!t)return;let i=t.indexOf(wm);if(i<=0)return;let a=decodeURIComponent(t.substring(0,i).trim()),s=decodeURIComponent(t.substring(i+1).trim()),n;return e.length>0&&(n=_c(e.join(Lc))),{key:a,value:s,metadata:n}}function Bm(o){return typeof o!="string"||o.length===0?{}:o.split(si).map(e=>fs(e)).filter(e=>e!==void 0&&e.value.length>0).reduce((e,t)=>(e[t.key]=t.value,e),{})}var FS=S(()=>{x();YS()});var li,Gm=S(()=>{x();ds();YS();FS();li=class{inject(e,t,i){let a=Ot.getBaggage(e);if(!a||lt(e))return;let s=Dc(a).filter(r=>r.length<=4096).slice(0,180),n=yc(s);n.length>0&&i.set(t,Ic,n)}extract(e,t,i){let a=i.get(t,Ic),s=Array.isArray(a)?a.join(si):a;if(!s)return e;let n={};return s.length===0||(s.split(si).forEach(l=>{let c=fs(l);if(c){let u={value:c.value};c.metadata&&(u.metadata=c.metadata),n[c.key]=u}}),Object.entries(n).length===0)?e:Ot.setBaggage(e,Ot.createBaggage(n))}fields(){return[Ic]}}});var xc,km=S(()=>{xc=class{constructor(e,t){this._monotonicClock=t,this._epochMillis=e.now(),this._performanceMillis=t.now()}now(){let e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e}}});function Mn(o){let e={};if(typeof o!="object"||o==null)return e;for(let[t,i]of Object.entries(o)){if(!KS(t)){m.warn(`Invalid attribute key: ${t}`);continue}if(!Pn(i)){m.warn(`Invalid attribute value set for key: ${t}`);continue}Array.isArray(i)?e[t]=i.slice():e[t]=i}return e}function KS(o){return typeof o=="string"&&o.length>0}function Pn(o){return o==null?!0:Array.isArray(o)?xF(o):Hm(o)}function xF(o){let e;for(let t of o)if(t!=null){if(!e){if(Hm(t)){e=typeof t;continue}return!1}if(typeof t!==e)return!1}return!0}function Hm(o){switch(typeof o){case"number":case"boolean":case"string":return!0}return!1}var Ym=S(()=>{x()});function Uc(){return o=>{m.error(UF(o))}}function UF(o){return typeof o=="string"?o:JSON.stringify(bF(o))}function bF(o){let e={},t=o;for(;t!==null;)Object.getOwnPropertyNames(t).forEach(i=>{if(e[i])return;let a=t[i];a&&(e[i]=String(a))}),t=Object.getPrototypeOf(t);return e}var qS=S(()=>{x()});function Km(o){Fm=o}function Me(o){try{Fm(o)}catch{}}var Fm,WS=S(()=>{qS();Fm=Uc()});var Nt,jS=S(()=>{(function(o){o.AlwaysOff="always_off",o.AlwaysOn="always_on",o.ParentBasedAlwaysOff="parentbased_always_off",o.ParentBasedAlwaysOn="parentbased_always_on",o.ParentBasedTraceIdRatio="parentbased_traceidratio",o.TraceIdRatio="traceidratio"})(Nt||(Nt={}))});function BF(o){return wF.indexOf(o)>-1}function kF(o){return GF.indexOf(o)>-1}function YF(o){return HF.indexOf(o)>-1}function FF(o,e,t){if(typeof t[o]>"u")return;let i=String(t[o]);e[o]=i.toLowerCase()==="true"}function KF(o,e,t,i=-1/0,a=1/0){if(typeof t[o]<"u"){let s=Number(t[o]);isNaN(s)||(s<i?e[o]=i:s>a?e[o]=a:e[o]=s)}}function qF(o,e,t,i=VF){let a=t[o];typeof a=="string"&&(e[o]=a.split(i).map(s=>s.trim()))}function jF(o,e,t){let i=t[o];if(typeof i=="string"){let a=WF[i.toUpperCase()];a!=null&&(e[o]=a)}}function hs(o){let e={};for(let t in As){let i=t;switch(i){case"OTEL_LOG_LEVEL":jF(i,e,o);break;default:if(BF(i))FF(i,e,o);else if(kF(i))KF(i,e,o);else if(YF(i))qF(i,e,o);else{let a=o[i];typeof a<"u"&&a!==null&&(e[i]=String(a))}}}return e}var VF,wF,GF,HF,en,tn,zS,XS,As,WF,$S=S(()=>{x();jS();VF=",",wF=["OTEL_SDK_DISABLED"];GF=["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"];HF=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];en=1/0,tn=128,zS=128,XS=128,As={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:Oe.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:en,OTEL_ATTRIBUTE_COUNT_LIMIT:tn,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:en,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:tn,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:en,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:tn,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:zS,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:XS,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Nt.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"};WF={ALL:Oe.ALL,VERBOSE:Oe.VERBOSE,DEBUG:Oe.DEBUG,INFO:Oe.INFO,WARN:Oe.WARN,ERROR:Oe.ERROR,NONE:Oe.NONE}});function Z(){let o=hs(process.env);return Object.assign({},As,o)}function Cn(){return hs(process.env)}var qm=S(()=>{$S()});var bc,Wm=S(()=>{bc=typeof globalThis=="object"?globalThis:global});function jm(o){return o>=48&&o<=57?o-48:o>=97&&o<=102?o-87:o-55}function gn(o){let e=new Uint8Array(o.length/2),t=0;for(let i=0;i<o.length;i+=2){let a=jm(o.charCodeAt(i)),s=jm(o.charCodeAt(i+1));e[t++]=a<<4|s}return e}var JS=S(()=>{});function Vc(o){return Buffer.from(gn(o)).toString("base64")}var zm=S(()=>{JS()});function Xm(o){return function(){for(let t=0;t<o/4;t++)wc.writeUInt32BE(Math.random()*2**32>>>0,t*4);for(let t=0;t<o&&!(wc[t]>0);t++)t===o-1&&(wc[o-1]=1);return wc.toString("hex",0,o)}}var ci,wc,$m=S(()=>{ci=class{constructor(){this.generateTraceId=Xm(16),this.generateSpanId=Xm(8)}},wc=Buffer.allocUnsafe(16)});import{performance as zF}from"perf_hooks";var Kt,Jm=S(()=>{Kt=zF});var Bc,QS=S(()=>{Bc="1.26.0"});var Qm=S(()=>{});var Zm=S(()=>{Qm()});var XF,$F,JF,QF,eO,tO,rO,nO,ZF,oO,iO=S(()=>{XF="process.runtime.name",$F="telemetry.sdk.name",JF="telemetry.sdk.language",QF="telemetry.sdk.version",eO=XF,tO=$F,rO=JF,nO=QF,ZF="nodejs",oO=ZF});var aO=S(()=>{iO()});var sO=S(()=>{});var lO=S(()=>{});var cO=S(()=>{Zm();aO();sO();lO()});var Ln,uO=S(()=>{QS();cO();Ln={[tO]:"opentelemetry",[eO]:"node",[rO]:oO,[nO]:Bc}});function Pr(o){o.unref()}var EO=S(()=>{});var _O=S(()=>{qm();Wm();zm();$m();Jm();uO();EO()});var ZS=S(()=>{_O()});function et(o){let e=o/1e3,t=Math.trunc(e),i=Math.round(o%1e3*t2);return[t,i]}function ui(){let o=Kt.timeOrigin;if(typeof o!="number"){let e=Kt;o=e.timing&&e.timing.fetchStart}return o}function vs(o){let e=et(ui()),t=et(typeof o=="number"?o:Kt.now());return Os(e,t)}function Rs(o){if(Ei(o))return o;if(typeof o=="number")return o<ui()?vs(o):et(o);if(o instanceof Date)return et(o.getTime());throw TypeError("Invalid input type")}function kc(o,e){let t=e[0]-o[0],i=e[1]-o[1];return i<0&&(t-=1,i+=Gc),[t,i]}function SO(o){let e=TO,t=`${"0".repeat(e)}${o[1]}Z`,i=t.substr(t.length-e-1);return new Date(o[0]*1e3).toISOString().replace("000Z",i)}function Hc(o){return o[0]*Gc+o[1]}function pO(o){return o[0]*1e3+o[1]/1e6}function ct(o){return o[0]*1e6+o[1]/1e3}function Ei(o){return Array.isArray(o)&&o.length===2&&typeof o[0]=="number"&&typeof o[1]=="number"}function ms(o){return Ei(o)||typeof o=="number"||o instanceof Date}function Os(o,e){let t=[o[0]+e[0],o[1]+e[1]];return t[1]>=Gc&&(t[1]-=Gc,t[0]+=1),t}var TO,e2,t2,Gc,dO=S(()=>{ZS();TO=9,e2=6,t2=Math.pow(10,e2),Gc=Math.pow(10,TO)});var te,fO=S(()=>{(function(o){o[o.SUCCESS=0]="SUCCESS",o[o.FAILED=1]="FAILED"})(te||(te={}))});var _i,AO=S(()=>{x();_i=class{constructor(e={}){var t;this._propagators=(t=e.propagators)!==null&&t!==void 0?t:[],this._fields=Array.from(new Set(this._propagators.map(i=>typeof i.fields=="function"?i.fields():[]).reduce((i,a)=>i.concat(a),[])))}inject(e,t,i){for(let a of this._propagators)try{a.inject(e,t,i)}catch(s){m.warn(`Failed to inject with ${a.constructor.name}. Err: ${s.message}`)}}extract(e,t,i){return this._propagators.reduce((a,s)=>{try{return s.extract(a,t,i)}catch(n){m.warn(`Failed to inject with ${s.constructor.name}. Err: ${n.message}`)}return a},e)}fields(){return this._fields.slice()}}});function hO(o){return o2.test(o)}function vO(o){return i2.test(o)&&!a2.test(o)}var ep,r2,n2,o2,i2,a2,RO=S(()=>{ep="[_0-9a-z-*/]",r2=`[a-z]${ep}{0,255}`,n2=`[a-z0-9]${ep}{0,240}@[a-z]${ep}{0,13}`,o2=new RegExp(`^(?:${r2}|${n2})$`),i2=/^[ -~]{0,255}[!-~]$/,a2=/,|=/});var mO,s2,OO,NO,Ti,tp=S(()=>{RO();mO=32,s2=512,OO=",",NO="=",Ti=class o{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let i=this._clone();return i._internalState.has(e)&&i._internalState.delete(e),i._internalState.set(e,t),i}unset(e){let t=this._clone();return t._internalState.delete(e),t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,t)=>(e.push(t+NO+this.get(t)),e),[]).join(OO)}_parse(e){e.length>s2||(this._internalState=e.split(OO).reverse().reduce((t,i)=>{let a=i.trim(),s=a.indexOf(NO);if(s!==-1){let n=a.slice(0,s),r=a.slice(s+1,i.length);hO(n)&&vO(r)&&t.set(n,r)}return t},new Map),this._internalState.size>mO&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,mO))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new o;return e._internalState=new Map(this._internalState),e}}});function rp(o){let e=T2.exec(o);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var Ns,Ms,l2,c2,u2,E2,_2,T2,Si,MO=S(()=>{x();ds();tp();Ns="traceparent",Ms="tracestate",l2="00",c2="(?!ff)[\\da-f]{2}",u2="(?![0]{32})[\\da-f]{32}",E2="(?![0]{16})[\\da-f]{16}",_2="[\\da-f]{2}",T2=new RegExp(`^\\s?(${c2})-(${u2})-(${E2})-(${_2})(-.*)?\\s?$`);Si=class{inject(e,t,i){let a=_e.getSpanContext(e);if(!a||lt(e)||!qe(a))return;let s=`${l2}-${a.traceId}-${a.spanId}-0${Number(a.traceFlags||pe.NONE).toString(16)}`;i.set(t,Ns,s),a.traceState&&i.set(t,Ms,a.traceState.serialize())}extract(e,t,i){let a=i.get(t,Ns);if(!a)return e;let s=Array.isArray(a)?a[0]:a;if(typeof s!="string")return e;let n=rp(s);if(!n)return e;n.isRemote=!0;let r=i.get(t,Ms);if(r){let l=Array.isArray(r)?r.join(","):r;n.traceState=new Ti(typeof l=="string"?l:void 0)}return _e.setSpanContext(e,n)}fields(){return[Ns,Ms]}}});function PO(o,e){return o.setValue(np,e)}function CO(o){return o.deleteValue(np)}function gO(o){return o.getValue(np)}var np,Yc,LO=S(()=>{x();np=Yt("OpenTelemetry SDK Context Key RPC_METADATA");(function(o){o.HTTP="http"})(Yc||(Yc={}))});var No,op=S(()=>{x();No=class{shouldSample(){return{decision:mt.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}});var In,ip=S(()=>{x();In=class{shouldSample(){return{decision:mt.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}});var Fc,IO=S(()=>{x();WS();op();ip();Fc=class{constructor(e){var t,i,a,s;this._root=e.root,this._root||(Me(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new In),this._remoteParentSampled=(t=e.remoteParentSampled)!==null&&t!==void 0?t:new In,this._remoteParentNotSampled=(i=e.remoteParentNotSampled)!==null&&i!==void 0?i:new No,this._localParentSampled=(a=e.localParentSampled)!==null&&a!==void 0?a:new In,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new No}shouldSample(e,t,i,a,s,n){let r=_e.getSpanContext(e);return!r||!qe(r)?this._root.shouldSample(e,t,i,a,s,n):r.isRemote?r.traceFlags&pe.SAMPLED?this._remoteParentSampled.shouldSample(e,t,i,a,s,n):this._remoteParentNotSampled.shouldSample(e,t,i,a,s,n):r.traceFlags&pe.SAMPLED?this._localParentSampled.shouldSample(e,t,i,a,s,n):this._localParentNotSampled.shouldSample(e,t,i,a,s,n)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}});var Kc,yO=S(()=>{x();Kc=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:Er(t)&&this._accumulate(t)<this._upperBound?mt.RECORD_AND_SAMPLED:mt.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let i=0;i<e.length/8;i++){let a=i*8,s=parseInt(e.slice(a,a+8),16);t=(t^s)>>>0}return t}}});function v2(o,e){return function(t){return o(e(t))}}function ap(o){if(!R2(o)||m2(o)!==S2)return!1;let e=h2(o);if(e===null)return!0;let t=UO.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&DO.call(t)===A2}function R2(o){return o!=null&&typeof o=="object"}function m2(o){return o==null?o===void 0?d2:p2:Mo&&Mo in Object(o)?O2(o):N2(o)}function O2(o){let e=UO.call(o,Mo),t=o[Mo],i=!1;try{o[Mo]=void 0,i=!0}catch{}let a=bO.call(o);return i&&(e?o[Mo]=t:delete o[Mo]),a}function N2(o){return bO.call(o)}var S2,p2,d2,f2,DO,A2,h2,xO,UO,Mo,bO,VO=S(()=>{S2="[object Object]",p2="[object Null]",d2="[object Undefined]",f2=Function.prototype,DO=f2.toString,A2=DO.call(Object),h2=v2(Object.getPrototypeOf,Object),xO=Object.prototype,UO=xO.hasOwnProperty,Mo=Symbol?Symbol.toStringTag:void 0,bO=xO.toString});function pi(...o){let e=o.shift(),t=new WeakMap;for(;o.length>0;)e=BO(e,o.shift(),0,t);return e}function sp(o){return Wc(o)?o.slice():o}function BO(o,e,t=0,i){let a;if(!(t>M2)){if(t++,qc(o)||qc(e)||GO(e))a=sp(e);else if(Wc(o)){if(a=o.slice(),Wc(e))for(let s=0,n=e.length;s<n;s++)a.push(sp(e[s]));else if(Ps(e)){let s=Object.keys(e);for(let n=0,r=s.length;n<r;n++){let l=s[n];a[l]=sp(e[l])}}}else if(Ps(o))if(Ps(e)){if(!P2(o,e))return e;a=Object.assign({},o);let s=Object.keys(e);for(let n=0,r=s.length;n<r;n++){let l=s[n],c=e[l];if(qc(c))typeof c>"u"?delete a[l]:a[l]=c;else{let u=a[l],E=c;if(wO(o,l,i)||wO(e,l,i))delete a[l];else{if(Ps(u)&&Ps(E)){let d=i.get(u)||[],f=i.get(E)||[];d.push({obj:o,key:l}),f.push({obj:e,key:l}),i.set(u,d),i.set(E,f)}a[l]=BO(a[l],c,t,i)}}}}else a=e;return a}}function wO(o,e,t){let i=t.get(o[e])||[];for(let a=0,s=i.length;a<s;a++){let n=i[a];if(n.key===e&&n.obj===o)return!0}return!1}function Wc(o){return Array.isArray(o)}function GO(o){return typeof o=="function"}function Ps(o){return!qc(o)&&!Wc(o)&&!GO(o)&&typeof o=="object"}function qc(o){return typeof o=="string"||typeof o=="number"||typeof o=="boolean"||typeof o>"u"||o instanceof Date||o instanceof RegExp||o===null}function P2(o,e){return!(!ap(o)||!ap(e))}var M2,kO=S(()=>{VO();M2=20});function di(o,e){let t,i=new Promise(function(s,n){t=setTimeout(function(){n(new Cs("Operation timed out."))},e)});return Promise.race([o,i]).then(a=>(clearTimeout(t),a),a=>{throw clearTimeout(t),a})}var Cs,HO=S(()=>{Cs=class o extends Error{constructor(e){super(e),Object.setPrototypeOf(this,o.prototype)}}});function lp(o,e){return typeof e=="string"?o===e:!!o.match(e)}function YO(o,e){if(!e)return!1;for(let t of e)if(lp(o,t))return!0;return!1}var FO=S(()=>{});function KO(o){return typeof o=="function"&&typeof o.__original=="function"&&typeof o.__unwrap=="function"&&o.__wrapped===!0}var qO=S(()=>{});var jc,WO=S(()=>{jc=class{constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}}});var We,jO=S(()=>{WO();We=class{constructor(e,t){this._callback=e,this._that=t,this._isCalled=!1,this._deferred=new jc}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(t=>this._deferred.resolve(t),t=>this._deferred.reject(t))}catch(t){this._deferred.reject(t)}}return this._deferred.promise}}});function zO(o,e){return new Promise(t=>{Ye.with(ai(Ye.active()),()=>{o.export(e,i=>{t(i)})})})}var XO=S(()=>{x();ds()});var yn={};ge(yn,{AlwaysOffSampler:()=>No,AlwaysOnSampler:()=>In,AnchoredClock:()=>xc,BindOnceFuture:()=>We,CompositePropagator:()=>_i,DEFAULT_ATTRIBUTE_COUNT_LIMIT:()=>tn,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>en,DEFAULT_ENVIRONMENT:()=>As,DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:()=>zS,DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:()=>XS,ExportResultCode:()=>te,ParentBasedSampler:()=>Fc,RPCType:()=>Yc,RandomIdGenerator:()=>ci,SDK_INFO:()=>Ln,TRACE_PARENT_HEADER:()=>Ns,TRACE_STATE_HEADER:()=>Ms,TimeoutError:()=>Cs,TraceIdRatioBasedSampler:()=>Kc,TraceState:()=>Ti,TracesSamplerValues:()=>Nt,VERSION:()=>Bc,W3CBaggagePropagator:()=>li,W3CTraceContextPropagator:()=>Si,_globalThis:()=>bc,addHrTimes:()=>Os,baggageUtils:()=>Dt,callWithTimeout:()=>di,deleteRPCMetadata:()=>CO,getEnv:()=>Z,getEnvWithoutDefaults:()=>Cn,getRPCMetadata:()=>gO,getTimeOrigin:()=>ui,globalErrorHandler:()=>Me,hexToBase64:()=>Vc,hexToBinary:()=>gn,hrTime:()=>vs,hrTimeDuration:()=>kc,hrTimeToMicroseconds:()=>ct,hrTimeToMilliseconds:()=>pO,hrTimeToNanoseconds:()=>Hc,hrTimeToTimeStamp:()=>SO,internal:()=>rn,isAttributeKey:()=>KS,isAttributeValue:()=>Pn,isTimeInput:()=>ms,isTimeInputHrTime:()=>Ei,isTracingSuppressed:()=>lt,isUrlIgnored:()=>YO,isWrapped:()=>KO,loggingErrorHandler:()=>Uc,merge:()=>pi,millisToHrTime:()=>et,otperformance:()=>Kt,parseEnvironment:()=>hs,parseTraceParent:()=>rp,sanitizeAttributes:()=>Mn,setGlobalErrorHandler:()=>Km,setRPCMetadata:()=>PO,suppressTracing:()=>ai,timeInputToHrTime:()=>Rs,unrefTimer:()=>Pr,unsuppressTracing:()=>Vm,urlMatches:()=>lp});var Dt,rn,K=S(()=>{Gm();km();Ym();WS();qS();dO();JS();fO();FS();ZS();AO();MO();LO();op();ip();IO();yO();ds();tp();$S();kO();jS();HO();FO();qO();jO();QS();XO();Dt={getKeyPairs:Dc,serializeKeyPairs:yc,parseKeyPairsIntoRecord:Bm,parsePairKeyValue:fs},rn={_export:zO}});function fi(){return`unknown_service:${process.argv0}`}var $O=S(()=>{});var JO=S(()=>{$O()});var cp=S(()=>{JO()});var ce,nn=S(()=>{x();Nn();K();cp();ce=class o{constructor(e,t){var i;this._attributes=e,this.asyncAttributesPending=t!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=t==null?void 0:t.then(a=>(this._attributes=Object.assign({},this._attributes,a),this.asyncAttributesPending=!1,a),a=>(m.debug("a resource's async attributes promise rejected: %s",a),this.asyncAttributesPending=!1,{}))}static empty(){return o.EMPTY}static default(){return new o({[gc]:fi(),[GS]:Ln[GS],[BS]:Ln[BS],[kS]:Ln[kS]})}get attributes(){var e;return this.asyncAttributesPending&&m.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}}async waitForAsyncAttributes(){this.asyncAttributesPending&&await this._asyncAttributesPromise}merge(e){var t;if(!e)return this;let i=Object.assign(Object.assign({},this._syncAttributes),(t=e._syncAttributes)!==null&&t!==void 0?t:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new o(i);let a=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(([s,n])=>{var r;return Object.assign(Object.assign(Object.assign(Object.assign({},this._syncAttributes),s),(r=e._syncAttributes)!==null&&r!==void 0?r:e.attributes),n)});return new o(i,a)}};ce.EMPTY=new ce({})});var QO,ZO,up=S(()=>{QO=o=>{switch(o){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return o}},ZO=o=>{switch(o){case"sunos":return"solaris";case"win32":return"windows";default:return o}}});import*as eN from"child_process";import*as tN from"util";var Ai,zc=S(()=>{Ai=tN.promisify(eN.exec)});var rN={};ge(rN,{getMachineId:()=>C2});async function C2(){try{let e=(await Ai('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(` `).find(i=>i.includes("IOPlatformUUID"));if(!e)return"";let t=e.split('" = "');if(t.length===2)return t[1].slice(0,-1)}catch(o){m.debug(`error reading machine id: ${o}`)}return""}var nN=S(()=>{zc();x()});var oN={};ge(oN,{getMachineId:()=>L2});import{promises as g2}from"fs";async function L2(){let o=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let e of o)try{return(await g2.readFile(e,{encoding:"utf8"})).trim()}catch(t){m.debug(`error reading machine id: ${t}`)}return""}var iN=S(()=>{x()});var aN={};ge(aN,{getMachineId:()=>y2});import{promises as I2}from"fs";async function y2(){try{return(await I2.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(o){m.debug(`error reading machine id: ${o}`)}try{return(await Ai("kenv -q smbios.system.uuid")).stdout.trim()}catch(o){m.debug(`error reading machine id: ${o}`)}return""}var sN=S(()=>{zc();x()});var lN={};ge(lN,{getMachineId:()=>D2});import*as Xc from"process";async function D2(){let o="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",e="%windir%\\System32\\REG.exe";Xc.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in Xc.env&&(e="%windir%\\sysnative\\cmd.exe /c "+e);try{let i=(await Ai(`${e} ${o}`)).stdout.split("REG_SZ");if(i.length===2)return i[1].trim()}catch(t){m.debug(`error reading machine id: ${t}`)}return""}var cN=S(()=>{zc();x()});var uN={};ge(uN,{getMachineId:()=>x2});async function x2(){return m.debug("could not read machine-id: unsupported platform"),""}var EN=S(()=>{x()});import*as _N from"process";var Po,TN=S(()=>{switch(_N.platform){case"darwin":({getMachineId:Po}=(nN(),$(rN)));break;case"linux":({getMachineId:Po}=(iN(),$(oN)));break;case"freebsd":({getMachineId:Po}=(sN(),$(aN)));break;case"win32":({getMachineId:Po}=(cN(),$(lN)));break;default:({getMachineId:Po}=(EN(),$(uN)))}});import{arch as U2,hostname as b2}from"os";var Ep,Co,_p=S(()=>{Nn();nn();up();TN();Ep=class{detect(e){let t={[Rm]:b2(),[mm]:QO(U2())};return new ce(t,this._getAsyncAttributes())}_getAsyncAttributes(){return Po().then(e=>{let t={};return e&&(t[vm]=e),t})}},Co=new Ep});var Tp,gs,SN=S(()=>{_p();Tp=class{detect(e){return Promise.resolve(Co.detect(e))}},gs=new Tp});import{platform as V2,release as w2}from"os";var Sp,go,pp=S(()=>{Nn();nn();up();Sp=class{detect(e){let t={[Om]:ZO(V2()),[Nm]:w2()};return new ce(t)}},go=new Sp});var dp,Ls,pN=S(()=>{pp();dp=class{detect(e){return Promise.resolve(go.detect(e))}},Ls=new dp});import*as dN from"os";var fp,Lo,Ap=S(()=>{x();Nn();nn();fp=class{detect(e){let t={[Mm]:process.pid,[Pm]:process.title,[Cm]:process.execPath,[Lm]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[ps]:process.versions.node,[Pc]:"nodejs",[Cc]:"Node.js"};process.argv.length>1&&(t[gm]=process.argv[1]);try{let i=dN.userInfo();t[Im]=i.username}catch(i){m.debug(`error obtaining process owner: ${i}`)}return new ce(t)}},Lo=new fp});var hp,Is,fN=S(()=>{Ap();hp=class{detect(e){return Promise.resolve(Lo.detect(e))}},Is=new hp});import{randomUUID as B2}from"crypto";var vp,ys,AN=S(()=>{Nn();nn();vp=class{detect(e){let t={[ym]:B2()};return new ce(t)}},ys=new vp});var hN=S(()=>{SN();_p();pN();pp();fN();Ap();AN()});var vN=S(()=>{hN()});var Rp,Ds,mp=S(()=>{Nn();x();nn();Rp=class{detect(e){var t,i,a;if(!(typeof navigator<"u"&&((i=(t=global.process)===null||t===void 0?void 0:t.versions)===null||i===void 0?void 0:i.node)===void 0&&((a=global.Bun)===null||a===void 0?void 0:a.version)===void 0))return ce.empty();let n={[Pc]:"browser",[Cc]:"Web Browser",[ps]:navigator.userAgent};return this._getResourceAttributes(n,e)}_getResourceAttributes(e,t){return e[ps]===""?(m.debug("BrowserDetector failed: Unable to find required browser resources. "),ce.empty()):new ce(Object.assign({},e))}},Ds=new Rp});var Op,Np,RN=S(()=>{mp();Op=class{detect(e){return Promise.resolve(Ds.detect(e))}},Np=new Op});var Mp,xs,Pp=S(()=>{x();K();Nn();nn();Mp=class{constructor(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}detect(e){let t={},i=Z(),a=i.OTEL_RESOURCE_ATTRIBUTES,s=i.OTEL_SERVICE_NAME;if(a)try{let n=this._parseResourceAttributes(a);Object.assign(t,n)}catch(n){m.debug(`EnvDetector failed: ${n.message}`)}return s&&(t[gc]=s),new ce(t)}_parseResourceAttributes(e){if(!e)return{};let t={},i=e.split(this._COMMA_SEPARATOR,-1);for(let a of i){let s=a.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(s.length!==2)continue;let[n,r]=s;if(n=n.trim(),r=r.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(n))throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);if(!this._isValid(r))throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);t[n]=decodeURIComponent(r)}return t}_isValid(e){return e.length<=this._MAX_LENGTH&&this._isBaggageOctetString(e)}_isBaggageOctetString(e){for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);if(i<33||i===44||i===59||i===92||i>126)return!1}return!0}_isValidAndNotEmpty(e){return e.length>0&&this._isValid(e)}},xs=new Mp});var Cp,gp,mN=S(()=>{Pp();Cp=class{detect(e){return Promise.resolve(xs.detect(e))}},gp=new Cp});var ON=S(()=>{vN();RN();mN();mp();Pp()});var NN,MN=S(()=>{NN=o=>o!==null&&typeof o=="object"&&typeof o.then=="function"});var PN,CN,gN,LN=S(()=>{nn();x();MN();PN=async(o={})=>{let e=await Promise.all((o.detectors||[]).map(async t=>{try{let i=await t.detect(o);return m.debug(`${t.constructor.name} found resource.`,i),i}catch(i){return m.debug(`${t.constructor.name} failed: ${i.message}`),ce.empty()}}));return gN(e),e.reduce((t,i)=>t.merge(i),ce.empty())},CN=(o={})=>{var e;let t=((e=o.detectors)!==null&&e!==void 0?e:[]).map(a=>{try{let s=a.detect(o),n;if(NN(s)){let r=async()=>(await s).attributes;n=new ce({},r())}else n=s;return n.waitForAsyncAttributes?n.waitForAsyncAttributes().then(()=>m.debug(`${a.constructor.name} found resource.`,n)):m.debug(`${a.constructor.name} found resource.`,n),n}catch(s){return m.error(`${a.constructor.name} failed: ${s.message}`),ce.empty()}}),i=t.reduce((a,s)=>a.merge(s),ce.empty());return i.waitForAsyncAttributes&&i.waitForAsyncAttributes().then(()=>{gN(t)}),i},gN=o=>{o.forEach(e=>{if(Object.keys(e.attributes).length>0){let t=JSON.stringify(e.attributes,null,4);m.verbose(t)}})}});var $c={};ge($c,{Resource:()=>ce,browserDetector:()=>Np,browserDetectorSync:()=>Ds,defaultServiceName:()=>fi,detectResources:()=>PN,detectResourcesSync:()=>CN,envDetector:()=>gp,envDetectorSync:()=>xs,hostDetector:()=>gs,hostDetectorSync:()=>Co,osDetector:()=>Ls,osDetectorSync:()=>go,processDetector:()=>Is,processDetectorSync:()=>Lo,serviceInstanceIdDetectorSync:()=>ys});var Dn=S(()=>{nn();cp();ON();LN()});var Jc,IN=S(()=>{(function(o){o[o.UNSPECIFIED=0]="UNSPECIFIED",o[o.TRACE=1]="TRACE",o[o.TRACE2=2]="TRACE2",o[o.TRACE3=3]="TRACE3",o[o.TRACE4=4]="TRACE4",o[o.DEBUG=5]="DEBUG",o[o.DEBUG2=6]="DEBUG2",o[o.DEBUG3=7]="DEBUG3",o[o.DEBUG4=8]="DEBUG4",o[o.INFO=9]="INFO",o[o.INFO2=10]="INFO2",o[o.INFO3=11]="INFO3",o[o.INFO4=12]="INFO4",o[o.WARN=13]="WARN",o[o.WARN2=14]="WARN2",o[o.WARN3=15]="WARN3",o[o.WARN4=16]="WARN4",o[o.ERROR=17]="ERROR",o[o.ERROR2=18]="ERROR2",o[o.ERROR3=19]="ERROR3",o[o.ERROR4=20]="ERROR4",o[o.FATAL=21]="FATAL",o[o.FATAL2=22]="FATAL2",o[o.FATAL3=23]="FATAL3",o[o.FATAL4=24]="FATAL4"})(Jc||(Jc={}))});var Io,Qc,Lp=S(()=>{Io=class{emit(e){}},Qc=new Io});var Us,bs,Ip=S(()=>{Lp();Us=class{getLogger(e,t,i){return new Io}},bs=new Us});var Zc,yN=S(()=>{Zc=typeof globalThis=="object"?globalThis:global});var DN=S(()=>{yN()});var xN=S(()=>{DN()});function UN(o,e,t){return i=>i===o?e:t}var Vs,hi,yp,bN=S(()=>{xN();Vs=Symbol.for("io.opentelemetry.js.api.logs"),hi=Zc;yp=1});var eu,VN=S(()=>{bN();Ip();eu=class o{constructor(){}static getInstance(){return this._instance||(this._instance=new o),this._instance}setGlobalLoggerProvider(e){return hi[Vs]?this.getLoggerProvider():(hi[Vs]=UN(yp,e,bs),e)}getLoggerProvider(){var e,t;return(t=(e=hi[Vs])===null||e===void 0?void 0:e.call(hi,yp))!==null&&t!==void 0?t:bs}getLogger(e,t,i){return this.getLoggerProvider().getLogger(e,t,i)}disable(){delete hi[Vs]}}});var wN={};ge(wN,{NOOP_LOGGER:()=>Qc,NOOP_LOGGER_PROVIDER:()=>bs,NoopLogger:()=>Io,NoopLoggerProvider:()=>Us,SeverityNumber:()=>Jc,logs:()=>ws});var ws,Bs=S(()=>{IN();Lp();Ip();VN();ws=eu.getInstance()});var vi,Dp=S(()=>{x();x();K();vi=class{constructor(e,t,i){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;let{timestamp:a,observedTimestamp:s,severityNumber:n,severityText:r,body:l,attributes:c={},context:u}=i,E=Date.now();if(this.hrTime=Rs(a??E),this.hrTimeObserved=Rs(s??E),u){let d=_e.getSpanContext(u);d&&qe(d)&&(this.spanContext=d)}this.severityNumber=n,this.severityText=r,this.body=l,this.resource=e.resource,this.instrumentationScope=t,this._logRecordLimits=e.logRecordLimits,this.setAttributes(c)}set severityText(e){this._isLogRecordReadonly()||(this._severityText=e)}get severityText(){return this._severityText}set severityNumber(e){this._isLogRecordReadonly()||(this._severityNumber=e)}get severityNumber(){return this._severityNumber}set body(e){this._isLogRecordReadonly()||(this._body=e)}get body(){return this._body}get droppedAttributesCount(){return this.totalAttributesCount-Object.keys(this.attributes).length}setAttribute(e,t){return this._isLogRecordReadonly()?this:t===null?this:e.length===0?(m.warn(`Invalid attribute key: ${e}`),this):!Pn(t)&&!(typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length>0)?(m.warn(`Invalid attribute value set for key: ${e}`),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this.droppedAttributesCount===1&&m.warn("Dropping extra attributes."),this):(Pn(t)?this.attributes[e]=this._truncateToSize(t):this.attributes[e]=t,this))}setAttributes(e){for(let[t,i]of Object.entries(e))this.setAttribute(t,i);return this}setBody(e){return this.body=e,this}setSeverityNumber(e){return this.severityNumber=e,this}setSeverityText(e){return this.severityText=e,this}_makeReadonly(){this._isReadonly=!0}_truncateToSize(e){let t=this._logRecordLimits.attributeValueLengthLimit;return t<=0?(m.warn(`Attribute value limit must be positive, got ${t}`),e):typeof e=="string"?this._truncateToLimitUtil(e,t):Array.isArray(e)?e.map(i=>typeof i=="string"?this._truncateToLimitUtil(i,t):i):e}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substring(0,t)}_isLogRecordReadonly(){return this._isReadonly&&m.warn("Can not execute the operation on emitted log record"),this._isReadonly}}});var tu,BN=S(()=>{x();Dp();tu=class{constructor(e,t){this.instrumentationScope=e,this._sharedState=t}emit(e){let t=e.context||Ye.active(),i=new vi(this._sharedState,this.instrumentationScope,Object.assign({context:t},e));this._sharedState.activeProcessor.onEmit(i,t),i._makeReadonly()}}});function GN(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:Z().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:Z().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}function kN(o){var e,t,i,a,s,n;let r=Cn();return{attributeCountLimit:(i=(t=(e=o.attributeCountLimit)!==null&&e!==void 0?e:r.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&t!==void 0?t:r.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&i!==void 0?i:tn,attributeValueLengthLimit:(n=(s=(a=o.attributeValueLengthLimit)!==null&&a!==void 0?a:r.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&s!==void 0?s:r.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&n!==void 0?n:en}}var HN=S(()=>{K()});var ru,YN=S(()=>{K();ru=class{constructor(e,t){this.processors=e,this.forceFlushTimeoutMillis=t}async forceFlush(){let e=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(t=>di(t.forceFlush(),e)))}onEmit(e,t){this.processors.forEach(i=>i.onEmit(e,t))}async shutdown(){await Promise.all(this.processors.map(e=>e.shutdown()))}}});var Ri,xp=S(()=>{Ri=class{forceFlush(){return Promise.resolve()}onEmit(e,t){}shutdown(){return Promise.resolve()}}});var nu,FN=S(()=>{xp();nu=class{constructor(e,t,i){this.resource=e,this.forceFlushTimeoutMillis=t,this.logRecordLimits=i,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new Ri}}});var G2,ou,KN=S(()=>{x();Bs();Dn();K();BN();HN();YN();FN();G2="unknown",ou=class{constructor(e={}){var t;let i=pi({},GN(),e),a=ce.default().merge((t=i.resource)!==null&&t!==void 0?t:ce.empty());this._sharedState=new nu(a,i.forceFlushTimeoutMillis,kN(i.logRecordLimits)),this._shutdownOnce=new We(this._shutdown,this)}getLogger(e,t,i){if(this._shutdownOnce.isCalled)return m.warn("A shutdown LoggerProvider cannot provide a Logger"),Qc;e||m.warn("Logger requested without instrumentation scope name.");let a=e||G2,s=`${a}@${t||""}:${(i==null?void 0:i.schemaUrl)||""}`;return this._sharedState.loggers.has(s)||this._sharedState.loggers.set(s,new tu({name:a,version:t,schemaUrl:i==null?void 0:i.schemaUrl},this._sharedState)),this._sharedState.loggers.get(s)}addLogRecordProcessor(e){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(t=>m.error("Error while trying to shutdown current log record processor",t)),this._sharedState.registeredLogRecordProcessors.push(e),this._sharedState.activeProcessor=new ru(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)}forceFlush(){return this._shutdownOnce.isCalled?(m.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(m.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}}});var iu,qN=S(()=>{K();K();iu=class{export(e,t){this._sendLogRecords(e,t)}shutdown(){return Promise.resolve()}_exportInfo(e){var t,i,a;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationScope,timestamp:ct(e.hrTime),traceId:(t=e.spanContext)===null||t===void 0?void 0:t.traceId,spanId:(i=e.spanContext)===null||i===void 0?void 0:i.spanId,traceFlags:(a=e.spanContext)===null||a===void 0?void 0:a.traceFlags,severityText:e.severityText,severityNumber:e.severityNumber,body:e.body,attributes:e.attributes}}_sendLogRecords(e,t){for(let i of e)console.dir(this._exportInfo(i),{depth:3});t==null||t({code:te.SUCCESS})}}});var au,WN=S(()=>{K();au=class{constructor(e){this._exporter=e,this._shutdownOnce=new We(this._shutdown,this),this._unresolvedExports=new Set}onEmit(e){var t,i;if(this._shutdownOnce.isCalled)return;let a=()=>rn._export(this._exporter,[e]).then(s=>{var n;s.code!==te.SUCCESS&&Me((n=s.error)!==null&&n!==void 0?n:new Error(`SimpleLogRecordProcessor: log record export failed (status ${s})`))}).catch(Me);if(e.resource.asyncAttributesPending){let s=(i=(t=e.resource).waitForAsyncAttributes)===null||i===void 0?void 0:i.call(t).then(()=>(this._unresolvedExports.delete(s),a()),Me);s!=null&&this._unresolvedExports.add(s)}else a()}async forceFlush(){await Promise.all(Array.from(this._unresolvedExports))}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}}});var su,jN=S(()=>{K();su=class{constructor(){this._finishedLogRecords=[],this._stopped=!1}export(e,t){if(this._stopped)return t({code:te.FAILED,error:new Error("Exporter has been stopped")});this._finishedLogRecords.push(...e),t({code:te.SUCCESS})}shutdown(){return this._stopped=!0,this.reset(),Promise.resolve()}getFinishedLogRecords(){return this._finishedLogRecords}reset(){this._finishedLogRecords=[]}}});var lu,zN=S(()=>{x();K();lu=class{constructor(e,t){var i,a,s,n;this._exporter=e,this._finishedLogRecords=[];let r=Z();this._maxExportBatchSize=(i=t==null?void 0:t.maxExportBatchSize)!==null&&i!==void 0?i:r.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=(a=t==null?void 0:t.maxQueueSize)!==null&&a!==void 0?a:r.OTEL_BLRP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=(s=t==null?void 0:t.scheduledDelayMillis)!==null&&s!==void 0?s:r.OTEL_BLRP_SCHEDULE_DELAY,this._exportTimeoutMillis=(n=t==null?void 0:t.exportTimeoutMillis)!==null&&n!==void 0?n:r.OTEL_BLRP_EXPORT_TIMEOUT,this._shutdownOnce=new We(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(m.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}onEmit(e){this._shutdownOnce.isCalled||this._addToBuffer(e)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}shutdown(){return this._shutdownOnce.call()}async _shutdown(){this.onShutdown(),await this._flushAll(),await this._exporter.shutdown()}_addToBuffer(e){this._finishedLogRecords.length>=this._maxQueueSize||(this._finishedLogRecords.push(e),this._maybeStartTimer())}_flushAll(){return new Promise((e,t)=>{let i=[],a=Math.ceil(this._finishedLogRecords.length/this._maxExportBatchSize);for(let s=0;s<a;s++)i.push(this._flushOneBatch());Promise.all(i).then(()=>{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),this._finishedLogRecords.length===0?Promise.resolve():new Promise((e,t)=>{di(this._export(this._finishedLogRecords.splice(0,this._maxExportBatchSize)),this._exportTimeoutMillis).then(()=>e()).catch(t)})}_maybeStartTimer(){this._timer===void 0&&(this._timer=setTimeout(()=>{this._flushOneBatch().then(()=>{this._finishedLogRecords.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(e=>{Me(e)})},this._scheduledDelayMillis),Pr(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}_export(e){let t=()=>rn._export(this._exporter,e).then(a=>{var s;a.code!==te.SUCCESS&&Me((s=a.error)!==null&&s!==void 0?s:new Error(`BatchLogRecordProcessor: log record export failed (status ${a})`))}).catch(Me),i=e.map(a=>a.resource).filter(a=>a.asyncAttributesPending);return i.length===0?t():Promise.all(i.map(a=>{var s;return(s=a.waitForAsyncAttributes)===null||s===void 0?void 0:s.call(a)})).then(t,Me)}}});var mi,XN=S(()=>{zN();mi=class extends lu{onShutdown(){}}});var $N=S(()=>{XN()});var JN=S(()=>{$N()});var Up={};ge(Up,{BatchLogRecordProcessor:()=>mi,ConsoleLogRecordExporter:()=>iu,InMemoryLogRecordExporter:()=>su,LogRecord:()=>vi,LoggerProvider:()=>ou,NoopLogRecordProcessor:()=>Ri,SimpleLogRecordProcessor:()=>au});var bp=S(()=>{KN();Dp();xp();qN();WN();jN();JN()});var _r,cu=S(()=>{(function(o){o[o.DELTA=0]="DELTA",o[o.CUMULATIVE=1]="CUMULATIVE"})(_r||(_r={}))});var tt,Oi=S(()=>{(function(o){o[o.HISTOGRAM=0]="HISTOGRAM",o[o.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",o[o.GAUGE=2]="GAUGE",o[o.SUM=3]="SUM"})(tt||(tt={}))});function QN(o){return o!=null}function ZN(o){let e=Object.keys(o);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(t=>[t,o[t]])))}function eM(o){var e,t;return`${o.name}:${(e=o.version)!==null&&e!==void 0?e:""}:${(t=o.schemaUrl)!==null&&t!==void 0?t:""}`}function xn(o,e){let t,i=new Promise(function(s,n){t=setTimeout(function(){n(new yo("Operation timed out."))},e)});return Promise.race([o,i]).then(a=>(clearTimeout(t),a),a=>{throw clearTimeout(t),a})}async function tM(o){return Promise.all(o.map(async e=>{try{return{status:"fulfilled",value:await e}}catch(t){return{status:"rejected",reason:t}}}))}function rM(o){return o.status==="rejected"}function Vp(o,e){let t=[];return o.forEach(i=>{t.push(...e(i))}),t}function nM(o,e){if(o.size!==e.size)return!1;for(let t of o)if(!e.has(t))return!1;return!0}function oM(o,e){let t=0,i=o.length-1,a=o.length;for(;i>=t;){let s=t+Math.trunc((i-t)/2);o[s]<e?t=s+1:(a=s,i=s-1)}return a}function iM(o,e){return o.toLowerCase()===e.toLowerCase()}var yo,Cr=S(()=>{yo=class o extends Error{constructor(e){super(e),Object.setPrototypeOf(this,o.prototype)}}});var qt,Ni=S(()=>{(function(o){o[o.DROP=0]="DROP",o[o.SUM=1]="SUM",o[o.LAST_VALUE=2]="LAST_VALUE",o[o.HISTOGRAM=3]="HISTOGRAM",o[o.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(qt||(qt={}))});var Gs,aM=S(()=>{Ni();Gs=class{constructor(){this.kind=qt.DROP}createAccumulation(){}merge(e,t){}diff(e,t){}toMetricData(e,t,i,a){}}});function gr(o,e,t){var i,a,s,n;return H2(o)||m.warn(`Invalid metric name: "${o}". The metric name should be a ASCII string with a length no greater than 255 characters.`),{name:o,type:e,description:(i=t==null?void 0:t.description)!==null&&i!==void 0?i:"",unit:(a=t==null?void 0:t.unit)!==null&&a!==void 0?a:"",valueType:(s=t==null?void 0:t.valueType)!==null&&s!==void 0?s:Rt.DOUBLE,advice:(n=t==null?void 0:t.advice)!==null&&n!==void 0?n:{}}}function sM(o,e){var t,i;return{name:(t=o.name)!==null&&t!==void 0?t:e.name,description:(i=o.description)!==null&&i!==void 0?i:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}function lM(o,e){return iM(o.name,e.name)&&o.unit===e.unit&&o.type===e.type&&o.valueType===e.valueType}function H2(o){return o.match(k2)!=null}var de,k2,on=S(()=>{x();Cr();(function(o){o.COUNTER="COUNTER",o.GAUGE="GAUGE",o.HISTOGRAM="HISTOGRAM",o.UP_DOWN_COUNTER="UP_DOWN_COUNTER",o.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",o.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",o.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(de||(de={}));k2=/^[a-z][a-z0-9_.\-/]{0,254}$/i});function Y2(o){let e=o.map(()=>0);return e.push(0),{buckets:{boundaries:o,counts:e},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var Mi,Pi,cM=S(()=>{Ni();Oi();on();Cr();Mi=class{constructor(e,t,i=!0,a=Y2(t)){this.startTime=e,this._boundaries=t,this._recordMinMax=i,this._current=a}record(e){if(Number.isNaN(e))return;this._current.count+=1,this._current.sum+=e,this._recordMinMax&&(this._current.min=Math.min(e,this._current.min),this._current.max=Math.max(e,this._current.max),this._current.hasMinMax=!0);let t=oM(this._boundaries,e);this._current.buckets.counts[t]+=1}setStartTime(e){this.startTime=e}toPointValue(){return this._current}},Pi=class{constructor(e,t){this._boundaries=e,this._recordMinMax=t,this.kind=qt.HISTOGRAM}createAccumulation(e){return new Mi(e,this._boundaries,this._recordMinMax)}merge(e,t){let i=e.toPointValue(),a=t.toPointValue(),s=i.buckets.counts,n=a.buckets.counts,r=new Array(s.length);for(let u=0;u<s.length;u++)r[u]=s[u]+n[u];let l=1/0,c=-1/0;return this._recordMinMax&&(i.hasMinMax&&a.hasMinMax?(l=Math.min(i.min,a.min),c=Math.max(i.max,a.max)):i.hasMinMax?(l=i.min,c=i.max):a.hasMinMax&&(l=a.min,c=a.max)),new Mi(e.startTime,i.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:i.buckets.boundaries,counts:r},count:i.count+a.count,sum:i.sum+a.sum,hasMinMax:this._recordMinMax&&(i.hasMinMax||a.hasMinMax),min:l,max:c})}diff(e,t){let i=e.toPointValue(),a=t.toPointValue(),s=i.buckets.counts,n=a.buckets.counts,r=new Array(s.length);for(let l=0;l<s.length;l++)r[l]=n[l]-s[l];return new Mi(t.startTime,i.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:i.buckets.boundaries,counts:r},count:a.count-i.count,sum:a.sum-i.sum,hasMinMax:!1,min:1/0,max:-1/0})}toMetricData(e,t,i,a){return{descriptor:e,aggregationTemporality:t,dataPointType:tt.HISTOGRAM,dataPoints:i.map(([s,n])=>{let r=n.toPointValue(),l=e.type===de.GAUGE||e.type===de.UP_DOWN_COUNTER||e.type===de.OBSERVABLE_GAUGE||e.type===de.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:s,startTime:n.startTime,endTime:a,value:{min:r.hasMinMax?r.min:void 0,max:r.hasMinMax?r.max:void 0,sum:l?void 0:r.sum,buckets:r.buckets,count:r.count}}})}}}});var ks,wp,uM=S(()=>{ks=class o{constructor(e=new wp,t=0,i=0,a=0){this.backing=e,this.indexBase=t,this.indexStart=i,this.indexEnd=a}get offset(){return this.indexStart}get length(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1}counts(){return Array.from({length:this.length},(e,t)=>this.at(t))}at(e){let t=this.indexBase-this.indexStart;return e<t&&(e+=this.backing.length),e-=t,this.backing.countAt(e)}incrementBucket(e,t){this.backing.increment(e,t)}decrementBucket(e,t){this.backing.decrement(e,t)}trim(){for(let e=0;e<this.length;e++)if(this.at(e)!==0){this.indexStart+=e;break}else if(e===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(let e=this.length-1;e>=0;e--)if(this.at(e)!==0){this.indexEnd-=this.length-e-1;break}this._rotate()}downscale(e){this._rotate();let t=1+this.indexEnd-this.indexStart,i=1<<e,a=0,s=0;for(let n=this.indexStart;n<=this.indexEnd;){let r=n%i;r<0&&(r+=i);for(let l=r;l<i&&a<t;l++)this._relocateBucket(s,a),a++,n++;s++}this.indexStart>>=e,this.indexEnd>>=e,this.indexBase=this.indexStart}clone(){return new o(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)}_rotate(){let e=this.indexBase-this.indexStart;e!==0&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)}_relocateBucket(e,t){e!==t&&this.incrementBucket(e,this.backing.emptyBucket(t))}},wp=class o{constructor(e=[0]){this._counts=e}get length(){return this._counts.length}countAt(e){return this._counts[e]}growTo(e,t,i){let a=new Array(e).fill(0);a.splice(i,this._counts.length-t,...this._counts.slice(t)),a.splice(0,t,...this._counts.slice(0,t)),this._counts=a}reverse(e,t){let i=Math.floor((e+t)/2)-e;for(let a=0;a<i;a++){let s=this._counts[e+a];this._counts[e+a]=this._counts[t-a-1],this._counts[t-a-1]=s}}emptyBucket(e){let t=this._counts[e];return this._counts[e]=0,t}increment(e,t){this._counts[e]+=t}decrement(e,t){this._counts[e]>=t?this._counts[e]-=t:this._counts[e]=0}clone(){return new o([...this._counts])}}});function uu(o){let e=new DataView(new ArrayBuffer(8));return e.setFloat64(0,o),((e.getUint32(0)&2146435072)>>20)-1023}function Eu(o){let e=new DataView(new ArrayBuffer(8));e.setFloat64(0,o);let t=e.getUint32(0),i=e.getUint32(4);return(t&1048575)*Math.pow(2,32)+i}var Hs,Bp=S(()=>{Hs=Math.pow(2,-1022)});function Ys(o,e){return o===0||o===Number.POSITIVE_INFINITY||o===Number.NEGATIVE_INFINITY||Number.isNaN(o)?o:o*Math.pow(2,e)}function _M(o){return o--,o|=o>>1,o|=o>>2,o|=o>>4,o|=o>>8,o|=o>>16,o++,o}var _u=S(()=>{});var Lr,Tu=S(()=>{Lr=class extends Error{}});var Su,SM=S(()=>{Bp();_u();Tu();Su=class{constructor(e){this._shift=-e}mapToIndex(e){if(e<Hs)return this._minNormalLowerBoundaryIndex();let t=uu(e),i=this._rightShift(Eu(e)-1,52);return t+i>>this._shift}lowerBoundary(e){let t=this._minNormalLowerBoundaryIndex();if(e<t)throw new Lr(`underflow: ${e} is < minimum lower boundary: ${t}`);let i=this._maxNormalLowerBoundaryIndex();if(e>i)throw new Lr(`overflow: ${e} is > maximum lower boundary: ${i}`);return Ys(1,e<<this._shift)}get scale(){return this._shift===0?0:-this._shift}_minNormalLowerBoundaryIndex(){let e=-1022>>this._shift;return this._shift<2&&e--,e}_maxNormalLowerBoundaryIndex(){return 1023>>this._shift}_rightShift(e,t){return Math.floor(e*Math.pow(2,-t))}}});var pu,pM=S(()=>{Bp();_u();Tu();pu=class{constructor(e){this._scale=e,this._scaleFactor=Ys(Math.LOG2E,e),this._inverseFactor=Ys(Math.LN2,-e)}mapToIndex(e){if(e<=Hs)return this._minNormalLowerBoundaryIndex()-1;if(Eu(e)===0)return(uu(e)<<this._scale)-1;let t=Math.floor(Math.log(e)*this._scaleFactor),i=this._maxNormalLowerBoundaryIndex();return t>=i?i:t}lowerBoundary(e){let t=this._maxNormalLowerBoundaryIndex();if(e>=t){if(e===t)return 2*Math.exp((e-(1<<this._scale))/this._scaleFactor);throw new Lr(`overflow: ${e} is > maximum lower boundary: ${t}`)}let i=this._minNormalLowerBoundaryIndex();if(e<=i){if(e===i)return Hs;if(e===i-1)return Math.exp((e+(1<<this._scale))/this._scaleFactor)/2;throw new Lr(`overflow: ${e} is < minimum lower boundary: ${i}`)}return Math.exp(e*this._inverseFactor)}get scale(){return this._scale}_minNormalLowerBoundaryIndex(){return-1022<<this._scale}_maxNormalLowerBoundaryIndex(){return(1024<<this._scale)-1}}});function Hp(o){if(o>fM||o<dM)throw new Lr(`expected scale >= ${dM} && <= ${fM}, got: ${o}`);return K2[o+10]}var dM,fM,K2,AM=S(()=>{SM();pM();Tu();dM=-10,fM=20,K2=Array.from({length:31},(o,e)=>e>10?new pu(e-10):new Su(e-10))});var Ci,q2,W2,Yp,du,Fs,hM=S(()=>{Ni();Oi();x();on();uM();AM();_u();Ci=class o{constructor(e,t){this.low=e,this.high=t}static combine(e,t){return new o(Math.min(e.low,t.low),Math.max(e.high,t.high))}},q2=20,W2=160,Yp=2,du=class o{constructor(e=e,t=W2,i=!0,a=0,s=0,n=0,r=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,c=new ks,u=new ks,E=Hp(q2)){this.startTime=e,this._maxSize=t,this._recordMinMax=i,this._sum=a,this._count=s,this._zeroCount=n,this._min=r,this._max=l,this._positive=c,this._negative=u,this._mapping=E,this._maxSize<Yp&&(m.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${Yp}`),this._maxSize=Yp)}record(e){this.updateByIncrement(e,1)}setStartTime(e){this.startTime=e}toPointValue(){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}}get sum(){return this._sum}get min(){return this._min}get max(){return this._max}get count(){return this._count}get zeroCount(){return this._zeroCount}get scale(){return this._count===this._zeroCount?0:this._mapping.scale}get positive(){return this._positive}get negative(){return this._negative}updateByIncrement(e,t){if(!Number.isNaN(e)){if(e>this._max&&(this._max=e),e<this._min&&(this._min=e),this._count+=t,e===0){this._zeroCount+=t;return}this._sum+=e*t,e>0?this._updateBuckets(this._positive,e,t):this._updateBuckets(this._negative,-e,t)}}merge(e){this._count===0?(this._min=e.min,this._max=e.max):e.count!==0&&(e.min<this.min&&(this._min=e.min),e.max>this.max&&(this._max=e.max)),this.startTime=e.startTime,this._sum+=e.sum,this._count+=e.count,this._zeroCount+=e.zeroCount;let t=this._minScale(e);this._downscale(this.scale-t),this._mergeBuckets(this.positive,e,e.positive,t),this._mergeBuckets(this.negative,e,e.negative,t)}diff(e){this._min=1/0,this._max=-1/0,this._sum-=e.sum,this._count-=e.count,this._zeroCount-=e.zeroCount;let t=this._minScale(e);this._downscale(this.scale-t),this._diffBuckets(this.positive,e,e.positive,t),this._diffBuckets(this.negative,e,e.negative,t)}clone(){return new o(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)}_updateBuckets(e,t,i){let a=this._mapping.mapToIndex(t),s=!1,n=0,r=0;if(e.length===0?(e.indexStart=a,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):a<e.indexStart&&e.indexEnd-a>=this._maxSize?(s=!0,r=a,n=e.indexEnd):a>e.indexEnd&&a-e.indexStart>=this._maxSize&&(s=!0,r=e.indexStart,n=a),s){let l=this._changeScale(n,r);this._downscale(l),a=this._mapping.mapToIndex(t)}this._incrementIndexBy(e,a,i)}_incrementIndexBy(e,t,i){if(i===0)return;if(e.length===0&&(e.indexStart=e.indexEnd=e.indexBase=t),t<e.indexStart){let s=e.indexEnd-t;s>=e.backing.length&&this._grow(e,s+1),e.indexStart=t}else if(t>e.indexEnd){let s=t-e.indexStart;s>=e.backing.length&&this._grow(e,s+1),e.indexEnd=t}let a=t-e.indexBase;a<0&&(a+=e.backing.length),e.incrementBucket(a,i)}_grow(e,t){let i=e.backing.length,a=e.indexBase-e.indexStart,s=i-a,n=_M(t);n>this._maxSize&&(n=this._maxSize);let r=n-a;e.backing.growTo(n,s,r)}_changeScale(e,t){let i=0;for(;e-t>=this._maxSize;)e>>=1,t>>=1,i++;return i}_downscale(e){if(e===0)return;if(e<0)throw new Error(`impossible change of scale: ${this.scale}`);let t=this._mapping.scale-e;this._positive.downscale(e),this._negative.downscale(e),this._mapping=Hp(t)}_minScale(e){let t=Math.min(this.scale,e.scale),i=Ci.combine(this._highLowAtScale(this.positive,this.scale,t),this._highLowAtScale(e.positive,e.scale,t)),a=Ci.combine(this._highLowAtScale(this.negative,this.scale,t),this._highLowAtScale(e.negative,e.scale,t));return Math.min(t-this._changeScale(i.high,i.low),t-this._changeScale(a.high,a.low))}_highLowAtScale(e,t,i){if(e.length===0)return new Ci(0,-1);let a=t-i;return new Ci(e.indexStart>>a,e.indexEnd>>a)}_mergeBuckets(e,t,i,a){let s=i.offset,n=t.scale-a;for(let r=0;r<i.length;r++)this._incrementIndexBy(e,s+r>>n,i.at(r))}_diffBuckets(e,t,i,a){let s=i.offset,n=t.scale-a;for(let r=0;r<i.length;r++){let c=(s+r>>n)-e.indexBase;c<0&&(c+=e.backing.length),e.decrementBucket(c,i.at(r))}e.trim()}},Fs=class{constructor(e,t){this._maxSize=e,this._recordMinMax=t,this.kind=qt.EXPONENTIAL_HISTOGRAM}createAccumulation(e){return new du(e,this._maxSize,this._recordMinMax)}merge(e,t){let i=t.clone();return i.merge(e),i}diff(e,t){let i=t.clone();return i.diff(e),i}toMetricData(e,t,i,a){return{descriptor:e,aggregationTemporality:t,dataPointType:tt.EXPONENTIAL_HISTOGRAM,dataPoints:i.map(([s,n])=>{let r=n.toPointValue(),l=e.type===de.GAUGE||e.type===de.UP_DOWN_COUNTER||e.type===de.OBSERVABLE_GAUGE||e.type===de.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:s,startTime:n.startTime,endTime:a,value:{min:r.hasMinMax?r.min:void 0,max:r.hasMinMax?r.max:void 0,sum:l?void 0:r.sum,positive:{offset:r.positive.offset,bucketCounts:r.positive.bucketCounts},negative:{offset:r.negative.offset,bucketCounts:r.negative.bucketCounts},count:r.count,scale:r.scale,zeroCount:r.zeroCount}}})}}}});var gi,Ks,vM=S(()=>{Ni();K();Oi();gi=class{constructor(e,t=0,i=[0,0]){this.startTime=e,this._current=t,this.sampleTime=i}record(e){this._current=e,this.sampleTime=et(Date.now())}setStartTime(e){this.startTime=e}toPointValue(){return this._current}},Ks=class{constructor(){this.kind=qt.LAST_VALUE}createAccumulation(e){return new gi(e)}merge(e,t){let i=ct(t.sampleTime)>=ct(e.sampleTime)?t:e;return new gi(e.startTime,i.toPointValue(),i.sampleTime)}diff(e,t){let i=ct(t.sampleTime)>=ct(e.sampleTime)?t:e;return new gi(t.startTime,i.toPointValue(),i.sampleTime)}toMetricData(e,t,i,a){return{descriptor:e,aggregationTemporality:t,dataPointType:tt.GAUGE,dataPoints:i.map(([s,n])=>({attributes:s,startTime:n.startTime,endTime:a,value:n.toPointValue()}))}}}});var Un,Li,RM=S(()=>{Ni();Oi();Un=class{constructor(e,t,i=0,a=!1){this.startTime=e,this.monotonic=t,this._current=i,this.reset=a}record(e){this.monotonic&&e<0||(this._current+=e)}setStartTime(e){this.startTime=e}toPointValue(){return this._current}},Li=class{constructor(e){this.monotonic=e,this.kind=qt.SUM}createAccumulation(e){return new Un(e,this.monotonic)}merge(e,t){let i=e.toPointValue(),a=t.toPointValue();return t.reset?new Un(t.startTime,this.monotonic,a,t.reset):new Un(e.startTime,this.monotonic,i+a)}diff(e,t){let i=e.toPointValue(),a=t.toPointValue();return this.monotonic&&i>a?new Un(t.startTime,this.monotonic,a,!0):new Un(t.startTime,this.monotonic,a-i)}toMetricData(e,t,i,a){return{descriptor:e,aggregationTemporality:t,dataPointType:tt.SUM,dataPoints:i.map(([s,n])=>({attributes:s,startTime:n.startTime,endTime:a,value:n.toPointValue()})),isMonotonic:this.monotonic}}}});var mM=S(()=>{aM();cM();hM();vM();RM()});var Tt,Ii,Do,yi,Di,qs,Ws,js,OM,NM,MM,PM,j2,z2,fu=S(()=>{x();mM();on();Tt=class{static Drop(){return OM}static Sum(){return NM}static LastValue(){return MM}static Histogram(){return PM}static ExponentialHistogram(){return j2}static Default(){return z2}},Ii=class o extends Tt{createAggregator(e){return o.DEFAULT_INSTANCE}};Ii.DEFAULT_INSTANCE=new Gs;Do=class o extends Tt{createAggregator(e){switch(e.type){case de.COUNTER:case de.OBSERVABLE_COUNTER:case de.HISTOGRAM:return o.MONOTONIC_INSTANCE;default:return o.NON_MONOTONIC_INSTANCE}}};Do.MONOTONIC_INSTANCE=new Li(!0);Do.NON_MONOTONIC_INSTANCE=new Li(!1);yi=class o extends Tt{createAggregator(e){return o.DEFAULT_INSTANCE}};yi.DEFAULT_INSTANCE=new Ks;Di=class o extends Tt{createAggregator(e){return o.DEFAULT_INSTANCE}};Di.DEFAULT_INSTANCE=new Pi([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0);qs=class extends Tt{constructor(e,t=!0){if(super(),this._recordMinMax=t,e==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");e=e.concat(),e=e.sort((s,n)=>s-n);let i=e.lastIndexOf(-1/0),a=e.indexOf(1/0);a===-1&&(a=void 0),this._boundaries=e.slice(i+1,a)}createAggregator(e){return new Pi(this._boundaries,this._recordMinMax)}},Ws=class extends Tt{constructor(e=160,t=!0){super(),this._maxSize=e,this._recordMinMax=t}createAggregator(e){return new Fs(this._maxSize,this._recordMinMax)}},js=class extends Tt{_resolve(e){switch(e.type){case de.COUNTER:case de.UP_DOWN_COUNTER:case de.OBSERVABLE_COUNTER:case de.OBSERVABLE_UP_DOWN_COUNTER:return NM;case de.GAUGE:case de.OBSERVABLE_GAUGE:return MM;case de.HISTOGRAM:return e.advice.explicitBucketBoundaries?new qs(e.advice.explicitBucketBoundaries):PM}return m.warn(`Unable to recognize instrument type: ${e.type}`),OM}createAggregator(e){return this._resolve(e).createAggregator(e)}},OM=new Ii,NM=new Do,MM=new yi,PM=new Di,j2=new Ws,z2=new js});var CM,Au,Fp=S(()=>{fu();cu();CM=o=>Tt.Default(),Au=o=>_r.CUMULATIVE});var xi,Kp=S(()=>{x();Cr();Fp();xi=class{constructor(e){var t,i,a;this._shutdown=!1,this._aggregationSelector=(t=e==null?void 0:e.aggregationSelector)!==null&&t!==void 0?t:CM,this._aggregationTemporalitySelector=(i=e==null?void 0:e.aggregationTemporalitySelector)!==null&&i!==void 0?i:Au,this._metricProducers=(a=e==null?void 0:e.metricProducers)!==null&&a!==void 0?a:[]}setMetricProducer(e){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=e,this.onInitialized()}selectAggregation(e){return this._aggregationSelector(e)}selectAggregationTemporality(e){return this._aggregationTemporalitySelector(e)}onInitialized(){}async collect(e){if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");let[t,...i]=await Promise.all([this._sdkMetricProducer.collect({timeoutMillis:e==null?void 0:e.timeoutMillis}),...this._metricProducers.map(r=>r.collect({timeoutMillis:e==null?void 0:e.timeoutMillis}))]),a=t.errors.concat(Vp(i,r=>r.errors)),s=t.resourceMetrics.resource,n=t.resourceMetrics.scopeMetrics.concat(Vp(i,r=>r.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:s,scopeMetrics:n},errors:a}}async shutdown(e){if(this._shutdown){m.error("Cannot call shutdown twice.");return}(e==null?void 0:e.timeoutMillis)==null?await this.onShutdown():await xn(this.onShutdown(),e.timeoutMillis),this._shutdown=!0}async forceFlush(e){if(this._shutdown){m.warn("Cannot forceFlush on already shutdown MetricReader.");return}if((e==null?void 0:e.timeoutMillis)==null){await this.onForceFlush();return}await xn(this.onForceFlush(),e.timeoutMillis)}}});var hu,gM=S(()=>{x();K();Kp();Cr();x();hu=class extends xi{constructor(e){var t,i,a,s;if(super({aggregationSelector:(t=e.exporter.selectAggregation)===null||t===void 0?void 0:t.bind(e.exporter),aggregationTemporalitySelector:(i=e.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(e.exporter),metricProducers:e.metricProducers}),e.exportIntervalMillis!==void 0&&e.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(e.exportTimeoutMillis!==void 0&&e.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(e.exportTimeoutMillis!==void 0&&e.exportIntervalMillis!==void 0&&e.exportIntervalMillis<e.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");this._exportInterval=(a=e.exportIntervalMillis)!==null&&a!==void 0?a:6e4,this._exportTimeout=(s=e.exportTimeoutMillis)!==null&&s!==void 0?s:3e4,this._exporter=e.exporter}async _runOnce(){try{await xn(this._doRun(),this._exportTimeout)}catch(e){if(e instanceof yo){m.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout);return}Me(e)}}async _doRun(){var e,t;let{resourceMetrics:i,errors:a}=await this.collect({timeoutMillis:this._exportTimeout});a.length>0&&m.error("PeriodicExportingMetricReader: metrics collection errors",...a);let s=async()=>{let n=await rn._export(this._exporter,i);if(n.code!==te.SUCCESS)throw new Error(`PeriodicExportingMetricReader: metrics export failed (error ${n.error})`)};i.resource.asyncAttributesPending?(t=(e=i.resource).waitForAsyncAttributes)===null||t===void 0||t.call(e).then(s,n=>m.debug("Error while resolving async portion of resource: ",n)):await s()}onInitialized(){this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),Pr(this._interval)}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){this._interval&&clearInterval(this._interval),await this._exporter.shutdown()}}});var vu,LM=S(()=>{K();vu=class{constructor(e){this._shutdown=!1,this._metrics=[],this._aggregationTemporality=e}export(e,t){if(this._shutdown){setTimeout(()=>t({code:te.FAILED}),0);return}this._metrics.push(e),setTimeout(()=>t({code:te.SUCCESS}),0)}getMetrics(){return this._metrics}forceFlush(){return Promise.resolve()}reset(){this._metrics=[]}selectAggregationTemporality(e){return this._aggregationTemporality}shutdown(){return this._shutdown=!0,Promise.resolve()}}});var Ru,IM=S(()=>{K();Fp();Ru=class o{constructor(e){var t;this._shutdown=!1,this._temporalitySelector=(t=e==null?void 0:e.temporalitySelector)!==null&&t!==void 0?t:Au}export(e,t){if(this._shutdown){setImmediate(t,{code:te.FAILED});return}return o._sendMetrics(e,t)}forceFlush(){return Promise.resolve()}selectAggregationTemporality(e){return this._temporalitySelector(e)}shutdown(){return this._shutdown=!0,Promise.resolve()}static _sendMetrics(e,t){for(let i of e.scopeMetrics)for(let a of i.metrics)console.dir({descriptor:a.descriptor,dataPointType:a.dataPointType,dataPoints:a.dataPoints},{depth:null});t({code:te.SUCCESS})}}});var mu,yM=S(()=>{mu=class{constructor(){this._registeredViews=[]}addView(e){this._registeredViews.push(e)}findViews(e,t){return this._registeredViews.filter(a=>this._matchInstrument(a.instrumentSelector,e)&&this._matchMeter(a.meterSelector,t))}_matchInstrument(e,t){return(e.getType()===void 0||t.type===e.getType())&&e.getNameFilter().match(t.name)&&e.getUnitFilter().match(t.unit)}_matchMeter(e,t){return e.getNameFilter().match(t.name)&&(t.version===void 0||e.getVersionFilter().match(t.version))&&(t.schemaUrl===void 0||e.getSchemaUrlFilter().match(t.schemaUrl))}}});function zs(o){return o instanceof bi}var Ui,Ou,Nu,Mu,Pu,bi,Cu,gu,Lu,Iu=S(()=>{x();K();Ui=class{constructor(e,t){this._writableMetricStorage=e,this._descriptor=t}_record(e,t={},i=Ye.active()){if(typeof e!="number"){m.warn(`non-number value provided to metric ${this._descriptor.name}: ${e}`);return}this._descriptor.valueType===Rt.INT&&!Number.isInteger(e)&&(m.warn(`INT value type cannot accept a floating-point value for ${this._descriptor.name}, ignoring the fractional digits.`),e=Math.trunc(e),!Number.isInteger(e))||this._writableMetricStorage.record(e,t,i,et(Date.now()))}},Ou=class extends Ui{add(e,t,i){this._record(e,t,i)}},Nu=class extends Ui{add(e,t,i){if(e<0){m.warn(`negative value provided to counter ${this._descriptor.name}: ${e}`);return}this._record(e,t,i)}},Mu=class extends Ui{record(e,t,i){this._record(e,t,i)}},Pu=class extends Ui{record(e,t,i){if(e<0){m.warn(`negative value provided to histogram ${this._descriptor.name}: ${e}`);return}this._record(e,t,i)}},bi=class{constructor(e,t,i){this._observableRegistry=i,this._descriptor=e,this._metricStorages=t}addCallback(e){this._observableRegistry.addCallback(e,this)}removeCallback(e){this._observableRegistry.removeCallback(e,this)}},Cu=class extends bi{},gu=class extends bi{},Lu=class extends bi{}});var yu,DM=S(()=>{on();Iu();yu=class{constructor(e){this._meterSharedState=e}createGauge(e,t){let i=gr(e,de.GAUGE,t),a=this._meterSharedState.registerMetricStorage(i);return new Mu(a,i)}createHistogram(e,t){let i=gr(e,de.HISTOGRAM,t),a=this._meterSharedState.registerMetricStorage(i);return new Pu(a,i)}createCounter(e,t){let i=gr(e,de.COUNTER,t),a=this._meterSharedState.registerMetricStorage(i);return new Nu(a,i)}createUpDownCounter(e,t){let i=gr(e,de.UP_DOWN_COUNTER,t),a=this._meterSharedState.registerMetricStorage(i);return new Ou(a,i)}createObservableGauge(e,t){let i=gr(e,de.OBSERVABLE_GAUGE,t),a=this._meterSharedState.registerAsyncMetricStorage(i);return new gu(i,a,this._meterSharedState.observableRegistry)}createObservableCounter(e,t){let i=gr(e,de.OBSERVABLE_COUNTER,t),a=this._meterSharedState.registerAsyncMetricStorage(i);return new Cu(i,a,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(e,t){let i=gr(e,de.OBSERVABLE_UP_DOWN_COUNTER,t),a=this._meterSharedState.registerAsyncMetricStorage(i);return new Lu(i,a,this._meterSharedState.observableRegistry)}addBatchObservableCallback(e,t){this._meterSharedState.observableRegistry.addBatchCallback(e,t)}removeBatchObservableCallback(e,t){this._meterSharedState.observableRegistry.removeBatchCallback(e,t)}}});var Vi,qp=S(()=>{on();Vi=class{constructor(e){this._instrumentDescriptor=e}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(e){this._instrumentDescriptor=gr(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:e,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}}});var Wp,xt,Xs=S(()=>{Cr();Wp=class{constructor(e){this._hash=e,this._valueMap=new Map,this._keyMap=new Map}get(e,t){return t??(t=this._hash(e)),this._valueMap.get(t)}getOrDefault(e,t){let i=this._hash(e);if(this._valueMap.has(i))return this._valueMap.get(i);let a=t();return this._keyMap.has(i)||this._keyMap.set(i,e),this._valueMap.set(i,a),a}set(e,t,i){i??(i=this._hash(e)),this._keyMap.has(i)||this._keyMap.set(i,e),this._valueMap.set(i,t)}has(e,t){return t??(t=this._hash(e)),this._valueMap.has(t)}*keys(){let e=this._keyMap.entries(),t=e.next();for(;t.done!==!0;)yield[t.value[1],t.value[0]],t=e.next()}*entries(){let e=this._valueMap.entries(),t=e.next();for(;t.done!==!0;)yield[this._keyMap.get(t.value[0]),t.value[1],t.value[0]],t=e.next()}get size(){return this._valueMap.size}},xt=class extends Wp{constructor(){super(ZN)}}});var wi,jp=S(()=>{Xs();wi=class{constructor(e){this._aggregator=e,this._activeCollectionStorage=new xt,this._cumulativeMemoStorage=new xt}record(e,t,i,a){let s=this._activeCollectionStorage.getOrDefault(t,()=>this._aggregator.createAccumulation(a));s==null||s.record(e)}batchCumulate(e,t){Array.from(e.entries()).forEach(([i,a,s])=>{let n=this._aggregator.createAccumulation(t);n==null||n.record(a);let r=n;if(this._cumulativeMemoStorage.has(i,s)){let l=this._cumulativeMemoStorage.get(i,s);r=this._aggregator.diff(l,n)}if(this._activeCollectionStorage.has(i,s)){let l=this._activeCollectionStorage.get(i,s);r=this._aggregator.merge(l,r)}this._cumulativeMemoStorage.set(i,n,s),this._activeCollectionStorage.set(i,r,s)})}collect(){let e=this._activeCollectionStorage;return this._activeCollectionStorage=new xt,e}}});function X2(o){return Array.from(o.entries())}var Bi,zp=S(()=>{cu();Xs();Bi=class o{constructor(e,t){this._aggregator=e,this._unreportedAccumulations=new Map,this._reportHistory=new Map,t.forEach(i=>{this._unreportedAccumulations.set(i,[])})}buildMetrics(e,t,i,a){this._stashAccumulations(i);let s=this._getMergedUnreportedAccumulations(e),n=s,r;if(this._reportHistory.has(e)){let c=this._reportHistory.get(e),u=c.collectionTime;r=c.aggregationTemporality,r===_r.CUMULATIVE?n=o.merge(c.accumulations,s,this._aggregator):n=o.calibrateStartTime(c.accumulations,s,u)}else r=e.selectAggregationTemporality(t.type);this._reportHistory.set(e,{accumulations:n,collectionTime:a,aggregationTemporality:r});let l=X2(n);if(l.length!==0)return this._aggregator.toMetricData(t,r,l,a)}_stashAccumulations(e){let t=this._unreportedAccumulations.keys();for(let i of t){let a=this._unreportedAccumulations.get(i);a===void 0&&(a=[],this._unreportedAccumulations.set(i,a)),a.push(e)}}_getMergedUnreportedAccumulations(e){let t=new xt,i=this._unreportedAccumulations.get(e);if(this._unreportedAccumulations.set(e,[]),i===void 0)return t;for(let a of i)t=o.merge(t,a,this._aggregator);return t}static merge(e,t,i){let a=e,s=t.entries(),n=s.next();for(;n.done!==!0;){let[r,l,c]=n.value;if(e.has(r,c)){let u=e.get(r,c),E=i.merge(u,l);a.set(r,E,c)}else a.set(r,l,c);n=s.next()}return a}static calibrateStartTime(e,t,i){for(let[a,s]of e.keys()){let n=t.get(a,s);n==null||n.setStartTime(i)}return t}}});var Du,xM=S(()=>{qp();jp();zp();Xs();Du=class extends Vi{constructor(e,t,i,a){super(e),this._attributesProcessor=i,this._deltaMetricStorage=new wi(t),this._temporalMetricStorage=new Bi(t,a)}record(e,t){let i=new xt;Array.from(e.entries()).forEach(([a,s])=>{i.set(this._attributesProcessor.process(a),s)}),this._deltaMetricStorage.batchCumulate(i,t)}collect(e,t){let i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,i,t)}}});function Xp(o,e){let t="";return o.unit!==e.unit&&(t+=` - Unit '${o.unit}' does not match '${e.unit}' `),o.type!==e.type&&(t+=` - Type '${o.type}' does not match '${e.type}' `),o.valueType!==e.valueType&&(t+=` - Value Type '${o.valueType}' does not match '${e.valueType}' `),o.description!==e.description&&(t+=` - Description '${o.description}' does not match '${e.description}' `),t}function $2(o,e){return` - use valueType '${o.valueType}' on instrument creation or use an instrument name other than '${e.name}'`}function J2(o,e){return` - use unit '${o.unit}' on instrument creation or use an instrument name other than '${e.name}'`}function Q2(o,e){let t={name:e.name,type:e.type,unit:e.unit},i=JSON.stringify(t);return` - create a new view with a name other than '${o.name}' and InstrumentSelector '${i}'`}function Z2(o,e){let t={name:e.name,type:e.type,unit:e.unit},i=JSON.stringify(t);return` - create a new view with a name other than '${o.name}' and InstrumentSelector '${i}' - OR - create a new view with the name ${o.name} and description '${o.description}' and InstrumentSelector ${i} - OR - create a new view with the name ${e.name} and description '${o.description}' and InstrumentSelector ${i}`}function $p(o,e){return o.valueType!==e.valueType?$2(o,e):o.unit!==e.unit?J2(o,e):o.type!==e.type?Q2(o,e):o.description!==e.description?Z2(o,e):""}var UM=S(()=>{});var xu,bM=S(()=>{on();x();UM();xu=class o{constructor(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}static create(){return new o}getStorages(e){let t=[];for(let a of this._sharedRegistry.values())t=t.concat(a);let i=this._perCollectorRegistry.get(e);if(i!=null)for(let a of i.values())t=t.concat(a);return t}register(e){this._registerStorage(e,this._sharedRegistry)}registerForCollector(e,t){let i=this._perCollectorRegistry.get(e);i==null&&(i=new Map,this._perCollectorRegistry.set(e,i)),this._registerStorage(t,i)}findOrUpdateCompatibleStorage(e){let t=this._sharedRegistry.get(e.name);return t===void 0?null:this._findOrUpdateCompatibleStorage(e,t)}findOrUpdateCompatibleCollectorStorage(e,t){let i=this._perCollectorRegistry.get(e);if(i===void 0)return null;let a=i.get(t.name);return a===void 0?null:this._findOrUpdateCompatibleStorage(t,a)}_registerStorage(e,t){let i=e.getInstrumentDescriptor(),a=t.get(i.name);if(a===void 0){t.set(i.name,[e]);return}a.push(e)}_findOrUpdateCompatibleStorage(e,t){let i=null;for(let a of t){let s=a.getInstrumentDescriptor();lM(s,e)?(s.description!==e.description&&(e.description.length>s.description.length&&a.updateDescription(e.description),m.warn("A view or instrument with the name ",e.name,` has already been registered, but has a different description and is incompatible with another registered view. `,`Details: `,Xp(s,e),`The longer description will be used. To resolve the conflict:`,$p(s,e))),i=a):m.warn("A view or instrument with the name ",e.name,` has already been registered and is incompatible with another registered view. `,`Details: `,Xp(s,e),`To resolve the conflict: `,$p(s,e))}return i}}});var Uu,VM=S(()=>{Uu=class{constructor(e){this._backingStorages=e}record(e,t,i,a){this._backingStorages.forEach(s=>{s.record(e,t,i,a)})}}});var bu,Vu,wM=S(()=>{x();Xs();Iu();bu=class{constructor(e,t){this._instrumentName=e,this._valueType=t,this._buffer=new xt}observe(e,t={}){if(typeof e!="number"){m.warn(`non-number value provided to metric ${this._instrumentName}: ${e}`);return}this._valueType===Rt.INT&&!Number.isInteger(e)&&(m.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`),e=Math.trunc(e),!Number.isInteger(e))||this._buffer.set(t,e)}},Vu=class{constructor(){this._buffer=new Map}observe(e,t,i={}){if(!zs(e))return;let a=this._buffer.get(e);if(a==null&&(a=new xt,this._buffer.set(e,a)),typeof t!="number"){m.warn(`non-number value provided to metric ${e._descriptor.name}: ${t}`);return}e._descriptor.valueType===Rt.INT&&!Number.isInteger(t)&&(m.warn(`INT value type cannot accept a floating-point value for ${e._descriptor.name}, ignoring the fractional digits.`),t=Math.trunc(t),!Number.isInteger(t))||a.set(i,t)}}});var wu,BM=S(()=>{x();Iu();wM();Cr();wu=class{constructor(){this._callbacks=[],this._batchCallbacks=[]}addCallback(e,t){this._findCallback(e,t)>=0||this._callbacks.push({callback:e,instrument:t})}removeCallback(e,t){let i=this._findCallback(e,t);i<0||this._callbacks.splice(i,1)}addBatchCallback(e,t){let i=new Set(t.filter(zs));if(i.size===0){m.error("BatchObservableCallback is not associated with valid instruments",t);return}this._findBatchCallback(e,i)>=0||this._batchCallbacks.push({callback:e,instruments:i})}removeBatchCallback(e,t){let i=new Set(t.filter(zs)),a=this._findBatchCallback(e,i);a<0||this._batchCallbacks.splice(a,1)}async observe(e,t){let i=this._observeCallbacks(e,t),a=this._observeBatchCallbacks(e,t);return(await tM([...i,...a])).filter(rM).map(r=>r.reason)}_observeCallbacks(e,t){return this._callbacks.map(async({callback:i,instrument:a})=>{let s=new bu(a._descriptor.name,a._descriptor.valueType),n=Promise.resolve(i(s));t!=null&&(n=xn(n,t)),await n,a._metricStorages.forEach(r=>{r.record(s._buffer,e)})})}_observeBatchCallbacks(e,t){return this._batchCallbacks.map(async({callback:i,instruments:a})=>{let s=new Vu,n=Promise.resolve(i(s));t!=null&&(n=xn(n,t)),await n,a.forEach(r=>{let l=s._buffer.get(r);l!=null&&r._metricStorages.forEach(c=>{c.record(l,e)})})})}_findCallback(e,t){return this._callbacks.findIndex(i=>i.callback===e&&i.instrument===t)}_findBatchCallback(e,t){return this._batchCallbacks.findIndex(i=>i.callback===e&&nM(i.instruments,t))}}});var Bu,GM=S(()=>{qp();jp();zp();Bu=class extends Vi{constructor(e,t,i,a){super(e),this._attributesProcessor=i,this._deltaMetricStorage=new wi(t),this._temporalMetricStorage=new Bi(t,a)}record(e,t,i,a){t=this._attributesProcessor.process(t,i),this._deltaMetricStorage.record(e,t,i,a)}collect(e,t){let i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,i,t)}}});var bn,Jp,Gu,e3,Qp=S(()=>{bn=class{static Noop(){return e3}},Jp=class extends bn{process(e,t){return e}},Gu=class extends bn{constructor(e){super(),this._allowedAttributeNames=e}process(e,t){let i={};return Object.keys(e).filter(a=>this._allowedAttributeNames.includes(a)).forEach(a=>i[a]=e[a]),i}},e3=new Jp});var ku,kM=S(()=>{on();DM();Cr();xM();bM();VM();BM();GM();Qp();ku=class{constructor(e,t){this._meterProviderSharedState=e,this._instrumentationScope=t,this.metricStorageRegistry=new xu,this.observableRegistry=new wu,this.meter=new yu(this)}registerMetricStorage(e){let t=this._registerMetricStorage(e,Bu);return t.length===1?t[0]:new Uu(t)}registerAsyncMetricStorage(e){return this._registerMetricStorage(e,Du)}async collect(e,t,i){let a=await this.observableRegistry.observe(t,i==null?void 0:i.timeoutMillis),s=this.metricStorageRegistry.getStorages(e);if(s.length===0)return null;let n=s.map(r=>r.collect(e,t)).filter(QN);return n.length===0?{errors:a}:{scopeMetrics:{scope:this._instrumentationScope,metrics:n},errors:a}}_registerMetricStorage(e,t){let a=this._meterProviderSharedState.viewRegistry.findViews(e,this._instrumentationScope).map(s=>{let n=sM(s,e),r=this.metricStorageRegistry.findOrUpdateCompatibleStorage(n);if(r!=null)return r;let l=s.aggregation.createAggregator(n),c=new t(n,l,s.attributesProcessor,this._meterProviderSharedState.metricCollectors);return this.metricStorageRegistry.register(c),c});if(a.length===0){let n=this._meterProviderSharedState.selectAggregations(e.type).map(([r,l])=>{let c=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(r,e);if(c!=null)return c;let u=l.createAggregator(e),E=new t(e,u,bn.Noop(),[r]);return this.metricStorageRegistry.registerForCollector(r,E),E});a=a.concat(n)}return a}}});var Hu,HM=S(()=>{Cr();yM();kM();Hu=class{constructor(e){this.resource=e,this.viewRegistry=new mu,this.metricCollectors=[],this.meterSharedStates=new Map}getMeterSharedState(e){let t=eM(e),i=this.meterSharedStates.get(t);return i==null&&(i=new ku(this,e),this.meterSharedStates.set(t,i)),i}selectAggregations(e){let t=[];for(let i of this.metricCollectors)t.push([i,i.selectAggregation(e)]);return t}}});var Yu,YM=S(()=>{K();Yu=class{constructor(e,t){this._sharedState=e,this._metricReader=t}async collect(e){let t=et(Date.now()),i=[],a=[],s=Array.from(this._sharedState.meterSharedStates.values()).map(async n=>{let r=await n.collect(this,t,e);(r==null?void 0:r.scopeMetrics)!=null&&i.push(r.scopeMetrics),(r==null?void 0:r.errors)!=null&&a.push(...r.errors)});return await Promise.all(s),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:i},errors:a}}async forceFlush(e){await this._metricReader.forceFlush(e)}async shutdown(e){await this._metricReader.shutdown(e)}selectAggregationTemporality(e){return this._metricReader.selectAggregationTemporality(e)}selectAggregation(e){return this._metricReader.selectAggregation(e)}}});var Fu,FM=S(()=>{x();Dn();HM();YM();Fu=class{constructor(e){var t;this._shutdown=!1;let i=ce.default().merge((t=e==null?void 0:e.resource)!==null&&t!==void 0?t:ce.empty());if(this._sharedState=new Hu(i),(e==null?void 0:e.views)!=null&&e.views.length>0)for(let a of e.views)this._sharedState.viewRegistry.addView(a);if((e==null?void 0:e.readers)!=null&&e.readers.length>0)for(let a of e.readers)this.addMetricReader(a)}getMeter(e,t="",i={}){return this._shutdown?(m.warn("A shutdown MeterProvider cannot provide a Meter"),dc()):this._sharedState.getMeterSharedState({name:e,version:t,schemaUrl:i.schemaUrl}).meter}addMetricReader(e){let t=new Yu(this._sharedState,e);e.setMetricProducer(t),this._sharedState.metricCollectors.push(t)}async shutdown(e){if(this._shutdown){m.warn("shutdown may only be called once per MeterProvider");return}this._shutdown=!0,await Promise.all(this._sharedState.metricCollectors.map(t=>t.shutdown(e)))}async forceFlush(e){if(this._shutdown){m.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(t=>t.forceFlush(e)))}}});var t3,Gi,Vn,Ku=S(()=>{t3=/[\^$\\.+?()[\]{}|]/g,Gi=class o{constructor(e){e==="*"?(this._matchAll=!0,this._regexp=/.*/):(this._matchAll=!1,this._regexp=new RegExp(o.escapePattern(e)))}match(e){return this._matchAll?!0:this._regexp.test(e)}static escapePattern(e){return`^${e.replace(t3,"\\$&").replace("*",".*")}$`}static hasWildcard(e){return e.includes("*")}},Vn=class{constructor(e){this._matchAll=e===void 0,this._pattern=e}match(e){return!!(this._matchAll||e===this._pattern)}}});var qu,KM=S(()=>{Ku();qu=class{constructor(e){var t;this._nameFilter=new Gi((t=e==null?void 0:e.name)!==null&&t!==void 0?t:"*"),this._type=e==null?void 0:e.type,this._unitFilter=new Vn(e==null?void 0:e.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}}});var Wu,qM=S(()=>{Ku();Wu=class{constructor(e){this._nameFilter=new Vn(e==null?void 0:e.name),this._versionFilter=new Vn(e==null?void 0:e.version),this._schemaUrlFilter=new Vn(e==null?void 0:e.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}}});function r3(o){return o.instrumentName==null&&o.instrumentType==null&&o.instrumentUnit==null&&o.meterName==null&&o.meterVersion==null&&o.meterSchemaUrl==null}var ju,WM=S(()=>{Ku();Qp();KM();qM();fu();ju=class{constructor(e){var t;if(r3(e))throw new Error("Cannot create view with no selector arguments supplied");if(e.name!=null&&((e==null?void 0:e.instrumentName)==null||Gi.hasWildcard(e.instrumentName)))throw new Error("Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.");e.attributeKeys!=null?this.attributesProcessor=new Gu(e.attributeKeys):this.attributesProcessor=bn.Noop(),this.name=e.name,this.description=e.description,this.aggregation=(t=e.aggregation)!==null&&t!==void 0?t:Tt.Default(),this.instrumentSelector=new qu({name:e.instrumentName,type:e.instrumentType,unit:e.instrumentUnit}),this.meterSelector=new Wu({name:e.meterName,version:e.meterVersion,schemaUrl:e.meterSchemaUrl})}}});var Zp={};ge(Zp,{Aggregation:()=>Tt,AggregationTemporality:()=>_r,ConsoleMetricExporter:()=>Ru,DataPointType:()=>tt,DefaultAggregation:()=>js,DropAggregation:()=>Ii,ExplicitBucketHistogramAggregation:()=>qs,ExponentialHistogramAggregation:()=>Ws,HistogramAggregation:()=>Di,InMemoryMetricExporter:()=>vu,InstrumentType:()=>de,LastValueAggregation:()=>yi,MeterProvider:()=>Fu,MetricReader:()=>xi,PeriodicExportingMetricReader:()=>hu,SumAggregation:()=>Do,TimeoutError:()=>yo,View:()=>ju});var zu=S(()=>{cu();Oi();Kp();gM();LM();IM();on();FM();fu();WM();Cr()});var td=A(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});Xu.AbstractAsyncHooksContextManager=void 0;var n3=k("events"),o3=["addListener","on","once","prependListener","prependOnceListener"],ed=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,t){return t instanceof n3.EventEmitter?this._bindEventEmitter(e,t):typeof t=="function"?this._bindFunction(e,t):t}_bindFunction(e,t){let i=this,a=function(...s){return i.with(e,()=>t.apply(this,s))};return Object.defineProperty(a,"length",{enumerable:!1,configurable:!0,writable:!1,value:t.length}),a}_bindEventEmitter(e,t){return this._getPatchMap(t)!==void 0||(this._createPatchMap(t),o3.forEach(a=>{t[a]!==void 0&&(t[a]=this._patchAddListener(t,t[a],e))}),typeof t.removeListener=="function"&&(t.removeListener=this._patchRemoveListener(t,t.removeListener)),typeof t.off=="function"&&(t.off=this._patchRemoveListener(t,t.off)),typeof t.removeAllListeners=="function"&&(t.removeAllListeners=this._patchRemoveAllListeners(t,t.removeAllListeners))),t}_patchRemoveListener(e,t){let i=this;return function(a,s){var n;let r=(n=i._getPatchMap(e))===null||n===void 0?void 0:n[a];if(r===void 0)return t.call(this,a,s);let l=r.get(s);return t.call(this,a,l||s)}}_patchRemoveAllListeners(e,t){let i=this;return function(a){let s=i._getPatchMap(e);return s!==void 0&&(arguments.length===0?i._createPatchMap(e):s[a]!==void 0&&delete s[a]),t.apply(this,arguments)}}_patchAddListener(e,t,i){let a=this;return function(s,n){if(a._wrapped)return t.call(this,s,n);let r=a._getPatchMap(e);r===void 0&&(r=a._createPatchMap(e));let l=r[s];l===void 0&&(l=new WeakMap,r[s]=l);let c=a.bind(i,n);l.set(n,c),a._wrapped=!0;try{return t.call(this,s,c)}finally{a._wrapped=!1}}}_createPatchMap(e){let t=Object.create(null);return e[this._kOtListeners]=t,t}_getPatchMap(e){return e[this._kOtListeners]}};Xu.AbstractAsyncHooksContextManager=ed});var jM=A($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});$u.AsyncHooksContextManager=void 0;var i3=(x(),$(Ze)),a3=k("async_hooks"),s3=td(),rd=class extends s3.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=a3.createHook({init:this._init.bind(this),before:this._before.bind(this),after:this._after.bind(this),destroy:this._destroy.bind(this),promiseResolve:this._destroy.bind(this)})}active(){var e;return(e=this._stack[this._stack.length-1])!==null&&e!==void 0?e:i3.ROOT_CONTEXT}with(e,t,i,...a){this._enterContext(e);try{return t.call(i,...a)}finally{this._exitContext()}}enable(){return this._asyncHook.enable(),this}disable(){return this._asyncHook.disable(),this._contexts.clear(),this._stack=[],this}_init(e,t){if(t==="TIMERWRAP")return;let i=this._stack[this._stack.length-1];i!==void 0&&this._contexts.set(e,i)}_destroy(e){this._contexts.delete(e)}_before(e){let t=this._contexts.get(e);t!==void 0&&this._enterContext(t)}_after(){this._exitContext()}_enterContext(e){this._stack.push(e)}_exitContext(){this._stack.pop()}};$u.AsyncHooksContextManager=rd});var zM=A(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});Ju.AsyncLocalStorageContextManager=void 0;var l3=(x(),$(Ze)),c3=k("async_hooks"),u3=td(),nd=class extends u3.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new c3.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:l3.ROOT_CONTEXT}with(e,t,i,...a){let s=i==null?t:t.bind(i);return this._asyncLocalStorage.run(e,s,...a)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};Ju.AsyncLocalStorageContextManager=nd});var XM=A(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.AsyncLocalStorageContextManager=ki.AsyncHooksContextManager=void 0;var E3=jM();Object.defineProperty(ki,"AsyncHooksContextManager",{enumerable:!0,get:function(){return E3.AsyncHooksContextManager}});var _3=zM();Object.defineProperty(ki,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return _3.AsyncLocalStorageContextManager}})});var Hi,od=S(()=>{x();Hi=Yt("OpenTelemetry Context Key B3 Debug Flag")});var wn,Yi,Fi,Ki,Qu,qi,$s=S(()=>{wn="b3",Yi="x-b3-traceid",Fi="x-b3-spanid",Ki="x-b3-sampled",Qu="x-b3-parentspanid",qi="x-b3-flags"});function p3(o){return o===pe.SAMPLED||o===pe.NONE}function d3(o){return Array.isArray(o)?o[0]:o}function eE(o,e,t){let i=e.get(o,t);return d3(i)}function f3(o,e){let t=eE(o,e,Yi);return typeof t=="string"?t.padStart(32,"0"):""}function A3(o,e){let t=eE(o,e,Fi);return typeof t=="string"?t:""}function $M(o,e){return eE(o,e,qi)==="1"?"1":void 0}function h3(o,e){let t=eE(o,e,Ki);if($M(o,e)==="1"||T3.has(t))return pe.SAMPLED;if(t===void 0||S3.has(t))return pe.NONE}var T3,S3,Zu,JM=S(()=>{x();K();od();$s();T3=new Set([!0,"true","True","1",1]),S3=new Set([!1,"false","False","0",0]);Zu=class{inject(e,t,i){let a=_e.getSpanContext(e);if(!a||!qe(a)||lt(e))return;let s=e.getValue(Hi);i.set(t,Yi,a.traceId),i.set(t,Fi,a.spanId),s==="1"?i.set(t,qi,s):a.traceFlags!==void 0&&i.set(t,Ki,(pe.SAMPLED&a.traceFlags)===pe.SAMPLED?"1":"0")}extract(e,t,i){let a=f3(t,i),s=A3(t,i),n=h3(t,i),r=$M(t,i);return Er(a)&&mo(s)&&p3(n)?(e=e.setValue(Hi,r),_e.setSpanContext(e,{traceId:a,spanId:s,isRemote:!0,traceFlags:n})):e}fields(){return[Yi,Fi,qi,Ki,Qu]}}});function N3(o){return o.length===32?o:`${R3}${o}`}function M3(o){return o&&m3.has(o)?pe.SAMPLED:pe.NONE}var v3,R3,m3,O3,tE,QM=S(()=>{x();K();od();$s();v3=/((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/,R3="0".repeat(16),m3=new Set(["d","1"]),O3="d";tE=class{inject(e,t,i){let a=_e.getSpanContext(e);if(!a||!qe(a)||lt(e))return;let s=e.getValue(Hi)||a.traceFlags&1,n=`${a.traceId}-${a.spanId}-${s}`;i.set(t,wn,n)}extract(e,t,i){let a=i.get(t,wn),s=Array.isArray(a)?a[0]:a;if(typeof s!="string")return e;let n=s.match(v3);if(!n)return e;let[,r,l,c]=n,u=N3(r);if(!Er(u)||!mo(l))return e;let E=M3(c);return c===O3&&(e=e.setValue(Hi,c)),_e.setSpanContext(e,{traceId:u,spanId:l,isRemote:!0,traceFlags:E})}fields(){return[wn]}}});var Wi,id=S(()=>{(function(o){o[o.SINGLE_HEADER=0]="SINGLE_HEADER",o[o.MULTI_HEADER=1]="MULTI_HEADER"})(Wi||(Wi={}))});var rE,ZM=S(()=>{K();JM();QM();$s();id();rE=class{constructor(e={}){this._b3MultiPropagator=new Zu,this._b3SinglePropagator=new tE,e.injectEncoding===Wi.MULTI_HEADER?(this._inject=this._b3MultiPropagator.inject,this._fields=this._b3MultiPropagator.fields()):(this._inject=this._b3SinglePropagator.inject,this._fields=this._b3SinglePropagator.fields())}inject(e,t,i){lt(e)||this._inject(e,t,i)}extract(e,t,i){let a=i.get(t,wn);return(Array.isArray(a)?a[0]:a)?this._b3SinglePropagator.extract(e,t,i):this._b3MultiPropagator.extract(e,t,i)}fields(){return this._fields}}});var eP={};ge(eP,{B3InjectEncoding:()=>Wi,B3Propagator:()=>rE,B3_CONTEXT_HEADER:()=>wn,X_B3_FLAGS:()=>qi,X_B3_PARENT_SPAN_ID:()=>Qu,X_B3_SAMPLED:()=>Ki,X_B3_SPAN_ID:()=>Fi,X_B3_TRACE_ID:()=>Yi});var tP=S(()=>{ZM();$s();id()});var P3,C3,g3,nE,oE,rP,nP=S(()=>{P3="exception.type",C3="exception.message",g3="exception.stacktrace",nE=P3,oE=C3,rP=g3});var oP=S(()=>{nP()});var iP=S(()=>{});var aP=S(()=>{iP()});var sP=S(()=>{});var lP=S(()=>{});var cP=S(()=>{oP();aP();sP();lP()});var uP,EP=S(()=>{uP="exception"});var ji,ad=S(()=>{x();K();cP();EP();ji=class{constructor(e,t,i,a,s,n,r=[],l,c,u){this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Mr.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=i,this._spanContext=a,this.parentSpanId=n,this.kind=s,this.links=r;let E=Date.now();this._performanceStartTime=Kt.now(),this._performanceOffset=E-(this._performanceStartTime+ui()),this._startTimeProvided=l!=null,this.startTime=this._getTime(l??E),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,u!=null&&this.setAttributes(u),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,t)}spanContext(){return this._spanContext}setAttribute(e,t){return t==null||this._isSpanEnded()?this:e.length===0?(m.warn(`Invalid attribute key: ${e}`),this):Pn(t)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),this):(m.warn(`Invalid attribute value set for key: ${e}`),this)}setAttributes(e){for(let[t,i]of Object.entries(e))this.setAttribute(t,i);return this}addEvent(e,t,i){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return m.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&m.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),ms(t)&&(ms(i)||(i=t),t=void 0);let a=Mn(t);return this.events.push({name:e,attributes:a,time:this._getTime(i),droppedAttributesCount:0}),this}addLink(e){return this.links.push(e),this}addLinks(e){return this.links.push(...e),this}setStatus(e){return this._isSpanEnded()?this:(this.status=e,this)}updateName(e){return this._isSpanEnded()?this:(this.name=e,this)}end(e){if(this._isSpanEnded()){m.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this._ended=!0,this.endTime=this._getTime(e),this._duration=kc(this.startTime,this.endTime),this._duration[0]<0&&(m.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&m.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e=="number"&&e<Kt.now())return vs(e+this._performanceOffset);if(typeof e=="number")return et(e);if(e instanceof Date)return et(e.getTime());if(Ei(e))return e;if(this._startTimeProvided)return et(Date.now());let t=Kt.now()-this._performanceStartTime;return Os(this.startTime,et(t))}isRecording(){return this._ended===!1}recordException(e,t){let i={};typeof e=="string"?i[oE]=e:e&&(e.code?i[nE]=e.code.toString():e.name&&(i[nE]=e.name),e.message&&(i[oE]=e.message),e.stack&&(i[rP]=e.stack)),i[nE]||i[oE]?this.addEvent(uP,i,t):m.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){return this._ended&&m.warn(`Can not execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`),this._ended}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substr(0,t)}_truncateToSize(e){let t=this._attributeValueLengthLimit;return t<=0?(m.warn(`Attribute value limit must be positive, got ${t}`),e):typeof e=="string"?this._truncateToLimitUtil(e,t):Array.isArray(e)?e.map(i=>typeof i=="string"?this._truncateToLimitUtil(i,t):i):e}}});var Tr,Js=S(()=>{(function(o){o[o.NOT_RECORD=0]="NOT_RECORD",o[o.RECORD=1]="RECORD",o[o.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Tr||(Tr={}))});var Ir,iE=S(()=>{Js();Ir=class{shouldSample(){return{decision:Tr.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}});var Wt,aE=S(()=>{Js();Wt=class{shouldSample(){return{decision:Tr.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}});var Bn,sd=S(()=>{x();K();iE();aE();Bn=class{constructor(e){var t,i,a,s;this._root=e.root,this._root||(Me(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Wt),this._remoteParentSampled=(t=e.remoteParentSampled)!==null&&t!==void 0?t:new Wt,this._remoteParentNotSampled=(i=e.remoteParentNotSampled)!==null&&i!==void 0?i:new Ir,this._localParentSampled=(a=e.localParentSampled)!==null&&a!==void 0?a:new Wt,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new Ir}shouldSample(e,t,i,a,s,n){let r=_e.getSpanContext(e);return!r||!qe(r)?this._root.shouldSample(e,t,i,a,s,n):r.isRemote?r.traceFlags&pe.SAMPLED?this._remoteParentSampled.shouldSample(e,t,i,a,s,n):this._remoteParentNotSampled.shouldSample(e,t,i,a,s,n):r.traceFlags&pe.SAMPLED?this._localParentSampled.shouldSample(e,t,i,a,s,n):this._localParentNotSampled.shouldSample(e,t,i,a,s,n)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}});var xo,ld=S(()=>{x();Js();xo=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:Er(t)&&this._accumulate(t)<this._upperBound?Tr.RECORD_AND_SAMPLED:Tr.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let i=0;i<e.length/8;i++){let a=i*8,s=parseInt(e.slice(a,a+8),16);t=(t^s)>>>0}return t}}});function sE(){let o=Z();return{sampler:cd(L3),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:o.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:o.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:o.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:o.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:o.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:o.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:o.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:o.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function cd(o=Z()){switch(o.OTEL_TRACES_SAMPLER){case Nt.AlwaysOn:return new Wt;case Nt.AlwaysOff:return new Ir;case Nt.ParentBasedAlwaysOn:return new Bn({root:new Wt});case Nt.ParentBasedAlwaysOff:return new Bn({root:new Ir});case Nt.TraceIdRatio:return new xo(_P(o));case Nt.ParentBasedTraceIdRatio:return new Bn({root:new xo(_P(o))});default:return m.error(`OTEL_TRACES_SAMPLER value "${o.OTEL_TRACES_SAMPLER} invalid, defaulting to ${I3}".`),new Wt}}function _P(o){if(o.OTEL_TRACES_SAMPLER_ARG===void 0||o.OTEL_TRACES_SAMPLER_ARG==="")return m.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${zi}.`),zi;let e=Number(o.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(m.error(`OTEL_TRACES_SAMPLER_ARG=${o.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${zi}.`),zi):e<0||e>1?(m.error(`OTEL_TRACES_SAMPLER_ARG=${o.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${zi}.`),zi):e}var L3,I3,zi,ud=S(()=>{x();K();iE();aE();sd();ld();L3=Z(),I3=Nt.AlwaysOn,zi=1});function TP(o){let e={sampler:cd()},t=sE(),i=Object.assign({},t,e,o);return i.generalLimits=Object.assign({},t.generalLimits,o.generalLimits||{}),i.spanLimits=Object.assign({},t.spanLimits,o.spanLimits||{}),i}function SP(o){var e,t,i,a,s,n,r,l,c,u,E,d;let f=Object.assign({},o.spanLimits),O=Cn();return f.attributeCountLimit=(n=(s=(a=(t=(e=o.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&t!==void 0?t:(i=o.generalLimits)===null||i===void 0?void 0:i.attributeCountLimit)!==null&&a!==void 0?a:O.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:O.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&n!==void 0?n:tn,f.attributeValueLengthLimit=(d=(E=(u=(l=(r=o.spanLimits)===null||r===void 0?void 0:r.attributeValueLengthLimit)!==null&&l!==void 0?l:(c=o.generalLimits)===null||c===void 0?void 0:c.attributeValueLengthLimit)!==null&&u!==void 0?u:O.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&E!==void 0?E:O.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&d!==void 0?d:en,Object.assign({},o,{spanLimits:f})}var Ed=S(()=>{ud();K()});var lE,pP=S(()=>{x();K();lE=class{constructor(e,t){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;let i=Z();this._maxExportBatchSize=typeof(t==null?void 0:t.maxExportBatchSize)=="number"?t.maxExportBatchSize:i.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof(t==null?void 0:t.maxQueueSize)=="number"?t.maxQueueSize:i.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof(t==null?void 0:t.scheduledDelayMillis)=="number"?t.scheduledDelayMillis:i.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof(t==null?void 0:t.exportTimeoutMillis)=="number"?t.exportTimeoutMillis:i.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new We(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(m.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(e,t){}onEnd(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&pe.SAMPLED&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown())}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&m.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(m.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,t)=>{let i=[],a=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let s=0,n=a;s<n;s++)i.push(this._flushOneBatch());Promise.all(i).then(()=>{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,t)=>{let i=setTimeout(()=>{t(new Error("Timeout"))},this._exportTimeoutMillis);Ye.with(ai(Ye.active()),()=>{let a;this._finishedSpans.length<=this._maxExportBatchSize?(a=this._finishedSpans,this._finishedSpans=[]):a=this._finishedSpans.splice(0,this._maxExportBatchSize);let s=()=>this._exporter.export(a,r=>{var l;clearTimeout(i),r.code===te.SUCCESS?e():t((l=r.error)!==null&&l!==void 0?l:new Error("BatchSpanProcessor: span export failed"))}),n=null;for(let r=0,l=a.length;r<l;r++){let c=a[r];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(n??(n=[]),n.push(c.resource.waitForAsyncAttributes()))}n===null?s():Promise.all(n).then(s,r=>{Me(r),t(r)})})})}_maybeStartTimer(){if(this._isExporting)return;let e=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(t=>{this._isExporting=!1,Me(t)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),Pr(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}}});var Gn,dP=S(()=>{pP();Gn=class extends lE{onShutdown(){}}});function fP(o){return function(){for(let t=0;t<o/4;t++)cE.writeUInt32BE(Math.random()*2**32>>>0,t*4);for(let t=0;t<o&&!(cE[t]>0);t++)t===o-1&&(cE[o-1]=1);return cE.toString("hex",0,o)}}var kn,cE,AP=S(()=>{kn=class{constructor(){this.generateTraceId=fP(16),this.generateSpanId=fP(8)}},cE=Buffer.allocUnsafe(16)});var hP=S(()=>{dP();AP()});var uE=S(()=>{hP()});var Xi,vP=S(()=>{x();K();ad();Ed();uE();Xi=class{constructor(e,t,i){this._tracerProvider=i;let a=TP(t);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=t.idGenerator||new kn,this.resource=i.resource,this.instrumentationLibrary=e}startSpan(e,t={},i=Ye.active()){var a,s,n;t.root&&(i=_e.deleteSpan(i));let r=_e.getSpan(i);if(lt(i))return m.debug("Instrumentation suppressed, returning Noop Span"),_e.wrapSpanContext(ii);let l=r==null?void 0:r.spanContext(),c=this._idGenerator.generateSpanId(),u,E,d;!l||!_e.isSpanContextValid(l)?u=this._idGenerator.generateTraceId():(u=l.traceId,E=l.traceState,d=l.spanId);let f=(a=t.kind)!==null&&a!==void 0?a:Ft.INTERNAL,O=((s=t.links)!==null&&s!==void 0?s:[]).map(W=>({context:W.context,attributes:Mn(W.attributes)})),R=Mn(t.attributes),M=this._sampler.shouldSample(i,u,e,f,R,O);E=(n=M.traceState)!==null&&n!==void 0?n:E;let P=M.decision===mt.RECORD_AND_SAMPLED?pe.SAMPLED:pe.NONE,C={traceId:u,spanId:c,traceFlags:P,traceState:E};if(M.decision===mt.NOT_RECORD)return m.debug("Recording is off, propagating context in a non-recording span"),_e.wrapSpanContext(C);let b=Mn(Object.assign(R,M.attributes));return new ji(this,i,e,C,f,d,O,t.startTime,void 0,b)}startActiveSpan(e,t,i,a){let s,n,r;if(arguments.length<2)return;arguments.length===2?r=t:arguments.length===3?(s=t,r=i):(s=t,n=i,r=a);let l=n??Ye.active(),c=this.startSpan(e,s,l),u=_e.setSpan(l,c);return Ye.with(u,r,void 0,c)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}}});var EE,RP=S(()=>{K();EE=class{constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise(t=>{Promise.all(e).then(()=>{t()}).catch(i=>{Me(i||new Error("MultiSpanProcessor: forceFlush failed")),t()})})}onStart(e,t){for(let i of this._spanProcessors)i.onStart(e,t)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise((t,i)=>{Promise.all(e).then(()=>{t()},i)})}}});var $i,_d=S(()=>{$i=class{onStart(e,t){}onEnd(e){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}}});var an,Ji,mP=S(()=>{x();K();Dn();Uo();ud();RP();_d();uE();Ed();(function(o){o[o.resolved=0]="resolved",o[o.timeout=1]="timeout",o[o.error=2]="error",o[o.unresolved=3]="unresolved"})(an||(an={}));Ji=class{constructor(e={}){var t;this._registeredSpanProcessors=[],this._tracers=new Map;let i=pi({},sE(),SP(e));this.resource=(t=i.resource)!==null&&t!==void 0?t:ce.empty(),this.resource=ce.default().merge(this.resource),this._config=Object.assign({},i,{resource:this.resource});let a=this._buildExporterFromEnv();if(a!==void 0){let s=new Gn(a);this.activeSpanProcessor=s}else this.activeSpanProcessor=new $i}getTracer(e,t,i){let a=`${e}@${t||""}:${(i==null?void 0:i.schemaUrl)||""}`;return this._tracers.has(a)||this._tracers.set(a,new Xi({name:e,version:t,schemaUrl:i==null?void 0:i.schemaUrl},this._config,this)),this._tracers.get(a)}addSpanProcessor(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(t=>m.error("Error while trying to shutdown current span processor",t)),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new EE(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(e={}){_e.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&Ye.setGlobalContextManager(e.contextManager),e.propagator&&Ot.setGlobalPropagator(e.propagator)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,t=this._registeredSpanProcessors.map(i=>new Promise(a=>{let s,n=setTimeout(()=>{a(new Error(`Span processor did not completed within timeout period of ${e} ms`)),s=an.timeout},e);i.forceFlush().then(()=>{clearTimeout(n),s!==an.timeout&&(s=an.resolved,a(s))}).catch(r=>{clearTimeout(n),s=an.error,a(r)})}));return new Promise((i,a)=>{Promise.all(t).then(s=>{let n=s.filter(r=>r!==an.resolved);n.length>0?a(n):i()}).catch(s=>a([s]))})}shutdown(){return this.activeSpanProcessor.shutdown()}_getPropagator(e){var t;return(t=this.constructor._registeredPropagators.get(e))===null||t===void 0?void 0:t()}_getSpanExporter(e){var t;return(t=this.constructor._registeredExporters.get(e))===null||t===void 0?void 0:t()}_buildPropagatorFromEnv(){let e=Array.from(new Set(Z().OTEL_PROPAGATORS)),i=e.map(a=>{let s=this._getPropagator(a);return s||m.warn(`Propagator "${a}" requested through environment variable is unavailable.`),s}).reduce((a,s)=>(s&&a.push(s),a),[]);if(i.length!==0)return e.length===1?i[0]:new _i({propagators:i})}_buildExporterFromEnv(){let e=Z().OTEL_TRACES_EXPORTER;if(e==="none"||e==="")return;let t=this._getSpanExporter(e);return t||m.error(`Exporter "${e}" requested through environment variable is unavailable.`),t}};Ji._registeredPropagators=new Map([["tracecontext",()=>new Si],["baggage",()=>new li]]);Ji._registeredExporters=new Map});var _E,OP=S(()=>{K();_E=class{export(e,t){return this._sendSpans(e,t)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(e){var t;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationLibrary,traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:(t=e.spanContext().traceState)===null||t===void 0?void 0:t.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:ct(e.startTime),duration:ct(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}}_sendSpans(e,t){for(let i of e)console.dir(this._exportInfo(i),{depth:3});if(t)return t({code:te.SUCCESS})}}});var TE,NP=S(()=>{K();TE=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(e,t){if(this._stopped)return t({code:te.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...e),setTimeout(()=>t({code:te.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}}});var SE,MP=S(()=>{x();K();SE=class{constructor(e){this._exporter=e,this._shutdownOnce=new We(this._shutdown,this),this._unresolvedExports=new Set}async forceFlush(){await Promise.all(Array.from(this._unresolvedExports)),this._exporter.forceFlush&&await this._exporter.forceFlush()}onStart(e,t){}onEnd(e){var t,i;if(this._shutdownOnce.isCalled||!(e.spanContext().traceFlags&pe.SAMPLED))return;let a=()=>rn._export(this._exporter,[e]).then(s=>{var n;s.code!==te.SUCCESS&&Me((n=s.error)!==null&&n!==void 0?n:new Error(`SimpleSpanProcessor: span export failed (status ${s})`))}).catch(s=>{Me(s)});if(e.resource.asyncAttributesPending){let s=(i=(t=e.resource).waitForAsyncAttributes)===null||i===void 0?void 0:i.call(t).then(()=>(s!=null&&this._unresolvedExports.delete(s),a()),n=>Me(n));s!=null&&this._unresolvedExports.add(s)}else a()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}}});var Qi={};ge(Qi,{AlwaysOffSampler:()=>Ir,AlwaysOnSampler:()=>Wt,BasicTracerProvider:()=>Ji,BatchSpanProcessor:()=>Gn,ConsoleSpanExporter:()=>_E,ForceFlushState:()=>an,InMemorySpanExporter:()=>TE,NoopSpanProcessor:()=>$i,ParentBasedSampler:()=>Bn,RandomIdGenerator:()=>kn,SamplingDecision:()=>Tr,SimpleSpanProcessor:()=>SE,Span:()=>ji,TraceIdRatioBasedSampler:()=>xo,Tracer:()=>Xi});var Uo=S(()=>{vP();mP();uE();OP();NP();MP();_d();iE();aE();sd();ld();Js();ad()});var Qs=A((Qve,PP)=>{var y3="2.0.0",D3=Number.MAX_SAFE_INTEGER||9007199254740991,x3=16,U3=250,b3=["major","premajor","minor","preminor","patch","prepatch","prerelease"];PP.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:x3,MAX_SAFE_BUILD_LENGTH:U3,MAX_SAFE_INTEGER:D3,RELEASE_TYPES:b3,SEMVER_SPEC_VERSION:y3,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Zs=A((Zve,CP)=>{var V3=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...o)=>console.error("SEMVER",...o):()=>{};CP.exports=V3});var Zi=A((sn,gP)=>{var{MAX_SAFE_COMPONENT_LENGTH:Td,MAX_SAFE_BUILD_LENGTH:w3,MAX_LENGTH:B3}=Qs(),G3=Zs();sn=gP.exports={};var k3=sn.re=[],H3=sn.safeRe=[],V=sn.src=[],w=sn.t={},Y3=0,Sd="[a-zA-Z0-9-]",F3=[["\\s",1],["\\d",B3],[Sd,w3]],K3=o=>{for(let[e,t]of F3)o=o.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return o},re=(o,e,t)=>{let i=K3(e),a=Y3++;G3(o,a,e),w[o]=a,V[a]=e,k3[a]=new RegExp(e,t?"g":void 0),H3[a]=new RegExp(i,t?"g":void 0)};re("NUMERICIDENTIFIER","0|[1-9]\\d*");re("NUMERICIDENTIFIERLOOSE","\\d+");re("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Sd}*`);re("MAINVERSION",`(${V[w.NUMERICIDENTIFIER]})\\.(${V[w.NUMERICIDENTIFIER]})\\.(${V[w.NUMERICIDENTIFIER]})`);re("MAINVERSIONLOOSE",`(${V[w.NUMERICIDENTIFIERLOOSE]})\\.(${V[w.NUMERICIDENTIFIERLOOSE]})\\.(${V[w.NUMERICIDENTIFIERLOOSE]})`);re("PRERELEASEIDENTIFIER",`(?:${V[w.NUMERICIDENTIFIER]}|${V[w.NONNUMERICIDENTIFIER]})`);re("PRERELEASEIDENTIFIERLOOSE",`(?:${V[w.NUMERICIDENTIFIERLOOSE]}|${V[w.NONNUMERICIDENTIFIER]})`);re("PRERELEASE",`(?:-(${V[w.PRERELEASEIDENTIFIER]}(?:\\.${V[w.PRERELEASEIDENTIFIER]})*))`);re("PRERELEASELOOSE",`(?:-?(${V[w.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${V[w.PRERELEASEIDENTIFIERLOOSE]})*))`);re("BUILDIDENTIFIER",`${Sd}+`);re("BUILD",`(?:\\+(${V[w.BUILDIDENTIFIER]}(?:\\.${V[w.BUILDIDENTIFIER]})*))`);re("FULLPLAIN",`v?${V[w.MAINVERSION]}${V[w.PRERELEASE]}?${V[w.BUILD]}?`);re("FULL",`^${V[w.FULLPLAIN]}$`);re("LOOSEPLAIN",`[v=\\s]*${V[w.MAINVERSIONLOOSE]}${V[w.PRERELEASELOOSE]}?${V[w.BUILD]}?`);re("LOOSE",`^${V[w.LOOSEPLAIN]}$`);re("GTLT","((?:<|>)?=?)");re("XRANGEIDENTIFIERLOOSE",`${V[w.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);re("XRANGEIDENTIFIER",`${V[w.NUMERICIDENTIFIER]}|x|X|\\*`);re("XRANGEPLAIN",`[v=\\s]*(${V[w.XRANGEIDENTIFIER]})(?:\\.(${V[w.XRANGEIDENTIFIER]})(?:\\.(${V[w.XRANGEIDENTIFIER]})(?:${V[w.PRERELEASE]})?${V[w.BUILD]}?)?)?`);re("XRANGEPLAINLOOSE",`[v=\\s]*(${V[w.XRANGEIDENTIFIERLOOSE]})(?:\\.(${V[w.XRANGEIDENTIFIERLOOSE]})(?:\\.(${V[w.XRANGEIDENTIFIERLOOSE]})(?:${V[w.PRERELEASELOOSE]})?${V[w.BUILD]}?)?)?`);re("XRANGE",`^${V[w.GTLT]}\\s*${V[w.XRANGEPLAIN]}$`);re("XRANGELOOSE",`^${V[w.GTLT]}\\s*${V[w.XRANGEPLAINLOOSE]}$`);re("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Td}})(?:\\.(\\d{1,${Td}}))?(?:\\.(\\d{1,${Td}}))?`);re("COERCE",`${V[w.COERCEPLAIN]}(?:$|[^\\d])`);re("COERCEFULL",V[w.COERCEPLAIN]+`(?:${V[w.PRERELEASE]})?(?:${V[w.BUILD]})?(?:$|[^\\d])`);re("COERCERTL",V[w.COERCE],!0);re("COERCERTLFULL",V[w.COERCEFULL],!0);re("LONETILDE","(?:~>?)");re("TILDETRIM",`(\\s*)${V[w.LONETILDE]}\\s+`,!0);sn.tildeTrimReplace="$1~";re("TILDE",`^${V[w.LONETILDE]}${V[w.XRANGEPLAIN]}$`);re("TILDELOOSE",`^${V[w.LONETILDE]}${V[w.XRANGEPLAINLOOSE]}$`);re("LONECARET","(?:\\^)");re("CARETTRIM",`(\\s*)${V[w.LONECARET]}\\s+`,!0);sn.caretTrimReplace="$1^";re("CARET",`^${V[w.LONECARET]}${V[w.XRANGEPLAIN]}$`);re("CARETLOOSE",`^${V[w.LONECARET]}${V[w.XRANGEPLAINLOOSE]}$`);re("COMPARATORLOOSE",`^${V[w.GTLT]}\\s*(${V[w.LOOSEPLAIN]})$|^$`);re("COMPARATOR",`^${V[w.GTLT]}\\s*(${V[w.FULLPLAIN]})$|^$`);re("COMPARATORTRIM",`(\\s*)${V[w.GTLT]}\\s*(${V[w.LOOSEPLAIN]}|${V[w.XRANGEPLAIN]})`,!0);sn.comparatorTrimReplace="$1$2$3";re("HYPHENRANGE",`^\\s*(${V[w.XRANGEPLAIN]})\\s+-\\s+(${V[w.XRANGEPLAIN]})\\s*$`);re("HYPHENRANGELOOSE",`^\\s*(${V[w.XRANGEPLAINLOOSE]})\\s+-\\s+(${V[w.XRANGEPLAINLOOSE]})\\s*$`);re("STAR","(<|>)?=?\\s*\\*");re("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");re("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var pE=A((eRe,LP)=>{var q3=Object.freeze({loose:!0}),W3=Object.freeze({}),j3=o=>o?typeof o!="object"?q3:o:W3;LP.exports=j3});var pd=A((tRe,DP)=>{var IP=/^[0-9]+$/,yP=(o,e)=>{let t=IP.test(o),i=IP.test(e);return t&&i&&(o=+o,e=+e),o===e?0:t&&!i?-1:i&&!t?1:o<e?-1:1},z3=(o,e)=>yP(e,o);DP.exports={compareIdentifiers:yP,rcompareIdentifiers:z3}});var ut=A((rRe,VP)=>{var dE=Zs(),{MAX_LENGTH:xP,MAX_SAFE_INTEGER:fE}=Qs(),{safeRe:UP,t:bP}=Zi(),X3=pE(),{compareIdentifiers:ea}=pd(),dd=class o{constructor(e,t){if(t=X3(t),e instanceof o){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>xP)throw new TypeError(`version is longer than ${xP} characters`);dE("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?UP[bP.LOOSE]:UP[bP.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>fE||this.major<0)throw new TypeError("Invalid major version");if(this.minor>fE||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>fE||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let s=+a;if(s>=0&&s<fE)return s}return a}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(dE("SemVer.compare",this.version,this.options,e),!(e instanceof o)){if(typeof e=="string"&&e===this.version)return 0;e=new o(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof o||(e=new o(e,this.options)),ea(this.major,e.major)||ea(this.minor,e.minor)||ea(this.patch,e.patch)}comparePre(e){if(e instanceof o||(e=new o(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let i=this.prerelease[t],a=e.prerelease[t];if(dE("prerelease compare",t,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return ea(i,a)}while(++t)}compareBuild(e){e instanceof o||(e=new o(e,this.options));let t=0;do{let i=this.build[t],a=e.build[t];if(dE("build compare",t,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return ea(i,a)}while(++t)}inc(e,t,i){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,i),this.inc("pre",t,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,i),this.inc("pre",t,i);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let a=Number(i)?1:0;if(!t&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[a];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(t===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(t){let s=[t,a];i===!1&&(s=[t]),ea(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};VP.exports=dd});var bo=A((nRe,BP)=>{var wP=ut(),$3=(o,e,t=!1)=>{if(o instanceof wP)return o;try{return new wP(o,e)}catch(i){if(!t)return null;throw i}};BP.exports=$3});var kP=A((oRe,GP)=>{var J3=bo(),Q3=(o,e)=>{let t=J3(o,e);return t?t.version:null};GP.exports=Q3});var YP=A((iRe,HP)=>{var Z3=bo(),eK=(o,e)=>{let t=Z3(o.trim().replace(/^[=v]+/,""),e);return t?t.version:null};HP.exports=eK});var qP=A((aRe,KP)=>{var FP=ut(),tK=(o,e,t,i,a)=>{typeof t=="string"&&(a=i,i=t,t=void 0);try{return new FP(o instanceof FP?o.version:o,t).inc(e,i,a).version}catch{return null}};KP.exports=tK});var zP=A((sRe,jP)=>{var WP=bo(),rK=(o,e)=>{let t=WP(o,null,!0),i=WP(e,null,!0),a=t.compare(i);if(a===0)return null;let s=a>0,n=s?t:i,r=s?i:t,l=!!n.prerelease.length;if(!!r.prerelease.length&&!l)return!r.patch&&!r.minor?"major":n.patch?"patch":n.minor?"minor":"major";let u=l?"pre":"";return t.major!==i.major?u+"major":t.minor!==i.minor?u+"minor":t.patch!==i.patch?u+"patch":"prerelease"};jP.exports=rK});var $P=A((lRe,XP)=>{var nK=ut(),oK=(o,e)=>new nK(o,e).major;XP.exports=oK});var QP=A((cRe,JP)=>{var iK=ut(),aK=(o,e)=>new iK(o,e).minor;JP.exports=aK});var eC=A((uRe,ZP)=>{var sK=ut(),lK=(o,e)=>new sK(o,e).patch;ZP.exports=lK});var rC=A((ERe,tC)=>{var cK=bo(),uK=(o,e)=>{let t=cK(o,e);return t&&t.prerelease.length?t.prerelease:null};tC.exports=uK});var jt=A((_Re,oC)=>{var nC=ut(),EK=(o,e,t)=>new nC(o,t).compare(new nC(e,t));oC.exports=EK});var aC=A((TRe,iC)=>{var _K=jt(),TK=(o,e,t)=>_K(e,o,t);iC.exports=TK});var lC=A((SRe,sC)=>{var SK=jt(),pK=(o,e)=>SK(o,e,!0);sC.exports=pK});var AE=A((pRe,uC)=>{var cC=ut(),dK=(o,e,t)=>{let i=new cC(o,t),a=new cC(e,t);return i.compare(a)||i.compareBuild(a)};uC.exports=dK});var _C=A((dRe,EC)=>{var fK=AE(),AK=(o,e)=>o.sort((t,i)=>fK(t,i,e));EC.exports=AK});var SC=A((fRe,TC)=>{var hK=AE(),vK=(o,e)=>o.sort((t,i)=>hK(i,t,e));TC.exports=vK});var el=A((ARe,pC)=>{var RK=jt(),mK=(o,e,t)=>RK(o,e,t)>0;pC.exports=mK});var hE=A((hRe,dC)=>{var OK=jt(),NK=(o,e,t)=>OK(o,e,t)<0;dC.exports=NK});var fd=A((vRe,fC)=>{var MK=jt(),PK=(o,e,t)=>MK(o,e,t)===0;fC.exports=PK});var Ad=A((RRe,AC)=>{var CK=jt(),gK=(o,e,t)=>CK(o,e,t)!==0;AC.exports=gK});var vE=A((mRe,hC)=>{var LK=jt(),IK=(o,e,t)=>LK(o,e,t)>=0;hC.exports=IK});var RE=A((ORe,vC)=>{var yK=jt(),DK=(o,e,t)=>yK(o,e,t)<=0;vC.exports=DK});var hd=A((NRe,RC)=>{var xK=fd(),UK=Ad(),bK=el(),VK=vE(),wK=hE(),BK=RE(),GK=(o,e,t,i)=>{switch(e){case"===":return typeof o=="object"&&(o=o.version),typeof t=="object"&&(t=t.version),o===t;case"!==":return typeof o=="object"&&(o=o.version),typeof t=="object"&&(t=t.version),o!==t;case"":case"=":case"==":return xK(o,t,i);case"!=":return UK(o,t,i);case">":return bK(o,t,i);case">=":return VK(o,t,i);case"<":return wK(o,t,i);case"<=":return BK(o,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};RC.exports=GK});var OC=A((MRe,mC)=>{var kK=ut(),HK=bo(),{safeRe:mE,t:OE}=Zi(),YK=(o,e)=>{if(o instanceof kK)return o;if(typeof o=="number"&&(o=String(o)),typeof o!="string")return null;e=e||{};let t=null;if(!e.rtl)t=o.match(e.includePrerelease?mE[OE.COERCEFULL]:mE[OE.COERCE]);else{let l=e.includePrerelease?mE[OE.COERCERTLFULL]:mE[OE.COERCERTL],c;for(;(c=l.exec(o))&&(!t||t.index+t[0].length!==o.length);)(!t||c.index+c[0].length!==t.index+t[0].length)&&(t=c),l.lastIndex=c.index+c[1].length+c[2].length;l.lastIndex=-1}if(t===null)return null;let i=t[2],a=t[3]||"0",s=t[4]||"0",n=e.includePrerelease&&t[5]?`-${t[5]}`:"",r=e.includePrerelease&&t[6]?`+${t[6]}`:"";return HK(`${i}.${a}.${s}${n}${r}`,e)};mC.exports=YK});var MC=A((PRe,NC)=>{var vd=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let a=this.map.keys().next().value;this.delete(a)}this.map.set(e,t)}return this}};NC.exports=vd});var zt=A((CRe,LC)=>{var FK=/\s+/g,Rd=class o{constructor(e,t){if(t=qK(t),e instanceof o)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new o(e.raw,t);if(e instanceof md)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(FK," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(a=>!CC(a[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&QK(a[0])){this.set=[a];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let i=0;i<t.length;i++)i>0&&(this.formatted+=" "),this.formatted+=t[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let i=((this.options.includePrerelease&&$K)|(this.options.loose&&JK))+":"+e,a=PC.get(i);if(a)return a;let s=this.options.loose,n=s?Mt[St.HYPHENRANGELOOSE]:Mt[St.HYPHENRANGE];e=e.replace(n,lq(this.options.includePrerelease)),Le("hyphen replace",e),e=e.replace(Mt[St.COMPARATORTRIM],jK),Le("comparator trim",e),e=e.replace(Mt[St.TILDETRIM],zK),Le("tilde trim",e),e=e.replace(Mt[St.CARETTRIM],XK),Le("caret trim",e);let r=e.split(" ").map(E=>ZK(E,this.options)).join(" ").split(/\s+/).map(E=>sq(E,this.options));s&&(r=r.filter(E=>(Le("loose invalid filter",E,this.options),!!E.match(Mt[St.COMPARATORLOOSE])))),Le("range list",r);let l=new Map,c=r.map(E=>new md(E,this.options));for(let E of c){if(CC(E))return[E];l.set(E.value,E)}l.size>1&&l.has("")&&l.delete("");let u=[...l.values()];return PC.set(i,u),u}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Range is required");return this.set.some(i=>gC(i,t)&&e.set.some(a=>gC(a,t)&&i.every(s=>a.every(n=>s.intersects(n,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new WK(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(cq(this.set[t],e,this.options))return!0;return!1}};LC.exports=Rd;var KK=MC(),PC=new KK,qK=pE(),md=tl(),Le=Zs(),WK=ut(),{safeRe:Mt,t:St,comparatorTrimReplace:jK,tildeTrimReplace:zK,caretTrimReplace:XK}=Zi(),{FLAG_INCLUDE_PRERELEASE:$K,FLAG_LOOSE:JK}=Qs(),CC=o=>o.value==="<0.0.0-0",QK=o=>o.value==="",gC=(o,e)=>{let t=!0,i=o.slice(),a=i.pop();for(;t&&i.length;)t=i.every(s=>a.intersects(s,e)),a=i.pop();return t},ZK=(o,e)=>(Le("comp",o,e),o=rq(o,e),Le("caret",o),o=eq(o,e),Le("tildes",o),o=oq(o,e),Le("xrange",o),o=aq(o,e),Le("stars",o),o),pt=o=>!o||o.toLowerCase()==="x"||o==="*",eq=(o,e)=>o.trim().split(/\s+/).map(t=>tq(t,e)).join(" "),tq=(o,e)=>{let t=e.loose?Mt[St.TILDELOOSE]:Mt[St.TILDE];return o.replace(t,(i,a,s,n,r)=>{Le("tilde",o,i,a,s,n,r);let l;return pt(a)?l="":pt(s)?l=`>=${a}.0.0 <${+a+1}.0.0-0`:pt(n)?l=`>=${a}.${s}.0 <${a}.${+s+1}.0-0`:r?(Le("replaceTilde pr",r),l=`>=${a}.${s}.${n}-${r} <${a}.${+s+1}.0-0`):l=`>=${a}.${s}.${n} <${a}.${+s+1}.0-0`,Le("tilde return",l),l})},rq=(o,e)=>o.trim().split(/\s+/).map(t=>nq(t,e)).join(" "),nq=(o,e)=>{Le("caret",o,e);let t=e.loose?Mt[St.CARETLOOSE]:Mt[St.CARET],i=e.includePrerelease?"-0":"";return o.replace(t,(a,s,n,r,l)=>{Le("caret",o,a,s,n,r,l);let c;return pt(s)?c="":pt(n)?c=`>=${s}.0.0${i} <${+s+1}.0.0-0`:pt(r)?s==="0"?c=`>=${s}.${n}.0${i} <${s}.${+n+1}.0-0`:c=`>=${s}.${n}.0${i} <${+s+1}.0.0-0`:l?(Le("replaceCaret pr",l),s==="0"?n==="0"?c=`>=${s}.${n}.${r}-${l} <${s}.${n}.${+r+1}-0`:c=`>=${s}.${n}.${r}-${l} <${s}.${+n+1}.0-0`:c=`>=${s}.${n}.${r}-${l} <${+s+1}.0.0-0`):(Le("no pr"),s==="0"?n==="0"?c=`>=${s}.${n}.${r}${i} <${s}.${n}.${+r+1}-0`:c=`>=${s}.${n}.${r}${i} <${s}.${+n+1}.0-0`:c=`>=${s}.${n}.${r} <${+s+1}.0.0-0`),Le("caret return",c),c})},oq=(o,e)=>(Le("replaceXRanges",o,e),o.split(/\s+/).map(t=>iq(t,e)).join(" ")),iq=(o,e)=>{o=o.trim();let t=e.loose?Mt[St.XRANGELOOSE]:Mt[St.XRANGE];return o.replace(t,(i,a,s,n,r,l)=>{Le("xRange",o,i,a,s,n,r,l);let c=pt(s),u=c||pt(n),E=u||pt(r),d=E;return a==="="&&d&&(a=""),l=e.includePrerelease?"-0":"",c?a===">"||a==="<"?i="<0.0.0-0":i="*":a&&d?(u&&(n=0),r=0,a===">"?(a=">=",u?(s=+s+1,n=0,r=0):(n=+n+1,r=0)):a==="<="&&(a="<",u?s=+s+1:n=+n+1),a==="<"&&(l="-0"),i=`${a+s}.${n}.${r}${l}`):u?i=`>=${s}.0.0${l} <${+s+1}.0.0-0`:E&&(i=`>=${s}.${n}.0${l} <${s}.${+n+1}.0-0`),Le("xRange return",i),i})},aq=(o,e)=>(Le("replaceStars",o,e),o.trim().replace(Mt[St.STAR],"")),sq=(o,e)=>(Le("replaceGTE0",o,e),o.trim().replace(Mt[e.includePrerelease?St.GTE0PRE:St.GTE0],"")),lq=o=>(e,t,i,a,s,n,r,l,c,u,E,d)=>(pt(i)?t="":pt(a)?t=`>=${i}.0.0${o?"-0":""}`:pt(s)?t=`>=${i}.${a}.0${o?"-0":""}`:n?t=`>=${t}`:t=`>=${t}${o?"-0":""}`,pt(c)?l="":pt(u)?l=`<${+c+1}.0.0-0`:pt(E)?l=`<${c}.${+u+1}.0-0`:d?l=`<=${c}.${u}.${E}-${d}`:o?l=`<${c}.${u}.${+E+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),cq=(o,e,t)=>{for(let i=0;i<o.length;i++)if(!o[i].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let i=0;i<o.length;i++)if(Le(o[i].semver),o[i].semver!==md.ANY&&o[i].semver.prerelease.length>0){let a=o[i].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var tl=A((gRe,bC)=>{var rl=Symbol("SemVer ANY"),Md=class o{static get ANY(){return rl}constructor(e,t){if(t=IC(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Nd("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===rl?this.value="":this.value=this.operator+this.semver.version,Nd("comp",this)}parse(e){let t=this.options.loose?yC[DC.COMPARATORLOOSE]:yC[DC.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new xC(i[2],this.options.loose):this.semver=rl}toString(){return this.value}test(e){if(Nd("Comparator.test",e,this.options.loose),this.semver===rl||e===rl)return!0;if(typeof e=="string")try{e=new xC(e,this.options)}catch{return!1}return Od(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new UC(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new UC(this.value,t).test(e.semver):(t=IC(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Od(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Od(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};bC.exports=Md;var IC=pE(),{safeRe:yC,t:DC}=Zi(),Od=hd(),Nd=Zs(),xC=ut(),UC=zt()});var nl=A((LRe,VC)=>{var uq=zt(),Eq=(o,e,t)=>{try{e=new uq(e,t)}catch{return!1}return e.test(o)};VC.exports=Eq});var BC=A((IRe,wC)=>{var _q=zt(),Tq=(o,e)=>new _q(o,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));wC.exports=Tq});var kC=A((yRe,GC)=>{var Sq=ut(),pq=zt(),dq=(o,e,t)=>{let i=null,a=null,s=null;try{s=new pq(e,t)}catch{return null}return o.forEach(n=>{s.test(n)&&(!i||a.compare(n)===-1)&&(i=n,a=new Sq(i,t))}),i};GC.exports=dq});var YC=A((DRe,HC)=>{var fq=ut(),Aq=zt(),hq=(o,e,t)=>{let i=null,a=null,s=null;try{s=new Aq(e,t)}catch{return null}return o.forEach(n=>{s.test(n)&&(!i||a.compare(n)===1)&&(i=n,a=new fq(i,t))}),i};HC.exports=hq});var qC=A((xRe,KC)=>{var Pd=ut(),vq=zt(),FC=el(),Rq=(o,e)=>{o=new vq(o,e);let t=new Pd("0.0.0");if(o.test(t)||(t=new Pd("0.0.0-0"),o.test(t)))return t;t=null;for(let i=0;i<o.set.length;++i){let a=o.set[i],s=null;a.forEach(n=>{let r=new Pd(n.semver.version);switch(n.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!s||FC(r,s))&&(s=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${n.operator}`)}}),s&&(!t||FC(t,s))&&(t=s)}return t&&o.test(t)?t:null};KC.exports=Rq});var jC=A((URe,WC)=>{var mq=zt(),Oq=(o,e)=>{try{return new mq(o,e).range||"*"}catch{return null}};WC.exports=Oq});var NE=A((bRe,JC)=>{var Nq=ut(),$C=tl(),{ANY:Mq}=$C,Pq=zt(),Cq=nl(),zC=el(),XC=hE(),gq=RE(),Lq=vE(),Iq=(o,e,t,i)=>{o=new Nq(o,i),e=new Pq(e,i);let a,s,n,r,l;switch(t){case">":a=zC,s=gq,n=XC,r=">",l=">=";break;case"<":a=XC,s=Lq,n=zC,r="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Cq(o,e,i))return!1;for(let c=0;c<e.set.length;++c){let u=e.set[c],E=null,d=null;if(u.forEach(f=>{f.semver===Mq&&(f=new $C(">=0.0.0")),E=E||f,d=d||f,a(f.semver,E.semver,i)?E=f:n(f.semver,d.semver,i)&&(d=f)}),E.operator===r||E.operator===l||(!d.operator||d.operator===r)&&s(o,d.semver))return!1;if(d.operator===l&&n(o,d.semver))return!1}return!0};JC.exports=Iq});var ZC=A((VRe,QC)=>{var yq=NE(),Dq=(o,e,t)=>yq(o,e,">",t);QC.exports=Dq});var tg=A((wRe,eg)=>{var xq=NE(),Uq=(o,e,t)=>xq(o,e,"<",t);eg.exports=Uq});var og=A((BRe,ng)=>{var rg=zt(),bq=(o,e,t)=>(o=new rg(o,t),e=new rg(e,t),o.intersects(e,t));ng.exports=bq});var ag=A((GRe,ig)=>{var Vq=nl(),wq=jt();ig.exports=(o,e,t)=>{let i=[],a=null,s=null,n=o.sort((u,E)=>wq(u,E,t));for(let u of n)Vq(u,e,t)?(s=u,a||(a=u)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);let r=[];for(let[u,E]of i)u===E?r.push(u):!E&&u===n[0]?r.push("*"):E?u===n[0]?r.push(`<=${E}`):r.push(`${u} - ${E}`):r.push(`>=${u}`);let l=r.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length<c.length?l:e}});var _g=A((kRe,Eg)=>{var sg=zt(),gd=tl(),{ANY:Cd}=gd,ol=nl(),Ld=jt(),Bq=(o,e,t={})=>{if(o===e)return!0;o=new sg(o,t),e=new sg(e,t);let i=!1;e:for(let a of o.set){for(let s of e.set){let n=kq(a,s,t);if(i=i||n!==null,n)continue e}if(i)return!1}return!0},Gq=[new gd(">=0.0.0-0")],lg=[new gd(">=0.0.0")],kq=(o,e,t)=>{if(o===e)return!0;if(o.length===1&&o[0].semver===Cd){if(e.length===1&&e[0].semver===Cd)return!0;t.includePrerelease?o=Gq:o=lg}if(e.length===1&&e[0].semver===Cd){if(t.includePrerelease)return!0;e=lg}let i=new Set,a,s;for(let f of o)f.operator===">"||f.operator===">="?a=cg(a,f,t):f.operator==="<"||f.operator==="<="?s=ug(s,f,t):i.add(f.semver);if(i.size>1)return null;let n;if(a&&s){if(n=Ld(a.semver,s.semver,t),n>0)return null;if(n===0&&(a.operator!==">="||s.operator!=="<="))return null}for(let f of i){if(a&&!ol(f,String(a),t)||s&&!ol(f,String(s),t))return null;for(let O of e)if(!ol(f,String(O),t))return!1;return!0}let r,l,c,u,E=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,d=a&&!t.includePrerelease&&a.semver.prerelease.length?a.semver:!1;E&&E.prerelease.length===1&&s.operator==="<"&&E.prerelease[0]===0&&(E=!1);for(let f of e){if(u=u||f.operator===">"||f.operator===">=",c=c||f.operator==="<"||f.operator==="<=",a){if(d&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===d.major&&f.semver.minor===d.minor&&f.semver.patch===d.patch&&(d=!1),f.operator===">"||f.operator===">="){if(r=cg(a,f,t),r===f&&r!==a)return!1}else if(a.operator===">="&&!ol(a.semver,String(f),t))return!1}if(s){if(E&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===E.major&&f.semver.minor===E.minor&&f.semver.patch===E.patch&&(E=!1),f.operator==="<"||f.operator==="<="){if(l=ug(s,f,t),l===f&&l!==s)return!1}else if(s.operator==="<="&&!ol(s.semver,String(f),t))return!1}if(!f.operator&&(s||a)&&n!==0)return!1}return!(a&&c&&!s&&n!==0||s&&u&&!a&&n!==0||d||E)},cg=(o,e,t)=>{if(!o)return e;let i=Ld(o.semver,e.semver,t);return i>0?o:i<0||e.operator===">"&&o.operator===">="?e:o},ug=(o,e,t)=>{if(!o)return e;let i=Ld(o.semver,e.semver,t);return i<0?o:i>0||e.operator==="<"&&o.operator==="<="?e:o};Eg.exports=Bq});var yd=A((HRe,pg)=>{var Id=Zi(),Tg=Qs(),Hq=ut(),Sg=pd(),Yq=bo(),Fq=kP(),Kq=YP(),qq=qP(),Wq=zP(),jq=$P(),zq=QP(),Xq=eC(),$q=rC(),Jq=jt(),Qq=aC(),Zq=lC(),eW=AE(),tW=_C(),rW=SC(),nW=el(),oW=hE(),iW=fd(),aW=Ad(),sW=vE(),lW=RE(),cW=hd(),uW=OC(),EW=tl(),_W=zt(),TW=nl(),SW=BC(),pW=kC(),dW=YC(),fW=qC(),AW=jC(),hW=NE(),vW=ZC(),RW=tg(),mW=og(),OW=ag(),NW=_g();pg.exports={parse:Yq,valid:Fq,clean:Kq,inc:qq,diff:Wq,major:jq,minor:zq,patch:Xq,prerelease:$q,compare:Jq,rcompare:Qq,compareLoose:Zq,compareBuild:eW,sort:tW,rsort:rW,gt:nW,lt:oW,eq:iW,neq:aW,gte:sW,lte:lW,cmp:cW,coerce:uW,Comparator:EW,Range:_W,satisfies:TW,toComparators:SW,maxSatisfying:pW,minSatisfying:dW,minVersion:fW,validRange:AW,outside:hW,gtr:vW,ltr:RW,intersects:mW,simplifyRange:OW,subset:NW,SemVer:Hq,re:Id.re,src:Id.src,tokens:Id.t,SEMVER_SPEC_VERSION:Tg.SEMVER_SPEC_VERSION,RELEASE_TYPES:Tg.RELEASE_TYPES,compareIdentifiers:Sg.compareIdentifiers,rcompareIdentifiers:Sg.rcompareIdentifiers}});function PW(o){var e=decodeURIComponent(o).split(":");if(e.length!==4)return null;var t=fg(e,4),i=t[0],a=t[1],s=t[3],n=i.padStart(32,"0"),r=a.padStart(16,"0"),l=MW.test(s)?parseInt(s,16)&1:1;return{traceId:n,spanId:r,isRemote:!0,traceFlags:l}}var dg,fg,Dd,ME,Ag,MW,hg=S(()=>{x();K();dg=function(o){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&o[e],i=0;if(t)return t.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&i>=o.length&&(o=void 0),{value:o&&o[i++],done:!o}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},fg=function(o,e){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var i=t.call(o),a,s=[],n;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.push(a.value)}catch(r){n={error:r}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}return s},Dd="uber-trace-id",ME="uberctx",Ag=function(){function o(e){typeof e=="string"?(this._jaegerTraceHeader=e,this._jaegerBaggageHeaderPrefix=ME):(this._jaegerTraceHeader=(e==null?void 0:e.customTraceHeader)||Dd,this._jaegerBaggageHeaderPrefix=(e==null?void 0:e.customBaggageHeaderPrefix)||ME)}return o.prototype.inject=function(e,t,i){var a,s,n=_e.getSpanContext(e),r=Ot.getBaggage(e);if(n&<(e)===!1){var l="0"+(n.traceFlags||pe.NONE).toString(16);i.set(t,this._jaegerTraceHeader,n.traceId+":"+n.spanId+":0:"+l)}if(r)try{for(var c=dg(r.getAllEntries()),u=c.next();!u.done;u=c.next()){var E=fg(u.value,2),d=E[0],f=E[1];i.set(t,this._jaegerBaggageHeaderPrefix+"-"+d,encodeURIComponent(f.value))}}catch(O){a={error:O}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(a)throw a.error}}},o.prototype.extract=function(e,t,i){var a,s,n=this,r,l=i.get(t,this._jaegerTraceHeader),c=Array.isArray(l)?l[0]:l,u=i.keys(t).filter(function(P){return P.startsWith(n._jaegerBaggageHeaderPrefix+"-")}).map(function(P){var C=i.get(t,P);return{key:P.substring(n._jaegerBaggageHeaderPrefix.length+1),value:Array.isArray(C)?C[0]:C}}),E=e;if(typeof c=="string"){var d=PW(c);d&&(E=_e.setSpanContext(E,d))}if(u.length===0)return E;var f=(r=Ot.getBaggage(e))!==null&&r!==void 0?r:Ot.createBaggage();try{for(var O=dg(u),R=O.next();!R.done;R=O.next()){var M=R.value;M.value!==void 0&&(f=f.setEntry(M.key,{value:decodeURIComponent(M.value)}))}}catch(P){a={error:P}}finally{try{R&&!R.done&&(s=O.return)&&s.call(O)}finally{if(a)throw a.error}}return E=Ot.setBaggage(E,f),E},o.prototype.fields=function(){return[this._jaegerTraceHeader]},o}(),MW=/^[0-9a-f]{1,2}$/i});var vg={};ge(vg,{JaegerPropagator:()=>Ag,UBER_BAGGAGE_HEADER_PREFIX:()=>ME,UBER_TRACE_ID_HEADER:()=>Dd});var Rg=S(()=>{hg()});var Ng=A(gE=>{"use strict";Object.defineProperty(gE,"__esModule",{value:!0});gE.NodeTracerProvider=void 0;var mg=XM(),PE=(tP(),$(eP)),Og=(Uo(),$(Qi)),CW=yd(),gW=(Rg(),$(vg)),CE=class extends Og.BasicTracerProvider{constructor(e={}){super(e)}register(e={}){if(e.contextManager===void 0){let t=CW.gte(process.version,"14.8.0")?mg.AsyncLocalStorageContextManager:mg.AsyncHooksContextManager;e.contextManager=new t,e.contextManager.enable()}super.register(e)}};gE.NodeTracerProvider=CE;CE._registeredPropagators=new Map([...Og.BasicTracerProvider._registeredPropagators,["b3",()=>new PE.B3Propagator({injectEncoding:PE.B3InjectEncoding.SINGLE_HEADER})],["b3multi",()=>new PE.B3Propagator({injectEncoding:PE.B3InjectEncoding.MULTI_HEADER})],["jaeger",()=>new gW.JaegerPropagator]])});var LE=A(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.Tracer=Te.TraceIdRatioBasedSampler=Te.Span=Te.SimpleSpanProcessor=Te.SamplingDecision=Te.RandomIdGenerator=Te.ParentBasedSampler=Te.NoopSpanProcessor=Te.InMemorySpanExporter=Te.ForceFlushState=Te.ConsoleSpanExporter=Te.BatchSpanProcessor=Te.BasicTracerProvider=Te.AlwaysOnSampler=Te.AlwaysOffSampler=Te.NodeTracerProvider=void 0;var LW=Ng();Object.defineProperty(Te,"NodeTracerProvider",{enumerable:!0,get:function(){return LW.NodeTracerProvider}});var dt=(Uo(),$(Qi));Object.defineProperty(Te,"AlwaysOffSampler",{enumerable:!0,get:function(){return dt.AlwaysOffSampler}});Object.defineProperty(Te,"AlwaysOnSampler",{enumerable:!0,get:function(){return dt.AlwaysOnSampler}});Object.defineProperty(Te,"BasicTracerProvider",{enumerable:!0,get:function(){return dt.BasicTracerProvider}});Object.defineProperty(Te,"BatchSpanProcessor",{enumerable:!0,get:function(){return dt.BatchSpanProcessor}});Object.defineProperty(Te,"ConsoleSpanExporter",{enumerable:!0,get:function(){return dt.ConsoleSpanExporter}});Object.defineProperty(Te,"ForceFlushState",{enumerable:!0,get:function(){return dt.ForceFlushState}});Object.defineProperty(Te,"InMemorySpanExporter",{enumerable:!0,get:function(){return dt.InMemorySpanExporter}});Object.defineProperty(Te,"NoopSpanProcessor",{enumerable:!0,get:function(){return dt.NoopSpanProcessor}});Object.defineProperty(Te,"ParentBasedSampler",{enumerable:!0,get:function(){return dt.ParentBasedSampler}});Object.defineProperty(Te,"RandomIdGenerator",{enumerable:!0,get:function(){return dt.RandomIdGenerator}});Object.defineProperty(Te,"SamplingDecision",{enumerable:!0,get:function(){return dt.SamplingDecision}});Object.defineProperty(Te,"SimpleSpanProcessor",{enumerable:!0,get:function(){return dt.SimpleSpanProcessor}});Object.defineProperty(Te,"Span",{enumerable:!0,get:function(){return dt.Span}});Object.defineProperty(Te,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return dt.TraceIdRatioBasedSampler}});Object.defineProperty(Te,"Tracer",{enumerable:!0,get:function(){return dt.Tracer}})});function Mg(o,e,t,i){for(let a=0,s=o.length;a<s;a++){let n=o[a];e&&n.setTracerProvider(e),t&&n.setMeterProvider(t),i&&n.setLoggerProvider&&n.setLoggerProvider(i),n.getConfig().enabled||n.enable()}}function Pg(o){o.forEach(e=>e.disable())}var Cg=S(()=>{});function gg(o){var e,t;let i=o.tracerProvider||_e.getTracerProvider(),a=o.meterProvider||Oo.getMeterProvider(),s=o.loggerProvider||ws.getLoggerProvider(),n=(t=(e=o.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&t!==void 0?t:[];return Mg(n,i,a,s),()=>{Pg(n)}}var Lg=S(()=>{x();Bs();Cg()});var Ud=A((ZRe,Dg)=>{"use strict";function xd(o){return typeof o=="function"}var ft=console.error.bind(console);function il(o,e,t){var i=!!o[e]&&o.propertyIsEnumerable(e);Object.defineProperty(o,e,{configurable:!0,enumerable:i,writable:!0,value:t})}function al(o){o&&o.logger&&(xd(o.logger)?ft=o.logger:ft("new logger isn't a function, not replacing"))}function Ig(o,e,t){if(!o||!o[e]){ft("no original function "+e+" to wrap");return}if(!t){ft("no wrapper function"),ft(new Error().stack);return}if(!xd(o[e])||!xd(t)){ft("original object and wrapper must be functions");return}var i=o[e],a=t(i,e);return il(a,"__original",i),il(a,"__unwrap",function(){o[e]===a&&il(o,e,i)}),il(a,"__wrapped",!0),il(o,e,a),a}function IW(o,e,t){if(o)Array.isArray(o)||(o=[o]);else{ft("must provide one or more modules to patch"),ft(new Error().stack);return}if(!(e&&Array.isArray(e))){ft("must provide one or more functions to wrap on modules");return}o.forEach(function(i){e.forEach(function(a){Ig(i,a,t)})})}function yg(o,e){if(!o||!o[e]){ft("no function to unwrap."),ft(new Error().stack);return}if(!o[e].__unwrap)ft("no original to unwrap to -- has "+e+" already been unwrapped?");else return o[e].__unwrap()}function yW(o,e){if(o)Array.isArray(o)||(o=[o]);else{ft("must provide one or more modules to patch"),ft(new Error().stack);return}if(!(e&&Array.isArray(e))){ft("must provide one or more functions to unwrap on modules");return}o.forEach(function(t){e.forEach(function(i){yg(t,i)})})}al.wrap=Ig;al.massWrap=IW;al.unwrap=yg;al.massUnwrap=yW;Dg.exports=al});var Hn,IE,xg=S(()=>{x();Bs();Hn=Rn(Ud()),IE=class{constructor(e,t,i){this.instrumentationName=e,this.instrumentationVersion=t,this._config={},this._wrap=Hn.wrap,this._unwrap=Hn.unwrap,this._massWrap=Hn.massWrap,this._massUnwrap=Hn.massUnwrap,this.setConfig(i),this._diag=m.createComponentLogger({namespace:e}),this._tracer=_e.getTracer(e,t),this._meter=Oo.getMeter(e,t),this._logger=ws.getLogger(e,t),this._updateMetricInstruments()}get meter(){return this._meter}setMeterProvider(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){var e;let t=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e){this._config=Object.assign({enabled:!0},e)}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(e,t,i,a){if(e)try{e(i,a)}catch(s){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:t},s)}}}});var bd=A((nme,Ug)=>{"use strict";var DW=k("os");Ug.exports=DW.homedir||function(){var e=process.env.HOME,t=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return process.platform==="win32"?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||e||null:process.platform==="darwin"?e||(t?"/Users/"+t:null):process.platform==="linux"?e||(process.getuid()===0?"/root":t?"/home/"+t:null):e||null}});var Vd=A((ome,bg)=>{bg.exports=function(){var o=Error.prepareStackTrace;Error.prepareStackTrace=function(t,i){return i};var e=new Error().stack;return Error.prepareStackTrace=o,e[2].getFileName()}});var Vg=A((ime,sl)=>{"use strict";var xW=process.platform==="win32",UW=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,wd={};function bW(o){return UW.exec(o).slice(1)}wd.parse=function(o){if(typeof o!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof o);var e=bW(o);if(!e||e.length!==5)throw new TypeError("Invalid path '"+o+"'");return{root:e[1],dir:e[0]===e[1]?e[0]:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};var VW=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,Bd={};function wW(o){return VW.exec(o).slice(1)}Bd.parse=function(o){if(typeof o!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof o);var e=wW(o);if(!e||e.length!==5)throw new TypeError("Invalid path '"+o+"'");return{root:e[1],dir:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};xW?sl.exports=wd.parse:sl.exports=Bd.parse;sl.exports.posix=Bd.parse;sl.exports.win32=wd.parse});var Gd=A((ame,kg)=>{var Gg=k("path"),wg=Gg.parse||Vg(),Bg=function(e,t){var i="/";/^([A-Za-z]:)/.test(e)?i="":/^\\\\/.test(e)&&(i="\\\\");for(var a=[e],s=wg(e);s.dir!==a[a.length-1];)a.push(s.dir),s=wg(s.dir);return a.reduce(function(n,r){return n.concat(t.map(function(l){return Gg.resolve(i,r,l)}))},[])};kg.exports=function(e,t,i){var a=t&&t.moduleDirectory?[].concat(t.moduleDirectory):["node_modules"];if(t&&typeof t.paths=="function")return t.paths(i,e,function(){return Bg(e,a)},t);var s=Bg(e,a);return t&&t.paths?s.concat(t.paths):s}});var kd=A((sme,Hg)=>{Hg.exports=function(o,e){return e||{}}});var Fg=A((lme,Yg)=>{"use strict";var BW="Function.prototype.bind called on incompatible ",Hd=Array.prototype.slice,GW=Object.prototype.toString,kW="[object Function]";Yg.exports=function(e){var t=this;if(typeof t!="function"||GW.call(t)!==kW)throw new TypeError(BW+t);for(var i=Hd.call(arguments,1),a,s=function(){if(this instanceof a){var u=t.apply(this,i.concat(Hd.call(arguments)));return Object(u)===u?u:this}else return t.apply(e,i.concat(Hd.call(arguments)))},n=Math.max(0,t.length-i.length),r=[],l=0;l<n;l++)r.push("$"+l);if(a=Function("binder","return function ("+r.join(",")+"){ return binder.apply(this,arguments); }")(s),t.prototype){var c=function(){};c.prototype=t.prototype,a.prototype=new c,c.prototype=null}return a}});var qg=A((cme,Kg)=>{"use strict";var HW=Fg();Kg.exports=Function.prototype.bind||HW});var jg=A((ume,Wg)=>{"use strict";var YW=qg();Wg.exports=YW.call(Function.call,Object.prototype.hasOwnProperty)});var zg=A((Eme,FW)=>{FW.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":[">= 19.9",">= 20"],"node:test/reporters":[">= 19.9",">= 20"],"node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 20"],"node:wasi":">= 20",worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var ll=A((_me,Jg)=>{"use strict";var KW=jg();function qW(o,e){for(var t=o.split("."),i=e.split(" "),a=i.length>1?i[0]:"=",s=(i.length>1?i[1]:i[0]).split("."),n=0;n<3;++n){var r=parseInt(t[n]||0,10),l=parseInt(s[n]||0,10);if(r!==l)return a==="<"?r<l:a===">="?r>=l:!1}return a===">="}function Xg(o,e){var t=e.split(/ ?&& ?/);if(t.length===0)return!1;for(var i=0;i<t.length;++i)if(!qW(o,t[i]))return!1;return!0}function WW(o,e){if(typeof e=="boolean")return e;var t=typeof o>"u"?process.versions&&process.versions.node:o;if(typeof t!="string")throw new TypeError(typeof o>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(e&&typeof e=="object"){for(var i=0;i<e.length;++i)if(Xg(t,e[i]))return!0;return!1}return Xg(t,e)}var $g=zg();Jg.exports=function(e,t){return KW($g,e)&&WW(t,$g[e])}});var eL=A((Tme,Zg)=>{var Vo=k("fs"),jW=bd(),Ge=k("path"),zW=Vd(),XW=Gd(),$W=kd(),JW=ll(),QW=process.platform!=="win32"&&Vo.realpath&&typeof Vo.realpath.native=="function"?Vo.realpath.native:Vo.realpath,Qg=jW(),ZW=function(){return[Ge.join(Qg,".node_modules"),Ge.join(Qg,".node_libraries")]},ej=function(e,t){Vo.stat(e,function(i,a){return i?i.code==="ENOENT"||i.code==="ENOTDIR"?t(null,!1):t(i):t(null,a.isFile()||a.isFIFO())})},tj=function(e,t){Vo.stat(e,function(i,a){return i?i.code==="ENOENT"||i.code==="ENOTDIR"?t(null,!1):t(i):t(null,a.isDirectory())})},rj=function(e,t){QW(e,function(i,a){i&&i.code!=="ENOENT"?t(i):t(null,i?e:a)})},cl=function(e,t,i,a){i&&i.preserveSymlinks===!1?e(t,a):a(null,t)},nj=function(e,t,i){e(t,function(a,s){if(a)i(a);else try{var n=JSON.parse(s);i(null,n)}catch{i(null)}})},oj=function(e,t,i){for(var a=XW(t,i,e),s=0;s<a.length;s++)a[s]=Ge.join(a[s],e);return a};Zg.exports=function(e,t,i){var a=i,s=t;if(typeof t=="function"&&(a=s,s={}),typeof e!="string"){var n=new TypeError("Path must be a string.");return process.nextTick(function(){a(n)})}s=$W(e,s);var r=s.isFile||ej,l=s.isDirectory||tj,c=s.readFile||Vo.readFile,u=s.realpath||rj,E=s.readPackage||nj;if(s.readFile&&s.readPackage){var d=new TypeError("`readFile` and `readPackage` are mutually exclusive.");return process.nextTick(function(){a(d)})}var f=s.packageIterator,O=s.extensions||[".js"],R=s.includeCoreModules!==!1,M=s.basedir||Ge.dirname(zW()),P=s.filename||M;s.paths=s.paths||ZW();var C=Ge.resolve(M);cl(u,C,s,function(v,B){v?a(v):y(B)});var b;function y(v){if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e))b=Ge.resolve(v,e),(e==="."||e===".."||e.slice(-1)==="/")&&(b+="/"),/\/$/.test(e)&&b===v?ie(b,s.package,W):q(b,s.package,W);else{if(R&&JW(e))return a(null,e);le(e,v,function(B,N,p){if(B)a(B);else{if(N)return cl(u,N,s,function(J,Q){J?a(J):a(null,Q,p)});var I=new Error("Cannot find module '"+e+"' from '"+P+"'");I.code="MODULE_NOT_FOUND",a(I)}})}}function W(v,B,N){v?a(v):B?a(null,B,N):ie(b,function(p,I,J){if(p)a(p);else if(I)cl(u,I,s,function(X,ue){X?a(X):a(null,ue,J)});else{var Q=new Error("Cannot find module '"+e+"' from '"+P+"'");Q.code="MODULE_NOT_FOUND",a(Q)}})}function q(v,B,N){var p=B,I=N;typeof p=="function"&&(I=p,p=void 0);var J=[""].concat(O);Q(J,v,p);function Q(X,ue,Ee){if(X.length===0)return I(null,void 0,Ee);var Ie=ue+X[0],ve=Ee;ve?ae(null,ve):H(Ge.dirname(Ie),ae);function ae(me,Ue,at){if(ve=Ue,me)return I(me);if(at&&ve&&s.pathFilter){var be=Ge.relative(at,Ie),L=be.slice(0,be.length-X[0].length),g=s.pathFilter(ve,ue,L);if(g)return Q([""].concat(O.slice()),Ge.resolve(at,g),ve)}r(Ie,xe)}function xe(me,Ue){if(me)return I(me);if(Ue)return I(null,Ie,ve);Q(X.slice(1),ue,ve)}}}function H(v,B){if(v===""||v==="/"||process.platform==="win32"&&/^\w:[/\\]*$/.test(v)||/[/\\]node_modules[/\\]*$/.test(v))return B(null);cl(u,v,s,function(N,p){if(N)return H(Ge.dirname(v),B);var I=Ge.join(p,"package.json");r(I,function(J,Q){if(!Q)return H(Ge.dirname(v),B);E(c,I,function(X,ue){X&&B(X);var Ee=ue;Ee&&s.packageFilter&&(Ee=s.packageFilter(Ee,I)),B(null,Ee,v)})})})}function ie(v,B,N){var p=N,I=B;typeof I=="function"&&(p=I,I=s.package),cl(u,v,s,function(J,Q){if(J)return p(J);var X=Ge.join(Q,"package.json");r(X,function(ue,Ee){if(ue)return p(ue);if(!Ee)return q(Ge.join(v,"index"),I,p);E(c,X,function(Ie,ve){if(Ie)return p(Ie);var ae=ve;if(ae&&s.packageFilter&&(ae=s.packageFilter(ae,X)),ae&&ae.main){if(typeof ae.main!="string"){var xe=new TypeError("package \u201C"+ae.name+"\u201D `main` must be a string");return xe.code="INVALID_PACKAGE_MAIN",p(xe)}(ae.main==="."||ae.main==="./")&&(ae.main="index"),q(Ge.resolve(v,ae.main),ae,function(me,Ue,at){if(me)return p(me);if(Ue)return p(null,Ue,at);if(!at)return q(Ge.join(v,"index"),at,p);var be=Ge.resolve(v,at.main);ie(be,at,function(L,g,D){if(L)return p(L);if(g)return p(null,g,D);q(Ge.join(v,"index"),D,p)})});return}q(Ge.join(v,"/index"),ae,p)})})})}function ee(v,B){if(B.length===0)return v(null,void 0);var N=B[0];l(Ge.dirname(N),p);function p(Q,X){if(Q)return v(Q);if(!X)return ee(v,B.slice(1));q(N,s.package,I)}function I(Q,X,ue){if(Q)return v(Q);if(X)return v(null,X,ue);ie(N,s.package,J)}function J(Q,X,ue){if(Q)return v(Q);if(X)return v(null,X,ue);ee(v,B.slice(1))}}function le(v,B,N){var p=function(){return oj(v,B,s)};ee(N,f?f(v,B,p,s):p())}}});var tL=A((Sme,ij)=>{ij.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:">= 13.4 && < 13.5",worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var iL=A((pme,oL)=>{"use strict";var aj=ll(),rL=tL(),nL={};for(yE in rL)Object.prototype.hasOwnProperty.call(rL,yE)&&(nL[yE]=aj(yE));var yE;oL.exports=nL});var sL=A((dme,aL)=>{var sj=ll();aL.exports=function(e){return sj(e)}});var uL=A((fme,cL)=>{var lj=ll(),wo=k("fs"),Et=k("path"),cj=bd(),uj=Vd(),Ej=Gd(),_j=kd(),Tj=process.platform!=="win32"&&wo.realpathSync&&typeof wo.realpathSync.native=="function"?wo.realpathSync.native:wo.realpathSync,lL=cj(),Sj=function(){return[Et.join(lL,".node_modules"),Et.join(lL,".node_libraries")]},pj=function(e){try{var t=wo.statSync(e,{throwIfNoEntry:!1})}catch(i){if(i&&(i.code==="ENOENT"||i.code==="ENOTDIR"))return!1;throw i}return!!t&&(t.isFile()||t.isFIFO())},dj=function(e){try{var t=wo.statSync(e,{throwIfNoEntry:!1})}catch(i){if(i&&(i.code==="ENOENT"||i.code==="ENOTDIR"))return!1;throw i}return!!t&&t.isDirectory()},fj=function(e){try{return Tj(e)}catch(t){if(t.code!=="ENOENT")throw t}return e},ul=function(e,t,i){return i&&i.preserveSymlinks===!1?e(t):t},Aj=function(e,t){var i=e(t);try{var a=JSON.parse(i);return a}catch{}},hj=function(e,t,i){for(var a=Ej(t,i,e),s=0;s<a.length;s++)a[s]=Et.join(a[s],e);return a};cL.exports=function(e,t){if(typeof e!="string")throw new TypeError("Path must be a string.");var i=_j(e,t),a=i.isFile||pj,s=i.readFileSync||wo.readFileSync,n=i.isDirectory||dj,r=i.realpathSync||fj,l=i.readPackageSync||Aj;if(i.readFileSync&&i.readPackageSync)throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");var c=i.packageIterator,u=i.extensions||[".js"],E=i.includeCoreModules!==!1,d=i.basedir||Et.dirname(uj()),f=i.filename||d;i.paths=i.paths||Sj();var O=ul(r,Et.resolve(d),i);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e)){var R=Et.resolve(O,e);(e==="."||e===".."||e.slice(-1)==="/")&&(R+="/");var M=b(R)||W(R);if(M)return ul(r,M,i)}else{if(E&&lj(e))return e;var P=q(e,O);if(P)return ul(r,P,i)}var C=new Error("Cannot find module '"+e+"' from '"+f+"'");throw C.code="MODULE_NOT_FOUND",C;function b(H){var ie=y(Et.dirname(H));if(ie&&ie.dir&&ie.pkg&&i.pathFilter){var ee=Et.relative(ie.dir,H),le=i.pathFilter(ie.pkg,H,ee);le&&(H=Et.resolve(ie.dir,le))}if(a(H))return H;for(var v=0;v<u.length;v++){var B=H+u[v];if(a(B))return B}}function y(H){if(!(H===""||H==="/")&&!(process.platform==="win32"&&/^\w:[/\\]*$/.test(H))&&!/[/\\]node_modules[/\\]*$/.test(H)){var ie=Et.join(ul(r,H,i),"package.json");if(!a(ie))return y(Et.dirname(H));var ee=l(s,ie);return ee&&i.packageFilter&&(ee=i.packageFilter(ee,H)),{pkg:ee,dir:H}}}function W(H){var ie=Et.join(ul(r,H,i),"/package.json");if(a(ie)){try{var ee=l(s,ie)}catch{}if(ee&&i.packageFilter&&(ee=i.packageFilter(ee,H)),ee&&ee.main){if(typeof ee.main!="string"){var le=new TypeError("package \u201C"+ee.name+"\u201D `main` must be a string");throw le.code="INVALID_PACKAGE_MAIN",le}(ee.main==="."||ee.main==="./")&&(ee.main="index");try{var v=b(Et.resolve(H,ee.main));if(v)return v;var B=W(Et.resolve(H,ee.main));if(B)return B}catch{}}}return b(Et.join(H,"/index"))}function q(H,ie){for(var ee=function(){return hj(H,ie,i)},le=c?c(H,ie,ee,i):ee(),v=0;v<le.length;v++){var B=le[v];if(n(Et.dirname(B))){var N=b(B);if(N)return N;var p=W(B);if(p)return p}}}}});var _L=A((Ame,EL)=>{var DE=eL();DE.core=iL();DE.isCore=sL();DE.sync=uL();EL.exports=DE});var SL=A((hme,TL)=>{var ta=1e3,ra=ta*60,na=ra*60,Bo=na*24,vj=Bo*7,Rj=Bo*365.25;TL.exports=function(o,e){e=e||{};var t=typeof o;if(t==="string"&&o.length>0)return mj(o);if(t==="number"&&isFinite(o))return e.long?Nj(o):Oj(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))};function mj(o){if(o=String(o),!(o.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(e){var t=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return t*Rj;case"weeks":case"week":case"w":return t*vj;case"days":case"day":case"d":return t*Bo;case"hours":case"hour":case"hrs":case"hr":case"h":return t*na;case"minutes":case"minute":case"mins":case"min":case"m":return t*ra;case"seconds":case"second":case"secs":case"sec":case"s":return t*ta;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function Oj(o){var e=Math.abs(o);return e>=Bo?Math.round(o/Bo)+"d":e>=na?Math.round(o/na)+"h":e>=ra?Math.round(o/ra)+"m":e>=ta?Math.round(o/ta)+"s":o+"ms"}function Nj(o){var e=Math.abs(o);return e>=Bo?xE(o,e,Bo,"day"):e>=na?xE(o,e,na,"hour"):e>=ra?xE(o,e,ra,"minute"):e>=ta?xE(o,e,ta,"second"):o+" ms"}function xE(o,e,t,i){var a=e>=t*1.5;return Math.round(o/t)+" "+i+(a?"s":"")}});var Yd=A((vme,pL)=>{function Mj(o){t.debug=t,t.default=t,t.coerce=l,t.disable=s,t.enable=a,t.enabled=n,t.humanize=SL(),t.destroy=c,Object.keys(o).forEach(u=>{t[u]=o[u]}),t.names=[],t.skips=[],t.formatters={};function e(u){let E=0;for(let d=0;d<u.length;d++)E=(E<<5)-E+u.charCodeAt(d),E|=0;return t.colors[Math.abs(E)%t.colors.length]}t.selectColor=e;function t(u){let E,d=null,f,O;function R(...M){if(!R.enabled)return;let P=R,C=Number(new Date),b=C-(E||C);P.diff=b,P.prev=E,P.curr=C,E=C,M[0]=t.coerce(M[0]),typeof M[0]!="string"&&M.unshift("%O");let y=0;M[0]=M[0].replace(/%([a-zA-Z%])/g,(q,H)=>{if(q==="%%")return"%";y++;let ie=t.formatters[H];if(typeof ie=="function"){let ee=M[y];q=ie.call(P,ee),M.splice(y,1),y--}return q}),t.formatArgs.call(P,M),(P.log||t.log).apply(P,M)}return R.namespace=u,R.useColors=t.useColors(),R.color=t.selectColor(u),R.extend=i,R.destroy=t.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(f!==t.namespaces&&(f=t.namespaces,O=t.enabled(u)),O),set:M=>{d=M}}),typeof t.init=="function"&&t.init(R),R}function i(u,E){let d=t(this.namespace+(typeof E>"u"?":":E)+u);return d.log=this.log,d}function a(u){t.save(u),t.namespaces=u,t.names=[],t.skips=[];let E,d=(typeof u=="string"?u:"").split(/[\s,]+/),f=d.length;for(E=0;E<f;E++)d[E]&&(u=d[E].replace(/\*/g,".*?"),u[0]==="-"?t.skips.push(new RegExp("^"+u.slice(1)+"$")):t.names.push(new RegExp("^"+u+"$")))}function s(){let u=[...t.names.map(r),...t.skips.map(r).map(E=>"-"+E)].join(",");return t.enable(""),u}function n(u){if(u[u.length-1]==="*")return!0;let E,d;for(E=0,d=t.skips.length;E<d;E++)if(t.skips[E].test(u))return!1;for(E=0,d=t.names.length;E<d;E++)if(t.names[E].test(u))return!0;return!1}function r(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function l(u){return u instanceof Error?u.stack||u.message:u}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}pL.exports=Mj});var dL=A((Ut,UE)=>{Ut.formatArgs=Cj;Ut.save=gj;Ut.load=Lj;Ut.useColors=Pj;Ut.storage=Ij();Ut.destroy=(()=>{let o=!1;return()=>{o||(o=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ut.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Pj(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Cj(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+UE.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;o.splice(1,0,e,"color: inherit");let t=0,i=0;o[0].replace(/%[a-zA-Z%]/g,a=>{a!=="%%"&&(t++,a==="%c"&&(i=t))}),o.splice(i,0,e)}Ut.log=console.debug||console.log||(()=>{});function gj(o){try{o?Ut.storage.setItem("debug",o):Ut.storage.removeItem("debug")}catch{}}function Lj(){let o;try{o=Ut.storage.getItem("debug")}catch{}return!o&&typeof process<"u"&&"env"in process&&(o=process.env.DEBUG),o}function Ij(){try{return localStorage}catch{}}UE.exports=Yd()(Ut);var{formatters:yj}=UE.exports;yj.j=function(o){try{return JSON.stringify(o)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var AL=A((Rme,fL)=>{"use strict";fL.exports=(o,e=process.argv)=>{let t=o.startsWith("-")?"":o.length===1?"-":"--",i=e.indexOf(t+o),a=e.indexOf("--");return i!==-1&&(a===-1||i<a)}});var RL=A((mme,vL)=>{"use strict";var Dj=k("os"),hL=k("tty"),Xt=AL(),{env:je}=process,Yn;Xt("no-color")||Xt("no-colors")||Xt("color=false")||Xt("color=never")?Yn=0:(Xt("color")||Xt("colors")||Xt("color=true")||Xt("color=always"))&&(Yn=1);"FORCE_COLOR"in je&&(je.FORCE_COLOR==="true"?Yn=1:je.FORCE_COLOR==="false"?Yn=0:Yn=je.FORCE_COLOR.length===0?1:Math.min(parseInt(je.FORCE_COLOR,10),3));function Fd(o){return o===0?!1:{level:o,hasBasic:!0,has256:o>=2,has16m:o>=3}}function Kd(o,e){if(Yn===0)return 0;if(Xt("color=16m")||Xt("color=full")||Xt("color=truecolor"))return 3;if(Xt("color=256"))return 2;if(o&&!e&&Yn===void 0)return 0;let t=Yn||0;if(je.TERM==="dumb")return t;if(process.platform==="win32"){let i=Dj.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in je)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(i=>i in je)||je.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in je)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(je.TEAMCITY_VERSION)?1:0;if(je.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in je){let i=parseInt((je.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(je.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(je.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(je.TERM)||"COLORTERM"in je?1:t}function xj(o){let e=Kd(o,o&&o.isTTY);return Fd(e)}vL.exports={supportsColor:xj,stdout:Fd(Kd(!0,hL.isatty(1))),stderr:Fd(Kd(!0,hL.isatty(2)))}});var OL=A((rt,VE)=>{var Uj=k("tty"),bE=k("util");rt.init=Hj;rt.log=Bj;rt.formatArgs=Vj;rt.save=Gj;rt.load=kj;rt.useColors=bj;rt.destroy=bE.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");rt.colors=[6,2,3,4,5,1];try{let o=RL();o&&(o.stderr||o).level>=2&&(rt.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}rt.inspectOpts=Object.keys(process.env).filter(o=>/^debug_/i.test(o)).reduce((o,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(a,s)=>s.toUpperCase()),i=process.env[e];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),o[t]=i,o},{});function bj(){return"colors"in rt.inspectOpts?!!rt.inspectOpts.colors:Uj.isatty(process.stderr.fd)}function Vj(o){let{namespace:e,useColors:t}=this;if(t){let i=this.color,a="\x1B[3"+(i<8?i:"8;5;"+i),s=` ${a};1m${e} \x1B[0m`;o[0]=s+o[0].split(` `).join(` `+s),o.push(a+"m+"+VE.exports.humanize(this.diff)+"\x1B[0m")}else o[0]=wj()+e+" "+o[0]}function wj(){return rt.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Bj(...o){return process.stderr.write(bE.format(...o)+` `)}function Gj(o){o?process.env.DEBUG=o:delete process.env.DEBUG}function kj(){return process.env.DEBUG}function Hj(o){o.inspectOpts={};let e=Object.keys(rt.inspectOpts);for(let t=0;t<e.length;t++)o.inspectOpts[e[t]]=rt.inspectOpts[e[t]]}VE.exports=Yd()(rt);var{formatters:mL}=VE.exports;mL.o=function(o){return this.inspectOpts.colors=this.useColors,bE.inspect(o,this.inspectOpts).split(` `).map(e=>e.trim()).join(" ")};mL.O=function(o){return this.inspectOpts.colors=this.useColors,bE.inspect(o,this.inspectOpts)}});var NL=A((Ome,qd)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?qd.exports=dL():qd.exports=OL()});var jd=A((Nme,ML)=>{"use strict";var Wd=k("path");ML.exports=function(o){var e=o.split(Wd.sep),t=e.lastIndexOf("node_modules");if(t!==-1&&e[t+1]){var i=e[t+1][0]==="@",a=i?e[t+1]+"/"+e[t+2]:e[t+1],s=i?3:2;return{name:a,basedir:e.slice(0,t+s).join(Wd.sep),path:e.slice(t+s).join(Wd.sep)}}}});var PL=A((Mme,Yj)=>{Yj.exports={name:"require-in-the-middle",version:"7.3.0",description:"Module to hook into the Node.js require function",main:"index.js",types:"types/index.d.ts",dependencies:{debug:"^4.1.1","module-details-from-path":"^1.0.3",resolve:"^1.22.1"},devDependencies:{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@babel/preset-typescript":"^7.9.0","@babel/register":"^7.9.0","ipp-printer":"^1.0.0",patterns:"^1.0.3",roundround:"^0.2.0",semver:"^6.3.0",standard:"^14.3.1",tape:"^4.11.0"},scripts:{test:"npm run test:lint && npm run test:tape && npm run test:babel","test:lint":"standard","test:tape":"tape test/*.js","test:babel":"node test/babel/babel-register.js"},repository:{type:"git",url:"git+https://github.com/elastic/require-in-the-middle.git"},keywords:["require","hook","shim","shimmer","shimming","patch","monkey","monkeypatch","module","load"],files:["types"],author:"Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)",license:"MIT",bugs:{url:"https://github.com/elastic/require-in-the-middle/issues"},homepage:"https://github.com/elastic/require-in-the-middle#readme",engines:{node:">=8.6.0"}}});var Jd=A((Pme,$d)=>{"use strict";var oa=k("path"),ln=k("module"),zd=_L(),nt=NL()("require-in-the-middle"),Fj=jd();$d.exports=_l;$d.exports.Hook=_l;var El;if(ln.isBuiltin)El=ln.isBuiltin;else{let[o,e]=process.versions.node.split(".").map(Number);o===8&&e<8?El=t=>t==="http2"?!0:!!zd.core[t]:El=t=>!!zd.core[t]}var Kj=/([/\\]index)?(\.js)?$/,Xd=class{constructor(){this._localCache=new Map,this._kRitmExports=Symbol("RitmExports")}has(e,t){if(this._localCache.has(e))return!0;if(t)return!1;{let i=k.cache[e];return!!(i&&this._kRitmExports in i)}}get(e,t){let i=this._localCache.get(e);if(i!==void 0)return i;if(!t){let a=k.cache[e];return a&&a[this._kRitmExports]}}set(e,t,i){i?this._localCache.set(e,t):e in k.cache?k.cache[e][this._kRitmExports]=t:(nt('non-core module is unexpectedly not in require.cache: "%s"',e),this._localCache.set(e,t))}};function _l(o,e,t){if(!(this instanceof _l))return new _l(o,e,t);if(typeof o=="function"?(t=o,o=null,e=null):typeof e=="function"&&(t=e,e=null),typeof ln._resolveFilename!="function"){console.error("Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!",typeof ln._resolveFilename),console.error("Please report this error as an issue related to Node.js %s at %s",process.version,PL().bugs.url);return}this._cache=new Xd,this._unhooked=!1,this._origRequire=ln.prototype.require;let i=this,a=new Set,s=e?e.internals===!0:!1,n=Array.isArray(o);nt("registering require hook"),this._require=ln.prototype.require=function(r){if(i._unhooked===!0)return nt("ignoring require call - module is soft-unhooked"),i._origRequire.apply(this,arguments);let l=El(r),c;if(l){if(c=r,r.startsWith("node:")){let R=r.slice(5);El(R)&&(c=R)}}else try{c=ln._resolveFilename(r,this)}catch(R){return nt('Module._resolveFilename("%s") threw %j, calling original Module.require',r,R.message),i._origRequire.apply(this,arguments)}let u,E;if(nt("processing %s module require('%s'): %s",l===!0?"core":"non-core",r,c),i._cache.has(c,l)===!0)return nt("returning already patched cached module: %s",c),i._cache.get(c,l);let d=a.has(c);d===!1&&a.add(c);let f=i._origRequire.apply(this,arguments);if(d===!0)return nt("module is in the process of being patched already - ignoring: %s",c),f;if(a.delete(c),l===!0){if(n===!0&&o.includes(c)===!1)return nt("ignoring core module not on whitelist: %s",c),f;u=c}else if(n===!0&&o.includes(c)){let R=oa.parse(c);u=R.name,E=R.dir}else{let R=Fj(c);if(R===void 0)return nt("could not parse filename: %s",c),f;u=R.name,E=R.basedir;let M=qj(R);nt("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)",u,r,M,E);let P=!1;if(n){if(!r.startsWith(".")&&o.includes(r)&&(u=r,P=!0),!o.includes(u)&&!o.includes(M))return f;o.includes(M)&&M!==u&&(u=M,P=!0)}if(!P){let C;try{C=zd.sync(u,{basedir:E})}catch{return nt("could not resolve module: %s",u),i._cache.set(c,f,l),f}if(C!==c)if(s===!0)u=u+oa.sep+oa.relative(E,c),nt("preparing to process require of internal file: %s",u);else return nt("ignoring require of non-main module file: %s",C),i._cache.set(c,f,l),f}}i._cache.set(c,f,l),nt("calling require hook: %s",u);let O=t(f,u,E);return i._cache.set(c,O,l),nt("returning module: %s",u),O}}_l.prototype.unhook=function(){this._unhooked=!0,this._require===ln.prototype.require?(ln.prototype.require=this._origRequire,nt("unhook successful")):nt("unhook unsuccessful")};function qj(o){let e=oa.sep!=="/"?o.path.split(oa.sep).join("/"):o.path;return oa.posix.join(o.name,e).replace(Kj,"")}});var Tl,wE,BE,CL=S(()=>{Tl="/",wE=class{constructor(){this.hooks=[],this.children=new Map}},BE=class{constructor(){this._trie=new wE,this._counter=0}insert(e){let t=this._trie;for(let i of e.moduleName.split(Tl)){let a=t.children.get(i);a||(a=new wE,t.children.set(i,a)),t=a}t.hooks.push({hook:e,insertedId:this._counter++})}search(e,{maintainInsertionOrder:t,fullOnly:i}={}){let a=this._trie,s=[],n=!0;for(let r of e.split(Tl)){let l=a.children.get(r);if(!l){n=!1;break}i||s.push(...l.hooks),a=l}return i&&n&&s.push(...a.hooks),s.length===0?[]:s.length===1?[s[0].hook]:(t&&s.sort((r,l)=>r.insertedId-l.insertedId),s.map(({hook:r})=>r))}}});import*as Qd from"path";function jj(o){return Qd.sep!==Tl?o.split(Qd.sep).join(Tl):o}var gL,Wj,GE,LL=S(()=>{gL=Rn(Jd());CL();Wj=["afterEach","after","beforeEach","before","describe","it"].every(o=>typeof global[o]=="function"),GE=class o{constructor(){this._moduleNameTrie=new BE,this._initialize()}_initialize(){new gL.Hook(null,{internals:!0},(e,t,i)=>{let a=jj(t),s=this._moduleNameTrie.search(a,{maintainInsertionOrder:!0,fullOnly:i===void 0});for(let{onRequire:n}of s)e=n(e,t,i);return e})}register(e,t){let i={moduleName:e,onRequire:t};return this._moduleNameTrie.insert(i),i}static getInstance(){var e;return Wj?new o:this._instance=(e=this._instance)!==null&&e!==void 0?e:new o}}});var xL=A(Sl=>{var IL=[],Zd=new WeakMap,yL=new Map,DL=[],zj={set(o,e,t){return Zd.get(o)[e](t)},defineProperty(o,e,t){if(!("value"in t))throw new Error("Getters/setters are not supported for exports property descriptors.");return Zd.get(o)[e](t.value)}};function Xj(o,e,t,i){yL.set(o,i),Zd.set(e,t);let a=new Proxy(e,zj);IL.forEach(s=>s(o,a)),DL.push([o,a])}Sl.register=Xj;Sl.importHooks=IL;Sl.specifiers=yL;Sl.toHook=DL});var GL=A((Dme,dl)=>{var UL=k("path"),$j=jd(),{fileURLToPath:bL}=k("url"),{importHooks:ef,specifiers:Jj,toHook:Qj}=xL();function wL(o){ef.push(o),Qj.forEach(([e,t])=>o(e,t))}function BL(o){let e=ef.indexOf(o);e>-1&&ef.splice(e,1)}function VL(o,e,t,i){let a=o(e,t,i);a&&a!==e&&(e.default=a)}function pl(o,e,t){if(!(this instanceof pl))return new pl(o,e,t);typeof o=="function"?(t=o,o=null,e=null):typeof e=="function"&&(t=e,e=null);let i=e?e.internals===!0:!1;this._iitmHook=(a,s)=>{let n=a,r=a.startsWith("node:"),l;if(r)a=a.replace(/^node:/,"");else{if(a.startsWith("file://"))try{a=bL(a)}catch{}let c=$j(a);c&&(a=c.name,l=c.basedir)}if(o){for(let c of o)if(c===a){if(l){if(i)a=a+UL.sep+UL.relative(l,bL(n));else if(!l.endsWith(Jj.get(n)))continue}VL(t,s,a,l)}}else VL(t,s,a,l)},wL(this._iitmHook)}pl.prototype.unhook=function(){BL(this._iitmHook)};dl.exports=pl;dl.exports.Hook=pl;dl.exports.addHook=wL;dl.exports.removeHook=BL});function kL(o,e,t){let i,a;try{a=o()}catch(s){i=s}finally{if(e(i,a),i&&!t)throw i;return a}}async function HL(o,e,t){let i,a;try{a=await o()}catch(s){i=s}finally{if(e(i,a),i&&!t)throw i;return a}}function kE(o){return typeof o=="function"&&typeof o.__original=="function"&&typeof o.__unwrap=="function"&&o.__wrapped===!0}var tf=S(()=>{});import*as aa from"path";import{types as YL}from"util";import{readFileSync as Zj}from"fs";function FL(o,e,t){return typeof e>"u"?o.includes("*"):o.some(i=>(0,KL.satisfies)(e,i,{includePrerelease:t}))}var KL,fl,qL,WL,ia,jL=S(()=>{KL=Rn(yd()),fl=Rn(Ud());xg();LL();qL=Rn(GL());x();WL=Rn(Jd());tf();ia=class extends IE{constructor(e,t,i){super(e,t,i),this._hooks=[],this._requireInTheMiddleSingleton=GE.getInstance(),this._enabled=!1,this._wrap=(s,n,r)=>{if(kE(s[n])&&this._unwrap(s,n),YL.isProxy(s)){let l=(0,fl.wrap)(Object.assign({},s),n,r);return Object.defineProperty(s,n,{value:l}),l}else return(0,fl.wrap)(s,n,r)},this._unwrap=(s,n)=>YL.isProxy(s)?Object.defineProperty(s,n,{value:s[n]}):(0,fl.unwrap)(s,n),this._massWrap=(s,n,r)=>{if(s)Array.isArray(s)||(s=[s]);else{m.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){m.error("must provide one or more functions to wrap on modules");return}s.forEach(l=>{n.forEach(c=>{this._wrap(l,c,r)})})},this._massUnwrap=(s,n)=>{if(s)Array.isArray(s)||(s=[s]);else{m.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){m.error("must provide one or more functions to wrap on modules");return}s.forEach(r=>{n.forEach(l=>{this._unwrap(r,l)})})};let a=this.init();a&&!Array.isArray(a)&&(a=[a]),this._modules=a||[],this._config.enabled&&this.enable()}_warnOnPreloadedModules(){this._modules.forEach(e=>{let{name:t}=e;try{let i=k.resolve(t);k.cache[i]&&this._diag.warn(`Module ${t} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${t}`)}catch{}})}_extractPackageVersion(e){try{let t=Zj(aa.join(e,"package.json"),{encoding:"utf8"}),i=JSON.parse(t).version;return typeof i=="string"?i:void 0}catch{m.warn("Failed extracting version",e)}}_onRequire(e,t,i,a){var s;if(!a)return typeof e.patch=="function"&&(e.moduleExports=t,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:e.name}),e.patch(t)):t;let n=this._extractPackageVersion(a);if(e.moduleVersion=n,e.name===i)return FL(e.supportedVersions,n,e.includePrerelease)&&typeof e.patch=="function"&&(e.moduleExports=t,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:e.name,version:e.moduleVersion,baseDir:a}),e.patch(t,e.moduleVersion)):t;let r=(s=e.files)!==null&&s!==void 0?s:[],l=aa.normalize(i);return r.filter(u=>u.name===l).filter(u=>FL(u.supportedVersions,n,e.includePrerelease)).reduce((u,E)=>(E.moduleExports=u,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:e.name,version:e.moduleVersion,fileName:E.name,baseDir:a}),E.patch(u,e.moduleVersion)):u),t)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let e of this._modules){typeof e.patch=="function"&&e.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:e.name,version:e.moduleVersion}),e.patch(e.moduleExports,e.moduleVersion));for(let t of e.files)t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:e.name,version:e.moduleVersion,fileName:t.name}),t.patch(t.moduleExports,e.moduleVersion))}return}this._warnOnPreloadedModules();for(let e of this._modules){let t=(n,r,l)=>this._onRequire(e,n,r,l),i=(n,r,l)=>this._onRequire(e,n,r,l),a=aa.isAbsolute(e.name)?new WL.Hook([e.name],{internals:!0},i):this._requireInTheMiddleSingleton.register(e.name,i);this._hooks.push(a);let s=new qL.Hook([e.name],{internals:!1},t);this._hooks.push(s)}}}disable(){if(this._enabled){this._enabled=!1;for(let e of this._modules){typeof e.unpatch=="function"&&e.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:e.name,version:e.moduleVersion}),e.unpatch(e.moduleExports,e.moduleVersion));for(let t of e.files)t.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:e.name,version:e.moduleVersion,fileName:t.name}),t.unpatch(t.moduleExports,e.moduleVersion))}}}isEnabled(){return this._enabled}}});import{normalize as HE}from"path";var zL=S(()=>{});var XL=S(()=>{jL();zL()});var rf=S(()=>{XL()});var YE,$L=S(()=>{YE=class{constructor(e,t,i,a,s){this.name=e,this.supportedVersions=t,this.patch=i,this.unpatch=a,this.files=s||[]}}});var FE,JL=S(()=>{rf();FE=class{constructor(e,t,i,a){this.supportedVersions=t,this.patch=i,this.unpatch=a,this.name=HE(e)}}});var QL={};ge(QL,{InstrumentationBase:()=>ia,InstrumentationNodeModuleDefinition:()=>YE,InstrumentationNodeModuleFile:()=>FE,isWrapped:()=>kE,registerInstrumentations:()=>gg,safeExecuteInTheMiddle:()=>kL,safeExecuteInTheMiddleAsync:()=>HL});var ZL=S(()=>{Lg();rf();$L();JL();tf()});function $t(o={}){let e={};return Object.entries(o).forEach(([t,i])=>{typeof i<"u"?e[t]=String(i):m.warn(`Header "${t}" has invalid value (${i}) and will be ignored`)}),e}function yr(o,e){return o.endsWith("/")||(o=o+"/"),o+e}function Dr(o){try{let e=new URL(o);return e.pathname===""&&(e.pathname=e.pathname+"/"),e.toString()}catch{return m.warn(`Could not parse export URL: '${o}'`),o}}function KE(o){return typeof o=="number"?o<=0?qE(o,eI):o:e4()}function e4(){var o;let e=Number((o=Z().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&o!==void 0?o:Z().OTEL_EXPORTER_OTLP_TIMEOUT);return e<=0?qE(e,eI):e}function qE(o,e){return m.warn("Timeout must be greater than 0",o),e}function tI(o){return[429,502,503,504].includes(o)}function rI(o){if(o==null)return-1;let e=Number.parseInt(o,10);if(Number.isInteger(e))return e>0?e*1e3:-1;let t=new Date(o).getTime()-Date.now();return t>=0?t:0}var eI,Al=S(()=>{x();K();eI=1e4});var Fn,WE=S(()=>{x();K();Al();Fn=class{constructor(e={}){this._sendingPromises=[],this.url=this.getDefaultUrl(e),typeof e.hostname=="string"&&(this.hostname=e.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new We(this._shutdown,this),this._concurrencyLimit=typeof e.concurrencyLimit=="number"?e.concurrencyLimit:30,this.timeoutMillis=KE(e.timeoutMillis),this.onInit(e)}export(e,t){if(this._shutdownOnce.isCalled){t({code:te.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){t({code:te.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(e).then(()=>{t({code:te.SUCCESS})}).catch(i=>{t({code:te.FAILED,error:i})})}_export(e){return new Promise((t,i)=>{try{m.debug("items to be sent",e),this.send(e,t,i)}catch(a){i(a)}})}shutdown(){return this._shutdownOnce.call()}forceFlush(){return Promise.all(this._sendingPromises).then(()=>{})}_shutdown(){return m.debug("shutdown started"),this.onShutdown(),this.forceFlush()}}});var cn,nf=S(()=>{(function(o){o.NONE="none",o.GZIP="gzip"})(cn||(cn={}))});function nI(o){return o||((Z().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION||Z().OTEL_EXPORTER_OTLP_COMPRESSION)===cn.GZIP?cn.GZIP:cn.NONE)}var oI=S(()=>{nf();K()});function iI(o){return[429,502,503,504].includes(o)}function aI(o){if(o==null)return;let e=Number.parseInt(o,10);if(Number.isInteger(e))return e>0?e*1e3:-1;let t=new Date(o).getTime()-Date.now();return t>=0?t:0}var sI=S(()=>{});var Jt,hl=S(()=>{Jt=class extends Error{constructor(e,t,i){super(e),this.name="OTLPExporterError",this.data=i,this.code=t}}});var cI={};ge(cI,{createHttpAgent:()=>i4,sendWithHttp:()=>r4});import*as jE from"http";import*as zE from"https";import*as lI from"zlib";import{Readable as t4}from"stream";function r4(o,e,t,i,a){let s=new URL(o.url),n=Number(process.versions.node.split(".")[0]),r={hostname:s.hostname,port:s.port,path:s.pathname,method:"POST",headers:Object.assign({},o.headers),agent:e},c=(s.protocol==="http:"?jE.request:zE.request)(r,E=>{let d=[];E.on("data",f=>d.push(f)),E.on("end",()=>{if(E.statusCode&&E.statusCode<299)i({status:"success",data:Buffer.concat(d)});else if(E.statusCode&&iI(E.statusCode))i({status:"retryable",retryInMillis:aI(E.headers["retry-after"])});else{let f=new Jt(E.statusMessage,E.statusCode);i({status:"failure",error:f})}})});c.setTimeout(a,()=>{c.destroy(),i({status:"failure",error:new Error("Request Timeout")})}),c.on("error",E=>{i({status:"failure",error:E})});let u=n>=14?"close":"abort";c.on(u,()=>{i({status:"failure",error:new Error("Request timed out")})}),n4(c,o.compression,t,E=>{i({status:"failure",error:E})})}function n4(o,e,t,i){let a=o4(t);e==="gzip"&&(o.setHeader("Content-Encoding","gzip"),a=a.on("error",i).pipe(lI.createGzip()).on("error",i)),a.pipe(o)}function o4(o){let e=new t4;return e.push(o),e.push(null),e}function i4(o,e){let i=new URL(o).protocol==="http:"?jE.Agent:zE.Agent;return new i(e)}var uI=S(()=>{sI();hl()});function EI(o){return new of(o)}var of,_I=S(()=>{of=class{constructor(e){this._parameters=e,this._send=null,this._agent=null}async send(e,t){if(this._send==null){let{sendWithHttp:i,createHttpAgent:a}=(uI(),$(cI));this._agent=a(this._parameters.url,this._parameters.agentOptions),this._send=i}return new Promise(i=>{var a;(a=this._send)===null||a===void 0||a.call(this,this._parameters,this._agent,e,s=>{i(s)},t)})}shutdown(){}}});function a4(){return Math.random()*(2*.2)-.2}function XE(o){return new af(o.transport)}var af,sf=S(()=>{af=class{constructor(e){this._transport=e}retry(e,t,i){return new Promise((a,s)=>{setTimeout(()=>{this._transport.send(e,t).then(a,s)},i)})}async send(e,t){var i;let a=Date.now()+t,s=await this._transport.send(e,t),n=5,r=1e3;for(;s.status==="retryable"&&n>0;){n--;let l=Math.max(Math.min(r,5e3)+a4(),0);r=r*1.5;let c=(i=s.retryInMillis)!==null&&i!==void 0?i:l,u=a-Date.now();if(c>u)return s;s=await this.retry(e,u,c)}return s}shutdown(){return this._transport.shutdown()}}});var bt,TI=S(()=>{WE();oI();x();K();_I();hl();sf();bt=class extends Fn{constructor(e={},t,i){var a;super(e),e.metadata&&m.warn("Metadata cannot be set when using http"),this._serializer=t,(e==null?void 0:e.keepAlive)!=null&&(e.httpAgentOptions!=null?e.httpAgentOptions.keepAlive==null&&(e.httpAgentOptions.keepAlive=e.keepAlive):e.httpAgentOptions={keepAlive:e.keepAlive});let s=Dt.parseKeyPairsIntoRecord(Z().OTEL_EXPORTER_OTLP_HEADERS);this._transport=XE({transport:EI({agentOptions:(a=e.httpAgentOptions)!==null&&a!==void 0?a:{keepAlive:!0},compression:nI(e.compression),headers:Object.assign({},s,i),url:this.url})})}onInit(e){}send(e,t,i){if(this._shutdownOnce.isCalled){m.debug("Shutdown already started. Cannot send objects");return}let a=this._serializer.serializeRequest(e);if(a==null){i(new Error("Could not serialize message"));return}let s=this._transport.send(a,this.timeoutMillis).then(r=>{r.status==="success"?t():r.status==="failure"&&r.error?i(r.error):r.status==="retryable"?i(new Jt("Export failed with retryable status")):i(new Jt("Export failed with unknown error"))},i);this._sendingPromises.push(s);let n=()=>{let r=this._sendingPromises.indexOf(s);this._sendingPromises.splice(r,1)};s.then(n,n)}onShutdown(){}}});var SI=S(()=>{TI();nf()});function pI(o){return new lf(o)}var lf,dI=S(()=>{Al();x();lf=class{constructor(e){this._parameters=e}send(e,t){return new Promise(i=>{let a=new XMLHttpRequest;a.timeout=t,a.open("POST",this._parameters.url),Object.entries(this._parameters.headers).forEach(([s,n])=>{a.setRequestHeader(s,n)}),a.ontimeout=s=>{i({status:"failure",error:new Error("XHR request timed out")})},a.onreadystatechange=()=>{a.status>=200&&a.status<=299?(m.debug("XHR success"),i({status:"success"})):a.status&&tI(a.status)?i({status:"retryable",retryInMillis:rI(a.getResponseHeader("Retry-After"))}):a.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},a.onabort=()=>{i({status:"failure",error:new Error("XHR request aborted")})},a.onerror=()=>{i({status:"failure",error:new Error("XHR request errored")})},a.send(new Blob([e],{type:this._parameters.headers["Content-Type"]}))})}shutdown(){}}});function fI(o){return new cf(o)}var cf,AI=S(()=>{x();cf=class{constructor(e){this._params=e}send(e){return new Promise(t=>{navigator.sendBeacon(this._params.url,new Blob([e],{type:this._params.blobType}))?(m.debug("SendBeacon success"),t({status:"success"})):t({status:"failure",error:new Error("SendBeacon failed")})})}shutdown(){}}});var vl,hI=S(()=>{WE();hl();Al();x();K();dI();AI();sf();vl=class extends Fn{constructor(e={},t,i){super(e),this._serializer=t,!!e.headers||typeof navigator.sendBeacon!="function"?this._transport=XE({transport:pI({headers:Object.assign({},$t(e.headers),Dt.parseKeyPairsIntoRecord(Z().OTEL_EXPORTER_OTLP_HEADERS),{"Content-Type":i}),url:this.url})}):this._transport=fI({url:this.url,blobType:i})}onInit(){}onShutdown(){}send(e,t,i){if(this._shutdownOnce.isCalled){m.debug("Shutdown already started. Cannot send objects");return}let a=this._serializer.serializeRequest(e);if(a==null){i(new Error("Could not serialize message"));return}let s=this._transport.send(a,this.timeoutMillis).then(r=>{r.status==="success"?t():r.status==="failure"&&r.error?i(r.error):r.status==="retryable"?i(new Jt("Export failed with retryable status")):i(new Jt("Export failed with unknown error"))},i);this._sendingPromises.push(s);let n=()=>{let r=this._sendingPromises.indexOf(s);this._sendingPromises.splice(r,1)};s.then(n,n)}}});var vI=S(()=>{hI()});var RI=S(()=>{SI();vI()});var uf={};ge(uf,{CompressionAlgorithm:()=>cn,OTLPExporterBase:()=>Fn,OTLPExporterBrowserBase:()=>vl,OTLPExporterError:()=>Jt,OTLPExporterNodeBase:()=>bt,appendResourcePathToUrl:()=>yr,appendRootPathToUrlIfNeeded:()=>Dr,configureExporterTimeout:()=>KE,invalidTimeout:()=>qE,parseHeaders:()=>$t});var un=S(()=>{RI();WE();hl();Al()});function $E(o){let e=BigInt(1e9);return BigInt(o[0])*e+BigInt(o[1])}function Ef(o){let e=Number(BigInt.asUintN(32,o)),t=Number(BigInt.asUintN(32,o>>BigInt(32)));return{low:e,high:t}}function JE(o){let e=$E(o);return Ef(e)}function _f(o){return $E(o).toString()}function mI(o){return o}function OI(o){if(o!==void 0)return gn(o)}function Kn(o){var e,t;if(o===void 0)return l4;let i=(e=o.useLongBits)!==null&&e!==void 0?e:!0,a=(t=o.useHex)!==null&&t!==void 0?t:!1;return{encodeHrTime:i?JE:s4,encodeSpanContext:a?mI:gn,encodeOptionalSpanContext:a?mI:OI}}var s4,l4,Rl=S(()=>{K();s4=typeof BigInt<"u"?_f:Hc;l4={encodeHrTime:JE,encodeSpanContext:gn,encodeOptionalSpanContext:OI}});var QE,NI=S(()=>{(function(o){o[o.SPAN_KIND_UNSPECIFIED=0]="SPAN_KIND_UNSPECIFIED",o[o.SPAN_KIND_INTERNAL=1]="SPAN_KIND_INTERNAL",o[o.SPAN_KIND_SERVER=2]="SPAN_KIND_SERVER",o[o.SPAN_KIND_CLIENT=3]="SPAN_KIND_CLIENT",o[o.SPAN_KIND_PRODUCER=4]="SPAN_KIND_PRODUCER",o[o.SPAN_KIND_CONSUMER=5]="SPAN_KIND_CONSUMER"})(QE||(QE={}))});function sa(o){return{name:o.name,version:o.version}}function xr(o){return Object.keys(o).map(e=>ZE(e,o[e]))}function ZE(o,e){return{key:o,value:e_(e)}}function e_(o){let e=typeof o;return e==="string"?{stringValue:o}:e==="number"?Number.isInteger(o)?{intValue:o}:{doubleValue:o}:e==="boolean"?{boolValue:o}:o instanceof Uint8Array?{bytesValue:o}:Array.isArray(o)?{arrayValue:{values:o.map(e_)}}:e==="object"&&o!=null?{kvlistValue:{values:Object.entries(o).map(([t,i])=>ZE(t,i))}}:{}}var la=S(()=>{});function MI(o,e){var t;let i=o.spanContext(),a=o.status;return{traceId:e.encodeSpanContext(i.traceId),spanId:e.encodeSpanContext(i.spanId),parentSpanId:e.encodeOptionalSpanContext(o.parentSpanId),traceState:(t=i.traceState)===null||t===void 0?void 0:t.serialize(),name:o.name,kind:o.kind==null?0:o.kind+1,startTimeUnixNano:e.encodeHrTime(o.startTime),endTimeUnixNano:e.encodeHrTime(o.endTime),attributes:xr(o.attributes),droppedAttributesCount:o.droppedAttributesCount,events:o.events.map(s=>u4(s,e)),droppedEventsCount:o.droppedEventsCount,status:{code:a.code,message:a.message},links:o.links.map(s=>c4(s,e)),droppedLinksCount:o.droppedLinksCount}}function c4(o,e){var t;return{attributes:o.attributes?xr(o.attributes):[],spanId:e.encodeSpanContext(o.context.spanId),traceId:e.encodeSpanContext(o.context.traceId),traceState:(t=o.context.traceState)===null||t===void 0?void 0:t.serialize(),droppedAttributesCount:o.droppedAttributesCount||0}}function u4(o,e){return{attributes:o.attributes?xr(o.attributes):[],name:o.name,timeUnixNano:e.encodeHrTime(o.time),droppedAttributesCount:o.droppedAttributesCount||0}}var PI=S(()=>{la()});function ca(o){return{attributes:xr(o.attributes),droppedAttributesCount:0}}var t_=S(()=>{la()});function qn(o,e){let t=Kn(e);return{resourceSpans:_4(o,t)}}function E4(o){let e=new Map;for(let t of o){let i=e.get(t.resource);i||(i=new Map,e.set(t.resource,i));let a=`${t.instrumentationLibrary.name}@${t.instrumentationLibrary.version||""}:${t.instrumentationLibrary.schemaUrl||""}`,s=i.get(a);s||(s=[],i.set(a,s)),s.push(t)}return e}function _4(o,e){let t=E4(o),i=[],a=t.entries(),s=a.next();for(;!s.done;){let[n,r]=s.value,l=[],c=r.values(),u=c.next();for(;!u.done;){let d=u.value;if(d.length>0){let f=d.map(O=>MI(O,e));l.push({scope:sa(d[0].instrumentationLibrary),spans:f,schemaUrl:d[0].instrumentationLibrary.schemaUrl})}u=c.next()}let E={resource:ca(n),scopeSpans:l,schemaUrl:void 0};i.push(E),s=a.next()}return i}var r_=S(()=>{PI();Rl();la();t_()});function gI(o,e){let t=Kn(e);return{resource:ca(o.resource),schemaUrl:void 0,scopeMetrics:T4(o.scopeMetrics,t)}}function T4(o,e){return Array.from(o.map(t=>({scope:sa(t.scope),metrics:t.metrics.map(i=>S4(i,e)),schemaUrl:t.scope.schemaUrl})))}function S4(o,e){let t={name:o.descriptor.name,description:o.descriptor.description,unit:o.descriptor.unit},i=A4(o.aggregationTemporality);switch(o.dataPointType){case tt.SUM:t.sum={aggregationTemporality:i,isMonotonic:o.isMonotonic,dataPoints:CI(o,e)};break;case tt.GAUGE:t.gauge={dataPoints:CI(o,e)};break;case tt.HISTOGRAM:t.histogram={aggregationTemporality:i,dataPoints:d4(o,e)};break;case tt.EXPONENTIAL_HISTOGRAM:t.exponentialHistogram={aggregationTemporality:i,dataPoints:f4(o,e)};break}return t}function p4(o,e,t){let i={attributes:xr(o.attributes),startTimeUnixNano:t.encodeHrTime(o.startTime),timeUnixNano:t.encodeHrTime(o.endTime)};switch(e){case Rt.INT:i.asInt=o.value;break;case Rt.DOUBLE:i.asDouble=o.value;break}return i}function CI(o,e){return o.dataPoints.map(t=>p4(t,o.descriptor.valueType,e))}function d4(o,e){return o.dataPoints.map(t=>{let i=t.value;return{attributes:xr(t.attributes),bucketCounts:i.buckets.counts,explicitBounds:i.buckets.boundaries,count:i.count,sum:i.sum,min:i.min,max:i.max,startTimeUnixNano:e.encodeHrTime(t.startTime),timeUnixNano:e.encodeHrTime(t.endTime)}})}function f4(o,e){return o.dataPoints.map(t=>{let i=t.value;return{attributes:xr(t.attributes),count:i.count,min:i.min,max:i.max,sum:i.sum,positive:{offset:i.positive.offset,bucketCounts:i.positive.bucketCounts},negative:{offset:i.negative.offset,bucketCounts:i.negative.bucketCounts},scale:i.scale,zeroCount:i.zeroCount,startTimeUnixNano:e.encodeHrTime(t.startTime),timeUnixNano:e.encodeHrTime(t.endTime)}})}function A4(o){switch(o){case _r.DELTA:return 1;case _r.CUMULATIVE:return 2}}var LI=S(()=>{x();zu();Rl();la();t_()});function ua(o,e){return{resourceMetrics:o.map(t=>gI(t,e))}}var n_=S(()=>{LI()});function Ea(o,e){let t=Kn(e);return{resourceLogs:v4(o,t)}}function h4(o){let e=new Map;for(let t of o){let{resource:i,instrumentationScope:{name:a,version:s="",schemaUrl:n=""}}=t,r=e.get(i);r||(r=new Map,e.set(i,r));let l=`${a}@${s}:${n}`,c=r.get(l);c||(c=[],r.set(l,c)),c.push(t)}return e}function v4(o,e){let t=h4(o);return Array.from(t,([i,a])=>({resource:ca(i),scopeLogs:Array.from(a,([,s])=>({scope:sa(s[0].instrumentationScope),logRecords:s.map(n=>R4(n,e)),schemaUrl:s[0].instrumentationScope.schemaUrl})),schemaUrl:void 0}))}function R4(o,e){var t,i,a;return{timeUnixNano:e.encodeHrTime(o.hrTime),observedTimeUnixNano:e.encodeHrTime(o.hrTimeObserved),severityNumber:o.severityNumber,severityText:o.severityText,body:e_(o.body),attributes:m4(o.attributes),droppedAttributesCount:o.droppedAttributesCount,flags:(t=o.spanContext)===null||t===void 0?void 0:t.traceFlags,traceId:e.encodeOptionalSpanContext((i=o.spanContext)===null||i===void 0?void 0:i.traceId),spanId:e.encodeOptionalSpanContext((a=o.spanContext)===null||a===void 0?void 0:a.spanId)}}function m4(o){return Object.keys(o).map(e=>ZE(e,o[e]))}var o_=S(()=>{Rl();la();t_()});var Tf=A((PNe,II)=>{"use strict";II.exports=O4;function O4(o,e){for(var t=new Array(arguments.length-1),i=0,a=2,s=!0;a<arguments.length;)t[i++]=arguments[a++];return new Promise(function(r,l){t[i]=function(u){if(s)if(s=!1,u)l(u);else{for(var E=new Array(arguments.length-1),d=0;d<E.length;)E[d++]=arguments[d];r.apply(null,E)}};try{o.apply(e||null,t)}catch(c){s&&(s=!1,l(c))}})}});var UI=A(xI=>{"use strict";var i_=xI;i_.length=function(e){var t=e.length;if(!t)return 0;for(var i=0;--t%4>1&&e.charAt(t)==="=";)++i;return Math.ceil(e.length*3)/4-i};var _a=new Array(64),DI=new Array(123);for(Sr=0;Sr<64;)DI[_a[Sr]=Sr<26?Sr+65:Sr<52?Sr+71:Sr<62?Sr-4:Sr-59|43]=Sr++;var Sr;i_.encode=function(e,t,i){for(var a=null,s=[],n=0,r=0,l;t<i;){var c=e[t++];switch(r){case 0:s[n++]=_a[c>>2],l=(c&3)<<4,r=1;break;case 1:s[n++]=_a[l|c>>4],l=(c&15)<<2,r=2;break;case 2:s[n++]=_a[l|c>>6],s[n++]=_a[c&63],r=0;break}n>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,s)),n=0)}return r&&(s[n++]=_a[l],s[n++]=61,r===1&&(s[n++]=61)),a?(n&&a.push(String.fromCharCode.apply(String,s.slice(0,n))),a.join("")):String.fromCharCode.apply(String,s.slice(0,n))};var yI="invalid encoding";i_.decode=function(e,t,i){for(var a=i,s=0,n,r=0;r<e.length;){var l=e.charCodeAt(r++);if(l===61&&s>1)break;if((l=DI[l])===void 0)throw Error(yI);switch(s){case 0:n=l,s=1;break;case 1:t[i++]=n<<2|(l&48)>>4,n=l,s=2;break;case 2:t[i++]=(n&15)<<4|(l&60)>>2,n=l,s=3;break;case 3:t[i++]=(n&3)<<6|l,s=0;break}}if(s===1)throw Error(yI);return i-a};i_.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}});var VI=A((gNe,bI)=>{"use strict";bI.exports=a_;function a_(){this._listeners={}}a_.prototype.on=function(e,t,i){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:i||this}),this};a_.prototype.off=function(e,t){if(e===void 0)this._listeners={};else if(t===void 0)this._listeners[e]=[];else for(var i=this._listeners[e],a=0;a<i.length;)i[a].fn===t?i.splice(a,1):++a;return this};a_.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var i=[],a=1;a<arguments.length;)i.push(arguments[a++]);for(a=0;a<t.length;)t[a].fn.apply(t[a++].ctx,i)}return this}});var FI=A((LNe,YI)=>{"use strict";YI.exports=wI(wI);function wI(o){return typeof Float32Array<"u"?function(){var e=new Float32Array([-0]),t=new Uint8Array(e.buffer),i=t[3]===128;function a(l,c,u){e[0]=l,c[u]=t[0],c[u+1]=t[1],c[u+2]=t[2],c[u+3]=t[3]}function s(l,c,u){e[0]=l,c[u]=t[3],c[u+1]=t[2],c[u+2]=t[1],c[u+3]=t[0]}o.writeFloatLE=i?a:s,o.writeFloatBE=i?s:a;function n(l,c){return t[0]=l[c],t[1]=l[c+1],t[2]=l[c+2],t[3]=l[c+3],e[0]}function r(l,c){return t[3]=l[c],t[2]=l[c+1],t[1]=l[c+2],t[0]=l[c+3],e[0]}o.readFloatLE=i?n:r,o.readFloatBE=i?r:n}():function(){function e(i,a,s,n){var r=a<0?1:0;if(r&&(a=-a),a===0)i(1/a>0?0:2147483648,s,n);else if(isNaN(a))i(2143289344,s,n);else if(a>34028234663852886e22)i((r<<31|2139095040)>>>0,s,n);else if(a<11754943508222875e-54)i((r<<31|Math.round(a/1401298464324817e-60))>>>0,s,n);else{var l=Math.floor(Math.log(a)/Math.LN2),c=Math.round(a*Math.pow(2,-l)*8388608)&8388607;i((r<<31|l+127<<23|c)>>>0,s,n)}}o.writeFloatLE=e.bind(null,BI),o.writeFloatBE=e.bind(null,GI);function t(i,a,s){var n=i(a,s),r=(n>>31)*2+1,l=n>>>23&255,c=n&8388607;return l===255?c?NaN:r*(1/0):l===0?r*1401298464324817e-60*c:r*Math.pow(2,l-150)*(c+8388608)}o.readFloatLE=t.bind(null,kI),o.readFloatBE=t.bind(null,HI)}(),typeof Float64Array<"u"?function(){var e=new Float64Array([-0]),t=new Uint8Array(e.buffer),i=t[7]===128;function a(l,c,u){e[0]=l,c[u]=t[0],c[u+1]=t[1],c[u+2]=t[2],c[u+3]=t[3],c[u+4]=t[4],c[u+5]=t[5],c[u+6]=t[6],c[u+7]=t[7]}function s(l,c,u){e[0]=l,c[u]=t[7],c[u+1]=t[6],c[u+2]=t[5],c[u+3]=t[4],c[u+4]=t[3],c[u+5]=t[2],c[u+6]=t[1],c[u+7]=t[0]}o.writeDoubleLE=i?a:s,o.writeDoubleBE=i?s:a;function n(l,c){return t[0]=l[c],t[1]=l[c+1],t[2]=l[c+2],t[3]=l[c+3],t[4]=l[c+4],t[5]=l[c+5],t[6]=l[c+6],t[7]=l[c+7],e[0]}function r(l,c){return t[7]=l[c],t[6]=l[c+1],t[5]=l[c+2],t[4]=l[c+3],t[3]=l[c+4],t[2]=l[c+5],t[1]=l[c+6],t[0]=l[c+7],e[0]}o.readDoubleLE=i?n:r,o.readDoubleBE=i?r:n}():function(){function e(i,a,s,n,r,l){var c=n<0?1:0;if(c&&(n=-n),n===0)i(0,r,l+a),i(1/n>0?0:2147483648,r,l+s);else if(isNaN(n))i(0,r,l+a),i(2146959360,r,l+s);else if(n>17976931348623157e292)i(0,r,l+a),i((c<<31|2146435072)>>>0,r,l+s);else{var u;if(n<22250738585072014e-324)u=n/5e-324,i(u>>>0,r,l+a),i((c<<31|u/4294967296)>>>0,r,l+s);else{var E=Math.floor(Math.log(n)/Math.LN2);E===1024&&(E=1023),u=n*Math.pow(2,-E),i(u*4503599627370496>>>0,r,l+a),i((c<<31|E+1023<<20|u*1048576&1048575)>>>0,r,l+s)}}}o.writeDoubleLE=e.bind(null,BI,0,4),o.writeDoubleBE=e.bind(null,GI,4,0);function t(i,a,s,n,r){var l=i(n,r+a),c=i(n,r+s),u=(c>>31)*2+1,E=c>>>20&2047,d=4294967296*(c&1048575)+l;return E===2047?d?NaN:u*(1/0):E===0?u*5e-324*d:u*Math.pow(2,E-1075)*(d+4503599627370496)}o.readDoubleLE=t.bind(null,kI,0,4),o.readDoubleBE=t.bind(null,HI,4,0)}(),o}function BI(o,e,t){e[t]=o&255,e[t+1]=o>>>8&255,e[t+2]=o>>>16&255,e[t+3]=o>>>24}function GI(o,e,t){e[t]=o>>>24,e[t+1]=o>>>16&255,e[t+2]=o>>>8&255,e[t+3]=o&255}function kI(o,e){return(o[e]|o[e+1]<<8|o[e+2]<<16|o[e+3]<<24)>>>0}function HI(o,e){return(o[e]<<24|o[e+1]<<16|o[e+2]<<8|o[e+3])>>>0}});var Sf=A((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(o){}return null}});var qI=A(KI=>{"use strict";var pf=KI;pf.length=function(e){for(var t=0,i=0,a=0;a<e.length;++a)i=e.charCodeAt(a),i<128?t+=1:i<2048?t+=2:(i&64512)===55296&&(e.charCodeAt(a+1)&64512)===56320?(++a,t+=4):t+=3;return t};pf.read=function(e,t,i){var a=i-t;if(a<1)return"";for(var s=null,n=[],r=0,l;t<i;)l=e[t++],l<128?n[r++]=l:l>191&&l<224?n[r++]=(l&31)<<6|e[t++]&63:l>239&&l<365?(l=((l&7)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536,n[r++]=55296+(l>>10),n[r++]=56320+(l&1023)):n[r++]=(l&15)<<12|(e[t++]&63)<<6|e[t++]&63,r>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,n)),r=0);return s?(r&&s.push(String.fromCharCode.apply(String,n.slice(0,r))),s.join("")):String.fromCharCode.apply(String,n.slice(0,r))};pf.write=function(e,t,i){for(var a=i,s,n,r=0;r<e.length;++r)s=e.charCodeAt(r),s<128?t[i++]=s:s<2048?(t[i++]=s>>6|192,t[i++]=s&63|128):(s&64512)===55296&&((n=e.charCodeAt(r+1))&64512)===56320?(s=65536+((s&1023)<<10)+(n&1023),++r,t[i++]=s>>18|240,t[i++]=s>>12&63|128,t[i++]=s>>6&63|128,t[i++]=s&63|128):(t[i++]=s>>12|224,t[i++]=s>>6&63|128,t[i++]=s&63|128);return i-a}});var jI=A((yNe,WI)=>{"use strict";WI.exports=N4;function N4(o,e,t){var i=t||8192,a=i>>>1,s=null,n=i;return function(l){if(l<1||l>a)return o(l);n+l>i&&(s=o(i),n=0);var c=e.call(s,n,n+=l);return n&7&&(n=(n|7)+1),c}}});var XI=A((DNe,zI)=>{"use strict";zI.exports=ze;var ml=Ur();function ze(o,e){this.lo=o>>>0,this.hi=e>>>0}var Go=ze.zero=new ze(0,0);Go.toNumber=function(){return 0};Go.zzEncode=Go.zzDecode=function(){return this};Go.length=function(){return 1};var M4=ze.zeroHash="\0\0\0\0\0\0\0\0";ze.fromNumber=function(e){if(e===0)return Go;var t=e<0;t&&(e=-e);var i=e>>>0,a=(e-i)/4294967296>>>0;return t&&(a=~a>>>0,i=~i>>>0,++i>4294967295&&(i=0,++a>4294967295&&(a=0))),new ze(i,a)};ze.from=function(e){if(typeof e=="number")return ze.fromNumber(e);if(ml.isString(e))if(ml.Long)e=ml.Long.fromString(e);else return ze.fromNumber(parseInt(e,10));return e.low||e.high?new ze(e.low>>>0,e.high>>>0):Go};ze.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,i=~this.hi>>>0;return t||(i=i+1>>>0),-(t+i*4294967296)}return this.lo+this.hi*4294967296};ze.prototype.toLong=function(e){return ml.Long?new ml.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var Wn=String.prototype.charCodeAt;ze.fromHash=function(e){return e===M4?Go:new ze((Wn.call(e,0)|Wn.call(e,1)<<8|Wn.call(e,2)<<16|Wn.call(e,3)<<24)>>>0,(Wn.call(e,4)|Wn.call(e,5)<<8|Wn.call(e,6)<<16|Wn.call(e,7)<<24)>>>0)};ze.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};ze.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this};ze.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this};ze.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return i===0?t===0?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:i<128?9:10}});var Ur=A(df=>{"use strict";var Y=df;Y.asPromise=Tf();Y.base64=UI();Y.EventEmitter=VI();Y.float=FI();Y.inquire=Sf();Y.utf8=qI();Y.pool=jI();Y.LongBits=XI();Y.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);Y.global=Y.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||df;Y.emptyArray=Object.freeze?Object.freeze([]):[];Y.emptyObject=Object.freeze?Object.freeze({}):{};Y.isInteger=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};Y.isString=function(e){return typeof e=="string"||e instanceof String};Y.isObject=function(e){return e&&typeof e=="object"};Y.isset=Y.isSet=function(e,t){var i=e[t];return i!=null&&e.hasOwnProperty(t)?typeof i!="object"||(Array.isArray(i)?i.length:Object.keys(i).length)>0:!1};Y.Buffer=function(){try{var o=Y.inquire("buffer").Buffer;return o.prototype.utf8Write?o:null}catch{return null}}();Y._Buffer_from=null;Y._Buffer_allocUnsafe=null;Y.newBuffer=function(e){return typeof e=="number"?Y.Buffer?Y._Buffer_allocUnsafe(e):new Y.Array(e):Y.Buffer?Y._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)};Y.Array=typeof Uint8Array<"u"?Uint8Array:Array;Y.Long=Y.global.dcodeIO&&Y.global.dcodeIO.Long||Y.global.Long||Y.inquire("long");Y.key2Re=/^true|false|0|1$/;Y.key32Re=/^-?(?:0|[1-9][0-9]*)$/;Y.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;Y.longToHash=function(e){return e?Y.LongBits.from(e).toHash():Y.LongBits.zeroHash};Y.longFromHash=function(e,t){var i=Y.LongBits.fromHash(e);return Y.Long?Y.Long.fromBits(i.lo,i.hi,t):i.toNumber(!!t)};function $I(o,e,t){for(var i=Object.keys(e),a=0;a<i.length;++a)(o[i[a]]===void 0||!t)&&(o[i[a]]=e[i[a]]);return o}Y.merge=$I;Y.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)};function JI(o){function e(t,i){if(!(this instanceof e))return new e(t,i);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:new Error().stack||""}),i&&$I(this,i)}return e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return o},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),e}Y.newError=JI;Y.ProtocolError=JI("ProtocolError");Y.oneOfGetter=function(e){for(var t={},i=0;i<e.length;++i)t[e[i]]=1;return function(){for(var a=Object.keys(this),s=a.length-1;s>-1;--s)if(t[a[s]]===1&&this[a[s]]!==void 0&&this[a[s]]!==null)return a[s]}};Y.oneOfSetter=function(e){return function(t){for(var i=0;i<e.length;++i)e[i]!==t&&delete this[e[i]]}};Y.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};Y._configure=function(){var o=Y.Buffer;if(!o){Y._Buffer_from=Y._Buffer_allocUnsafe=null;return}Y._Buffer_from=o.from!==Uint8Array.from&&o.from||function(t,i){return new o(t,i)},Y._Buffer_allocUnsafe=o.allocUnsafe||function(t){return new o(t)}}});var l_=A((UNe,ty)=>{"use strict";ty.exports=fe;var Qt=Ur(),ff,s_=Qt.LongBits,QI=Qt.base64,ZI=Qt.utf8;function Ol(o,e,t){this.fn=o,this.len=e,this.next=void 0,this.val=t}function hf(){}function P4(o){this.head=o.head,this.tail=o.tail,this.len=o.len,this.next=o.states}function fe(){this.len=0,this.head=new Ol(hf,0,0),this.tail=this.head,this.states=null}var ey=function(){return Qt.Buffer?function(){return(fe.create=function(){return new ff})()}:function(){return new fe}};fe.create=ey();fe.alloc=function(e){return new Qt.Array(e)};Qt.Array!==Array&&(fe.alloc=Qt.pool(fe.alloc,Qt.Array.prototype.subarray));fe.prototype._push=function(e,t,i){return this.tail=this.tail.next=new Ol(e,t,i),this.len+=t,this};function vf(o,e,t){e[t]=o&255}function C4(o,e,t){for(;o>127;)e[t++]=o&127|128,o>>>=7;e[t]=o}function Rf(o,e){this.len=o,this.next=void 0,this.val=e}Rf.prototype=Object.create(Ol.prototype);Rf.prototype.fn=C4;fe.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new Rf((e=e>>>0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this};fe.prototype.int32=function(e){return e<0?this._push(mf,10,s_.fromNumber(e)):this.uint32(e)};fe.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)};function mf(o,e,t){for(;o.hi;)e[t++]=o.lo&127|128,o.lo=(o.lo>>>7|o.hi<<25)>>>0,o.hi>>>=7;for(;o.lo>127;)e[t++]=o.lo&127|128,o.lo=o.lo>>>7;e[t++]=o.lo}fe.prototype.uint64=function(e){var t=s_.from(e);return this._push(mf,t.length(),t)};fe.prototype.int64=fe.prototype.uint64;fe.prototype.sint64=function(e){var t=s_.from(e).zzEncode();return this._push(mf,t.length(),t)};fe.prototype.bool=function(e){return this._push(vf,1,e?1:0)};function Af(o,e,t){e[t]=o&255,e[t+1]=o>>>8&255,e[t+2]=o>>>16&255,e[t+3]=o>>>24}fe.prototype.fixed32=function(e){return this._push(Af,4,e>>>0)};fe.prototype.sfixed32=fe.prototype.fixed32;fe.prototype.fixed64=function(e){var t=s_.from(e);return this._push(Af,4,t.lo)._push(Af,4,t.hi)};fe.prototype.sfixed64=fe.prototype.fixed64;fe.prototype.float=function(e){return this._push(Qt.float.writeFloatLE,4,e)};fe.prototype.double=function(e){return this._push(Qt.float.writeDoubleLE,8,e)};var g4=Qt.Array.prototype.set?function(e,t,i){t.set(e,i)}:function(e,t,i){for(var a=0;a<e.length;++a)t[i+a]=e[a]};fe.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(vf,1,0);if(Qt.isString(e)){var i=fe.alloc(t=QI.length(e));QI.decode(e,i,0),e=i}return this.uint32(t)._push(g4,t,e)};fe.prototype.string=function(e){var t=ZI.length(e);return t?this.uint32(t)._push(ZI.write,t,e):this._push(vf,1,0)};fe.prototype.fork=function(){return this.states=new P4(this),this.head=this.tail=new Ol(hf,0,0),this.len=0,this};fe.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Ol(hf,0,0),this.len=0),this};fe.prototype.ldelim=function(){var e=this.head,t=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=e.next,this.tail=t,this.len+=i),this};fe.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),i=0;e;)e.fn(e.val,t,i),i+=e.len,e=e.next;return t};fe._configure=function(o){ff=o,fe.create=ey(),ff._configure()}});var oy=A((bNe,ny)=>{"use strict";ny.exports=br;var ry=l_();(br.prototype=Object.create(ry.prototype)).constructor=br;var jn=Ur();function br(){ry.call(this)}br._configure=function(){br.alloc=jn._Buffer_allocUnsafe,br.writeBytesBuffer=jn.Buffer&&jn.Buffer.prototype instanceof Uint8Array&&jn.Buffer.prototype.set.name==="set"?function(e,t,i){t.set(e,i)}:function(e,t,i){if(e.copy)e.copy(t,i,0,e.length);else for(var a=0;a<e.length;)t[i++]=e[a++]}};br.prototype.bytes=function(e){jn.isString(e)&&(e=jn._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(br.writeBytesBuffer,t,e),this};function L4(o,e,t){o.length<40?jn.utf8.write(o,e,t):e.utf8Write?e.utf8Write(o,t):e.write(o,t)}br.prototype.string=function(e){var t=jn.Buffer.byteLength(e);return this.uint32(t),t&&this._push(L4,t,e),this};br._configure()});var u_=A((VNe,cy)=>{"use strict";cy.exports=Ve;var pr=Ur(),Nf,sy=pr.LongBits,I4=pr.utf8;function dr(o,e){return RangeError("index out of range: "+o.pos+" + "+(e||1)+" > "+o.len)}function Ve(o){this.buf=o,this.pos=0,this.len=o.length}var iy=typeof Uint8Array<"u"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new Ve(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new Ve(e);throw Error("illegal buffer")},ly=function(){return pr.Buffer?function(t){return(Ve.create=function(a){return pr.Buffer.isBuffer(a)?new Nf(a):iy(a)})(t)}:iy};Ve.create=ly();Ve.prototype._slice=pr.Array.prototype.subarray||pr.Array.prototype.slice;Ve.prototype.uint32=function(){var e=4294967295;return function(){if(e=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(e=(e|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,dr(this,10);return e}}();Ve.prototype.int32=function(){return this.uint32()|0};Ve.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(e&1)|0};function Of(){var o=new sy(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(o.lo=(o.lo|(this.buf[this.pos]&127)<<e*7)>>>0,this.buf[this.pos++]<128)return o;if(o.lo=(o.lo|(this.buf[this.pos]&127)<<28)>>>0,o.hi=(o.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return o;e=0}else{for(;e<3;++e){if(this.pos>=this.len)throw dr(this);if(o.lo=(o.lo|(this.buf[this.pos]&127)<<e*7)>>>0,this.buf[this.pos++]<128)return o}return o.lo=(o.lo|(this.buf[this.pos++]&127)<<e*7)>>>0,o}if(this.len-this.pos>4){for(;e<5;++e)if(o.hi=(o.hi|(this.buf[this.pos]&127)<<e*7+3)>>>0,this.buf[this.pos++]<128)return o}else for(;e<5;++e){if(this.pos>=this.len)throw dr(this);if(o.hi=(o.hi|(this.buf[this.pos]&127)<<e*7+3)>>>0,this.buf[this.pos++]<128)return o}throw Error("invalid varint encoding")}Ve.prototype.bool=function(){return this.uint32()!==0};function c_(o,e){return(o[e-4]|o[e-3]<<8|o[e-2]<<16|o[e-1]<<24)>>>0}Ve.prototype.fixed32=function(){if(this.pos+4>this.len)throw dr(this,4);return c_(this.buf,this.pos+=4)};Ve.prototype.sfixed32=function(){if(this.pos+4>this.len)throw dr(this,4);return c_(this.buf,this.pos+=4)|0};function ay(){if(this.pos+8>this.len)throw dr(this,8);return new sy(c_(this.buf,this.pos+=4),c_(this.buf,this.pos+=4))}Ve.prototype.float=function(){if(this.pos+4>this.len)throw dr(this,4);var e=pr.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e};Ve.prototype.double=function(){if(this.pos+8>this.len)throw dr(this,4);var e=pr.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e};Ve.prototype.bytes=function(){var e=this.uint32(),t=this.pos,i=this.pos+e;if(i>this.len)throw dr(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,i);if(t===i){var a=pr.Buffer;return a?a.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,i)};Ve.prototype.string=function(){var e=this.bytes();return I4.read(e,0,e.length)};Ve.prototype.skip=function(e){if(typeof e=="number"){if(this.pos+e>this.len)throw dr(this,e);this.pos+=e}else do if(this.pos>=this.len)throw dr(this);while(this.buf[this.pos++]&128);return this};Ve.prototype.skipType=function(o){switch(o){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(o=this.uint32()&7)!==4;)this.skipType(o);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+o+" at offset "+this.pos)}return this};Ve._configure=function(o){Nf=o,Ve.create=ly(),Nf._configure();var e=pr.Long?"toLong":"toNumber";pr.merge(Ve.prototype,{int64:function(){return Of.call(this)[e](!1)},uint64:function(){return Of.call(this)[e](!0)},sint64:function(){return Of.call(this).zzDecode()[e](!1)},fixed64:function(){return ay.call(this)[e](!0)},sfixed64:function(){return ay.call(this)[e](!1)}})}});var Ty=A((wNe,_y)=>{"use strict";_y.exports=ko;var Ey=u_();(ko.prototype=Object.create(Ey.prototype)).constructor=ko;var uy=Ur();function ko(o){Ey.call(this,o)}ko._configure=function(){uy.Buffer&&(ko.prototype._slice=uy.Buffer.prototype.slice)};ko.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))};ko._configure()});var py=A((BNe,Sy)=>{"use strict";Sy.exports=Nl;var Mf=Ur();(Nl.prototype=Object.create(Mf.EventEmitter.prototype)).constructor=Nl;function Nl(o,e,t){if(typeof o!="function")throw TypeError("rpcImpl must be a function");Mf.EventEmitter.call(this),this.rpcImpl=o,this.requestDelimited=!!e,this.responseDelimited=!!t}Nl.prototype.rpcCall=function o(e,t,i,a,s){if(!a)throw TypeError("request must be specified");var n=this;if(!s)return Mf.asPromise(o,n,e,t,i,a);if(!n.rpcImpl){setTimeout(function(){s(Error("already ended"))},0);return}try{return n.rpcImpl(e,t[n.requestDelimited?"encodeDelimited":"encode"](a).finish(),function(l,c){if(l)return n.emit("error",l,e),s(l);if(c===null){n.end(!0);return}if(!(c instanceof i))try{c=i[n.responseDelimited?"decodeDelimited":"decode"](c)}catch(u){return n.emit("error",u,e),s(u)}return n.emit("data",c,e),s(null,c)})}catch(r){n.emit("error",r,e),setTimeout(function(){s(r)},0);return}};Nl.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var Pf=A(dy=>{"use strict";var y4=dy;y4.Service=py()});var Cf=A((kNe,fy)=>{"use strict";fy.exports={}});var gf=A(hy=>{"use strict";var Pt=hy;Pt.build="minimal";Pt.Writer=l_();Pt.BufferWriter=oy();Pt.Reader=u_();Pt.BufferReader=Ty();Pt.util=Ur();Pt.rpc=Pf();Pt.roots=Cf();Pt.configure=Ay;function Ay(){Pt.util._configure(),Pt.Writer._configure(Pt.BufferWriter),Pt.Reader._configure(Pt.BufferReader)}Ay()});var Ry=A((YNe,vy)=>{"use strict";vy.exports=gf()});var Oy=A((FNe,my)=>{"use strict";var j=Ry(),h=j.Reader,ne=j.Writer,T=j.util,_=j.roots.default||(j.roots.default={});_.opentelemetry=function(){var o={};return o.proto=function(){var e={};return e.common=function(){var t={};return t.v1=function(){var i={};return i.AnyValue=function(){function a(n){if(n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}a.prototype.stringValue=null,a.prototype.boolValue=null,a.prototype.intValue=null,a.prototype.doubleValue=null,a.prototype.arrayValue=null,a.prototype.kvlistValue=null,a.prototype.bytesValue=null;var s;return Object.defineProperty(a.prototype,"value",{get:T.oneOfGetter(s=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:T.oneOfSetter(s)}),a.create=function(r){return new a(r)},a.encode=function(r,l){return l||(l=ne.create()),r.stringValue!=null&&Object.hasOwnProperty.call(r,"stringValue")&&l.uint32(10).string(r.stringValue),r.boolValue!=null&&Object.hasOwnProperty.call(r,"boolValue")&&l.uint32(16).bool(r.boolValue),r.intValue!=null&&Object.hasOwnProperty.call(r,"intValue")&&l.uint32(24).int64(r.intValue),r.doubleValue!=null&&Object.hasOwnProperty.call(r,"doubleValue")&&l.uint32(33).double(r.doubleValue),r.arrayValue!=null&&Object.hasOwnProperty.call(r,"arrayValue")&&_.opentelemetry.proto.common.v1.ArrayValue.encode(r.arrayValue,l.uint32(42).fork()).ldelim(),r.kvlistValue!=null&&Object.hasOwnProperty.call(r,"kvlistValue")&&_.opentelemetry.proto.common.v1.KeyValueList.encode(r.kvlistValue,l.uint32(50).fork()).ldelim(),r.bytesValue!=null&&Object.hasOwnProperty.call(r,"bytesValue")&&l.uint32(58).bytes(r.bytesValue),l},a.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},a.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.common.v1.AnyValue;r.pos<c;){var E=r.uint32();switch(E>>>3){case 1:{u.stringValue=r.string();break}case 2:{u.boolValue=r.bool();break}case 3:{u.intValue=r.int64();break}case 4:{u.doubleValue=r.double();break}case 5:{u.arrayValue=_.opentelemetry.proto.common.v1.ArrayValue.decode(r,r.uint32());break}case 6:{u.kvlistValue=_.opentelemetry.proto.common.v1.KeyValueList.decode(r,r.uint32());break}case 7:{u.bytesValue=r.bytes();break}default:r.skipType(E&7);break}}return u},a.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},a.verify=function(r){if(typeof r!="object"||r===null)return"object expected";var l={};if(r.stringValue!=null&&r.hasOwnProperty("stringValue")&&(l.value=1,!T.isString(r.stringValue)))return"stringValue: string expected";if(r.boolValue!=null&&r.hasOwnProperty("boolValue")){if(l.value===1)return"value: multiple values";if(l.value=1,typeof r.boolValue!="boolean")return"boolValue: boolean expected"}if(r.intValue!=null&&r.hasOwnProperty("intValue")){if(l.value===1)return"value: multiple values";if(l.value=1,!T.isInteger(r.intValue)&&!(r.intValue&&T.isInteger(r.intValue.low)&&T.isInteger(r.intValue.high)))return"intValue: integer|Long expected"}if(r.doubleValue!=null&&r.hasOwnProperty("doubleValue")){if(l.value===1)return"value: multiple values";if(l.value=1,typeof r.doubleValue!="number")return"doubleValue: number expected"}if(r.arrayValue!=null&&r.hasOwnProperty("arrayValue")){if(l.value===1)return"value: multiple values";l.value=1;{var c=_.opentelemetry.proto.common.v1.ArrayValue.verify(r.arrayValue);if(c)return"arrayValue."+c}}if(r.kvlistValue!=null&&r.hasOwnProperty("kvlistValue")){if(l.value===1)return"value: multiple values";l.value=1;{var c=_.opentelemetry.proto.common.v1.KeyValueList.verify(r.kvlistValue);if(c)return"kvlistValue."+c}}if(r.bytesValue!=null&&r.hasOwnProperty("bytesValue")){if(l.value===1)return"value: multiple values";if(l.value=1,!(r.bytesValue&&typeof r.bytesValue.length=="number"||T.isString(r.bytesValue)))return"bytesValue: buffer expected"}return null},a.fromObject=function(r){if(r instanceof _.opentelemetry.proto.common.v1.AnyValue)return r;var l=new _.opentelemetry.proto.common.v1.AnyValue;if(r.stringValue!=null&&(l.stringValue=String(r.stringValue)),r.boolValue!=null&&(l.boolValue=!!r.boolValue),r.intValue!=null&&(T.Long?(l.intValue=T.Long.fromValue(r.intValue)).unsigned=!1:typeof r.intValue=="string"?l.intValue=parseInt(r.intValue,10):typeof r.intValue=="number"?l.intValue=r.intValue:typeof r.intValue=="object"&&(l.intValue=new T.LongBits(r.intValue.low>>>0,r.intValue.high>>>0).toNumber())),r.doubleValue!=null&&(l.doubleValue=Number(r.doubleValue)),r.arrayValue!=null){if(typeof r.arrayValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");l.arrayValue=_.opentelemetry.proto.common.v1.ArrayValue.fromObject(r.arrayValue)}if(r.kvlistValue!=null){if(typeof r.kvlistValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");l.kvlistValue=_.opentelemetry.proto.common.v1.KeyValueList.fromObject(r.kvlistValue)}return r.bytesValue!=null&&(typeof r.bytesValue=="string"?T.base64.decode(r.bytesValue,l.bytesValue=T.newBuffer(T.base64.length(r.bytesValue)),0):r.bytesValue.length>=0&&(l.bytesValue=r.bytesValue)),l},a.toObject=function(r,l){l||(l={});var c={};return r.stringValue!=null&&r.hasOwnProperty("stringValue")&&(c.stringValue=r.stringValue,l.oneofs&&(c.value="stringValue")),r.boolValue!=null&&r.hasOwnProperty("boolValue")&&(c.boolValue=r.boolValue,l.oneofs&&(c.value="boolValue")),r.intValue!=null&&r.hasOwnProperty("intValue")&&(typeof r.intValue=="number"?c.intValue=l.longs===String?String(r.intValue):r.intValue:c.intValue=l.longs===String?T.Long.prototype.toString.call(r.intValue):l.longs===Number?new T.LongBits(r.intValue.low>>>0,r.intValue.high>>>0).toNumber():r.intValue,l.oneofs&&(c.value="intValue")),r.doubleValue!=null&&r.hasOwnProperty("doubleValue")&&(c.doubleValue=l.json&&!isFinite(r.doubleValue)?String(r.doubleValue):r.doubleValue,l.oneofs&&(c.value="doubleValue")),r.arrayValue!=null&&r.hasOwnProperty("arrayValue")&&(c.arrayValue=_.opentelemetry.proto.common.v1.ArrayValue.toObject(r.arrayValue,l),l.oneofs&&(c.value="arrayValue")),r.kvlistValue!=null&&r.hasOwnProperty("kvlistValue")&&(c.kvlistValue=_.opentelemetry.proto.common.v1.KeyValueList.toObject(r.kvlistValue,l),l.oneofs&&(c.value="kvlistValue")),r.bytesValue!=null&&r.hasOwnProperty("bytesValue")&&(c.bytesValue=l.bytes===String?T.base64.encode(r.bytesValue,0,r.bytesValue.length):l.bytes===Array?Array.prototype.slice.call(r.bytesValue):r.bytesValue,l.oneofs&&(c.value="bytesValue")),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.common.v1.AnyValue"},a}(),i.ArrayValue=function(){function a(s){if(this.values=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.values=T.emptyArray,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.values!=null&&n.values.length)for(var l=0;l<n.values.length;++l)_.opentelemetry.proto.common.v1.AnyValue.encode(n.values[l],r.uint32(10).fork()).ldelim();return r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.common.v1.ArrayValue;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.values&&c.values.length||(c.values=[]),c.values.push(_.opentelemetry.proto.common.v1.AnyValue.decode(n,n.uint32()));break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.values!=null&&n.hasOwnProperty("values")){if(!Array.isArray(n.values))return"values: array expected";for(var r=0;r<n.values.length;++r){var l=_.opentelemetry.proto.common.v1.AnyValue.verify(n.values[r]);if(l)return"values."+l}}return null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.common.v1.ArrayValue)return n;var r=new _.opentelemetry.proto.common.v1.ArrayValue;if(n.values){if(!Array.isArray(n.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");r.values=[];for(var l=0;l<n.values.length;++l){if(typeof n.values[l]!="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");r.values[l]=_.opentelemetry.proto.common.v1.AnyValue.fromObject(n.values[l])}}return r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.values=[]),n.values&&n.values.length){l.values=[];for(var c=0;c<n.values.length;++c)l.values[c]=_.opentelemetry.proto.common.v1.AnyValue.toObject(n.values[c],r)}return l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.common.v1.ArrayValue"},a}(),i.KeyValueList=function(){function a(s){if(this.values=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.values=T.emptyArray,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.values!=null&&n.values.length)for(var l=0;l<n.values.length;++l)_.opentelemetry.proto.common.v1.KeyValue.encode(n.values[l],r.uint32(10).fork()).ldelim();return r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.common.v1.KeyValueList;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.values&&c.values.length||(c.values=[]),c.values.push(_.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.values!=null&&n.hasOwnProperty("values")){if(!Array.isArray(n.values))return"values: array expected";for(var r=0;r<n.values.length;++r){var l=_.opentelemetry.proto.common.v1.KeyValue.verify(n.values[r]);if(l)return"values."+l}}return null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.common.v1.KeyValueList)return n;var r=new _.opentelemetry.proto.common.v1.KeyValueList;if(n.values){if(!Array.isArray(n.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");r.values=[];for(var l=0;l<n.values.length;++l){if(typeof n.values[l]!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");r.values[l]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(n.values[l])}}return r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.values=[]),n.values&&n.values.length){l.values=[];for(var c=0;c<n.values.length;++c)l.values[c]=_.opentelemetry.proto.common.v1.KeyValue.toObject(n.values[c],r)}return l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.common.v1.KeyValueList"},a}(),i.KeyValue=function(){function a(s){if(s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.key=null,a.prototype.value=null,a.create=function(n){return new a(n)},a.encode=function(n,r){return r||(r=ne.create()),n.key!=null&&Object.hasOwnProperty.call(n,"key")&&r.uint32(10).string(n.key),n.value!=null&&Object.hasOwnProperty.call(n,"value")&&_.opentelemetry.proto.common.v1.AnyValue.encode(n.value,r.uint32(18).fork()).ldelim(),r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.common.v1.KeyValue;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.key=n.string();break}case 2:{c.value=_.opentelemetry.proto.common.v1.AnyValue.decode(n,n.uint32());break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.key!=null&&n.hasOwnProperty("key")&&!T.isString(n.key))return"key: string expected";if(n.value!=null&&n.hasOwnProperty("value")){var r=_.opentelemetry.proto.common.v1.AnyValue.verify(n.value);if(r)return"value."+r}return null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.common.v1.KeyValue)return n;var r=new _.opentelemetry.proto.common.v1.KeyValue;if(n.key!=null&&(r.key=String(n.key)),n.value!=null){if(typeof n.value!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");r.value=_.opentelemetry.proto.common.v1.AnyValue.fromObject(n.value)}return r},a.toObject=function(n,r){r||(r={});var l={};return r.defaults&&(l.key="",l.value=null),n.key!=null&&n.hasOwnProperty("key")&&(l.key=n.key),n.value!=null&&n.hasOwnProperty("value")&&(l.value=_.opentelemetry.proto.common.v1.AnyValue.toObject(n.value,r)),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.common.v1.KeyValue"},a}(),i.InstrumentationScope=function(){function a(s){if(this.attributes=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.name=null,a.prototype.version=null,a.prototype.attributes=T.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.name!=null&&Object.hasOwnProperty.call(n,"name")&&r.uint32(10).string(n.name),n.version!=null&&Object.hasOwnProperty.call(n,"version")&&r.uint32(18).string(n.version),n.attributes!=null&&n.attributes.length)for(var l=0;l<n.attributes.length;++l)_.opentelemetry.proto.common.v1.KeyValue.encode(n.attributes[l],r.uint32(26).fork()).ldelim();return n.droppedAttributesCount!=null&&Object.hasOwnProperty.call(n,"droppedAttributesCount")&&r.uint32(32).uint32(n.droppedAttributesCount),r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.common.v1.InstrumentationScope;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.name=n.string();break}case 2:{c.version=n.string();break}case 3:{c.attributes&&c.attributes.length||(c.attributes=[]),c.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 4:{c.droppedAttributesCount=n.uint32();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.name!=null&&n.hasOwnProperty("name")&&!T.isString(n.name))return"name: string expected";if(n.version!=null&&n.hasOwnProperty("version")&&!T.isString(n.version))return"version: string expected";if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var r=0;r<n.attributes.length;++r){var l=_.opentelemetry.proto.common.v1.KeyValue.verify(n.attributes[r]);if(l)return"attributes."+l}}return n.droppedAttributesCount!=null&&n.hasOwnProperty("droppedAttributesCount")&&!T.isInteger(n.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.common.v1.InstrumentationScope)return n;var r=new _.opentelemetry.proto.common.v1.InstrumentationScope;if(n.name!=null&&(r.name=String(n.name)),n.version!=null&&(r.version=String(n.version)),n.attributes){if(!Array.isArray(n.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");r.attributes=[];for(var l=0;l<n.attributes.length;++l){if(typeof n.attributes[l]!="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");r.attributes[l]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(n.attributes[l])}}return n.droppedAttributesCount!=null&&(r.droppedAttributesCount=n.droppedAttributesCount>>>0),r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.attributes=[]),r.defaults&&(l.name="",l.version="",l.droppedAttributesCount=0),n.name!=null&&n.hasOwnProperty("name")&&(l.name=n.name),n.version!=null&&n.hasOwnProperty("version")&&(l.version=n.version),n.attributes&&n.attributes.length){l.attributes=[];for(var c=0;c<n.attributes.length;++c)l.attributes[c]=_.opentelemetry.proto.common.v1.KeyValue.toObject(n.attributes[c],r)}return n.droppedAttributesCount!=null&&n.hasOwnProperty("droppedAttributesCount")&&(l.droppedAttributesCount=n.droppedAttributesCount),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.common.v1.InstrumentationScope"},a}(),i}(),t}(),e.resource=function(){var t={};return t.v1=function(){var i={};return i.Resource=function(){function a(s){if(this.attributes=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.attributes=T.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.attributes!=null&&n.attributes.length)for(var l=0;l<n.attributes.length;++l)_.opentelemetry.proto.common.v1.KeyValue.encode(n.attributes[l],r.uint32(10).fork()).ldelim();return n.droppedAttributesCount!=null&&Object.hasOwnProperty.call(n,"droppedAttributesCount")&&r.uint32(16).uint32(n.droppedAttributesCount),r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.resource.v1.Resource;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.attributes&&c.attributes.length||(c.attributes=[]),c.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 2:{c.droppedAttributesCount=n.uint32();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var r=0;r<n.attributes.length;++r){var l=_.opentelemetry.proto.common.v1.KeyValue.verify(n.attributes[r]);if(l)return"attributes."+l}}return n.droppedAttributesCount!=null&&n.hasOwnProperty("droppedAttributesCount")&&!T.isInteger(n.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.resource.v1.Resource)return n;var r=new _.opentelemetry.proto.resource.v1.Resource;if(n.attributes){if(!Array.isArray(n.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");r.attributes=[];for(var l=0;l<n.attributes.length;++l){if(typeof n.attributes[l]!="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");r.attributes[l]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(n.attributes[l])}}return n.droppedAttributesCount!=null&&(r.droppedAttributesCount=n.droppedAttributesCount>>>0),r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.attributes=[]),r.defaults&&(l.droppedAttributesCount=0),n.attributes&&n.attributes.length){l.attributes=[];for(var c=0;c<n.attributes.length;++c)l.attributes[c]=_.opentelemetry.proto.common.v1.KeyValue.toObject(n.attributes[c],r)}return n.droppedAttributesCount!=null&&n.hasOwnProperty("droppedAttributesCount")&&(l.droppedAttributesCount=n.droppedAttributesCount),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.resource.v1.Resource"},a}(),i}(),t}(),e.trace=function(){var t={};return t.v1=function(){var i={};return i.TracesData=function(){function a(s){if(this.resourceSpans=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.resourceSpans=T.emptyArray,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.resourceSpans!=null&&n.resourceSpans.length)for(var l=0;l<n.resourceSpans.length;++l)_.opentelemetry.proto.trace.v1.ResourceSpans.encode(n.resourceSpans[l],r.uint32(10).fork()).ldelim();return r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.trace.v1.TracesData;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.resourceSpans&&c.resourceSpans.length||(c.resourceSpans=[]),c.resourceSpans.push(_.opentelemetry.proto.trace.v1.ResourceSpans.decode(n,n.uint32()));break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.resourceSpans!=null&&n.hasOwnProperty("resourceSpans")){if(!Array.isArray(n.resourceSpans))return"resourceSpans: array expected";for(var r=0;r<n.resourceSpans.length;++r){var l=_.opentelemetry.proto.trace.v1.ResourceSpans.verify(n.resourceSpans[r]);if(l)return"resourceSpans."+l}}return null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.trace.v1.TracesData)return n;var r=new _.opentelemetry.proto.trace.v1.TracesData;if(n.resourceSpans){if(!Array.isArray(n.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");r.resourceSpans=[];for(var l=0;l<n.resourceSpans.length;++l){if(typeof n.resourceSpans[l]!="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");r.resourceSpans[l]=_.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(n.resourceSpans[l])}}return r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.resourceSpans=[]),n.resourceSpans&&n.resourceSpans.length){l.resourceSpans=[];for(var c=0;c<n.resourceSpans.length;++c)l.resourceSpans[c]=_.opentelemetry.proto.trace.v1.ResourceSpans.toObject(n.resourceSpans[c],r)}return l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.trace.v1.TracesData"},a}(),i.ResourceSpans=function(){function a(s){if(this.scopeSpans=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.resource=null,a.prototype.scopeSpans=T.emptyArray,a.prototype.schemaUrl=null,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.resource!=null&&Object.hasOwnProperty.call(n,"resource")&&_.opentelemetry.proto.resource.v1.Resource.encode(n.resource,r.uint32(10).fork()).ldelim(),n.scopeSpans!=null&&n.scopeSpans.length)for(var l=0;l<n.scopeSpans.length;++l)_.opentelemetry.proto.trace.v1.ScopeSpans.encode(n.scopeSpans[l],r.uint32(18).fork()).ldelim();return n.schemaUrl!=null&&Object.hasOwnProperty.call(n,"schemaUrl")&&r.uint32(26).string(n.schemaUrl),r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.trace.v1.ResourceSpans;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.resource=_.opentelemetry.proto.resource.v1.Resource.decode(n,n.uint32());break}case 2:{c.scopeSpans&&c.scopeSpans.length||(c.scopeSpans=[]),c.scopeSpans.push(_.opentelemetry.proto.trace.v1.ScopeSpans.decode(n,n.uint32()));break}case 3:{c.schemaUrl=n.string();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.resource!=null&&n.hasOwnProperty("resource")){var r=_.opentelemetry.proto.resource.v1.Resource.verify(n.resource);if(r)return"resource."+r}if(n.scopeSpans!=null&&n.hasOwnProperty("scopeSpans")){if(!Array.isArray(n.scopeSpans))return"scopeSpans: array expected";for(var l=0;l<n.scopeSpans.length;++l){var r=_.opentelemetry.proto.trace.v1.ScopeSpans.verify(n.scopeSpans[l]);if(r)return"scopeSpans."+r}}return n.schemaUrl!=null&&n.hasOwnProperty("schemaUrl")&&!T.isString(n.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.trace.v1.ResourceSpans)return n;var r=new _.opentelemetry.proto.trace.v1.ResourceSpans;if(n.resource!=null){if(typeof n.resource!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");r.resource=_.opentelemetry.proto.resource.v1.Resource.fromObject(n.resource)}if(n.scopeSpans){if(!Array.isArray(n.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");r.scopeSpans=[];for(var l=0;l<n.scopeSpans.length;++l){if(typeof n.scopeSpans[l]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");r.scopeSpans[l]=_.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(n.scopeSpans[l])}}return n.schemaUrl!=null&&(r.schemaUrl=String(n.schemaUrl)),r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.scopeSpans=[]),r.defaults&&(l.resource=null,l.schemaUrl=""),n.resource!=null&&n.hasOwnProperty("resource")&&(l.resource=_.opentelemetry.proto.resource.v1.Resource.toObject(n.resource,r)),n.scopeSpans&&n.scopeSpans.length){l.scopeSpans=[];for(var c=0;c<n.scopeSpans.length;++c)l.scopeSpans[c]=_.opentelemetry.proto.trace.v1.ScopeSpans.toObject(n.scopeSpans[c],r)}return n.schemaUrl!=null&&n.hasOwnProperty("schemaUrl")&&(l.schemaUrl=n.schemaUrl),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.trace.v1.ResourceSpans"},a}(),i.ScopeSpans=function(){function a(s){if(this.spans=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.scope=null,a.prototype.spans=T.emptyArray,a.prototype.schemaUrl=null,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.scope!=null&&Object.hasOwnProperty.call(n,"scope")&&_.opentelemetry.proto.common.v1.InstrumentationScope.encode(n.scope,r.uint32(10).fork()).ldelim(),n.spans!=null&&n.spans.length)for(var l=0;l<n.spans.length;++l)_.opentelemetry.proto.trace.v1.Span.encode(n.spans[l],r.uint32(18).fork()).ldelim();return n.schemaUrl!=null&&Object.hasOwnProperty.call(n,"schemaUrl")&&r.uint32(26).string(n.schemaUrl),r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.trace.v1.ScopeSpans;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.decode(n,n.uint32());break}case 2:{c.spans&&c.spans.length||(c.spans=[]),c.spans.push(_.opentelemetry.proto.trace.v1.Span.decode(n,n.uint32()));break}case 3:{c.schemaUrl=n.string();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.scope!=null&&n.hasOwnProperty("scope")){var r=_.opentelemetry.proto.common.v1.InstrumentationScope.verify(n.scope);if(r)return"scope."+r}if(n.spans!=null&&n.hasOwnProperty("spans")){if(!Array.isArray(n.spans))return"spans: array expected";for(var l=0;l<n.spans.length;++l){var r=_.opentelemetry.proto.trace.v1.Span.verify(n.spans[l]);if(r)return"spans."+r}}return n.schemaUrl!=null&&n.hasOwnProperty("schemaUrl")&&!T.isString(n.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.trace.v1.ScopeSpans)return n;var r=new _.opentelemetry.proto.trace.v1.ScopeSpans;if(n.scope!=null){if(typeof n.scope!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");r.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(n.scope)}if(n.spans){if(!Array.isArray(n.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");r.spans=[];for(var l=0;l<n.spans.length;++l){if(typeof n.spans[l]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");r.spans[l]=_.opentelemetry.proto.trace.v1.Span.fromObject(n.spans[l])}}return n.schemaUrl!=null&&(r.schemaUrl=String(n.schemaUrl)),r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.spans=[]),r.defaults&&(l.scope=null,l.schemaUrl=""),n.scope!=null&&n.hasOwnProperty("scope")&&(l.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.toObject(n.scope,r)),n.spans&&n.spans.length){l.spans=[];for(var c=0;c<n.spans.length;++c)l.spans[c]=_.opentelemetry.proto.trace.v1.Span.toObject(n.spans[c],r)}return n.schemaUrl!=null&&n.hasOwnProperty("schemaUrl")&&(l.schemaUrl=n.schemaUrl),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.trace.v1.ScopeSpans"},a}(),i.Span=function(){function a(s){if(this.attributes=[],this.events=[],this.links=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.traceId=null,a.prototype.spanId=null,a.prototype.traceState=null,a.prototype.parentSpanId=null,a.prototype.name=null,a.prototype.kind=null,a.prototype.startTimeUnixNano=null,a.prototype.endTimeUnixNano=null,a.prototype.attributes=T.emptyArray,a.prototype.droppedAttributesCount=null,a.prototype.events=T.emptyArray,a.prototype.droppedEventsCount=null,a.prototype.links=T.emptyArray,a.prototype.droppedLinksCount=null,a.prototype.status=null,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.traceId!=null&&Object.hasOwnProperty.call(n,"traceId")&&r.uint32(10).bytes(n.traceId),n.spanId!=null&&Object.hasOwnProperty.call(n,"spanId")&&r.uint32(18).bytes(n.spanId),n.traceState!=null&&Object.hasOwnProperty.call(n,"traceState")&&r.uint32(26).string(n.traceState),n.parentSpanId!=null&&Object.hasOwnProperty.call(n,"parentSpanId")&&r.uint32(34).bytes(n.parentSpanId),n.name!=null&&Object.hasOwnProperty.call(n,"name")&&r.uint32(42).string(n.name),n.kind!=null&&Object.hasOwnProperty.call(n,"kind")&&r.uint32(48).int32(n.kind),n.startTimeUnixNano!=null&&Object.hasOwnProperty.call(n,"startTimeUnixNano")&&r.uint32(57).fixed64(n.startTimeUnixNano),n.endTimeUnixNano!=null&&Object.hasOwnProperty.call(n,"endTimeUnixNano")&&r.uint32(65).fixed64(n.endTimeUnixNano),n.attributes!=null&&n.attributes.length)for(var l=0;l<n.attributes.length;++l)_.opentelemetry.proto.common.v1.KeyValue.encode(n.attributes[l],r.uint32(74).fork()).ldelim();if(n.droppedAttributesCount!=null&&Object.hasOwnProperty.call(n,"droppedAttributesCount")&&r.uint32(80).uint32(n.droppedAttributesCount),n.events!=null&&n.events.length)for(var l=0;l<n.events.length;++l)_.opentelemetry.proto.trace.v1.Span.Event.encode(n.events[l],r.uint32(90).fork()).ldelim();if(n.droppedEventsCount!=null&&Object.hasOwnProperty.call(n,"droppedEventsCount")&&r.uint32(96).uint32(n.droppedEventsCount),n.links!=null&&n.links.length)for(var l=0;l<n.links.length;++l)_.opentelemetry.proto.trace.v1.Span.Link.encode(n.links[l],r.uint32(106).fork()).ldelim();return n.droppedLinksCount!=null&&Object.hasOwnProperty.call(n,"droppedLinksCount")&&r.uint32(112).uint32(n.droppedLinksCount),n.status!=null&&Object.hasOwnProperty.call(n,"status")&&_.opentelemetry.proto.trace.v1.Status.encode(n.status,r.uint32(122).fork()).ldelim(),r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.trace.v1.Span;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.traceId=n.bytes();break}case 2:{c.spanId=n.bytes();break}case 3:{c.traceState=n.string();break}case 4:{c.parentSpanId=n.bytes();break}case 5:{c.name=n.string();break}case 6:{c.kind=n.int32();break}case 7:{c.startTimeUnixNano=n.fixed64();break}case 8:{c.endTimeUnixNano=n.fixed64();break}case 9:{c.attributes&&c.attributes.length||(c.attributes=[]),c.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 10:{c.droppedAttributesCount=n.uint32();break}case 11:{c.events&&c.events.length||(c.events=[]),c.events.push(_.opentelemetry.proto.trace.v1.Span.Event.decode(n,n.uint32()));break}case 12:{c.droppedEventsCount=n.uint32();break}case 13:{c.links&&c.links.length||(c.links=[]),c.links.push(_.opentelemetry.proto.trace.v1.Span.Link.decode(n,n.uint32()));break}case 14:{c.droppedLinksCount=n.uint32();break}case 15:{c.status=_.opentelemetry.proto.trace.v1.Status.decode(n,n.uint32());break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.traceId!=null&&n.hasOwnProperty("traceId")&&!(n.traceId&&typeof n.traceId.length=="number"||T.isString(n.traceId)))return"traceId: buffer expected";if(n.spanId!=null&&n.hasOwnProperty("spanId")&&!(n.spanId&&typeof n.spanId.length=="number"||T.isString(n.spanId)))return"spanId: buffer expected";if(n.traceState!=null&&n.hasOwnProperty("traceState")&&!T.isString(n.traceState))return"traceState: string expected";if(n.parentSpanId!=null&&n.hasOwnProperty("parentSpanId")&&!(n.parentSpanId&&typeof n.parentSpanId.length=="number"||T.isString(n.parentSpanId)))return"parentSpanId: buffer expected";if(n.name!=null&&n.hasOwnProperty("name")&&!T.isString(n.name))return"name: string expected";if(n.kind!=null&&n.hasOwnProperty("kind"))switch(n.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(n.startTimeUnixNano!=null&&n.hasOwnProperty("startTimeUnixNano")&&!T.isInteger(n.startTimeUnixNano)&&!(n.startTimeUnixNano&&T.isInteger(n.startTimeUnixNano.low)&&T.isInteger(n.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(n.endTimeUnixNano!=null&&n.hasOwnProperty("endTimeUnixNano")&&!T.isInteger(n.endTimeUnixNano)&&!(n.endTimeUnixNano&&T.isInteger(n.endTimeUnixNano.low)&&T.isInteger(n.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected";if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var r=0;r<n.attributes.length;++r){var l=_.opentelemetry.proto.common.v1.KeyValue.verify(n.attributes[r]);if(l)return"attributes."+l}}if(n.droppedAttributesCount!=null&&n.hasOwnProperty("droppedAttributesCount")&&!T.isInteger(n.droppedAttributesCount))return"droppedAttributesCount: integer expected";if(n.events!=null&&n.hasOwnProperty("events")){if(!Array.isArray(n.events))return"events: array expected";for(var r=0;r<n.events.length;++r){var l=_.opentelemetry.proto.trace.v1.Span.Event.verify(n.events[r]);if(l)return"events."+l}}if(n.droppedEventsCount!=null&&n.hasOwnProperty("droppedEventsCount")&&!T.isInteger(n.droppedEventsCount))return"droppedEventsCount: integer expected";if(n.links!=null&&n.hasOwnProperty("links")){if(!Array.isArray(n.links))return"links: array expected";for(var r=0;r<n.links.length;++r){var l=_.opentelemetry.proto.trace.v1.Span.Link.verify(n.links[r]);if(l)return"links."+l}}if(n.droppedLinksCount!=null&&n.hasOwnProperty("droppedLinksCount")&&!T.isInteger(n.droppedLinksCount))return"droppedLinksCount: integer expected";if(n.status!=null&&n.hasOwnProperty("status")){var l=_.opentelemetry.proto.trace.v1.Status.verify(n.status);if(l)return"status."+l}return null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.trace.v1.Span)return n;var r=new _.opentelemetry.proto.trace.v1.Span;switch(n.traceId!=null&&(typeof n.traceId=="string"?T.base64.decode(n.traceId,r.traceId=T.newBuffer(T.base64.length(n.traceId)),0):n.traceId.length>=0&&(r.traceId=n.traceId)),n.spanId!=null&&(typeof n.spanId=="string"?T.base64.decode(n.spanId,r.spanId=T.newBuffer(T.base64.length(n.spanId)),0):n.spanId.length>=0&&(r.spanId=n.spanId)),n.traceState!=null&&(r.traceState=String(n.traceState)),n.parentSpanId!=null&&(typeof n.parentSpanId=="string"?T.base64.decode(n.parentSpanId,r.parentSpanId=T.newBuffer(T.base64.length(n.parentSpanId)),0):n.parentSpanId.length>=0&&(r.parentSpanId=n.parentSpanId)),n.name!=null&&(r.name=String(n.name)),n.kind){default:if(typeof n.kind=="number"){r.kind=n.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:r.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:r.kind=1;break;case"SPAN_KIND_SERVER":case 2:r.kind=2;break;case"SPAN_KIND_CLIENT":case 3:r.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:r.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:r.kind=5;break}if(n.startTimeUnixNano!=null&&(T.Long?(r.startTimeUnixNano=T.Long.fromValue(n.startTimeUnixNano)).unsigned=!1:typeof n.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(n.startTimeUnixNano,10):typeof n.startTimeUnixNano=="number"?r.startTimeUnixNano=n.startTimeUnixNano:typeof n.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new T.LongBits(n.startTimeUnixNano.low>>>0,n.startTimeUnixNano.high>>>0).toNumber())),n.endTimeUnixNano!=null&&(T.Long?(r.endTimeUnixNano=T.Long.fromValue(n.endTimeUnixNano)).unsigned=!1:typeof n.endTimeUnixNano=="string"?r.endTimeUnixNano=parseInt(n.endTimeUnixNano,10):typeof n.endTimeUnixNano=="number"?r.endTimeUnixNano=n.endTimeUnixNano:typeof n.endTimeUnixNano=="object"&&(r.endTimeUnixNano=new T.LongBits(n.endTimeUnixNano.low>>>0,n.endTimeUnixNano.high>>>0).toNumber())),n.attributes){if(!Array.isArray(n.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");r.attributes=[];for(var l=0;l<n.attributes.length;++l){if(typeof n.attributes[l]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");r.attributes[l]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(n.attributes[l])}}if(n.droppedAttributesCount!=null&&(r.droppedAttributesCount=n.droppedAttributesCount>>>0),n.events){if(!Array.isArray(n.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");r.events=[];for(var l=0;l<n.events.length;++l){if(typeof n.events[l]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");r.events[l]=_.opentelemetry.proto.trace.v1.Span.Event.fromObject(n.events[l])}}if(n.droppedEventsCount!=null&&(r.droppedEventsCount=n.droppedEventsCount>>>0),n.links){if(!Array.isArray(n.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");r.links=[];for(var l=0;l<n.links.length;++l){if(typeof n.links[l]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");r.links[l]=_.opentelemetry.proto.trace.v1.Span.Link.fromObject(n.links[l])}}if(n.droppedLinksCount!=null&&(r.droppedLinksCount=n.droppedLinksCount>>>0),n.status!=null){if(typeof n.status!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");r.status=_.opentelemetry.proto.trace.v1.Status.fromObject(n.status)}return r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.attributes=[],l.events=[],l.links=[]),r.defaults){if(r.bytes===String?l.traceId="":(l.traceId=[],r.bytes!==Array&&(l.traceId=T.newBuffer(l.traceId))),r.bytes===String?l.spanId="":(l.spanId=[],r.bytes!==Array&&(l.spanId=T.newBuffer(l.spanId))),l.traceState="",r.bytes===String?l.parentSpanId="":(l.parentSpanId=[],r.bytes!==Array&&(l.parentSpanId=T.newBuffer(l.parentSpanId))),l.name="",l.kind=r.enums===String?"SPAN_KIND_UNSPECIFIED":0,T.Long){var c=new T.Long(0,0,!1);l.startTimeUnixNano=r.longs===String?c.toString():r.longs===Number?c.toNumber():c}else l.startTimeUnixNano=r.longs===String?"0":0;if(T.Long){var c=new T.Long(0,0,!1);l.endTimeUnixNano=r.longs===String?c.toString():r.longs===Number?c.toNumber():c}else l.endTimeUnixNano=r.longs===String?"0":0;l.droppedAttributesCount=0,l.droppedEventsCount=0,l.droppedLinksCount=0,l.status=null}if(n.traceId!=null&&n.hasOwnProperty("traceId")&&(l.traceId=r.bytes===String?T.base64.encode(n.traceId,0,n.traceId.length):r.bytes===Array?Array.prototype.slice.call(n.traceId):n.traceId),n.spanId!=null&&n.hasOwnProperty("spanId")&&(l.spanId=r.bytes===String?T.base64.encode(n.spanId,0,n.spanId.length):r.bytes===Array?Array.prototype.slice.call(n.spanId):n.spanId),n.traceState!=null&&n.hasOwnProperty("traceState")&&(l.traceState=n.traceState),n.parentSpanId!=null&&n.hasOwnProperty("parentSpanId")&&(l.parentSpanId=r.bytes===String?T.base64.encode(n.parentSpanId,0,n.parentSpanId.length):r.bytes===Array?Array.prototype.slice.call(n.parentSpanId):n.parentSpanId),n.name!=null&&n.hasOwnProperty("name")&&(l.name=n.name),n.kind!=null&&n.hasOwnProperty("kind")&&(l.kind=r.enums===String?_.opentelemetry.proto.trace.v1.Span.SpanKind[n.kind]===void 0?n.kind:_.opentelemetry.proto.trace.v1.Span.SpanKind[n.kind]:n.kind),n.startTimeUnixNano!=null&&n.hasOwnProperty("startTimeUnixNano")&&(typeof n.startTimeUnixNano=="number"?l.startTimeUnixNano=r.longs===String?String(n.startTimeUnixNano):n.startTimeUnixNano:l.startTimeUnixNano=r.longs===String?T.Long.prototype.toString.call(n.startTimeUnixNano):r.longs===Number?new T.LongBits(n.startTimeUnixNano.low>>>0,n.startTimeUnixNano.high>>>0).toNumber():n.startTimeUnixNano),n.endTimeUnixNano!=null&&n.hasOwnProperty("endTimeUnixNano")&&(typeof n.endTimeUnixNano=="number"?l.endTimeUnixNano=r.longs===String?String(n.endTimeUnixNano):n.endTimeUnixNano:l.endTimeUnixNano=r.longs===String?T.Long.prototype.toString.call(n.endTimeUnixNano):r.longs===Number?new T.LongBits(n.endTimeUnixNano.low>>>0,n.endTimeUnixNano.high>>>0).toNumber():n.endTimeUnixNano),n.attributes&&n.attributes.length){l.attributes=[];for(var u=0;u<n.attributes.length;++u)l.attributes[u]=_.opentelemetry.proto.common.v1.KeyValue.toObject(n.attributes[u],r)}if(n.droppedAttributesCount!=null&&n.hasOwnProperty("droppedAttributesCount")&&(l.droppedAttributesCount=n.droppedAttributesCount),n.events&&n.events.length){l.events=[];for(var u=0;u<n.events.length;++u)l.events[u]=_.opentelemetry.proto.trace.v1.Span.Event.toObject(n.events[u],r)}if(n.droppedEventsCount!=null&&n.hasOwnProperty("droppedEventsCount")&&(l.droppedEventsCount=n.droppedEventsCount),n.links&&n.links.length){l.links=[];for(var u=0;u<n.links.length;++u)l.links[u]=_.opentelemetry.proto.trace.v1.Span.Link.toObject(n.links[u],r)}return n.droppedLinksCount!=null&&n.hasOwnProperty("droppedLinksCount")&&(l.droppedLinksCount=n.droppedLinksCount),n.status!=null&&n.hasOwnProperty("status")&&(l.status=_.opentelemetry.proto.trace.v1.Status.toObject(n.status,r)),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.trace.v1.Span"},a.SpanKind=function(){var s={},n=Object.create(s);return n[s[0]="SPAN_KIND_UNSPECIFIED"]=0,n[s[1]="SPAN_KIND_INTERNAL"]=1,n[s[2]="SPAN_KIND_SERVER"]=2,n[s[3]="SPAN_KIND_CLIENT"]=3,n[s[4]="SPAN_KIND_PRODUCER"]=4,n[s[5]="SPAN_KIND_CONSUMER"]=5,n}(),a.Event=function(){function s(n){if(this.attributes=[],n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}return s.prototype.timeUnixNano=null,s.prototype.name=null,s.prototype.attributes=T.emptyArray,s.prototype.droppedAttributesCount=null,s.create=function(r){return new s(r)},s.encode=function(r,l){if(l||(l=ne.create()),r.timeUnixNano!=null&&Object.hasOwnProperty.call(r,"timeUnixNano")&&l.uint32(9).fixed64(r.timeUnixNano),r.name!=null&&Object.hasOwnProperty.call(r,"name")&&l.uint32(18).string(r.name),r.attributes!=null&&r.attributes.length)for(var c=0;c<r.attributes.length;++c)_.opentelemetry.proto.common.v1.KeyValue.encode(r.attributes[c],l.uint32(26).fork()).ldelim();return r.droppedAttributesCount!=null&&Object.hasOwnProperty.call(r,"droppedAttributesCount")&&l.uint32(32).uint32(r.droppedAttributesCount),l},s.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},s.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.trace.v1.Span.Event;r.pos<c;){var E=r.uint32();switch(E>>>3){case 1:{u.timeUnixNano=r.fixed64();break}case 2:{u.name=r.string();break}case 3:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 4:{u.droppedAttributesCount=r.uint32();break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&!T.isInteger(r.timeUnixNano)&&!(r.timeUnixNano&&T.isInteger(r.timeUnixNano.low)&&T.isInteger(r.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(r.name!=null&&r.hasOwnProperty("name")&&!T.isString(r.name))return"name: string expected";if(r.attributes!=null&&r.hasOwnProperty("attributes")){if(!Array.isArray(r.attributes))return"attributes: array expected";for(var l=0;l<r.attributes.length;++l){var c=_.opentelemetry.proto.common.v1.KeyValue.verify(r.attributes[l]);if(c)return"attributes."+c}}return r.droppedAttributesCount!=null&&r.hasOwnProperty("droppedAttributesCount")&&!T.isInteger(r.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.trace.v1.Span.Event)return r;var l=new _.opentelemetry.proto.trace.v1.Span.Event;if(r.timeUnixNano!=null&&(T.Long?(l.timeUnixNano=T.Long.fromValue(r.timeUnixNano)).unsigned=!1:typeof r.timeUnixNano=="string"?l.timeUnixNano=parseInt(r.timeUnixNano,10):typeof r.timeUnixNano=="number"?l.timeUnixNano=r.timeUnixNano:typeof r.timeUnixNano=="object"&&(l.timeUnixNano=new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber())),r.name!=null&&(l.name=String(r.name)),r.attributes){if(!Array.isArray(r.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");l.attributes=[];for(var c=0;c<r.attributes.length;++c){if(typeof r.attributes[c]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");l.attributes[c]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(r.attributes[c])}}return r.droppedAttributesCount!=null&&(l.droppedAttributesCount=r.droppedAttributesCount>>>0),l},s.toObject=function(r,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.attributes=[]),l.defaults){if(T.Long){var u=new T.Long(0,0,!1);c.timeUnixNano=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.timeUnixNano=l.longs===String?"0":0;c.name="",c.droppedAttributesCount=0}if(r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&(typeof r.timeUnixNano=="number"?c.timeUnixNano=l.longs===String?String(r.timeUnixNano):r.timeUnixNano:c.timeUnixNano=l.longs===String?T.Long.prototype.toString.call(r.timeUnixNano):l.longs===Number?new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber():r.timeUnixNano),r.name!=null&&r.hasOwnProperty("name")&&(c.name=r.name),r.attributes&&r.attributes.length){c.attributes=[];for(var E=0;E<r.attributes.length;++E)c.attributes[E]=_.opentelemetry.proto.common.v1.KeyValue.toObject(r.attributes[E],l)}return r.droppedAttributesCount!=null&&r.hasOwnProperty("droppedAttributesCount")&&(c.droppedAttributesCount=r.droppedAttributesCount),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.trace.v1.Span.Event"},s}(),a.Link=function(){function s(n){if(this.attributes=[],n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}return s.prototype.traceId=null,s.prototype.spanId=null,s.prototype.traceState=null,s.prototype.attributes=T.emptyArray,s.prototype.droppedAttributesCount=null,s.create=function(r){return new s(r)},s.encode=function(r,l){if(l||(l=ne.create()),r.traceId!=null&&Object.hasOwnProperty.call(r,"traceId")&&l.uint32(10).bytes(r.traceId),r.spanId!=null&&Object.hasOwnProperty.call(r,"spanId")&&l.uint32(18).bytes(r.spanId),r.traceState!=null&&Object.hasOwnProperty.call(r,"traceState")&&l.uint32(26).string(r.traceState),r.attributes!=null&&r.attributes.length)for(var c=0;c<r.attributes.length;++c)_.opentelemetry.proto.common.v1.KeyValue.encode(r.attributes[c],l.uint32(34).fork()).ldelim();return r.droppedAttributesCount!=null&&Object.hasOwnProperty.call(r,"droppedAttributesCount")&&l.uint32(40).uint32(r.droppedAttributesCount),l},s.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},s.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.trace.v1.Span.Link;r.pos<c;){var E=r.uint32();switch(E>>>3){case 1:{u.traceId=r.bytes();break}case 2:{u.spanId=r.bytes();break}case 3:{u.traceState=r.string();break}case 4:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 5:{u.droppedAttributesCount=r.uint32();break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.traceId!=null&&r.hasOwnProperty("traceId")&&!(r.traceId&&typeof r.traceId.length=="number"||T.isString(r.traceId)))return"traceId: buffer expected";if(r.spanId!=null&&r.hasOwnProperty("spanId")&&!(r.spanId&&typeof r.spanId.length=="number"||T.isString(r.spanId)))return"spanId: buffer expected";if(r.traceState!=null&&r.hasOwnProperty("traceState")&&!T.isString(r.traceState))return"traceState: string expected";if(r.attributes!=null&&r.hasOwnProperty("attributes")){if(!Array.isArray(r.attributes))return"attributes: array expected";for(var l=0;l<r.attributes.length;++l){var c=_.opentelemetry.proto.common.v1.KeyValue.verify(r.attributes[l]);if(c)return"attributes."+c}}return r.droppedAttributesCount!=null&&r.hasOwnProperty("droppedAttributesCount")&&!T.isInteger(r.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.trace.v1.Span.Link)return r;var l=new _.opentelemetry.proto.trace.v1.Span.Link;if(r.traceId!=null&&(typeof r.traceId=="string"?T.base64.decode(r.traceId,l.traceId=T.newBuffer(T.base64.length(r.traceId)),0):r.traceId.length>=0&&(l.traceId=r.traceId)),r.spanId!=null&&(typeof r.spanId=="string"?T.base64.decode(r.spanId,l.spanId=T.newBuffer(T.base64.length(r.spanId)),0):r.spanId.length>=0&&(l.spanId=r.spanId)),r.traceState!=null&&(l.traceState=String(r.traceState)),r.attributes){if(!Array.isArray(r.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");l.attributes=[];for(var c=0;c<r.attributes.length;++c){if(typeof r.attributes[c]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");l.attributes[c]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(r.attributes[c])}}return r.droppedAttributesCount!=null&&(l.droppedAttributesCount=r.droppedAttributesCount>>>0),l},s.toObject=function(r,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.attributes=[]),l.defaults&&(l.bytes===String?c.traceId="":(c.traceId=[],l.bytes!==Array&&(c.traceId=T.newBuffer(c.traceId))),l.bytes===String?c.spanId="":(c.spanId=[],l.bytes!==Array&&(c.spanId=T.newBuffer(c.spanId))),c.traceState="",c.droppedAttributesCount=0),r.traceId!=null&&r.hasOwnProperty("traceId")&&(c.traceId=l.bytes===String?T.base64.encode(r.traceId,0,r.traceId.length):l.bytes===Array?Array.prototype.slice.call(r.traceId):r.traceId),r.spanId!=null&&r.hasOwnProperty("spanId")&&(c.spanId=l.bytes===String?T.base64.encode(r.spanId,0,r.spanId.length):l.bytes===Array?Array.prototype.slice.call(r.spanId):r.spanId),r.traceState!=null&&r.hasOwnProperty("traceState")&&(c.traceState=r.traceState),r.attributes&&r.attributes.length){c.attributes=[];for(var u=0;u<r.attributes.length;++u)c.attributes[u]=_.opentelemetry.proto.common.v1.KeyValue.toObject(r.attributes[u],l)}return r.droppedAttributesCount!=null&&r.hasOwnProperty("droppedAttributesCount")&&(c.droppedAttributesCount=r.droppedAttributesCount),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.trace.v1.Span.Link"},s}(),a}(),i.Status=function(){function a(s){if(s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.message=null,a.prototype.code=null,a.create=function(n){return new a(n)},a.encode=function(n,r){return r||(r=ne.create()),n.message!=null&&Object.hasOwnProperty.call(n,"message")&&r.uint32(18).string(n.message),n.code!=null&&Object.hasOwnProperty.call(n,"code")&&r.uint32(24).int32(n.code),r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.trace.v1.Status;n.pos<l;){var u=n.uint32();switch(u>>>3){case 2:{c.message=n.string();break}case 3:{c.code=n.int32();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.message!=null&&n.hasOwnProperty("message")&&!T.isString(n.message))return"message: string expected";if(n.code!=null&&n.hasOwnProperty("code"))switch(n.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.trace.v1.Status)return n;var r=new _.opentelemetry.proto.trace.v1.Status;switch(n.message!=null&&(r.message=String(n.message)),n.code){default:if(typeof n.code=="number"){r.code=n.code;break}break;case"STATUS_CODE_UNSET":case 0:r.code=0;break;case"STATUS_CODE_OK":case 1:r.code=1;break;case"STATUS_CODE_ERROR":case 2:r.code=2;break}return r},a.toObject=function(n,r){r||(r={});var l={};return r.defaults&&(l.message="",l.code=r.enums===String?"STATUS_CODE_UNSET":0),n.message!=null&&n.hasOwnProperty("message")&&(l.message=n.message),n.code!=null&&n.hasOwnProperty("code")&&(l.code=r.enums===String?_.opentelemetry.proto.trace.v1.Status.StatusCode[n.code]===void 0?n.code:_.opentelemetry.proto.trace.v1.Status.StatusCode[n.code]:n.code),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.trace.v1.Status"},a.StatusCode=function(){var s={},n=Object.create(s);return n[s[0]="STATUS_CODE_UNSET"]=0,n[s[1]="STATUS_CODE_OK"]=1,n[s[2]="STATUS_CODE_ERROR"]=2,n}(),a}(),i}(),t}(),e.collector=function(){var t={};return t.trace=function(){var i={};return i.v1=function(){var a={};return a.TraceService=function(){function s(n,r,l){j.rpc.Service.call(this,n,r,l)}return(s.prototype=Object.create(j.rpc.Service.prototype)).constructor=s,s.create=function(r,l,c){return new this(r,l,c)},Object.defineProperty(s.prototype.export=function n(r,l){return this.rpcCall(n,_.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,_.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,r,l)},"name",{value:"Export"}),s}(),a.ExportTraceServiceRequest=function(){function s(n){if(this.resourceSpans=[],n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}return s.prototype.resourceSpans=T.emptyArray,s.create=function(r){return new s(r)},s.encode=function(r,l){if(l||(l=ne.create()),r.resourceSpans!=null&&r.resourceSpans.length)for(var c=0;c<r.resourceSpans.length;++c)_.opentelemetry.proto.trace.v1.ResourceSpans.encode(r.resourceSpans[c],l.uint32(10).fork()).ldelim();return l},s.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},s.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;r.pos<c;){var E=r.uint32();switch(E>>>3){case 1:{u.resourceSpans&&u.resourceSpans.length||(u.resourceSpans=[]),u.resourceSpans.push(_.opentelemetry.proto.trace.v1.ResourceSpans.decode(r,r.uint32()));break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.resourceSpans!=null&&r.hasOwnProperty("resourceSpans")){if(!Array.isArray(r.resourceSpans))return"resourceSpans: array expected";for(var l=0;l<r.resourceSpans.length;++l){var c=_.opentelemetry.proto.trace.v1.ResourceSpans.verify(r.resourceSpans[l]);if(c)return"resourceSpans."+c}}return null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return r;var l=new _.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(r.resourceSpans){if(!Array.isArray(r.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");l.resourceSpans=[];for(var c=0;c<r.resourceSpans.length;++c){if(typeof r.resourceSpans[c]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");l.resourceSpans[c]=_.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(r.resourceSpans[c])}}return l},s.toObject=function(r,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.resourceSpans=[]),r.resourceSpans&&r.resourceSpans.length){c.resourceSpans=[];for(var u=0;u<r.resourceSpans.length;++u)c.resourceSpans[u]=_.opentelemetry.proto.trace.v1.ResourceSpans.toObject(r.resourceSpans[u],l)}return c},s.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},s}(),a.ExportTraceServiceResponse=function(){function s(n){if(n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}return s.prototype.partialSuccess=null,s.create=function(r){return new s(r)},s.encode=function(r,l){return l||(l=ne.create()),r.partialSuccess!=null&&Object.hasOwnProperty.call(r,"partialSuccess")&&_.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(r.partialSuccess,l.uint32(10).fork()).ldelim(),l},s.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},s.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;r.pos<c;){var E=r.uint32();switch(E>>>3){case 1:{u.partialSuccess=_.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(r,r.uint32());break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.partialSuccess!=null&&r.hasOwnProperty("partialSuccess")){var l=_.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(r.partialSuccess);if(l)return"partialSuccess."+l}return null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return r;var l=new _.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(r.partialSuccess!=null){if(typeof r.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");l.partialSuccess=_.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(r.partialSuccess)}return l},s.toObject=function(r,l){l||(l={});var c={};return l.defaults&&(c.partialSuccess=null),r.partialSuccess!=null&&r.hasOwnProperty("partialSuccess")&&(c.partialSuccess=_.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(r.partialSuccess,l)),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},s}(),a.ExportTracePartialSuccess=function(){function s(n){if(n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}return s.prototype.rejectedSpans=null,s.prototype.errorMessage=null,s.create=function(r){return new s(r)},s.encode=function(r,l){return l||(l=ne.create()),r.rejectedSpans!=null&&Object.hasOwnProperty.call(r,"rejectedSpans")&&l.uint32(8).int64(r.rejectedSpans),r.errorMessage!=null&&Object.hasOwnProperty.call(r,"errorMessage")&&l.uint32(18).string(r.errorMessage),l},s.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},s.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;r.pos<c;){var E=r.uint32();switch(E>>>3){case 1:{u.rejectedSpans=r.int64();break}case 2:{u.errorMessage=r.string();break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){return typeof r!="object"||r===null?"object expected":r.rejectedSpans!=null&&r.hasOwnProperty("rejectedSpans")&&!T.isInteger(r.rejectedSpans)&&!(r.rejectedSpans&&T.isInteger(r.rejectedSpans.low)&&T.isInteger(r.rejectedSpans.high))?"rejectedSpans: integer|Long expected":r.errorMessage!=null&&r.hasOwnProperty("errorMessage")&&!T.isString(r.errorMessage)?"errorMessage: string expected":null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return r;var l=new _.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return r.rejectedSpans!=null&&(T.Long?(l.rejectedSpans=T.Long.fromValue(r.rejectedSpans)).unsigned=!1:typeof r.rejectedSpans=="string"?l.rejectedSpans=parseInt(r.rejectedSpans,10):typeof r.rejectedSpans=="number"?l.rejectedSpans=r.rejectedSpans:typeof r.rejectedSpans=="object"&&(l.rejectedSpans=new T.LongBits(r.rejectedSpans.low>>>0,r.rejectedSpans.high>>>0).toNumber())),r.errorMessage!=null&&(l.errorMessage=String(r.errorMessage)),l},s.toObject=function(r,l){l||(l={});var c={};if(l.defaults){if(T.Long){var u=new T.Long(0,0,!1);c.rejectedSpans=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.rejectedSpans=l.longs===String?"0":0;c.errorMessage=""}return r.rejectedSpans!=null&&r.hasOwnProperty("rejectedSpans")&&(typeof r.rejectedSpans=="number"?c.rejectedSpans=l.longs===String?String(r.rejectedSpans):r.rejectedSpans:c.rejectedSpans=l.longs===String?T.Long.prototype.toString.call(r.rejectedSpans):l.longs===Number?new T.LongBits(r.rejectedSpans.low>>>0,r.rejectedSpans.high>>>0).toNumber():r.rejectedSpans),r.errorMessage!=null&&r.hasOwnProperty("errorMessage")&&(c.errorMessage=r.errorMessage),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},s}(),a}(),i}(),t.metrics=function(){var i={};return i.v1=function(){var a={};return a.MetricsService=function(){function s(n,r,l){j.rpc.Service.call(this,n,r,l)}return(s.prototype=Object.create(j.rpc.Service.prototype)).constructor=s,s.create=function(r,l,c){return new this(r,l,c)},Object.defineProperty(s.prototype.export=function n(r,l){return this.rpcCall(n,_.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,_.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,r,l)},"name",{value:"Export"}),s}(),a.ExportMetricsServiceRequest=function(){function s(n){if(this.resourceMetrics=[],n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}return s.prototype.resourceMetrics=T.emptyArray,s.create=function(r){return new s(r)},s.encode=function(r,l){if(l||(l=ne.create()),r.resourceMetrics!=null&&r.resourceMetrics.length)for(var c=0;c<r.resourceMetrics.length;++c)_.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(r.resourceMetrics[c],l.uint32(10).fork()).ldelim();return l},s.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},s.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;r.pos<c;){var E=r.uint32();switch(E>>>3){case 1:{u.resourceMetrics&&u.resourceMetrics.length||(u.resourceMetrics=[]),u.resourceMetrics.push(_.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(r,r.uint32()));break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.resourceMetrics!=null&&r.hasOwnProperty("resourceMetrics")){if(!Array.isArray(r.resourceMetrics))return"resourceMetrics: array expected";for(var l=0;l<r.resourceMetrics.length;++l){var c=_.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(r.resourceMetrics[l]);if(c)return"resourceMetrics."+c}}return null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return r;var l=new _.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(r.resourceMetrics){if(!Array.isArray(r.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");l.resourceMetrics=[];for(var c=0;c<r.resourceMetrics.length;++c){if(typeof r.resourceMetrics[c]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");l.resourceMetrics[c]=_.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(r.resourceMetrics[c])}}return l},s.toObject=function(r,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.resourceMetrics=[]),r.resourceMetrics&&r.resourceMetrics.length){c.resourceMetrics=[];for(var u=0;u<r.resourceMetrics.length;++u)c.resourceMetrics[u]=_.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(r.resourceMetrics[u],l)}return c},s.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},s}(),a.ExportMetricsServiceResponse=function(){function s(n){if(n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}return s.prototype.partialSuccess=null,s.create=function(r){return new s(r)},s.encode=function(r,l){return l||(l=ne.create()),r.partialSuccess!=null&&Object.hasOwnProperty.call(r,"partialSuccess")&&_.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(r.partialSuccess,l.uint32(10).fork()).ldelim(),l},s.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},s.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;r.pos<c;){var E=r.uint32();switch(E>>>3){case 1:{u.partialSuccess=_.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(r,r.uint32());break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.partialSuccess!=null&&r.hasOwnProperty("partialSuccess")){var l=_.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(r.partialSuccess);if(l)return"partialSuccess."+l}return null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return r;var l=new _.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(r.partialSuccess!=null){if(typeof r.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");l.partialSuccess=_.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(r.partialSuccess)}return l},s.toObject=function(r,l){l||(l={});var c={};return l.defaults&&(c.partialSuccess=null),r.partialSuccess!=null&&r.hasOwnProperty("partialSuccess")&&(c.partialSuccess=_.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(r.partialSuccess,l)),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},s}(),a.ExportMetricsPartialSuccess=function(){function s(n){if(n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}return s.prototype.rejectedDataPoints=null,s.prototype.errorMessage=null,s.create=function(r){return new s(r)},s.encode=function(r,l){return l||(l=ne.create()),r.rejectedDataPoints!=null&&Object.hasOwnProperty.call(r,"rejectedDataPoints")&&l.uint32(8).int64(r.rejectedDataPoints),r.errorMessage!=null&&Object.hasOwnProperty.call(r,"errorMessage")&&l.uint32(18).string(r.errorMessage),l},s.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},s.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;r.pos<c;){var E=r.uint32();switch(E>>>3){case 1:{u.rejectedDataPoints=r.int64();break}case 2:{u.errorMessage=r.string();break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){return typeof r!="object"||r===null?"object expected":r.rejectedDataPoints!=null&&r.hasOwnProperty("rejectedDataPoints")&&!T.isInteger(r.rejectedDataPoints)&&!(r.rejectedDataPoints&&T.isInteger(r.rejectedDataPoints.low)&&T.isInteger(r.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":r.errorMessage!=null&&r.hasOwnProperty("errorMessage")&&!T.isString(r.errorMessage)?"errorMessage: string expected":null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return r;var l=new _.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return r.rejectedDataPoints!=null&&(T.Long?(l.rejectedDataPoints=T.Long.fromValue(r.rejectedDataPoints)).unsigned=!1:typeof r.rejectedDataPoints=="string"?l.rejectedDataPoints=parseInt(r.rejectedDataPoints,10):typeof r.rejectedDataPoints=="number"?l.rejectedDataPoints=r.rejectedDataPoints:typeof r.rejectedDataPoints=="object"&&(l.rejectedDataPoints=new T.LongBits(r.rejectedDataPoints.low>>>0,r.rejectedDataPoints.high>>>0).toNumber())),r.errorMessage!=null&&(l.errorMessage=String(r.errorMessage)),l},s.toObject=function(r,l){l||(l={});var c={};if(l.defaults){if(T.Long){var u=new T.Long(0,0,!1);c.rejectedDataPoints=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.rejectedDataPoints=l.longs===String?"0":0;c.errorMessage=""}return r.rejectedDataPoints!=null&&r.hasOwnProperty("rejectedDataPoints")&&(typeof r.rejectedDataPoints=="number"?c.rejectedDataPoints=l.longs===String?String(r.rejectedDataPoints):r.rejectedDataPoints:c.rejectedDataPoints=l.longs===String?T.Long.prototype.toString.call(r.rejectedDataPoints):l.longs===Number?new T.LongBits(r.rejectedDataPoints.low>>>0,r.rejectedDataPoints.high>>>0).toNumber():r.rejectedDataPoints),r.errorMessage!=null&&r.hasOwnProperty("errorMessage")&&(c.errorMessage=r.errorMessage),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},s}(),a}(),i}(),t.logs=function(){var i={};return i.v1=function(){var a={};return a.LogsService=function(){function s(n,r,l){j.rpc.Service.call(this,n,r,l)}return(s.prototype=Object.create(j.rpc.Service.prototype)).constructor=s,s.create=function(r,l,c){return new this(r,l,c)},Object.defineProperty(s.prototype.export=function n(r,l){return this.rpcCall(n,_.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,_.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,r,l)},"name",{value:"Export"}),s}(),a.ExportLogsServiceRequest=function(){function s(n){if(this.resourceLogs=[],n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}return s.prototype.resourceLogs=T.emptyArray,s.create=function(r){return new s(r)},s.encode=function(r,l){if(l||(l=ne.create()),r.resourceLogs!=null&&r.resourceLogs.length)for(var c=0;c<r.resourceLogs.length;++c)_.opentelemetry.proto.logs.v1.ResourceLogs.encode(r.resourceLogs[c],l.uint32(10).fork()).ldelim();return l},s.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},s.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;r.pos<c;){var E=r.uint32();switch(E>>>3){case 1:{u.resourceLogs&&u.resourceLogs.length||(u.resourceLogs=[]),u.resourceLogs.push(_.opentelemetry.proto.logs.v1.ResourceLogs.decode(r,r.uint32()));break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.resourceLogs!=null&&r.hasOwnProperty("resourceLogs")){if(!Array.isArray(r.resourceLogs))return"resourceLogs: array expected";for(var l=0;l<r.resourceLogs.length;++l){var c=_.opentelemetry.proto.logs.v1.ResourceLogs.verify(r.resourceLogs[l]);if(c)return"resourceLogs."+c}}return null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return r;var l=new _.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(r.resourceLogs){if(!Array.isArray(r.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");l.resourceLogs=[];for(var c=0;c<r.resourceLogs.length;++c){if(typeof r.resourceLogs[c]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");l.resourceLogs[c]=_.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(r.resourceLogs[c])}}return l},s.toObject=function(r,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.resourceLogs=[]),r.resourceLogs&&r.resourceLogs.length){c.resourceLogs=[];for(var u=0;u<r.resourceLogs.length;++u)c.resourceLogs[u]=_.opentelemetry.proto.logs.v1.ResourceLogs.toObject(r.resourceLogs[u],l)}return c},s.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},s}(),a.ExportLogsServiceResponse=function(){function s(n){if(n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}return s.prototype.partialSuccess=null,s.create=function(r){return new s(r)},s.encode=function(r,l){return l||(l=ne.create()),r.partialSuccess!=null&&Object.hasOwnProperty.call(r,"partialSuccess")&&_.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(r.partialSuccess,l.uint32(10).fork()).ldelim(),l},s.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},s.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;r.pos<c;){var E=r.uint32();switch(E>>>3){case 1:{u.partialSuccess=_.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(r,r.uint32());break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){if(typeof r!="object"||r===null)return"object expected";if(r.partialSuccess!=null&&r.hasOwnProperty("partialSuccess")){var l=_.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(r.partialSuccess);if(l)return"partialSuccess."+l}return null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return r;var l=new _.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(r.partialSuccess!=null){if(typeof r.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");l.partialSuccess=_.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(r.partialSuccess)}return l},s.toObject=function(r,l){l||(l={});var c={};return l.defaults&&(c.partialSuccess=null),r.partialSuccess!=null&&r.hasOwnProperty("partialSuccess")&&(c.partialSuccess=_.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(r.partialSuccess,l)),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},s}(),a.ExportLogsPartialSuccess=function(){function s(n){if(n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}return s.prototype.rejectedLogRecords=null,s.prototype.errorMessage=null,s.create=function(r){return new s(r)},s.encode=function(r,l){return l||(l=ne.create()),r.rejectedLogRecords!=null&&Object.hasOwnProperty.call(r,"rejectedLogRecords")&&l.uint32(8).int64(r.rejectedLogRecords),r.errorMessage!=null&&Object.hasOwnProperty.call(r,"errorMessage")&&l.uint32(18).string(r.errorMessage),l},s.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},s.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;r.pos<c;){var E=r.uint32();switch(E>>>3){case 1:{u.rejectedLogRecords=r.int64();break}case 2:{u.errorMessage=r.string();break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){return typeof r!="object"||r===null?"object expected":r.rejectedLogRecords!=null&&r.hasOwnProperty("rejectedLogRecords")&&!T.isInteger(r.rejectedLogRecords)&&!(r.rejectedLogRecords&&T.isInteger(r.rejectedLogRecords.low)&&T.isInteger(r.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":r.errorMessage!=null&&r.hasOwnProperty("errorMessage")&&!T.isString(r.errorMessage)?"errorMessage: string expected":null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return r;var l=new _.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return r.rejectedLogRecords!=null&&(T.Long?(l.rejectedLogRecords=T.Long.fromValue(r.rejectedLogRecords)).unsigned=!1:typeof r.rejectedLogRecords=="string"?l.rejectedLogRecords=parseInt(r.rejectedLogRecords,10):typeof r.rejectedLogRecords=="number"?l.rejectedLogRecords=r.rejectedLogRecords:typeof r.rejectedLogRecords=="object"&&(l.rejectedLogRecords=new T.LongBits(r.rejectedLogRecords.low>>>0,r.rejectedLogRecords.high>>>0).toNumber())),r.errorMessage!=null&&(l.errorMessage=String(r.errorMessage)),l},s.toObject=function(r,l){l||(l={});var c={};if(l.defaults){if(T.Long){var u=new T.Long(0,0,!1);c.rejectedLogRecords=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.rejectedLogRecords=l.longs===String?"0":0;c.errorMessage=""}return r.rejectedLogRecords!=null&&r.hasOwnProperty("rejectedLogRecords")&&(typeof r.rejectedLogRecords=="number"?c.rejectedLogRecords=l.longs===String?String(r.rejectedLogRecords):r.rejectedLogRecords:c.rejectedLogRecords=l.longs===String?T.Long.prototype.toString.call(r.rejectedLogRecords):l.longs===Number?new T.LongBits(r.rejectedLogRecords.low>>>0,r.rejectedLogRecords.high>>>0).toNumber():r.rejectedLogRecords),r.errorMessage!=null&&r.hasOwnProperty("errorMessage")&&(c.errorMessage=r.errorMessage),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},s}(),a}(),i}(),t}(),e.metrics=function(){var t={};return t.v1=function(){var i={};return i.MetricsData=function(){function a(s){if(this.resourceMetrics=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.resourceMetrics=T.emptyArray,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.resourceMetrics!=null&&n.resourceMetrics.length)for(var l=0;l<n.resourceMetrics.length;++l)_.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(n.resourceMetrics[l],r.uint32(10).fork()).ldelim();return r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.metrics.v1.MetricsData;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.resourceMetrics&&c.resourceMetrics.length||(c.resourceMetrics=[]),c.resourceMetrics.push(_.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(n,n.uint32()));break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.resourceMetrics!=null&&n.hasOwnProperty("resourceMetrics")){if(!Array.isArray(n.resourceMetrics))return"resourceMetrics: array expected";for(var r=0;r<n.resourceMetrics.length;++r){var l=_.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(n.resourceMetrics[r]);if(l)return"resourceMetrics."+l}}return null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.metrics.v1.MetricsData)return n;var r=new _.opentelemetry.proto.metrics.v1.MetricsData;if(n.resourceMetrics){if(!Array.isArray(n.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");r.resourceMetrics=[];for(var l=0;l<n.resourceMetrics.length;++l){if(typeof n.resourceMetrics[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");r.resourceMetrics[l]=_.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(n.resourceMetrics[l])}}return r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.resourceMetrics=[]),n.resourceMetrics&&n.resourceMetrics.length){l.resourceMetrics=[];for(var c=0;c<n.resourceMetrics.length;++c)l.resourceMetrics[c]=_.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(n.resourceMetrics[c],r)}return l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.MetricsData"},a}(),i.ResourceMetrics=function(){function a(s){if(this.scopeMetrics=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.resource=null,a.prototype.scopeMetrics=T.emptyArray,a.prototype.schemaUrl=null,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.resource!=null&&Object.hasOwnProperty.call(n,"resource")&&_.opentelemetry.proto.resource.v1.Resource.encode(n.resource,r.uint32(10).fork()).ldelim(),n.scopeMetrics!=null&&n.scopeMetrics.length)for(var l=0;l<n.scopeMetrics.length;++l)_.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(n.scopeMetrics[l],r.uint32(18).fork()).ldelim();return n.schemaUrl!=null&&Object.hasOwnProperty.call(n,"schemaUrl")&&r.uint32(26).string(n.schemaUrl),r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.metrics.v1.ResourceMetrics;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.resource=_.opentelemetry.proto.resource.v1.Resource.decode(n,n.uint32());break}case 2:{c.scopeMetrics&&c.scopeMetrics.length||(c.scopeMetrics=[]),c.scopeMetrics.push(_.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(n,n.uint32()));break}case 3:{c.schemaUrl=n.string();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.resource!=null&&n.hasOwnProperty("resource")){var r=_.opentelemetry.proto.resource.v1.Resource.verify(n.resource);if(r)return"resource."+r}if(n.scopeMetrics!=null&&n.hasOwnProperty("scopeMetrics")){if(!Array.isArray(n.scopeMetrics))return"scopeMetrics: array expected";for(var l=0;l<n.scopeMetrics.length;++l){var r=_.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(n.scopeMetrics[l]);if(r)return"scopeMetrics."+r}}return n.schemaUrl!=null&&n.hasOwnProperty("schemaUrl")&&!T.isString(n.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.metrics.v1.ResourceMetrics)return n;var r=new _.opentelemetry.proto.metrics.v1.ResourceMetrics;if(n.resource!=null){if(typeof n.resource!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");r.resource=_.opentelemetry.proto.resource.v1.Resource.fromObject(n.resource)}if(n.scopeMetrics){if(!Array.isArray(n.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");r.scopeMetrics=[];for(var l=0;l<n.scopeMetrics.length;++l){if(typeof n.scopeMetrics[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");r.scopeMetrics[l]=_.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(n.scopeMetrics[l])}}return n.schemaUrl!=null&&(r.schemaUrl=String(n.schemaUrl)),r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.scopeMetrics=[]),r.defaults&&(l.resource=null,l.schemaUrl=""),n.resource!=null&&n.hasOwnProperty("resource")&&(l.resource=_.opentelemetry.proto.resource.v1.Resource.toObject(n.resource,r)),n.scopeMetrics&&n.scopeMetrics.length){l.scopeMetrics=[];for(var c=0;c<n.scopeMetrics.length;++c)l.scopeMetrics[c]=_.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(n.scopeMetrics[c],r)}return n.schemaUrl!=null&&n.hasOwnProperty("schemaUrl")&&(l.schemaUrl=n.schemaUrl),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},a}(),i.ScopeMetrics=function(){function a(s){if(this.metrics=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.scope=null,a.prototype.metrics=T.emptyArray,a.prototype.schemaUrl=null,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.scope!=null&&Object.hasOwnProperty.call(n,"scope")&&_.opentelemetry.proto.common.v1.InstrumentationScope.encode(n.scope,r.uint32(10).fork()).ldelim(),n.metrics!=null&&n.metrics.length)for(var l=0;l<n.metrics.length;++l)_.opentelemetry.proto.metrics.v1.Metric.encode(n.metrics[l],r.uint32(18).fork()).ldelim();return n.schemaUrl!=null&&Object.hasOwnProperty.call(n,"schemaUrl")&&r.uint32(26).string(n.schemaUrl),r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.metrics.v1.ScopeMetrics;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.decode(n,n.uint32());break}case 2:{c.metrics&&c.metrics.length||(c.metrics=[]),c.metrics.push(_.opentelemetry.proto.metrics.v1.Metric.decode(n,n.uint32()));break}case 3:{c.schemaUrl=n.string();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.scope!=null&&n.hasOwnProperty("scope")){var r=_.opentelemetry.proto.common.v1.InstrumentationScope.verify(n.scope);if(r)return"scope."+r}if(n.metrics!=null&&n.hasOwnProperty("metrics")){if(!Array.isArray(n.metrics))return"metrics: array expected";for(var l=0;l<n.metrics.length;++l){var r=_.opentelemetry.proto.metrics.v1.Metric.verify(n.metrics[l]);if(r)return"metrics."+r}}return n.schemaUrl!=null&&n.hasOwnProperty("schemaUrl")&&!T.isString(n.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.metrics.v1.ScopeMetrics)return n;var r=new _.opentelemetry.proto.metrics.v1.ScopeMetrics;if(n.scope!=null){if(typeof n.scope!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");r.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(n.scope)}if(n.metrics){if(!Array.isArray(n.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");r.metrics=[];for(var l=0;l<n.metrics.length;++l){if(typeof n.metrics[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");r.metrics[l]=_.opentelemetry.proto.metrics.v1.Metric.fromObject(n.metrics[l])}}return n.schemaUrl!=null&&(r.schemaUrl=String(n.schemaUrl)),r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.metrics=[]),r.defaults&&(l.scope=null,l.schemaUrl=""),n.scope!=null&&n.hasOwnProperty("scope")&&(l.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.toObject(n.scope,r)),n.metrics&&n.metrics.length){l.metrics=[];for(var c=0;c<n.metrics.length;++c)l.metrics[c]=_.opentelemetry.proto.metrics.v1.Metric.toObject(n.metrics[c],r)}return n.schemaUrl!=null&&n.hasOwnProperty("schemaUrl")&&(l.schemaUrl=n.schemaUrl),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},a}(),i.Metric=function(){function a(n){if(n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}a.prototype.name=null,a.prototype.description=null,a.prototype.unit=null,a.prototype.gauge=null,a.prototype.sum=null,a.prototype.histogram=null,a.prototype.exponentialHistogram=null,a.prototype.summary=null;var s;return Object.defineProperty(a.prototype,"data",{get:T.oneOfGetter(s=["gauge","sum","histogram","exponentialHistogram","summary"]),set:T.oneOfSetter(s)}),a.create=function(r){return new a(r)},a.encode=function(r,l){return l||(l=ne.create()),r.name!=null&&Object.hasOwnProperty.call(r,"name")&&l.uint32(10).string(r.name),r.description!=null&&Object.hasOwnProperty.call(r,"description")&&l.uint32(18).string(r.description),r.unit!=null&&Object.hasOwnProperty.call(r,"unit")&&l.uint32(26).string(r.unit),r.gauge!=null&&Object.hasOwnProperty.call(r,"gauge")&&_.opentelemetry.proto.metrics.v1.Gauge.encode(r.gauge,l.uint32(42).fork()).ldelim(),r.sum!=null&&Object.hasOwnProperty.call(r,"sum")&&_.opentelemetry.proto.metrics.v1.Sum.encode(r.sum,l.uint32(58).fork()).ldelim(),r.histogram!=null&&Object.hasOwnProperty.call(r,"histogram")&&_.opentelemetry.proto.metrics.v1.Histogram.encode(r.histogram,l.uint32(74).fork()).ldelim(),r.exponentialHistogram!=null&&Object.hasOwnProperty.call(r,"exponentialHistogram")&&_.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(r.exponentialHistogram,l.uint32(82).fork()).ldelim(),r.summary!=null&&Object.hasOwnProperty.call(r,"summary")&&_.opentelemetry.proto.metrics.v1.Summary.encode(r.summary,l.uint32(90).fork()).ldelim(),l},a.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},a.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.metrics.v1.Metric;r.pos<c;){var E=r.uint32();switch(E>>>3){case 1:{u.name=r.string();break}case 2:{u.description=r.string();break}case 3:{u.unit=r.string();break}case 5:{u.gauge=_.opentelemetry.proto.metrics.v1.Gauge.decode(r,r.uint32());break}case 7:{u.sum=_.opentelemetry.proto.metrics.v1.Sum.decode(r,r.uint32());break}case 9:{u.histogram=_.opentelemetry.proto.metrics.v1.Histogram.decode(r,r.uint32());break}case 10:{u.exponentialHistogram=_.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(r,r.uint32());break}case 11:{u.summary=_.opentelemetry.proto.metrics.v1.Summary.decode(r,r.uint32());break}default:r.skipType(E&7);break}}return u},a.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},a.verify=function(r){if(typeof r!="object"||r===null)return"object expected";var l={};if(r.name!=null&&r.hasOwnProperty("name")&&!T.isString(r.name))return"name: string expected";if(r.description!=null&&r.hasOwnProperty("description")&&!T.isString(r.description))return"description: string expected";if(r.unit!=null&&r.hasOwnProperty("unit")&&!T.isString(r.unit))return"unit: string expected";if(r.gauge!=null&&r.hasOwnProperty("gauge")){l.data=1;{var c=_.opentelemetry.proto.metrics.v1.Gauge.verify(r.gauge);if(c)return"gauge."+c}}if(r.sum!=null&&r.hasOwnProperty("sum")){if(l.data===1)return"data: multiple values";l.data=1;{var c=_.opentelemetry.proto.metrics.v1.Sum.verify(r.sum);if(c)return"sum."+c}}if(r.histogram!=null&&r.hasOwnProperty("histogram")){if(l.data===1)return"data: multiple values";l.data=1;{var c=_.opentelemetry.proto.metrics.v1.Histogram.verify(r.histogram);if(c)return"histogram."+c}}if(r.exponentialHistogram!=null&&r.hasOwnProperty("exponentialHistogram")){if(l.data===1)return"data: multiple values";l.data=1;{var c=_.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(r.exponentialHistogram);if(c)return"exponentialHistogram."+c}}if(r.summary!=null&&r.hasOwnProperty("summary")){if(l.data===1)return"data: multiple values";l.data=1;{var c=_.opentelemetry.proto.metrics.v1.Summary.verify(r.summary);if(c)return"summary."+c}}return null},a.fromObject=function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.Metric)return r;var l=new _.opentelemetry.proto.metrics.v1.Metric;if(r.name!=null&&(l.name=String(r.name)),r.description!=null&&(l.description=String(r.description)),r.unit!=null&&(l.unit=String(r.unit)),r.gauge!=null){if(typeof r.gauge!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");l.gauge=_.opentelemetry.proto.metrics.v1.Gauge.fromObject(r.gauge)}if(r.sum!=null){if(typeof r.sum!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");l.sum=_.opentelemetry.proto.metrics.v1.Sum.fromObject(r.sum)}if(r.histogram!=null){if(typeof r.histogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");l.histogram=_.opentelemetry.proto.metrics.v1.Histogram.fromObject(r.histogram)}if(r.exponentialHistogram!=null){if(typeof r.exponentialHistogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");l.exponentialHistogram=_.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(r.exponentialHistogram)}if(r.summary!=null){if(typeof r.summary!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");l.summary=_.opentelemetry.proto.metrics.v1.Summary.fromObject(r.summary)}return l},a.toObject=function(r,l){l||(l={});var c={};return l.defaults&&(c.name="",c.description="",c.unit=""),r.name!=null&&r.hasOwnProperty("name")&&(c.name=r.name),r.description!=null&&r.hasOwnProperty("description")&&(c.description=r.description),r.unit!=null&&r.hasOwnProperty("unit")&&(c.unit=r.unit),r.gauge!=null&&r.hasOwnProperty("gauge")&&(c.gauge=_.opentelemetry.proto.metrics.v1.Gauge.toObject(r.gauge,l),l.oneofs&&(c.data="gauge")),r.sum!=null&&r.hasOwnProperty("sum")&&(c.sum=_.opentelemetry.proto.metrics.v1.Sum.toObject(r.sum,l),l.oneofs&&(c.data="sum")),r.histogram!=null&&r.hasOwnProperty("histogram")&&(c.histogram=_.opentelemetry.proto.metrics.v1.Histogram.toObject(r.histogram,l),l.oneofs&&(c.data="histogram")),r.exponentialHistogram!=null&&r.hasOwnProperty("exponentialHistogram")&&(c.exponentialHistogram=_.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(r.exponentialHistogram,l),l.oneofs&&(c.data="exponentialHistogram")),r.summary!=null&&r.hasOwnProperty("summary")&&(c.summary=_.opentelemetry.proto.metrics.v1.Summary.toObject(r.summary,l),l.oneofs&&(c.data="summary")),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.Metric"},a}(),i.Gauge=function(){function a(s){if(this.dataPoints=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.dataPoints=T.emptyArray,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.dataPoints!=null&&n.dataPoints.length)for(var l=0;l<n.dataPoints.length;++l)_.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(n.dataPoints[l],r.uint32(10).fork()).ldelim();return r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.metrics.v1.Gauge;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.dataPoints&&c.dataPoints.length||(c.dataPoints=[]),c.dataPoints.push(_.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(n,n.uint32()));break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.dataPoints!=null&&n.hasOwnProperty("dataPoints")){if(!Array.isArray(n.dataPoints))return"dataPoints: array expected";for(var r=0;r<n.dataPoints.length;++r){var l=_.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(n.dataPoints[r]);if(l)return"dataPoints."+l}}return null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.metrics.v1.Gauge)return n;var r=new _.opentelemetry.proto.metrics.v1.Gauge;if(n.dataPoints){if(!Array.isArray(n.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");r.dataPoints=[];for(var l=0;l<n.dataPoints.length;++l){if(typeof n.dataPoints[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");r.dataPoints[l]=_.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(n.dataPoints[l])}}return r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.dataPoints=[]),n.dataPoints&&n.dataPoints.length){l.dataPoints=[];for(var c=0;c<n.dataPoints.length;++c)l.dataPoints[c]=_.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(n.dataPoints[c],r)}return l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.Gauge"},a}(),i.Sum=function(){function a(s){if(this.dataPoints=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.dataPoints=T.emptyArray,a.prototype.aggregationTemporality=null,a.prototype.isMonotonic=null,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.dataPoints!=null&&n.dataPoints.length)for(var l=0;l<n.dataPoints.length;++l)_.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(n.dataPoints[l],r.uint32(10).fork()).ldelim();return n.aggregationTemporality!=null&&Object.hasOwnProperty.call(n,"aggregationTemporality")&&r.uint32(16).int32(n.aggregationTemporality),n.isMonotonic!=null&&Object.hasOwnProperty.call(n,"isMonotonic")&&r.uint32(24).bool(n.isMonotonic),r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.metrics.v1.Sum;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.dataPoints&&c.dataPoints.length||(c.dataPoints=[]),c.dataPoints.push(_.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(n,n.uint32()));break}case 2:{c.aggregationTemporality=n.int32();break}case 3:{c.isMonotonic=n.bool();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.dataPoints!=null&&n.hasOwnProperty("dataPoints")){if(!Array.isArray(n.dataPoints))return"dataPoints: array expected";for(var r=0;r<n.dataPoints.length;++r){var l=_.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(n.dataPoints[r]);if(l)return"dataPoints."+l}}if(n.aggregationTemporality!=null&&n.hasOwnProperty("aggregationTemporality"))switch(n.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return n.isMonotonic!=null&&n.hasOwnProperty("isMonotonic")&&typeof n.isMonotonic!="boolean"?"isMonotonic: boolean expected":null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.metrics.v1.Sum)return n;var r=new _.opentelemetry.proto.metrics.v1.Sum;if(n.dataPoints){if(!Array.isArray(n.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");r.dataPoints=[];for(var l=0;l<n.dataPoints.length;++l){if(typeof n.dataPoints[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");r.dataPoints[l]=_.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(n.dataPoints[l])}}switch(n.aggregationTemporality){default:if(typeof n.aggregationTemporality=="number"){r.aggregationTemporality=n.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:r.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:r.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:r.aggregationTemporality=2;break}return n.isMonotonic!=null&&(r.isMonotonic=!!n.isMonotonic),r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.dataPoints=[]),r.defaults&&(l.aggregationTemporality=r.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,l.isMonotonic=!1),n.dataPoints&&n.dataPoints.length){l.dataPoints=[];for(var c=0;c<n.dataPoints.length;++c)l.dataPoints[c]=_.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(n.dataPoints[c],r)}return n.aggregationTemporality!=null&&n.hasOwnProperty("aggregationTemporality")&&(l.aggregationTemporality=r.enums===String?_.opentelemetry.proto.metrics.v1.AggregationTemporality[n.aggregationTemporality]===void 0?n.aggregationTemporality:_.opentelemetry.proto.metrics.v1.AggregationTemporality[n.aggregationTemporality]:n.aggregationTemporality),n.isMonotonic!=null&&n.hasOwnProperty("isMonotonic")&&(l.isMonotonic=n.isMonotonic),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.Sum"},a}(),i.Histogram=function(){function a(s){if(this.dataPoints=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.dataPoints=T.emptyArray,a.prototype.aggregationTemporality=null,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.dataPoints!=null&&n.dataPoints.length)for(var l=0;l<n.dataPoints.length;++l)_.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(n.dataPoints[l],r.uint32(10).fork()).ldelim();return n.aggregationTemporality!=null&&Object.hasOwnProperty.call(n,"aggregationTemporality")&&r.uint32(16).int32(n.aggregationTemporality),r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.metrics.v1.Histogram;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.dataPoints&&c.dataPoints.length||(c.dataPoints=[]),c.dataPoints.push(_.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(n,n.uint32()));break}case 2:{c.aggregationTemporality=n.int32();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.dataPoints!=null&&n.hasOwnProperty("dataPoints")){if(!Array.isArray(n.dataPoints))return"dataPoints: array expected";for(var r=0;r<n.dataPoints.length;++r){var l=_.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(n.dataPoints[r]);if(l)return"dataPoints."+l}}if(n.aggregationTemporality!=null&&n.hasOwnProperty("aggregationTemporality"))switch(n.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.metrics.v1.Histogram)return n;var r=new _.opentelemetry.proto.metrics.v1.Histogram;if(n.dataPoints){if(!Array.isArray(n.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");r.dataPoints=[];for(var l=0;l<n.dataPoints.length;++l){if(typeof n.dataPoints[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");r.dataPoints[l]=_.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(n.dataPoints[l])}}switch(n.aggregationTemporality){default:if(typeof n.aggregationTemporality=="number"){r.aggregationTemporality=n.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:r.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:r.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:r.aggregationTemporality=2;break}return r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.dataPoints=[]),r.defaults&&(l.aggregationTemporality=r.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),n.dataPoints&&n.dataPoints.length){l.dataPoints=[];for(var c=0;c<n.dataPoints.length;++c)l.dataPoints[c]=_.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(n.dataPoints[c],r)}return n.aggregationTemporality!=null&&n.hasOwnProperty("aggregationTemporality")&&(l.aggregationTemporality=r.enums===String?_.opentelemetry.proto.metrics.v1.AggregationTemporality[n.aggregationTemporality]===void 0?n.aggregationTemporality:_.opentelemetry.proto.metrics.v1.AggregationTemporality[n.aggregationTemporality]:n.aggregationTemporality),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.Histogram"},a}(),i.ExponentialHistogram=function(){function a(s){if(this.dataPoints=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.dataPoints=T.emptyArray,a.prototype.aggregationTemporality=null,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.dataPoints!=null&&n.dataPoints.length)for(var l=0;l<n.dataPoints.length;++l)_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(n.dataPoints[l],r.uint32(10).fork()).ldelim();return n.aggregationTemporality!=null&&Object.hasOwnProperty.call(n,"aggregationTemporality")&&r.uint32(16).int32(n.aggregationTemporality),r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.metrics.v1.ExponentialHistogram;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.dataPoints&&c.dataPoints.length||(c.dataPoints=[]),c.dataPoints.push(_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(n,n.uint32()));break}case 2:{c.aggregationTemporality=n.int32();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.dataPoints!=null&&n.hasOwnProperty("dataPoints")){if(!Array.isArray(n.dataPoints))return"dataPoints: array expected";for(var r=0;r<n.dataPoints.length;++r){var l=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(n.dataPoints[r]);if(l)return"dataPoints."+l}}if(n.aggregationTemporality!=null&&n.hasOwnProperty("aggregationTemporality"))switch(n.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.metrics.v1.ExponentialHistogram)return n;var r=new _.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(n.dataPoints){if(!Array.isArray(n.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");r.dataPoints=[];for(var l=0;l<n.dataPoints.length;++l){if(typeof n.dataPoints[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");r.dataPoints[l]=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(n.dataPoints[l])}}switch(n.aggregationTemporality){default:if(typeof n.aggregationTemporality=="number"){r.aggregationTemporality=n.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:r.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:r.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:r.aggregationTemporality=2;break}return r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.dataPoints=[]),r.defaults&&(l.aggregationTemporality=r.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),n.dataPoints&&n.dataPoints.length){l.dataPoints=[];for(var c=0;c<n.dataPoints.length;++c)l.dataPoints[c]=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(n.dataPoints[c],r)}return n.aggregationTemporality!=null&&n.hasOwnProperty("aggregationTemporality")&&(l.aggregationTemporality=r.enums===String?_.opentelemetry.proto.metrics.v1.AggregationTemporality[n.aggregationTemporality]===void 0?n.aggregationTemporality:_.opentelemetry.proto.metrics.v1.AggregationTemporality[n.aggregationTemporality]:n.aggregationTemporality),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},a}(),i.Summary=function(){function a(s){if(this.dataPoints=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.dataPoints=T.emptyArray,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.dataPoints!=null&&n.dataPoints.length)for(var l=0;l<n.dataPoints.length;++l)_.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(n.dataPoints[l],r.uint32(10).fork()).ldelim();return r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.metrics.v1.Summary;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.dataPoints&&c.dataPoints.length||(c.dataPoints=[]),c.dataPoints.push(_.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(n,n.uint32()));break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.dataPoints!=null&&n.hasOwnProperty("dataPoints")){if(!Array.isArray(n.dataPoints))return"dataPoints: array expected";for(var r=0;r<n.dataPoints.length;++r){var l=_.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(n.dataPoints[r]);if(l)return"dataPoints."+l}}return null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.metrics.v1.Summary)return n;var r=new _.opentelemetry.proto.metrics.v1.Summary;if(n.dataPoints){if(!Array.isArray(n.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");r.dataPoints=[];for(var l=0;l<n.dataPoints.length;++l){if(typeof n.dataPoints[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");r.dataPoints[l]=_.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(n.dataPoints[l])}}return r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.dataPoints=[]),n.dataPoints&&n.dataPoints.length){l.dataPoints=[];for(var c=0;c<n.dataPoints.length;++c)l.dataPoints[c]=_.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(n.dataPoints[c],r)}return l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.Summary"},a}(),i.AggregationTemporality=function(){var a={},s=Object.create(a);return s[a[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,s[a[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,s[a[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,s}(),i.DataPointFlags=function(){var a={},s=Object.create(a);return s[a[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,s[a[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,s}(),i.NumberDataPoint=function(){function a(n){if(this.attributes=[],this.exemplars=[],n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}a.prototype.attributes=T.emptyArray,a.prototype.startTimeUnixNano=null,a.prototype.timeUnixNano=null,a.prototype.asDouble=null,a.prototype.asInt=null,a.prototype.exemplars=T.emptyArray,a.prototype.flags=null;var s;return Object.defineProperty(a.prototype,"value",{get:T.oneOfGetter(s=["asDouble","asInt"]),set:T.oneOfSetter(s)}),a.create=function(r){return new a(r)},a.encode=function(r,l){if(l||(l=ne.create()),r.startTimeUnixNano!=null&&Object.hasOwnProperty.call(r,"startTimeUnixNano")&&l.uint32(17).fixed64(r.startTimeUnixNano),r.timeUnixNano!=null&&Object.hasOwnProperty.call(r,"timeUnixNano")&&l.uint32(25).fixed64(r.timeUnixNano),r.asDouble!=null&&Object.hasOwnProperty.call(r,"asDouble")&&l.uint32(33).double(r.asDouble),r.exemplars!=null&&r.exemplars.length)for(var c=0;c<r.exemplars.length;++c)_.opentelemetry.proto.metrics.v1.Exemplar.encode(r.exemplars[c],l.uint32(42).fork()).ldelim();if(r.asInt!=null&&Object.hasOwnProperty.call(r,"asInt")&&l.uint32(49).sfixed64(r.asInt),r.attributes!=null&&r.attributes.length)for(var c=0;c<r.attributes.length;++c)_.opentelemetry.proto.common.v1.KeyValue.encode(r.attributes[c],l.uint32(58).fork()).ldelim();return r.flags!=null&&Object.hasOwnProperty.call(r,"flags")&&l.uint32(64).uint32(r.flags),l},a.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},a.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.metrics.v1.NumberDataPoint;r.pos<c;){var E=r.uint32();switch(E>>>3){case 7:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 2:{u.startTimeUnixNano=r.fixed64();break}case 3:{u.timeUnixNano=r.fixed64();break}case 4:{u.asDouble=r.double();break}case 6:{u.asInt=r.sfixed64();break}case 5:{u.exemplars&&u.exemplars.length||(u.exemplars=[]),u.exemplars.push(_.opentelemetry.proto.metrics.v1.Exemplar.decode(r,r.uint32()));break}case 8:{u.flags=r.uint32();break}default:r.skipType(E&7);break}}return u},a.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},a.verify=function(r){if(typeof r!="object"||r===null)return"object expected";var l={};if(r.attributes!=null&&r.hasOwnProperty("attributes")){if(!Array.isArray(r.attributes))return"attributes: array expected";for(var c=0;c<r.attributes.length;++c){var u=_.opentelemetry.proto.common.v1.KeyValue.verify(r.attributes[c]);if(u)return"attributes."+u}}if(r.startTimeUnixNano!=null&&r.hasOwnProperty("startTimeUnixNano")&&!T.isInteger(r.startTimeUnixNano)&&!(r.startTimeUnixNano&&T.isInteger(r.startTimeUnixNano.low)&&T.isInteger(r.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&!T.isInteger(r.timeUnixNano)&&!(r.timeUnixNano&&T.isInteger(r.timeUnixNano.low)&&T.isInteger(r.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(r.asDouble!=null&&r.hasOwnProperty("asDouble")&&(l.value=1,typeof r.asDouble!="number"))return"asDouble: number expected";if(r.asInt!=null&&r.hasOwnProperty("asInt")){if(l.value===1)return"value: multiple values";if(l.value=1,!T.isInteger(r.asInt)&&!(r.asInt&&T.isInteger(r.asInt.low)&&T.isInteger(r.asInt.high)))return"asInt: integer|Long expected"}if(r.exemplars!=null&&r.hasOwnProperty("exemplars")){if(!Array.isArray(r.exemplars))return"exemplars: array expected";for(var c=0;c<r.exemplars.length;++c){var u=_.opentelemetry.proto.metrics.v1.Exemplar.verify(r.exemplars[c]);if(u)return"exemplars."+u}}return r.flags!=null&&r.hasOwnProperty("flags")&&!T.isInteger(r.flags)?"flags: integer expected":null},a.fromObject=function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.NumberDataPoint)return r;var l=new _.opentelemetry.proto.metrics.v1.NumberDataPoint;if(r.attributes){if(!Array.isArray(r.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");l.attributes=[];for(var c=0;c<r.attributes.length;++c){if(typeof r.attributes[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");l.attributes[c]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(r.attributes[c])}}if(r.startTimeUnixNano!=null&&(T.Long?(l.startTimeUnixNano=T.Long.fromValue(r.startTimeUnixNano)).unsigned=!1:typeof r.startTimeUnixNano=="string"?l.startTimeUnixNano=parseInt(r.startTimeUnixNano,10):typeof r.startTimeUnixNano=="number"?l.startTimeUnixNano=r.startTimeUnixNano:typeof r.startTimeUnixNano=="object"&&(l.startTimeUnixNano=new T.LongBits(r.startTimeUnixNano.low>>>0,r.startTimeUnixNano.high>>>0).toNumber())),r.timeUnixNano!=null&&(T.Long?(l.timeUnixNano=T.Long.fromValue(r.timeUnixNano)).unsigned=!1:typeof r.timeUnixNano=="string"?l.timeUnixNano=parseInt(r.timeUnixNano,10):typeof r.timeUnixNano=="number"?l.timeUnixNano=r.timeUnixNano:typeof r.timeUnixNano=="object"&&(l.timeUnixNano=new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber())),r.asDouble!=null&&(l.asDouble=Number(r.asDouble)),r.asInt!=null&&(T.Long?(l.asInt=T.Long.fromValue(r.asInt)).unsigned=!1:typeof r.asInt=="string"?l.asInt=parseInt(r.asInt,10):typeof r.asInt=="number"?l.asInt=r.asInt:typeof r.asInt=="object"&&(l.asInt=new T.LongBits(r.asInt.low>>>0,r.asInt.high>>>0).toNumber())),r.exemplars){if(!Array.isArray(r.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");l.exemplars=[];for(var c=0;c<r.exemplars.length;++c){if(typeof r.exemplars[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");l.exemplars[c]=_.opentelemetry.proto.metrics.v1.Exemplar.fromObject(r.exemplars[c])}}return r.flags!=null&&(l.flags=r.flags>>>0),l},a.toObject=function(r,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.exemplars=[],c.attributes=[]),l.defaults){if(T.Long){var u=new T.Long(0,0,!1);c.startTimeUnixNano=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.startTimeUnixNano=l.longs===String?"0":0;if(T.Long){var u=new T.Long(0,0,!1);c.timeUnixNano=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.timeUnixNano=l.longs===String?"0":0;c.flags=0}if(r.startTimeUnixNano!=null&&r.hasOwnProperty("startTimeUnixNano")&&(typeof r.startTimeUnixNano=="number"?c.startTimeUnixNano=l.longs===String?String(r.startTimeUnixNano):r.startTimeUnixNano:c.startTimeUnixNano=l.longs===String?T.Long.prototype.toString.call(r.startTimeUnixNano):l.longs===Number?new T.LongBits(r.startTimeUnixNano.low>>>0,r.startTimeUnixNano.high>>>0).toNumber():r.startTimeUnixNano),r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&(typeof r.timeUnixNano=="number"?c.timeUnixNano=l.longs===String?String(r.timeUnixNano):r.timeUnixNano:c.timeUnixNano=l.longs===String?T.Long.prototype.toString.call(r.timeUnixNano):l.longs===Number?new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber():r.timeUnixNano),r.asDouble!=null&&r.hasOwnProperty("asDouble")&&(c.asDouble=l.json&&!isFinite(r.asDouble)?String(r.asDouble):r.asDouble,l.oneofs&&(c.value="asDouble")),r.exemplars&&r.exemplars.length){c.exemplars=[];for(var E=0;E<r.exemplars.length;++E)c.exemplars[E]=_.opentelemetry.proto.metrics.v1.Exemplar.toObject(r.exemplars[E],l)}if(r.asInt!=null&&r.hasOwnProperty("asInt")&&(typeof r.asInt=="number"?c.asInt=l.longs===String?String(r.asInt):r.asInt:c.asInt=l.longs===String?T.Long.prototype.toString.call(r.asInt):l.longs===Number?new T.LongBits(r.asInt.low>>>0,r.asInt.high>>>0).toNumber():r.asInt,l.oneofs&&(c.value="asInt")),r.attributes&&r.attributes.length){c.attributes=[];for(var E=0;E<r.attributes.length;++E)c.attributes[E]=_.opentelemetry.proto.common.v1.KeyValue.toObject(r.attributes[E],l)}return r.flags!=null&&r.hasOwnProperty("flags")&&(c.flags=r.flags),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},a}(),i.HistogramDataPoint=function(){function a(n){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}a.prototype.attributes=T.emptyArray,a.prototype.startTimeUnixNano=null,a.prototype.timeUnixNano=null,a.prototype.count=null,a.prototype.sum=null,a.prototype.bucketCounts=T.emptyArray,a.prototype.explicitBounds=T.emptyArray,a.prototype.exemplars=T.emptyArray,a.prototype.flags=null,a.prototype.min=null,a.prototype.max=null;var s;return Object.defineProperty(a.prototype,"_sum",{get:T.oneOfGetter(s=["sum"]),set:T.oneOfSetter(s)}),Object.defineProperty(a.prototype,"_min",{get:T.oneOfGetter(s=["min"]),set:T.oneOfSetter(s)}),Object.defineProperty(a.prototype,"_max",{get:T.oneOfGetter(s=["max"]),set:T.oneOfSetter(s)}),a.create=function(r){return new a(r)},a.encode=function(r,l){if(l||(l=ne.create()),r.startTimeUnixNano!=null&&Object.hasOwnProperty.call(r,"startTimeUnixNano")&&l.uint32(17).fixed64(r.startTimeUnixNano),r.timeUnixNano!=null&&Object.hasOwnProperty.call(r,"timeUnixNano")&&l.uint32(25).fixed64(r.timeUnixNano),r.count!=null&&Object.hasOwnProperty.call(r,"count")&&l.uint32(33).fixed64(r.count),r.sum!=null&&Object.hasOwnProperty.call(r,"sum")&&l.uint32(41).double(r.sum),r.bucketCounts!=null&&r.bucketCounts.length){l.uint32(50).fork();for(var c=0;c<r.bucketCounts.length;++c)l.fixed64(r.bucketCounts[c]);l.ldelim()}if(r.explicitBounds!=null&&r.explicitBounds.length){l.uint32(58).fork();for(var c=0;c<r.explicitBounds.length;++c)l.double(r.explicitBounds[c]);l.ldelim()}if(r.exemplars!=null&&r.exemplars.length)for(var c=0;c<r.exemplars.length;++c)_.opentelemetry.proto.metrics.v1.Exemplar.encode(r.exemplars[c],l.uint32(66).fork()).ldelim();if(r.attributes!=null&&r.attributes.length)for(var c=0;c<r.attributes.length;++c)_.opentelemetry.proto.common.v1.KeyValue.encode(r.attributes[c],l.uint32(74).fork()).ldelim();return r.flags!=null&&Object.hasOwnProperty.call(r,"flags")&&l.uint32(80).uint32(r.flags),r.min!=null&&Object.hasOwnProperty.call(r,"min")&&l.uint32(89).double(r.min),r.max!=null&&Object.hasOwnProperty.call(r,"max")&&l.uint32(97).double(r.max),l},a.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},a.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.metrics.v1.HistogramDataPoint;r.pos<c;){var E=r.uint32();switch(E>>>3){case 9:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 2:{u.startTimeUnixNano=r.fixed64();break}case 3:{u.timeUnixNano=r.fixed64();break}case 4:{u.count=r.fixed64();break}case 5:{u.sum=r.double();break}case 6:{if(u.bucketCounts&&u.bucketCounts.length||(u.bucketCounts=[]),(E&7)===2)for(var d=r.uint32()+r.pos;r.pos<d;)u.bucketCounts.push(r.fixed64());else u.bucketCounts.push(r.fixed64());break}case 7:{if(u.explicitBounds&&u.explicitBounds.length||(u.explicitBounds=[]),(E&7)===2)for(var d=r.uint32()+r.pos;r.pos<d;)u.explicitBounds.push(r.double());else u.explicitBounds.push(r.double());break}case 8:{u.exemplars&&u.exemplars.length||(u.exemplars=[]),u.exemplars.push(_.opentelemetry.proto.metrics.v1.Exemplar.decode(r,r.uint32()));break}case 10:{u.flags=r.uint32();break}case 11:{u.min=r.double();break}case 12:{u.max=r.double();break}default:r.skipType(E&7);break}}return u},a.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},a.verify=function(r){if(typeof r!="object"||r===null)return"object expected";var l={};if(r.attributes!=null&&r.hasOwnProperty("attributes")){if(!Array.isArray(r.attributes))return"attributes: array expected";for(var c=0;c<r.attributes.length;++c){var u=_.opentelemetry.proto.common.v1.KeyValue.verify(r.attributes[c]);if(u)return"attributes."+u}}if(r.startTimeUnixNano!=null&&r.hasOwnProperty("startTimeUnixNano")&&!T.isInteger(r.startTimeUnixNano)&&!(r.startTimeUnixNano&&T.isInteger(r.startTimeUnixNano.low)&&T.isInteger(r.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&!T.isInteger(r.timeUnixNano)&&!(r.timeUnixNano&&T.isInteger(r.timeUnixNano.low)&&T.isInteger(r.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(r.count!=null&&r.hasOwnProperty("count")&&!T.isInteger(r.count)&&!(r.count&&T.isInteger(r.count.low)&&T.isInteger(r.count.high)))return"count: integer|Long expected";if(r.sum!=null&&r.hasOwnProperty("sum")&&(l._sum=1,typeof r.sum!="number"))return"sum: number expected";if(r.bucketCounts!=null&&r.hasOwnProperty("bucketCounts")){if(!Array.isArray(r.bucketCounts))return"bucketCounts: array expected";for(var c=0;c<r.bucketCounts.length;++c)if(!T.isInteger(r.bucketCounts[c])&&!(r.bucketCounts[c]&&T.isInteger(r.bucketCounts[c].low)&&T.isInteger(r.bucketCounts[c].high)))return"bucketCounts: integer|Long[] expected"}if(r.explicitBounds!=null&&r.hasOwnProperty("explicitBounds")){if(!Array.isArray(r.explicitBounds))return"explicitBounds: array expected";for(var c=0;c<r.explicitBounds.length;++c)if(typeof r.explicitBounds[c]!="number")return"explicitBounds: number[] expected"}if(r.exemplars!=null&&r.hasOwnProperty("exemplars")){if(!Array.isArray(r.exemplars))return"exemplars: array expected";for(var c=0;c<r.exemplars.length;++c){var u=_.opentelemetry.proto.metrics.v1.Exemplar.verify(r.exemplars[c]);if(u)return"exemplars."+u}}return r.flags!=null&&r.hasOwnProperty("flags")&&!T.isInteger(r.flags)?"flags: integer expected":r.min!=null&&r.hasOwnProperty("min")&&(l._min=1,typeof r.min!="number")?"min: number expected":r.max!=null&&r.hasOwnProperty("max")&&(l._max=1,typeof r.max!="number")?"max: number expected":null},a.fromObject=function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.HistogramDataPoint)return r;var l=new _.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(r.attributes){if(!Array.isArray(r.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");l.attributes=[];for(var c=0;c<r.attributes.length;++c){if(typeof r.attributes[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");l.attributes[c]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(r.attributes[c])}}if(r.startTimeUnixNano!=null&&(T.Long?(l.startTimeUnixNano=T.Long.fromValue(r.startTimeUnixNano)).unsigned=!1:typeof r.startTimeUnixNano=="string"?l.startTimeUnixNano=parseInt(r.startTimeUnixNano,10):typeof r.startTimeUnixNano=="number"?l.startTimeUnixNano=r.startTimeUnixNano:typeof r.startTimeUnixNano=="object"&&(l.startTimeUnixNano=new T.LongBits(r.startTimeUnixNano.low>>>0,r.startTimeUnixNano.high>>>0).toNumber())),r.timeUnixNano!=null&&(T.Long?(l.timeUnixNano=T.Long.fromValue(r.timeUnixNano)).unsigned=!1:typeof r.timeUnixNano=="string"?l.timeUnixNano=parseInt(r.timeUnixNano,10):typeof r.timeUnixNano=="number"?l.timeUnixNano=r.timeUnixNano:typeof r.timeUnixNano=="object"&&(l.timeUnixNano=new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber())),r.count!=null&&(T.Long?(l.count=T.Long.fromValue(r.count)).unsigned=!1:typeof r.count=="string"?l.count=parseInt(r.count,10):typeof r.count=="number"?l.count=r.count:typeof r.count=="object"&&(l.count=new T.LongBits(r.count.low>>>0,r.count.high>>>0).toNumber())),r.sum!=null&&(l.sum=Number(r.sum)),r.bucketCounts){if(!Array.isArray(r.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");l.bucketCounts=[];for(var c=0;c<r.bucketCounts.length;++c)T.Long?(l.bucketCounts[c]=T.Long.fromValue(r.bucketCounts[c])).unsigned=!1:typeof r.bucketCounts[c]=="string"?l.bucketCounts[c]=parseInt(r.bucketCounts[c],10):typeof r.bucketCounts[c]=="number"?l.bucketCounts[c]=r.bucketCounts[c]:typeof r.bucketCounts[c]=="object"&&(l.bucketCounts[c]=new T.LongBits(r.bucketCounts[c].low>>>0,r.bucketCounts[c].high>>>0).toNumber())}if(r.explicitBounds){if(!Array.isArray(r.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");l.explicitBounds=[];for(var c=0;c<r.explicitBounds.length;++c)l.explicitBounds[c]=Number(r.explicitBounds[c])}if(r.exemplars){if(!Array.isArray(r.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");l.exemplars=[];for(var c=0;c<r.exemplars.length;++c){if(typeof r.exemplars[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");l.exemplars[c]=_.opentelemetry.proto.metrics.v1.Exemplar.fromObject(r.exemplars[c])}}return r.flags!=null&&(l.flags=r.flags>>>0),r.min!=null&&(l.min=Number(r.min)),r.max!=null&&(l.max=Number(r.max)),l},a.toObject=function(r,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.bucketCounts=[],c.explicitBounds=[],c.exemplars=[],c.attributes=[]),l.defaults){if(T.Long){var u=new T.Long(0,0,!1);c.startTimeUnixNano=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.startTimeUnixNano=l.longs===String?"0":0;if(T.Long){var u=new T.Long(0,0,!1);c.timeUnixNano=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.timeUnixNano=l.longs===String?"0":0;if(T.Long){var u=new T.Long(0,0,!1);c.count=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.count=l.longs===String?"0":0;c.flags=0}if(r.startTimeUnixNano!=null&&r.hasOwnProperty("startTimeUnixNano")&&(typeof r.startTimeUnixNano=="number"?c.startTimeUnixNano=l.longs===String?String(r.startTimeUnixNano):r.startTimeUnixNano:c.startTimeUnixNano=l.longs===String?T.Long.prototype.toString.call(r.startTimeUnixNano):l.longs===Number?new T.LongBits(r.startTimeUnixNano.low>>>0,r.startTimeUnixNano.high>>>0).toNumber():r.startTimeUnixNano),r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&(typeof r.timeUnixNano=="number"?c.timeUnixNano=l.longs===String?String(r.timeUnixNano):r.timeUnixNano:c.timeUnixNano=l.longs===String?T.Long.prototype.toString.call(r.timeUnixNano):l.longs===Number?new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber():r.timeUnixNano),r.count!=null&&r.hasOwnProperty("count")&&(typeof r.count=="number"?c.count=l.longs===String?String(r.count):r.count:c.count=l.longs===String?T.Long.prototype.toString.call(r.count):l.longs===Number?new T.LongBits(r.count.low>>>0,r.count.high>>>0).toNumber():r.count),r.sum!=null&&r.hasOwnProperty("sum")&&(c.sum=l.json&&!isFinite(r.sum)?String(r.sum):r.sum,l.oneofs&&(c._sum="sum")),r.bucketCounts&&r.bucketCounts.length){c.bucketCounts=[];for(var E=0;E<r.bucketCounts.length;++E)typeof r.bucketCounts[E]=="number"?c.bucketCounts[E]=l.longs===String?String(r.bucketCounts[E]):r.bucketCounts[E]:c.bucketCounts[E]=l.longs===String?T.Long.prototype.toString.call(r.bucketCounts[E]):l.longs===Number?new T.LongBits(r.bucketCounts[E].low>>>0,r.bucketCounts[E].high>>>0).toNumber():r.bucketCounts[E]}if(r.explicitBounds&&r.explicitBounds.length){c.explicitBounds=[];for(var E=0;E<r.explicitBounds.length;++E)c.explicitBounds[E]=l.json&&!isFinite(r.explicitBounds[E])?String(r.explicitBounds[E]):r.explicitBounds[E]}if(r.exemplars&&r.exemplars.length){c.exemplars=[];for(var E=0;E<r.exemplars.length;++E)c.exemplars[E]=_.opentelemetry.proto.metrics.v1.Exemplar.toObject(r.exemplars[E],l)}if(r.attributes&&r.attributes.length){c.attributes=[];for(var E=0;E<r.attributes.length;++E)c.attributes[E]=_.opentelemetry.proto.common.v1.KeyValue.toObject(r.attributes[E],l)}return r.flags!=null&&r.hasOwnProperty("flags")&&(c.flags=r.flags),r.min!=null&&r.hasOwnProperty("min")&&(c.min=l.json&&!isFinite(r.min)?String(r.min):r.min,l.oneofs&&(c._min="min")),r.max!=null&&r.hasOwnProperty("max")&&(c.max=l.json&&!isFinite(r.max)?String(r.max):r.max,l.oneofs&&(c._max="max")),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},a}(),i.ExponentialHistogramDataPoint=function(){function a(n){if(this.attributes=[],this.exemplars=[],n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}a.prototype.attributes=T.emptyArray,a.prototype.startTimeUnixNano=null,a.prototype.timeUnixNano=null,a.prototype.count=null,a.prototype.sum=null,a.prototype.scale=null,a.prototype.zeroCount=null,a.prototype.positive=null,a.prototype.negative=null,a.prototype.flags=null,a.prototype.exemplars=T.emptyArray,a.prototype.min=null,a.prototype.max=null,a.prototype.zeroThreshold=null;var s;return Object.defineProperty(a.prototype,"_sum",{get:T.oneOfGetter(s=["sum"]),set:T.oneOfSetter(s)}),Object.defineProperty(a.prototype,"_min",{get:T.oneOfGetter(s=["min"]),set:T.oneOfSetter(s)}),Object.defineProperty(a.prototype,"_max",{get:T.oneOfGetter(s=["max"]),set:T.oneOfSetter(s)}),a.create=function(r){return new a(r)},a.encode=function(r,l){if(l||(l=ne.create()),r.attributes!=null&&r.attributes.length)for(var c=0;c<r.attributes.length;++c)_.opentelemetry.proto.common.v1.KeyValue.encode(r.attributes[c],l.uint32(10).fork()).ldelim();if(r.startTimeUnixNano!=null&&Object.hasOwnProperty.call(r,"startTimeUnixNano")&&l.uint32(17).fixed64(r.startTimeUnixNano),r.timeUnixNano!=null&&Object.hasOwnProperty.call(r,"timeUnixNano")&&l.uint32(25).fixed64(r.timeUnixNano),r.count!=null&&Object.hasOwnProperty.call(r,"count")&&l.uint32(33).fixed64(r.count),r.sum!=null&&Object.hasOwnProperty.call(r,"sum")&&l.uint32(41).double(r.sum),r.scale!=null&&Object.hasOwnProperty.call(r,"scale")&&l.uint32(48).sint32(r.scale),r.zeroCount!=null&&Object.hasOwnProperty.call(r,"zeroCount")&&l.uint32(57).fixed64(r.zeroCount),r.positive!=null&&Object.hasOwnProperty.call(r,"positive")&&_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(r.positive,l.uint32(66).fork()).ldelim(),r.negative!=null&&Object.hasOwnProperty.call(r,"negative")&&_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(r.negative,l.uint32(74).fork()).ldelim(),r.flags!=null&&Object.hasOwnProperty.call(r,"flags")&&l.uint32(80).uint32(r.flags),r.exemplars!=null&&r.exemplars.length)for(var c=0;c<r.exemplars.length;++c)_.opentelemetry.proto.metrics.v1.Exemplar.encode(r.exemplars[c],l.uint32(90).fork()).ldelim();return r.min!=null&&Object.hasOwnProperty.call(r,"min")&&l.uint32(97).double(r.min),r.max!=null&&Object.hasOwnProperty.call(r,"max")&&l.uint32(105).double(r.max),r.zeroThreshold!=null&&Object.hasOwnProperty.call(r,"zeroThreshold")&&l.uint32(113).double(r.zeroThreshold),l},a.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},a.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;r.pos<c;){var E=r.uint32();switch(E>>>3){case 1:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 2:{u.startTimeUnixNano=r.fixed64();break}case 3:{u.timeUnixNano=r.fixed64();break}case 4:{u.count=r.fixed64();break}case 5:{u.sum=r.double();break}case 6:{u.scale=r.sint32();break}case 7:{u.zeroCount=r.fixed64();break}case 8:{u.positive=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(r,r.uint32());break}case 9:{u.negative=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(r,r.uint32());break}case 10:{u.flags=r.uint32();break}case 11:{u.exemplars&&u.exemplars.length||(u.exemplars=[]),u.exemplars.push(_.opentelemetry.proto.metrics.v1.Exemplar.decode(r,r.uint32()));break}case 12:{u.min=r.double();break}case 13:{u.max=r.double();break}case 14:{u.zeroThreshold=r.double();break}default:r.skipType(E&7);break}}return u},a.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},a.verify=function(r){if(typeof r!="object"||r===null)return"object expected";var l={};if(r.attributes!=null&&r.hasOwnProperty("attributes")){if(!Array.isArray(r.attributes))return"attributes: array expected";for(var c=0;c<r.attributes.length;++c){var u=_.opentelemetry.proto.common.v1.KeyValue.verify(r.attributes[c]);if(u)return"attributes."+u}}if(r.startTimeUnixNano!=null&&r.hasOwnProperty("startTimeUnixNano")&&!T.isInteger(r.startTimeUnixNano)&&!(r.startTimeUnixNano&&T.isInteger(r.startTimeUnixNano.low)&&T.isInteger(r.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&!T.isInteger(r.timeUnixNano)&&!(r.timeUnixNano&&T.isInteger(r.timeUnixNano.low)&&T.isInteger(r.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(r.count!=null&&r.hasOwnProperty("count")&&!T.isInteger(r.count)&&!(r.count&&T.isInteger(r.count.low)&&T.isInteger(r.count.high)))return"count: integer|Long expected";if(r.sum!=null&&r.hasOwnProperty("sum")&&(l._sum=1,typeof r.sum!="number"))return"sum: number expected";if(r.scale!=null&&r.hasOwnProperty("scale")&&!T.isInteger(r.scale))return"scale: integer expected";if(r.zeroCount!=null&&r.hasOwnProperty("zeroCount")&&!T.isInteger(r.zeroCount)&&!(r.zeroCount&&T.isInteger(r.zeroCount.low)&&T.isInteger(r.zeroCount.high)))return"zeroCount: integer|Long expected";if(r.positive!=null&&r.hasOwnProperty("positive")){var u=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(r.positive);if(u)return"positive."+u}if(r.negative!=null&&r.hasOwnProperty("negative")){var u=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(r.negative);if(u)return"negative."+u}if(r.flags!=null&&r.hasOwnProperty("flags")&&!T.isInteger(r.flags))return"flags: integer expected";if(r.exemplars!=null&&r.hasOwnProperty("exemplars")){if(!Array.isArray(r.exemplars))return"exemplars: array expected";for(var c=0;c<r.exemplars.length;++c){var u=_.opentelemetry.proto.metrics.v1.Exemplar.verify(r.exemplars[c]);if(u)return"exemplars."+u}}return r.min!=null&&r.hasOwnProperty("min")&&(l._min=1,typeof r.min!="number")?"min: number expected":r.max!=null&&r.hasOwnProperty("max")&&(l._max=1,typeof r.max!="number")?"max: number expected":r.zeroThreshold!=null&&r.hasOwnProperty("zeroThreshold")&&typeof r.zeroThreshold!="number"?"zeroThreshold: number expected":null},a.fromObject=function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return r;var l=new _.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(r.attributes){if(!Array.isArray(r.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");l.attributes=[];for(var c=0;c<r.attributes.length;++c){if(typeof r.attributes[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");l.attributes[c]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(r.attributes[c])}}if(r.startTimeUnixNano!=null&&(T.Long?(l.startTimeUnixNano=T.Long.fromValue(r.startTimeUnixNano)).unsigned=!1:typeof r.startTimeUnixNano=="string"?l.startTimeUnixNano=parseInt(r.startTimeUnixNano,10):typeof r.startTimeUnixNano=="number"?l.startTimeUnixNano=r.startTimeUnixNano:typeof r.startTimeUnixNano=="object"&&(l.startTimeUnixNano=new T.LongBits(r.startTimeUnixNano.low>>>0,r.startTimeUnixNano.high>>>0).toNumber())),r.timeUnixNano!=null&&(T.Long?(l.timeUnixNano=T.Long.fromValue(r.timeUnixNano)).unsigned=!1:typeof r.timeUnixNano=="string"?l.timeUnixNano=parseInt(r.timeUnixNano,10):typeof r.timeUnixNano=="number"?l.timeUnixNano=r.timeUnixNano:typeof r.timeUnixNano=="object"&&(l.timeUnixNano=new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber())),r.count!=null&&(T.Long?(l.count=T.Long.fromValue(r.count)).unsigned=!1:typeof r.count=="string"?l.count=parseInt(r.count,10):typeof r.count=="number"?l.count=r.count:typeof r.count=="object"&&(l.count=new T.LongBits(r.count.low>>>0,r.count.high>>>0).toNumber())),r.sum!=null&&(l.sum=Number(r.sum)),r.scale!=null&&(l.scale=r.scale|0),r.zeroCount!=null&&(T.Long?(l.zeroCount=T.Long.fromValue(r.zeroCount)).unsigned=!1:typeof r.zeroCount=="string"?l.zeroCount=parseInt(r.zeroCount,10):typeof r.zeroCount=="number"?l.zeroCount=r.zeroCount:typeof r.zeroCount=="object"&&(l.zeroCount=new T.LongBits(r.zeroCount.low>>>0,r.zeroCount.high>>>0).toNumber())),r.positive!=null){if(typeof r.positive!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");l.positive=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(r.positive)}if(r.negative!=null){if(typeof r.negative!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");l.negative=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(r.negative)}if(r.flags!=null&&(l.flags=r.flags>>>0),r.exemplars){if(!Array.isArray(r.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");l.exemplars=[];for(var c=0;c<r.exemplars.length;++c){if(typeof r.exemplars[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");l.exemplars[c]=_.opentelemetry.proto.metrics.v1.Exemplar.fromObject(r.exemplars[c])}}return r.min!=null&&(l.min=Number(r.min)),r.max!=null&&(l.max=Number(r.max)),r.zeroThreshold!=null&&(l.zeroThreshold=Number(r.zeroThreshold)),l},a.toObject=function(r,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.attributes=[],c.exemplars=[]),l.defaults){if(T.Long){var u=new T.Long(0,0,!1);c.startTimeUnixNano=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.startTimeUnixNano=l.longs===String?"0":0;if(T.Long){var u=new T.Long(0,0,!1);c.timeUnixNano=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.timeUnixNano=l.longs===String?"0":0;if(T.Long){var u=new T.Long(0,0,!1);c.count=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.count=l.longs===String?"0":0;if(c.scale=0,T.Long){var u=new T.Long(0,0,!1);c.zeroCount=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.zeroCount=l.longs===String?"0":0;c.positive=null,c.negative=null,c.flags=0,c.zeroThreshold=0}if(r.attributes&&r.attributes.length){c.attributes=[];for(var E=0;E<r.attributes.length;++E)c.attributes[E]=_.opentelemetry.proto.common.v1.KeyValue.toObject(r.attributes[E],l)}if(r.startTimeUnixNano!=null&&r.hasOwnProperty("startTimeUnixNano")&&(typeof r.startTimeUnixNano=="number"?c.startTimeUnixNano=l.longs===String?String(r.startTimeUnixNano):r.startTimeUnixNano:c.startTimeUnixNano=l.longs===String?T.Long.prototype.toString.call(r.startTimeUnixNano):l.longs===Number?new T.LongBits(r.startTimeUnixNano.low>>>0,r.startTimeUnixNano.high>>>0).toNumber():r.startTimeUnixNano),r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&(typeof r.timeUnixNano=="number"?c.timeUnixNano=l.longs===String?String(r.timeUnixNano):r.timeUnixNano:c.timeUnixNano=l.longs===String?T.Long.prototype.toString.call(r.timeUnixNano):l.longs===Number?new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber():r.timeUnixNano),r.count!=null&&r.hasOwnProperty("count")&&(typeof r.count=="number"?c.count=l.longs===String?String(r.count):r.count:c.count=l.longs===String?T.Long.prototype.toString.call(r.count):l.longs===Number?new T.LongBits(r.count.low>>>0,r.count.high>>>0).toNumber():r.count),r.sum!=null&&r.hasOwnProperty("sum")&&(c.sum=l.json&&!isFinite(r.sum)?String(r.sum):r.sum,l.oneofs&&(c._sum="sum")),r.scale!=null&&r.hasOwnProperty("scale")&&(c.scale=r.scale),r.zeroCount!=null&&r.hasOwnProperty("zeroCount")&&(typeof r.zeroCount=="number"?c.zeroCount=l.longs===String?String(r.zeroCount):r.zeroCount:c.zeroCount=l.longs===String?T.Long.prototype.toString.call(r.zeroCount):l.longs===Number?new T.LongBits(r.zeroCount.low>>>0,r.zeroCount.high>>>0).toNumber():r.zeroCount),r.positive!=null&&r.hasOwnProperty("positive")&&(c.positive=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(r.positive,l)),r.negative!=null&&r.hasOwnProperty("negative")&&(c.negative=_.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(r.negative,l)),r.flags!=null&&r.hasOwnProperty("flags")&&(c.flags=r.flags),r.exemplars&&r.exemplars.length){c.exemplars=[];for(var E=0;E<r.exemplars.length;++E)c.exemplars[E]=_.opentelemetry.proto.metrics.v1.Exemplar.toObject(r.exemplars[E],l)}return r.min!=null&&r.hasOwnProperty("min")&&(c.min=l.json&&!isFinite(r.min)?String(r.min):r.min,l.oneofs&&(c._min="min")),r.max!=null&&r.hasOwnProperty("max")&&(c.max=l.json&&!isFinite(r.max)?String(r.max):r.max,l.oneofs&&(c._max="max")),r.zeroThreshold!=null&&r.hasOwnProperty("zeroThreshold")&&(c.zeroThreshold=l.json&&!isFinite(r.zeroThreshold)?String(r.zeroThreshold):r.zeroThreshold),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},a.Buckets=function(){function n(r){if(this.bucketCounts=[],r)for(var l=Object.keys(r),c=0;c<l.length;++c)r[l[c]]!=null&&(this[l[c]]=r[l[c]])}return n.prototype.offset=null,n.prototype.bucketCounts=T.emptyArray,n.create=function(l){return new n(l)},n.encode=function(l,c){if(c||(c=ne.create()),l.offset!=null&&Object.hasOwnProperty.call(l,"offset")&&c.uint32(8).sint32(l.offset),l.bucketCounts!=null&&l.bucketCounts.length){c.uint32(18).fork();for(var u=0;u<l.bucketCounts.length;++u)c.uint64(l.bucketCounts[u]);c.ldelim()}return c},n.encodeDelimited=function(l,c){return this.encode(l,c).ldelim()},n.decode=function(l,c){l instanceof h||(l=h.create(l));for(var u=c===void 0?l.len:l.pos+c,E=new _.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;l.pos<u;){var d=l.uint32();switch(d>>>3){case 1:{E.offset=l.sint32();break}case 2:{if(E.bucketCounts&&E.bucketCounts.length||(E.bucketCounts=[]),(d&7)===2)for(var f=l.uint32()+l.pos;l.pos<f;)E.bucketCounts.push(l.uint64());else E.bucketCounts.push(l.uint64());break}default:l.skipType(d&7);break}}return E},n.decodeDelimited=function(l){return l instanceof h||(l=new h(l)),this.decode(l,l.uint32())},n.verify=function(l){if(typeof l!="object"||l===null)return"object expected";if(l.offset!=null&&l.hasOwnProperty("offset")&&!T.isInteger(l.offset))return"offset: integer expected";if(l.bucketCounts!=null&&l.hasOwnProperty("bucketCounts")){if(!Array.isArray(l.bucketCounts))return"bucketCounts: array expected";for(var c=0;c<l.bucketCounts.length;++c)if(!T.isInteger(l.bucketCounts[c])&&!(l.bucketCounts[c]&&T.isInteger(l.bucketCounts[c].low)&&T.isInteger(l.bucketCounts[c].high)))return"bucketCounts: integer|Long[] expected"}return null},n.fromObject=function(l){if(l instanceof _.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return l;var c=new _.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(l.offset!=null&&(c.offset=l.offset|0),l.bucketCounts){if(!Array.isArray(l.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");c.bucketCounts=[];for(var u=0;u<l.bucketCounts.length;++u)T.Long?(c.bucketCounts[u]=T.Long.fromValue(l.bucketCounts[u])).unsigned=!0:typeof l.bucketCounts[u]=="string"?c.bucketCounts[u]=parseInt(l.bucketCounts[u],10):typeof l.bucketCounts[u]=="number"?c.bucketCounts[u]=l.bucketCounts[u]:typeof l.bucketCounts[u]=="object"&&(c.bucketCounts[u]=new T.LongBits(l.bucketCounts[u].low>>>0,l.bucketCounts[u].high>>>0).toNumber(!0))}return c},n.toObject=function(l,c){c||(c={});var u={};if((c.arrays||c.defaults)&&(u.bucketCounts=[]),c.defaults&&(u.offset=0),l.offset!=null&&l.hasOwnProperty("offset")&&(u.offset=l.offset),l.bucketCounts&&l.bucketCounts.length){u.bucketCounts=[];for(var E=0;E<l.bucketCounts.length;++E)typeof l.bucketCounts[E]=="number"?u.bucketCounts[E]=c.longs===String?String(l.bucketCounts[E]):l.bucketCounts[E]:u.bucketCounts[E]=c.longs===String?T.Long.prototype.toString.call(l.bucketCounts[E]):c.longs===Number?new T.LongBits(l.bucketCounts[E].low>>>0,l.bucketCounts[E].high>>>0).toNumber(!0):l.bucketCounts[E]}return u},n.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},n.getTypeUrl=function(l){return l===void 0&&(l="type.googleapis.com"),l+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},n}(),a}(),i.SummaryDataPoint=function(){function a(s){if(this.attributes=[],this.quantileValues=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.attributes=T.emptyArray,a.prototype.startTimeUnixNano=null,a.prototype.timeUnixNano=null,a.prototype.count=null,a.prototype.sum=null,a.prototype.quantileValues=T.emptyArray,a.prototype.flags=null,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.startTimeUnixNano!=null&&Object.hasOwnProperty.call(n,"startTimeUnixNano")&&r.uint32(17).fixed64(n.startTimeUnixNano),n.timeUnixNano!=null&&Object.hasOwnProperty.call(n,"timeUnixNano")&&r.uint32(25).fixed64(n.timeUnixNano),n.count!=null&&Object.hasOwnProperty.call(n,"count")&&r.uint32(33).fixed64(n.count),n.sum!=null&&Object.hasOwnProperty.call(n,"sum")&&r.uint32(41).double(n.sum),n.quantileValues!=null&&n.quantileValues.length)for(var l=0;l<n.quantileValues.length;++l)_.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(n.quantileValues[l],r.uint32(50).fork()).ldelim();if(n.attributes!=null&&n.attributes.length)for(var l=0;l<n.attributes.length;++l)_.opentelemetry.proto.common.v1.KeyValue.encode(n.attributes[l],r.uint32(58).fork()).ldelim();return n.flags!=null&&Object.hasOwnProperty.call(n,"flags")&&r.uint32(64).uint32(n.flags),r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.metrics.v1.SummaryDataPoint;n.pos<l;){var u=n.uint32();switch(u>>>3){case 7:{c.attributes&&c.attributes.length||(c.attributes=[]),c.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 2:{c.startTimeUnixNano=n.fixed64();break}case 3:{c.timeUnixNano=n.fixed64();break}case 4:{c.count=n.fixed64();break}case 5:{c.sum=n.double();break}case 6:{c.quantileValues&&c.quantileValues.length||(c.quantileValues=[]),c.quantileValues.push(_.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(n,n.uint32()));break}case 8:{c.flags=n.uint32();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var r=0;r<n.attributes.length;++r){var l=_.opentelemetry.proto.common.v1.KeyValue.verify(n.attributes[r]);if(l)return"attributes."+l}}if(n.startTimeUnixNano!=null&&n.hasOwnProperty("startTimeUnixNano")&&!T.isInteger(n.startTimeUnixNano)&&!(n.startTimeUnixNano&&T.isInteger(n.startTimeUnixNano.low)&&T.isInteger(n.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&!T.isInteger(n.timeUnixNano)&&!(n.timeUnixNano&&T.isInteger(n.timeUnixNano.low)&&T.isInteger(n.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(n.count!=null&&n.hasOwnProperty("count")&&!T.isInteger(n.count)&&!(n.count&&T.isInteger(n.count.low)&&T.isInteger(n.count.high)))return"count: integer|Long expected";if(n.sum!=null&&n.hasOwnProperty("sum")&&typeof n.sum!="number")return"sum: number expected";if(n.quantileValues!=null&&n.hasOwnProperty("quantileValues")){if(!Array.isArray(n.quantileValues))return"quantileValues: array expected";for(var r=0;r<n.quantileValues.length;++r){var l=_.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(n.quantileValues[r]);if(l)return"quantileValues."+l}}return n.flags!=null&&n.hasOwnProperty("flags")&&!T.isInteger(n.flags)?"flags: integer expected":null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.metrics.v1.SummaryDataPoint)return n;var r=new _.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(n.attributes){if(!Array.isArray(n.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");r.attributes=[];for(var l=0;l<n.attributes.length;++l){if(typeof n.attributes[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");r.attributes[l]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(n.attributes[l])}}if(n.startTimeUnixNano!=null&&(T.Long?(r.startTimeUnixNano=T.Long.fromValue(n.startTimeUnixNano)).unsigned=!1:typeof n.startTimeUnixNano=="string"?r.startTimeUnixNano=parseInt(n.startTimeUnixNano,10):typeof n.startTimeUnixNano=="number"?r.startTimeUnixNano=n.startTimeUnixNano:typeof n.startTimeUnixNano=="object"&&(r.startTimeUnixNano=new T.LongBits(n.startTimeUnixNano.low>>>0,n.startTimeUnixNano.high>>>0).toNumber())),n.timeUnixNano!=null&&(T.Long?(r.timeUnixNano=T.Long.fromValue(n.timeUnixNano)).unsigned=!1:typeof n.timeUnixNano=="string"?r.timeUnixNano=parseInt(n.timeUnixNano,10):typeof n.timeUnixNano=="number"?r.timeUnixNano=n.timeUnixNano:typeof n.timeUnixNano=="object"&&(r.timeUnixNano=new T.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber())),n.count!=null&&(T.Long?(r.count=T.Long.fromValue(n.count)).unsigned=!1:typeof n.count=="string"?r.count=parseInt(n.count,10):typeof n.count=="number"?r.count=n.count:typeof n.count=="object"&&(r.count=new T.LongBits(n.count.low>>>0,n.count.high>>>0).toNumber())),n.sum!=null&&(r.sum=Number(n.sum)),n.quantileValues){if(!Array.isArray(n.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");r.quantileValues=[];for(var l=0;l<n.quantileValues.length;++l){if(typeof n.quantileValues[l]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");r.quantileValues[l]=_.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(n.quantileValues[l])}}return n.flags!=null&&(r.flags=n.flags>>>0),r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.quantileValues=[],l.attributes=[]),r.defaults){if(T.Long){var c=new T.Long(0,0,!1);l.startTimeUnixNano=r.longs===String?c.toString():r.longs===Number?c.toNumber():c}else l.startTimeUnixNano=r.longs===String?"0":0;if(T.Long){var c=new T.Long(0,0,!1);l.timeUnixNano=r.longs===String?c.toString():r.longs===Number?c.toNumber():c}else l.timeUnixNano=r.longs===String?"0":0;if(T.Long){var c=new T.Long(0,0,!1);l.count=r.longs===String?c.toString():r.longs===Number?c.toNumber():c}else l.count=r.longs===String?"0":0;l.sum=0,l.flags=0}if(n.startTimeUnixNano!=null&&n.hasOwnProperty("startTimeUnixNano")&&(typeof n.startTimeUnixNano=="number"?l.startTimeUnixNano=r.longs===String?String(n.startTimeUnixNano):n.startTimeUnixNano:l.startTimeUnixNano=r.longs===String?T.Long.prototype.toString.call(n.startTimeUnixNano):r.longs===Number?new T.LongBits(n.startTimeUnixNano.low>>>0,n.startTimeUnixNano.high>>>0).toNumber():n.startTimeUnixNano),n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&(typeof n.timeUnixNano=="number"?l.timeUnixNano=r.longs===String?String(n.timeUnixNano):n.timeUnixNano:l.timeUnixNano=r.longs===String?T.Long.prototype.toString.call(n.timeUnixNano):r.longs===Number?new T.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber():n.timeUnixNano),n.count!=null&&n.hasOwnProperty("count")&&(typeof n.count=="number"?l.count=r.longs===String?String(n.count):n.count:l.count=r.longs===String?T.Long.prototype.toString.call(n.count):r.longs===Number?new T.LongBits(n.count.low>>>0,n.count.high>>>0).toNumber():n.count),n.sum!=null&&n.hasOwnProperty("sum")&&(l.sum=r.json&&!isFinite(n.sum)?String(n.sum):n.sum),n.quantileValues&&n.quantileValues.length){l.quantileValues=[];for(var u=0;u<n.quantileValues.length;++u)l.quantileValues[u]=_.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(n.quantileValues[u],r)}if(n.attributes&&n.attributes.length){l.attributes=[];for(var u=0;u<n.attributes.length;++u)l.attributes[u]=_.opentelemetry.proto.common.v1.KeyValue.toObject(n.attributes[u],r)}return n.flags!=null&&n.hasOwnProperty("flags")&&(l.flags=n.flags),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},a.ValueAtQuantile=function(){function s(n){if(n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}return s.prototype.quantile=null,s.prototype.value=null,s.create=function(r){return new s(r)},s.encode=function(r,l){return l||(l=ne.create()),r.quantile!=null&&Object.hasOwnProperty.call(r,"quantile")&&l.uint32(9).double(r.quantile),r.value!=null&&Object.hasOwnProperty.call(r,"value")&&l.uint32(17).double(r.value),l},s.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},s.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;r.pos<c;){var E=r.uint32();switch(E>>>3){case 1:{u.quantile=r.double();break}case 2:{u.value=r.double();break}default:r.skipType(E&7);break}}return u},s.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},s.verify=function(r){return typeof r!="object"||r===null?"object expected":r.quantile!=null&&r.hasOwnProperty("quantile")&&typeof r.quantile!="number"?"quantile: number expected":r.value!=null&&r.hasOwnProperty("value")&&typeof r.value!="number"?"value: number expected":null},s.fromObject=function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return r;var l=new _.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return r.quantile!=null&&(l.quantile=Number(r.quantile)),r.value!=null&&(l.value=Number(r.value)),l},s.toObject=function(r,l){l||(l={});var c={};return l.defaults&&(c.quantile=0,c.value=0),r.quantile!=null&&r.hasOwnProperty("quantile")&&(c.quantile=l.json&&!isFinite(r.quantile)?String(r.quantile):r.quantile),r.value!=null&&r.hasOwnProperty("value")&&(c.value=l.json&&!isFinite(r.value)?String(r.value):r.value),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},s.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},s}(),a}(),i.Exemplar=function(){function a(n){if(this.filteredAttributes=[],n)for(var r=Object.keys(n),l=0;l<r.length;++l)n[r[l]]!=null&&(this[r[l]]=n[r[l]])}a.prototype.filteredAttributes=T.emptyArray,a.prototype.timeUnixNano=null,a.prototype.asDouble=null,a.prototype.asInt=null,a.prototype.spanId=null,a.prototype.traceId=null;var s;return Object.defineProperty(a.prototype,"value",{get:T.oneOfGetter(s=["asDouble","asInt"]),set:T.oneOfSetter(s)}),a.create=function(r){return new a(r)},a.encode=function(r,l){if(l||(l=ne.create()),r.timeUnixNano!=null&&Object.hasOwnProperty.call(r,"timeUnixNano")&&l.uint32(17).fixed64(r.timeUnixNano),r.asDouble!=null&&Object.hasOwnProperty.call(r,"asDouble")&&l.uint32(25).double(r.asDouble),r.spanId!=null&&Object.hasOwnProperty.call(r,"spanId")&&l.uint32(34).bytes(r.spanId),r.traceId!=null&&Object.hasOwnProperty.call(r,"traceId")&&l.uint32(42).bytes(r.traceId),r.asInt!=null&&Object.hasOwnProperty.call(r,"asInt")&&l.uint32(49).sfixed64(r.asInt),r.filteredAttributes!=null&&r.filteredAttributes.length)for(var c=0;c<r.filteredAttributes.length;++c)_.opentelemetry.proto.common.v1.KeyValue.encode(r.filteredAttributes[c],l.uint32(58).fork()).ldelim();return l},a.encodeDelimited=function(r,l){return this.encode(r,l).ldelim()},a.decode=function(r,l){r instanceof h||(r=h.create(r));for(var c=l===void 0?r.len:r.pos+l,u=new _.opentelemetry.proto.metrics.v1.Exemplar;r.pos<c;){var E=r.uint32();switch(E>>>3){case 7:{u.filteredAttributes&&u.filteredAttributes.length||(u.filteredAttributes=[]),u.filteredAttributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(r,r.uint32()));break}case 2:{u.timeUnixNano=r.fixed64();break}case 3:{u.asDouble=r.double();break}case 6:{u.asInt=r.sfixed64();break}case 4:{u.spanId=r.bytes();break}case 5:{u.traceId=r.bytes();break}default:r.skipType(E&7);break}}return u},a.decodeDelimited=function(r){return r instanceof h||(r=new h(r)),this.decode(r,r.uint32())},a.verify=function(r){if(typeof r!="object"||r===null)return"object expected";var l={};if(r.filteredAttributes!=null&&r.hasOwnProperty("filteredAttributes")){if(!Array.isArray(r.filteredAttributes))return"filteredAttributes: array expected";for(var c=0;c<r.filteredAttributes.length;++c){var u=_.opentelemetry.proto.common.v1.KeyValue.verify(r.filteredAttributes[c]);if(u)return"filteredAttributes."+u}}if(r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&!T.isInteger(r.timeUnixNano)&&!(r.timeUnixNano&&T.isInteger(r.timeUnixNano.low)&&T.isInteger(r.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(r.asDouble!=null&&r.hasOwnProperty("asDouble")&&(l.value=1,typeof r.asDouble!="number"))return"asDouble: number expected";if(r.asInt!=null&&r.hasOwnProperty("asInt")){if(l.value===1)return"value: multiple values";if(l.value=1,!T.isInteger(r.asInt)&&!(r.asInt&&T.isInteger(r.asInt.low)&&T.isInteger(r.asInt.high)))return"asInt: integer|Long expected"}return r.spanId!=null&&r.hasOwnProperty("spanId")&&!(r.spanId&&typeof r.spanId.length=="number"||T.isString(r.spanId))?"spanId: buffer expected":r.traceId!=null&&r.hasOwnProperty("traceId")&&!(r.traceId&&typeof r.traceId.length=="number"||T.isString(r.traceId))?"traceId: buffer expected":null},a.fromObject=function(r){if(r instanceof _.opentelemetry.proto.metrics.v1.Exemplar)return r;var l=new _.opentelemetry.proto.metrics.v1.Exemplar;if(r.filteredAttributes){if(!Array.isArray(r.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");l.filteredAttributes=[];for(var c=0;c<r.filteredAttributes.length;++c){if(typeof r.filteredAttributes[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");l.filteredAttributes[c]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(r.filteredAttributes[c])}}return r.timeUnixNano!=null&&(T.Long?(l.timeUnixNano=T.Long.fromValue(r.timeUnixNano)).unsigned=!1:typeof r.timeUnixNano=="string"?l.timeUnixNano=parseInt(r.timeUnixNano,10):typeof r.timeUnixNano=="number"?l.timeUnixNano=r.timeUnixNano:typeof r.timeUnixNano=="object"&&(l.timeUnixNano=new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber())),r.asDouble!=null&&(l.asDouble=Number(r.asDouble)),r.asInt!=null&&(T.Long?(l.asInt=T.Long.fromValue(r.asInt)).unsigned=!1:typeof r.asInt=="string"?l.asInt=parseInt(r.asInt,10):typeof r.asInt=="number"?l.asInt=r.asInt:typeof r.asInt=="object"&&(l.asInt=new T.LongBits(r.asInt.low>>>0,r.asInt.high>>>0).toNumber())),r.spanId!=null&&(typeof r.spanId=="string"?T.base64.decode(r.spanId,l.spanId=T.newBuffer(T.base64.length(r.spanId)),0):r.spanId.length>=0&&(l.spanId=r.spanId)),r.traceId!=null&&(typeof r.traceId=="string"?T.base64.decode(r.traceId,l.traceId=T.newBuffer(T.base64.length(r.traceId)),0):r.traceId.length>=0&&(l.traceId=r.traceId)),l},a.toObject=function(r,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.filteredAttributes=[]),l.defaults){if(T.Long){var u=new T.Long(0,0,!1);c.timeUnixNano=l.longs===String?u.toString():l.longs===Number?u.toNumber():u}else c.timeUnixNano=l.longs===String?"0":0;l.bytes===String?c.spanId="":(c.spanId=[],l.bytes!==Array&&(c.spanId=T.newBuffer(c.spanId))),l.bytes===String?c.traceId="":(c.traceId=[],l.bytes!==Array&&(c.traceId=T.newBuffer(c.traceId)))}if(r.timeUnixNano!=null&&r.hasOwnProperty("timeUnixNano")&&(typeof r.timeUnixNano=="number"?c.timeUnixNano=l.longs===String?String(r.timeUnixNano):r.timeUnixNano:c.timeUnixNano=l.longs===String?T.Long.prototype.toString.call(r.timeUnixNano):l.longs===Number?new T.LongBits(r.timeUnixNano.low>>>0,r.timeUnixNano.high>>>0).toNumber():r.timeUnixNano),r.asDouble!=null&&r.hasOwnProperty("asDouble")&&(c.asDouble=l.json&&!isFinite(r.asDouble)?String(r.asDouble):r.asDouble,l.oneofs&&(c.value="asDouble")),r.spanId!=null&&r.hasOwnProperty("spanId")&&(c.spanId=l.bytes===String?T.base64.encode(r.spanId,0,r.spanId.length):l.bytes===Array?Array.prototype.slice.call(r.spanId):r.spanId),r.traceId!=null&&r.hasOwnProperty("traceId")&&(c.traceId=l.bytes===String?T.base64.encode(r.traceId,0,r.traceId.length):l.bytes===Array?Array.prototype.slice.call(r.traceId):r.traceId),r.asInt!=null&&r.hasOwnProperty("asInt")&&(typeof r.asInt=="number"?c.asInt=l.longs===String?String(r.asInt):r.asInt:c.asInt=l.longs===String?T.Long.prototype.toString.call(r.asInt):l.longs===Number?new T.LongBits(r.asInt.low>>>0,r.asInt.high>>>0).toNumber():r.asInt,l.oneofs&&(c.value="asInt")),r.filteredAttributes&&r.filteredAttributes.length){c.filteredAttributes=[];for(var E=0;E<r.filteredAttributes.length;++E)c.filteredAttributes[E]=_.opentelemetry.proto.common.v1.KeyValue.toObject(r.filteredAttributes[E],l)}return c},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(r){return r===void 0&&(r="type.googleapis.com"),r+"/opentelemetry.proto.metrics.v1.Exemplar"},a}(),i}(),t}(),e.logs=function(){var t={};return t.v1=function(){var i={};return i.LogsData=function(){function a(s){if(this.resourceLogs=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.resourceLogs=T.emptyArray,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.resourceLogs!=null&&n.resourceLogs.length)for(var l=0;l<n.resourceLogs.length;++l)_.opentelemetry.proto.logs.v1.ResourceLogs.encode(n.resourceLogs[l],r.uint32(10).fork()).ldelim();return r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.logs.v1.LogsData;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.resourceLogs&&c.resourceLogs.length||(c.resourceLogs=[]),c.resourceLogs.push(_.opentelemetry.proto.logs.v1.ResourceLogs.decode(n,n.uint32()));break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.resourceLogs!=null&&n.hasOwnProperty("resourceLogs")){if(!Array.isArray(n.resourceLogs))return"resourceLogs: array expected";for(var r=0;r<n.resourceLogs.length;++r){var l=_.opentelemetry.proto.logs.v1.ResourceLogs.verify(n.resourceLogs[r]);if(l)return"resourceLogs."+l}}return null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.logs.v1.LogsData)return n;var r=new _.opentelemetry.proto.logs.v1.LogsData;if(n.resourceLogs){if(!Array.isArray(n.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");r.resourceLogs=[];for(var l=0;l<n.resourceLogs.length;++l){if(typeof n.resourceLogs[l]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");r.resourceLogs[l]=_.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(n.resourceLogs[l])}}return r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.resourceLogs=[]),n.resourceLogs&&n.resourceLogs.length){l.resourceLogs=[];for(var c=0;c<n.resourceLogs.length;++c)l.resourceLogs[c]=_.opentelemetry.proto.logs.v1.ResourceLogs.toObject(n.resourceLogs[c],r)}return l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.logs.v1.LogsData"},a}(),i.ResourceLogs=function(){function a(s){if(this.scopeLogs=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.resource=null,a.prototype.scopeLogs=T.emptyArray,a.prototype.schemaUrl=null,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.resource!=null&&Object.hasOwnProperty.call(n,"resource")&&_.opentelemetry.proto.resource.v1.Resource.encode(n.resource,r.uint32(10).fork()).ldelim(),n.scopeLogs!=null&&n.scopeLogs.length)for(var l=0;l<n.scopeLogs.length;++l)_.opentelemetry.proto.logs.v1.ScopeLogs.encode(n.scopeLogs[l],r.uint32(18).fork()).ldelim();return n.schemaUrl!=null&&Object.hasOwnProperty.call(n,"schemaUrl")&&r.uint32(26).string(n.schemaUrl),r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.logs.v1.ResourceLogs;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.resource=_.opentelemetry.proto.resource.v1.Resource.decode(n,n.uint32());break}case 2:{c.scopeLogs&&c.scopeLogs.length||(c.scopeLogs=[]),c.scopeLogs.push(_.opentelemetry.proto.logs.v1.ScopeLogs.decode(n,n.uint32()));break}case 3:{c.schemaUrl=n.string();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.resource!=null&&n.hasOwnProperty("resource")){var r=_.opentelemetry.proto.resource.v1.Resource.verify(n.resource);if(r)return"resource."+r}if(n.scopeLogs!=null&&n.hasOwnProperty("scopeLogs")){if(!Array.isArray(n.scopeLogs))return"scopeLogs: array expected";for(var l=0;l<n.scopeLogs.length;++l){var r=_.opentelemetry.proto.logs.v1.ScopeLogs.verify(n.scopeLogs[l]);if(r)return"scopeLogs."+r}}return n.schemaUrl!=null&&n.hasOwnProperty("schemaUrl")&&!T.isString(n.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.logs.v1.ResourceLogs)return n;var r=new _.opentelemetry.proto.logs.v1.ResourceLogs;if(n.resource!=null){if(typeof n.resource!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");r.resource=_.opentelemetry.proto.resource.v1.Resource.fromObject(n.resource)}if(n.scopeLogs){if(!Array.isArray(n.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");r.scopeLogs=[];for(var l=0;l<n.scopeLogs.length;++l){if(typeof n.scopeLogs[l]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");r.scopeLogs[l]=_.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(n.scopeLogs[l])}}return n.schemaUrl!=null&&(r.schemaUrl=String(n.schemaUrl)),r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.scopeLogs=[]),r.defaults&&(l.resource=null,l.schemaUrl=""),n.resource!=null&&n.hasOwnProperty("resource")&&(l.resource=_.opentelemetry.proto.resource.v1.Resource.toObject(n.resource,r)),n.scopeLogs&&n.scopeLogs.length){l.scopeLogs=[];for(var c=0;c<n.scopeLogs.length;++c)l.scopeLogs[c]=_.opentelemetry.proto.logs.v1.ScopeLogs.toObject(n.scopeLogs[c],r)}return n.schemaUrl!=null&&n.hasOwnProperty("schemaUrl")&&(l.schemaUrl=n.schemaUrl),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.logs.v1.ResourceLogs"},a}(),i.ScopeLogs=function(){function a(s){if(this.logRecords=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.scope=null,a.prototype.logRecords=T.emptyArray,a.prototype.schemaUrl=null,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.scope!=null&&Object.hasOwnProperty.call(n,"scope")&&_.opentelemetry.proto.common.v1.InstrumentationScope.encode(n.scope,r.uint32(10).fork()).ldelim(),n.logRecords!=null&&n.logRecords.length)for(var l=0;l<n.logRecords.length;++l)_.opentelemetry.proto.logs.v1.LogRecord.encode(n.logRecords[l],r.uint32(18).fork()).ldelim();return n.schemaUrl!=null&&Object.hasOwnProperty.call(n,"schemaUrl")&&r.uint32(26).string(n.schemaUrl),r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.logs.v1.ScopeLogs;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.decode(n,n.uint32());break}case 2:{c.logRecords&&c.logRecords.length||(c.logRecords=[]),c.logRecords.push(_.opentelemetry.proto.logs.v1.LogRecord.decode(n,n.uint32()));break}case 3:{c.schemaUrl=n.string();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.scope!=null&&n.hasOwnProperty("scope")){var r=_.opentelemetry.proto.common.v1.InstrumentationScope.verify(n.scope);if(r)return"scope."+r}if(n.logRecords!=null&&n.hasOwnProperty("logRecords")){if(!Array.isArray(n.logRecords))return"logRecords: array expected";for(var l=0;l<n.logRecords.length;++l){var r=_.opentelemetry.proto.logs.v1.LogRecord.verify(n.logRecords[l]);if(r)return"logRecords."+r}}return n.schemaUrl!=null&&n.hasOwnProperty("schemaUrl")&&!T.isString(n.schemaUrl)?"schemaUrl: string expected":null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.logs.v1.ScopeLogs)return n;var r=new _.opentelemetry.proto.logs.v1.ScopeLogs;if(n.scope!=null){if(typeof n.scope!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");r.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(n.scope)}if(n.logRecords){if(!Array.isArray(n.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");r.logRecords=[];for(var l=0;l<n.logRecords.length;++l){if(typeof n.logRecords[l]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");r.logRecords[l]=_.opentelemetry.proto.logs.v1.LogRecord.fromObject(n.logRecords[l])}}return n.schemaUrl!=null&&(r.schemaUrl=String(n.schemaUrl)),r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.logRecords=[]),r.defaults&&(l.scope=null,l.schemaUrl=""),n.scope!=null&&n.hasOwnProperty("scope")&&(l.scope=_.opentelemetry.proto.common.v1.InstrumentationScope.toObject(n.scope,r)),n.logRecords&&n.logRecords.length){l.logRecords=[];for(var c=0;c<n.logRecords.length;++c)l.logRecords[c]=_.opentelemetry.proto.logs.v1.LogRecord.toObject(n.logRecords[c],r)}return n.schemaUrl!=null&&n.hasOwnProperty("schemaUrl")&&(l.schemaUrl=n.schemaUrl),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.logs.v1.ScopeLogs"},a}(),i.SeverityNumber=function(){var a={},s=Object.create(a);return s[a[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,s[a[1]="SEVERITY_NUMBER_TRACE"]=1,s[a[2]="SEVERITY_NUMBER_TRACE2"]=2,s[a[3]="SEVERITY_NUMBER_TRACE3"]=3,s[a[4]="SEVERITY_NUMBER_TRACE4"]=4,s[a[5]="SEVERITY_NUMBER_DEBUG"]=5,s[a[6]="SEVERITY_NUMBER_DEBUG2"]=6,s[a[7]="SEVERITY_NUMBER_DEBUG3"]=7,s[a[8]="SEVERITY_NUMBER_DEBUG4"]=8,s[a[9]="SEVERITY_NUMBER_INFO"]=9,s[a[10]="SEVERITY_NUMBER_INFO2"]=10,s[a[11]="SEVERITY_NUMBER_INFO3"]=11,s[a[12]="SEVERITY_NUMBER_INFO4"]=12,s[a[13]="SEVERITY_NUMBER_WARN"]=13,s[a[14]="SEVERITY_NUMBER_WARN2"]=14,s[a[15]="SEVERITY_NUMBER_WARN3"]=15,s[a[16]="SEVERITY_NUMBER_WARN4"]=16,s[a[17]="SEVERITY_NUMBER_ERROR"]=17,s[a[18]="SEVERITY_NUMBER_ERROR2"]=18,s[a[19]="SEVERITY_NUMBER_ERROR3"]=19,s[a[20]="SEVERITY_NUMBER_ERROR4"]=20,s[a[21]="SEVERITY_NUMBER_FATAL"]=21,s[a[22]="SEVERITY_NUMBER_FATAL2"]=22,s[a[23]="SEVERITY_NUMBER_FATAL3"]=23,s[a[24]="SEVERITY_NUMBER_FATAL4"]=24,s}(),i.LogRecordFlags=function(){var a={},s=Object.create(a);return s[a[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,s[a[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,s}(),i.LogRecord=function(){function a(s){if(this.attributes=[],s)for(var n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]!=null&&(this[n[r]]=s[n[r]])}return a.prototype.timeUnixNano=null,a.prototype.observedTimeUnixNano=null,a.prototype.severityNumber=null,a.prototype.severityText=null,a.prototype.body=null,a.prototype.attributes=T.emptyArray,a.prototype.droppedAttributesCount=null,a.prototype.flags=null,a.prototype.traceId=null,a.prototype.spanId=null,a.create=function(n){return new a(n)},a.encode=function(n,r){if(r||(r=ne.create()),n.timeUnixNano!=null&&Object.hasOwnProperty.call(n,"timeUnixNano")&&r.uint32(9).fixed64(n.timeUnixNano),n.severityNumber!=null&&Object.hasOwnProperty.call(n,"severityNumber")&&r.uint32(16).int32(n.severityNumber),n.severityText!=null&&Object.hasOwnProperty.call(n,"severityText")&&r.uint32(26).string(n.severityText),n.body!=null&&Object.hasOwnProperty.call(n,"body")&&_.opentelemetry.proto.common.v1.AnyValue.encode(n.body,r.uint32(42).fork()).ldelim(),n.attributes!=null&&n.attributes.length)for(var l=0;l<n.attributes.length;++l)_.opentelemetry.proto.common.v1.KeyValue.encode(n.attributes[l],r.uint32(50).fork()).ldelim();return n.droppedAttributesCount!=null&&Object.hasOwnProperty.call(n,"droppedAttributesCount")&&r.uint32(56).uint32(n.droppedAttributesCount),n.flags!=null&&Object.hasOwnProperty.call(n,"flags")&&r.uint32(69).fixed32(n.flags),n.traceId!=null&&Object.hasOwnProperty.call(n,"traceId")&&r.uint32(74).bytes(n.traceId),n.spanId!=null&&Object.hasOwnProperty.call(n,"spanId")&&r.uint32(82).bytes(n.spanId),n.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(n,"observedTimeUnixNano")&&r.uint32(89).fixed64(n.observedTimeUnixNano),r},a.encodeDelimited=function(n,r){return this.encode(n,r).ldelim()},a.decode=function(n,r){n instanceof h||(n=h.create(n));for(var l=r===void 0?n.len:n.pos+r,c=new _.opentelemetry.proto.logs.v1.LogRecord;n.pos<l;){var u=n.uint32();switch(u>>>3){case 1:{c.timeUnixNano=n.fixed64();break}case 11:{c.observedTimeUnixNano=n.fixed64();break}case 2:{c.severityNumber=n.int32();break}case 3:{c.severityText=n.string();break}case 5:{c.body=_.opentelemetry.proto.common.v1.AnyValue.decode(n,n.uint32());break}case 6:{c.attributes&&c.attributes.length||(c.attributes=[]),c.attributes.push(_.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 7:{c.droppedAttributesCount=n.uint32();break}case 8:{c.flags=n.fixed32();break}case 9:{c.traceId=n.bytes();break}case 10:{c.spanId=n.bytes();break}default:n.skipType(u&7);break}}return c},a.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&!T.isInteger(n.timeUnixNano)&&!(n.timeUnixNano&&T.isInteger(n.timeUnixNano.low)&&T.isInteger(n.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(n.observedTimeUnixNano!=null&&n.hasOwnProperty("observedTimeUnixNano")&&!T.isInteger(n.observedTimeUnixNano)&&!(n.observedTimeUnixNano&&T.isInteger(n.observedTimeUnixNano.low)&&T.isInteger(n.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected";if(n.severityNumber!=null&&n.hasOwnProperty("severityNumber"))switch(n.severityNumber){default:return"severityNumber: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:break}if(n.severityText!=null&&n.hasOwnProperty("severityText")&&!T.isString(n.severityText))return"severityText: string expected";if(n.body!=null&&n.hasOwnProperty("body")){var r=_.opentelemetry.proto.common.v1.AnyValue.verify(n.body);if(r)return"body."+r}if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var l=0;l<n.attributes.length;++l){var r=_.opentelemetry.proto.common.v1.KeyValue.verify(n.attributes[l]);if(r)return"attributes."+r}}return n.droppedAttributesCount!=null&&n.hasOwnProperty("droppedAttributesCount")&&!T.isInteger(n.droppedAttributesCount)?"droppedAttributesCount: integer expected":n.flags!=null&&n.hasOwnProperty("flags")&&!T.isInteger(n.flags)?"flags: integer expected":n.traceId!=null&&n.hasOwnProperty("traceId")&&!(n.traceId&&typeof n.traceId.length=="number"||T.isString(n.traceId))?"traceId: buffer expected":n.spanId!=null&&n.hasOwnProperty("spanId")&&!(n.spanId&&typeof n.spanId.length=="number"||T.isString(n.spanId))?"spanId: buffer expected":null},a.fromObject=function(n){if(n instanceof _.opentelemetry.proto.logs.v1.LogRecord)return n;var r=new _.opentelemetry.proto.logs.v1.LogRecord;switch(n.timeUnixNano!=null&&(T.Long?(r.timeUnixNano=T.Long.fromValue(n.timeUnixNano)).unsigned=!1:typeof n.timeUnixNano=="string"?r.timeUnixNano=parseInt(n.timeUnixNano,10):typeof n.timeUnixNano=="number"?r.timeUnixNano=n.timeUnixNano:typeof n.timeUnixNano=="object"&&(r.timeUnixNano=new T.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber())),n.observedTimeUnixNano!=null&&(T.Long?(r.observedTimeUnixNano=T.Long.fromValue(n.observedTimeUnixNano)).unsigned=!1:typeof n.observedTimeUnixNano=="string"?r.observedTimeUnixNano=parseInt(n.observedTimeUnixNano,10):typeof n.observedTimeUnixNano=="number"?r.observedTimeUnixNano=n.observedTimeUnixNano:typeof n.observedTimeUnixNano=="object"&&(r.observedTimeUnixNano=new T.LongBits(n.observedTimeUnixNano.low>>>0,n.observedTimeUnixNano.high>>>0).toNumber())),n.severityNumber){default:if(typeof n.severityNumber=="number"){r.severityNumber=n.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:r.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:r.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:r.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:r.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:r.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:r.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:r.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:r.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:r.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:r.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:r.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:r.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:r.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:r.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:r.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:r.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:r.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:r.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:r.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:r.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:r.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:r.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:r.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:r.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:r.severityNumber=24;break}if(n.severityText!=null&&(r.severityText=String(n.severityText)),n.body!=null){if(typeof n.body!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");r.body=_.opentelemetry.proto.common.v1.AnyValue.fromObject(n.body)}if(n.attributes){if(!Array.isArray(n.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");r.attributes=[];for(var l=0;l<n.attributes.length;++l){if(typeof n.attributes[l]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");r.attributes[l]=_.opentelemetry.proto.common.v1.KeyValue.fromObject(n.attributes[l])}}return n.droppedAttributesCount!=null&&(r.droppedAttributesCount=n.droppedAttributesCount>>>0),n.flags!=null&&(r.flags=n.flags>>>0),n.traceId!=null&&(typeof n.traceId=="string"?T.base64.decode(n.traceId,r.traceId=T.newBuffer(T.base64.length(n.traceId)),0):n.traceId.length>=0&&(r.traceId=n.traceId)),n.spanId!=null&&(typeof n.spanId=="string"?T.base64.decode(n.spanId,r.spanId=T.newBuffer(T.base64.length(n.spanId)),0):n.spanId.length>=0&&(r.spanId=n.spanId)),r},a.toObject=function(n,r){r||(r={});var l={};if((r.arrays||r.defaults)&&(l.attributes=[]),r.defaults){if(T.Long){var c=new T.Long(0,0,!1);l.timeUnixNano=r.longs===String?c.toString():r.longs===Number?c.toNumber():c}else l.timeUnixNano=r.longs===String?"0":0;if(l.severityNumber=r.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,l.severityText="",l.body=null,l.droppedAttributesCount=0,l.flags=0,r.bytes===String?l.traceId="":(l.traceId=[],r.bytes!==Array&&(l.traceId=T.newBuffer(l.traceId))),r.bytes===String?l.spanId="":(l.spanId=[],r.bytes!==Array&&(l.spanId=T.newBuffer(l.spanId))),T.Long){var c=new T.Long(0,0,!1);l.observedTimeUnixNano=r.longs===String?c.toString():r.longs===Number?c.toNumber():c}else l.observedTimeUnixNano=r.longs===String?"0":0}if(n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&(typeof n.timeUnixNano=="number"?l.timeUnixNano=r.longs===String?String(n.timeUnixNano):n.timeUnixNano:l.timeUnixNano=r.longs===String?T.Long.prototype.toString.call(n.timeUnixNano):r.longs===Number?new T.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber():n.timeUnixNano),n.severityNumber!=null&&n.hasOwnProperty("severityNumber")&&(l.severityNumber=r.enums===String?_.opentelemetry.proto.logs.v1.SeverityNumber[n.severityNumber]===void 0?n.severityNumber:_.opentelemetry.proto.logs.v1.SeverityNumber[n.severityNumber]:n.severityNumber),n.severityText!=null&&n.hasOwnProperty("severityText")&&(l.severityText=n.severityText),n.body!=null&&n.hasOwnProperty("body")&&(l.body=_.opentelemetry.proto.common.v1.AnyValue.toObject(n.body,r)),n.attributes&&n.attributes.length){l.attributes=[];for(var u=0;u<n.attributes.length;++u)l.attributes[u]=_.opentelemetry.proto.common.v1.KeyValue.toObject(n.attributes[u],r)}return n.droppedAttributesCount!=null&&n.hasOwnProperty("droppedAttributesCount")&&(l.droppedAttributesCount=n.droppedAttributesCount),n.flags!=null&&n.hasOwnProperty("flags")&&(l.flags=n.flags),n.traceId!=null&&n.hasOwnProperty("traceId")&&(l.traceId=r.bytes===String?T.base64.encode(n.traceId,0,n.traceId.length):r.bytes===Array?Array.prototype.slice.call(n.traceId):n.traceId),n.spanId!=null&&n.hasOwnProperty("spanId")&&(l.spanId=r.bytes===String?T.base64.encode(n.spanId,0,n.spanId.length):r.bytes===Array?Array.prototype.slice.call(n.spanId):n.spanId),n.observedTimeUnixNano!=null&&n.hasOwnProperty("observedTimeUnixNano")&&(typeof n.observedTimeUnixNano=="number"?l.observedTimeUnixNano=r.longs===String?String(n.observedTimeUnixNano):n.observedTimeUnixNano:l.observedTimeUnixNano=r.longs===String?T.Long.prototype.toString.call(n.observedTimeUnixNano):r.longs===Number?new T.LongBits(n.observedTimeUnixNano.low>>>0,n.observedTimeUnixNano.high>>>0).toNumber():n.observedTimeUnixNano),l},a.prototype.toJSON=function(){return this.constructor.toObject(this,j.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.logs.v1.LogRecord"},a}(),i}(),t}(),e}(),o}();my.exports=_});var Ho,D4,x4,U4,b4,V4,w4,E_,Ny,__,My=S(()=>{Ho=Rn(Oy());r_();n_();o_();D4=Ho.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,x4=Ho.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,U4=Ho.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,b4=Ho.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,V4=Ho.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,w4=Ho.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,E_={serializeRequest:o=>{let e=Ea(o);return x4.encode(e).finish()},deserializeResponse:o=>D4.decode(o)},Ny={serializeRequest:o=>{let e=ua(o);return b4.encode(e).finish()},deserializeResponse:o=>U4.decode(o)},__={serializeRequest:o=>{let e=qn(o);return w4.encode(e).finish()},deserializeResponse:o=>V4.decode(o)}});var T_,Py,S_,Cy=S(()=>{r_();n_();o_();T_={serializeRequest:o=>{let e=qn(o,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:o=>{let e=new TextDecoder;return JSON.parse(e.decode(o))}},Py={serializeRequest:o=>{let e=ua(o,{useLongBits:!1});return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:o=>{let e=new TextDecoder;return JSON.parse(e.decode(o))}},S_={serializeRequest:o=>{let e=Ea(o,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:o=>{let e=new TextDecoder;return JSON.parse(e.decode(o))}}});var Lf={};ge(Lf,{ESpanKind:()=>QE,JsonLogsSerializer:()=>S_,JsonMetricsSerializer:()=>Py,JsonTraceSerializer:()=>T_,ProtobufLogsSerializer:()=>E_,ProtobufMetricsSerializer:()=>Ny,ProtobufTraceSerializer:()=>__,createExportLogsServiceRequest:()=>Ea,createExportMetricsServiceRequest:()=>ua,createExportTraceServiceRequest:()=>qn,encodeAsLongBits:()=>JE,encodeAsString:()=>_f,getOtlpEncoder:()=>Kn,hrTimeToNanos:()=>$E,toLongBits:()=>Ef});var zn=S(()=>{Rl();NI();r_();n_();o_();My();Cy()});function Ly(o){if(typeof o.url=="string")return o.url;let e=Z();return e.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT.length>0?Dr(e.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT):e.OTEL_EXPORTER_OTLP_ENDPOINT.length>0?yr(e.OTEL_EXPORTER_OTLP_ENDPOINT,gy):B4}var gy,B4,Iy=S(()=>{K();un();gy="v1/logs",B4=`http://localhost:4318/${gy}`});var yy,Dy=S(()=>{yy="0.53.0"});var G4,Ta,xy=S(()=>{K();un();zn();Iy();Dy();G4={"User-Agent":`OTel-OTLP-Exporter-JavaScript/${yy}`},Ta=class extends bt{constructor(e={}){super(Object.assign({timeoutMillis:Z().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT},e),S_,Object.assign(Object.assign(Object.assign(Object.assign({},Dt.parseKeyPairsIntoRecord(Z().OTEL_EXPORTER_OTLP_LOGS_HEADERS)),$t(e==null?void 0:e.headers)),G4),{"Content-Type":"application/json"}))}getDefaultUrl(e){return Ly(e)}}});var Uy=S(()=>{xy()});var by=S(()=>{Uy()});var Vy={};ge(Vy,{OTLPLogExporter:()=>Ta});var wy=S(()=>{by()});var Ae=A(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=Zt.DEFAULT_MAX_SEND_MESSAGE_LENGTH=Zt.Propagate=Zt.LogVerbosity=Zt.Status=void 0;var By;(function(o){o[o.OK=0]="OK",o[o.CANCELLED=1]="CANCELLED",o[o.UNKNOWN=2]="UNKNOWN",o[o.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",o[o.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",o[o.NOT_FOUND=5]="NOT_FOUND",o[o.ALREADY_EXISTS=6]="ALREADY_EXISTS",o[o.PERMISSION_DENIED=7]="PERMISSION_DENIED",o[o.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",o[o.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",o[o.ABORTED=10]="ABORTED",o[o.OUT_OF_RANGE=11]="OUT_OF_RANGE",o[o.UNIMPLEMENTED=12]="UNIMPLEMENTED",o[o.INTERNAL=13]="INTERNAL",o[o.UNAVAILABLE=14]="UNAVAILABLE",o[o.DATA_LOSS=15]="DATA_LOSS",o[o.UNAUTHENTICATED=16]="UNAUTHENTICATED"})(By||(Zt.Status=By={}));var Gy;(function(o){o[o.DEBUG=0]="DEBUG",o[o.INFO=1]="INFO",o[o.ERROR=2]="ERROR",o[o.NONE=3]="NONE"})(Gy||(Zt.LogVerbosity=Gy={}));var ky;(function(o){o[o.DEADLINE=1]="DEADLINE",o[o.CENSUS_STATS_CONTEXT=2]="CENSUS_STATS_CONTEXT",o[o.CENSUS_TRACING_CONTEXT=4]="CENSUS_TRACING_CONTEXT",o[o.CANCELLATION=8]="CANCELLATION",o[o.DEFAULTS=65535]="DEFAULTS"})(ky||(Zt.Propagate=ky={}));Zt.DEFAULT_MAX_SEND_MESSAGE_LENGTH=-1;Zt.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=4*1024*1024});var If=A((RMe,k4)=>{k4.exports={name:"@grpc/grpc-js",version:"1.10.9",description:"gRPC Library for Node - pure JS implementation",homepage:"https://grpc.io/",repository:"https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",main:"build/src/index.js",engines:{node:">=12.10.0"},keywords:[],author:{name:"Google Inc."},types:"build/src/index.d.ts",license:"Apache-2.0",devDependencies:{"@types/gulp":"^4.0.17","@types/gulp-mocha":"0.0.37","@types/lodash":"^4.14.202","@types/mocha":"^10.0.6","@types/ncp":"^2.0.8","@types/node":">=20.11.20","@types/pify":"^5.0.4","@types/semver":"^7.5.8","@typescript-eslint/eslint-plugin":"^7.1.0","@typescript-eslint/parser":"^7.1.0","@typescript-eslint/typescript-estree":"^7.1.0","clang-format":"^1.8.0",eslint:"^8.42.0","eslint-config-prettier":"^8.8.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.2.1",execa:"^2.0.3",gulp:"^4.0.2","gulp-mocha":"^6.0.0",lodash:"^4.17.21",madge:"^5.0.1","mocha-jenkins-reporter":"^0.4.1",ncp:"^2.0.0",pify:"^4.0.1",prettier:"^2.8.8",rimraf:"^3.0.2",semver:"^7.6.0","ts-node":"^10.9.2",typescript:"^5.3.3"},contributors:[{name:"Google Inc."}],scripts:{build:"npm run compile",clean:"rimraf ./build",compile:"tsc -p .",format:'clang-format -i -style="{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}" src/*.ts test/*.ts',lint:"eslint src/*.ts test/*.ts",prepare:"npm run generate-types && npm run compile",test:"gulp test",check:"npm run lint",fix:"eslint --fix src/*.ts test/*.ts",pretest:"npm run generate-types && npm run generate-test-types && npm run compile",posttest:"npm run check && madge -c ./build/src","generate-types":"proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs proto/ --include-dirs test/fixtures/ -O src/generated/ --grpcLib ../index channelz.proto","generate-test-types":"proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --include-dirs test/fixtures/ -O test/generated/ --grpcLib ../../src/index test_service.proto"},dependencies:{"@grpc/proto-loader":"^0.7.13","@js-sdsl/ordered-map":"^4.4.2"},files:["src/**/*.ts","build/src/**/*.{js,d.ts,js.map}","proto/*.proto","LICENSE","deps/envoy-api/envoy/api/v2/**/*.proto","deps/envoy-api/envoy/config/**/*.proto","deps/envoy-api/envoy/service/**/*.proto","deps/envoy-api/envoy/type/**/*.proto","deps/udpa/udpa/**/*.proto","deps/googleapis/google/api/*.proto","deps/googleapis/google/rpc/*.proto","deps/protoc-gen-validate/validate/**/*.proto"]}});var De=A(At=>{"use strict";var yf,Df,xf,Uf;Object.defineProperty(At,"__esModule",{value:!0});At.isTracerEnabled=At.trace=At.log=At.setLoggerVerbosity=At.setLogger=At.getLogger=void 0;var Xn=Ae(),H4=k("process"),Y4=If().version,F4={error:(o,...e)=>{console.error("E "+o,...e)},info:(o,...e)=>{console.error("I "+o,...e)},debug:(o,...e)=>{console.error("D "+o,...e)}},Yo=F4,Sa=Xn.LogVerbosity.ERROR,K4=(Df=(yf=process.env.GRPC_NODE_VERBOSITY)!==null&&yf!==void 0?yf:process.env.GRPC_VERBOSITY)!==null&&Df!==void 0?Df:"";switch(K4.toUpperCase()){case"DEBUG":Sa=Xn.LogVerbosity.DEBUG;break;case"INFO":Sa=Xn.LogVerbosity.INFO;break;case"ERROR":Sa=Xn.LogVerbosity.ERROR;break;case"NONE":Sa=Xn.LogVerbosity.NONE;break;default:}var q4=()=>Yo;At.getLogger=q4;var W4=o=>{Yo=o};At.setLogger=W4;var j4=o=>{Sa=o};At.setLoggerVerbosity=j4;var z4=(o,...e)=>{let t;if(o>=Sa){switch(o){case Xn.LogVerbosity.DEBUG:t=Yo.debug;break;case Xn.LogVerbosity.INFO:t=Yo.info;break;case Xn.LogVerbosity.ERROR:t=Yo.error;break}t||(t=Yo.error),t&&t.bind(Yo)(...e)}};At.log=z4;var X4=(Uf=(xf=process.env.GRPC_NODE_TRACE)!==null&&xf!==void 0?xf:process.env.GRPC_TRACE)!==null&&Uf!==void 0?Uf:"",bf=new Set,Hy=new Set;for(let o of X4.split(","))o.startsWith("-")?Hy.add(o.substring(1)):bf.add(o);var $4=bf.has("all");function J4(o,e,t){Yy(e)&&(0,At.log)(o,new Date().toISOString()+" | v"+Y4+" "+H4.pid+" | "+e+" | "+t)}At.trace=J4;function Yy(o){return!Hy.has(o)&&($4||bf.has(o))}At.isTracerEnabled=Yy});var p_=A(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.getErrorCode=pa.getErrorMessage=void 0;function Q4(o){return o instanceof Error?o.message:String(o)}pa.getErrorMessage=Q4;function Z4(o){return typeof o=="object"&&o!==null&&"code"in o&&typeof o.code=="number"?o.code:null}pa.getErrorCode=Z4});var ht=A(f_=>{"use strict";Object.defineProperty(f_,"__esModule",{value:!0});f_.Metadata=void 0;var e6=De(),t6=Ae(),r6=p_(),n6=/^[0-9a-z_.-]+$/,o6=/^[ -~]*$/;function i6(o){return n6.test(o)}function a6(o){return o6.test(o)}function Ky(o){return o.endsWith("-bin")}function s6(o){return!o.startsWith("grpc-")}function d_(o){return o.toLowerCase()}function Fy(o,e){if(!i6(o))throw new Error('Metadata key "'+o+'" contains illegal characters');if(e!=null)if(Ky(o)){if(!Buffer.isBuffer(e))throw new Error("keys that end with '-bin' must have Buffer values")}else{if(Buffer.isBuffer(e))throw new Error("keys that don't end with '-bin' must have String values");if(!a6(e))throw new Error('Metadata string value "'+e+'" contains illegal characters')}}var Vf=class o{constructor(e={}){this.internalRepr=new Map,this.options=e}set(e,t){e=d_(e),Fy(e,t),this.internalRepr.set(e,[t])}add(e,t){e=d_(e),Fy(e,t);let i=this.internalRepr.get(e);i===void 0?this.internalRepr.set(e,[t]):i.push(t)}remove(e){e=d_(e),this.internalRepr.delete(e)}get(e){return e=d_(e),this.internalRepr.get(e)||[]}getMap(){let e={};for(let[t,i]of this.internalRepr)if(i.length>0){let a=i[0];e[t]=Buffer.isBuffer(a)?Buffer.from(a):a}return e}clone(){let e=new o(this.options),t=e.internalRepr;for(let[i,a]of this.internalRepr){let s=a.map(n=>Buffer.isBuffer(n)?Buffer.from(n):n);t.set(i,s)}return e}merge(e){for(let[t,i]of e.internalRepr){let a=(this.internalRepr.get(t)||[]).concat(i);this.internalRepr.set(t,a)}}setOptions(e){this.options=e}getOptions(){return this.options}toHttp2Headers(){let e={};for(let[t,i]of this.internalRepr)e[t]=i.map(l6);return e}toJSON(){let e={};for(let[t,i]of this.internalRepr)e[t]=i;return e}static fromHttp2Headers(e){let t=new o;for(let i of Object.keys(e)){if(i.charAt(0)===":")continue;let a=e[i];try{Ky(i)?Array.isArray(a)?a.forEach(s=>{t.add(i,Buffer.from(s,"base64"))}):a!==void 0&&(s6(i)?a.split(",").forEach(s=>{t.add(i,Buffer.from(s.trim(),"base64"))}):t.add(i,Buffer.from(a,"base64"))):Array.isArray(a)?a.forEach(s=>{t.add(i,s)}):a!==void 0&&t.add(i,a)}catch(s){let n=`Failed to add metadata entry ${i}: ${a}. ${(0,r6.getErrorMessage)(s)}. For more information see https://github.com/grpc/grpc-node/issues/1173`;(0,e6.log)(t6.LogVerbosity.ERROR,n)}}return t}};f_.Metadata=Vf;var l6=o=>Buffer.isBuffer(o)?o.toString("base64"):o});var Hf=A(A_=>{"use strict";Object.defineProperty(A_,"__esModule",{value:!0});A_.CallCredentials=void 0;var kf=ht();function c6(o){return"getRequestHeaders"in o&&typeof o.getRequestHeaders=="function"}var da=class o{static createFromMetadataGenerator(e){return new Bf(e)}static createFromGoogleCredential(e){return o.createFromMetadataGenerator((t,i)=>{let a;c6(e)?a=e.getRequestHeaders(t.service_url):a=new Promise((s,n)=>{e.getRequestMetadata(t.service_url,(r,l)=>{if(r){n(r);return}if(!l){n(new Error("Headers not set by metadata plugin"));return}s(l)})}),a.then(s=>{let n=new kf.Metadata;for(let r of Object.keys(s))n.add(r,s[r]);i(null,n)},s=>{i(s)})})}static createEmpty(){return new Gf}};A_.CallCredentials=da;var wf=class o extends da{constructor(e){super(),this.creds=e}async generateMetadata(e){let t=new kf.Metadata,i=await Promise.all(this.creds.map(a=>a.generateMetadata(e)));for(let a of i)t.merge(a);return t}compose(e){return new o(this.creds.concat([e]))}_equals(e){return this===e?!0:e instanceof o?this.creds.every((t,i)=>t._equals(e.creds[i])):!1}},Bf=class o extends da{constructor(e){super(),this.metadataGenerator=e}generateMetadata(e){return new Promise((t,i)=>{this.metadataGenerator(e,(a,s)=>{s!==void 0?t(s):i(a)})})}compose(e){return new wf([this,e])}_equals(e){return this===e?!0:e instanceof o?this.metadataGenerator===e.metadataGenerator:!1}},Gf=class o extends da{generateMetadata(e){return Promise.resolve(new kf.Metadata)}compose(e){return e}_equals(e){return e instanceof o}}});var Ff=A(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.getDefaultRootsData=fa.CIPHER_SUITES=void 0;var u6=k("fs");fa.CIPHER_SUITES=process.env.GRPC_SSL_CIPHER_SUITES;var qy=process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH,Yf=null;function E6(){return qy?(Yf===null&&(Yf=u6.readFileSync(qy)),Yf):null}fa.getDefaultRootsData=E6});var R_=A(v_=>{"use strict";Object.defineProperty(v_,"__esModule",{value:!0});v_.ChannelCredentials=void 0;var _6=k("tls"),T6=Hf(),Wy=Ff();function Kf(o,e){if(o&&!(o instanceof Buffer))throw new TypeError(`${e}, if provided, must be a Buffer.`)}var Aa=class{constructor(e){this.callCredentials=e||T6.CallCredentials.createEmpty()}_getCallCredentials(){return this.callCredentials}static createSsl(e,t,i,a){var s;if(Kf(e,"Root certificate"),Kf(t,"Private key"),Kf(i,"Certificate chain"),t&&!i)throw new Error("Private key must be given with accompanying certificate chain");if(!t&&i)throw new Error("Certificate chain must be given with accompanying private key");let n=(0,_6.createSecureContext)({ca:(s=e??(0,Wy.getDefaultRootsData)())!==null&&s!==void 0?s:void 0,key:t??void 0,cert:i??void 0,ciphers:Wy.CIPHER_SUITES});return new h_(n,a??{})}static createFromSecureContext(e,t){return new h_(e,t??{})}static createInsecure(){return new qf}};v_.ChannelCredentials=Aa;var qf=class o extends Aa{constructor(){super()}compose(e){throw new Error("Cannot compose insecure credentials")}_getConnectionOptions(){return null}_isSecure(){return!1}_equals(e){return e instanceof o}},h_=class o extends Aa{constructor(e,t){super(),this.secureContext=e,this.verifyOptions=t,this.connectionOptions={secureContext:e},t!=null&&t.checkServerIdentity&&(this.connectionOptions.checkServerIdentity=t.checkServerIdentity)}compose(e){let t=this.callCredentials.compose(e);return new Wf(this,t)}_getConnectionOptions(){return Object.assign({},this.connectionOptions)}_isSecure(){return!0}_equals(e){return this===e?!0:e instanceof o?this.secureContext===e.secureContext&&this.verifyOptions.checkServerIdentity===e.verifyOptions.checkServerIdentity:!1}},Wf=class o extends Aa{constructor(e,t){super(t),this.channelCredentials=e}compose(e){let t=this.callCredentials.compose(e);return new o(this.channelCredentials,t)}_getConnectionOptions(){return this.channelCredentials._getConnectionOptions()}_isSecure(){return!0}_equals(e){return this===e?!0:e instanceof o?this.channelCredentials._equals(e.channelCredentials)&&this.callCredentials._equals(e.callCredentials):!1}}});var Fo=A(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.selectLbConfigFromList=Xe.getDefaultConfig=Xe.parseLoadBalancingConfig=Xe.isLoadBalancerNameRegistered=Xe.createLoadBalancer=Xe.registerDefaultLoadBalancerType=Xe.registerLoadBalancerType=Xe.createChildChannelControlHelper=void 0;var S6=De(),p6=Ae();function d6(o,e){var t,i,a,s,n,r,l,c,u,E;return{createSubchannel:(i=(t=e.createSubchannel)===null||t===void 0?void 0:t.bind(e))!==null&&i!==void 0?i:o.createSubchannel.bind(o),updateState:(s=(a=e.updateState)===null||a===void 0?void 0:a.bind(e))!==null&&s!==void 0?s:o.updateState.bind(o),requestReresolution:(r=(n=e.requestReresolution)===null||n===void 0?void 0:n.bind(e))!==null&&r!==void 0?r:o.requestReresolution.bind(o),addChannelzChild:(c=(l=e.addChannelzChild)===null||l===void 0?void 0:l.bind(e))!==null&&c!==void 0?c:o.addChannelzChild.bind(o),removeChannelzChild:(E=(u=e.removeChannelzChild)===null||u===void 0?void 0:u.bind(e))!==null&&E!==void 0?E:o.removeChannelzChild.bind(o)}}Xe.createChildChannelControlHelper=d6;var $n={},Ml=null;function f6(o,e,t){$n[o]={LoadBalancer:e,LoadBalancingConfig:t}}Xe.registerLoadBalancerType=f6;function A6(o){Ml=o}Xe.registerDefaultLoadBalancerType=A6;function h6(o,e,t){let i=o.getLoadBalancerName();return i in $n?new $n[i].LoadBalancer(e,t):null}Xe.createLoadBalancer=h6;function v6(o){return o in $n}Xe.isLoadBalancerNameRegistered=v6;function jy(o){let e=Object.keys(o);if(e.length!==1)throw new Error("Provided load balancing config has multiple conflicting entries");let t=e[0];if(t in $n)try{return $n[t].LoadBalancingConfig.createFromJson(o[t])}catch(i){throw new Error(`${t}: ${i.message}`)}else throw new Error(`Unrecognized load balancing config name ${t}`)}Xe.parseLoadBalancingConfig=jy;function R6(){if(!Ml)throw new Error("No default load balancer type registered");return new $n[Ml].LoadBalancingConfig}Xe.getDefaultConfig=R6;function m6(o,e=!1){for(let t of o)try{return jy(t)}catch(i){(0,S6.log)(p6.LogVerbosity.DEBUG,"Config parsing failed with error",i.message);continue}return e&&Ml?new $n[Ml].LoadBalancingConfig:null}Xe.selectLbConfigFromList=m6});var jf=A(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.extractAndSelectServiceConfig=Jn.validateServiceConfig=Jn.validateRetryThrottling=void 0;var O6=k("os"),m_=Ae(),O_=/^\d+(\.\d{1,9})?s$/,N6="node";function M6(o){if("service"in o&&o.service!==""){if(typeof o.service!="string")throw new Error(`Invalid method config name: invalid service: expected type string, got ${typeof o.service}`);if("method"in o&&o.method!==""){if(typeof o.method!="string")throw new Error(`Invalid method config name: invalid method: expected type string, got ${typeof o.service}`);return{service:o.service,method:o.method}}else return{service:o.service}}else{if("method"in o&&o.method!==void 0)throw new Error("Invalid method config name: method set with empty or unset service");return{}}}function P6(o){if(!("maxAttempts"in o)||!Number.isInteger(o.maxAttempts)||o.maxAttempts<2)throw new Error("Invalid method config retry policy: maxAttempts must be an integer at least 2");if(!("initialBackoff"in o)||typeof o.initialBackoff!="string"||!O_.test(o.initialBackoff))throw new Error("Invalid method config retry policy: initialBackoff must be a string consisting of a positive integer followed by s");if(!("maxBackoff"in o)||typeof o.maxBackoff!="string"||!O_.test(o.maxBackoff))throw new Error("Invalid method config retry policy: maxBackoff must be a string consisting of a positive integer followed by s");if(!("backoffMultiplier"in o)||typeof o.backoffMultiplier!="number"||o.backoffMultiplier<=0)throw new Error("Invalid method config retry policy: backoffMultiplier must be a number greater than 0");if(!("retryableStatusCodes"in o&&Array.isArray(o.retryableStatusCodes)))throw new Error("Invalid method config retry policy: retryableStatusCodes is required");if(o.retryableStatusCodes.length===0)throw new Error("Invalid method config retry policy: retryableStatusCodes must be non-empty");for(let e of o.retryableStatusCodes)if(typeof e=="number"){if(!Object.values(m_.Status).includes(e))throw new Error("Invalid method config retry policy: retryableStatusCodes value not in status code range")}else if(typeof e=="string"){if(!Object.values(m_.Status).includes(e.toUpperCase()))throw new Error("Invalid method config retry policy: retryableStatusCodes value not a status code name")}else throw new Error("Invalid method config retry policy: retryableStatusCodes value must be a string or number");return{maxAttempts:o.maxAttempts,initialBackoff:o.initialBackoff,maxBackoff:o.maxBackoff,backoffMultiplier:o.backoffMultiplier,retryableStatusCodes:o.retryableStatusCodes}}function C6(o){if(!("maxAttempts"in o)||!Number.isInteger(o.maxAttempts)||o.maxAttempts<2)throw new Error("Invalid method config hedging policy: maxAttempts must be an integer at least 2");if("hedgingDelay"in o&&(typeof o.hedgingDelay!="string"||!O_.test(o.hedgingDelay)))throw new Error("Invalid method config hedging policy: hedgingDelay must be a string consisting of a positive integer followed by s");if("nonFatalStatusCodes"in o&&Array.isArray(o.nonFatalStatusCodes))for(let t of o.nonFatalStatusCodes)if(typeof t=="number"){if(!Object.values(m_.Status).includes(t))throw new Error("Invlid method config hedging policy: nonFatalStatusCodes value not in status code range")}else if(typeof t=="string"){if(!Object.values(m_.Status).includes(t.toUpperCase()))throw new Error("Invlid method config hedging policy: nonFatalStatusCodes value not a status code name")}else throw new Error("Invlid method config hedging policy: nonFatalStatusCodes value must be a string or number");let e={maxAttempts:o.maxAttempts};return o.hedgingDelay&&(e.hedgingDelay=o.hedgingDelay),o.nonFatalStatusCodes&&(e.nonFatalStatusCodes=o.nonFatalStatusCodes),e}function g6(o){var e;let t={name:[]};if(!("name"in o)||!Array.isArray(o.name))throw new Error("Invalid method config: invalid name array");for(let i of o.name)t.name.push(M6(i));if("waitForReady"in o){if(typeof o.waitForReady!="boolean")throw new Error("Invalid method config: invalid waitForReady");t.waitForReady=o.waitForReady}if("timeout"in o)if(typeof o.timeout=="object"){if(!("seconds"in o.timeout)||typeof o.timeout.seconds!="number")throw new Error("Invalid method config: invalid timeout.seconds");if(!("nanos"in o.timeout)||typeof o.timeout.nanos!="number")throw new Error("Invalid method config: invalid timeout.nanos");t.timeout=o.timeout}else if(typeof o.timeout=="string"&&O_.test(o.timeout)){let i=o.timeout.substring(0,o.timeout.length-1).split(".");t.timeout={seconds:i[0]|0,nanos:((e=i[1])!==null&&e!==void 0?e:0)|0}}else throw new Error("Invalid method config: invalid timeout");if("maxRequestBytes"in o){if(typeof o.maxRequestBytes!="number")throw new Error("Invalid method config: invalid maxRequestBytes");t.maxRequestBytes=o.maxRequestBytes}if("maxResponseBytes"in o){if(typeof o.maxResponseBytes!="number")throw new Error("Invalid method config: invalid maxRequestBytes");t.maxResponseBytes=o.maxResponseBytes}if("retryPolicy"in o){if("hedgingPolicy"in o)throw new Error("Invalid method config: retryPolicy and hedgingPolicy cannot both be specified");t.retryPolicy=P6(o.retryPolicy)}else"hedgingPolicy"in o&&(t.hedgingPolicy=C6(o.hedgingPolicy));return t}function zy(o){if(!("maxTokens"in o)||typeof o.maxTokens!="number"||o.maxTokens<=0||o.maxTokens>1e3)throw new Error("Invalid retryThrottling: maxTokens must be a number in (0, 1000]");if(!("tokenRatio"in o)||typeof o.tokenRatio!="number"||o.tokenRatio<=0)throw new Error("Invalid retryThrottling: tokenRatio must be a number greater than 0");return{maxTokens:+o.maxTokens.toFixed(3),tokenRatio:+o.tokenRatio.toFixed(3)}}Jn.validateRetryThrottling=zy;function L6(o){if(!(typeof o=="object"&&o!==null))throw new Error(`Invalid loadBalancingConfig: unexpected type ${typeof o}`);let e=Object.keys(o);if(e.length>1)throw new Error(`Invalid loadBalancingConfig: unexpected multiple keys ${e}`);if(e.length===0)throw new Error("Invalid loadBalancingConfig: load balancing policy name required");return{[e[0]]:o[e[0]]}}function Xy(o){let e={loadBalancingConfig:[],methodConfig:[]};if("loadBalancingPolicy"in o)if(typeof o.loadBalancingPolicy=="string")e.loadBalancingPolicy=o.loadBalancingPolicy;else throw new Error("Invalid service config: invalid loadBalancingPolicy");if("loadBalancingConfig"in o)if(Array.isArray(o.loadBalancingConfig))for(let i of o.loadBalancingConfig)e.loadBalancingConfig.push(L6(i));else throw new Error("Invalid service config: invalid loadBalancingConfig");if("methodConfig"in o&&Array.isArray(o.methodConfig))for(let i of o.methodConfig)e.methodConfig.push(g6(i));"retryThrottling"in o&&(e.retryThrottling=zy(o.retryThrottling));let t=[];for(let i of e.methodConfig)for(let a of i.name){for(let s of t)if(a.service===s.service&&a.method===s.method)throw new Error(`Invalid service config: duplicate name ${a.service}/${a.method}`);t.push(a)}return e}Jn.validateServiceConfig=Xy;function I6(o){if(!("serviceConfig"in o))throw new Error("Invalid service config choice: missing service config");let e={serviceConfig:Xy(o.serviceConfig)};if("clientLanguage"in o)if(Array.isArray(o.clientLanguage)){e.clientLanguage=[];for(let i of o.clientLanguage)if(typeof i=="string")e.clientLanguage.push(i);else throw new Error("Invalid service config choice: invalid clientLanguage")}else throw new Error("Invalid service config choice: invalid clientLanguage");if("clientHostname"in o)if(Array.isArray(o.clientHostname)){e.clientHostname=[];for(let i of o.clientHostname)if(typeof i=="string")e.clientHostname.push(i);else throw new Error("Invalid service config choice: invalid clientHostname")}else throw new Error("Invalid service config choice: invalid clientHostname");if("percentage"in o)if(typeof o.percentage=="number"&&0<=o.percentage&&o.percentage<=100)e.percentage=o.percentage;else throw new Error("Invalid service config choice: invalid percentage");let t=["clientLanguage","percentage","clientHostname","serviceConfig"];for(let i in o)if(!t.includes(i))throw new Error(`Invalid service config choice: unexpected field ${i}`);return e}function y6(o,e){if(!Array.isArray(o))throw new Error("Invalid service config list");for(let t of o){let i=I6(t);if(!(typeof i.percentage=="number"&&e>i.percentage)){if(Array.isArray(i.clientHostname)){let a=!1;for(let s of i.clientHostname)s===O6.hostname()&&(a=!0);if(!a)continue}if(Array.isArray(i.clientLanguage)){let a=!1;for(let s of i.clientLanguage)s===N6&&(a=!0);if(!a)continue}return i.serviceConfig}}throw new Error("No matching service config found")}function D6(o,e){for(let t of o)if(t.length>0&&t[0].startsWith("grpc_config=")){let i=t.join("").substring(12),a=JSON.parse(i);return y6(a,e)}return null}Jn.extractAndSelectServiceConfig=D6});var er=A(N_=>{"use strict";Object.defineProperty(N_,"__esModule",{value:!0});N_.ConnectivityState=void 0;var $y;(function(o){o[o.IDLE=0]="IDLE",o[o.CONNECTING=1]="CONNECTING",o[o.READY=2]="READY",o[o.TRANSIENT_FAILURE=3]="TRANSIENT_FAILURE",o[o.SHUTDOWN=4]="SHUTDOWN"})($y||(N_.ConnectivityState=$y={}))});var Vt=A(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.uriToString=Vr.combineHostPort=Vr.splitHostPort=Vr.parseUri=void 0;var x6=/^(?:([A-Za-z0-9+.-]+):)?(?:\/\/([^/]*)\/)?(.+)$/;function U6(o){let e=x6.exec(o);return e===null?null:{scheme:e[1],authority:e[2],path:e[3]}}Vr.parseUri=U6;var Jy=/^\d+$/;function b6(o){if(o.startsWith("[")){let e=o.indexOf("]");if(e===-1)return null;let t=o.substring(1,e);if(t.indexOf(":")===-1)return null;if(o.length>e+1)if(o[e+1]===":"){let i=o.substring(e+2);return Jy.test(i)?{host:t,port:+i}:null}else return null;else return{host:t}}else{let e=o.split(":");return e.length===2?Jy.test(e[1])?{host:e[0],port:+e[1]}:null:{host:o}}}Vr.splitHostPort=b6;function V6(o){return o.port===void 0?o.host:o.host.includes(":")?`[${o.host}]:${o.port}`:`${o.host}:${o.port}`}Vr.combineHostPort=V6;function w6(o){let e="";return o.scheme!==void 0&&(e+=o.scheme+":"),o.authority!==void 0&&(e+="//"+o.authority+"/"),e+=o.path,e}Vr.uriToString=w6});var wr=A(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.mapUriDefaultScheme=tr.getDefaultAuthority=tr.createResolver=tr.registerDefaultScheme=tr.registerResolver=void 0;var Xf=Vt(),ha={},zf=null;function B6(o,e){ha[o]=e}tr.registerResolver=B6;function G6(o){zf=o}tr.registerDefaultScheme=G6;function k6(o,e,t){if(o.scheme!==void 0&&o.scheme in ha)return new ha[o.scheme](o,e,t);throw new Error(`No resolver could be created for target ${(0,Xf.uriToString)(o)}`)}tr.createResolver=k6;function H6(o){if(o.scheme!==void 0&&o.scheme in ha)return ha[o.scheme].getDefaultAuthority(o);throw new Error(`Invalid target ${(0,Xf.uriToString)(o)}`)}tr.getDefaultAuthority=H6;function Y6(o){return o.scheme===void 0||!(o.scheme in ha)?zf!==null?{scheme:zf,authority:void 0,path:(0,Xf.uriToString)(o)}:null:o}tr.mapUriDefaultScheme=Y6});var Zn=A(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.QueuePicker=Qn.UnavailablePicker=Qn.PickResultType=void 0;var F6=ht(),K6=Ae(),M_;(function(o){o[o.COMPLETE=0]="COMPLETE",o[o.QUEUE=1]="QUEUE",o[o.TRANSIENT_FAILURE=2]="TRANSIENT_FAILURE",o[o.DROP=3]="DROP"})(M_||(Qn.PickResultType=M_={}));var $f=class{constructor(e){this.status=Object.assign({code:K6.Status.UNAVAILABLE,details:"No connection established",metadata:new F6.Metadata},e)}pick(e){return{pickResultType:M_.TRANSIENT_FAILURE,subchannel:null,status:this.status,onCallStarted:null,onCallEnded:null}}};Qn.UnavailablePicker=$f;var Jf=class{constructor(e,t){this.loadBalancer=e,this.childPicker=t,this.calledExitIdle=!1}pick(e){return this.calledExitIdle||(process.nextTick(()=>{this.loadBalancer.exitIdle()}),this.calledExitIdle=!0),this.childPicker?this.childPicker.pick(e):{pickResultType:M_.QUEUE,subchannel:null,status:null,onCallStarted:null,onCallEnded:null}}};Qn.QueuePicker=Jf});var Pl=A(P_=>{"use strict";Object.defineProperty(P_,"__esModule",{value:!0});P_.BackoffTimeout=void 0;var q6=1e3,W6=1.6,j6=12e4,z6=.2;function X6(o,e){return Math.random()*(e-o)+o}var Qf=class{constructor(e,t){this.callback=e,this.initialDelay=q6,this.multiplier=W6,this.maxDelay=j6,this.jitter=z6,this.running=!1,this.hasRef=!0,this.startTime=new Date,this.endTime=new Date,t&&(t.initialDelay&&(this.initialDelay=t.initialDelay),t.multiplier&&(this.multiplier=t.multiplier),t.jitter&&(this.jitter=t.jitter),t.maxDelay&&(this.maxDelay=t.maxDelay)),this.nextDelay=this.initialDelay,this.timerId=setTimeout(()=>{},0),clearTimeout(this.timerId)}runTimer(e){var t,i;this.endTime=this.startTime,this.endTime.setMilliseconds(this.endTime.getMilliseconds()+this.nextDelay),clearTimeout(this.timerId),this.timerId=setTimeout(()=>{this.callback(),this.running=!1},e),this.hasRef||(i=(t=this.timerId).unref)===null||i===void 0||i.call(t)}runOnce(){this.running=!0,this.startTime=new Date,this.runTimer(this.nextDelay);let e=Math.min(this.nextDelay*this.multiplier,this.maxDelay),t=e*this.jitter;this.nextDelay=e+X6(-t,t)}stop(){clearTimeout(this.timerId),this.running=!1}reset(){if(this.nextDelay=this.initialDelay,this.running){let e=new Date,t=this.startTime;t.setMilliseconds(t.getMilliseconds()+this.nextDelay),clearTimeout(this.timerId),e<t?this.runTimer(t.getTime()-e.getTime()):this.running=!1}}isRunning(){return this.running}ref(){var e,t;this.hasRef=!0,(t=(e=this.timerId).ref)===null||t===void 0||t.call(e)}unref(){var e,t;this.hasRef=!1,(t=(e=this.timerId).unref)===null||t===void 0||t.call(e)}getEndTime(){return this.endTime}};P_.BackoffTimeout=Qf});var g_=A(C_=>{"use strict";Object.defineProperty(C_,"__esModule",{value:!0});C_.ChildLoadBalancerHandler=void 0;var $6=Fo(),J6=er(),Q6="child_load_balancer_helper",Zf=class{constructor(e,t){this.channelControlHelper=e,this.options=t,this.currentChild=null,this.pendingChild=null,this.latestConfig=null,this.ChildPolicyHelper=class{constructor(i){this.parent=i,this.child=null}createSubchannel(i,a){return this.parent.channelControlHelper.createSubchannel(i,a)}updateState(i,a){var s;if(this.calledByPendingChild()){if(i===J6.ConnectivityState.CONNECTING)return;(s=this.parent.currentChild)===null||s===void 0||s.destroy(),this.parent.currentChild=this.parent.pendingChild,this.parent.pendingChild=null}else if(!this.calledByCurrentChild())return;this.parent.channelControlHelper.updateState(i,a)}requestReresolution(){var i;let a=(i=this.parent.pendingChild)!==null&&i!==void 0?i:this.parent.currentChild;this.child===a&&this.parent.channelControlHelper.requestReresolution()}setChild(i){this.child=i}addChannelzChild(i){this.parent.channelControlHelper.addChannelzChild(i)}removeChannelzChild(i){this.parent.channelControlHelper.removeChannelzChild(i)}calledByPendingChild(){return this.child===this.parent.pendingChild}calledByCurrentChild(){return this.child===this.parent.currentChild}}}configUpdateRequiresNewPolicyInstance(e,t){return e.getLoadBalancerName()!==t.getLoadBalancerName()}updateAddressList(e,t,i){let a;if(this.currentChild===null||this.latestConfig===null||this.configUpdateRequiresNewPolicyInstance(this.latestConfig,t)){let s=new this.ChildPolicyHelper(this),n=(0,$6.createLoadBalancer)(t,s,this.options);s.setChild(n),this.currentChild===null?(this.currentChild=n,a=this.currentChild):(this.pendingChild&&this.pendingChild.destroy(),this.pendingChild=n,a=this.pendingChild)}else this.pendingChild===null?a=this.currentChild:a=this.pendingChild;this.latestConfig=t,a.updateAddressList(e,t,i)}exitIdle(){this.currentChild&&(this.currentChild.exitIdle(),this.pendingChild&&this.pendingChild.exitIdle())}resetBackoff(){this.currentChild&&(this.currentChild.resetBackoff(),this.pendingChild&&this.pendingChild.resetBackoff())}destroy(){this.currentChild&&(this.currentChild.destroy(),this.currentChild=null),this.pendingChild&&(this.pendingChild.destroy(),this.pendingChild=null)}getTypeName(){return Q6}};C_.ChildLoadBalancerHandler=Zf});var Zy=A(L_=>{"use strict";Object.defineProperty(L_,"__esModule",{value:!0});L_.ResolvingLoadBalancer=void 0;var Z6=Fo(),e8=jf(),Ct=er(),t8=wr(),Cl=Zn(),r8=Pl(),eA=Ae(),n8=ht(),o8=De(),i8=Ae(),a8=Vt(),s8=g_(),l8="resolving_load_balancer";function Qy(o){o8.trace(i8.LogVerbosity.DEBUG,l8,o)}var c8=["SERVICE_AND_METHOD","SERVICE","EMPTY"];function u8(o,e,t,i){for(let a of t.name)switch(i){case"EMPTY":if(!a.service&&!a.method)return!0;break;case"SERVICE":if(a.service===o&&!a.method)return!0;break;case"SERVICE_AND_METHOD":if(a.service===o&&a.method===e)return!0}return!1}function E8(o,e,t,i){for(let a of t)if(u8(o,e,a,i))return a;return null}function _8(o){return function(t,i){var a,s;let n=t.split("/").filter(c=>c.length>0),r=(a=n[0])!==null&&a!==void 0?a:"",l=(s=n[1])!==null&&s!==void 0?s:"";if(o&&o.methodConfig)for(let c of c8){let u=E8(r,l,o.methodConfig,c);if(u)return{methodConfig:u,pickInformation:{},status:eA.Status.OK,dynamicFilterFactories:[]}}return{methodConfig:{name:[]},pickInformation:{},status:eA.Status.OK,dynamicFilterFactories:[]}}}var tA=class{constructor(e,t,i,a,s){this.target=e,this.channelControlHelper=t,this.onSuccessfulResolution=a,this.onFailedResolution=s,this.latestChildState=Ct.ConnectivityState.IDLE,this.latestChildPicker=new Cl.QueuePicker(this),this.currentState=Ct.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1,i["grpc.service_config"]?this.defaultServiceConfig=(0,e8.validateServiceConfig)(JSON.parse(i["grpc.service_config"])):this.defaultServiceConfig={loadBalancingConfig:[],methodConfig:[]},this.updateState(Ct.ConnectivityState.IDLE,new Cl.QueuePicker(this)),this.childLoadBalancer=new s8.ChildLoadBalancerHandler({createSubchannel:t.createSubchannel.bind(t),requestReresolution:()=>{this.backoffTimeout.isRunning()?(Qy("requestReresolution delayed by backoff timer until "+this.backoffTimeout.getEndTime().toISOString()),this.continueResolving=!0):this.updateResolution()},updateState:(r,l)=>{this.latestChildState=r,this.latestChildPicker=l,this.updateState(r,l)},addChannelzChild:t.addChannelzChild.bind(t),removeChannelzChild:t.removeChannelzChild.bind(t)},i),this.innerResolver=(0,t8.createResolver)(e,{onSuccessfulResolution:(r,l,c,u,E)=>{var d;this.backoffTimeout.stop(),this.backoffTimeout.reset();let f=null;l===null?c===null?(this.previousServiceConfig=null,f=this.defaultServiceConfig):this.previousServiceConfig===null?this.handleResolutionFailure(c):f=this.previousServiceConfig:(f=l,this.previousServiceConfig=l);let O=(d=f==null?void 0:f.loadBalancingConfig)!==null&&d!==void 0?d:[],R=(0,Z6.selectLbConfigFromList)(O,!0);if(R===null){this.handleResolutionFailure({code:eA.Status.UNAVAILABLE,details:"All load balancer options in service config are not compatible",metadata:new n8.Metadata});return}this.childLoadBalancer.updateAddressList(r,R,E);let M=f??this.defaultServiceConfig;this.onSuccessfulResolution(M,u??_8(M))},onError:r=>{this.handleResolutionFailure(r)}},i);let n={initialDelay:i["grpc.initial_reconnect_backoff_ms"],maxDelay:i["grpc.max_reconnect_backoff_ms"]};this.backoffTimeout=new r8.BackoffTimeout(()=>{this.continueResolving?(this.updateResolution(),this.continueResolving=!1):this.updateState(this.latestChildState,this.latestChildPicker)},n),this.backoffTimeout.unref()}updateResolution(){this.innerResolver.updateResolution(),this.currentState===Ct.ConnectivityState.IDLE&&this.updateState(Ct.ConnectivityState.CONNECTING,this.latestChildPicker),this.backoffTimeout.runOnce()}updateState(e,t){Qy((0,a8.uriToString)(this.target)+" "+Ct.ConnectivityState[this.currentState]+" -> "+Ct.ConnectivityState[e]),e===Ct.ConnectivityState.IDLE&&(t=new Cl.QueuePicker(this,t)),this.currentState=e,this.channelControlHelper.updateState(e,t)}handleResolutionFailure(e){this.latestChildState===Ct.ConnectivityState.IDLE&&(this.updateState(Ct.ConnectivityState.TRANSIENT_FAILURE,new Cl.UnavailablePicker(e)),this.onFailedResolution(e))}exitIdle(){(this.currentState===Ct.ConnectivityState.IDLE||this.currentState===Ct.ConnectivityState.TRANSIENT_FAILURE)&&(this.backoffTimeout.isRunning()?this.continueResolving=!0:this.updateResolution()),this.childLoadBalancer.exitIdle()}updateAddressList(e,t){throw new Error("updateAddressList not supported on ResolvingLoadBalancer")}resetBackoff(){this.backoffTimeout.reset(),this.childLoadBalancer.resetBackoff()}destroy(){this.childLoadBalancer.destroy(),this.innerResolver.destroy(),this.backoffTimeout.reset(),this.backoffTimeout.stop(),this.latestChildState=Ct.ConnectivityState.IDLE,this.latestChildPicker=new Cl.QueuePicker(this),this.currentState=Ct.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1}getTypeName(){return"resolving_load_balancer"}};L_.ResolvingLoadBalancer=tA});var eD=A(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.channelOptionsEqual=va.recognizedOptions=void 0;va.recognizedOptions={"grpc.ssl_target_name_override":!0,"grpc.primary_user_agent":!0,"grpc.secondary_user_agent":!0,"grpc.default_authority":!0,"grpc.keepalive_time_ms":!0,"grpc.keepalive_timeout_ms":!0,"grpc.keepalive_permit_without_calls":!0,"grpc.service_config":!0,"grpc.max_concurrent_streams":!0,"grpc.initial_reconnect_backoff_ms":!0,"grpc.max_reconnect_backoff_ms":!0,"grpc.use_local_subchannel_pool":!0,"grpc.max_send_message_length":!0,"grpc.max_receive_message_length":!0,"grpc.enable_http_proxy":!0,"grpc.enable_channelz":!0,"grpc.dns_min_time_between_resolutions_ms":!0,"grpc.enable_retries":!0,"grpc.per_rpc_retry_buffer_size":!0,"grpc.retry_buffer_size":!0,"grpc.max_connection_age_ms":!0,"grpc.max_connection_age_grace_ms":!0,"grpc-node.max_session_memory":!0,"grpc.service_config_disable_resolution":!0,"grpc.client_idle_timeout_ms":!0,"grpc-node.tls_enable_trace":!0,"grpc.lb.ring_hash.ring_size_cap":!0};function T8(o,e){let t=Object.keys(o).sort(),i=Object.keys(e).sort();if(t.length!==i.length)return!1;for(let a=0;a<t.length;a+=1)if(t[a]!==i[a]||o[t[a]]!==e[i[a]])return!1;return!0}va.channelOptionsEqual=T8});var fr=A($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.EndpointMap=$e.endpointHasAddress=$e.endpointToString=$e.endpointEqual=$e.stringToSubchannelAddress=$e.subchannelAddressToString=$e.subchannelAddressEqual=$e.isTcpSubchannelAddress=void 0;var tD=k("net");function Ll(o){return"port"in o}$e.isTcpSubchannelAddress=Ll;function I_(o,e){return!o&&!e?!0:!o||!e?!1:Ll(o)?Ll(e)&&o.host===e.host&&o.port===e.port:!Ll(e)&&o.path===e.path}$e.subchannelAddressEqual=I_;function rD(o){return Ll(o)?(0,tD.isIPv6)(o.host)?"["+o.host+"]:"+o.port:o.host+":"+o.port:o.path}$e.subchannelAddressToString=rD;var S8=443;function p8(o,e){return(0,tD.isIP)(o)?{host:o,port:e??S8}:{path:o}}$e.stringToSubchannelAddress=p8;function d8(o,e){if(o.addresses.length!==e.addresses.length)return!1;for(let t=0;t<o.addresses.length;t++)if(!I_(o.addresses[t],e.addresses[t]))return!1;return!0}$e.endpointEqual=d8;function f8(o){return"["+o.addresses.map(rD).join(", ")+"]"}$e.endpointToString=f8;function nD(o,e){for(let t of o.addresses)if(I_(t,e))return!0;return!1}$e.endpointHasAddress=nD;function gl(o,e){if(o.addresses.length!==e.addresses.length)return!1;for(let t of o.addresses){let i=!1;for(let a of e.addresses)if(I_(t,a)){i=!0;break}if(!i)return!1}return!0}var rA=class{constructor(){this.map=new Set}get size(){return this.map.size}getForSubchannelAddress(e){for(let t of this.map)if(nD(t.key,e))return t.value}deleteMissing(e){let t=[];for(let i of this.map){let a=!1;for(let s of e)gl(s,i.key)&&(a=!0);a||(t.push(i.value),this.map.delete(i))}return t}get(e){for(let t of this.map)if(gl(e,t.key))return t.value}set(e,t){for(let i of this.map)if(gl(e,i.key)){i.value=t;return}this.map.add({key:e,value:t})}delete(e){for(let t of this.map)if(gl(e,t.key)){this.map.delete(t);return}}has(e){for(let t of this.map)if(gl(e,t.key))return!0;return!1}clear(){this.map.clear()}*keys(){for(let e of this.map)yield e.key}*values(){for(let e of this.map)yield e.value}*entries(){for(let e of this.map)yield[e.key,e.value]}};$e.EndpointMap=rA});var iD={};ge(iD,{OrderedMap:()=>M8});function Ra(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");nA(o,e);function t(){this.constructor=o}o.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function A8(o,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,n;return n={next:r(0),throw:r(1),return:r(2)},typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function r(c){return function(u){return l([c,u])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;n&&(n=0,c[0]&&(t=0)),t;)try{if(i=1,a&&(s=c[0]&2?a.return:c[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,c[1])).done)return s;switch(a=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,a=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){t.label=c[1];break}if(c[0]===6&&t.label<s[1]){t.label=s[1],s=c;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(c);break}s[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(o,t)}catch(u){c=[6,u],a=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Ko(){throw new RangeError("Iterator access denied!")}var nA,oD,h8,v8,R8,m8,O8,N8,En,M8,aD=S(()=>{nA=function(o,e){return nA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])},nA(o,e)};oD=function(){function o(e,t,i){i===void 0&&(i=1),this.t=void 0,this.i=void 0,this.h=void 0,this.u=e,this.o=t,this.l=i}return o.prototype.v=function(){var e=this,t=e.h.h===e;if(t&&e.l===1)e=e.i;else if(e.t)for(e=e.t;e.i;)e=e.i;else{if(t)return e.h;for(var i=e.h;i.t===e;)e=i,i=e.h;e=i}return e},o.prototype.p=function(){var e=this;if(e.i){for(e=e.i;e.t;)e=e.t;return e}else{for(var t=e.h;t.i===e;)e=t,t=e.h;return e.i!==t?t:e}},o.prototype.T=function(){var e=this.h,t=this.i,i=t.t;return e.h===this?e.h=t:e.t===this?e.t=t:e.i=t,t.h=e,t.t=this,this.h=t,this.i=i,i&&(i.h=this),t},o.prototype.I=function(){var e=this.h,t=this.t,i=t.i;return e.h===this?e.h=t:e.t===this?e.t=t:e.i=t,t.h=e,t.i=this,this.h=t,this.t=i,i&&(i.h=this),t},o}(),h8=function(o){Ra(e,o);function e(){var t=o!==null&&o.apply(this,arguments)||this;return t.O=1,t}return e.prototype.T=function(){var t=o.prototype.T.call(this);return this.M(),t.M(),t},e.prototype.I=function(){var t=o.prototype.I.call(this);return this.M(),t.M(),t},e.prototype.M=function(){this.O=1,this.t&&(this.O+=this.t.O),this.i&&(this.O+=this.i.O)},e}(oD),v8=function(){function o(e){e===void 0&&(e=0),this.iteratorType=e}return o.prototype.equals=function(e){return this.C===e.C},o}(),R8=function(){function o(){this._=0}return Object.defineProperty(o.prototype,"length",{get:function(){return this._},enumerable:!1,configurable:!0}),o.prototype.size=function(){return this._},o.prototype.empty=function(){return this._===0},o}(),m8=function(o){Ra(e,o);function e(){return o!==null&&o.apply(this,arguments)||this}return e}(R8);O8=function(o){Ra(e,o);function e(t,i){t===void 0&&(t=function(s,n){return s<n?-1:s>n?1:0}),i===void 0&&(i=!1);var a=o.call(this)||this;return a.N=void 0,a.g=t,a.enableIndex=i,a.S=i?h8:oD,a.A=new a.S,a}return e.prototype.m=function(t,i){for(var a=this.A;t;){var s=this.g(t.u,i);if(s<0)t=t.i;else if(s>0)a=t,t=t.t;else return t}return a},e.prototype.B=function(t,i){for(var a=this.A;t;){var s=this.g(t.u,i);s<=0?t=t.i:(a=t,t=t.t)}return a},e.prototype.j=function(t,i){for(var a=this.A;t;){var s=this.g(t.u,i);if(s<0)a=t,t=t.i;else if(s>0)t=t.t;else return t}return a},e.prototype.k=function(t,i){for(var a=this.A;t;){var s=this.g(t.u,i);s<0?(a=t,t=t.i):t=t.t}return a},e.prototype.R=function(t){for(;;){var i=t.h;if(i===this.A)return;if(t.l===1){t.l=0;return}if(t===i.t){var a=i.i;if(a.l===1)a.l=0,i.l=1,i===this.N?this.N=i.T():i.T();else if(a.i&&a.i.l===1){a.l=i.l,i.l=0,a.i.l=0,i===this.N?this.N=i.T():i.T();return}else a.t&&a.t.l===1?(a.l=1,a.t.l=0,a.I()):(a.l=1,t=i)}else{var a=i.t;if(a.l===1)a.l=0,i.l=1,i===this.N?this.N=i.I():i.I();else if(a.t&&a.t.l===1){a.l=i.l,i.l=0,a.t.l=0,i===this.N?this.N=i.I():i.I();return}else a.i&&a.i.l===1?(a.l=1,a.i.l=0,a.T()):(a.l=1,t=i)}}},e.prototype.G=function(t){if(this._===1){this.clear();return}for(var i=t;i.t||i.i;){if(i.i)for(i=i.i;i.t;)i=i.t;else i=i.t;var a=t.u;t.u=i.u,i.u=a;var s=t.o;t.o=i.o,i.o=s,t=i}this.A.t===i?this.A.t=i.h:this.A.i===i&&(this.A.i=i.h),this.R(i);var n=i.h;if(i===n.t?n.t=void 0:n.i=void 0,this._-=1,this.N.l=0,this.enableIndex)for(;n!==this.A;)n.O-=1,n=n.h},e.prototype.P=function(t){for(var i=typeof t=="number"?t:void 0,a=typeof t=="function"?t:void 0,s=typeof t>"u"?[]:void 0,n=0,r=this.N,l=[];l.length||r;)if(r)l.push(r),r=r.t;else{if(r=l.pop(),n===i)return r;s&&s.push(r),a&&a(r,n,this),n+=1,r=r.i}return s},e.prototype.q=function(t){for(;;){var i=t.h;if(i.l===0)return;var a=i.h;if(i===a.t){var s=a.i;if(s&&s.l===1){if(s.l=i.l=0,a===this.N)return;a.l=1,t=a;continue}else if(t===i.i){if(t.l=0,t.t&&(t.t.h=i),t.i&&(t.i.h=a),i.i=t.t,a.t=t.i,t.t=i,t.i=a,a===this.N)this.N=t,this.A.h=t;else{var n=a.h;n.t===a?n.t=t:n.i=t}t.h=a.h,i.h=t,a.h=t,a.l=1}else{i.l=0,a===this.N?this.N=a.I():a.I(),a.l=1;return}}else{var s=a.t;if(s&&s.l===1){if(s.l=i.l=0,a===this.N)return;a.l=1,t=a;continue}else if(t===i.t){if(t.l=0,t.t&&(t.t.h=a),t.i&&(t.i.h=i),a.i=t.t,i.t=t.i,t.t=a,t.i=i,a===this.N)this.N=t,this.A.h=t;else{var n=a.h;n.t===a?n.t=t:n.i=t}t.h=a.h,i.h=t,a.h=t,a.l=1}else{i.l=0,a===this.N?this.N=a.T():a.T(),a.l=1;return}}this.enableIndex&&(i.M(),a.M(),t.M());return}},e.prototype.D=function(t,i,a){if(this.N===void 0)return this._+=1,this.N=new this.S(t,i,0),this.N.h=this.A,this.A.h=this.A.t=this.A.i=this.N,this._;var s,n=this.A.t,r=this.g(n.u,t);if(r===0)return n.o=i,this._;if(r>0)n.t=new this.S(t,i),n.t.h=n,s=n.t,this.A.t=s;else{var l=this.A.i,c=this.g(l.u,t);if(c===0)return l.o=i,this._;if(c<0)l.i=new this.S(t,i),l.i.h=l,s=l.i,this.A.i=s;else{if(a!==void 0){var u=a.C;if(u!==this.A){var E=this.g(u.u,t);if(E===0)return u.o=i,this._;if(E>0){var d=u.v(),f=this.g(d.u,t);if(f===0)return d.o=i,this._;f<0&&(s=new this.S(t,i),d.i===void 0?(d.i=s,s.h=d):(u.t=s,s.h=u))}}}if(s===void 0)for(s=this.N;;){var O=this.g(s.u,t);if(O>0){if(s.t===void 0){s.t=new this.S(t,i),s.t.h=s,s=s.t;break}s=s.t}else if(O<0){if(s.i===void 0){s.i=new this.S(t,i),s.i.h=s,s=s.i;break}s=s.i}else return s.o=i,this._}}}if(this.enableIndex)for(var R=s.h;R!==this.A;)R.O+=1,R=R.h;return this.q(s),this._+=1,this._},e.prototype.F=function(t,i){for(;t;){var a=this.g(t.u,i);if(a<0)t=t.i;else if(a>0)t=t.t;else return t}return t||this.A},e.prototype.clear=function(){this._=0,this.N=void 0,this.A.h=void 0,this.A.t=this.A.i=void 0},e.prototype.updateKeyByIterator=function(t,i){var a=t.C;if(a===this.A&&Ko(),this._===1)return a.u=i,!0;var s=a.p().u;if(a===this.A.t)return this.g(s,i)>0?(a.u=i,!0):!1;var n=a.v().u;return a===this.A.i?this.g(n,i)<0?(a.u=i,!0):!1:this.g(n,i)>=0||this.g(s,i)<=0?!1:(a.u=i,!0)},e.prototype.eraseElementByPos=function(t){if(t<0||t>this._-1)throw new RangeError;var i=this.P(t);return this.G(i),this._},e.prototype.eraseElementByKey=function(t){if(this._===0)return!1;var i=this.F(this.N,t);return i===this.A?!1:(this.G(i),!0)},e.prototype.eraseElementByIterator=function(t){var i=t.C;i===this.A&&Ko();var a=i.i===void 0,s=t.iteratorType===0;return s?a&&t.next():(!a||i.t===void 0)&&t.next(),this.G(i),t},e.prototype.getHeight=function(){if(this._===0)return 0;function t(i){return i?Math.max(t(i.t),t(i.i))+1:0}return t(this.N)},e}(m8),N8=function(o){Ra(e,o);function e(t,i,a){var s=o.call(this,a)||this;return s.C=t,s.A=i,s.iteratorType===0?(s.pre=function(){return this.C===this.A.t&&Ko(),this.C=this.C.v(),this},s.next=function(){return this.C===this.A&&Ko(),this.C=this.C.p(),this}):(s.pre=function(){return this.C===this.A.i&&Ko(),this.C=this.C.p(),this},s.next=function(){return this.C===this.A&&Ko(),this.C=this.C.v(),this}),s}return Object.defineProperty(e.prototype,"index",{get:function(){var t=this.C,i=this.A.h;if(t===this.A)return i?i.O-1:0;var a=0;for(t.t&&(a+=t.t.O);t!==i;){var s=t.h;t===s.i&&(a+=1,s.t&&(a+=s.t.O)),t=s}return a},enumerable:!1,configurable:!0}),e.prototype.isAccessible=function(){return this.C!==this.A},e}(v8),En=function(o){Ra(e,o);function e(t,i,a,s){var n=o.call(this,t,i,s)||this;return n.container=a,n}return Object.defineProperty(e.prototype,"pointer",{get:function(){this.C===this.A&&Ko();var t=this;return new Proxy([],{get:function(i,a){return a==="0"?t.C.u:a==="1"?t.C.o:(i[0]=t.C.u,i[1]=t.C.o,i[a])},set:function(i,a,s){if(a!=="1")throw new TypeError("prop must be 1");return t.C.o=s,!0}})},enumerable:!1,configurable:!0}),e.prototype.copy=function(){return new e(this.C,this.A,this.container,this.iteratorType)},e}(N8),M8=function(o){Ra(e,o);function e(t,i,a){t===void 0&&(t=[]);var s=o.call(this,i,a)||this,n=s;return t.forEach(function(r){n.setElement(r[0],r[1])}),s}return e.prototype.begin=function(){return new En(this.A.t||this.A,this.A,this)},e.prototype.end=function(){return new En(this.A,this.A,this)},e.prototype.rBegin=function(){return new En(this.A.i||this.A,this.A,this,1)},e.prototype.rEnd=function(){return new En(this.A,this.A,this,1)},e.prototype.front=function(){if(this._!==0){var t=this.A.t;return[t.u,t.o]}},e.prototype.back=function(){if(this._!==0){var t=this.A.i;return[t.u,t.o]}},e.prototype.lowerBound=function(t){var i=this.m(this.N,t);return new En(i,this.A,this)},e.prototype.upperBound=function(t){var i=this.B(this.N,t);return new En(i,this.A,this)},e.prototype.reverseLowerBound=function(t){var i=this.j(this.N,t);return new En(i,this.A,this)},e.prototype.reverseUpperBound=function(t){var i=this.k(this.N,t);return new En(i,this.A,this)},e.prototype.forEach=function(t){this.P(function(i,a,s){t([i.u,i.o],a,s)})},e.prototype.setElement=function(t,i,a){return this.D(t,i,a)},e.prototype.getElementByPos=function(t){if(t<0||t>this._-1)throw new RangeError;var i=this.P(t);return[i.u,i.o]},e.prototype.find=function(t){var i=this.F(this.N,t);return new En(i,this.A,this)},e.prototype.getElementByKey=function(t){var i=this.F(this.N,t);return i.o},e.prototype.union=function(t){var i=this;return t.forEach(function(a){i.setElement(a[0],a[1])}),this._},e.prototype[Symbol.iterator]=function(){var t,i,a,s;return A8(this,function(n){switch(n.label){case 0:t=this._,i=this.P(),a=0,n.label=1;case 1:return a<t?(s=i[a],[4,[s.u,s.o]]):[3,4];case 2:n.sent(),n.label=3;case 3:return++a,[3,1];case 4:return[2]}})},e}(O8)});var y_=A(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.addAdminServicesToServer=ma.registerAdminService=void 0;var sD=[];function P8(o,e){sD.push({getServiceDefinition:o,getHandlers:e})}ma.registerAdminService=P8;function C8(o){for(let{getServiceDefinition:e,getHandlers:t}of sD)o.addService(e(),t())}ma.addAdminServicesToServer=C8});var lD=A(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.ClientDuplexStreamImpl=rr.ClientWritableStreamImpl=rr.ClientReadableStreamImpl=rr.ClientUnaryCallImpl=rr.callErrorFromStatus=void 0;var g8=k("events"),lA=k("stream"),Il=Ae();function L8(o,e){let t=`${o.code} ${Il.Status[o.code]}: ${o.details}`,a=`${new Error(t).stack} for call at ${e}`;return Object.assign(new Error(t),o,{stack:a})}rr.callErrorFromStatus=L8;var oA=class extends g8.EventEmitter{constructor(){super()}cancel(){var e;(e=this.call)===null||e===void 0||e.cancelWithStatus(Il.Status.CANCELLED,"Cancelled on client")}getPeer(){var e,t;return(t=(e=this.call)===null||e===void 0?void 0:e.getPeer())!==null&&t!==void 0?t:"unknown"}};rr.ClientUnaryCallImpl=oA;var iA=class extends lA.Readable{constructor(e){super({objectMode:!0}),this.deserialize=e}cancel(){var e;(e=this.call)===null||e===void 0||e.cancelWithStatus(Il.Status.CANCELLED,"Cancelled on client")}getPeer(){var e,t;return(t=(e=this.call)===null||e===void 0?void 0:e.getPeer())!==null&&t!==void 0?t:"unknown"}_read(e){var t;(t=this.call)===null||t===void 0||t.startRead()}};rr.ClientReadableStreamImpl=iA;var aA=class extends lA.Writable{constructor(e){super({objectMode:!0}),this.serialize=e}cancel(){var e;(e=this.call)===null||e===void 0||e.cancelWithStatus(Il.Status.CANCELLED,"Cancelled on client")}getPeer(){var e,t;return(t=(e=this.call)===null||e===void 0?void 0:e.getPeer())!==null&&t!==void 0?t:"unknown"}_write(e,t,i){var a;let s={callback:i},n=Number(t);Number.isNaN(n)||(s.flags=n),(a=this.call)===null||a===void 0||a.sendMessageWithContext(s,e)}_final(e){var t;(t=this.call)===null||t===void 0||t.halfClose(),e()}};rr.ClientWritableStreamImpl=aA;var sA=class extends lA.Duplex{constructor(e,t){super({objectMode:!0}),this.serialize=e,this.deserialize=t}cancel(){var e;(e=this.call)===null||e===void 0||e.cancelWithStatus(Il.Status.CANCELLED,"Cancelled on client")}getPeer(){var e,t;return(t=(e=this.call)===null||e===void 0?void 0:e.getPeer())!==null&&t!==void 0?t:"unknown"}_read(e){var t;(t=this.call)===null||t===void 0||t.startRead()}_write(e,t,i){var a;let s={callback:i},n=Number(t);Number.isNaN(n)||(s.flags=n),(a=this.call)===null||a===void 0||a.sendMessageWithContext(s,e)}_final(e){var t;(t=this.call)===null||t===void 0||t.halfClose(),e()}};rr.ClientDuplexStreamImpl=sA});var cD=A(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.InterceptingListenerImpl=Oa.isInterceptingListener=void 0;function I8(o){return o.onReceiveMetadata!==void 0&&o.onReceiveMetadata.length===1}Oa.isInterceptingListener=I8;var cA=class{constructor(e,t){this.listener=e,this.nextListener=t,this.processingMetadata=!1,this.hasPendingMessage=!1,this.processingMessage=!1,this.pendingStatus=null}processPendingMessage(){this.hasPendingMessage&&(this.nextListener.onReceiveMessage(this.pendingMessage),this.pendingMessage=null,this.hasPendingMessage=!1)}processPendingStatus(){this.pendingStatus&&this.nextListener.onReceiveStatus(this.pendingStatus)}onReceiveMetadata(e){this.processingMetadata=!0,this.listener.onReceiveMetadata(e,t=>{this.processingMetadata=!1,this.nextListener.onReceiveMetadata(t),this.processPendingMessage(),this.processPendingStatus()})}onReceiveMessage(e){this.processingMessage=!0,this.listener.onReceiveMessage(e,t=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessage=t,this.hasPendingMessage=!0):(this.nextListener.onReceiveMessage(t),this.processPendingStatus())})}onReceiveStatus(e){this.listener.onReceiveStatus(e,t=>{this.processingMetadata||this.processingMessage?this.pendingStatus=t:this.nextListener.onReceiveStatus(t)})}};Oa.InterceptingListenerImpl=cA});var dA=A(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.getInterceptingCall=nr.InterceptingCall=nr.RequesterBuilder=nr.ListenerBuilder=nr.InterceptorConfigurationError=void 0;var y8=ht(),uD=cD(),ED=Ae(),_D=p_(),Dl=class o extends Error{constructor(e){super(e),this.name="InterceptorConfigurationError",Error.captureStackTrace(this,o)}};nr.InterceptorConfigurationError=Dl;var EA=class{constructor(){this.metadata=void 0,this.message=void 0,this.status=void 0}withOnReceiveMetadata(e){return this.metadata=e,this}withOnReceiveMessage(e){return this.message=e,this}withOnReceiveStatus(e){return this.status=e,this}build(){return{onReceiveMetadata:this.metadata,onReceiveMessage:this.message,onReceiveStatus:this.status}}};nr.ListenerBuilder=EA;var _A=class{constructor(){this.start=void 0,this.message=void 0,this.halfClose=void 0,this.cancel=void 0}withStart(e){return this.start=e,this}withSendMessage(e){return this.message=e,this}withHalfClose(e){return this.halfClose=e,this}withCancel(e){return this.cancel=e,this}build(){return{start:this.start,sendMessage:this.message,halfClose:this.halfClose,cancel:this.cancel}}};nr.RequesterBuilder=_A;var uA={onReceiveMetadata:(o,e)=>{e(o)},onReceiveMessage:(o,e)=>{e(o)},onReceiveStatus:(o,e)=>{e(o)}},yl={start:(o,e,t)=>{t(o,e)},sendMessage:(o,e)=>{e(o)},halfClose:o=>{o()},cancel:o=>{o()}},TA=class{constructor(e,t){var i,a,s,n;this.nextCall=e,this.processingMetadata=!1,this.pendingMessageContext=null,this.processingMessage=!1,this.pendingHalfClose=!1,t?this.requester={start:(i=t.start)!==null&&i!==void 0?i:yl.start,sendMessage:(a=t.sendMessage)!==null&&a!==void 0?a:yl.sendMessage,halfClose:(s=t.halfClose)!==null&&s!==void 0?s:yl.halfClose,cancel:(n=t.cancel)!==null&&n!==void 0?n:yl.cancel}:this.requester=yl}cancelWithStatus(e,t){this.requester.cancel(()=>{this.nextCall.cancelWithStatus(e,t)})}getPeer(){return this.nextCall.getPeer()}processPendingMessage(){this.pendingMessageContext&&(this.nextCall.sendMessageWithContext(this.pendingMessageContext,this.pendingMessage),this.pendingMessageContext=null,this.pendingMessage=null)}processPendingHalfClose(){this.pendingHalfClose&&this.nextCall.halfClose()}start(e,t){var i,a,s,n,r,l;let c={onReceiveMetadata:(a=(i=t==null?void 0:t.onReceiveMetadata)===null||i===void 0?void 0:i.bind(t))!==null&&a!==void 0?a:u=>{},onReceiveMessage:(n=(s=t==null?void 0:t.onReceiveMessage)===null||s===void 0?void 0:s.bind(t))!==null&&n!==void 0?n:u=>{},onReceiveStatus:(l=(r=t==null?void 0:t.onReceiveStatus)===null||r===void 0?void 0:r.bind(t))!==null&&l!==void 0?l:u=>{}};this.processingMetadata=!0,this.requester.start(e,c,(u,E)=>{var d,f,O;this.processingMetadata=!1;let R;if((0,uD.isInterceptingListener)(E))R=E;else{let M={onReceiveMetadata:(d=E.onReceiveMetadata)!==null&&d!==void 0?d:uA.onReceiveMetadata,onReceiveMessage:(f=E.onReceiveMessage)!==null&&f!==void 0?f:uA.onReceiveMessage,onReceiveStatus:(O=E.onReceiveStatus)!==null&&O!==void 0?O:uA.onReceiveStatus};R=new uD.InterceptingListenerImpl(M,c)}this.nextCall.start(u,R),this.processPendingMessage(),this.processPendingHalfClose()})}sendMessageWithContext(e,t){this.processingMessage=!0,this.requester.sendMessage(t,i=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessageContext=e,this.pendingMessage=t):(this.nextCall.sendMessageWithContext(e,i),this.processPendingHalfClose())})}sendMessage(e){this.sendMessageWithContext({},e)}startRead(){this.nextCall.startRead()}halfClose(){this.requester.halfClose(()=>{this.processingMetadata||this.processingMessage?this.pendingHalfClose=!0:this.nextCall.halfClose()})}};nr.InterceptingCall=TA;function D8(o,e,t){var i,a;let s=(i=t.deadline)!==null&&i!==void 0?i:1/0,n=t.host,r=(a=t.parent)!==null&&a!==void 0?a:null,l=t.propagate_flags,c=t.credentials,u=o.createCall(e,s,n,r,l);return c&&u.setCredentials(c),u}var D_=class{constructor(e,t){this.call=e,this.methodDefinition=t}cancelWithStatus(e,t){this.call.cancelWithStatus(e,t)}getPeer(){return this.call.getPeer()}sendMessageWithContext(e,t){let i;try{i=this.methodDefinition.requestSerialize(t)}catch(a){this.call.cancelWithStatus(ED.Status.INTERNAL,`Request message serialization failure: ${(0,_D.getErrorMessage)(a)}`);return}this.call.sendMessageWithContext(e,i)}sendMessage(e){this.sendMessageWithContext({},e)}start(e,t){let i=null;this.call.start(e,{onReceiveMetadata:a=>{var s;(s=t==null?void 0:t.onReceiveMetadata)===null||s===void 0||s.call(t,a)},onReceiveMessage:a=>{var s;let n;try{n=this.methodDefinition.responseDeserialize(a)}catch(r){i={code:ED.Status.INTERNAL,details:`Response message parsing error: ${(0,_D.getErrorMessage)(r)}`,metadata:new y8.Metadata},this.call.cancelWithStatus(i.code,i.details);return}(s=t==null?void 0:t.onReceiveMessage)===null||s===void 0||s.call(t,n)},onReceiveStatus:a=>{var s,n;i?(s=t==null?void 0:t.onReceiveStatus)===null||s===void 0||s.call(t,i):(n=t==null?void 0:t.onReceiveStatus)===null||n===void 0||n.call(t,a)}})}startRead(){this.call.startRead()}halfClose(){this.call.halfClose()}},SA=class extends D_{constructor(e,t){super(e,t)}start(e,t){var i,a;let s=!1,n={onReceiveMetadata:(a=(i=t==null?void 0:t.onReceiveMetadata)===null||i===void 0?void 0:i.bind(t))!==null&&a!==void 0?a:r=>{},onReceiveMessage:r=>{var l;s=!0,(l=t==null?void 0:t.onReceiveMessage)===null||l===void 0||l.call(t,r)},onReceiveStatus:r=>{var l,c;s||(l=t==null?void 0:t.onReceiveMessage)===null||l===void 0||l.call(t,null),(c=t==null?void 0:t.onReceiveStatus)===null||c===void 0||c.call(t,r)}};super.start(e,n),this.call.startRead()}},pA=class extends D_{};function x8(o,e,t){let i=D8(o,t.path,e);return t.responseStream?new pA(i,t):new SA(i,t)}function U8(o,e,t,i){if(o.clientInterceptors.length>0&&o.clientInterceptorProviders.length>0)throw new Dl("Both interceptors and interceptor_providers were passed as options to the client constructor. Only one of these is allowed.");if(o.callInterceptors.length>0&&o.callInterceptorProviders.length>0)throw new Dl("Both interceptors and interceptor_providers were passed as call options. Only one of these is allowed.");let a=[];o.callInterceptors.length>0||o.callInterceptorProviders.length>0?a=[].concat(o.callInterceptors,o.callInterceptorProviders.map(r=>r(e))).filter(r=>r):a=[].concat(o.clientInterceptors,o.clientInterceptorProviders.map(r=>r(e))).filter(r=>r);let s=Object.assign({},t,{method_definition:e});return a.reduceRight((r,l)=>c=>l(c,r),r=>x8(i,r,e))(s)}nr.getInterceptingCall=U8});var hA=A(U_=>{"use strict";Object.defineProperty(U_,"__esModule",{value:!0});U_.Client=void 0;var Br=lD(),b8=vA(),V8=er(),eo=Ae(),Na=ht(),x_=dA(),Ar=Symbol(),Ma=Symbol(),Pa=Symbol(),_n=Symbol();function fA(o){return typeof o=="function"}function Ca(o){var e;return((e=o.stack)===null||e===void 0?void 0:e.split(` `).slice(1).join(` `))||"no stack trace available"}var AA=class{constructor(e,t,i={}){var a,s;if(i=Object.assign({},i),this[Ma]=(a=i.interceptors)!==null&&a!==void 0?a:[],delete i.interceptors,this[Pa]=(s=i.interceptor_providers)!==null&&s!==void 0?s:[],delete i.interceptor_providers,this[Ma].length>0&&this[Pa].length>0)throw new Error("Both interceptors and interceptor_providers were passed as options to the client constructor. Only one of these is allowed.");if(this[_n]=i.callInvocationTransformer,delete i.callInvocationTransformer,i.channelOverride)this[Ar]=i.channelOverride;else if(i.channelFactoryOverride){let n=i.channelFactoryOverride;delete i.channelFactoryOverride,this[Ar]=n(e,t,i)}else this[Ar]=new b8.ChannelImplementation(e,t,i)}close(){this[Ar].close()}getChannel(){return this[Ar]}waitForReady(e,t){let i=a=>{if(a){t(new Error("Failed to connect before the deadline"));return}let s;try{s=this[Ar].getConnectivityState(!0)}catch{t(new Error("The channel has been closed"));return}if(s===V8.ConnectivityState.READY)t();else try{this[Ar].watchConnectivityState(s,e,i)}catch{t(new Error("The channel has been closed"))}};setImmediate(i)}checkOptionalUnaryResponseArguments(e,t,i){if(fA(e))return{metadata:new Na.Metadata,options:{},callback:e};if(fA(t))return e instanceof Na.Metadata?{metadata:e,options:{},callback:t}:{metadata:new Na.Metadata,options:e,callback:t};if(!(e instanceof Na.Metadata&&t instanceof Object&&fA(i)))throw new Error("Incorrect arguments passed");return{metadata:e,options:t,callback:i}}makeUnaryRequest(e,t,i,a,s,n,r){var l,c;let u=this.checkOptionalUnaryResponseArguments(s,n,r),E={path:e,requestStream:!1,responseStream:!1,requestSerialize:t,responseDeserialize:i},d={argument:a,metadata:u.metadata,call:new Br.ClientUnaryCallImpl,channel:this[Ar],methodDefinition:E,callOptions:u.options,callback:u.callback};this[_n]&&(d=this[_n](d));let f=d.call,O={clientInterceptors:this[Ma],clientInterceptorProviders:this[Pa],callInterceptors:(l=d.callOptions.interceptors)!==null&&l!==void 0?l:[],callInterceptorProviders:(c=d.callOptions.interceptor_providers)!==null&&c!==void 0?c:[]},R=(0,x_.getInterceptingCall)(O,d.methodDefinition,d.callOptions,d.channel);f.call=R;let M=null,P=!1,C=new Error;return R.start(d.metadata,{onReceiveMetadata:b=>{f.emit("metadata",b)},onReceiveMessage(b){M!==null&&R.cancelWithStatus(eo.Status.INTERNAL,"Too many responses received"),M=b},onReceiveStatus(b){if(!P){if(P=!0,b.code===eo.Status.OK)if(M===null){let y=Ca(C);d.callback((0,Br.callErrorFromStatus)({code:eo.Status.INTERNAL,details:"No message received",metadata:b.metadata},y))}else d.callback(null,M);else{let y=Ca(C);d.callback((0,Br.callErrorFromStatus)(b,y))}C=null,f.emit("status",b)}}}),R.sendMessage(a),R.halfClose(),f}makeClientStreamRequest(e,t,i,a,s,n){var r,l;let c=this.checkOptionalUnaryResponseArguments(a,s,n),u={path:e,requestStream:!0,responseStream:!1,requestSerialize:t,responseDeserialize:i},E={metadata:c.metadata,call:new Br.ClientWritableStreamImpl(t),channel:this[Ar],methodDefinition:u,callOptions:c.options,callback:c.callback};this[_n]&&(E=this[_n](E));let d=E.call,f={clientInterceptors:this[Ma],clientInterceptorProviders:this[Pa],callInterceptors:(r=E.callOptions.interceptors)!==null&&r!==void 0?r:[],callInterceptorProviders:(l=E.callOptions.interceptor_providers)!==null&&l!==void 0?l:[]},O=(0,x_.getInterceptingCall)(f,E.methodDefinition,E.callOptions,E.channel);d.call=O;let R=null,M=!1,P=new Error;return O.start(E.metadata,{onReceiveMetadata:C=>{d.emit("metadata",C)},onReceiveMessage(C){R!==null&&O.cancelWithStatus(eo.Status.INTERNAL,"Too many responses received"),R=C},onReceiveStatus(C){if(!M){if(M=!0,C.code===eo.Status.OK)if(R===null){let b=Ca(P);E.callback((0,Br.callErrorFromStatus)({code:eo.Status.INTERNAL,details:"No message received",metadata:C.metadata},b))}else E.callback(null,R);else{let b=Ca(P);E.callback((0,Br.callErrorFromStatus)(C,b))}P=null,d.emit("status",C)}}}),d}checkMetadataAndOptions(e,t){let i,a;return e instanceof Na.Metadata?(i=e,t?a=t:a={}):(e?a=e:a={},i=new Na.Metadata),{metadata:i,options:a}}makeServerStreamRequest(e,t,i,a,s,n){var r,l;let c=this.checkMetadataAndOptions(s,n),u={path:e,requestStream:!1,responseStream:!0,requestSerialize:t,responseDeserialize:i},E={argument:a,metadata:c.metadata,call:new Br.ClientReadableStreamImpl(i),channel:this[Ar],methodDefinition:u,callOptions:c.options};this[_n]&&(E=this[_n](E));let d=E.call,f={clientInterceptors:this[Ma],clientInterceptorProviders:this[Pa],callInterceptors:(r=E.callOptions.interceptors)!==null&&r!==void 0?r:[],callInterceptorProviders:(l=E.callOptions.interceptor_providers)!==null&&l!==void 0?l:[]},O=(0,x_.getInterceptingCall)(f,E.methodDefinition,E.callOptions,E.channel);d.call=O;let R=!1,M=new Error;return O.start(E.metadata,{onReceiveMetadata(P){d.emit("metadata",P)},onReceiveMessage(P){d.push(P)},onReceiveStatus(P){if(!R){if(R=!0,d.push(null),P.code!==eo.Status.OK){let C=Ca(M);d.emit("error",(0,Br.callErrorFromStatus)(P,C))}M=null,d.emit("status",P)}}}),O.sendMessage(a),O.halfClose(),d}makeBidiStreamRequest(e,t,i,a,s){var n,r;let l=this.checkMetadataAndOptions(a,s),c={path:e,requestStream:!0,responseStream:!0,requestSerialize:t,responseDeserialize:i},u={metadata:l.metadata,call:new Br.ClientDuplexStreamImpl(t,i),channel:this[Ar],methodDefinition:c,callOptions:l.options};this[_n]&&(u=this[_n](u));let E=u.call,d={clientInterceptors:this[Ma],clientInterceptorProviders:this[Pa],callInterceptors:(n=u.callOptions.interceptors)!==null&&n!==void 0?n:[],callInterceptorProviders:(r=u.callOptions.interceptor_providers)!==null&&r!==void 0?r:[]},f=(0,x_.getInterceptingCall)(d,u.methodDefinition,u.callOptions,u.channel);E.call=f;let O=!1,R=new Error;return f.start(u.metadata,{onReceiveMetadata(M){E.emit("metadata",M)},onReceiveMessage(M){E.push(M)},onReceiveStatus(M){if(!O){if(O=!0,E.push(null),M.code!==eo.Status.OK){let P=Ca(R);E.emit("error",(0,Br.callErrorFromStatus)(M,P))}R=null,E.emit("status",M)}}}),E}};U_.Client=AA});var mA=A(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.loadPackageDefinition=ga.makeClientConstructor=void 0;var xl=hA(),w8={unary:xl.Client.prototype.makeUnaryRequest,server_stream:xl.Client.prototype.makeServerStreamRequest,client_stream:xl.Client.prototype.makeClientStreamRequest,bidi:xl.Client.prototype.makeBidiStreamRequest};function RA(o){return["__proto__","prototype","constructor"].includes(o)}function TD(o,e,t){t||(t={});class i extends xl.Client{}return Object.keys(o).forEach(a=>{if(RA(a))return;let s=o[a],n;if(typeof a=="string"&&a.charAt(0)==="$")throw new Error("Method names cannot start with $");s.requestStream?s.responseStream?n="bidi":n="client_stream":s.responseStream?n="server_stream":n="unary";let r=s.requestSerialize,l=s.responseDeserialize,c=B8(w8[n],s.path,r,l);i.prototype[a]=c,Object.assign(i.prototype[a],s),s.originalName&&!RA(s.originalName)&&(i.prototype[s.originalName]=i.prototype[a])}),i.service=o,i.serviceName=e,i}ga.makeClientConstructor=TD;function B8(o,e,t,i){return function(...a){return o.call(this,e,t,i,...a)}}function G8(o){return"format"in o}function k8(o){let e={};for(let t in o)if(Object.prototype.hasOwnProperty.call(o,t)){let i=o[t],a=t.split(".");if(a.some(r=>RA(r)))continue;let s=a[a.length-1],n=e;for(let r of a.slice(0,-1))n[r]||(n[r]={}),n=n[r];G8(i)?n[s]=i:n[s]=TD(i,s,{})}return e}ga.loadPackageDefinition=k8});var BD=A((WMe,wD)=>{var H8=1/0,Y8="[object Symbol]",F8=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,K8=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,V_="\\ud800-\\udfff",RD="\\u0300-\\u036f\\ufe20-\\ufe23",mD="\\u20d0-\\u20f0",OD="\\u2700-\\u27bf",ND="a-z\\xdf-\\xf6\\xf8-\\xff",q8="\\xac\\xb1\\xd7\\xf7",W8="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",j8="\\u2000-\\u206f",z8=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",MD="A-Z\\xc0-\\xd6\\xd8-\\xde",PD="\\ufe0e\\ufe0f",CD=q8+W8+j8+z8,NA="['\u2019]",X8="["+V_+"]",SD="["+CD+"]",b_="["+RD+mD+"]",gD="\\d+",$8="["+OD+"]",LD="["+ND+"]",ID="[^"+V_+CD+gD+OD+ND+MD+"]",OA="\\ud83c[\\udffb-\\udfff]",J8="(?:"+b_+"|"+OA+")",yD="[^"+V_+"]",MA="(?:\\ud83c[\\udde6-\\uddff]){2}",PA="[\\ud800-\\udbff][\\udc00-\\udfff]",La="["+MD+"]",DD="\\u200d",pD="(?:"+LD+"|"+ID+")",Q8="(?:"+La+"|"+ID+")",dD="(?:"+NA+"(?:d|ll|m|re|s|t|ve))?",fD="(?:"+NA+"(?:D|LL|M|RE|S|T|VE))?",xD=J8+"?",UD="["+PD+"]?",Z8="(?:"+DD+"(?:"+[yD,MA,PA].join("|")+")"+UD+xD+")*",bD=UD+xD+Z8,ez="(?:"+[$8,MA,PA].join("|")+")"+bD,tz="(?:"+[yD+b_+"?",b_,MA,PA,X8].join("|")+")",rz=RegExp(NA,"g"),nz=RegExp(b_,"g"),oz=RegExp(OA+"(?="+OA+")|"+tz+bD,"g"),iz=RegExp([La+"?"+LD+"+"+dD+"(?="+[SD,La,"$"].join("|")+")",Q8+"+"+fD+"(?="+[SD,La+pD,"$"].join("|")+")",La+"?"+pD+"+"+dD,La+"+"+fD,gD,ez].join("|"),"g"),az=RegExp("["+DD+V_+RD+mD+PD+"]"),sz=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,lz={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"ss"},cz=typeof global=="object"&&global&&global.Object===Object&&global,uz=typeof self=="object"&&self&&self.Object===Object&&self,Ez=cz||uz||Function("return this")();function _z(o,e,t,i){var a=-1,s=o?o.length:0;for(i&&s&&(t=o[++a]);++a<s;)t=e(t,o[a],a,o);return t}function Tz(o){return o.split("")}function Sz(o){return o.match(F8)||[]}function pz(o){return function(e){return o==null?void 0:o[e]}}var dz=pz(lz);function VD(o){return az.test(o)}function fz(o){return sz.test(o)}function Az(o){return VD(o)?hz(o):Tz(o)}function hz(o){return o.match(oz)||[]}function vz(o){return o.match(iz)||[]}var Rz=Object.prototype,mz=Rz.toString,AD=Ez.Symbol,hD=AD?AD.prototype:void 0,vD=hD?hD.toString:void 0;function Oz(o,e,t){var i=-1,a=o.length;e<0&&(e=-e>a?0:a+e),t=t>a?a:t,t<0&&(t+=a),a=e>t?0:t-e>>>0,e>>>=0;for(var s=Array(a);++i<a;)s[i]=o[i+e];return s}function Nz(o){if(typeof o=="string")return o;if(Lz(o))return vD?vD.call(o):"";var e=o+"";return e=="0"&&1/o==-H8?"-0":e}function Mz(o,e,t){var i=o.length;return t=t===void 0?i:t,!e&&t>=i?o:Oz(o,e,t)}function Pz(o){return function(e){e=w_(e);var t=VD(e)?Az(e):void 0,i=t?t[0]:e.charAt(0),a=t?Mz(t,1).join(""):e.slice(1);return i[o]()+a}}function Cz(o){return function(e){return _z(Uz(Dz(e).replace(rz,"")),o,"")}}function gz(o){return!!o&&typeof o=="object"}function Lz(o){return typeof o=="symbol"||gz(o)&&mz.call(o)==Y8}function w_(o){return o==null?"":Nz(o)}var Iz=Cz(function(o,e,t){return e=e.toLowerCase(),o+(t?yz(e):e)});function yz(o){return xz(w_(o).toLowerCase())}function Dz(o){return o=w_(o),o&&o.replace(K8,dz).replace(nz,"")}var xz=Pz("toUpperCase");function Uz(o,e,t){return o=w_(o),e=t?void 0:e,e===void 0?fz(o)?vz(o):Sz(o):o.match(e)||[]}wD.exports=Iz});var kD=A((jMe,GD)=>{"use strict";GD.exports=CA;function CA(o,e){typeof o=="string"&&(e=o,o=void 0);var t=[];function i(s){if(typeof s!="string"){var n=a();if(CA.verbose&&console.log("codegen: "+n),n="return "+n,s){for(var r=Object.keys(s),l=new Array(r.length+1),c=new Array(r.length),u=0;u<r.length;)l[u]=r[u],c[u]=s[r[u++]];return l[u]=n,Function.apply(null,l).apply(null,c)}return Function(n)()}for(var E=new Array(arguments.length-1),d=0;d<E.length;)E[d]=arguments[++d];if(d=0,s=s.replace(/%([%dfijs])/g,function(O,R){var M=E[d++];switch(R){case"d":case"f":return String(Number(M));case"i":return String(Math.floor(M));case"j":return JSON.stringify(M);case"s":return String(M)}return"%"}),d!==E.length)throw Error("parameter count mismatch");return t.push(s),i}function a(s){return"function "+(s||e||"")+"("+(o&&o.join(",")||"")+`){ `+t.join(` `)+` }`}return i.toString=a,i}CA.verbose=!1});var YD=A((zMe,HD)=>{"use strict";HD.exports=Ul;var bz=Tf(),Vz=Sf(),gA=Vz("fs");function Ul(o,e,t){return typeof e=="function"?(t=e,e={}):e||(e={}),t?!e.xhr&&gA&&gA.readFile?gA.readFile(o,function(a,s){return a&&typeof XMLHttpRequest<"u"?Ul.xhr(o,e,t):a?t(a):t(null,e.binary?s:s.toString("utf8"))}):Ul.xhr(o,e,t):bz(Ul,this,o,e)}Ul.xhr=function(e,t,i){var a=new XMLHttpRequest;a.onreadystatechange=function(){if(a.readyState===4){if(a.status!==0&&a.status!==200)return i(Error("status "+a.status));if(t.binary){var n=a.response;if(!n){n=[];for(var r=0;r<a.responseText.length;++r)n.push(a.responseText.charCodeAt(r)&255)}return i(null,typeof Uint8Array<"u"?new Uint8Array(n):n)}return i(null,a.responseText)}},t.binary&&("overrideMimeType"in a&&a.overrideMimeType("text/plain; charset=x-user-defined"),a.responseType="arraybuffer"),a.open("GET",e),a.send()}});var qD=A(KD=>{"use strict";var IA=KD,FD=IA.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},LA=IA.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),i=FD(e),a="";i&&(a=t.shift()+"/");for(var s=0;s<t.length;)t[s]===".."?s>0&&t[s-1]!==".."?t.splice(--s,2):i?t.splice(s,1):++s:t[s]==="."?t.splice(s,1):++s;return a+t.join("/")};IA.resolve=function(e,t,i){return i||(t=LA(t)),FD(t)?t:(i||(e=LA(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?LA(e+"/"+t):t)}});var qo=A(WD=>{"use strict";var bl=WD,wz=Je(),Bz=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function Vl(o,e){var t=0,i={};for(e|=0;t<o.length;)i[Bz[t+e]]=o[t++];return i}bl.basic=Vl([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]);bl.defaults=Vl([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",wz.emptyArray,null]);bl.long=Vl([0,0,0,1,1],7);bl.mapKey=Vl([0,0,0,5,5,0,0,0,1,1,0,2],2);bl.packed=Vl([1,5,0,0,0,5,5,0,0,0,1,1,0])});var to=A((JMe,XD)=>{"use strict";XD.exports=or;var B_=Wo();((or.prototype=Object.create(B_.prototype)).constructor=or).className="Field";var jD=hr(),zD=qo(),ke=Je(),yA,Gz=/^required|optional|repeated$/;or.fromJSON=function(e,t){return new or(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)};function or(o,e,t,i,a,s,n){if(ke.isObject(i)?(n=a,s=i,i=a=void 0):ke.isObject(a)&&(n=s,s=a,a=void 0),B_.call(this,o,s),!ke.isInteger(e)||e<0)throw TypeError("id must be a non-negative integer");if(!ke.isString(t))throw TypeError("type must be a string");if(i!==void 0&&!Gz.test(i=i.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(a!==void 0&&!ke.isString(a))throw TypeError("extend must be a string");i==="proto3_optional"&&(i="optional"),this.rule=i&&i!=="optional"?i:void 0,this.type=t,this.id=e,this.extend=a||void 0,this.required=i==="required",this.optional=!this.required,this.repeated=i==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=ke.Long?zD.long[t]!==void 0:!1,this.bytes=t==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=n}Object.defineProperty(or.prototype,"packed",{get:function(){return this._packed===null&&(this._packed=this.getOption("packed")!==!1),this._packed}});or.prototype.setOption=function(e,t,i){return e==="packed"&&(this._packed=null),B_.prototype.setOption.call(this,e,t,i)};or.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return ke.toObject(["rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])};or.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=zD.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof yA?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&this.options.default!=null&&(this.typeDefault=this.options.default,this.resolvedType instanceof jD&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&((this.options.packed===!0||this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof jD))&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=ke.Long.fromNumber(this.typeDefault,this.type.charAt(0)==="u"),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&typeof this.typeDefault=="string"){var e;ke.base64.test(this.typeDefault)?ke.base64.decode(this.typeDefault,e=ke.newBuffer(ke.base64.length(this.typeDefault)),0):ke.utf8.write(this.typeDefault,e=ke.newBuffer(ke.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=ke.emptyObject:this.repeated?this.defaultValue=ke.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof yA&&(this.parent.ctor.prototype[this.name]=this.defaultValue),B_.prototype.resolve.call(this)};or.d=function(e,t,i,a){return typeof t=="function"?t=ke.decorateType(t).name:t&&typeof t=="object"&&(t=ke.decorateEnum(t).name),function(n,r){ke.decorateType(n.constructor).add(new or(r,e,t,i,{default:a}))}};or._configure=function(e){yA=e}});var Ia=A((QMe,QD)=>{"use strict";QD.exports=ir;var k_=Wo();((ir.prototype=Object.create(k_.prototype)).constructor=ir).className="OneOf";var $D=to(),G_=Je();function ir(o,e,t,i){if(Array.isArray(e)||(t=e,e=void 0),k_.call(this,o,t),!(e===void 0||Array.isArray(e)))throw TypeError("fieldNames must be an Array");this.oneof=e||[],this.fieldsArray=[],this.comment=i}ir.fromJSON=function(e,t){return new ir(e,t.oneof,t.options,t.comment)};ir.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return G_.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])};function JD(o){if(o.parent)for(var e=0;e<o.fieldsArray.length;++e)o.fieldsArray[e].parent||o.parent.add(o.fieldsArray[e])}ir.prototype.add=function(e){if(!(e instanceof $D))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,JD(this),this};ir.prototype.remove=function(e){if(!(e instanceof $D))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),t=this.oneof.indexOf(e.name),t>-1&&this.oneof.splice(t,1),e.partOf=null,this};ir.prototype.onAdd=function(e){k_.prototype.onAdd.call(this,e);for(var t=this,i=0;i<this.oneof.length;++i){var a=e.get(this.oneof[i]);a&&!a.partOf&&(a.partOf=t,t.fieldsArray.push(a))}JD(this)};ir.prototype.onRemove=function(e){for(var t=0,i;t<this.fieldsArray.length;++t)(i=this.fieldsArray[t]).parent&&i.parent.remove(i);k_.prototype.onRemove.call(this,e)};ir.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(a,s){G_.decorateType(a.constructor).add(new ir(s,e)),Object.defineProperty(a,s,{get:G_.oneOfGetter(e),set:G_.oneOfSetter(e)})}}});var xa=A((ZMe,rx)=>{"use strict";rx.exports=he;var DA=Wo();((he.prototype=Object.create(DA.prototype)).constructor=he).className="Namespace";var ZD=to(),H_=Je(),kz=Ia(),ya,wl,Da;he.fromJSON=function(e,t){return new he(e,t.options).addJSON(t.nested)};function ex(o,e){if(o&&o.length){for(var t={},i=0;i<o.length;++i)t[o[i].name]=o[i].toJSON(e);return t}}he.arrayToJSON=ex;he.isReservedId=function(e,t){if(e){for(var i=0;i<e.length;++i)if(typeof e[i]!="string"&&e[i][0]<=t&&e[i][1]>t)return!0}return!1};he.isReservedName=function(e,t){if(e){for(var i=0;i<e.length;++i)if(e[i]===t)return!0}return!1};function he(o,e){DA.call(this,o,e),this.nested=void 0,this._nestedArray=null}function tx(o){return o._nestedArray=null,o}Object.defineProperty(he.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=H_.toArray(this.nested))}});he.prototype.toJSON=function(e){return H_.toObject(["options",this.options,"nested",ex(this.nestedArray,e)])};he.prototype.addJSON=function(e){var t=this;if(e)for(var i=Object.keys(e),a=0,s;a<i.length;++a)s=e[i[a]],t.add((s.fields!==void 0?ya.fromJSON:s.values!==void 0?Da.fromJSON:s.methods!==void 0?wl.fromJSON:s.id!==void 0?ZD.fromJSON:he.fromJSON)(i[a],s));return this};he.prototype.get=function(e){return this.nested&&this.nested[e]||null};he.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof Da)return this.nested[e].values;throw Error("no such enum: "+e)};he.prototype.add=function(e){if(!(e instanceof ZD&&e.extend!==void 0||e instanceof ya||e instanceof kz||e instanceof Da||e instanceof wl||e instanceof he))throw TypeError("object must be a valid nested object");if(!this.nested)this.nested={};else{var t=this.get(e.name);if(t)if(t instanceof he&&e instanceof he&&!(t instanceof ya||t instanceof wl)){for(var i=t.nestedArray,a=0;a<i.length;++a)e.add(i[a]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}else throw Error("duplicate name '"+e.name+"' in "+this)}return this.nested[e.name]=e,e.onAdd(this),tx(this)};he.prototype.remove=function(e){if(!(e instanceof DA))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),tx(this)};he.prototype.define=function(e,t){if(H_.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&e[0]==="")throw Error("path must be relative");for(var i=this;e.length>0;){var a=e.shift();if(i.nested&&i.nested[a]){if(i=i.nested[a],!(i instanceof he))throw Error("path conflicts with non-namespace objects")}else i.add(i=new he(a))}return t&&i.addJSON(t),i};he.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof he?e[t++].resolveAll():e[t++].resolve();return this.resolve()};he.prototype.lookup=function(e,t,i){if(typeof t=="boolean"?(i=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),H_.isString(e)&&e.length){if(e===".")return this.root;e=e.split(".")}else if(!e.length)return this;if(e[0]==="")return this.root.lookup(e.slice(1),t);var a=this.get(e[0]);if(a){if(e.length===1){if(!t||t.indexOf(a.constructor)>-1)return a}else if(a instanceof he&&(a=a.lookup(e.slice(1),t,!0)))return a}else for(var s=0;s<this.nestedArray.length;++s)if(this._nestedArray[s]instanceof he&&(a=this._nestedArray[s].lookup(e,t,!0)))return a;return this.parent===null||i?null:this.parent.lookup(e,t)};he.prototype.lookupType=function(e){var t=this.lookup(e,[ya]);if(!t)throw Error("no such type: "+e);return t};he.prototype.lookupEnum=function(e){var t=this.lookup(e,[Da]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t};he.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[ya,Da]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t};he.prototype.lookupService=function(e){var t=this.lookup(e,[wl]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t};he._configure=function(o,e,t){ya=o,wl=e,Da=t}});var Y_=A((ePe,nx)=>{"use strict";nx.exports=Tn;var xA=to();((Tn.prototype=Object.create(xA.prototype)).constructor=Tn).className="MapField";var Hz=qo(),Bl=Je();function Tn(o,e,t,i,a,s){if(xA.call(this,o,e,i,void 0,void 0,a,s),!Bl.isString(t))throw TypeError("keyType must be a string");this.keyType=t,this.resolvedKeyType=null,this.map=!0}Tn.fromJSON=function(e,t){return new Tn(e,t.id,t.keyType,t.type,t.options,t.comment)};Tn.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return Bl.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])};Tn.prototype.resolve=function(){if(this.resolved)return this;if(Hz.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return xA.prototype.resolve.call(this)};Tn.d=function(e,t,i){return typeof i=="function"?i=Bl.decorateType(i).name:i&&typeof i=="object"&&(i=Bl.decorateEnum(i).name),function(s,n){Bl.decorateType(s.constructor).add(new Tn(n,e,t,i))}}});var F_=A((tPe,ox)=>{"use strict";ox.exports=jo;var UA=Wo();((jo.prototype=Object.create(UA.prototype)).constructor=jo).className="Method";var Ua=Je();function jo(o,e,t,i,a,s,n,r,l){if(Ua.isObject(a)?(n=a,a=s=void 0):Ua.isObject(s)&&(n=s,s=void 0),!(e===void 0||Ua.isString(e)))throw TypeError("type must be a string");if(!Ua.isString(t))throw TypeError("requestType must be a string");if(!Ua.isString(i))throw TypeError("responseType must be a string");UA.call(this,o,n),this.type=e||"rpc",this.requestType=t,this.requestStream=a?!0:void 0,this.responseType=i,this.responseStream=s?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=r,this.parsedOptions=l}jo.fromJSON=function(e,t){return new jo(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)};jo.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return Ua.toObject(["type",this.type!=="rpc"&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])};jo.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),UA.prototype.resolve.call(this))}});var K_=A((rPe,ax)=>{"use strict";ax.exports=ar;var ro=xa();((ar.prototype=Object.create(ro.prototype)).constructor=ar).className="Service";var bA=F_(),Gl=Je(),Yz=Pf();function ar(o,e){ro.call(this,o,e),this.methods={},this._methodsArray=null}ar.fromJSON=function(e,t){var i=new ar(e,t.options);if(t.methods)for(var a=Object.keys(t.methods),s=0;s<a.length;++s)i.add(bA.fromJSON(a[s],t.methods[a[s]]));return t.nested&&i.addJSON(t.nested),i.comment=t.comment,i};ar.prototype.toJSON=function(e){var t=ro.prototype.toJSON.call(this,e),i=e?!!e.keepComments:!1;return Gl.toObject(["options",t&&t.options||void 0,"methods",ro.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",i?this.comment:void 0])};Object.defineProperty(ar.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=Gl.toArray(this.methods))}});function ix(o){return o._methodsArray=null,o}ar.prototype.get=function(e){return this.methods[e]||ro.prototype.get.call(this,e)};ar.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return ro.prototype.resolve.call(this)};ar.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof bA?(this.methods[e.name]=e,e.parent=this,ix(this)):ro.prototype.add.call(this,e)};ar.prototype.remove=function(e){if(e instanceof bA){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,ix(this)}return ro.prototype.remove.call(this,e)};ar.prototype.create=function(e,t,i){for(var a=new Yz.Service(e,t,i),s=0,n;s<this.methodsArray.length;++s){var r=Gl.lcFirst((n=this._methodsArray[s]).resolve().name).replace(/[^$\w_]/g,"");a[r]=Gl.codegen(["r","c"],Gl.isReserved(r)?r+"_":r)("return this.rpcCall(m,q,s,r,c)")({m:n,q:n.resolvedRequestType.ctor,s:n.resolvedResponseType.ctor})}return a}});var q_=A((nPe,sx)=>{"use strict";sx.exports=Gr;var Fz=Ur();function Gr(o){if(o)for(var e=Object.keys(o),t=0;t<e.length;++t)this[e[t]]=o[e[t]]}Gr.create=function(e){return this.$type.create(e)};Gr.encode=function(e,t){return this.$type.encode(e,t)};Gr.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)};Gr.decode=function(e){return this.$type.decode(e)};Gr.decodeDelimited=function(e){return this.$type.decodeDelimited(e)};Gr.verify=function(e){return this.$type.verify(e)};Gr.fromObject=function(e){return this.$type.fromObject(e)};Gr.toObject=function(e,t){return this.$type.toObject(e,t)};Gr.prototype.toJSON=function(){return this.$type.toObject(this,Fz.toJSONOptions)}});var VA=A((oPe,cx)=>{"use strict";cx.exports=Wz;var Kz=hr(),Sn=qo(),lx=Je();function qz(o){return"missing required '"+o.name+"'"}function Wz(o){var e=lx.codegen(["r","l"],o.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(o.fieldsArray.filter(function(r){return r.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");o.group&&e("if((t&7)===4)")("break"),e("switch(t>>>3){");for(var t=0;t<o.fieldsArray.length;++t){var i=o._fieldsArray[t].resolve(),a=i.resolvedType instanceof Kz?"int32":i.type,s="m"+lx.safeProp(i.name);e("case %i: {",i.id),i.map?(e("if(%s===util.emptyObject)",s)("%s={}",s)("var c2 = r.uint32()+r.pos"),Sn.defaults[i.keyType]!==void 0?e("k=%j",Sn.defaults[i.keyType]):e("k=null"),Sn.defaults[a]!==void 0?e("value=%j",Sn.defaults[a]):e("value=null"),e("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",i.keyType)("case 2:"),Sn.basic[a]===void 0?e("value=types[%i].decode(r,r.uint32())",t):e("value=r.%s()",a),e("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),Sn.long[i.keyType]!==void 0?e('%s[typeof k==="object"?util.longToHash(k):k]=value',s):e("%s[k]=value",s)):i.repeated?(e("if(!(%s&&%s.length))",s,s)("%s=[]",s),Sn.packed[a]!==void 0&&e("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",s,a)("}else"),Sn.basic[a]===void 0?e(i.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",s,t):e("%s.push(r.%s())",s,a)):Sn.basic[a]===void 0?e(i.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",s,t):e("%s=r.%s()",s,a),e("break")("}")}for(e("default:")("r.skipType(t&7)")("break")("}")("}"),t=0;t<o._fieldsArray.length;++t){var n=o._fieldsArray[t];n.required&&e("if(!m.hasOwnProperty(%j))",n.name)("throw util.ProtocolError(%j,{instance:m})",qz(n))}return e("return m")}});var GA=A((iPe,ux)=>{"use strict";ux.exports=Xz;var jz=hr(),wA=Je();function sr(o,e){return o.name+": "+e+(o.repeated&&e!=="array"?"[]":o.map&&e!=="object"?"{k:"+o.keyType+"}":"")+" expected"}function BA(o,e,t,i){if(e.resolvedType)if(e.resolvedType instanceof jz){o("switch(%s){",i)("default:")("return%j",sr(e,"enum value"));for(var a=Object.keys(e.resolvedType.values),s=0;s<a.length;++s)o("case %i:",e.resolvedType.values[a[s]]);o("break")("}")}else o("{")("var e=types[%i].verify(%s);",t,i)("if(e)")("return%j+e",e.name+".")("}");else switch(e.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":o("if(!util.isInteger(%s))",i)("return%j",sr(e,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":o("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",i,i,i,i)("return%j",sr(e,"integer|Long"));break;case"float":case"double":o('if(typeof %s!=="number")',i)("return%j",sr(e,"number"));break;case"bool":o('if(typeof %s!=="boolean")',i)("return%j",sr(e,"boolean"));break;case"string":o("if(!util.isString(%s))",i)("return%j",sr(e,"string"));break;case"bytes":o('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",sr(e,"buffer"));break}return o}function zz(o,e,t){switch(e.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":o("if(!util.key32Re.test(%s))",t)("return%j",sr(e,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":o("if(!util.key64Re.test(%s))",t)("return%j",sr(e,"integer|Long key"));break;case"bool":o("if(!util.key2Re.test(%s))",t)("return%j",sr(e,"boolean key"));break}return o}function Xz(o){var e=wA.codegen(["m"],o.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),t=o.oneofsArray,i={};t.length&&e("var p={}");for(var a=0;a<o.fieldsArray.length;++a){var s=o._fieldsArray[a].resolve(),n="m"+wA.safeProp(s.name);if(s.optional&&e("if(%s!=null&&m.hasOwnProperty(%j)){",n,s.name),s.map)e("if(!util.isObject(%s))",n)("return%j",sr(s,"object"))("var k=Object.keys(%s)",n)("for(var i=0;i<k.length;++i){"),zz(e,s,"k[i]"),BA(e,s,a,n+"[k[i]]")("}");else if(s.repeated)e("if(!Array.isArray(%s))",n)("return%j",sr(s,"array"))("for(var i=0;i<%s.length;++i){",n),BA(e,s,a,n+"[i]")("}");else{if(s.partOf){var r=wA.safeProp(s.partOf.name);i[s.partOf.name]===1&&e("if(p%s===1)",r)("return%j",s.partOf.name+": multiple values"),i[s.partOf.name]=1,e("p%s=1",r)}BA(e,s,a,n)}s.optional&&e("}")}return e("return null")}});var YA=A(_x=>{"use strict";var Ex=_x,kl=hr(),kr=Je();function kA(o,e,t,i){var a=!1;if(e.resolvedType)if(e.resolvedType instanceof kl){o("switch(d%s){",i);for(var s=e.resolvedType.values,n=Object.keys(s),r=0;r<n.length;++r)s[n[r]]===e.typeDefault&&!a&&(o("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',i,i,i),e.repeated||o("break"),a=!0),o("case%j:",n[r])("case %i:",s[n[r]])("m%s=%j",i,s[n[r]])("break");o("}")}else o('if(typeof d%s!=="object")',i)("throw TypeError(%j)",e.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",i,t,i);else{var l=!1;switch(e.type){case"double":case"float":o("m%s=Number(d%s)",i,i);break;case"uint32":case"fixed32":o("m%s=d%s>>>0",i,i);break;case"int32":case"sint32":case"sfixed32":o("m%s=d%s|0",i,i);break;case"uint64":l=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":o("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",i,i,l)('else if(typeof d%s==="string")',i)("m%s=parseInt(d%s,10)",i,i)('else if(typeof d%s==="number")',i)("m%s=d%s",i,i)('else if(typeof d%s==="object")',i)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",i,i,i,l?"true":"");break;case"bytes":o('if(typeof d%s==="string")',i)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",i,i,i)("else if(d%s.length >= 0)",i)("m%s=d%s",i,i);break;case"string":o("m%s=String(d%s)",i,i);break;case"bool":o("m%s=Boolean(d%s)",i,i);break}}return o}Ex.fromObject=function(e){var t=e.fieldsArray,i=kr.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return i("return new this.ctor");i("var m=new this.ctor");for(var a=0;a<t.length;++a){var s=t[a].resolve(),n=kr.safeProp(s.name);s.map?(i("if(d%s){",n)('if(typeof d%s!=="object")',n)("throw TypeError(%j)",s.fullName+": object expected")("m%s={}",n)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",n),kA(i,s,a,n+"[ks[i]]")("}")("}")):s.repeated?(i("if(d%s){",n)("if(!Array.isArray(d%s))",n)("throw TypeError(%j)",s.fullName+": array expected")("m%s=[]",n)("for(var i=0;i<d%s.length;++i){",n),kA(i,s,a,n+"[i]")("}")("}")):(s.resolvedType instanceof kl||i("if(d%s!=null){",n),kA(i,s,a,n),s.resolvedType instanceof kl||i("}"))}return i("return m")};function HA(o,e,t,i){if(e.resolvedType)e.resolvedType instanceof kl?o("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",i,t,i,i,t,i,i):o("d%s=types[%i].toObject(m%s,o)",i,t,i);else{var a=!1;switch(e.type){case"double":case"float":o("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",i,i,i,i);break;case"uint64":a=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":o('if(typeof m%s==="number")',i)("d%s=o.longs===String?String(m%s):m%s",i,i,i)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",i,i,i,i,a?"true":"",i);break;case"bytes":o("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",i,i,i,i,i);break;default:o("d%s=m%s",i,i);break}}return o}Ex.toObject=function(e){var t=e.fieldsArray.slice().sort(kr.compareFieldsById);if(!t.length)return kr.codegen()("return {}");for(var i=kr.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),a=[],s=[],n=[],r=0;r<t.length;++r)t[r].partOf||(t[r].resolve().repeated?a:t[r].map?s:n).push(t[r]);if(a.length){for(i("if(o.arrays||o.defaults){"),r=0;r<a.length;++r)i("d%s=[]",kr.safeProp(a[r].name));i("}")}if(s.length){for(i("if(o.objects||o.defaults){"),r=0;r<s.length;++r)i("d%s={}",kr.safeProp(s[r].name));i("}")}if(n.length){for(i("if(o.defaults){"),r=0;r<n.length;++r){var l=n[r],c=kr.safeProp(l.name);if(l.resolvedType instanceof kl)i("d%s=o.enums===String?%j:%j",c,l.resolvedType.valuesById[l.typeDefault],l.typeDefault);else if(l.long)i("if(util.Long){")("var n=new util.Long(%i,%i,%j)",l.typeDefault.low,l.typeDefault.high,l.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",c)("}else")("d%s=o.longs===String?%j:%i",c,l.typeDefault.toString(),l.typeDefault.toNumber());else if(l.bytes){var u="["+Array.prototype.slice.call(l.typeDefault).join(",")+"]";i("if(o.bytes===String)d%s=%j",c,String.fromCharCode.apply(String,l.typeDefault))("else{")("d%s=%s",c,u)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",c,c)("}")}else i("d%s=%j",c,l.typeDefault)}i("}")}var E=!1;for(r=0;r<t.length;++r){var l=t[r],d=e._fieldsArray.indexOf(l),c=kr.safeProp(l.name);l.map?(E||(E=!0,i("var ks2")),i("if(m%s&&(ks2=Object.keys(m%s)).length){",c,c)("d%s={}",c)("for(var j=0;j<ks2.length;++j){"),HA(i,l,d,c+"[ks2[j]]")("}")):l.repeated?(i("if(m%s&&m%s.length){",c,c)("d%s=[]",c)("for(var j=0;j<m%s.length;++j){",c),HA(i,l,d,c+"[j]")("}")):(i("if(m%s!=null&&m.hasOwnProperty(%j)){",c,l.name),HA(i,l,d,c),l.partOf&&i("if(o.oneofs)")("d%s=%j",kr.safeProp(l.partOf.name),l.name)),i("}")}return i("return d")}});var FA=A(Tx=>{"use strict";var $z=Tx,Jz=q_();$z[".google.protobuf.Any"]={fromObject:function(o){if(o&&o["@type"]){var e=o["@type"].substring(o["@type"].lastIndexOf("/")+1),t=this.lookup(e);if(t){var i=o["@type"].charAt(0)==="."?o["@type"].slice(1):o["@type"];return i.indexOf("/")===-1&&(i="/"+i),this.create({type_url:i,value:t.encode(t.fromObject(o)).finish()})}}return this.fromObject(o)},toObject:function(o,e){var t="type.googleapis.com/",i="",a="";if(e&&e.json&&o.type_url&&o.value){a=o.type_url.substring(o.type_url.lastIndexOf("/")+1),i=o.type_url.substring(0,o.type_url.lastIndexOf("/")+1);var s=this.lookup(a);s&&(o=s.decode(o.value))}if(!(o instanceof this.ctor)&&o instanceof Jz){var n=o.$type.toObject(o,e),r=o.$type.fullName[0]==="."?o.$type.fullName.slice(1):o.$type.fullName;return i===""&&(i=t),a=i+r,n["@type"]=a,n}return this.toObject(o,e)}}});var z_=A((lPe,px)=>{"use strict";px.exports=Pe;var vr=xa();((Pe.prototype=Object.create(vr.prototype)).constructor=Pe).className="Type";var Qz=hr(),WA=Ia(),W_=to(),Zz=Y_(),eX=K_(),KA=q_(),qA=u_(),tX=l_(),_t=Je(),rX=jA(),nX=VA(),oX=GA(),Sx=YA(),iX=FA();function Pe(o,e){vr.call(this,o,e),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}Object.defineProperties(Pe.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var o=Object.keys(this.fields),e=0;e<o.length;++e){var t=this.fields[o[e]],i=t.id;if(this._fieldsById[i])throw Error("duplicate id "+i+" in "+this);this._fieldsById[i]=t}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=_t.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=_t.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=Pe.generateConstructor(this)())},set:function(o){var e=o.prototype;e instanceof KA||((o.prototype=new KA).constructor=o,_t.merge(o.prototype,e)),o.$type=o.prototype.$type=this,_t.merge(o,KA,!0),this._ctor=o;for(var t=0;t<this.fieldsArray.length;++t)this._fieldsArray[t].resolve();var i={};for(t=0;t<this.oneofsArray.length;++t)i[this._oneofsArray[t].resolve().name]={get:_t.oneOfGetter(this._oneofsArray[t].oneof),set:_t.oneOfSetter(this._oneofsArray[t].oneof)};t&&Object.defineProperties(o.prototype,i)}}});Pe.generateConstructor=function(e){for(var t=_t.codegen(["p"],e.name),i=0,a;i<e.fieldsArray.length;++i)(a=e._fieldsArray[i]).map?t("this%s={}",_t.safeProp(a.name)):a.repeated&&t("this%s=[]",_t.safeProp(a.name));return t("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")};function j_(o){return o._fieldsById=o._fieldsArray=o._oneofsArray=null,delete o.encode,delete o.decode,delete o.verify,o}Pe.fromJSON=function(e,t){var i=new Pe(e,t.options);i.extensions=t.extensions,i.reserved=t.reserved;for(var a=Object.keys(t.fields),s=0;s<a.length;++s)i.add((typeof t.fields[a[s]].keyType<"u"?Zz.fromJSON:W_.fromJSON)(a[s],t.fields[a[s]]));if(t.oneofs)for(a=Object.keys(t.oneofs),s=0;s<a.length;++s)i.add(WA.fromJSON(a[s],t.oneofs[a[s]]));if(t.nested)for(a=Object.keys(t.nested),s=0;s<a.length;++s){var n=t.nested[a[s]];i.add((n.id!==void 0?W_.fromJSON:n.fields!==void 0?Pe.fromJSON:n.values!==void 0?Qz.fromJSON:n.methods!==void 0?eX.fromJSON:vr.fromJSON)(a[s],n))}return t.extensions&&t.extensions.length&&(i.extensions=t.extensions),t.reserved&&t.reserved.length&&(i.reserved=t.reserved),t.group&&(i.group=!0),t.comment&&(i.comment=t.comment),i};Pe.prototype.toJSON=function(e){var t=vr.prototype.toJSON.call(this,e),i=e?!!e.keepComments:!1;return _t.toObject(["options",t&&t.options||void 0,"oneofs",vr.arrayToJSON(this.oneofsArray,e),"fields",vr.arrayToJSON(this.fieldsArray.filter(function(a){return!a.declaringField}),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",i?this.comment:void 0])};Pe.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var i=this.oneofsArray;for(t=0;t<i.length;)i[t++].resolve();return vr.prototype.resolveAll.call(this)};Pe.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null};Pe.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof W_&&e.extend===void 0){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),j_(this)}return e instanceof WA?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),j_(this)):vr.prototype.add.call(this,e)};Pe.prototype.remove=function(e){if(e instanceof W_&&e.extend===void 0){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),j_(this)}if(e instanceof WA){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),j_(this)}return vr.prototype.remove.call(this,e)};Pe.prototype.isReservedId=function(e){return vr.isReservedId(this.reserved,e)};Pe.prototype.isReservedName=function(e){return vr.isReservedName(this.reserved,e)};Pe.prototype.create=function(e){return new this.ctor(e)};Pe.prototype.setup=function(){for(var e=this.fullName,t=[],i=0;i<this.fieldsArray.length;++i)t.push(this._fieldsArray[i].resolve().resolvedType);this.encode=rX(this)({Writer:tX,types:t,util:_t}),this.decode=nX(this)({Reader:qA,types:t,util:_t}),this.verify=oX(this)({types:t,util:_t}),this.fromObject=Sx.fromObject(this)({types:t,util:_t}),this.toObject=Sx.toObject(this)({types:t,util:_t});var a=iX[e];if(a){var s=Object.create(this);s.fromObject=this.fromObject,this.fromObject=a.fromObject.bind(s),s.toObject=this.toObject,this.toObject=a.toObject.bind(s)}return this};Pe.prototype.encode=function(e,t){return this.setup().encode(e,t)};Pe.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()};Pe.prototype.decode=function(e,t){return this.setup().decode(e,t)};Pe.prototype.decodeDelimited=function(e){return e instanceof qA||(e=qA.create(e)),this.decode(e,e.uint32())};Pe.prototype.verify=function(e){return this.setup().verify(e)};Pe.prototype.fromObject=function(e){return this.setup().fromObject(e)};Pe.prototype.toObject=function(e,t){return this.setup().toObject(e,t)};Pe.d=function(e){return function(i){_t.decorateType(i,e)}}});var J_=A((cPe,vx)=>{"use strict";vx.exports=wt;var $_=xa();((wt.prototype=Object.create($_.prototype)).constructor=wt).className="Root";var XA=to(),fx=hr(),aX=Ia(),no=Je(),Ax,zA,Hl;function wt(o){$_.call(this,"",o),this.deferred=[],this.files=[]}wt.fromJSON=function(e,t){return t||(t=new wt),e.options&&t.setOptions(e.options),t.addJSON(e.nested)};wt.prototype.resolvePath=no.path.resolve;wt.prototype.fetch=no.fetch;function hx(){}wt.prototype.load=function o(e,t,i){typeof t=="function"&&(i=t,t=void 0);var a=this;if(!i)return no.asPromise(o,a,e,t);var s=i===hx;function n(f,O){if(i){if(s)throw f;var R=i;i=null,R(f,O)}}function r(f){var O=f.lastIndexOf("google/protobuf/");if(O>-1){var R=f.substring(O);if(R in Hl)return R}return null}function l(f,O){try{if(no.isString(O)&&O.charAt(0)==="{"&&(O=JSON.parse(O)),!no.isString(O))a.setOptions(O.options).addJSON(O.nested);else{zA.filename=f;var R=zA(O,a,t),M,P=0;if(R.imports)for(;P<R.imports.length;++P)(M=r(R.imports[P])||a.resolvePath(f,R.imports[P]))&&c(M);if(R.weakImports)for(P=0;P<R.weakImports.length;++P)(M=r(R.weakImports[P])||a.resolvePath(f,R.weakImports[P]))&&c(M,!0)}}catch(C){n(C)}!s&&!u&&n(null,a)}function c(f,O){if(f=r(f)||f,!(a.files.indexOf(f)>-1)){if(a.files.push(f),f in Hl){s?l(f,Hl[f]):(++u,setTimeout(function(){--u,l(f,Hl[f])}));return}if(s){var R;try{R=no.fs.readFileSync(f).toString("utf8")}catch(M){O||n(M);return}l(f,R)}else++u,a.fetch(f,function(M,P){if(--u,!!i){if(M){O?u||n(null,a):n(M);return}l(f,P)}})}}var u=0;no.isString(e)&&(e=[e]);for(var E=0,d;E<e.length;++E)(d=a.resolvePath("",e[E]))&&c(d);if(s)return a;u||n(null,a)};wt.prototype.loadSync=function(e,t){if(!no.isNode)throw Error("not supported");return this.load(e,t,hx)};wt.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return $_.prototype.resolveAll.call(this)};var X_=/^[A-Z]/;function dx(o,e){var t=e.parent.lookup(e.extend);if(t){var i=new XA(e.fullName,e.id,e.type,e.rule,void 0,e.options);return t.get(i.name)||(i.declaringField=e,e.extensionField=i,t.add(i)),!0}return!1}wt.prototype._handleAdd=function(e){if(e instanceof XA)e.extend!==void 0&&!e.extensionField&&(dx(this,e)||this.deferred.push(e));else if(e instanceof fx)X_.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof aX)){if(e instanceof Ax)for(var t=0;t<this.deferred.length;)dx(this,this.deferred[t])?this.deferred.splice(t,1):++t;for(var i=0;i<e.nestedArray.length;++i)this._handleAdd(e._nestedArray[i]);X_.test(e.name)&&(e.parent[e.name]=e)}};wt.prototype._handleRemove=function(e){if(e instanceof XA){if(e.extend!==void 0)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof fx)X_.test(e.name)&&delete e.parent[e.name];else if(e instanceof $_){for(var i=0;i<e.nestedArray.length;++i)this._handleRemove(e._nestedArray[i]);X_.test(e.name)&&delete e.parent[e.name]}};wt._configure=function(o,e,t){Ax=o,zA=e,Hl=t}});var Je=A((uPe,mx)=>{"use strict";var we=mx.exports=Ur(),Rx=Cf(),$A,JA;we.codegen=kD();we.fetch=YD();we.path=qD();we.fs=we.inquire("fs");we.toArray=function(e){if(e){for(var t=Object.keys(e),i=new Array(t.length),a=0;a<t.length;)i[a]=e[t[a++]];return i}return[]};we.toObject=function(e){for(var t={},i=0;i<e.length;){var a=e[i++],s=e[i++];s!==void 0&&(t[a]=s)}return t};var sX=/\\/g,lX=/"/g;we.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)};we.safeProp=function(e){return!/^[$\w_]+$/.test(e)||we.isReserved(e)?'["'+e.replace(sX,"\\\\").replace(lX,'\\"')+'"]':"."+e};we.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var cX=/_([a-z])/g;we.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(cX,function(t,i){return i.toUpperCase()})};we.compareFieldsById=function(e,t){return e.id-t.id};we.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(we.decorateRoot.remove(e.$type),e.$type.name=t,we.decorateRoot.add(e.$type)),e.$type;$A||($A=z_());var i=new $A(t||e.name);return we.decorateRoot.add(i),i.ctor=e,Object.defineProperty(e,"$type",{value:i,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:i,enumerable:!1}),i};var uX=0;we.decorateEnum=function(e){if(e.$type)return e.$type;JA||(JA=hr());var t=new JA("Enum"+uX++,e);return we.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t};we.setProperty=function(e,t,i){function a(s,n,r){var l=n.shift();if(l==="__proto__"||l==="prototype")return s;if(n.length>0)s[l]=a(s[l]||{},n,r);else{var c=s[l];c&&(r=[].concat(c).concat(r)),s[l]=r}return s}if(typeof e!="object")throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return t=t.split("."),a(e,t,i)};Object.defineProperty(we,"decorateRoot",{get:function(){return Rx.decorated||(Rx.decorated=new(J_()))}})});var Wo=A((EPe,Ox)=>{"use strict";Ox.exports=Bt;Bt.className="ReflectionObject";var Q_=Je(),Z_;function Bt(o,e){if(!Q_.isString(o))throw TypeError("name must be a string");if(e&&!Q_.isObject(e))throw TypeError("options must be an object");this.options=e,this.parsedOptions=null,this.name=o,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(Bt.prototype,{root:{get:function(){for(var o=this;o.parent!==null;)o=o.parent;return o}},fullName:{get:function(){for(var o=[this.name],e=this.parent;e;)o.unshift(e.name),e=e.parent;return o.join(".")}}});Bt.prototype.toJSON=function(){throw Error()};Bt.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof Z_&&t._handleAdd(this)};Bt.prototype.onRemove=function(e){var t=e.root;t instanceof Z_&&t._handleRemove(this),this.parent=null,this.resolved=!1};Bt.prototype.resolve=function(){return this.resolved?this:(this.root instanceof Z_&&(this.resolved=!0),this)};Bt.prototype.getOption=function(e){if(this.options)return this.options[e]};Bt.prototype.setOption=function(e,t,i){return(!i||!this.options||this.options[e]===void 0)&&((this.options||(this.options={}))[e]=t),this};Bt.prototype.setParsedOption=function(e,t,i){this.parsedOptions||(this.parsedOptions=[]);var a=this.parsedOptions;if(i){var s=a.find(function(l){return Object.prototype.hasOwnProperty.call(l,e)});if(s){var n=s[e];Q_.setProperty(n,i,t)}else s={},s[e]=Q_.setProperty({},i,t),a.push(s)}else{var r={};r[e]=t,a.push(r)}return this};Bt.prototype.setOptions=function(e,t){if(e)for(var i=Object.keys(e),a=0;a<i.length;++a)this.setOption(i[a],e[i[a]],t);return this};Bt.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e};Bt._configure=function(o){Z_=o}});var hr=A((_Pe,Px)=>{"use strict";Px.exports=Hr;var Nx=Wo();((Hr.prototype=Object.create(Nx.prototype)).constructor=Hr).className="Enum";var Mx=xa(),eT=Je();function Hr(o,e,t,i,a,s){if(Nx.call(this,o,t),e&&typeof e!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=i,this.comments=a||{},this.valuesOptions=s,this.reserved=void 0,e)for(var n=Object.keys(e),r=0;r<n.length;++r)typeof e[n[r]]=="number"&&(this.valuesById[this.values[n[r]]=e[n[r]]]=n[r])}Hr.fromJSON=function(e,t){var i=new Hr(e,t.values,t.options,t.comment,t.comments);return i.reserved=t.reserved,i};Hr.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return eT.toObject(["options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])};Hr.prototype.add=function(e,t,i,a){if(!eT.isString(e))throw TypeError("name must be a string");if(!eT.isInteger(t))throw TypeError("id must be an integer");if(this.values[e]!==void 0)throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(this.valuesById[t]!==void 0){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return a&&(this.valuesOptions===void 0&&(this.valuesOptions={}),this.valuesOptions[e]=a||null),this.comments[e]=i||null,this};Hr.prototype.remove=function(e){if(!eT.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(t==null)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this.valuesOptions&&delete this.valuesOptions[e],this};Hr.prototype.isReservedId=function(e){return Mx.isReservedId(this.reserved,e)};Hr.prototype.isReservedName=function(e){return Mx.isReservedName(this.reserved,e)}});var jA=A((TPe,gx)=>{"use strict";gx.exports=_X;var EX=hr(),QA=qo(),ZA=Je();function Cx(o,e,t,i){return e.resolvedType.group?o("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",t,i,(e.id<<3|3)>>>0,(e.id<<3|4)>>>0):o("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",t,i,(e.id<<3|2)>>>0)}function _X(o){for(var e=ZA.codegen(["m","w"],o.name+"$encode")("if(!w)")("w=Writer.create()"),t,i,a=o.fieldsArray.slice().sort(ZA.compareFieldsById),t=0;t<a.length;++t){var s=a[t].resolve(),n=o._fieldsArray.indexOf(s),r=s.resolvedType instanceof EX?"int32":s.type,l=QA.basic[r];i="m"+ZA.safeProp(s.name),s.map?(e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",i,s.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(s.id<<3|2)>>>0,8|QA.mapKey[s.keyType],s.keyType),l===void 0?e("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",n,i):e(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|l,r,i),e("}")("}")):s.repeated?(e("if(%s!=null&&%s.length){",i,i),s.packed&&QA.packed[r]!==void 0?e("w.uint32(%i).fork()",(s.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",r,i)("w.ldelim()"):(e("for(var i=0;i<%s.length;++i)",i),l===void 0?Cx(e,s,n,i+"[i]"):e("w.uint32(%i).%s(%s[i])",(s.id<<3|l)>>>0,r,i)),e("}")):(s.optional&&e("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",i,s.name),l===void 0?Cx(e,s,n,i):e("w.uint32(%i).%s(%s)",(s.id<<3|l)>>>0,r,i))}return e("return w")}});var Ix=A((SPe,Lx)=>{"use strict";var Se=Lx.exports=gf();Se.build="light";function TX(o,e,t){return typeof e=="function"?(t=e,e=new Se.Root):e||(e=new Se.Root),e.load(o,t)}Se.load=TX;function SX(o,e){return e||(e=new Se.Root),e.loadSync(o)}Se.loadSync=SX;Se.encoder=jA();Se.decoder=VA();Se.verifier=GA();Se.converter=YA();Se.ReflectionObject=Wo();Se.Namespace=xa();Se.Root=J_();Se.Enum=hr();Se.Type=z_();Se.Field=to();Se.OneOf=Ia();Se.MapField=Y_();Se.Service=K_();Se.Method=F_();Se.Message=q_();Se.wrappers=FA();Se.types=qo();Se.util=Je();Se.ReflectionObject._configure(Se.Root);Se.Namespace._configure(Se.Type,Se.Service,Se.Enum);Se.Root._configure(Se.Type);Se.Field._configure(Se.Type)});var th=A((pPe,xx)=>{"use strict";xx.exports=Dx;var eh=/[\s{}=;:[\],'"()<>]/g,pX=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,dX=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,fX=/^ *[*/]+ */,AX=/^\s*\*?\/*/,hX=/\n/g,vX=/\s/,RX=/\\(.?)/g,mX={0:"\0",r:"\r",n:` `,t:" "};function yx(o){return o.replace(RX,function(e,t){switch(t){case"\\":case"":return t;default:return mX[t]||""}})}Dx.unescape=yx;function Dx(o,e){o=o.toString();var t=0,i=o.length,a=1,s=0,n={},r=[],l=null;function c(y){return Error("illegal "+y+" (line "+a+")")}function u(){var y=l==="'"?dX:pX;y.lastIndex=t-1;var W=y.exec(o);if(!W)throw c("string");return t=y.lastIndex,M(l),l=null,yx(W[1])}function E(y){return o.charAt(y)}function d(y,W,q){var H={type:o.charAt(y++),lineEmpty:!1,leading:q},ie;e?ie=2:ie=3;var ee=y-ie,le;do if(--ee<0||(le=o.charAt(ee))===` `){H.lineEmpty=!0;break}while(le===" "||le===" ");for(var v=o.substring(y,W).split(hX),B=0;B<v.length;++B)v[B]=v[B].replace(e?AX:fX,"").trim();H.text=v.join(` `).trim(),n[a]=H,s=a}function f(y){var W=O(y),q=o.substring(y,W),H=/^\s*\/\//.test(q);return H}function O(y){for(var W=y;W<i&&E(W)!==` `;)W++;return W}function R(){if(r.length>0)return r.shift();if(l)return u();var y,W,q,H,ie,ee=t===0;do{if(t===i)return null;for(y=!1;vX.test(q=E(t));)if(q===` `&&(ee=!0,++a),++t===i)return null;if(E(t)==="/"){if(++t===i)throw c("comment");if(E(t)==="/")if(e){if(H=t,ie=!1,f(t-1)){ie=!0;do if(t=O(t),t===i||(t++,!ee))break;while(f(t))}else t=Math.min(i,O(t)+1);ie&&(d(H,t,ee),ee=!0),a++,y=!0}else{for(ie=E(H=t+1)==="/";E(++t)!==` `;)if(t===i)return null;++t,ie&&(d(H,t-1,ee),ee=!0),++a,y=!0}else if((q=E(t))==="*"){H=t+1,ie=e||E(H)==="*";do{if(q===` `&&++a,++t===i)throw c("comment");W=q,q=E(t)}while(W!=="*"||q!=="/");++t,ie&&(d(H,t-2,ee),ee=!0),y=!0}else return"/"}}while(y);var le=t;eh.lastIndex=0;var v=eh.test(E(le++));if(!v)for(;le<i&&!eh.test(E(le));)++le;var B=o.substring(t,t=le);return(B==='"'||B==="'")&&(l=B),B}function M(y){r.push(y)}function P(){if(!r.length){var y=R();if(y===null)return null;M(y)}return r[0]}function C(y,W){var q=P(),H=q===y;if(H)return R(),!0;if(!W)throw c("token '"+q+"', '"+y+"' expected");return!1}function b(y){var W=null,q;return y===void 0?(q=n[a-1],delete n[a-1],q&&(e||q.type==="*"||q.lineEmpty)&&(W=q.leading?q.text:null)):(s<y&&P(),q=n[y],delete n[y],q&&!q.lineEmpty&&(e||q.type==="/")&&(W=q.leading?null:q.text)),W}return Object.defineProperty({next:R,peek:P,push:M,skip:C,cmnt:b},"line",{get:function(){return a}})}});var Gx=A((dPe,Bx)=>{"use strict";Bx.exports=pn;pn.filename=null;pn.defaults={keepCase:!1};var OX=th(),Ux=J_(),bx=z_(),Vx=to(),NX=Y_(),wx=Ia(),MX=hr(),PX=K_(),CX=F_(),rh=qo(),nh=Je(),gX=/^[1-9][0-9]*$/,LX=/^-?[1-9][0-9]*$/,IX=/^0[x][0-9a-fA-F]+$/,yX=/^-?0[x][0-9a-fA-F]+$/,DX=/^0[0-7]+$/,xX=/^-?0[0-7]+$/,UX=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,Yr=/^[a-zA-Z_][a-zA-Z_0-9]*$/,Fr=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,bX=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function pn(o,e,t){e instanceof Ux||(t=e,e=new Ux),t||(t=pn.defaults);var i=t.preferTrailingComment||!1,a=OX(o,t.alternateCommentMode||!1),s=a.next,n=a.push,r=a.peek,l=a.skip,c=a.cmnt,u=!0,E,d,f,O,R=!1,M=e,P=t.keepCase?function(L){return L}:nh.camelCase;function C(L,g,D){var F=pn.filename;return D||(pn.filename=null),Error("illegal "+(g||"token")+" '"+L+"' ("+(F?F+", ":"")+"line "+a.line+")")}function b(){var L=[],g;do{if((g=s())!=='"'&&g!=="'")throw C(g);L.push(s()),l(g),g=r()}while(g==='"'||g==="'");return L.join("")}function y(L){var g=s();switch(g){case"'":case'"':return n(g),b();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return q(g,!0)}catch{if(L&&Fr.test(g))return g;throw C(g,"value")}}function W(L,g){var D,F;do g&&((D=r())==='"'||D==="'")?L.push(b()):L.push([F=H(s()),l("to",!0)?H(s()):F]);while(l(",",!0));var G={options:void 0};G.setOption=function(oe,ye){this.options===void 0&&(this.options={}),this.options[oe]=ye},B(G,function(ye){if(ye==="option")Ee(G,ye),l(";");else throw C(ye)},function(){xe(G)})}function q(L,g){var D=1;switch(L.charAt(0)==="-"&&(D=-1,L=L.substring(1)),L){case"inf":case"INF":case"Inf":return D*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(gX.test(L))return D*parseInt(L,10);if(IX.test(L))return D*parseInt(L,16);if(DX.test(L))return D*parseInt(L,8);if(UX.test(L))return D*parseFloat(L);throw C(L,"number",g)}function H(L,g){switch(L){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!g&&L.charAt(0)==="-")throw C(L,"id");if(LX.test(L))return parseInt(L,10);if(yX.test(L))return parseInt(L,16);if(xX.test(L))return parseInt(L,8);throw C(L,"id")}function ie(){if(E!==void 0)throw C("package");if(E=s(),!Fr.test(E))throw C(E,"name");M=M.define(E),l(";")}function ee(){var L=r(),g;switch(L){case"weak":g=f||(f=[]),s();break;case"public":s();default:g=d||(d=[]);break}L=b(),l(";"),g.push(L)}function le(){if(l("="),O=b(),R=O==="proto3",!R&&O!=="proto2")throw C(O,"syntax");l(";")}function v(L,g){switch(g){case"option":return Ee(L,g),l(";"),!0;case"message":return N(L,g),!0;case"enum":return X(L,g),!0;case"service":return me(L,g),!0;case"extend":return at(L,g),!0}return!1}function B(L,g,D){var F=a.line;if(L&&(typeof L.comment!="string"&&(L.comment=c()),L.filename=pn.filename),l("{",!0)){for(var G;(G=s())!=="}";)g(G);l(";",!0)}else D&&D(),l(";"),L&&(typeof L.comment!="string"||i)&&(L.comment=c(F)||L.comment)}function N(L,g){if(!Yr.test(g=s()))throw C(g,"type name");var D=new bx(g);B(D,function(G){if(!v(D,G))switch(G){case"map":J(D,G);break;case"required":case"repeated":p(D,G);break;case"optional":R?p(D,"proto3_optional"):p(D,"optional");break;case"oneof":Q(D,G);break;case"extensions":W(D.extensions||(D.extensions=[]));break;case"reserved":W(D.reserved||(D.reserved=[]),!0);break;default:if(!R||!Fr.test(G))throw C(G);n(G),p(D,"optional");break}}),L.add(D)}function p(L,g,D){var F=s();if(F==="group"){I(L,g);return}for(;F.endsWith(".")||r().startsWith(".");)F+=s();if(!Fr.test(F))throw C(F,"type");var G=s();if(!Yr.test(G))throw C(G,"name");G=P(G),l("=");var oe=new Vx(G,H(s()),F,g,D);if(B(oe,function(It){if(It==="option")Ee(oe,It),l(";");else throw C(It)},function(){xe(oe)}),g==="proto3_optional"){var ye=new wx("_"+G);oe.setOption("proto3_optional",!0),ye.add(oe),L.add(ye)}else L.add(oe);!R&&oe.repeated&&(rh.packed[F]!==void 0||rh.basic[F]===void 0)&&oe.setOption("packed",!1,!0)}function I(L,g){var D=s();if(!Yr.test(D))throw C(D,"name");var F=nh.lcFirst(D);D===F&&(D=nh.ucFirst(D)),l("=");var G=H(s()),oe=new bx(D);oe.group=!0;var ye=new Vx(F,G,D,g);ye.filename=pn.filename,B(oe,function(It){switch(It){case"option":Ee(oe,It),l(";");break;case"required":case"repeated":p(oe,It);break;case"optional":R?p(oe,"proto3_optional"):p(oe,"optional");break;case"message":N(oe,It);break;case"enum":X(oe,It);break;default:throw C(It)}}),L.add(oe).add(ye)}function J(L){l("<");var g=s();if(rh.mapKey[g]===void 0)throw C(g,"type");l(",");var D=s();if(!Fr.test(D))throw C(D,"type");l(">");var F=s();if(!Yr.test(F))throw C(F,"name");l("=");var G=new NX(P(F),H(s()),g,D);B(G,function(ye){if(ye==="option")Ee(G,ye),l(";");else throw C(ye)},function(){xe(G)}),L.add(G)}function Q(L,g){if(!Yr.test(g=s()))throw C(g,"name");var D=new wx(P(g));B(D,function(G){G==="option"?(Ee(D,G),l(";")):(n(G),p(D,"optional"))}),L.add(D)}function X(L,g){if(!Yr.test(g=s()))throw C(g,"name");var D=new MX(g);B(D,function(G){switch(G){case"option":Ee(D,G),l(";");break;case"reserved":W(D.reserved||(D.reserved=[]),!0);break;default:ue(D,G)}}),L.add(D)}function ue(L,g){if(!Yr.test(g))throw C(g,"name");l("=");var D=H(s(),!0),F={options:void 0};F.setOption=function(G,oe){this.options===void 0&&(this.options={}),this.options[G]=oe},B(F,function(oe){if(oe==="option")Ee(F,oe),l(";");else throw C(oe)},function(){xe(F)}),L.add(g,D,F.comment,F.options)}function Ee(L,g){var D=l("(",!0);if(!Fr.test(g=s()))throw C(g,"name");var F=g,G=F,oe;D&&(l(")"),F="("+F+")",G=F,g=r(),bX.test(g)&&(oe=g.slice(1),F+=g,s())),l("=");var ye=Ie(L,F);ae(L,G,ye,oe)}function Ie(L,g){if(l("{",!0)){for(var D={};!l("}",!0);){if(!Yr.test(be=s()))throw C(be,"name");if(be===null)throw C(be,"end of input");var F,G=be;if(l(":",!0),r()==="{")F=Ie(L,g+"."+be);else if(r()==="["){F=[];var oe;if(l("[",!0)){do oe=y(!0),F.push(oe);while(l(",",!0));l("]"),typeof oe<"u"&&ve(L,g+"."+be,oe)}}else F=y(!0),ve(L,g+"."+be,F);var ye=D[G];ye&&(F=[].concat(ye).concat(F)),D[G]=F,l(",",!0),l(";",!0)}return D}var vn=y(!0);return ve(L,g,vn),vn}function ve(L,g,D){L.setOption&&L.setOption(g,D)}function ae(L,g,D,F){L.setParsedOption&&L.setParsedOption(g,D,F)}function xe(L){if(l("[",!0)){do Ee(L,"option");while(l(",",!0));l("]")}return L}function me(L,g){if(!Yr.test(g=s()))throw C(g,"service name");var D=new PX(g);B(D,function(G){if(!v(D,G))if(G==="rpc")Ue(D,G);else throw C(G)}),L.add(D)}function Ue(L,g){var D=c(),F=g;if(!Yr.test(g=s()))throw C(g,"name");var G=g,oe,ye,vn,It;if(l("("),l("stream",!0)&&(ye=!0),!Fr.test(g=s())||(oe=g,l(")"),l("returns"),l("("),l("stream",!0)&&(It=!0),!Fr.test(g=s())))throw C(g);vn=g,l(")");var cc=new CX(G,F,oe,vn,ye,It);cc.comment=D,B(cc,function(dS){if(dS==="option")Ee(cc,dS),l(";");else throw C(dS)}),L.add(cc)}function at(L,g){if(!Fr.test(g=s()))throw C(g,"reference");var D=g;B(null,function(G){switch(G){case"required":case"repeated":p(L,G,D);break;case"optional":R?p(L,"proto3_optional",D):p(L,"optional",D);break;default:if(!R||!Fr.test(G))throw C(G);n(G),p(L,"optional",D);break}})}for(var be;(be=s())!==null;)switch(be){case"package":if(!u)throw C(be);ie();break;case"import":if(!u)throw C(be);ee();break;case"syntax":if(!u)throw C(be);le();break;case"option":Ee(M,be),l(";");break;default:if(v(M,be)){u=!1;continue}throw C(be)}return pn.filename=null,{package:E,imports:d,weakImports:f,syntax:O,root:e}}});var Yx=A((fPe,Hx)=>{"use strict";Hx.exports=Rr;var VX=/\/|\./;function Rr(o,e){VX.test(o)||(o="google/protobuf/"+o+".proto",e={nested:{google:{nested:{protobuf:{nested:e}}}}}),Rr[o]=e}Rr("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var kx;Rr("duration",{Duration:kx={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}});Rr("timestamp",{Timestamp:kx});Rr("empty",{Empty:{fields:{}}});Rr("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}});Rr("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}});Rr("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}});Rr.get=function(e){return Rr[e]||null}});var Kx=A((APe,Fx)=>{"use strict";var oo=Fx.exports=Ix();oo.build="full";oo.tokenize=th();oo.parse=Gx();oo.common=Yx();oo.Root._configure(oo.Type,oo.parse,oo.common)});var tT=A((hPe,qx)=>{"use strict";qx.exports=Kx()});var oh=A((vPe,wX)=>{wX.exports={nested:{google:{nested:{protobuf:{nested:{FileDescriptorSet:{fields:{file:{rule:"repeated",type:"FileDescriptorProto",id:1}}},FileDescriptorProto:{fields:{name:{type:"string",id:1},package:{type:"string",id:2},dependency:{rule:"repeated",type:"string",id:3},publicDependency:{rule:"repeated",type:"int32",id:10,options:{packed:!1}},weakDependency:{rule:"repeated",type:"int32",id:11,options:{packed:!1}},messageType:{rule:"repeated",type:"DescriptorProto",id:4},enumType:{rule:"repeated",type:"EnumDescriptorProto",id:5},service:{rule:"repeated",type:"ServiceDescriptorProto",id:6},extension:{rule:"repeated",type:"FieldDescriptorProto",id:7},options:{type:"FileOptions",id:8},sourceCodeInfo:{type:"SourceCodeInfo",id:9},syntax:{type:"string",id:12}}},DescriptorProto:{fields:{name:{type:"string",id:1},field:{rule:"repeated",type:"FieldDescriptorProto",id:2},extension:{rule:"repeated",type:"FieldDescriptorProto",id:6},nestedType:{rule:"repeated",type:"DescriptorProto",id:3},enumType:{rule:"repeated",type:"EnumDescriptorProto",id:4},extensionRange:{rule:"repeated",type:"ExtensionRange",id:5},oneofDecl:{rule:"repeated",type:"OneofDescriptorProto",id:8},options:{type:"MessageOptions",id:7},reservedRange:{rule:"repeated",type:"ReservedRange",id:9},reservedName:{rule:"repeated",type:"string",id:10}},nested:{ExtensionRange:{fields:{start:{type:"int32",id:1},end:{type:"int32",id:2}}},ReservedRange:{fields:{start:{type:"int32",id:1},end:{type:"int32",id:2}}}}},FieldDescriptorProto:{fields:{name:{type:"string",id:1},number:{type:"int32",id:3},label:{type:"Label",id:4},type:{type:"Type",id:5},typeName:{type:"string",id:6},extendee:{type:"string",id:2},defaultValue:{type:"string",id:7},oneofIndex:{type:"int32",id:9},jsonName:{type:"string",id:10},options:{type:"FieldOptions",id:8}},nested:{Type:{values:{TYPE_DOUBLE:1,TYPE_FLOAT:2,TYPE_INT64:3,TYPE_UINT64:4,TYPE_INT32:5,TYPE_FIXED64:6,TYPE_FIXED32:7,TYPE_BOOL:8,TYPE_STRING:9,TYPE_GROUP:10,TYPE_MESSAGE:11,TYPE_BYTES:12,TYPE_UINT32:13,TYPE_ENUM:14,TYPE_SFIXED32:15,TYPE_SFIXED64:16,TYPE_SINT32:17,TYPE_SINT64:18}},Label:{values:{LABEL_OPTIONAL:1,LABEL_REQUIRED:2,LABEL_REPEATED:3}}}},OneofDescriptorProto:{fields:{name:{type:"string",id:1},options:{type:"OneofOptions",id:2}}},EnumDescriptorProto:{fields:{name:{type:"string",id:1},value:{rule:"repeated",type:"EnumValueDescriptorProto",id:2},options:{type:"EnumOptions",id:3}}},EnumValueDescriptorProto:{fields:{name:{type:"string",id:1},number:{type:"int32",id:2},options:{type:"EnumValueOptions",id:3}}},ServiceDescriptorProto:{fields:{name:{type:"string",id:1},method:{rule:"repeated",type:"MethodDescriptorProto",id:2},options:{type:"ServiceOptions",id:3}}},MethodDescriptorProto:{fields:{name:{type:"string",id:1},inputType:{type:"string",id:2},outputType:{type:"string",id:3},options:{type:"MethodOptions",id:4},clientStreaming:{type:"bool",id:5},serverStreaming:{type:"bool",id:6}}},FileOptions:{fields:{javaPackage:{type:"string",id:1},javaOuterClassname:{type:"string",id:8},javaMultipleFiles:{type:"bool",id:10},javaGenerateEqualsAndHash:{type:"bool",id:20,options:{deprecated:!0}},javaStringCheckUtf8:{type:"bool",id:27},optimizeFor:{type:"OptimizeMode",id:9,options:{default:"SPEED"}},goPackage:{type:"string",id:11},ccGenericServices:{type:"bool",id:16},javaGenericServices:{type:"bool",id:17},pyGenericServices:{type:"bool",id:18},deprecated:{type:"bool",id:23},ccEnableArenas:{type:"bool",id:31},objcClassPrefix:{type:"string",id:36},csharpNamespace:{type:"string",id:37},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],reserved:[[38,38]],nested:{OptimizeMode:{values:{SPEED:1,CODE_SIZE:2,LITE_RUNTIME:3}}}},MessageOptions:{fields:{messageSetWireFormat:{type:"bool",id:1},noStandardDescriptorAccessor:{type:"bool",id:2},deprecated:{type:"bool",id:3},mapEntry:{type:"bool",id:7},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],reserved:[[8,8]]},FieldOptions:{fields:{ctype:{type:"CType",id:1,options:{default:"STRING"}},packed:{type:"bool",id:2},jstype:{type:"JSType",id:6,options:{default:"JS_NORMAL"}},lazy:{type:"bool",id:5},deprecated:{type:"bool",id:3},weak:{type:"bool",id:10},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],reserved:[[4,4]],nested:{CType:{values:{STRING:0,CORD:1,STRING_PIECE:2}},JSType:{values:{JS_NORMAL:0,JS_STRING:1,JS_NUMBER:2}}}},OneofOptions:{fields:{uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},EnumOptions:{fields:{allowAlias:{type:"bool",id:2},deprecated:{type:"bool",id:3},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},EnumValueOptions:{fields:{deprecated:{type:"bool",id:1},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},ServiceOptions:{fields:{deprecated:{type:"bool",id:33},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},MethodOptions:{fields:{deprecated:{type:"bool",id:33},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},UninterpretedOption:{fields:{name:{rule:"repeated",type:"NamePart",id:2},identifierValue:{type:"string",id:3},positiveIntValue:{type:"uint64",id:4},negativeIntValue:{type:"int64",id:5},doubleValue:{type:"double",id:6},stringValue:{type:"bytes",id:7},aggregateValue:{type:"string",id:8}},nested:{NamePart:{fields:{namePart:{rule:"required",type:"string",id:1},isExtension:{rule:"required",type:"bool",id:2}}}}},SourceCodeInfo:{fields:{location:{rule:"repeated",type:"Location",id:1}},nested:{Location:{fields:{path:{rule:"repeated",type:"int32",id:1},span:{rule:"repeated",type:"int32",id:2},leadingComments:{type:"string",id:3},trailingComments:{type:"string",id:4},leadingDetachedComments:{rule:"repeated",type:"string",id:6}}}}},GeneratedCodeInfo:{fields:{annotation:{rule:"repeated",type:"Annotation",id:1}},nested:{Annotation:{fields:{path:{rule:"repeated",type:"int32",id:1},sourceFile:{type:"string",id:2},begin:{type:"int32",id:3},end:{type:"int32",id:4}}}}}}}}}}}});var $x=A((se,Xx)=>{"use strict";var vt=tT();Xx.exports=se=vt.descriptor=vt.Root.fromJSON(oh()).lookup(".google.protobuf");var Wx=vt.Namespace,Yl=vt.Root,dn=vt.Enum,io=vt.Type,ao=vt.Field,BX=vt.MapField,rT=vt.OneOf,Fl=vt.Service,nT=vt.Method;Yl.fromDescriptor=function(e){typeof e.length=="number"&&(e=se.FileDescriptorSet.decode(e));var t=new Yl;if(e.file)for(var i,a,s=0,n;s<e.file.length;++s){if(a=t,(i=e.file[s]).package&&i.package.length&&(a=t.define(i.package)),i.name&&i.name.length&&t.files.push(a.filename=i.name),i.messageType)for(n=0;n<i.messageType.length;++n)a.add(io.fromDescriptor(i.messageType[n],i.syntax));if(i.enumType)for(n=0;n<i.enumType.length;++n)a.add(dn.fromDescriptor(i.enumType[n]));if(i.extension)for(n=0;n<i.extension.length;++n)a.add(ao.fromDescriptor(i.extension[n]));if(i.service)for(n=0;n<i.service.length;++n)a.add(Fl.fromDescriptor(i.service[n]));var r=ba(i.options,se.FileOptions);if(r){var l=Object.keys(r);for(n=0;n<l.length;++n)a.setOption(l[n],r[l[n]])}}return t};Yl.prototype.toDescriptor=function(e){var t=se.FileDescriptorSet.create();return jx(this,t.file,e),t};function jx(o,e,t){var i=se.FileDescriptorProto.create({name:o.filename||(o.fullName.substring(1).replace(/\./g,"_")||"root")+".proto"});t&&(i.syntax=t),o instanceof Yl||(i.package=o.fullName.substring(1));for(var a=0,s;a<o.nestedArray.length;++a)(s=o._nestedArray[a])instanceof io?i.messageType.push(s.toDescriptor(t)):s instanceof dn?i.enumType.push(s.toDescriptor()):s instanceof ao?i.extension.push(s.toDescriptor(t)):s instanceof Fl?i.service.push(s.toDescriptor()):s instanceof Wx&&jx(s,e,t);i.options=Va(o.options,se.FileOptions),i.messageType.length+i.enumType.length+i.extension.length+i.service.length&&e.push(i)}var GX=0;io.fromDescriptor=function(e,t){typeof e.length=="number"&&(e=se.DescriptorProto.decode(e));var i=new io(e.name.length?e.name:"Type"+GX++,ba(e.options,se.MessageOptions)),a;if(e.oneofDecl)for(a=0;a<e.oneofDecl.length;++a)i.add(rT.fromDescriptor(e.oneofDecl[a]));if(e.field)for(a=0;a<e.field.length;++a){var s=ao.fromDescriptor(e.field[a],t);i.add(s),e.field[a].hasOwnProperty("oneofIndex")&&i.oneofsArray[e.field[a].oneofIndex].add(s)}if(e.extension)for(a=0;a<e.extension.length;++a)i.add(ao.fromDescriptor(e.extension[a],t));if(e.nestedType)for(a=0;a<e.nestedType.length;++a)i.add(io.fromDescriptor(e.nestedType[a],t)),e.nestedType[a].options&&e.nestedType[a].options.mapEntry&&i.setOption("map_entry",!0);if(e.enumType)for(a=0;a<e.enumType.length;++a)i.add(dn.fromDescriptor(e.enumType[a]));if(e.extensionRange&&e.extensionRange.length)for(i.extensions=[],a=0;a<e.extensionRange.length;++a)i.extensions.push([e.extensionRange[a].start,e.extensionRange[a].end]);if(e.reservedRange&&e.reservedRange.length||e.reservedName&&e.reservedName.length){if(i.reserved=[],e.reservedRange)for(a=0;a<e.reservedRange.length;++a)i.reserved.push([e.reservedRange[a].start,e.reservedRange[a].end]);if(e.reservedName)for(a=0;a<e.reservedName.length;++a)i.reserved.push(e.reservedName[a])}return i};io.prototype.toDescriptor=function(e){var t=se.DescriptorProto.create({name:this.name}),i;for(i=0;i<this.fieldsArray.length;++i){var a;if(t.field.push(a=this._fieldsArray[i].toDescriptor(e)),this._fieldsArray[i]instanceof BX){var s=ih(this._fieldsArray[i].keyType,this._fieldsArray[i].resolvedKeyType),n=ih(this._fieldsArray[i].type,this._fieldsArray[i].resolvedType),r=n===11||n===14?this._fieldsArray[i].resolvedType&&zx(this.parent,this._fieldsArray[i].resolvedType)||this._fieldsArray[i].type:void 0;t.nestedType.push(se.DescriptorProto.create({name:a.typeName,field:[se.FieldDescriptorProto.create({name:"key",number:1,label:1,type:s}),se.FieldDescriptorProto.create({name:"value",number:2,label:1,type:n,typeName:r})],options:se.MessageOptions.create({mapEntry:!0})}))}}for(i=0;i<this.oneofsArray.length;++i)t.oneofDecl.push(this._oneofsArray[i].toDescriptor());for(i=0;i<this.nestedArray.length;++i)this._nestedArray[i]instanceof ao?t.field.push(this._nestedArray[i].toDescriptor(e)):this._nestedArray[i]instanceof io?t.nestedType.push(this._nestedArray[i].toDescriptor(e)):this._nestedArray[i]instanceof dn&&t.enumType.push(this._nestedArray[i].toDescriptor());if(this.extensions)for(i=0;i<this.extensions.length;++i)t.extensionRange.push(se.DescriptorProto.ExtensionRange.create({start:this.extensions[i][0],end:this.extensions[i][1]}));if(this.reserved)for(i=0;i<this.reserved.length;++i)typeof this.reserved[i]=="string"?t.reservedName.push(this.reserved[i]):t.reservedRange.push(se.DescriptorProto.ReservedRange.create({start:this.reserved[i][0],end:this.reserved[i][1]}));return t.options=Va(this.options,se.MessageOptions),t};var kX=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/;ao.fromDescriptor=function(e,t){if(typeof e.length=="number"&&(e=se.DescriptorProto.decode(e)),typeof e.number!="number")throw Error("missing field id");var i;e.typeName&&e.typeName.length?i=e.typeName:i=qX(e.type);var a;switch(e.label){case 1:a=void 0;break;case 2:a="required";break;case 3:a="repeated";break;default:throw Error("illegal label: "+e.label)}var s=e.extendee;e.extendee!==void 0&&(s=s.length?s:void 0);var n=new ao(e.name.length?e.name:"field"+e.number,e.number,i,a,s);if(n.options=ba(e.options,se.FieldOptions),e.defaultValue&&e.defaultValue.length){var r=e.defaultValue;switch(r){case"true":case"TRUE":r=!0;break;case"false":case"FALSE":r=!1;break;default:var l=kX.exec(r);l&&(r=parseInt(r));break}n.setOption("default",r)}return WX(e.type)&&(t==="proto3"?e.options&&!e.options.packed&&n.setOption("packed",!1):e.options&&e.options.packed||n.setOption("packed",!1)),n};ao.prototype.toDescriptor=function(e){var t=se.FieldDescriptorProto.create({name:this.name,number:this.id});if(this.map)t.type=11,t.typeName=vt.util.ucFirst(this.name),t.label=3;else{switch(t.type=ih(this.type,this.resolve().resolvedType)){case 10:case 11:case 14:t.typeName=this.resolvedType?zx(this.parent,this.resolvedType):this.type;break}switch(this.rule){case"repeated":t.label=3;break;case"required":t.label=2;break;default:t.label=1;break}}if(t.extendee=this.extensionField?this.extensionField.parent.fullName:this.extend,this.partOf&&(t.oneofIndex=this.parent.oneofsArray.indexOf(this.partOf))<0)throw Error("missing oneof");return this.options&&(t.options=Va(this.options,se.FieldOptions),this.options.default!=null&&(t.defaultValue=String(this.options.default))),e==="proto3"?this.packed||((t.options||(t.options=se.FieldOptions.create())).packed=!1):this.packed&&((t.options||(t.options=se.FieldOptions.create())).packed=!0),t};var HX=0;dn.fromDescriptor=function(e){typeof e.length=="number"&&(e=se.EnumDescriptorProto.decode(e));var t={};if(e.value)for(var i=0;i<e.value.length;++i){var a=e.value[i].name,s=e.value[i].number||0;t[a&&a.length?a:"NAME"+s]=s}return new dn(e.name&&e.name.length?e.name:"Enum"+HX++,t,ba(e.options,se.EnumOptions))};dn.prototype.toDescriptor=function(){for(var e=[],t=0,i=Object.keys(this.values);t<i.length;++t)e.push(se.EnumValueDescriptorProto.create({name:i[t],number:this.values[i[t]]}));return se.EnumDescriptorProto.create({name:this.name,value:e,options:Va(this.options,se.EnumOptions)})};var YX=0;rT.fromDescriptor=function(e){return typeof e.length=="number"&&(e=se.OneofDescriptorProto.decode(e)),new rT(e.name&&e.name.length?e.name:"oneof"+YX++)};rT.prototype.toDescriptor=function(){return se.OneofDescriptorProto.create({name:this.name})};var FX=0;Fl.fromDescriptor=function(e){typeof e.length=="number"&&(e=se.ServiceDescriptorProto.decode(e));var t=new Fl(e.name&&e.name.length?e.name:"Service"+FX++,ba(e.options,se.ServiceOptions));if(e.method)for(var i=0;i<e.method.length;++i)t.add(nT.fromDescriptor(e.method[i]));return t};Fl.prototype.toDescriptor=function(){for(var e=[],t=0;t<this.methodsArray.length;++t)e.push(this._methodsArray[t].toDescriptor());return se.ServiceDescriptorProto.create({name:this.name,method:e,options:Va(this.options,se.ServiceOptions)})};var KX=0;nT.fromDescriptor=function(e){return typeof e.length=="number"&&(e=se.MethodDescriptorProto.decode(e)),new nT(e.name&&e.name.length?e.name:"Method"+KX++,"rpc",e.inputType,e.outputType,!!e.clientStreaming,!!e.serverStreaming,ba(e.options,se.MethodOptions))};nT.prototype.toDescriptor=function(){return se.MethodDescriptorProto.create({name:this.name,inputType:this.resolvedRequestType?this.resolvedRequestType.fullName:this.requestType,outputType:this.resolvedResponseType?this.resolvedResponseType.fullName:this.responseType,clientStreaming:this.requestStream,serverStreaming:this.responseStream,options:Va(this.options,se.MethodOptions)})};function qX(o){switch(o){case 1:return"double";case 2:return"float";case 3:return"int64";case 4:return"uint64";case 5:return"int32";case 6:return"fixed64";case 7:return"fixed32";case 8:return"bool";case 9:return"string";case 12:return"bytes";case 13:return"uint32";case 15:return"sfixed32";case 16:return"sfixed64";case 17:return"sint32";case 18:return"sint64"}throw Error("illegal type: "+o)}function WX(o){switch(o){case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 13:case 14:case 15:case 16:case 17:case 18:return!0}return!1}function ih(o,e){switch(o){case"double":return 1;case"float":return 2;case"int64":return 3;case"uint64":return 4;case"int32":return 5;case"fixed64":return 6;case"fixed32":return 7;case"bool":return 8;case"string":return 9;case"bytes":return 12;case"uint32":return 13;case"sfixed32":return 15;case"sfixed64":return 16;case"sint32":return 17;case"sint64":return 18}if(e instanceof dn)return 14;if(e instanceof io)return e.group?10:11;throw Error("illegal type: "+o)}function ba(o,e){if(o){for(var t=[],i=0,a,s,n;i<e.fieldsArray.length;++i)(s=(a=e._fieldsArray[i]).name)!=="uninterpretedOption"&&o.hasOwnProperty(s)&&(n=o[s],a.resolvedType instanceof dn&&typeof n=="number"&&a.resolvedType.valuesById[n]!==void 0&&(n=a.resolvedType.valuesById[n]),t.push(jX(s),n));return t.length?vt.util.toObject(t):void 0}}function Va(o,e){if(o){for(var t=[],i=0,a=Object.keys(o),s,n;i<a.length;++i)if(n=o[s=a[i]],s!=="default"){var r=e.fields[s];!r&&!(r=e.fields[s=vt.util.camelCase(s)])||t.push(s,n)}return t.length?e.fromObject(vt.util.toObject(t)):void 0}}function zx(o,e){var t=o.fullName.split("."),i=e.fullName.split("."),a=0,s=0,n=i.length-1;if(!(o instanceof Yl)&&e instanceof Wx)for(;a<t.length&&s<n&&t[a]===i[s];){var r=e.lookup(t[a++],!0);if(r!==null&&r!==e)break;++s}else for(;a<t.length&&s<n&&t[a]===i[s];++a,++s);return i.slice(s).join(".")}function jX(o){return o.substring(0,1)+o.substring(1).replace(/([A-Z])(?=[a-z]|$)/g,function(e,t){return"_"+t.toLowerCase()})}});var Jx=A((RPe,zX)=>{zX.exports={nested:{google:{nested:{protobuf:{nested:{Api:{fields:{name:{type:"string",id:1},methods:{rule:"repeated",type:"Method",id:2},options:{rule:"repeated",type:"Option",id:3},version:{type:"string",id:4},sourceContext:{type:"SourceContext",id:5},mixins:{rule:"repeated",type:"Mixin",id:6},syntax:{type:"Syntax",id:7}}},Method:{fields:{name:{type:"string",id:1},requestTypeUrl:{type:"string",id:2},requestStreaming:{type:"bool",id:3},responseTypeUrl:{type:"string",id:4},responseStreaming:{type:"bool",id:5},options:{rule:"repeated",type:"Option",id:6},syntax:{type:"Syntax",id:7}}},Mixin:{fields:{name:{type:"string",id:1},root:{type:"string",id:2}}},SourceContext:{fields:{fileName:{type:"string",id:1}}},Option:{fields:{name:{type:"string",id:1},value:{type:"Any",id:2}}},Syntax:{values:{SYNTAX_PROTO2:0,SYNTAX_PROTO3:1}}}}}}}}});var Qx=A((mPe,XX)=>{XX.exports={nested:{google:{nested:{protobuf:{nested:{SourceContext:{fields:{fileName:{type:"string",id:1}}}}}}}}}});var Zx=A((OPe,$X)=>{$X.exports={nested:{google:{nested:{protobuf:{nested:{Type:{fields:{name:{type:"string",id:1},fields:{rule:"repeated",type:"Field",id:2},oneofs:{rule:"repeated",type:"string",id:3},options:{rule:"repeated",type:"Option",id:4},sourceContext:{type:"SourceContext",id:5},syntax:{type:"Syntax",id:6}}},Field:{fields:{kind:{type:"Kind",id:1},cardinality:{type:"Cardinality",id:2},number:{type:"int32",id:3},name:{type:"string",id:4},typeUrl:{type:"string",id:6},oneofIndex:{type:"int32",id:7},packed:{type:"bool",id:8},options:{rule:"repeated",type:"Option",id:9},jsonName:{type:"string",id:10},defaultValue:{type:"string",id:11}},nested:{Kind:{values:{TYPE_UNKNOWN:0,TYPE_DOUBLE:1,TYPE_FLOAT:2,TYPE_INT64:3,TYPE_UINT64:4,TYPE_INT32:5,TYPE_FIXED64:6,TYPE_FIXED32:7,TYPE_BOOL:8,TYPE_STRING:9,TYPE_GROUP:10,TYPE_MESSAGE:11,TYPE_BYTES:12,TYPE_UINT32:13,TYPE_ENUM:14,TYPE_SFIXED32:15,TYPE_SFIXED64:16,TYPE_SINT32:17,TYPE_SINT64:18}},Cardinality:{values:{CARDINALITY_UNKNOWN:0,CARDINALITY_OPTIONAL:1,CARDINALITY_REQUIRED:2,CARDINALITY_REPEATED:3}}}},Enum:{fields:{name:{type:"string",id:1},enumvalue:{rule:"repeated",type:"EnumValue",id:2},options:{rule:"repeated",type:"Option",id:3},sourceContext:{type:"SourceContext",id:4},syntax:{type:"Syntax",id:5}}},EnumValue:{fields:{name:{type:"string",id:1},number:{type:"int32",id:2},options:{rule:"repeated",type:"Option",id:3}}},Option:{fields:{name:{type:"string",id:1},value:{type:"Any",id:2}}},Syntax:{values:{SYNTAX_PROTO2:0,SYNTAX_PROTO3:1}},Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}},SourceContext:{fields:{fileName:{type:"string",id:1}}}}}}}}}});var nU=A(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.addCommonProtos=so.loadProtosWithOptionsSync=so.loadProtosWithOptions=void 0;var eU=k("fs"),tU=k("path"),wa=tT();function rU(o,e){let t=o.resolvePath;o.resolvePath=(i,a)=>{if(tU.isAbsolute(a))return a;for(let s of e){let n=tU.join(s,a);try{return eU.accessSync(n,eU.constants.R_OK),n}catch{continue}}return process.emitWarning(`${a} not found in any of the include paths ${e}`),t(i,a)}}async function JX(o,e){let t=new wa.Root;if(e=e||{},e.includeDirs){if(!Array.isArray(e.includeDirs))return Promise.reject(new Error("The includeDirs option must be an array"));rU(t,e.includeDirs)}let i=await t.load(o,e);return i.resolveAll(),i}so.loadProtosWithOptions=JX;function QX(o,e){let t=new wa.Root;if(e=e||{},e.includeDirs){if(!Array.isArray(e.includeDirs))throw new Error("The includeDirs option must be an array");rU(t,e.includeDirs)}let i=t.loadSync(o,e);return i.resolveAll(),i}so.loadProtosWithOptionsSync=QX;function ZX(){let o=Jx(),e=oh(),t=Qx(),i=Zx();wa.common("api",o.nested.google.nested.protobuf.nested),wa.common("descriptor",e.nested.google.nested.protobuf.nested),wa.common("source_context",t.nested.google.nested.protobuf.nested),wa.common("type",i.nested.google.nested.protobuf.nested)}so.addCommonProtos=ZX});var aU=A((iU,ah)=>{var oU=function(o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var e=null;try{e=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function t(N,p,I){this.low=N|0,this.high=p|0,this.unsigned=!!I}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0});function i(N){return(N&&N.__isLong__)===!0}function a(N){var p=Math.clz32(N&-N);return N?31-p:p}t.isLong=i;var s={},n={};function r(N,p){var I,J,Q;return p?(N>>>=0,(Q=0<=N&&N<256)&&(J=n[N],J)?J:(I=c(N,0,!0),Q&&(n[N]=I),I)):(N|=0,(Q=-128<=N&&N<128)&&(J=s[N],J)?J:(I=c(N,N<0?-1:0,!1),Q&&(s[N]=I),I))}t.fromInt=r;function l(N,p){if(isNaN(N))return p?y:b;if(p){if(N<0)return y;if(N>=M)return ee}else{if(N<=-P)return le;if(N+1>=P)return ie}return N<0?l(-N,p).neg():c(N%R|0,N/R|0,p)}t.fromNumber=l;function c(N,p,I){return new t(N,p,I)}t.fromBits=c;var u=Math.pow;function E(N,p,I){if(N.length===0)throw Error("empty string");if(typeof p=="number"?(I=p,p=!1):p=!!p,N==="NaN"||N==="Infinity"||N==="+Infinity"||N==="-Infinity")return p?y:b;if(I=I||10,I<2||36<I)throw RangeError("radix");var J;if((J=N.indexOf("-"))>0)throw Error("interior hyphen");if(J===0)return E(N.substring(1),p,I).neg();for(var Q=l(u(I,8)),X=b,ue=0;ue<N.length;ue+=8){var Ee=Math.min(8,N.length-ue),Ie=parseInt(N.substring(ue,ue+Ee),I);if(Ee<8){var ve=l(u(I,Ee));X=X.mul(ve).add(l(Ie))}else X=X.mul(Q),X=X.add(l(Ie))}return X.unsigned=p,X}t.fromString=E;function d(N,p){return typeof N=="number"?l(N,p):typeof N=="string"?E(N,p):c(N.low,N.high,typeof p=="boolean"?p:N.unsigned)}t.fromValue=d;var f=65536,O=1<<24,R=f*f,M=R*R,P=M/2,C=r(O),b=r(0);t.ZERO=b;var y=r(0,!0);t.UZERO=y;var W=r(1);t.ONE=W;var q=r(1,!0);t.UONE=q;var H=r(-1);t.NEG_ONE=H;var ie=c(-1,2147483647,!1);t.MAX_VALUE=ie;var ee=c(-1,-1,!0);t.MAX_UNSIGNED_VALUE=ee;var le=c(0,-2147483648,!1);t.MIN_VALUE=le;var v=t.prototype;v.toInt=function(){return this.unsigned?this.low>>>0:this.low},v.toNumber=function(){return this.unsigned?(this.high>>>0)*R+(this.low>>>0):this.high*R+(this.low>>>0)},v.toString=function(p){if(p=p||10,p<2||36<p)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(le)){var I=l(p),J=this.div(I),Q=J.mul(I).sub(this);return J.toString(p)+Q.toInt().toString(p)}else return"-"+this.neg().toString(p);for(var X=l(u(p,6),this.unsigned),ue=this,Ee="";;){var Ie=ue.div(X),ve=ue.sub(Ie.mul(X)).toInt()>>>0,ae=ve.toString(p);if(ue=Ie,ue.isZero())return ae+Ee;for(;ae.length<6;)ae="0"+ae;Ee=""+ae+Ee}},v.getHighBits=function(){return this.high},v.getHighBitsUnsigned=function(){return this.high>>>0},v.getLowBits=function(){return this.low},v.getLowBitsUnsigned=function(){return this.low>>>0},v.getNumBitsAbs=function(){if(this.isNegative())return this.eq(le)?64:this.neg().getNumBitsAbs();for(var p=this.high!=0?this.high:this.low,I=31;I>0&&!(p&1<<I);I--);return this.high!=0?I+33:I+1},v.isZero=function(){return this.high===0&&this.low===0},v.eqz=v.isZero,v.isNegative=function(){return!this.unsigned&&this.high<0},v.isPositive=function(){return this.unsigned||this.high>=0},v.isOdd=function(){return(this.low&1)===1},v.isEven=function(){return(this.low&1)===0},v.equals=function(p){return i(p)||(p=d(p)),this.unsigned!==p.unsigned&&this.high>>>31===1&&p.high>>>31===1?!1:this.high===p.high&&this.low===p.low},v.eq=v.equals,v.notEquals=function(p){return!this.eq(p)},v.neq=v.notEquals,v.ne=v.notEquals,v.lessThan=function(p){return this.comp(p)<0},v.lt=v.lessThan,v.lessThanOrEqual=function(p){return this.comp(p)<=0},v.lte=v.lessThanOrEqual,v.le=v.lessThanOrEqual,v.greaterThan=function(p){return this.comp(p)>0},v.gt=v.greaterThan,v.greaterThanOrEqual=function(p){return this.comp(p)>=0},v.gte=v.greaterThanOrEqual,v.ge=v.greaterThanOrEqual,v.compare=function(p){if(i(p)||(p=d(p)),this.eq(p))return 0;var I=this.isNegative(),J=p.isNegative();return I&&!J?-1:!I&&J?1:this.unsigned?p.high>>>0>this.high>>>0||p.high===this.high&&p.low>>>0>this.low>>>0?-1:1:this.sub(p).isNegative()?-1:1},v.comp=v.compare,v.negate=function(){return!this.unsigned&&this.eq(le)?le:this.not().add(W)},v.neg=v.negate,v.add=function(p){i(p)||(p=d(p));var I=this.high>>>16,J=this.high&65535,Q=this.low>>>16,X=this.low&65535,ue=p.high>>>16,Ee=p.high&65535,Ie=p.low>>>16,ve=p.low&65535,ae=0,xe=0,me=0,Ue=0;return Ue+=X+ve,me+=Ue>>>16,Ue&=65535,me+=Q+Ie,xe+=me>>>16,me&=65535,xe+=J+Ee,ae+=xe>>>16,xe&=65535,ae+=I+ue,ae&=65535,c(me<<16|Ue,ae<<16|xe,this.unsigned)},v.subtract=function(p){return i(p)||(p=d(p)),this.add(p.neg())},v.sub=v.subtract,v.multiply=function(p){if(this.isZero())return this;if(i(p)||(p=d(p)),e){var I=e.mul(this.low,this.high,p.low,p.high);return c(I,e.get_high(),this.unsigned)}if(p.isZero())return this.unsigned?y:b;if(this.eq(le))return p.isOdd()?le:b;if(p.eq(le))return this.isOdd()?le:b;if(this.isNegative())return p.isNegative()?this.neg().mul(p.neg()):this.neg().mul(p).neg();if(p.isNegative())return this.mul(p.neg()).neg();if(this.lt(C)&&p.lt(C))return l(this.toNumber()*p.toNumber(),this.unsigned);var J=this.high>>>16,Q=this.high&65535,X=this.low>>>16,ue=this.low&65535,Ee=p.high>>>16,Ie=p.high&65535,ve=p.low>>>16,ae=p.low&65535,xe=0,me=0,Ue=0,at=0;return at+=ue*ae,Ue+=at>>>16,at&=65535,Ue+=X*ae,me+=Ue>>>16,Ue&=65535,Ue+=ue*ve,me+=Ue>>>16,Ue&=65535,me+=Q*ae,xe+=me>>>16,me&=65535,me+=X*ve,xe+=me>>>16,me&=65535,me+=ue*Ie,xe+=me>>>16,me&=65535,xe+=J*ae+Q*ve+X*Ie+ue*Ee,xe&=65535,c(Ue<<16|at,xe<<16|me,this.unsigned)},v.mul=v.multiply,v.divide=function(p){if(i(p)||(p=d(p)),p.isZero())throw Error("division by zero");if(e){if(!this.unsigned&&this.high===-2147483648&&p.low===-1&&p.high===-1)return this;var I=(this.unsigned?e.div_u:e.div_s)(this.low,this.high,p.low,p.high);return c(I,e.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?y:b;var J,Q,X;if(this.unsigned){if(p.unsigned||(p=p.toUnsigned()),p.gt(this))return y;if(p.gt(this.shru(1)))return q;X=y}else{if(this.eq(le)){if(p.eq(W)||p.eq(H))return le;if(p.eq(le))return W;var ue=this.shr(1);return J=ue.div(p).shl(1),J.eq(b)?p.isNegative()?W:H:(Q=this.sub(p.mul(J)),X=J.add(Q.div(p)),X)}else if(p.eq(le))return this.unsigned?y:b;if(this.isNegative())return p.isNegative()?this.neg().div(p.neg()):this.neg().div(p).neg();if(p.isNegative())return this.div(p.neg()).neg();X=b}for(Q=this;Q.gte(p);){J=Math.max(1,Math.floor(Q.toNumber()/p.toNumber()));for(var Ee=Math.ceil(Math.log(J)/Math.LN2),Ie=Ee<=48?1:u(2,Ee-48),ve=l(J),ae=ve.mul(p);ae.isNegative()||ae.gt(Q);)J-=Ie,ve=l(J,this.unsigned),ae=ve.mul(p);ve.isZero()&&(ve=W),X=X.add(ve),Q=Q.sub(ae)}return X},v.div=v.divide,v.modulo=function(p){if(i(p)||(p=d(p)),e){var I=(this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,p.low,p.high);return c(I,e.get_high(),this.unsigned)}return this.sub(this.div(p).mul(p))},v.mod=v.modulo,v.rem=v.modulo,v.not=function(){return c(~this.low,~this.high,this.unsigned)},v.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},v.clz=v.countLeadingZeros,v.countTrailingZeros=function(){return this.low?a(this.low):a(this.high)+32},v.ctz=v.countTrailingZeros,v.and=function(p){return i(p)||(p=d(p)),c(this.low&p.low,this.high&p.high,this.unsigned)},v.or=function(p){return i(p)||(p=d(p)),c(this.low|p.low,this.high|p.high,this.unsigned)},v.xor=function(p){return i(p)||(p=d(p)),c(this.low^p.low,this.high^p.high,this.unsigned)},v.shiftLeft=function(p){return i(p)&&(p=p.toInt()),(p&=63)===0?this:p<32?c(this.low<<p,this.high<<p|this.low>>>32-p,this.unsigned):c(0,this.low<<p-32,this.unsigned)},v.shl=v.shiftLeft,v.shiftRight=function(p){return i(p)&&(p=p.toInt()),(p&=63)===0?this:p<32?c(this.low>>>p|this.high<<32-p,this.high>>p,this.unsigned):c(this.high>>p-32,this.high>=0?0:-1,this.unsigned)},v.shr=v.shiftRight,v.shiftRightUnsigned=function(p){return i(p)&&(p=p.toInt()),(p&=63)===0?this:p<32?c(this.low>>>p|this.high<<32-p,this.high>>>p,this.unsigned):p===32?c(this.high,0,this.unsigned):c(this.high>>>p-32,0,this.unsigned)},v.shru=v.shiftRightUnsigned,v.shr_u=v.shiftRightUnsigned,v.rotateLeft=function(p){var I;return i(p)&&(p=p.toInt()),(p&=63)===0?this:p===32?c(this.high,this.low,this.unsigned):p<32?(I=32-p,c(this.low<<p|this.high>>>I,this.high<<p|this.low>>>I,this.unsigned)):(p-=32,I=32-p,c(this.high<<p|this.low>>>I,this.low<<p|this.high>>>I,this.unsigned))},v.rotl=v.rotateLeft,v.rotateRight=function(p){var I;return i(p)&&(p=p.toInt()),(p&=63)===0?this:p===32?c(this.high,this.low,this.unsigned):p<32?(I=32-p,c(this.high<<I|this.low>>>p,this.low<<I|this.high>>>p,this.unsigned)):(p-=32,I=32-p,c(this.low<<I|this.high>>>p,this.high<<I|this.low>>>p,this.unsigned))},v.rotr=v.rotateRight,v.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},v.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},v.toBytes=function(p){return p?this.toBytesLE():this.toBytesBE()},v.toBytesLE=function(){var p=this.high,I=this.low;return[I&255,I>>>8&255,I>>>16&255,I>>>24,p&255,p>>>8&255,p>>>16&255,p>>>24]},v.toBytesBE=function(){var p=this.high,I=this.low;return[p>>>24,p>>>16&255,p>>>8&255,p&255,I>>>24,I>>>16&255,I>>>8&255,I&255]},t.fromBytes=function(p,I,J){return J?t.fromBytesLE(p,I):t.fromBytesBE(p,I)},t.fromBytesLE=function(p,I){return new t(p[0]|p[1]<<8|p[2]<<16|p[3]<<24,p[4]|p[5]<<8|p[6]<<16|p[7]<<24,I)},t.fromBytesBE=function(p,I){return new t(p[4]<<24|p[5]<<16|p[6]<<8|p[7],p[0]<<24|p[1]<<16|p[2]<<8|p[3],I)};var B=t;return o.default=B,"default"in o?o.default:o}({});typeof define=="function"&&define.amd?define([],function(){return oU}):typeof ah=="object"&&typeof iU=="object"&&(ah.exports=oU)});var TU=A(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.loadFileDescriptorSetFromObject=Fe.loadFileDescriptorSetFromBuffer=Fe.fromJSON=Fe.loadSync=Fe.load=Fe.IdempotencyLevel=Fe.isAnyExtension=Fe.Long=void 0;var e$=BD(),Kr=tT(),lh=$x(),ch=nU(),t$=aU();Fe.Long=t$;function r$(o){return"@type"in o&&typeof o["@type"]=="string"}Fe.isAnyExtension=r$;var cU;(function(o){o.IDEMPOTENCY_UNKNOWN="IDEMPOTENCY_UNKNOWN",o.NO_SIDE_EFFECTS="NO_SIDE_EFFECTS",o.IDEMPOTENT="IDEMPOTENT"})(cU=Fe.IdempotencyLevel||(Fe.IdempotencyLevel={}));var uU={longs:String,enums:String,bytes:String,defaults:!0,oneofs:!0,json:!0};function n$(o,e){return o===""?e:o+"."+e}function o$(o){return o instanceof Kr.Service||o instanceof Kr.Type||o instanceof Kr.Enum}function i$(o){return o instanceof Kr.Namespace||o instanceof Kr.Root}function EU(o,e){let t=n$(e,o.name);return o$(o)?[[t,o]]:i$(o)&&typeof o.nested<"u"?Object.keys(o.nested).map(i=>EU(o.nested[i],t)).reduce((i,a)=>i.concat(a),[]):[]}function sU(o,e){return function(i){return o.toObject(o.decode(i),e)}}function lU(o){return function(t){if(Array.isArray(t))throw new Error(`Failed to serialize message: expected object with ${o.name} structure, got array instead`);let i=o.fromObject(t);return o.encode(i).finish()}}function a$(o){return(o||[]).reduce((e,t)=>{for(let[i,a]of Object.entries(t))switch(i){case"uninterpreted_option":e.uninterpreted_option.push(t.uninterpreted_option);break;default:e[i]=a}return e},{deprecated:!1,idempotency_level:cU.IDEMPOTENCY_UNKNOWN,uninterpreted_option:[]})}function s$(o,e,t,i){let a=o.resolvedRequestType,s=o.resolvedResponseType;return{path:"/"+e+"/"+o.name,requestStream:!!o.requestStream,responseStream:!!o.responseStream,requestSerialize:lU(a),requestDeserialize:sU(a,t),responseSerialize:lU(s),responseDeserialize:sU(s,t),originalName:e$(o.name),requestType:sh(a,i),responseType:sh(s,i),options:a$(o.parsedOptions)}}function l$(o,e,t,i){let a={};for(let s of o.methodsArray)a[s.name]=s$(s,e,t,i);return a}function sh(o,e){let t=o.toDescriptor("proto3");return{format:"Protocol Buffer 3 DescriptorProto",type:t.$type.toObject(t,uU),fileDescriptorProtos:e}}function c$(o,e){let t=o.toDescriptor("proto3");return{format:"Protocol Buffer 3 EnumDescriptorProto",type:t.$type.toObject(t,uU),fileDescriptorProtos:e}}function u$(o,e,t,i){if(o instanceof Kr.Service)return l$(o,e,t,i);if(o instanceof Kr.Type)return sh(o,i);if(o instanceof Kr.Enum)return c$(o,i);throw new Error("Type mismatch in reflection object handling")}function oT(o,e){let t={};o.resolveAll();let a=o.toDescriptor("proto3").file.map(s=>Buffer.from(lh.FileDescriptorProto.encode(s).finish()));for(let[s,n]of EU(o,""))t[s]=u$(n,s,e,a);return t}function _U(o,e){e=e||{};let t=Kr.Root.fromDescriptor(o);return t.resolveAll(),oT(t,e)}function E$(o,e){return(0,ch.loadProtosWithOptions)(o,e).then(t=>oT(t,e))}Fe.load=E$;function _$(o,e){let t=(0,ch.loadProtosWithOptionsSync)(o,e);return oT(t,e)}Fe.loadSync=_$;function T$(o,e){e=e||{};let t=Kr.Root.fromJSON(o);return t.resolveAll(),oT(t,e)}Fe.fromJSON=T$;function S$(o,e){let t=lh.FileDescriptorSet.decode(o);return _U(t,e)}Fe.loadFileDescriptorSetFromBuffer=S$;function p$(o,e){let t=lh.FileDescriptorSet.fromObject(o);return _U(t,e)}Fe.loadFileDescriptorSetFromObject=p$;(0,ch.addCommonProtos)()});var Xo=A(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.setup=Re.getChannelzServiceDefinition=Re.getChannelzHandlers=Re.unregisterChannelzRef=Re.registerChannelzSocket=Re.registerChannelzServer=Re.registerChannelzSubchannel=Re.registerChannelzChannel=Re.ChannelzCallTrackerStub=Re.ChannelzCallTracker=Re.ChannelzChildrenTrackerStub=Re.ChannelzChildrenTracker=Re.ChannelzTrace=Re.ChannelzTraceStub=void 0;var SU=k("net"),zo=(aD(),$(iD)),Kl=er(),ql=Ae(),d$=fr(),f$=y_(),A$=mA();function uh(o){return{channel_id:o.id,name:o.name}}function ph(o){return{subchannel_id:o.id,name:o.name}}function h$(o){return{server_id:o.id}}function lT(o){return{socket_id:o.id,name:o.name}}var pU=32,dh=100,Eh=class{constructor(){this.events=[],this.creationTimestamp=new Date,this.eventsLogged=0}addTrace(){}getTraceMessage(){return{creation_timestamp:qr(this.creationTimestamp),num_events_logged:this.eventsLogged,events:[]}}};Re.ChannelzTraceStub=Eh;var _h=class{constructor(){this.events=[],this.eventsLogged=0,this.creationTimestamp=new Date}addTrace(e,t,i){let a=new Date;this.events.push({description:t,severity:e,timestamp:a,childChannel:(i==null?void 0:i.kind)==="channel"?i:void 0,childSubchannel:(i==null?void 0:i.kind)==="subchannel"?i:void 0}),this.events.length>=pU*2&&(this.events=this.events.slice(pU)),this.eventsLogged+=1}getTraceMessage(){return{creation_timestamp:qr(this.creationTimestamp),num_events_logged:this.eventsLogged,events:this.events.map(e=>({description:e.description,severity:e.severity,timestamp:qr(e.timestamp),channel_ref:e.childChannel?uh(e.childChannel):null,subchannel_ref:e.childSubchannel?ph(e.childSubchannel):null}))}}};Re.ChannelzTrace=_h;var aT=class{constructor(){this.channelChildren=new zo.OrderedMap,this.subchannelChildren=new zo.OrderedMap,this.socketChildren=new zo.OrderedMap,this.trackerMap={channel:this.channelChildren,subchannel:this.subchannelChildren,socket:this.socketChildren}}refChild(e){let t=this.trackerMap[e.kind],i=t.find(e.id);i.equals(t.end())?t.setElement(e.id,{ref:e,count:1},i):i.pointer[1].count+=1}unrefChild(e){let t=this.trackerMap[e.kind],i=t.getElementByKey(e.id);i!==void 0&&(i.count-=1,i.count===0&&t.eraseElementByKey(e.id))}getChildLists(){return{channels:this.channelChildren,subchannels:this.subchannelChildren,sockets:this.socketChildren}}};Re.ChannelzChildrenTracker=aT;var Th=class extends aT{refChild(){}unrefChild(){}};Re.ChannelzChildrenTrackerStub=Th;var sT=class{constructor(){this.callsStarted=0,this.callsSucceeded=0,this.callsFailed=0,this.lastCallStartedTimestamp=null}addCallStarted(){this.callsStarted+=1,this.lastCallStartedTimestamp=new Date}addCallSucceeded(){this.callsSucceeded+=1}addCallFailed(){this.callsFailed+=1}};Re.ChannelzCallTracker=sT;var Sh=class extends sT{addCallStarted(){}addCallSucceeded(){}addCallFailed(){}};Re.ChannelzCallTrackerStub=Sh;var fn={channel:new zo.OrderedMap,subchannel:new zo.OrderedMap,server:new zo.OrderedMap,socket:new zo.OrderedMap},cT=o=>{let e=1;function t(){return e++}let i=fn[o];return(a,s,n)=>{let r=t(),l={id:r,name:a,kind:o};return n&&i.setElement(r,{ref:l,getInfo:s}),l}};Re.registerChannelzChannel=cT("channel");Re.registerChannelzSubchannel=cT("subchannel");Re.registerChannelzServer=cT("server");Re.registerChannelzSocket=cT("socket");function v$(o){fn[o.kind].eraseElementByKey(o.id)}Re.unregisterChannelzRef=v$;function R$(o){let e=Number.parseInt(o,16);return[e/256|0,e%256]}function dU(o){if(o==="")return[];let e=o.split(":").map(i=>R$(i));return[].concat(...e)}function m$(o){if((0,SU.isIPv4)(o))return Buffer.from(Uint8Array.from(o.split(".").map(e=>Number.parseInt(e))));if((0,SU.isIPv6)(o)){let e,t,i=o.indexOf("::");i===-1?(e=o,t=""):(e=o.substring(0,i),t=o.substring(i+2));let a=Buffer.from(dU(e)),s=Buffer.from(dU(t)),n=Buffer.alloc(16-a.length-s.length,0);return Buffer.concat([a,n,s])}else return null}function AU(o){switch(o){case Kl.ConnectivityState.CONNECTING:return{state:"CONNECTING"};case Kl.ConnectivityState.IDLE:return{state:"IDLE"};case Kl.ConnectivityState.READY:return{state:"READY"};case Kl.ConnectivityState.SHUTDOWN:return{state:"SHUTDOWN"};case Kl.ConnectivityState.TRANSIENT_FAILURE:return{state:"TRANSIENT_FAILURE"};default:return{state:"UNKNOWN"}}}function qr(o){if(!o)return null;let e=o.getTime();return{seconds:e/1e3|0,nanos:e%1e3*1e6}}function hU(o){let e=o.getInfo(),t=[],i=[];return e.children.channels.forEach(a=>{t.push(uh(a[1].ref))}),e.children.subchannels.forEach(a=>{i.push(ph(a[1].ref))}),{ref:uh(o.ref),data:{target:e.target,state:AU(e.state),calls_started:e.callTracker.callsStarted,calls_succeeded:e.callTracker.callsSucceeded,calls_failed:e.callTracker.callsFailed,last_call_started_timestamp:qr(e.callTracker.lastCallStartedTimestamp),trace:e.trace.getTraceMessage()},channel_ref:t,subchannel_ref:i}}function O$(o,e){let t=parseInt(o.request.channel_id,10),i=fn.channel.getElementByKey(t);if(i===void 0){e({code:ql.Status.NOT_FOUND,details:"No channel data found for id "+t});return}e(null,{channel:hU(i)})}function N$(o,e){let t=parseInt(o.request.max_results,10)||dh,i=[],a=parseInt(o.request.start_channel_id,10),s=fn.channel,n;for(n=s.lowerBound(a);!n.equals(s.end())&&i.length<t;n=n.next())i.push(hU(n.pointer[1]));e(null,{channel:i,end:n.equals(s.end())})}function vU(o){let e=o.getInfo(),t=[];return e.listenerChildren.sockets.forEach(i=>{t.push(lT(i[1].ref))}),{ref:h$(o.ref),data:{calls_started:e.callTracker.callsStarted,calls_succeeded:e.callTracker.callsSucceeded,calls_failed:e.callTracker.callsFailed,last_call_started_timestamp:qr(e.callTracker.lastCallStartedTimestamp),trace:e.trace.getTraceMessage()},listen_socket:t}}function M$(o,e){let t=parseInt(o.request.server_id,10),a=fn.server.getElementByKey(t);if(a===void 0){e({code:ql.Status.NOT_FOUND,details:"No server data found for id "+t});return}e(null,{server:vU(a)})}function P$(o,e){let t=parseInt(o.request.max_results,10)||dh,i=parseInt(o.request.start_server_id,10),a=fn.server,s=[],n;for(n=a.lowerBound(i);!n.equals(a.end())&&s.length<t;n=n.next())s.push(vU(n.pointer[1]));e(null,{server:s,end:n.equals(a.end())})}function C$(o,e){let t=parseInt(o.request.subchannel_id,10),i=fn.subchannel.getElementByKey(t);if(i===void 0){e({code:ql.Status.NOT_FOUND,details:"No subchannel data found for id "+t});return}let a=i.getInfo(),s=[];a.children.sockets.forEach(r=>{s.push(lT(r[1].ref))});let n={ref:ph(i.ref),data:{target:a.target,state:AU(a.state),calls_started:a.callTracker.callsStarted,calls_succeeded:a.callTracker.callsSucceeded,calls_failed:a.callTracker.callsFailed,last_call_started_timestamp:qr(a.callTracker.lastCallStartedTimestamp),trace:a.trace.getTraceMessage()},socket_ref:s};e(null,{subchannel:n})}function fU(o){var e;return(0,d$.isTcpSubchannelAddress)(o)?{address:"tcpip_address",tcpip_address:{ip_address:(e=m$(o.host))!==null&&e!==void 0?e:void 0,port:o.port}}:{address:"uds_address",uds_address:{filename:o.path}}}function g$(o,e){var t,i,a,s,n;let r=parseInt(o.request.socket_id,10),l=fn.socket.getElementByKey(r);if(l===void 0){e({code:ql.Status.NOT_FOUND,details:"No socket data found for id "+r});return}let c=l.getInfo(),u=c.security?{model:"tls",tls:{cipher_suite:c.security.cipherSuiteStandardName?"standard_name":"other_name",standard_name:(t=c.security.cipherSuiteStandardName)!==null&&t!==void 0?t:void 0,other_name:(i=c.security.cipherSuiteOtherName)!==null&&i!==void 0?i:void 0,local_certificate:(a=c.security.localCertificate)!==null&&a!==void 0?a:void 0,remote_certificate:(s=c.security.remoteCertificate)!==null&&s!==void 0?s:void 0}}:null,E={ref:lT(l.ref),local:c.localAddress?fU(c.localAddress):null,remote:c.remoteAddress?fU(c.remoteAddress):null,remote_name:(n=c.remoteName)!==null&&n!==void 0?n:void 0,security:u,data:{keep_alives_sent:c.keepAlivesSent,streams_started:c.streamsStarted,streams_succeeded:c.streamsSucceeded,streams_failed:c.streamsFailed,last_local_stream_created_timestamp:qr(c.lastLocalStreamCreatedTimestamp),last_remote_stream_created_timestamp:qr(c.lastRemoteStreamCreatedTimestamp),messages_received:c.messagesReceived,messages_sent:c.messagesSent,last_message_received_timestamp:qr(c.lastMessageReceivedTimestamp),last_message_sent_timestamp:qr(c.lastMessageSentTimestamp),local_flow_control_window:c.localFlowControlWindow?{value:c.localFlowControlWindow}:null,remote_flow_control_window:c.remoteFlowControlWindow?{value:c.remoteFlowControlWindow}:null}};e(null,{socket:E})}function L$(o,e){let t=parseInt(o.request.server_id,10),i=fn.server.getElementByKey(t);if(i===void 0){e({code:ql.Status.NOT_FOUND,details:"No server data found for id "+t});return}let a=parseInt(o.request.start_socket_id,10),s=parseInt(o.request.max_results,10)||dh,r=i.getInfo().sessionChildren.sockets,l=[],c;for(c=r.lowerBound(a);!c.equals(r.end())&&l.length<s;c=c.next())l.push(lT(c.pointer[1].ref));e(null,{socket_ref:l,end:c.equals(r.end())})}function RU(){return{GetChannel:O$,GetTopChannels:N$,GetServer:M$,GetServers:P$,GetSubchannel:C$,GetSocket:g$,GetServerSockets:L$}}Re.getChannelzHandlers=RU;var iT=null;function mU(){if(iT)return iT;let o=TU().loadSync,e=o("channelz.proto",{keepCase:!0,longs:String,enums:String,defaults:!0,oneofs:!0,includeDirs:[`${__dirname}/../../proto`]});return iT=(0,A$.loadPackageDefinition)(e).grpc.channelz.v1.Channelz.service,iT}Re.getChannelzServiceDefinition=mU;function I$(){(0,f$.registerAdminService)(mU,RU)}Re.setup=I$});var OU=A(ET=>{"use strict";Object.defineProperty(ET,"__esModule",{value:!0});ET.Subchannel=void 0;var Ce=er(),y$=Pl(),fh=De(),uT=Ae(),D$=Vt(),x$=fr(),Wr=Xo(),U$="subchannel",b$=~(1<<31),Ah=class{constructor(e,t,i,a,s){var n;this.channelTarget=e,this.subchannelAddress=t,this.options=i,this.credentials=a,this.connector=s,this.connectivityState=Ce.ConnectivityState.IDLE,this.transport=null,this.continueConnecting=!1,this.stateListeners=new Set,this.refcount=0,this.channelzEnabled=!0;let r={initialDelay:i["grpc.initial_reconnect_backoff_ms"],maxDelay:i["grpc.max_reconnect_backoff_ms"]};this.backoffTimeout=new y$.BackoffTimeout(()=>{this.handleBackoffTimer()},r),this.backoffTimeout.unref(),this.subchannelAddressString=(0,x$.subchannelAddressToString)(t),this.keepaliveTime=(n=i["grpc.keepalive_time_ms"])!==null&&n!==void 0?n:-1,i["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.channelzTrace=new Wr.ChannelzTraceStub,this.callTracker=new Wr.ChannelzCallTrackerStub,this.childrenTracker=new Wr.ChannelzChildrenTrackerStub,this.streamTracker=new Wr.ChannelzCallTrackerStub):(this.channelzTrace=new Wr.ChannelzTrace,this.callTracker=new Wr.ChannelzCallTracker,this.childrenTracker=new Wr.ChannelzChildrenTracker,this.streamTracker=new Wr.ChannelzCallTracker),this.channelzRef=(0,Wr.registerChannelzSubchannel)(this.subchannelAddressString,()=>this.getChannelzInfo(),this.channelzEnabled),this.channelzTrace.addTrace("CT_INFO","Subchannel created"),this.trace("Subchannel constructed with options "+JSON.stringify(i,void 0,2))}getChannelzInfo(){return{state:this.connectivityState,trace:this.channelzTrace,callTracker:this.callTracker,children:this.childrenTracker.getChildLists(),target:this.subchannelAddressString}}trace(e){fh.trace(uT.LogVerbosity.DEBUG,U$,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}refTrace(e){fh.trace(uT.LogVerbosity.DEBUG,"subchannel_refcount","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}handleBackoffTimer(){this.continueConnecting?this.transitionToState([Ce.ConnectivityState.TRANSIENT_FAILURE],Ce.ConnectivityState.CONNECTING):this.transitionToState([Ce.ConnectivityState.TRANSIENT_FAILURE],Ce.ConnectivityState.IDLE)}startBackoff(){this.backoffTimeout.runOnce()}stopBackoff(){this.backoffTimeout.stop(),this.backoffTimeout.reset()}startConnectingInternal(){let e=this.options;if(e["grpc.keepalive_time_ms"]){let t=Math.min(this.keepaliveTime,b$);e=Object.assign(Object.assign({},e),{"grpc.keepalive_time_ms":t})}this.connector.connect(this.subchannelAddress,this.credentials,e).then(t=>{this.transitionToState([Ce.ConnectivityState.CONNECTING],Ce.ConnectivityState.READY)?(this.transport=t,this.channelzEnabled&&this.childrenTracker.refChild(t.getChannelzRef()),t.addDisconnectListener(i=>{this.transitionToState([Ce.ConnectivityState.READY],Ce.ConnectivityState.IDLE),i&&this.keepaliveTime>0&&(this.keepaliveTime*=2,fh.log(uT.LogVerbosity.ERROR,`Connection to ${(0,D$.uriToString)(this.channelTarget)} at ${this.subchannelAddressString} rejected by server because of excess pings. Increasing ping interval to ${this.keepaliveTime} ms`))})):t.shutdown()},t=>{this.transitionToState([Ce.ConnectivityState.CONNECTING],Ce.ConnectivityState.TRANSIENT_FAILURE,`${t}`)})}transitionToState(e,t,i){var a,s;if(e.indexOf(this.connectivityState)===-1)return!1;this.trace(Ce.ConnectivityState[this.connectivityState]+" -> "+Ce.ConnectivityState[t]),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Connectivity state change to "+Ce.ConnectivityState[t]);let n=this.connectivityState;switch(this.connectivityState=t,t){case Ce.ConnectivityState.READY:this.stopBackoff();break;case Ce.ConnectivityState.CONNECTING:this.startBackoff(),this.startConnectingInternal(),this.continueConnecting=!1;break;case Ce.ConnectivityState.TRANSIENT_FAILURE:this.channelzEnabled&&this.transport&&this.childrenTracker.unrefChild(this.transport.getChannelzRef()),(a=this.transport)===null||a===void 0||a.shutdown(),this.transport=null,this.backoffTimeout.isRunning()||process.nextTick(()=>{this.handleBackoffTimer()});break;case Ce.ConnectivityState.IDLE:this.channelzEnabled&&this.transport&&this.childrenTracker.unrefChild(this.transport.getChannelzRef()),(s=this.transport)===null||s===void 0||s.shutdown(),this.transport=null;break;default:throw new Error(`Invalid state: unknown ConnectivityState ${t}`)}for(let r of this.stateListeners)r(this,n,t,this.keepaliveTime,i);return!0}ref(){this.refTrace("refcount "+this.refcount+" -> "+(this.refcount+1)),this.refcount+=1}unref(){this.refTrace("refcount "+this.refcount+" -> "+(this.refcount-1)),this.refcount-=1,this.refcount===0&&(this.channelzTrace.addTrace("CT_INFO","Shutting down"),(0,Wr.unregisterChannelzRef)(this.channelzRef),process.nextTick(()=>{this.transitionToState([Ce.ConnectivityState.CONNECTING,Ce.ConnectivityState.READY],Ce.ConnectivityState.IDLE)}))}unrefIfOneRef(){return this.refcount===1?(this.unref(),!0):!1}createCall(e,t,i,a){if(!this.transport)throw new Error("Cannot create call, subchannel not READY");let s;return this.channelzEnabled?(this.callTracker.addCallStarted(),this.streamTracker.addCallStarted(),s={onCallEnd:n=>{n.code===uT.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()}}):s={},this.transport.createCall(e,t,i,a,s)}startConnecting(){process.nextTick(()=>{this.transitionToState([Ce.ConnectivityState.IDLE],Ce.ConnectivityState.CONNECTING)||this.connectivityState===Ce.ConnectivityState.TRANSIENT_FAILURE&&(this.continueConnecting=!0)})}getConnectivityState(){return this.connectivityState}addConnectivityStateListener(e){this.stateListeners.add(e)}removeConnectivityStateListener(e){this.stateListeners.delete(e)}resetBackoff(){process.nextTick(()=>{this.backoffTimeout.reset(),this.transitionToState([Ce.ConnectivityState.TRANSIENT_FAILURE],Ce.ConnectivityState.CONNECTING)})}getAddress(){return this.subchannelAddressString}getChannelzRef(){return this.channelzRef}isHealthy(){return!0}addHealthStateWatcher(e){}removeHealthStateWatcher(e){}getRealSubchannel(){return this}realSubchannelEquals(e){return e.getRealSubchannel()===this}throttleKeepalive(e){e>this.keepaliveTime&&(this.keepaliveTime=e)}};ET.Subchannel=Ah});var mh=A(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.setup=uo.DEFAULT_PORT=void 0;var NU=wr(),PU=k("dns"),CU=k("util"),V$=jf(),hh=Ae(),vh=ht(),w$=De(),B$=Ae(),lo=Vt(),MU=k("net"),G$=Pl(),k$="dns_resolver";function co(o){w$.trace(B$.LogVerbosity.DEBUG,k$,o)}uo.DEFAULT_PORT=443;var H$=3e4,Y$=CU.promisify(PU.resolveTxt),F$=CU.promisify(PU.lookup),Rh=class{constructor(e,t,i){var a,s,n;this.target=e,this.listener=t,this.pendingLookupPromise=null,this.pendingTxtPromise=null,this.latestLookupResult=null,this.latestServiceConfig=null,this.latestServiceConfigError=null,this.continueResolving=!1,this.isNextResolutionTimerRunning=!1,this.isServiceConfigEnabled=!0,this.returnedIpResult=!1,co("Resolver constructed for target "+(0,lo.uriToString)(e));let r=(0,lo.splitHostPort)(e.path);r===null?(this.ipResult=null,this.dnsHostname=null,this.port=null):(0,MU.isIPv4)(r.host)||(0,MU.isIPv6)(r.host)?(this.ipResult=[{addresses:[{host:r.host,port:(a=r.port)!==null&&a!==void 0?a:uo.DEFAULT_PORT}]}],this.dnsHostname=null,this.port=null):(this.ipResult=null,this.dnsHostname=r.host,this.port=(s=r.port)!==null&&s!==void 0?s:uo.DEFAULT_PORT),this.percentage=Math.random()*100,i["grpc.service_config_disable_resolution"]===1&&(this.isServiceConfigEnabled=!1),this.defaultResolutionError={code:hh.Status.UNAVAILABLE,details:`Name resolution failed for target ${(0,lo.uriToString)(this.target)}`,metadata:new vh.Metadata};let l={initialDelay:i["grpc.initial_reconnect_backoff_ms"],maxDelay:i["grpc.max_reconnect_backoff_ms"]};this.backoff=new G$.BackoffTimeout(()=>{this.continueResolving&&this.startResolutionWithBackoff()},l),this.backoff.unref(),this.minTimeBetweenResolutionsMs=(n=i["grpc.dns_min_time_between_resolutions_ms"])!==null&&n!==void 0?n:H$,this.nextResolutionTimer=setTimeout(()=>{},0),clearTimeout(this.nextResolutionTimer)}startResolution(){if(this.ipResult!==null){this.returnedIpResult||(co("Returning IP address for target "+(0,lo.uriToString)(this.target)),setImmediate(()=>{this.listener.onSuccessfulResolution(this.ipResult,null,null,null,{})}),this.returnedIpResult=!0),this.backoff.stop(),this.backoff.reset(),this.stopNextResolutionTimer();return}if(this.dnsHostname===null)co("Failed to parse DNS address "+(0,lo.uriToString)(this.target)),setImmediate(()=>{this.listener.onError({code:hh.Status.UNAVAILABLE,details:`Failed to parse DNS address ${(0,lo.uriToString)(this.target)}`,metadata:new vh.Metadata})}),this.stopNextResolutionTimer();else{if(this.pendingLookupPromise!==null)return;co("Looking up DNS hostname "+this.dnsHostname),this.latestLookupResult=null;let e=this.dnsHostname;this.pendingLookupPromise=F$(e,{all:!0}),this.pendingLookupPromise.then(t=>{if(this.pendingLookupPromise===null)return;this.pendingLookupPromise=null,this.backoff.reset(),this.backoff.stop();let i=t.map(s=>({host:s.address,port:+this.port}));this.latestLookupResult=i.map(s=>({addresses:[s]}));let a="["+i.map(s=>s.host+":"+s.port).join(",")+"]";if(co("Resolved addresses for target "+(0,lo.uriToString)(this.target)+": "+a),this.latestLookupResult.length===0){this.listener.onError(this.defaultResolutionError);return}this.listener.onSuccessfulResolution(this.latestLookupResult,this.latestServiceConfig,this.latestServiceConfigError,null,{})},t=>{this.pendingLookupPromise!==null&&(co("Resolution error for target "+(0,lo.uriToString)(this.target)+": "+t.message),this.pendingLookupPromise=null,this.stopNextResolutionTimer(),this.listener.onError(this.defaultResolutionError))}),this.isServiceConfigEnabled&&this.pendingTxtPromise===null&&(this.pendingTxtPromise=Y$(e),this.pendingTxtPromise.then(t=>{if(this.pendingTxtPromise!==null){this.pendingTxtPromise=null;try{this.latestServiceConfig=(0,V$.extractAndSelectServiceConfig)(t,this.percentage)}catch(i){this.latestServiceConfigError={code:hh.Status.UNAVAILABLE,details:`Parsing service config failed with error ${i.message}`,metadata:new vh.Metadata}}this.latestLookupResult!==null&&this.listener.onSuccessfulResolution(this.latestLookupResult,this.latestServiceConfig,this.latestServiceConfigError,null,{})}},t=>{}))}}startNextResolutionTimer(){var e,t;clearTimeout(this.nextResolutionTimer),this.nextResolutionTimer=setTimeout(()=>{this.stopNextResolutionTimer(),this.continueResolving&&this.startResolutionWithBackoff()},this.minTimeBetweenResolutionsMs),(t=(e=this.nextResolutionTimer).unref)===null||t===void 0||t.call(e),this.isNextResolutionTimerRunning=!0}stopNextResolutionTimer(){clearTimeout(this.nextResolutionTimer),this.isNextResolutionTimerRunning=!1}startResolutionWithBackoff(){this.pendingLookupPromise===null&&(this.continueResolving=!1,this.backoff.runOnce(),this.startNextResolutionTimer(),this.startResolution())}updateResolution(){this.pendingLookupPromise===null&&(this.isNextResolutionTimerRunning||this.backoff.isRunning()?(this.isNextResolutionTimerRunning?co('resolution update delayed by "min time between resolutions" rate limit'):co("resolution update delayed by backoff timer until "+this.backoff.getEndTime().toISOString()),this.continueResolving=!0):this.startResolutionWithBackoff())}destroy(){this.continueResolving=!1,this.backoff.reset(),this.backoff.stop(),this.stopNextResolutionTimer(),this.pendingLookupPromise=null,this.pendingTxtPromise=null,this.latestLookupResult=null,this.latestServiceConfig=null,this.latestServiceConfigError=null,this.returnedIpResult=!1}static getDefaultAuthority(e){return e.path}};function K$(){(0,NU.registerResolver)("dns",Rh),(0,NU.registerDefaultScheme)("dns")}uo.setup=K$});var Oh=A(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.getProxiedConnection=ka.mapProxyName=void 0;var Wl=De(),Ba=Ae(),q$=wr(),W$=k("http"),j$=k("tls"),z$=De(),gU=fr(),Ga=Vt(),X$=k("url"),$$=mh(),J$="proxy";function Eo(o){z$.trace(Ba.LogVerbosity.DEBUG,J$,o)}function Q$(){let o="",e="";if(process.env.grpc_proxy)e="grpc_proxy",o=process.env.grpc_proxy;else if(process.env.https_proxy)e="https_proxy",o=process.env.https_proxy;else if(process.env.http_proxy)e="http_proxy",o=process.env.http_proxy;else return{};let t;try{t=new X$.URL(o)}catch{return(0,Wl.log)(Ba.LogVerbosity.ERROR,`cannot parse value of "${e}" env var`),{}}if(t.protocol!=="http:")return(0,Wl.log)(Ba.LogVerbosity.ERROR,`"${t.protocol}" scheme not supported in proxy URI`),{};let i=null;t.username&&(t.password?((0,Wl.log)(Ba.LogVerbosity.INFO,"userinfo found in proxy URI"),i=`${t.username}:${t.password}`):i=t.username);let a=t.hostname,s=t.port;s===""&&(s="80");let n={address:`${a}:${s}`};return i&&(n.creds=i),Eo("Proxy server "+n.address+" set by environment variable "+e),n}function Z$(){let o=process.env.no_grpc_proxy,e="no_grpc_proxy";return o||(o=process.env.no_proxy,e="no_proxy"),o?(Eo("No proxy server list set by environment variable "+e),o.split(",")):[]}function e5(o,e){var t;let i={target:o,extraOptions:{}};if(((t=e["grpc.enable_http_proxy"])!==null&&t!==void 0?t:1)===0||o.scheme==="unix")return i;let a=Q$();if(!a.address)return i;let s=(0,Ga.splitHostPort)(o.path);if(!s)return i;let n=s.host;for(let l of Z$())if(l===n)return Eo("Not using proxy for target in no_proxy list: "+(0,Ga.uriToString)(o)),i;let r={"grpc.http_connect_target":(0,Ga.uriToString)(o)};return a.creds&&(r["grpc.http_connect_creds"]=a.creds),{target:{scheme:"dns",path:a.address},extraOptions:r}}ka.mapProxyName=e5;function t5(o,e,t){var i;if(!("grpc.http_connect_target"in e))return Promise.resolve({});let a=e["grpc.http_connect_target"],s=(0,Ga.parseUri)(a);if(s===null)return Promise.resolve({});let n=(0,Ga.splitHostPort)(s.path);if(n===null)return Promise.resolve({});let r=`${n.host}:${(i=n.port)!==null&&i!==void 0?i:$$.DEFAULT_PORT}`,l={method:"CONNECT",path:r},c={Host:r};(0,gU.isTcpSubchannelAddress)(o)?(l.host=o.host,l.port=o.port):l.socketPath=o.path,"grpc.http_connect_creds"in e&&(c["Proxy-Authorization"]="Basic "+Buffer.from(e["grpc.http_connect_creds"]).toString("base64")),l.headers=c;let u=(0,gU.subchannelAddressToString)(o);return Eo("Using proxy "+u+" to connect to "+l.path),new Promise((E,d)=>{let f=W$.request(l);f.once("connect",(O,R,M)=>{var P;if(f.removeAllListeners(),R.removeAllListeners(),O.statusCode===200)if(Eo("Successfully connected to "+l.path+" through proxy "+u),"secureContext"in t){let C=(0,q$.getDefaultAuthority)(s),b=(0,Ga.splitHostPort)(C),y=(P=b==null?void 0:b.host)!==null&&P!==void 0?P:C,W=j$.connect(Object.assign({host:y,servername:y,socket:R},t),()=>{Eo("Successfully established a TLS connection to "+l.path+" through proxy "+u),E({socket:W,realTarget:s})});W.on("error",q=>{Eo("Failed to establish a TLS connection to "+l.path+" through proxy "+u+" with error "+q.message),d()})}else Eo("Successfully established a plaintext connection to "+l.path+" through proxy "+u),E({socket:R,realTarget:s});else(0,Wl.log)(Ba.LogVerbosity.ERROR,"Failed to connect to "+l.path+" through proxy "+u+" with status "+O.statusCode),d()}),f.once("error",O=>{f.removeAllListeners(),(0,Wl.log)(Ba.LogVerbosity.ERROR,"Failed to connect to proxy "+u+" with error "+O.message),d()}),f.end()})}ka.getProxiedConnection=t5});var Mh=A(_T=>{"use strict";Object.defineProperty(_T,"__esModule",{value:!0});_T.StreamDecoder=void 0;var jr;(function(o){o[o.NO_DATA=0]="NO_DATA",o[o.READING_SIZE=1]="READING_SIZE",o[o.READING_MESSAGE=2]="READING_MESSAGE"})(jr||(jr={}));var Nh=class{constructor(e){this.maxReadMessageLength=e,this.readState=jr.NO_DATA,this.readCompressFlag=Buffer.alloc(1),this.readPartialSize=Buffer.alloc(4),this.readSizeRemaining=4,this.readMessageSize=0,this.readPartialMessage=[],this.readMessageRemaining=0}write(e){let t=0,i,a=[];for(;t<e.length;)switch(this.readState){case jr.NO_DATA:this.readCompressFlag=e.slice(t,t+1),t+=1,this.readState=jr.READING_SIZE,this.readPartialSize.fill(0),this.readSizeRemaining=4,this.readMessageSize=0,this.readMessageRemaining=0,this.readPartialMessage=[];break;case jr.READING_SIZE:if(i=Math.min(e.length-t,this.readSizeRemaining),e.copy(this.readPartialSize,4-this.readSizeRemaining,t,t+i),this.readSizeRemaining-=i,t+=i,this.readSizeRemaining===0){if(this.readMessageSize=this.readPartialSize.readUInt32BE(0),this.maxReadMessageLength!==-1&&this.readMessageSize>this.maxReadMessageLength)throw new Error(`Received message larger than max (${this.readMessageSize} vs ${this.maxReadMessageLength})`);if(this.readMessageRemaining=this.readMessageSize,this.readMessageRemaining>0)this.readState=jr.READING_MESSAGE;else{let s=Buffer.concat([this.readCompressFlag,this.readPartialSize],5);this.readState=jr.NO_DATA,a.push(s)}}break;case jr.READING_MESSAGE:if(i=Math.min(e.length-t,this.readMessageRemaining),this.readPartialMessage.push(e.slice(t,t+i)),this.readMessageRemaining-=i,t+=i,this.readMessageRemaining===0){let s=[this.readCompressFlag,this.readPartialSize].concat(this.readPartialMessage),n=Buffer.concat(s,this.readMessageSize+5);this.readState=jr.NO_DATA,a.push(n)}break;default:throw new Error("Unexpected read state")}return a}};_T.StreamDecoder=Nh});var IU=A(TT=>{"use strict";Object.defineProperty(TT,"__esModule",{value:!0});TT.Http2SubchannelCall=void 0;var An=k("http2"),r5=k("os"),Ne=Ae(),hn=ht(),n5=Mh(),o5=De(),i5=Ae(),a5="subchannel_call";function s5(o){for(let[e,t]of Object.entries(r5.constants.errno))if(t===o)return e;return"Unknown system error "+o}function LU(o){let e=`Received HTTP status code ${o}`,t;switch(o){case 400:t=Ne.Status.INTERNAL;break;case 401:t=Ne.Status.UNAUTHENTICATED;break;case 403:t=Ne.Status.PERMISSION_DENIED;break;case 404:t=Ne.Status.UNIMPLEMENTED;break;case 429:case 502:case 503:case 504:t=Ne.Status.UNAVAILABLE;break;default:t=Ne.Status.UNKNOWN}return{code:t,details:e,metadata:new hn.Metadata}}var Ph=class{constructor(e,t,i,a,s){var n;this.http2Stream=e,this.callEventTracker=t,this.listener=i,this.transport=a,this.callId=s,this.isReadFilterPending=!1,this.isPushPending=!1,this.canPush=!1,this.readsClosed=!1,this.statusOutput=!1,this.unpushedReadMessages=[],this.finalStatus=null,this.internalError=null,this.serverEndedCall=!1;let r=(n=a.getOptions()["grpc.max_receive_message_length"])!==null&&n!==void 0?n:Ne.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH;this.decoder=new n5.StreamDecoder(r),e.on("response",(l,c)=>{let u="";for(let E of Object.keys(l))u+=" "+E+": "+l[E]+` `;if(this.trace(`Received server headers: `+u),this.httpStatusCode=l[":status"],c&An.constants.NGHTTP2_FLAG_END_STREAM)this.handleTrailers(l);else{let E;try{E=hn.Metadata.fromHttp2Headers(l)}catch(d){this.endCall({code:Ne.Status.UNKNOWN,details:d.message,metadata:new hn.Metadata});return}this.listener.onReceiveMetadata(E)}}),e.on("trailers",l=>{this.handleTrailers(l)}),e.on("data",l=>{if(this.statusOutput)return;this.trace("receive HTTP/2 data frame of length "+l.length);let c;try{c=this.decoder.write(l)}catch(u){this.cancelWithStatus(Ne.Status.RESOURCE_EXHAUSTED,u.message);return}for(let u of c)this.trace("parsed message of length "+u.length),this.callEventTracker.addMessageReceived(),this.tryPush(u)}),e.on("end",()=>{this.readsClosed=!0,this.maybeOutputStatus()}),e.on("close",()=>{this.serverEndedCall=!0,process.nextTick(()=>{var l;if(this.trace("HTTP/2 stream closed with code "+e.rstCode),((l=this.finalStatus)===null||l===void 0?void 0:l.code)===Ne.Status.OK)return;let c,u="";switch(e.rstCode){case An.constants.NGHTTP2_NO_ERROR:if(this.finalStatus!==null)return;if(this.httpStatusCode&&this.httpStatusCode!==200){let E=LU(this.httpStatusCode);c=E.code,u=E.details}else c=Ne.Status.INTERNAL,u=`Received RST_STREAM with code ${e.rstCode} (Call ended without gRPC status)`;break;case An.constants.NGHTTP2_REFUSED_STREAM:c=Ne.Status.UNAVAILABLE,u="Stream refused by server";break;case An.constants.NGHTTP2_CANCEL:c=Ne.Status.CANCELLED,u="Call cancelled";break;case An.constants.NGHTTP2_ENHANCE_YOUR_CALM:c=Ne.Status.RESOURCE_EXHAUSTED,u="Bandwidth exhausted or memory limit exceeded";break;case An.constants.NGHTTP2_INADEQUATE_SECURITY:c=Ne.Status.PERMISSION_DENIED,u="Protocol not secure enough";break;case An.constants.NGHTTP2_INTERNAL_ERROR:c=Ne.Status.INTERNAL,this.internalError===null?u=`Received RST_STREAM with code ${e.rstCode} (Internal server error)`:this.internalError.code==="ECONNRESET"||this.internalError.code==="ETIMEDOUT"?(c=Ne.Status.UNAVAILABLE,u=this.internalError.message):u=`Received RST_STREAM with code ${e.rstCode} triggered by internal client error: ${this.internalError.message}`;break;default:c=Ne.Status.INTERNAL,u=`Received RST_STREAM with code ${e.rstCode}`}this.endCall({code:c,details:u,metadata:new hn.Metadata,rstCode:e.rstCode})})}),e.on("error",l=>{l.code!=="ERR_HTTP2_STREAM_ERROR"&&(this.trace("Node error event: message="+l.message+" code="+l.code+" errno="+s5(l.errno)+" syscall="+l.syscall),this.internalError=l),this.callEventTracker.onStreamEnd(!1)})}getDeadlineInfo(){return[`remote_addr=${this.getPeer()}`]}onDisconnect(){this.endCall({code:Ne.Status.UNAVAILABLE,details:"Connection dropped",metadata:new hn.Metadata})}outputStatus(){this.statusOutput||(this.statusOutput=!0,this.trace("ended with status: code="+this.finalStatus.code+' details="'+this.finalStatus.details+'"'),this.callEventTracker.onCallEnd(this.finalStatus),process.nextTick(()=>{this.listener.onReceiveStatus(this.finalStatus)}),this.http2Stream.resume())}trace(e){o5.trace(i5.LogVerbosity.DEBUG,a5,"["+this.callId+"] "+e)}endCall(e){(this.finalStatus===null||this.finalStatus.code===Ne.Status.OK)&&(this.finalStatus=e,this.maybeOutputStatus()),this.destroyHttp2Stream()}maybeOutputStatus(){this.finalStatus!==null&&(this.finalStatus.code!==Ne.Status.OK||this.readsClosed&&this.unpushedReadMessages.length===0&&!this.isReadFilterPending&&!this.isPushPending)&&this.outputStatus()}push(e){this.trace("pushing to reader message of length "+(e instanceof Buffer?e.length:null)),this.canPush=!1,this.isPushPending=!0,process.nextTick(()=>{this.isPushPending=!1,!this.statusOutput&&(this.listener.onReceiveMessage(e),this.maybeOutputStatus())})}tryPush(e){this.canPush?(this.http2Stream.pause(),this.push(e)):(this.trace("unpushedReadMessages.push message of length "+e.length),this.unpushedReadMessages.push(e))}handleTrailers(e){this.serverEndedCall=!0,this.callEventTracker.onStreamEnd(!0);let t="";for(let n of Object.keys(e))t+=" "+n+": "+e[n]+` `;this.trace(`Received server trailers: `+t);let i;try{i=hn.Metadata.fromHttp2Headers(e)}catch{i=new hn.Metadata}let a=i.getMap(),s;if(typeof a["grpc-status"]=="string"){let n=Number(a["grpc-status"]);this.trace("received status code "+n+" from server"),i.remove("grpc-status");let r="";if(typeof a["grpc-message"]=="string"){try{r=decodeURI(a["grpc-message"])}catch{r=a["grpc-message"]}i.remove("grpc-message"),this.trace('received status details string "'+r+'" from server')}s={code:n,details:r,metadata:i}}else this.httpStatusCode?(s=LU(this.httpStatusCode),s.metadata=i):s={code:Ne.Status.UNKNOWN,details:"No status information received",metadata:i};this.endCall(s)}destroyHttp2Stream(){var e;if(!this.http2Stream.destroyed)if(this.serverEndedCall)this.http2Stream.end();else{let t;((e=this.finalStatus)===null||e===void 0?void 0:e.code)===Ne.Status.OK?t=An.constants.NGHTTP2_NO_ERROR:t=An.constants.NGHTTP2_CANCEL,this.trace("close http2 stream with code "+t),this.http2Stream.close(t)}}cancelWithStatus(e,t){this.trace("cancelWithStatus code: "+e+' details: "'+t+'"'),this.endCall({code:e,details:t,metadata:new hn.Metadata})}getStatus(){return this.finalStatus}getPeer(){return this.transport.getPeerName()}getCallNumber(){return this.callId}startRead(){if(this.finalStatus!==null&&this.finalStatus.code!==Ne.Status.OK){this.readsClosed=!0,this.maybeOutputStatus();return}if(this.canPush=!0,this.unpushedReadMessages.length>0){let e=this.unpushedReadMessages.shift();this.push(e);return}this.http2Stream.resume()}sendMessageWithContext(e,t){this.trace("write() called with message of length "+t.length);let i=a=>{process.nextTick(()=>{var s;let n=Ne.Status.UNAVAILABLE;(a==null?void 0:a.code)==="ERR_STREAM_WRITE_AFTER_END"&&(n=Ne.Status.INTERNAL),a&&this.cancelWithStatus(n,`Write error: ${a.message}`),(s=e.callback)===null||s===void 0||s.call(e)})};this.trace("sending data chunk of length "+t.length),this.callEventTracker.addMessageSent();try{this.http2Stream.write(t,i)}catch(a){this.endCall({code:Ne.Status.UNAVAILABLE,details:`Write failed with error ${a.message}`,metadata:new hn.Metadata})}}halfClose(){this.trace("end() called"),this.trace("calling end() on HTTP/2 stream"),this.http2Stream.end()}};TT.Http2SubchannelCall=Ph});var Ch=A(ST=>{"use strict";Object.defineProperty(ST,"__esModule",{value:!0});ST.getNextCallNumber=void 0;var l5=0;function c5(){return l5++}ST.getNextCallNumber=c5});var xU=A(fT=>{"use strict";Object.defineProperty(fT,"__esModule",{value:!0});fT.Http2SubchannelConnector=void 0;var yh=k("http2"),yU=k("tls"),pT=Xo(),jl=Ae(),u5=Oh(),Ya=De(),DU=wr(),dT=fr(),Ha=Vt(),E5=k("net"),_5=IU(),T5=Ch(),gh="transport",S5="transport_flowctrl",p5=If().version,{HTTP2_HEADER_AUTHORITY:d5,HTTP2_HEADER_CONTENT_TYPE:f5,HTTP2_HEADER_METHOD:A5,HTTP2_HEADER_PATH:h5,HTTP2_HEADER_TE:v5,HTTP2_HEADER_USER_AGENT:R5}=yh.constants,m5=2e4,O5=Buffer.from("too_many_pings","ascii"),Lh=class{constructor(e,t,i,a){this.session=e,this.options=i,this.remoteName=a,this.keepaliveTimeMs=-1,this.keepaliveTimeoutMs=m5,this.keepaliveTimerId=null,this.pendingSendKeepalivePing=!1,this.keepaliveTimeoutId=null,this.keepaliveWithoutCalls=!1,this.activeCalls=new Set,this.disconnectListeners=[],this.disconnectHandled=!1,this.channelzEnabled=!0,this.keepalivesSent=0,this.messagesSent=0,this.messagesReceived=0,this.lastMessageSentTimestamp=null,this.lastMessageReceivedTimestamp=null,this.subchannelAddressString=(0,dT.subchannelAddressToString)(t),i["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.streamTracker=new pT.ChannelzCallTrackerStub):this.streamTracker=new pT.ChannelzCallTracker,this.channelzRef=(0,pT.registerChannelzSocket)(this.subchannelAddressString,()=>this.getChannelzInfo(),this.channelzEnabled),this.userAgent=[i["grpc.primary_user_agent"],`grpc-node-js/${p5}`,i["grpc.secondary_user_agent"]].filter(s=>s).join(" "),"grpc.keepalive_time_ms"in i&&(this.keepaliveTimeMs=i["grpc.keepalive_time_ms"]),"grpc.keepalive_timeout_ms"in i&&(this.keepaliveTimeoutMs=i["grpc.keepalive_timeout_ms"]),"grpc.keepalive_permit_without_calls"in i?this.keepaliveWithoutCalls=i["grpc.keepalive_permit_without_calls"]===1:this.keepaliveWithoutCalls=!1,e.once("close",()=>{this.trace("session closed"),this.stopKeepalivePings(),this.handleDisconnect()}),e.once("goaway",(s,n,r)=>{let l=!1;s===yh.constants.NGHTTP2_ENHANCE_YOUR_CALM&&r&&r.equals(O5)&&(l=!0),this.trace("connection closed by GOAWAY with code "+s+" and data "+(r==null?void 0:r.toString())),this.reportDisconnectToOwner(l)}),e.once("error",s=>{this.trace("connection closed with error "+s.message)}),Ya.isTracerEnabled(gh)&&(e.on("remoteSettings",s=>{this.trace("new settings received"+(this.session!==e?" on the old connection":"")+": "+JSON.stringify(s))}),e.on("localSettings",s=>{this.trace("local settings acknowledged by remote"+(this.session!==e?" on the old connection":"")+": "+JSON.stringify(s))})),this.keepaliveWithoutCalls&&this.maybeStartKeepalivePingTimer()}getChannelzInfo(){var e,t,i;let a=this.session.socket,s=a.remoteAddress?(0,dT.stringToSubchannelAddress)(a.remoteAddress,a.remotePort):null,n=a.localAddress?(0,dT.stringToSubchannelAddress)(a.localAddress,a.localPort):null,r;if(this.session.encrypted){let c=a,u=c.getCipher(),E=c.getCertificate(),d=c.getPeerCertificate();r={cipherSuiteStandardName:(e=u.standardName)!==null&&e!==void 0?e:null,cipherSuiteOtherName:u.standardName?null:u.name,localCertificate:E&&"raw"in E?E.raw:null,remoteCertificate:d&&"raw"in d?d.raw:null}}else r=null;return{remoteAddress:s,localAddress:n,security:r,remoteName:this.remoteName,streamsStarted:this.streamTracker.callsStarted,streamsSucceeded:this.streamTracker.callsSucceeded,streamsFailed:this.streamTracker.callsFailed,messagesSent:this.messagesSent,messagesReceived:this.messagesReceived,keepAlivesSent:this.keepalivesSent,lastLocalStreamCreatedTimestamp:this.streamTracker.lastCallStartedTimestamp,lastRemoteStreamCreatedTimestamp:null,lastMessageSentTimestamp:this.lastMessageSentTimestamp,lastMessageReceivedTimestamp:this.lastMessageReceivedTimestamp,localFlowControlWindow:(t=this.session.state.localWindowSize)!==null&&t!==void 0?t:null,remoteFlowControlWindow:(i=this.session.state.remoteWindowSize)!==null&&i!==void 0?i:null}}trace(e){Ya.trace(jl.LogVerbosity.DEBUG,gh,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}keepaliveTrace(e){Ya.trace(jl.LogVerbosity.DEBUG,"keepalive","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}flowControlTrace(e){Ya.trace(jl.LogVerbosity.DEBUG,S5,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}internalsTrace(e){Ya.trace(jl.LogVerbosity.DEBUG,"transport_internals","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}reportDisconnectToOwner(e){this.disconnectHandled||(this.disconnectHandled=!0,this.disconnectListeners.forEach(t=>t(e)))}handleDisconnect(){this.reportDisconnectToOwner(!1),setImmediate(()=>{for(let e of this.activeCalls)e.onDisconnect()})}addDisconnectListener(e){this.disconnectListeners.push(e)}clearKeepaliveTimer(){this.keepaliveTimerId&&(clearTimeout(this.keepaliveTimerId),this.keepaliveTimerId=null)}clearKeepaliveTimeout(){this.keepaliveTimeoutId&&(clearTimeout(this.keepaliveTimeoutId),this.keepaliveTimeoutId=null)}canSendPing(){return this.keepaliveTimeMs>0&&(this.keepaliveWithoutCalls||this.activeCalls.size>0)}maybeSendPing(){var e,t;if(this.clearKeepaliveTimer(),!this.canSendPing()){this.pendingSendKeepalivePing=!0;return}this.channelzEnabled&&(this.keepalivesSent+=1),this.keepaliveTrace("Sending ping with timeout "+this.keepaliveTimeoutMs+"ms"),this.keepaliveTimeoutId||(this.keepaliveTimeoutId=setTimeout(()=>{this.keepaliveTrace("Ping timeout passed without response"),this.handleDisconnect()},this.keepaliveTimeoutMs),(t=(e=this.keepaliveTimeoutId).unref)===null||t===void 0||t.call(e));try{this.session.ping((i,a,s)=>{i&&(this.keepaliveTrace("Ping failed with error "+i.message),this.handleDisconnect()),this.keepaliveTrace("Received ping response"),this.clearKeepaliveTimeout(),this.maybeStartKeepalivePingTimer()})}catch{this.handleDisconnect()}}maybeStartKeepalivePingTimer(){var e,t;this.canSendPing()&&(this.pendingSendKeepalivePing?(this.pendingSendKeepalivePing=!1,this.maybeSendPing()):!this.keepaliveTimerId&&!this.keepaliveTimeoutId&&(this.keepaliveTrace("Starting keepalive timer for "+this.keepaliveTimeMs+"ms"),this.keepaliveTimerId=setTimeout(()=>{this.maybeSendPing()},this.keepaliveTimeMs),(t=(e=this.keepaliveTimerId).unref)===null||t===void 0||t.call(e)))}stopKeepalivePings(){this.keepaliveTimerId&&(clearTimeout(this.keepaliveTimerId),this.keepaliveTimerId=null),this.clearKeepaliveTimeout()}removeActiveCall(e){this.activeCalls.delete(e),this.activeCalls.size===0&&this.session.unref()}addActiveCall(e){this.activeCalls.add(e),this.activeCalls.size===1&&(this.session.ref(),this.keepaliveWithoutCalls||this.maybeStartKeepalivePingTimer())}createCall(e,t,i,a,s){let n=e.toHttp2Headers();n[d5]=t,n[R5]=this.userAgent,n[f5]="application/grpc",n[A5]="POST",n[h5]=i,n[v5]="trailers";let r;try{r=this.session.request(n)}catch(u){throw this.handleDisconnect(),u}this.flowControlTrace("local window size: "+this.session.state.localWindowSize+" remote window size: "+this.session.state.remoteWindowSize),this.internalsTrace("session.closed="+this.session.closed+" session.destroyed="+this.session.destroyed+" session.socket.destroyed="+this.session.socket.destroyed);let l,c;return this.channelzEnabled?(this.streamTracker.addCallStarted(),l={addMessageSent:()=>{var u;this.messagesSent+=1,this.lastMessageSentTimestamp=new Date,(u=s.addMessageSent)===null||u===void 0||u.call(s)},addMessageReceived:()=>{var u;this.messagesReceived+=1,this.lastMessageReceivedTimestamp=new Date,(u=s.addMessageReceived)===null||u===void 0||u.call(s)},onCallEnd:u=>{var E;(E=s.onCallEnd)===null||E===void 0||E.call(s,u),this.removeActiveCall(c)},onStreamEnd:u=>{var E;u?this.streamTracker.addCallSucceeded():this.streamTracker.addCallFailed(),(E=s.onStreamEnd)===null||E===void 0||E.call(s,u)}}):l={addMessageSent:()=>{var u;(u=s.addMessageSent)===null||u===void 0||u.call(s)},addMessageReceived:()=>{var u;(u=s.addMessageReceived)===null||u===void 0||u.call(s)},onCallEnd:u=>{var E;(E=s.onCallEnd)===null||E===void 0||E.call(s,u),this.removeActiveCall(c)},onStreamEnd:u=>{var E;(E=s.onStreamEnd)===null||E===void 0||E.call(s,u)}},c=new _5.Http2SubchannelCall(r,l,a,this,(0,T5.getNextCallNumber)()),this.addActiveCall(c),c}getChannelzRef(){return this.channelzRef}getPeerName(){return this.subchannelAddressString}getOptions(){return this.options}shutdown(){this.session.close(),(0,pT.unregisterChannelzRef)(this.channelzRef)}},Ih=class{constructor(e){this.channelTarget=e,this.session=null,this.isShutdown=!1}trace(e){Ya.trace(jl.LogVerbosity.DEBUG,gh,(0,Ha.uriToString)(this.channelTarget)+" "+e)}createSession(e,t,i,a){return this.isShutdown?Promise.reject():new Promise((s,n)=>{var r,l,c,u;let E;a.realTarget?(E=(0,Ha.uriToString)(a.realTarget),this.trace("creating HTTP/2 session through proxy to "+(0,Ha.uriToString)(a.realTarget))):(E=null,this.trace("creating HTTP/2 session to "+(0,dT.subchannelAddressToString)(e)));let d=(0,DU.getDefaultAuthority)((r=a.realTarget)!==null&&r!==void 0?r:this.channelTarget),f=t._getConnectionOptions()||{};f.maxSendHeaderBlockLength=Number.MAX_SAFE_INTEGER,"grpc-node.max_session_memory"in i?f.maxSessionMemory=i["grpc-node.max_session_memory"]:f.maxSessionMemory=Number.MAX_SAFE_INTEGER;let O="http://";if("secureContext"in f){if(O="https://",i["grpc.ssl_target_name_override"]){let P=i["grpc.ssl_target_name_override"],C=(l=f.checkServerIdentity)!==null&&l!==void 0?l:yU.checkServerIdentity;f.checkServerIdentity=(b,y)=>C(P,y),f.servername=P}else{let P=(u=(c=(0,Ha.splitHostPort)(d))===null||c===void 0?void 0:c.host)!==null&&u!==void 0?u:"localhost";f.servername=P}a.socket&&(f.createConnection=(P,C)=>a.socket)}else f.createConnection=(P,C)=>a.socket?a.socket:E5.connect(e);f=Object.assign(Object.assign(Object.assign({},f),e),{enableTrace:i["grpc-node.tls_enable_trace"]===1});let R=yh.connect(O+d,f);this.session=R;let M="Failed to connect";R.unref(),R.once("connect",()=>{R.removeAllListeners(),s(new Lh(R,e,i,E)),this.session=null}),R.once("close",()=>{this.session=null,setImmediate(()=>{n(`${M} (${new Date().toISOString()})`)})}),R.once("error",P=>{M=P.message,this.trace("connection failed with error "+M)})})}connect(e,t,i){var a,s,n;if(this.isShutdown)return Promise.reject();let r=t._getConnectionOptions()||{};if("secureContext"in r){if(r.ALPNProtocols=["h2"],i["grpc.ssl_target_name_override"]){let l=i["grpc.ssl_target_name_override"],c=(a=r.checkServerIdentity)!==null&&a!==void 0?a:yU.checkServerIdentity;r.checkServerIdentity=(u,E)=>c(l,E),r.servername=l}else if("grpc.http_connect_target"in i){let l=(0,DU.getDefaultAuthority)((s=(0,Ha.parseUri)(i["grpc.http_connect_target"]))!==null&&s!==void 0?s:{path:"localhost"}),c=(0,Ha.splitHostPort)(l);r.servername=(n=c==null?void 0:c.host)!==null&&n!==void 0?n:l}i["grpc-node.tls_enable_trace"]&&(r.enableTrace=!0)}return(0,u5.getProxiedConnection)(e,i,r).then(l=>this.createSession(e,t,i,l))}shutdown(){var e;this.isShutdown=!0,(e=this.session)===null||e===void 0||e.close(),this.session=null}};fT.Http2SubchannelConnector=Ih});var UU=A(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.getSubchannelPool=Fa.SubchannelPool=void 0;var N5=eD(),M5=OU(),P5=fr(),C5=Vt(),g5=xU(),L5=1e4,zl=class{constructor(){this.pool=Object.create(null),this.cleanupTimer=null}unrefUnusedSubchannels(){let e=!0;for(let t in this.pool){let a=this.pool[t].filter(s=>!s.subchannel.unrefIfOneRef());a.length>0&&(e=!1),this.pool[t]=a}e&&this.cleanupTimer!==null&&(clearInterval(this.cleanupTimer),this.cleanupTimer=null)}ensureCleanupTask(){var e,t;this.cleanupTimer===null&&(this.cleanupTimer=setInterval(()=>{this.unrefUnusedSubchannels()},L5),(t=(e=this.cleanupTimer).unref)===null||t===void 0||t.call(e))}getOrCreateSubchannel(e,t,i,a){this.ensureCleanupTask();let s=(0,C5.uriToString)(e);if(s in this.pool){let r=this.pool[s];for(let l of r)if((0,P5.subchannelAddressEqual)(t,l.subchannelAddress)&&(0,N5.channelOptionsEqual)(i,l.channelArguments)&&a._equals(l.channelCredentials))return l.subchannel}let n=new M5.Subchannel(e,t,i,a,new g5.Http2SubchannelConnector(e));return s in this.pool||(this.pool[s]=[]),this.pool[s].push({subchannelAddress:t,channelArguments:i,channelCredentials:a,subchannel:n}),n.ref(),n}};Fa.SubchannelPool=zl;var I5=new zl;function y5(o){return o?I5:new zl}Fa.getSubchannelPool=y5});var xh=A(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.FilterStackFactory=Ka.FilterStack=void 0;var AT=class{constructor(e){this.filters=e}sendMetadata(e){let t=e;for(let i=0;i<this.filters.length;i++)t=this.filters[i].sendMetadata(t);return t}receiveMetadata(e){let t=e;for(let i=this.filters.length-1;i>=0;i--)t=this.filters[i].receiveMetadata(t);return t}sendMessage(e){let t=e;for(let i=0;i<this.filters.length;i++)t=this.filters[i].sendMessage(t);return t}receiveMessage(e){let t=e;for(let i=this.filters.length-1;i>=0;i--)t=this.filters[i].receiveMessage(t);return t}receiveTrailers(e){let t=e;for(let i=this.filters.length-1;i>=0;i--)t=this.filters[i].receiveTrailers(t);return t}push(e){this.filters.unshift(...e)}getFilters(){return this.filters}};Ka.FilterStack=AT;var Dh=class o{constructor(e){this.factories=e}push(e){this.factories.unshift(...e)}clone(){return new o([...this.factories])}createFilter(){return new AT(this.factories.map(e=>e.createFilter()))}};Ka.FilterStackFactory=Dh});var Uh=A(hT=>{"use strict";Object.defineProperty(hT,"__esModule",{value:!0});hT.CompressionAlgorithms=void 0;var bU;(function(o){o[o.identity=0]="identity",o[o.deflate=1]="deflate",o[o.gzip=2]="gzip"})(bU||(hT.CompressionAlgorithms=bU={}))});var Vh=A(vT=>{"use strict";Object.defineProperty(vT,"__esModule",{value:!0});vT.BaseFilter=void 0;var bh=class{async sendMetadata(e){return e}receiveMetadata(e){return e}async sendMessage(e){return e}async receiveMessage(e){return e}receiveTrailers(e){return e}};vT.BaseFilter=bh});var BU=A(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});Wa.CompressionFilterFactory=Wa.CompressionFilter=void 0;var RT=k("zlib"),wU=Uh(),mT=Ae(),D5=Vh(),x5=De(),U5=o=>typeof o=="number"&&typeof wU.CompressionAlgorithms[o]=="string",qa=class{async writeMessage(e,t){let i=e;t&&(i=await this.compressMessage(i));let a=Buffer.allocUnsafe(i.length+5);return a.writeUInt8(t?1:0,0),a.writeUInt32BE(i.length,1),i.copy(a,5),a}async readMessage(e){let t=e.readUInt8(0)===1,i=e.slice(5);return t&&(i=await this.decompressMessage(i)),i}},$o=class extends qa{async compressMessage(e){return e}async writeMessage(e,t){let i=Buffer.allocUnsafe(e.length+5);return i.writeUInt8(0,0),i.writeUInt32BE(e.length,1),e.copy(i,5),i}decompressMessage(e){return Promise.reject(new Error('Received compressed message but "grpc-encoding" header was identity'))}},wh=class extends qa{constructor(e){super(),this.maxRecvMessageLength=e}compressMessage(e){return new Promise((t,i)=>{RT.deflate(e,(a,s)=>{a?i(a):t(s)})})}decompressMessage(e){return new Promise((t,i)=>{let a=0,s=[],n=RT.createInflate();n.on("data",r=>{s.push(r),a+=r.byteLength,this.maxRecvMessageLength!==-1&&a>this.maxRecvMessageLength&&(n.destroy(),i({code:mT.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxRecvMessageLength}`}))}),n.on("end",()=>{t(Buffer.concat(s))}),n.write(e),n.end()})}},Bh=class extends qa{constructor(e){super(),this.maxRecvMessageLength=e}compressMessage(e){return new Promise((t,i)=>{RT.gzip(e,(a,s)=>{a?i(a):t(s)})})}decompressMessage(e){return new Promise((t,i)=>{let a=0,s=[],n=RT.createGunzip();n.on("data",r=>{s.push(r),a+=r.byteLength,this.maxRecvMessageLength!==-1&&a>this.maxRecvMessageLength&&(n.destroy(),i({code:mT.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxRecvMessageLength}`}))}),n.on("end",()=>{t(Buffer.concat(s))}),n.write(e),n.end()})}},Gh=class extends qa{constructor(e){super(),this.compressionName=e}compressMessage(e){return Promise.reject(new Error(`Received message compressed with unsupported compression method ${this.compressionName}`))}decompressMessage(e){return Promise.reject(new Error(`Compression method not supported: ${this.compressionName}`))}};function VU(o,e){switch(o){case"identity":return new $o;case"deflate":return new wh(e);case"gzip":return new Bh(e);default:return new Gh(o)}}var OT=class extends D5.BaseFilter{constructor(e,t){var i,a;super(),this.sharedFilterConfig=t,this.sendCompression=new $o,this.receiveCompression=new $o,this.currentCompressionAlgorithm="identity";let s=e["grpc.default_compression_algorithm"];if(this.maxReceiveMessageLength=(i=e["grpc.max_receive_message_length"])!==null&&i!==void 0?i:mT.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH,s!==void 0)if(U5(s)){let n=wU.CompressionAlgorithms[s],r=(a=t.serverSupportedEncodingHeader)===null||a===void 0?void 0:a.split(",");(!r||r.includes(n))&&(this.currentCompressionAlgorithm=n,this.sendCompression=VU(this.currentCompressionAlgorithm,-1))}else x5.log(mT.LogVerbosity.ERROR,`Invalid value provided for grpc.default_compression_algorithm option: ${s}`)}async sendMetadata(e){let t=await e;return t.set("grpc-accept-encoding","identity,deflate,gzip"),t.set("accept-encoding","identity"),this.currentCompressionAlgorithm==="identity"?t.remove("grpc-encoding"):t.set("grpc-encoding",this.currentCompressionAlgorithm),t}receiveMetadata(e){let t=e.get("grpc-encoding");if(t.length>0){let a=t[0];typeof a=="string"&&(this.receiveCompression=VU(a,this.maxReceiveMessageLength))}e.remove("grpc-encoding");let i=e.get("grpc-accept-encoding")[0];return i&&(this.sharedFilterConfig.serverSupportedEncodingHeader=i,i.split(",").includes(this.currentCompressionAlgorithm)||(this.sendCompression=new $o,this.currentCompressionAlgorithm="identity")),e.remove("grpc-accept-encoding"),e}async sendMessage(e){var t;let i=await e,a;return this.sendCompression instanceof $o?a=!1:a=(((t=i.flags)!==null&&t!==void 0?t:0)&2)===0,{message:await this.sendCompression.writeMessage(i.message,a),flags:i.flags}}async receiveMessage(e){return this.receiveCompression.readMessage(await e)}};Wa.CompressionFilter=OT;var kh=class{constructor(e,t){this.options=t,this.sharedFilterConfig={}}createFilter(){return new OT(this.options,this.sharedFilterConfig)}};Wa.CompressionFilterFactory=kh});var Xl=A(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.formatDateDifference=lr.deadlineToString=lr.getRelativeTimeout=lr.getDeadlineTimeoutString=lr.minDeadline=void 0;function b5(...o){let e=1/0;for(let t of o){let i=t instanceof Date?t.getTime():t;i<e&&(e=i)}return e}lr.minDeadline=b5;var V5=[["m",1],["S",1e3],["M",60*1e3],["H",60*60*1e3]];function w5(o){let e=new Date().getTime();o instanceof Date&&(o=o.getTime());let t=Math.max(o-e,0);for(let[i,a]of V5){let s=t/a;if(s<1e8)return String(Math.ceil(s))+i}throw new Error("Deadline is too far in the future")}lr.getDeadlineTimeoutString=w5;var B5=2147483647;function G5(o){let e=o instanceof Date?o.getTime():o,t=new Date().getTime(),i=e-t;return i<0?0:i>B5?1/0:i}lr.getRelativeTimeout=G5;function k5(o){if(o instanceof Date)return o.toISOString();{let e=new Date(o);return Number.isNaN(e.getTime())?""+o:e.toISOString()}}lr.deadlineToString=k5;function H5(o,e){return((e.getTime()-o.getTime())/1e3).toFixed(3)+"s"}lr.formatDateDifference=H5});var MT=A(NT=>{"use strict";Object.defineProperty(NT,"__esModule",{value:!0});NT.restrictControlPlaneStatusCode=void 0;var zr=Ae(),Y5=[zr.Status.OK,zr.Status.INVALID_ARGUMENT,zr.Status.NOT_FOUND,zr.Status.ALREADY_EXISTS,zr.Status.FAILED_PRECONDITION,zr.Status.ABORTED,zr.Status.OUT_OF_RANGE,zr.Status.DATA_LOSS];function F5(o,e){return Y5.includes(o)?{code:zr.Status.INTERNAL,details:`Invalid status from control plane: ${o} ${zr.Status[o]} ${e}`}:{code:o,details:e}}NT.restrictControlPlaneStatusCode=F5});var HU=A(gT=>{"use strict";Object.defineProperty(gT,"__esModule",{value:!0});gT.LoadBalancingCall=void 0;var GU=er(),PT=Ae(),kU=Xl(),CT=ht(),$l=Zn(),K5=Vt(),q5=De(),Hh=MT(),W5=k("http2"),j5="load_balancing_call",Yh=class{constructor(e,t,i,a,s,n,r){var l,c;this.channel=e,this.callConfig=t,this.methodName=i,this.host=a,this.credentials=s,this.deadline=n,this.callNumber=r,this.child=null,this.readPending=!1,this.pendingMessage=null,this.pendingHalfClose=!1,this.ended=!1,this.metadata=null,this.listener=null,this.onCallEnded=null,this.childStartTime=null;let u=this.methodName.split("/"),E="";u.length>=2&&(E=u[1]);let d=(c=(l=(0,K5.splitHostPort)(this.host))===null||l===void 0?void 0:l.host)!==null&&c!==void 0?c:"localhost";this.serviceUrl=`https://${d}/${E}`,this.startTime=new Date}getDeadlineInfo(){var e,t;let i=[];return this.childStartTime?(this.childStartTime>this.startTime&&(!((e=this.metadata)===null||e===void 0)&&e.getOptions().waitForReady&&i.push("wait_for_ready"),i.push(`LB pick: ${(0,kU.formatDateDifference)(this.startTime,this.childStartTime)}`)),i.push(...this.child.getDeadlineInfo()),i):(!((t=this.metadata)===null||t===void 0)&&t.getOptions().waitForReady&&i.push("wait_for_ready"),i.push("Waiting for LB pick"),i)}trace(e){q5.trace(PT.LogVerbosity.DEBUG,j5,"["+this.callNumber+"] "+e)}outputStatus(e,t){var i,a;if(!this.ended){this.ended=!0,this.trace("ended with status: code="+e.code+' details="'+e.details+'" start time='+this.startTime.toISOString());let s=Object.assign(Object.assign({},e),{progress:t});(i=this.listener)===null||i===void 0||i.onReceiveStatus(s),(a=this.onCallEnded)===null||a===void 0||a.call(this,s.code)}}doPick(){var e,t;if(this.ended)return;if(!this.metadata)throw new Error("doPick called before start");this.trace("Pick called");let i=this.metadata.clone(),a=this.channel.doPick(i,this.callConfig.pickInformation),s=a.subchannel?"("+a.subchannel.getChannelzRef().id+") "+a.subchannel.getAddress():""+a.subchannel;switch(this.trace("Pick result: "+$l.PickResultType[a.pickResultType]+" subchannel: "+s+" status: "+((e=a.status)===null||e===void 0?void 0:e.code)+" "+((t=a.status)===null||t===void 0?void 0:t.details)),a.pickResultType){case $l.PickResultType.COMPLETE:this.credentials.generateMetadata({service_url:this.serviceUrl}).then(l=>{var c,u,E;if(this.ended){this.trace("Credentials metadata generation finished after call ended");return}if(i.merge(l),i.get("authorization").length>1&&this.outputStatus({code:PT.Status.INTERNAL,details:'"authorization" metadata cannot have multiple values',metadata:new CT.Metadata},"PROCESSED"),a.subchannel.getConnectivityState()!==GU.ConnectivityState.READY){this.trace("Picked subchannel "+s+" has state "+GU.ConnectivityState[a.subchannel.getConnectivityState()]+" after getting credentials metadata. Retrying pick"),this.doPick();return}this.deadline!==1/0&&i.set("grpc-timeout",(0,kU.getDeadlineTimeoutString)(this.deadline));try{this.child=a.subchannel.getRealSubchannel().createCall(i,this.host,this.methodName,{onReceiveMetadata:d=>{this.trace("Received metadata"),this.listener.onReceiveMetadata(d)},onReceiveMessage:d=>{this.trace("Received message"),this.listener.onReceiveMessage(d)},onReceiveStatus:d=>{this.trace("Received status"),d.rstCode===W5.constants.NGHTTP2_REFUSED_STREAM?this.outputStatus(d,"REFUSED"):this.outputStatus(d,"PROCESSED")}}),this.childStartTime=new Date}catch(d){this.trace("Failed to start call on picked subchannel "+s+" with error "+d.message),this.outputStatus({code:PT.Status.INTERNAL,details:"Failed to start HTTP/2 stream with error "+d.message,metadata:new CT.Metadata},"NOT_STARTED");return}(u=(c=this.callConfig).onCommitted)===null||u===void 0||u.call(c),(E=a.onCallStarted)===null||E===void 0||E.call(a),this.onCallEnded=a.onCallEnded,this.trace("Created child call ["+this.child.getCallNumber()+"]"),this.readPending&&this.child.startRead(),this.pendingMessage&&this.child.sendMessageWithContext(this.pendingMessage.context,this.pendingMessage.message),this.pendingHalfClose&&this.child.halfClose()},l=>{let{code:c,details:u}=(0,Hh.restrictControlPlaneStatusCode)(typeof l.code=="number"?l.code:PT.Status.UNKNOWN,`Getting metadata from plugin failed with error: ${l.message}`);this.outputStatus({code:c,details:u,metadata:new CT.Metadata},"PROCESSED")});break;case $l.PickResultType.DROP:let{code:n,details:r}=(0,Hh.restrictControlPlaneStatusCode)(a.status.code,a.status.details);setImmediate(()=>{this.outputStatus({code:n,details:r,metadata:a.status.metadata},"DROP")});break;case $l.PickResultType.TRANSIENT_FAILURE:if(this.metadata.getOptions().waitForReady)this.channel.queueCallForPick(this);else{let{code:l,details:c}=(0,Hh.restrictControlPlaneStatusCode)(a.status.code,a.status.details);setImmediate(()=>{this.outputStatus({code:l,details:c,metadata:a.status.metadata},"PROCESSED")})}break;case $l.PickResultType.QUEUE:this.channel.queueCallForPick(this)}}cancelWithStatus(e,t){var i;this.trace("cancelWithStatus code: "+e+' details: "'+t+'"'),(i=this.child)===null||i===void 0||i.cancelWithStatus(e,t),this.outputStatus({code:e,details:t,metadata:new CT.Metadata},"PROCESSED")}getPeer(){var e,t;return(t=(e=this.child)===null||e===void 0?void 0:e.getPeer())!==null&&t!==void 0?t:this.channel.getTarget()}start(e,t){this.trace("start called"),this.listener=t,this.metadata=e,this.doPick()}sendMessageWithContext(e,t){this.trace("write() called with message of length "+t.length),this.child?this.child.sendMessageWithContext(e,t):this.pendingMessage={context:e,message:t}}startRead(){this.trace("startRead called"),this.child?this.child.startRead():this.readPending=!0}halfClose(){this.trace("halfClose called"),this.child?this.child.halfClose():this.pendingHalfClose=!0}setCredentials(e){throw new Error("Method not implemented.")}getCallNumber(){return this.callNumber}};gT.LoadBalancingCall=Yh});var FU=A(LT=>{"use strict";Object.defineProperty(LT,"__esModule",{value:!0});LT.ResolvingCall=void 0;var Jo=Ae(),Qo=Xl(),YU=ht(),z5=De(),X5=MT(),$5="resolving_call",Fh=class{constructor(e,t,i,a,s,n){this.channel=e,this.method=t,this.filterStackFactory=a,this.credentials=s,this.callNumber=n,this.child=null,this.readPending=!1,this.pendingMessage=null,this.pendingHalfClose=!1,this.ended=!1,this.readFilterPending=!1,this.writeFilterPending=!1,this.pendingChildStatus=null,this.metadata=null,this.listener=null,this.statusWatchers=[],this.deadlineTimer=setTimeout(()=>{},0),this.filterStack=null,this.deadlineStartTime=null,this.configReceivedTime=null,this.childStartTime=null,this.deadline=i.deadline,this.host=i.host,i.parentCall&&(i.flags&Jo.Propagate.CANCELLATION&&i.parentCall.on("cancelled",()=>{this.cancelWithStatus(Jo.Status.CANCELLED,"Cancelled by parent call")}),i.flags&Jo.Propagate.DEADLINE&&(this.trace("Propagating deadline from parent: "+i.parentCall.getDeadline()),this.deadline=(0,Qo.minDeadline)(this.deadline,i.parentCall.getDeadline()))),this.trace("Created"),this.runDeadlineTimer()}trace(e){z5.trace(Jo.LogVerbosity.DEBUG,$5,"["+this.callNumber+"] "+e)}runDeadlineTimer(){clearTimeout(this.deadlineTimer),this.deadlineStartTime=new Date,this.trace("Deadline: "+(0,Qo.deadlineToString)(this.deadline));let e=(0,Qo.getRelativeTimeout)(this.deadline);if(e!==1/0){this.trace("Deadline will be reached in "+e+"ms");let t=()=>{if(!this.deadlineStartTime){this.cancelWithStatus(Jo.Status.DEADLINE_EXCEEDED,"Deadline exceeded");return}let i=[],a=new Date;i.push(`Deadline exceeded after ${(0,Qo.formatDateDifference)(this.deadlineStartTime,a)}`),this.configReceivedTime?(this.configReceivedTime>this.deadlineStartTime&&i.push(`name resolution: ${(0,Qo.formatDateDifference)(this.deadlineStartTime,this.configReceivedTime)}`),this.childStartTime?this.childStartTime>this.configReceivedTime&&i.push(`metadata filters: ${(0,Qo.formatDateDifference)(this.configReceivedTime,this.childStartTime)}`):i.push("waiting for metadata filters")):i.push("waiting for name resolution"),this.child&&i.push(...this.child.getDeadlineInfo()),this.cancelWithStatus(Jo.Status.DEADLINE_EXCEEDED,i.join(","))};e<=0?process.nextTick(t):this.deadlineTimer=setTimeout(t,e)}}outputStatus(e){if(!this.ended){this.ended=!0,this.filterStack||(this.filterStack=this.filterStackFactory.createFilter()),clearTimeout(this.deadlineTimer);let t=this.filterStack.receiveTrailers(e);this.trace("ended with status: code="+t.code+' details="'+t.details+'"'),this.statusWatchers.forEach(i=>i(t)),process.nextTick(()=>{var i;(i=this.listener)===null||i===void 0||i.onReceiveStatus(t)})}}sendMessageOnChild(e,t){if(!this.child)throw new Error("sendMessageonChild called with child not populated");let i=this.child;this.writeFilterPending=!0,this.filterStack.sendMessage(Promise.resolve({message:t,flags:e.flags})).then(a=>{this.writeFilterPending=!1,i.sendMessageWithContext(e,a.message),this.pendingHalfClose&&i.halfClose()},a=>{this.cancelWithStatus(a.code,a.details)})}getConfig(){if(this.ended)return;if(!this.metadata||!this.listener)throw new Error("getConfig called before start");let e=this.channel.getConfig(this.method,this.metadata);if(e.type==="NONE"){this.channel.queueCallForConfig(this);return}else if(e.type==="ERROR"){this.metadata.getOptions().waitForReady?this.channel.queueCallForConfig(this):this.outputStatus(e.error);return}this.configReceivedTime=new Date;let t=e.config;if(t.status!==Jo.Status.OK){let{code:i,details:a}=(0,X5.restrictControlPlaneStatusCode)(t.status,"Failed to route call to method "+this.method);this.outputStatus({code:i,details:a,metadata:new YU.Metadata});return}if(t.methodConfig.timeout){let i=new Date;i.setSeconds(i.getSeconds()+t.methodConfig.timeout.seconds),i.setMilliseconds(i.getMilliseconds()+t.methodConfig.timeout.nanos/1e6),this.deadline=(0,Qo.minDeadline)(this.deadline,i),this.runDeadlineTimer()}this.filterStackFactory.push(t.dynamicFilterFactories),this.filterStack=this.filterStackFactory.createFilter(),this.filterStack.sendMetadata(Promise.resolve(this.metadata)).then(i=>{this.child=this.channel.createInnerCall(t,this.method,this.host,this.credentials,this.deadline),this.trace("Created child ["+this.child.getCallNumber()+"]"),this.childStartTime=new Date,this.child.start(i,{onReceiveMetadata:a=>{this.trace("Received metadata"),this.listener.onReceiveMetadata(this.filterStack.receiveMetadata(a))},onReceiveMessage:a=>{this.trace("Received message"),this.readFilterPending=!0,this.filterStack.receiveMessage(a).then(s=>{this.trace("Finished filtering received message"),this.readFilterPending=!1,this.listener.onReceiveMessage(s),this.pendingChildStatus&&this.outputStatus(this.pendingChildStatus)},s=>{this.cancelWithStatus(s.code,s.details)})},onReceiveStatus:a=>{this.trace("Received status"),this.readFilterPending?this.pendingChildStatus=a:this.outputStatus(a)}}),this.readPending&&this.child.startRead(),this.pendingMessage?this.sendMessageOnChild(this.pendingMessage.context,this.pendingMessage.message):this.pendingHalfClose&&this.child.halfClose()},i=>{this.outputStatus(i)})}reportResolverError(e){var t;!((t=this.metadata)===null||t===void 0)&&t.getOptions().waitForReady?this.channel.queueCallForConfig(this):this.outputStatus(e)}cancelWithStatus(e,t){var i;this.trace("cancelWithStatus code: "+e+' details: "'+t+'"'),(i=this.child)===null||i===void 0||i.cancelWithStatus(e,t),this.outputStatus({code:e,details:t,metadata:new YU.Metadata})}getPeer(){var e,t;return(t=(e=this.child)===null||e===void 0?void 0:e.getPeer())!==null&&t!==void 0?t:this.channel.getTarget()}start(e,t){this.trace("start called"),this.metadata=e.clone(),this.listener=t,this.getConfig()}sendMessageWithContext(e,t){this.trace("write() called with message of length "+t.length),this.child?this.sendMessageOnChild(e,t):this.pendingMessage={context:e,message:t}}startRead(){this.trace("startRead called"),this.child?this.child.startRead():this.readPending=!0}halfClose(){this.trace("halfClose called"),this.child&&!this.writeFilterPending?this.child.halfClose():this.pendingHalfClose=!0}setCredentials(e){this.credentials=this.credentials.compose(e)}addStatusWatcher(e){this.statusWatchers.push(e)}getCallNumber(){return this.callNumber}};LT.ResolvingCall=Fh});var KU=A(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.RetryingCall=_o.MessageBufferTracker=_o.RetryThrottler=void 0;var IT=Ae(),J5=Xl(),Q5=ht(),Z5=De(),eJ="retrying_call",qh=class{constructor(e,t,i){this.maxTokens=e,this.tokenRatio=t,i?this.tokens=i.tokens*(e/i.maxTokens):this.tokens=e}addCallSucceeded(){this.tokens=Math.max(this.tokens+this.tokenRatio,this.maxTokens)}addCallFailed(){this.tokens=Math.min(this.tokens-1,0)}canRetryCall(){return this.tokens>this.maxTokens/2}};_o.RetryThrottler=qh;var Wh=class{constructor(e,t){this.totalLimit=e,this.limitPerCall=t,this.totalAllocated=0,this.allocatedPerCall=new Map}allocate(e,t){var i;let a=(i=this.allocatedPerCall.get(t))!==null&&i!==void 0?i:0;return this.limitPerCall-a<e||this.totalLimit-this.totalAllocated<e?!1:(this.allocatedPerCall.set(t,a+e),this.totalAllocated+=e,!0)}free(e,t){var i;if(this.totalAllocated<e)throw new Error(`Invalid buffer allocation state: call ${t} freed ${e} > total allocated ${this.totalAllocated}`);this.totalAllocated-=e;let a=(i=this.allocatedPerCall.get(t))!==null&&i!==void 0?i:0;if(a<e)throw new Error(`Invalid buffer allocation state: call ${t} freed ${e} > allocated for call ${a}`);this.allocatedPerCall.set(t,a-e)}freeAll(e){var t;let i=(t=this.allocatedPerCall.get(e))!==null&&t!==void 0?t:0;if(this.totalAllocated<i)throw new Error(`Invalid buffer allocation state: call ${e} allocated ${i} > total allocated ${this.totalAllocated}`);this.totalAllocated-=i,this.allocatedPerCall.delete(e)}};_o.MessageBufferTracker=Wh;var Kh="grpc-previous-rpc-attempts",jh=class{constructor(e,t,i,a,s,n,r,l,c){if(this.channel=e,this.callConfig=t,this.methodName=i,this.host=a,this.credentials=s,this.deadline=n,this.callNumber=r,this.bufferTracker=l,this.retryThrottler=c,this.listener=null,this.initialMetadata=null,this.underlyingCalls=[],this.writeBuffer=[],this.writeBufferOffset=0,this.readStarted=!1,this.transparentRetryUsed=!1,this.attempts=0,this.hedgingTimer=null,this.committedCallIndex=null,this.initialRetryBackoffSec=0,this.nextRetryBackoffSec=0,t.methodConfig.retryPolicy){this.state="RETRY";let u=t.methodConfig.retryPolicy;this.nextRetryBackoffSec=this.initialRetryBackoffSec=Number(u.initialBackoff.substring(0,u.initialBackoff.length-1))}else t.methodConfig.hedgingPolicy?this.state="HEDGING":this.state="TRANSPARENT_ONLY";this.startTime=new Date}getDeadlineInfo(){if(this.underlyingCalls.length===0)return[];let e=[],t=this.underlyingCalls[this.underlyingCalls.length-1];return this.underlyingCalls.length>1&&e.push(`previous attempts: ${this.underlyingCalls.length-1}`),t.startTime>this.startTime&&e.push(`time to current attempt start: ${(0,J5.formatDateDifference)(this.startTime,t.startTime)}`),e.push(...t.call.getDeadlineInfo()),e}getCallNumber(){return this.callNumber}trace(e){Z5.trace(IT.LogVerbosity.DEBUG,eJ,"["+this.callNumber+"] "+e)}reportStatus(e){this.trace("ended with status: code="+e.code+' details="'+e.details+'" start time='+this.startTime.toISOString()),this.bufferTracker.freeAll(this.callNumber),this.writeBufferOffset=this.writeBufferOffset+this.writeBuffer.length,this.writeBuffer=[],process.nextTick(()=>{var t;(t=this.listener)===null||t===void 0||t.onReceiveStatus({code:e.code,details:e.details,metadata:e.metadata})})}cancelWithStatus(e,t){this.trace("cancelWithStatus code: "+e+' details: "'+t+'"'),this.reportStatus({code:e,details:t,metadata:new Q5.Metadata});for(let{call:i}of this.underlyingCalls)i.cancelWithStatus(e,t)}getPeer(){return this.committedCallIndex!==null?this.underlyingCalls[this.committedCallIndex].call.getPeer():"unknown"}getBufferEntry(e){var t;return(t=this.writeBuffer[e-this.writeBufferOffset])!==null&&t!==void 0?t:{entryType:"FREED",allocated:!1}}getNextBufferIndex(){return this.writeBufferOffset+this.writeBuffer.length}clearSentMessages(){if(this.state!=="COMMITTED")return;let e=this.underlyingCalls[this.committedCallIndex].nextMessageToSend;for(let t=this.writeBufferOffset;t<e;t++){let i=this.getBufferEntry(t);i.allocated&&this.bufferTracker.free(i.message.message.length,this.callNumber)}this.writeBuffer=this.writeBuffer.slice(e-this.writeBufferOffset),this.writeBufferOffset=e}commitCall(e){if(this.state!=="COMMITTED"&&this.underlyingCalls[e].state!=="COMPLETED"){this.trace("Committing call ["+this.underlyingCalls[e].call.getCallNumber()+"] at index "+e),this.state="COMMITTED",this.committedCallIndex=e;for(let t=0;t<this.underlyingCalls.length;t++)t!==e&&this.underlyingCalls[t].state!=="COMPLETED"&&(this.underlyingCalls[t].state="COMPLETED",this.underlyingCalls[t].call.cancelWithStatus(IT.Status.CANCELLED,"Discarded in favor of other hedged attempt"));this.clearSentMessages()}}commitCallWithMostMessages(){if(this.state==="COMMITTED")return;let e=-1,t=-1;for(let[i,a]of this.underlyingCalls.entries())a.state==="ACTIVE"&&a.nextMessageToSend>e&&(e=a.nextMessageToSend,t=i);t===-1?this.state="TRANSPARENT_ONLY":this.commitCall(t)}isStatusCodeInList(e,t){return e.some(i=>i===t||i.toString().toLowerCase()===IT.Status[t].toLowerCase())}getNextRetryBackoffMs(){var e;let t=(e=this.callConfig)===null||e===void 0?void 0:e.methodConfig.retryPolicy;if(!t)return 0;let i=Math.random()*this.nextRetryBackoffSec*1e3,a=Number(t.maxBackoff.substring(0,t.maxBackoff.length-1));return this.nextRetryBackoffSec=Math.min(this.nextRetryBackoffSec*t.backoffMultiplier,a),i}maybeRetryCall(e,t){if(this.state!=="RETRY"){t(!1);return}let i=this.callConfig.methodConfig.retryPolicy;if(this.attempts>=Math.min(i.maxAttempts,5)){t(!1);return}let a;if(e===null)a=this.getNextRetryBackoffMs();else if(e<0){this.state="TRANSPARENT_ONLY",t(!1);return}else a=e,this.nextRetryBackoffSec=this.initialRetryBackoffSec;setTimeout(()=>{var s,n;if(this.state!=="RETRY"){t(!1);return}(!((n=(s=this.retryThrottler)===null||s===void 0?void 0:s.canRetryCall())!==null&&n!==void 0)||n)&&(t(!0),this.attempts+=1,this.startNewAttempt())},a)}countActiveCalls(){let e=0;for(let t of this.underlyingCalls)(t==null?void 0:t.state)==="ACTIVE"&&(e+=1);return e}handleProcessedStatus(e,t,i){var a,s,n;switch(this.state){case"COMMITTED":case"TRANSPARENT_ONLY":this.commitCall(t),this.reportStatus(e);break;case"HEDGING":if(this.isStatusCodeInList((a=this.callConfig.methodConfig.hedgingPolicy.nonFatalStatusCodes)!==null&&a!==void 0?a:[],e.code)){(s=this.retryThrottler)===null||s===void 0||s.addCallFailed();let r;if(i===null)r=0;else if(i<0){this.state="TRANSPARENT_ONLY",this.commitCall(t),this.reportStatus(e);return}else r=i;setTimeout(()=>{this.maybeStartHedgingAttempt(),this.countActiveCalls()===0&&(this.commitCall(t),this.reportStatus(e))},r)}else this.commitCall(t),this.reportStatus(e);break;case"RETRY":this.isStatusCodeInList(this.callConfig.methodConfig.retryPolicy.retryableStatusCodes,e.code)?((n=this.retryThrottler)===null||n===void 0||n.addCallFailed(),this.maybeRetryCall(i,r=>{r||(this.commitCall(t),this.reportStatus(e))})):(this.commitCall(t),this.reportStatus(e));break}}getPushback(e){let t=e.get("grpc-retry-pushback-ms");if(t.length===0)return null;try{return parseInt(t[0])}catch{return-1}}handleChildStatus(e,t){var i;if(this.underlyingCalls[t].state==="COMPLETED")return;if(this.trace("state="+this.state+" handling status with progress "+e.progress+" from child ["+this.underlyingCalls[t].call.getCallNumber()+"] in state "+this.underlyingCalls[t].state),this.underlyingCalls[t].state="COMPLETED",e.code===IT.Status.OK){(i=this.retryThrottler)===null||i===void 0||i.addCallSucceeded(),this.commitCall(t),this.reportStatus(e);return}if(this.state==="COMMITTED"){this.reportStatus(e);return}let a=this.getPushback(e.metadata);switch(e.progress){case"NOT_STARTED":this.startNewAttempt();break;case"REFUSED":this.transparentRetryUsed?this.handleProcessedStatus(e,t,a):(this.transparentRetryUsed=!0,this.startNewAttempt());break;case"DROP":this.commitCall(t),this.reportStatus(e);break;case"PROCESSED":this.handleProcessedStatus(e,t,a);break}}maybeStartHedgingAttempt(){if(this.state!=="HEDGING"||!this.callConfig.methodConfig.hedgingPolicy)return;let e=this.callConfig.methodConfig.hedgingPolicy;this.attempts>=Math.min(e.maxAttempts,5)||(this.attempts+=1,this.startNewAttempt(),this.maybeStartHedgingTimer())}maybeStartHedgingTimer(){var e,t,i;if(this.hedgingTimer&&clearTimeout(this.hedgingTimer),this.state!=="HEDGING"||!this.callConfig.methodConfig.hedgingPolicy)return;let a=this.callConfig.methodConfig.hedgingPolicy;if(this.attempts>=Math.min(a.maxAttempts,5))return;let s=(e=a.hedgingDelay)!==null&&e!==void 0?e:"0s",n=Number(s.substring(0,s.length-1));this.hedgingTimer=setTimeout(()=>{this.maybeStartHedgingAttempt()},n*1e3),(i=(t=this.hedgingTimer).unref)===null||i===void 0||i.call(t)}startNewAttempt(){let e=this.channel.createLoadBalancingCall(this.callConfig,this.methodName,this.host,this.credentials,this.deadline);this.trace("Created child call ["+e.getCallNumber()+"] for attempt "+this.attempts);let t=this.underlyingCalls.length;this.underlyingCalls.push({state:"ACTIVE",call:e,nextMessageToSend:0,startTime:new Date});let i=this.attempts-1,a=this.initialMetadata.clone();i>0&&a.set(Kh,`${i}`);let s=!1;e.start(a,{onReceiveMetadata:n=>{this.trace("Received metadata from child ["+e.getCallNumber()+"]"),this.commitCall(t),s=!0,i>0&&n.set(Kh,`${i}`),this.underlyingCalls[t].state==="ACTIVE"&&this.listener.onReceiveMetadata(n)},onReceiveMessage:n=>{this.trace("Received message from child ["+e.getCallNumber()+"]"),this.commitCall(t),this.underlyingCalls[t].state==="ACTIVE"&&this.listener.onReceiveMessage(n)},onReceiveStatus:n=>{this.trace("Received status from child ["+e.getCallNumber()+"]"),!s&&i>0&&n.metadata.set(Kh,`${i}`),this.handleChildStatus(n,t)}}),this.sendNextChildMessage(t),this.readStarted&&e.startRead()}start(e,t){this.trace("start called"),this.listener=t,this.initialMetadata=e,this.attempts+=1,this.startNewAttempt(),this.maybeStartHedgingTimer()}handleChildWriteCompleted(e){var t,i;let a=this.underlyingCalls[e],s=a.nextMessageToSend;(i=(t=this.getBufferEntry(s)).callback)===null||i===void 0||i.call(t),this.clearSentMessages(),a.nextMessageToSend+=1,this.sendNextChildMessage(e)}sendNextChildMessage(e){let t=this.underlyingCalls[e];if(t.state!=="COMPLETED"&&this.getBufferEntry(t.nextMessageToSend)){let i=this.getBufferEntry(t.nextMessageToSend);switch(i.entryType){case"MESSAGE":t.call.sendMessageWithContext({callback:a=>{this.handleChildWriteCompleted(e)}},i.message.message);break;case"HALF_CLOSE":t.nextMessageToSend+=1,t.call.halfClose();break;case"FREED":break}}}sendMessageWithContext(e,t){var i;this.trace("write() called with message of length "+t.length);let a={message:t,flags:e.flags},s=this.getNextBufferIndex(),n={entryType:"MESSAGE",message:a,allocated:this.bufferTracker.allocate(t.length,this.callNumber)};if(this.writeBuffer.push(n),n.allocated){(i=e.callback)===null||i===void 0||i.call(e);for(let[r,l]of this.underlyingCalls.entries())l.state==="ACTIVE"&&l.nextMessageToSend===s&&l.call.sendMessageWithContext({callback:c=>{this.handleChildWriteCompleted(r)}},t)}else{if(this.commitCallWithMostMessages(),this.committedCallIndex===null)return;let r=this.underlyingCalls[this.committedCallIndex];n.callback=e.callback,r.state==="ACTIVE"&&r.nextMessageToSend===s&&r.call.sendMessageWithContext({callback:l=>{this.handleChildWriteCompleted(this.committedCallIndex)}},t)}}startRead(){this.trace("startRead called"),this.readStarted=!0;for(let e of this.underlyingCalls)(e==null?void 0:e.state)==="ACTIVE"&&e.call.startRead()}halfClose(){this.trace("halfClose called");let e=this.getNextBufferIndex();this.writeBuffer.push({entryType:"HALF_CLOSE",allocated:!1});for(let t of this.underlyingCalls)(t==null?void 0:t.state)==="ACTIVE"&&t.nextMessageToSend===e&&(t.nextMessageToSend+=1,t.call.halfClose())}setCredentials(e){throw new Error("Method not implemented.")}getMethod(){return this.methodName}getHost(){return this.host}};_o.RetryingCall=jh});var DT=A(yT=>{"use strict";Object.defineProperty(yT,"__esModule",{value:!0});yT.BaseSubchannelWrapper=void 0;var zh=class{constructor(e){this.child=e,this.healthy=!0,this.healthListeners=new Set,e.addHealthStateWatcher(t=>{this.healthy&&this.updateHealthListeners()})}updateHealthListeners(){for(let e of this.healthListeners)e(this.isHealthy())}getConnectivityState(){return this.child.getConnectivityState()}addConnectivityStateListener(e){this.child.addConnectivityStateListener(e)}removeConnectivityStateListener(e){this.child.removeConnectivityStateListener(e)}startConnecting(){this.child.startConnecting()}getAddress(){return this.child.getAddress()}throttleKeepalive(e){this.child.throttleKeepalive(e)}ref(){this.child.ref()}unref(){this.child.unref()}getChannelzRef(){return this.child.getChannelzRef()}isHealthy(){return this.healthy&&this.child.isHealthy()}addHealthStateWatcher(e){this.healthListeners.add(e)}removeHealthStateWatcher(e){this.healthListeners.delete(e)}setHealthy(e){e!==this.healthy&&(this.healthy=e,this.child.isHealthy()&&this.updateHealthListeners())}getRealSubchannel(){return this.child.getRealSubchannel()}realSubchannelEquals(e){return this.getRealSubchannel()===e.getRealSubchannel()}};yT.BaseSubchannelWrapper=zh});var jU=A(bT=>{"use strict";Object.defineProperty(bT,"__esModule",{value:!0});bT.InternalChannel=void 0;var tJ=R_(),rJ=Zy(),nJ=UU(),qU=Zn(),Jl=Ae(),oJ=xh(),iJ=BU(),WU=wr(),Xh=De(),aJ=Oh(),xT=Vt(),Xr=er(),Ql=Xo(),sJ=HU(),lJ=Xl(),cJ=FU(),$h=Ch(),uJ=MT(),Jh=KU(),EJ=DT(),_J=2147483647,TJ=1e3,SJ=30*60*1e3,UT=new Map,pJ=1<<24,dJ=1<<20,Qh=class extends EJ.BaseSubchannelWrapper{constructor(e,t){super(e),this.channel=t,this.refCount=0,this.subchannelStateListener=(i,a,s,n)=>{t.throttleKeepalive(n)},e.addConnectivityStateListener(this.subchannelStateListener)}ref(){this.child.ref(),this.refCount+=1}unref(){this.child.unref(),this.refCount-=1,this.refCount<=0&&(this.child.removeConnectivityStateListener(this.subchannelStateListener),this.channel.removeWrappedSubchannel(this))}},Zh=class{constructor(e,t,i){var a,s,n,r,l,c,u,E;if(this.credentials=t,this.options=i,this.connectivityState=Xr.ConnectivityState.IDLE,this.currentPicker=new qU.UnavailablePicker,this.configSelectionQueue=[],this.pickQueue=[],this.connectivityStateWatchers=[],this.configSelector=null,this.currentResolutionError=null,this.wrappedSubchannels=new Set,this.callCount=0,this.idleTimer=null,this.channelzEnabled=!0,this.callTracker=new Ql.ChannelzCallTracker,this.childrenTracker=new Ql.ChannelzChildrenTracker,this.randomChannelId=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER),typeof e!="string")throw new TypeError("Channel target must be a string");if(!(t instanceof tJ.ChannelCredentials))throw new TypeError("Channel credentials must be a ChannelCredentials object");if(i&&typeof i!="object")throw new TypeError("Channel options must be an object");this.originalTarget=e;let d=(0,xT.parseUri)(e);if(d===null)throw new Error(`Could not parse target name "${e}"`);let f=(0,WU.mapUriDefaultScheme)(d);if(f===null)throw new Error(`Could not find a default scheme for target name "${e}"`);this.callRefTimer=setInterval(()=>{},_J),(s=(a=this.callRefTimer).unref)===null||s===void 0||s.call(a),this.options["grpc.enable_channelz"]===0&&(this.channelzEnabled=!1),this.channelzTrace=new Ql.ChannelzTrace,this.channelzRef=(0,Ql.registerChannelzChannel)(e,()=>this.getChannelzInfo(),this.channelzEnabled),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Channel created"),this.options["grpc.default_authority"]?this.defaultAuthority=this.options["grpc.default_authority"]:this.defaultAuthority=(0,WU.getDefaultAuthority)(f);let O=(0,aJ.mapProxyName)(f,i);this.target=O.target,this.options=Object.assign({},this.options,O.extraOptions),this.subchannelPool=(0,nJ.getSubchannelPool)(((n=i["grpc.use_local_subchannel_pool"])!==null&&n!==void 0?n:0)===0),this.retryBufferTracker=new Jh.MessageBufferTracker((r=i["grpc.retry_buffer_size"])!==null&&r!==void 0?r:pJ,(l=i["grpc.per_rpc_retry_buffer_size"])!==null&&l!==void 0?l:dJ),this.keepaliveTime=(c=i["grpc.keepalive_time_ms"])!==null&&c!==void 0?c:-1,this.idleTimeoutMs=Math.max((u=i["grpc.client_idle_timeout_ms"])!==null&&u!==void 0?u:SJ,TJ);let R={createSubchannel:(P,C)=>{let b=this.subchannelPool.getOrCreateSubchannel(this.target,P,Object.assign({},this.options,C),this.credentials);b.throttleKeepalive(this.keepaliveTime),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Created subchannel or used existing subchannel",b.getChannelzRef());let y=new Qh(b,this);return this.wrappedSubchannels.add(y),y},updateState:(P,C)=>{this.currentPicker=C;let b=this.pickQueue.slice();this.pickQueue=[],b.length>0&&this.callRefTimerUnref();for(let y of b)y.doPick();this.updateState(P)},requestReresolution:()=>{throw new Error("Resolving load balancer should never call requestReresolution")},addChannelzChild:P=>{this.channelzEnabled&&this.childrenTracker.refChild(P)},removeChannelzChild:P=>{this.channelzEnabled&&this.childrenTracker.unrefChild(P)}};this.resolvingLoadBalancer=new rJ.ResolvingLoadBalancer(this.target,R,i,(P,C)=>{P.retryThrottling?UT.set(this.getTarget(),new Jh.RetryThrottler(P.retryThrottling.maxTokens,P.retryThrottling.tokenRatio,UT.get(this.getTarget()))):UT.delete(this.getTarget()),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Address resolution succeeded"),this.configSelector=C,this.currentResolutionError=null,process.nextTick(()=>{let b=this.configSelectionQueue;this.configSelectionQueue=[],b.length>0&&this.callRefTimerUnref();for(let y of b)y.getConfig()})},P=>{this.channelzEnabled&&this.channelzTrace.addTrace("CT_WARNING","Address resolution failed with code "+P.code+' and details "'+P.details+'"'),this.configSelectionQueue.length>0&&this.trace("Name resolution failed with calls queued for config selection"),this.configSelector===null&&(this.currentResolutionError=Object.assign(Object.assign({},(0,uJ.restrictControlPlaneStatusCode)(P.code,P.details)),{metadata:P.metadata}));let C=this.configSelectionQueue;this.configSelectionQueue=[],C.length>0&&this.callRefTimerUnref();for(let b of C)b.reportResolverError(P)}),this.filterStackFactory=new oJ.FilterStackFactory([new iJ.CompressionFilterFactory(this,this.options)]),this.trace("Channel constructed with options "+JSON.stringify(i,void 0,2));let M=new Error;(0,Xh.trace)(Jl.LogVerbosity.DEBUG,"channel_stacktrace","("+this.channelzRef.id+`) Channel constructed `+((E=M.stack)===null||E===void 0?void 0:E.substring(M.stack.indexOf(` `)+1))),this.lastActivityTimestamp=new Date}getChannelzInfo(){return{target:this.originalTarget,state:this.connectivityState,trace:this.channelzTrace,callTracker:this.callTracker,children:this.childrenTracker.getChildLists()}}trace(e,t){(0,Xh.trace)(t??Jl.LogVerbosity.DEBUG,"channel","("+this.channelzRef.id+") "+(0,xT.uriToString)(this.target)+" "+e)}callRefTimerRef(){var e,t,i,a;!((t=(e=this.callRefTimer).hasRef)===null||t===void 0)&&t.call(e)||(this.trace("callRefTimer.ref | configSelectionQueue.length="+this.configSelectionQueue.length+" pickQueue.length="+this.pickQueue.length),(a=(i=this.callRefTimer).ref)===null||a===void 0||a.call(i))}callRefTimerUnref(){var e,t;(!this.callRefTimer.hasRef||this.callRefTimer.hasRef())&&(this.trace("callRefTimer.unref | configSelectionQueue.length="+this.configSelectionQueue.length+" pickQueue.length="+this.pickQueue.length),(t=(e=this.callRefTimer).unref)===null||t===void 0||t.call(e))}removeConnectivityStateWatcher(e){let t=this.connectivityStateWatchers.findIndex(i=>i===e);t>=0&&this.connectivityStateWatchers.splice(t,1)}updateState(e){(0,Xh.trace)(Jl.LogVerbosity.DEBUG,"connectivity_state","("+this.channelzRef.id+") "+(0,xT.uriToString)(this.target)+" "+Xr.ConnectivityState[this.connectivityState]+" -> "+Xr.ConnectivityState[e]),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Connectivity state change to "+Xr.ConnectivityState[e]),this.connectivityState=e;let t=this.connectivityStateWatchers.slice();for(let i of t)e!==i.currentState&&(i.timer&&clearTimeout(i.timer),this.removeConnectivityStateWatcher(i),i.callback());e!==Xr.ConnectivityState.TRANSIENT_FAILURE&&(this.currentResolutionError=null)}throttleKeepalive(e){if(e>this.keepaliveTime){this.keepaliveTime=e;for(let t of this.wrappedSubchannels)t.throttleKeepalive(e)}}removeWrappedSubchannel(e){this.wrappedSubchannels.delete(e)}doPick(e,t){return this.currentPicker.pick({metadata:e,extraPickInfo:t})}queueCallForPick(e){this.pickQueue.push(e),this.callRefTimerRef()}getConfig(e,t){return this.resolvingLoadBalancer.exitIdle(),this.configSelector?{type:"SUCCESS",config:this.configSelector(e,t,this.randomChannelId)}:this.currentResolutionError?{type:"ERROR",error:this.currentResolutionError}:{type:"NONE"}}queueCallForConfig(e){this.configSelectionQueue.push(e),this.callRefTimerRef()}enterIdle(){this.resolvingLoadBalancer.destroy(),this.updateState(Xr.ConnectivityState.IDLE),this.currentPicker=new qU.QueuePicker(this.resolvingLoadBalancer),this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null)}startIdleTimeout(e){var t,i;this.idleTimer=setTimeout(()=>{if(this.callCount>0){this.startIdleTimeout(this.idleTimeoutMs);return}let s=new Date().valueOf()-this.lastActivityTimestamp.valueOf();s>=this.idleTimeoutMs?(this.trace("Idle timer triggered after "+this.idleTimeoutMs+"ms of inactivity"),this.enterIdle()):this.startIdleTimeout(this.idleTimeoutMs-s)},e),(i=(t=this.idleTimer).unref)===null||i===void 0||i.call(t)}maybeStartIdleTimer(){this.connectivityState!==Xr.ConnectivityState.SHUTDOWN&&!this.idleTimer&&this.startIdleTimeout(this.idleTimeoutMs)}onCallStart(){this.channelzEnabled&&this.callTracker.addCallStarted(),this.callCount+=1}onCallEnd(e){this.channelzEnabled&&(e.code===Jl.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()),this.callCount-=1,this.lastActivityTimestamp=new Date,this.maybeStartIdleTimer()}createLoadBalancingCall(e,t,i,a,s){let n=(0,$h.getNextCallNumber)();return this.trace("createLoadBalancingCall ["+n+'] method="'+t+'"'),new sJ.LoadBalancingCall(this,e,t,i,a,s,n)}createRetryingCall(e,t,i,a,s){let n=(0,$h.getNextCallNumber)();return this.trace("createRetryingCall ["+n+'] method="'+t+'"'),new Jh.RetryingCall(this,e,t,i,a,s,n,this.retryBufferTracker,UT.get(this.getTarget()))}createInnerCall(e,t,i,a,s){return this.options["grpc.enable_retries"]===0?this.createLoadBalancingCall(e,t,i,a,s):this.createRetryingCall(e,t,i,a,s)}createResolvingCall(e,t,i,a,s){let n=(0,$h.getNextCallNumber)();this.trace("createResolvingCall ["+n+'] method="'+e+'", deadline='+(0,lJ.deadlineToString)(t));let r={deadline:t,flags:s??Jl.Propagate.DEFAULTS,host:i??this.defaultAuthority,parentCall:a},l=new cJ.ResolvingCall(this,e,r,this.filterStackFactory.clone(),this.credentials._getCallCredentials(),n);return this.onCallStart(),l.addStatusWatcher(c=>{this.onCallEnd(c)}),l}close(){this.resolvingLoadBalancer.destroy(),this.updateState(Xr.ConnectivityState.SHUTDOWN),clearInterval(this.callRefTimer),this.idleTimer&&clearTimeout(this.idleTimer),this.channelzEnabled&&(0,Ql.unregisterChannelzRef)(this.channelzRef),this.subchannelPool.unrefUnusedSubchannels()}getTarget(){return(0,xT.uriToString)(this.target)}getConnectivityState(e){let t=this.connectivityState;return e&&(this.resolvingLoadBalancer.exitIdle(),this.lastActivityTimestamp=new Date,this.maybeStartIdleTimer()),t}watchConnectivityState(e,t,i){if(this.connectivityState===Xr.ConnectivityState.SHUTDOWN)throw new Error("Channel has been shut down");let a=null;if(t!==1/0){let n=t instanceof Date?t:new Date(t),r=new Date;if(t===-1/0||n<=r){process.nextTick(i,new Error("Deadline passed without connectivity state change"));return}a=setTimeout(()=>{this.removeConnectivityStateWatcher(s),i(new Error("Deadline passed without connectivity state change"))},n.getTime()-r.getTime())}let s={currentState:e,callback:i,timer:a};this.connectivityStateWatchers.push(s)}getChannelzRef(){return this.channelzRef}createCall(e,t,i,a,s){if(typeof e!="string")throw new TypeError("Channel#createCall: method must be a string");if(!(typeof t=="number"||t instanceof Date))throw new TypeError("Channel#createCall: deadline must be a number or Date");if(this.connectivityState===Xr.ConnectivityState.SHUTDOWN)throw new Error("Channel has been shut down");return this.createResolvingCall(e,t,i,a,s)}};bT.InternalChannel=Zh});var vA=A(VT=>{"use strict";Object.defineProperty(VT,"__esModule",{value:!0});VT.ChannelImplementation=void 0;var fJ=R_(),AJ=jU(),ev=class{constructor(e,t,i){if(typeof e!="string")throw new TypeError("Channel target must be a string");if(!(t instanceof fJ.ChannelCredentials))throw new TypeError("Channel credentials must be a ChannelCredentials object");if(i&&typeof i!="object")throw new TypeError("Channel options must be an object");this.internalChannel=new AJ.InternalChannel(e,t,i)}close(){this.internalChannel.close()}getTarget(){return this.internalChannel.getTarget()}getConnectivityState(e){return this.internalChannel.getConnectivityState(e)}watchConnectivityState(e,t,i){this.internalChannel.watchConnectivityState(e,t,i)}getChannelzRef(){return this.internalChannel.getChannelzRef()}createCall(e,t,i,a,s){if(typeof e!="string")throw new TypeError("Channel#createCall: method must be a string");if(!(typeof t=="number"||t instanceof Date))throw new TypeError("Channel#createCall: deadline must be a number or Date");return this.internalChannel.createCall(e,t,i,a,s)}};VT.ChannelImplementation=ev});var XU=A(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.ServerDuplexStreamImpl=cr.ServerWritableStreamImpl=cr.ServerReadableStreamImpl=cr.ServerUnaryCallImpl=cr.serverErrorToStatus=void 0;var hJ=k("events"),iv=k("stream"),av=Ae(),zU=ht();function sv(o,e){var t;let i={code:av.Status.UNKNOWN,details:"message"in o?o.message:"Unknown Error",metadata:(t=e??o.metadata)!==null&&t!==void 0?t:null};return"code"in o&&typeof o.code=="number"&&Number.isInteger(o.code)&&(i.code=o.code,"details"in o&&typeof o.details=="string"&&(i.details=o.details)),i}cr.serverErrorToStatus=sv;var tv=class extends hJ.EventEmitter{constructor(e,t,i,a){super(),this.path=e,this.call=t,this.metadata=i,this.request=a,this.cancelled=!1}getPeer(){return this.call.getPeer()}sendMetadata(e){this.call.sendMetadata(e)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}};cr.ServerUnaryCallImpl=tv;var rv=class extends iv.Readable{constructor(e,t,i){super({objectMode:!0}),this.path=e,this.call=t,this.metadata=i,this.cancelled=!1}_read(e){this.call.startRead()}getPeer(){return this.call.getPeer()}sendMetadata(e){this.call.sendMetadata(e)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}};cr.ServerReadableStreamImpl=rv;var nv=class extends iv.Writable{constructor(e,t,i,a){super({objectMode:!0}),this.path=e,this.call=t,this.metadata=i,this.request=a,this.pendingStatus={code:av.Status.OK,details:"OK"},this.cancelled=!1,this.trailingMetadata=new zU.Metadata,this.on("error",s=>{this.pendingStatus=sv(s),this.end()})}getPeer(){return this.call.getPeer()}sendMetadata(e){this.call.sendMetadata(e)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}_write(e,t,i){this.call.sendMessage(e,i)}_final(e){var t;e(null),this.call.sendStatus(Object.assign(Object.assign({},this.pendingStatus),{metadata:(t=this.pendingStatus.metadata)!==null&&t!==void 0?t:this.trailingMetadata}))}end(e){return e&&(this.trailingMetadata=e),super.end()}};cr.ServerWritableStreamImpl=nv;var ov=class extends iv.Duplex{constructor(e,t,i){super({objectMode:!0}),this.path=e,this.call=t,this.metadata=i,this.pendingStatus={code:av.Status.OK,details:"OK"},this.cancelled=!1,this.trailingMetadata=new zU.Metadata,this.on("error",a=>{this.pendingStatus=sv(a),this.end()})}getPeer(){return this.call.getPeer()}sendMetadata(e){this.call.sendMetadata(e)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}_read(e){this.call.startRead()}_write(e,t,i){this.call.sendMessage(e,i)}_final(e){var t;e(null),this.call.sendStatus(Object.assign(Object.assign({},this.pendingStatus),{metadata:(t=this.pendingStatus.metadata)!==null&&t!==void 0?t:this.trailingMetadata}))}end(e){return e&&(this.trailingMetadata=e),super.end()}};cr.ServerDuplexStreamImpl=ov});var uv=A(wT=>{"use strict";Object.defineProperty(wT,"__esModule",{value:!0});wT.ServerCredentials=void 0;var $U=Ff(),Zl=class{static createInsecure(){return new lv}static createSsl(e,t,i=!1){var a;if(e!==null&&!Buffer.isBuffer(e))throw new TypeError("rootCerts must be null or a Buffer");if(!Array.isArray(t))throw new TypeError("keyCertPairs must be an array");if(typeof i!="boolean")throw new TypeError("checkClientCertificate must be a boolean");let s=[],n=[];for(let r=0;r<t.length;r++){let l=t[r];if(l===null||typeof l!="object")throw new TypeError(`keyCertPair[${r}] must be an object`);if(!Buffer.isBuffer(l.private_key))throw new TypeError(`keyCertPair[${r}].private_key must be a Buffer`);if(!Buffer.isBuffer(l.cert_chain))throw new TypeError(`keyCertPair[${r}].cert_chain must be a Buffer`);s.push(l.cert_chain),n.push(l.private_key)}return new cv({ca:(a=e??(0,$U.getDefaultRootsData)())!==null&&a!==void 0?a:void 0,cert:s,key:n,requestCert:i,ciphers:$U.CIPHER_SUITES})}};wT.ServerCredentials=Zl;var lv=class o extends Zl{_isSecure(){return!1}_getSettings(){return null}_equals(e){return e instanceof o}},cv=class o extends Zl{constructor(e){super(),this.options=e}_isSecure(){return!0}_getSettings(){return this.options}_equals(e){if(this===e)return!0;if(!(e instanceof o))return!1;if(Buffer.isBuffer(this.options.ca)&&Buffer.isBuffer(e.options.ca)){if(!this.options.ca.equals(e.options.ca))return!1}else if(this.options.ca!==e.options.ca)return!1;if(Array.isArray(this.options.cert)&&Array.isArray(e.options.cert)){if(this.options.cert.length!==e.options.cert.length)return!1;for(let t=0;t<this.options.cert.length;t++){let i=this.options.cert[t],a=e.options.cert[t];if(Buffer.isBuffer(i)&&Buffer.isBuffer(a)){if(!i.equals(a))return!1}else if(i!==a)return!1}}else if(this.options.cert!==e.options.cert)return!1;if(Array.isArray(this.options.key)&&Array.isArray(e.options.key)){if(this.options.key.length!==e.options.key.length)return!1;for(let t=0;t<this.options.key.length;t++){let i=this.options.key[t],a=e.options.key[t];if(Buffer.isBuffer(i)&&Buffer.isBuffer(a)){if(!i.equals(a))return!1}else if(i!==a)return!1}}else if(this.options.key!==e.options.key)return!1;return this.options.requestCert===e.options.requestCert}}});var fv=A(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.getServerInterceptingCall=Lt.BaseServerInterceptingCall=Lt.ServerInterceptingCall=Lt.ResponderBuilder=Lt.isInterceptingServerListener=Lt.ServerListenerBuilder=void 0;var JU=ht(),gt=Ae(),ja=k("http2"),QU=p_(),ZU=k("zlib"),vJ=Mh(),nb=De(),ob="server_call";function Zo(o){nb.trace(gt.LogVerbosity.DEBUG,ob,o)}var _v=class{constructor(){this.metadata=void 0,this.message=void 0,this.halfClose=void 0,this.cancel=void 0}withOnReceiveMetadata(e){return this.metadata=e,this}withOnReceiveMessage(e){return this.message=e,this}withOnReceiveHalfClose(e){return this.halfClose=e,this}withOnCancel(e){return this.cancel=e,this}build(){return{onReceiveMetadata:this.metadata,onReceiveMessage:this.message,onReceiveHalfClose:this.halfClose,onCancel:this.cancel}}};Lt.ServerListenerBuilder=_v;function RJ(o){return o.onReceiveMetadata!==void 0&&o.onReceiveMetadata.length===1}Lt.isInterceptingServerListener=RJ;var Tv=class{constructor(e,t){this.listener=e,this.nextListener=t,this.cancelled=!1,this.processingMetadata=!1,this.hasPendingMessage=!1,this.pendingMessage=null,this.processingMessage=!1,this.hasPendingHalfClose=!1}processPendingMessage(){this.hasPendingMessage&&(this.nextListener.onReceiveMessage(this.pendingMessage),this.pendingMessage=null,this.hasPendingMessage=!1)}processPendingHalfClose(){this.hasPendingHalfClose&&(this.nextListener.onReceiveHalfClose(),this.hasPendingHalfClose=!1)}onReceiveMetadata(e){this.cancelled||(this.processingMetadata=!0,this.listener.onReceiveMetadata(e,t=>{this.processingMetadata=!1,!this.cancelled&&(this.nextListener.onReceiveMetadata(t),this.processPendingMessage(),this.processPendingHalfClose())}))}onReceiveMessage(e){this.cancelled||(this.processingMessage=!0,this.listener.onReceiveMessage(e,t=>{this.processingMessage=!1,!this.cancelled&&(this.processingMetadata?(this.pendingMessage=t,this.hasPendingMessage=!0):(this.nextListener.onReceiveMessage(t),this.processPendingHalfClose()))}))}onReceiveHalfClose(){this.cancelled||this.listener.onReceiveHalfClose(()=>{this.cancelled||(this.processingMetadata||this.processingMessage?this.hasPendingHalfClose=!0:this.nextListener.onReceiveHalfClose())})}onCancel(){this.cancelled=!0,this.listener.onCancel(),this.nextListener.onCancel()}},Sv=class{constructor(){this.start=void 0,this.metadata=void 0,this.message=void 0,this.status=void 0}withStart(e){return this.start=e,this}withSendMetadata(e){return this.metadata=e,this}withSendMessage(e){return this.message=e,this}withSendStatus(e){return this.status=e,this}build(){return{start:this.start,sendMetadata:this.metadata,sendMessage:this.message,sendStatus:this.status}}};Lt.ResponderBuilder=Sv;var BT={onReceiveMetadata:(o,e)=>{e(o)},onReceiveMessage:(o,e)=>{e(o)},onReceiveHalfClose:o=>{o()},onCancel:()=>{}},GT={start:o=>{o()},sendMetadata:(o,e)=>{e(o)},sendMessage:(o,e)=>{e(o)},sendStatus:(o,e)=>{e(o)}},pv=class{constructor(e,t){var i,a,s,n;this.nextCall=e,this.processingMetadata=!1,this.processingMessage=!1,this.pendingMessage=null,this.pendingMessageCallback=null,this.pendingStatus=null,this.responder={start:(i=t==null?void 0:t.start)!==null&&i!==void 0?i:GT.start,sendMetadata:(a=t==null?void 0:t.sendMetadata)!==null&&a!==void 0?a:GT.sendMetadata,sendMessage:(s=t==null?void 0:t.sendMessage)!==null&&s!==void 0?s:GT.sendMessage,sendStatus:(n=t==null?void 0:t.sendStatus)!==null&&n!==void 0?n:GT.sendStatus}}processPendingMessage(){this.pendingMessageCallback&&(this.nextCall.sendMessage(this.pendingMessage,this.pendingMessageCallback),this.pendingMessage=null,this.pendingMessageCallback=null)}processPendingStatus(){this.pendingStatus&&(this.nextCall.sendStatus(this.pendingStatus),this.pendingStatus=null)}start(e){this.responder.start(t=>{var i,a,s,n;let r={onReceiveMetadata:(i=t==null?void 0:t.onReceiveMetadata)!==null&&i!==void 0?i:BT.onReceiveMetadata,onReceiveMessage:(a=t==null?void 0:t.onReceiveMessage)!==null&&a!==void 0?a:BT.onReceiveMessage,onReceiveHalfClose:(s=t==null?void 0:t.onReceiveHalfClose)!==null&&s!==void 0?s:BT.onReceiveHalfClose,onCancel:(n=t==null?void 0:t.onCancel)!==null&&n!==void 0?n:BT.onCancel},l=new Tv(r,e);this.nextCall.start(l)})}sendMetadata(e){this.processingMetadata=!0,this.responder.sendMetadata(e,t=>{this.processingMetadata=!1,this.nextCall.sendMetadata(t),this.processPendingMessage(),this.processPendingStatus()})}sendMessage(e,t){this.processingMessage=!0,this.responder.sendMessage(e,i=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessage=i,this.pendingMessageCallback=t):this.nextCall.sendMessage(i,t)})}sendStatus(e){this.responder.sendStatus(e,t=>{this.processingMetadata||this.processingMessage?this.pendingStatus=t:this.nextCall.sendStatus(t)})}startRead(){this.nextCall.startRead()}getPeer(){return this.nextCall.getPeer()}getDeadline(){return this.nextCall.getDeadline()}};Lt.ServerInterceptingCall=pv;var ib="grpc-accept-encoding",dv="grpc-encoding",eb="grpc-message",tb="grpc-status",Ev="grpc-timeout",mJ=/(\d{1,8})\s*([HMSmun])/,OJ={H:36e5,M:6e4,S:1e3,m:1,u:.001,n:1e-6},NJ={[ib]:"identity,deflate,gzip",[dv]:"identity"},rb={[ja.constants.HTTP2_HEADER_STATUS]:ja.constants.HTTP_STATUS_OK,[ja.constants.HTTP2_HEADER_CONTENT_TYPE]:"application/grpc+proto"},MJ={waitForTrailers:!0},kT=class{constructor(e,t,i,a,s){this.stream=e,this.callEventTracker=i,this.handler=a,this.listener=null,this.deadlineTimer=null,this.deadline=1/0,this.maxSendMessageSize=gt.DEFAULT_MAX_SEND_MESSAGE_LENGTH,this.maxReceiveMessageSize=gt.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH,this.cancelled=!1,this.metadataSent=!1,this.wantTrailers=!1,this.cancelNotified=!1,this.incomingEncoding="identity",this.readQueue=[],this.isReadPending=!1,this.receivedHalfClose=!1,this.streamEnded=!1,this.stream.once("error",c=>{}),this.stream.once("close",()=>{var c;Zo("Request to method "+((c=this.handler)===null||c===void 0?void 0:c.path)+" stream closed with rstCode "+this.stream.rstCode),this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!1),this.callEventTracker.onCallEnd({code:gt.Status.CANCELLED,details:"Stream closed before sending status",metadata:null})),this.notifyOnCancel()}),this.stream.on("data",c=>{this.handleDataFrame(c)}),this.stream.pause(),this.stream.on("end",()=>{this.handleEndEvent()}),"grpc.max_send_message_length"in s&&(this.maxSendMessageSize=s["grpc.max_send_message_length"]),"grpc.max_receive_message_length"in s&&(this.maxReceiveMessageSize=s["grpc.max_receive_message_length"]),this.decoder=new vJ.StreamDecoder(this.maxReceiveMessageSize);let n=JU.Metadata.fromHttp2Headers(t);nb.isTracerEnabled(ob)&&Zo("Request to "+this.handler.path+" received headers "+JSON.stringify(n.toJSON()));let r=n.get(Ev);r.length>0&&this.handleTimeoutHeader(r[0]);let l=n.get(dv);l.length>0&&(this.incomingEncoding=l[0]),n.remove(Ev),n.remove(dv),n.remove(ib),n.remove(ja.constants.HTTP2_HEADER_ACCEPT_ENCODING),n.remove(ja.constants.HTTP2_HEADER_TE),n.remove(ja.constants.HTTP2_HEADER_CONTENT_TYPE),this.metadata=n}handleTimeoutHeader(e){let t=e.toString().match(mJ);if(t===null){let s={code:gt.Status.INTERNAL,details:`Invalid ${Ev} value "${e}"`,metadata:null};process.nextTick(()=>{this.sendStatus(s)});return}let i=+t[1]*OJ[t[2]]|0,a=new Date;this.deadline=a.setMilliseconds(a.getMilliseconds()+i),this.deadlineTimer=setTimeout(()=>{let s={code:gt.Status.DEADLINE_EXCEEDED,details:"Deadline exceeded",metadata:null};this.sendStatus(s)},i)}checkCancelled(){return!this.cancelled&&(this.stream.destroyed||this.stream.closed)&&(this.notifyOnCancel(),this.cancelled=!0),this.cancelled}notifyOnCancel(){this.cancelNotified||(this.cancelNotified=!0,this.cancelled=!0,process.nextTick(()=>{var e;(e=this.listener)===null||e===void 0||e.onCancel()}),this.deadlineTimer&&clearTimeout(this.deadlineTimer),this.stream.resume())}maybeSendMetadata(){this.metadataSent||this.sendMetadata(new JU.Metadata)}serializeMessage(e){let t=this.handler.serialize(e),i=t.byteLength,a=Buffer.allocUnsafe(i+5);return a.writeUInt8(0,0),a.writeUInt32BE(i,1),t.copy(a,5),a}decompressMessage(e,t){let i=e.subarray(5);if(t==="identity")return i;if(t==="deflate"||t==="gzip"){let a;return t==="deflate"?a=ZU.createInflate():a=ZU.createGunzip(),new Promise((s,n)=>{let r=0,l=[];a.on("data",c=>{l.push(c),r+=c.byteLength,this.maxReceiveMessageSize!==-1&&r>this.maxReceiveMessageSize&&(a.destroy(),n({code:gt.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxReceiveMessageSize}`}))}),a.on("end",()=>{s(Buffer.concat(l))}),a.write(i),a.end()})}else return Promise.reject({code:gt.Status.UNIMPLEMENTED,details:`Received message compressed with unsupported encoding "${t}"`})}async decompressAndMaybePush(e){if(e.type!=="COMPRESSED")throw new Error(`Invalid queue entry type: ${e.type}`);let i=e.compressedMessage.readUInt8(0)===1?this.incomingEncoding:"identity",a;try{a=await this.decompressMessage(e.compressedMessage,i)}catch(s){this.sendStatus(s);return}try{e.parsedMessage=this.handler.deserialize(a)}catch(s){this.sendStatus({code:gt.Status.INTERNAL,details:`Error deserializing request: ${s.message}`});return}e.type="READABLE",this.maybePushNextMessage()}maybePushNextMessage(){if(this.listener&&this.isReadPending&&this.readQueue.length>0&&this.readQueue[0].type!=="COMPRESSED"){this.isReadPending=!1;let e=this.readQueue.shift();e.type==="READABLE"?this.listener.onReceiveMessage(e.parsedMessage):this.listener.onReceiveHalfClose()}}handleDataFrame(e){var t;if(this.checkCancelled())return;Zo("Request to "+this.handler.path+" received data frame of size "+e.length);let i;try{i=this.decoder.write(e)}catch(a){this.sendStatus({code:gt.Status.RESOURCE_EXHAUSTED,details:a.message});return}for(let a of i){this.stream.pause();let s={type:"COMPRESSED",compressedMessage:a,parsedMessage:null};this.readQueue.push(s),this.decompressAndMaybePush(s),(t=this.callEventTracker)===null||t===void 0||t.addMessageReceived()}}handleEndEvent(){this.readQueue.push({type:"HALF_CLOSE",compressedMessage:null,parsedMessage:null}),this.receivedHalfClose=!0,this.maybePushNextMessage()}start(e){Zo("Request to "+this.handler.path+" start called"),!this.checkCancelled()&&(this.listener=e,e.onReceiveMetadata(this.metadata))}sendMetadata(e){if(this.checkCancelled()||this.metadataSent)return;this.metadataSent=!0;let t=e?e.toHttp2Headers():null,i=Object.assign(Object.assign(Object.assign({},rb),NJ),t);this.stream.respond(i,MJ)}sendMessage(e,t){if(this.checkCancelled())return;let i;try{i=this.serializeMessage(e)}catch(a){this.sendStatus({code:gt.Status.INTERNAL,details:`Error serializing response: ${(0,QU.getErrorMessage)(a)}`,metadata:null});return}if(this.maxSendMessageSize!==-1&&i.length-5>this.maxSendMessageSize){this.sendStatus({code:gt.Status.RESOURCE_EXHAUSTED,details:`Sent message larger than max (${i.length} vs. ${this.maxSendMessageSize})`,metadata:null});return}this.maybeSendMetadata(),Zo("Request to "+this.handler.path+" sent data frame of size "+i.length),this.stream.write(i,a=>{var s;if(a){this.sendStatus({code:gt.Status.INTERNAL,details:`Error writing message: ${(0,QU.getErrorMessage)(a)}`,metadata:null});return}(s=this.callEventTracker)===null||s===void 0||s.addMessageSent(),t()})}sendStatus(e){var t,i;if(!this.checkCancelled())if(Zo("Request to method "+((t=this.handler)===null||t===void 0?void 0:t.path)+" ended with status code: "+gt.Status[e.code]+" details: "+e.details),this.metadataSent)this.wantTrailers?this.notifyOnCancel():(this.wantTrailers=!0,this.stream.once("wantTrailers",()=>{var a;this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!0),this.callEventTracker.onCallEnd(e));let s=Object.assign({[tb]:e.code,[eb]:encodeURI(e.details)},(a=e.metadata)===null||a===void 0?void 0:a.toHttp2Headers());this.stream.sendTrailers(s),this.notifyOnCancel()}),this.stream.end());else{this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!0),this.callEventTracker.onCallEnd(e));let a=Object.assign(Object.assign({[tb]:e.code,[eb]:encodeURI(e.details)},rb),(i=e.metadata)===null||i===void 0?void 0:i.toHttp2Headers());this.stream.respond(a,{endStream:!0}),this.notifyOnCancel()}}startRead(){Zo("Request to "+this.handler.path+" startRead called"),!this.checkCancelled()&&(this.isReadPending=!0,this.readQueue.length===0?this.receivedHalfClose||this.stream.resume():this.maybePushNextMessage())}getPeer(){var e;let t=(e=this.stream.session)===null||e===void 0?void 0:e.socket;return t!=null&&t.remoteAddress?t.remotePort?`${t.remoteAddress}:${t.remotePort}`:t.remoteAddress:"unknown"}getDeadline(){return this.deadline}};Lt.BaseServerInterceptingCall=kT;function PJ(o,e,t,i,a,s){let n={path:a.path,requestStream:a.type==="clientStream"||a.type==="bidi",responseStream:a.type==="serverStream"||a.type==="bidi",requestDeserialize:a.deserialize,responseSerialize:a.serialize},r=new kT(e,t,i,a,s);return o.reduce((l,c)=>c(n,l),r)}Lt.getServerInterceptingCall=PJ});var Eb=A(So=>{"use strict";var CJ=So&&So.__runInitializers||function(o,e,t){for(var i=arguments.length>2,a=0;a<e.length;a++)t=i?e[a].call(o,t):e[a].call(o);return i?t:void 0},gJ=So&&So.__esDecorate||function(o,e,t,i,a,s){function n(P){if(P!==void 0&&typeof P!="function")throw new TypeError("Function expected");return P}for(var r=i.kind,l=r==="getter"?"get":r==="setter"?"set":"value",c=!e&&o?i.static?o:o.prototype:null,u=e||(c?Object.getOwnPropertyDescriptor(c,i.name):{}),E,d=!1,f=t.length-1;f>=0;f--){var O={};for(var R in i)O[R]=R==="access"?{}:i[R];for(var R in i.access)O.access[R]=i.access[R];O.addInitializer=function(P){if(d)throw new TypeError("Cannot add initializers after decoration has completed");s.push(n(P||null))};var M=(0,t[f])(r==="accessor"?{get:u.get,set:u.set}:u[l],O);if(r==="accessor"){if(M===void 0)continue;if(M===null||typeof M!="object")throw new TypeError("Object expected");(E=n(M.get))&&(u.get=E),(E=n(M.set))&&(u.set=E),(E=n(M.init))&&a.unshift(E)}else(E=n(M))&&(r==="field"?a.unshift(E):u[l]=E)}c&&Object.defineProperty(c,i.name,u),d=!0};Object.defineProperty(So,"__esModule",{value:!0});So.Server=void 0;var Gt=k("http2"),LJ=k("util"),Qe=Ae(),Xa=XU(),IJ=uv(),ab=wr(),Av=De(),To=fr(),mr=Vt(),ot=Xo(),sb=fv(),za=~(1<<31),hv=~(1<<31),yJ=2e4,lb=~(1<<31),{HTTP2_HEADER_PATH:cb}=Gt.constants,DJ="server",ub=Buffer.from("max_age");function xJ(){}function UJ(o){return function(e,t){return LJ.deprecate(e,o)}}function vv(o){return{code:Qe.Status.UNIMPLEMENTED,details:`The server does not implement the method ${o}`}}function bJ(o,e){let t=vv(e);switch(o){case"unary":return(i,a)=>{a(t,null)};case"clientStream":return(i,a)=>{a(t,null)};case"serverStream":return i=>{i.emit("error",t)};case"bidi":return i=>{i.emit("error",t)};default:throw new Error(`Invalid handlerType ${o}`)}}var VJ=(()=>{var o;let e=[],t;return o=class{constructor(a){var s,n,r,l,c,u;this.boundPorts=(CJ(this,e),new Map),this.http2Servers=new Map,this.sessionIdleTimeouts=new Map,this.handlers=new Map,this.sessions=new Map,this.started=!1,this.shutdown=!1,this.serverAddressString="null",this.channelzEnabled=!0,this.options=a??{},this.options["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.channelzTrace=new ot.ChannelzTraceStub,this.callTracker=new ot.ChannelzCallTrackerStub,this.listenerChildrenTracker=new ot.ChannelzChildrenTrackerStub,this.sessionChildrenTracker=new ot.ChannelzChildrenTrackerStub):(this.channelzTrace=new ot.ChannelzTrace,this.callTracker=new ot.ChannelzCallTracker,this.listenerChildrenTracker=new ot.ChannelzChildrenTracker,this.sessionChildrenTracker=new ot.ChannelzChildrenTracker),this.channelzRef=(0,ot.registerChannelzServer)("server",()=>this.getChannelzInfo(),this.channelzEnabled),this.channelzTrace.addTrace("CT_INFO","Server created"),this.maxConnectionAgeMs=(s=this.options["grpc.max_connection_age_ms"])!==null&&s!==void 0?s:za,this.maxConnectionAgeGraceMs=(n=this.options["grpc.max_connection_age_grace_ms"])!==null&&n!==void 0?n:za,this.keepaliveTimeMs=(r=this.options["grpc.keepalive_time_ms"])!==null&&r!==void 0?r:hv,this.keepaliveTimeoutMs=(l=this.options["grpc.keepalive_timeout_ms"])!==null&&l!==void 0?l:yJ,this.sessionIdleTimeout=(c=this.options["grpc.max_connection_idle_ms"])!==null&&c!==void 0?c:lb,this.commonServerOptions={maxSendHeaderBlockLength:Number.MAX_SAFE_INTEGER},"grpc-node.max_session_memory"in this.options?this.commonServerOptions.maxSessionMemory=this.options["grpc-node.max_session_memory"]:this.commonServerOptions.maxSessionMemory=Number.MAX_SAFE_INTEGER,"grpc.max_concurrent_streams"in this.options&&(this.commonServerOptions.settings={maxConcurrentStreams:this.options["grpc.max_concurrent_streams"]}),this.interceptors=(u=this.options.interceptors)!==null&&u!==void 0?u:[],this.trace("Server constructed")}getChannelzInfo(){return{trace:this.channelzTrace,callTracker:this.callTracker,listenerChildren:this.listenerChildrenTracker.getChildLists(),sessionChildren:this.sessionChildrenTracker.getChildLists()}}getChannelzSessionInfo(a){var s,n,r;let l=this.sessions.get(a),c=a.socket,u=c.remoteAddress?(0,To.stringToSubchannelAddress)(c.remoteAddress,c.remotePort):null,E=c.localAddress?(0,To.stringToSubchannelAddress)(c.localAddress,c.localPort):null,d;if(a.encrypted){let O=c,R=O.getCipher(),M=O.getCertificate(),P=O.getPeerCertificate();d={cipherSuiteStandardName:(s=R.standardName)!==null&&s!==void 0?s:null,cipherSuiteOtherName:R.standardName?null:R.name,localCertificate:M&&"raw"in M?M.raw:null,remoteCertificate:P&&"raw"in P?P.raw:null}}else d=null;return{remoteAddress:u,localAddress:E,security:d,remoteName:null,streamsStarted:l.streamTracker.callsStarted,streamsSucceeded:l.streamTracker.callsSucceeded,streamsFailed:l.streamTracker.callsFailed,messagesSent:l.messagesSent,messagesReceived:l.messagesReceived,keepAlivesSent:l.keepAlivesSent,lastLocalStreamCreatedTimestamp:null,lastRemoteStreamCreatedTimestamp:l.streamTracker.lastCallStartedTimestamp,lastMessageSentTimestamp:l.lastMessageSentTimestamp,lastMessageReceivedTimestamp:l.lastMessageReceivedTimestamp,localFlowControlWindow:(n=a.state.localWindowSize)!==null&&n!==void 0?n:null,remoteFlowControlWindow:(r=a.state.remoteWindowSize)!==null&&r!==void 0?r:null}}trace(a){Av.trace(Qe.LogVerbosity.DEBUG,DJ,"("+this.channelzRef.id+") "+a)}addProtoService(){throw new Error("Not implemented. Use addService() instead")}addService(a,s){if(a===null||typeof a!="object"||s===null||typeof s!="object")throw new Error("addService() requires two objects as arguments");let n=Object.keys(a);if(n.length===0)throw new Error("Cannot add an empty service to a server");n.forEach(r=>{let l=a[r],c;l.requestStream?l.responseStream?c="bidi":c="clientStream":l.responseStream?c="serverStream":c="unary";let u=s[r],E;if(u===void 0&&typeof l.originalName=="string"&&(u=s[l.originalName]),u!==void 0?E=u.bind(s):E=bJ(c,r),this.register(l.path,E,l.responseSerialize,l.requestDeserialize,c)===!1)throw new Error(`Method handler for ${l.path} already provided.`)})}removeService(a){if(a===null||typeof a!="object")throw new Error("removeService() requires object as argument");Object.keys(a).forEach(n=>{let r=a[n];this.unregister(r.path)})}bind(a,s){throw new Error("Not implemented. Use bindAsync() instead")}registerListenerToChannelz(a){return(0,ot.registerChannelzSocket)((0,To.subchannelAddressToString)(a),()=>({localAddress:a,remoteAddress:null,security:null,remoteName:null,streamsStarted:0,streamsSucceeded:0,streamsFailed:0,messagesSent:0,messagesReceived:0,keepAlivesSent:0,lastLocalStreamCreatedTimestamp:null,lastRemoteStreamCreatedTimestamp:null,lastMessageSentTimestamp:null,lastMessageReceivedTimestamp:null,localFlowControlWindow:null,remoteFlowControlWindow:null}),this.channelzEnabled)}createHttp2Server(a){let s;if(a._isSecure()){let n=Object.assign(this.commonServerOptions,a._getSettings());n.enableTrace=this.options["grpc-node.tls_enable_trace"]===1,s=Gt.createSecureServer(n),s.on("secureConnection",r=>{r.on("error",l=>{this.trace("An incoming TLS connection closed with error: "+l.message)})})}else s=Gt.createServer(this.commonServerOptions);return s.setTimeout(0,xJ),this._setupHandlers(s),s}bindOneAddress(a,s){this.trace("Attempting to bind "+(0,To.subchannelAddressToString)(a));let n=this.createHttp2Server(s.credentials);return new Promise((r,l)=>{let c=u=>{this.trace("Failed to bind "+(0,To.subchannelAddressToString)(a)+" with error "+u.message),r({port:"port"in a?a.port:1,error:u.message})};n.once("error",c),n.listen(a,()=>{let u=n.address(),E;typeof u=="string"?E={path:u}:E={host:u.address,port:u.port};let d=this.registerListenerToChannelz(E);this.listenerChildrenTracker.refChild(d),this.http2Servers.set(n,{channelzRef:d,sessions:new Set}),s.listeningServers.add(n),this.trace("Successfully bound "+(0,To.subchannelAddressToString)(E)),r({port:"port"in E?E.port:1}),n.removeListener("error",c)})})}async bindManyPorts(a,s){if(a.length===0)return{count:0,port:0,errors:[]};if((0,To.isTcpSubchannelAddress)(a[0])&&a[0].port===0){let n=await this.bindOneAddress(a[0],s);if(n.error){let r=await this.bindManyPorts(a.slice(1),s);return Object.assign(Object.assign({},r),{errors:[n.error,...r.errors]})}else{let r=a.slice(1).map(u=>(0,To.isTcpSubchannelAddress)(u)?{host:u.host,port:n.port}:u),l=await Promise.all(r.map(u=>this.bindOneAddress(u,s))),c=[n,...l];return{count:c.filter(u=>u.error===void 0).length,port:n.port,errors:c.filter(u=>u.error).map(u=>u.error)}}}else{let n=await Promise.all(a.map(r=>this.bindOneAddress(r,s)));return{count:n.filter(r=>r.error===void 0).length,port:n[0].port,errors:n.filter(r=>r.error).map(r=>r.error)}}}async bindAddressList(a,s){let n=await this.bindManyPorts(a,s);if(n.count>0)return n.count<a.length&&Av.log(Qe.LogVerbosity.INFO,`WARNING Only ${n.count} addresses added out of total ${a.length} resolved`),n.port;{let r=`No address added out of total ${a.length} resolved`;throw Av.log(Qe.LogVerbosity.ERROR,r),new Error(`${r} errors: [${n.errors.join(",")}]`)}}resolvePort(a){return new Promise((s,n)=>{let r={onSuccessfulResolution:(c,u,E)=>{r.onSuccessfulResolution=()=>{};let d=[].concat(...c.map(f=>f.addresses));if(d.length===0){n(new Error(`No addresses resolved for port ${a}`));return}s(d)},onError:c=>{n(new Error(c.details))}};(0,ab.createResolver)(a,r,this.options).updateResolution()})}async bindPort(a,s){let n=await this.resolvePort(a);if(s.cancelled)throw this.completeUnbind(s),new Error("bindAsync operation cancelled by unbind call");let r=await this.bindAddressList(n,s);if(s.cancelled)throw this.completeUnbind(s),new Error("bindAsync operation cancelled by unbind call");return r}normalizePort(a){let s=(0,mr.parseUri)(a);if(s===null)throw new Error(`Could not parse port "${a}"`);let n=(0,ab.mapUriDefaultScheme)(s);if(n===null)throw new Error(`Could not get a default scheme for port "${a}"`);return n}bindAsync(a,s,n){if(this.shutdown)throw new Error("bindAsync called after shutdown");if(typeof a!="string")throw new TypeError("port must be a string");if(s===null||!(s instanceof IJ.ServerCredentials))throw new TypeError("creds must be a ServerCredentials object");if(typeof n!="function")throw new TypeError("callback must be a function");this.trace("bindAsync port="+a);let r=this.normalizePort(a),l=(d,f)=>{process.nextTick(()=>n(d,f))},c=this.boundPorts.get((0,mr.uriToString)(r));if(c){if(!s._equals(c.credentials)){l(new Error(`${a} already bound with incompatible credentials`),0);return}c.cancelled=!1,c.completionPromise?c.completionPromise.then(d=>n(null,d),d=>n(d,0)):l(null,c.portNumber);return}c={mapKey:(0,mr.uriToString)(r),originalUri:r,completionPromise:null,cancelled:!1,portNumber:0,credentials:s,listeningServers:new Set};let u=(0,mr.splitHostPort)(r.path),E=this.bindPort(r,c);c.completionPromise=E,(u==null?void 0:u.port)===0?E.then(d=>{let f={scheme:r.scheme,authority:r.authority,path:(0,mr.combineHostPort)({host:u.host,port:d})};c.mapKey=(0,mr.uriToString)(f),c.completionPromise=null,c.portNumber=d,this.boundPorts.set(c.mapKey,c),n(null,d)},d=>{n(d,0)}):(this.boundPorts.set(c.mapKey,c),E.then(d=>{c.completionPromise=null,c.portNumber=d,n(null,d)},d=>{n(d,0)}))}closeServer(a,s){this.trace("Closing server with address "+JSON.stringify(a.address()));let n=this.http2Servers.get(a);a.close(()=>{n&&(this.listenerChildrenTracker.unrefChild(n.channelzRef),(0,ot.unregisterChannelzRef)(n.channelzRef)),this.http2Servers.delete(a),s==null||s()})}closeSession(a,s){var n;this.trace("Closing session initiated by "+((n=a.socket)===null||n===void 0?void 0:n.remoteAddress));let r=this.sessions.get(a),l=()=>{r&&(this.sessionChildrenTracker.unrefChild(r.ref),(0,ot.unregisterChannelzRef)(r.ref)),s==null||s()};a.closed?queueMicrotask(l):a.close(l)}completeUnbind(a){for(let s of a.listeningServers){let n=this.http2Servers.get(s);if(this.closeServer(s,()=>{a.listeningServers.delete(s)}),n)for(let r of n.sessions)this.closeSession(r)}this.boundPorts.delete(a.mapKey)}unbind(a){this.trace("unbind port="+a);let s=this.normalizePort(a),n=(0,mr.splitHostPort)(s.path);if((n==null?void 0:n.port)===0)throw new Error("Cannot unbind port 0");let r=this.boundPorts.get((0,mr.uriToString)(s));r&&(this.trace("unbinding "+r.mapKey+" originally bound as "+(0,mr.uriToString)(r.originalUri)),r.completionPromise?r.cancelled=!0:this.completeUnbind(r))}drain(a,s){var n,r;this.trace("drain port="+a+" graceTimeMs="+s);let l=this.normalizePort(a),c=(0,mr.splitHostPort)(l.path);if((c==null?void 0:c.port)===0)throw new Error("Cannot drain port 0");let u=this.boundPorts.get((0,mr.uriToString)(l));if(!u)return;let E=new Set;for(let d of u.listeningServers){let f=this.http2Servers.get(d);if(f)for(let O of f.sessions)E.add(O),this.closeSession(O,()=>{E.delete(O)})}(r=(n=setTimeout(()=>{for(let d of E)d.destroy(Gt.constants.NGHTTP2_CANCEL)},s)).unref)===null||r===void 0||r.call(n)}forceShutdown(){for(let a of this.boundPorts.values())a.cancelled=!0;this.boundPorts.clear();for(let a of this.http2Servers.keys())this.closeServer(a);this.sessions.forEach((a,s)=>{this.closeSession(s),s.destroy(Gt.constants.NGHTTP2_CANCEL)}),this.sessions.clear(),(0,ot.unregisterChannelzRef)(this.channelzRef),this.shutdown=!0}register(a,s,n,r,l){return this.handlers.has(a)?!1:(this.handlers.set(a,{func:s,serialize:n,deserialize:r,type:l,path:a}),!0)}unregister(a){return this.handlers.delete(a)}start(){if(this.http2Servers.size===0||[...this.http2Servers.keys()].every(a=>!a.listening))throw new Error("server must be bound in order to start");if(this.started===!0)throw new Error("server is already started");this.started=!0}tryShutdown(a){var s;let n=c=>{(0,ot.unregisterChannelzRef)(this.channelzRef),a(c)},r=0;function l(){r--,r===0&&n()}this.shutdown=!0;for(let[c,u]of this.http2Servers.entries()){r++;let E=u.channelzRef.name;this.trace("Waiting for server "+E+" to close"),this.closeServer(c,()=>{this.trace("Server "+E+" finished closing"),l()});for(let d of u.sessions.keys()){r++;let f=(s=d.socket)===null||s===void 0?void 0:s.remoteAddress;this.trace("Waiting for session "+f+" to close"),this.closeSession(d,()=>{this.trace("Session "+f+" finished closing"),l()})}}r===0&&n()}addHttp2Port(){throw new Error("Not yet implemented")}getChannelzRef(){return this.channelzRef}_verifyContentType(a,s){let n=s[Gt.constants.HTTP2_HEADER_CONTENT_TYPE];return typeof n!="string"||!n.startsWith("application/grpc")?(a.respond({[Gt.constants.HTTP2_HEADER_STATUS]:Gt.constants.HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE},{endStream:!0}),!1):!0}_retrieveHandler(a){this.trace("Received call to method "+a+" at address "+this.serverAddressString);let s=this.handlers.get(a);return s===void 0?(this.trace("No handler registered for method "+a+". Sending UNIMPLEMENTED status."),null):s}_respondWithError(a,s,n=null){var r,l;let c=Object.assign({"grpc-status":(r=a.code)!==null&&r!==void 0?r:Qe.Status.INTERNAL,"grpc-message":a.details,[Gt.constants.HTTP2_HEADER_STATUS]:Gt.constants.HTTP_STATUS_OK,[Gt.constants.HTTP2_HEADER_CONTENT_TYPE]:"application/grpc+proto"},(l=a.metadata)===null||l===void 0?void 0:l.toHttp2Headers());s.respond(c,{endStream:!0}),this.callTracker.addCallFailed(),n==null||n.streamTracker.addCallFailed()}_channelzHandler(a,s){this.onStreamOpened(a);let n=this.sessions.get(a.session);if(this.callTracker.addCallStarted(),n==null||n.streamTracker.addCallStarted(),!this._verifyContentType(a,s)){this.callTracker.addCallFailed(),n==null||n.streamTracker.addCallFailed();return}let r=s[cb],l=this._retrieveHandler(r);if(!l){this._respondWithError(vv(r),a,n);return}let c={addMessageSent:()=>{n&&(n.messagesSent+=1,n.lastMessageSentTimestamp=new Date)},addMessageReceived:()=>{n&&(n.messagesReceived+=1,n.lastMessageReceivedTimestamp=new Date)},onCallEnd:E=>{E.code===Qe.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()},onStreamEnd:E=>{n&&(E?n.streamTracker.addCallSucceeded():n.streamTracker.addCallFailed())}},u=(0,sb.getServerInterceptingCall)(this.interceptors,a,s,c,l,this.options);this._runHandlerForCall(u,l)||(this.callTracker.addCallFailed(),n==null||n.streamTracker.addCallFailed(),u.sendStatus({code:Qe.Status.INTERNAL,details:`Unknown handler type: ${l.type}`}))}_streamHandler(a,s){if(this.onStreamOpened(a),this._verifyContentType(a,s)!==!0)return;let n=s[cb],r=this._retrieveHandler(n);if(!r){this._respondWithError(vv(n),a,null);return}let l=(0,sb.getServerInterceptingCall)(this.interceptors,a,s,null,r,this.options);this._runHandlerForCall(l,r)||l.sendStatus({code:Qe.Status.INTERNAL,details:`Unknown handler type: ${r.type}`})}_runHandlerForCall(a,s){let{type:n}=s;if(n==="unary")wJ(a,s);else if(n==="clientStream")BJ(a,s);else if(n==="serverStream")GJ(a,s);else if(n==="bidi")kJ(a,s);else return!1;return!0}_setupHandlers(a){if(a===null)return;let s=a.address(),n="null";s&&(typeof s=="string"?n=s:n=s.address+":"+s.port),this.serverAddressString=n;let r=this.channelzEnabled?this._channelzHandler:this._streamHandler,l=this.channelzEnabled?this._channelzSessionHandler(a):this._sessionHandler(a);a.on("stream",r.bind(this)),a.on("session",l)}_sessionHandler(a){return s=>{var n,r,l;(n=this.http2Servers.get(a))===null||n===void 0||n.sessions.add(s);let c=null,u=null,E=null,d=null,f=!1,O=this.enableIdleTimeout(s);if(this.maxConnectionAgeMs!==za){let R=this.maxConnectionAgeMs/10,M=Math.random()*R*2-R;c=setTimeout(()=>{var P,C;f=!0,this.trace("Connection dropped by max connection age: "+((P=s.socket)===null||P===void 0?void 0:P.remoteAddress));try{s.goaway(Gt.constants.NGHTTP2_NO_ERROR,~(1<<31),ub)}catch{s.destroy();return}s.close(),this.maxConnectionAgeGraceMs!==za&&(u=setTimeout(()=>{s.destroy()},this.maxConnectionAgeGraceMs),(C=u.unref)===null||C===void 0||C.call(u))},this.maxConnectionAgeMs+M),(r=c.unref)===null||r===void 0||r.call(c)}this.keepaliveTimeMs<hv&&(E=setInterval(()=>{var R;d=setTimeout(()=>{f=!0,s.close()},this.keepaliveTimeoutMs),(R=d.unref)===null||R===void 0||R.call(d);try{s.ping((M,P,C)=>{d&&clearTimeout(d),M&&(f=!0,this.trace("Connection dropped due to error of a ping frame "+M.message+" return in "+P),s.close())})}catch{clearTimeout(d),s.destroy()}},this.keepaliveTimeMs),(l=E.unref)===null||l===void 0||l.call(E)),s.on("close",()=>{var R,M;f||this.trace(`Connection dropped by client ${(R=s.socket)===null||R===void 0?void 0:R.remoteAddress}`),c&&clearTimeout(c),u&&clearTimeout(u),E&&(clearInterval(E),d&&clearTimeout(d)),O!==null&&(clearTimeout(O.timeout),this.sessionIdleTimeouts.delete(s)),(M=this.http2Servers.get(a))===null||M===void 0||M.sessions.delete(s)})}}_channelzSessionHandler(a){return s=>{var n,r,l,c,u;let E=(0,ot.registerChannelzSocket)((r=(n=s.socket)===null||n===void 0?void 0:n.remoteAddress)!==null&&r!==void 0?r:"unknown",this.getChannelzSessionInfo.bind(this,s),this.channelzEnabled),d={ref:E,streamTracker:new ot.ChannelzCallTracker,messagesSent:0,messagesReceived:0,keepAlivesSent:0,lastMessageSentTimestamp:null,lastMessageReceivedTimestamp:null};(l=this.http2Servers.get(a))===null||l===void 0||l.sessions.add(s),this.sessions.set(s,d);let f=`${s.socket.remoteAddress}:${s.socket.remotePort}`;this.channelzTrace.addTrace("CT_INFO","Connection established by client "+f),this.trace("Connection established by client "+f),this.sessionChildrenTracker.refChild(E);let O=null,R=null,M=null,P=null,C=!1,b=this.enableIdleTimeout(s);if(this.maxConnectionAgeMs!==za){let y=this.maxConnectionAgeMs/10,W=Math.random()*y*2-y;O=setTimeout(()=>{var q;C=!0,this.channelzTrace.addTrace("CT_INFO","Connection dropped by max connection age from "+f);try{s.goaway(Gt.constants.NGHTTP2_NO_ERROR,~(1<<31),ub)}catch{s.destroy();return}s.close(),this.maxConnectionAgeGraceMs!==za&&(R=setTimeout(()=>{s.destroy()},this.maxConnectionAgeGraceMs),(q=R.unref)===null||q===void 0||q.call(R))},this.maxConnectionAgeMs+W),(c=O.unref)===null||c===void 0||c.call(O)}this.keepaliveTimeMs<hv&&(M=setInterval(()=>{var y;P=setTimeout(()=>{C=!0,this.channelzTrace.addTrace("CT_INFO","Connection dropped by keepalive timeout from "+f),s.close()},this.keepaliveTimeoutMs),(y=P.unref)===null||y===void 0||y.call(P);try{s.ping((W,q,H)=>{P&&clearTimeout(P),W&&(C=!0,this.channelzTrace.addTrace("CT_INFO","Connection dropped due to error of a ping frame "+W.message+" return in "+q),s.close())}),d.keepAlivesSent+=1}catch{clearTimeout(P),s.destroy()}},this.keepaliveTimeMs),(u=M.unref)===null||u===void 0||u.call(M)),s.on("close",()=>{var y;C||this.channelzTrace.addTrace("CT_INFO","Connection dropped by client "+f),this.sessionChildrenTracker.unrefChild(E),(0,ot.unregisterChannelzRef)(E),O&&clearTimeout(O),R&&clearTimeout(R),M&&(clearInterval(M),P&&clearTimeout(P)),b!==null&&(clearTimeout(b.timeout),this.sessionIdleTimeouts.delete(s)),(y=this.http2Servers.get(a))===null||y===void 0||y.sessions.delete(s),this.sessions.delete(s)})}}enableIdleTimeout(a){var s,n;if(this.sessionIdleTimeout>=lb)return null;let r={activeStreams:0,lastIdle:Date.now(),onClose:this.onStreamClose.bind(this,a),timeout:setTimeout(this.onIdleTimeout,this.sessionIdleTimeout,this,a)};(n=(s=r.timeout).unref)===null||n===void 0||n.call(s),this.sessionIdleTimeouts.set(a,r);let{socket:l}=a;return this.trace("Enable idle timeout for "+l.remoteAddress+":"+l.remotePort),r}onIdleTimeout(a,s){let{socket:n}=s,r=a.sessionIdleTimeouts.get(s);r!==void 0&&r.activeStreams===0&&Date.now()-r.lastIdle>=a.sessionIdleTimeout&&(a.trace("Session idle timeout triggered for "+(n==null?void 0:n.remoteAddress)+":"+(n==null?void 0:n.remotePort)+" last idle at "+r.lastIdle),a.closeSession(s))}onStreamOpened(a){let s=a.session,n=this.sessionIdleTimeouts.get(s);n&&(n.activeStreams+=1,a.once("close",n.onClose))}onStreamClose(a){var s,n;let r=this.sessionIdleTimeouts.get(a);r&&(r.activeStreams-=1,r.activeStreams===0&&(r.lastIdle=Date.now(),r.timeout.refresh(),this.trace("Session onStreamClose"+((s=a.socket)===null||s===void 0?void 0:s.remoteAddress)+":"+((n=a.socket)===null||n===void 0?void 0:n.remotePort)+" at "+r.lastIdle)))}},(()=>{let i=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;t=[UJ("Calling start() is no longer necessary. It can be safely omitted.")],gJ(o,null,t,{kind:"method",name:"start",static:!1,private:!1,access:{has:a=>"start"in a,get:a=>a.start},metadata:i},null,e),i&&Object.defineProperty(o,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),o})();So.Server=VJ;async function wJ(o,e){let t;function i(n,r,l,c){if(n){o.sendStatus((0,Xa.serverErrorToStatus)(n,l));return}o.sendMessage(r,()=>{o.sendStatus({code:Qe.Status.OK,details:"OK",metadata:l??null})})}let a,s=null;o.start({onReceiveMetadata(n){a=n,o.startRead()},onReceiveMessage(n){if(s){o.sendStatus({code:Qe.Status.UNIMPLEMENTED,details:`Received a second request message for server streaming method ${e.path}`,metadata:null});return}s=n,o.startRead()},onReceiveHalfClose(){if(!s){o.sendStatus({code:Qe.Status.UNIMPLEMENTED,details:`Received no request message for server streaming method ${e.path}`,metadata:null});return}t=new Xa.ServerWritableStreamImpl(e.path,o,a,s);try{e.func(t,i)}catch(n){o.sendStatus({code:Qe.Status.UNKNOWN,details:`Server method handler threw error ${n.message}`,metadata:null})}},onCancel(){t&&(t.cancelled=!0,t.emit("cancelled","cancelled"))}})}function BJ(o,e){let t;function i(a,s,n,r){if(a){o.sendStatus((0,Xa.serverErrorToStatus)(a,n));return}o.sendMessage(s,()=>{o.sendStatus({code:Qe.Status.OK,details:"OK",metadata:n??null})})}o.start({onReceiveMetadata(a){t=new Xa.ServerDuplexStreamImpl(e.path,o,a);try{e.func(t,i)}catch(s){o.sendStatus({code:Qe.Status.UNKNOWN,details:`Server method handler threw error ${s.message}`,metadata:null})}},onReceiveMessage(a){t.push(a)},onReceiveHalfClose(){t.push(null)},onCancel(){t&&(t.cancelled=!0,t.emit("cancelled","cancelled"),t.destroy())}})}function GJ(o,e){let t,i,a=null;o.start({onReceiveMetadata(s){i=s,o.startRead()},onReceiveMessage(s){if(a){o.sendStatus({code:Qe.Status.UNIMPLEMENTED,details:`Received a second request message for server streaming method ${e.path}`,metadata:null});return}a=s,o.startRead()},onReceiveHalfClose(){if(!a){o.sendStatus({code:Qe.Status.UNIMPLEMENTED,details:`Received no request message for server streaming method ${e.path}`,metadata:null});return}t=new Xa.ServerWritableStreamImpl(e.path,o,i,a);try{e.func(t)}catch(s){o.sendStatus({code:Qe.Status.UNKNOWN,details:`Server method handler threw error ${s.message}`,metadata:null})}},onCancel(){t&&(t.cancelled=!0,t.emit("cancelled","cancelled"),t.destroy())}})}function kJ(o,e){let t;o.start({onReceiveMetadata(i){t=new Xa.ServerDuplexStreamImpl(e.path,o,i);try{e.func(t)}catch(a){o.sendStatus({code:Qe.Status.UNKNOWN,details:`Server method handler threw error ${a.message}`,metadata:null})}},onReceiveMessage(i){t.push(i)},onReceiveHalfClose(){t.push(null)},onCancel(){t&&(t.cancelled=!0,t.emit("cancelled","cancelled"),t.destroy())}})}});var _b=A(HT=>{"use strict";Object.defineProperty(HT,"__esModule",{value:!0});HT.StatusBuilder=void 0;var Rv=class{constructor(){this.code=null,this.details=null,this.metadata=null}withCode(e){return this.code=e,this}withDetails(e){return this.details=e,this}withMetadata(e){return this.metadata=e,this}build(){let e={};return this.code!==null&&(e.code=this.code),this.details!==null&&(e.details=this.details),this.metadata!==null&&(e.metadata=this.metadata),e}};HT.StatusBuilder=Rv});var mv=A(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.isDuration=po.durationToMs=po.msToDuration=void 0;function HJ(o){return{seconds:o/1e3|0,nanos:o%1e3*1e6|0}}po.msToDuration=HJ;function YJ(o){return o.seconds*1e3+o.nanos/1e6|0}po.durationToMs=YJ;function FJ(o){return typeof o.seconds=="number"&&typeof o.nanos=="number"}po.isDuration=FJ});var YT=A(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.setup=ur.LeafLoadBalancer=ur.PickFirstLoadBalancer=ur.shuffled=ur.PickFirstLoadBalancingConfig=void 0;var Nv=Fo(),Ke=er(),$a=Zn(),KJ=De(),qJ=Ae(),Tb=fr(),Sb=k("net"),WJ="pick_first";function Ov(o){KJ.trace(qJ.LogVerbosity.DEBUG,WJ,o)}var ec="pick_first",jJ=250,Ja=class o{constructor(e){this.shuffleAddressList=e}getLoadBalancerName(){return ec}toJsonObject(){return{[ec]:{shuffleAddressList:this.shuffleAddressList}}}getShuffleAddressList(){return this.shuffleAddressList}static createFromJson(e){if("shuffleAddressList"in e&&typeof e.shuffleAddressList!="boolean")throw new Error("pick_first config field shuffleAddressList must be a boolean if provided");return new o(e.shuffleAddressList===!0)}};ur.PickFirstLoadBalancingConfig=Ja;var Mv=class{constructor(e){this.subchannel=e}pick(e){return{pickResultType:$a.PickResultType.COMPLETE,subchannel:this.subchannel,status:null,onCallStarted:null,onCallEnded:null}}};function pb(o){let e=o.slice();for(let t=e.length-1;t>1;t--){let i=Math.floor(Math.random()*(t+1)),a=e[t];e[t]=e[i],e[i]=a}return e}ur.shuffled=pb;function zJ(o){let e=[],t=[],i=[],a=(0,Tb.isTcpSubchannelAddress)(o[0])&&(0,Sb.isIPv6)(o[0].host);for(let r of o)(0,Tb.isTcpSubchannelAddress)(r)&&(0,Sb.isIPv6)(r.host)?t.push(r):i.push(r);let s=a?t:i,n=a?i:t;for(let r=0;r<Math.max(s.length,n.length);r++)r<s.length&&e.push(s[r]),r<n.length&&e.push(n[r]);return e}var db="grpc-node.internal.pick-first.report_health_status",tc=class{constructor(e,t){this.channelControlHelper=e,this.children=[],this.currentState=Ke.ConnectivityState.IDLE,this.currentSubchannelIndex=0,this.currentPick=null,this.subchannelStateListener=(i,a,s,n,r)=>{this.onSubchannelStateUpdate(i,a,s,r)},this.pickedSubchannelHealthListener=()=>this.calculateAndReportNewState(),this.triedAllSubchannels=!1,this.stickyTransientFailureMode=!1,this.requestedResolutionSinceLastUpdate=!1,this.lastError=null,this.latestAddressList=null,this.connectionDelayTimeout=setTimeout(()=>{},0),clearTimeout(this.connectionDelayTimeout),this.reportHealthStatus=t[db]}allChildrenHaveReportedTF(){return this.children.every(e=>e.hasReportedTransientFailure)}calculateAndReportNewState(){this.currentPick?this.reportHealthStatus&&!this.currentPick.isHealthy()?this.updateState(Ke.ConnectivityState.TRANSIENT_FAILURE,new $a.UnavailablePicker({details:`Picked subchannel ${this.currentPick.getAddress()} is unhealthy`})):this.updateState(Ke.ConnectivityState.READY,new Mv(this.currentPick)):this.children.length===0?this.updateState(Ke.ConnectivityState.IDLE,new $a.QueuePicker(this)):this.stickyTransientFailureMode?this.updateState(Ke.ConnectivityState.TRANSIENT_FAILURE,new $a.UnavailablePicker({details:`No connection established. Last error: ${this.lastError}`})):this.updateState(Ke.ConnectivityState.CONNECTING,new $a.QueuePicker(this))}requestReresolution(){this.requestedResolutionSinceLastUpdate=!0,this.channelControlHelper.requestReresolution()}maybeEnterStickyTransientFailureMode(){if(this.allChildrenHaveReportedTF()&&(this.requestedResolutionSinceLastUpdate||this.requestReresolution(),!this.stickyTransientFailureMode)){this.stickyTransientFailureMode=!0;for(let{subchannel:e}of this.children)e.startConnecting();this.calculateAndReportNewState()}}removeCurrentPick(){if(this.currentPick!==null){let e=this.currentPick;this.currentPick=null,e.unref(),e.removeConnectivityStateListener(this.subchannelStateListener),this.channelControlHelper.removeChannelzChild(e.getChannelzRef()),this.reportHealthStatus&&e.removeHealthStateWatcher(this.pickedSubchannelHealthListener)}}onSubchannelStateUpdate(e,t,i,a){var s;if(!((s=this.currentPick)===null||s===void 0)&&s.realSubchannelEquals(e)){i!==Ke.ConnectivityState.READY&&(this.removeCurrentPick(),this.calculateAndReportNewState(),this.requestReresolution());return}for(let[n,r]of this.children.entries())if(e.realSubchannelEquals(r.subchannel)){i===Ke.ConnectivityState.READY&&this.pickSubchannel(r.subchannel),i===Ke.ConnectivityState.TRANSIENT_FAILURE&&(r.hasReportedTransientFailure=!0,a&&(this.lastError=a),this.maybeEnterStickyTransientFailureMode(),n===this.currentSubchannelIndex&&this.startNextSubchannelConnecting(n+1)),r.subchannel.startConnecting();return}}startNextSubchannelConnecting(e){if(clearTimeout(this.connectionDelayTimeout),!this.triedAllSubchannels){for(let[t,i]of this.children.entries())if(t>=e){let a=i.subchannel.getConnectivityState();if(a===Ke.ConnectivityState.IDLE||a===Ke.ConnectivityState.CONNECTING){this.startConnecting(t);return}}this.triedAllSubchannels=!0,this.maybeEnterStickyTransientFailureMode()}}startConnecting(e){var t,i;clearTimeout(this.connectionDelayTimeout),this.currentSubchannelIndex=e,this.children[e].subchannel.getConnectivityState()===Ke.ConnectivityState.IDLE&&(Ov("Start connecting to subchannel with address "+this.children[e].subchannel.getAddress()),process.nextTick(()=>{var a;(a=this.children[e])===null||a===void 0||a.subchannel.startConnecting()})),this.connectionDelayTimeout=setTimeout(()=>{this.startNextSubchannelConnecting(e+1)},jJ),(i=(t=this.connectionDelayTimeout).unref)===null||i===void 0||i.call(t)}pickSubchannel(e){this.currentPick&&e.realSubchannelEquals(this.currentPick)||(Ov("Pick subchannel with address "+e.getAddress()),this.stickyTransientFailureMode=!1,this.removeCurrentPick(),this.currentPick=e,e.ref(),this.reportHealthStatus&&e.addHealthStateWatcher(this.pickedSubchannelHealthListener),this.channelControlHelper.addChannelzChild(e.getChannelzRef()),this.resetSubchannelList(),clearTimeout(this.connectionDelayTimeout),this.calculateAndReportNewState())}updateState(e,t){Ov(Ke.ConnectivityState[this.currentState]+" -> "+Ke.ConnectivityState[e]),this.currentState=e,this.channelControlHelper.updateState(e,t)}resetSubchannelList(){for(let e of this.children)this.currentPick&&e.subchannel.realSubchannelEquals(this.currentPick)||e.subchannel.removeConnectivityStateListener(this.subchannelStateListener),e.subchannel.unref(),this.channelControlHelper.removeChannelzChild(e.subchannel.getChannelzRef());this.currentSubchannelIndex=0,this.children=[],this.triedAllSubchannels=!1,this.requestedResolutionSinceLastUpdate=!1}connectToAddressList(e){let t=e.map(i=>({subchannel:this.channelControlHelper.createSubchannel(i,{}),hasReportedTransientFailure:!1}));for(let{subchannel:i}of t)i.ref(),this.channelControlHelper.addChannelzChild(i.getChannelzRef());this.resetSubchannelList(),this.children=t;for(let{subchannel:i}of this.children)if(i.addConnectivityStateListener(this.subchannelStateListener),i.getConnectivityState()===Ke.ConnectivityState.READY){this.pickSubchannel(i);return}for(let i of this.children)i.subchannel.getConnectivityState()===Ke.ConnectivityState.TRANSIENT_FAILURE&&(i.hasReportedTransientFailure=!0);this.startNextSubchannelConnecting(0),this.calculateAndReportNewState()}updateAddressList(e,t){if(!(t instanceof Ja))return;t.getShuffleAddressList()&&(e=pb(e));let i=[].concat(...e.map(s=>s.addresses));if(i.length===0)throw new Error("No addresses in endpoint list passed to pick_first");let a=zJ(i);this.latestAddressList=a,this.connectToAddressList(a)}exitIdle(){this.currentState===Ke.ConnectivityState.IDLE&&this.latestAddressList&&this.connectToAddressList(this.latestAddressList)}resetBackoff(){}destroy(){this.resetSubchannelList(),this.removeCurrentPick()}getTypeName(){return ec}};ur.PickFirstLoadBalancer=tc;var XJ=new Ja(!1),Pv=class{constructor(e,t,i){this.endpoint=e,this.latestState=Ke.ConnectivityState.IDLE;let a=(0,Nv.createChildChannelControlHelper)(t,{updateState:(s,n)=>{this.latestState=s,this.latestPicker=n,t.updateState(s,n)}});this.pickFirstBalancer=new tc(a,Object.assign(Object.assign({},i),{[db]:!0})),this.latestPicker=new $a.QueuePicker(this.pickFirstBalancer)}startConnecting(){this.pickFirstBalancer.updateAddressList([this.endpoint],XJ)}updateEndpoint(e){this.endpoint=e,this.latestState!==Ke.ConnectivityState.IDLE&&this.startConnecting()}getConnectivityState(){return this.latestState}getPicker(){return this.latestPicker}getEndpoint(){return this.endpoint}exitIdle(){this.pickFirstBalancer.exitIdle()}destroy(){this.pickFirstBalancer.destroy()}};ur.LeafLoadBalancer=Pv;function $J(){(0,Nv.registerLoadBalancerType)(ec,tc,Ja),(0,Nv.registerDefaultLoadBalancerType)(ec)}ur.setup=$J});var gv=A(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.BaseSubchannelWrapper=z.registerAdminService=z.FilterStackFactory=z.BaseFilter=z.PickResultType=z.QueuePicker=z.UnavailablePicker=z.ChildLoadBalancerHandler=z.EndpointMap=z.endpointHasAddress=z.endpointToString=z.subchannelAddressToString=z.LeafLoadBalancer=z.isLoadBalancerNameRegistered=z.parseLoadBalancingConfig=z.selectLbConfigFromList=z.registerLoadBalancerType=z.createChildChannelControlHelper=z.BackoffTimeout=z.durationToMs=z.uriToString=z.createResolver=z.registerResolver=z.log=z.trace=void 0;var fb=De();Object.defineProperty(z,"trace",{enumerable:!0,get:function(){return fb.trace}});Object.defineProperty(z,"log",{enumerable:!0,get:function(){return fb.log}});var Ab=wr();Object.defineProperty(z,"registerResolver",{enumerable:!0,get:function(){return Ab.registerResolver}});Object.defineProperty(z,"createResolver",{enumerable:!0,get:function(){return Ab.createResolver}});var JJ=Vt();Object.defineProperty(z,"uriToString",{enumerable:!0,get:function(){return JJ.uriToString}});var QJ=mv();Object.defineProperty(z,"durationToMs",{enumerable:!0,get:function(){return QJ.durationToMs}});var ZJ=Pl();Object.defineProperty(z,"BackoffTimeout",{enumerable:!0,get:function(){return ZJ.BackoffTimeout}});var rc=Fo();Object.defineProperty(z,"createChildChannelControlHelper",{enumerable:!0,get:function(){return rc.createChildChannelControlHelper}});Object.defineProperty(z,"registerLoadBalancerType",{enumerable:!0,get:function(){return rc.registerLoadBalancerType}});Object.defineProperty(z,"selectLbConfigFromList",{enumerable:!0,get:function(){return rc.selectLbConfigFromList}});Object.defineProperty(z,"parseLoadBalancingConfig",{enumerable:!0,get:function(){return rc.parseLoadBalancingConfig}});Object.defineProperty(z,"isLoadBalancerNameRegistered",{enumerable:!0,get:function(){return rc.isLoadBalancerNameRegistered}});var eQ=YT();Object.defineProperty(z,"LeafLoadBalancer",{enumerable:!0,get:function(){return eQ.LeafLoadBalancer}});var FT=fr();Object.defineProperty(z,"subchannelAddressToString",{enumerable:!0,get:function(){return FT.subchannelAddressToString}});Object.defineProperty(z,"endpointToString",{enumerable:!0,get:function(){return FT.endpointToString}});Object.defineProperty(z,"endpointHasAddress",{enumerable:!0,get:function(){return FT.endpointHasAddress}});Object.defineProperty(z,"EndpointMap",{enumerable:!0,get:function(){return FT.EndpointMap}});var tQ=g_();Object.defineProperty(z,"ChildLoadBalancerHandler",{enumerable:!0,get:function(){return tQ.ChildLoadBalancerHandler}});var Cv=Zn();Object.defineProperty(z,"UnavailablePicker",{enumerable:!0,get:function(){return Cv.UnavailablePicker}});Object.defineProperty(z,"QueuePicker",{enumerable:!0,get:function(){return Cv.QueuePicker}});Object.defineProperty(z,"PickResultType",{enumerable:!0,get:function(){return Cv.PickResultType}});var rQ=Vh();Object.defineProperty(z,"BaseFilter",{enumerable:!0,get:function(){return rQ.BaseFilter}});var nQ=xh();Object.defineProperty(z,"FilterStackFactory",{enumerable:!0,get:function(){return nQ.FilterStackFactory}});var oQ=y_();Object.defineProperty(z,"registerAdminService",{enumerable:!0,get:function(){return oQ.registerAdminService}});var iQ=DT();Object.defineProperty(z,"BaseSubchannelWrapper",{enumerable:!0,get:function(){return iQ.BaseSubchannelWrapper}})});var hb=A(KT=>{"use strict";Object.defineProperty(KT,"__esModule",{value:!0});KT.setup=void 0;var aQ=wr(),Lv=class{constructor(e,t,i){this.listener=t,this.hasReturnedResult=!1,this.endpoints=[];let a;e.authority===""?a="/"+e.path:a=e.path,this.endpoints=[{addresses:[{path:a}]}]}updateResolution(){this.hasReturnedResult||(this.hasReturnedResult=!0,process.nextTick(this.listener.onSuccessfulResolution,this.endpoints,null,null,null,{}))}destroy(){this.hasReturnedResult=!1}static getDefaultAuthority(e){return"localhost"}};function sQ(){(0,aQ.registerResolver)("unix",Lv)}KT.setup=sQ});var Nb=A(jT=>{"use strict";Object.defineProperty(jT,"__esModule",{value:!0});jT.setup=void 0;var vb=k("net"),qT=Ae(),Iv=ht(),Rb=wr(),mb=Vt(),lQ=De(),cQ="ip_resolver";function Ob(o){lQ.trace(qT.LogVerbosity.DEBUG,cQ,o)}var yv="ipv4",Dv="ipv6",uQ=443,WT=class{constructor(e,t,i){var a;this.listener=t,this.endpoints=[],this.error=null,this.hasReturnedResult=!1,Ob("Resolver constructed for target "+(0,mb.uriToString)(e));let s=[];if(!(e.scheme===yv||e.scheme===Dv)){this.error={code:qT.Status.UNAVAILABLE,details:`Unrecognized scheme ${e.scheme} in IP resolver`,metadata:new Iv.Metadata};return}let n=e.path.split(",");for(let r of n){let l=(0,mb.splitHostPort)(r);if(l===null){this.error={code:qT.Status.UNAVAILABLE,details:`Failed to parse ${e.scheme} address ${r}`,metadata:new Iv.Metadata};return}if(e.scheme===yv&&!(0,vb.isIPv4)(l.host)||e.scheme===Dv&&!(0,vb.isIPv6)(l.host)){this.error={code:qT.Status.UNAVAILABLE,details:`Failed to parse ${e.scheme} address ${r}`,metadata:new Iv.Metadata};return}s.push({host:l.host,port:(a=l.port)!==null&&a!==void 0?a:uQ})}this.endpoints=s.map(r=>({addresses:[r]})),Ob("Parsed "+e.scheme+" address list "+s)}updateResolution(){this.hasReturnedResult||(this.hasReturnedResult=!0,process.nextTick(()=>{this.error?this.listener.onError(this.error):this.listener.onSuccessfulResolution(this.endpoints,null,null,null,{})}))}destroy(){this.hasReturnedResult=!1}static getDefaultAuthority(e){return e.path.split(",")[0]}};function EQ(){(0,Rb.registerResolver)(yv,WT),(0,Rb.registerResolver)(Dv,WT)}jT.setup=EQ});var gb=A(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.setup=Qa.RoundRobinLoadBalancer=void 0;var Cb=Fo(),kt=er(),xv=Zn(),_Q=De(),TQ=Ae(),Mb=fr(),SQ=YT(),pQ="round_robin";function Pb(o){_Q.trace(TQ.LogVerbosity.DEBUG,pQ,o)}var zT="round_robin",Uv=class o{getLoadBalancerName(){return zT}constructor(){}toJsonObject(){return{[zT]:{}}}static createFromJson(e){return new o}},bv=class{constructor(e,t=0){this.children=e,this.nextIndex=t}pick(e){let t=this.children[this.nextIndex].picker;return this.nextIndex=(this.nextIndex+1)%this.children.length,t.pick(e)}peekNextEndpoint(){return this.children[this.nextIndex].endpoint}},XT=class{constructor(e,t){this.channelControlHelper=e,this.options=t,this.children=[],this.currentState=kt.ConnectivityState.IDLE,this.currentReadyPicker=null,this.updatesPaused=!1,this.lastError=null,this.childChannelControlHelper=(0,Cb.createChildChannelControlHelper)(e,{updateState:(i,a)=>{this.calculateAndUpdateState()}})}countChildrenWithState(e){return this.children.filter(t=>t.getConnectivityState()===e).length}calculateAndUpdateState(){if(!this.updatesPaused){if(this.countChildrenWithState(kt.ConnectivityState.READY)>0){let e=this.children.filter(i=>i.getConnectivityState()===kt.ConnectivityState.READY),t=0;if(this.currentReadyPicker!==null){let i=this.currentReadyPicker.peekNextEndpoint();t=e.findIndex(a=>(0,Mb.endpointEqual)(a.getEndpoint(),i)),t<0&&(t=0)}this.updateState(kt.ConnectivityState.READY,new bv(e.map(i=>({endpoint:i.getEndpoint(),picker:i.getPicker()})),t))}else this.countChildrenWithState(kt.ConnectivityState.CONNECTING)>0?this.updateState(kt.ConnectivityState.CONNECTING,new xv.QueuePicker(this)):this.countChildrenWithState(kt.ConnectivityState.TRANSIENT_FAILURE)>0?this.updateState(kt.ConnectivityState.TRANSIENT_FAILURE,new xv.UnavailablePicker({details:`No connection established. Last error: ${this.lastError}`})):this.updateState(kt.ConnectivityState.IDLE,new xv.QueuePicker(this));for(let e of this.children)e.getConnectivityState()===kt.ConnectivityState.IDLE&&e.exitIdle()}}updateState(e,t){Pb(kt.ConnectivityState[this.currentState]+" -> "+kt.ConnectivityState[e]),e===kt.ConnectivityState.READY?this.currentReadyPicker=t:this.currentReadyPicker=null,this.currentState=e,this.channelControlHelper.updateState(e,t)}resetSubchannelList(){for(let e of this.children)e.destroy()}updateAddressList(e,t){this.resetSubchannelList(),Pb("Connect to endpoint list "+e.map(Mb.endpointToString)),this.updatesPaused=!0,this.children=e.map(i=>new SQ.LeafLoadBalancer(i,this.childChannelControlHelper,this.options));for(let i of this.children)i.startConnecting();this.updatesPaused=!1,this.calculateAndUpdateState()}exitIdle(){}resetBackoff(){}destroy(){this.resetSubchannelList()}getTypeName(){return zT}};Qa.RoundRobinLoadBalancer=XT;function dQ(){(0,Cb.registerLoadBalancerType)(zT,XT,Uv)}Qa.setup=dQ});var yb=A(fo=>{"use strict";var Vv;Object.defineProperty(fo,"__esModule",{value:!0});fo.setup=fo.OutlierDetectionLoadBalancer=fo.OutlierDetectionLoadBalancingConfig=void 0;var fQ=er(),Lb=Ae(),ei=mv(),Ib=gv(),AQ=Fo(),hQ=g_(),vQ=Zn(),wv=fr(),RQ=DT(),mQ=De(),OQ="outlier_detection";function it(o){mQ.trace(Lb.LogVerbosity.DEBUG,OQ,o)}var Fv="outlier_detection",NQ=((Vv=process.env.GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION)!==null&&Vv!==void 0?Vv:"true")==="true",MQ={stdev_factor:1900,enforcement_percentage:100,minimum_hosts:5,request_volume:100},PQ={threshold:85,enforcement_percentage:100,minimum_hosts:5,request_volume:50};function Za(o,e,t,i){if(e in o&&o[e]!==void 0&&typeof o[e]!==t){let a=i?`${i}.${e}`:e;throw new Error(`outlier detection config ${a} parse error: expected ${t}, got ${typeof o[e]}`)}}function Bv(o,e,t){let i=t?`${t}.${e}`:e;if(e in o&&o[e]!==void 0){if(!(0,ei.isDuration)(o[e]))throw new Error(`outlier detection config ${i} parse error: expected Duration, got ${typeof o[e]}`);if(!(o[e].seconds>=0&&o[e].seconds<=315576e6&&o[e].nanos>=0&&o[e].nanos<=999999999))throw new Error(`outlier detection config ${i} parse error: values out of range for non-negative Duaration`)}}function $T(o,e,t){let i=t?`${t}.${e}`:e;if(Za(o,e,"number",t),e in o&&o[e]!==void 0&&!(o[e]>=0&&o[e]<=100))throw new Error(`outlier detection config ${i} parse error: value out of range for percentage (0-100)`)}var nc=class o{constructor(e,t,i,a,s,n,r){if(this.childPolicy=r,r.getLoadBalancerName()==="pick_first")throw new Error("outlier_detection LB policy cannot have a pick_first child policy");this.intervalMs=e??1e4,this.baseEjectionTimeMs=t??3e4,this.maxEjectionTimeMs=i??3e5,this.maxEjectionPercent=a??10,this.successRateEjection=s?Object.assign(Object.assign({},MQ),s):null,this.failurePercentageEjection=n?Object.assign(Object.assign({},PQ),n):null}getLoadBalancerName(){return Fv}toJsonObject(){var e,t;return{outlier_detection:{interval:(0,ei.msToDuration)(this.intervalMs),base_ejection_time:(0,ei.msToDuration)(this.baseEjectionTimeMs),max_ejection_time:(0,ei.msToDuration)(this.maxEjectionTimeMs),max_ejection_percent:this.maxEjectionPercent,success_rate_ejection:(e=this.successRateEjection)!==null&&e!==void 0?e:void 0,failure_percentage_ejection:(t=this.failurePercentageEjection)!==null&&t!==void 0?t:void 0,child_policy:[this.childPolicy.toJsonObject()]}}}getIntervalMs(){return this.intervalMs}getBaseEjectionTimeMs(){return this.baseEjectionTimeMs}getMaxEjectionTimeMs(){return this.maxEjectionTimeMs}getMaxEjectionPercent(){return this.maxEjectionPercent}getSuccessRateEjectionConfig(){return this.successRateEjection}getFailurePercentageEjectionConfig(){return this.failurePercentageEjection}getChildPolicy(){return this.childPolicy}static createFromJson(e){var t;if(Bv(e,"interval"),Bv(e,"base_ejection_time"),Bv(e,"max_ejection_time"),$T(e,"max_ejection_percent"),"success_rate_ejection"in e&&e.success_rate_ejection!==void 0){if(typeof e.success_rate_ejection!="object")throw new Error("outlier detection config success_rate_ejection must be an object");Za(e.success_rate_ejection,"stdev_factor","number","success_rate_ejection"),$T(e.success_rate_ejection,"enforcement_percentage","success_rate_ejection"),Za(e.success_rate_ejection,"minimum_hosts","number","success_rate_ejection"),Za(e.success_rate_ejection,"request_volume","number","success_rate_ejection")}if("failure_percentage_ejection"in e&&e.failure_percentage_ejection!==void 0){if(typeof e.failure_percentage_ejection!="object")throw new Error("outlier detection config failure_percentage_ejection must be an object");$T(e.failure_percentage_ejection,"threshold","failure_percentage_ejection"),$T(e.failure_percentage_ejection,"enforcement_percentage","failure_percentage_ejection"),Za(e.failure_percentage_ejection,"minimum_hosts","number","failure_percentage_ejection"),Za(e.failure_percentage_ejection,"request_volume","number","failure_percentage_ejection")}if(!("child_policy"in e)||!Array.isArray(e.child_policy))throw new Error("outlier detection config child_policy must be an array");let i=(0,AQ.selectLbConfigFromList)(e.child_policy);if(!i)throw new Error("outlier detection config child_policy: no valid recognized policy found");return new o(e.interval?(0,ei.durationToMs)(e.interval):null,e.base_ejection_time?(0,ei.durationToMs)(e.base_ejection_time):null,e.max_ejection_time?(0,ei.durationToMs)(e.max_ejection_time):null,(t=e.max_ejection_percent)!==null&&t!==void 0?t:null,e.success_rate_ejection,e.failure_percentage_ejection,i)}};fo.OutlierDetectionLoadBalancingConfig=nc;var kv=class extends RQ.BaseSubchannelWrapper{constructor(e,t){super(e),this.mapEntry=t,this.refCount=0}ref(){this.child.ref(),this.refCount+=1}unref(){if(this.child.unref(),this.refCount-=1,this.refCount<=0&&this.mapEntry){let e=this.mapEntry.subchannelWrappers.indexOf(this);e>=0&&this.mapEntry.subchannelWrappers.splice(e,1)}}eject(){this.setHealthy(!1)}uneject(){this.setHealthy(!0)}getMapEntry(){return this.mapEntry}getWrappedSubchannel(){return this.child}};function Gv(){return{success:0,failure:0}}var Hv=class{constructor(){this.activeBucket=Gv(),this.inactiveBucket=Gv()}addSuccess(){this.activeBucket.success+=1}addFailure(){this.activeBucket.failure+=1}switchBuckets(){this.inactiveBucket=this.activeBucket,this.activeBucket=Gv()}getLastSuccesses(){return this.inactiveBucket.success}getLastFailures(){return this.inactiveBucket.failure}},Yv=class{constructor(e,t){this.wrappedPicker=e,this.countCalls=t}pick(e){let t=this.wrappedPicker.pick(e);if(t.pickResultType===vQ.PickResultType.COMPLETE){let i=t.subchannel,a=i.getMapEntry();if(a){let s=t.onCallEnded;return this.countCalls&&(s=n=>{var r;n===Lb.Status.OK?a.counter.addSuccess():a.counter.addFailure(),(r=t.onCallEnded)===null||r===void 0||r.call(t,n)}),Object.assign(Object.assign({},t),{subchannel:i.getWrappedSubchannel(),onCallEnded:s})}else return Object.assign(Object.assign({},t),{subchannel:i.getWrappedSubchannel()})}else return t}},JT=class{constructor(e,t){this.entryMap=new wv.EndpointMap,this.latestConfig=null,this.timerStartTime=null,this.childBalancer=new hQ.ChildLoadBalancerHandler((0,Ib.createChildChannelControlHelper)(e,{createSubchannel:(i,a)=>{let s=e.createSubchannel(i,a),n=this.entryMap.getForSubchannelAddress(i),r=new kv(s,n);return(n==null?void 0:n.currentEjectionTimestamp)!==null&&r.eject(),n==null||n.subchannelWrappers.push(r),r},updateState:(i,a)=>{i===fQ.ConnectivityState.READY?e.updateState(i,new Yv(a,this.isCountingEnabled())):e.updateState(i,a)}}),t),this.ejectionTimer=setInterval(()=>{},0),clearInterval(this.ejectionTimer)}isCountingEnabled(){return this.latestConfig!==null&&(this.latestConfig.getSuccessRateEjectionConfig()!==null||this.latestConfig.getFailurePercentageEjectionConfig()!==null)}getCurrentEjectionPercent(){let e=0;for(let t of this.entryMap.values())t.currentEjectionTimestamp!==null&&(e+=1);return e*100/this.entryMap.size}runSuccessRateCheck(e){if(!this.latestConfig)return;let t=this.latestConfig.getSuccessRateEjectionConfig();if(!t)return;it("Running success rate check");let i=t.request_volume,a=0,s=[];for(let[E,d]of this.entryMap.entries()){let f=d.counter.getLastSuccesses(),O=d.counter.getLastFailures();it("Stats for "+(0,wv.endpointToString)(E)+": successes="+f+" failures="+O+" targetRequestVolume="+i),f+O>=i&&(a+=1,s.push(f/(f+O)))}if(it("Found "+a+" success rate candidates; currentEjectionPercent="+this.getCurrentEjectionPercent()+" successRates=["+s+"]"),a<t.minimum_hosts)return;let n=s.reduce((E,d)=>E+d)/s.length,r=0;for(let E of s){let d=E-n;r+=d*d}let l=r/s.length,c=Math.sqrt(l),u=n-c*(t.stdev_factor/1e3);it("stdev="+c+" ejectionThreshold="+u);for(let[E,d]of this.entryMap.entries()){if(this.getCurrentEjectionPercent()>=this.latestConfig.getMaxEjectionPercent())break;let f=d.counter.getLastSuccesses(),O=d.counter.getLastFailures();if(f+O<i)continue;let R=f/(f+O);if(it("Checking candidate "+E+" successRate="+R),R<u){let M=Math.random()*100;it("Candidate "+E+" randomNumber="+M+" enforcement_percentage="+t.enforcement_percentage),M<t.enforcement_percentage&&(it("Ejecting candidate "+E),this.eject(d,e))}}}runFailurePercentageCheck(e){if(!this.latestConfig)return;let t=this.latestConfig.getFailurePercentageEjectionConfig();if(!t)return;it("Running failure percentage check. threshold="+t.threshold+" request volume threshold="+t.request_volume);let i=0;for(let a of this.entryMap.values()){let s=a.counter.getLastSuccesses(),n=a.counter.getLastFailures();s+n>=t.request_volume&&(i+=1)}if(!(i<t.minimum_hosts))for(let[a,s]of this.entryMap.entries()){if(this.getCurrentEjectionPercent()>=this.latestConfig.getMaxEjectionPercent())break;let n=s.counter.getLastSuccesses(),r=s.counter.getLastFailures();if(it("Candidate successes="+n+" failures="+r),n+r<t.request_volume)continue;if(r*100/(r+n)>t.threshold){let c=Math.random()*100;it("Candidate "+a+" randomNumber="+c+" enforcement_percentage="+t.enforcement_percentage),c<t.enforcement_percentage&&(it("Ejecting candidate "+a),this.eject(s,e))}}}eject(e,t){e.currentEjectionTimestamp=new Date,e.ejectionTimeMultiplier+=1;for(let i of e.subchannelWrappers)i.eject()}uneject(e){e.currentEjectionTimestamp=null;for(let t of e.subchannelWrappers)t.uneject()}switchAllBuckets(){for(let e of this.entryMap.values())e.counter.switchBuckets()}startTimer(e){var t,i;this.ejectionTimer=setTimeout(()=>this.runChecks(),e),(i=(t=this.ejectionTimer).unref)===null||i===void 0||i.call(t)}runChecks(){let e=new Date;if(it("Ejection timer running"),this.switchAllBuckets(),!!this.latestConfig){this.timerStartTime=e,this.startTimer(this.latestConfig.getIntervalMs()),this.runSuccessRateCheck(e),this.runFailurePercentageCheck(e);for(let[t,i]of this.entryMap.entries())if(i.currentEjectionTimestamp===null)i.ejectionTimeMultiplier>0&&(i.ejectionTimeMultiplier-=1);else{let a=this.latestConfig.getBaseEjectionTimeMs(),s=this.latestConfig.getMaxEjectionTimeMs(),n=new Date(i.currentEjectionTimestamp.getTime());n.setMilliseconds(n.getMilliseconds()+Math.min(a*i.ejectionTimeMultiplier,Math.max(a,s))),n<new Date&&(it("Unejecting "+t),this.uneject(i))}}}updateAddressList(e,t,i){if(!(t instanceof nc))return;for(let s of e)this.entryMap.has(s)||(it("Adding map entry for "+(0,wv.endpointToString)(s)),this.entryMap.set(s,{counter:new Hv,currentEjectionTimestamp:null,ejectionTimeMultiplier:0,subchannelWrappers:[]}));this.entryMap.deleteMissing(e);let a=t.getChildPolicy();if(this.childBalancer.updateAddressList(e,a,i),t.getSuccessRateEjectionConfig()||t.getFailurePercentageEjectionConfig())if(this.timerStartTime){it("Previous timer existed. Replacing timer"),clearTimeout(this.ejectionTimer);let s=t.getIntervalMs()-(new Date().getTime()-this.timerStartTime.getTime());this.startTimer(s)}else it("Starting new timer"),this.timerStartTime=new Date,this.startTimer(t.getIntervalMs()),this.switchAllBuckets();else{it("Counting disabled. Cancelling timer."),this.timerStartTime=null,clearTimeout(this.ejectionTimer);for(let s of this.entryMap.values())this.uneject(s),s.ejectionTimeMultiplier=0}this.latestConfig=t}exitIdle(){this.childBalancer.exitIdle()}resetBackoff(){this.childBalancer.resetBackoff()}destroy(){clearTimeout(this.ejectionTimer),this.childBalancer.destroy()}getTypeName(){return Fv}};fo.OutlierDetectionLoadBalancer=JT;function CQ(){NQ&&(0,Ib.registerLoadBalancerType)(Fv,JT,nc)}fo.setup=CQ});var oc=A(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.experimental=U.ServerInterceptingCall=U.ResponderBuilder=U.ServerListenerBuilder=U.addAdminServicesToServer=U.getChannelzHandlers=U.getChannelzServiceDefinition=U.InterceptorConfigurationError=U.InterceptingCall=U.RequesterBuilder=U.ListenerBuilder=U.StatusBuilder=U.getClientChannel=U.ServerCredentials=U.Server=U.setLogVerbosity=U.setLogger=U.load=U.loadObject=U.CallCredentials=U.ChannelCredentials=U.waitForClientReady=U.closeClient=U.Channel=U.makeGenericClientConstructor=U.makeClientConstructor=U.loadPackageDefinition=U.Client=U.compressionAlgorithms=U.propagate=U.connectivityState=U.status=U.logVerbosity=U.Metadata=U.credentials=void 0;var QT=Hf();Object.defineProperty(U,"CallCredentials",{enumerable:!0,get:function(){return QT.CallCredentials}});var gQ=vA();Object.defineProperty(U,"Channel",{enumerable:!0,get:function(){return gQ.ChannelImplementation}});var LQ=Uh();Object.defineProperty(U,"compressionAlgorithms",{enumerable:!0,get:function(){return LQ.CompressionAlgorithms}});var IQ=er();Object.defineProperty(U,"connectivityState",{enumerable:!0,get:function(){return IQ.ConnectivityState}});var ZT=R_();Object.defineProperty(U,"ChannelCredentials",{enumerable:!0,get:function(){return ZT.ChannelCredentials}});var Db=hA();Object.defineProperty(U,"Client",{enumerable:!0,get:function(){return Db.Client}});var Kv=Ae();Object.defineProperty(U,"logVerbosity",{enumerable:!0,get:function(){return Kv.LogVerbosity}});Object.defineProperty(U,"status",{enumerable:!0,get:function(){return Kv.Status}});Object.defineProperty(U,"propagate",{enumerable:!0,get:function(){return Kv.Propagate}});var xb=De(),qv=mA();Object.defineProperty(U,"loadPackageDefinition",{enumerable:!0,get:function(){return qv.loadPackageDefinition}});Object.defineProperty(U,"makeClientConstructor",{enumerable:!0,get:function(){return qv.makeClientConstructor}});Object.defineProperty(U,"makeGenericClientConstructor",{enumerable:!0,get:function(){return qv.makeClientConstructor}});var yQ=ht();Object.defineProperty(U,"Metadata",{enumerable:!0,get:function(){return yQ.Metadata}});var DQ=Eb();Object.defineProperty(U,"Server",{enumerable:!0,get:function(){return DQ.Server}});var xQ=uv();Object.defineProperty(U,"ServerCredentials",{enumerable:!0,get:function(){return xQ.ServerCredentials}});var UQ=_b();Object.defineProperty(U,"StatusBuilder",{enumerable:!0,get:function(){return UQ.StatusBuilder}});U.credentials={combineChannelCredentials:(o,...e)=>e.reduce((t,i)=>t.compose(i),o),combineCallCredentials:(o,...e)=>e.reduce((t,i)=>t.compose(i),o),createInsecure:ZT.ChannelCredentials.createInsecure,createSsl:ZT.ChannelCredentials.createSsl,createFromSecureContext:ZT.ChannelCredentials.createFromSecureContext,createFromMetadataGenerator:QT.CallCredentials.createFromMetadataGenerator,createFromGoogleCredential:QT.CallCredentials.createFromGoogleCredential,createEmpty:QT.CallCredentials.createEmpty};var bQ=o=>o.close();U.closeClient=bQ;var VQ=(o,e,t)=>o.waitForReady(e,t);U.waitForClientReady=VQ;var wQ=(o,e)=>{throw new Error("Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead")};U.loadObject=wQ;var BQ=(o,e,t)=>{throw new Error("Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead")};U.load=BQ;var GQ=o=>{xb.setLogger(o)};U.setLogger=GQ;var kQ=o=>{xb.setLoggerVerbosity(o)};U.setLogVerbosity=kQ;var HQ=o=>Db.Client.prototype.getChannel.call(o);U.getClientChannel=HQ;var eS=dA();Object.defineProperty(U,"ListenerBuilder",{enumerable:!0,get:function(){return eS.ListenerBuilder}});Object.defineProperty(U,"RequesterBuilder",{enumerable:!0,get:function(){return eS.RequesterBuilder}});Object.defineProperty(U,"InterceptingCall",{enumerable:!0,get:function(){return eS.InterceptingCall}});Object.defineProperty(U,"InterceptorConfigurationError",{enumerable:!0,get:function(){return eS.InterceptorConfigurationError}});var Ub=Xo();Object.defineProperty(U,"getChannelzServiceDefinition",{enumerable:!0,get:function(){return Ub.getChannelzServiceDefinition}});Object.defineProperty(U,"getChannelzHandlers",{enumerable:!0,get:function(){return Ub.getChannelzHandlers}});var YQ=y_();Object.defineProperty(U,"addAdminServicesToServer",{enumerable:!0,get:function(){return YQ.addAdminServicesToServer}});var Wv=fv();Object.defineProperty(U,"ServerListenerBuilder",{enumerable:!0,get:function(){return Wv.ServerListenerBuilder}});Object.defineProperty(U,"ResponderBuilder",{enumerable:!0,get:function(){return Wv.ResponderBuilder}});Object.defineProperty(U,"ServerInterceptingCall",{enumerable:!0,get:function(){return Wv.ServerInterceptingCall}});var FQ=gv();U.experimental=FQ;var KQ=mh(),qQ=hb(),WQ=Nb(),jQ=YT(),zQ=gb(),XQ=yb(),$Q=Xo();KQ.setup(),qQ.setup(),WQ.setup(),jQ.setup(),zQ.setup(),XQ.setup(),$Q.setup()});var bb=A(tS=>{"use strict";Object.defineProperty(tS,"__esModule",{value:!0});tS.createServiceClientConstructor=void 0;var JQ=oc();function QQ(o,e){let t={export:{path:o,requestStream:!1,responseStream:!1,requestSerialize:i=>i,requestDeserialize:i=>i,responseSerialize:i=>i,responseDeserialize:i=>i}};return JQ.makeGenericClientConstructor(t,e)}tS.createServiceClientConstructor=QQ});var zv=A($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.GrpcExporterTransport=$r.createEmptyMetadata=$r.createSslCredentials=$r.createInsecureCredentials=void 0;var ZQ=0,e7=2;function t7(o){return o==="gzip"?e7:ZQ}function r7(){let{credentials:o}=oc();return o.createInsecure()}$r.createInsecureCredentials=r7;function n7(o,e,t){let{credentials:i}=oc();return i.createSsl(o,e,t)}$r.createSslCredentials=n7;function o7(){let{Metadata:o}=oc();return new o}$r.createEmptyMetadata=o7;var jv=class{constructor(e){this._parameters=e}shutdown(){var e;(e=this._client)===null||e===void 0||e.close()}send(e,t){let i=Buffer.from(e);if(this._client==null){let{createServiceClientConstructor:a}=bb();try{this._metadata=this._parameters.metadata()}catch(n){return Promise.resolve({status:"failure",error:n})}let s=a(this._parameters.grpcPath,this._parameters.grpcName);try{this._client=new s(this._parameters.address,this._parameters.credentials(),{"grpc.default_compression_algorithm":t7(this._parameters.compression)})}catch(n){return Promise.resolve({status:"failure",error:n})}}return new Promise(a=>{let s=Date.now()+t;if(this._metadata==null)return a({error:new Error("metadata was null"),status:"failure"});this._client.export(i,this._metadata,{deadline:s},(n,r)=>{a(n?{status:"failure",error:n}:{data:r,status:"success"})})})}};$r.GrpcExporterTransport=jv});var Qv=A(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.configureCompression=Ht.getCredentialsFromEnvironment=Ht.configureCredentials=Ht.validateAndNormalizeUrl=Ht.DEFAULT_COLLECTOR_URL=void 0;var es=(x(),$(Ze)),Jr=(K(),$(yn)),$v=k("path"),i7=k("url"),Jv=k("fs"),Xv=(un(),$(uf)),Vb=zv();Ht.DEFAULT_COLLECTOR_URL="http://localhost:4317";function a7(o){var e;o.match(/^([\w]{1,8}):\/\//)||(o=`https://${o}`);let i=new i7.URL(o);return i.protocol==="unix:"?o:(i.pathname&&i.pathname!=="/"&&es.diag.warn("URL path should not be set when using grpc, the path part of the URL will be ignored."),i.protocol!==""&&!(!((e=i.protocol)===null||e===void 0)&&e.match(/^(http)s?:$/))&&es.diag.warn("URL protocol should be http(s)://. Using http://."),i.host)}Ht.validateAndNormalizeUrl=a7;function s7(o,e){let t;return o||(e.startsWith("https://")?t=!1:e.startsWith("http://")||e===Ht.DEFAULT_COLLECTOR_URL?t=!0:t=l7(),t?(0,Vb.createInsecureCredentials)():wb())}Ht.configureCredentials=s7;function l7(){let o=(0,Jr.getEnv)().OTEL_EXPORTER_OTLP_TRACES_INSECURE||(0,Jr.getEnv)().OTEL_EXPORTER_OTLP_INSECURE;return o?o.toLowerCase()==="true":!1}function wb(){let o=c7(),e=u7(),t=E7();return(0,Vb.createSslCredentials)(o,e,t)}Ht.getCredentialsFromEnvironment=wb;function c7(){let o=(0,Jr.getEnv)().OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE||(0,Jr.getEnv)().OTEL_EXPORTER_OTLP_CERTIFICATE;if(o)try{return Jv.readFileSync($v.resolve(process.cwd(),o))}catch{es.diag.warn("Failed to read root certificate file");return}else return}function u7(){let o=(0,Jr.getEnv)().OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY||(0,Jr.getEnv)().OTEL_EXPORTER_OTLP_CLIENT_KEY;if(o)try{return Jv.readFileSync($v.resolve(process.cwd(),o))}catch{es.diag.warn("Failed to read client certificate private key file");return}else return}function E7(){let o=(0,Jr.getEnv)().OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE||(0,Jr.getEnv)().OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE;if(o)try{return Jv.readFileSync($v.resolve(process.cwd(),o))}catch{es.diag.warn("Failed to read client certificate chain file");return}else return}function _7(o){if(o!=null)return o;let e=(0,Jr.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION||(0,Jr.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION;return e==="gzip"?Xv.CompressionAlgorithm.GZIP:(e==="none"||es.diag.warn('Unknown compression "'+e+'", falling back to "none"'),Xv.CompressionAlgorithm.NONE)}Ht.configureCompression=_7});var Yb=A(rS=>{"use strict";Object.defineProperty(rS,"__esModule",{value:!0});rS.OTLPGRPCExporterNodeBase=void 0;var Bb=(x(),$(Ze)),Gb=(K(),$(yn)),Zv=(un(),$(uf)),kb=zv(),Hb=Qv(),eR=class extends Zv.OTLPExporterBase{constructor(e={},t,i,a,s){var n;super(e),this.grpcQueue=[],this._serializer=s,e.headers&&Bb.diag.warn("Headers cannot be set when using grpc");let r=Gb.baggageUtils.parseKeyPairsIntoRecord((0,Gb.getEnv)().OTEL_EXPORTER_OTLP_HEADERS),l=Object.assign({},r,t),c=()=>(0,Hb.configureCredentials)(void 0,this.getUrlFromConfig(e));if(e.credentials!=null){let d=e.credentials;c=()=>d}let u=(n=e.metadata)===null||n===void 0?void 0:n.clone(),E=()=>{let d=u??(0,kb.createEmptyMetadata)();for(let[f,O]of Object.entries(l))d.get(f).length<1&&d.set(f,O);return d};this.compression=(0,Hb.configureCompression)(e.compression),this._transport=new kb.GrpcExporterTransport({address:this.getDefaultUrl(e),compression:this.compression,credentials:c,grpcName:i,grpcPath:a,metadata:E})}onInit(){}onShutdown(){this._transport.shutdown()}send(e,t,i){if(this._shutdownOnce.isCalled){Bb.diag.debug("Shutdown already started. Cannot send objects");return}let a=this._serializer.serializeRequest(e);if(a==null){i(new Error("Could not serialize message"));return}let s=this._transport.send(a,this.timeoutMillis).then(r=>{r.status==="success"?t():r.status==="failure"&&r.error?i(r.error):r.status==="retryable"?i(new Zv.OTLPExporterError("Export failed with retryable status")):i(new Zv.OTLPExporterError("Export failed with unknown error"))},i);this._sendingPromises.push(s);let n=()=>{let r=this._sendingPromises.indexOf(s);this._sendingPromises.splice(r,1)};s.then(n,n)}};rS.OTLPGRPCExporterNodeBase=eR});var tR=A(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.validateAndNormalizeUrl=Ao.DEFAULT_COLLECTOR_URL=Ao.OTLPGRPCExporterNodeBase=void 0;var T7=Yb();Object.defineProperty(Ao,"OTLPGRPCExporterNodeBase",{enumerable:!0,get:function(){return T7.OTLPGRPCExporterNodeBase}});var Fb=Qv();Object.defineProperty(Ao,"DEFAULT_COLLECTOR_URL",{enumerable:!0,get:function(){return Fb.DEFAULT_COLLECTOR_URL}});Object.defineProperty(Ao,"validateAndNormalizeUrl",{enumerable:!0,get:function(){return Fb.validateAndNormalizeUrl}})});var Kb=A(nS=>{"use strict";Object.defineProperty(nS,"__esModule",{value:!0});nS.VERSION=void 0;nS.VERSION="0.53.0"});var qb=A(iS=>{"use strict";Object.defineProperty(iS,"__esModule",{value:!0});iS.OTLPLogExporter=void 0;var oS=(K(),$(yn)),rR=tR(),S7=(zn(),$(Lf)),p7=Kb(),d7={"User-Agent":`OTel-OTLP-Exporter-JavaScript/${p7.VERSION}`},nR=class extends rR.OTLPGRPCExporterNodeBase{constructor(e={}){let t=Object.assign(Object.assign({},d7),oS.baggageUtils.parseKeyPairsIntoRecord((0,oS.getEnv)().OTEL_EXPORTER_OTLP_LOGS_HEADERS));super(e,t,"LogsExportService","/opentelemetry.proto.collector.logs.v1.LogsService/Export",S7.ProtobufLogsSerializer)}getDefaultUrl(e){return(0,rR.validateAndNormalizeUrl)(this.getUrlFromConfig(e))}getUrlFromConfig(e){return typeof e.url=="string"?e.url:(0,oS.getEnv)().OTEL_EXPORTER_OTLP_LOGS_ENDPOINT||(0,oS.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT||rR.DEFAULT_COLLECTOR_URL}};iS.OTLPLogExporter=nR});var Wb=A(ti=>{"use strict";var f7=ti&&ti.__createBinding||(Object.create?function(o,e,t,i){i===void 0&&(i=t),Object.defineProperty(o,i,{enumerable:!0,get:function(){return e[t]}})}:function(o,e,t,i){i===void 0&&(i=t),o[i]=e[t]}),A7=ti&&ti.__exportStar||function(o,e){for(var t in o)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&f7(e,o,t)};Object.defineProperty(ti,"__esModule",{value:!0});A7(qb(),ti)});var jb,zb=S(()=>{jb="0.53.0"});var h7,Xb,v7,ts,$b=S(()=>{K();un();zn();zb();h7={"User-Agent":`OTel-OTLP-Exporter-JavaScript/${jb}`},Xb="v1/logs",v7=`http://localhost:4318/${Xb}`,ts=class extends bt{constructor(e={}){super(e,E_,Object.assign(Object.assign(Object.assign(Object.assign({},Dt.parseKeyPairsIntoRecord(Z().OTEL_EXPORTER_OTLP_LOGS_HEADERS)),$t(e==null?void 0:e.headers)),h7),{"Content-Type":"application/x-protobuf"}))}getDefaultUrl(e){if(typeof e.url=="string")return e.url;let t=Z();return t.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT.length>0?Dr(t.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT):t.OTEL_EXPORTER_OTLP_ENDPOINT.length>0?yr(t.OTEL_EXPORTER_OTLP_ENDPOINT,Xb):v7}}});var Jb=S(()=>{$b()});var Qb=S(()=>{Jb()});var Zb={};ge(Zb,{OTLPLogExporter:()=>ts});var e0=S(()=>{Qb()});function Be(o){for(var e={},t=o.length,i=0;i<t;i++){var a=o[i];a&&(e[String(a).toUpperCase().replace(/[-.]/g,"_")]=a)}return e}var oR=S(()=>{});var t0,r0,n0,o0,i0,a0,s0,l0,c0,u0,E0,_0,T0,S0,p0,d0,f0,A0,h0,v0,R0,m0,O0,N0,M0,P0,C0,g0,L0,I0,y0,D0,x0,U0,b0,V0,w0,B0,G0,k0,H0,Y0,F0,K0,q0,W0,j0,z0,X0,$0,J0,Q0,Z0,eV,tV,rV,nV,oV,iV,aV,sV,lV,cV,uV,EV,_V,TV,SV,pV,dV,fV,AV,hV,vV,RV,mV,OV,NV,MV,PV,CV,gV,LV,IV,yV,DV,xV,UV,bV,VV,wV,BV,GV,kV,HV,YV,FV,KV,qV,WV,jV,zV,XV,$V,JV,QV,ZV,ew,tw,rw,nw,ow,iw,aw,sw,lw,cw,uw,Ew,_w,Tw,Sw,pw,dw,fw,Aw,hw,vw,R7,m7,O7,N7,M7,P7,C7,g7,L7,I7,y7,D7,x7,U7,b7,V7,w7,B7,G7,k7,H7,Y7,F7,K7,q7,W7,j7,z7,X7,$7,J7,Q7,Z7,e9,t9,r9,n9,o9,i9,a9,s9,l9,c9,u9,E9,_9,T9,S9,p9,d9,f9,A9,h9,v9,R9,m9,O9,N9,M9,P9,C9,g9,L9,I9,y9,D9,x9,U9,b9,V9,w9,B9,G9,k9,H9,Y9,F9,K9,q9,W9,j9,z9,X9,$9,J9,Q9,Z9,eZ,tZ,rZ,nZ,oZ,iZ,aZ,sZ,lZ,cZ,uZ,EZ,_Z,TZ,SZ,pZ,dZ,fZ,AZ,hZ,vZ,RZ,mZ,OZ,NZ,MZ,PZ,CZ,gZ,LZ,IZ,yZ,DZ,xZ,UZ,bZ,VZ,wZ,BZ,GZ,kZ,HZ,Rw,mw,Ow,Nw,Mw,Pw,Cw,gw,Lw,Iw,yw,Dw,xw,Uw,bw,Vw,ww,Bw,Gw,kw,Hw,Yw,Fw,Kw,qw,Ww,jw,zw,Xw,$w,Jw,Qw,Zw,e1,t1,r1,n1,o1,i1,a1,s1,l1,c1,u1,E1,_1,T1,YZ,FZ,KZ,qZ,WZ,jZ,zZ,XZ,$Z,JZ,QZ,ZZ,eee,tee,ree,nee,oee,iee,aee,see,lee,cee,uee,Eee,_ee,Tee,See,pee,dee,fee,Aee,hee,vee,Ree,mee,Oee,Nee,Mee,Pee,Cee,gee,Lee,Iee,yee,Dee,xee,Uee,bee,S1,p1,d1,f1,A1,h1,v1,R1,m1,O1,N1,Vee,wee,Bee,Gee,kee,Hee,Yee,Fee,Kee,qee,Wee,jee,M1,P1,C1,g1,L1,zee,Xee,$ee,Jee,Qee,Zee,I1,y1,D1,ete,tte,rte,nte,x1,U1,b1,V1,ote,ite,ate,ste,lte,w1,B1,G1,k1,H1,Y1,F1,cte,ute,Ete,_te,Tte,Ste,pte,dte,K1,q1,W1,j1,z1,fte,Ate,hte,vte,Rte,mte,X1,$1,J1,Q1,Z1,eB,tB,rB,nB,oB,iB,aB,sB,lB,cB,uB,EB,_B,TB,SB,pB,Ote,Nte,Mte,Pte,Cte,gte,Lte,Ite,yte,Dte,xte,Ute,bte,Vte,wte,Bte,Gte,kte,Hte,Yte,Fte,Kte,dB,fB,AB,hB,vB,qte,Wte,jte,zte,Xte,$te,RB,mB,Jte,Qte,Zte,OB,NB,ere,tre,rre,MB,PB,CB,gB,LB,IB,yB,DB,xB,UB,bB,VB,wB,BB,GB,kB,HB,nre,ore,ire,are,sre,lre,cre,ure,Ere,_re,Tre,Sre,pre,dre,fre,Are,hre,vre,YB,FB,Rre,mre,Ore,KB=S(()=>{oR();t0="aws.lambda.invoked_arn",r0="db.system",n0="db.connection_string",o0="db.user",i0="db.jdbc.driver_classname",a0="db.name",s0="db.statement",l0="db.operation",c0="db.mssql.instance_name",u0="db.cassandra.keyspace",E0="db.cassandra.page_size",_0="db.cassandra.consistency_level",T0="db.cassandra.table",S0="db.cassandra.idempotence",p0="db.cassandra.speculative_execution_count",d0="db.cassandra.coordinator.id",f0="db.cassandra.coordinator.dc",A0="db.hbase.namespace",h0="db.redis.database_index",v0="db.mongodb.collection",R0="db.sql.table",m0="exception.type",O0="exception.message",N0="exception.stacktrace",M0="exception.escaped",P0="faas.trigger",C0="faas.execution",g0="faas.document.collection",L0="faas.document.operation",I0="faas.document.time",y0="faas.document.name",D0="faas.time",x0="faas.cron",U0="faas.coldstart",b0="faas.invoked_name",V0="faas.invoked_provider",w0="faas.invoked_region",B0="net.transport",G0="net.peer.ip",k0="net.peer.port",H0="net.peer.name",Y0="net.host.ip",F0="net.host.port",K0="net.host.name",q0="net.host.connection.type",W0="net.host.connection.subtype",j0="net.host.carrier.name",z0="net.host.carrier.mcc",X0="net.host.carrier.mnc",$0="net.host.carrier.icc",J0="peer.service",Q0="enduser.id",Z0="enduser.role",eV="enduser.scope",tV="thread.id",rV="thread.name",nV="code.function",oV="code.namespace",iV="code.filepath",aV="code.lineno",sV="http.method",lV="http.url",cV="http.target",uV="http.host",EV="http.scheme",_V="http.status_code",TV="http.flavor",SV="http.user_agent",pV="http.request_content_length",dV="http.request_content_length_uncompressed",fV="http.response_content_length",AV="http.response_content_length_uncompressed",hV="http.server_name",vV="http.route",RV="http.client_ip",mV="aws.dynamodb.table_names",OV="aws.dynamodb.consumed_capacity",NV="aws.dynamodb.item_collection_metrics",MV="aws.dynamodb.provisioned_read_capacity",PV="aws.dynamodb.provisioned_write_capacity",CV="aws.dynamodb.consistent_read",gV="aws.dynamodb.projection",LV="aws.dynamodb.limit",IV="aws.dynamodb.attributes_to_get",yV="aws.dynamodb.index_name",DV="aws.dynamodb.select",xV="aws.dynamodb.global_secondary_indexes",UV="aws.dynamodb.local_secondary_indexes",bV="aws.dynamodb.exclusive_start_table",VV="aws.dynamodb.table_count",wV="aws.dynamodb.scan_forward",BV="aws.dynamodb.segment",GV="aws.dynamodb.total_segments",kV="aws.dynamodb.count",HV="aws.dynamodb.scanned_count",YV="aws.dynamodb.attribute_definitions",FV="aws.dynamodb.global_secondary_index_updates",KV="messaging.system",qV="messaging.destination",WV="messaging.destination_kind",jV="messaging.temp_destination",zV="messaging.protocol",XV="messaging.protocol_version",$V="messaging.url",JV="messaging.message_id",QV="messaging.conversation_id",ZV="messaging.message_payload_size_bytes",ew="messaging.message_payload_compressed_size_bytes",tw="messaging.operation",rw="messaging.consumer_id",nw="messaging.rabbitmq.routing_key",ow="messaging.kafka.message_key",iw="messaging.kafka.consumer_group",aw="messaging.kafka.client_id",sw="messaging.kafka.partition",lw="messaging.kafka.tombstone",cw="rpc.system",uw="rpc.service",Ew="rpc.method",_w="rpc.grpc.status_code",Tw="rpc.jsonrpc.version",Sw="rpc.jsonrpc.request_id",pw="rpc.jsonrpc.error_code",dw="rpc.jsonrpc.error_message",fw="message.type",Aw="message.id",hw="message.compressed_size",vw="message.uncompressed_size",R7=t0,m7=r0,O7=n0,N7=o0,M7=i0,P7=a0,C7=s0,g7=l0,L7=c0,I7=u0,y7=E0,D7=_0,x7=T0,U7=S0,b7=p0,V7=d0,w7=f0,B7=A0,G7=h0,k7=v0,H7=R0,Y7=m0,F7=O0,K7=N0,q7=M0,W7=P0,j7=C0,z7=g0,X7=L0,$7=I0,J7=y0,Q7=D0,Z7=x0,e9=U0,t9=b0,r9=V0,n9=w0,o9=B0,i9=G0,a9=k0,s9=H0,l9=Y0,c9=F0,u9=K0,E9=q0,_9=W0,T9=j0,S9=z0,p9=X0,d9=$0,f9=J0,A9=Q0,h9=Z0,v9=eV,R9=tV,m9=rV,O9=nV,N9=oV,M9=iV,P9=aV,C9=sV,g9=lV,L9=cV,I9=uV,y9=EV,D9=_V,x9=TV,U9=SV,b9=pV,V9=dV,w9=fV,B9=AV,G9=hV,k9=vV,H9=RV,Y9=mV,F9=OV,K9=NV,q9=MV,W9=PV,j9=CV,z9=gV,X9=LV,$9=IV,J9=yV,Q9=DV,Z9=xV,eZ=UV,tZ=bV,rZ=VV,nZ=wV,oZ=BV,iZ=GV,aZ=kV,sZ=HV,lZ=YV,cZ=FV,uZ=KV,EZ=qV,_Z=WV,TZ=jV,SZ=zV,pZ=XV,dZ=$V,fZ=JV,AZ=QV,hZ=ZV,vZ=ew,RZ=tw,mZ=rw,OZ=nw,NZ=ow,MZ=iw,PZ=aw,CZ=sw,gZ=lw,LZ=cw,IZ=uw,yZ=Ew,DZ=_w,xZ=Tw,UZ=Sw,bZ=pw,VZ=dw,wZ=fw,BZ=Aw,GZ=hw,kZ=vw,HZ=Be([t0,r0,n0,o0,i0,a0,s0,l0,c0,u0,E0,_0,T0,S0,p0,d0,f0,A0,h0,v0,R0,m0,O0,N0,M0,P0,C0,g0,L0,I0,y0,D0,x0,U0,b0,V0,w0,B0,G0,k0,H0,Y0,F0,K0,q0,W0,j0,z0,X0,$0,J0,Q0,Z0,eV,tV,rV,nV,oV,iV,aV,sV,lV,cV,uV,EV,_V,TV,SV,pV,dV,fV,AV,hV,vV,RV,mV,OV,NV,MV,PV,CV,gV,LV,IV,yV,DV,xV,UV,bV,VV,wV,BV,GV,kV,HV,YV,FV,KV,qV,WV,jV,zV,XV,$V,JV,QV,ZV,ew,tw,rw,nw,ow,iw,aw,sw,lw,cw,uw,Ew,_w,Tw,Sw,pw,dw,fw,Aw,hw,vw]),Rw="other_sql",mw="mssql",Ow="mysql",Nw="oracle",Mw="db2",Pw="postgresql",Cw="redshift",gw="hive",Lw="cloudscape",Iw="hsqldb",yw="progress",Dw="maxdb",xw="hanadb",Uw="ingres",bw="firstsql",Vw="edb",ww="cache",Bw="adabas",Gw="firebird",kw="derby",Hw="filemaker",Yw="informix",Fw="instantdb",Kw="interbase",qw="mariadb",Ww="netezza",jw="pervasive",zw="pointbase",Xw="sqlite",$w="sybase",Jw="teradata",Qw="vertica",Zw="h2",e1="coldfusion",t1="cassandra",r1="hbase",n1="mongodb",o1="redis",i1="couchbase",a1="couchdb",s1="cosmosdb",l1="dynamodb",c1="neo4j",u1="geode",E1="elasticsearch",_1="memcached",T1="cockroachdb",YZ=Rw,FZ=mw,KZ=Ow,qZ=Nw,WZ=Mw,jZ=Pw,zZ=Cw,XZ=gw,$Z=Lw,JZ=Iw,QZ=yw,ZZ=Dw,eee=xw,tee=Uw,ree=bw,nee=Vw,oee=ww,iee=Bw,aee=Gw,see=kw,lee=Hw,cee=Yw,uee=Fw,Eee=Kw,_ee=qw,Tee=Ww,See=jw,pee=zw,dee=Xw,fee=$w,Aee=Jw,hee=Qw,vee=Zw,Ree=e1,mee=t1,Oee=r1,Nee=n1,Mee=o1,Pee=i1,Cee=a1,gee=s1,Lee=l1,Iee=c1,yee=u1,Dee=E1,xee=_1,Uee=T1,bee=Be([Rw,mw,Ow,Nw,Mw,Pw,Cw,gw,Lw,Iw,yw,Dw,xw,Uw,bw,Vw,ww,Bw,Gw,kw,Hw,Yw,Fw,Kw,qw,Ww,jw,zw,Xw,$w,Jw,Qw,Zw,e1,t1,r1,n1,o1,i1,a1,s1,l1,c1,u1,E1,_1,T1]),S1="all",p1="each_quorum",d1="quorum",f1="local_quorum",A1="one",h1="two",v1="three",R1="local_one",m1="any",O1="serial",N1="local_serial",Vee=S1,wee=p1,Bee=d1,Gee=f1,kee=A1,Hee=h1,Yee=v1,Fee=R1,Kee=m1,qee=O1,Wee=N1,jee=Be([S1,p1,d1,f1,A1,h1,v1,R1,m1,O1,N1]),M1="datasource",P1="http",C1="pubsub",g1="timer",L1="other",zee=M1,Xee=P1,$ee=C1,Jee=g1,Qee=L1,Zee=Be([M1,P1,C1,g1,L1]),I1="insert",y1="edit",D1="delete",ete=I1,tte=y1,rte=D1,nte=Be([I1,y1,D1]),x1="alibaba_cloud",U1="aws",b1="azure",V1="gcp",ote=x1,ite=U1,ate=b1,ste=V1,lte=Be([x1,U1,b1,V1]),w1="ip_tcp",B1="ip_udp",G1="ip",k1="unix",H1="pipe",Y1="inproc",F1="other",cte=w1,ute=B1,Ete=G1,_te=k1,Tte=H1,Ste=Y1,pte=F1,dte=Be([w1,B1,G1,k1,H1,Y1,F1]),K1="wifi",q1="wired",W1="cell",j1="unavailable",z1="unknown",fte=K1,Ate=q1,hte=W1,vte=j1,Rte=z1,mte=Be([K1,q1,W1,j1,z1]),X1="gprs",$1="edge",J1="umts",Q1="cdma",Z1="evdo_0",eB="evdo_a",tB="cdma2000_1xrtt",rB="hsdpa",nB="hsupa",oB="hspa",iB="iden",aB="evdo_b",sB="lte",lB="ehrpd",cB="hspap",uB="gsm",EB="td_scdma",_B="iwlan",TB="nr",SB="nrnsa",pB="lte_ca",Ote=X1,Nte=$1,Mte=J1,Pte=Q1,Cte=Z1,gte=eB,Lte=tB,Ite=rB,yte=nB,Dte=oB,xte=iB,Ute=aB,bte=sB,Vte=lB,wte=cB,Bte=uB,Gte=EB,kte=_B,Hte=TB,Yte=SB,Fte=pB,Kte=Be([X1,$1,J1,Q1,Z1,eB,tB,rB,nB,oB,iB,aB,sB,lB,cB,uB,EB,_B,TB,SB,pB]),dB="1.0",fB="1.1",AB="2.0",hB="SPDY",vB="QUIC",qte=dB,Wte=fB,jte=AB,zte=hB,Xte=vB,$te={HTTP_1_0:dB,HTTP_1_1:fB,HTTP_2_0:AB,SPDY:hB,QUIC:vB},RB="queue",mB="topic",Jte=RB,Qte=mB,Zte=Be([RB,mB]),OB="receive",NB="process",ere=OB,tre=NB,rre=Be([OB,NB]),MB=0,PB=1,CB=2,gB=3,LB=4,IB=5,yB=6,DB=7,xB=8,UB=9,bB=10,VB=11,wB=12,BB=13,GB=14,kB=15,HB=16,nre=MB,ore=PB,ire=CB,are=gB,sre=LB,lre=IB,cre=yB,ure=DB,Ere=xB,_re=UB,Tre=bB,Sre=VB,pre=wB,dre=BB,fre=GB,Are=kB,hre=HB,vre={OK:MB,CANCELLED:PB,UNKNOWN:CB,INVALID_ARGUMENT:gB,DEADLINE_EXCEEDED:LB,NOT_FOUND:IB,ALREADY_EXISTS:yB,PERMISSION_DENIED:DB,RESOURCE_EXHAUSTED:xB,FAILED_PRECONDITION:UB,ABORTED:bB,OUT_OF_RANGE:VB,UNIMPLEMENTED:wB,INTERNAL:BB,UNAVAILABLE:GB,DATA_LOSS:kB,UNAUTHENTICATED:HB},YB="SENT",FB="RECEIVED",Rre=YB,mre=FB,Ore=Be([YB,FB])});var qB=S(()=>{KB()});var WB,jB,zB,XB,$B,JB,QB,ZB,eG,tG,rG,nG,oG,iG,aG,sG,lG,cG,uG,EG,_G,TG,SG,pG,dG,fG,AG,hG,vG,RG,mG,OG,NG,MG,PG,CG,gG,LG,IG,yG,DG,xG,UG,bG,VG,wG,BG,GG,kG,HG,YG,FG,KG,qG,WG,jG,zG,XG,$G,JG,QG,ZG,ek,tk,rk,nk,ok,ik,ak,sk,lk,ck,uk,Ek,_k,Tk,Sk,pk,dk,fk,Ak,Nre,Mre,Pre,Cre,gre,Lre,Ire,yre,Dre,xre,Ure,bre,Vre,wre,Bre,Gre,kre,Hre,Yre,Fre,Kre,qre,Wre,jre,zre,Xre,$re,Jre,Qre,Zre,ene,tne,rne,nne,one,ine,ane,sne,lne,cne,une,Ene,_ne,Tne,Sne,pne,dne,fne,Ane,hne,vne,Rne,mne,One,Nne,Mne,Pne,Cne,gne,Lne,Ine,yne,Dne,xne,Une,bne,Vne,wne,Bne,Gne,kne,Hne,Yne,Fne,Kne,qne,Wne,jne,zne,Xne,$ne,Jne,hk,vk,Rk,mk,Qne,Zne,eoe,toe,roe,Ok,Nk,Mk,Pk,Ck,gk,Lk,Ik,yk,Dk,xk,Uk,bk,Vk,wk,Bk,Gk,noe,ooe,ioe,aoe,soe,loe,coe,uoe,Eoe,_oe,Toe,Soe,poe,doe,foe,Aoe,hoe,voe,kk,Hk,Roe,moe,Ooe,Yk,Fk,Kk,qk,Wk,jk,zk,Noe,Moe,Poe,Coe,goe,Loe,Ioe,yoe,Xk,$k,Jk,Qk,Zk,eH,tH,rH,nH,oH,iH,Doe,xoe,Uoe,boe,Voe,woe,Boe,Goe,koe,Hoe,Yoe,Foe,aH,sH,lH,cH,uH,EH,_H,TH,SH,pH,Koe,qoe,Woe,joe,zoe,Xoe,$oe,Joe,Qoe,Zoe,eie,dH=S(()=>{oR();WB="cloud.provider",jB="cloud.account.id",zB="cloud.region",XB="cloud.availability_zone",$B="cloud.platform",JB="aws.ecs.container.arn",QB="aws.ecs.cluster.arn",ZB="aws.ecs.launchtype",eG="aws.ecs.task.arn",tG="aws.ecs.task.family",rG="aws.ecs.task.revision",nG="aws.eks.cluster.arn",oG="aws.log.group.names",iG="aws.log.group.arns",aG="aws.log.stream.names",sG="aws.log.stream.arns",lG="container.name",cG="container.id",uG="container.runtime",EG="container.image.name",_G="container.image.tag",TG="deployment.environment",SG="device.id",pG="device.model.identifier",dG="device.model.name",fG="faas.name",AG="faas.id",hG="faas.version",vG="faas.instance",RG="faas.max_memory",mG="host.id",OG="host.name",NG="host.type",MG="host.arch",PG="host.image.name",CG="host.image.id",gG="host.image.version",LG="k8s.cluster.name",IG="k8s.node.name",yG="k8s.node.uid",DG="k8s.namespace.name",xG="k8s.pod.uid",UG="k8s.pod.name",bG="k8s.container.name",VG="k8s.replicaset.uid",wG="k8s.replicaset.name",BG="k8s.deployment.uid",GG="k8s.deployment.name",kG="k8s.statefulset.uid",HG="k8s.statefulset.name",YG="k8s.daemonset.uid",FG="k8s.daemonset.name",KG="k8s.job.uid",qG="k8s.job.name",WG="k8s.cronjob.uid",jG="k8s.cronjob.name",zG="os.type",XG="os.description",$G="os.name",JG="os.version",QG="process.pid",ZG="process.executable.name",ek="process.executable.path",tk="process.command",rk="process.command_line",nk="process.command_args",ok="process.owner",ik="process.runtime.name",ak="process.runtime.version",sk="process.runtime.description",lk="service.name",ck="service.namespace",uk="service.instance.id",Ek="service.version",_k="telemetry.sdk.name",Tk="telemetry.sdk.language",Sk="telemetry.sdk.version",pk="telemetry.auto.version",dk="webengine.name",fk="webengine.version",Ak="webengine.description",Nre=WB,Mre=jB,Pre=zB,Cre=XB,gre=$B,Lre=JB,Ire=QB,yre=ZB,Dre=eG,xre=tG,Ure=rG,bre=nG,Vre=oG,wre=iG,Bre=aG,Gre=sG,kre=lG,Hre=cG,Yre=uG,Fre=EG,Kre=_G,qre=TG,Wre=SG,jre=pG,zre=dG,Xre=fG,$re=AG,Jre=hG,Qre=vG,Zre=RG,ene=mG,tne=OG,rne=NG,nne=MG,one=PG,ine=CG,ane=gG,sne=LG,lne=IG,cne=yG,une=DG,Ene=xG,_ne=UG,Tne=bG,Sne=VG,pne=wG,dne=BG,fne=GG,Ane=kG,hne=HG,vne=YG,Rne=FG,mne=KG,One=qG,Nne=WG,Mne=jG,Pne=zG,Cne=XG,gne=$G,Lne=JG,Ine=QG,yne=ZG,Dne=ek,xne=tk,Une=rk,bne=nk,Vne=ok,wne=ik,Bne=ak,Gne=sk,kne=lk,Hne=ck,Yne=uk,Fne=Ek,Kne=_k,qne=Tk,Wne=Sk,jne=pk,zne=dk,Xne=fk,$ne=Ak,Jne=Be([WB,jB,zB,XB,$B,JB,QB,ZB,eG,tG,rG,nG,oG,iG,aG,sG,lG,cG,uG,EG,_G,TG,SG,pG,dG,fG,AG,hG,vG,RG,mG,OG,NG,MG,PG,CG,gG,LG,IG,yG,DG,xG,UG,bG,VG,wG,BG,GG,kG,HG,YG,FG,KG,qG,WG,jG,zG,XG,$G,JG,QG,ZG,ek,tk,rk,nk,ok,ik,ak,sk,lk,ck,uk,Ek,_k,Tk,Sk,pk,dk,fk,Ak]),hk="alibaba_cloud",vk="aws",Rk="azure",mk="gcp",Qne=hk,Zne=vk,eoe=Rk,toe=mk,roe=Be([hk,vk,Rk,mk]),Ok="alibaba_cloud_ecs",Nk="alibaba_cloud_fc",Mk="aws_ec2",Pk="aws_ecs",Ck="aws_eks",gk="aws_lambda",Lk="aws_elastic_beanstalk",Ik="azure_vm",yk="azure_container_instances",Dk="azure_aks",xk="azure_functions",Uk="azure_app_service",bk="gcp_compute_engine",Vk="gcp_cloud_run",wk="gcp_kubernetes_engine",Bk="gcp_cloud_functions",Gk="gcp_app_engine",noe=Ok,ooe=Nk,ioe=Mk,aoe=Pk,soe=Ck,loe=gk,coe=Lk,uoe=Ik,Eoe=yk,_oe=Dk,Toe=xk,Soe=Uk,poe=bk,doe=Vk,foe=wk,Aoe=Bk,hoe=Gk,voe=Be([Ok,Nk,Mk,Pk,Ck,gk,Lk,Ik,yk,Dk,xk,Uk,bk,Vk,wk,Bk,Gk]),kk="ec2",Hk="fargate",Roe=kk,moe=Hk,Ooe=Be([kk,Hk]),Yk="amd64",Fk="arm32",Kk="arm64",qk="ia64",Wk="ppc32",jk="ppc64",zk="x86",Noe=Yk,Moe=Fk,Poe=Kk,Coe=qk,goe=Wk,Loe=jk,Ioe=zk,yoe=Be([Yk,Fk,Kk,qk,Wk,jk,zk]),Xk="windows",$k="linux",Jk="darwin",Qk="freebsd",Zk="netbsd",eH="openbsd",tH="dragonflybsd",rH="hpux",nH="aix",oH="solaris",iH="z_os",Doe=Xk,xoe=$k,Uoe=Jk,boe=Qk,Voe=Zk,woe=eH,Boe=tH,Goe=rH,koe=nH,Hoe=oH,Yoe=iH,Foe=Be([Xk,$k,Jk,Qk,Zk,eH,tH,rH,nH,oH,iH]),aH="cpp",sH="dotnet",lH="erlang",cH="go",uH="java",EH="nodejs",_H="php",TH="python",SH="ruby",pH="webjs",Koe=aH,qoe=sH,Woe=lH,joe=cH,zoe=uH,Xoe=EH,$oe=_H,Joe=TH,Qoe=SH,Zoe=pH,eie=Be([aH,sH,lH,cH,uH,EH,_H,TH,SH,pH])});var fH=S(()=>{dH()});var tie,rie,nie,oie,iie,aie,sie,lie,cie,uie,Eie,_ie,Tie,Sie,pie,die,fie,Aie,hie,vie,Rie,mie,Oie,Nie,Mie,Pie,Cie,gie,Lie,Iie,yie,Die,xie,Uie,bie,Vie,wie,Bie,Gie,kie,Hie,Yie,Fie,Kie,qie,Wie,jie,zie,Xie,$ie,Jie,Qie,Zie,eae,tae,rae,nae,oae,iae,aae,sae,lae,cae,uae,Eae,_ae,Tae,Sae,pae,dae,fae,Aae,hae,vae,Rae,mae,Oae,Nae,Mae,Pae,Cae,gae,Lae,Iae,yae,Dae,xae,Uae,bae,Vae,wae,Bae,Gae,kae,Hae,Yae,Fae,Kae,qae,Wae,jae,zae,Xae,$ae,Jae,Qae,Zae,ese,tse,rse,AH=S(()=>{tie="aspnetcore.rate_limiting.result",rie="acquired",nie="endpoint_limiter",oie="global_limiter",iie="request_canceled",aie="telemetry.sdk.language",sie="cpp",lie="dotnet",cie="erlang",uie="go",Eie="java",_ie="nodejs",Tie="php",Sie="python",pie="ruby",die="rust",fie="swift",Aie="webjs",hie="telemetry.sdk.name",vie="telemetry.sdk.version",Rie="aspnetcore.diagnostics.handler.type",mie="aspnetcore.diagnostics.exception.result",Oie="aborted",Nie="handled",Mie="skipped",Pie="unhandled",Cie="aspnetcore.rate_limiting.policy",gie="aspnetcore.request.is_unhandled",Lie="aspnetcore.routing.is_fallback",Iie="aspnetcore.routing.match_status",yie="failure",Die="success",xie="client.address",Uie="client.port",bie="error.type",Vie="_OTHER",wie="exception.escaped",Bie="exception.message",Gie="exception.stacktrace",kie="exception.type",Hie=function(o){return"http.request.header."+o},Yie="http.request.method",Fie="_OTHER",Kie="CONNECT",qie="DELETE",Wie="GET",jie="HEAD",zie="OPTIONS",Xie="PATCH",$ie="POST",Jie="PUT",Qie="TRACE",Zie="http.request.method_original",eae="http.request.resend_count",tae=function(o){return"http.response.header."+o},rae="http.response.status_code",nae="http.route",oae="jvm.gc.action",iae="jvm.gc.name",aae="jvm.memory.pool.name",sae="jvm.memory.type",lae="heap",cae="non_heap",uae="jvm.thread.daemon",Eae="jvm.thread.state",_ae="blocked",Tae="new",Sae="runnable",pae="terminated",dae="timed_waiting",fae="waiting",Aae="network.local.address",hae="network.local.port",vae="network.peer.address",Rae="network.peer.port",mae="network.protocol.name",Oae="network.protocol.version",Nae="network.transport",Mae="pipe",Pae="quic",Cae="tcp",gae="udp",Lae="unix",Iae="network.type",yae="ipv4",Dae="ipv6",xae="otel.scope.name",Uae="otel.scope.version",bae="otel.status_code",Vae="ERROR",wae="OK",Bae="otel.status_description",Gae="server.address",kae="server.port",Hae="service.name",Yae="service.version",Fae="signalr.connection.status",Kae="app_shutdown",qae="normal_closure",Wae="timeout",jae="signalr.transport",zae="long_polling",Xae="server_sent_events",$ae="web_sockets",Jae="url.fragment",Qae="url.full",Zae="url.path",ese="url.query",tse="url.scheme",rse="user_agent.original"});var nse,ose,ise,ase,sse,lse,cse,use,Ese,_se,Tse,Sse,pse,dse,fse,Ase,hse,vse,Rse,mse,Ose,Nse,Mse,Pse,Cse,gse,Lse,Ise,yse,Dse,xse,hH=S(()=>{nse="aspnetcore.diagnostics.exceptions",ose="aspnetcore.rate_limiting.active_request_leases",ise="aspnetcore.rate_limiting.queued_requests",ase="aspnetcore.rate_limiting.request.time_in_queue",sse="aspnetcore.rate_limiting.request_lease.duration",lse="aspnetcore.rate_limiting.requests",cse="aspnetcore.routing.match_attempts",use="http.client.request.duration",Ese="http.server.request.duration",_se="jvm.class.count",Tse="jvm.class.loaded",Sse="jvm.class.unloaded",pse="jvm.cpu.count",dse="jvm.cpu.recent_utilization",fse="jvm.cpu.time",Ase="jvm.gc.duration",hse="jvm.memory.committed",vse="jvm.memory.limit",Rse="jvm.memory.used",mse="jvm.memory.used_after_last_gc",Ose="jvm.thread.count",Nse="kestrel.active_connections",Mse="kestrel.active_tls_handshakes",Pse="kestrel.connection.duration",Cse="kestrel.queued_connections",gse="kestrel.queued_requests",Lse="kestrel.rejected_connections",Ise="kestrel.tls_handshake.duration",yse="kestrel.upgraded_connections",Dse="signalr.server.active_connections",xse="signalr.server.connection.duration"});var vH={};ge(vH,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>Oie,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>Nie,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>Mie,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>Pie,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>rie,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>nie,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>oie,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>iie,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>yie,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>Die,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>mie,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Rie,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Cie,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>tie,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>gie,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Lie,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>Iie,ATTR_CLIENT_ADDRESS:()=>xie,ATTR_CLIENT_PORT:()=>Uie,ATTR_ERROR_TYPE:()=>bie,ATTR_EXCEPTION_ESCAPED:()=>wie,ATTR_EXCEPTION_MESSAGE:()=>Bie,ATTR_EXCEPTION_STACKTRACE:()=>Gie,ATTR_EXCEPTION_TYPE:()=>kie,ATTR_HTTP_REQUEST_HEADER:()=>Hie,ATTR_HTTP_REQUEST_METHOD:()=>Yie,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>Zie,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>eae,ATTR_HTTP_RESPONSE_HEADER:()=>tae,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>rae,ATTR_HTTP_ROUTE:()=>nae,ATTR_JVM_GC_ACTION:()=>oae,ATTR_JVM_GC_NAME:()=>iae,ATTR_JVM_MEMORY_POOL_NAME:()=>aae,ATTR_JVM_MEMORY_TYPE:()=>sae,ATTR_JVM_THREAD_DAEMON:()=>uae,ATTR_JVM_THREAD_STATE:()=>Eae,ATTR_NETWORK_LOCAL_ADDRESS:()=>Aae,ATTR_NETWORK_LOCAL_PORT:()=>hae,ATTR_NETWORK_PEER_ADDRESS:()=>vae,ATTR_NETWORK_PEER_PORT:()=>Rae,ATTR_NETWORK_PROTOCOL_NAME:()=>mae,ATTR_NETWORK_PROTOCOL_VERSION:()=>Oae,ATTR_NETWORK_TRANSPORT:()=>Nae,ATTR_NETWORK_TYPE:()=>Iae,ATTR_OTEL_SCOPE_NAME:()=>xae,ATTR_OTEL_SCOPE_VERSION:()=>Uae,ATTR_OTEL_STATUS_CODE:()=>bae,ATTR_OTEL_STATUS_DESCRIPTION:()=>Bae,ATTR_SERVER_ADDRESS:()=>Gae,ATTR_SERVER_PORT:()=>kae,ATTR_SERVICE_NAME:()=>Hae,ATTR_SERVICE_VERSION:()=>Yae,ATTR_SIGNALR_CONNECTION_STATUS:()=>Fae,ATTR_SIGNALR_TRANSPORT:()=>jae,ATTR_TELEMETRY_SDK_LANGUAGE:()=>aie,ATTR_TELEMETRY_SDK_NAME:()=>hie,ATTR_TELEMETRY_SDK_VERSION:()=>vie,ATTR_URL_FRAGMENT:()=>Jae,ATTR_URL_FULL:()=>Qae,ATTR_URL_PATH:()=>Zae,ATTR_URL_QUERY:()=>ese,ATTR_URL_SCHEME:()=>tse,ATTR_USER_AGENT_ORIGINAL:()=>rse,AWSECSLAUNCHTYPEVALUES_EC2:()=>Roe,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>moe,AwsEcsLaunchtypeValues:()=>Ooe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>noe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>ooe,CLOUDPLATFORMVALUES_AWS_EC2:()=>ioe,CLOUDPLATFORMVALUES_AWS_ECS:()=>aoe,CLOUDPLATFORMVALUES_AWS_EKS:()=>soe,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>coe,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>loe,CLOUDPLATFORMVALUES_AZURE_AKS:()=>_oe,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Soe,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>Eoe,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>Toe,CLOUDPLATFORMVALUES_AZURE_VM:()=>uoe,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>hoe,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>Aoe,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>doe,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>poe,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>foe,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Qne,CLOUDPROVIDERVALUES_AWS:()=>Zne,CLOUDPROVIDERVALUES_AZURE:()=>eoe,CLOUDPROVIDERVALUES_GCP:()=>toe,CloudPlatformValues:()=>voe,CloudProviderValues:()=>roe,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>Vee,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>Kee,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>wee,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>Fee,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>Gee,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>Wee,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>kee,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>Bee,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>qee,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>Yee,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>Hee,DBSYSTEMVALUES_ADABAS:()=>iee,DBSYSTEMVALUES_CACHE:()=>oee,DBSYSTEMVALUES_CASSANDRA:()=>mee,DBSYSTEMVALUES_CLOUDSCAPE:()=>$Z,DBSYSTEMVALUES_COCKROACHDB:()=>Uee,DBSYSTEMVALUES_COLDFUSION:()=>Ree,DBSYSTEMVALUES_COSMOSDB:()=>gee,DBSYSTEMVALUES_COUCHBASE:()=>Pee,DBSYSTEMVALUES_COUCHDB:()=>Cee,DBSYSTEMVALUES_DB2:()=>WZ,DBSYSTEMVALUES_DERBY:()=>see,DBSYSTEMVALUES_DYNAMODB:()=>Lee,DBSYSTEMVALUES_EDB:()=>nee,DBSYSTEMVALUES_ELASTICSEARCH:()=>Dee,DBSYSTEMVALUES_FILEMAKER:()=>lee,DBSYSTEMVALUES_FIREBIRD:()=>aee,DBSYSTEMVALUES_FIRSTSQL:()=>ree,DBSYSTEMVALUES_GEODE:()=>yee,DBSYSTEMVALUES_H2:()=>vee,DBSYSTEMVALUES_HANADB:()=>eee,DBSYSTEMVALUES_HBASE:()=>Oee,DBSYSTEMVALUES_HIVE:()=>XZ,DBSYSTEMVALUES_HSQLDB:()=>JZ,DBSYSTEMVALUES_INFORMIX:()=>cee,DBSYSTEMVALUES_INGRES:()=>tee,DBSYSTEMVALUES_INSTANTDB:()=>uee,DBSYSTEMVALUES_INTERBASE:()=>Eee,DBSYSTEMVALUES_MARIADB:()=>_ee,DBSYSTEMVALUES_MAXDB:()=>ZZ,DBSYSTEMVALUES_MEMCACHED:()=>xee,DBSYSTEMVALUES_MONGODB:()=>Nee,DBSYSTEMVALUES_MSSQL:()=>FZ,DBSYSTEMVALUES_MYSQL:()=>KZ,DBSYSTEMVALUES_NEO4J:()=>Iee,DBSYSTEMVALUES_NETEZZA:()=>Tee,DBSYSTEMVALUES_ORACLE:()=>qZ,DBSYSTEMVALUES_OTHER_SQL:()=>YZ,DBSYSTEMVALUES_PERVASIVE:()=>See,DBSYSTEMVALUES_POINTBASE:()=>pee,DBSYSTEMVALUES_POSTGRESQL:()=>jZ,DBSYSTEMVALUES_PROGRESS:()=>QZ,DBSYSTEMVALUES_REDIS:()=>Mee,DBSYSTEMVALUES_REDSHIFT:()=>zZ,DBSYSTEMVALUES_SQLITE:()=>dee,DBSYSTEMVALUES_SYBASE:()=>fee,DBSYSTEMVALUES_TERADATA:()=>Aee,DBSYSTEMVALUES_VERTICA:()=>hee,DbCassandraConsistencyLevelValues:()=>jee,DbSystemValues:()=>bee,ERROR_TYPE_VALUE_OTHER:()=>Vie,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>rte,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>tte,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>ete,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>ote,FAASINVOKEDPROVIDERVALUES_AWS:()=>ite,FAASINVOKEDPROVIDERVALUES_AZURE:()=>ate,FAASINVOKEDPROVIDERVALUES_GCP:()=>ste,FAASTRIGGERVALUES_DATASOURCE:()=>zee,FAASTRIGGERVALUES_HTTP:()=>Xee,FAASTRIGGERVALUES_OTHER:()=>Qee,FAASTRIGGERVALUES_PUBSUB:()=>$ee,FAASTRIGGERVALUES_TIMER:()=>Jee,FaasDocumentOperationValues:()=>nte,FaasInvokedProviderValues:()=>lte,FaasTriggerValues:()=>Zee,HOSTARCHVALUES_AMD64:()=>Noe,HOSTARCHVALUES_ARM32:()=>Moe,HOSTARCHVALUES_ARM64:()=>Poe,HOSTARCHVALUES_IA64:()=>Coe,HOSTARCHVALUES_PPC32:()=>goe,HOSTARCHVALUES_PPC64:()=>Loe,HOSTARCHVALUES_X86:()=>Ioe,HTTPFLAVORVALUES_HTTP_1_0:()=>qte,HTTPFLAVORVALUES_HTTP_1_1:()=>Wte,HTTPFLAVORVALUES_HTTP_2_0:()=>jte,HTTPFLAVORVALUES_QUIC:()=>Xte,HTTPFLAVORVALUES_SPDY:()=>zte,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>Kie,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>qie,HTTP_REQUEST_METHOD_VALUE_GET:()=>Wie,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>jie,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>zie,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>Fie,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>Xie,HTTP_REQUEST_METHOD_VALUE_POST:()=>$ie,HTTP_REQUEST_METHOD_VALUE_PUT:()=>Jie,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>Qie,HostArchValues:()=>yoe,HttpFlavorValues:()=>$te,JVM_MEMORY_TYPE_VALUE_HEAP:()=>lae,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>cae,JVM_THREAD_STATE_VALUE_BLOCKED:()=>_ae,JVM_THREAD_STATE_VALUE_NEW:()=>Tae,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Sae,JVM_THREAD_STATE_VALUE_TERMINATED:()=>pae,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>dae,JVM_THREAD_STATE_VALUE_WAITING:()=>fae,MESSAGETYPEVALUES_RECEIVED:()=>mre,MESSAGETYPEVALUES_SENT:()=>Rre,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>Jte,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>Qte,MESSAGINGOPERATIONVALUES_PROCESS:()=>tre,MESSAGINGOPERATIONVALUES_RECEIVE:()=>ere,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>nse,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>ose,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>ise,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>lse,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>sse,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>ase,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>cse,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>use,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>Ese,METRIC_JVM_CLASS_COUNT:()=>_se,METRIC_JVM_CLASS_LOADED:()=>Tse,METRIC_JVM_CLASS_UNLOADED:()=>Sse,METRIC_JVM_CPU_COUNT:()=>pse,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>dse,METRIC_JVM_CPU_TIME:()=>fse,METRIC_JVM_GC_DURATION:()=>Ase,METRIC_JVM_MEMORY_COMMITTED:()=>hse,METRIC_JVM_MEMORY_LIMIT:()=>vse,METRIC_JVM_MEMORY_USED:()=>Rse,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>mse,METRIC_JVM_THREAD_COUNT:()=>Ose,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>Nse,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>Mse,METRIC_KESTREL_CONNECTION_DURATION:()=>Pse,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>Cse,METRIC_KESTREL_QUEUED_REQUESTS:()=>gse,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>Lse,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>Ise,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>yse,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>Dse,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>xse,MessageTypeValues:()=>Ore,MessagingDestinationKindValues:()=>Zte,MessagingOperationValues:()=>rre,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>Pte,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>Lte,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>Nte,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>Vte,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>Cte,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>gte,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>Ute,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>Ote,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>Bte,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>Ite,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>Dte,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>wte,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>yte,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>xte,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>kte,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>bte,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>Fte,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>Hte,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>Yte,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>Gte,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>Mte,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>hte,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>vte,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>Rte,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>fte,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>Ate,NETTRANSPORTVALUES_INPROC:()=>Ste,NETTRANSPORTVALUES_IP:()=>Ete,NETTRANSPORTVALUES_IP_TCP:()=>cte,NETTRANSPORTVALUES_IP_UDP:()=>ute,NETTRANSPORTVALUES_OTHER:()=>pte,NETTRANSPORTVALUES_PIPE:()=>Tte,NETTRANSPORTVALUES_UNIX:()=>_te,NETWORK_TRANSPORT_VALUE_PIPE:()=>Mae,NETWORK_TRANSPORT_VALUE_QUIC:()=>Pae,NETWORK_TRANSPORT_VALUE_TCP:()=>Cae,NETWORK_TRANSPORT_VALUE_UDP:()=>gae,NETWORK_TRANSPORT_VALUE_UNIX:()=>Lae,NETWORK_TYPE_VALUE_IPV4:()=>yae,NETWORK_TYPE_VALUE_IPV6:()=>Dae,NetHostConnectionSubtypeValues:()=>Kte,NetHostConnectionTypeValues:()=>mte,NetTransportValues:()=>dte,OSTYPEVALUES_AIX:()=>koe,OSTYPEVALUES_DARWIN:()=>Uoe,OSTYPEVALUES_DRAGONFLYBSD:()=>Boe,OSTYPEVALUES_FREEBSD:()=>boe,OSTYPEVALUES_HPUX:()=>Goe,OSTYPEVALUES_LINUX:()=>xoe,OSTYPEVALUES_NETBSD:()=>Voe,OSTYPEVALUES_OPENBSD:()=>woe,OSTYPEVALUES_SOLARIS:()=>Hoe,OSTYPEVALUES_WINDOWS:()=>Doe,OSTYPEVALUES_Z_OS:()=>Yoe,OTEL_STATUS_CODE_VALUE_ERROR:()=>Vae,OTEL_STATUS_CODE_VALUE_OK:()=>wae,OsTypeValues:()=>Foe,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>Tre,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>cre,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>ore,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>Are,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>sre,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>_re,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>dre,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>are,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>lre,RPCGRPCSTATUSCODEVALUES_OK:()=>nre,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>Sre,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>ure,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>Ere,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>hre,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>fre,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>pre,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>ire,RpcGrpcStatusCodeValues:()=>vre,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>$9,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>lZ,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>j9,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>F9,SEMATTRS_AWS_DYNAMODB_COUNT:()=>aZ,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>tZ,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>Z9,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>cZ,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>J9,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>K9,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>X9,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>eZ,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>z9,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>q9,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>W9,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>sZ,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>nZ,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>oZ,SEMATTRS_AWS_DYNAMODB_SELECT:()=>Q9,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>rZ,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>Y9,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>iZ,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>R7,SEMATTRS_CODE_FILEPATH:()=>M9,SEMATTRS_CODE_FUNCTION:()=>O9,SEMATTRS_CODE_LINENO:()=>P9,SEMATTRS_CODE_NAMESPACE:()=>N9,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>D7,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>w7,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>V7,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>U7,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>I7,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>y7,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>b7,SEMATTRS_DB_CASSANDRA_TABLE:()=>x7,SEMATTRS_DB_CONNECTION_STRING:()=>O7,SEMATTRS_DB_HBASE_NAMESPACE:()=>B7,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>M7,SEMATTRS_DB_MONGODB_COLLECTION:()=>k7,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>L7,SEMATTRS_DB_NAME:()=>P7,SEMATTRS_DB_OPERATION:()=>g7,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>G7,SEMATTRS_DB_SQL_TABLE:()=>H7,SEMATTRS_DB_STATEMENT:()=>C7,SEMATTRS_DB_SYSTEM:()=>m7,SEMATTRS_DB_USER:()=>N7,SEMATTRS_ENDUSER_ID:()=>A9,SEMATTRS_ENDUSER_ROLE:()=>h9,SEMATTRS_ENDUSER_SCOPE:()=>v9,SEMATTRS_EXCEPTION_ESCAPED:()=>q7,SEMATTRS_EXCEPTION_MESSAGE:()=>F7,SEMATTRS_EXCEPTION_STACKTRACE:()=>K7,SEMATTRS_EXCEPTION_TYPE:()=>Y7,SEMATTRS_FAAS_COLDSTART:()=>e9,SEMATTRS_FAAS_CRON:()=>Z7,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>z7,SEMATTRS_FAAS_DOCUMENT_NAME:()=>J7,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>X7,SEMATTRS_FAAS_DOCUMENT_TIME:()=>$7,SEMATTRS_FAAS_EXECUTION:()=>j7,SEMATTRS_FAAS_INVOKED_NAME:()=>t9,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>r9,SEMATTRS_FAAS_INVOKED_REGION:()=>n9,SEMATTRS_FAAS_TIME:()=>Q7,SEMATTRS_FAAS_TRIGGER:()=>W7,SEMATTRS_HTTP_CLIENT_IP:()=>H9,SEMATTRS_HTTP_FLAVOR:()=>x9,SEMATTRS_HTTP_HOST:()=>I9,SEMATTRS_HTTP_METHOD:()=>C9,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>b9,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>V9,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>w9,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>B9,SEMATTRS_HTTP_ROUTE:()=>k9,SEMATTRS_HTTP_SCHEME:()=>y9,SEMATTRS_HTTP_SERVER_NAME:()=>G9,SEMATTRS_HTTP_STATUS_CODE:()=>D9,SEMATTRS_HTTP_TARGET:()=>L9,SEMATTRS_HTTP_URL:()=>g9,SEMATTRS_HTTP_USER_AGENT:()=>U9,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>GZ,SEMATTRS_MESSAGE_ID:()=>BZ,SEMATTRS_MESSAGE_TYPE:()=>wZ,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>kZ,SEMATTRS_MESSAGING_CONSUMER_ID:()=>mZ,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>AZ,SEMATTRS_MESSAGING_DESTINATION:()=>EZ,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>_Z,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>PZ,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>MZ,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>NZ,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>CZ,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>gZ,SEMATTRS_MESSAGING_MESSAGE_ID:()=>fZ,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>vZ,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>hZ,SEMATTRS_MESSAGING_OPERATION:()=>RZ,SEMATTRS_MESSAGING_PROTOCOL:()=>SZ,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>pZ,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>OZ,SEMATTRS_MESSAGING_SYSTEM:()=>uZ,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>TZ,SEMATTRS_MESSAGING_URL:()=>dZ,SEMATTRS_NET_HOST_CARRIER_ICC:()=>d9,SEMATTRS_NET_HOST_CARRIER_MCC:()=>S9,SEMATTRS_NET_HOST_CARRIER_MNC:()=>p9,SEMATTRS_NET_HOST_CARRIER_NAME:()=>T9,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>_9,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>E9,SEMATTRS_NET_HOST_IP:()=>l9,SEMATTRS_NET_HOST_NAME:()=>u9,SEMATTRS_NET_HOST_PORT:()=>c9,SEMATTRS_NET_PEER_IP:()=>i9,SEMATTRS_NET_PEER_NAME:()=>s9,SEMATTRS_NET_PEER_PORT:()=>a9,SEMATTRS_NET_TRANSPORT:()=>o9,SEMATTRS_PEER_SERVICE:()=>f9,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>DZ,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>bZ,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>VZ,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>UZ,SEMATTRS_RPC_JSONRPC_VERSION:()=>xZ,SEMATTRS_RPC_METHOD:()=>yZ,SEMATTRS_RPC_SERVICE:()=>IZ,SEMATTRS_RPC_SYSTEM:()=>LZ,SEMATTRS_THREAD_ID:()=>R9,SEMATTRS_THREAD_NAME:()=>m9,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>Ire,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>Lre,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>yre,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>Dre,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>xre,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>Ure,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>bre,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>wre,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>Vre,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>Gre,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>Bre,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>Mre,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>Cre,SEMRESATTRS_CLOUD_PLATFORM:()=>gre,SEMRESATTRS_CLOUD_PROVIDER:()=>Nre,SEMRESATTRS_CLOUD_REGION:()=>Pre,SEMRESATTRS_CONTAINER_ID:()=>Hre,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>Fre,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>Kre,SEMRESATTRS_CONTAINER_NAME:()=>kre,SEMRESATTRS_CONTAINER_RUNTIME:()=>Yre,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>qre,SEMRESATTRS_DEVICE_ID:()=>Wre,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>jre,SEMRESATTRS_DEVICE_MODEL_NAME:()=>zre,SEMRESATTRS_FAAS_ID:()=>$re,SEMRESATTRS_FAAS_INSTANCE:()=>Qre,SEMRESATTRS_FAAS_MAX_MEMORY:()=>Zre,SEMRESATTRS_FAAS_NAME:()=>Xre,SEMRESATTRS_FAAS_VERSION:()=>Jre,SEMRESATTRS_HOST_ARCH:()=>nne,SEMRESATTRS_HOST_ID:()=>ene,SEMRESATTRS_HOST_IMAGE_ID:()=>ine,SEMRESATTRS_HOST_IMAGE_NAME:()=>one,SEMRESATTRS_HOST_IMAGE_VERSION:()=>ane,SEMRESATTRS_HOST_NAME:()=>tne,SEMRESATTRS_HOST_TYPE:()=>rne,SEMRESATTRS_K8S_CLUSTER_NAME:()=>sne,SEMRESATTRS_K8S_CONTAINER_NAME:()=>Tne,SEMRESATTRS_K8S_CRONJOB_NAME:()=>Mne,SEMRESATTRS_K8S_CRONJOB_UID:()=>Nne,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>Rne,SEMRESATTRS_K8S_DAEMONSET_UID:()=>vne,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>fne,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>dne,SEMRESATTRS_K8S_JOB_NAME:()=>One,SEMRESATTRS_K8S_JOB_UID:()=>mne,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>une,SEMRESATTRS_K8S_NODE_NAME:()=>lne,SEMRESATTRS_K8S_NODE_UID:()=>cne,SEMRESATTRS_K8S_POD_NAME:()=>_ne,SEMRESATTRS_K8S_POD_UID:()=>Ene,SEMRESATTRS_K8S_REPLICASET_NAME:()=>pne,SEMRESATTRS_K8S_REPLICASET_UID:()=>Sne,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>hne,SEMRESATTRS_K8S_STATEFULSET_UID:()=>Ane,SEMRESATTRS_OS_DESCRIPTION:()=>Cne,SEMRESATTRS_OS_NAME:()=>gne,SEMRESATTRS_OS_TYPE:()=>Pne,SEMRESATTRS_OS_VERSION:()=>Lne,SEMRESATTRS_PROCESS_COMMAND:()=>xne,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>bne,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>Une,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>yne,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>Dne,SEMRESATTRS_PROCESS_OWNER:()=>Vne,SEMRESATTRS_PROCESS_PID:()=>Ine,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>Gne,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>wne,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>Bne,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>Yne,SEMRESATTRS_SERVICE_NAME:()=>kne,SEMRESATTRS_SERVICE_NAMESPACE:()=>Hne,SEMRESATTRS_SERVICE_VERSION:()=>Fne,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>jne,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>qne,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>Kne,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Wne,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>$ne,SEMRESATTRS_WEBENGINE_NAME:()=>zne,SEMRESATTRS_WEBENGINE_VERSION:()=>Xne,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>Kae,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>qae,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Wae,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>zae,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>Xae,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>$ae,SemanticAttributes:()=>HZ,SemanticResourceAttributes:()=>Jne,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>Koe,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>qoe,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>Woe,TELEMETRYSDKLANGUAGEVALUES_GO:()=>joe,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>zoe,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>Xoe,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>$oe,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>Joe,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>Qoe,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>Zoe,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>sie,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>lie,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>cie,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>uie,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>Eie,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>_ie,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Tie,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>Sie,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>pie,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>die,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>fie,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Aie,TelemetrySdkLanguageValues:()=>eie});var RH=S(()=>{qB();fH();AH();hH()});var mH,OH=S(()=>{mH="0.53.0"});var NH,Use,bse,rs,MH=S(()=>{K();un();zn();OH();NH="v1/traces",Use=`http://localhost:4318/${NH}`,bse={"User-Agent":`OTel-OTLP-Exporter-JavaScript/${mH}`},rs=class extends bt{constructor(e={}){super(e,__,Object.assign(Object.assign(Object.assign(Object.assign({},Dt.parseKeyPairsIntoRecord(Z().OTEL_EXPORTER_OTLP_TRACES_HEADERS)),$t(e==null?void 0:e.headers)),bse),{"Content-Type":"application/x-protobuf"}))}getDefaultUrl(e){if(typeof e.url=="string")return e.url;let t=Z();return t.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length>0?Dr(t.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT):t.OTEL_EXPORTER_OTLP_ENDPOINT.length>0?yr(t.OTEL_EXPORTER_OTLP_ENDPOINT,NH):Use}}});var PH=S(()=>{MH()});var CH=S(()=>{PH()});var gH={};ge(gH,{OTLPTraceExporter:()=>rs});var LH=S(()=>{CH()});var IH,yH=S(()=>{IH="0.53.0"});var DH,Vse,wse,iR,xH=S(()=>{K();un();un();yH();zn();DH="v1/traces",Vse=`http://localhost:4318/${DH}`,wse={"User-Agent":`OTel-OTLP-Exporter-JavaScript/${IH}`},iR=class extends bt{constructor(e={}){super(e,T_,Object.assign(Object.assign(Object.assign(Object.assign({},Dt.parseKeyPairsIntoRecord(Z().OTEL_EXPORTER_OTLP_TRACES_HEADERS)),$t(e==null?void 0:e.headers)),wse),{"Content-Type":"application/json"}))}getDefaultUrl(e){if(typeof e.url=="string")return e.url;let t=Z();return t.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length>0?Dr(t.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT):t.OTEL_EXPORTER_OTLP_ENDPOINT.length>0?yr(t.OTEL_EXPORTER_OTLP_ENDPOINT,DH):Vse}}});var UH=S(()=>{xH()});var bH=S(()=>{UH()});var VH={};ge(VH,{OTLPTraceExporter:()=>iR});var wH=S(()=>{bH()});var BH=A(aS=>{"use strict";Object.defineProperty(aS,"__esModule",{value:!0});aS.VERSION=void 0;aS.VERSION="0.53.0"});var GH=A(lS=>{"use strict";Object.defineProperty(lS,"__esModule",{value:!0});lS.OTLPTraceExporter=void 0;var sS=(K(),$(yn)),aR=tR(),Bse=(zn(),$(Lf)),Gse=BH(),kse={"User-Agent":`OTel-OTLP-Exporter-JavaScript/${Gse.VERSION}`},sR=class extends aR.OTLPGRPCExporterNodeBase{constructor(e={}){let t=Object.assign(Object.assign({},kse),sS.baggageUtils.parseKeyPairsIntoRecord((0,sS.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS));super(e,t,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export",Bse.ProtobufTraceSerializer)}getDefaultUrl(e){return(0,aR.validateAndNormalizeUrl)(this.getUrlFromConfig(e))}getUrlFromConfig(e){return typeof e.url=="string"?e.url:(0,sS.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||(0,sS.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT||aR.DEFAULT_COLLECTOR_URL}};lS.OTLPTraceExporter=sR});var kH=A(ri=>{"use strict";var Hse=ri&&ri.__createBinding||(Object.create?function(o,e,t,i){i===void 0&&(i=t),Object.defineProperty(o,i,{enumerable:!0,get:function(){return e[t]}})}:function(o,e,t,i){i===void 0&&(i=t),o[i]=e[t]}),Yse=ri&&ri.__exportStar||function(o,e){for(var t in o)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Hse(e,o,t)};Object.defineProperty(ri,"__esModule",{value:!0});Yse(GH(),ri)});import*as Fse from"http";import*as Kse from"https";import*as HH from"url";function ni(o,e){let t=HH.parse(o),i=Object.assign({method:"POST",headers:Object.assign({"Content-Type":"application/json"},e)},t);return function(s,n){if(s.length===0)return m.debug("Zipkin send with empty spans"),n({code:te.SUCCESS});let{request:r}=i.protocol==="http:"?Fse:Kse,l=r(i,u=>{let E="";u.on("data",d=>{E+=d}),u.on("end",()=>{let d=u.statusCode||0;return m.debug(`Zipkin response status code: ${d}, body: ${E}`),d<400?n({code:te.SUCCESS}):n({code:te.FAILED,error:new Error(`Got unexpected status code from zipkin: ${d}`)})})});l.on("error",u=>n({code:te.FAILED,error:u}));let c=JSON.stringify(s);m.debug(`Zipkin request payload: ${c}`),l.write(c,"utf8"),l.end()}}var YH=S(()=>{x();K()});var FH=S(()=>{YH()});var lR=S(()=>{FH()});var oi,KH=S(()=>{(function(o){o.CLIENT="CLIENT",o.SERVER="SERVER",o.CONSUMER="CONSUMER",o.PRODUCER="PRODUCER"})(oi||(oi={}))});function jH(o,e,t,i){return{traceId:o.spanContext().traceId,parentId:o.parentSpanId,name:o.name,id:o.spanContext().spanId,kind:Wse[o.kind],timestamp:ct(o.startTime),duration:Math.round(ct(o.duration)),localEndpoint:{serviceName:e},tags:jse(o,t,i),annotations:o.events.length?zse(o.events):void 0}}function jse({attributes:o,resource:e,status:t,droppedAttributesCount:i,droppedEventsCount:a,droppedLinksCount:s},n,r){let l={};for(let c of Object.keys(o))l[c]=String(o[c]);return t.code!==Mr.UNSET&&(l[n]=String(Mr[t.code])),t.code===Mr.ERROR&&t.message&&(l[r]=t.message),i&&(l["otel.dropped_attributes_count"]=String(i)),a&&(l["otel.dropped_events_count"]=String(a)),s&&(l["otel.dropped_links_count"]=String(s)),Object.keys(e.attributes).forEach(c=>l[c]=String(e.attributes[c])),l}function zse(o){return o.map(e=>({timestamp:Math.round(ct(e.time)),value:e.name}))}var Wse,qH,WH,zH=S(()=>{x();K();KH();Wse={[Ft.CLIENT]:oi.CLIENT,[Ft.SERVER]:oi.SERVER,[Ft.CONSUMER]:oi.CONSUMER,[Ft.PRODUCER]:oi.PRODUCER,[Ft.INTERNAL]:void 0},qH="otel.status_code",WH="error"});var XH=S(()=>{});var $H=S(()=>{XH()});var Xse,cS,JH=S(()=>{Xse="service.name",cS=Xse});var QH=S(()=>{JH()});var ZH=S(()=>{});var eY=S(()=>{});var tY=S(()=>{$H();QH();ZH();eY()});function rY(o){return function(){return o()}}var nY=S(()=>{});var uS,oY=S(()=>{x();K();lR();zH();tY();nY();uS=class{constructor(e={}){this.DEFAULT_SERVICE_NAME="OpenTelemetry Service",this._sendingPromises=[],this._urlStr=e.url||Z().OTEL_EXPORTER_ZIPKIN_ENDPOINT,this._send=ni(this._urlStr,e.headers),this._serviceName=e.serviceName,this._statusCodeTagName=e.statusCodeTagName||qH,this._statusDescriptionTagName=e.statusDescriptionTagName||WH,this._isShutdown=!1,typeof e.getExportRequestHeaders=="function"?this._getHeaders=rY(e.getExportRequestHeaders):this._beforeSend=function(){}}export(e,t){let i=String(this._serviceName||e[0].resource.attributes[cS]||this.DEFAULT_SERVICE_NAME);if(m.debug("Zipkin exporter export"),this._isShutdown){setTimeout(()=>t({code:te.FAILED,error:new Error("Exporter has been shutdown")}));return}let a=new Promise(n=>{this._sendSpans(e,i,r=>{n(),t(r)})});this._sendingPromises.push(a);let s=()=>{let n=this._sendingPromises.indexOf(a);this._sendingPromises.splice(n,1)};a.then(s,s)}shutdown(){return m.debug("Zipkin exporter shutdown"),this._isShutdown=!0,this.forceFlush()}forceFlush(){return new Promise((e,t)=>{Promise.all(this._sendingPromises).then(()=>{e()},t)})}_beforeSend(){this._getHeaders&&(this._send=ni(this._urlStr,this._getHeaders()))}_sendSpans(e,t,i){let a=e.map(s=>jH(s,String(s.attributes[cS]||s.resource.attributes[cS]||t),this._statusCodeTagName,this._statusDescriptionTagName));return this._beforeSend(),this._send(a,s=>{if(i)return i(s)})}}});var iY={};ge(iY,{ZipkinExporter:()=>uS,prepareSend:()=>ni});var aY=S(()=>{lR();oY()});var cR=A(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.filterBlanksAndNulls=ns.getResourceDetectorsFromEnv=void 0;var $se=(x(),$(Ze)),ic=(Dn(),$($c)),Jse="env",Qse="host",Zse="os",ele="process",tle="serviceinstance";function rle(){var o,e;let t=new Map([[Jse,ic.envDetectorSync],[Qse,ic.hostDetectorSync],[Zse,ic.osDetectorSync],[tle,ic.serviceInstanceIdDetectorSync],[ele,ic.processDetectorSync]]),i=(e=(o=process.env.OTEL_NODE_RESOURCE_DETECTORS)===null||o===void 0?void 0:o.split(","))!==null&&e!==void 0?e:["all"];return i.includes("all")?[...t.values()].flat():i.includes("none")?[]:i.flatMap(a=>{let s=t.get(a);return s||$se.diag.error(`Invalid resource detector "${a}" specified in the environment variable OTEL_NODE_RESOURCE_DETECTORS`),s||[]})}ns.getResourceDetectorsFromEnv=rle;function nle(o){return o.map(e=>e.trim()).filter(e=>e!=="null"&&e!=="")}ns.filterBlanksAndNulls=nle});var lY=A(TS=>{"use strict";var uR;Object.defineProperty(TS,"__esModule",{value:!0});TS.TracerProviderWithEnvExporters=void 0;var os=(x(),$(Ze)),ES=(K(),$(yn)),_S=(Uo(),$(Qi)),ole=LE(),sY=(LH(),$(gH)),ile=(wH(),$(VH)),ale=kH(),sle=(aY(),$(iY)),lle=cR(),ac=class extends ole.NodeTracerProvider{constructor(e={}){super(e),this._configuredExporters=[],this._hasSpanProcessors=!1;let t=(0,lle.filterBlanksAndNulls)(Array.from(new Set((0,ES.getEnv)().OTEL_TRACES_EXPORTER.split(","))));t[0]==="none"?os.diag.warn('OTEL_TRACES_EXPORTER contains "none". SDK will not be initialized.'):t.length===0?(os.diag.warn("OTEL_TRACES_EXPORTER is empty. Using default otlp exporter."),t=["otlp"],this.createExportersFromList(t),this._spanProcessors=this.configureSpanProcessors(this._configuredExporters),this._spanProcessors.forEach(i=>{this.addSpanProcessor(i)})):(t.length>1&&t.includes("none")&&(os.diag.warn('OTEL_TRACES_EXPORTER contains "none" along with other exporters. Using default otlp exporter.'),t=["otlp"]),this.createExportersFromList(t),this._configuredExporters.length>0?(this._spanProcessors=this.configureSpanProcessors(this._configuredExporters),this._spanProcessors.forEach(i=>{this.addSpanProcessor(i)})):os.diag.warn("Unable to set up trace exporter(s) due to invalid exporter and/or protocol values."))}static configureOtlp(){let e=this.getOtlpProtocol();switch(e){case"grpc":return new ale.OTLPTraceExporter;case"http/json":return new ile.OTLPTraceExporter;case"http/protobuf":return new sY.OTLPTraceExporter;default:return os.diag.warn(`Unsupported OTLP traces protocol: ${e}. Using http/protobuf.`),new sY.OTLPTraceExporter}}static getOtlpProtocol(){var e,t,i;let a=(0,ES.getEnvWithoutDefaults)();return(i=(t=(e=a.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL)!==null&&e!==void 0?e:a.OTEL_EXPORTER_OTLP_PROTOCOL)!==null&&t!==void 0?t:(0,ES.getEnv)().OTEL_EXPORTER_OTLP_TRACES_PROTOCOL)!==null&&i!==void 0?i:(0,ES.getEnv)().OTEL_EXPORTER_OTLP_PROTOCOL}static configureJaeger(){try{let{JaegerExporter:e}=k("@opentelemetry/exporter-jaeger");return new e}catch(e){throw new Error(`Could not instantiate JaegerExporter. This could be due to the JaegerExporter's lack of support for bundling. If possible, use @opentelemetry/exporter-trace-otlp-proto instead. Original Error: ${e}`)}}addSpanProcessor(e){super.addSpanProcessor(e),this._hasSpanProcessors=!0}register(e){this._hasSpanProcessors&&super.register(e)}createExportersFromList(e){e.forEach(t=>{let i=this._getSpanExporter(t);i?this._configuredExporters.push(i):os.diag.warn(`Unrecognized OTEL_TRACES_EXPORTER value: ${t}.`)})}configureSpanProcessors(e){return e.map(t=>t instanceof _S.ConsoleSpanExporter?new _S.SimpleSpanProcessor(t):new _S.BatchSpanProcessor(t))}};TS.TracerProviderWithEnvExporters=ac;uR=ac;ac._registeredExporters=new Map([["otlp",()=>uR.configureOtlp()],["zipkin",()=>new sle.ZipkinExporter],["jaeger",()=>uR.configureJaeger()],["console",()=>new _S.ConsoleSpanExporter]])});var EY=A(SS=>{"use strict";Object.defineProperty(SS,"__esModule",{value:!0});SS.NodeSDK=void 0;var Qr=(x(),$(Ze)),cle=(Bs(),$(wN)),ule=(ZL(),$(QL)),is=(Dn(),$($c)),sc=(bp(),$(Up)),Ele=(wy(),$(Vy)),_le=Wb(),ER=(e0(),$(Zb)),Tle=(zu(),$(Zp)),Sle=(Uo(),$(Qi)),ple=LE(),dle=(RH(),$(vH)),fle=lY(),cY=(K(),$(yn)),uY=cR(),_R=class{constructor(e={}){var t,i,a,s,n,r;let l=(0,cY.getEnv)(),c=(0,cY.getEnvWithoutDefaults)();if(l.OTEL_SDK_DISABLED&&(this._disabled=!0),c.OTEL_LOG_LEVEL&&Qr.diag.setLogger(new Qr.DiagConsoleLogger,{logLevel:c.OTEL_LOG_LEVEL}),this._configuration=e,this._resource=(t=e.resource)!==null&&t!==void 0?t:new is.Resource({}),this._autoDetectResources=(i=e.autoDetectResources)!==null&&i!==void 0?i:!0,this._autoDetectResources?e.resourceDetectors!=null?this._resourceDetectors=e.resourceDetectors:process.env.OTEL_NODE_RESOURCE_DETECTORS!=null?this._resourceDetectors=(0,uY.getResourceDetectorsFromEnv)():this._resourceDetectors=[is.envDetector,is.processDetector,is.hostDetector]:this._resourceDetectors=[],this._serviceName=e.serviceName,e.traceExporter||e.spanProcessor||e.spanProcessors){let u={};e.sampler&&(u.sampler=e.sampler),e.spanLimits&&(u.spanLimits=e.spanLimits),e.idGenerator&&(u.idGenerator=e.idGenerator),e.spanProcessor&&Qr.diag.warn("The 'spanProcessor' option is deprecated. Please use 'spanProcessors' instead.");let E=(a=e.spanProcessor)!==null&&a!==void 0?a:new Sle.BatchSpanProcessor(e.traceExporter),d=(s=e.spanProcessors)!==null&&s!==void 0?s:[E];this._tracerProviderConfig={tracerConfig:u,spanProcessors:d,contextManager:e.contextManager,textMapPropagator:e.textMapPropagator}}if(e.logRecordProcessors?this._loggerProviderConfig={logRecordProcessors:e.logRecordProcessors}:e.logRecordProcessor?(this._loggerProviderConfig={logRecordProcessors:[e.logRecordProcessor]},Qr.diag.warn("The 'logRecordProcessor' option is deprecated. Please use 'logRecordProcessors' instead.")):this.configureLoggerProviderFromEnv(),e.metricReader||e.views){let u={};e.metricReader&&(u.reader=e.metricReader),e.views&&(u.views=e.views),this._meterProviderConfig=u}this._instrumentations=(r=(n=e.instrumentations)===null||n===void 0?void 0:n.flat())!==null&&r!==void 0?r:[]}start(){var e,t,i,a,s,n;if(this._disabled)return;if((0,ule.registerInstrumentations)({instrumentations:this._instrumentations}),this._autoDetectResources){let c={detectors:this._resourceDetectors};this._resource=this._resource.merge((0,is.detectResourcesSync)(c))}this._resource=this._serviceName===void 0?this._resource:this._resource.merge(new is.Resource({[dle.SEMRESATTRS_SERVICE_NAME]:this._serviceName}));let r=this._tracerProviderConfig?ple.NodeTracerProvider:fle.TracerProviderWithEnvExporters,l=new r(Object.assign(Object.assign({},this._configuration),{resource:this._resource}));if(this._tracerProvider=l,this._tracerProviderConfig)for(let c of this._tracerProviderConfig.spanProcessors)l.addSpanProcessor(c);if(l.register({contextManager:(t=(e=this._tracerProviderConfig)===null||e===void 0?void 0:e.contextManager)!==null&&t!==void 0?t:(i=this._configuration)===null||i===void 0?void 0:i.contextManager,propagator:(a=this._tracerProviderConfig)===null||a===void 0?void 0:a.textMapPropagator}),this._loggerProviderConfig){let c=new sc.LoggerProvider({resource:this._resource});for(let u of this._loggerProviderConfig.logRecordProcessors)c.addLogRecordProcessor(u);this._loggerProvider=c,cle.logs.setGlobalLoggerProvider(c)}if(this._meterProviderConfig){let c=[];this._meterProviderConfig.reader&&c.push(this._meterProviderConfig.reader);let u=new Tle.MeterProvider({resource:this._resource,views:(n=(s=this._meterProviderConfig)===null||s===void 0?void 0:s.views)!==null&&n!==void 0?n:[],readers:c});this._meterProvider=u,Qr.metrics.setGlobalMeterProvider(u);for(let E of this._instrumentations)E.setMeterProvider(Qr.metrics.getMeterProvider())}}shutdown(){let e=[];return this._tracerProvider&&e.push(this._tracerProvider.shutdown()),this._loggerProvider&&e.push(this._loggerProvider.shutdown()),this._meterProvider&&e.push(this._meterProvider.shutdown()),Promise.all(e).then(()=>{})}configureLoggerProviderFromEnv(){var e;let t=(e=process.env.OTEL_LOGS_EXPORTER)!==null&&e!==void 0?e:"",i=(0,uY.filterBlanksAndNulls)(t.split(","));if(i.length===0&&(Qr.diag.info("OTEL_LOGS_EXPORTER is empty. Using default otlp exporter."),i.push("otlp")),i.includes("none")){Qr.diag.info('OTEL_LOGS_EXPORTER contains "none". Logger provider will not be initialized.');return}let a=[];i.forEach(s=>{var n,r;if(s==="otlp"){let l=(r=(n=process.env.OTEL_EXPORTER_OTLP_LOGS_PROTOCOL)!==null&&n!==void 0?n:process.env.OTEL_EXPORTER_OTLP_PROTOCOL)===null||r===void 0?void 0:r.trim();switch(l){case"grpc":a.push(new _le.OTLPLogExporter);break;case"http/json":a.push(new Ele.OTLPLogExporter);break;case"http/protobuf":a.push(new ER.OTLPLogExporter);break;case void 0:case"":a.push(new ER.OTLPLogExporter);break;default:Qr.diag.warn(`Unsupported OTLP logs protocol: "${l}". Using http/protobuf.`),a.push(new ER.OTLPLogExporter)}}else s==="console"?a.push(new sc.ConsoleLogRecordExporter):Qr.diag.warn(`Unsupported OTEL_LOGS_EXPORTER value: "${s}". Supported values are: otlp, console, none.`)}),a.length>0&&(this._loggerProviderConfig={logRecordProcessors:a.map(s=>s instanceof sc.ConsoleLogRecordExporter?new sc.SimpleLogRecordProcessor(s):new sc.BatchLogRecordProcessor(s))})}};SS.NodeSDK=_R});var _Y=A(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.NodeSDK=He.tracing=He.resources=He.node=He.metrics=He.logs=He.core=He.contextBase=He.api=void 0;He.api=(x(),$(Ze));He.contextBase=(x(),$(Ze));He.core=(K(),$(yn));He.logs=(bp(),$(Up));He.metrics=(zu(),$(Zp));He.node=LE();He.resources=(Dn(),$($c));He.tracing=(Uo(),$(Qi));var Ale=EY();Object.defineProperty(He,"NodeSDK",{enumerable:!0,get:function(){return Ale.NodeSDK}})});x();Dn();var SY=Rn(_Y(),1);import{env as lc,version as hle}from"node:process";x();K();zn();var pS=class{#t;#e;constructor(){this.#t=new We(this.#r,this),this.#e=m.createComponentLogger({namespace:"netlify-span-exporter"})}convert(e){return qn(e,{useHex:!0,useLongBits:!1})}export(e,t){if(this.#e.debug(`export ${e.length} spans`),this.#t.isCalled){t({code:te.FAILED,error:new Error("Exporter has been shutdown")});return}return this.#n(e,t)}shutdown(){return this.#e.debug("Shutting down"),this.#t.call()}forceFlush(){return this.#e.debug("force flush"),Promise.resolve()}#r(){return this.forceFlush()}#n(e,t){if(console.log("__nfOTLPTrace",JSON.stringify(this.convert(e))),t)return t({code:te.SUCCESS})}};lc.NETLIFY_DEBUG_OPENTELEMETRY&&m.setLogger(new Sc,{logLevel:Oe.ALL,suppressOverrideMessage:!0});var TY,vle=new ce({"service.name":SERVICE_NAME??"lambda-function","service.version":SERVICE_VERSION,"process.runtime.name":"nodejs","process.runtime.version":hle.slice(1),"deployment.environment":(TY=lc.URL)!=null&&TY.includes("netlifystg.com")?"staging":"production","http.url":lc.URL,"netlify.site.id":lc.SITE_ID,"netlify.site.name":lc.SITE_NAME}),Rle=new SY.default.NodeSDK({resource:vle,traceExporter:new pS});Rle.start(); /*! Bundled license information: @grpc/proto-loader/build/src/util.js: (** * @license * Copyright 2018 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *) long/umd/index.js: (** * @license * Copyright 2009 The Closure Library Authors * Copyright 2020 Daniel Wirtz / The long.js Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * SPDX-License-Identifier: Apache-2.0 *) @grpc/proto-loader/build/src/index.js: (** * @license * Copyright 2018 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *) */
修改文件时间
将文件时间修改为当前时间的前一年
删除文件