var SERVICE_NAME = undefined; var SERVICE_VERSION = undefined; import{createRequire}from"module";const require=createRequire(import.meta.url); var sz=Object.create;var xu=Object.defineProperty;var az=Object.getOwnPropertyDescriptor;var lz=Object.getOwnPropertyNames;var cz=Object.getPrototypeOf,uz=Object.prototype.hasOwnProperty;var V=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')});var p=(r,e)=>()=>(r&&(e=r(r=0)),e);var T=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Ae=(r,e)=>{for(var t in e)xu(r,t,{get:e[t],enumerable:!0})},NR=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of lz(e))!uz.call(r,s)&&s!==t&&xu(r,s,{get:()=>e[s],enumerable:!(o=az(e,s))||o.enumerable});return r};var Nn=(r,e,t)=>(t=r!=null?sz(cz(r)):{},NR(e||!r||!r.__esModule?xu(t,"default",{value:r,enumerable:!0}):t,r)),ee=r=>NR(xu({},"__esModule",{value:!0}),r);var CR,PR=p(()=>{CR=typeof globalThis=="object"?globalThis:global});var IR=p(()=>{PR()});var bR=p(()=>{IR()});var cn,hm=p(()=>{cn="1.9.0"});function fz(r){var e=new Set([r]),t=new Set,o=r.match(LR);if(!o)return function(){return!1};var s={major:+o[1],minor:+o[2],patch:+o[3],prerelease:o[4]};if(s.prerelease!=null)return function(l){return l===r};function a(n){return t.add(n),!1}function i(n){return e.add(n),!0}return function(l){if(e.has(l))return!0;if(t.has(l))return!1;var c=l.match(LR);if(!c)return a(l);var u={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return u.prerelease!=null||s.major!==u.major?a(l):s.major===0?s.minor===u.minor&&s.patch<=u.patch?i(l):a(l):s.minor<=u.minor?i(l):a(l)}}var LR,xR,MR=p(()=>{hm();LR=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;xR=fz(cn)});function Ir(r,e,t,o){var s;o===void 0&&(o=!1);var a=Fa[Va]=(s=Fa[Va])!==null&&s!==void 0?s:{version:cn};if(!o&&a[r]){var i=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+r);return t.error(i.stack||i.message),!1}if(a.version!==cn){var i=new Error("@opentelemetry/api: Registration of version v"+a.version+" for "+r+" does not match previously registered API v"+cn);return t.error(i.stack||i.message),!1}return a[r]=e,t.debug("@opentelemetry/api: Registered a global for "+r+" v"+cn+"."),!0}function xt(r){var e,t,o=(e=Fa[Va])===null||e===void 0?void 0:e.version;if(!(!o||!xR(o)))return(t=Fa[Va])===null||t===void 0?void 0:t[r]}function br(r,e){e.debug("@opentelemetry/api: Unregistering a global for "+r+" v"+cn+".");var t=Fa[Va];t&&delete t[r]}var pz,Va,Fa,Ei=p(()=>{bR();hm();MR();pz=cn.split(".")[0],Va=Symbol.for("opentelemetry.js.api."+pz),Fa=CR});function Ga(r,e,t){var o=xt("diag");if(o)return t.unshift(e),o[r].apply(o,hz([],dz(t),!1))}var dz,hz,wR,DR=p(()=>{Ei();dz=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var o=t.call(r),s,a=[],i;try{for(;(e===void 0||e-- >0)&&!(s=o.next()).done;)a.push(s.value)}catch(n){i={error:n}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return a},hz=function(r,e,t){if(t||arguments.length===2)for(var o=0,s=e.length,a;o{(function(r){r[r.NONE=0]="NONE",r[r.ERROR=30]="ERROR",r[r.WARN=50]="WARN",r[r.INFO=60]="INFO",r[r.DEBUG=70]="DEBUG",r[r.VERBOSE=80]="VERBOSE",r[r.ALL=9999]="ALL"})(H||(H={}))});function UR(r,e){rH.ALL&&(r=H.ALL),e=e||{};function t(o,s){var a=e[o];return typeof a=="function"&&r>=s?a.bind(e):function(){}}return{error:t("error",H.ERROR),warn:t("warn",H.WARN),info:t("info",H.INFO),debug:t("debug",H.DEBUG),verbose:t("verbose",H.VERBOSE)}}var kR=p(()=>{Mu()});var _z,Ez,mz,ft,mi=p(()=>{DR();kR();Mu();Ei();_z=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var o=t.call(r),s,a=[],i;try{for(;(e===void 0||e-- >0)&&!(s=o.next()).done;)a.push(s.value)}catch(n){i={error:n}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return a},Ez=function(r,e,t){if(t||arguments.length===2)for(var o=0,s=e.length,a;o";u.warn("Current logger will be overwritten from "+_),f.warn("Current logger will overwrite one already registered from "+_)}return Ir("diag",f,t,!0)};t.setLogger=o,t.disable=function(){br(mz,t)},t.createComponentLogger=function(s){return new wR(s)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return r.instance=function(){return this._instance||(this._instance=new r),this._instance},r})()});var Tz,Sz,BR,VR=p(()=>{Tz=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var o=t.call(r),s,a=[],i;try{for(;(e===void 0||e-- >0)&&!(s=o.next()).done;)a.push(s.value)}catch(n){i={error:n}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return a},Sz=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],o=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&o>=r.length&&(r=void 0),{value:r&&r[o++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},BR=(function(){function r(e){this._entries=e?new Map(e):new Map}return r.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},r.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var t=Tz(e,2),o=t[0],s=t[1];return[o,s]})},r.prototype.setEntry=function(e,t){var o=new r(this._entries);return o._entries.set(e,t),o},r.prototype.removeEntry=function(e){var t=new r(this._entries);return t._entries.delete(e),t},r.prototype.removeEntries=function(){for(var e,t,o=[],s=0;s{FR=Symbol("BaggageEntryMetadata")});function HR(r){return r===void 0&&(r={}),new BR(new Map(Object.entries(r)))}function Lr(r){return typeof r!="string"&&(gz.error("Cannot create baggage metadata from unknown type: "+typeof r),r=""),{__TYPE__:FR,toString:function(){return r}}}var gz,_m=p(()=>{mi();VR();GR();gz=ft.instance()});function De(r){return Symbol.for(r)}var vz,wu,Ha=p(()=>{vz=(function(){function r(e){var t=this;t._currentContext=e?new Map(e):new Map,t.getValue=function(o){return t._currentContext.get(o)},t.setValue=function(o,s){var a=new r(t._currentContext);return a._currentContext.set(o,s),a},t.deleteValue=function(o){var s=new r(t._currentContext);return s._currentContext.delete(o),s}}return r})(),wu=new vz});var Em,Du,qR=p(()=>{Em=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],Du=(function(){function r(){function e(o){return function(){for(var s=[],a=0;a{Ti=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(o[a]=s[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}})(),yz=(function(){function r(){}return r.prototype.createGauge=function(e,t){return Lz},r.prototype.createHistogram=function(e,t){return xz},r.prototype.createCounter=function(e,t){return bz},r.prototype.createUpDownCounter=function(e,t){return Mz},r.prototype.createObservableGauge=function(e,t){return Dz},r.prototype.createObservableCounter=function(e,t){return wz},r.prototype.createObservableUpDownCounter=function(e,t){return Uz},r.prototype.addBatchObservableCallback=function(e,t){},r.prototype.removeBatchObservableCallback=function(e){},r})(),Uu=(function(){function r(){}return r})(),Oz=(function(r){Ti(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.add=function(t,o){},e})(Uu),Az=(function(r){Ti(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.add=function(t,o){},e})(Uu),Rz=(function(r){Ti(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.record=function(t,o){},e})(Uu),Nz=(function(r){Ti(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.record=function(t,o){},e})(Uu),mm=(function(){function r(){}return r.prototype.addCallback=function(e){},r.prototype.removeCallback=function(e){},r})(),Cz=(function(r){Ti(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(mm),Pz=(function(r){Ti(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(mm),Iz=(function(r){Ti(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(mm),Tm=new yz,bz=new Oz,Lz=new Rz,xz=new Nz,Mz=new Az,wz=new Cz,Dz=new Pz,Uz=new Iz});var Ot,jR=p(()=>{(function(r){r[r.INT=0]="INT",r[r.DOUBLE=1]="DOUBLE"})(Ot||(Ot={}))});var Bu,Vu,gm=p(()=>{Bu={get:function(r,e){if(r!=null)return r[e]},keys:function(r){return r==null?[]:Object.keys(r)}},Vu={set:function(r,e,t){r!=null&&(r[e]=t)}}});var kz,Bz,YR,zR=p(()=>{Ha();kz=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var o=t.call(r),s,a=[],i;try{for(;(e===void 0||e-- >0)&&!(s=o.next()).done;)a.push(s.value)}catch(n){i={error:n}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return a},Bz=function(r,e,t){if(t||arguments.length===2)for(var o=0,s=e.length,a;o{zR();Ei();mi();Vz=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var o=t.call(r),s,a=[],i;try{for(;(e===void 0||e-- >0)&&!(s=o.next()).done;)a.push(s.value)}catch(n){i={error:n}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return a},Fz=function(r,e,t){if(t||arguments.length===2)for(var o=0,s=e.length,a;o{(function(r){r[r.NONE=0]="NONE",r[r.SAMPLED=1]="SAMPLED"})(se||(se={}))});var ja,Ya,Uo,Fu=p(()=>{ym();ja="0000000000000000",Ya="00000000000000000000000000000000",Uo={traceId:Ya,spanId:ja,traceFlags:se.NONE}});var Pn,Gu=p(()=>{Fu();Pn=(function(){function r(e){e===void 0&&(e=Uo),this._spanContext=e}return r.prototype.spanContext=function(){return this._spanContext},r.prototype.setAttribute=function(e,t){return this},r.prototype.setAttributes=function(e){return this},r.prototype.addEvent=function(e,t){return this},r.prototype.addLink=function(e){return this},r.prototype.addLinks=function(e){return this},r.prototype.setStatus=function(e){return this},r.prototype.updateName=function(e){return this},r.prototype.end=function(e){},r.prototype.isRecording=function(){return!1},r.prototype.recordException=function(e,t){},r})()});function Hu(r){return r.getValue(Om)||void 0}function KR(){return Hu(Cn.getInstance().active())}function za(r,e){return r.setValue(Om,e)}function $R(r){return r.deleteValue(Om)}function XR(r,e){return za(r,new Pn(e))}function qu(r){var e;return(e=Hu(r))===null||e===void 0?void 0:e.spanContext()}var Om,Am=p(()=>{Ha();Gu();qa();Om=De("OpenTelemetry Context Key SPAN")});function Mt(r){return Hz.test(r)&&r!==Ya}function Si(r){return qz.test(r)&&r!==ja}function xe(r){return Mt(r.traceId)&&Si(r.spanId)}function WR(r){return new Pn(r)}var Hz,qz,ju=p(()=>{Fu();Gu();Hz=/^([0-9a-f]{32})$/i,qz=/^[0-9a-f]{16}$/i});function jz(r){return typeof r=="object"&&typeof r.spanId=="string"&&typeof r.traceId=="string"&&typeof r.traceFlags=="number"}var Rm,Yu,Nm=p(()=>{qa();Am();Gu();ju();Rm=Cn.getInstance(),Yu=(function(){function r(){}return r.prototype.startSpan=function(e,t,o){o===void 0&&(o=Rm.active());var s=!!(t!=null&&t.root);if(s)return new Pn;var a=o&&qu(o);return jz(a)&&xe(a)?new Pn(a):new Pn},r.prototype.startActiveSpan=function(e,t,o,s){var a,i,n;if(!(arguments.length<2)){arguments.length===2?n=t:arguments.length===3?(a=t,n=o):(a=t,i=o,n=s);var l=i??Rm.active(),c=this.startSpan(e,a,l),u=za(l,c);return Rm.with(u,n,void 0,c)}},r})()});var Yz,zu,Cm=p(()=>{Nm();Yz=new Yu,zu=(function(){function r(e,t,o,s){this._provider=e,this.name=t,this.version=o,this.options=s}return r.prototype.startSpan=function(e,t,o){return this._getTracer().startSpan(e,t,o)},r.prototype.startActiveSpan=function(e,t,o,s){var a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)},r.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Yz},r})()});var JR,QR=p(()=>{Nm();JR=(function(){function r(){}return r.prototype.getTracer=function(e,t,o){return new Yu},r})()});var zz,Ka,Pm=p(()=>{Cm();QR();zz=new JR,Ka=(function(){function r(){}return r.prototype.getTracer=function(e,t,o){var s;return(s=this.getDelegateTracer(e,t,o))!==null&&s!==void 0?s:new zu(this,e,t,o)},r.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:zz},r.prototype.setDelegate=function(e){this._delegate=e},r.prototype.getDelegateTracer=function(e,t,o){var s;return(s=this._delegate)===null||s===void 0?void 0:s.getTracer(e,t,o)},r})()});var ke,ZR=p(()=>{(function(r){r[r.NOT_RECORD=0]="NOT_RECORD",r[r.RECORD=1]="RECORD",r[r.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ke||(ke={}))});var qt,eN=p(()=>{(function(r){r[r.INTERNAL=0]="INTERNAL",r[r.SERVER=1]="SERVER",r[r.CLIENT=2]="CLIENT",r[r.PRODUCER=3]="PRODUCER",r[r.CONSUMER=4]="CONSUMER"})(qt||(qt={}))});var jt,tN=p(()=>{(function(r){r[r.UNSET=0]="UNSET",r[r.OK=1]="OK",r[r.ERROR=2]="ERROR"})(jt||(jt={}))});function rN(r){return Xz.test(r)}function nN(r){return Wz.test(r)&&!Jz.test(r)}var Im,Kz,$z,Xz,Wz,Jz,iN=p(()=>{Im="[_0-9a-z-*/]",Kz="[a-z]"+Im+"{0,255}",$z="[a-z0-9]"+Im+"{0,240}@[a-z]"+Im+"{0,13}",Xz=new RegExp("^(?:"+Kz+"|"+$z+")$"),Wz=/^[ -~]{0,255}[!-~]$/,Jz=/,|=/});var oN,Qz,sN,aN,lN,cN=p(()=>{iN();oN=32,Qz=512,sN=",",aN="=",lN=(function(){function r(e){this._internalState=new Map,e&&this._parse(e)}return r.prototype.set=function(e,t){var o=this._clone();return o._internalState.has(e)&&o._internalState.delete(e),o._internalState.set(e,t),o},r.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},r.prototype.get=function(e){return this._internalState.get(e)},r.prototype.serialize=function(){var e=this;return this._keys().reduce(function(t,o){return t.push(o+aN+e.get(o)),t},[]).join(sN)},r.prototype._parse=function(e){e.length>Qz||(this._internalState=e.split(sN).reverse().reduce(function(t,o){var s=o.trim(),a=s.indexOf(aN);if(a!==-1){var i=s.slice(0,a),n=s.slice(a+1,o.length);rN(i)&&nN(n)&&t.set(i,n)}return t},new Map),this._internalState.size>oN&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,oN))))},r.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},r.prototype._clone=function(){var e=new r;return e._internalState=new Map(this._internalState),e},r})()});function uN(r){return new lN(r)}var fN=p(()=>{cN()});var he,pN=p(()=>{qa();he=Cn.getInstance()});var S,dN=p(()=>{mi();S=ft.instance()});var Zz,hN,_N=p(()=>{Sm();Zz=(function(){function r(){}return r.prototype.getMeter=function(e,t,o){return Tm},r})(),hN=new Zz});var bm,EN,mN=p(()=>{_N();Ei();mi();bm="metrics",EN=(function(){function r(){}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalMeterProvider=function(e){return Ir(bm,e,ft.instance())},r.prototype.getMeterProvider=function(){return xt(bm)||hN},r.prototype.getMeter=function(e,t,o){return this.getMeterProvider().getMeter(e,t,o)},r.prototype.disable=function(){br(bm,ft.instance())},r})()});var gi,TN=p(()=>{mN();gi=EN.getInstance()});var SN,gN=p(()=>{SN=(function(){function r(){}return r.prototype.inject=function(e,t){},r.prototype.extract=function(e,t){return e},r.prototype.fields=function(){return[]},r})()});function xm(r){return r.getValue(Lm)||void 0}function vN(){return xm(Cn.getInstance().active())}function yN(r,e){return r.setValue(Lm,e)}function ON(r){return r.deleteValue(Lm)}var Lm,AN=p(()=>{qa();Ha();Lm=De("OpenTelemetry Baggage Key")});var Mm,eK,RN,NN=p(()=>{Ei();gN();gm();AN();_m();mi();Mm="propagation",eK=new SN,RN=(function(){function r(){this.createBaggage=HR,this.getBaggage=xm,this.getActiveBaggage=vN,this.setBaggage=yN,this.deleteBaggage=ON}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalPropagator=function(e){return Ir(Mm,e,ft.instance())},r.prototype.inject=function(e,t,o){return o===void 0&&(o=Vu),this._getGlobalPropagator().inject(e,t,o)},r.prototype.extract=function(e,t,o){return o===void 0&&(o=Bu),this._getGlobalPropagator().extract(e,t,o)},r.prototype.fields=function(){return this._getGlobalPropagator().fields()},r.prototype.disable=function(){br(Mm,ft.instance())},r.prototype._getGlobalPropagator=function(){return xt(Mm)||eK},r})()});var Ue,CN=p(()=>{NN();Ue=RN.getInstance()});var wm,PN,IN=p(()=>{Ei();Pm();ju();Am();mi();wm="trace",PN=(function(){function r(){this._proxyTracerProvider=new Ka,this.wrapSpanContext=WR,this.isSpanContextValid=xe,this.deleteSpan=$R,this.getSpan=Hu,this.getActiveSpan=KR,this.getSpanContext=qu,this.setSpan=za,this.setSpanContext=XR}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalTracerProvider=function(e){var t=Ir(wm,this._proxyTracerProvider,ft.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},r.prototype.getTracerProvider=function(){return xt(wm)||this._proxyTracerProvider},r.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},r.prototype.disable=function(){br(wm,ft.instance()),this._proxyTracerProvider=new Ka},r})()});var ie,bN=p(()=>{IN();ie=PN.getInstance()});var ot={};Ae(ot,{DiagConsoleLogger:()=>Du,DiagLogLevel:()=>H,INVALID_SPANID:()=>ja,INVALID_SPAN_CONTEXT:()=>Uo,INVALID_TRACEID:()=>Ya,ProxyTracer:()=>zu,ProxyTracerProvider:()=>Ka,ROOT_CONTEXT:()=>wu,SamplingDecision:()=>ke,SpanKind:()=>qt,SpanStatusCode:()=>jt,TraceFlags:()=>se,ValueType:()=>Ot,baggageEntryMetadataFromString:()=>Lr,context:()=>he,createContextKey:()=>De,createNoopMeter:()=>ku,createTraceState:()=>uN,default:()=>tK,defaultTextMapGetter:()=>Bu,defaultTextMapSetter:()=>Vu,diag:()=>S,isSpanContextValid:()=>xe,isValidSpanId:()=>Si,isValidTraceId:()=>Mt,metrics:()=>gi,propagation:()=>Ue,trace:()=>ie});var tK,P=p(()=>{_m();Ha();qR();Mu();Sm();jR();gm();Cm();Pm();ZR();eN();tN();ym();fN();ju();Fu();pN();dN();TN();CN();bN();tK={context:he,diag:S,metrics:gi,propagation:Ue,trace:ie}});function Be(r){for(var e={},t=r.length,o=0;o{});var MN,wN,DN,UN,kN,BN,VN,FN,GN,HN,qN,jN,YN,zN,KN,$N,XN,WN,JN,QN,ZN,eC,tC,rC,nC,iC,oC,sC,aC,lC,cC,uC,fC,pC,dC,hC,_C,EC,mC,TC,SC,gC,vC,yC,OC,AC,RC,NC,CC,PC,IC,bC,LC,xC,MC,wC,DC,UC,kC,BC,VC,FC,GC,HC,qC,jC,YC,zC,KC,$C,XC,WC,JC,QC,ZC,eP,tP,rP,nP,iP,oP,sP,aP,lP,cP,uP,fP,pP,dP,hP,_P,EP,mP,TP,SP,gP,vP,yP,OP,AP,RP,NP,CP,PP,IP,bP,LP,xP,MP,wP,DP,UP,kP,BP,VP,FP,GP,HP,qP,jP,YP,zP,KP,$P,XP,WP,JP,QP,rK,nK,iK,oK,sK,aK,lK,cK,uK,fK,pK,dK,hK,_K,EK,mK,TK,SK,gK,vK,yK,Xa,Wa,Um,OK,AK,RK,NK,CK,PK,IK,bK,LK,xK,MK,wK,DK,UK,kK,BK,VK,FK,GK,HK,qK,jK,YK,zK,KK,$K,XK,WK,JK,QK,ZK,e$,t$,r$,n$,i$,o$,s$,a$,l$,c$,u$,f$,p$,d$,h$,_$,E$,m$,T$,S$,g$,v$,y$,O$,A$,R$,N$,C$,P$,I$,b$,L$,x$,M$,w$,D$,U$,k$,B$,V$,F$,G$,H$,q$,j$,Y$,z$,K$,$$,X$,W$,J$,Q$,Z$,eX,tX,rX,nX,iX,oX,sX,aX,lX,cX,uX,fX,pX,dX,hX,_X,EX,mX,TX,SX,ZP,eI,tI,rI,nI,iI,oI,sI,aI,lI,cI,uI,fI,pI,dI,hI,_I,EI,mI,TI,SI,gI,vI,yI,OI,AI,RI,NI,CI,PI,II,bI,LI,xI,MI,wI,DI,UI,kI,BI,VI,FI,GI,HI,qI,jI,YI,gX,vX,yX,OX,AX,RX,NX,CX,PX,IX,bX,LX,xX,MX,wX,DX,UX,kX,BX,VX,FX,GX,HX,qX,jX,YX,zX,KX,$X,XX,WX,JX,QX,ZX,eW,tW,rW,nW,iW,oW,sW,aW,lW,cW,uW,fW,pW,dW,zI,KI,$I,XI,WI,JI,QI,ZI,eb,tb,rb,hW,_W,EW,mW,TW,SW,gW,vW,yW,OW,AW,RW,nb,ib,ob,sb,ab,NW,CW,PW,IW,bW,LW,lb,cb,ub,xW,MW,wW,DW,fb,pb,db,hb,UW,kW,BW,VW,FW,_b,Eb,mb,Tb,Sb,gb,vb,GW,HW,qW,jW,YW,zW,KW,$W,yb,Ob,Ab,Rb,Nb,XW,WW,JW,QW,ZW,e8,Cb,Pb,Ib,bb,Lb,xb,Mb,wb,Db,Ub,kb,Bb,Vb,Fb,Gb,Hb,qb,jb,Yb,zb,Kb,t8,r8,n8,i8,o8,s8,a8,l8,c8,u8,f8,p8,d8,h8,_8,E8,m8,T8,S8,g8,v8,y8,$b,Xb,Wb,Jb,Qb,O8,A8,R8,N8,C8,P8,Zb,eL,I8,b8,L8,tL,rL,x8,M8,w8,nL,iL,oL,sL,aL,lL,cL,uL,fL,pL,dL,hL,_L,EL,mL,TL,SL,D8,U8,k8,B8,V8,F8,G8,H8,q8,j8,Y8,z8,K8,$8,X8,W8,J8,Q8,gL,vL,Z8,e5,t5,yL=p(()=>{Dm();MN="aws.lambda.invoked_arn",wN="db.system",DN="db.connection_string",UN="db.user",kN="db.jdbc.driver_classname",BN="db.name",VN="db.statement",FN="db.operation",GN="db.mssql.instance_name",HN="db.cassandra.keyspace",qN="db.cassandra.page_size",jN="db.cassandra.consistency_level",YN="db.cassandra.table",zN="db.cassandra.idempotence",KN="db.cassandra.speculative_execution_count",$N="db.cassandra.coordinator.id",XN="db.cassandra.coordinator.dc",WN="db.hbase.namespace",JN="db.redis.database_index",QN="db.mongodb.collection",ZN="db.sql.table",eC="exception.type",tC="exception.message",rC="exception.stacktrace",nC="exception.escaped",iC="faas.trigger",oC="faas.execution",sC="faas.document.collection",aC="faas.document.operation",lC="faas.document.time",cC="faas.document.name",uC="faas.time",fC="faas.cron",pC="faas.coldstart",dC="faas.invoked_name",hC="faas.invoked_provider",_C="faas.invoked_region",EC="net.transport",mC="net.peer.ip",TC="net.peer.port",SC="net.peer.name",gC="net.host.ip",vC="net.host.port",yC="net.host.name",OC="net.host.connection.type",AC="net.host.connection.subtype",RC="net.host.carrier.name",NC="net.host.carrier.mcc",CC="net.host.carrier.mnc",PC="net.host.carrier.icc",IC="peer.service",bC="enduser.id",LC="enduser.role",xC="enduser.scope",MC="thread.id",wC="thread.name",DC="code.function",UC="code.namespace",kC="code.filepath",BC="code.lineno",VC="http.method",FC="http.url",GC="http.target",HC="http.host",qC="http.scheme",jC="http.status_code",YC="http.flavor",zC="http.user_agent",KC="http.request_content_length",$C="http.request_content_length_uncompressed",XC="http.response_content_length",WC="http.response_content_length_uncompressed",JC="http.server_name",QC="http.route",ZC="http.client_ip",eP="aws.dynamodb.table_names",tP="aws.dynamodb.consumed_capacity",rP="aws.dynamodb.item_collection_metrics",nP="aws.dynamodb.provisioned_read_capacity",iP="aws.dynamodb.provisioned_write_capacity",oP="aws.dynamodb.consistent_read",sP="aws.dynamodb.projection",aP="aws.dynamodb.limit",lP="aws.dynamodb.attributes_to_get",cP="aws.dynamodb.index_name",uP="aws.dynamodb.select",fP="aws.dynamodb.global_secondary_indexes",pP="aws.dynamodb.local_secondary_indexes",dP="aws.dynamodb.exclusive_start_table",hP="aws.dynamodb.table_count",_P="aws.dynamodb.scan_forward",EP="aws.dynamodb.segment",mP="aws.dynamodb.total_segments",TP="aws.dynamodb.count",SP="aws.dynamodb.scanned_count",gP="aws.dynamodb.attribute_definitions",vP="aws.dynamodb.global_secondary_index_updates",yP="messaging.system",OP="messaging.destination",AP="messaging.destination_kind",RP="messaging.temp_destination",NP="messaging.protocol",CP="messaging.protocol_version",PP="messaging.url",IP="messaging.message_id",bP="messaging.conversation_id",LP="messaging.message_payload_size_bytes",xP="messaging.message_payload_compressed_size_bytes",MP="messaging.operation",wP="messaging.consumer_id",DP="messaging.rabbitmq.routing_key",UP="messaging.kafka.message_key",kP="messaging.kafka.consumer_group",BP="messaging.kafka.client_id",VP="messaging.kafka.partition",FP="messaging.kafka.tombstone",GP="rpc.system",HP="rpc.service",qP="rpc.method",jP="rpc.grpc.status_code",YP="rpc.jsonrpc.version",zP="rpc.jsonrpc.request_id",KP="rpc.jsonrpc.error_code",$P="rpc.jsonrpc.error_message",XP="message.type",WP="message.id",JP="message.compressed_size",QP="message.uncompressed_size",rK=MN,nK=wN,iK=DN,oK=UN,sK=kN,aK=BN,lK=VN,cK=FN,uK=GN,fK=HN,pK=qN,dK=jN,hK=YN,_K=zN,EK=KN,mK=$N,TK=XN,SK=WN,gK=JN,vK=QN,yK=ZN,Xa=eC,Wa=tC,Um=rC,OK=nC,AK=iC,RK=oC,NK=sC,CK=aC,PK=lC,IK=cC,bK=uC,LK=fC,xK=pC,MK=dC,wK=hC,DK=_C,UK=EC,kK=mC,BK=TC,VK=SC,FK=gC,GK=vC,HK=yC,qK=OC,jK=AC,YK=RC,zK=NC,KK=CC,$K=PC,XK=IC,WK=bC,JK=LC,QK=xC,ZK=MC,e$=wC,t$=DC,r$=UC,n$=kC,i$=BC,o$=VC,s$=FC,a$=GC,l$=HC,c$=qC,u$=jC,f$=YC,p$=zC,d$=KC,h$=$C,_$=XC,E$=WC,m$=JC,T$=QC,S$=ZC,g$=eP,v$=tP,y$=rP,O$=nP,A$=iP,R$=oP,N$=sP,C$=aP,P$=lP,I$=cP,b$=uP,L$=fP,x$=pP,M$=dP,w$=hP,D$=_P,U$=EP,k$=mP,B$=TP,V$=SP,F$=gP,G$=vP,H$=yP,q$=OP,j$=AP,Y$=RP,z$=NP,K$=CP,$$=PP,X$=IP,W$=bP,J$=LP,Q$=xP,Z$=MP,eX=wP,tX=DP,rX=UP,nX=kP,iX=BP,oX=VP,sX=FP,aX=GP,lX=HP,cX=qP,uX=jP,fX=YP,pX=zP,dX=KP,hX=$P,_X=XP,EX=WP,mX=JP,TX=QP,SX=Be([MN,wN,DN,UN,kN,BN,VN,FN,GN,HN,qN,jN,YN,zN,KN,$N,XN,WN,JN,QN,ZN,eC,tC,rC,nC,iC,oC,sC,aC,lC,cC,uC,fC,pC,dC,hC,_C,EC,mC,TC,SC,gC,vC,yC,OC,AC,RC,NC,CC,PC,IC,bC,LC,xC,MC,wC,DC,UC,kC,BC,VC,FC,GC,HC,qC,jC,YC,zC,KC,$C,XC,WC,JC,QC,ZC,eP,tP,rP,nP,iP,oP,sP,aP,lP,cP,uP,fP,pP,dP,hP,_P,EP,mP,TP,SP,gP,vP,yP,OP,AP,RP,NP,CP,PP,IP,bP,LP,xP,MP,wP,DP,UP,kP,BP,VP,FP,GP,HP,qP,jP,YP,zP,KP,$P,XP,WP,JP,QP]),ZP="other_sql",eI="mssql",tI="mysql",rI="oracle",nI="db2",iI="postgresql",oI="redshift",sI="hive",aI="cloudscape",lI="hsqldb",cI="progress",uI="maxdb",fI="hanadb",pI="ingres",dI="firstsql",hI="edb",_I="cache",EI="adabas",mI="firebird",TI="derby",SI="filemaker",gI="informix",vI="instantdb",yI="interbase",OI="mariadb",AI="netezza",RI="pervasive",NI="pointbase",CI="sqlite",PI="sybase",II="teradata",bI="vertica",LI="h2",xI="coldfusion",MI="cassandra",wI="hbase",DI="mongodb",UI="redis",kI="couchbase",BI="couchdb",VI="cosmosdb",FI="dynamodb",GI="neo4j",HI="geode",qI="elasticsearch",jI="memcached",YI="cockroachdb",gX=ZP,vX=eI,yX=tI,OX=rI,AX=nI,RX=iI,NX=oI,CX=sI,PX=aI,IX=lI,bX=cI,LX=uI,xX=fI,MX=pI,wX=dI,DX=hI,UX=_I,kX=EI,BX=mI,VX=TI,FX=SI,GX=gI,HX=vI,qX=yI,jX=OI,YX=AI,zX=RI,KX=NI,$X=CI,XX=PI,WX=II,JX=bI,QX=LI,ZX=xI,eW=MI,tW=wI,rW=DI,nW=UI,iW=kI,oW=BI,sW=VI,aW=FI,lW=GI,cW=HI,uW=qI,fW=jI,pW=YI,dW=Be([ZP,eI,tI,rI,nI,iI,oI,sI,aI,lI,cI,uI,fI,pI,dI,hI,_I,EI,mI,TI,SI,gI,vI,yI,OI,AI,RI,NI,CI,PI,II,bI,LI,xI,MI,wI,DI,UI,kI,BI,VI,FI,GI,HI,qI,jI,YI]),zI="all",KI="each_quorum",$I="quorum",XI="local_quorum",WI="one",JI="two",QI="three",ZI="local_one",eb="any",tb="serial",rb="local_serial",hW=zI,_W=KI,EW=$I,mW=XI,TW=WI,SW=JI,gW=QI,vW=ZI,yW=eb,OW=tb,AW=rb,RW=Be([zI,KI,$I,XI,WI,JI,QI,ZI,eb,tb,rb]),nb="datasource",ib="http",ob="pubsub",sb="timer",ab="other",NW=nb,CW=ib,PW=ob,IW=sb,bW=ab,LW=Be([nb,ib,ob,sb,ab]),lb="insert",cb="edit",ub="delete",xW=lb,MW=cb,wW=ub,DW=Be([lb,cb,ub]),fb="alibaba_cloud",pb="aws",db="azure",hb="gcp",UW=fb,kW=pb,BW=db,VW=hb,FW=Be([fb,pb,db,hb]),_b="ip_tcp",Eb="ip_udp",mb="ip",Tb="unix",Sb="pipe",gb="inproc",vb="other",GW=_b,HW=Eb,qW=mb,jW=Tb,YW=Sb,zW=gb,KW=vb,$W=Be([_b,Eb,mb,Tb,Sb,gb,vb]),yb="wifi",Ob="wired",Ab="cell",Rb="unavailable",Nb="unknown",XW=yb,WW=Ob,JW=Ab,QW=Rb,ZW=Nb,e8=Be([yb,Ob,Ab,Rb,Nb]),Cb="gprs",Pb="edge",Ib="umts",bb="cdma",Lb="evdo_0",xb="evdo_a",Mb="cdma2000_1xrtt",wb="hsdpa",Db="hsupa",Ub="hspa",kb="iden",Bb="evdo_b",Vb="lte",Fb="ehrpd",Gb="hspap",Hb="gsm",qb="td_scdma",jb="iwlan",Yb="nr",zb="nrnsa",Kb="lte_ca",t8=Cb,r8=Pb,n8=Ib,i8=bb,o8=Lb,s8=xb,a8=Mb,l8=wb,c8=Db,u8=Ub,f8=kb,p8=Bb,d8=Vb,h8=Fb,_8=Gb,E8=Hb,m8=qb,T8=jb,S8=Yb,g8=zb,v8=Kb,y8=Be([Cb,Pb,Ib,bb,Lb,xb,Mb,wb,Db,Ub,kb,Bb,Vb,Fb,Gb,Hb,qb,jb,Yb,zb,Kb]),$b="1.0",Xb="1.1",Wb="2.0",Jb="SPDY",Qb="QUIC",O8=$b,A8=Xb,R8=Wb,N8=Jb,C8=Qb,P8={HTTP_1_0:$b,HTTP_1_1:Xb,HTTP_2_0:Wb,SPDY:Jb,QUIC:Qb},Zb="queue",eL="topic",I8=Zb,b8=eL,L8=Be([Zb,eL]),tL="receive",rL="process",x8=tL,M8=rL,w8=Be([tL,rL]),nL=0,iL=1,oL=2,sL=3,aL=4,lL=5,cL=6,uL=7,fL=8,pL=9,dL=10,hL=11,_L=12,EL=13,mL=14,TL=15,SL=16,D8=nL,U8=iL,k8=oL,B8=sL,V8=aL,F8=lL,G8=cL,H8=uL,q8=fL,j8=pL,Y8=dL,z8=hL,K8=_L,$8=EL,X8=mL,W8=TL,J8=SL,Q8={OK:nL,CANCELLED:iL,UNKNOWN:oL,INVALID_ARGUMENT:sL,DEADLINE_EXCEEDED:aL,NOT_FOUND:lL,ALREADY_EXISTS:cL,PERMISSION_DENIED:uL,RESOURCE_EXHAUSTED:fL,FAILED_PRECONDITION:pL,ABORTED:dL,OUT_OF_RANGE:hL,UNIMPLEMENTED:_L,INTERNAL:EL,UNAVAILABLE:mL,DATA_LOSS:TL,UNAUTHENTICATED:SL},gL="SENT",vL="RECEIVED",Z8=gL,e5=vL,t5=Be([gL,vL])});var OL=p(()=>{yL()});var AL,RL,NL,CL,PL,IL,bL,LL,xL,ML,wL,DL,UL,kL,BL,VL,FL,GL,HL,qL,jL,YL,zL,KL,$L,XL,WL,JL,QL,ZL,e0,t0,r0,n0,i0,o0,s0,a0,l0,c0,u0,f0,p0,d0,h0,_0,E0,m0,T0,S0,g0,v0,y0,O0,A0,R0,N0,C0,P0,I0,b0,L0,x0,M0,w0,D0,U0,k0,B0,V0,F0,G0,H0,q0,j0,Y0,z0,K0,$0,X0,W0,r5,n5,i5,o5,s5,a5,l5,c5,u5,f5,p5,d5,h5,_5,E5,m5,T5,S5,g5,v5,y5,O5,A5,R5,N5,C5,P5,I5,b5,L5,km,Bm,x5,Vm,M5,w5,D5,U5,k5,B5,V5,F5,G5,H5,q5,j5,Y5,z5,K5,$5,X5,W5,J5,Q5,Z5,e7,Fm,t7,r7,Gm,Hm,qm,jm,Ym,n7,zm,Km,st,ko,Ja,at,i7,$m,o7,Se,ge,ve,s7,a7,l7,c7,u7,J0,Q0,Z0,ex,f7,p7,d7,h7,_7,tx,rx,nx,ix,ox,sx,ax,lx,cx,ux,fx,px,dx,hx,_x,Ex,mx,E7,m7,T7,S7,g7,v7,y7,O7,A7,R7,N7,C7,P7,I7,b7,L7,x7,M7,Tx,Sx,w7,D7,U7,gx,vx,yx,Ox,Ax,Rx,Nx,k7,B7,V7,F7,G7,H7,q7,j7,Cx,Px,Ix,bx,Lx,xx,Mx,wx,Dx,Ux,kx,Y7,z7,K7,$7,X7,W7,J7,Q7,Z7,e9,t9,r9,Bx,Vx,Fx,Gx,Hx,qx,jx,Yx,zx,Kx,n9,i9,o9,s9,a9,wt,l9,c9,u9,f9,p9,$x=p(()=>{Dm();AL="cloud.provider",RL="cloud.account.id",NL="cloud.region",CL="cloud.availability_zone",PL="cloud.platform",IL="aws.ecs.container.arn",bL="aws.ecs.cluster.arn",LL="aws.ecs.launchtype",xL="aws.ecs.task.arn",ML="aws.ecs.task.family",wL="aws.ecs.task.revision",DL="aws.eks.cluster.arn",UL="aws.log.group.names",kL="aws.log.group.arns",BL="aws.log.stream.names",VL="aws.log.stream.arns",FL="container.name",GL="container.id",HL="container.runtime",qL="container.image.name",jL="container.image.tag",YL="deployment.environment",zL="device.id",KL="device.model.identifier",$L="device.model.name",XL="faas.name",WL="faas.id",JL="faas.version",QL="faas.instance",ZL="faas.max_memory",e0="host.id",t0="host.name",r0="host.type",n0="host.arch",i0="host.image.name",o0="host.image.id",s0="host.image.version",a0="k8s.cluster.name",l0="k8s.node.name",c0="k8s.node.uid",u0="k8s.namespace.name",f0="k8s.pod.uid",p0="k8s.pod.name",d0="k8s.container.name",h0="k8s.replicaset.uid",_0="k8s.replicaset.name",E0="k8s.deployment.uid",m0="k8s.deployment.name",T0="k8s.statefulset.uid",S0="k8s.statefulset.name",g0="k8s.daemonset.uid",v0="k8s.daemonset.name",y0="k8s.job.uid",O0="k8s.job.name",A0="k8s.cronjob.uid",R0="k8s.cronjob.name",N0="os.type",C0="os.description",P0="os.name",I0="os.version",b0="process.pid",L0="process.executable.name",x0="process.executable.path",M0="process.command",w0="process.command_line",D0="process.command_args",U0="process.owner",k0="process.runtime.name",B0="process.runtime.version",V0="process.runtime.description",F0="service.name",G0="service.namespace",H0="service.instance.id",q0="service.version",j0="telemetry.sdk.name",Y0="telemetry.sdk.language",z0="telemetry.sdk.version",K0="telemetry.auto.version",$0="webengine.name",X0="webengine.version",W0="webengine.description",r5=AL,n5=RL,i5=NL,o5=CL,s5=PL,a5=IL,l5=bL,c5=LL,u5=xL,f5=ML,p5=wL,d5=DL,h5=UL,_5=kL,E5=BL,m5=VL,T5=FL,S5=GL,g5=HL,v5=qL,y5=jL,O5=YL,A5=zL,R5=KL,N5=$L,C5=XL,P5=WL,I5=JL,b5=QL,L5=ZL,km=e0,Bm=t0,x5=r0,Vm=n0,M5=i0,w5=o0,D5=s0,U5=a0,k5=l0,B5=c0,V5=u0,F5=f0,G5=p0,H5=d0,q5=h0,j5=_0,Y5=E0,z5=m0,K5=T0,$5=S0,X5=g0,W5=v0,J5=y0,Q5=O0,Z5=A0,e7=R0,Fm=N0,t7=C0,r7=P0,Gm=I0,Hm=b0,qm=L0,jm=x0,Ym=M0,n7=w0,zm=D0,Km=U0,st=k0,ko=B0,Ja=V0,at=F0,i7=G0,$m=H0,o7=q0,Se=j0,ge=Y0,ve=z0,s7=K0,a7=$0,l7=X0,c7=W0,u7=Be([AL,RL,NL,CL,PL,IL,bL,LL,xL,ML,wL,DL,UL,kL,BL,VL,FL,GL,HL,qL,jL,YL,zL,KL,$L,XL,WL,JL,QL,ZL,e0,t0,r0,n0,i0,o0,s0,a0,l0,c0,u0,f0,p0,d0,h0,_0,E0,m0,T0,S0,g0,v0,y0,O0,A0,R0,N0,C0,P0,I0,b0,L0,x0,M0,w0,D0,U0,k0,B0,V0,F0,G0,H0,q0,j0,Y0,z0,K0,$0,X0,W0]),J0="alibaba_cloud",Q0="aws",Z0="azure",ex="gcp",f7=J0,p7=Q0,d7=Z0,h7=ex,_7=Be([J0,Q0,Z0,ex]),tx="alibaba_cloud_ecs",rx="alibaba_cloud_fc",nx="aws_ec2",ix="aws_ecs",ox="aws_eks",sx="aws_lambda",ax="aws_elastic_beanstalk",lx="azure_vm",cx="azure_container_instances",ux="azure_aks",fx="azure_functions",px="azure_app_service",dx="gcp_compute_engine",hx="gcp_cloud_run",_x="gcp_kubernetes_engine",Ex="gcp_cloud_functions",mx="gcp_app_engine",E7=tx,m7=rx,T7=nx,S7=ix,g7=ox,v7=sx,y7=ax,O7=lx,A7=cx,R7=ux,N7=fx,C7=px,P7=dx,I7=hx,b7=_x,L7=Ex,x7=mx,M7=Be([tx,rx,nx,ix,ox,sx,ax,lx,cx,ux,fx,px,dx,hx,_x,Ex,mx]),Tx="ec2",Sx="fargate",w7=Tx,D7=Sx,U7=Be([Tx,Sx]),gx="amd64",vx="arm32",yx="arm64",Ox="ia64",Ax="ppc32",Rx="ppc64",Nx="x86",k7=gx,B7=vx,V7=yx,F7=Ox,G7=Ax,H7=Rx,q7=Nx,j7=Be([gx,vx,yx,Ox,Ax,Rx,Nx]),Cx="windows",Px="linux",Ix="darwin",bx="freebsd",Lx="netbsd",xx="openbsd",Mx="dragonflybsd",wx="hpux",Dx="aix",Ux="solaris",kx="z_os",Y7=Cx,z7=Px,K7=Ix,$7=bx,X7=Lx,W7=xx,J7=Mx,Q7=wx,Z7=Dx,e9=Ux,t9=kx,r9=Be([Cx,Px,Ix,bx,Lx,xx,Mx,wx,Dx,Ux,kx]),Bx="cpp",Vx="dotnet",Fx="erlang",Gx="go",Hx="java",qx="nodejs",jx="php",Yx="python",zx="ruby",Kx="webjs",n9=Bx,i9=Vx,o9=Fx,s9=Gx,a9=Hx,wt=qx,l9=jx,c9=Yx,u9=zx,f9=Kx,p9=Be([Bx,Vx,Fx,Gx,Hx,qx,jx,Yx,zx,Kx])});var Xx=p(()=>{$x()});var d9,h9,_9,E9,m9,T9,S9,g9,v9,y9,O9,A9,R9,N9,C9,P9,I9,b9,L9,x9,M9,w9,D9,U9,k9,B9,V9,F9,G9,H9,q9,j9,Y9,z9,K9,$9,X9,W9,J9,Q9,Z9,eJ,tJ,rJ,nJ,iJ,oJ,sJ,aJ,lJ,cJ,uJ,fJ,pJ,dJ,hJ,_J,EJ,mJ,TJ,SJ,gJ,vJ,yJ,OJ,AJ,RJ,NJ,CJ,PJ,IJ,bJ,LJ,xJ,MJ,wJ,DJ,UJ,kJ,BJ,VJ,FJ,GJ,HJ,qJ,jJ,YJ,zJ,KJ,$J,XJ,WJ,JJ,QJ,ZJ,eQ,tQ,rQ,nQ,iQ,oQ,sQ,aQ,lQ,cQ,uQ,fQ,pQ,dQ,hQ,Wx=p(()=>{d9="aspnetcore.rate_limiting.result",h9="acquired",_9="endpoint_limiter",E9="global_limiter",m9="request_canceled",T9="telemetry.sdk.language",S9="cpp",g9="dotnet",v9="erlang",y9="go",O9="java",A9="nodejs",R9="php",N9="python",C9="ruby",P9="rust",I9="swift",b9="webjs",L9="telemetry.sdk.name",x9="telemetry.sdk.version",M9="aspnetcore.diagnostics.handler.type",w9="aspnetcore.diagnostics.exception.result",D9="aborted",U9="handled",k9="skipped",B9="unhandled",V9="aspnetcore.rate_limiting.policy",F9="aspnetcore.request.is_unhandled",G9="aspnetcore.routing.is_fallback",H9="aspnetcore.routing.match_status",q9="failure",j9="success",Y9="client.address",z9="client.port",K9="error.type",$9="_OTHER",X9="exception.escaped",W9="exception.message",J9="exception.stacktrace",Q9="exception.type",Z9=function(r){return"http.request.header."+r},eJ="http.request.method",tJ="_OTHER",rJ="CONNECT",nJ="DELETE",iJ="GET",oJ="HEAD",sJ="OPTIONS",aJ="PATCH",lJ="POST",cJ="PUT",uJ="TRACE",fJ="http.request.method_original",pJ="http.request.resend_count",dJ=function(r){return"http.response.header."+r},hJ="http.response.status_code",_J="http.route",EJ="jvm.gc.action",mJ="jvm.gc.name",TJ="jvm.memory.pool.name",SJ="jvm.memory.type",gJ="heap",vJ="non_heap",yJ="jvm.thread.daemon",OJ="jvm.thread.state",AJ="blocked",RJ="new",NJ="runnable",CJ="terminated",PJ="timed_waiting",IJ="waiting",bJ="network.local.address",LJ="network.local.port",xJ="network.peer.address",MJ="network.peer.port",wJ="network.protocol.name",DJ="network.protocol.version",UJ="network.transport",kJ="pipe",BJ="quic",VJ="tcp",FJ="udp",GJ="unix",HJ="network.type",qJ="ipv4",jJ="ipv6",YJ="otel.scope.name",zJ="otel.scope.version",KJ="otel.status_code",$J="ERROR",XJ="OK",WJ="otel.status_description",JJ="server.address",QJ="server.port",ZJ="service.name",eQ="service.version",tQ="signalr.connection.status",rQ="app_shutdown",nQ="normal_closure",iQ="timeout",oQ="signalr.transport",sQ="long_polling",aQ="server_sent_events",lQ="web_sockets",cQ="url.fragment",uQ="url.full",fQ="url.path",pQ="url.query",dQ="url.scheme",hQ="user_agent.original"});var _Q,EQ,mQ,TQ,SQ,gQ,vQ,yQ,OQ,AQ,RQ,NQ,CQ,PQ,IQ,bQ,LQ,xQ,MQ,wQ,DQ,UQ,kQ,BQ,VQ,FQ,GQ,HQ,qQ,jQ,YQ,Jx=p(()=>{_Q="aspnetcore.diagnostics.exceptions",EQ="aspnetcore.rate_limiting.active_request_leases",mQ="aspnetcore.rate_limiting.queued_requests",TQ="aspnetcore.rate_limiting.request.time_in_queue",SQ="aspnetcore.rate_limiting.request_lease.duration",gQ="aspnetcore.rate_limiting.requests",vQ="aspnetcore.routing.match_attempts",yQ="http.client.request.duration",OQ="http.server.request.duration",AQ="jvm.class.count",RQ="jvm.class.loaded",NQ="jvm.class.unloaded",CQ="jvm.cpu.count",PQ="jvm.cpu.recent_utilization",IQ="jvm.cpu.time",bQ="jvm.gc.duration",LQ="jvm.memory.committed",xQ="jvm.memory.limit",MQ="jvm.memory.used",wQ="jvm.memory.used_after_last_gc",DQ="jvm.thread.count",UQ="kestrel.active_connections",kQ="kestrel.active_tls_handshakes",BQ="kestrel.connection.duration",VQ="kestrel.queued_connections",FQ="kestrel.queued_requests",GQ="kestrel.rejected_connections",HQ="kestrel.tls_handshake.duration",qQ="kestrel.upgraded_connections",jQ="signalr.server.active_connections",YQ="signalr.server.connection.duration"});var Qx={};Ae(Qx,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>D9,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>U9,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>k9,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>B9,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>h9,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>_9,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>E9,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>m9,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>q9,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>j9,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>w9,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>M9,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>V9,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>d9,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>F9,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>G9,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>H9,ATTR_CLIENT_ADDRESS:()=>Y9,ATTR_CLIENT_PORT:()=>z9,ATTR_ERROR_TYPE:()=>K9,ATTR_EXCEPTION_ESCAPED:()=>X9,ATTR_EXCEPTION_MESSAGE:()=>W9,ATTR_EXCEPTION_STACKTRACE:()=>J9,ATTR_EXCEPTION_TYPE:()=>Q9,ATTR_HTTP_REQUEST_HEADER:()=>Z9,ATTR_HTTP_REQUEST_METHOD:()=>eJ,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>fJ,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>pJ,ATTR_HTTP_RESPONSE_HEADER:()=>dJ,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>hJ,ATTR_HTTP_ROUTE:()=>_J,ATTR_JVM_GC_ACTION:()=>EJ,ATTR_JVM_GC_NAME:()=>mJ,ATTR_JVM_MEMORY_POOL_NAME:()=>TJ,ATTR_JVM_MEMORY_TYPE:()=>SJ,ATTR_JVM_THREAD_DAEMON:()=>yJ,ATTR_JVM_THREAD_STATE:()=>OJ,ATTR_NETWORK_LOCAL_ADDRESS:()=>bJ,ATTR_NETWORK_LOCAL_PORT:()=>LJ,ATTR_NETWORK_PEER_ADDRESS:()=>xJ,ATTR_NETWORK_PEER_PORT:()=>MJ,ATTR_NETWORK_PROTOCOL_NAME:()=>wJ,ATTR_NETWORK_PROTOCOL_VERSION:()=>DJ,ATTR_NETWORK_TRANSPORT:()=>UJ,ATTR_NETWORK_TYPE:()=>HJ,ATTR_OTEL_SCOPE_NAME:()=>YJ,ATTR_OTEL_SCOPE_VERSION:()=>zJ,ATTR_OTEL_STATUS_CODE:()=>KJ,ATTR_OTEL_STATUS_DESCRIPTION:()=>WJ,ATTR_SERVER_ADDRESS:()=>JJ,ATTR_SERVER_PORT:()=>QJ,ATTR_SERVICE_NAME:()=>ZJ,ATTR_SERVICE_VERSION:()=>eQ,ATTR_SIGNALR_CONNECTION_STATUS:()=>tQ,ATTR_SIGNALR_TRANSPORT:()=>oQ,ATTR_TELEMETRY_SDK_LANGUAGE:()=>T9,ATTR_TELEMETRY_SDK_NAME:()=>L9,ATTR_TELEMETRY_SDK_VERSION:()=>x9,ATTR_URL_FRAGMENT:()=>cQ,ATTR_URL_FULL:()=>uQ,ATTR_URL_PATH:()=>fQ,ATTR_URL_QUERY:()=>pQ,ATTR_URL_SCHEME:()=>dQ,ATTR_USER_AGENT_ORIGINAL:()=>hQ,AWSECSLAUNCHTYPEVALUES_EC2:()=>w7,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>D7,AwsEcsLaunchtypeValues:()=>U7,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>E7,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>m7,CLOUDPLATFORMVALUES_AWS_EC2:()=>T7,CLOUDPLATFORMVALUES_AWS_ECS:()=>S7,CLOUDPLATFORMVALUES_AWS_EKS:()=>g7,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>y7,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>v7,CLOUDPLATFORMVALUES_AZURE_AKS:()=>R7,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>C7,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>A7,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>N7,CLOUDPLATFORMVALUES_AZURE_VM:()=>O7,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>x7,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>L7,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>I7,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>P7,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>b7,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>f7,CLOUDPROVIDERVALUES_AWS:()=>p7,CLOUDPROVIDERVALUES_AZURE:()=>d7,CLOUDPROVIDERVALUES_GCP:()=>h7,CloudPlatformValues:()=>M7,CloudProviderValues:()=>_7,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>hW,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>yW,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>_W,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>vW,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>mW,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>AW,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>TW,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>EW,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>OW,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>gW,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>SW,DBSYSTEMVALUES_ADABAS:()=>kX,DBSYSTEMVALUES_CACHE:()=>UX,DBSYSTEMVALUES_CASSANDRA:()=>eW,DBSYSTEMVALUES_CLOUDSCAPE:()=>PX,DBSYSTEMVALUES_COCKROACHDB:()=>pW,DBSYSTEMVALUES_COLDFUSION:()=>ZX,DBSYSTEMVALUES_COSMOSDB:()=>sW,DBSYSTEMVALUES_COUCHBASE:()=>iW,DBSYSTEMVALUES_COUCHDB:()=>oW,DBSYSTEMVALUES_DB2:()=>AX,DBSYSTEMVALUES_DERBY:()=>VX,DBSYSTEMVALUES_DYNAMODB:()=>aW,DBSYSTEMVALUES_EDB:()=>DX,DBSYSTEMVALUES_ELASTICSEARCH:()=>uW,DBSYSTEMVALUES_FILEMAKER:()=>FX,DBSYSTEMVALUES_FIREBIRD:()=>BX,DBSYSTEMVALUES_FIRSTSQL:()=>wX,DBSYSTEMVALUES_GEODE:()=>cW,DBSYSTEMVALUES_H2:()=>QX,DBSYSTEMVALUES_HANADB:()=>xX,DBSYSTEMVALUES_HBASE:()=>tW,DBSYSTEMVALUES_HIVE:()=>CX,DBSYSTEMVALUES_HSQLDB:()=>IX,DBSYSTEMVALUES_INFORMIX:()=>GX,DBSYSTEMVALUES_INGRES:()=>MX,DBSYSTEMVALUES_INSTANTDB:()=>HX,DBSYSTEMVALUES_INTERBASE:()=>qX,DBSYSTEMVALUES_MARIADB:()=>jX,DBSYSTEMVALUES_MAXDB:()=>LX,DBSYSTEMVALUES_MEMCACHED:()=>fW,DBSYSTEMVALUES_MONGODB:()=>rW,DBSYSTEMVALUES_MSSQL:()=>vX,DBSYSTEMVALUES_MYSQL:()=>yX,DBSYSTEMVALUES_NEO4J:()=>lW,DBSYSTEMVALUES_NETEZZA:()=>YX,DBSYSTEMVALUES_ORACLE:()=>OX,DBSYSTEMVALUES_OTHER_SQL:()=>gX,DBSYSTEMVALUES_PERVASIVE:()=>zX,DBSYSTEMVALUES_POINTBASE:()=>KX,DBSYSTEMVALUES_POSTGRESQL:()=>RX,DBSYSTEMVALUES_PROGRESS:()=>bX,DBSYSTEMVALUES_REDIS:()=>nW,DBSYSTEMVALUES_REDSHIFT:()=>NX,DBSYSTEMVALUES_SQLITE:()=>$X,DBSYSTEMVALUES_SYBASE:()=>XX,DBSYSTEMVALUES_TERADATA:()=>WX,DBSYSTEMVALUES_VERTICA:()=>JX,DbCassandraConsistencyLevelValues:()=>RW,DbSystemValues:()=>dW,ERROR_TYPE_VALUE_OTHER:()=>$9,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>wW,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>MW,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>xW,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>UW,FAASINVOKEDPROVIDERVALUES_AWS:()=>kW,FAASINVOKEDPROVIDERVALUES_AZURE:()=>BW,FAASINVOKEDPROVIDERVALUES_GCP:()=>VW,FAASTRIGGERVALUES_DATASOURCE:()=>NW,FAASTRIGGERVALUES_HTTP:()=>CW,FAASTRIGGERVALUES_OTHER:()=>bW,FAASTRIGGERVALUES_PUBSUB:()=>PW,FAASTRIGGERVALUES_TIMER:()=>IW,FaasDocumentOperationValues:()=>DW,FaasInvokedProviderValues:()=>FW,FaasTriggerValues:()=>LW,HOSTARCHVALUES_AMD64:()=>k7,HOSTARCHVALUES_ARM32:()=>B7,HOSTARCHVALUES_ARM64:()=>V7,HOSTARCHVALUES_IA64:()=>F7,HOSTARCHVALUES_PPC32:()=>G7,HOSTARCHVALUES_PPC64:()=>H7,HOSTARCHVALUES_X86:()=>q7,HTTPFLAVORVALUES_HTTP_1_0:()=>O8,HTTPFLAVORVALUES_HTTP_1_1:()=>A8,HTTPFLAVORVALUES_HTTP_2_0:()=>R8,HTTPFLAVORVALUES_QUIC:()=>C8,HTTPFLAVORVALUES_SPDY:()=>N8,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>rJ,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>nJ,HTTP_REQUEST_METHOD_VALUE_GET:()=>iJ,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>oJ,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>sJ,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>tJ,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>aJ,HTTP_REQUEST_METHOD_VALUE_POST:()=>lJ,HTTP_REQUEST_METHOD_VALUE_PUT:()=>cJ,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>uJ,HostArchValues:()=>j7,HttpFlavorValues:()=>P8,JVM_MEMORY_TYPE_VALUE_HEAP:()=>gJ,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>vJ,JVM_THREAD_STATE_VALUE_BLOCKED:()=>AJ,JVM_THREAD_STATE_VALUE_NEW:()=>RJ,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>NJ,JVM_THREAD_STATE_VALUE_TERMINATED:()=>CJ,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>PJ,JVM_THREAD_STATE_VALUE_WAITING:()=>IJ,MESSAGETYPEVALUES_RECEIVED:()=>e5,MESSAGETYPEVALUES_SENT:()=>Z8,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>I8,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>b8,MESSAGINGOPERATIONVALUES_PROCESS:()=>M8,MESSAGINGOPERATIONVALUES_RECEIVE:()=>x8,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>_Q,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>EQ,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>mQ,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>gQ,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>SQ,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>TQ,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>vQ,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>yQ,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>OQ,METRIC_JVM_CLASS_COUNT:()=>AQ,METRIC_JVM_CLASS_LOADED:()=>RQ,METRIC_JVM_CLASS_UNLOADED:()=>NQ,METRIC_JVM_CPU_COUNT:()=>CQ,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>PQ,METRIC_JVM_CPU_TIME:()=>IQ,METRIC_JVM_GC_DURATION:()=>bQ,METRIC_JVM_MEMORY_COMMITTED:()=>LQ,METRIC_JVM_MEMORY_LIMIT:()=>xQ,METRIC_JVM_MEMORY_USED:()=>MQ,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>wQ,METRIC_JVM_THREAD_COUNT:()=>DQ,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>UQ,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>kQ,METRIC_KESTREL_CONNECTION_DURATION:()=>BQ,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>VQ,METRIC_KESTREL_QUEUED_REQUESTS:()=>FQ,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>GQ,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>HQ,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>qQ,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>jQ,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>YQ,MessageTypeValues:()=>t5,MessagingDestinationKindValues:()=>L8,MessagingOperationValues:()=>w8,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>i8,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>a8,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>r8,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>h8,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>o8,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>s8,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>p8,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>t8,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>E8,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>l8,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>u8,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>_8,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>c8,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>f8,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>T8,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>d8,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>v8,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>S8,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>g8,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>m8,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>n8,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>JW,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>QW,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>ZW,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>XW,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>WW,NETTRANSPORTVALUES_INPROC:()=>zW,NETTRANSPORTVALUES_IP:()=>qW,NETTRANSPORTVALUES_IP_TCP:()=>GW,NETTRANSPORTVALUES_IP_UDP:()=>HW,NETTRANSPORTVALUES_OTHER:()=>KW,NETTRANSPORTVALUES_PIPE:()=>YW,NETTRANSPORTVALUES_UNIX:()=>jW,NETWORK_TRANSPORT_VALUE_PIPE:()=>kJ,NETWORK_TRANSPORT_VALUE_QUIC:()=>BJ,NETWORK_TRANSPORT_VALUE_TCP:()=>VJ,NETWORK_TRANSPORT_VALUE_UDP:()=>FJ,NETWORK_TRANSPORT_VALUE_UNIX:()=>GJ,NETWORK_TYPE_VALUE_IPV4:()=>qJ,NETWORK_TYPE_VALUE_IPV6:()=>jJ,NetHostConnectionSubtypeValues:()=>y8,NetHostConnectionTypeValues:()=>e8,NetTransportValues:()=>$W,OSTYPEVALUES_AIX:()=>Z7,OSTYPEVALUES_DARWIN:()=>K7,OSTYPEVALUES_DRAGONFLYBSD:()=>J7,OSTYPEVALUES_FREEBSD:()=>$7,OSTYPEVALUES_HPUX:()=>Q7,OSTYPEVALUES_LINUX:()=>z7,OSTYPEVALUES_NETBSD:()=>X7,OSTYPEVALUES_OPENBSD:()=>W7,OSTYPEVALUES_SOLARIS:()=>e9,OSTYPEVALUES_WINDOWS:()=>Y7,OSTYPEVALUES_Z_OS:()=>t9,OTEL_STATUS_CODE_VALUE_ERROR:()=>$J,OTEL_STATUS_CODE_VALUE_OK:()=>XJ,OsTypeValues:()=>r9,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>Y8,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>G8,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>U8,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>W8,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>V8,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>j8,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>$8,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>B8,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>F8,RPCGRPCSTATUSCODEVALUES_OK:()=>D8,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>z8,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>H8,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>q8,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>J8,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>X8,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>K8,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>k8,RpcGrpcStatusCodeValues:()=>Q8,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>P$,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>F$,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>R$,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>v$,SEMATTRS_AWS_DYNAMODB_COUNT:()=>B$,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>M$,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>L$,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>G$,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>I$,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>y$,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>C$,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>x$,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>N$,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>O$,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>A$,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>V$,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>D$,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>U$,SEMATTRS_AWS_DYNAMODB_SELECT:()=>b$,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>w$,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>g$,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>k$,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>rK,SEMATTRS_CODE_FILEPATH:()=>n$,SEMATTRS_CODE_FUNCTION:()=>t$,SEMATTRS_CODE_LINENO:()=>i$,SEMATTRS_CODE_NAMESPACE:()=>r$,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>dK,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>TK,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>mK,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>_K,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>fK,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>pK,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>EK,SEMATTRS_DB_CASSANDRA_TABLE:()=>hK,SEMATTRS_DB_CONNECTION_STRING:()=>iK,SEMATTRS_DB_HBASE_NAMESPACE:()=>SK,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>sK,SEMATTRS_DB_MONGODB_COLLECTION:()=>vK,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>uK,SEMATTRS_DB_NAME:()=>aK,SEMATTRS_DB_OPERATION:()=>cK,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>gK,SEMATTRS_DB_SQL_TABLE:()=>yK,SEMATTRS_DB_STATEMENT:()=>lK,SEMATTRS_DB_SYSTEM:()=>nK,SEMATTRS_DB_USER:()=>oK,SEMATTRS_ENDUSER_ID:()=>WK,SEMATTRS_ENDUSER_ROLE:()=>JK,SEMATTRS_ENDUSER_SCOPE:()=>QK,SEMATTRS_EXCEPTION_ESCAPED:()=>OK,SEMATTRS_EXCEPTION_MESSAGE:()=>Wa,SEMATTRS_EXCEPTION_STACKTRACE:()=>Um,SEMATTRS_EXCEPTION_TYPE:()=>Xa,SEMATTRS_FAAS_COLDSTART:()=>xK,SEMATTRS_FAAS_CRON:()=>LK,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>NK,SEMATTRS_FAAS_DOCUMENT_NAME:()=>IK,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>CK,SEMATTRS_FAAS_DOCUMENT_TIME:()=>PK,SEMATTRS_FAAS_EXECUTION:()=>RK,SEMATTRS_FAAS_INVOKED_NAME:()=>MK,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>wK,SEMATTRS_FAAS_INVOKED_REGION:()=>DK,SEMATTRS_FAAS_TIME:()=>bK,SEMATTRS_FAAS_TRIGGER:()=>AK,SEMATTRS_HTTP_CLIENT_IP:()=>S$,SEMATTRS_HTTP_FLAVOR:()=>f$,SEMATTRS_HTTP_HOST:()=>l$,SEMATTRS_HTTP_METHOD:()=>o$,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>d$,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>h$,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>_$,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>E$,SEMATTRS_HTTP_ROUTE:()=>T$,SEMATTRS_HTTP_SCHEME:()=>c$,SEMATTRS_HTTP_SERVER_NAME:()=>m$,SEMATTRS_HTTP_STATUS_CODE:()=>u$,SEMATTRS_HTTP_TARGET:()=>a$,SEMATTRS_HTTP_URL:()=>s$,SEMATTRS_HTTP_USER_AGENT:()=>p$,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>mX,SEMATTRS_MESSAGE_ID:()=>EX,SEMATTRS_MESSAGE_TYPE:()=>_X,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>TX,SEMATTRS_MESSAGING_CONSUMER_ID:()=>eX,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>W$,SEMATTRS_MESSAGING_DESTINATION:()=>q$,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>j$,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>iX,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>nX,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>rX,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>oX,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>sX,SEMATTRS_MESSAGING_MESSAGE_ID:()=>X$,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>Q$,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>J$,SEMATTRS_MESSAGING_OPERATION:()=>Z$,SEMATTRS_MESSAGING_PROTOCOL:()=>z$,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>K$,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>tX,SEMATTRS_MESSAGING_SYSTEM:()=>H$,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>Y$,SEMATTRS_MESSAGING_URL:()=>$$,SEMATTRS_NET_HOST_CARRIER_ICC:()=>$K,SEMATTRS_NET_HOST_CARRIER_MCC:()=>zK,SEMATTRS_NET_HOST_CARRIER_MNC:()=>KK,SEMATTRS_NET_HOST_CARRIER_NAME:()=>YK,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>jK,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>qK,SEMATTRS_NET_HOST_IP:()=>FK,SEMATTRS_NET_HOST_NAME:()=>HK,SEMATTRS_NET_HOST_PORT:()=>GK,SEMATTRS_NET_PEER_IP:()=>kK,SEMATTRS_NET_PEER_NAME:()=>VK,SEMATTRS_NET_PEER_PORT:()=>BK,SEMATTRS_NET_TRANSPORT:()=>UK,SEMATTRS_PEER_SERVICE:()=>XK,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>uX,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>dX,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>hX,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>pX,SEMATTRS_RPC_JSONRPC_VERSION:()=>fX,SEMATTRS_RPC_METHOD:()=>cX,SEMATTRS_RPC_SERVICE:()=>lX,SEMATTRS_RPC_SYSTEM:()=>aX,SEMATTRS_THREAD_ID:()=>ZK,SEMATTRS_THREAD_NAME:()=>e$,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>l5,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>a5,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>c5,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>u5,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>f5,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>p5,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>d5,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>_5,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>h5,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>m5,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>E5,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>n5,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>o5,SEMRESATTRS_CLOUD_PLATFORM:()=>s5,SEMRESATTRS_CLOUD_PROVIDER:()=>r5,SEMRESATTRS_CLOUD_REGION:()=>i5,SEMRESATTRS_CONTAINER_ID:()=>S5,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>v5,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>y5,SEMRESATTRS_CONTAINER_NAME:()=>T5,SEMRESATTRS_CONTAINER_RUNTIME:()=>g5,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>O5,SEMRESATTRS_DEVICE_ID:()=>A5,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>R5,SEMRESATTRS_DEVICE_MODEL_NAME:()=>N5,SEMRESATTRS_FAAS_ID:()=>P5,SEMRESATTRS_FAAS_INSTANCE:()=>b5,SEMRESATTRS_FAAS_MAX_MEMORY:()=>L5,SEMRESATTRS_FAAS_NAME:()=>C5,SEMRESATTRS_FAAS_VERSION:()=>I5,SEMRESATTRS_HOST_ARCH:()=>Vm,SEMRESATTRS_HOST_ID:()=>km,SEMRESATTRS_HOST_IMAGE_ID:()=>w5,SEMRESATTRS_HOST_IMAGE_NAME:()=>M5,SEMRESATTRS_HOST_IMAGE_VERSION:()=>D5,SEMRESATTRS_HOST_NAME:()=>Bm,SEMRESATTRS_HOST_TYPE:()=>x5,SEMRESATTRS_K8S_CLUSTER_NAME:()=>U5,SEMRESATTRS_K8S_CONTAINER_NAME:()=>H5,SEMRESATTRS_K8S_CRONJOB_NAME:()=>e7,SEMRESATTRS_K8S_CRONJOB_UID:()=>Z5,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>W5,SEMRESATTRS_K8S_DAEMONSET_UID:()=>X5,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>z5,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>Y5,SEMRESATTRS_K8S_JOB_NAME:()=>Q5,SEMRESATTRS_K8S_JOB_UID:()=>J5,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>V5,SEMRESATTRS_K8S_NODE_NAME:()=>k5,SEMRESATTRS_K8S_NODE_UID:()=>B5,SEMRESATTRS_K8S_POD_NAME:()=>G5,SEMRESATTRS_K8S_POD_UID:()=>F5,SEMRESATTRS_K8S_REPLICASET_NAME:()=>j5,SEMRESATTRS_K8S_REPLICASET_UID:()=>q5,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>$5,SEMRESATTRS_K8S_STATEFULSET_UID:()=>K5,SEMRESATTRS_OS_DESCRIPTION:()=>t7,SEMRESATTRS_OS_NAME:()=>r7,SEMRESATTRS_OS_TYPE:()=>Fm,SEMRESATTRS_OS_VERSION:()=>Gm,SEMRESATTRS_PROCESS_COMMAND:()=>Ym,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>zm,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>n7,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>qm,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>jm,SEMRESATTRS_PROCESS_OWNER:()=>Km,SEMRESATTRS_PROCESS_PID:()=>Hm,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>Ja,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>st,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>ko,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>$m,SEMRESATTRS_SERVICE_NAME:()=>at,SEMRESATTRS_SERVICE_NAMESPACE:()=>i7,SEMRESATTRS_SERVICE_VERSION:()=>o7,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>s7,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>ge,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>Se,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>ve,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>c7,SEMRESATTRS_WEBENGINE_NAME:()=>a7,SEMRESATTRS_WEBENGINE_VERSION:()=>l7,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>rQ,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>nQ,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>iQ,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>sQ,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>aQ,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>lQ,SemanticAttributes:()=>SX,SemanticResourceAttributes:()=>u7,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>n9,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>i9,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>o9,TELEMETRYSDKLANGUAGEVALUES_GO:()=>s9,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>a9,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>wt,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>l9,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>c9,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>u9,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>f9,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>S9,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>g9,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>v9,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>y9,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>O9,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>A9,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>R9,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>N9,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>C9,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>P9,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>I9,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>b9,TelemetrySdkLanguageValues:()=>p9});var Ve=p(()=>{OL();Xx();Wx();Jx()});function Qu(r){return r.setValue(Zm,!0)}function TM(r){return r.deleteValue(Zm)}function At(r){return r.getValue(Zm)===!0}var Zm,nl=p(()=>{P();Zm=De("OpenTelemetry SDK Context Key SUPPRESS_TRACING")});var Zu,SM=p(()=>{Zu="baggage"});function tf(r){return r.reduce((e,t)=>{let o=`${e}${e!==""?",":""}${t}`;return o.length>8192?e:o},"")}function rf(r){return r.getAllEntries().map(([e,t])=>{let o=`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`;return t.metadata!==void 0&&(o+=";"+t.metadata.toString()),o})}function il(r){let e=r.split(";");if(e.length<=0)return;let t=e.shift();if(!t)return;let o=t.indexOf("=");if(o<=0)return;let s=decodeURIComponent(t.substring(0,o).trim()),a=decodeURIComponent(t.substring(o+1).trim()),i;return e.length>0&&(i=Lr(e.join(";"))),{key:s,value:a,metadata:i}}function vM(r){return typeof r!="string"||r.length===0?{}:r.split(",").map(e=>il(e)).filter(e=>e!==void 0&&e.value.length>0).reduce((e,t)=>(e[t.key]=t.value,e),{})}var eT=p(()=>{P()});var nf,yM=p(()=>{P();nl();SM();eT();nf=class{inject(e,t,o){let s=Ue.getBaggage(e);if(!s||At(e))return;let a=rf(s).filter(n=>n.length<=4096).slice(0,180),i=tf(a);i.length>0&&o.set(t,Zu,i)}extract(e,t,o){let s=o.get(t,Zu),a=Array.isArray(s)?s.join(","):s;if(!a)return e;let i={};return a.length===0||(a.split(",").forEach(l=>{let c=il(l);if(c){let u={value:c.value};c.metadata&&(u.metadata=c.metadata),i[c.key]=u}}),Object.entries(i).length===0)?e:Ue.setBaggage(e,Ue.createBaggage(i))}fields(){return[Zu]}}});var of,OM=p(()=>{of=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 AM(r){let e={};if(typeof r!="object"||r==null)return e;for(let[t,o]of Object.entries(r)){if(!tT(t)){S.warn(`Invalid attribute key: ${t}`);continue}if(!rT(o)){S.warn(`Invalid attribute value set for key: ${t}`);continue}Array.isArray(o)?e[t]=o.slice():e[t]=o}return e}function tT(r){return typeof r=="string"&&r.length>0}function rT(r){return r==null?!0:Array.isArray(r)?_Z(r):RM(r)}function _Z(r){let e;for(let t of r)if(t!=null){if(!e){if(RM(t)){e=typeof t;continue}return!1}if(typeof t!==e)return!1}return!0}function RM(r){switch(typeof r){case"number":case"boolean":case"string":return!0}return!1}var NM=p(()=>{P()});function sf(){return r=>{S.error(EZ(r))}}function EZ(r){return typeof r=="string"?r:JSON.stringify(mZ(r))}function mZ(r){let e={},t=r;for(;t!==null;)Object.getOwnPropertyNames(t).forEach(o=>{if(e[o])return;let s=t[o];s&&(e[o]=String(s))}),t=Object.getPrototypeOf(t);return e}var nT=p(()=>{P()});function PM(r){CM=r}function af(r){try{CM(r)}catch{}}var CM,iT=p(()=>{nT();CM=sf()});var Vo,oT=p(()=>{(function(r){r.AlwaysOff="always_off",r.AlwaysOn="always_on",r.ParentBasedAlwaysOff="parentbased_always_off",r.ParentBasedAlwaysOn="parentbased_always_on",r.ParentBasedTraceIdRatio="parentbased_traceidratio",r.TraceIdRatio="traceidratio"})(Vo||(Vo={}))});function gZ(r){return SZ.indexOf(r)>-1}function yZ(r){return vZ.indexOf(r)>-1}function AZ(r){return OZ.indexOf(r)>-1}function RZ(r,e,t){if(typeof t[r]>"u")return;let o=String(t[r]);e[r]=o.toLowerCase()==="true"}function NZ(r,e,t,o=-1/0,s=1/0){if(typeof t[r]<"u"){let a=Number(t[r]);isNaN(a)||(as?e[r]=s:e[r]=a)}}function CZ(r,e,t,o=TZ){let s=t[r];typeof s=="string"&&(e[r]=s.split(o).map(a=>a.trim()))}function IZ(r,e,t){let o=t[r];if(typeof o=="string"){let s=PZ[o.toUpperCase()];s!=null&&(e[r]=s)}}function ll(r){let e={};for(let t in al){let o=t;switch(o){case"OTEL_LOG_LEVEL":IZ(o,e,r);break;default:if(gZ(o))RZ(o,e,r);else if(yZ(o))NZ(o,e,r);else if(AZ(o))CZ(o,e,r);else{let s=r[o];typeof s<"u"&&s!==null&&(e[o]=String(s))}}}return e}var TZ,SZ,vZ,OZ,ol,sl,sT,aT,al,PZ,lT=p(()=>{P();oT();TZ=",",SZ=["OTEL_SDK_DISABLED"];vZ=["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"];OZ=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];ol=1/0,sl=128,sT=128,aT=128,al={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:H.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:ol,OTEL_ATTRIBUTE_COUNT_LIMIT:sl,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:ol,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:sl,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:ol,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:sl,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:sT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:aT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Vo.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};PZ={ALL:H.ALL,VERBOSE:H.VERBOSE,DEBUG:H.DEBUG,INFO:H.INFO,WARN:H.WARN,ERROR:H.ERROR,NONE:H.NONE}});function Fo(){let r=ll(process.env);return Object.assign({},al,r)}function lf(){return ll(process.env)}var IM=p(()=>{lT()});var cf,bM=p(()=>{cf=typeof globalThis=="object"?globalThis:global});function LM(r){return r>=48&&r<=57?r-48:r>=97&&r<=102?r-87:r-55}function uf(r){let e=new Uint8Array(r.length/2),t=0;for(let o=0;o{});function ff(r){return Buffer.from(uf(r)).toString("base64")}var xM=p(()=>{cT()});function MM(r){return function(){for(let t=0;t>>0,t*4);for(let t=0;t0);t++)t===r-1&&(pf[r-1]=1);return pf.toString("hex",0,r)}}var Go,pf,wM=p(()=>{Go=class{constructor(){this.generateTraceId=MM(16),this.generateSpanId=MM(8)}},pf=Buffer.allocUnsafe(16)});import{performance as bZ}from"perf_hooks";var In,DM=p(()=>{In=bZ});var df,uT=p(()=>{df="1.29.0"});var bn,UM=p(()=>{uT();Ve();bn={[Se]:"opentelemetry",[st]:"node",[ge]:wt,[ve]:df}});function hf(r){r.unref()}var kM=p(()=>{});var BM=p(()=>{IM();bM();xM();wM();DM();UM();kM()});var fT=p(()=>{BM()});function Ho(r){let e=r/1e3,t=Math.trunc(e),o=Math.round(r%1e3*xZ);return[t,o]}function Ef(){let r=In.timeOrigin;if(typeof r!="number"){let e=In;r=e.timing&&e.timing.fetchStart}return r}function pT(r){let e=Ho(Ef()),t=Ho(typeof r=="number"?r:In.now());return dT(e,t)}function FM(r){if(mf(r))return r;if(typeof r=="number")return r=_f&&(t[1]-=_f,t[0]+=1),t}var VM,LZ,xZ,_f,KM=p(()=>{fT();VM=9,LZ=6,xZ=Math.pow(10,LZ),_f=Math.pow(10,VM)});var Tf,$M=p(()=>{(function(r){r[r.SUCCESS=0]="SUCCESS",r[r.FAILED=1]="FAILED"})(Tf||(Tf={}))});var Sf,XM=p(()=>{P();Sf=class{constructor(e={}){var t;this._propagators=(t=e.propagators)!==null&&t!==void 0?t:[],this._fields=Array.from(new Set(this._propagators.map(o=>typeof o.fields=="function"?o.fields():[]).reduce((o,s)=>o.concat(s),[])))}inject(e,t,o){for(let s of this._propagators)try{s.inject(e,t,o)}catch(a){S.warn(`Failed to inject with ${s.constructor.name}. Err: ${a.message}`)}}extract(e,t,o){return this._propagators.reduce((s,a)=>{try{return a.extract(s,t,o)}catch(i){S.warn(`Failed to extract with ${a.constructor.name}. Err: ${i.message}`)}return s},e)}fields(){return this._fields.slice()}}});function WM(r){return DZ.test(r)}function JM(r){return UZ.test(r)&&!kZ.test(r)}var hT,MZ,wZ,DZ,UZ,kZ,QM=p(()=>{hT="[_0-9a-z-*/]",MZ=`[a-z]${hT}{0,255}`,wZ=`[a-z0-9]${hT}{0,240}@[a-z]${hT}{0,13}`,DZ=new RegExp(`^(?:${MZ}|${wZ})$`),UZ=/^[ -~]{0,255}[!-~]$/,kZ=/,|=/});var ZM,BZ,ew,tw,qo,_T=p(()=>{QM();ZM=32,BZ=512,ew=",",tw="=",qo=class r{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let o=this._clone();return o._internalState.has(e)&&o._internalState.delete(e),o._internalState.set(e,t),o}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+tw+this.get(t)),e),[]).join(ew)}_parse(e){e.length>BZ||(this._internalState=e.split(ew).reverse().reduce((t,o)=>{let s=o.trim(),a=s.indexOf(tw);if(a!==-1){let i=s.slice(0,a),n=s.slice(a+1,o.length);WM(i)&&JM(n)&&t.set(i,n)}return t},new Map),this._internalState.size>ZM&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,ZM))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new r;return e._internalState=new Map(this._internalState),e}}});function ET(r){let e=jZ.exec(r);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var cl,ul,VZ,FZ,GZ,HZ,qZ,jZ,gf,rw=p(()=>{P();nl();_T();cl="traceparent",ul="tracestate",VZ="00",FZ="(?!ff)[\\da-f]{2}",GZ="(?![0]{32})[\\da-f]{32}",HZ="(?![0]{16})[\\da-f]{16}",qZ="[\\da-f]{2}",jZ=new RegExp(`^\\s?(${FZ})-(${GZ})-(${HZ})-(${qZ})(-.*)?\\s?$`);gf=class{inject(e,t,o){let s=ie.getSpanContext(e);if(!s||At(e)||!xe(s))return;let a=`${VZ}-${s.traceId}-${s.spanId}-0${Number(s.traceFlags||se.NONE).toString(16)}`;o.set(t,cl,a),s.traceState&&o.set(t,ul,s.traceState.serialize())}extract(e,t,o){let s=o.get(t,cl);if(!s)return e;let a=Array.isArray(s)?s[0]:s;if(typeof a!="string")return e;let i=ET(a);if(!i)return e;i.isRemote=!0;let n=o.get(t,ul);if(n){let l=Array.isArray(n)?n.join(","):n;i.traceState=new qo(typeof l=="string"?l:void 0)}return ie.setSpanContext(e,i)}fields(){return[cl,ul]}}});function nw(r,e){return r.setValue(mT,e)}function iw(r){return r.deleteValue(mT)}function ow(r){return r.getValue(mT)}var mT,vf,sw=p(()=>{P();mT=De("OpenTelemetry SDK Context Key RPC_METADATA");(function(r){r.HTTP="http"})(vf||(vf={}))});var Ai,TT=p(()=>{P();Ai=class{shouldSample(){return{decision:ke.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}});var Ln,ST=p(()=>{P();Ln=class{shouldSample(){return{decision:ke.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}});var yf,aw=p(()=>{P();iT();TT();ST();yf=class{constructor(e){var t,o,s,a;this._root=e.root,this._root||(af(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Ln),this._remoteParentSampled=(t=e.remoteParentSampled)!==null&&t!==void 0?t:new Ln,this._remoteParentNotSampled=(o=e.remoteParentNotSampled)!==null&&o!==void 0?o:new Ai,this._localParentSampled=(s=e.localParentSampled)!==null&&s!==void 0?s:new Ln,this._localParentNotSampled=(a=e.localParentNotSampled)!==null&&a!==void 0?a:new Ai}shouldSample(e,t,o,s,a,i){let n=ie.getSpanContext(e);return!n||!xe(n)?this._root.shouldSample(e,t,o,s,a,i):n.isRemote?n.traceFlags&se.SAMPLED?this._remoteParentSampled.shouldSample(e,t,o,s,a,i):this._remoteParentNotSampled.shouldSample(e,t,o,s,a,i):n.traceFlags&se.SAMPLED?this._localParentSampled.shouldSample(e,t,o,s,a,i):this._localParentNotSampled.shouldSample(e,t,o,s,a,i)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}});var Of,lw=p(()=>{P();Of=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:Mt(t)&&this._accumulate(t)=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let o=0;o>>0}return t}}});function JZ(r,e){return function(t){return r(e(t))}}function gT(r){if(!QZ(r)||ZZ(r)!==YZ)return!1;let e=WZ(r);if(e===null)return!0;let t=fw.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&cw.call(t)===XZ}function QZ(r){return r!=null&&typeof r=="object"}function ZZ(r){return r==null?r===void 0?KZ:zZ:Ri&&Ri in Object(r)?eee(r):tee(r)}function eee(r){let e=fw.call(r,Ri),t=r[Ri],o=!1;try{r[Ri]=void 0,o=!0}catch{}let s=pw.call(r);return o&&(e?r[Ri]=t:delete r[Ri]),s}function tee(r){return pw.call(r)}var YZ,zZ,KZ,$Z,cw,XZ,WZ,uw,fw,Ri,pw,dw=p(()=>{YZ="[object Object]",zZ="[object Null]",KZ="[object Undefined]",$Z=Function.prototype,cw=$Z.toString,XZ=cw.call(Object),WZ=JZ(Object.getPrototypeOf,Object),uw=Object.prototype,fw=uw.hasOwnProperty,Ri=Symbol?Symbol.toStringTag:void 0,pw=uw.toString});function _w(...r){let e=r.shift(),t=new WeakMap;for(;r.length>0;)e=Ew(e,r.shift(),0,t);return e}function vT(r){return Rf(r)?r.slice():r}function Ew(r,e,t=0,o){let s;if(!(t>ree)){if(t++,Af(r)||Af(e)||mw(e))s=vT(e);else if(Rf(r)){if(s=r.slice(),Rf(e))for(let a=0,i=e.length;a"u"?delete s[l]:s[l]=c;else{let u=s[l],f=c;if(hw(r,l,o)||hw(e,l,o))delete s[l];else{if(fl(u)&&fl(f)){let _=o.get(u)||[],m=o.get(f)||[];_.push({obj:r,key:l}),m.push({obj:e,key:l}),o.set(u,_),o.set(f,m)}s[l]=Ew(s[l],c,t,o)}}}}else s=e;return s}}function hw(r,e,t){let o=t.get(r[e])||[];for(let s=0,a=o.length;s"u"||r instanceof Date||r instanceof RegExp||r===null}function nee(r,e){return!(!gT(r)||!gT(e))}var ree,Tw=p(()=>{dw();ree=20});function Sw(r,e){let t,o=new Promise(function(a,i){t=setTimeout(function(){i(new pl("Operation timed out."))},e)});return Promise.race([r,o]).then(s=>(clearTimeout(t),s),s=>{throw clearTimeout(t),s})}var pl,gw=p(()=>{pl=class r extends Error{constructor(e){super(e),Object.setPrototypeOf(this,r.prototype)}}});function yT(r,e){return typeof e=="string"?r===e:!!r.match(e)}function vw(r,e){if(!e)return!1;for(let t of e)if(yT(r,t))return!0;return!1}var yw=p(()=>{});function Ow(r){return typeof r=="function"&&typeof r.__original=="function"&&typeof r.__unwrap=="function"&&r.__wrapped===!0}var Aw=p(()=>{});var Nf,Rw=p(()=>{Nf=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 Cf,Nw=p(()=>{Rw();Cf=class{constructor(e,t){this._callback=e,this._that=t,this._isCalled=!1,this._deferred=new Nf}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 Cw(r,e){return new Promise(t=>{he.with(Qu(he.active()),()=>{r.export(e,o=>{t(o)})})})}var Pw=p(()=>{P();nl()});var Pf={};Ae(Pf,{AlwaysOffSampler:()=>Ai,AlwaysOnSampler:()=>Ln,AnchoredClock:()=>of,BindOnceFuture:()=>Cf,CompositePropagator:()=>Sf,DEFAULT_ATTRIBUTE_COUNT_LIMIT:()=>sl,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>ol,DEFAULT_ENVIRONMENT:()=>al,DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:()=>sT,DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:()=>aT,ExportResultCode:()=>Tf,ParentBasedSampler:()=>yf,RPCType:()=>vf,RandomIdGenerator:()=>Go,SDK_INFO:()=>bn,TRACE_PARENT_HEADER:()=>cl,TRACE_STATE_HEADER:()=>ul,TimeoutError:()=>pl,TraceIdRatioBasedSampler:()=>Of,TraceState:()=>qo,TracesSamplerValues:()=>Vo,VERSION:()=>df,W3CBaggagePropagator:()=>nf,W3CTraceContextPropagator:()=>gf,_globalThis:()=>cf,addHrTimes:()=>dT,baggageUtils:()=>iee,callWithTimeout:()=>Sw,deleteRPCMetadata:()=>iw,getEnv:()=>Fo,getEnvWithoutDefaults:()=>lf,getRPCMetadata:()=>ow,getTimeOrigin:()=>Ef,globalErrorHandler:()=>af,hexToBase64:()=>ff,hexToBinary:()=>uf,hrTime:()=>pT,hrTimeDuration:()=>GM,hrTimeToMicroseconds:()=>YM,hrTimeToMilliseconds:()=>jM,hrTimeToNanoseconds:()=>qM,hrTimeToTimeStamp:()=>HM,internal:()=>oee,isAttributeKey:()=>tT,isAttributeValue:()=>rT,isTimeInput:()=>zM,isTimeInputHrTime:()=>mf,isTracingSuppressed:()=>At,isUrlIgnored:()=>vw,isWrapped:()=>Ow,loggingErrorHandler:()=>sf,merge:()=>_w,millisToHrTime:()=>Ho,otperformance:()=>In,parseEnvironment:()=>ll,parseTraceParent:()=>ET,sanitizeAttributes:()=>AM,setGlobalErrorHandler:()=>PM,setRPCMetadata:()=>nw,suppressTracing:()=>Qu,timeInputToHrTime:()=>FM,unrefTimer:()=>hf,unsuppressTracing:()=>TM,urlMatches:()=>yT});var iee,oee,xr=p(()=>{yM();OM();NM();iT();nT();KM();cT();$M();eT();fT();XM();rw();sw();TT();ST();aw();lw();nl();_T();lT();Tw();oT();gw();yw();Aw();Nw();uT();Pw();iee={getKeyPairs:rf,serializeKeyPairs:tf,parseKeyPairsIntoRecord:vM,parsePairKeyValue:il},oee={_export:Cw}});var If,Iw=p(()=>{(function(r){r[r.UNSPECIFIED=0]="UNSPECIFIED",r[r.TRACE=1]="TRACE",r[r.TRACE2=2]="TRACE2",r[r.TRACE3=3]="TRACE3",r[r.TRACE4=4]="TRACE4",r[r.DEBUG=5]="DEBUG",r[r.DEBUG2=6]="DEBUG2",r[r.DEBUG3=7]="DEBUG3",r[r.DEBUG4=8]="DEBUG4",r[r.INFO=9]="INFO",r[r.INFO2=10]="INFO2",r[r.INFO3=11]="INFO3",r[r.INFO4=12]="INFO4",r[r.WARN=13]="WARN",r[r.WARN2=14]="WARN2",r[r.WARN3=15]="WARN3",r[r.WARN4=16]="WARN4",r[r.ERROR=17]="ERROR",r[r.ERROR2=18]="ERROR2",r[r.ERROR3=19]="ERROR3",r[r.ERROR4=20]="ERROR4",r[r.FATAL=21]="FATAL",r[r.FATAL2=22]="FATAL2",r[r.FATAL3=23]="FATAL3",r[r.FATAL4=24]="FATAL4"})(If||(If={}))});var Ni,jo,bf=p(()=>{Ni=class{emit(e){}},jo=new Ni});var dl,Yo,Lf=p(()=>{bf();dl=class{getLogger(e,t,o){return new Ni}},Yo=new dl});var zo,OT=p(()=>{bf();zo=class{constructor(e,t,o,s){this._provider=e,this.name=t,this.version=o,this.options=s}emit(e){this._getLogger().emit(e)}_getLogger(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):jo}}});var Ci,AT=p(()=>{Lf();OT();Ci=class{getLogger(e,t,o){var s;return(s=this.getDelegateLogger(e,t,o))!==null&&s!==void 0?s:new zo(this,e,t,o)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:Yo}setDelegate(e){this._delegate=e}getDelegateLogger(e,t,o){var s;return(s=this._delegate)===null||s===void 0?void 0:s.getLogger(e,t,o)}}});var xf,bw=p(()=>{xf=typeof globalThis=="object"?globalThis:global});var Lw=p(()=>{bw()});var xw=p(()=>{Lw()});function Mw(r,e,t){return o=>o===r?e:t}var hl,Ko,RT,ww=p(()=>{xw();hl=Symbol.for("io.opentelemetry.js.api.logs"),Ko=xf;RT=1});var Mf,Dw=p(()=>{ww();Lf();AT();Mf=class r{constructor(){this._proxyLoggerProvider=new Ci}static getInstance(){return this._instance||(this._instance=new r),this._instance}setGlobalLoggerProvider(e){return Ko[hl]?this.getLoggerProvider():(Ko[hl]=Mw(RT,e,Yo),this._proxyLoggerProvider.setDelegate(e),e)}getLoggerProvider(){var e,t;return(t=(e=Ko[hl])===null||e===void 0?void 0:e.call(Ko,RT))!==null&&t!==void 0?t:this._proxyLoggerProvider}getLogger(e,t,o){return this.getLoggerProvider().getLogger(e,t,o)}disable(){delete Ko[hl],this._proxyLoggerProvider=new Ci}}});var Uw={};Ae(Uw,{NOOP_LOGGER:()=>jo,NOOP_LOGGER_PROVIDER:()=>Yo,NoopLogger:()=>Ni,NoopLoggerProvider:()=>dl,ProxyLogger:()=>zo,ProxyLoggerProvider:()=>Ci,SeverityNumber:()=>If,logs:()=>_l});var _l,El=p(()=>{Iw();bf();Lf();OT();AT();Dw();_l=Mf.getInstance()});function kw(r){return r.setValue(see,!0)}var see,Bw=p(()=>{P();see=De("OpenTelemetry SDK Context Key SUPPRESS_TRACING")});function wf(r){return r==null?!0:Array.isArray(r)?aee(r):Vw(r)}function aee(r){let e;for(let t of r)if(t!=null){if(!e){if(Vw(t)){e=typeof t;continue}return!1}if(typeof t!==e)return!1}return!0}function Vw(r){switch(typeof r){case"number":case"boolean":case"string":return!0}return!1}var Fw=p(()=>{});function Gw(){return r=>{S.error(lee(r))}}function lee(r){return typeof r=="string"?r:JSON.stringify(cee(r))}function cee(r){let e={},t=r;for(;t!==null;)Object.getOwnPropertyNames(t).forEach(o=>{if(e[o])return;let s=t[o];s&&(e[o]=String(s))}),t=Object.getPrototypeOf(t);return e}var Hw=p(()=>{P()});function Mr(r){try{uee(r)}catch{}}var uee,qw=p(()=>{Hw();uee=Gw()});var Df,jw=p(()=>{(function(r){r.AlwaysOff="always_off",r.AlwaysOn="always_on",r.ParentBasedAlwaysOff="parentbased_always_off",r.ParentBasedAlwaysOn="parentbased_always_on",r.ParentBasedTraceIdRatio="parentbased_traceidratio",r.TraceIdRatio="traceidratio"})(Df||(Df={}))});function dee(r){return pee.indexOf(r)>-1}function _ee(r){return hee.indexOf(r)>-1}function mee(r){return Eee.indexOf(r)>-1}function Tee(r,e,t){if(typeof t[r]>"u")return;let o=String(t[r]);e[r]=o.toLowerCase()==="true"}function See(r,e,t,o=-1/0,s=1/0){if(typeof t[r]<"u"){let a=Number(t[r]);isNaN(a)||(as?e[r]=s:e[r]=a)}}function gee(r,e,t,o=fee){let s=t[r];typeof s=="string"&&(e[r]=s.split(o).map(a=>a.trim()))}function yee(r,e,t){let o=t[r];if(typeof o=="string"){let s=vee[o.toUpperCase()];s!=null&&(e[r]=s)}}function kf(r){let e={};for(let t in Uf){let o=t;switch(o){case"OTEL_LOG_LEVEL":yee(o,e,r);break;default:if(dee(o))Tee(o,e,r);else if(_ee(o))See(o,e,r);else if(mee(o))gee(o,e,r);else{let s=r[o];typeof s<"u"&&s!==null&&(e[o]=String(s))}}}return e}var fee,pee,hee,Eee,$o,Xo,Yw,zw,Uf,vee,NT=p(()=>{P();jw();fee=",",pee=["OTEL_SDK_DISABLED"];hee=["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"];Eee=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];$o=1/0,Xo=128,Yw=128,zw=128,Uf={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:H.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:$o,OTEL_ATTRIBUTE_COUNT_LIMIT:Xo,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:$o,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Xo,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:$o,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Xo,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Yw,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:zw,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Df.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};vee={ALL:H.ALL,VERBOSE:H.VERBOSE,DEBUG:H.DEBUG,INFO:H.INFO,WARN:H.WARN,ERROR:H.ERROR,NONE:H.NONE}});function xn(){let r=kf(process.env);return Object.assign({},Uf,r)}function ml(){return kf(process.env)}var Kw=p(()=>{NT()});import{performance as Oee}from"perf_hooks";var Pi,$w=p(()=>{Pi=Oee});var Xw,Ww=p(()=>{Xw="1.29.0"});var Ii,Jw=p(()=>{Ww();Ve();Ii={[Se]:"opentelemetry",[st]:"node",[ge]:wt,[ve]:Xw}});function Tl(r){r.unref()}var Qw=p(()=>{});var Zw=p(()=>{Kw();$w();Jw();Qw()});var CT=p(()=>{Zw()});function Sl(r){let e=r/1e3,t=Math.trunc(e),o=Math.round(r%1e3*Iee);return[t,o]}function PT(){let r=Pi.timeOrigin;if(typeof r!="number"){let e=Pi;r=e.timing&&e.timing.fetchStart}return r}function t1(r){let e=Sl(PT()),t=Sl(typeof r=="number"?r:Pi.now());return n1(e,t)}function Bf(r){if(r1(r))return r;if(typeof r=="number")return r=e1&&(t[1]-=e1,t[0]+=1),t}var Cee,Pee,Iee,e1,i1=p(()=>{CT();Cee=9,Pee=6,Iee=Math.pow(10,Pee),e1=Math.pow(10,Cee)});var Yt,o1=p(()=>{(function(r){r[r.SUCCESS=0]="SUCCESS",r[r.FAILED=1]="FAILED"})(Yt||(Yt={}))});function Uee(r,e){return function(t){return r(e(t))}}function bT(r){if(!kee(r)||Bee(r)!==bee)return!1;let e=Dee(r);if(e===null)return!0;let t=l1.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&s1.call(t)===wee}function kee(r){return r!=null&&typeof r=="object"}function Bee(r){return r==null?r===void 0?xee:Lee:bi&&bi in Object(r)?Vee(r):Fee(r)}function Vee(r){let e=l1.call(r,bi),t=r[bi],o=!1;try{r[bi]=void 0,o=!0}catch{}let s=c1.call(r);return o&&(e?r[bi]=t:delete r[bi]),s}function Fee(r){return c1.call(r)}var bee,Lee,xee,Mee,s1,wee,Dee,a1,l1,bi,c1,u1=p(()=>{bee="[object Object]",Lee="[object Null]",xee="[object Undefined]",Mee=Function.prototype,s1=Mee.toString,wee=s1.call(Object),Dee=Uee(Object.getPrototypeOf,Object),a1=Object.prototype,l1=a1.hasOwnProperty,bi=Symbol?Symbol.toStringTag:void 0,c1=a1.toString});function xT(...r){let e=r.shift(),t=new WeakMap;for(;r.length>0;)e=p1(e,r.shift(),0,t);return e}function LT(r){return Ff(r)?r.slice():r}function p1(r,e,t=0,o){let s;if(!(t>Gee)){if(t++,Vf(r)||Vf(e)||d1(e))s=LT(e);else if(Ff(r)){if(s=r.slice(),Ff(e))for(let a=0,i=e.length;a"u"?delete s[l]:s[l]=c;else{let u=s[l],f=c;if(f1(r,l,o)||f1(e,l,o))delete s[l];else{if(gl(u)&&gl(f)){let _=o.get(u)||[],m=o.get(f)||[];_.push({obj:r,key:l}),m.push({obj:e,key:l}),o.set(u,_),o.set(f,m)}s[l]=p1(s[l],c,t,o)}}}}else s=e;return s}}function f1(r,e,t){let o=t.get(r[e])||[];for(let s=0,a=o.length;s"u"||r instanceof Date||r instanceof RegExp||r===null}function Hee(r,e){return!(!bT(r)||!bT(e))}var Gee,h1=p(()=>{u1();Gee=20});function vl(r,e){let t,o=new Promise(function(a,i){t=setTimeout(function(){i(new Gf("Operation timed out."))},e)});return Promise.race([r,o]).then(s=>(clearTimeout(t),s),s=>{throw clearTimeout(t),s})}var Gf,_1=p(()=>{Gf=class r extends Error{constructor(e){super(e),Object.setPrototypeOf(this,r.prototype)}}});var Hf,E1=p(()=>{Hf=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 un,m1=p(()=>{E1();un=class{constructor(e,t){this._callback=e,this._that=t,this._isCalled=!1,this._deferred=new Hf}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 T1(r,e){return new Promise(t=>{he.with(kw(he.active()),()=>{r.export(e,o=>{t(o)})})})}var S1=p(()=>{P();Bw()});var qf,cr=p(()=>{Fw();qw();i1();o1();CT();NT();h1();_1();m1();S1();qf={_export:T1}});function jf(){return`unknown_service:${process.argv0}`}var g1=p(()=>{});var v1=p(()=>{g1()});var y1=p(()=>{v1()});var Mn,O1=p(()=>{P();Ve();cr();y1();Mn=class r{constructor(e,t){var o;this._attributes=e,this.asyncAttributesPending=t!=null,this._syncAttributes=(o=this._attributes)!==null&&o!==void 0?o:{},this._asyncAttributesPromise=t==null?void 0:t.then(s=>(this._attributes=Object.assign({},this._attributes,s),this.asyncAttributesPending=!1,s),s=>(S.debug("a resource's async attributes promise rejected: %s",s),this.asyncAttributesPending=!1,{}))}static empty(){return r.EMPTY}static default(){return new r({[at]:jf(),[ge]:Ii[ge],[Se]:Ii[Se],[ve]:Ii[ve]})}get attributes(){var e;return this.asyncAttributesPending&&S.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 o=Object.assign(Object.assign({},this._syncAttributes),(t=e._syncAttributes)!==null&&t!==void 0?t:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new r(o);let s=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(([a,i])=>{var n;return Object.assign(Object.assign(Object.assign(Object.assign({},this._syncAttributes),a),(n=e._syncAttributes)!==null&&n!==void 0?n:e.attributes),i)});return new r(o,s)}};Mn.EMPTY=new Mn({})});var A1=p(()=>{O1()});var Wo,MT=p(()=>{P();P();cr();Wo=class{constructor(e,t,o){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;let{timestamp:s,observedTimestamp:a,severityNumber:i,severityText:n,body:l,attributes:c={},context:u}=o,f=Date.now();if(this.hrTime=Bf(s??f),this.hrTimeObserved=Bf(a??f),u){let _=ie.getSpanContext(u);_&&xe(_)&&(this.spanContext=_)}this.severityNumber=i,this.severityText=n,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?(S.warn(`Invalid attribute key: ${e}`),this):!wf(t)&&!(typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length>0)?(S.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&&S.warn("Dropping extra attributes."),this):(wf(t)?this.attributes[e]=this._truncateToSize(t):this.attributes[e]=t,this))}setAttributes(e){for(let[t,o]of Object.entries(e))this.setAttribute(t,o);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?(S.warn(`Attribute value limit must be positive, got ${t}`),e):typeof e=="string"?this._truncateToLimitUtil(e,t):Array.isArray(e)?e.map(o=>typeof o=="string"?this._truncateToLimitUtil(o,t):o):e}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substring(0,t)}_isLogRecordReadonly(){return this._isReadonly&&S.warn("Can not execute the operation on emitted log record"),this._isReadonly}}});var Yf,R1=p(()=>{P();MT();Yf=class{constructor(e,t){this.instrumentationScope=e,this._sharedState=t}emit(e){let t=e.context||he.active(),o=new Wo(this._sharedState,this.instrumentationScope,Object.assign({context:t},e));this._sharedState.activeProcessor.onEmit(o,t),o._makeReadonly()}}});function N1(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:xn().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:xn().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0,mergeResourceWithDefaults:!0}}function C1(r){var e,t,o,s,a,i;let n=ml();return{attributeCountLimit:(o=(t=(e=r.attributeCountLimit)!==null&&e!==void 0?e:n.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&t!==void 0?t:n.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:Xo,attributeValueLengthLimit:(i=(a=(s=r.attributeValueLengthLimit)!==null&&s!==void 0?s:n.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&a!==void 0?a:n.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&i!==void 0?i:$o}}var P1=p(()=>{cr()});var zf,I1=p(()=>{cr();zf=class{constructor(e,t){this.processors=e,this.forceFlushTimeoutMillis=t}async forceFlush(){let e=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(t=>vl(t.forceFlush(),e)))}onEmit(e,t){this.processors.forEach(o=>o.onEmit(e,t))}async shutdown(){await Promise.all(this.processors.map(e=>e.shutdown()))}}});var Jo,wT=p(()=>{Jo=class{forceFlush(){return Promise.resolve()}onEmit(e,t){}shutdown(){return Promise.resolve()}}});var Kf,b1=p(()=>{wT();Kf=class{constructor(e,t,o){this.resource=e,this.forceFlushTimeoutMillis=t,this.logRecordLimits=o,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new Jo}}});function jee(r,e){let t=e??Mn.empty();return r?Mn.default().merge(t):t}var qee,$f,L1=p(()=>{P();El();A1();cr();R1();P1();I1();b1();qee="unknown";$f=class{constructor(e={}){let t=xT({},N1(),e),o=jee(t.mergeResourceWithDefaults,e.resource);this._sharedState=new Kf(o,t.forceFlushTimeoutMillis,C1(t.logRecordLimits)),this._shutdownOnce=new un(this._shutdown,this)}getLogger(e,t,o){if(this._shutdownOnce.isCalled)return S.warn("A shutdown LoggerProvider cannot provide a Logger"),jo;e||S.warn("Logger requested without instrumentation scope name.");let s=e||qee,a=`${s}@${t||""}:${(o==null?void 0:o.schemaUrl)||""}`;return this._sharedState.loggers.has(a)||this._sharedState.loggers.set(a,new Yf({name:s,version:t,schemaUrl:o==null?void 0:o.schemaUrl},this._sharedState)),this._sharedState.loggers.get(a)}addLogRecordProcessor(e){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(t=>S.error("Error while trying to shutdown current log record processor",t)),this._sharedState.registeredLogRecordProcessors.push(e),this._sharedState.activeProcessor=new zf(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)}forceFlush(){return this._shutdownOnce.isCalled?(S.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(S.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}}});var Xf,x1=p(()=>{cr();cr();Xf=class{export(e,t){this._sendLogRecords(e,t)}shutdown(){return Promise.resolve()}_exportInfo(e){var t,o,s;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationScope,timestamp:IT(e.hrTime),traceId:(t=e.spanContext)===null||t===void 0?void 0:t.traceId,spanId:(o=e.spanContext)===null||o===void 0?void 0:o.spanId,traceFlags:(s=e.spanContext)===null||s===void 0?void 0:s.traceFlags,severityText:e.severityText,severityNumber:e.severityNumber,body:e.body,attributes:e.attributes}}_sendLogRecords(e,t){for(let o of e)console.dir(this._exportInfo(o),{depth:3});t==null||t({code:Yt.SUCCESS})}}});var Wf,M1=p(()=>{cr();Wf=class{constructor(e){this._exporter=e,this._shutdownOnce=new un(this._shutdown,this),this._unresolvedExports=new Set}onEmit(e){var t,o;if(this._shutdownOnce.isCalled)return;let s=()=>qf._export(this._exporter,[e]).then(a=>{var i;a.code!==Yt.SUCCESS&&Mr((i=a.error)!==null&&i!==void 0?i:new Error(`SimpleLogRecordProcessor: log record export failed (status ${a})`))}).catch(Mr);if(e.resource.asyncAttributesPending){let a=(o=(t=e.resource).waitForAsyncAttributes)===null||o===void 0?void 0:o.call(t).then(()=>(this._unresolvedExports.delete(a),s()),Mr);a!=null&&this._unresolvedExports.add(a)}else s()}async forceFlush(){await Promise.all(Array.from(this._unresolvedExports))}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}}});var Jf,w1=p(()=>{cr();Jf=class{constructor(){this._finishedLogRecords=[],this._stopped=!1}export(e,t){if(this._stopped)return t({code:Yt.FAILED,error:new Error("Exporter has been stopped")});this._finishedLogRecords.push(...e),t({code:Yt.SUCCESS})}shutdown(){return this._stopped=!0,this.reset(),Promise.resolve()}getFinishedLogRecords(){return this._finishedLogRecords}reset(){this._finishedLogRecords=[]}}});var Qf,D1=p(()=>{P();cr();Qf=class{constructor(e,t){var o,s,a,i;this._exporter=e,this._finishedLogRecords=[];let n=xn();this._maxExportBatchSize=(o=t==null?void 0:t.maxExportBatchSize)!==null&&o!==void 0?o:n.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=(s=t==null?void 0:t.maxQueueSize)!==null&&s!==void 0?s:n.OTEL_BLRP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=(a=t==null?void 0:t.scheduledDelayMillis)!==null&&a!==void 0?a:n.OTEL_BLRP_SCHEDULE_DELAY,this._exportTimeoutMillis=(i=t==null?void 0:t.exportTimeoutMillis)!==null&&i!==void 0?i:n.OTEL_BLRP_EXPORT_TIMEOUT,this._shutdownOnce=new un(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(S.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 o=[],s=Math.ceil(this._finishedLogRecords.length/this._maxExportBatchSize);for(let a=0;a{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),this._finishedLogRecords.length===0?Promise.resolve():new Promise((e,t)=>{vl(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=>{Mr(e)})},this._scheduledDelayMillis),Tl(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}_export(e){let t=()=>qf._export(this._exporter,e).then(s=>{var a;s.code!==Yt.SUCCESS&&Mr((a=s.error)!==null&&a!==void 0?a:new Error(`BatchLogRecordProcessor: log record export failed (status ${s})`))}).catch(Mr),o=e.map(s=>s.resource).filter(s=>s.asyncAttributesPending);return o.length===0?t():Promise.all(o.map(s=>{var a;return(a=s.waitForAsyncAttributes)===null||a===void 0?void 0:a.call(s)})).then(t,Mr)}}});var Qo,U1=p(()=>{D1();Qo=class extends Qf{onShutdown(){}}});var k1=p(()=>{U1()});var B1=p(()=>{k1()});var DT={};Ae(DT,{BatchLogRecordProcessor:()=>Qo,ConsoleLogRecordExporter:()=>Xf,InMemoryLogRecordExporter:()=>Jf,LogRecord:()=>Wo,LoggerProvider:()=>$f,NoopLogRecordProcessor:()=>Jo,SimpleLogRecordProcessor:()=>Wf});var UT=p(()=>{L1();MT();wT();x1();M1();w1();B1()});var ur,Zf=p(()=>{(function(r){r[r.DELTA=0]="DELTA",r[r.CUMULATIVE=1]="CUMULATIVE"})(ur||(ur={}))});var lt,Zo=p(()=>{(function(r){r[r.HISTOGRAM=0]="HISTOGRAM",r[r.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",r[r.GAUGE=2]="GAUGE",r[r.SUM=3]="SUM"})(lt||(lt={}))});function V1(r){return r!=null}function ep(r){let e=Object.keys(r);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(t=>[t,r[t]])))}function F1(r){var e,t;return`${r.name}:${(e=r.version)!==null&&e!==void 0?e:""}:${(t=r.schemaUrl)!==null&&t!==void 0?t:""}`}function wn(r,e){let t,o=new Promise(function(a,i){t=setTimeout(function(){i(new Li("Operation timed out."))},e)});return Promise.race([r,o]).then(s=>(clearTimeout(t),s),s=>{throw clearTimeout(t),s})}async function G1(r){return Promise.all(r.map(async e=>{try{return{status:"fulfilled",value:await e}}catch(t){return{status:"rejected",reason:t}}}))}function H1(r){return r.status==="rejected"}function kT(r,e){let t=[];return r.forEach(o=>{t.push(...e(o))}),t}function q1(r,e){if(r.size!==e.size)return!1;for(let t of r)if(!e.has(t))return!1;return!0}function j1(r,e){let t=0,o=r.length-1,s=r.length;for(;o>=t;){let a=t+Math.trunc((o-t)/2);r[a]{Li=class r extends Error{constructor(e){super(e),Object.setPrototypeOf(this,r.prototype)}}});var zt,es=p(()=>{(function(r){r[r.DROP=0]="DROP",r[r.SUM=1]="SUM",r[r.LAST_VALUE=2]="LAST_VALUE",r[r.HISTOGRAM=3]="HISTOGRAM",r[r.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(zt||(zt={}))});var yl,z1=p(()=>{es();yl=class{constructor(){this.kind=zt.DROP}createAccumulation(){}merge(e,t){}diff(e,t){}toMetricData(e,t,o,s){}}});function wr(r,e,t){var o,s,a,i;return zee(r)||S.warn(`Invalid metric name: "${r}". The metric name should be a ASCII string with a length no greater than 255 characters.`),{name:r,type:e,description:(o=t==null?void 0:t.description)!==null&&o!==void 0?o:"",unit:(s=t==null?void 0:t.unit)!==null&&s!==void 0?s:"",valueType:(a=t==null?void 0:t.valueType)!==null&&a!==void 0?a:Ot.DOUBLE,advice:(i=t==null?void 0:t.advice)!==null&&i!==void 0?i:{}}}function K1(r,e){var t,o;return{name:(t=r.name)!==null&&t!==void 0?t:e.name,description:(o=r.description)!==null&&o!==void 0?o:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}function $1(r,e){return Y1(r.name,e.name)&&r.unit===e.unit&&r.type===e.type&&r.valueType===e.valueType}function zee(r){return r.match(Yee)!=null}var _e,Yee,fn=p(()=>{P();fr();(function(r){r.COUNTER="COUNTER",r.GAUGE="GAUGE",r.HISTOGRAM="HISTOGRAM",r.UP_DOWN_COUNTER="UP_DOWN_COUNTER",r.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",r.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",r.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(_e||(_e={}));Yee=/^[a-z][a-z0-9_.\-/]{0,254}$/i});function Kee(r){let e=r.map(()=>0);return e.push(0),{buckets:{boundaries:r,counts:e},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var ts,rs,X1=p(()=>{es();Zo();fn();fr();ts=class{constructor(e,t,o=!0,s=Kee(t)){this.startTime=e,this._boundaries=t,this._recordMinMax=o,this._current=s}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=j1(this._boundaries,e);this._current.buckets.counts[t]+=1}setStartTime(e){this.startTime=e}toPointValue(){return this._current}},rs=class{constructor(e,t){this._boundaries=e,this._recordMinMax=t,this.kind=zt.HISTOGRAM}createAccumulation(e){return new ts(e,this._boundaries,this._recordMinMax)}merge(e,t){let o=e.toPointValue(),s=t.toPointValue(),a=o.buckets.counts,i=s.buckets.counts,n=new Array(a.length);for(let u=0;u{let n=i.toPointValue(),l=e.type===_e.GAUGE||e.type===_e.UP_DOWN_COUNTER||e.type===_e.OBSERVABLE_GAUGE||e.type===_e.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:i.startTime,endTime:s,value:{min:n.hasMinMax?n.min:void 0,max:n.hasMinMax?n.max:void 0,sum:l?void 0:n.sum,buckets:n.buckets,count:n.count}}})}}}});var Ol,BT,W1=p(()=>{Ol=class r{constructor(e=new BT,t=0,o=0,s=0){this.backing=e,this.indexBase=t,this.indexStart=o,this.indexEnd=s}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=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,o=1<>=e,this.indexEnd>>=e,this.indexBase=this.indexStart}clone(){return new r(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))}},BT=class r{constructor(e=[0]){this._counts=e}get length(){return this._counts.length}countAt(e){return this._counts[e]}growTo(e,t,o){let s=new Array(e).fill(0);s.splice(o,this._counts.length-t,...this._counts.slice(t)),s.splice(0,t,...this._counts.slice(0,t)),this._counts=s}reverse(e,t){let o=Math.floor((e+t)/2)-e;for(let s=0;s=t?this._counts[e]-=t:this._counts[e]=0}clone(){return new r([...this._counts])}}});function tp(r){let e=new DataView(new ArrayBuffer(8));return e.setFloat64(0,r),((e.getUint32(0)&2146435072)>>20)-1023}function rp(r){let e=new DataView(new ArrayBuffer(8));e.setFloat64(0,r);let t=e.getUint32(0),o=e.getUint32(4);return(t&1048575)*Math.pow(2,32)+o}var Al,VT=p(()=>{Al=Math.pow(2,-1022)});function Rl(r,e){return r===0||r===Number.POSITIVE_INFINITY||r===Number.NEGATIVE_INFINITY||Number.isNaN(r)?r:r*Math.pow(2,e)}function Q1(r){return r--,r|=r>>1,r|=r>>2,r|=r>>4,r|=r>>8,r|=r>>16,r++,r}var np=p(()=>{});var Dr,ip=p(()=>{Dr=class extends Error{}});var op,eD=p(()=>{VT();np();ip();op=class{constructor(e){this._shift=-e}mapToIndex(e){if(e>this._shift}lowerBoundary(e){let t=this._minNormalLowerBoundaryIndex();if(eo)throw new Dr(`overflow: ${e} is > maximum lower boundary: ${o}`);return Rl(1,e<>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 sp,tD=p(()=>{VT();np();ip();sp=class{constructor(e){this._scale=e,this._scaleFactor=Rl(Math.LOG2E,e),this._inverseFactor=Rl(Math.LN2,-e)}mapToIndex(e){if(e<=Al)return this._minNormalLowerBoundaryIndex()-1;if(rp(e)===0)return(tp(e)<=o?o:t}lowerBoundary(e){let t=this._maxNormalLowerBoundaryIndex();if(e>=t){if(e===t)return 2*Math.exp((e-(1< maximum lower boundary: ${t}`)}let o=this._minNormalLowerBoundaryIndex();if(e<=o){if(e===o)return Al;if(e===o-1)return Math.exp((e+(1<nD||r= ${rD} && <= ${nD}, got: ${r}`);return Xee[r+10]}var rD,nD,Xee,iD=p(()=>{eD();tD();ip();rD=-10,nD=20,Xee=Array.from({length:31},(r,e)=>e>10?new sp(e-10):new op(e-10))});var ns,Wee,Jee,qT,ap,Nl,oD=p(()=>{es();Zo();P();fn();W1();iD();np();ns=class r{constructor(e,t){this.low=e,this.high=t}static combine(e,t){return new r(Math.min(e.low,t.low),Math.max(e.high,t.high))}},Wee=20,Jee=160,qT=2,ap=class r{constructor(e=e,t=Jee,o=!0,s=0,a=0,i=0,n=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,c=new Ol,u=new Ol,f=HT(Wee)){this.startTime=e,this._maxSize=t,this._recordMinMax=o,this._sum=s,this._count=a,this._zeroCount=i,this._min=n,this._max=l,this._positive=c,this._negative=u,this._mapping=f,this._maxSizethis._max&&(this._max=e),e0?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.minthis.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 r(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,o){let s=this._mapping.mapToIndex(t),a=!1,i=0,n=0;if(e.length===0?(e.indexStart=s,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):s=this._maxSize?(a=!0,n=s,i=e.indexEnd):s>e.indexEnd&&s-e.indexStart>=this._maxSize&&(a=!0,n=e.indexStart,i=s),a){let l=this._changeScale(i,n);this._downscale(l),s=this._mapping.mapToIndex(t)}this._incrementIndexBy(e,s,o)}_incrementIndexBy(e,t,o){if(o===0)return;if(e.length===0&&(e.indexStart=e.indexEnd=e.indexBase=t),t=e.backing.length&&this._grow(e,a+1),e.indexStart=t}else if(t>e.indexEnd){let a=t-e.indexStart;a>=e.backing.length&&this._grow(e,a+1),e.indexEnd=t}let s=t-e.indexBase;s<0&&(s+=e.backing.length),e.incrementBucket(s,o)}_grow(e,t){let o=e.backing.length,s=e.indexBase-e.indexStart,a=o-s,i=Q1(t);i>this._maxSize&&(i=this._maxSize);let n=i-s;e.backing.growTo(i,a,n)}_changeScale(e,t){let o=0;for(;e-t>=this._maxSize;)e>>=1,t>>=1,o++;return o}_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=HT(t)}_minScale(e){let t=Math.min(this.scale,e.scale),o=ns.combine(this._highLowAtScale(this.positive,this.scale,t),this._highLowAtScale(e.positive,e.scale,t)),s=ns.combine(this._highLowAtScale(this.negative,this.scale,t),this._highLowAtScale(e.negative,e.scale,t));return Math.min(t-this._changeScale(o.high,o.low),t-this._changeScale(s.high,s.low))}_highLowAtScale(e,t,o){if(e.length===0)return new ns(0,-1);let s=t-o;return new ns(e.indexStart>>s,e.indexEnd>>s)}_mergeBuckets(e,t,o,s){let a=o.offset,i=t.scale-s;for(let n=0;n>i,o.at(n))}_diffBuckets(e,t,o,s){let a=o.offset,i=t.scale-s;for(let n=0;n>i)-e.indexBase;c<0&&(c+=e.backing.length),e.decrementBucket(c,o.at(n))}e.trim()}},Nl=class{constructor(e,t){this._maxSize=e,this._recordMinMax=t,this.kind=zt.EXPONENTIAL_HISTOGRAM}createAccumulation(e){return new ap(e,this._maxSize,this._recordMinMax)}merge(e,t){let o=t.clone();return o.merge(e),o}diff(e,t){let o=t.clone();return o.diff(e),o}toMetricData(e,t,o,s){return{descriptor:e,aggregationTemporality:t,dataPointType:lt.EXPONENTIAL_HISTOGRAM,dataPoints:o.map(([a,i])=>{let n=i.toPointValue(),l=e.type===_e.GAUGE||e.type===_e.UP_DOWN_COUNTER||e.type===_e.OBSERVABLE_GAUGE||e.type===_e.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:a,startTime:i.startTime,endTime:s,value:{min:n.hasMinMax?n.min:void 0,max:n.hasMinMax?n.max:void 0,sum:l?void 0:n.sum,positive:{offset:n.positive.offset,bucketCounts:n.positive.bucketCounts},negative:{offset:n.negative.offset,bucketCounts:n.negative.bucketCounts},count:n.count,scale:n.scale,zeroCount:n.zeroCount}}})}}}});function sD(r){return r.setValue(Qee,!0)}var Qee,aD=p(()=>{P();Qee=De("OpenTelemetry SDK Context Key SUPPRESS_TRACING")});function lD(){return r=>{S.error(Zee(r))}}function Zee(r){return typeof r=="string"?r:JSON.stringify(ete(r))}function ete(r){let e={},t=r;for(;t!==null;)Object.getOwnPropertyNames(t).forEach(o=>{if(e[o])return;let s=t[o];s&&(e[o]=String(s))}),t=Object.getPrototypeOf(t);return e}var cD=p(()=>{P()});function lp(r){try{tte(r)}catch{}}var tte,uD=p(()=>{cD();tte=lD()});var fD,pD=p(()=>{fD="1.29.0"});var xi,dD=p(()=>{pD();Ve();xi={[Se]:"opentelemetry",[st]:"node",[ge]:wt,[ve]:fD}});function Cl(r){r.unref()}var hD=p(()=>{});var _D=p(()=>{dD();hD()});var ED=p(()=>{_D()});function Mi(r){let e=r/1e3,t=Math.trunc(e),o=Math.round(r%1e3*ute);return[t,o]}function is(r){return r[0]*1e6+r[1]/1e3}var lte,cte,ute,FIe,mD=p(()=>{lte=9,cte=6,ute=Math.pow(10,cte),FIe=Math.pow(10,lte)});var pr,TD=p(()=>{(function(r){r[r.SUCCESS=0]="SUCCESS",r[r.FAILED=1]="FAILED"})(pr||(pr={}))});function SD(r,e){return new Promise(t=>{he.with(sD(he.active()),()=>{r.export(e,o=>{t(o)})})})}var gD=p(()=>{P();aD()});var vD,Dn=p(()=>{uD();mD();TD();ED();gD();vD={_export:SD}});var os,Pl,yD=p(()=>{es();Dn();Zo();os=class{constructor(e,t=0,o=[0,0]){this.startTime=e,this._current=t,this.sampleTime=o}record(e){this._current=e,this.sampleTime=Mi(Date.now())}setStartTime(e){this.startTime=e}toPointValue(){return this._current}},Pl=class{constructor(){this.kind=zt.LAST_VALUE}createAccumulation(e){return new os(e)}merge(e,t){let o=is(t.sampleTime)>=is(e.sampleTime)?t:e;return new os(e.startTime,o.toPointValue(),o.sampleTime)}diff(e,t){let o=is(t.sampleTime)>=is(e.sampleTime)?t:e;return new os(t.startTime,o.toPointValue(),o.sampleTime)}toMetricData(e,t,o,s){return{descriptor:e,aggregationTemporality:t,dataPointType:lt.GAUGE,dataPoints:o.map(([a,i])=>({attributes:a,startTime:i.startTime,endTime:s,value:i.toPointValue()}))}}}});var Un,ss,OD=p(()=>{es();Zo();Un=class{constructor(e,t,o=0,s=!1){this.startTime=e,this.monotonic=t,this._current=o,this.reset=s}record(e){this.monotonic&&e<0||(this._current+=e)}setStartTime(e){this.startTime=e}toPointValue(){return this._current}},ss=class{constructor(e){this.monotonic=e,this.kind=zt.SUM}createAccumulation(e){return new Un(e,this.monotonic)}merge(e,t){let o=e.toPointValue(),s=t.toPointValue();return t.reset?new Un(t.startTime,this.monotonic,s,t.reset):new Un(e.startTime,this.monotonic,o+s)}diff(e,t){let o=e.toPointValue(),s=t.toPointValue();return this.monotonic&&o>s?new Un(t.startTime,this.monotonic,s,!0):new Un(t.startTime,this.monotonic,s-o)}toMetricData(e,t,o,s){return{descriptor:e,aggregationTemporality:t,dataPointType:lt.SUM,dataPoints:o.map(([a,i])=>({attributes:a,startTime:i.startTime,endTime:s,value:i.toPointValue()})),isMonotonic:this.monotonic}}}});var AD=p(()=>{z1();X1();oD();yD();OD()});var mt,as,wi,ls,cs,Il,bl,Ll,RD,ND,CD,PD,fte,pte,cp=p(()=>{P();AD();fn();mt=class{static Drop(){return RD}static Sum(){return ND}static LastValue(){return CD}static Histogram(){return PD}static ExponentialHistogram(){return fte}static Default(){return pte}},as=class r extends mt{createAggregator(e){return r.DEFAULT_INSTANCE}};as.DEFAULT_INSTANCE=new yl;wi=class r extends mt{createAggregator(e){switch(e.type){case _e.COUNTER:case _e.OBSERVABLE_COUNTER:case _e.HISTOGRAM:return r.MONOTONIC_INSTANCE;default:return r.NON_MONOTONIC_INSTANCE}}};wi.MONOTONIC_INSTANCE=new ss(!0);wi.NON_MONOTONIC_INSTANCE=new ss(!1);ls=class r extends mt{createAggregator(e){return r.DEFAULT_INSTANCE}};ls.DEFAULT_INSTANCE=new Pl;cs=class r extends mt{createAggregator(e){return r.DEFAULT_INSTANCE}};cs.DEFAULT_INSTANCE=new rs([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0);Il=class extends mt{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((a,i)=>a-i);let o=e.lastIndexOf(-1/0),s=e.indexOf(1/0);s===-1&&(s=void 0),this._boundaries=e.slice(o+1,s)}createAggregator(e){return new rs(this._boundaries,this._recordMinMax)}},bl=class extends mt{constructor(e=160,t=!0){super(),this._maxSize=e,this._recordMinMax=t}createAggregator(e){return new Nl(this._maxSize,this._recordMinMax)}},Ll=class extends mt{_resolve(e){switch(e.type){case _e.COUNTER:case _e.UP_DOWN_COUNTER:case _e.OBSERVABLE_COUNTER:case _e.OBSERVABLE_UP_DOWN_COUNTER:return ND;case _e.GAUGE:case _e.OBSERVABLE_GAUGE:return CD;case _e.HISTOGRAM:return e.advice.explicitBucketBoundaries?new Il(e.advice.explicitBucketBoundaries):PD}return S.warn(`Unable to recognize instrument type: ${e.type}`),RD}createAggregator(e){return this._resolve(e).createAggregator(e)}},RD=new as,ND=new wi,CD=new ls,PD=new cs,fte=new bl,pte=new Ll});var ID,up,jT=p(()=>{cp();Zf();ID=r=>mt.Default(),up=r=>ur.CUMULATIVE});var us,YT=p(()=>{P();fr();jT();us=class{constructor(e){var t,o,s;this._shutdown=!1,this._aggregationSelector=(t=e==null?void 0:e.aggregationSelector)!==null&&t!==void 0?t:ID,this._aggregationTemporalitySelector=(o=e==null?void 0:e.aggregationTemporalitySelector)!==null&&o!==void 0?o:up,this._metricProducers=(s=e==null?void 0:e.metricProducers)!==null&&s!==void 0?s:[],this._cardinalitySelector=e==null?void 0:e.cardinalitySelector}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)}selectCardinalityLimit(e){return this._cardinalitySelector?this._cardinalitySelector(e):2e3}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,...o]=await Promise.all([this._sdkMetricProducer.collect({timeoutMillis:e==null?void 0:e.timeoutMillis}),...this._metricProducers.map(n=>n.collect({timeoutMillis:e==null?void 0:e.timeoutMillis}))]),s=t.errors.concat(kT(o,n=>n.errors)),a=t.resourceMetrics.resource,i=t.resourceMetrics.scopeMetrics.concat(kT(o,n=>n.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:a,scopeMetrics:i},errors:s}}async shutdown(e){if(this._shutdown){S.error("Cannot call shutdown twice.");return}(e==null?void 0:e.timeoutMillis)==null?await this.onShutdown():await wn(this.onShutdown(),e.timeoutMillis),this._shutdown=!0}async forceFlush(e){if(this._shutdown){S.warn("Cannot forceFlush on already shutdown MetricReader.");return}if((e==null?void 0:e.timeoutMillis)==null){await this.onForceFlush();return}await wn(this.onForceFlush(),e.timeoutMillis)}}});var fp,bD=p(()=>{P();Dn();YT();fr();fp=class extends us{constructor(e){var t,o,s,a;if(super({aggregationSelector:(t=e.exporter.selectAggregation)===null||t===void 0?void 0:t.bind(e.exporter),aggregationTemporalitySelector:(o=e.exporter.selectAggregationTemporality)===null||o===void 0?void 0:o.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.exportIntervalMillis0&&S.error("PeriodicExportingMetricReader: metrics collection errors",...s),o.resource.asyncAttributesPending)try{await((t=(e=o.resource).waitForAsyncAttributes)===null||t===void 0?void 0:t.call(e))}catch(i){S.debug("Error while resolving async portion of resource: ",i),lp(i)}let a=await vD._export(this._exporter,o);if(a.code!==pr.SUCCESS)throw new Error(`PeriodicExportingMetricReader: metrics export failed (error ${a.error})`)}onInitialized(){this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),Cl(this._interval)}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){this._interval&&clearInterval(this._interval),await this._exporter.shutdown()}}});var pp,LD=p(()=>{Dn();pp=class{constructor(e){this._shutdown=!1,this._metrics=[],this._aggregationTemporality=e}export(e,t){if(this._shutdown){setTimeout(()=>t({code:pr.FAILED}),0);return}this._metrics.push(e),setTimeout(()=>t({code:pr.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 dp,xD=p(()=>{Dn();jT();dp=class r{constructor(e){var t;this._shutdown=!1,this._temporalitySelector=(t=e==null?void 0:e.temporalitySelector)!==null&&t!==void 0?t:up}export(e,t){if(this._shutdown){setImmediate(t,{code:pr.FAILED});return}return r._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 o of e.scopeMetrics)for(let s of o.metrics)console.dir({descriptor:s.descriptor,dataPointType:s.dataPointType,dataPoints:s.dataPoints},{depth:null});t({code:pr.SUCCESS})}}});function hp(){return`unknown_service:${process.argv0}`}var MD=p(()=>{});var wD=p(()=>{MD()});var DD=p(()=>{wD()});var kn,UD=p(()=>{P();Ve();Dn();DD();kn=class r{constructor(e,t){var o;this._attributes=e,this.asyncAttributesPending=t!=null,this._syncAttributes=(o=this._attributes)!==null&&o!==void 0?o:{},this._asyncAttributesPromise=t==null?void 0:t.then(s=>(this._attributes=Object.assign({},this._attributes,s),this.asyncAttributesPending=!1,s),s=>(S.debug("a resource's async attributes promise rejected: %s",s),this.asyncAttributesPending=!1,{}))}static empty(){return r.EMPTY}static default(){return new r({[at]:hp(),[ge]:xi[ge],[Se]:xi[Se],[ve]:xi[ve]})}get attributes(){var e;return this.asyncAttributesPending&&S.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 o=Object.assign(Object.assign({},this._syncAttributes),(t=e._syncAttributes)!==null&&t!==void 0?t:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new r(o);let s=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(([a,i])=>{var n;return Object.assign(Object.assign(Object.assign(Object.assign({},this._syncAttributes),a),(n=e._syncAttributes)!==null&&n!==void 0?n:e.attributes),i)});return new r(o,s)}};kn.EMPTY=new kn({})});var kD=p(()=>{UD()});var _p,BD=p(()=>{_p=class{constructor(){this._registeredViews=[]}addView(e){this._registeredViews.push(e)}findViews(e,t){return this._registeredViews.filter(s=>this._matchInstrument(s.instrumentSelector,e)&&this._matchMeter(s.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 xl(r){return r instanceof ps}var fs,Ep,mp,Tp,Sp,ps,gp,vp,yp,Op=p(()=>{P();Dn();fs=class{constructor(e,t){this._writableMetricStorage=e,this._descriptor=t}_record(e,t={},o=he.active()){if(typeof e!="number"){S.warn(`non-number value provided to metric ${this._descriptor.name}: ${e}`);return}this._descriptor.valueType===Ot.INT&&!Number.isInteger(e)&&(S.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,o,Mi(Date.now()))}},Ep=class extends fs{add(e,t,o){this._record(e,t,o)}},mp=class extends fs{add(e,t,o){if(e<0){S.warn(`negative value provided to counter ${this._descriptor.name}: ${e}`);return}this._record(e,t,o)}},Tp=class extends fs{record(e,t,o){this._record(e,t,o)}},Sp=class extends fs{record(e,t,o){if(e<0){S.warn(`negative value provided to histogram ${this._descriptor.name}: ${e}`);return}this._record(e,t,o)}},ps=class{constructor(e,t,o){this._observableRegistry=o,this._descriptor=e,this._metricStorages=t}addCallback(e){this._observableRegistry.addCallback(e,this)}removeCallback(e){this._observableRegistry.removeCallback(e,this)}},gp=class extends ps{},vp=class extends ps{},yp=class extends ps{}});var Ap,VD=p(()=>{fn();Op();Ap=class{constructor(e){this._meterSharedState=e}createGauge(e,t){let o=wr(e,_e.GAUGE,t),s=this._meterSharedState.registerMetricStorage(o);return new Tp(s,o)}createHistogram(e,t){let o=wr(e,_e.HISTOGRAM,t),s=this._meterSharedState.registerMetricStorage(o);return new Sp(s,o)}createCounter(e,t){let o=wr(e,_e.COUNTER,t),s=this._meterSharedState.registerMetricStorage(o);return new mp(s,o)}createUpDownCounter(e,t){let o=wr(e,_e.UP_DOWN_COUNTER,t),s=this._meterSharedState.registerMetricStorage(o);return new Ep(s,o)}createObservableGauge(e,t){let o=wr(e,_e.OBSERVABLE_GAUGE,t),s=this._meterSharedState.registerAsyncMetricStorage(o);return new vp(o,s,this._meterSharedState.observableRegistry)}createObservableCounter(e,t){let o=wr(e,_e.OBSERVABLE_COUNTER,t),s=this._meterSharedState.registerAsyncMetricStorage(o);return new gp(o,s,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(e,t){let o=wr(e,_e.OBSERVABLE_UP_DOWN_COUNTER,t),s=this._meterSharedState.registerAsyncMetricStorage(o);return new yp(o,s,this._meterSharedState.observableRegistry)}addBatchObservableCallback(e,t){this._meterSharedState.observableRegistry.addBatchCallback(e,t)}removeBatchObservableCallback(e,t){this._meterSharedState.observableRegistry.removeBatchCallback(e,t)}}});var ds,zT=p(()=>{fn();ds=class{constructor(e){this._instrumentDescriptor=e}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(e){this._instrumentDescriptor=wr(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:e,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}}});var KT,Dt,Ml=p(()=>{fr();KT=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 o=this._hash(e);if(this._valueMap.has(o))return this._valueMap.get(o);let s=t();return this._keyMap.has(o)||this._keyMap.set(o,e),this._valueMap.set(o,s),s}set(e,t,o){o??(o=this._hash(e)),this._keyMap.has(o)||this._keyMap.set(o,e),this._valueMap.set(o,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}},Dt=class extends KT{constructor(){super(ep)}}});var hs,$T=p(()=>{fr();Ml();hs=class{constructor(e,t){this._aggregator=e,this._activeCollectionStorage=new Dt,this._cumulativeMemoStorage=new Dt,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(t??2e3)-1,this._overflowHashCode=ep(this._overflowAttributes)}record(e,t,o,s){let a=this._activeCollectionStorage.get(t);if(!a){if(this._activeCollectionStorage.size>=this._cardinalityLimit){let i=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,()=>this._aggregator.createAccumulation(s));i==null||i.record(e);return}a=this._aggregator.createAccumulation(s),this._activeCollectionStorage.set(t,a)}a==null||a.record(e)}batchCumulate(e,t){Array.from(e.entries()).forEach(([o,s,a])=>{let i=this._aggregator.createAccumulation(t);i==null||i.record(s);let n=i;if(this._cumulativeMemoStorage.has(o,a)){let l=this._cumulativeMemoStorage.get(o,a);n=this._aggregator.diff(l,i)}else if(this._cumulativeMemoStorage.size>=this._cardinalityLimit&&(o=this._overflowAttributes,a=this._overflowHashCode,this._cumulativeMemoStorage.has(o,a))){let l=this._cumulativeMemoStorage.get(o,a);n=this._aggregator.diff(l,i)}if(this._activeCollectionStorage.has(o,a)){let l=this._activeCollectionStorage.get(o,a);n=this._aggregator.merge(l,n)}this._cumulativeMemoStorage.set(o,i,a),this._activeCollectionStorage.set(o,n,a)})}collect(){let e=this._activeCollectionStorage;return this._activeCollectionStorage=new Dt,e}}});function dte(r){return Array.from(r.entries())}var _s,XT=p(()=>{Zf();Ml();_s=class r{constructor(e,t){this._aggregator=e,this._unreportedAccumulations=new Map,this._reportHistory=new Map,t.forEach(o=>{this._unreportedAccumulations.set(o,[])})}buildMetrics(e,t,o,s){this._stashAccumulations(o);let a=this._getMergedUnreportedAccumulations(e),i=a,n;if(this._reportHistory.has(e)){let c=this._reportHistory.get(e),u=c.collectionTime;n=c.aggregationTemporality,n===ur.CUMULATIVE?i=r.merge(c.accumulations,a,this._aggregator):i=r.calibrateStartTime(c.accumulations,a,u)}else n=e.selectAggregationTemporality(t.type);this._reportHistory.set(e,{accumulations:i,collectionTime:s,aggregationTemporality:n});let l=dte(i);if(l.length!==0)return this._aggregator.toMetricData(t,n,l,s)}_stashAccumulations(e){let t=this._unreportedAccumulations.keys();for(let o of t){let s=this._unreportedAccumulations.get(o);s===void 0&&(s=[],this._unreportedAccumulations.set(o,s)),s.push(e)}}_getMergedUnreportedAccumulations(e){let t=new Dt,o=this._unreportedAccumulations.get(e);if(this._unreportedAccumulations.set(e,[]),o===void 0)return t;for(let s of o)t=r.merge(t,s,this._aggregator);return t}static merge(e,t,o){let s=e,a=t.entries(),i=a.next();for(;i.done!==!0;){let[n,l,c]=i.value;if(e.has(n,c)){let u=e.get(n,c),f=o.merge(u,l);s.set(n,f,c)}else s.set(n,l,c);i=a.next()}return s}static calibrateStartTime(e,t,o){for(let[s,a]of e.keys()){let i=t.get(s,a);i==null||i.setStartTime(o)}return t}}});var Rp,FD=p(()=>{zT();$T();XT();Ml();Rp=class extends ds{constructor(e,t,o,s,a){super(e),this._attributesProcessor=o,this._aggregationCardinalityLimit=a,this._deltaMetricStorage=new hs(t,this._aggregationCardinalityLimit),this._temporalMetricStorage=new _s(t,s)}record(e,t){let o=new Dt;Array.from(e.entries()).forEach(([s,a])=>{o.set(this._attributesProcessor.process(s),a)}),this._deltaMetricStorage.batchCumulate(o,t)}collect(e,t){let o=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,o,t)}}});function WT(r,e){let t="";return r.unit!==e.unit&&(t+=` - Unit '${r.unit}' does not match '${e.unit}' `),r.type!==e.type&&(t+=` - Type '${r.type}' does not match '${e.type}' `),r.valueType!==e.valueType&&(t+=` - Value Type '${r.valueType}' does not match '${e.valueType}' `),r.description!==e.description&&(t+=` - Description '${r.description}' does not match '${e.description}' `),t}function hte(r,e){return` - use valueType '${r.valueType}' on instrument creation or use an instrument name other than '${e.name}'`}function _te(r,e){return` - use unit '${r.unit}' on instrument creation or use an instrument name other than '${e.name}'`}function Ete(r,e){let t={name:e.name,type:e.type,unit:e.unit},o=JSON.stringify(t);return` - create a new view with a name other than '${r.name}' and InstrumentSelector '${o}'`}function mte(r,e){let t={name:e.name,type:e.type,unit:e.unit},o=JSON.stringify(t);return` - create a new view with a name other than '${r.name}' and InstrumentSelector '${o}' - OR - create a new view with the name ${r.name} and description '${r.description}' and InstrumentSelector ${o} - OR - create a new view with the name ${e.name} and description '${r.description}' and InstrumentSelector ${o}`}function JT(r,e){return r.valueType!==e.valueType?hte(r,e):r.unit!==e.unit?_te(r,e):r.type!==e.type?Ete(r,e):r.description!==e.description?mte(r,e):""}var GD=p(()=>{});var Np,HD=p(()=>{fn();P();GD();Np=class r{constructor(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}static create(){return new r}getStorages(e){let t=[];for(let s of this._sharedRegistry.values())t=t.concat(s);let o=this._perCollectorRegistry.get(e);if(o!=null)for(let s of o.values())t=t.concat(s);return t}register(e){this._registerStorage(e,this._sharedRegistry)}registerForCollector(e,t){let o=this._perCollectorRegistry.get(e);o==null&&(o=new Map,this._perCollectorRegistry.set(e,o)),this._registerStorage(t,o)}findOrUpdateCompatibleStorage(e){let t=this._sharedRegistry.get(e.name);return t===void 0?null:this._findOrUpdateCompatibleStorage(e,t)}findOrUpdateCompatibleCollectorStorage(e,t){let o=this._perCollectorRegistry.get(e);if(o===void 0)return null;let s=o.get(t.name);return s===void 0?null:this._findOrUpdateCompatibleStorage(t,s)}_registerStorage(e,t){let o=e.getInstrumentDescriptor(),s=t.get(o.name);if(s===void 0){t.set(o.name,[e]);return}s.push(e)}_findOrUpdateCompatibleStorage(e,t){let o=null;for(let s of t){let a=s.getInstrumentDescriptor();$1(a,e)?(a.description!==e.description&&(e.description.length>a.description.length&&s.updateDescription(e.description),S.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: `,WT(a,e),`The longer description will be used. To resolve the conflict:`,JT(a,e))),o=s):S.warn("A view or instrument with the name ",e.name,` has already been registered and is incompatible with another registered view. `,`Details: `,WT(a,e),`To resolve the conflict: `,JT(a,e))}return o}}});var Cp,qD=p(()=>{Cp=class{constructor(e){this._backingStorages=e}record(e,t,o,s){this._backingStorages.forEach(a=>{a.record(e,t,o,s)})}}});var Pp,Ip,jD=p(()=>{P();Ml();Op();Pp=class{constructor(e,t){this._instrumentName=e,this._valueType=t,this._buffer=new Dt}observe(e,t={}){if(typeof e!="number"){S.warn(`non-number value provided to metric ${this._instrumentName}: ${e}`);return}this._valueType===Ot.INT&&!Number.isInteger(e)&&(S.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)}},Ip=class{constructor(){this._buffer=new Map}observe(e,t,o={}){if(!xl(e))return;let s=this._buffer.get(e);if(s==null&&(s=new Dt,this._buffer.set(e,s)),typeof t!="number"){S.warn(`non-number value provided to metric ${e._descriptor.name}: ${t}`);return}e._descriptor.valueType===Ot.INT&&!Number.isInteger(t)&&(S.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))||s.set(o,t)}}});var bp,YD=p(()=>{P();Op();jD();fr();bp=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 o=this._findCallback(e,t);o<0||this._callbacks.splice(o,1)}addBatchCallback(e,t){let o=new Set(t.filter(xl));if(o.size===0){S.error("BatchObservableCallback is not associated with valid instruments",t);return}this._findBatchCallback(e,o)>=0||this._batchCallbacks.push({callback:e,instruments:o})}removeBatchCallback(e,t){let o=new Set(t.filter(xl)),s=this._findBatchCallback(e,o);s<0||this._batchCallbacks.splice(s,1)}async observe(e,t){let o=this._observeCallbacks(e,t),s=this._observeBatchCallbacks(e,t);return(await G1([...o,...s])).filter(H1).map(n=>n.reason)}_observeCallbacks(e,t){return this._callbacks.map(async({callback:o,instrument:s})=>{let a=new Pp(s._descriptor.name,s._descriptor.valueType),i=Promise.resolve(o(a));t!=null&&(i=wn(i,t)),await i,s._metricStorages.forEach(n=>{n.record(a._buffer,e)})})}_observeBatchCallbacks(e,t){return this._batchCallbacks.map(async({callback:o,instruments:s})=>{let a=new Ip,i=Promise.resolve(o(a));t!=null&&(i=wn(i,t)),await i,s.forEach(n=>{let l=a._buffer.get(n);l!=null&&n._metricStorages.forEach(c=>{c.record(l,e)})})})}_findCallback(e,t){return this._callbacks.findIndex(o=>o.callback===e&&o.instrument===t)}_findBatchCallback(e,t){return this._batchCallbacks.findIndex(o=>o.callback===e&&q1(o.instruments,t))}}});var Lp,zD=p(()=>{zT();$T();XT();Lp=class extends ds{constructor(e,t,o,s,a){super(e),this._attributesProcessor=o,this._aggregationCardinalityLimit=a,this._deltaMetricStorage=new hs(t,this._aggregationCardinalityLimit),this._temporalMetricStorage=new _s(t,s)}record(e,t,o,s){t=this._attributesProcessor.process(t,o),this._deltaMetricStorage.record(e,t,o,s)}collect(e,t){let o=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,o,t)}}});var Bn,QT,xp,Tte,ZT=p(()=>{Bn=class{static Noop(){return Tte}},QT=class extends Bn{process(e,t){return e}},xp=class extends Bn{constructor(e){super(),this._allowedAttributeNames=e}process(e,t){let o={};return Object.keys(e).filter(s=>this._allowedAttributeNames.includes(s)).forEach(s=>o[s]=e[s]),o}},Tte=new QT});var Mp,KD=p(()=>{fn();VD();fr();FD();HD();qD();YD();zD();ZT();Mp=class{constructor(e,t){this._meterProviderSharedState=e,this._instrumentationScope=t,this.metricStorageRegistry=new Np,this.observableRegistry=new bp,this.meter=new Ap(this)}registerMetricStorage(e){let t=this._registerMetricStorage(e,Lp);return t.length===1?t[0]:new Cp(t)}registerAsyncMetricStorage(e){return this._registerMetricStorage(e,Rp)}async collect(e,t,o){let s=await this.observableRegistry.observe(t,o==null?void 0:o.timeoutMillis),a=this.metricStorageRegistry.getStorages(e);if(a.length===0)return null;let i=a.map(n=>n.collect(e,t)).filter(V1);return i.length===0?{errors:s}:{scopeMetrics:{scope:this._instrumentationScope,metrics:i},errors:s}}_registerMetricStorage(e,t){let s=this._meterProviderSharedState.viewRegistry.findViews(e,this._instrumentationScope).map(a=>{let i=K1(a,e),n=this.metricStorageRegistry.findOrUpdateCompatibleStorage(i);if(n!=null)return n;let l=a.aggregation.createAggregator(i),c=new t(i,l,a.attributesProcessor,this._meterProviderSharedState.metricCollectors,a.aggregationCardinalityLimit);return this.metricStorageRegistry.register(c),c});if(s.length===0){let i=this._meterProviderSharedState.selectAggregations(e.type).map(([n,l])=>{let c=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(n,e);if(c!=null)return c;let u=l.createAggregator(e),f=n.selectCardinalityLimit(e.type),_=new t(e,u,Bn.Noop(),[n],f);return this.metricStorageRegistry.registerForCollector(n,_),_});s=s.concat(i)}return s}}});var wp,$D=p(()=>{fr();BD();KD();wp=class{constructor(e){this.resource=e,this.viewRegistry=new _p,this.metricCollectors=[],this.meterSharedStates=new Map}getMeterSharedState(e){let t=F1(e),o=this.meterSharedStates.get(t);return o==null&&(o=new Mp(this,e),this.meterSharedStates.set(t,o)),o}selectAggregations(e){let t=[];for(let o of this.metricCollectors)t.push([o,o.selectAggregation(e)]);return t}}});var Dp,XD=p(()=>{Dn();Dp=class{constructor(e,t){this._sharedState=e,this._metricReader=t}async collect(e){let t=Mi(Date.now()),o=[],s=[],a=Array.from(this._sharedState.meterSharedStates.values()).map(async i=>{let n=await i.collect(this,t,e);(n==null?void 0:n.scopeMetrics)!=null&&o.push(n.scopeMetrics),(n==null?void 0:n.errors)!=null&&s.push(...n.errors)});return await Promise.all(a),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:o},errors:s}}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)}selectCardinalityLimit(e){var t,o,s;return(s=(o=(t=this._metricReader).selectCardinalityLimit)===null||o===void 0?void 0:o.call(t,e))!==null&&s!==void 0?s:2e3}}});function Ste(r,e){let t=e??kn.empty();return r?kn.default().merge(t):t}var Up,WD=p(()=>{P();kD();$D();XD();Up=class{constructor(e){var t;if(this._shutdown=!1,this._sharedState=new wp(Ste((t=e==null?void 0:e.mergeResourceWithDefaults)!==null&&t!==void 0?t:!0,e==null?void 0:e.resource)),(e==null?void 0:e.views)!=null&&e.views.length>0)for(let o of e.views)this._sharedState.viewRegistry.addView(o);if((e==null?void 0:e.readers)!=null&&e.readers.length>0)for(let o of e.readers)this.addMetricReader(o)}getMeter(e,t="",o={}){return this._shutdown?(S.warn("A shutdown MeterProvider cannot provide a Meter"),ku()):this._sharedState.getMeterSharedState({name:e,version:t,schemaUrl:o.schemaUrl}).meter}addMetricReader(e){let t=new Dp(this._sharedState,e);e.setMetricProducer(t),this._sharedState.metricCollectors.push(t)}async shutdown(e){if(this._shutdown){S.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){S.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(t=>t.forceFlush(e)))}}});var gte,Es,Vn,kp=p(()=>{gte=/[\^$\\.+?()[\]{}|]/g,Es=class r{constructor(e){e==="*"?(this._matchAll=!0,this._regexp=/.*/):(this._matchAll=!1,this._regexp=new RegExp(r.escapePattern(e)))}match(e){return this._matchAll?!0:this._regexp.test(e)}static escapePattern(e){return`^${e.replace(gte,"\\$&").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 Bp,JD=p(()=>{kp();Bp=class{constructor(e){var t;this._nameFilter=new Es((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 Vp,QD=p(()=>{kp();Vp=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 vte(r){return r.instrumentName==null&&r.instrumentType==null&&r.instrumentUnit==null&&r.meterName==null&&r.meterVersion==null&&r.meterSchemaUrl==null}var Fp,ZD=p(()=>{kp();ZT();JD();QD();cp();Fp=class{constructor(e){var t;if(vte(e))throw new Error("Cannot create view with no selector arguments supplied");if(e.name!=null&&((e==null?void 0:e.instrumentName)==null||Es.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 xp(e.attributeKeys):this.attributesProcessor=Bn.Noop(),this.name=e.name,this.description=e.description,this.aggregation=(t=e.aggregation)!==null&&t!==void 0?t:mt.Default(),this.instrumentSelector=new Bp({name:e.instrumentName,type:e.instrumentType,unit:e.instrumentUnit}),this.meterSelector=new Vp({name:e.meterName,version:e.meterVersion,schemaUrl:e.meterSchemaUrl}),this.aggregationCardinalityLimit=e.aggregationCardinalityLimit}}});var eS={};Ae(eS,{Aggregation:()=>mt,AggregationTemporality:()=>ur,ConsoleMetricExporter:()=>dp,DataPointType:()=>lt,DefaultAggregation:()=>Ll,DropAggregation:()=>as,ExplicitBucketHistogramAggregation:()=>Il,ExponentialHistogramAggregation:()=>bl,HistogramAggregation:()=>cs,InMemoryMetricExporter:()=>pp,InstrumentType:()=>_e,LastValueAggregation:()=>ls,MeterProvider:()=>Up,MetricReader:()=>us,PeriodicExportingMetricReader:()=>fp,SumAggregation:()=>wi,TimeoutError:()=>Li,View:()=>Fp});var Gp=p(()=>{Zf();Zo();YT();bD();LD();xD();fn();WD();cp();ZD();fr()});var rS=T(Hp=>{"use strict";Object.defineProperty(Hp,"__esModule",{value:!0});Hp.AbstractAsyncHooksContextManager=void 0;var yte=V("events"),Ote=["addListener","on","once","prependListener","prependOnceListener"],tS=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,t){return t instanceof yte.EventEmitter?this._bindEventEmitter(e,t):typeof t=="function"?this._bindFunction(e,t):t}_bindFunction(e,t){let o=this,s=function(...a){return o.with(e,()=>t.apply(this,a))};return Object.defineProperty(s,"length",{enumerable:!1,configurable:!0,writable:!1,value:t.length}),s}_bindEventEmitter(e,t){return this._getPatchMap(t)!==void 0||(this._createPatchMap(t),Ote.forEach(s=>{t[s]!==void 0&&(t[s]=this._patchAddListener(t,t[s],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 o=this;return function(s,a){var i;let n=(i=o._getPatchMap(e))===null||i===void 0?void 0:i[s];if(n===void 0)return t.call(this,s,a);let l=n.get(a);return t.call(this,s,l||a)}}_patchRemoveAllListeners(e,t){let o=this;return function(s){let a=o._getPatchMap(e);return a!==void 0&&(arguments.length===0?o._createPatchMap(e):a[s]!==void 0&&delete a[s]),t.apply(this,arguments)}}_patchAddListener(e,t,o){let s=this;return function(a,i){if(s._wrapped)return t.call(this,a,i);let n=s._getPatchMap(e);n===void 0&&(n=s._createPatchMap(e));let l=n[a];l===void 0&&(l=new WeakMap,n[a]=l);let c=s.bind(o,i);l.set(i,c),s._wrapped=!0;try{return t.call(this,a,c)}finally{s._wrapped=!1}}}_createPatchMap(e){let t=Object.create(null);return e[this._kOtListeners]=t,t}_getPatchMap(e){return e[this._kOtListeners]}};Hp.AbstractAsyncHooksContextManager=tS});var eU=T(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});qp.AsyncHooksContextManager=void 0;var Ate=(P(),ee(ot)),Rte=V("async_hooks"),Nte=rS(),nS=class extends Nte.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=Rte.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:Ate.ROOT_CONTEXT}with(e,t,o,...s){this._enterContext(e);try{return t.call(o,...s)}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 o=this._stack[this._stack.length-1];o!==void 0&&this._contexts.set(e,o)}_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()}};qp.AsyncHooksContextManager=nS});var tU=T(jp=>{"use strict";Object.defineProperty(jp,"__esModule",{value:!0});jp.AsyncLocalStorageContextManager=void 0;var Cte=(P(),ee(ot)),Pte=V("async_hooks"),Ite=rS(),iS=class extends Ite.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new Pte.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:Cte.ROOT_CONTEXT}with(e,t,o,...s){let a=o==null?t:t.bind(o);return this._asyncLocalStorage.run(e,a,...s)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};jp.AsyncLocalStorageContextManager=iS});var rU=T(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});ms.AsyncLocalStorageContextManager=ms.AsyncHooksContextManager=void 0;var bte=eU();Object.defineProperty(ms,"AsyncHooksContextManager",{enumerable:!0,get:function(){return bte.AsyncHooksContextManager}});var Lte=tU();Object.defineProperty(ms,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return Lte.AsyncLocalStorageContextManager}})});var Ts,oS=p(()=>{P();Ts=De("OpenTelemetry Context Key B3 Debug Flag")});var Ss,gs,vs,ys,Yp,Os,sS=p(()=>{Ss="b3",gs="x-b3-traceid",vs="x-b3-spanid",ys="x-b3-sampled",Yp="x-b3-parentspanid",Os="x-b3-flags"});function wte(r){return r===se.SAMPLED||r===se.NONE}function Dte(r){return Array.isArray(r)?r[0]:r}function Kp(r,e,t){let o=e.get(r,t);return Dte(o)}function Ute(r,e){let t=Kp(r,e,gs);return typeof t=="string"?t.padStart(32,"0"):""}function kte(r,e){let t=Kp(r,e,vs);return typeof t=="string"?t:""}function nU(r,e){return Kp(r,e,Os)==="1"?"1":void 0}function Bte(r,e){let t=Kp(r,e,ys);if(nU(r,e)==="1"||xte.has(t))return se.SAMPLED;if(t===void 0||Mte.has(t))return se.NONE}var xte,Mte,zp,iU=p(()=>{P();xr();oS();sS();xte=new Set([!0,"true","True","1",1]),Mte=new Set([!1,"false","False","0",0]);zp=class{inject(e,t,o){let s=ie.getSpanContext(e);if(!s||!xe(s)||At(e))return;let a=e.getValue(Ts);o.set(t,gs,s.traceId),o.set(t,vs,s.spanId),a==="1"?o.set(t,Os,a):s.traceFlags!==void 0&&o.set(t,ys,(se.SAMPLED&s.traceFlags)===se.SAMPLED?"1":"0")}extract(e,t,o){let s=Ute(t,o),a=kte(t,o),i=Bte(t,o),n=nU(t,o);return Mt(s)&&Si(a)&&wte(i)?(e=e.setValue(Ts,n),ie.setSpanContext(e,{traceId:s,spanId:a,isRemote:!0,traceFlags:i})):e}fields(){return[gs,vs,Os,ys,Yp]}}});function qte(r){return r.length===32?r:`${Fte}${r}`}function jte(r){return r&&Gte.has(r)?se.SAMPLED:se.NONE}var Vte,Fte,Gte,Hte,$p,oU=p(()=>{P();xr();oS();Vte=/((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/,Fte="0".repeat(16),Gte=new Set(["d","1"]),Hte="d";$p=class{inject(e,t,o){let s=ie.getSpanContext(e);if(!s||!xe(s)||At(e))return;let a=e.getValue(Ts)||s.traceFlags&1,i=`${s.traceId}-${s.spanId}-${a}`;o.set(t,"b3",i)}extract(e,t,o){let s=o.get(t,"b3"),a=Array.isArray(s)?s[0]:s;if(typeof a!="string")return e;let i=a.match(Vte);if(!i)return e;let[,n,l,c]=i,u=qte(n);if(!Mt(u)||!Si(l))return e;let f=jte(c);return c===Hte&&(e=e.setValue(Ts,c)),ie.setSpanContext(e,{traceId:u,spanId:l,isRemote:!0,traceFlags:f})}fields(){return["b3"]}}});var As,aS=p(()=>{(function(r){r[r.SINGLE_HEADER=0]="SINGLE_HEADER",r[r.MULTI_HEADER=1]="MULTI_HEADER"})(As||(As={}))});var Xp,sU=p(()=>{xr();iU();oU();aS();Xp=class{constructor(e={}){this._b3MultiPropagator=new zp,this._b3SinglePropagator=new $p,e.injectEncoding===As.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,o){At(e)||this._inject(e,t,o)}extract(e,t,o){let s=o.get(t,"b3");return(Array.isArray(s)?s[0]:s)?this._b3SinglePropagator.extract(e,t,o):this._b3MultiPropagator.extract(e,t,o)}fields(){return this._fields}}});var aU={};Ae(aU,{B3InjectEncoding:()=>As,B3Propagator:()=>Xp,B3_CONTEXT_HEADER:()=>Ss,X_B3_FLAGS:()=>Os,X_B3_PARENT_SPAN_ID:()=>Yp,X_B3_SAMPLED:()=>ys,X_B3_SPAN_ID:()=>vs,X_B3_TRACE_ID:()=>gs});var lU=p(()=>{sU();sS();aS()});function wl(r){return r.setValue(cU,!0)}function Di(r){return r.getValue(cU)===!0}var cU,Dl=p(()=>{P();cU=De("OpenTelemetry SDK Context Key SUPPRESS_TRACING")});var Wp,uU=p(()=>{Wp="baggage"});function pU(r){return r.reduce((e,t)=>{let o=`${e}${e!==""?",":""}${t}`;return o.length>8192?e:o},"")}function dU(r){return r.getAllEntries().map(([e,t])=>{let o=`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`;return t.metadata!==void 0&&(o+=";"+t.metadata.toString()),o})}function hU(r){let e=r.split(";");if(e.length<=0)return;let t=e.shift();if(!t)return;let o=t.indexOf("=");if(o<=0)return;let s=decodeURIComponent(t.substring(0,o).trim()),a=decodeURIComponent(t.substring(o+1).trim()),i;return e.length>0&&(i=Lr(e.join(";"))),{key:s,value:a,metadata:i}}var _U=p(()=>{P()});var Ul,EU=p(()=>{P();Dl();uU();_U();Ul=class{inject(e,t,o){let s=Ue.getBaggage(e);if(!s||Di(e))return;let a=dU(s).filter(n=>n.length<=4096).slice(0,180),i=pU(a);i.length>0&&o.set(t,Wp,i)}extract(e,t,o){let s=o.get(t,Wp),a=Array.isArray(s)?s.join(","):s;if(!a)return e;let i={};return a.length===0||(a.split(",").forEach(l=>{let c=hU(l);if(c){let u={value:c.value};c.metadata&&(u.metadata=c.metadata),i[c.key]=u}}),Object.entries(i).length===0)?e:Ue.setBaggage(e,Ue.createBaggage(i))}fields(){return[Wp]}}});function Ui(r){let e={};if(typeof r!="object"||r==null)return e;for(let[t,o]of Object.entries(r)){if(!mU(t)){S.warn(`Invalid attribute key: ${t}`);continue}if(!Jp(o)){S.warn(`Invalid attribute value set for key: ${t}`);continue}Array.isArray(o)?e[t]=o.slice():e[t]=o}return e}function mU(r){return typeof r=="string"&&r.length>0}function Jp(r){return r==null?!0:Array.isArray(r)?Kte(r):TU(r)}function Kte(r){let e;for(let t of r)if(t!=null){if(!e){if(TU(t)){e=typeof t;continue}return!1}if(typeof t!==e)return!1}return!0}function TU(r){switch(typeof r){case"number":case"boolean":case"string":return!0}return!1}var SU=p(()=>{P()});function gU(){return r=>{S.error($te(r))}}function $te(r){return typeof r=="string"?r:JSON.stringify(Xte(r))}function Xte(r){let e={},t=r;for(;t!==null;)Object.getOwnPropertyNames(t).forEach(o=>{if(e[o])return;let s=t[o];s&&(e[o]=String(s))}),t=Object.getPrototypeOf(t);return e}var vU=p(()=>{P()});function Kt(r){try{Wte(r)}catch{}}var Wte,yU=p(()=>{vU();Wte=gU()});var Ut,cS=p(()=>{(function(r){r.AlwaysOff="always_off",r.AlwaysOn="always_on",r.ParentBasedAlwaysOff="parentbased_always_off",r.ParentBasedAlwaysOn="parentbased_always_on",r.ParentBasedTraceIdRatio="parentbased_traceidratio",r.TraceIdRatio="traceidratio"})(Ut||(Ut={}))});function Zte(r){return Qte.indexOf(r)>-1}function tre(r){return ere.indexOf(r)>-1}function nre(r){return rre.indexOf(r)>-1}function ire(r,e,t){if(typeof t[r]>"u")return;let o=String(t[r]);e[r]=o.toLowerCase()==="true"}function ore(r,e,t,o=-1/0,s=1/0){if(typeof t[r]<"u"){let a=Number(t[r]);isNaN(a)||(as?e[r]=s:e[r]=a)}}function sre(r,e,t,o=Jte){let s=t[r];typeof s=="string"&&(e[r]=s.split(o).map(a=>a.trim()))}function lre(r,e,t){let o=t[r];if(typeof o=="string"){let s=are[o.toUpperCase()];s!=null&&(e[r]=s)}}function Zp(r){let e={};for(let t in Qp){let o=t;switch(o){case"OTEL_LOG_LEVEL":lre(o,e,r);break;default:if(Zte(o))ire(o,e,r);else if(tre(o))ore(o,e,r);else if(nre(o))sre(o,e,r);else{let s=r[o];typeof s<"u"&&s!==null&&(e[o]=String(s))}}}return e}var Jte,Qte,ere,rre,Rs,Ns,OU,AU,Qp,are,uS=p(()=>{P();cS();Jte=",",Qte=["OTEL_SDK_DISABLED"];ere=["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"];rre=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];Rs=1/0,Ns=128,OU=128,AU=128,Qp={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:H.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Rs,OTEL_ATTRIBUTE_COUNT_LIMIT:Ns,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Rs,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Ns,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Rs,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Ns,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:OU,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:AU,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Ut.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};are={ALL:H.ALL,VERBOSE:H.VERBOSE,DEBUG:H.DEBUG,INFO:H.INFO,WARN:H.WARN,ERROR:H.ERROR,NONE:H.NONE}});function $t(){let r=Zp(process.env);return Object.assign({},Qp,r)}function kl(){return Zp(process.env)}var RU=p(()=>{uS()});import{performance as cre}from"perf_hooks";var dr,NU=p(()=>{dr=cre});var CU,PU=p(()=>{CU="1.29.0"});var ki,IU=p(()=>{PU();Ve();ki={[Se]:"opentelemetry",[st]:"node",[ge]:wt,[ve]:CU}});function Bl(r){r.unref()}var bU=p(()=>{});var LU=p(()=>{RU();NU();IU();bU()});var fS=p(()=>{LU()});function Fn(r){let e=r/1e3,t=Math.trunc(e),o=Math.round(r%1e3*_re);return[t,o]}function ed(){let r=dr.timeOrigin;if(typeof r!="number"){let e=dr;r=e.timing&&e.timing.fetchStart}return r}function dS(r){let e=Fn(ed()),t=Fn(typeof r=="number"?r:dr.now());return id(e,t)}function hS(r,e){let t=e[0]-r[0],o=e[1]-r[1];return o<0&&(t-=1,o+=pS),[t,o]}function td(r){return r[0]*1e6+r[1]/1e3}function rd(r){return Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}function nd(r){return rd(r)||typeof r=="number"||r instanceof Date}function id(r,e){let t=[r[0]+e[0],r[1]+e[1]];return t[1]>=pS&&(t[1]-=pS,t[0]+=1),t}var dre,hre,_re,pS,xU=p(()=>{fS();dre=9,hre=6,_re=Math.pow(10,hre),pS=Math.pow(10,dre)});var Xt,MU=p(()=>{(function(r){r[r.SUCCESS=0]="SUCCESS",r[r.FAILED=1]="FAILED"})(Xt||(Xt={}))});var Vl,wU=p(()=>{P();Vl=class{constructor(e={}){var t;this._propagators=(t=e.propagators)!==null&&t!==void 0?t:[],this._fields=Array.from(new Set(this._propagators.map(o=>typeof o.fields=="function"?o.fields():[]).reduce((o,s)=>o.concat(s),[])))}inject(e,t,o){for(let s of this._propagators)try{s.inject(e,t,o)}catch(a){S.warn(`Failed to inject with ${s.constructor.name}. Err: ${a.message}`)}}extract(e,t,o){return this._propagators.reduce((s,a)=>{try{return a.extract(s,t,o)}catch(i){S.warn(`Failed to extract with ${a.constructor.name}. Err: ${i.message}`)}return s},e)}fields(){return this._fields.slice()}}});function DU(r){return Tre.test(r)}function UU(r){return Sre.test(r)&&!gre.test(r)}var _S,Ere,mre,Tre,Sre,gre,kU=p(()=>{_S="[_0-9a-z-*/]",Ere=`[a-z]${_S}{0,255}`,mre=`[a-z0-9]${_S}{0,240}@[a-z]${_S}{0,13}`,Tre=new RegExp(`^(?:${Ere}|${mre})$`),Sre=/^[ -~]{0,255}[!-~]$/,gre=/,|=/});var BU,vre,VU,FU,od,GU=p(()=>{kU();BU=32,vre=512,VU=",",FU="=",od=class r{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let o=this._clone();return o._internalState.has(e)&&o._internalState.delete(e),o._internalState.set(e,t),o}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+FU+this.get(t)),e),[]).join(VU)}_parse(e){e.length>vre||(this._internalState=e.split(VU).reverse().reduce((t,o)=>{let s=o.trim(),a=s.indexOf(FU);if(a!==-1){let i=s.slice(0,a),n=s.slice(a+1,o.length);DU(i)&&UU(n)&&t.set(i,n)}return t},new Map),this._internalState.size>BU&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,BU))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new r;return e._internalState=new Map(this._internalState),e}}});function HU(r){let e=Cre.exec(r);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var sd,ad,yre,Ore,Are,Rre,Nre,Cre,Fl,qU=p(()=>{P();Dl();GU();sd="traceparent",ad="tracestate",yre="00",Ore="(?!ff)[\\da-f]{2}",Are="(?![0]{32})[\\da-f]{32}",Rre="(?![0]{16})[\\da-f]{16}",Nre="[\\da-f]{2}",Cre=new RegExp(`^\\s?(${Ore})-(${Are})-(${Rre})-(${Nre})(-.*)?\\s?$`);Fl=class{inject(e,t,o){let s=ie.getSpanContext(e);if(!s||Di(e)||!xe(s))return;let a=`${yre}-${s.traceId}-${s.spanId}-0${Number(s.traceFlags||se.NONE).toString(16)}`;o.set(t,sd,a),s.traceState&&o.set(t,ad,s.traceState.serialize())}extract(e,t,o){let s=o.get(t,sd);if(!s)return e;let a=Array.isArray(s)?s[0]:s;if(typeof a!="string")return e;let i=HU(a);if(!i)return e;i.isRemote=!0;let n=o.get(t,ad);if(n){let l=Array.isArray(n)?n.join(","):n;i.traceState=new od(typeof l=="string"?l:void 0)}return ie.setSpanContext(e,i)}fields(){return[sd,ad]}}});function wre(r,e){return function(t){return r(e(t))}}function ES(r){if(!Dre(r)||Ure(r)!==Pre)return!1;let e=Mre(r);if(e===null)return!0;let t=zU.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&jU.call(t)===xre}function Dre(r){return r!=null&&typeof r=="object"}function Ure(r){return r==null?r===void 0?bre:Ire:Bi&&Bi in Object(r)?kre(r):Bre(r)}function kre(r){let e=zU.call(r,Bi),t=r[Bi],o=!1;try{r[Bi]=void 0,o=!0}catch{}let s=KU.call(r);return o&&(e?r[Bi]=t:delete r[Bi]),s}function Bre(r){return KU.call(r)}var Pre,Ire,bre,Lre,jU,xre,Mre,YU,zU,Bi,KU,$U=p(()=>{Pre="[object Object]",Ire="[object Null]",bre="[object Undefined]",Lre=Function.prototype,jU=Lre.toString,xre=jU.call(Object),Mre=wre(Object.getPrototypeOf,Object),YU=Object.prototype,zU=YU.hasOwnProperty,Bi=Symbol?Symbol.toStringTag:void 0,KU=YU.toString});function TS(...r){let e=r.shift(),t=new WeakMap;for(;r.length>0;)e=WU(e,r.shift(),0,t);return e}function mS(r){return cd(r)?r.slice():r}function WU(r,e,t=0,o){let s;if(!(t>Vre)){if(t++,ld(r)||ld(e)||JU(e))s=mS(e);else if(cd(r)){if(s=r.slice(),cd(e))for(let a=0,i=e.length;a"u"?delete s[l]:s[l]=c;else{let u=s[l],f=c;if(XU(r,l,o)||XU(e,l,o))delete s[l];else{if(Gl(u)&&Gl(f)){let _=o.get(u)||[],m=o.get(f)||[];_.push({obj:r,key:l}),m.push({obj:e,key:l}),o.set(u,_),o.set(f,m)}s[l]=WU(s[l],c,t,o)}}}}else s=e;return s}}function XU(r,e,t){let o=t.get(r[e])||[];for(let s=0,a=o.length;s"u"||r instanceof Date||r instanceof RegExp||r===null}function Fre(r,e){return!(!ES(r)||!ES(e))}var Vre,QU=p(()=>{$U();Vre=20});var ud,ZU=p(()=>{ud=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 Vi,ek=p(()=>{ZU();Vi=class{constructor(e,t){this._callback=e,this._that=t,this._isCalled=!1,this._deferred=new ud}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 tk(r,e){return new Promise(t=>{he.with(wl(he.active()),()=>{r.export(e,o=>{t(o)})})})}var rk=p(()=>{P();Dl()});var nk,kt=p(()=>{EU();SU();yU();xU();MU();fS();wU();qU();Dl();uS();QU();cS();ek();rk();nk={_export:tk}});var ik,ok=p(()=>{ik="exception"});var Cs,SS=p(()=>{P();kt();Ve();ok();Cs=class{constructor(e,t,o,s,a,i,n=[],l,c,u){this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:jt.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=o,this._spanContext=s,this.parentSpanId=i,this.kind=a,this.links=n;let f=Date.now();this._performanceStartTime=dr.now(),this._performanceOffset=f-(this._performanceStartTime+ed()),this._startTimeProvided=l!=null,this.startTime=this._getTime(l??f),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?(S.warn(`Invalid attribute key: ${e}`),this):Jp(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):(S.warn(`Invalid attribute value set for key: ${e}`),this)}setAttributes(e){for(let[t,o]of Object.entries(e))this.setAttribute(t,o);return this}addEvent(e,t,o){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return S.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&S.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),nd(t)&&(nd(o)||(o=t),t=void 0);let s=Ui(t);return this.events.push({name:e,attributes:s,time:this._getTime(o),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=Object.assign({},e),this.status.message!=null&&typeof e.message!="string"&&(S.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`),delete this.status.message),this)}updateName(e){return this._isSpanEnded()?this:(this.name=e,this)}end(e){if(this._isSpanEnded()){S.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=hS(this.startTime,this.endTime),this._duration[0]<0&&(S.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&&S.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e=="number"&&e<=dr.now())return dS(e+this._performanceOffset);if(typeof e=="number")return Fn(e);if(e instanceof Date)return Fn(e.getTime());if(rd(e))return e;if(this._startTimeProvided)return Fn(Date.now());let t=dr.now()-this._performanceStartTime;return id(this.startTime,Fn(t))}isRecording(){return this._ended===!1}recordException(e,t){let o={};typeof e=="string"?o[Wa]=e:e&&(e.code?o[Xa]=e.code.toString():e.name&&(o[Xa]=e.name),e.message&&(o[Wa]=e.message),e.stack&&(o[Um]=e.stack)),o[Xa]||o[Wa]?this.addEvent(ik,o,t):S.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&&S.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.substring(0,t)}_truncateToSize(e){let t=this._attributeValueLengthLimit;return t<=0?(S.warn(`Attribute value limit must be positive, got ${t}`),e):typeof e=="string"?this._truncateToLimitUtil(e,t):Array.isArray(e)?e.map(o=>typeof o=="string"?this._truncateToLimitUtil(o,t):o):e}}});var hr,Hl=p(()=>{(function(r){r[r.NOT_RECORD=0]="NOT_RECORD",r[r.RECORD=1]="RECORD",r[r.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(hr||(hr={}))});var Ur,fd=p(()=>{Hl();Ur=class{shouldSample(){return{decision:hr.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}});var Wt,pd=p(()=>{Hl();Wt=class{shouldSample(){return{decision:hr.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}});var Gn,gS=p(()=>{P();kt();fd();pd();Gn=class{constructor(e){var t,o,s,a;this._root=e.root,this._root||(Kt(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=(o=e.remoteParentNotSampled)!==null&&o!==void 0?o:new Ur,this._localParentSampled=(s=e.localParentSampled)!==null&&s!==void 0?s:new Wt,this._localParentNotSampled=(a=e.localParentNotSampled)!==null&&a!==void 0?a:new Ur}shouldSample(e,t,o,s,a,i){let n=ie.getSpanContext(e);return!n||!xe(n)?this._root.shouldSample(e,t,o,s,a,i):n.isRemote?n.traceFlags&se.SAMPLED?this._remoteParentSampled.shouldSample(e,t,o,s,a,i):this._remoteParentNotSampled.shouldSample(e,t,o,s,a,i):n.traceFlags&se.SAMPLED?this._localParentSampled.shouldSample(e,t,o,s,a,i):this._localParentNotSampled.shouldSample(e,t,o,s,a,i)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}});var Fi,vS=p(()=>{P();Hl();Fi=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:Mt(t)&&this._accumulate(t)=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let o=0;o>>0}return t}}});function dd(){let r=$t();return{sampler:yS(Gre),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:r.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:r.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:r.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:r.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:r.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:r.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:r.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:r.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function yS(r=$t()){switch(r.OTEL_TRACES_SAMPLER){case Ut.AlwaysOn:return new Wt;case Ut.AlwaysOff:return new Ur;case Ut.ParentBasedAlwaysOn:return new Gn({root:new Wt});case Ut.ParentBasedAlwaysOff:return new Gn({root:new Ur});case Ut.TraceIdRatio:return new Fi(sk(r));case Ut.ParentBasedTraceIdRatio:return new Gn({root:new Fi(sk(r))});default:return S.error(`OTEL_TRACES_SAMPLER value "${r.OTEL_TRACES_SAMPLER} invalid, defaulting to ${Hre}".`),new Wt}}function sk(r){if(r.OTEL_TRACES_SAMPLER_ARG===void 0||r.OTEL_TRACES_SAMPLER_ARG==="")return S.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Ps}.`),Ps;let e=Number(r.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(S.error(`OTEL_TRACES_SAMPLER_ARG=${r.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${Ps}.`),Ps):e<0||e>1?(S.error(`OTEL_TRACES_SAMPLER_ARG=${r.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${Ps}.`),Ps):e}var Gre,Hre,Ps,OS=p(()=>{P();kt();fd();pd();gS();vS();Gre=$t(),Hre=Ut.AlwaysOn,Ps=1});function ak(r){let e={sampler:yS()},t=dd(),o=Object.assign({},t,e,r);return o.generalLimits=Object.assign({},t.generalLimits,r.generalLimits||{}),o.spanLimits=Object.assign({},t.spanLimits,r.spanLimits||{}),o}function lk(r){var e,t,o,s,a,i,n,l,c,u,f,_;let m=Object.assign({},r.spanLimits),O=kl();return m.attributeCountLimit=(i=(a=(s=(t=(e=r.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&t!==void 0?t:(o=r.generalLimits)===null||o===void 0?void 0:o.attributeCountLimit)!==null&&s!==void 0?s:O.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:O.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&i!==void 0?i:Ns,m.attributeValueLengthLimit=(_=(f=(u=(l=(n=r.spanLimits)===null||n===void 0?void 0:n.attributeValueLengthLimit)!==null&&l!==void 0?l:(c=r.generalLimits)===null||c===void 0?void 0:c.attributeValueLengthLimit)!==null&&u!==void 0?u:O.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:O.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&_!==void 0?_:Rs,Object.assign({},r,{spanLimits:m})}var AS=p(()=>{OS();kt()});var hd,ck=p(()=>{P();kt();hd=class{constructor(e,t){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;let o=$t();this._maxExportBatchSize=typeof(t==null?void 0:t.maxExportBatchSize)=="number"?t.maxExportBatchSize:o.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof(t==null?void 0:t.maxQueueSize)=="number"?t.maxQueueSize:o.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof(t==null?void 0:t.scheduledDelayMillis)=="number"?t.scheduledDelayMillis:o.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof(t==null?void 0:t.exportTimeoutMillis)=="number"?t.exportTimeoutMillis:o.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Vi(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(S.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&se.SAMPLED)!==0&&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&&S.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(S.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,t)=>{let o=[],s=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let a=0,i=s;a{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,t)=>{let o=setTimeout(()=>{t(new Error("Timeout"))},this._exportTimeoutMillis);he.with(wl(he.active()),()=>{let s;this._finishedSpans.length<=this._maxExportBatchSize?(s=this._finishedSpans,this._finishedSpans=[]):s=this._finishedSpans.splice(0,this._maxExportBatchSize);let a=()=>this._exporter.export(s,n=>{var l;clearTimeout(o),n.code===Xt.SUCCESS?e():t((l=n.error)!==null&&l!==void 0?l:new Error("BatchSpanProcessor: span export failed"))}),i=null;for(let n=0,l=s.length;n{Kt(n),t(n)})})})}_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,Kt(t)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),Bl(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}}});var Hn,uk=p(()=>{ck();Hn=class extends hd{onShutdown(){}}});function fk(r){return function(){for(let t=0;t>>0,t*4);for(let t=0;t0);t++)t===r-1&&(_d[r-1]=1);return _d.toString("hex",0,r)}}var qn,_d,pk=p(()=>{qn=class{constructor(){this.generateTraceId=fk(16),this.generateSpanId=fk(8)}},_d=Buffer.allocUnsafe(16)});var dk=p(()=>{uk();pk()});var Ed=p(()=>{dk()});var Is,hk=p(()=>{P();kt();SS();AS();Ed();Is=class{constructor(e,t,o){this._tracerProvider=o;let s=ak(t);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=t.idGenerator||new qn,this.resource=o.resource,this.instrumentationLibrary=e}startSpan(e,t={},o=he.active()){var s,a,i;t.root&&(o=ie.deleteSpan(o));let n=ie.getSpan(o);if(Di(o))return S.debug("Instrumentation suppressed, returning Noop Span"),ie.wrapSpanContext(Uo);let l=n==null?void 0:n.spanContext(),c=this._idGenerator.generateSpanId(),u,f,_;!l||!ie.isSpanContextValid(l)?u=this._idGenerator.generateTraceId():(u=l.traceId,f=l.traceState,_=l.spanId);let m=(s=t.kind)!==null&&s!==void 0?s:qt.INTERNAL,O=((a=t.links)!==null&&a!==void 0?a:[]).map(z=>({context:z.context,attributes:Ui(z.attributes)})),y=Ui(t.attributes),A=this._sampler.shouldSample(o,u,e,m,y,O);f=(i=A.traceState)!==null&&i!==void 0?i:f;let I=A.decision===ke.RECORD_AND_SAMPLED?se.SAMPLED:se.NONE,M={traceId:u,spanId:c,traceFlags:I,traceState:f};if(A.decision===ke.NOT_RECORD)return S.debug("Recording is off, propagating context in a non-recording span"),ie.wrapSpanContext(M);let F=Ui(Object.assign(y,A.attributes));return new Cs(this,o,e,M,m,_,O,t.startTime,void 0,F)}startActiveSpan(e,t,o,s){let a,i,n;if(arguments.length<2)return;arguments.length===2?n=t:arguments.length===3?(a=t,n=o):(a=t,i=o,n=s);let l=i??he.active(),c=this.startSpan(e,a,l),u=ie.setSpan(l,c);return he.with(u,n,void 0,c)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}}});function md(){return`unknown_service:${process.argv0}`}var _k=p(()=>{});var Ek=p(()=>{_k()});var mk=p(()=>{Ek()});var jn,Tk=p(()=>{P();Ve();kt();mk();jn=class r{constructor(e,t){var o;this._attributes=e,this.asyncAttributesPending=t!=null,this._syncAttributes=(o=this._attributes)!==null&&o!==void 0?o:{},this._asyncAttributesPromise=t==null?void 0:t.then(s=>(this._attributes=Object.assign({},this._attributes,s),this.asyncAttributesPending=!1,s),s=>(S.debug("a resource's async attributes promise rejected: %s",s),this.asyncAttributesPending=!1,{}))}static empty(){return r.EMPTY}static default(){return new r({[at]:md(),[ge]:ki[ge],[Se]:ki[Se],[ve]:ki[ve]})}get attributes(){var e;return this.asyncAttributesPending&&S.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 o=Object.assign(Object.assign({},this._syncAttributes),(t=e._syncAttributes)!==null&&t!==void 0?t:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new r(o);let s=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(([a,i])=>{var n;return Object.assign(Object.assign(Object.assign(Object.assign({},this._syncAttributes),a),(n=e._syncAttributes)!==null&&n!==void 0?n:e.attributes),i)});return new r(o,s)}};jn.EMPTY=new jn({})});var Sk=p(()=>{Tk()});var ql,gk=p(()=>{kt();ql=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(o=>{Kt(o||new Error("MultiSpanProcessor: forceFlush failed")),t()})})}onStart(e,t){for(let o of this._spanProcessors)o.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,o)=>{Promise.all(e).then(()=>{t()},o)})}}});var bs,RS=p(()=>{bs=class{onStart(e,t){}onEnd(e){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}}});var pn,Ls,vk=p(()=>{P();kt();Sk();Gi();OS();gk();RS();Ed();AS();(function(r){r[r.resolved=0]="resolved",r[r.timeout=1]="timeout",r[r.error=2]="error",r[r.unresolved=3]="unresolved"})(pn||(pn={}));Ls=class{constructor(e={}){var t,o;this._registeredSpanProcessors=[],this._tracers=new Map;let s=TS({},dd(),lk(e));if(this.resource=(t=s.resource)!==null&&t!==void 0?t:jn.empty(),s.mergeResourceWithDefaults&&(this.resource=jn.default().merge(this.resource)),this._config=Object.assign({},s,{resource:this.resource}),!((o=e.spanProcessors)===null||o===void 0)&&o.length)this._registeredSpanProcessors=[...e.spanProcessors],this.activeSpanProcessor=new ql(this._registeredSpanProcessors);else{let a=this._buildExporterFromEnv();if(a!==void 0){let i=new Hn(a);this.activeSpanProcessor=i}else this.activeSpanProcessor=new bs}}getTracer(e,t,o){let s=`${e}@${t||""}:${(o==null?void 0:o.schemaUrl)||""}`;return this._tracers.has(s)||this._tracers.set(s,new Is({name:e,version:t,schemaUrl:o==null?void 0:o.schemaUrl},this._config,this)),this._tracers.get(s)}addSpanProcessor(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(t=>S.error("Error while trying to shutdown current span processor",t)),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new ql(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(e={}){ie.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&he.setGlobalContextManager(e.contextManager),e.propagator&&Ue.setGlobalPropagator(e.propagator)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,t=this._registeredSpanProcessors.map(o=>new Promise(s=>{let a,i=setTimeout(()=>{s(new Error(`Span processor did not completed within timeout period of ${e} ms`)),a=pn.timeout},e);o.forceFlush().then(()=>{clearTimeout(i),a!==pn.timeout&&(a=pn.resolved,s(a))}).catch(n=>{clearTimeout(i),a=pn.error,s(n)})}));return new Promise((o,s)=>{Promise.all(t).then(a=>{let i=a.filter(n=>n!==pn.resolved);i.length>0?s(i):o()}).catch(a=>s([a]))})}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($t().OTEL_PROPAGATORS)),o=e.map(s=>{let a=this._getPropagator(s);return a||S.warn(`Propagator "${s}" requested through environment variable is unavailable.`),a}).reduce((s,a)=>(a&&s.push(a),s),[]);if(o.length!==0)return e.length===1?o[0]:new Vl({propagators:o})}_buildExporterFromEnv(){let e=$t().OTEL_TRACES_EXPORTER;if(e==="none"||e==="")return;let t=this._getSpanExporter(e);return t||S.error(`Exporter "${e}" requested through environment variable is unavailable.`),t}};Ls._registeredPropagators=new Map([["tracecontext",()=>new Fl],["baggage",()=>new Ul]]);Ls._registeredExporters=new Map});var Td,yk=p(()=>{kt();Td=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:td(e.startTime),duration:td(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}}_sendSpans(e,t){for(let o of e)console.dir(this._exportInfo(o),{depth:3});if(t)return t({code:Xt.SUCCESS})}}});var Sd,Ok=p(()=>{kt();Sd=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(e,t){if(this._stopped)return t({code:Xt.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...e),setTimeout(()=>t({code:Xt.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}}});var gd,Ak=p(()=>{P();kt();gd=class{constructor(e){this._exporter=e,this._shutdownOnce=new Vi(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,o;if(this._shutdownOnce.isCalled||(e.spanContext().traceFlags&se.SAMPLED)===0)return;let s=()=>nk._export(this._exporter,[e]).then(a=>{var i;a.code!==Xt.SUCCESS&&Kt((i=a.error)!==null&&i!==void 0?i:new Error(`SimpleSpanProcessor: span export failed (status ${a})`))}).catch(a=>{Kt(a)});if(e.resource.asyncAttributesPending){let a=(o=(t=e.resource).waitForAsyncAttributes)===null||o===void 0?void 0:o.call(t).then(()=>(a!=null&&this._unresolvedExports.delete(a),s()),i=>Kt(i));a!=null&&this._unresolvedExports.add(a)}else s()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}}});var xs={};Ae(xs,{AlwaysOffSampler:()=>Ur,AlwaysOnSampler:()=>Wt,BasicTracerProvider:()=>Ls,BatchSpanProcessor:()=>Hn,ConsoleSpanExporter:()=>Td,ForceFlushState:()=>pn,InMemorySpanExporter:()=>Sd,NoopSpanProcessor:()=>bs,ParentBasedSampler:()=>Gn,RandomIdGenerator:()=>qn,SamplingDecision:()=>hr,SimpleSpanProcessor:()=>gd,Span:()=>Cs,TraceIdRatioBasedSampler:()=>Fi,Tracer:()=>Is});var Gi=p(()=>{hk();vk();Ed();yk();Ok();Ak();RS();fd();pd();gS();vS();Hl();SS()});var jl=T((a1e,Rk)=>{"use strict";var qre="2.0.0",jre=Number.MAX_SAFE_INTEGER||9007199254740991,Yre=16,zre=250,Kre=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Rk.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Yre,MAX_SAFE_BUILD_LENGTH:zre,MAX_SAFE_INTEGER:jre,RELEASE_TYPES:Kre,SEMVER_SPEC_VERSION:qre,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Yl=T((l1e,Nk)=>{"use strict";var $re=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Nk.exports=$re});var Ms=T((kr,Ck)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:NS,MAX_SAFE_BUILD_LENGTH:Xre,MAX_LENGTH:Wre}=jl(),Jre=Yl();kr=Ck.exports={};var Qre=kr.re=[],Zre=kr.safeRe=[],D=kr.src=[],ene=kr.safeSrc=[],U=kr.t={},tne=0,CS="[a-zA-Z0-9-]",rne=[["\\s",1],["\\d",Wre],[CS,Xre]],nne=r=>{for(let[e,t]of rne)r=r.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return r},re=(r,e,t)=>{let o=nne(e),s=tne++;Jre(r,s,e),U[r]=s,D[s]=e,ene[s]=o,Qre[s]=new RegExp(e,t?"g":void 0),Zre[s]=new RegExp(o,t?"g":void 0)};re("NUMERICIDENTIFIER","0|[1-9]\\d*");re("NUMERICIDENTIFIERLOOSE","\\d+");re("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${CS}*`);re("MAINVERSION",`(${D[U.NUMERICIDENTIFIER]})\\.(${D[U.NUMERICIDENTIFIER]})\\.(${D[U.NUMERICIDENTIFIER]})`);re("MAINVERSIONLOOSE",`(${D[U.NUMERICIDENTIFIERLOOSE]})\\.(${D[U.NUMERICIDENTIFIERLOOSE]})\\.(${D[U.NUMERICIDENTIFIERLOOSE]})`);re("PRERELEASEIDENTIFIER",`(?:${D[U.NONNUMERICIDENTIFIER]}|${D[U.NUMERICIDENTIFIER]})`);re("PRERELEASEIDENTIFIERLOOSE",`(?:${D[U.NONNUMERICIDENTIFIER]}|${D[U.NUMERICIDENTIFIERLOOSE]})`);re("PRERELEASE",`(?:-(${D[U.PRERELEASEIDENTIFIER]}(?:\\.${D[U.PRERELEASEIDENTIFIER]})*))`);re("PRERELEASELOOSE",`(?:-?(${D[U.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${D[U.PRERELEASEIDENTIFIERLOOSE]})*))`);re("BUILDIDENTIFIER",`${CS}+`);re("BUILD",`(?:\\+(${D[U.BUILDIDENTIFIER]}(?:\\.${D[U.BUILDIDENTIFIER]})*))`);re("FULLPLAIN",`v?${D[U.MAINVERSION]}${D[U.PRERELEASE]}?${D[U.BUILD]}?`);re("FULL",`^${D[U.FULLPLAIN]}$`);re("LOOSEPLAIN",`[v=\\s]*${D[U.MAINVERSIONLOOSE]}${D[U.PRERELEASELOOSE]}?${D[U.BUILD]}?`);re("LOOSE",`^${D[U.LOOSEPLAIN]}$`);re("GTLT","((?:<|>)?=?)");re("XRANGEIDENTIFIERLOOSE",`${D[U.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);re("XRANGEIDENTIFIER",`${D[U.NUMERICIDENTIFIER]}|x|X|\\*`);re("XRANGEPLAIN",`[v=\\s]*(${D[U.XRANGEIDENTIFIER]})(?:\\.(${D[U.XRANGEIDENTIFIER]})(?:\\.(${D[U.XRANGEIDENTIFIER]})(?:${D[U.PRERELEASE]})?${D[U.BUILD]}?)?)?`);re("XRANGEPLAINLOOSE",`[v=\\s]*(${D[U.XRANGEIDENTIFIERLOOSE]})(?:\\.(${D[U.XRANGEIDENTIFIERLOOSE]})(?:\\.(${D[U.XRANGEIDENTIFIERLOOSE]})(?:${D[U.PRERELEASELOOSE]})?${D[U.BUILD]}?)?)?`);re("XRANGE",`^${D[U.GTLT]}\\s*${D[U.XRANGEPLAIN]}$`);re("XRANGELOOSE",`^${D[U.GTLT]}\\s*${D[U.XRANGEPLAINLOOSE]}$`);re("COERCEPLAIN",`(^|[^\\d])(\\d{1,${NS}})(?:\\.(\\d{1,${NS}}))?(?:\\.(\\d{1,${NS}}))?`);re("COERCE",`${D[U.COERCEPLAIN]}(?:$|[^\\d])`);re("COERCEFULL",D[U.COERCEPLAIN]+`(?:${D[U.PRERELEASE]})?(?:${D[U.BUILD]})?(?:$|[^\\d])`);re("COERCERTL",D[U.COERCE],!0);re("COERCERTLFULL",D[U.COERCEFULL],!0);re("LONETILDE","(?:~>?)");re("TILDETRIM",`(\\s*)${D[U.LONETILDE]}\\s+`,!0);kr.tildeTrimReplace="$1~";re("TILDE",`^${D[U.LONETILDE]}${D[U.XRANGEPLAIN]}$`);re("TILDELOOSE",`^${D[U.LONETILDE]}${D[U.XRANGEPLAINLOOSE]}$`);re("LONECARET","(?:\\^)");re("CARETTRIM",`(\\s*)${D[U.LONECARET]}\\s+`,!0);kr.caretTrimReplace="$1^";re("CARET",`^${D[U.LONECARET]}${D[U.XRANGEPLAIN]}$`);re("CARETLOOSE",`^${D[U.LONECARET]}${D[U.XRANGEPLAINLOOSE]}$`);re("COMPARATORLOOSE",`^${D[U.GTLT]}\\s*(${D[U.LOOSEPLAIN]})$|^$`);re("COMPARATOR",`^${D[U.GTLT]}\\s*(${D[U.FULLPLAIN]})$|^$`);re("COMPARATORTRIM",`(\\s*)${D[U.GTLT]}\\s*(${D[U.LOOSEPLAIN]}|${D[U.XRANGEPLAIN]})`,!0);kr.comparatorTrimReplace="$1$2$3";re("HYPHENRANGE",`^\\s*(${D[U.XRANGEPLAIN]})\\s+-\\s+(${D[U.XRANGEPLAIN]})\\s*$`);re("HYPHENRANGELOOSE",`^\\s*(${D[U.XRANGEPLAINLOOSE]})\\s+-\\s+(${D[U.XRANGEPLAINLOOSE]})\\s*$`);re("STAR","(<|>)?=?\\s*\\*");re("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");re("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var vd=T((c1e,Pk)=>{"use strict";var ine=Object.freeze({loose:!0}),one=Object.freeze({}),sne=r=>r?typeof r!="object"?ine:r:one;Pk.exports=sne});var PS=T((u1e,Lk)=>{"use strict";var Ik=/^[0-9]+$/,bk=(r,e)=>{let t=Ik.test(r),o=Ik.test(e);return t&&o&&(r=+r,e=+e),r===e?0:t&&!o?-1:o&&!t?1:rbk(e,r);Lk.exports={compareIdentifiers:bk,rcompareIdentifiers:ane}});var pt=T((f1e,Mk)=>{"use strict";var yd=Yl(),{MAX_LENGTH:xk,MAX_SAFE_INTEGER:Od}=jl(),{safeRe:Ad,t:Rd}=Ms(),lne=vd(),{compareIdentifiers:ws}=PS(),IS=class r{constructor(e,t){if(t=lne(t),e instanceof r){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>xk)throw new TypeError(`version is longer than ${xk} characters`);yd("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let o=e.trim().match(t.loose?Ad[Rd.LOOSE]:Ad[Rd.FULL]);if(!o)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>Od||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Od||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Od||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let a=+s;if(a>=0&&a=0;)typeof this.prerelease[a]=="number"&&(this.prerelease[a]++,a=-2);if(a===-1){if(t===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(t){let a=[t,s];o===!1&&(a=[t]),ws(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=a):this.prerelease=a}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Mk.exports=IS});var Hi=T((p1e,Dk)=>{"use strict";var wk=pt(),cne=(r,e,t=!1)=>{if(r instanceof wk)return r;try{return new wk(r,e)}catch(o){if(!t)return null;throw o}};Dk.exports=cne});var kk=T((d1e,Uk)=>{"use strict";var une=Hi(),fne=(r,e)=>{let t=une(r,e);return t?t.version:null};Uk.exports=fne});var Vk=T((h1e,Bk)=>{"use strict";var pne=Hi(),dne=(r,e)=>{let t=pne(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Bk.exports=dne});var Hk=T((_1e,Gk)=>{"use strict";var Fk=pt(),hne=(r,e,t,o,s)=>{typeof t=="string"&&(s=o,o=t,t=void 0);try{return new Fk(r instanceof Fk?r.version:r,t).inc(e,o,s).version}catch{return null}};Gk.exports=hne});var Yk=T((E1e,jk)=>{"use strict";var qk=Hi(),_ne=(r,e)=>{let t=qk(r,null,!0),o=qk(e,null,!0),s=t.compare(o);if(s===0)return null;let a=s>0,i=a?t:o,n=a?o:t,l=!!i.prerelease.length;if(!!n.prerelease.length&&!l){if(!n.patch&&!n.minor)return"major";if(n.compareMain(i)===0)return n.minor&&!n.patch?"minor":"patch"}let u=l?"pre":"";return t.major!==o.major?u+"major":t.minor!==o.minor?u+"minor":t.patch!==o.patch?u+"patch":"prerelease"};jk.exports=_ne});var Kk=T((m1e,zk)=>{"use strict";var Ene=pt(),mne=(r,e)=>new Ene(r,e).major;zk.exports=mne});var Xk=T((T1e,$k)=>{"use strict";var Tne=pt(),Sne=(r,e)=>new Tne(r,e).minor;$k.exports=Sne});var Jk=T((S1e,Wk)=>{"use strict";var gne=pt(),vne=(r,e)=>new gne(r,e).patch;Wk.exports=vne});var Zk=T((g1e,Qk)=>{"use strict";var yne=Hi(),One=(r,e)=>{let t=yne(r,e);return t&&t.prerelease.length?t.prerelease:null};Qk.exports=One});var Jt=T((v1e,tB)=>{"use strict";var eB=pt(),Ane=(r,e,t)=>new eB(r,t).compare(new eB(e,t));tB.exports=Ane});var nB=T((y1e,rB)=>{"use strict";var Rne=Jt(),Nne=(r,e,t)=>Rne(e,r,t);rB.exports=Nne});var oB=T((O1e,iB)=>{"use strict";var Cne=Jt(),Pne=(r,e)=>Cne(r,e,!0);iB.exports=Pne});var Nd=T((A1e,aB)=>{"use strict";var sB=pt(),Ine=(r,e,t)=>{let o=new sB(r,t),s=new sB(e,t);return o.compare(s)||o.compareBuild(s)};aB.exports=Ine});var cB=T((R1e,lB)=>{"use strict";var bne=Nd(),Lne=(r,e)=>r.sort((t,o)=>bne(t,o,e));lB.exports=Lne});var fB=T((N1e,uB)=>{"use strict";var xne=Nd(),Mne=(r,e)=>r.sort((t,o)=>xne(o,t,e));uB.exports=Mne});var zl=T((C1e,pB)=>{"use strict";var wne=Jt(),Dne=(r,e,t)=>wne(r,e,t)>0;pB.exports=Dne});var Cd=T((P1e,dB)=>{"use strict";var Une=Jt(),kne=(r,e,t)=>Une(r,e,t)<0;dB.exports=kne});var bS=T((I1e,hB)=>{"use strict";var Bne=Jt(),Vne=(r,e,t)=>Bne(r,e,t)===0;hB.exports=Vne});var LS=T((b1e,_B)=>{"use strict";var Fne=Jt(),Gne=(r,e,t)=>Fne(r,e,t)!==0;_B.exports=Gne});var Pd=T((L1e,EB)=>{"use strict";var Hne=Jt(),qne=(r,e,t)=>Hne(r,e,t)>=0;EB.exports=qne});var Id=T((x1e,mB)=>{"use strict";var jne=Jt(),Yne=(r,e,t)=>jne(r,e,t)<=0;mB.exports=Yne});var xS=T((M1e,TB)=>{"use strict";var zne=bS(),Kne=LS(),$ne=zl(),Xne=Pd(),Wne=Cd(),Jne=Id(),Qne=(r,e,t,o)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return zne(r,t,o);case"!=":return Kne(r,t,o);case">":return $ne(r,t,o);case">=":return Xne(r,t,o);case"<":return Wne(r,t,o);case"<=":return Jne(r,t,o);default:throw new TypeError(`Invalid operator: ${e}`)}};TB.exports=Qne});var gB=T((w1e,SB)=>{"use strict";var Zne=pt(),eie=Hi(),{safeRe:bd,t:Ld}=Ms(),tie=(r,e)=>{if(r instanceof Zne)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(e.includePrerelease?bd[Ld.COERCEFULL]:bd[Ld.COERCE]);else{let l=e.includePrerelease?bd[Ld.COERCERTLFULL]:bd[Ld.COERCERTL],c;for(;(c=l.exec(r))&&(!t||t.index+t[0].length!==r.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 o=t[2],s=t[3]||"0",a=t[4]||"0",i=e.includePrerelease&&t[5]?`-${t[5]}`:"",n=e.includePrerelease&&t[6]?`+${t[6]}`:"";return eie(`${o}.${s}.${a}${i}${n}`,e)};SB.exports=tie});var yB=T((D1e,vB)=>{"use strict";var MS=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 s=this.map.keys().next().value;this.delete(s)}this.map.set(e,t)}return this}};vB.exports=MS});var Qt=T((U1e,NB)=>{"use strict";var rie=/\s+/g,wS=class r{constructor(e,t){if(t=iie(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof DS)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(rie," "),this.set=this.raw.split("||").map(o=>this.parseRange(o.trim())).filter(o=>o.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let o=this.set[0];if(this.set=this.set.filter(s=>!AB(s[0])),this.set.length===0)this.set=[o];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&fie(s[0])){this.set=[s];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e0&&(this.formatted+="||");let t=this.set[e];for(let o=0;o0&&(this.formatted+=" "),this.formatted+=t[o].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let o=((this.options.includePrerelease&&cie)|(this.options.loose&&uie))+":"+e,s=OB.get(o);if(s)return s;let a=this.options.loose,i=a?Rt[Tt.HYPHENRANGELOOSE]:Rt[Tt.HYPHENRANGE];e=e.replace(i,vie(this.options.includePrerelease)),be("hyphen replace",e),e=e.replace(Rt[Tt.COMPARATORTRIM],sie),be("comparator trim",e),e=e.replace(Rt[Tt.TILDETRIM],aie),be("tilde trim",e),e=e.replace(Rt[Tt.CARETTRIM],lie),be("caret trim",e);let n=e.split(" ").map(f=>pie(f,this.options)).join(" ").split(/\s+/).map(f=>gie(f,this.options));a&&(n=n.filter(f=>(be("loose invalid filter",f,this.options),!!f.match(Rt[Tt.COMPARATORLOOSE])))),be("range list",n);let l=new Map,c=n.map(f=>new DS(f,this.options));for(let f of c){if(AB(f))return[f];l.set(f.value,f)}l.size>1&&l.has("")&&l.delete("");let u=[...l.values()];return OB.set(o,u),u}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(o=>RB(o,t)&&e.set.some(s=>RB(s,t)&&o.every(a=>s.every(i=>a.intersects(i,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new oie(e,this.options)}catch{return!1}for(let t=0;tr.value==="<0.0.0-0",fie=r=>r.value==="",RB=(r,e)=>{let t=!0,o=r.slice(),s=o.pop();for(;t&&o.length;)t=o.every(a=>s.intersects(a,e)),s=o.pop();return t},pie=(r,e)=>(be("comp",r,e),r=_ie(r,e),be("caret",r),r=die(r,e),be("tildes",r),r=mie(r,e),be("xrange",r),r=Sie(r,e),be("stars",r),r),St=r=>!r||r.toLowerCase()==="x"||r==="*",die=(r,e)=>r.trim().split(/\s+/).map(t=>hie(t,e)).join(" "),hie=(r,e)=>{let t=e.loose?Rt[Tt.TILDELOOSE]:Rt[Tt.TILDE];return r.replace(t,(o,s,a,i,n)=>{be("tilde",r,o,s,a,i,n);let l;return St(s)?l="":St(a)?l=`>=${s}.0.0 <${+s+1}.0.0-0`:St(i)?l=`>=${s}.${a}.0 <${s}.${+a+1}.0-0`:n?(be("replaceTilde pr",n),l=`>=${s}.${a}.${i}-${n} <${s}.${+a+1}.0-0`):l=`>=${s}.${a}.${i} <${s}.${+a+1}.0-0`,be("tilde return",l),l})},_ie=(r,e)=>r.trim().split(/\s+/).map(t=>Eie(t,e)).join(" "),Eie=(r,e)=>{be("caret",r,e);let t=e.loose?Rt[Tt.CARETLOOSE]:Rt[Tt.CARET],o=e.includePrerelease?"-0":"";return r.replace(t,(s,a,i,n,l)=>{be("caret",r,s,a,i,n,l);let c;return St(a)?c="":St(i)?c=`>=${a}.0.0${o} <${+a+1}.0.0-0`:St(n)?a==="0"?c=`>=${a}.${i}.0${o} <${a}.${+i+1}.0-0`:c=`>=${a}.${i}.0${o} <${+a+1}.0.0-0`:l?(be("replaceCaret pr",l),a==="0"?i==="0"?c=`>=${a}.${i}.${n}-${l} <${a}.${i}.${+n+1}-0`:c=`>=${a}.${i}.${n}-${l} <${a}.${+i+1}.0-0`:c=`>=${a}.${i}.${n}-${l} <${+a+1}.0.0-0`):(be("no pr"),a==="0"?i==="0"?c=`>=${a}.${i}.${n}${o} <${a}.${i}.${+n+1}-0`:c=`>=${a}.${i}.${n}${o} <${a}.${+i+1}.0-0`:c=`>=${a}.${i}.${n} <${+a+1}.0.0-0`),be("caret return",c),c})},mie=(r,e)=>(be("replaceXRanges",r,e),r.split(/\s+/).map(t=>Tie(t,e)).join(" ")),Tie=(r,e)=>{r=r.trim();let t=e.loose?Rt[Tt.XRANGELOOSE]:Rt[Tt.XRANGE];return r.replace(t,(o,s,a,i,n,l)=>{be("xRange",r,o,s,a,i,n,l);let c=St(a),u=c||St(i),f=u||St(n),_=f;return s==="="&&_&&(s=""),l=e.includePrerelease?"-0":"",c?s===">"||s==="<"?o="<0.0.0-0":o="*":s&&_?(u&&(i=0),n=0,s===">"?(s=">=",u?(a=+a+1,i=0,n=0):(i=+i+1,n=0)):s==="<="&&(s="<",u?a=+a+1:i=+i+1),s==="<"&&(l="-0"),o=`${s+a}.${i}.${n}${l}`):u?o=`>=${a}.0.0${l} <${+a+1}.0.0-0`:f&&(o=`>=${a}.${i}.0${l} <${a}.${+i+1}.0-0`),be("xRange return",o),o})},Sie=(r,e)=>(be("replaceStars",r,e),r.trim().replace(Rt[Tt.STAR],"")),gie=(r,e)=>(be("replaceGTE0",r,e),r.trim().replace(Rt[e.includePrerelease?Tt.GTE0PRE:Tt.GTE0],"")),vie=r=>(e,t,o,s,a,i,n,l,c,u,f,_)=>(St(o)?t="":St(s)?t=`>=${o}.0.0${r?"-0":""}`:St(a)?t=`>=${o}.${s}.0${r?"-0":""}`:i?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,St(c)?l="":St(u)?l=`<${+c+1}.0.0-0`:St(f)?l=`<${c}.${+u+1}.0-0`:_?l=`<=${c}.${u}.${f}-${_}`:r?l=`<${c}.${u}.${+f+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),yie=(r,e,t)=>{for(let o=0;o0){let s=r[o].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}});var Kl=T((k1e,xB)=>{"use strict";var $l=Symbol("SemVer ANY"),BS=class r{static get ANY(){return $l}constructor(e,t){if(t=CB(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),kS("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===$l?this.value="":this.value=this.operator+this.semver.version,kS("comp",this)}parse(e){let t=this.options.loose?PB[IB.COMPARATORLOOSE]:PB[IB.COMPARATOR],o=e.match(t);if(!o)throw new TypeError(`Invalid comparator: ${e}`);this.operator=o[1]!==void 0?o[1]:"",this.operator==="="&&(this.operator=""),o[2]?this.semver=new bB(o[2],this.options.loose):this.semver=$l}toString(){return this.value}test(e){if(kS("Comparator.test",e,this.options.loose),this.semver===$l||e===$l)return!0;if(typeof e=="string")try{e=new bB(e,this.options)}catch{return!1}return US(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new LB(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new LB(this.value,t).test(e.semver):(t=CB(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("=")||US(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||US(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};xB.exports=BS;var CB=vd(),{safeRe:PB,t:IB}=Ms(),US=xS(),kS=Yl(),bB=pt(),LB=Qt()});var Xl=T((B1e,MB)=>{"use strict";var Oie=Qt(),Aie=(r,e,t)=>{try{e=new Oie(e,t)}catch{return!1}return e.test(r)};MB.exports=Aie});var DB=T((V1e,wB)=>{"use strict";var Rie=Qt(),Nie=(r,e)=>new Rie(r,e).set.map(t=>t.map(o=>o.value).join(" ").trim().split(" "));wB.exports=Nie});var kB=T((F1e,UB)=>{"use strict";var Cie=pt(),Pie=Qt(),Iie=(r,e,t)=>{let o=null,s=null,a=null;try{a=new Pie(e,t)}catch{return null}return r.forEach(i=>{a.test(i)&&(!o||s.compare(i)===-1)&&(o=i,s=new Cie(o,t))}),o};UB.exports=Iie});var VB=T((G1e,BB)=>{"use strict";var bie=pt(),Lie=Qt(),xie=(r,e,t)=>{let o=null,s=null,a=null;try{a=new Lie(e,t)}catch{return null}return r.forEach(i=>{a.test(i)&&(!o||s.compare(i)===1)&&(o=i,s=new bie(o,t))}),o};BB.exports=xie});var HB=T((H1e,GB)=>{"use strict";var VS=pt(),Mie=Qt(),FB=zl(),wie=(r,e)=>{r=new Mie(r,e);let t=new VS("0.0.0");if(r.test(t)||(t=new VS("0.0.0-0"),r.test(t)))return t;t=null;for(let o=0;o{let n=new VS(i.semver.version);switch(i.operator){case">":n.prerelease.length===0?n.patch++:n.prerelease.push(0),n.raw=n.format();case"":case">=":(!a||FB(n,a))&&(a=n);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),a&&(!t||FB(t,a))&&(t=a)}return t&&r.test(t)?t:null};GB.exports=wie});var jB=T((q1e,qB)=>{"use strict";var Die=Qt(),Uie=(r,e)=>{try{return new Die(r,e).range||"*"}catch{return null}};qB.exports=Uie});var xd=T((j1e,$B)=>{"use strict";var kie=pt(),KB=Kl(),{ANY:Bie}=KB,Vie=Qt(),Fie=Xl(),YB=zl(),zB=Cd(),Gie=Id(),Hie=Pd(),qie=(r,e,t,o)=>{r=new kie(r,o),e=new Vie(e,o);let s,a,i,n,l;switch(t){case">":s=YB,a=Gie,i=zB,n=">",l=">=";break;case"<":s=zB,a=Hie,i=YB,n="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Fie(r,e,o))return!1;for(let c=0;c{m.semver===Bie&&(m=new KB(">=0.0.0")),f=f||m,_=_||m,s(m.semver,f.semver,o)?f=m:i(m.semver,_.semver,o)&&(_=m)}),f.operator===n||f.operator===l||(!_.operator||_.operator===n)&&a(r,_.semver))return!1;if(_.operator===l&&i(r,_.semver))return!1}return!0};$B.exports=qie});var WB=T((Y1e,XB)=>{"use strict";var jie=xd(),Yie=(r,e,t)=>jie(r,e,">",t);XB.exports=Yie});var QB=T((z1e,JB)=>{"use strict";var zie=xd(),Kie=(r,e,t)=>zie(r,e,"<",t);JB.exports=Kie});var tV=T((K1e,eV)=>{"use strict";var ZB=Qt(),$ie=(r,e,t)=>(r=new ZB(r,t),e=new ZB(e,t),r.intersects(e,t));eV.exports=$ie});var nV=T(($1e,rV)=>{"use strict";var Xie=Xl(),Wie=Jt();rV.exports=(r,e,t)=>{let o=[],s=null,a=null,i=r.sort((u,f)=>Wie(u,f,t));for(let u of i)Xie(u,e,t)?(a=u,s||(s=u)):(a&&o.push([s,a]),a=null,s=null);s&&o.push([s,null]);let n=[];for(let[u,f]of o)u===f?n.push(u):!f&&u===i[0]?n.push("*"):f?u===i[0]?n.push(`<=${f}`):n.push(`${u} - ${f}`):n.push(`>=${u}`);let l=n.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length{"use strict";var iV=Qt(),GS=Kl(),{ANY:FS}=GS,Wl=Xl(),HS=Jt(),Jie=(r,e,t={})=>{if(r===e)return!0;r=new iV(r,t),e=new iV(e,t);let o=!1;e:for(let s of r.set){for(let a of e.set){let i=Zie(s,a,t);if(o=o||i!==null,i)continue e}if(o)return!1}return!0},Qie=[new GS(">=0.0.0-0")],oV=[new GS(">=0.0.0")],Zie=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===FS){if(e.length===1&&e[0].semver===FS)return!0;t.includePrerelease?r=Qie:r=oV}if(e.length===1&&e[0].semver===FS){if(t.includePrerelease)return!0;e=oV}let o=new Set,s,a;for(let m of r)m.operator===">"||m.operator===">="?s=sV(s,m,t):m.operator==="<"||m.operator==="<="?a=aV(a,m,t):o.add(m.semver);if(o.size>1)return null;let i;if(s&&a){if(i=HS(s.semver,a.semver,t),i>0)return null;if(i===0&&(s.operator!==">="||a.operator!=="<="))return null}for(let m of o){if(s&&!Wl(m,String(s),t)||a&&!Wl(m,String(a),t))return null;for(let O of e)if(!Wl(m,String(O),t))return!1;return!0}let n,l,c,u,f=a&&!t.includePrerelease&&a.semver.prerelease.length?a.semver:!1,_=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1;f&&f.prerelease.length===1&&a.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let m of e){if(u=u||m.operator===">"||m.operator===">=",c=c||m.operator==="<"||m.operator==="<=",s){if(_&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===_.major&&m.semver.minor===_.minor&&m.semver.patch===_.patch&&(_=!1),m.operator===">"||m.operator===">="){if(n=sV(s,m,t),n===m&&n!==s)return!1}else if(s.operator===">="&&!Wl(s.semver,String(m),t))return!1}if(a){if(f&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===f.major&&m.semver.minor===f.minor&&m.semver.patch===f.patch&&(f=!1),m.operator==="<"||m.operator==="<="){if(l=aV(a,m,t),l===m&&l!==a)return!1}else if(a.operator==="<="&&!Wl(a.semver,String(m),t))return!1}if(!m.operator&&(a||s)&&i!==0)return!1}return!(s&&c&&!a&&i!==0||a&&u&&!s&&i!==0||_||f)},sV=(r,e,t)=>{if(!r)return e;let o=HS(r.semver,e.semver,t);return o>0?r:o<0||e.operator===">"&&r.operator===">="?e:r},aV=(r,e,t)=>{if(!r)return e;let o=HS(r.semver,e.semver,t);return o<0?r:o>0||e.operator==="<"&&r.operator==="<="?e:r};lV.exports=Jie});var jS=T((W1e,pV)=>{"use strict";var qS=Ms(),uV=jl(),eoe=pt(),fV=PS(),toe=Hi(),roe=kk(),noe=Vk(),ioe=Hk(),ooe=Yk(),soe=Kk(),aoe=Xk(),loe=Jk(),coe=Zk(),uoe=Jt(),foe=nB(),poe=oB(),doe=Nd(),hoe=cB(),_oe=fB(),Eoe=zl(),moe=Cd(),Toe=bS(),Soe=LS(),goe=Pd(),voe=Id(),yoe=xS(),Ooe=gB(),Aoe=Kl(),Roe=Qt(),Noe=Xl(),Coe=DB(),Poe=kB(),Ioe=VB(),boe=HB(),Loe=jB(),xoe=xd(),Moe=WB(),woe=QB(),Doe=tV(),Uoe=nV(),koe=cV();pV.exports={parse:toe,valid:roe,clean:noe,inc:ioe,diff:ooe,major:soe,minor:aoe,patch:loe,prerelease:coe,compare:uoe,rcompare:foe,compareLoose:poe,compareBuild:doe,sort:hoe,rsort:_oe,gt:Eoe,lt:moe,eq:Toe,neq:Soe,gte:goe,lte:voe,cmp:yoe,coerce:Ooe,Comparator:Aoe,Range:Roe,satisfies:Noe,toComparators:Coe,maxSatisfying:Poe,minSatisfying:Ioe,minVersion:boe,validRange:Loe,outside:xoe,gtr:Moe,ltr:woe,intersects:Doe,simplifyRange:Uoe,subset:koe,SemVer:eoe,re:qS.re,src:qS.src,tokens:qS.t,SEMVER_SPEC_VERSION:uV.SEMVER_SPEC_VERSION,RELEASE_TYPES:uV.RELEASE_TYPES,compareIdentifiers:fV.compareIdentifiers,rcompareIdentifiers:fV.rcompareIdentifiers}});function Voe(r){var e=decodeURIComponent(r).split(":");if(e.length!==4)return null;var t=hV(e,4),o=t[0],s=t[1],a=t[3],i=o.padStart(32,"0"),n=s.padStart(16,"0"),l=Boe.test(a)?parseInt(a,16)&1:1;return{traceId:i,spanId:n,isRemote:!0,traceFlags:l}}var dV,hV,YS,Md,_V,Boe,EV=p(()=>{P();xr();dV=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],o=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&o>=r.length&&(r=void 0),{value:r&&r[o++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},hV=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var o=t.call(r),s,a=[],i;try{for(;(e===void 0||e-- >0)&&!(s=o.next()).done;)a.push(s.value)}catch(n){i={error:n}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return a},YS="uber-trace-id",Md="uberctx",_V=(function(){function r(e){typeof e=="string"?(this._jaegerTraceHeader=e,this._jaegerBaggageHeaderPrefix=Md):(this._jaegerTraceHeader=(e==null?void 0:e.customTraceHeader)||YS,this._jaegerBaggageHeaderPrefix=(e==null?void 0:e.customBaggageHeaderPrefix)||Md)}return r.prototype.inject=function(e,t,o){var s,a,i=ie.getSpanContext(e),n=Ue.getBaggage(e);if(i&&At(e)===!1){var l="0"+(i.traceFlags||se.NONE).toString(16);o.set(t,this._jaegerTraceHeader,i.traceId+":"+i.spanId+":0:"+l)}if(n)try{for(var c=dV(n.getAllEntries()),u=c.next();!u.done;u=c.next()){var f=hV(u.value,2),_=f[0],m=f[1];o.set(t,this._jaegerBaggageHeaderPrefix+"-"+_,encodeURIComponent(m.value))}}catch(O){s={error:O}}finally{try{u&&!u.done&&(a=c.return)&&a.call(c)}finally{if(s)throw s.error}}},r.prototype.extract=function(e,t,o){var s,a,i=this,n,l=o.get(t,this._jaegerTraceHeader),c=Array.isArray(l)?l[0]:l,u=o.keys(t).filter(function(I){return I.startsWith(i._jaegerBaggageHeaderPrefix+"-")}).map(function(I){var M=o.get(t,I);return{key:I.substring(i._jaegerBaggageHeaderPrefix.length+1),value:Array.isArray(M)?M[0]:M}}),f=e;if(typeof c=="string"){var _=Voe(c);_&&(f=ie.setSpanContext(f,_))}if(u.length===0)return f;var m=(n=Ue.getBaggage(e))!==null&&n!==void 0?n:Ue.createBaggage();try{for(var O=dV(u),y=O.next();!y.done;y=O.next()){var A=y.value;A.value!==void 0&&(m=m.setEntry(A.key,{value:decodeURIComponent(A.value)}))}}catch(I){s={error:I}}finally{try{y&&!y.done&&(a=O.return)&&a.call(O)}finally{if(s)throw s.error}}return f=Ue.setBaggage(f,m),f},r.prototype.fields=function(){return[this._jaegerTraceHeader]},r})(),Boe=/^[0-9a-f]{1,2}$/i});var mV={};Ae(mV,{JaegerPropagator:()=>_V,UBER_BAGGAGE_HEADER_PREFIX:()=>Md,UBER_TRACE_ID_HEADER:()=>YS});var TV=p(()=>{EV()});var vV=T(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});Ud.NodeTracerProvider=void 0;var SV=rU(),wd=(lU(),ee(aU)),gV=(Gi(),ee(xs)),Foe=jS(),Goe=(TV(),ee(mV)),Dd=class extends gV.BasicTracerProvider{constructor(e={}){super(e)}register(e={}){if(e.contextManager===void 0){let t=Foe.gte(process.version,"14.8.0")?SV.AsyncLocalStorageContextManager:SV.AsyncHooksContextManager;e.contextManager=new t,e.contextManager.enable()}super.register(e)}};Ud.NodeTracerProvider=Dd;Dd._registeredPropagators=new Map([...gV.BasicTracerProvider._registeredPropagators,["b3",()=>new wd.B3Propagator({injectEncoding:wd.B3InjectEncoding.SINGLE_HEADER})],["b3multi",()=>new wd.B3Propagator({injectEncoding:wd.B3InjectEncoding.MULTI_HEADER})],["jaeger",()=>new Goe.JaegerPropagator]])});var zS=T(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.Tracer=fe.TraceIdRatioBasedSampler=fe.Span=fe.SimpleSpanProcessor=fe.SamplingDecision=fe.RandomIdGenerator=fe.ParentBasedSampler=fe.NoopSpanProcessor=fe.InMemorySpanExporter=fe.ForceFlushState=fe.ConsoleSpanExporter=fe.BatchSpanProcessor=fe.BasicTracerProvider=fe.AlwaysOnSampler=fe.AlwaysOffSampler=fe.NodeTracerProvider=void 0;var Hoe=vV();Object.defineProperty(fe,"NodeTracerProvider",{enumerable:!0,get:function(){return Hoe.NodeTracerProvider}});var gt=(Gi(),ee(xs));Object.defineProperty(fe,"AlwaysOffSampler",{enumerable:!0,get:function(){return gt.AlwaysOffSampler}});Object.defineProperty(fe,"AlwaysOnSampler",{enumerable:!0,get:function(){return gt.AlwaysOnSampler}});Object.defineProperty(fe,"BasicTracerProvider",{enumerable:!0,get:function(){return gt.BasicTracerProvider}});Object.defineProperty(fe,"BatchSpanProcessor",{enumerable:!0,get:function(){return gt.BatchSpanProcessor}});Object.defineProperty(fe,"ConsoleSpanExporter",{enumerable:!0,get:function(){return gt.ConsoleSpanExporter}});Object.defineProperty(fe,"ForceFlushState",{enumerable:!0,get:function(){return gt.ForceFlushState}});Object.defineProperty(fe,"InMemorySpanExporter",{enumerable:!0,get:function(){return gt.InMemorySpanExporter}});Object.defineProperty(fe,"NoopSpanProcessor",{enumerable:!0,get:function(){return gt.NoopSpanProcessor}});Object.defineProperty(fe,"ParentBasedSampler",{enumerable:!0,get:function(){return gt.ParentBasedSampler}});Object.defineProperty(fe,"RandomIdGenerator",{enumerable:!0,get:function(){return gt.RandomIdGenerator}});Object.defineProperty(fe,"SamplingDecision",{enumerable:!0,get:function(){return gt.SamplingDecision}});Object.defineProperty(fe,"SimpleSpanProcessor",{enumerable:!0,get:function(){return gt.SimpleSpanProcessor}});Object.defineProperty(fe,"Span",{enumerable:!0,get:function(){return gt.Span}});Object.defineProperty(fe,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return gt.TraceIdRatioBasedSampler}});Object.defineProperty(fe,"Tracer",{enumerable:!0,get:function(){return gt.Tracer}})});function Ds(){return`unknown_service:${process.argv0}`}var yV=p(()=>{});var OV=p(()=>{yV()});var KS=p(()=>{OV()});var Ce,dn=p(()=>{P();Ve();xr();KS();Ce=class r{constructor(e,t){var o;this._attributes=e,this.asyncAttributesPending=t!=null,this._syncAttributes=(o=this._attributes)!==null&&o!==void 0?o:{},this._asyncAttributesPromise=t==null?void 0:t.then(s=>(this._attributes=Object.assign({},this._attributes,s),this.asyncAttributesPending=!1,s),s=>(S.debug("a resource's async attributes promise rejected: %s",s),this.asyncAttributesPending=!1,{}))}static empty(){return r.EMPTY}static default(){return new r({[at]:Ds(),[ge]:bn[ge],[Se]:bn[Se],[ve]:bn[ve]})}get attributes(){var e;return this.asyncAttributesPending&&S.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 o=Object.assign(Object.assign({},this._syncAttributes),(t=e._syncAttributes)!==null&&t!==void 0?t:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new r(o);let s=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(([a,i])=>{var n;return Object.assign(Object.assign(Object.assign(Object.assign({},this._syncAttributes),a),(n=e._syncAttributes)!==null&&n!==void 0?n:e.attributes),i)});return new r(o,s)}};Ce.EMPTY=new Ce({})});var AV,RV,$S=p(()=>{AV=r=>{switch(r){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return r}},RV=r=>{switch(r){case"sunos":return"solaris";case"win32":return"windows";default:return r}}});import*as NV from"child_process";import*as CV from"util";var Us,kd=p(()=>{Us=CV.promisify(NV.exec)});var PV={};Ae(PV,{getMachineId:()=>qoe});async function qoe(){try{let e=(await Us('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(` `).find(o=>o.includes("IOPlatformUUID"));if(!e)return"";let t=e.split('" = "');if(t.length===2)return t[1].slice(0,-1)}catch(r){S.debug(`error reading machine id: ${r}`)}return""}var IV=p(()=>{kd();P()});var bV={};Ae(bV,{getMachineId:()=>Yoe});import{promises as joe}from"fs";async function Yoe(){let r=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let e of r)try{return(await joe.readFile(e,{encoding:"utf8"})).trim()}catch(t){S.debug(`error reading machine id: ${t}`)}return""}var LV=p(()=>{P()});var xV={};Ae(xV,{getMachineId:()=>Koe});import{promises as zoe}from"fs";async function Koe(){try{return(await zoe.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(r){S.debug(`error reading machine id: ${r}`)}try{return(await Us("kenv -q smbios.system.uuid")).stdout.trim()}catch(r){S.debug(`error reading machine id: ${r}`)}return""}var MV=p(()=>{kd();P()});var wV={};Ae(wV,{getMachineId:()=>$oe});import*as Bd from"process";async function $oe(){let r="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",e="%windir%\\System32\\REG.exe";Bd.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in Bd.env&&(e="%windir%\\sysnative\\cmd.exe /c "+e);try{let o=(await Us(`${e} ${r}`)).stdout.split("REG_SZ");if(o.length===2)return o[1].trim()}catch(t){S.debug(`error reading machine id: ${t}`)}return""}var DV=p(()=>{kd();P()});var UV={};Ae(UV,{getMachineId:()=>Xoe});async function Xoe(){return S.debug("could not read machine-id: unsupported platform"),""}var kV=p(()=>{P()});import*as BV from"process";var qi,VV=p(()=>{switch(BV.platform){case"darwin":({getMachineId:qi}=(IV(),ee(PV)));break;case"linux":({getMachineId:qi}=(LV(),ee(bV)));break;case"freebsd":({getMachineId:qi}=(MV(),ee(xV)));break;case"win32":({getMachineId:qi}=(DV(),ee(wV)));break;default:({getMachineId:qi}=(kV(),ee(UV)))}});import{arch as Woe,hostname as Joe}from"os";var XS,ji,WS=p(()=>{Ve();dn();$S();VV();XS=class{detect(e){let t={[Bm]:Joe(),[Vm]:AV(Woe())};return new Ce(t,this._getAsyncAttributes())}_getAsyncAttributes(){return qi().then(e=>{let t={};return e&&(t[km]=e),t})}},ji=new XS});var JS,Jl,FV=p(()=>{WS();JS=class{detect(e){return Promise.resolve(ji.detect(e))}},Jl=new JS});import{platform as Qoe,release as Zoe}from"os";var QS,Yi,ZS=p(()=>{Ve();dn();$S();QS=class{detect(e){let t={[Fm]:RV(Qoe()),[Gm]:Zoe()};return new Ce(t)}},Yi=new QS});var eg,Ql,GV=p(()=>{ZS();eg=class{detect(e){return Promise.resolve(Yi.detect(e))}},Ql=new eg});import*as HV from"os";var tg,zi,rg=p(()=>{P();Ve();dn();tg=class{detect(e){let t={[Hm]:process.pid,[qm]:process.title,[jm]:process.execPath,[zm]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[ko]:process.versions.node,[st]:"nodejs",[Ja]:"Node.js"};process.argv.length>1&&(t[Ym]=process.argv[1]);try{let o=HV.userInfo();t[Km]=o.username}catch(o){S.debug(`error obtaining process owner: ${o}`)}return new Ce(t)}},zi=new tg});var ng,Zl,qV=p(()=>{rg();ng=class{detect(e){return Promise.resolve(zi.detect(e))}},Zl=new ng});import{randomUUID as ese}from"crypto";var ig,ec,jV=p(()=>{Ve();dn();ig=class{detect(e){let t={[$m]:ese()};return new Ce(t)}},ec=new ig});var YV=p(()=>{FV();WS();GV();ZS();qV();rg();jV()});var zV=p(()=>{YV()});var og,tc,sg=p(()=>{Ve();P();dn();og=class{detect(e){var t,o,s;if(!(typeof navigator<"u"&&((o=(t=global.process)===null||t===void 0?void 0:t.versions)===null||o===void 0?void 0:o.node)===void 0&&((s=global.Bun)===null||s===void 0?void 0:s.version)===void 0))return Ce.empty();let i={[st]:"browser",[Ja]:"Web Browser",[ko]:navigator.userAgent};return this._getResourceAttributes(i,e)}_getResourceAttributes(e,t){return e[ko]===""?(S.debug("BrowserDetector failed: Unable to find required browser resources. "),Ce.empty()):new Ce(Object.assign({},e))}},tc=new og});var ag,lg,KV=p(()=>{sg();ag=class{detect(e){return Promise.resolve(tc.detect(e))}},lg=new ag});var cg,rc,ug=p(()=>{P();xr();Ve();dn();cg=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={},o=Fo(),s=o.OTEL_RESOURCE_ATTRIBUTES,a=o.OTEL_SERVICE_NAME;if(s)try{let i=this._parseResourceAttributes(s);Object.assign(t,i)}catch(i){S.debug(`EnvDetector failed: ${i.message}`)}return a&&(t[at]=a),new Ce(t)}_parseResourceAttributes(e){if(!e)return{};let t={},o=e.split(this._COMMA_SEPARATOR,-1);for(let s of o){let a=s.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(a.length!==2)continue;let[i,n]=a;if(i=i.trim(),n=n.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(i))throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);if(!this._isValid(n))throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);t[i]=decodeURIComponent(n)}return t}_isValid(e){return e.length<=this._MAX_LENGTH&&this._isBaggageOctetString(e)}_isBaggageOctetString(e){for(let t=0;t126)return!1}return!0}_isValidAndNotEmpty(e){return e.length>0&&this._isValid(e)}},rc=new cg});var fg,pg,$V=p(()=>{ug();fg=class{detect(e){return Promise.resolve(rc.detect(e))}},pg=new fg});var XV=p(()=>{zV();KV();$V();sg();ug()});var WV,JV=p(()=>{WV=r=>r!==null&&typeof r=="object"&&typeof r.then=="function"});var QV,ZV,e2,t2=p(()=>{dn();P();JV();QV=async(r={})=>{let e=await Promise.all((r.detectors||[]).map(async t=>{try{let o=await t.detect(r);return S.debug(`${t.constructor.name} found resource.`,o),o}catch(o){return S.debug(`${t.constructor.name} failed: ${o.message}`),Ce.empty()}}));return e2(e),e.reduce((t,o)=>t.merge(o),Ce.empty())},ZV=(r={})=>{var e;let t=((e=r.detectors)!==null&&e!==void 0?e:[]).map(s=>{try{let a=s.detect(r),i;if(WV(a)){let n=async()=>{var l;let c=await a;return await((l=c.waitForAsyncAttributes)===null||l===void 0?void 0:l.call(c)),c.attributes};i=new Ce({},n())}else i=a;return i.waitForAsyncAttributes?i.waitForAsyncAttributes().then(()=>S.debug(`${s.constructor.name} found resource.`,i)):S.debug(`${s.constructor.name} found resource.`,i),i}catch(a){return S.error(`${s.constructor.name} failed: ${a.message}`),Ce.empty()}}),o=t.reduce((s,a)=>s.merge(a),Ce.empty());return o.waitForAsyncAttributes&&o.waitForAsyncAttributes().then(()=>{e2(t)}),o},e2=r=>{r.forEach(e=>{if(Object.keys(e.attributes).length>0){let t=JSON.stringify(e.attributes,null,4);S.verbose(t)}})}});var Vd={};Ae(Vd,{Resource:()=>Ce,browserDetector:()=>lg,browserDetectorSync:()=>tc,defaultServiceName:()=>Ds,detectResources:()=>QV,detectResourcesSync:()=>ZV,envDetector:()=>pg,envDetectorSync:()=>rc,hostDetector:()=>Jl,hostDetectorSync:()=>ji,osDetector:()=>Ql,osDetectorSync:()=>Yi,processDetector:()=>Zl,processDetectorSync:()=>zi,serviceInstanceIdDetectorSync:()=>ec});var Fd=p(()=>{dn();KS();XV();t2()});function r2(r,e,t,o){for(let s=0,a=r.length;se.disable())}var i2=p(()=>{});function o2(r){var e,t;let o=r.tracerProvider||ie.getTracerProvider(),s=r.meterProvider||gi.getMeterProvider(),a=r.loggerProvider||_l.getLoggerProvider(),i=(t=(e=r.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&t!==void 0?t:[];return r2(i,o,s,a),()=>{n2(i)}}var s2=p(()=>{P();El();i2()});var hg=T((FUe,c2)=>{"use strict";function dg(r){return typeof r=="function"}var vt=console.error.bind(console);function nc(r,e,t){var o=!!r[e]&&r.propertyIsEnumerable(e);Object.defineProperty(r,e,{configurable:!0,enumerable:o,writable:!0,value:t})}function ic(r){r&&r.logger&&(dg(r.logger)?vt=r.logger:vt("new logger isn't a function, not replacing"))}function a2(r,e,t){if(!r||!r[e]){vt("no original function "+e+" to wrap");return}if(!t){vt("no wrapper function"),vt(new Error().stack);return}if(!dg(r[e])||!dg(t)){vt("original object and wrapper must be functions");return}var o=r[e],s=t(o,e);return nc(s,"__original",o),nc(s,"__unwrap",function(){r[e]===s&&nc(r,e,o)}),nc(s,"__wrapped",!0),nc(r,e,s),s}function tse(r,e,t){if(r)Array.isArray(r)||(r=[r]);else{vt("must provide one or more modules to patch"),vt(new Error().stack);return}if(!(e&&Array.isArray(e))){vt("must provide one or more functions to wrap on modules");return}r.forEach(function(o){e.forEach(function(s){a2(o,s,t)})})}function l2(r,e){if(!r||!r[e]){vt("no function to unwrap."),vt(new Error().stack);return}if(!r[e].__unwrap)vt("no original to unwrap to -- has "+e+" already been unwrapped?");else return r[e].__unwrap()}function rse(r,e){if(r)Array.isArray(r)||(r=[r]);else{vt("must provide one or more modules to patch"),vt(new Error().stack);return}if(!(e&&Array.isArray(e))){vt("must provide one or more functions to unwrap on modules");return}r.forEach(function(t){e.forEach(function(o){l2(t,o)})})}ic.wrap=a2;ic.massWrap=tse;ic.unwrap=l2;ic.massUnwrap=rse;c2.exports=ic});var Yn,Gd,u2=p(()=>{P();El();Yn=Nn(hg()),Gd=class{constructor(e,t,o){this.instrumentationName=e,this.instrumentationVersion=t,this._config={},this._wrap=Yn.wrap,this._unwrap=Yn.unwrap,this._massWrap=Yn.massWrap,this._massUnwrap=Yn.massUnwrap,this.setConfig(o),this._diag=S.createComponentLogger({namespace:e}),this._tracer=ie.getTracer(e,t),this._meter=gi.getMeter(e,t),this._logger=_l.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,o,s){if(e)try{e(o,s)}catch(a){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:t},a)}}}});var p2=T((jUe,f2)=>{var ks=1e3,Bs=ks*60,Vs=Bs*60,Ki=Vs*24,nse=Ki*7,ise=Ki*365.25;f2.exports=function(r,e){e=e||{};var t=typeof r;if(t==="string"&&r.length>0)return ose(r);if(t==="number"&&isFinite(r))return e.long?ase(r):sse(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function ose(r){if(r=String(r),!(r.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(r);if(e){var t=parseFloat(e[1]),o=(e[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return t*ise;case"weeks":case"week":case"w":return t*nse;case"days":case"day":case"d":return t*Ki;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Vs;case"minutes":case"minute":case"mins":case"min":case"m":return t*Bs;case"seconds":case"second":case"secs":case"sec":case"s":return t*ks;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function sse(r){var e=Math.abs(r);return e>=Ki?Math.round(r/Ki)+"d":e>=Vs?Math.round(r/Vs)+"h":e>=Bs?Math.round(r/Bs)+"m":e>=ks?Math.round(r/ks)+"s":r+"ms"}function ase(r){var e=Math.abs(r);return e>=Ki?Hd(r,e,Ki,"day"):e>=Vs?Hd(r,e,Vs,"hour"):e>=Bs?Hd(r,e,Bs,"minute"):e>=ks?Hd(r,e,ks,"second"):r+" ms"}function Hd(r,e,t,o){var s=e>=t*1.5;return Math.round(r/t)+" "+o+(s?"s":"")}});var _g=T((YUe,d2)=>{function lse(r){t.debug=t,t.default=t,t.coerce=l,t.disable=i,t.enable=s,t.enabled=n,t.humanize=p2(),t.destroy=c,Object.keys(r).forEach(u=>{t[u]=r[u]}),t.names=[],t.skips=[],t.formatters={};function e(u){let f=0;for(let _=0;_{if(B==="%%")return"%";N++;let te=t.formatters[G];if(typeof te=="function"){let $=A[N];B=te.call(I,$),A.splice(N,1),N--}return B}),t.formatArgs.call(I,A),(I.log||t.log).apply(I,A)}return y.namespace=u,y.useColors=t.useColors(),y.color=t.selectColor(u),y.extend=o,y.destroy=t.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>_!==null?_:(m!==t.namespaces&&(m=t.namespaces,O=t.enabled(u)),O),set:A=>{_=A}}),typeof t.init=="function"&&t.init(y),y}function o(u,f){let _=t(this.namespace+(typeof f>"u"?":":f)+u);return _.log=this.log,_}function s(u){t.save(u),t.namespaces=u,t.names=[],t.skips=[];let f=(typeof u=="string"?u:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let _ of f)_[0]==="-"?t.skips.push(_.slice(1)):t.names.push(_)}function a(u,f){let _=0,m=0,O=-1,y=0;for(;_"-"+f)].join(",");return t.enable(""),u}function n(u){for(let f of t.skips)if(a(u,f))return!1;for(let f of t.names)if(a(u,f))return!0;return!1}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}d2.exports=lse});var h2=T((Nt,qd)=>{Nt.formatArgs=use;Nt.save=fse;Nt.load=pse;Nt.useColors=cse;Nt.storage=dse();Nt.destroy=(()=>{let r=!1;return()=>{r||(r=!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`."))}})();Nt.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 cse(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let r;return 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&&(r=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(r[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function use(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+qd.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;r.splice(1,0,e,"color: inherit");let t=0,o=0;r[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(t++,s==="%c"&&(o=t))}),r.splice(o,0,e)}Nt.log=console.debug||console.log||(()=>{});function fse(r){try{r?Nt.storage.setItem("debug",r):Nt.storage.removeItem("debug")}catch{}}function pse(){let r;try{r=Nt.storage.getItem("debug")||Nt.storage.getItem("DEBUG")}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=process.env.DEBUG),r}function dse(){try{return localStorage}catch{}}qd.exports=_g()(Nt);var{formatters:hse}=qd.exports;hse.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var E2=T((zUe,_2)=>{"use strict";_2.exports=(r,e=process.argv)=>{let t=r.startsWith("-")?"":r.length===1?"-":"--",o=e.indexOf(t+r),s=e.indexOf("--");return o!==-1&&(s===-1||o{"use strict";var _se=V("os"),m2=V("tty"),Zt=E2(),{env:Ze}=process,zn;Zt("no-color")||Zt("no-colors")||Zt("color=false")||Zt("color=never")?zn=0:(Zt("color")||Zt("colors")||Zt("color=true")||Zt("color=always"))&&(zn=1);"FORCE_COLOR"in Ze&&(Ze.FORCE_COLOR==="true"?zn=1:Ze.FORCE_COLOR==="false"?zn=0:zn=Ze.FORCE_COLOR.length===0?1:Math.min(parseInt(Ze.FORCE_COLOR,10),3));function Eg(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function mg(r,e){if(zn===0)return 0;if(Zt("color=16m")||Zt("color=full")||Zt("color=truecolor"))return 3;if(Zt("color=256"))return 2;if(r&&!e&&zn===void 0)return 0;let t=zn||0;if(Ze.TERM==="dumb")return t;if(process.platform==="win32"){let o=_se.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Ze)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(o=>o in Ze)||Ze.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in Ze)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ze.TEAMCITY_VERSION)?1:0;if(Ze.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ze){let o=parseInt((Ze.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ze.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ze.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ze.TERM)||"COLORTERM"in Ze?1:t}function Ese(r){let e=mg(r,r&&r.isTTY);return Eg(e)}T2.exports={supportsColor:Ese,stdout:Eg(mg(!0,m2.isatty(1))),stderr:Eg(mg(!0,m2.isatty(2)))}});var v2=T((et,Yd)=>{var mse=V("tty"),jd=V("util");et.init=Ase;et.log=vse;et.formatArgs=Sse;et.save=yse;et.load=Ose;et.useColors=Tse;et.destroy=jd.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");et.colors=[6,2,3,4,5,1];try{let r=S2();r&&(r.stderr||r).level>=2&&(et.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{}et.inspectOpts=Object.keys(process.env).filter(r=>/^debug_/i.test(r)).reduce((r,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(s,a)=>a.toUpperCase()),o=process.env[e];return/^(yes|on|true|enabled)$/i.test(o)?o=!0:/^(no|off|false|disabled)$/i.test(o)?o=!1:o==="null"?o=null:o=Number(o),r[t]=o,r},{});function Tse(){return"colors"in et.inspectOpts?!!et.inspectOpts.colors:mse.isatty(process.stderr.fd)}function Sse(r){let{namespace:e,useColors:t}=this;if(t){let o=this.color,s="\x1B[3"+(o<8?o:"8;5;"+o),a=` ${s};1m${e} \x1B[0m`;r[0]=a+r[0].split(` `).join(` `+a),r.push(s+"m+"+Yd.exports.humanize(this.diff)+"\x1B[0m")}else r[0]=gse()+e+" "+r[0]}function gse(){return et.inspectOpts.hideDate?"":new Date().toISOString()+" "}function vse(...r){return process.stderr.write(jd.formatWithOptions(et.inspectOpts,...r)+` `)}function yse(r){r?process.env.DEBUG=r:delete process.env.DEBUG}function Ose(){return process.env.DEBUG}function Ase(r){r.inspectOpts={};let e=Object.keys(et.inspectOpts);for(let t=0;te.trim()).join(" ")};g2.O=function(r){return this.inspectOpts.colors=this.useColors,jd.inspect(r,this.inspectOpts)}});var y2=T(($Ue,Tg)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Tg.exports=h2():Tg.exports=v2()});var gg=T((XUe,O2)=>{"use strict";var Sg=V("path").sep;O2.exports=function(r){var e=r.split(Sg),t=e.lastIndexOf("node_modules");if(t!==-1&&e[t+1]){for(var o=e[t+1][0]==="@",s=o?e[t+1]+"/"+e[t+2]:e[t+1],a=o?3:2,i="",n=t+a-1,l=0;l<=n;l++)l===n?i+=e[l]:i+=e[l]+Sg;for(var c="",u=e.length-1,f=t+a;f<=u;f++)f===u?c+=e[f]:c+=e[f]+Sg;return{name:s,basedir:i,path:c}}}});var vg=T((WUe,A2)=>{"use strict";var Rse=V("os");A2.exports=Rse.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 yg=T((JUe,R2)=>{R2.exports=function(){var r=Error.prepareStackTrace;Error.prepareStackTrace=function(t,o){return o};var e=new Error().stack;return Error.prepareStackTrace=r,e[2].getFileName()}});var N2=T((QUe,oc)=>{"use strict";var Nse=process.platform==="win32",Cse=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,Og={};function Pse(r){return Cse.exec(r).slice(1)}Og.parse=function(r){if(typeof r!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof r);var e=Pse(r);if(!e||e.length!==5)throw new TypeError("Invalid path '"+r+"'");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 Ise=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,Ag={};function bse(r){return Ise.exec(r).slice(1)}Ag.parse=function(r){if(typeof r!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof r);var e=bse(r);if(!e||e.length!==5)throw new TypeError("Invalid path '"+r+"'");return{root:e[1],dir:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};Nse?oc.exports=Og.parse:oc.exports=Ag.parse;oc.exports.posix=Ag.parse;oc.exports.win32=Og.parse});var Rg=T((ZUe,b2)=>{var I2=V("path"),C2=I2.parse||N2(),P2=function(e,t){var o="/";/^([A-Za-z]:)/.test(e)?o="":/^\\\\/.test(e)&&(o="\\\\");for(var s=[e],a=C2(e);a.dir!==s[s.length-1];)s.push(a.dir),a=C2(a.dir);return s.reduce(function(i,n){return i.concat(t.map(function(l){return I2.resolve(o,n,l)}))},[])};b2.exports=function(e,t,o){var s=t&&t.moduleDirectory?[].concat(t.moduleDirectory):["node_modules"];if(t&&typeof t.paths=="function")return t.paths(o,e,function(){return P2(e,s)},t);var a=P2(e,s);return t&&t.paths?a.concat(t.paths):a}});var Ng=T((eke,L2)=>{L2.exports=function(r,e){return e||{}}});var w2=T((tke,M2)=>{"use strict";var Lse="Function.prototype.bind called on incompatible ",xse=Object.prototype.toString,Mse=Math.max,wse="[object Function]",x2=function(e,t){for(var o=[],s=0;s{"use strict";var kse=w2();D2.exports=Function.prototype.bind||kse});var B2=T((nke,k2)=>{"use strict";var Bse=Function.prototype.call,Vse=Object.prototype.hasOwnProperty,Fse=U2();k2.exports=Fse.call(Bse,Vse)});var V2=T((ike,Gse)=>{Gse.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"],"node:sea":[">= 20.12 && < 21",">= 21.7"],smalloc:">= 0.11.5 && < 3","node:sqlite":[">= 22.13 && < 23",">= 23.4"],_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.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"test/mock_loader":">= 22.3 && < 22.7","node:test/mock_loader":">= 22.3 && < 22.7","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",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var sc=T((oke,H2)=>{"use strict";var Hse=B2();function qse(r,e){for(var t=r.split("."),o=e.split(" "),s=o.length>1?o[0]:"=",a=(o.length>1?o[1]:o[0]).split("."),i=0;i<3;++i){var n=parseInt(t[i]||0,10),l=parseInt(a[i]||0,10);if(n!==l)return s==="<"?n="?n>=l:!1}return s===">="}function F2(r,e){var t=e.split(/ ?&& ?/);if(t.length===0)return!1;for(var o=0;o"u"?process.versions&&process.versions.node:r;if(typeof t!="string")throw new TypeError(typeof r>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(e&&typeof e=="object"){for(var o=0;o{var $i=V("fs"),Yse=vg(),ze=V("path"),zse=yg(),Kse=Rg(),$se=Ng(),Xse=sc(),Wse=process.platform!=="win32"&&$i.realpath&&typeof $i.realpath.native=="function"?$i.realpath.native:$i.realpath,q2=Yse(),Jse=function(){return[ze.join(q2,".node_modules"),ze.join(q2,".node_libraries")]},Qse=function(e,t){$i.stat(e,function(o,s){return o?o.code==="ENOENT"||o.code==="ENOTDIR"?t(null,!1):t(o):t(null,s.isFile()||s.isFIFO())})},Zse=function(e,t){$i.stat(e,function(o,s){return o?o.code==="ENOENT"||o.code==="ENOTDIR"?t(null,!1):t(o):t(null,s.isDirectory())})},eae=function(e,t){Wse(e,function(o,s){o&&o.code!=="ENOENT"?t(o):t(null,o?e:s)})},ac=function(e,t,o,s){o&&o.preserveSymlinks===!1?e(t,s):s(null,t)},tae=function(e,t,o){e(t,function(s,a){if(s)o(s);else try{var i=JSON.parse(a);o(null,i)}catch{o(null)}})},rae=function(e,t,o){for(var s=Kse(t,o,e),a=0;a{nae.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"],"node:sea":[">= 20.12 && < 21",">= 21.7"],smalloc:">= 0.11.5 && < 3","node:sqlite":">= 23.4",_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.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"test/mock_loader":">= 22.3 && < 22.7","node:test/mock_loader":">= 22.3 && < 22.7","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",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var W2=T((lke,X2)=>{"use strict";var iae=sc(),K2=z2(),$2={};for(zd in K2)Object.prototype.hasOwnProperty.call(K2,zd)&&($2[zd]=iae(zd));var zd;X2.exports=$2});var Q2=T((cke,J2)=>{var oae=sc();J2.exports=function(e){return oae(e)}});var tF=T((uke,eF)=>{var sae=sc(),Xi=V("fs"),dt=V("path"),aae=vg(),lae=yg(),cae=Rg(),uae=Ng(),fae=process.platform!=="win32"&&Xi.realpathSync&&typeof Xi.realpathSync.native=="function"?Xi.realpathSync.native:Xi.realpathSync,Z2=aae(),pae=function(){return[dt.join(Z2,".node_modules"),dt.join(Z2,".node_libraries")]},dae=function(e){try{var t=Xi.statSync(e,{throwIfNoEntry:!1})}catch(o){if(o&&(o.code==="ENOENT"||o.code==="ENOTDIR"))return!1;throw o}return!!t&&(t.isFile()||t.isFIFO())},hae=function(e){try{var t=Xi.statSync(e,{throwIfNoEntry:!1})}catch(o){if(o&&(o.code==="ENOENT"||o.code==="ENOTDIR"))return!1;throw o}return!!t&&t.isDirectory()},_ae=function(e){try{return fae(e)}catch(t){if(t.code!=="ENOENT")throw t}return e},lc=function(e,t,o){return o&&o.preserveSymlinks===!1?e(t):t},Eae=function(e,t){var o=e(t);try{var s=JSON.parse(o);return s}catch{}},mae=function(e,t,o){for(var s=cae(t,o,e),a=0;a{var Kd=Y2();Kd.core=W2();Kd.isCore=Q2();Kd.sync=tF();rF.exports=Kd});var nF=T((pke,Tae)=>{Tae.exports={name:"require-in-the-middle",version:"7.5.2",description:"Module to hook into the Node.js require function",main:"index.js",types:"types/index.d.ts",dependencies:{debug:"^4.3.5","module-details-from-path":"^1.0.3",resolve:"^1.22.8"},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/nodejs/require-in-the-middle.git"},keywords:["require","hook","shim","shimmer","shimming","patch","monkey","monkeypatch","module","load"],files:["types"],author:"Thomas Watson Steen (https://twitter.com/wa7son)",license:"MIT",bugs:{url:"https://github.com/nodejs/require-in-the-middle/issues"},homepage:"https://github.com/nodejs/require-in-the-middle#readme",engines:{node:">=8.6.0"}}});var Lg=T((dke,bg)=>{"use strict";var Gs=V("path"),_r=V("module"),Fe=y2()("require-in-the-middle"),Sae=gg();bg.exports=cc;bg.exports.Hook=cc;var Pg,Fs;if(_r.isBuiltin)Fs=_r.isBuiltin;else if(_r.builtinModules)Fs=r=>r.startsWith("node:")?!0:(Pg===void 0&&(Pg=new Set(_r.builtinModules)),Pg.has(r));else{let r=Cg(),[e,t]=process.versions.node.split(".").map(Number);e===8&&t<8?Fs=o=>o==="http2"?!0:!!r.core[o]:Fs=o=>!!r.core[o]}var $d;function gae(r,e){if(!$d)if(V.resolve&&V.resolve.paths)$d=function(t,o){return V.resolve(t,{paths:[o]})};else{let t=Cg();$d=function(o,s){return t.sync(o,{basedir:s})}}return $d(r,e)}var vae=/([/\\]index)?(\.js)?$/,Ig=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 o=V.cache[e];return!!(o&&this._kRitmExports in o)}}get(e,t){let o=this._localCache.get(e);if(o!==void 0)return o;if(!t){let s=V.cache[e];return s&&s[this._kRitmExports]}}set(e,t,o){o?this._localCache.set(e,t):e in V.cache?V.cache[e][this._kRitmExports]=t:(Fe('non-core module is unexpectedly not in require.cache: "%s"',e),this._localCache.set(e,t))}};function cc(r,e,t){if(!(this instanceof cc))return new cc(r,e,t);if(typeof r=="function"?(t=r,r=null,e=null):typeof e=="function"&&(t=e,e=null),typeof _r._resolveFilename!="function"){console.error("Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!",typeof _r._resolveFilename),console.error("Please report this error as an issue related to Node.js %s at %s",process.version,nF().bugs.url);return}this._cache=new Ig,this._unhooked=!1,this._origRequire=_r.prototype.require;let o=this,s=new Set,a=e?e.internals===!0:!1,i=Array.isArray(r);Fe("registering require hook"),this._require=_r.prototype.require=function(l){return o._unhooked===!0?(Fe("ignoring require call - module is soft-unhooked"),o._origRequire.apply(this,arguments)):n.call(this,arguments,!1)},typeof process.getBuiltinModule=="function"&&(this._origGetBuiltinModule=process.getBuiltinModule,this._getBuiltinModule=process.getBuiltinModule=function(l){return o._unhooked===!0?(Fe("ignoring process.getBuiltinModule call - module is soft-unhooked"),o._origGetBuiltinModule.apply(this,arguments)):n.call(this,arguments,!0)});function n(l,c){let u=l[0],f=Fs(u),_;if(f){if(_=u,u.startsWith("node:")){let M=u.slice(5);Fs(M)&&(_=M)}}else{if(c)return Fe("call to process.getBuiltinModule with unknown built-in id"),o._origGetBuiltinModule.apply(this,l);try{_=_r._resolveFilename(u,this)}catch(M){return Fe('Module._resolveFilename("%s") threw %j, calling original Module.require',u,M.message),o._origRequire.apply(this,l)}}let m,O;if(Fe("processing %s module require('%s'): %s",f===!0?"core":"non-core",u,_),o._cache.has(_,f)===!0)return Fe("returning already patched cached module: %s",_),o._cache.get(_,f);let y=s.has(_);y===!1&&s.add(_);let A=c?o._origGetBuiltinModule.apply(this,l):o._origRequire.apply(this,l);if(y===!0)return Fe("module is in the process of being patched already - ignoring: %s",_),A;if(s.delete(_),f===!0){if(i===!0&&r.includes(_)===!1)return Fe("ignoring core module not on whitelist: %s",_),A;m=_}else if(i===!0&&r.includes(_)){let M=Gs.parse(_);m=M.name,O=M.dir}else{let M=Sae(_);if(M===void 0)return Fe("could not parse filename: %s",_),A;m=M.name,O=M.basedir;let F=yae(M);Fe("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)",m,u,F,O);let N=!1;if(i){if(!u.startsWith(".")&&r.includes(u)&&(m=u,N=!0),!r.includes(m)&&!r.includes(F))return A;r.includes(F)&&F!==m&&(m=F,N=!0)}if(!N){let z;try{z=gae(m,O)}catch{return Fe("could not resolve module: %s",m),o._cache.set(_,A,f),A}if(z!==_)if(a===!0)m=m+Gs.sep+Gs.relative(O,_),Fe("preparing to process require of internal file: %s",m);else return Fe("ignoring require of non-main module file: %s",z),o._cache.set(_,A,f),A}}o._cache.set(_,A,f),Fe("calling require hook: %s",m);let I=t(A,m,O);return o._cache.set(_,I,f),Fe("returning module: %s",m),I}}cc.prototype.unhook=function(){this._unhooked=!0,this._require===_r.prototype.require?(_r.prototype.require=this._origRequire,Fe("require unhook successful")):Fe("require unhook unsuccessful"),process.getBuiltinModule!==void 0&&(this._getBuiltinModule===process.getBuiltinModule?(process.getBuiltinModule=this._origGetBuiltinModule,Fe("process.getBuiltinModule unhook successful")):Fe("process.getBuiltinModule unhook unsuccessful"))};function yae(r){let e=Gs.sep!=="/"?r.path.split(Gs.sep).join("/"):r.path;return Gs.posix.join(r.name,e).replace(vae,"")}});var Xd,Wd,iF=p(()=>{Xd=class{constructor(){this.hooks=[],this.children=new Map}},Wd=class{constructor(){this._trie=new Xd,this._counter=0}insert(e){let t=this._trie;for(let o of e.moduleName.split("/")){let s=t.children.get(o);s||(s=new Xd,t.children.set(o,s)),t=s}t.hooks.push({hook:e,insertedId:this._counter++})}search(e,{maintainInsertionOrder:t,fullOnly:o}={}){let s=this._trie,a=[],i=!0;for(let n of e.split("/")){let l=s.children.get(n);if(!l){i=!1;break}o||a.push(...l.hooks),s=l}return o&&i&&a.push(...s.hooks),a.length===0?[]:a.length===1?[a[0].hook]:(t&&a.sort((n,l)=>n.insertedId-l.insertedId),a.map(({hook:n})=>n))}}});import*as xg from"path";function Aae(r){return xg.sep!=="/"?r.split(xg.sep).join("/"):r}var sF,Oae,Jd,aF=p(()=>{sF=Nn(Lg());iF();Oae=["afterEach","after","beforeEach","before","describe","it"].every(r=>typeof global[r]=="function"),Jd=class r{constructor(){this._moduleNameTrie=new Wd,this._initialize()}_initialize(){new sF.Hook(null,{internals:!0},(e,t,o)=>{let s=Aae(t),a=this._moduleNameTrie.search(s,{maintainInsertionOrder:!0,fullOnly:o===void 0});for(let{onRequire:i}of a)e=i(e,t,o);return e})}register(e,t){let o={moduleName:e,onRequire:t};return this._moduleNameTrie.insert(o),o}static getInstance(){var e;return Oae?new r:this._instance=(e=this._instance)!==null&&e!==void 0?e:new r}}});var dF=T(Wi=>{var lF=[],Mg=new WeakMap,cF=new WeakMap,uF=new Map,fF=[],Rae={set(r,e,t){return Mg.get(r)[e](t)},get(r,e){if(e===Symbol.toStringTag)return"Module";let t=cF.get(r)[e];if(typeof t=="function")return t()},defineProperty(r,e,t){if(!("value"in t))throw new Error("Getters/setters are not supported for exports property descriptors.");return Mg.get(r)[e](t.value)}};function Nae(r,e,t,o,s){uF.set(r,s),Mg.set(e,t),cF.set(e,o);let a=new Proxy(e,Rae);lF.forEach(i=>i(r,a)),fF.push([r,a])}var pF=!1;function Cae(){return pF}function Pae(r){pF=r}Wi.register=Nae;Wi.importHooks=lF;Wi.specifiers=uF;Wi.toHook=fF;Wi.getExperimentalPatchInternals=Cae;Wi.setExperimentalPatchInternals=Pae});var SF=T((Ske,Hs)=>{var hF=V("path"),Iae=gg(),{fileURLToPath:_F}=V("url"),{MessageChannel:bae}=V("worker_threads"),{importHooks:wg,specifiers:Lae,toHook:xae,getExperimentalPatchInternals:Mae}=dF();function mF(r){wg.push(r),xae.forEach(([e,t])=>r(e,t))}function TF(r){let e=wg.indexOf(r);e>-1&&wg.splice(e,1)}function EF(r,e,t,o){let s=r(e,t,o);s&&s!==e&&(e.default=s)}var Dg;function wae(){let{port1:r,port2:e}=new bae,t=0,o;Dg=n=>{t++,r.postMessage(n)},r.on("message",()=>{t--,o&&t<=0&&o()}).unref();function s(){let n=setInterval(()=>{},1e3),l=new Promise(c=>{o=c}).then(()=>{clearInterval(n)});return t===0&&o(),l}let a=e;return{registerOptions:{data:{addHookMessagePort:a,include:[]},transferList:[a]},addHookMessagePort:a,waitForAllMessagesAcknowledged:s}}function uc(r,e,t){if(!(this instanceof uc))return new uc(r,e,t);typeof r=="function"?(t=r,r=null,e=null):typeof e=="function"&&(t=e,e=null);let o=e?e.internals===!0:!1;Dg&&Array.isArray(r)&&Dg(r),this._iitmHook=(s,a)=>{let i=s,n=s.startsWith("node:"),l;if(n)s=s.replace(/^node:/,"");else{if(s.startsWith("file://"))try{s=_F(s)}catch{}let c=Iae(s);c&&(s=c.name,l=c.basedir)}if(r){for(let c of r)if(c===s){if(l){if(o)s=s+hF.sep+hF.relative(l,_F(i));else if(!Mae()&&!l.endsWith(Lae.get(i)))continue}EF(t,a,s,l)}}else EF(t,a,s,l)},mF(this._iitmHook)}uc.prototype.unhook=function(){TF(this._iitmHook)};Hs.exports=uc;Hs.exports.Hook=uc;Hs.exports.addHook=mF;Hs.exports.removeHook=TF;Hs.exports.createAddHookMessageChannel=wae});function gF(r,e,t){let o,s;try{s=r()}catch(a){o=a}finally{if(e(o,s),o&&!t)throw o;return s}}async function vF(r,e,t){let o,s;try{s=await r()}catch(a){o=a}finally{if(e(o,s),o&&!t)throw o;return s}}function Qd(r){return typeof r=="function"&&typeof r.__original=="function"&&typeof r.__unwrap=="function"&&r.__wrapped===!0}var Ug=p(()=>{});import*as hn from"path";import{types as yF}from"util";import{readFileSync as Dae}from"fs";function OF(r,e,t){return typeof e>"u"?r.includes("*"):r.some(o=>(0,AF.satisfies)(e,o,{includePrerelease:t}))}var AF,fc,RF,NF,qs,CF=p(()=>{AF=Nn(jS()),fc=Nn(hg());u2();aF();RF=Nn(SF());P();NF=Nn(Lg());Ug();qs=class extends Gd{constructor(e,t,o){super(e,t,o),this._hooks=[],this._requireInTheMiddleSingleton=Jd.getInstance(),this._enabled=!1,this._wrap=(a,i,n)=>{if(Qd(a[i])&&this._unwrap(a,i),yF.isProxy(a)){let l=(0,fc.wrap)(Object.assign({},a),i,n);return Object.defineProperty(a,i,{value:l}),l}else return(0,fc.wrap)(a,i,n)},this._unwrap=(a,i)=>yF.isProxy(a)?Object.defineProperty(a,i,{value:a[i]}):(0,fc.unwrap)(a,i),this._massWrap=(a,i,n)=>{if(a)Array.isArray(a)||(a=[a]);else{S.error("must provide one or more modules to patch");return}if(!(i&&Array.isArray(i))){S.error("must provide one or more functions to wrap on modules");return}a.forEach(l=>{i.forEach(c=>{this._wrap(l,c,n)})})},this._massUnwrap=(a,i)=>{if(a)Array.isArray(a)||(a=[a]);else{S.error("must provide one or more modules to patch");return}if(!(i&&Array.isArray(i))){S.error("must provide one or more functions to wrap on modules");return}a.forEach(n=>{i.forEach(l=>{this._unwrap(n,l)})})};let s=this.init();s&&!Array.isArray(s)&&(s=[s]),this._modules=s||[],this._config.enabled&&this.enable()}_warnOnPreloadedModules(){this._modules.forEach(e=>{let{name:t}=e;try{let o=V.resolve(t);V.cache[o]&&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=Dae(hn.join(e,"package.json"),{encoding:"utf8"}),o=JSON.parse(t).version;return typeof o=="string"?o:void 0}catch{S.warn("Failed extracting version",e)}}_onRequire(e,t,o,s){var a;if(!s)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 i=this._extractPackageVersion(s);if(e.moduleVersion=i,e.name===o)return OF(e.supportedVersions,i,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:s}),e.patch(t,e.moduleVersion)):t;let n=(a=e.files)!==null&&a!==void 0?a:[],l=hn.normalize(o);return n.filter(u=>u.name===l).filter(u=>OF(u.supportedVersions,i,e.includePrerelease)).reduce((u,f)=>(f.moduleExports=u,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:e.name,version:e.moduleVersion,fileName:f.name,baseDir:s}),f.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=(i,n,l)=>{if(!l&&hn.isAbsolute(n)){let c=hn.parse(n);n=c.name,l=c.dir}return this._onRequire(e,i,n,l)},o=(i,n,l)=>this._onRequire(e,i,n,l),s=hn.isAbsolute(e.name)?new NF.Hook([e.name],{internals:!0},o):this._requireInTheMiddleSingleton.register(e.name,o);this._hooks.push(s);let a=new RF.Hook([e.name],{internals:!1},t);this._hooks.push(a)}}}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 Zd}from"path";var PF=p(()=>{});var IF=p(()=>{CF();PF()});var kg=p(()=>{IF()});var eh,bF=p(()=>{eh=class{constructor(e,t,o,s,a){this.name=e,this.supportedVersions=t,this.patch=o,this.unpatch=s,this.files=a||[]}}});var th,LF=p(()=>{kg();th=class{constructor(e,t,o,s){this.supportedVersions=t,this.patch=o,this.unpatch=s,this.name=Zd(e)}}});var xF={};Ae(xF,{InstrumentationBase:()=>qs,InstrumentationNodeModuleDefinition:()=>eh,InstrumentationNodeModuleFile:()=>th,isWrapped:()=>Qd,registerInstrumentations:()=>o2,safeExecuteInTheMiddle:()=>gF,safeExecuteInTheMiddleAsync:()=>vF});var MF=p(()=>{s2();kg();bF();LF();Ug()});var Br,wF=p(()=>{Br=(function(){function r(e){this._delegate=e}return r.prototype.export=function(e,t){this._delegate.export(e,t)},r.prototype.forceFlush=function(){return this._delegate.forceFlush()},r.prototype.shutdown=function(){return this._delegate.shutdown()},r})()});var Uae,Ji,rh=p(()=>{Uae=(function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(o[a]=s[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function o(){this.constructor=e}e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}})(),Ji=(function(r){Uae(e,r);function e(t,o,s){var a=r.call(this,t)||this;return a.name="OTLPExporterError",a.data=s,a.code=o,a}return e})(Error)});function kae(r){if(!Number.isNaN(r)&&Number.isFinite(r)&&r>0)return r;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+r+"')")}function nh(r){if(r!=null)return function(){return r}}function ih(r,e,t){var o,s,a,i,n,l;return{timeoutMillis:kae((s=(o=r.timeoutMillis)!==null&&o!==void 0?o:e.timeoutMillis)!==null&&s!==void 0?s:t.timeoutMillis),concurrencyLimit:(i=(a=r.concurrencyLimit)!==null&&a!==void 0?a:e.concurrencyLimit)!==null&&i!==void 0?i:t.concurrencyLimit,compression:(l=(n=r.compression)!==null&&n!==void 0?n:e.compression)!==null&&l!==void 0?l:t.compression}}function oh(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var pc=p(()=>{});var sh,DF=p(()=>{(function(r){r.NONE="none",r.GZIP="gzip"})(sh||(sh={}))});function ah(r){return new Fae(r.concurrencyLimit)}var Bae,Vae,Fae,Bg=p(()=>{Bae=function(r,e,t,o){function s(a){return a instanceof t?a:new t(function(i){i(a)})}return new(t||(t=Promise))(function(a,i){function n(u){try{c(o.next(u))}catch(f){i(f)}}function l(u){try{c(o.throw(u))}catch(f){i(f)}}function c(u){u.done?a(u.value):s(u.value).then(n,l)}c((o=o.apply(r,e||[])).next())})},Vae=function(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,s,a,i;return i={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function n(c){return function(u){return l([c,u])}}function l(c){if(o)throw new TypeError("Generator is already executing.");for(;t;)try{if(o=1,s&&(a=c[0]&2?s.return:c[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,c[1])).done)return a;switch(s=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,s=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]=this._concurrencyLimit},r.prototype.awaitAll=function(){return Bae(this,void 0,void 0,function(){return Vae(this,function(e){switch(e.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return e.sent(),[2]}})})},r})()});function kF(r){return r.reduce((e,t)=>{let o=`${e}${e!==""?",":""}${t}`;return o.length>8192?e:o},"")}function BF(r){return r.getAllEntries().map(([e,t])=>{let o=`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`;return t.metadata!==void 0&&(o+=";"+t.metadata.toString()),o})}function Vg(r){let e=r.split(";");if(e.length<=0)return;let t=e.shift();if(!t)return;let o=t.indexOf("=");if(o<=0)return;let s=decodeURIComponent(t.substring(0,o).trim()),a=decodeURIComponent(t.substring(o+1).trim()),i;return e.length>0&&(i=Lr(e.join(";"))),{key:s,value:a,metadata:i}}function VF(r){return typeof r!="string"||r.length===0?{}:r.split(",").map(e=>Vg(e)).filter(e=>e!==void 0&&e.value.length>0).reduce((e,t)=>(e[t.key]=t.value,e),{})}var FF=p(()=>{P()});var Er,GF=p(()=>{(function(r){r[r.SUCCESS=0]="SUCCESS",r[r.FAILED=1]="FAILED"})(Er||(Er={}))});var dc,Fg=p(()=>{GF();FF();dc={getKeyPairs:BF,serializeKeyPairs:kF,parseKeyPairsIntoRecord:VF,parsePairKeyValue:Vg}});function Hae(r){return Object.prototype.hasOwnProperty.call(r,"partialSuccess")}function HF(){return{handleResponse:function(r){r==null||!Hae(r)||r.partialSuccess==null||Object.keys(r.partialSuccess).length===0||S.warn("Received Partial Success response:",JSON.stringify(r.partialSuccess))}}}var qF=p(()=>{P()});function lh(r,e){return new Yae(r.transport,r.serializer,HF(),r.promiseHandler,e.timeout)}var qae,jae,Yae,Gg=p(()=>{Fg();rh();qF();P();qae=function(r,e,t,o){function s(a){return a instanceof t?a:new t(function(i){i(a)})}return new(t||(t=Promise))(function(a,i){function n(u){try{c(o.next(u))}catch(f){i(f)}}function l(u){try{c(o.throw(u))}catch(f){i(f)}}function c(u){u.done?a(u.value):s(u.value).then(n,l)}c((o=o.apply(r,e||[])).next())})},jae=function(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,s,a,i;return i={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function n(c){return function(u){return l([c,u])}}function l(c){if(o)throw new TypeError("Generator is already executing.");for(;t;)try{if(o=1,s&&(a=c[0]&2?s.return:c[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,c[1])).done)return a;switch(s=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,s=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]{Bg();Gg()});var hc={};Ae(hc,{CompressionAlgorithm:()=>sh,OTLPExporterBase:()=>Br,OTLPExporterError:()=>Ji,createOtlpNetworkExportDelegate:()=>jF,getSharedConfigurationDefaults:()=>oh,mergeOtlpSharedConfigurationWithDefaults:()=>ih});var _n=p(()=>{wF();rh();pc();DF();YF()});function zF(r){return r>=48&&r<=57?r-48:r>=97&&r<=102?r-87:r-55}function _c(r){let e=new Uint8Array(r.length/2),t=0;for(let o=0;o{});function Hg(r){return r[0]*$ae+r[1]}var zae,Kae,SBe,$ae,$F=p(()=>{zae=9,Kae=6,SBe=Math.pow(10,Kae),$ae=Math.pow(10,zae)});var XF=p(()=>{$F();KF()});function ch(r){let e=BigInt(1e9);return BigInt(r[0])*e+BigInt(r[1])}function qg(r){let e=Number(BigInt.asUintN(32,r)),t=Number(BigInt.asUintN(32,r>>BigInt(32)));return{low:e,high:t}}function uh(r){let e=ch(r);return qg(e)}function jg(r){return ch(r).toString()}function WF(r){return r}function JF(r){if(r!==void 0)return _c(r)}function Kn(r){var e,t;if(r===void 0)return Wae;let o=(e=r.useLongBits)!==null&&e!==void 0?e:!0,s=(t=r.useHex)!==null&&t!==void 0?t:!1;return{encodeHrTime:o?uh:Xae,encodeSpanContext:s?WF:_c,encodeOptionalSpanContext:s?WF:JF}}var Xae,Wae,Ec=p(()=>{XF();Xae=typeof BigInt<"u"?jg:Hg;Wae={encodeHrTime:uh,encodeSpanContext:_c,encodeOptionalSpanContext:JF}});var fh,QF=p(()=>{(function(r){r[r.SPAN_KIND_UNSPECIFIED=0]="SPAN_KIND_UNSPECIFIED",r[r.SPAN_KIND_INTERNAL=1]="SPAN_KIND_INTERNAL",r[r.SPAN_KIND_SERVER=2]="SPAN_KIND_SERVER",r[r.SPAN_KIND_CLIENT=3]="SPAN_KIND_CLIENT",r[r.SPAN_KIND_PRODUCER=4]="SPAN_KIND_PRODUCER",r[r.SPAN_KIND_CONSUMER=5]="SPAN_KIND_CONSUMER"})(fh||(fh={}))});function js(r){return{name:r.name,version:r.version}}function Vr(r){return Object.keys(r).map(e=>ph(e,r[e]))}function ph(r,e){return{key:r,value:dh(e)}}function dh(r){let e=typeof r;return e==="string"?{stringValue:r}:e==="number"?Number.isInteger(r)?{intValue:r}:{doubleValue:r}:e==="boolean"?{boolValue:r}:r instanceof Uint8Array?{bytesValue:r}:Array.isArray(r)?{arrayValue:{values:r.map(dh)}}:e==="object"&&r!=null?{kvlistValue:{values:Object.entries(r).map(([t,o])=>ph(t,o))}}:{}}var Ys=p(()=>{});function ZF(r,e){var t;let o=r.spanContext(),s=r.status;return{traceId:e.encodeSpanContext(o.traceId),spanId:e.encodeSpanContext(o.spanId),parentSpanId:e.encodeOptionalSpanContext(r.parentSpanId),traceState:(t=o.traceState)===null||t===void 0?void 0:t.serialize(),name:r.name,kind:r.kind==null?0:r.kind+1,startTimeUnixNano:e.encodeHrTime(r.startTime),endTimeUnixNano:e.encodeHrTime(r.endTime),attributes:Vr(r.attributes),droppedAttributesCount:r.droppedAttributesCount,events:r.events.map(a=>Qae(a,e)),droppedEventsCount:r.droppedEventsCount,status:{code:s.code,message:s.message},links:r.links.map(a=>Jae(a,e)),droppedLinksCount:r.droppedLinksCount}}function Jae(r,e){var t;return{attributes:r.attributes?Vr(r.attributes):[],spanId:e.encodeSpanContext(r.context.spanId),traceId:e.encodeSpanContext(r.context.traceId),traceState:(t=r.context.traceState)===null||t===void 0?void 0:t.serialize(),droppedAttributesCount:r.droppedAttributesCount||0}}function Qae(r,e){return{attributes:r.attributes?Vr(r.attributes):[],name:r.name,timeUnixNano:e.encodeHrTime(r.time),droppedAttributesCount:r.droppedAttributesCount||0}}var eG=p(()=>{Ys()});function zs(r){return{attributes:Vr(r.attributes),droppedAttributesCount:0}}var hh=p(()=>{Ys()});function Ks(r,e){let t=Kn(e);return{resourceSpans:ele(r,t)}}function Zae(r){let e=new Map;for(let t of r){let o=e.get(t.resource);o||(o=new Map,e.set(t.resource,o));let s=`${t.instrumentationLibrary.name}@${t.instrumentationLibrary.version||""}:${t.instrumentationLibrary.schemaUrl||""}`,a=o.get(s);a||(a=[],o.set(s,a)),a.push(t)}return e}function ele(r,e){let t=Zae(r),o=[],s=t.entries(),a=s.next();for(;!a.done;){let[i,n]=a.value,l=[],c=n.values(),u=c.next();for(;!u.done;){let _=u.value;if(_.length>0){let m=_.map(O=>ZF(O,e));l.push({scope:js(_[0].instrumentationLibrary),spans:m,schemaUrl:_[0].instrumentationLibrary.schemaUrl})}u=c.next()}let f={resource:zs(i),scopeSpans:l,schemaUrl:void 0};o.push(f),a=s.next()}return o}var _h=p(()=>{eG();Ec();Ys();hh()});function rG(r,e){let t=Kn(e);return{resource:zs(r.resource),schemaUrl:void 0,scopeMetrics:tle(r.scopeMetrics,t)}}function tle(r,e){return Array.from(r.map(t=>({scope:js(t.scope),metrics:t.metrics.map(o=>rle(o,e)),schemaUrl:t.scope.schemaUrl})))}function rle(r,e){let t={name:r.descriptor.name,description:r.descriptor.description,unit:r.descriptor.unit},o=sle(r.aggregationTemporality);switch(r.dataPointType){case lt.SUM:t.sum={aggregationTemporality:o,isMonotonic:r.isMonotonic,dataPoints:tG(r,e)};break;case lt.GAUGE:t.gauge={dataPoints:tG(r,e)};break;case lt.HISTOGRAM:t.histogram={aggregationTemporality:o,dataPoints:ile(r,e)};break;case lt.EXPONENTIAL_HISTOGRAM:t.exponentialHistogram={aggregationTemporality:o,dataPoints:ole(r,e)};break}return t}function nle(r,e,t){let o={attributes:Vr(r.attributes),startTimeUnixNano:t.encodeHrTime(r.startTime),timeUnixNano:t.encodeHrTime(r.endTime)};switch(e){case Ot.INT:o.asInt=r.value;break;case Ot.DOUBLE:o.asDouble=r.value;break}return o}function tG(r,e){return r.dataPoints.map(t=>nle(t,r.descriptor.valueType,e))}function ile(r,e){return r.dataPoints.map(t=>{let o=t.value;return{attributes:Vr(t.attributes),bucketCounts:o.buckets.counts,explicitBounds:o.buckets.boundaries,count:o.count,sum:o.sum,min:o.min,max:o.max,startTimeUnixNano:e.encodeHrTime(t.startTime),timeUnixNano:e.encodeHrTime(t.endTime)}})}function ole(r,e){return r.dataPoints.map(t=>{let o=t.value;return{attributes:Vr(t.attributes),count:o.count,min:o.min,max:o.max,sum:o.sum,positive:{offset:o.positive.offset,bucketCounts:o.positive.bucketCounts},negative:{offset:o.negative.offset,bucketCounts:o.negative.bucketCounts},scale:o.scale,zeroCount:o.zeroCount,startTimeUnixNano:e.encodeHrTime(t.startTime),timeUnixNano:e.encodeHrTime(t.endTime)}})}function sle(r){switch(r){case ur.DELTA:return 1;case ur.CUMULATIVE:return 2}}var nG=p(()=>{P();Gp();Ec();Ys();hh()});function $s(r,e){return{resourceMetrics:r.map(t=>rG(t,e))}}var Eh=p(()=>{nG()});function Xs(r,e){let t=Kn(e);return{resourceLogs:lle(r,t)}}function ale(r){let e=new Map;for(let t of r){let{resource:o,instrumentationScope:{name:s,version:a="",schemaUrl:i=""}}=t,n=e.get(o);n||(n=new Map,e.set(o,n));let l=`${s}@${a}:${i}`,c=n.get(l);c||(c=[],n.set(l,c)),c.push(t)}return e}function lle(r,e){let t=ale(r);return Array.from(t,([o,s])=>({resource:zs(o),scopeLogs:Array.from(s,([,a])=>({scope:js(a[0].instrumentationScope),logRecords:a.map(i=>cle(i,e)),schemaUrl:a[0].instrumentationScope.schemaUrl})),schemaUrl:void 0}))}function cle(r,e){var t,o,s;return{timeUnixNano:e.encodeHrTime(r.hrTime),observedTimeUnixNano:e.encodeHrTime(r.hrTimeObserved),severityNumber:r.severityNumber,severityText:r.severityText,body:dh(r.body),attributes:ule(r.attributes),droppedAttributesCount:r.droppedAttributesCount,flags:(t=r.spanContext)===null||t===void 0?void 0:t.traceFlags,traceId:e.encodeOptionalSpanContext((o=r.spanContext)===null||o===void 0?void 0:o.traceId),spanId:e.encodeOptionalSpanContext((s=r.spanContext)===null||s===void 0?void 0:s.spanId)}}function ule(r){return Object.keys(r).map(e=>ph(e,r[e]))}var mh=p(()=>{Ec();Ys();hh()});var Yg=T((sVe,iG)=>{"use strict";iG.exports=fle;function fle(r,e){for(var t=new Array(arguments.length-1),o=0,s=2,a=!0;s{"use strict";var Th=aG;Th.length=function(e){var t=e.length;if(!t)return 0;for(var o=0;--t%4>1&&e.charAt(t)==="=";)++o;return Math.ceil(e.length*3)/4-o};var Ws=new Array(64),sG=new Array(123);for(mr=0;mr<64;)sG[Ws[mr]=mr<26?mr+65:mr<52?mr+71:mr<62?mr-4:mr-59|43]=mr++;var mr;Th.encode=function(e,t,o){for(var s=null,a=[],i=0,n=0,l;t>2],l=(c&3)<<4,n=1;break;case 1:a[i++]=Ws[l|c>>4],l=(c&15)<<2,n=2;break;case 2:a[i++]=Ws[l|c>>6],a[i++]=Ws[c&63],n=0;break}i>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,a)),i=0)}return n&&(a[i++]=Ws[l],a[i++]=61,n===1&&(a[i++]=61)),s?(i&&s.push(String.fromCharCode.apply(String,a.slice(0,i))),s.join("")):String.fromCharCode.apply(String,a.slice(0,i))};var oG="invalid encoding";Th.decode=function(e,t,o){for(var s=o,a=0,i,n=0;n1)break;if((l=sG[l])===void 0)throw Error(oG);switch(a){case 0:i=l,a=1;break;case 1:t[o++]=i<<2|(l&48)>>4,i=l,a=2;break;case 2:t[o++]=(i&15)<<4|(l&60)>>2,i=l,a=3;break;case 3:t[o++]=(i&3)<<6|l,a=0;break}}if(a===1)throw Error(oG);return o-s};Th.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}});var uG=T((lVe,cG)=>{"use strict";cG.exports=Sh;function Sh(){this._listeners={}}Sh.prototype.on=function(e,t,o){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:o||this}),this};Sh.prototype.off=function(e,t){if(e===void 0)this._listeners={};else if(t===void 0)this._listeners[e]=[];else for(var o=this._listeners[e],s=0;s{"use strict";EG.exports=fG(fG);function fG(r){return typeof Float32Array<"u"?(function(){var e=new Float32Array([-0]),t=new Uint8Array(e.buffer),o=t[3]===128;function s(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 a(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]}r.writeFloatLE=o?s:a,r.writeFloatBE=o?a:s;function i(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 n(l,c){return t[3]=l[c],t[2]=l[c+1],t[1]=l[c+2],t[0]=l[c+3],e[0]}r.readFloatLE=o?i:n,r.readFloatBE=o?n:i})():(function(){function e(o,s,a,i){var n=s<0?1:0;if(n&&(s=-s),s===0)o(1/s>0?0:2147483648,a,i);else if(isNaN(s))o(2143289344,a,i);else if(s>34028234663852886e22)o((n<<31|2139095040)>>>0,a,i);else if(s<11754943508222875e-54)o((n<<31|Math.round(s/1401298464324817e-60))>>>0,a,i);else{var l=Math.floor(Math.log(s)/Math.LN2),c=Math.round(s*Math.pow(2,-l)*8388608)&8388607;o((n<<31|l+127<<23|c)>>>0,a,i)}}r.writeFloatLE=e.bind(null,pG),r.writeFloatBE=e.bind(null,dG);function t(o,s,a){var i=o(s,a),n=(i>>31)*2+1,l=i>>>23&255,c=i&8388607;return l===255?c?NaN:n*(1/0):l===0?n*1401298464324817e-60*c:n*Math.pow(2,l-150)*(c+8388608)}r.readFloatLE=t.bind(null,hG),r.readFloatBE=t.bind(null,_G)})(),typeof Float64Array<"u"?(function(){var e=new Float64Array([-0]),t=new Uint8Array(e.buffer),o=t[7]===128;function s(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 a(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]}r.writeDoubleLE=o?s:a,r.writeDoubleBE=o?a:s;function i(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 n(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]}r.readDoubleLE=o?i:n,r.readDoubleBE=o?n:i})():(function(){function e(o,s,a,i,n,l){var c=i<0?1:0;if(c&&(i=-i),i===0)o(0,n,l+s),o(1/i>0?0:2147483648,n,l+a);else if(isNaN(i))o(0,n,l+s),o(2146959360,n,l+a);else if(i>17976931348623157e292)o(0,n,l+s),o((c<<31|2146435072)>>>0,n,l+a);else{var u;if(i<22250738585072014e-324)u=i/5e-324,o(u>>>0,n,l+s),o((c<<31|u/4294967296)>>>0,n,l+a);else{var f=Math.floor(Math.log(i)/Math.LN2);f===1024&&(f=1023),u=i*Math.pow(2,-f),o(u*4503599627370496>>>0,n,l+s),o((c<<31|f+1023<<20|u*1048576&1048575)>>>0,n,l+a)}}}r.writeDoubleLE=e.bind(null,pG,0,4),r.writeDoubleBE=e.bind(null,dG,4,0);function t(o,s,a,i,n){var l=o(i,n+s),c=o(i,n+a),u=(c>>31)*2+1,f=c>>>20&2047,_=4294967296*(c&1048575)+l;return f===2047?_?NaN:u*(1/0):f===0?u*5e-324*_:u*Math.pow(2,f-1075)*(_+4503599627370496)}r.readDoubleLE=t.bind(null,hG,0,4),r.readDoubleBE=t.bind(null,_G,4,0)})(),r}function pG(r,e,t){e[t]=r&255,e[t+1]=r>>>8&255,e[t+2]=r>>>16&255,e[t+3]=r>>>24}function dG(r,e,t){e[t]=r>>>24,e[t+1]=r>>>16&255,e[t+2]=r>>>8&255,e[t+3]=r&255}function hG(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16|r[e+3]<<24)>>>0}function _G(r,e){return(r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3])>>>0}});var zg=T((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(r){}return null}});var SG=T(TG=>{"use strict";var Kg=TG;Kg.length=function(e){for(var t=0,o=0,s=0;s191&&l<224?i[n++]=(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,i[n++]=55296+(l>>10),i[n++]=56320+(l&1023)):i[n++]=(l&15)<<12|(e[t++]&63)<<6|e[t++]&63,n>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,i)),n=0);return a?(n&&a.push(String.fromCharCode.apply(String,i.slice(0,n))),a.join("")):String.fromCharCode.apply(String,i.slice(0,n))};Kg.write=function(e,t,o){for(var s=o,a,i,n=0;n>6|192,t[o++]=a&63|128):(a&64512)===55296&&((i=e.charCodeAt(n+1))&64512)===56320?(a=65536+((a&1023)<<10)+(i&1023),++n,t[o++]=a>>18|240,t[o++]=a>>12&63|128,t[o++]=a>>6&63|128,t[o++]=a&63|128):(t[o++]=a>>12|224,t[o++]=a>>6&63|128,t[o++]=a&63|128);return o-s}});var vG=T((fVe,gG)=>{"use strict";gG.exports=ple;function ple(r,e,t){var o=t||8192,s=o>>>1,a=null,i=o;return function(l){if(l<1||l>s)return r(l);i+l>o&&(a=r(o),i=0);var c=e.call(a,i,i+=l);return i&7&&(i=(i|7)+1),c}}});var OG=T((pVe,yG)=>{"use strict";yG.exports=tt;var mc=Fr();function tt(r,e){this.lo=r>>>0,this.hi=e>>>0}var Qi=tt.zero=new tt(0,0);Qi.toNumber=function(){return 0};Qi.zzEncode=Qi.zzDecode=function(){return this};Qi.length=function(){return 1};var dle=tt.zeroHash="\0\0\0\0\0\0\0\0";tt.fromNumber=function(e){if(e===0)return Qi;var t=e<0;t&&(e=-e);var o=e>>>0,s=(e-o)/4294967296>>>0;return t&&(s=~s>>>0,o=~o>>>0,++o>4294967295&&(o=0,++s>4294967295&&(s=0))),new tt(o,s)};tt.from=function(e){if(typeof e=="number")return tt.fromNumber(e);if(mc.isString(e))if(mc.Long)e=mc.Long.fromString(e);else return tt.fromNumber(parseInt(e,10));return e.low||e.high?new tt(e.low>>>0,e.high>>>0):Qi};tt.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,o=~this.hi>>>0;return t||(o=o+1>>>0),-(t+o*4294967296)}return this.lo+this.hi*4294967296};tt.prototype.toLong=function(e){return mc.Long?new mc.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var $n=String.prototype.charCodeAt;tt.fromHash=function(e){return e===dle?Qi:new tt(($n.call(e,0)|$n.call(e,1)<<8|$n.call(e,2)<<16|$n.call(e,3)<<24)>>>0,($n.call(e,4)|$n.call(e,5)<<8|$n.call(e,6)<<16|$n.call(e,7)<<24)>>>0)};tt.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)};tt.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};tt.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};tt.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,o=this.hi>>>24;return o===0?t===0?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:o<128?9:10}});var Fr=T($g=>{"use strict";var K=$g;K.asPromise=Yg();K.base64=lG();K.EventEmitter=uG();K.float=mG();K.inquire=zg();K.utf8=SG();K.pool=vG();K.LongBits=OG();K.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);K.global=K.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||$g;K.emptyArray=Object.freeze?Object.freeze([]):[];K.emptyObject=Object.freeze?Object.freeze({}):{};K.isInteger=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};K.isString=function(e){return typeof e=="string"||e instanceof String};K.isObject=function(e){return e&&typeof e=="object"};K.isset=K.isSet=function(e,t){var o=e[t];return o!=null&&e.hasOwnProperty(t)?typeof o!="object"||(Array.isArray(o)?o.length:Object.keys(o).length)>0:!1};K.Buffer=(function(){try{var r=K.inquire("buffer").Buffer;return r.prototype.utf8Write?r:null}catch{return null}})();K._Buffer_from=null;K._Buffer_allocUnsafe=null;K.newBuffer=function(e){return typeof e=="number"?K.Buffer?K._Buffer_allocUnsafe(e):new K.Array(e):K.Buffer?K._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)};K.Array=typeof Uint8Array<"u"?Uint8Array:Array;K.Long=K.global.dcodeIO&&K.global.dcodeIO.Long||K.global.Long||K.inquire("long");K.key2Re=/^true|false|0|1$/;K.key32Re=/^-?(?:0|[1-9][0-9]*)$/;K.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;K.longToHash=function(e){return e?K.LongBits.from(e).toHash():K.LongBits.zeroHash};K.longFromHash=function(e,t){var o=K.LongBits.fromHash(e);return K.Long?K.Long.fromBits(o.lo,o.hi,t):o.toNumber(!!t)};function AG(r,e,t){for(var o=Object.keys(e),s=0;s-1;--a)if(t[s[a]]===1&&this[s[a]]!==void 0&&this[s[a]]!==null)return s[a]}};K.oneOfSetter=function(e){return function(t){for(var o=0;o{"use strict";IG.exports=Ee;var er=Fr(),Xg,gh=er.LongBits,NG=er.base64,CG=er.utf8;function Tc(r,e,t){this.fn=r,this.len=e,this.next=void 0,this.val=t}function Jg(){}function hle(r){this.head=r.head,this.tail=r.tail,this.len=r.len,this.next=r.states}function Ee(){this.len=0,this.head=new Tc(Jg,0,0),this.tail=this.head,this.states=null}var PG=function(){return er.Buffer?function(){return(Ee.create=function(){return new Xg})()}:function(){return new Ee}};Ee.create=PG();Ee.alloc=function(e){return new er.Array(e)};er.Array!==Array&&(Ee.alloc=er.pool(Ee.alloc,er.Array.prototype.subarray));Ee.prototype._push=function(e,t,o){return this.tail=this.tail.next=new Tc(e,t,o),this.len+=t,this};function Qg(r,e,t){e[t]=r&255}function _le(r,e,t){for(;r>127;)e[t++]=r&127|128,r>>>=7;e[t]=r}function Zg(r,e){this.len=r,this.next=void 0,this.val=e}Zg.prototype=Object.create(Tc.prototype);Zg.prototype.fn=_le;Ee.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new Zg((e=e>>>0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this};Ee.prototype.int32=function(e){return e<0?this._push(ev,10,gh.fromNumber(e)):this.uint32(e)};Ee.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)};function ev(r,e,t){for(;r.hi;)e[t++]=r.lo&127|128,r.lo=(r.lo>>>7|r.hi<<25)>>>0,r.hi>>>=7;for(;r.lo>127;)e[t++]=r.lo&127|128,r.lo=r.lo>>>7;e[t++]=r.lo}Ee.prototype.uint64=function(e){var t=gh.from(e);return this._push(ev,t.length(),t)};Ee.prototype.int64=Ee.prototype.uint64;Ee.prototype.sint64=function(e){var t=gh.from(e).zzEncode();return this._push(ev,t.length(),t)};Ee.prototype.bool=function(e){return this._push(Qg,1,e?1:0)};function Wg(r,e,t){e[t]=r&255,e[t+1]=r>>>8&255,e[t+2]=r>>>16&255,e[t+3]=r>>>24}Ee.prototype.fixed32=function(e){return this._push(Wg,4,e>>>0)};Ee.prototype.sfixed32=Ee.prototype.fixed32;Ee.prototype.fixed64=function(e){var t=gh.from(e);return this._push(Wg,4,t.lo)._push(Wg,4,t.hi)};Ee.prototype.sfixed64=Ee.prototype.fixed64;Ee.prototype.float=function(e){return this._push(er.float.writeFloatLE,4,e)};Ee.prototype.double=function(e){return this._push(er.float.writeDoubleLE,8,e)};var Ele=er.Array.prototype.set?function(e,t,o){t.set(e,o)}:function(e,t,o){for(var s=0;s>>0;if(!t)return this._push(Qg,1,0);if(er.isString(e)){var o=Ee.alloc(t=NG.length(e));NG.decode(e,o,0),e=o}return this.uint32(t)._push(Ele,t,e)};Ee.prototype.string=function(e){var t=CG.length(e);return t?this.uint32(t)._push(CG.write,t,e):this._push(Qg,1,0)};Ee.prototype.fork=function(){return this.states=new hle(this),this.head=this.tail=new Tc(Jg,0,0),this.len=0,this};Ee.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 Tc(Jg,0,0),this.len=0),this};Ee.prototype.ldelim=function(){var e=this.head,t=this.tail,o=this.len;return this.reset().uint32(o),o&&(this.tail.next=e.next,this.tail=t,this.len+=o),this};Ee.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),o=0;e;)e.fn(e.val,t,o),o+=e.len,e=e.next;return t};Ee._configure=function(r){Xg=r,Ee.create=PG(),Xg._configure()}});var xG=T((_Ve,LG)=>{"use strict";LG.exports=Gr;var bG=vh();(Gr.prototype=Object.create(bG.prototype)).constructor=Gr;var Xn=Fr();function Gr(){bG.call(this)}Gr._configure=function(){Gr.alloc=Xn._Buffer_allocUnsafe,Gr.writeBytesBuffer=Xn.Buffer&&Xn.Buffer.prototype instanceof Uint8Array&&Xn.Buffer.prototype.set.name==="set"?function(e,t,o){t.set(e,o)}:function(e,t,o){if(e.copy)e.copy(t,o,0,e.length);else for(var s=0;s>>0;return this.uint32(t),t&&this._push(Gr.writeBytesBuffer,t,e),this};function mle(r,e,t){r.length<40?Xn.utf8.write(r,e,t):e.utf8Write?e.utf8Write(r,t):e.write(r,t)}Gr.prototype.string=function(e){var t=Xn.Buffer.byteLength(e);return this.uint32(t),t&&this._push(mle,t,e),this};Gr._configure()});var Oh=T((EVe,kG)=>{"use strict";kG.exports=Ge;var Tr=Fr(),rv,DG=Tr.LongBits,Tle=Tr.utf8;function Sr(r,e){return RangeError("index out of range: "+r.pos+" + "+(e||1)+" > "+r.len)}function Ge(r){this.buf=r,this.pos=0,this.len=r.length}var MG=typeof Uint8Array<"u"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new Ge(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new Ge(e);throw Error("illegal buffer")},UG=function(){return Tr.Buffer?function(t){return(Ge.create=function(s){return Tr.Buffer.isBuffer(s)?new rv(s):MG(s)})(t)}:MG};Ge.create=UG();Ge.prototype._slice=Tr.Array.prototype.subarray||Tr.Array.prototype.slice;Ge.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,Sr(this,10);return e}})();Ge.prototype.int32=function(){return this.uint32()|0};Ge.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(e&1)|0};function tv(){var r=new DG(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(r.lo=(r.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return r;if(r.lo=(r.lo|(this.buf[this.pos]&127)<<28)>>>0,r.hi=(r.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return r;e=0}else{for(;e<3;++e){if(this.pos>=this.len)throw Sr(this);if(r.lo=(r.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return r}return r.lo=(r.lo|(this.buf[this.pos++]&127)<>>0,r}if(this.len-this.pos>4){for(;e<5;++e)if(r.hi=(r.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return r}else for(;e<5;++e){if(this.pos>=this.len)throw Sr(this);if(r.hi=(r.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return r}throw Error("invalid varint encoding")}Ge.prototype.bool=function(){return this.uint32()!==0};function yh(r,e){return(r[e-4]|r[e-3]<<8|r[e-2]<<16|r[e-1]<<24)>>>0}Ge.prototype.fixed32=function(){if(this.pos+4>this.len)throw Sr(this,4);return yh(this.buf,this.pos+=4)};Ge.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Sr(this,4);return yh(this.buf,this.pos+=4)|0};function wG(){if(this.pos+8>this.len)throw Sr(this,8);return new DG(yh(this.buf,this.pos+=4),yh(this.buf,this.pos+=4))}Ge.prototype.float=function(){if(this.pos+4>this.len)throw Sr(this,4);var e=Tr.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e};Ge.prototype.double=function(){if(this.pos+8>this.len)throw Sr(this,4);var e=Tr.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e};Ge.prototype.bytes=function(){var e=this.uint32(),t=this.pos,o=this.pos+e;if(o>this.len)throw Sr(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,o);if(t===o){var s=Tr.Buffer;return s?s.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,o)};Ge.prototype.string=function(){var e=this.bytes();return Tle.read(e,0,e.length)};Ge.prototype.skip=function(e){if(typeof e=="number"){if(this.pos+e>this.len)throw Sr(this,e);this.pos+=e}else do if(this.pos>=this.len)throw Sr(this);while(this.buf[this.pos++]&128);return this};Ge.prototype.skipType=function(r){switch(r){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(r=this.uint32()&7)!==4;)this.skipType(r);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+r+" at offset "+this.pos)}return this};Ge._configure=function(r){rv=r,Ge.create=UG(),rv._configure();var e=Tr.Long?"toLong":"toNumber";Tr.merge(Ge.prototype,{int64:function(){return tv.call(this)[e](!1)},uint64:function(){return tv.call(this)[e](!0)},sint64:function(){return tv.call(this).zzDecode()[e](!1)},fixed64:function(){return wG.call(this)[e](!0)},sfixed64:function(){return wG.call(this)[e](!1)}})}});var GG=T((mVe,FG)=>{"use strict";FG.exports=Zi;var VG=Oh();(Zi.prototype=Object.create(VG.prototype)).constructor=Zi;var BG=Fr();function Zi(r){VG.call(this,r)}Zi._configure=function(){BG.Buffer&&(Zi.prototype._slice=BG.Buffer.prototype.slice)};Zi.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))};Zi._configure()});var qG=T((TVe,HG)=>{"use strict";HG.exports=Sc;var nv=Fr();(Sc.prototype=Object.create(nv.EventEmitter.prototype)).constructor=Sc;function Sc(r,e,t){if(typeof r!="function")throw TypeError("rpcImpl must be a function");nv.EventEmitter.call(this),this.rpcImpl=r,this.requestDelimited=!!e,this.responseDelimited=!!t}Sc.prototype.rpcCall=function r(e,t,o,s,a){if(!s)throw TypeError("request must be specified");var i=this;if(!a)return nv.asPromise(r,i,e,t,o,s);if(!i.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return i.rpcImpl(e,t[i.requestDelimited?"encodeDelimited":"encode"](s).finish(),function(l,c){if(l)return i.emit("error",l,e),a(l);if(c===null){i.end(!0);return}if(!(c instanceof o))try{c=o[i.responseDelimited?"decodeDelimited":"decode"](c)}catch(u){return i.emit("error",u,e),a(u)}return i.emit("data",c,e),a(null,c)})}catch(n){i.emit("error",n,e),setTimeout(function(){a(n)},0);return}};Sc.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var iv=T(jG=>{"use strict";var Sle=jG;Sle.Service=qG()});var ov=T((gVe,YG)=>{"use strict";YG.exports={}});var sv=T(KG=>{"use strict";var Ct=KG;Ct.build="minimal";Ct.Writer=vh();Ct.BufferWriter=xG();Ct.Reader=Oh();Ct.BufferReader=GG();Ct.util=Fr();Ct.rpc=iv();Ct.roots=ov();Ct.configure=zG;function zG(){Ct.util._configure(),Ct.Writer._configure(Ct.BufferWriter),Ct.Reader._configure(Ct.BufferReader)}zG()});var XG=T((yVe,$G)=>{"use strict";$G.exports=sv()});var JG=T((OVe,WG)=>{"use strict";var X=XG(),g=X.Reader,oe=X.Writer,h=X.util,d=X.roots.default||(X.roots.default={});d.opentelemetry=(function(){var r={};return r.proto=(function(){var e={};return e.common=(function(){var t={};return t.v1=(function(){var o={};return o.AnyValue=(function(){function s(i){if(i)for(var n=Object.keys(i),l=0;l>>3){case 1:{u.stringValue=n.string();break}case 2:{u.boolValue=n.bool();break}case 3:{u.intValue=n.int64();break}case 4:{u.doubleValue=n.double();break}case 5:{u.arrayValue=d.opentelemetry.proto.common.v1.ArrayValue.decode(n,n.uint32());break}case 6:{u.kvlistValue=d.opentelemetry.proto.common.v1.KeyValueList.decode(n,n.uint32());break}case 7:{u.bytesValue=n.bytes();break}default:n.skipType(f&7);break}}return u},s.decodeDelimited=function(n){return n instanceof g||(n=new g(n)),this.decode(n,n.uint32())},s.verify=function(n){if(typeof n!="object"||n===null)return"object expected";var l={};if(n.stringValue!=null&&n.hasOwnProperty("stringValue")&&(l.value=1,!h.isString(n.stringValue)))return"stringValue: string expected";if(n.boolValue!=null&&n.hasOwnProperty("boolValue")){if(l.value===1)return"value: multiple values";if(l.value=1,typeof n.boolValue!="boolean")return"boolValue: boolean expected"}if(n.intValue!=null&&n.hasOwnProperty("intValue")){if(l.value===1)return"value: multiple values";if(l.value=1,!h.isInteger(n.intValue)&&!(n.intValue&&h.isInteger(n.intValue.low)&&h.isInteger(n.intValue.high)))return"intValue: integer|Long expected"}if(n.doubleValue!=null&&n.hasOwnProperty("doubleValue")){if(l.value===1)return"value: multiple values";if(l.value=1,typeof n.doubleValue!="number")return"doubleValue: number expected"}if(n.arrayValue!=null&&n.hasOwnProperty("arrayValue")){if(l.value===1)return"value: multiple values";l.value=1;{var c=d.opentelemetry.proto.common.v1.ArrayValue.verify(n.arrayValue);if(c)return"arrayValue."+c}}if(n.kvlistValue!=null&&n.hasOwnProperty("kvlistValue")){if(l.value===1)return"value: multiple values";l.value=1;{var c=d.opentelemetry.proto.common.v1.KeyValueList.verify(n.kvlistValue);if(c)return"kvlistValue."+c}}if(n.bytesValue!=null&&n.hasOwnProperty("bytesValue")){if(l.value===1)return"value: multiple values";if(l.value=1,!(n.bytesValue&&typeof n.bytesValue.length=="number"||h.isString(n.bytesValue)))return"bytesValue: buffer expected"}return null},s.fromObject=function(n){if(n instanceof d.opentelemetry.proto.common.v1.AnyValue)return n;var l=new d.opentelemetry.proto.common.v1.AnyValue;if(n.stringValue!=null&&(l.stringValue=String(n.stringValue)),n.boolValue!=null&&(l.boolValue=!!n.boolValue),n.intValue!=null&&(h.Long?(l.intValue=h.Long.fromValue(n.intValue)).unsigned=!1:typeof n.intValue=="string"?l.intValue=parseInt(n.intValue,10):typeof n.intValue=="number"?l.intValue=n.intValue:typeof n.intValue=="object"&&(l.intValue=new h.LongBits(n.intValue.low>>>0,n.intValue.high>>>0).toNumber())),n.doubleValue!=null&&(l.doubleValue=Number(n.doubleValue)),n.arrayValue!=null){if(typeof n.arrayValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");l.arrayValue=d.opentelemetry.proto.common.v1.ArrayValue.fromObject(n.arrayValue)}if(n.kvlistValue!=null){if(typeof n.kvlistValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");l.kvlistValue=d.opentelemetry.proto.common.v1.KeyValueList.fromObject(n.kvlistValue)}return n.bytesValue!=null&&(typeof n.bytesValue=="string"?h.base64.decode(n.bytesValue,l.bytesValue=h.newBuffer(h.base64.length(n.bytesValue)),0):n.bytesValue.length>=0&&(l.bytesValue=n.bytesValue)),l},s.toObject=function(n,l){l||(l={});var c={};return n.stringValue!=null&&n.hasOwnProperty("stringValue")&&(c.stringValue=n.stringValue,l.oneofs&&(c.value="stringValue")),n.boolValue!=null&&n.hasOwnProperty("boolValue")&&(c.boolValue=n.boolValue,l.oneofs&&(c.value="boolValue")),n.intValue!=null&&n.hasOwnProperty("intValue")&&(typeof n.intValue=="number"?c.intValue=l.longs===String?String(n.intValue):n.intValue:c.intValue=l.longs===String?h.Long.prototype.toString.call(n.intValue):l.longs===Number?new h.LongBits(n.intValue.low>>>0,n.intValue.high>>>0).toNumber():n.intValue,l.oneofs&&(c.value="intValue")),n.doubleValue!=null&&n.hasOwnProperty("doubleValue")&&(c.doubleValue=l.json&&!isFinite(n.doubleValue)?String(n.doubleValue):n.doubleValue,l.oneofs&&(c.value="doubleValue")),n.arrayValue!=null&&n.hasOwnProperty("arrayValue")&&(c.arrayValue=d.opentelemetry.proto.common.v1.ArrayValue.toObject(n.arrayValue,l),l.oneofs&&(c.value="arrayValue")),n.kvlistValue!=null&&n.hasOwnProperty("kvlistValue")&&(c.kvlistValue=d.opentelemetry.proto.common.v1.KeyValueList.toObject(n.kvlistValue,l),l.oneofs&&(c.value="kvlistValue")),n.bytesValue!=null&&n.hasOwnProperty("bytesValue")&&(c.bytesValue=l.bytes===String?h.base64.encode(n.bytesValue,0,n.bytesValue.length):l.bytes===Array?Array.prototype.slice.call(n.bytesValue):n.bytesValue,l.oneofs&&(c.value="bytesValue")),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,X.util.toJSONOptions)},s.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.common.v1.AnyValue"},s})(),o.ArrayValue=(function(){function s(a){if(this.values=[],a)for(var i=Object.keys(a),n=0;n>>3){case 1:{c.values&&c.values.length||(c.values=[]),c.values.push(d.opentelemetry.proto.common.v1.AnyValue.decode(i,i.uint32()));break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.values!=null&&i.hasOwnProperty("values")){if(!Array.isArray(i.values))return"values: array expected";for(var n=0;n>>3){case 1:{c.values&&c.values.length||(c.values=[]),c.values.push(d.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.values!=null&&i.hasOwnProperty("values")){if(!Array.isArray(i.values))return"values: array expected";for(var n=0;n>>3){case 1:{c.key=i.string();break}case 2:{c.value=d.opentelemetry.proto.common.v1.AnyValue.decode(i,i.uint32());break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.key!=null&&i.hasOwnProperty("key")&&!h.isString(i.key))return"key: string expected";if(i.value!=null&&i.hasOwnProperty("value")){var n=d.opentelemetry.proto.common.v1.AnyValue.verify(i.value);if(n)return"value."+n}return null},s.fromObject=function(i){if(i instanceof d.opentelemetry.proto.common.v1.KeyValue)return i;var n=new d.opentelemetry.proto.common.v1.KeyValue;if(i.key!=null&&(n.key=String(i.key)),i.value!=null){if(typeof i.value!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");n.value=d.opentelemetry.proto.common.v1.AnyValue.fromObject(i.value)}return n},s.toObject=function(i,n){n||(n={});var l={};return n.defaults&&(l.key="",l.value=null),i.key!=null&&i.hasOwnProperty("key")&&(l.key=i.key),i.value!=null&&i.hasOwnProperty("value")&&(l.value=d.opentelemetry.proto.common.v1.AnyValue.toObject(i.value,n)),l},s.prototype.toJSON=function(){return this.constructor.toObject(this,X.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.common.v1.KeyValue"},s})(),o.InstrumentationScope=(function(){function s(a){if(this.attributes=[],a)for(var i=Object.keys(a),n=0;n>>3){case 1:{c.name=i.string();break}case 2:{c.version=i.string();break}case 3:{c.attributes&&c.attributes.length||(c.attributes=[]),c.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break}case 4:{c.droppedAttributesCount=i.uint32();break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.name!=null&&i.hasOwnProperty("name")&&!h.isString(i.name))return"name: string expected";if(i.version!=null&&i.hasOwnProperty("version")&&!h.isString(i.version))return"version: string expected";if(i.attributes!=null&&i.hasOwnProperty("attributes")){if(!Array.isArray(i.attributes))return"attributes: array expected";for(var n=0;n>>0),n},s.toObject=function(i,n){n||(n={});var l={};if((n.arrays||n.defaults)&&(l.attributes=[]),n.defaults&&(l.name="",l.version="",l.droppedAttributesCount=0),i.name!=null&&i.hasOwnProperty("name")&&(l.name=i.name),i.version!=null&&i.hasOwnProperty("version")&&(l.version=i.version),i.attributes&&i.attributes.length){l.attributes=[];for(var c=0;c>>3){case 1:{c.attributes&&c.attributes.length||(c.attributes=[]),c.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break}case 2:{c.droppedAttributesCount=i.uint32();break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.attributes!=null&&i.hasOwnProperty("attributes")){if(!Array.isArray(i.attributes))return"attributes: array expected";for(var n=0;n>>0),n},s.toObject=function(i,n){n||(n={});var l={};if((n.arrays||n.defaults)&&(l.attributes=[]),n.defaults&&(l.droppedAttributesCount=0),i.attributes&&i.attributes.length){l.attributes=[];for(var c=0;c>>3){case 1:{c.resourceSpans&&c.resourceSpans.length||(c.resourceSpans=[]),c.resourceSpans.push(d.opentelemetry.proto.trace.v1.ResourceSpans.decode(i,i.uint32()));break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.resourceSpans!=null&&i.hasOwnProperty("resourceSpans")){if(!Array.isArray(i.resourceSpans))return"resourceSpans: array expected";for(var n=0;n>>3){case 1:{c.resource=d.opentelemetry.proto.resource.v1.Resource.decode(i,i.uint32());break}case 2:{c.scopeSpans&&c.scopeSpans.length||(c.scopeSpans=[]),c.scopeSpans.push(d.opentelemetry.proto.trace.v1.ScopeSpans.decode(i,i.uint32()));break}case 3:{c.schemaUrl=i.string();break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.resource!=null&&i.hasOwnProperty("resource")){var n=d.opentelemetry.proto.resource.v1.Resource.verify(i.resource);if(n)return"resource."+n}if(i.scopeSpans!=null&&i.hasOwnProperty("scopeSpans")){if(!Array.isArray(i.scopeSpans))return"scopeSpans: array expected";for(var l=0;l>>3){case 1:{c.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.decode(i,i.uint32());break}case 2:{c.spans&&c.spans.length||(c.spans=[]),c.spans.push(d.opentelemetry.proto.trace.v1.Span.decode(i,i.uint32()));break}case 3:{c.schemaUrl=i.string();break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.scope!=null&&i.hasOwnProperty("scope")){var n=d.opentelemetry.proto.common.v1.InstrumentationScope.verify(i.scope);if(n)return"scope."+n}if(i.spans!=null&&i.hasOwnProperty("spans")){if(!Array.isArray(i.spans))return"spans: array expected";for(var l=0;l>>3){case 1:{c.traceId=i.bytes();break}case 2:{c.spanId=i.bytes();break}case 3:{c.traceState=i.string();break}case 4:{c.parentSpanId=i.bytes();break}case 5:{c.name=i.string();break}case 6:{c.kind=i.int32();break}case 7:{c.startTimeUnixNano=i.fixed64();break}case 8:{c.endTimeUnixNano=i.fixed64();break}case 9:{c.attributes&&c.attributes.length||(c.attributes=[]),c.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break}case 10:{c.droppedAttributesCount=i.uint32();break}case 11:{c.events&&c.events.length||(c.events=[]),c.events.push(d.opentelemetry.proto.trace.v1.Span.Event.decode(i,i.uint32()));break}case 12:{c.droppedEventsCount=i.uint32();break}case 13:{c.links&&c.links.length||(c.links=[]),c.links.push(d.opentelemetry.proto.trace.v1.Span.Link.decode(i,i.uint32()));break}case 14:{c.droppedLinksCount=i.uint32();break}case 15:{c.status=d.opentelemetry.proto.trace.v1.Status.decode(i,i.uint32());break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.traceId!=null&&i.hasOwnProperty("traceId")&&!(i.traceId&&typeof i.traceId.length=="number"||h.isString(i.traceId)))return"traceId: buffer expected";if(i.spanId!=null&&i.hasOwnProperty("spanId")&&!(i.spanId&&typeof i.spanId.length=="number"||h.isString(i.spanId)))return"spanId: buffer expected";if(i.traceState!=null&&i.hasOwnProperty("traceState")&&!h.isString(i.traceState))return"traceState: string expected";if(i.parentSpanId!=null&&i.hasOwnProperty("parentSpanId")&&!(i.parentSpanId&&typeof i.parentSpanId.length=="number"||h.isString(i.parentSpanId)))return"parentSpanId: buffer expected";if(i.name!=null&&i.hasOwnProperty("name")&&!h.isString(i.name))return"name: string expected";if(i.kind!=null&&i.hasOwnProperty("kind"))switch(i.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(i.startTimeUnixNano!=null&&i.hasOwnProperty("startTimeUnixNano")&&!h.isInteger(i.startTimeUnixNano)&&!(i.startTimeUnixNano&&h.isInteger(i.startTimeUnixNano.low)&&h.isInteger(i.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(i.endTimeUnixNano!=null&&i.hasOwnProperty("endTimeUnixNano")&&!h.isInteger(i.endTimeUnixNano)&&!(i.endTimeUnixNano&&h.isInteger(i.endTimeUnixNano.low)&&h.isInteger(i.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected";if(i.attributes!=null&&i.hasOwnProperty("attributes")){if(!Array.isArray(i.attributes))return"attributes: array expected";for(var n=0;n=0&&(n.traceId=i.traceId)),i.spanId!=null&&(typeof i.spanId=="string"?h.base64.decode(i.spanId,n.spanId=h.newBuffer(h.base64.length(i.spanId)),0):i.spanId.length>=0&&(n.spanId=i.spanId)),i.traceState!=null&&(n.traceState=String(i.traceState)),i.parentSpanId!=null&&(typeof i.parentSpanId=="string"?h.base64.decode(i.parentSpanId,n.parentSpanId=h.newBuffer(h.base64.length(i.parentSpanId)),0):i.parentSpanId.length>=0&&(n.parentSpanId=i.parentSpanId)),i.name!=null&&(n.name=String(i.name)),i.kind){default:if(typeof i.kind=="number"){n.kind=i.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:n.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:n.kind=1;break;case"SPAN_KIND_SERVER":case 2:n.kind=2;break;case"SPAN_KIND_CLIENT":case 3:n.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:n.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:n.kind=5;break}if(i.startTimeUnixNano!=null&&(h.Long?(n.startTimeUnixNano=h.Long.fromValue(i.startTimeUnixNano)).unsigned=!1:typeof i.startTimeUnixNano=="string"?n.startTimeUnixNano=parseInt(i.startTimeUnixNano,10):typeof i.startTimeUnixNano=="number"?n.startTimeUnixNano=i.startTimeUnixNano:typeof i.startTimeUnixNano=="object"&&(n.startTimeUnixNano=new h.LongBits(i.startTimeUnixNano.low>>>0,i.startTimeUnixNano.high>>>0).toNumber())),i.endTimeUnixNano!=null&&(h.Long?(n.endTimeUnixNano=h.Long.fromValue(i.endTimeUnixNano)).unsigned=!1:typeof i.endTimeUnixNano=="string"?n.endTimeUnixNano=parseInt(i.endTimeUnixNano,10):typeof i.endTimeUnixNano=="number"?n.endTimeUnixNano=i.endTimeUnixNano:typeof i.endTimeUnixNano=="object"&&(n.endTimeUnixNano=new h.LongBits(i.endTimeUnixNano.low>>>0,i.endTimeUnixNano.high>>>0).toNumber())),i.attributes){if(!Array.isArray(i.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");n.attributes=[];for(var l=0;l>>0),i.events){if(!Array.isArray(i.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");n.events=[];for(var l=0;l>>0),i.links){if(!Array.isArray(i.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");n.links=[];for(var l=0;l>>0),i.status!=null){if(typeof i.status!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");n.status=d.opentelemetry.proto.trace.v1.Status.fromObject(i.status)}return n},s.toObject=function(i,n){n||(n={});var l={};if((n.arrays||n.defaults)&&(l.attributes=[],l.events=[],l.links=[]),n.defaults){if(n.bytes===String?l.traceId="":(l.traceId=[],n.bytes!==Array&&(l.traceId=h.newBuffer(l.traceId))),n.bytes===String?l.spanId="":(l.spanId=[],n.bytes!==Array&&(l.spanId=h.newBuffer(l.spanId))),l.traceState="",n.bytes===String?l.parentSpanId="":(l.parentSpanId=[],n.bytes!==Array&&(l.parentSpanId=h.newBuffer(l.parentSpanId))),l.name="",l.kind=n.enums===String?"SPAN_KIND_UNSPECIFIED":0,h.Long){var c=new h.Long(0,0,!1);l.startTimeUnixNano=n.longs===String?c.toString():n.longs===Number?c.toNumber():c}else l.startTimeUnixNano=n.longs===String?"0":0;if(h.Long){var c=new h.Long(0,0,!1);l.endTimeUnixNano=n.longs===String?c.toString():n.longs===Number?c.toNumber():c}else l.endTimeUnixNano=n.longs===String?"0":0;l.droppedAttributesCount=0,l.droppedEventsCount=0,l.droppedLinksCount=0,l.status=null}if(i.traceId!=null&&i.hasOwnProperty("traceId")&&(l.traceId=n.bytes===String?h.base64.encode(i.traceId,0,i.traceId.length):n.bytes===Array?Array.prototype.slice.call(i.traceId):i.traceId),i.spanId!=null&&i.hasOwnProperty("spanId")&&(l.spanId=n.bytes===String?h.base64.encode(i.spanId,0,i.spanId.length):n.bytes===Array?Array.prototype.slice.call(i.spanId):i.spanId),i.traceState!=null&&i.hasOwnProperty("traceState")&&(l.traceState=i.traceState),i.parentSpanId!=null&&i.hasOwnProperty("parentSpanId")&&(l.parentSpanId=n.bytes===String?h.base64.encode(i.parentSpanId,0,i.parentSpanId.length):n.bytes===Array?Array.prototype.slice.call(i.parentSpanId):i.parentSpanId),i.name!=null&&i.hasOwnProperty("name")&&(l.name=i.name),i.kind!=null&&i.hasOwnProperty("kind")&&(l.kind=n.enums===String?d.opentelemetry.proto.trace.v1.Span.SpanKind[i.kind]===void 0?i.kind:d.opentelemetry.proto.trace.v1.Span.SpanKind[i.kind]:i.kind),i.startTimeUnixNano!=null&&i.hasOwnProperty("startTimeUnixNano")&&(typeof i.startTimeUnixNano=="number"?l.startTimeUnixNano=n.longs===String?String(i.startTimeUnixNano):i.startTimeUnixNano:l.startTimeUnixNano=n.longs===String?h.Long.prototype.toString.call(i.startTimeUnixNano):n.longs===Number?new h.LongBits(i.startTimeUnixNano.low>>>0,i.startTimeUnixNano.high>>>0).toNumber():i.startTimeUnixNano),i.endTimeUnixNano!=null&&i.hasOwnProperty("endTimeUnixNano")&&(typeof i.endTimeUnixNano=="number"?l.endTimeUnixNano=n.longs===String?String(i.endTimeUnixNano):i.endTimeUnixNano:l.endTimeUnixNano=n.longs===String?h.Long.prototype.toString.call(i.endTimeUnixNano):n.longs===Number?new h.LongBits(i.endTimeUnixNano.low>>>0,i.endTimeUnixNano.high>>>0).toNumber():i.endTimeUnixNano),i.attributes&&i.attributes.length){l.attributes=[];for(var u=0;u>>3){case 1:{u.timeUnixNano=n.fixed64();break}case 2:{u.name=n.string();break}case 3:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 4:{u.droppedAttributesCount=n.uint32();break}default:n.skipType(f&7);break}}return u},a.decodeDelimited=function(n){return n instanceof g||(n=new g(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")&&!h.isInteger(n.timeUnixNano)&&!(n.timeUnixNano&&h.isInteger(n.timeUnixNano.low)&&h.isInteger(n.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(n.name!=null&&n.hasOwnProperty("name")&&!h.isString(n.name))return"name: string expected";if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var l=0;l>>0,n.timeUnixNano.high>>>0).toNumber())),n.name!=null&&(l.name=String(n.name)),n.attributes){if(!Array.isArray(n.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");l.attributes=[];for(var c=0;c>>0),l},a.toObject=function(n,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.attributes=[]),l.defaults){if(h.Long){var u=new h.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(n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&(typeof n.timeUnixNano=="number"?c.timeUnixNano=l.longs===String?String(n.timeUnixNano):n.timeUnixNano:c.timeUnixNano=l.longs===String?h.Long.prototype.toString.call(n.timeUnixNano):l.longs===Number?new h.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber():n.timeUnixNano),n.name!=null&&n.hasOwnProperty("name")&&(c.name=n.name),n.attributes&&n.attributes.length){c.attributes=[];for(var f=0;f>>3){case 1:{u.traceId=n.bytes();break}case 2:{u.spanId=n.bytes();break}case 3:{u.traceState=n.string();break}case 4:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 5:{u.droppedAttributesCount=n.uint32();break}default:n.skipType(f&7);break}}return u},a.decodeDelimited=function(n){return n instanceof g||(n=new g(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"||h.isString(n.traceId)))return"traceId: buffer expected";if(n.spanId!=null&&n.hasOwnProperty("spanId")&&!(n.spanId&&typeof n.spanId.length=="number"||h.isString(n.spanId)))return"spanId: buffer expected";if(n.traceState!=null&&n.hasOwnProperty("traceState")&&!h.isString(n.traceState))return"traceState: string expected";if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var l=0;l=0&&(l.traceId=n.traceId)),n.spanId!=null&&(typeof n.spanId=="string"?h.base64.decode(n.spanId,l.spanId=h.newBuffer(h.base64.length(n.spanId)),0):n.spanId.length>=0&&(l.spanId=n.spanId)),n.traceState!=null&&(l.traceState=String(n.traceState)),n.attributes){if(!Array.isArray(n.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");l.attributes=[];for(var c=0;c>>0),l},a.toObject=function(n,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=h.newBuffer(c.traceId))),l.bytes===String?c.spanId="":(c.spanId=[],l.bytes!==Array&&(c.spanId=h.newBuffer(c.spanId))),c.traceState="",c.droppedAttributesCount=0),n.traceId!=null&&n.hasOwnProperty("traceId")&&(c.traceId=l.bytes===String?h.base64.encode(n.traceId,0,n.traceId.length):l.bytes===Array?Array.prototype.slice.call(n.traceId):n.traceId),n.spanId!=null&&n.hasOwnProperty("spanId")&&(c.spanId=l.bytes===String?h.base64.encode(n.spanId,0,n.spanId.length):l.bytes===Array?Array.prototype.slice.call(n.spanId):n.spanId),n.traceState!=null&&n.hasOwnProperty("traceState")&&(c.traceState=n.traceState),n.attributes&&n.attributes.length){c.attributes=[];for(var u=0;u>>3){case 2:{c.message=i.string();break}case 3:{c.code=i.int32();break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.message!=null&&i.hasOwnProperty("message")&&!h.isString(i.message))return"message: string expected";if(i.code!=null&&i.hasOwnProperty("code"))switch(i.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},s.fromObject=function(i){if(i instanceof d.opentelemetry.proto.trace.v1.Status)return i;var n=new d.opentelemetry.proto.trace.v1.Status;switch(i.message!=null&&(n.message=String(i.message)),i.code){default:if(typeof i.code=="number"){n.code=i.code;break}break;case"STATUS_CODE_UNSET":case 0:n.code=0;break;case"STATUS_CODE_OK":case 1:n.code=1;break;case"STATUS_CODE_ERROR":case 2:n.code=2;break}return n},s.toObject=function(i,n){n||(n={});var l={};return n.defaults&&(l.message="",l.code=n.enums===String?"STATUS_CODE_UNSET":0),i.message!=null&&i.hasOwnProperty("message")&&(l.message=i.message),i.code!=null&&i.hasOwnProperty("code")&&(l.code=n.enums===String?d.opentelemetry.proto.trace.v1.Status.StatusCode[i.code]===void 0?i.code:d.opentelemetry.proto.trace.v1.Status.StatusCode[i.code]:i.code),l},s.prototype.toJSON=function(){return this.constructor.toObject(this,X.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.trace.v1.Status"},s.StatusCode=(function(){var a={},i=Object.create(a);return i[a[0]="STATUS_CODE_UNSET"]=0,i[a[1]="STATUS_CODE_OK"]=1,i[a[2]="STATUS_CODE_ERROR"]=2,i})(),s})(),o})(),t})(),e.collector=(function(){var t={};return t.trace=(function(){var o={};return o.v1=(function(){var s={};return s.TraceService=(function(){function a(i,n,l){X.rpc.Service.call(this,i,n,l)}return(a.prototype=Object.create(X.rpc.Service.prototype)).constructor=a,a.create=function(n,l,c){return new this(n,l,c)},Object.defineProperty(a.prototype.export=function i(n,l){return this.rpcCall(i,d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,n,l)},"name",{value:"Export"}),a})(),s.ExportTraceServiceRequest=(function(){function a(i){if(this.resourceSpans=[],i)for(var n=Object.keys(i),l=0;l>>3){case 1:{u.resourceSpans&&u.resourceSpans.length||(u.resourceSpans=[]),u.resourceSpans.push(d.opentelemetry.proto.trace.v1.ResourceSpans.decode(n,n.uint32()));break}default:n.skipType(f&7);break}}return u},a.decodeDelimited=function(n){return n instanceof g||(n=new g(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 l=0;l>>3){case 1:{u.partialSuccess=d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(n,n.uint32());break}default:n.skipType(f&7);break}}return u},a.decodeDelimited=function(n){return n instanceof g||(n=new g(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.partialSuccess!=null&&n.hasOwnProperty("partialSuccess")){var l=d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(n.partialSuccess);if(l)return"partialSuccess."+l}return null},a.fromObject=function(n){if(n instanceof d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return n;var l=new d.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(n.partialSuccess!=null){if(typeof n.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");l.partialSuccess=d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(n.partialSuccess)}return l},a.toObject=function(n,l){l||(l={});var c={};return l.defaults&&(c.partialSuccess=null),n.partialSuccess!=null&&n.hasOwnProperty("partialSuccess")&&(c.partialSuccess=d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(n.partialSuccess,l)),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,X.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},a})(),s.ExportTracePartialSuccess=(function(){function a(i){if(i)for(var n=Object.keys(i),l=0;l>>3){case 1:{u.rejectedSpans=n.int64();break}case 2:{u.errorMessage=n.string();break}default:n.skipType(f&7);break}}return u},a.decodeDelimited=function(n){return n instanceof g||(n=new g(n)),this.decode(n,n.uint32())},a.verify=function(n){return typeof n!="object"||n===null?"object expected":n.rejectedSpans!=null&&n.hasOwnProperty("rejectedSpans")&&!h.isInteger(n.rejectedSpans)&&!(n.rejectedSpans&&h.isInteger(n.rejectedSpans.low)&&h.isInteger(n.rejectedSpans.high))?"rejectedSpans: integer|Long expected":n.errorMessage!=null&&n.hasOwnProperty("errorMessage")&&!h.isString(n.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(n){if(n instanceof d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return n;var l=new d.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return n.rejectedSpans!=null&&(h.Long?(l.rejectedSpans=h.Long.fromValue(n.rejectedSpans)).unsigned=!1:typeof n.rejectedSpans=="string"?l.rejectedSpans=parseInt(n.rejectedSpans,10):typeof n.rejectedSpans=="number"?l.rejectedSpans=n.rejectedSpans:typeof n.rejectedSpans=="object"&&(l.rejectedSpans=new h.LongBits(n.rejectedSpans.low>>>0,n.rejectedSpans.high>>>0).toNumber())),n.errorMessage!=null&&(l.errorMessage=String(n.errorMessage)),l},a.toObject=function(n,l){l||(l={});var c={};if(l.defaults){if(h.Long){var u=new h.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 n.rejectedSpans!=null&&n.hasOwnProperty("rejectedSpans")&&(typeof n.rejectedSpans=="number"?c.rejectedSpans=l.longs===String?String(n.rejectedSpans):n.rejectedSpans:c.rejectedSpans=l.longs===String?h.Long.prototype.toString.call(n.rejectedSpans):l.longs===Number?new h.LongBits(n.rejectedSpans.low>>>0,n.rejectedSpans.high>>>0).toNumber():n.rejectedSpans),n.errorMessage!=null&&n.hasOwnProperty("errorMessage")&&(c.errorMessage=n.errorMessage),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,X.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},a})(),s})(),o})(),t.metrics=(function(){var o={};return o.v1=(function(){var s={};return s.MetricsService=(function(){function a(i,n,l){X.rpc.Service.call(this,i,n,l)}return(a.prototype=Object.create(X.rpc.Service.prototype)).constructor=a,a.create=function(n,l,c){return new this(n,l,c)},Object.defineProperty(a.prototype.export=function i(n,l){return this.rpcCall(i,d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,n,l)},"name",{value:"Export"}),a})(),s.ExportMetricsServiceRequest=(function(){function a(i){if(this.resourceMetrics=[],i)for(var n=Object.keys(i),l=0;l>>3){case 1:{u.resourceMetrics&&u.resourceMetrics.length||(u.resourceMetrics=[]),u.resourceMetrics.push(d.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(n,n.uint32()));break}default:n.skipType(f&7);break}}return u},a.decodeDelimited=function(n){return n instanceof g||(n=new g(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 l=0;l>>3){case 1:{u.partialSuccess=d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(n,n.uint32());break}default:n.skipType(f&7);break}}return u},a.decodeDelimited=function(n){return n instanceof g||(n=new g(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.partialSuccess!=null&&n.hasOwnProperty("partialSuccess")){var l=d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(n.partialSuccess);if(l)return"partialSuccess."+l}return null},a.fromObject=function(n){if(n instanceof d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return n;var l=new d.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(n.partialSuccess!=null){if(typeof n.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");l.partialSuccess=d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(n.partialSuccess)}return l},a.toObject=function(n,l){l||(l={});var c={};return l.defaults&&(c.partialSuccess=null),n.partialSuccess!=null&&n.hasOwnProperty("partialSuccess")&&(c.partialSuccess=d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(n.partialSuccess,l)),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,X.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},a})(),s.ExportMetricsPartialSuccess=(function(){function a(i){if(i)for(var n=Object.keys(i),l=0;l>>3){case 1:{u.rejectedDataPoints=n.int64();break}case 2:{u.errorMessage=n.string();break}default:n.skipType(f&7);break}}return u},a.decodeDelimited=function(n){return n instanceof g||(n=new g(n)),this.decode(n,n.uint32())},a.verify=function(n){return typeof n!="object"||n===null?"object expected":n.rejectedDataPoints!=null&&n.hasOwnProperty("rejectedDataPoints")&&!h.isInteger(n.rejectedDataPoints)&&!(n.rejectedDataPoints&&h.isInteger(n.rejectedDataPoints.low)&&h.isInteger(n.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":n.errorMessage!=null&&n.hasOwnProperty("errorMessage")&&!h.isString(n.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(n){if(n instanceof d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return n;var l=new d.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return n.rejectedDataPoints!=null&&(h.Long?(l.rejectedDataPoints=h.Long.fromValue(n.rejectedDataPoints)).unsigned=!1:typeof n.rejectedDataPoints=="string"?l.rejectedDataPoints=parseInt(n.rejectedDataPoints,10):typeof n.rejectedDataPoints=="number"?l.rejectedDataPoints=n.rejectedDataPoints:typeof n.rejectedDataPoints=="object"&&(l.rejectedDataPoints=new h.LongBits(n.rejectedDataPoints.low>>>0,n.rejectedDataPoints.high>>>0).toNumber())),n.errorMessage!=null&&(l.errorMessage=String(n.errorMessage)),l},a.toObject=function(n,l){l||(l={});var c={};if(l.defaults){if(h.Long){var u=new h.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 n.rejectedDataPoints!=null&&n.hasOwnProperty("rejectedDataPoints")&&(typeof n.rejectedDataPoints=="number"?c.rejectedDataPoints=l.longs===String?String(n.rejectedDataPoints):n.rejectedDataPoints:c.rejectedDataPoints=l.longs===String?h.Long.prototype.toString.call(n.rejectedDataPoints):l.longs===Number?new h.LongBits(n.rejectedDataPoints.low>>>0,n.rejectedDataPoints.high>>>0).toNumber():n.rejectedDataPoints),n.errorMessage!=null&&n.hasOwnProperty("errorMessage")&&(c.errorMessage=n.errorMessage),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,X.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},a})(),s})(),o})(),t.logs=(function(){var o={};return o.v1=(function(){var s={};return s.LogsService=(function(){function a(i,n,l){X.rpc.Service.call(this,i,n,l)}return(a.prototype=Object.create(X.rpc.Service.prototype)).constructor=a,a.create=function(n,l,c){return new this(n,l,c)},Object.defineProperty(a.prototype.export=function i(n,l){return this.rpcCall(i,d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,n,l)},"name",{value:"Export"}),a})(),s.ExportLogsServiceRequest=(function(){function a(i){if(this.resourceLogs=[],i)for(var n=Object.keys(i),l=0;l>>3){case 1:{u.resourceLogs&&u.resourceLogs.length||(u.resourceLogs=[]),u.resourceLogs.push(d.opentelemetry.proto.logs.v1.ResourceLogs.decode(n,n.uint32()));break}default:n.skipType(f&7);break}}return u},a.decodeDelimited=function(n){return n instanceof g||(n=new g(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 l=0;l>>3){case 1:{u.partialSuccess=d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(n,n.uint32());break}default:n.skipType(f&7);break}}return u},a.decodeDelimited=function(n){return n instanceof g||(n=new g(n)),this.decode(n,n.uint32())},a.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.partialSuccess!=null&&n.hasOwnProperty("partialSuccess")){var l=d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(n.partialSuccess);if(l)return"partialSuccess."+l}return null},a.fromObject=function(n){if(n instanceof d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return n;var l=new d.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(n.partialSuccess!=null){if(typeof n.partialSuccess!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");l.partialSuccess=d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(n.partialSuccess)}return l},a.toObject=function(n,l){l||(l={});var c={};return l.defaults&&(c.partialSuccess=null),n.partialSuccess!=null&&n.hasOwnProperty("partialSuccess")&&(c.partialSuccess=d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(n.partialSuccess,l)),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,X.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},a})(),s.ExportLogsPartialSuccess=(function(){function a(i){if(i)for(var n=Object.keys(i),l=0;l>>3){case 1:{u.rejectedLogRecords=n.int64();break}case 2:{u.errorMessage=n.string();break}default:n.skipType(f&7);break}}return u},a.decodeDelimited=function(n){return n instanceof g||(n=new g(n)),this.decode(n,n.uint32())},a.verify=function(n){return typeof n!="object"||n===null?"object expected":n.rejectedLogRecords!=null&&n.hasOwnProperty("rejectedLogRecords")&&!h.isInteger(n.rejectedLogRecords)&&!(n.rejectedLogRecords&&h.isInteger(n.rejectedLogRecords.low)&&h.isInteger(n.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":n.errorMessage!=null&&n.hasOwnProperty("errorMessage")&&!h.isString(n.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(n){if(n instanceof d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return n;var l=new d.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return n.rejectedLogRecords!=null&&(h.Long?(l.rejectedLogRecords=h.Long.fromValue(n.rejectedLogRecords)).unsigned=!1:typeof n.rejectedLogRecords=="string"?l.rejectedLogRecords=parseInt(n.rejectedLogRecords,10):typeof n.rejectedLogRecords=="number"?l.rejectedLogRecords=n.rejectedLogRecords:typeof n.rejectedLogRecords=="object"&&(l.rejectedLogRecords=new h.LongBits(n.rejectedLogRecords.low>>>0,n.rejectedLogRecords.high>>>0).toNumber())),n.errorMessage!=null&&(l.errorMessage=String(n.errorMessage)),l},a.toObject=function(n,l){l||(l={});var c={};if(l.defaults){if(h.Long){var u=new h.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 n.rejectedLogRecords!=null&&n.hasOwnProperty("rejectedLogRecords")&&(typeof n.rejectedLogRecords=="number"?c.rejectedLogRecords=l.longs===String?String(n.rejectedLogRecords):n.rejectedLogRecords:c.rejectedLogRecords=l.longs===String?h.Long.prototype.toString.call(n.rejectedLogRecords):l.longs===Number?new h.LongBits(n.rejectedLogRecords.low>>>0,n.rejectedLogRecords.high>>>0).toNumber():n.rejectedLogRecords),n.errorMessage!=null&&n.hasOwnProperty("errorMessage")&&(c.errorMessage=n.errorMessage),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,X.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},a})(),s})(),o})(),t})(),e.metrics=(function(){var t={};return t.v1=(function(){var o={};return o.MetricsData=(function(){function s(a){if(this.resourceMetrics=[],a)for(var i=Object.keys(a),n=0;n>>3){case 1:{c.resourceMetrics&&c.resourceMetrics.length||(c.resourceMetrics=[]),c.resourceMetrics.push(d.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(i,i.uint32()));break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.resourceMetrics!=null&&i.hasOwnProperty("resourceMetrics")){if(!Array.isArray(i.resourceMetrics))return"resourceMetrics: array expected";for(var n=0;n>>3){case 1:{c.resource=d.opentelemetry.proto.resource.v1.Resource.decode(i,i.uint32());break}case 2:{c.scopeMetrics&&c.scopeMetrics.length||(c.scopeMetrics=[]),c.scopeMetrics.push(d.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(i,i.uint32()));break}case 3:{c.schemaUrl=i.string();break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.resource!=null&&i.hasOwnProperty("resource")){var n=d.opentelemetry.proto.resource.v1.Resource.verify(i.resource);if(n)return"resource."+n}if(i.scopeMetrics!=null&&i.hasOwnProperty("scopeMetrics")){if(!Array.isArray(i.scopeMetrics))return"scopeMetrics: array expected";for(var l=0;l>>3){case 1:{c.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.decode(i,i.uint32());break}case 2:{c.metrics&&c.metrics.length||(c.metrics=[]),c.metrics.push(d.opentelemetry.proto.metrics.v1.Metric.decode(i,i.uint32()));break}case 3:{c.schemaUrl=i.string();break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.scope!=null&&i.hasOwnProperty("scope")){var n=d.opentelemetry.proto.common.v1.InstrumentationScope.verify(i.scope);if(n)return"scope."+n}if(i.metrics!=null&&i.hasOwnProperty("metrics")){if(!Array.isArray(i.metrics))return"metrics: array expected";for(var l=0;l>>3){case 1:{u.name=n.string();break}case 2:{u.description=n.string();break}case 3:{u.unit=n.string();break}case 5:{u.gauge=d.opentelemetry.proto.metrics.v1.Gauge.decode(n,n.uint32());break}case 7:{u.sum=d.opentelemetry.proto.metrics.v1.Sum.decode(n,n.uint32());break}case 9:{u.histogram=d.opentelemetry.proto.metrics.v1.Histogram.decode(n,n.uint32());break}case 10:{u.exponentialHistogram=d.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(n,n.uint32());break}case 11:{u.summary=d.opentelemetry.proto.metrics.v1.Summary.decode(n,n.uint32());break}default:n.skipType(f&7);break}}return u},s.decodeDelimited=function(n){return n instanceof g||(n=new g(n)),this.decode(n,n.uint32())},s.verify=function(n){if(typeof n!="object"||n===null)return"object expected";var l={};if(n.name!=null&&n.hasOwnProperty("name")&&!h.isString(n.name))return"name: string expected";if(n.description!=null&&n.hasOwnProperty("description")&&!h.isString(n.description))return"description: string expected";if(n.unit!=null&&n.hasOwnProperty("unit")&&!h.isString(n.unit))return"unit: string expected";if(n.gauge!=null&&n.hasOwnProperty("gauge")){l.data=1;{var c=d.opentelemetry.proto.metrics.v1.Gauge.verify(n.gauge);if(c)return"gauge."+c}}if(n.sum!=null&&n.hasOwnProperty("sum")){if(l.data===1)return"data: multiple values";l.data=1;{var c=d.opentelemetry.proto.metrics.v1.Sum.verify(n.sum);if(c)return"sum."+c}}if(n.histogram!=null&&n.hasOwnProperty("histogram")){if(l.data===1)return"data: multiple values";l.data=1;{var c=d.opentelemetry.proto.metrics.v1.Histogram.verify(n.histogram);if(c)return"histogram."+c}}if(n.exponentialHistogram!=null&&n.hasOwnProperty("exponentialHistogram")){if(l.data===1)return"data: multiple values";l.data=1;{var c=d.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(n.exponentialHistogram);if(c)return"exponentialHistogram."+c}}if(n.summary!=null&&n.hasOwnProperty("summary")){if(l.data===1)return"data: multiple values";l.data=1;{var c=d.opentelemetry.proto.metrics.v1.Summary.verify(n.summary);if(c)return"summary."+c}}return null},s.fromObject=function(n){if(n instanceof d.opentelemetry.proto.metrics.v1.Metric)return n;var l=new d.opentelemetry.proto.metrics.v1.Metric;if(n.name!=null&&(l.name=String(n.name)),n.description!=null&&(l.description=String(n.description)),n.unit!=null&&(l.unit=String(n.unit)),n.gauge!=null){if(typeof n.gauge!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");l.gauge=d.opentelemetry.proto.metrics.v1.Gauge.fromObject(n.gauge)}if(n.sum!=null){if(typeof n.sum!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");l.sum=d.opentelemetry.proto.metrics.v1.Sum.fromObject(n.sum)}if(n.histogram!=null){if(typeof n.histogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");l.histogram=d.opentelemetry.proto.metrics.v1.Histogram.fromObject(n.histogram)}if(n.exponentialHistogram!=null){if(typeof n.exponentialHistogram!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");l.exponentialHistogram=d.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(n.exponentialHistogram)}if(n.summary!=null){if(typeof n.summary!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");l.summary=d.opentelemetry.proto.metrics.v1.Summary.fromObject(n.summary)}return l},s.toObject=function(n,l){l||(l={});var c={};return l.defaults&&(c.name="",c.description="",c.unit=""),n.name!=null&&n.hasOwnProperty("name")&&(c.name=n.name),n.description!=null&&n.hasOwnProperty("description")&&(c.description=n.description),n.unit!=null&&n.hasOwnProperty("unit")&&(c.unit=n.unit),n.gauge!=null&&n.hasOwnProperty("gauge")&&(c.gauge=d.opentelemetry.proto.metrics.v1.Gauge.toObject(n.gauge,l),l.oneofs&&(c.data="gauge")),n.sum!=null&&n.hasOwnProperty("sum")&&(c.sum=d.opentelemetry.proto.metrics.v1.Sum.toObject(n.sum,l),l.oneofs&&(c.data="sum")),n.histogram!=null&&n.hasOwnProperty("histogram")&&(c.histogram=d.opentelemetry.proto.metrics.v1.Histogram.toObject(n.histogram,l),l.oneofs&&(c.data="histogram")),n.exponentialHistogram!=null&&n.hasOwnProperty("exponentialHistogram")&&(c.exponentialHistogram=d.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(n.exponentialHistogram,l),l.oneofs&&(c.data="exponentialHistogram")),n.summary!=null&&n.hasOwnProperty("summary")&&(c.summary=d.opentelemetry.proto.metrics.v1.Summary.toObject(n.summary,l),l.oneofs&&(c.data="summary")),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,X.util.toJSONOptions)},s.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.Metric"},s})(),o.Gauge=(function(){function s(a){if(this.dataPoints=[],a)for(var i=Object.keys(a),n=0;n>>3){case 1:{c.dataPoints&&c.dataPoints.length||(c.dataPoints=[]),c.dataPoints.push(d.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(i,i.uint32()));break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.dataPoints!=null&&i.hasOwnProperty("dataPoints")){if(!Array.isArray(i.dataPoints))return"dataPoints: array expected";for(var n=0;n>>3){case 1:{c.dataPoints&&c.dataPoints.length||(c.dataPoints=[]),c.dataPoints.push(d.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(i,i.uint32()));break}case 2:{c.aggregationTemporality=i.int32();break}case 3:{c.isMonotonic=i.bool();break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.dataPoints!=null&&i.hasOwnProperty("dataPoints")){if(!Array.isArray(i.dataPoints))return"dataPoints: array expected";for(var n=0;n>>3){case 1:{c.dataPoints&&c.dataPoints.length||(c.dataPoints=[]),c.dataPoints.push(d.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(i,i.uint32()));break}case 2:{c.aggregationTemporality=i.int32();break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.dataPoints!=null&&i.hasOwnProperty("dataPoints")){if(!Array.isArray(i.dataPoints))return"dataPoints: array expected";for(var n=0;n>>3){case 1:{c.dataPoints&&c.dataPoints.length||(c.dataPoints=[]),c.dataPoints.push(d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(i,i.uint32()));break}case 2:{c.aggregationTemporality=i.int32();break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.dataPoints!=null&&i.hasOwnProperty("dataPoints")){if(!Array.isArray(i.dataPoints))return"dataPoints: array expected";for(var n=0;n>>3){case 1:{c.dataPoints&&c.dataPoints.length||(c.dataPoints=[]),c.dataPoints.push(d.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(i,i.uint32()));break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.dataPoints!=null&&i.hasOwnProperty("dataPoints")){if(!Array.isArray(i.dataPoints))return"dataPoints: array expected";for(var n=0;n>>3){case 7:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 2:{u.startTimeUnixNano=n.fixed64();break}case 3:{u.timeUnixNano=n.fixed64();break}case 4:{u.asDouble=n.double();break}case 6:{u.asInt=n.sfixed64();break}case 5:{u.exemplars&&u.exemplars.length||(u.exemplars=[]),u.exemplars.push(d.opentelemetry.proto.metrics.v1.Exemplar.decode(n,n.uint32()));break}case 8:{u.flags=n.uint32();break}default:n.skipType(f&7);break}}return u},s.decodeDelimited=function(n){return n instanceof g||(n=new g(n)),this.decode(n,n.uint32())},s.verify=function(n){if(typeof n!="object"||n===null)return"object expected";var l={};if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var c=0;c>>0,n.startTimeUnixNano.high>>>0).toNumber())),n.timeUnixNano!=null&&(h.Long?(l.timeUnixNano=h.Long.fromValue(n.timeUnixNano)).unsigned=!1:typeof n.timeUnixNano=="string"?l.timeUnixNano=parseInt(n.timeUnixNano,10):typeof n.timeUnixNano=="number"?l.timeUnixNano=n.timeUnixNano:typeof n.timeUnixNano=="object"&&(l.timeUnixNano=new h.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber())),n.asDouble!=null&&(l.asDouble=Number(n.asDouble)),n.asInt!=null&&(h.Long?(l.asInt=h.Long.fromValue(n.asInt)).unsigned=!1:typeof n.asInt=="string"?l.asInt=parseInt(n.asInt,10):typeof n.asInt=="number"?l.asInt=n.asInt:typeof n.asInt=="object"&&(l.asInt=new h.LongBits(n.asInt.low>>>0,n.asInt.high>>>0).toNumber())),n.exemplars){if(!Array.isArray(n.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");l.exemplars=[];for(var c=0;c>>0),l},s.toObject=function(n,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.exemplars=[],c.attributes=[]),l.defaults){if(h.Long){var u=new h.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(h.Long){var u=new h.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(n.startTimeUnixNano!=null&&n.hasOwnProperty("startTimeUnixNano")&&(typeof n.startTimeUnixNano=="number"?c.startTimeUnixNano=l.longs===String?String(n.startTimeUnixNano):n.startTimeUnixNano:c.startTimeUnixNano=l.longs===String?h.Long.prototype.toString.call(n.startTimeUnixNano):l.longs===Number?new h.LongBits(n.startTimeUnixNano.low>>>0,n.startTimeUnixNano.high>>>0).toNumber():n.startTimeUnixNano),n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&(typeof n.timeUnixNano=="number"?c.timeUnixNano=l.longs===String?String(n.timeUnixNano):n.timeUnixNano:c.timeUnixNano=l.longs===String?h.Long.prototype.toString.call(n.timeUnixNano):l.longs===Number?new h.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber():n.timeUnixNano),n.asDouble!=null&&n.hasOwnProperty("asDouble")&&(c.asDouble=l.json&&!isFinite(n.asDouble)?String(n.asDouble):n.asDouble,l.oneofs&&(c.value="asDouble")),n.exemplars&&n.exemplars.length){c.exemplars=[];for(var f=0;f>>0,n.asInt.high>>>0).toNumber():n.asInt,l.oneofs&&(c.value="asInt")),n.attributes&&n.attributes.length){c.attributes=[];for(var f=0;f>>3){case 9:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 2:{u.startTimeUnixNano=n.fixed64();break}case 3:{u.timeUnixNano=n.fixed64();break}case 4:{u.count=n.fixed64();break}case 5:{u.sum=n.double();break}case 6:{if(u.bucketCounts&&u.bucketCounts.length||(u.bucketCounts=[]),(f&7)===2)for(var _=n.uint32()+n.pos;n.pos<_;)u.bucketCounts.push(n.fixed64());else u.bucketCounts.push(n.fixed64());break}case 7:{if(u.explicitBounds&&u.explicitBounds.length||(u.explicitBounds=[]),(f&7)===2)for(var _=n.uint32()+n.pos;n.pos<_;)u.explicitBounds.push(n.double());else u.explicitBounds.push(n.double());break}case 8:{u.exemplars&&u.exemplars.length||(u.exemplars=[]),u.exemplars.push(d.opentelemetry.proto.metrics.v1.Exemplar.decode(n,n.uint32()));break}case 10:{u.flags=n.uint32();break}case 11:{u.min=n.double();break}case 12:{u.max=n.double();break}default:n.skipType(f&7);break}}return u},s.decodeDelimited=function(n){return n instanceof g||(n=new g(n)),this.decode(n,n.uint32())},s.verify=function(n){if(typeof n!="object"||n===null)return"object expected";var l={};if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var c=0;c>>0,n.startTimeUnixNano.high>>>0).toNumber())),n.timeUnixNano!=null&&(h.Long?(l.timeUnixNano=h.Long.fromValue(n.timeUnixNano)).unsigned=!1:typeof n.timeUnixNano=="string"?l.timeUnixNano=parseInt(n.timeUnixNano,10):typeof n.timeUnixNano=="number"?l.timeUnixNano=n.timeUnixNano:typeof n.timeUnixNano=="object"&&(l.timeUnixNano=new h.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber())),n.count!=null&&(h.Long?(l.count=h.Long.fromValue(n.count)).unsigned=!1:typeof n.count=="string"?l.count=parseInt(n.count,10):typeof n.count=="number"?l.count=n.count:typeof n.count=="object"&&(l.count=new h.LongBits(n.count.low>>>0,n.count.high>>>0).toNumber())),n.sum!=null&&(l.sum=Number(n.sum)),n.bucketCounts){if(!Array.isArray(n.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");l.bucketCounts=[];for(var c=0;c>>0,n.bucketCounts[c].high>>>0).toNumber())}if(n.explicitBounds){if(!Array.isArray(n.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");l.explicitBounds=[];for(var c=0;c>>0),n.min!=null&&(l.min=Number(n.min)),n.max!=null&&(l.max=Number(n.max)),l},s.toObject=function(n,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.bucketCounts=[],c.explicitBounds=[],c.exemplars=[],c.attributes=[]),l.defaults){if(h.Long){var u=new h.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(h.Long){var u=new h.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(h.Long){var u=new h.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(n.startTimeUnixNano!=null&&n.hasOwnProperty("startTimeUnixNano")&&(typeof n.startTimeUnixNano=="number"?c.startTimeUnixNano=l.longs===String?String(n.startTimeUnixNano):n.startTimeUnixNano:c.startTimeUnixNano=l.longs===String?h.Long.prototype.toString.call(n.startTimeUnixNano):l.longs===Number?new h.LongBits(n.startTimeUnixNano.low>>>0,n.startTimeUnixNano.high>>>0).toNumber():n.startTimeUnixNano),n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&(typeof n.timeUnixNano=="number"?c.timeUnixNano=l.longs===String?String(n.timeUnixNano):n.timeUnixNano:c.timeUnixNano=l.longs===String?h.Long.prototype.toString.call(n.timeUnixNano):l.longs===Number?new h.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber():n.timeUnixNano),n.count!=null&&n.hasOwnProperty("count")&&(typeof n.count=="number"?c.count=l.longs===String?String(n.count):n.count:c.count=l.longs===String?h.Long.prototype.toString.call(n.count):l.longs===Number?new h.LongBits(n.count.low>>>0,n.count.high>>>0).toNumber():n.count),n.sum!=null&&n.hasOwnProperty("sum")&&(c.sum=l.json&&!isFinite(n.sum)?String(n.sum):n.sum,l.oneofs&&(c._sum="sum")),n.bucketCounts&&n.bucketCounts.length){c.bucketCounts=[];for(var f=0;f>>0,n.bucketCounts[f].high>>>0).toNumber():n.bucketCounts[f]}if(n.explicitBounds&&n.explicitBounds.length){c.explicitBounds=[];for(var f=0;f>>3){case 1:{u.attributes&&u.attributes.length||(u.attributes=[]),u.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 2:{u.startTimeUnixNano=n.fixed64();break}case 3:{u.timeUnixNano=n.fixed64();break}case 4:{u.count=n.fixed64();break}case 5:{u.sum=n.double();break}case 6:{u.scale=n.sint32();break}case 7:{u.zeroCount=n.fixed64();break}case 8:{u.positive=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(n,n.uint32());break}case 9:{u.negative=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(n,n.uint32());break}case 10:{u.flags=n.uint32();break}case 11:{u.exemplars&&u.exemplars.length||(u.exemplars=[]),u.exemplars.push(d.opentelemetry.proto.metrics.v1.Exemplar.decode(n,n.uint32()));break}case 12:{u.min=n.double();break}case 13:{u.max=n.double();break}case 14:{u.zeroThreshold=n.double();break}default:n.skipType(f&7);break}}return u},s.decodeDelimited=function(n){return n instanceof g||(n=new g(n)),this.decode(n,n.uint32())},s.verify=function(n){if(typeof n!="object"||n===null)return"object expected";var l={};if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var c=0;c>>0,n.startTimeUnixNano.high>>>0).toNumber())),n.timeUnixNano!=null&&(h.Long?(l.timeUnixNano=h.Long.fromValue(n.timeUnixNano)).unsigned=!1:typeof n.timeUnixNano=="string"?l.timeUnixNano=parseInt(n.timeUnixNano,10):typeof n.timeUnixNano=="number"?l.timeUnixNano=n.timeUnixNano:typeof n.timeUnixNano=="object"&&(l.timeUnixNano=new h.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber())),n.count!=null&&(h.Long?(l.count=h.Long.fromValue(n.count)).unsigned=!1:typeof n.count=="string"?l.count=parseInt(n.count,10):typeof n.count=="number"?l.count=n.count:typeof n.count=="object"&&(l.count=new h.LongBits(n.count.low>>>0,n.count.high>>>0).toNumber())),n.sum!=null&&(l.sum=Number(n.sum)),n.scale!=null&&(l.scale=n.scale|0),n.zeroCount!=null&&(h.Long?(l.zeroCount=h.Long.fromValue(n.zeroCount)).unsigned=!1:typeof n.zeroCount=="string"?l.zeroCount=parseInt(n.zeroCount,10):typeof n.zeroCount=="number"?l.zeroCount=n.zeroCount:typeof n.zeroCount=="object"&&(l.zeroCount=new h.LongBits(n.zeroCount.low>>>0,n.zeroCount.high>>>0).toNumber())),n.positive!=null){if(typeof n.positive!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");l.positive=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(n.positive)}if(n.negative!=null){if(typeof n.negative!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");l.negative=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(n.negative)}if(n.flags!=null&&(l.flags=n.flags>>>0),n.exemplars){if(!Array.isArray(n.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");l.exemplars=[];for(var c=0;c>>0,n.startTimeUnixNano.high>>>0).toNumber():n.startTimeUnixNano),n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&(typeof n.timeUnixNano=="number"?c.timeUnixNano=l.longs===String?String(n.timeUnixNano):n.timeUnixNano:c.timeUnixNano=l.longs===String?h.Long.prototype.toString.call(n.timeUnixNano):l.longs===Number?new h.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber():n.timeUnixNano),n.count!=null&&n.hasOwnProperty("count")&&(typeof n.count=="number"?c.count=l.longs===String?String(n.count):n.count:c.count=l.longs===String?h.Long.prototype.toString.call(n.count):l.longs===Number?new h.LongBits(n.count.low>>>0,n.count.high>>>0).toNumber():n.count),n.sum!=null&&n.hasOwnProperty("sum")&&(c.sum=l.json&&!isFinite(n.sum)?String(n.sum):n.sum,l.oneofs&&(c._sum="sum")),n.scale!=null&&n.hasOwnProperty("scale")&&(c.scale=n.scale),n.zeroCount!=null&&n.hasOwnProperty("zeroCount")&&(typeof n.zeroCount=="number"?c.zeroCount=l.longs===String?String(n.zeroCount):n.zeroCount:c.zeroCount=l.longs===String?h.Long.prototype.toString.call(n.zeroCount):l.longs===Number?new h.LongBits(n.zeroCount.low>>>0,n.zeroCount.high>>>0).toNumber():n.zeroCount),n.positive!=null&&n.hasOwnProperty("positive")&&(c.positive=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(n.positive,l)),n.negative!=null&&n.hasOwnProperty("negative")&&(c.negative=d.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(n.negative,l)),n.flags!=null&&n.hasOwnProperty("flags")&&(c.flags=n.flags),n.exemplars&&n.exemplars.length){c.exemplars=[];for(var f=0;f>>3){case 1:{f.offset=l.sint32();break}case 2:{if(f.bucketCounts&&f.bucketCounts.length||(f.bucketCounts=[]),(_&7)===2)for(var m=l.uint32()+l.pos;l.pos>>0,l.bucketCounts[u].high>>>0).toNumber(!0))}return c},i.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 f=0;f>>0,l.bucketCounts[f].high>>>0).toNumber(!0):l.bucketCounts[f]}return u},i.prototype.toJSON=function(){return this.constructor.toObject(this,X.util.toJSONOptions)},i.getTypeUrl=function(l){return l===void 0&&(l="type.googleapis.com"),l+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},i})(),s})(),o.SummaryDataPoint=(function(){function s(a){if(this.attributes=[],this.quantileValues=[],a)for(var i=Object.keys(a),n=0;n>>3){case 7:{c.attributes&&c.attributes.length||(c.attributes=[]),c.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break}case 2:{c.startTimeUnixNano=i.fixed64();break}case 3:{c.timeUnixNano=i.fixed64();break}case 4:{c.count=i.fixed64();break}case 5:{c.sum=i.double();break}case 6:{c.quantileValues&&c.quantileValues.length||(c.quantileValues=[]),c.quantileValues.push(d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(i,i.uint32()));break}case 8:{c.flags=i.uint32();break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.attributes!=null&&i.hasOwnProperty("attributes")){if(!Array.isArray(i.attributes))return"attributes: array expected";for(var n=0;n>>0,i.startTimeUnixNano.high>>>0).toNumber())),i.timeUnixNano!=null&&(h.Long?(n.timeUnixNano=h.Long.fromValue(i.timeUnixNano)).unsigned=!1:typeof i.timeUnixNano=="string"?n.timeUnixNano=parseInt(i.timeUnixNano,10):typeof i.timeUnixNano=="number"?n.timeUnixNano=i.timeUnixNano:typeof i.timeUnixNano=="object"&&(n.timeUnixNano=new h.LongBits(i.timeUnixNano.low>>>0,i.timeUnixNano.high>>>0).toNumber())),i.count!=null&&(h.Long?(n.count=h.Long.fromValue(i.count)).unsigned=!1:typeof i.count=="string"?n.count=parseInt(i.count,10):typeof i.count=="number"?n.count=i.count:typeof i.count=="object"&&(n.count=new h.LongBits(i.count.low>>>0,i.count.high>>>0).toNumber())),i.sum!=null&&(n.sum=Number(i.sum)),i.quantileValues){if(!Array.isArray(i.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");n.quantileValues=[];for(var l=0;l>>0),n},s.toObject=function(i,n){n||(n={});var l={};if((n.arrays||n.defaults)&&(l.quantileValues=[],l.attributes=[]),n.defaults){if(h.Long){var c=new h.Long(0,0,!1);l.startTimeUnixNano=n.longs===String?c.toString():n.longs===Number?c.toNumber():c}else l.startTimeUnixNano=n.longs===String?"0":0;if(h.Long){var c=new h.Long(0,0,!1);l.timeUnixNano=n.longs===String?c.toString():n.longs===Number?c.toNumber():c}else l.timeUnixNano=n.longs===String?"0":0;if(h.Long){var c=new h.Long(0,0,!1);l.count=n.longs===String?c.toString():n.longs===Number?c.toNumber():c}else l.count=n.longs===String?"0":0;l.sum=0,l.flags=0}if(i.startTimeUnixNano!=null&&i.hasOwnProperty("startTimeUnixNano")&&(typeof i.startTimeUnixNano=="number"?l.startTimeUnixNano=n.longs===String?String(i.startTimeUnixNano):i.startTimeUnixNano:l.startTimeUnixNano=n.longs===String?h.Long.prototype.toString.call(i.startTimeUnixNano):n.longs===Number?new h.LongBits(i.startTimeUnixNano.low>>>0,i.startTimeUnixNano.high>>>0).toNumber():i.startTimeUnixNano),i.timeUnixNano!=null&&i.hasOwnProperty("timeUnixNano")&&(typeof i.timeUnixNano=="number"?l.timeUnixNano=n.longs===String?String(i.timeUnixNano):i.timeUnixNano:l.timeUnixNano=n.longs===String?h.Long.prototype.toString.call(i.timeUnixNano):n.longs===Number?new h.LongBits(i.timeUnixNano.low>>>0,i.timeUnixNano.high>>>0).toNumber():i.timeUnixNano),i.count!=null&&i.hasOwnProperty("count")&&(typeof i.count=="number"?l.count=n.longs===String?String(i.count):i.count:l.count=n.longs===String?h.Long.prototype.toString.call(i.count):n.longs===Number?new h.LongBits(i.count.low>>>0,i.count.high>>>0).toNumber():i.count),i.sum!=null&&i.hasOwnProperty("sum")&&(l.sum=n.json&&!isFinite(i.sum)?String(i.sum):i.sum),i.quantileValues&&i.quantileValues.length){l.quantileValues=[];for(var u=0;u>>3){case 1:{u.quantile=n.double();break}case 2:{u.value=n.double();break}default:n.skipType(f&7);break}}return u},a.decodeDelimited=function(n){return n instanceof g||(n=new g(n)),this.decode(n,n.uint32())},a.verify=function(n){return typeof n!="object"||n===null?"object expected":n.quantile!=null&&n.hasOwnProperty("quantile")&&typeof n.quantile!="number"?"quantile: number expected":n.value!=null&&n.hasOwnProperty("value")&&typeof n.value!="number"?"value: number expected":null},a.fromObject=function(n){if(n instanceof d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return n;var l=new d.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return n.quantile!=null&&(l.quantile=Number(n.quantile)),n.value!=null&&(l.value=Number(n.value)),l},a.toObject=function(n,l){l||(l={});var c={};return l.defaults&&(c.quantile=0,c.value=0),n.quantile!=null&&n.hasOwnProperty("quantile")&&(c.quantile=l.json&&!isFinite(n.quantile)?String(n.quantile):n.quantile),n.value!=null&&n.hasOwnProperty("value")&&(c.value=l.json&&!isFinite(n.value)?String(n.value):n.value),c},a.prototype.toJSON=function(){return this.constructor.toObject(this,X.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},a})(),s})(),o.Exemplar=(function(){function s(i){if(this.filteredAttributes=[],i)for(var n=Object.keys(i),l=0;l>>3){case 7:{u.filteredAttributes&&u.filteredAttributes.length||(u.filteredAttributes=[]),u.filteredAttributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 2:{u.timeUnixNano=n.fixed64();break}case 3:{u.asDouble=n.double();break}case 6:{u.asInt=n.sfixed64();break}case 4:{u.spanId=n.bytes();break}case 5:{u.traceId=n.bytes();break}default:n.skipType(f&7);break}}return u},s.decodeDelimited=function(n){return n instanceof g||(n=new g(n)),this.decode(n,n.uint32())},s.verify=function(n){if(typeof n!="object"||n===null)return"object expected";var l={};if(n.filteredAttributes!=null&&n.hasOwnProperty("filteredAttributes")){if(!Array.isArray(n.filteredAttributes))return"filteredAttributes: array expected";for(var c=0;c>>0,n.timeUnixNano.high>>>0).toNumber())),n.asDouble!=null&&(l.asDouble=Number(n.asDouble)),n.asInt!=null&&(h.Long?(l.asInt=h.Long.fromValue(n.asInt)).unsigned=!1:typeof n.asInt=="string"?l.asInt=parseInt(n.asInt,10):typeof n.asInt=="number"?l.asInt=n.asInt:typeof n.asInt=="object"&&(l.asInt=new h.LongBits(n.asInt.low>>>0,n.asInt.high>>>0).toNumber())),n.spanId!=null&&(typeof n.spanId=="string"?h.base64.decode(n.spanId,l.spanId=h.newBuffer(h.base64.length(n.spanId)),0):n.spanId.length>=0&&(l.spanId=n.spanId)),n.traceId!=null&&(typeof n.traceId=="string"?h.base64.decode(n.traceId,l.traceId=h.newBuffer(h.base64.length(n.traceId)),0):n.traceId.length>=0&&(l.traceId=n.traceId)),l},s.toObject=function(n,l){l||(l={});var c={};if((l.arrays||l.defaults)&&(c.filteredAttributes=[]),l.defaults){if(h.Long){var u=new h.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=h.newBuffer(c.spanId))),l.bytes===String?c.traceId="":(c.traceId=[],l.bytes!==Array&&(c.traceId=h.newBuffer(c.traceId)))}if(n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&(typeof n.timeUnixNano=="number"?c.timeUnixNano=l.longs===String?String(n.timeUnixNano):n.timeUnixNano:c.timeUnixNano=l.longs===String?h.Long.prototype.toString.call(n.timeUnixNano):l.longs===Number?new h.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber():n.timeUnixNano),n.asDouble!=null&&n.hasOwnProperty("asDouble")&&(c.asDouble=l.json&&!isFinite(n.asDouble)?String(n.asDouble):n.asDouble,l.oneofs&&(c.value="asDouble")),n.spanId!=null&&n.hasOwnProperty("spanId")&&(c.spanId=l.bytes===String?h.base64.encode(n.spanId,0,n.spanId.length):l.bytes===Array?Array.prototype.slice.call(n.spanId):n.spanId),n.traceId!=null&&n.hasOwnProperty("traceId")&&(c.traceId=l.bytes===String?h.base64.encode(n.traceId,0,n.traceId.length):l.bytes===Array?Array.prototype.slice.call(n.traceId):n.traceId),n.asInt!=null&&n.hasOwnProperty("asInt")&&(typeof n.asInt=="number"?c.asInt=l.longs===String?String(n.asInt):n.asInt:c.asInt=l.longs===String?h.Long.prototype.toString.call(n.asInt):l.longs===Number?new h.LongBits(n.asInt.low>>>0,n.asInt.high>>>0).toNumber():n.asInt,l.oneofs&&(c.value="asInt")),n.filteredAttributes&&n.filteredAttributes.length){c.filteredAttributes=[];for(var f=0;f>>3){case 1:{c.resourceLogs&&c.resourceLogs.length||(c.resourceLogs=[]),c.resourceLogs.push(d.opentelemetry.proto.logs.v1.ResourceLogs.decode(i,i.uint32()));break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.resourceLogs!=null&&i.hasOwnProperty("resourceLogs")){if(!Array.isArray(i.resourceLogs))return"resourceLogs: array expected";for(var n=0;n>>3){case 1:{c.resource=d.opentelemetry.proto.resource.v1.Resource.decode(i,i.uint32());break}case 2:{c.scopeLogs&&c.scopeLogs.length||(c.scopeLogs=[]),c.scopeLogs.push(d.opentelemetry.proto.logs.v1.ScopeLogs.decode(i,i.uint32()));break}case 3:{c.schemaUrl=i.string();break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.resource!=null&&i.hasOwnProperty("resource")){var n=d.opentelemetry.proto.resource.v1.Resource.verify(i.resource);if(n)return"resource."+n}if(i.scopeLogs!=null&&i.hasOwnProperty("scopeLogs")){if(!Array.isArray(i.scopeLogs))return"scopeLogs: array expected";for(var l=0;l>>3){case 1:{c.scope=d.opentelemetry.proto.common.v1.InstrumentationScope.decode(i,i.uint32());break}case 2:{c.logRecords&&c.logRecords.length||(c.logRecords=[]),c.logRecords.push(d.opentelemetry.proto.logs.v1.LogRecord.decode(i,i.uint32()));break}case 3:{c.schemaUrl=i.string();break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.scope!=null&&i.hasOwnProperty("scope")){var n=d.opentelemetry.proto.common.v1.InstrumentationScope.verify(i.scope);if(n)return"scope."+n}if(i.logRecords!=null&&i.hasOwnProperty("logRecords")){if(!Array.isArray(i.logRecords))return"logRecords: array expected";for(var l=0;l>>3){case 1:{c.timeUnixNano=i.fixed64();break}case 11:{c.observedTimeUnixNano=i.fixed64();break}case 2:{c.severityNumber=i.int32();break}case 3:{c.severityText=i.string();break}case 5:{c.body=d.opentelemetry.proto.common.v1.AnyValue.decode(i,i.uint32());break}case 6:{c.attributes&&c.attributes.length||(c.attributes=[]),c.attributes.push(d.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break}case 7:{c.droppedAttributesCount=i.uint32();break}case 8:{c.flags=i.fixed32();break}case 9:{c.traceId=i.bytes();break}case 10:{c.spanId=i.bytes();break}default:i.skipType(u&7);break}}return c},s.decodeDelimited=function(i){return i instanceof g||(i=new g(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.timeUnixNano!=null&&i.hasOwnProperty("timeUnixNano")&&!h.isInteger(i.timeUnixNano)&&!(i.timeUnixNano&&h.isInteger(i.timeUnixNano.low)&&h.isInteger(i.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(i.observedTimeUnixNano!=null&&i.hasOwnProperty("observedTimeUnixNano")&&!h.isInteger(i.observedTimeUnixNano)&&!(i.observedTimeUnixNano&&h.isInteger(i.observedTimeUnixNano.low)&&h.isInteger(i.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected";if(i.severityNumber!=null&&i.hasOwnProperty("severityNumber"))switch(i.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(i.severityText!=null&&i.hasOwnProperty("severityText")&&!h.isString(i.severityText))return"severityText: string expected";if(i.body!=null&&i.hasOwnProperty("body")){var n=d.opentelemetry.proto.common.v1.AnyValue.verify(i.body);if(n)return"body."+n}if(i.attributes!=null&&i.hasOwnProperty("attributes")){if(!Array.isArray(i.attributes))return"attributes: array expected";for(var l=0;l>>0,i.timeUnixNano.high>>>0).toNumber())),i.observedTimeUnixNano!=null&&(h.Long?(n.observedTimeUnixNano=h.Long.fromValue(i.observedTimeUnixNano)).unsigned=!1:typeof i.observedTimeUnixNano=="string"?n.observedTimeUnixNano=parseInt(i.observedTimeUnixNano,10):typeof i.observedTimeUnixNano=="number"?n.observedTimeUnixNano=i.observedTimeUnixNano:typeof i.observedTimeUnixNano=="object"&&(n.observedTimeUnixNano=new h.LongBits(i.observedTimeUnixNano.low>>>0,i.observedTimeUnixNano.high>>>0).toNumber())),i.severityNumber){default:if(typeof i.severityNumber=="number"){n.severityNumber=i.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:n.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:n.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:n.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:n.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:n.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:n.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:n.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:n.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:n.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:n.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:n.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:n.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:n.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:n.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:n.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:n.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:n.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:n.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:n.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:n.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:n.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:n.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:n.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:n.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:n.severityNumber=24;break}if(i.severityText!=null&&(n.severityText=String(i.severityText)),i.body!=null){if(typeof i.body!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");n.body=d.opentelemetry.proto.common.v1.AnyValue.fromObject(i.body)}if(i.attributes){if(!Array.isArray(i.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");n.attributes=[];for(var l=0;l>>0),i.flags!=null&&(n.flags=i.flags>>>0),i.traceId!=null&&(typeof i.traceId=="string"?h.base64.decode(i.traceId,n.traceId=h.newBuffer(h.base64.length(i.traceId)),0):i.traceId.length>=0&&(n.traceId=i.traceId)),i.spanId!=null&&(typeof i.spanId=="string"?h.base64.decode(i.spanId,n.spanId=h.newBuffer(h.base64.length(i.spanId)),0):i.spanId.length>=0&&(n.spanId=i.spanId)),n},s.toObject=function(i,n){n||(n={});var l={};if((n.arrays||n.defaults)&&(l.attributes=[]),n.defaults){if(h.Long){var c=new h.Long(0,0,!1);l.timeUnixNano=n.longs===String?c.toString():n.longs===Number?c.toNumber():c}else l.timeUnixNano=n.longs===String?"0":0;if(l.severityNumber=n.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,l.severityText="",l.body=null,l.droppedAttributesCount=0,l.flags=0,n.bytes===String?l.traceId="":(l.traceId=[],n.bytes!==Array&&(l.traceId=h.newBuffer(l.traceId))),n.bytes===String?l.spanId="":(l.spanId=[],n.bytes!==Array&&(l.spanId=h.newBuffer(l.spanId))),h.Long){var c=new h.Long(0,0,!1);l.observedTimeUnixNano=n.longs===String?c.toString():n.longs===Number?c.toNumber():c}else l.observedTimeUnixNano=n.longs===String?"0":0}if(i.timeUnixNano!=null&&i.hasOwnProperty("timeUnixNano")&&(typeof i.timeUnixNano=="number"?l.timeUnixNano=n.longs===String?String(i.timeUnixNano):i.timeUnixNano:l.timeUnixNano=n.longs===String?h.Long.prototype.toString.call(i.timeUnixNano):n.longs===Number?new h.LongBits(i.timeUnixNano.low>>>0,i.timeUnixNano.high>>>0).toNumber():i.timeUnixNano),i.severityNumber!=null&&i.hasOwnProperty("severityNumber")&&(l.severityNumber=n.enums===String?d.opentelemetry.proto.logs.v1.SeverityNumber[i.severityNumber]===void 0?i.severityNumber:d.opentelemetry.proto.logs.v1.SeverityNumber[i.severityNumber]:i.severityNumber),i.severityText!=null&&i.hasOwnProperty("severityText")&&(l.severityText=i.severityText),i.body!=null&&i.hasOwnProperty("body")&&(l.body=d.opentelemetry.proto.common.v1.AnyValue.toObject(i.body,n)),i.attributes&&i.attributes.length){l.attributes=[];for(var u=0;u>>0,i.observedTimeUnixNano.high>>>0).toNumber():i.observedTimeUnixNano),l},s.prototype.toJSON=function(){return this.constructor.toObject(this,X.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.logs.v1.LogRecord"},s})(),o})(),t})(),e})(),r})();WG.exports=d});var eo,gle,vle,yle,Ole,Ale,Rle,Ah,QG,Rh,ZG=p(()=>{eo=Nn(JG());_h();Eh();mh();gle=eo.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,vle=eo.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,yle=eo.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,Ole=eo.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,Ale=eo.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,Rle=eo.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,Ah={serializeRequest:r=>{let e=Xs(r);return vle.encode(e).finish()},deserializeResponse:r=>gle.decode(r)},QG={serializeRequest:r=>{let e=$s([r]);return Ole.encode(e).finish()},deserializeResponse:r=>yle.decode(r)},Rh={serializeRequest:r=>{let e=Ks(r);return Rle.encode(e).finish()},deserializeResponse:r=>Ale.decode(r)}});var Nh,e3,Ch,t3=p(()=>{_h();Eh();mh();Nh={serializeRequest:r=>{let e=Ks(r,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:r=>{let e=new TextDecoder;return JSON.parse(e.decode(r))}},e3={serializeRequest:r=>{let e=$s([r],{useLongBits:!1});return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:r=>{let e=new TextDecoder;return JSON.parse(e.decode(r))}},Ch={serializeRequest:r=>{let e=Xs(r,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:r=>{let e=new TextDecoder;return JSON.parse(e.decode(r))}}});var av={};Ae(av,{ESpanKind:()=>fh,JsonLogsSerializer:()=>Ch,JsonMetricsSerializer:()=>e3,JsonTraceSerializer:()=>Nh,ProtobufLogsSerializer:()=>Ah,ProtobufMetricsSerializer:()=>QG,ProtobufTraceSerializer:()=>Rh,createExportLogsServiceRequest:()=>Xs,createExportMetricsServiceRequest:()=>$s,createExportTraceServiceRequest:()=>Ks,encodeAsLongBits:()=>uh,encodeAsString:()=>jg,getOtlpEncoder:()=>Kn,hrTimeToNanos:()=>ch,toLongBits:()=>qg});var to=p(()=>{Ec();QF();_h();Eh();mh();ZG();t3()});var r3,n3=p(()=>{r3="0.56.0"});function i3(r){var e=[429,502,503,504];return e.includes(r)}function o3(r){if(r!=null){var e=Number.parseInt(r,10);if(Number.isInteger(e))return e>0?e*1e3:-1;var t=new Date(r).getTime()-Date.now();return t>=0?t:0}}var s3=p(()=>{});var c3={};Ae(c3,{compressAndSend:()=>l3,createHttpAgent:()=>Ile,sendWithHttp:()=>Cle});import*as Ph from"http";import*as Ih from"https";import*as a3 from"zlib";import{Readable as Nle}from"stream";function Cle(r,e,t,o,s){var a=new URL(r.url),i=Number(process.versions.node.split(".")[0]),n={hostname:a.hostname,port:a.port,path:a.pathname,method:"POST",headers:lv({},r.headers()),agent:e},l=a.protocol==="http:"?Ph.request:Ih.request,c=l(n,function(f){var _=[];f.on("data",function(m){return _.push(m)}),f.on("end",function(){if(f.statusCode&&f.statusCode<299)o({status:"success",data:Buffer.concat(_)});else if(f.statusCode&&i3(f.statusCode))o({status:"retryable",retryInMillis:o3(f.headers["retry-after"])});else{var m=new Ji(f.statusMessage,f.statusCode,Buffer.concat(_).toString());o({status:"failure",error:m})}})});c.setTimeout(s,function(){c.destroy(),o({status:"failure",error:new Error("Request Timeout")})}),c.on("error",function(f){o({status:"failure",error:f})});var u=i>=14?"close":"abort";c.on(u,function(){o({status:"failure",error:new Error("Request timed out")})}),l3(c,r.compression,t,function(f){o({status:"failure",error:f})})}function l3(r,e,t,o){var s=Ple(t);e==="gzip"&&(r.setHeader("Content-Encoding","gzip"),s=s.on("error",o).pipe(a3.createGzip()).on("error",o)),s.pipe(r).on("error",o)}function Ple(r){var e=new Nle;return e.push(r),e.push(null),e}function Ile(r,e){var t=new URL(r),o=t.protocol==="http:"?Ph.Agent:Ih.Agent;return new o(e)}var lv,u3=p(()=>{s3();rh();lv=function(){return lv=Object.assign||function(r){for(var e,t=1,o=arguments.length;t{ble=function(r,e,t,o){function s(a){return a instanceof t?a:new t(function(i){i(a)})}return new(t||(t=Promise))(function(a,i){function n(u){try{c(o.next(u))}catch(f){i(f)}}function l(u){try{c(o.throw(u))}catch(f){i(f)}}function c(u){u.done?a(u.value):s(u.value).then(n,l)}c((o=o.apply(r,e||[])).next())})},Lle=function(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,s,a,i;return i={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function n(c){return function(u){return l([c,u])}}function l(c){if(o)throw new TypeError("Generator is already executing.");for(;t;)try{if(o=1,s&&(a=c[0]&2?s.return:c[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,c[1])).done)return a;switch(s=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,s=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]{Mle=function(r,e,t,o){function s(a){return a instanceof t?a:new t(function(i){i(a)})}return new(t||(t=Promise))(function(a,i){function n(u){try{c(o.next(u))}catch(f){i(f)}}function l(u){try{c(o.throw(u))}catch(f){i(f)}}function c(u){u.done?a(u.value):s(u.value).then(n,l)}c((o=o.apply(r,e||[])).next())})},wle=function(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,s,a,i;return i={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function n(c){return function(u){return l([c,u])}}function l(c){if(o)throw new TypeError("Generator is already executing.");for(;t;)try{if(o=1,s&&(a=c[0]&2?s.return:c[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,c[1])).done)return a;switch(s=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,s=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]0?(i--,l=Math.max(Math.min(n,kle)+Vle(),0),n=n*Ble,c=(o=a.retryInMillis)!==null&&o!==void 0?o:l,u=s-Date.now(),c>u?[2,a]:[4,this.retry(e,u,c)]):[3,4];case 3:return a=f.sent(),[3,2];case 4:return[2,a]}})})},r.prototype.shutdown=function(){return this._transport.shutdown()},r})()});function Hr(r,e){return lh({transport:h3({transport:f3(r)}),serializer:e,promiseHandler:ah(r)},{timeout:r.timeoutMillis})}var E3=p(()=>{Gg();p3();Bg();_3()});function m3(r){var e,t=(e=process.env[r])===null||e===void 0?void 0:e.trim();if(t!=null&&t!==""){var o=Number(t);if(!Number.isNaN(o)&&Number.isFinite(o)&&o>0)return o;S.warn("Configuration: "+r+" is invalid, expected number greater than 0 (actual: "+t+")")}}function Gle(r){var e=m3("OTEL_EXPORTER_OTLP_"+r+"_TIMEOUT"),t=m3("OTEL_EXPORTER_OTLP_TIMEOUT");return e??t}function T3(r){var e,t=(e=process.env[r])===null||e===void 0?void 0:e.trim();if(t!==""){if(t==null||t==="none"||t==="gzip")return t;S.warn("Configuration: "+r+" is invalid, expected 'none' or 'gzip' (actual: '"+t+"')")}}function Hle(r){var e=T3("OTEL_EXPORTER_OTLP_"+r+"_COMPRESSION"),t=T3("OTEL_EXPORTER_OTLP_COMPRESSION");return e??t}function bh(r){return{timeoutMillis:Gle(r),compression:Hle(r)}}var cv=p(()=>{P()});function S3(r){return function(){var e,t={};return Object.entries((e=r==null?void 0:r())!==null&&e!==void 0?e:{}).forEach(function(o){var s=qle(o,2),a=s[0],i=s[1];typeof i<"u"?t[a]=String(i):S.warn('Header "'+a+'" has invalid value ('+i+") and will be ignored")}),t}}var qle,g3=p(()=>{P();qle=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var o=t.call(r),s,a=[],i;try{for(;(e===void 0||e-- >0)&&!(s=o.next()).done;)a.push(s.value)}catch(n){i={error:n}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return a}});function jle(r,e,t){var o=ro({},t()),s={};return function(){return e!=null&&Object.assign(s,e()),r!=null&&Object.assign(s,r()),Object.assign(s,o)}}function Yle(r){if(r!=null)try{return new URL(r),r}catch{throw new Error("Configuration: Could not parse user-provided export URL: '"+r+"'")}}function v3(r,e,t){var o,s,a,i;return ro(ro({},ih(r,e,t)),{headers:jle(S3(r.headers),e.headers,t.headers),url:(s=(o=Yle(r.url))!==null&&o!==void 0?o:e.url)!==null&&s!==void 0?s:t.url,agentOptions:(i=(a=r.agentOptions)!==null&&a!==void 0?a:e.agentOptions)!==null&&i!==void 0?i:t.agentOptions})}function y3(r,e){return ro(ro({},oh()),{headers:function(){return r},url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}})}var ro,O3=p(()=>{pc();g3();ro=function(){return ro=Object.assign||function(r){for(var e,t=1,o=arguments.length;t{Fg();P();cv();pc();Lh=function(){return Lh=Object.assign||function(r){for(var e,t=1,o=arguments.length;t{O3();R3();P();pc()});var C3={};Ae(C3,{convertLegacyHttpOptions:()=>qr,createOtlpHttpExportDelegate:()=>Hr,getSharedConfigurationFromEnvironment:()=>bh});var Js=p(()=>{E3();cv();N3()});var Qs,P3=p(()=>{_n();to();n3();Js();Qs=class extends Br{constructor(e={}){super(Hr(qr(e,"LOGS","v1/logs",{"User-Agent":`OTel-OTLP-Exporter-JavaScript/${r3}`,"Content-Type":"application/json"}),Ch))}}});var I3=p(()=>{P3()});var b3=p(()=>{I3()});var L3={};Ae(L3,{OTLPLogExporter:()=>Qs});var x3=p(()=>{b3()});var ue=T(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=tr.DEFAULT_MAX_SEND_MESSAGE_LENGTH=tr.Propagate=tr.LogVerbosity=tr.Status=void 0;var M3;(function(r){r[r.OK=0]="OK",r[r.CANCELLED=1]="CANCELLED",r[r.UNKNOWN=2]="UNKNOWN",r[r.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",r[r.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",r[r.NOT_FOUND=5]="NOT_FOUND",r[r.ALREADY_EXISTS=6]="ALREADY_EXISTS",r[r.PERMISSION_DENIED=7]="PERMISSION_DENIED",r[r.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",r[r.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",r[r.ABORTED=10]="ABORTED",r[r.OUT_OF_RANGE=11]="OUT_OF_RANGE",r[r.UNIMPLEMENTED=12]="UNIMPLEMENTED",r[r.INTERNAL=13]="INTERNAL",r[r.UNAVAILABLE=14]="UNAVAILABLE",r[r.DATA_LOSS=15]="DATA_LOSS",r[r.UNAUTHENTICATED=16]="UNAUTHENTICATED"})(M3||(tr.Status=M3={}));var w3;(function(r){r[r.DEBUG=0]="DEBUG",r[r.INFO=1]="INFO",r[r.ERROR=2]="ERROR",r[r.NONE=3]="NONE"})(w3||(tr.LogVerbosity=w3={}));var D3;(function(r){r[r.DEADLINE=1]="DEADLINE",r[r.CENSUS_STATS_CONTEXT=2]="CENSUS_STATS_CONTEXT",r[r.CENSUS_TRACING_CONTEXT=4]="CENSUS_TRACING_CONTEXT",r[r.CANCELLATION=8]="CANCELLATION",r[r.DEFAULTS=65535]="DEFAULTS"})(D3||(tr.Propagate=D3={}));tr.DEFAULT_MAX_SEND_MESSAGE_LENGTH=-1;tr.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=4*1024*1024});var uv=T((P2e,Qle)=>{Qle.exports={name:"@grpc/grpc-js",version:"1.13.4",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:{"@grpc/proto-loader":"file:../proto-loader","@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 Pe=T(Bt=>{"use strict";var fv,pv,dv,hv;Object.defineProperty(Bt,"__esModule",{value:!0});Bt.log=Bt.setLoggerVerbosity=Bt.setLogger=Bt.getLogger=void 0;Bt.trace=cce;Bt.isTracerEnabled=k3;var Wn=ue(),Zle=V("process"),ece=uv().version,tce={error:(r,...e)=>{console.error("E "+r,...e)},info:(r,...e)=>{console.error("I "+r,...e)},debug:(r,...e)=>{console.error("D "+r,...e)}},no=tce,Zs=Wn.LogVerbosity.ERROR,rce=(pv=(fv=process.env.GRPC_NODE_VERBOSITY)!==null&&fv!==void 0?fv:process.env.GRPC_VERBOSITY)!==null&&pv!==void 0?pv:"";switch(rce.toUpperCase()){case"DEBUG":Zs=Wn.LogVerbosity.DEBUG;break;case"INFO":Zs=Wn.LogVerbosity.INFO;break;case"ERROR":Zs=Wn.LogVerbosity.ERROR;break;case"NONE":Zs=Wn.LogVerbosity.NONE;break;default:}var nce=()=>no;Bt.getLogger=nce;var ice=r=>{no=r};Bt.setLogger=ice;var oce=r=>{Zs=r};Bt.setLoggerVerbosity=oce;var sce=(r,...e)=>{let t;if(r>=Zs){switch(r){case Wn.LogVerbosity.DEBUG:t=no.debug;break;case Wn.LogVerbosity.INFO:t=no.info;break;case Wn.LogVerbosity.ERROR:t=no.error;break}t||(t=no.error),t&&t.bind(no)(...e)}};Bt.log=sce;var ace=(hv=(dv=process.env.GRPC_NODE_TRACE)!==null&&dv!==void 0?dv:process.env.GRPC_TRACE)!==null&&hv!==void 0?hv:"",_v=new Set,U3=new Set;for(let r of ace.split(","))r.startsWith("-")?U3.add(r.substring(1)):_v.add(r);var lce=_v.has("all");function cce(r,e,t){k3(e)&&(0,Bt.log)(r,new Date().toISOString()+" | v"+ece+" "+Zle.pid+" | "+e+" | "+t)}function k3(r){return!U3.has(r)&&(lce||_v.has(r))}});var Mh=T(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});xh.getErrorMessage=uce;xh.getErrorCode=fce;function uce(r){return r instanceof Error?r.message:String(r)}function fce(r){return typeof r=="object"&&r!==null&&"code"in r&&typeof r.code=="number"?r.code:null}});var ht=T(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});Dh.Metadata=void 0;var pce=Pe(),dce=ue(),hce=Mh(),_ce=/^[0-9a-z_.-]+$/,Ece=/^[ -~]*$/;function mce(r){return _ce.test(r)}function Tce(r){return Ece.test(r)}function V3(r){return r.endsWith("-bin")}function Sce(r){return!r.startsWith("grpc-")}function wh(r){return r.toLowerCase()}function B3(r,e){if(!mce(r))throw new Error('Metadata key "'+r+'" contains illegal characters');if(e!=null)if(V3(r)){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(!Tce(e))throw new Error('Metadata string value "'+e+'" contains illegal characters')}}var Ev=class r{constructor(e={}){this.internalRepr=new Map,this.options=e}set(e,t){e=wh(e),B3(e,t),this.internalRepr.set(e,[t])}add(e,t){e=wh(e),B3(e,t);let o=this.internalRepr.get(e);o===void 0?this.internalRepr.set(e,[t]):o.push(t)}remove(e){e=wh(e),this.internalRepr.delete(e)}get(e){return e=wh(e),this.internalRepr.get(e)||[]}getMap(){let e={};for(let[t,o]of this.internalRepr)if(o.length>0){let s=o[0];e[t]=Buffer.isBuffer(s)?Buffer.from(s):s}return e}clone(){let e=new r(this.options),t=e.internalRepr;for(let[o,s]of this.internalRepr){let a=s.map(i=>Buffer.isBuffer(i)?Buffer.from(i):i);t.set(o,a)}return e}merge(e){for(let[t,o]of e.internalRepr){let s=(this.internalRepr.get(t)||[]).concat(o);this.internalRepr.set(t,s)}}setOptions(e){this.options=e}getOptions(){return this.options}toHttp2Headers(){let e={};for(let[t,o]of this.internalRepr)e[t]=o.map(gce);return e}toJSON(){let e={};for(let[t,o]of this.internalRepr)e[t]=o;return e}static fromHttp2Headers(e){let t=new r;for(let o of Object.keys(e)){if(o.charAt(0)===":")continue;let s=e[o];try{V3(o)?Array.isArray(s)?s.forEach(a=>{t.add(o,Buffer.from(a,"base64"))}):s!==void 0&&(Sce(o)?s.split(",").forEach(a=>{t.add(o,Buffer.from(a.trim(),"base64"))}):t.add(o,Buffer.from(s,"base64"))):Array.isArray(s)?s.forEach(a=>{t.add(o,a)}):s!==void 0&&t.add(o,s)}catch(a){let i=`Failed to add metadata entry ${o}: ${s}. ${(0,hce.getErrorMessage)(a)}. For more information see https://github.com/grpc/grpc-node/issues/1173`;(0,pce.log)(dce.LogVerbosity.ERROR,i)}}return t}};Dh.Metadata=Ev;var gce=r=>Buffer.isBuffer(r)?r.toString("base64"):r});var kh=T(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});Uh.CallCredentials=void 0;var gv=ht();function vce(r){return"getRequestHeaders"in r&&typeof r.getRequestHeaders=="function"}var ea=class r{static createFromMetadataGenerator(e){return new Tv(e)}static createFromGoogleCredential(e){return r.createFromMetadataGenerator((t,o)=>{let s;vce(e)?s=e.getRequestHeaders(t.service_url):s=new Promise((a,i)=>{e.getRequestMetadata(t.service_url,(n,l)=>{if(n){i(n);return}if(!l){i(new Error("Headers not set by metadata plugin"));return}a(l)})}),s.then(a=>{let i=new gv.Metadata;for(let n of Object.keys(a))i.add(n,a[n]);o(null,i)},a=>{o(a)})})}static createEmpty(){return new Sv}};Uh.CallCredentials=ea;var mv=class r extends ea{constructor(e){super(),this.creds=e}async generateMetadata(e){let t=new gv.Metadata,o=await Promise.all(this.creds.map(s=>s.generateMetadata(e)));for(let s of o)t.merge(s);return t}compose(e){return new r(this.creds.concat([e]))}_equals(e){return this===e?!0:e instanceof r?this.creds.every((t,o)=>t._equals(e.creds[o])):!1}},Tv=class r extends ea{constructor(e){super(),this.metadataGenerator=e}generateMetadata(e){return new Promise((t,o)=>{this.metadataGenerator(e,(s,a)=>{a!==void 0?t(a):o(s)})})}compose(e){return new mv([this,e])}_equals(e){return this===e?!0:e instanceof r?this.metadataGenerator===e.metadataGenerator:!1}},Sv=class r extends ea{generateMetadata(e){return Promise.resolve(new gv.Metadata)}compose(e){return e}_equals(e){return e instanceof r}}});var yv=T(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});gc.CIPHER_SUITES=void 0;gc.getDefaultRootsData=Oce;var yce=V("fs");gc.CIPHER_SUITES=process.env.GRPC_SSL_CIPHER_SUITES;var F3=process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH,vv=null;function Oce(){return F3?(vv===null&&(vv=yce.readFileSync(F3)),vv):null}});var Pt=T(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.parseUri=Rce;ta.splitHostPort=Nce;ta.combineHostPort=Cce;ta.uriToString=Pce;var Ace=/^(?:([A-Za-z0-9+.-]+):)?(?:\/\/([^/]*)\/)?(.+)$/;function Rce(r){let e=Ace.exec(r);return e===null?null:{scheme:e[1],authority:e[2],path:e[3]}}var G3=/^\d+$/;function Nce(r){if(r.startsWith("[")){let e=r.indexOf("]");if(e===-1)return null;let t=r.substring(1,e);if(t.indexOf(":")===-1)return null;if(r.length>e+1)if(r[e+1]===":"){let o=r.substring(e+2);return G3.test(o)?{host:t,port:+o}:null}else return null;else return{host:t}}else{let e=r.split(":");return e.length===2?G3.test(e[1])?{host:e[0],port:+e[1]}:null:{host:r}}}function Cce(r){return r.port===void 0?r.host:r.host.includes(":")?`[${r.host}]:${r.port}`:`${r.host}:${r.port}`}function Pce(r){let e="";return r.scheme!==void 0&&(e+=r.scheme+":"),r.authority!==void 0&&(e+="//"+r.authority+"/"),e+=r.path,e}});var jr=T(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.registerResolver=Ice;io.registerDefaultScheme=bce;io.createResolver=Lce;io.getDefaultAuthority=xce;io.mapUriDefaultScheme=Mce;var Av=Pt(),ra={},Ov=null;function Ice(r,e){ra[r]=e}function bce(r){Ov=r}function Lce(r,e,t){if(r.scheme!==void 0&&r.scheme in ra)return new ra[r.scheme](r,e,t);throw new Error(`No resolver could be created for target ${(0,Av.uriToString)(r)}`)}function xce(r){if(r.scheme!==void 0&&r.scheme in ra)return ra[r.scheme].getDefaultAuthority(r);throw new Error(`Invalid target ${(0,Av.uriToString)(r)}`)}function Mce(r){return r.scheme===void 0||!(r.scheme in ra)?Ov!==null?{scheme:Ov,authority:void 0,path:(0,Av.uriToString)(r)}:null:r}});var Oc=T(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});yc.ChannelCredentials=void 0;yc.createCertificateProviderChannelCredentials=kce;var vc=V("tls"),Fh=kh(),Nv=yv(),H3=Pt(),wce=jr(),Dce=Pe(),Uce=ue();function Rv(r,e){if(r&&!(r instanceof Buffer))throw new TypeError(`${e}, if provided, must be a Buffer.`)}var oo=class{compose(e){return new Iv(this,e)}static createSsl(e,t,o,s){var a;if(Rv(e,"Root certificate"),Rv(t,"Private key"),Rv(o,"Certificate chain"),t&&!o)throw new Error("Private key must be given with accompanying certificate chain");if(!t&&o)throw new Error("Certificate chain must be given with accompanying private key");let i=(0,vc.createSecureContext)({ca:(a=e??(0,Nv.getDefaultRootsData)())!==null&&a!==void 0?a:void 0,key:t??void 0,cert:o??void 0,ciphers:Nv.CIPHER_SUITES});return new Bh(i,s??{})}static createFromSecureContext(e,t){return new Bh(e,t??{})}static createInsecure(){return new Cv}};yc.ChannelCredentials=oo;var Cv=class r extends oo{constructor(){super()}compose(e){throw new Error("Cannot compose insecure credentials")}_isSecure(){return!1}_equals(e){return e instanceof r}_createSecureConnector(e,t,o){return{connect(s){return Promise.resolve({socket:s,secure:!1})},waitForReady:()=>Promise.resolve(),getCallCredentials:()=>o??Fh.CallCredentials.createEmpty(),destroy(){}}}};function q3(r,e,t,o){var s,a;let i={secureContext:r},n=t;if("grpc.http_connect_target"in o){let f=(0,H3.parseUri)(o["grpc.http_connect_target"]);f&&(n=f)}let l=(0,wce.getDefaultAuthority)(n),c=(0,H3.splitHostPort)(l),u=(s=c==null?void 0:c.host)!==null&&s!==void 0?s:l;if(i.host=u,e.checkServerIdentity&&(i.checkServerIdentity=e.checkServerIdentity),e.rejectUnauthorized!==void 0&&(i.rejectUnauthorized=e.rejectUnauthorized),i.ALPNProtocols=["h2"],o["grpc.ssl_target_name_override"]){let f=o["grpc.ssl_target_name_override"],_=(a=i.checkServerIdentity)!==null&&a!==void 0?a:vc.checkServerIdentity;i.checkServerIdentity=(m,O)=>_(f,O),i.servername=f}else i.servername=u;return o["grpc-node.tls_enable_trace"]&&(i.enableTrace=!0),i}var Pv=class{constructor(e,t){this.connectionOptions=e,this.callCredentials=t}connect(e){let t=Object.assign({socket:e},this.connectionOptions);return new Promise((o,s)=>{let a=(0,vc.connect)(t,()=>{var i;if((!((i=this.connectionOptions.rejectUnauthorized)!==null&&i!==void 0)||i)&&!a.authorized){s(a.authorizationError);return}o({socket:a,secure:!0})});a.on("error",i=>{s(i)})})}waitForReady(){return Promise.resolve()}getCallCredentials(){return this.callCredentials}destroy(){}},Bh=class r extends oo{constructor(e,t){super(),this.secureContext=e,this.verifyOptions=t}_isSecure(){return!0}_equals(e){return this===e?!0:e instanceof r?this.secureContext===e.secureContext&&this.verifyOptions.checkServerIdentity===e.verifyOptions.checkServerIdentity:!1}_createSecureConnector(e,t,o){let s=q3(this.secureContext,this.verifyOptions,e,t);return new Pv(s,o??Fh.CallCredentials.createEmpty())}},Vh=class r extends oo{constructor(e,t,o){super(),this.caCertificateProvider=e,this.identityCertificateProvider=t,this.verifyOptions=o,this.refcount=0,this.latestCaUpdate=void 0,this.latestIdentityUpdate=void 0,this.caCertificateUpdateListener=this.handleCaCertificateUpdate.bind(this),this.identityCertificateUpdateListener=this.handleIdentityCertitificateUpdate.bind(this),this.secureContextWatchers=[]}_isSecure(){return!0}_equals(e){var t,o;return this===e?!0:e instanceof r?this.caCertificateProvider===e.caCertificateProvider&&this.identityCertificateProvider===e.identityCertificateProvider&&((t=this.verifyOptions)===null||t===void 0?void 0:t.checkServerIdentity)===((o=e.verifyOptions)===null||o===void 0?void 0:o.checkServerIdentity):!1}ref(){var e;this.refcount===0&&(this.caCertificateProvider.addCaCertificateListener(this.caCertificateUpdateListener),(e=this.identityCertificateProvider)===null||e===void 0||e.addIdentityCertificateListener(this.identityCertificateUpdateListener)),this.refcount+=1}unref(){var e;this.refcount-=1,this.refcount===0&&(this.caCertificateProvider.removeCaCertificateListener(this.caCertificateUpdateListener),(e=this.identityCertificateProvider)===null||e===void 0||e.removeIdentityCertificateListener(this.identityCertificateUpdateListener))}_createSecureConnector(e,t,o){return this.ref(),new r.SecureConnectorImpl(this,e,t,o??Fh.CallCredentials.createEmpty())}maybeUpdateWatchers(){if(this.hasReceivedUpdates()){for(let e of this.secureContextWatchers)e(this.getLatestSecureContext());this.secureContextWatchers=[]}}handleCaCertificateUpdate(e){this.latestCaUpdate=e,this.maybeUpdateWatchers()}handleIdentityCertitificateUpdate(e){this.latestIdentityUpdate=e,this.maybeUpdateWatchers()}hasReceivedUpdates(){return!(this.latestCaUpdate===void 0||this.identityCertificateProvider&&this.latestIdentityUpdate===void 0)}getSecureContext(){return this.hasReceivedUpdates()?Promise.resolve(this.getLatestSecureContext()):new Promise(e=>{this.secureContextWatchers.push(e)})}getLatestSecureContext(){var e,t;if(!this.latestCaUpdate||this.identityCertificateProvider!==null&&!this.latestIdentityUpdate)return null;try{return(0,vc.createSecureContext)({ca:this.latestCaUpdate.caCertificate,key:(e=this.latestIdentityUpdate)===null||e===void 0?void 0:e.privateKey,cert:(t=this.latestIdentityUpdate)===null||t===void 0?void 0:t.certificate,ciphers:Nv.CIPHER_SUITES})}catch(o){return(0,Dce.log)(Uce.LogVerbosity.ERROR,"Failed to createSecureContext with error "+o.message),null}}};Vh.SecureConnectorImpl=class{constructor(r,e,t,o){this.parent=r,this.channelTarget=e,this.options=t,this.callCredentials=o}connect(r){return new Promise((e,t)=>{let o=this.parent.getLatestSecureContext();if(!o){t(new Error("Failed to load credentials"));return}r.closed&&t(new Error("Socket closed while loading credentials"));let s=q3(o,this.parent.verifyOptions,this.channelTarget,this.options),a=Object.assign({socket:r},s),i=()=>{t(new Error("Socket closed"))},n=c=>{t(c)},l=(0,vc.connect)(a,()=>{var c;if(l.removeListener("close",i),l.removeListener("error",n),(!((c=this.parent.verifyOptions.rejectUnauthorized)!==null&&c!==void 0)||c)&&!l.authorized){t(l.authorizationError);return}e({socket:l,secure:!0})});l.once("close",i),l.once("error",n)})}async waitForReady(){await this.parent.getSecureContext()}getCallCredentials(){return this.callCredentials}destroy(){this.parent.unref()}};function kce(r,e,t){return new Vh(r,e,t??{})}var Iv=class r extends oo{constructor(e,t){if(super(),this.channelCredentials=e,this.callCredentials=t,!e._isSecure())throw new Error("Cannot compose insecure credentials")}compose(e){let t=this.callCredentials.compose(e);return new r(this.channelCredentials,t)}_isSecure(){return!0}_equals(e){return this===e?!0:e instanceof r?this.channelCredentials._equals(e.channelCredentials)&&this.callCredentials._equals(e.callCredentials):!1}_createSecureConnector(e,t,o){let s=this.callCredentials.compose(o??Fh.CallCredentials.createEmpty());return this.channelCredentials._createSecureConnector(e,t,s)}}});var so=T(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.createChildChannelControlHelper=Fce;Yr.registerLoadBalancerType=Gce;Yr.registerDefaultLoadBalancerType=Hce;Yr.createLoadBalancer=qce;Yr.isLoadBalancerNameRegistered=jce;Yr.parseLoadBalancingConfig=j3;Yr.getDefaultConfig=Yce;Yr.selectLbConfigFromList=zce;var Bce=Pe(),Vce=ue();function Fce(r,e){var t,o,s,a,i,n,l,c,u,f;return{createSubchannel:(o=(t=e.createSubchannel)===null||t===void 0?void 0:t.bind(e))!==null&&o!==void 0?o:r.createSubchannel.bind(r),updateState:(a=(s=e.updateState)===null||s===void 0?void 0:s.bind(e))!==null&&a!==void 0?a:r.updateState.bind(r),requestReresolution:(n=(i=e.requestReresolution)===null||i===void 0?void 0:i.bind(e))!==null&&n!==void 0?n:r.requestReresolution.bind(r),addChannelzChild:(c=(l=e.addChannelzChild)===null||l===void 0?void 0:l.bind(e))!==null&&c!==void 0?c:r.addChannelzChild.bind(r),removeChannelzChild:(f=(u=e.removeChannelzChild)===null||u===void 0?void 0:u.bind(e))!==null&&f!==void 0?f:r.removeChannelzChild.bind(r)}}var Jn={},Ac=null;function Gce(r,e,t){Jn[r]={LoadBalancer:e,LoadBalancingConfig:t}}function Hce(r){Ac=r}function qce(r,e){let t=r.getLoadBalancerName();return t in Jn?new Jn[t].LoadBalancer(e):null}function jce(r){return r in Jn}function j3(r){let e=Object.keys(r);if(e.length!==1)throw new Error("Provided load balancing config has multiple conflicting entries");let t=e[0];if(t in Jn)try{return Jn[t].LoadBalancingConfig.createFromJson(r[t])}catch(o){throw new Error(`${t}: ${o.message}`)}else throw new Error(`Unrecognized load balancing config name ${t}`)}function Yce(){if(!Ac)throw new Error("No default load balancer type registered");return new Jn[Ac].LoadBalancingConfig}function zce(r,e=!1){for(let t of r)try{return j3(t)}catch(o){(0,Bce.log)(Vce.LogVerbosity.DEBUG,"Config parsing failed with error",o.message);continue}return e&&Ac?new Jn[Ac].LoadBalancingConfig:null}});var bv=T(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.validateRetryThrottling=Y3;Rc.validateServiceConfig=z3;Rc.extractAndSelectServiceConfig=rue;var Kce=V("os"),Gh=ue(),Hh=/^\d+(\.\d{1,9})?s$/,$ce="node";function Xce(r){if("service"in r&&r.service!==""){if(typeof r.service!="string")throw new Error(`Invalid method config name: invalid service: expected type string, got ${typeof r.service}`);if("method"in r&&r.method!==""){if(typeof r.method!="string")throw new Error(`Invalid method config name: invalid method: expected type string, got ${typeof r.service}`);return{service:r.service,method:r.method}}else return{service:r.service}}else{if("method"in r&&r.method!==void 0)throw new Error("Invalid method config name: method set with empty or unset service");return{}}}function Wce(r){if(!("maxAttempts"in r)||!Number.isInteger(r.maxAttempts)||r.maxAttempts<2)throw new Error("Invalid method config retry policy: maxAttempts must be an integer at least 2");if(!("initialBackoff"in r)||typeof r.initialBackoff!="string"||!Hh.test(r.initialBackoff))throw new Error("Invalid method config retry policy: initialBackoff must be a string consisting of a positive integer or decimal followed by s");if(!("maxBackoff"in r)||typeof r.maxBackoff!="string"||!Hh.test(r.maxBackoff))throw new Error("Invalid method config retry policy: maxBackoff must be a string consisting of a positive integer or decimal followed by s");if(!("backoffMultiplier"in r)||typeof r.backoffMultiplier!="number"||r.backoffMultiplier<=0)throw new Error("Invalid method config retry policy: backoffMultiplier must be a number greater than 0");if(!("retryableStatusCodes"in r&&Array.isArray(r.retryableStatusCodes)))throw new Error("Invalid method config retry policy: retryableStatusCodes is required");if(r.retryableStatusCodes.length===0)throw new Error("Invalid method config retry policy: retryableStatusCodes must be non-empty");for(let e of r.retryableStatusCodes)if(typeof e=="number"){if(!Object.values(Gh.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(Gh.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:r.maxAttempts,initialBackoff:r.initialBackoff,maxBackoff:r.maxBackoff,backoffMultiplier:r.backoffMultiplier,retryableStatusCodes:r.retryableStatusCodes}}function Jce(r){if(!("maxAttempts"in r)||!Number.isInteger(r.maxAttempts)||r.maxAttempts<2)throw new Error("Invalid method config hedging policy: maxAttempts must be an integer at least 2");if("hedgingDelay"in r&&(typeof r.hedgingDelay!="string"||!Hh.test(r.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 r&&Array.isArray(r.nonFatalStatusCodes))for(let t of r.nonFatalStatusCodes)if(typeof t=="number"){if(!Object.values(Gh.Status).includes(t))throw new Error("Invalid method config hedging policy: nonFatalStatusCodes value not in status code range")}else if(typeof t=="string"){if(!Object.values(Gh.Status).includes(t.toUpperCase()))throw new Error("Invalid method config hedging policy: nonFatalStatusCodes value not a status code name")}else throw new Error("Invalid method config hedging policy: nonFatalStatusCodes value must be a string or number");let e={maxAttempts:r.maxAttempts};return r.hedgingDelay&&(e.hedgingDelay=r.hedgingDelay),r.nonFatalStatusCodes&&(e.nonFatalStatusCodes=r.nonFatalStatusCodes),e}function Qce(r){var e;let t={name:[]};if(!("name"in r)||!Array.isArray(r.name))throw new Error("Invalid method config: invalid name array");for(let o of r.name)t.name.push(Xce(o));if("waitForReady"in r){if(typeof r.waitForReady!="boolean")throw new Error("Invalid method config: invalid waitForReady");t.waitForReady=r.waitForReady}if("timeout"in r)if(typeof r.timeout=="object"){if(!("seconds"in r.timeout)||typeof r.timeout.seconds!="number")throw new Error("Invalid method config: invalid timeout.seconds");if(!("nanos"in r.timeout)||typeof r.timeout.nanos!="number")throw new Error("Invalid method config: invalid timeout.nanos");t.timeout=r.timeout}else if(typeof r.timeout=="string"&&Hh.test(r.timeout)){let o=r.timeout.substring(0,r.timeout.length-1).split(".");t.timeout={seconds:o[0]|0,nanos:((e=o[1])!==null&&e!==void 0?e:0)|0}}else throw new Error("Invalid method config: invalid timeout");if("maxRequestBytes"in r){if(typeof r.maxRequestBytes!="number")throw new Error("Invalid method config: invalid maxRequestBytes");t.maxRequestBytes=r.maxRequestBytes}if("maxResponseBytes"in r){if(typeof r.maxResponseBytes!="number")throw new Error("Invalid method config: invalid maxRequestBytes");t.maxResponseBytes=r.maxResponseBytes}if("retryPolicy"in r){if("hedgingPolicy"in r)throw new Error("Invalid method config: retryPolicy and hedgingPolicy cannot both be specified");t.retryPolicy=Wce(r.retryPolicy)}else"hedgingPolicy"in r&&(t.hedgingPolicy=Jce(r.hedgingPolicy));return t}function Y3(r){if(!("maxTokens"in r)||typeof r.maxTokens!="number"||r.maxTokens<=0||r.maxTokens>1e3)throw new Error("Invalid retryThrottling: maxTokens must be a number in (0, 1000]");if(!("tokenRatio"in r)||typeof r.tokenRatio!="number"||r.tokenRatio<=0)throw new Error("Invalid retryThrottling: tokenRatio must be a number greater than 0");return{maxTokens:+r.maxTokens.toFixed(3),tokenRatio:+r.tokenRatio.toFixed(3)}}function Zce(r){if(!(typeof r=="object"&&r!==null))throw new Error(`Invalid loadBalancingConfig: unexpected type ${typeof r}`);let e=Object.keys(r);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]]:r[e[0]]}}function z3(r){let e={loadBalancingConfig:[],methodConfig:[]};if("loadBalancingPolicy"in r)if(typeof r.loadBalancingPolicy=="string")e.loadBalancingPolicy=r.loadBalancingPolicy;else throw new Error("Invalid service config: invalid loadBalancingPolicy");if("loadBalancingConfig"in r)if(Array.isArray(r.loadBalancingConfig))for(let o of r.loadBalancingConfig)e.loadBalancingConfig.push(Zce(o));else throw new Error("Invalid service config: invalid loadBalancingConfig");if("methodConfig"in r&&Array.isArray(r.methodConfig))for(let o of r.methodConfig)e.methodConfig.push(Qce(o));"retryThrottling"in r&&(e.retryThrottling=Y3(r.retryThrottling));let t=[];for(let o of e.methodConfig)for(let s of o.name){for(let a of t)if(s.service===a.service&&s.method===a.method)throw new Error(`Invalid service config: duplicate name ${s.service}/${s.method}`);t.push(s)}return e}function eue(r){if(!("serviceConfig"in r))throw new Error("Invalid service config choice: missing service config");let e={serviceConfig:z3(r.serviceConfig)};if("clientLanguage"in r)if(Array.isArray(r.clientLanguage)){e.clientLanguage=[];for(let o of r.clientLanguage)if(typeof o=="string")e.clientLanguage.push(o);else throw new Error("Invalid service config choice: invalid clientLanguage")}else throw new Error("Invalid service config choice: invalid clientLanguage");if("clientHostname"in r)if(Array.isArray(r.clientHostname)){e.clientHostname=[];for(let o of r.clientHostname)if(typeof o=="string")e.clientHostname.push(o);else throw new Error("Invalid service config choice: invalid clientHostname")}else throw new Error("Invalid service config choice: invalid clientHostname");if("percentage"in r)if(typeof r.percentage=="number"&&0<=r.percentage&&r.percentage<=100)e.percentage=r.percentage;else throw new Error("Invalid service config choice: invalid percentage");let t=["clientLanguage","percentage","clientHostname","serviceConfig"];for(let o in r)if(!t.includes(o))throw new Error(`Invalid service config choice: unexpected field ${o}`);return e}function tue(r,e){if(!Array.isArray(r))throw new Error("Invalid service config list");for(let t of r){let o=eue(t);if(!(typeof o.percentage=="number"&&e>o.percentage)){if(Array.isArray(o.clientHostname)){let s=!1;for(let a of o.clientHostname)a===Kce.hostname()&&(s=!0);if(!s)continue}if(Array.isArray(o.clientLanguage)){let s=!1;for(let a of o.clientLanguage)a===$ce&&(s=!0);if(!s)continue}return o.serviceConfig}}throw new Error("No matching service config found")}function rue(r,e){for(let t of r)if(t.length>0&&t[0].startsWith("grpc_config=")){let o=t.join("").substring(12),s=JSON.parse(o);return tue(s,e)}return null}});var rr=T(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});qh.ConnectivityState=void 0;var K3;(function(r){r[r.IDLE=0]="IDLE",r[r.CONNECTING=1]="CONNECTING",r[r.READY=2]="READY",r[r.TRANSIENT_FAILURE=3]="TRANSIENT_FAILURE",r[r.SHUTDOWN=4]="SHUTDOWN"})(K3||(qh.ConnectivityState=K3={}))});var Zn=T(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.QueuePicker=Qn.UnavailablePicker=Qn.PickResultType=void 0;var nue=ht(),iue=ue(),jh;(function(r){r[r.COMPLETE=0]="COMPLETE",r[r.QUEUE=1]="QUEUE",r[r.TRANSIENT_FAILURE=2]="TRANSIENT_FAILURE",r[r.DROP=3]="DROP"})(jh||(Qn.PickResultType=jh={}));var Lv=class{constructor(e){this.status=Object.assign({code:iue.Status.UNAVAILABLE,details:"No connection established",metadata:new nue.Metadata},e)}pick(e){return{pickResultType:jh.TRANSIENT_FAILURE,subchannel:null,status:this.status,onCallStarted:null,onCallEnded:null}}};Qn.UnavailablePicker=Lv;var xv=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:jh.QUEUE,subchannel:null,status:null,onCallStarted:null,onCallEnded:null}}};Qn.QueuePicker=xv});var Nc=T(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});zh.BackoffTimeout=void 0;var oue=ue(),sue=Pe(),aue="backoff",lue=1e3,cue=1.6,uue=12e4,fue=.2;function pue(r,e){return Math.random()*(e-r)+r}var Yh=class r{constructor(e,t){this.callback=e,this.initialDelay=lue,this.multiplier=cue,this.maxDelay=uue,this.jitter=fue,this.running=!1,this.hasRef=!0,this.startTime=new Date,this.endTime=new Date,this.id=r.getNextId(),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.trace("constructed initialDelay="+this.initialDelay+" multiplier="+this.multiplier+" jitter="+this.jitter+" maxDelay="+this.maxDelay),this.nextDelay=this.initialDelay,this.timerId=setTimeout(()=>{},0),clearTimeout(this.timerId)}static getNextId(){return this.nextId++}trace(e){sue.trace(oue.LogVerbosity.DEBUG,aue,"{"+this.id+"} "+e)}runTimer(e){var t,o;this.trace("runTimer(delay="+e+")"),this.endTime=this.startTime,this.endTime.setMilliseconds(this.endTime.getMilliseconds()+e),clearTimeout(this.timerId),this.timerId=setTimeout(()=>{this.trace("timer fired"),this.running=!1,this.callback()},e),this.hasRef||(o=(t=this.timerId).unref)===null||o===void 0||o.call(t)}runOnce(){this.trace("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+pue(-t,t)}stop(){this.trace("stop()"),clearTimeout(this.timerId),this.running=!1}reset(){if(this.trace("reset() running="+this.running),this.nextDelay=this.initialDelay,this.running){let e=new Date,t=this.startTime;t.setMilliseconds(t.getMilliseconds()+this.nextDelay),clearTimeout(this.timerId),e{"use strict";Object.defineProperty(Kh,"__esModule",{value:!0});Kh.ChildLoadBalancerHandler=void 0;var due=so(),hue=rr(),_ue="child_load_balancer_helper",Mv=class{constructor(e){this.channelControlHelper=e,this.currentChild=null,this.pendingChild=null,this.latestConfig=null,this.ChildPolicyHelper=class{constructor(t){this.parent=t,this.child=null}createSubchannel(t,o){return this.parent.channelControlHelper.createSubchannel(t,o)}updateState(t,o,s){var a;if(this.calledByPendingChild()){if(t===hue.ConnectivityState.CONNECTING)return;(a=this.parent.currentChild)===null||a===void 0||a.destroy(),this.parent.currentChild=this.parent.pendingChild,this.parent.pendingChild=null}else if(!this.calledByCurrentChild())return;this.parent.channelControlHelper.updateState(t,o,s)}requestReresolution(){var t;let o=(t=this.parent.pendingChild)!==null&&t!==void 0?t:this.parent.currentChild;this.child===o&&this.parent.channelControlHelper.requestReresolution()}setChild(t){this.child=t}addChannelzChild(t){this.parent.channelControlHelper.addChannelzChild(t)}removeChannelzChild(t){this.parent.channelControlHelper.removeChannelzChild(t)}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,o){let s;if(this.currentChild===null||this.latestConfig===null||this.configUpdateRequiresNewPolicyInstance(this.latestConfig,t)){let a=new this.ChildPolicyHelper(this),i=(0,due.createLoadBalancer)(t,a);a.setChild(i),this.currentChild===null?(this.currentChild=i,s=this.currentChild):(this.pendingChild&&this.pendingChild.destroy(),this.pendingChild=i,s=this.pendingChild)}else this.pendingChild===null?s=this.currentChild:s=this.pendingChild;this.latestConfig=t,s.updateAddressList(e,t,o)}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 _ue}};Kh.ChildLoadBalancerHandler=Mv});var X3=T(Xh=>{"use strict";Object.defineProperty(Xh,"__esModule",{value:!0});Xh.ResolvingLoadBalancer=void 0;var Eue=so(),mue=bv(),It=rr(),Tue=jr(),Cc=Zn(),Sue=Nc(),wv=ue(),gue=ht(),vue=Pe(),yue=ue(),Oue=Pt(),Aue=$h(),Rue="resolving_load_balancer";function $3(r){vue.trace(yue.LogVerbosity.DEBUG,Rue,r)}var Nue=["SERVICE_AND_METHOD","SERVICE","EMPTY"];function Cue(r,e,t,o){for(let s of t.name)switch(o){case"EMPTY":if(!s.service&&!s.method)return!0;break;case"SERVICE":if(s.service===r&&!s.method)return!0;break;case"SERVICE_AND_METHOD":if(s.service===r&&s.method===e)return!0}return!1}function Pue(r,e,t,o){for(let s of t)if(Cue(r,e,s,o))return s;return null}function Iue(r){return{invoke(e,t){var o,s;let a=e.split("/").filter(l=>l.length>0),i=(o=a[0])!==null&&o!==void 0?o:"",n=(s=a[1])!==null&&s!==void 0?s:"";if(r&&r.methodConfig)for(let l of Nue){let c=Pue(i,n,r.methodConfig,l);if(c)return{methodConfig:c,pickInformation:{},status:wv.Status.OK,dynamicFilterFactories:[]}}return{methodConfig:{name:[]},pickInformation:{},status:wv.Status.OK,dynamicFilterFactories:[]}},unref(){}}}var Dv=class{constructor(e,t,o,s,a){this.target=e,this.channelControlHelper=t,this.channelOptions=o,this.onSuccessfulResolution=s,this.onFailedResolution=a,this.latestChildState=It.ConnectivityState.IDLE,this.latestChildPicker=new Cc.QueuePicker(this),this.latestChildErrorMessage=null,this.currentState=It.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1,o["grpc.service_config"]?this.defaultServiceConfig=(0,mue.validateServiceConfig)(JSON.parse(o["grpc.service_config"])):this.defaultServiceConfig={loadBalancingConfig:[],methodConfig:[]},this.updateState(It.ConnectivityState.IDLE,new Cc.QueuePicker(this),null),this.childLoadBalancer=new Aue.ChildLoadBalancerHandler({createSubchannel:t.createSubchannel.bind(t),requestReresolution:()=>{this.backoffTimeout.isRunning()?($3("requestReresolution delayed by backoff timer until "+this.backoffTimeout.getEndTime().toISOString()),this.continueResolving=!0):this.updateResolution()},updateState:(n,l,c)=>{this.latestChildState=n,this.latestChildPicker=l,this.latestChildErrorMessage=c,this.updateState(n,l,c)},addChannelzChild:t.addChannelzChild.bind(t),removeChannelzChild:t.removeChannelzChild.bind(t)}),this.innerResolver=(0,Tue.createResolver)(e,{onSuccessfulResolution:(n,l,c,u,f)=>{var _;this.backoffTimeout.stop(),this.backoffTimeout.reset();let m=null;l===null?c===null?(this.previousServiceConfig=null,m=this.defaultServiceConfig):this.previousServiceConfig===null?this.handleResolutionFailure(c):m=this.previousServiceConfig:(m=l,this.previousServiceConfig=l);let O=(_=m==null?void 0:m.loadBalancingConfig)!==null&&_!==void 0?_:[],y=(0,Eue.selectLbConfigFromList)(O,!0);if(y===null){this.handleResolutionFailure({code:wv.Status.UNAVAILABLE,details:"All load balancer options in service config are not compatible",metadata:new gue.Metadata}),u==null||u.unref();return}this.childLoadBalancer.updateAddressList(n,y,Object.assign(Object.assign({},this.channelOptions),f));let A=m??this.defaultServiceConfig;this.onSuccessfulResolution(A,u??Iue(A))},onError:n=>{this.handleResolutionFailure(n)}},o);let i={initialDelay:o["grpc.initial_reconnect_backoff_ms"],maxDelay:o["grpc.max_reconnect_backoff_ms"]};this.backoffTimeout=new Sue.BackoffTimeout(()=>{this.continueResolving?(this.updateResolution(),this.continueResolving=!1):this.updateState(this.latestChildState,this.latestChildPicker,this.latestChildErrorMessage)},i),this.backoffTimeout.unref()}updateResolution(){this.innerResolver.updateResolution(),this.currentState===It.ConnectivityState.IDLE&&this.updateState(It.ConnectivityState.CONNECTING,this.latestChildPicker,this.latestChildErrorMessage),this.backoffTimeout.runOnce()}updateState(e,t,o){$3((0,Oue.uriToString)(this.target)+" "+It.ConnectivityState[this.currentState]+" -> "+It.ConnectivityState[e]),e===It.ConnectivityState.IDLE&&(t=new Cc.QueuePicker(this,t)),this.currentState=e,this.channelControlHelper.updateState(e,t,o)}handleResolutionFailure(e){this.latestChildState===It.ConnectivityState.IDLE&&(this.updateState(It.ConnectivityState.TRANSIENT_FAILURE,new Cc.UnavailablePicker(e),e.details),this.onFailedResolution(e))}exitIdle(){(this.currentState===It.ConnectivityState.IDLE||this.currentState===It.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=It.ConnectivityState.IDLE,this.latestChildPicker=new Cc.QueuePicker(this),this.currentState=It.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1}getTypeName(){return"resolving_load_balancer"}};Xh.ResolvingLoadBalancer=Dv});var W3=T(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.recognizedOptions=void 0;Pc.channelOptionsEqual=bue;Pc.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,"grpc-node.retry_max_attempts_limit":!0,"grpc-node.flow_control_window":!0};function bue(r,e){let t=Object.keys(r).sort(),o=Object.keys(e).sort();if(t.length!==o.length)return!1;for(let s=0;s{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.EndpointMap=void 0;gr.isTcpSubchannelAddress=bc;gr.subchannelAddressEqual=Wh;gr.subchannelAddressToString=Q3;gr.stringToSubchannelAddress=xue;gr.endpointEqual=Mue;gr.endpointToString=wue;gr.endpointHasAddress=Z3;var J3=V("net");function bc(r){return"port"in r}function Wh(r,e){return!r&&!e?!0:!r||!e?!1:bc(r)?bc(e)&&r.host===e.host&&r.port===e.port:!bc(e)&&r.path===e.path}function Q3(r){return bc(r)?(0,J3.isIPv6)(r.host)?"["+r.host+"]:"+r.port:r.host+":"+r.port:r.path}var Lue=443;function xue(r,e){return(0,J3.isIP)(r)?{host:r,port:e??Lue}:{path:r}}function Mue(r,e){if(r.addresses.length!==e.addresses.length)return!1;for(let t=0;tHue});function na(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");kv(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Due(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,s,a,i;return i={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function n(c){return function(u){return l([c,u])}}function l(c){if(o)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(t=0)),t;)try{if(o=1,s&&(a=c[0]&2?s.return:c[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,c[1])).done)return a;switch(s=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,s=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]{kv=function(r,e){return kv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(t[s]=o[s])},kv(r,e)};eH=(function(){function r(e,t,o){o===void 0&&(o=1),this.t=void 0,this.i=void 0,this.h=void 0,this.u=e,this.o=t,this.l=o}return r.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 o=e.h;o.t===e;)e=o,o=e.h;e=o}return e},r.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}},r.prototype.T=function(){var e=this.h,t=this.i,o=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=o,o&&(o.h=this),t},r.prototype.I=function(){var e=this.h,t=this.t,o=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=o,o&&(o.h=this),t},r})(),Uue=(function(r){na(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.O=1,t}return e.prototype.T=function(){var t=r.prototype.T.call(this);return this.M(),t.M(),t},e.prototype.I=function(){var t=r.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})(eH),kue=(function(){function r(e){e===void 0&&(e=0),this.iteratorType=e}return r.prototype.equals=function(e){return this.C===e.C},r})(),Bue=(function(){function r(){this._=0}return Object.defineProperty(r.prototype,"length",{get:function(){return this._},enumerable:!1,configurable:!0}),r.prototype.size=function(){return this._},r.prototype.empty=function(){return this._===0},r})(),Vue=(function(r){na(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(Bue);Fue=(function(r){na(e,r);function e(t,o){t===void 0&&(t=function(a,i){return ai?1:0}),o===void 0&&(o=!1);var s=r.call(this)||this;return s.N=void 0,s.g=t,s.enableIndex=o,s.S=o?Uue:eH,s.A=new s.S,s}return e.prototype.m=function(t,o){for(var s=this.A;t;){var a=this.g(t.u,o);if(a<0)t=t.i;else if(a>0)s=t,t=t.t;else return t}return s},e.prototype.B=function(t,o){for(var s=this.A;t;){var a=this.g(t.u,o);a<=0?t=t.i:(s=t,t=t.t)}return s},e.prototype.j=function(t,o){for(var s=this.A;t;){var a=this.g(t.u,o);if(a<0)s=t,t=t.i;else if(a>0)t=t.t;else return t}return s},e.prototype.k=function(t,o){for(var s=this.A;t;){var a=this.g(t.u,o);a<0?(s=t,t=t.i):t=t.t}return s},e.prototype.R=function(t){for(;;){var o=t.h;if(o===this.A)return;if(t.l===1){t.l=0;return}if(t===o.t){var s=o.i;if(s.l===1)s.l=0,o.l=1,o===this.N?this.N=o.T():o.T();else if(s.i&&s.i.l===1){s.l=o.l,o.l=0,s.i.l=0,o===this.N?this.N=o.T():o.T();return}else s.t&&s.t.l===1?(s.l=1,s.t.l=0,s.I()):(s.l=1,t=o)}else{var s=o.t;if(s.l===1)s.l=0,o.l=1,o===this.N?this.N=o.I():o.I();else if(s.t&&s.t.l===1){s.l=o.l,o.l=0,s.t.l=0,o===this.N?this.N=o.I():o.I();return}else s.i&&s.i.l===1?(s.l=1,s.i.l=0,s.T()):(s.l=1,t=o)}}},e.prototype.G=function(t){if(this._===1){this.clear();return}for(var o=t;o.t||o.i;){if(o.i)for(o=o.i;o.t;)o=o.t;else o=o.t;var s=t.u;t.u=o.u,o.u=s;var a=t.o;t.o=o.o,o.o=a,t=o}this.A.t===o?this.A.t=o.h:this.A.i===o&&(this.A.i=o.h),this.R(o);var i=o.h;if(o===i.t?i.t=void 0:i.i=void 0,this._-=1,this.N.l=0,this.enableIndex)for(;i!==this.A;)i.O-=1,i=i.h},e.prototype.P=function(t){for(var o=typeof t=="number"?t:void 0,s=typeof t=="function"?t:void 0,a=typeof t>"u"?[]:void 0,i=0,n=this.N,l=[];l.length||n;)if(n)l.push(n),n=n.t;else{if(n=l.pop(),i===o)return n;a&&a.push(n),s&&s(n,i,this),i+=1,n=n.i}return a},e.prototype.q=function(t){for(;;){var o=t.h;if(o.l===0)return;var s=o.h;if(o===s.t){var a=s.i;if(a&&a.l===1){if(a.l=o.l=0,s===this.N)return;s.l=1,t=s;continue}else if(t===o.i){if(t.l=0,t.t&&(t.t.h=o),t.i&&(t.i.h=s),o.i=t.t,s.t=t.i,t.t=o,t.i=s,s===this.N)this.N=t,this.A.h=t;else{var i=s.h;i.t===s?i.t=t:i.i=t}t.h=s.h,o.h=t,s.h=t,s.l=1}else{o.l=0,s===this.N?this.N=s.I():s.I(),s.l=1;return}}else{var a=s.t;if(a&&a.l===1){if(a.l=o.l=0,s===this.N)return;s.l=1,t=s;continue}else if(t===o.t){if(t.l=0,t.t&&(t.t.h=s),t.i&&(t.i.h=o),s.i=t.t,o.t=t.i,t.t=s,t.i=o,s===this.N)this.N=t,this.A.h=t;else{var i=s.h;i.t===s?i.t=t:i.i=t}t.h=s.h,o.h=t,s.h=t,s.l=1}else{o.l=0,s===this.N?this.N=s.T():s.T(),s.l=1;return}}this.enableIndex&&(o.M(),s.M(),t.M());return}},e.prototype.D=function(t,o,s){if(this.N===void 0)return this._+=1,this.N=new this.S(t,o,0),this.N.h=this.A,this.A.h=this.A.t=this.A.i=this.N,this._;var a,i=this.A.t,n=this.g(i.u,t);if(n===0)return i.o=o,this._;if(n>0)i.t=new this.S(t,o),i.t.h=i,a=i.t,this.A.t=a;else{var l=this.A.i,c=this.g(l.u,t);if(c===0)return l.o=o,this._;if(c<0)l.i=new this.S(t,o),l.i.h=l,a=l.i,this.A.i=a;else{if(s!==void 0){var u=s.C;if(u!==this.A){var f=this.g(u.u,t);if(f===0)return u.o=o,this._;if(f>0){var _=u.v(),m=this.g(_.u,t);if(m===0)return _.o=o,this._;m<0&&(a=new this.S(t,o),_.i===void 0?(_.i=a,a.h=_):(u.t=a,a.h=u))}}}if(a===void 0)for(a=this.N;;){var O=this.g(a.u,t);if(O>0){if(a.t===void 0){a.t=new this.S(t,o),a.t.h=a,a=a.t;break}a=a.t}else if(O<0){if(a.i===void 0){a.i=new this.S(t,o),a.i.h=a,a=a.i;break}a=a.i}else return a.o=o,this._}}}if(this.enableIndex)for(var y=a.h;y!==this.A;)y.O+=1,y=y.h;return this.q(a),this._+=1,this._},e.prototype.F=function(t,o){for(;t;){var s=this.g(t.u,o);if(s<0)t=t.i;else if(s>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,o){var s=t.C;if(s===this.A&&ao(),this._===1)return s.u=o,!0;var a=s.p().u;if(s===this.A.t)return this.g(a,o)>0?(s.u=o,!0):!1;var i=s.v().u;return s===this.A.i?this.g(i,o)<0?(s.u=o,!0):!1:this.g(i,o)>=0||this.g(a,o)<=0?!1:(s.u=o,!0)},e.prototype.eraseElementByPos=function(t){if(t<0||t>this._-1)throw new RangeError;var o=this.P(t);return this.G(o),this._},e.prototype.eraseElementByKey=function(t){if(this._===0)return!1;var o=this.F(this.N,t);return o===this.A?!1:(this.G(o),!0)},e.prototype.eraseElementByIterator=function(t){var o=t.C;o===this.A&&ao();var s=o.i===void 0,a=t.iteratorType===0;return a?s&&t.next():(!s||o.t===void 0)&&t.next(),this.G(o),t},e.prototype.getHeight=function(){if(this._===0)return 0;function t(o){return o?Math.max(t(o.t),t(o.i))+1:0}return t(this.N)},e})(Vue),Gue=(function(r){na(e,r);function e(t,o,s){var a=r.call(this,s)||this;return a.C=t,a.A=o,a.iteratorType===0?(a.pre=function(){return this.C===this.A.t&&ao(),this.C=this.C.v(),this},a.next=function(){return this.C===this.A&&ao(),this.C=this.C.p(),this}):(a.pre=function(){return this.C===this.A.i&&ao(),this.C=this.C.p(),this},a.next=function(){return this.C===this.A&&ao(),this.C=this.C.v(),this}),a}return Object.defineProperty(e.prototype,"index",{get:function(){var t=this.C,o=this.A.h;if(t===this.A)return o?o.O-1:0;var s=0;for(t.t&&(s+=t.t.O);t!==o;){var a=t.h;t===a.i&&(s+=1,a.t&&(s+=a.t.O)),t=a}return s},enumerable:!1,configurable:!0}),e.prototype.isAccessible=function(){return this.C!==this.A},e})(kue),En=(function(r){na(e,r);function e(t,o,s,a){var i=r.call(this,t,o,a)||this;return i.container=s,i}return Object.defineProperty(e.prototype,"pointer",{get:function(){this.C===this.A&&ao();var t=this;return new Proxy([],{get:function(o,s){return s==="0"?t.C.u:s==="1"?t.C.o:(o[0]=t.C.u,o[1]=t.C.o,o[s])},set:function(o,s,a){if(s!=="1")throw new TypeError("prop must be 1");return t.C.o=a,!0}})},enumerable:!1,configurable:!0}),e.prototype.copy=function(){return new e(this.C,this.A,this.container,this.iteratorType)},e})(Gue),Hue=(function(r){na(e,r);function e(t,o,s){t===void 0&&(t=[]);var a=r.call(this,o,s)||this,i=a;return t.forEach((function(n){i.setElement(n[0],n[1])})),a}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 o=this.m(this.N,t);return new En(o,this.A,this)},e.prototype.upperBound=function(t){var o=this.B(this.N,t);return new En(o,this.A,this)},e.prototype.reverseLowerBound=function(t){var o=this.j(this.N,t);return new En(o,this.A,this)},e.prototype.reverseUpperBound=function(t){var o=this.k(this.N,t);return new En(o,this.A,this)},e.prototype.forEach=function(t){this.P((function(o,s,a){t([o.u,o.o],s,a)}))},e.prototype.setElement=function(t,o,s){return this.D(t,o,s)},e.prototype.getElementByPos=function(t){if(t<0||t>this._-1)throw new RangeError;var o=this.P(t);return[o.u,o.o]},e.prototype.find=function(t){var o=this.F(this.N,t);return new En(o,this.A,this)},e.prototype.getElementByKey=function(t){var o=this.F(this.N,t);return o.o},e.prototype.union=function(t){var o=this;return t.forEach((function(s){o.setElement(s[0],s[1])})),this._},e.prototype[Symbol.iterator]=function(){var t,o,s,a;return Due(this,(function(i){switch(i.label){case 0:t=this._,o=this.P(),s=0,i.label=1;case 1:return s{"use strict";Object.defineProperty(Jh,"__esModule",{value:!0});Jh.registerAdminService=que;Jh.addAdminServicesToServer=jue;var nH=[];function que(r,e){nH.push({getServiceDefinition:r,getHandlers:e})}function jue(r){for(let{getServiceDefinition:e,getHandlers:t}of nH)r.addService(e(),t())}});var iH=T(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.ClientDuplexStreamImpl=vr.ClientWritableStreamImpl=vr.ClientReadableStreamImpl=vr.ClientUnaryCallImpl=void 0;vr.callErrorFromStatus=zue;var Yue=V("events"),Hv=V("stream"),Lc=ue();function zue(r,e){let t=`${r.code} ${Lc.Status[r.code]}: ${r.details}`,s=`${new Error(t).stack} for call at ${e}`;return Object.assign(new Error(t),r,{stack:s})}var Bv=class extends Yue.EventEmitter{constructor(){super()}cancel(){var e;(e=this.call)===null||e===void 0||e.cancelWithStatus(Lc.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"}};vr.ClientUnaryCallImpl=Bv;var Vv=class extends Hv.Readable{constructor(e){super({objectMode:!0}),this.deserialize=e}cancel(){var e;(e=this.call)===null||e===void 0||e.cancelWithStatus(Lc.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()}};vr.ClientReadableStreamImpl=Vv;var Fv=class extends Hv.Writable{constructor(e){super({objectMode:!0}),this.serialize=e}cancel(){var e;(e=this.call)===null||e===void 0||e.cancelWithStatus(Lc.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,o){var s;let a={callback:o},i=Number(t);Number.isNaN(i)||(a.flags=i),(s=this.call)===null||s===void 0||s.sendMessageWithContext(a,e)}_final(e){var t;(t=this.call)===null||t===void 0||t.halfClose(),e()}};vr.ClientWritableStreamImpl=Fv;var Gv=class extends Hv.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(Lc.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,o){var s;let a={callback:o},i=Number(t);Number.isNaN(i)||(a.flags=i),(s=this.call)===null||s===void 0||s.sendMessageWithContext(a,e)}_final(e){var t;(t=this.call)===null||t===void 0||t.halfClose(),e()}};vr.ClientDuplexStreamImpl=Gv});var oH=T(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.InterceptingListenerImpl=void 0;xc.isInterceptingListener=Kue;function Kue(r){return r.onReceiveMetadata!==void 0&&r.onReceiveMetadata.length===1}var qv=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)})}};xc.InterceptingListenerImpl=qv});var Wv=T(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.InterceptingCall=yr.RequesterBuilder=yr.ListenerBuilder=yr.InterceptorConfigurationError=void 0;yr.getInterceptingCall=Jue;var $ue=ht(),sH=oH(),aH=ue(),lH=Mh(),wc=class r extends Error{constructor(e){super(e),this.name="InterceptorConfigurationError",Error.captureStackTrace(this,r)}};yr.InterceptorConfigurationError=wc;var Yv=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}}};yr.ListenerBuilder=Yv;var zv=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}}};yr.RequesterBuilder=zv;var jv={onReceiveMetadata:(r,e)=>{e(r)},onReceiveMessage:(r,e)=>{e(r)},onReceiveStatus:(r,e)=>{e(r)}},Mc={start:(r,e,t)=>{t(r,e)},sendMessage:(r,e)=>{e(r)},halfClose:r=>{r()},cancel:r=>{r()}},Kv=class{constructor(e,t){var o,s,a,i;this.nextCall=e,this.processingMetadata=!1,this.pendingMessageContext=null,this.processingMessage=!1,this.pendingHalfClose=!1,t?this.requester={start:(o=t.start)!==null&&o!==void 0?o:Mc.start,sendMessage:(s=t.sendMessage)!==null&&s!==void 0?s:Mc.sendMessage,halfClose:(a=t.halfClose)!==null&&a!==void 0?a:Mc.halfClose,cancel:(i=t.cancel)!==null&&i!==void 0?i:Mc.cancel}:this.requester=Mc}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 o,s,a,i,n,l;let c={onReceiveMetadata:(s=(o=t==null?void 0:t.onReceiveMetadata)===null||o===void 0?void 0:o.bind(t))!==null&&s!==void 0?s:(u=>{}),onReceiveMessage:(i=(a=t==null?void 0:t.onReceiveMessage)===null||a===void 0?void 0:a.bind(t))!==null&&i!==void 0?i:(u=>{}),onReceiveStatus:(l=(n=t==null?void 0:t.onReceiveStatus)===null||n===void 0?void 0:n.bind(t))!==null&&l!==void 0?l:(u=>{})};this.processingMetadata=!0,this.requester.start(e,c,(u,f)=>{var _,m,O;this.processingMetadata=!1;let y;if((0,sH.isInterceptingListener)(f))y=f;else{let A={onReceiveMetadata:(_=f.onReceiveMetadata)!==null&&_!==void 0?_:jv.onReceiveMetadata,onReceiveMessage:(m=f.onReceiveMessage)!==null&&m!==void 0?m:jv.onReceiveMessage,onReceiveStatus:(O=f.onReceiveStatus)!==null&&O!==void 0?O:jv.onReceiveStatus};y=new sH.InterceptingListenerImpl(A,c)}this.nextCall.start(u,y),this.processPendingMessage(),this.processPendingHalfClose()})}sendMessageWithContext(e,t){this.processingMessage=!0,this.requester.sendMessage(t,o=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessageContext=e,this.pendingMessage=t):(this.nextCall.sendMessageWithContext(e,o),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()})}};yr.InterceptingCall=Kv;function Xue(r,e,t){var o,s;let a=(o=t.deadline)!==null&&o!==void 0?o:1/0,i=t.host,n=(s=t.parent)!==null&&s!==void 0?s:null,l=t.propagate_flags,c=t.credentials,u=r.createCall(e,a,i,n,l);return c&&u.setCredentials(c),u}var Zh=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 o;try{o=this.methodDefinition.requestSerialize(t)}catch(s){this.call.cancelWithStatus(aH.Status.INTERNAL,`Request message serialization failure: ${(0,lH.getErrorMessage)(s)}`);return}this.call.sendMessageWithContext(e,o)}sendMessage(e){this.sendMessageWithContext({},e)}start(e,t){let o=null;this.call.start(e,{onReceiveMetadata:s=>{var a;(a=t==null?void 0:t.onReceiveMetadata)===null||a===void 0||a.call(t,s)},onReceiveMessage:s=>{var a;let i;try{i=this.methodDefinition.responseDeserialize(s)}catch(n){o={code:aH.Status.INTERNAL,details:`Response message parsing error: ${(0,lH.getErrorMessage)(n)}`,metadata:new $ue.Metadata},this.call.cancelWithStatus(o.code,o.details);return}(a=t==null?void 0:t.onReceiveMessage)===null||a===void 0||a.call(t,i)},onReceiveStatus:s=>{var a,i;o?(a=t==null?void 0:t.onReceiveStatus)===null||a===void 0||a.call(t,o):(i=t==null?void 0:t.onReceiveStatus)===null||i===void 0||i.call(t,s)}})}startRead(){this.call.startRead()}halfClose(){this.call.halfClose()}},$v=class extends Zh{constructor(e,t){super(e,t)}start(e,t){var o,s;let a=!1,i={onReceiveMetadata:(s=(o=t==null?void 0:t.onReceiveMetadata)===null||o===void 0?void 0:o.bind(t))!==null&&s!==void 0?s:(n=>{}),onReceiveMessage:n=>{var l;a=!0,(l=t==null?void 0:t.onReceiveMessage)===null||l===void 0||l.call(t,n)},onReceiveStatus:n=>{var l,c;a||(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,n)}};super.start(e,i),this.call.startRead()}},Xv=class extends Zh{};function Wue(r,e,t){let o=Xue(r,t.path,e);return t.responseStream?new Xv(o,t):new $v(o,t)}function Jue(r,e,t,o){if(r.clientInterceptors.length>0&&r.clientInterceptorProviders.length>0)throw new wc("Both interceptors and interceptor_providers were passed as options to the client constructor. Only one of these is allowed.");if(r.callInterceptors.length>0&&r.callInterceptorProviders.length>0)throw new wc("Both interceptors and interceptor_providers were passed as call options. Only one of these is allowed.");let s=[];r.callInterceptors.length>0||r.callInterceptorProviders.length>0?s=[].concat(r.callInterceptors,r.callInterceptorProviders.map(n=>n(e))).filter(n=>n):s=[].concat(r.clientInterceptors,r.clientInterceptorProviders.map(n=>n(e))).filter(n=>n);let a=Object.assign({},t,{method_definition:e});return s.reduceRight((n,l)=>c=>l(c,n),n=>Wue(o,n,e))(a)}});var Zv=T(t_=>{"use strict";Object.defineProperty(t_,"__esModule",{value:!0});t_.Client=void 0;var zr=iH(),Que=ey(),Zue=rr(),ei=ue(),ia=ht(),e_=Wv(),Or=Symbol(),oa=Symbol(),sa=Symbol(),mn=Symbol();function Jv(r){return typeof r=="function"}function aa(r){var e;return((e=r.stack)===null||e===void 0?void 0:e.split(` `).slice(1).join(` `))||"no stack trace available"}var Qv=class{constructor(e,t,o={}){var s,a;if(o=Object.assign({},o),this[oa]=(s=o.interceptors)!==null&&s!==void 0?s:[],delete o.interceptors,this[sa]=(a=o.interceptor_providers)!==null&&a!==void 0?a:[],delete o.interceptor_providers,this[oa].length>0&&this[sa].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[mn]=o.callInvocationTransformer,delete o.callInvocationTransformer,o.channelOverride)this[Or]=o.channelOverride;else if(o.channelFactoryOverride){let i=o.channelFactoryOverride;delete o.channelFactoryOverride,this[Or]=i(e,t,o)}else this[Or]=new Que.ChannelImplementation(e,t,o)}close(){this[Or].close()}getChannel(){return this[Or]}waitForReady(e,t){let o=s=>{if(s){t(new Error("Failed to connect before the deadline"));return}let a;try{a=this[Or].getConnectivityState(!0)}catch{t(new Error("The channel has been closed"));return}if(a===Zue.ConnectivityState.READY)t();else try{this[Or].watchConnectivityState(a,e,o)}catch{t(new Error("The channel has been closed"))}};setImmediate(o)}checkOptionalUnaryResponseArguments(e,t,o){if(Jv(e))return{metadata:new ia.Metadata,options:{},callback:e};if(Jv(t))return e instanceof ia.Metadata?{metadata:e,options:{},callback:t}:{metadata:new ia.Metadata,options:e,callback:t};if(!(e instanceof ia.Metadata&&t instanceof Object&&Jv(o)))throw new Error("Incorrect arguments passed");return{metadata:e,options:t,callback:o}}makeUnaryRequest(e,t,o,s,a,i,n){var l,c;let u=this.checkOptionalUnaryResponseArguments(a,i,n),f={path:e,requestStream:!1,responseStream:!1,requestSerialize:t,responseDeserialize:o},_={argument:s,metadata:u.metadata,call:new zr.ClientUnaryCallImpl,channel:this[Or],methodDefinition:f,callOptions:u.options,callback:u.callback};this[mn]&&(_=this[mn](_));let m=_.call,O={clientInterceptors:this[oa],clientInterceptorProviders:this[sa],callInterceptors:(l=_.callOptions.interceptors)!==null&&l!==void 0?l:[],callInterceptorProviders:(c=_.callOptions.interceptor_providers)!==null&&c!==void 0?c:[]},y=(0,e_.getInterceptingCall)(O,_.methodDefinition,_.callOptions,_.channel);m.call=y;let A=null,I=!1,M=new Error;return y.start(_.metadata,{onReceiveMetadata:F=>{m.emit("metadata",F)},onReceiveMessage(F){A!==null&&y.cancelWithStatus(ei.Status.UNIMPLEMENTED,"Too many responses received"),A=F},onReceiveStatus(F){if(!I){if(I=!0,F.code===ei.Status.OK)if(A===null){let N=aa(M);_.callback((0,zr.callErrorFromStatus)({code:ei.Status.UNIMPLEMENTED,details:"No message received",metadata:F.metadata},N))}else _.callback(null,A);else{let N=aa(M);_.callback((0,zr.callErrorFromStatus)(F,N))}M=null,m.emit("status",F)}}}),y.sendMessage(s),y.halfClose(),m}makeClientStreamRequest(e,t,o,s,a,i){var n,l;let c=this.checkOptionalUnaryResponseArguments(s,a,i),u={path:e,requestStream:!0,responseStream:!1,requestSerialize:t,responseDeserialize:o},f={metadata:c.metadata,call:new zr.ClientWritableStreamImpl(t),channel:this[Or],methodDefinition:u,callOptions:c.options,callback:c.callback};this[mn]&&(f=this[mn](f));let _=f.call,m={clientInterceptors:this[oa],clientInterceptorProviders:this[sa],callInterceptors:(n=f.callOptions.interceptors)!==null&&n!==void 0?n:[],callInterceptorProviders:(l=f.callOptions.interceptor_providers)!==null&&l!==void 0?l:[]},O=(0,e_.getInterceptingCall)(m,f.methodDefinition,f.callOptions,f.channel);_.call=O;let y=null,A=!1,I=new Error;return O.start(f.metadata,{onReceiveMetadata:M=>{_.emit("metadata",M)},onReceiveMessage(M){y!==null&&O.cancelWithStatus(ei.Status.UNIMPLEMENTED,"Too many responses received"),y=M,O.startRead()},onReceiveStatus(M){if(!A){if(A=!0,M.code===ei.Status.OK)if(y===null){let F=aa(I);f.callback((0,zr.callErrorFromStatus)({code:ei.Status.UNIMPLEMENTED,details:"No message received",metadata:M.metadata},F))}else f.callback(null,y);else{let F=aa(I);f.callback((0,zr.callErrorFromStatus)(M,F))}I=null,_.emit("status",M)}}}),_}checkMetadataAndOptions(e,t){let o,s;return e instanceof ia.Metadata?(o=e,t?s=t:s={}):(e?s=e:s={},o=new ia.Metadata),{metadata:o,options:s}}makeServerStreamRequest(e,t,o,s,a,i){var n,l;let c=this.checkMetadataAndOptions(a,i),u={path:e,requestStream:!1,responseStream:!0,requestSerialize:t,responseDeserialize:o},f={argument:s,metadata:c.metadata,call:new zr.ClientReadableStreamImpl(o),channel:this[Or],methodDefinition:u,callOptions:c.options};this[mn]&&(f=this[mn](f));let _=f.call,m={clientInterceptors:this[oa],clientInterceptorProviders:this[sa],callInterceptors:(n=f.callOptions.interceptors)!==null&&n!==void 0?n:[],callInterceptorProviders:(l=f.callOptions.interceptor_providers)!==null&&l!==void 0?l:[]},O=(0,e_.getInterceptingCall)(m,f.methodDefinition,f.callOptions,f.channel);_.call=O;let y=!1,A=new Error;return O.start(f.metadata,{onReceiveMetadata(I){_.emit("metadata",I)},onReceiveMessage(I){_.push(I)},onReceiveStatus(I){if(!y){if(y=!0,_.push(null),I.code!==ei.Status.OK){let M=aa(A);_.emit("error",(0,zr.callErrorFromStatus)(I,M))}A=null,_.emit("status",I)}}}),O.sendMessage(s),O.halfClose(),_}makeBidiStreamRequest(e,t,o,s,a){var i,n;let l=this.checkMetadataAndOptions(s,a),c={path:e,requestStream:!0,responseStream:!0,requestSerialize:t,responseDeserialize:o},u={metadata:l.metadata,call:new zr.ClientDuplexStreamImpl(t,o),channel:this[Or],methodDefinition:c,callOptions:l.options};this[mn]&&(u=this[mn](u));let f=u.call,_={clientInterceptors:this[oa],clientInterceptorProviders:this[sa],callInterceptors:(i=u.callOptions.interceptors)!==null&&i!==void 0?i:[],callInterceptorProviders:(n=u.callOptions.interceptor_providers)!==null&&n!==void 0?n:[]},m=(0,e_.getInterceptingCall)(_,u.methodDefinition,u.callOptions,u.channel);f.call=m;let O=!1,y=new Error;return m.start(u.metadata,{onReceiveMetadata(A){f.emit("metadata",A)},onReceiveMessage(A){f.push(A)},onReceiveStatus(A){if(!O){if(O=!0,f.push(null),A.code!==ei.Status.OK){let I=aa(y);f.emit("error",(0,zr.callErrorFromStatus)(A,I))}y=null,f.emit("status",A)}}}),f}};t_.Client=Qv});var ry=T(r_=>{"use strict";Object.defineProperty(r_,"__esModule",{value:!0});r_.makeClientConstructor=cH;r_.loadPackageDefinition=nfe;var Dc=Zv(),efe={unary:Dc.Client.prototype.makeUnaryRequest,server_stream:Dc.Client.prototype.makeServerStreamRequest,client_stream:Dc.Client.prototype.makeClientStreamRequest,bidi:Dc.Client.prototype.makeBidiStreamRequest};function ty(r){return["__proto__","prototype","constructor"].includes(r)}function cH(r,e,t){t||(t={});class o extends Dc.Client{}return Object.keys(r).forEach(s=>{if(ty(s))return;let a=r[s],i;if(typeof s=="string"&&s.charAt(0)==="$")throw new Error("Method names cannot start with $");a.requestStream?a.responseStream?i="bidi":i="client_stream":a.responseStream?i="server_stream":i="unary";let n=a.requestSerialize,l=a.responseDeserialize,c=tfe(efe[i],a.path,n,l);o.prototype[s]=c,Object.assign(o.prototype[s],a),a.originalName&&!ty(a.originalName)&&(o.prototype[a.originalName]=o.prototype[s])}),o.service=r,o.serviceName=e,o}function tfe(r,e,t,o){return function(...s){return r.call(this,e,t,o,...s)}}function rfe(r){return"format"in r}function nfe(r){let e={};for(let t in r)if(Object.prototype.hasOwnProperty.call(r,t)){let o=r[t],s=t.split(".");if(s.some(n=>ty(n)))continue;let a=s[s.length-1],i=e;for(let n of s.slice(0,-1))i[n]||(i[n]={}),i=i[n];rfe(o)?i[a]=o:i[a]=cH(o,a,{})}return e}});var wH=T((eFe,MH)=>{var ife=1/0,ofe="[object Symbol]",sfe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,afe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i_="\\ud800-\\udfff",mH="\\u0300-\\u036f\\ufe20-\\ufe23",TH="\\u20d0-\\u20f0",SH="\\u2700-\\u27bf",gH="a-z\\xdf-\\xf6\\xf8-\\xff",lfe="\\xac\\xb1\\xd7\\xf7",cfe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ufe="\\u2000-\\u206f",ffe=" \\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",vH="A-Z\\xc0-\\xd6\\xd8-\\xde",yH="\\ufe0e\\ufe0f",OH=lfe+cfe+ufe+ffe,iy="['\u2019]",pfe="["+i_+"]",uH="["+OH+"]",n_="["+mH+TH+"]",AH="\\d+",dfe="["+SH+"]",RH="["+gH+"]",NH="[^"+i_+OH+AH+SH+gH+vH+"]",ny="\\ud83c[\\udffb-\\udfff]",hfe="(?:"+n_+"|"+ny+")",CH="[^"+i_+"]",oy="(?:\\ud83c[\\udde6-\\uddff]){2}",sy="[\\ud800-\\udbff][\\udc00-\\udfff]",la="["+vH+"]",PH="\\u200d",fH="(?:"+RH+"|"+NH+")",_fe="(?:"+la+"|"+NH+")",pH="(?:"+iy+"(?:d|ll|m|re|s|t|ve))?",dH="(?:"+iy+"(?:D|LL|M|RE|S|T|VE))?",IH=hfe+"?",bH="["+yH+"]?",Efe="(?:"+PH+"(?:"+[CH,oy,sy].join("|")+")"+bH+IH+")*",LH=bH+IH+Efe,mfe="(?:"+[dfe,oy,sy].join("|")+")"+LH,Tfe="(?:"+[CH+n_+"?",n_,oy,sy,pfe].join("|")+")",Sfe=RegExp(iy,"g"),gfe=RegExp(n_,"g"),vfe=RegExp(ny+"(?="+ny+")|"+Tfe+LH,"g"),yfe=RegExp([la+"?"+RH+"+"+pH+"(?="+[uH,la,"$"].join("|")+")",_fe+"+"+dH+"(?="+[uH,la+fH,"$"].join("|")+")",la+"?"+fH+"+"+pH,la+"+"+dH,AH,mfe].join("|"),"g"),Ofe=RegExp("["+PH+i_+mH+TH+yH+"]"),Afe=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rfe={\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"},Nfe=typeof global=="object"&&global&&global.Object===Object&&global,Cfe=typeof self=="object"&&self&&self.Object===Object&&self,Pfe=Nfe||Cfe||Function("return this")();function Ife(r,e,t,o){var s=-1,a=r?r.length:0;for(o&&a&&(t=r[++s]);++ss?0:s+e),t=t>s?s:t,t<0&&(t+=s),s=e>t?0:t-e>>>0,e>>>=0;for(var a=Array(s);++o=o?r:Ffe(r,e,t)}function qfe(r){return function(e){e=o_(e);var t=xH(e)?Dfe(e):void 0,o=t?t[0]:e.charAt(0),s=t?Hfe(t,1).join(""):e.slice(1);return o[r]()+s}}function jfe(r){return function(e){return Ife(Jfe(Xfe(e).replace(Sfe,"")),r,"")}}function Yfe(r){return!!r&&typeof r=="object"}function zfe(r){return typeof r=="symbol"||Yfe(r)&&Vfe.call(r)==ofe}function o_(r){return r==null?"":Gfe(r)}var Kfe=jfe(function(r,e,t){return e=e.toLowerCase(),r+(t?$fe(e):e)});function $fe(r){return Wfe(o_(r).toLowerCase())}function Xfe(r){return r=o_(r),r&&r.replace(afe,Mfe).replace(gfe,"")}var Wfe=qfe("toUpperCase");function Jfe(r,e,t){return r=o_(r),e=t?void 0:e,e===void 0?wfe(r)?kfe(r):Lfe(r):r.match(e)||[]}MH.exports=Kfe});var UH=T((tFe,DH)=>{"use strict";DH.exports=ay;function ay(r,e){typeof r=="string"&&(e=r,r=void 0);var t=[];function o(a){if(typeof a!="string"){var i=s();if(ay.verbose&&console.log("codegen: "+i),i="return "+i,a){for(var n=Object.keys(a),l=new Array(n.length+1),c=new Array(n.length),u=0;u{"use strict";kH.exports=Uc;var Qfe=Yg(),Zfe=zg(),ly=Zfe("fs");function Uc(r,e,t){return typeof e=="function"?(t=e,e={}):e||(e={}),t?!e.xhr&&ly&&ly.readFile?ly.readFile(r,function(s,a){return s&&typeof XMLHttpRequest<"u"?Uc.xhr(r,e,t):s?t(s):t(null,e.binary?a:a.toString("utf8"))}):Uc.xhr(r,e,t):Qfe(Uc,this,r,e)}Uc.xhr=function(e,t,o){var s=new XMLHttpRequest;s.onreadystatechange=function(){if(s.readyState===4){if(s.status!==0&&s.status!==200)return o(Error("status "+s.status));if(t.binary){var i=s.response;if(!i){i=[];for(var n=0;n{"use strict";var uy=FH,VH=uy.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},cy=uy.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),o=VH(e),s="";o&&(s=t.shift()+"/");for(var a=0;a0&&t[a-1]!==".."?t.splice(--a,2):o?t.splice(a,1):++a:t[a]==="."?t.splice(a,1):++a;return s+t.join("/")};uy.resolve=function(e,t,o){return o||(t=cy(t)),VH(t)?t:(o||(e=cy(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?cy(e+"/"+t):t)}});var ua=T((iFe,jH)=>{"use strict";jH.exports=pe;var s_=ri();((pe.prototype=Object.create(s_.prototype)).constructor=pe).className="Namespace";var fy=ti(),a_=rt(),epe=uo(),lo,ca,co;pe.fromJSON=function(e,t){return new pe(e,t.options).addJSON(t.nested)};function HH(r,e){if(r&&r.length){for(var t={},o=0;ot)return!0}return!1};pe.isReservedName=function(e,t){if(e){for(var o=0;o0;){var s=e.shift();if(o.nested&&o.nested[s]){if(o=o.nested[s],!(o instanceof pe))throw Error("path conflicts with non-namespace objects")}else o.add(o=new pe(s))}return t&&o.addJSON(t),o};pe.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;this._resolveFeaturesRecursive(this._edition);var e=this.nestedArray,t=0;for(this.resolve();t{t._resolveFeaturesRecursive(e)}),this):this};pe.prototype.lookup=function(e,t,o){if(typeof t=="boolean"?(o=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),a_.isString(e)&&e.length){if(e===".")return this.root;e=e.split(".")}else if(!e.length)return this;var s=e.join(".");if(e[0]==="")return this.root.lookup(e.slice(1),t);var a=this.root._fullyQualifiedObjects&&this.root._fullyQualifiedObjects["."+s];if(a&&(!t||t.indexOf(a.constructor)>-1)||(a=this._lookupImpl(e,s),a&&(!t||t.indexOf(a.constructor)>-1)))return a;if(o)return null;for(var i=this;i.parent;){if(a=i.parent._lookupImpl(e,s),a&&(!t||t.indexOf(a.constructor)>-1))return a;i=i.parent}return null};pe.prototype._lookupImpl=function(e,t){if(Object.prototype.hasOwnProperty.call(this._lookupCache,t))return this._lookupCache[t];var o=this.get(e[0]),s=null;if(o)e.length===1?s=o:o instanceof pe&&(e=e.slice(1),s=o._lookupImpl(e,e.join(".")));else for(var a=0;a{"use strict";YH.exports=Tn;var py=ti();((Tn.prototype=Object.create(py.prototype)).constructor=Tn).className="MapField";var tpe=fo(),kc=rt();function Tn(r,e,t,o,s,a){if(py.call(this,r,e,o,void 0,void 0,s,a),!kc.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 kc.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(tpe.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return py.prototype.resolve.call(this)};Tn.d=function(e,t,o){return typeof o=="function"?o=kc.decorateType(o).name:o&&typeof o=="object"&&(o=kc.decorateEnum(o).name),function(a,i){kc.decorateType(a.constructor).add(new Tn(i,e,t,o))}}});var c_=T((sFe,zH)=>{"use strict";zH.exports=po;var dy=ri();((po.prototype=Object.create(dy.prototype)).constructor=po).className="Method";var fa=rt();function po(r,e,t,o,s,a,i,n,l){if(fa.isObject(s)?(i=s,s=a=void 0):fa.isObject(a)&&(i=a,a=void 0),!(e===void 0||fa.isString(e)))throw TypeError("type must be a string");if(!fa.isString(t))throw TypeError("requestType must be a string");if(!fa.isString(o))throw TypeError("responseType must be a string");dy.call(this,r,i),this.type=e||"rpc",this.requestType=t,this.requestStream=s?!0:void 0,this.responseType=o,this.responseStream=a?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=n,this.parsedOptions=l}po.fromJSON=function(e,t){return new po(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)};po.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return fa.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])};po.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),dy.prototype.resolve.call(this))}});var u_=T((aFe,$H)=>{"use strict";$H.exports=Vt;var Sn=ua();((Vt.prototype=Object.create(Sn.prototype)).constructor=Vt).className="Service";var hy=c_(),Bc=rt(),rpe=iv();function Vt(r,e){Sn.call(this,r,e),this.methods={},this._methodsArray=null}Vt.fromJSON=function(e,t){var o=new Vt(e,t.options);if(t.methods)for(var s=Object.keys(t.methods),a=0;a{t._resolveFeaturesRecursive(e)}),this):this};Vt.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof hy?(this.methods[e.name]=e,e.parent=this,KH(this)):Sn.prototype.add.call(this,e)};Vt.prototype.remove=function(e){if(e instanceof hy){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,KH(this)}return Sn.prototype.remove.call(this,e)};Vt.prototype.create=function(e,t,o){for(var s=new rpe.Service(e,t,o),a=0,i;a{"use strict";XH.exports=Kr;var npe=Fr();function Kr(r){if(r)for(var e=Object.keys(r),t=0;t{"use strict";JH.exports=spe;var ipe=Ar(),gn=fo(),WH=rt();function ope(r){return"missing required '"+r.name+"'"}function spe(r){for(var e=WH.codegen(["r","l","e"],r.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(r.fieldsArray.filter(function(n){return n.map}).length?",k,value":""))("while(r.pos>>3){"),t=0;t>>3){")("case 1: k=r.%s(); break",o.keyType)("case 2:"),gn.basic[s]===void 0?e("value=types[%i].decode(r,r.uint32())",t):e("value=r.%s()",s),e("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),gn.long[o.keyType]!==void 0?e('%s[typeof k==="object"?util.longToHash(k):k]=value',a):e("%s[k]=value",a)):o.repeated?(e("if(!(%s&&%s.length))",a,a)("%s=[]",a),gn.packed[s]!==void 0&&e("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos{"use strict";QH.exports=cpe;var ape=Ar(),Ey=rt();function ir(r,e){return r.name+": "+e+(r.repeated&&e!=="array"?"[]":r.map&&e!=="object"?"{k:"+r.keyType+"}":"")+" expected"}function my(r,e,t,o){if(e.resolvedType)if(e.resolvedType instanceof ape){r("switch(%s){",o)("default:")("return%j",ir(e,"enum value"));for(var s=Object.keys(e.resolvedType.values),a=0;a{"use strict";var ZH=eq,Vc=Ar(),$r=rt();function Sy(r,e,t,o){var s=!1;if(e.resolvedType)if(e.resolvedType instanceof Vc){r("switch(d%s){",o);for(var a=e.resolvedType.values,i=Object.keys(a),n=0;n>>0",o,o);break;case"int32":case"sint32":case"sfixed32":r("m%s=d%s|0",o,o);break;case"uint64":l=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":r("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",o,o,l)('else if(typeof d%s==="string")',o)("m%s=parseInt(d%s,10)",o,o)('else if(typeof d%s==="number")',o)("m%s=d%s",o,o)('else if(typeof d%s==="object")',o)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",o,o,o,l?"true":"");break;case"bytes":r('if(typeof d%s==="string")',o)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",o,o,o)("else if(d%s.length >= 0)",o)("m%s=d%s",o,o);break;case"string":r("m%s=String(d%s)",o,o);break;case"bool":r("m%s=Boolean(d%s)",o,o);break}}return r}ZH.fromObject=function(e){var t=e.fieldsArray,o=$r.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return o("return new this.ctor");o("var m=new this.ctor");for(var s=0;s>>0,m%s.high>>>0).toNumber(%s):m%s",o,o,o,o,s?"true":"",o);break;case"bytes":r("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",o,o,o,o,o);break;default:r("d%s=m%s",o,o);break}}return r}ZH.toObject=function(e){var t=e.fieldsArray.slice().sort($r.compareFieldsById);if(!t.length)return $r.codegen()("return {}");for(var o=$r.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),s=[],a=[],i=[],n=0;n{"use strict";var upe=tq,fpe=f_();upe[".google.protobuf.Any"]={fromObject:function(r){if(r&&r["@type"]){var e=r["@type"].substring(r["@type"].lastIndexOf("/")+1),t=this.lookup(e);if(t){var o=r["@type"].charAt(0)==="."?r["@type"].slice(1):r["@type"];return o.indexOf("/")===-1&&(o="/"+o),this.create({type_url:o,value:t.encode(t.fromObject(r)).finish()})}}return this.fromObject(r)},toObject:function(r,e){var t="type.googleapis.com/",o="",s="";if(e&&e.json&&r.type_url&&r.value){s=r.type_url.substring(r.type_url.lastIndexOf("/")+1),o=r.type_url.substring(0,r.type_url.lastIndexOf("/")+1);var a=this.lookup(s);a&&(r=a.decode(r.value))}if(!(r instanceof this.ctor)&&r instanceof fpe){var i=r.$type.toObject(r,e),n=r.$type.fullName[0]==="."?r.$type.fullName.slice(1):r.$type.fullName;return o===""&&(o=t),s=o+n,i["@type"]=s,i}return this.toObject(r,e)}}});var h_=T((dFe,nq)=>{"use strict";nq.exports=Re;var or=ua();((Re.prototype=Object.create(or.prototype)).constructor=Re).className="Type";var ppe=Ar(),Ry=uo(),p_=ti(),dpe=l_(),hpe=u_(),Oy=f_(),Ay=Oh(),_pe=vh(),_t=rt(),Epe=Ny(),mpe=_y(),Tpe=Ty(),rq=vy(),Spe=yy();function Re(r,e){or.call(this,r,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(Re.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var r=Object.keys(this.fields),e=0;e{t._resolveFeatures(e)}),this.fieldsArray.forEach(t=>{t._resolveFeatures(e)}),this):this};Re.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null};Re.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof p_&&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),d_(this)}return e instanceof Ry?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),d_(this)):or.prototype.add.call(this,e)};Re.prototype.remove=function(e){if(e instanceof p_&&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),d_(this)}if(e instanceof Ry){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),d_(this)}return or.prototype.remove.call(this,e)};Re.prototype.isReservedId=function(e){return or.isReservedId(this.reserved,e)};Re.prototype.isReservedName=function(e){return or.isReservedName(this.reserved,e)};Re.prototype.create=function(e){return new this.ctor(e)};Re.prototype.setup=function(){for(var e=this.fullName,t=[],o=0;o{"use strict";sq.exports=Ft;var m_=ua();((Ft.prototype=Object.create(m_.prototype)).constructor=Ft).className="Root";var __=ti(),Cy=Ar(),gpe=uo(),ni=rt(),Py,Iy,Fc;function Ft(r){m_.call(this,"",r),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}Ft.fromJSON=function(e,t){return t||(t=new Ft),e.options&&t.setOptions(e.options),t.addJSON(e.nested).resolveAll()};Ft.prototype.resolvePath=ni.path.resolve;Ft.prototype.fetch=ni.fetch;function oq(){}Ft.prototype.load=function r(e,t,o){typeof t=="function"&&(o=t,t=void 0);var s=this;if(!o)return ni.asPromise(r,s,e,t);var a=o===oq;function i(m,O){if(o){if(a)throw m;O&&O.resolveAll();var y=o;o=null,y(m,O)}}function n(m){var O=m.lastIndexOf("google/protobuf/");if(O>-1){var y=m.substring(O);if(y in Fc)return y}return null}function l(m,O){try{if(ni.isString(O)&&O.charAt(0)==="{"&&(O=JSON.parse(O)),!ni.isString(O))s.setOptions(O.options).addJSON(O.nested);else{Iy.filename=m;var y=Iy(O,s,t),A,I=0;if(y.imports)for(;I-1)){if(s.files.push(m),m in Fc){a?l(m,Fc[m]):(++u,setTimeout(function(){--u,l(m,Fc[m])}));return}if(a){var y;try{y=ni.fs.readFileSync(m).toString("utf8")}catch(A){O||i(A);return}l(m,y)}else++u,s.fetch(m,function(A,I){if(--u,!!o){if(A){O?u||i(null,s):i(A);return}l(m,I)}})}}var u=0;ni.isString(e)&&(e=[e]);for(var f=0,_;f-1&&this.deferred.splice(t,1)}}else if(e instanceof Cy)E_.test(e.name)&&delete e.parent[e.name];else if(e instanceof m_){for(var o=0;o{"use strict";var He=lq.exports=Fr(),aq=ov(),by,Ly;He.codegen=UH();He.fetch=BH();He.path=GH();He.fs=He.inquire("fs");He.toArray=function(e){if(e){for(var t=Object.keys(e),o=new Array(t.length),s=0;s0)i[c]=a(i[c]||{},n,l);else{var u=i[c];if(u&&s)return i;u&&(l=[].concat(u).concat(l)),i[c]=l}return i}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,o)};Object.defineProperty(He,"decorateRoot",{get:function(){return aq.decorated||(aq.decorated=new(T_()))}})});var fo=T(cq=>{"use strict";var Gc=cq,Rpe=rt(),Npe=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function Hc(r,e){var t=0,o={};for(e|=0;t{"use strict";fq.exports=nt;var jc=ri();((nt.prototype=Object.create(jc.prototype)).constructor=nt).className="Field";var uq=Ar(),xy=fo(),Ke=rt(),qc,Cpe=/^required|optional|repeated$/;nt.fromJSON=function(e,t){var o=new nt(e,t.id,t.type,t.rule,t.extend,t.options,t.comment);return t.edition&&(o._edition=t.edition),o._defaultEdition="proto3",o};function nt(r,e,t,o,s,a,i){if(Ke.isObject(o)?(i=s,a=o,o=s=void 0):Ke.isObject(s)&&(i=a,a=s,s=void 0),jc.call(this,r,a),!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(o!==void 0&&!Cpe.test(o=o.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(s!==void 0&&!Ke.isString(s))throw TypeError("extend must be a string");o==="proto3_optional"&&(o="optional"),this.rule=o&&o!=="optional"?o:void 0,this.type=t,this.id=e,this.extend=s||void 0,this.repeated=o==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=Ke.Long?xy.long[t]!==void 0:!1,this.bytes=t==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=i}Object.defineProperty(nt.prototype,"required",{get:function(){return this._features.field_presence==="LEGACY_REQUIRED"}});Object.defineProperty(nt.prototype,"optional",{get:function(){return!this.required}});Object.defineProperty(nt.prototype,"delimited",{get:function(){return this.resolvedType instanceof qc&&this._features.message_encoding==="DELIMITED"}});Object.defineProperty(nt.prototype,"packed",{get:function(){return this._features.repeated_field_encoding==="PACKED"}});Object.defineProperty(nt.prototype,"hasPresence",{get:function(){return this.repeated||this.map?!1:this.partOf||this.declaringField||this.extensionField||this._features.field_presence!=="IMPLICIT"}});nt.prototype.setOption=function(e,t,o){return jc.prototype.setOption.call(this,e,t,o)};nt.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return Ke.toObject(["edition",this._editionToJSON(),"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])};nt.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=xy.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof qc?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 uq&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof uq)&&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 qc&&(this.parent.ctor.prototype[this.name]=this.defaultValue),jc.prototype.resolve.call(this)};nt.prototype._inferLegacyProtoFeatures=function(e){if(e!=="proto2"&&e!=="proto3")return{};var t={};if(this.rule==="required"&&(t.field_presence="LEGACY_REQUIRED"),this.parent&&xy.defaults[this.type]===void 0){var o=this.parent.get(this.type.split(".").pop());o&&o instanceof qc&&o.group&&(t.message_encoding="DELIMITED")}return this.getOption("packed")===!0?t.repeated_field_encoding="PACKED":this.getOption("packed")===!1&&(t.repeated_field_encoding="EXPANDED"),t};nt.prototype._resolveFeatures=function(e){return jc.prototype._resolveFeatures.call(this,this._edition||e)};nt.d=function(e,t,o,s){return typeof t=="function"?t=Ke.decorateType(t).name:t&&typeof t=="object"&&(t=Ke.decorateEnum(t).name),function(i,n){Ke.decorateType(i.constructor).add(new nt(n,e,t,o,{default:s}))}};nt._configure=function(e){qc=e}});var uo=T((TFe,hq)=>{"use strict";hq.exports=Gt;var g_=ri();((Gt.prototype=Object.create(g_.prototype)).constructor=Gt).className="OneOf";var pq=ti(),S_=rt();function Gt(r,e,t,o){if(Array.isArray(e)||(t=e,e=void 0),g_.call(this,r,t),!(e===void 0||Array.isArray(e)))throw TypeError("fieldNames must be an Array");this.oneof=e||[],this.fieldsArray=[],this.comment=o}Gt.fromJSON=function(e,t){return new Gt(e,t.oneof,t.options,t.comment)};Gt.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return S_.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])};function dq(r){if(r.parent)for(var e=0;e-1&&this.oneof.splice(t,1),e.partOf=null,this};Gt.prototype.onAdd=function(e){g_.prototype.onAdd.call(this,e);for(var t=this,o=0;o{"use strict";_q.exports=ct;ct.className="ReflectionObject";var Ppe=uo(),Yc=rt(),v_,Ipe={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"},bpe={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE"},Lpe={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"};function ct(r,e){if(!Yc.isString(r))throw TypeError("name must be a string");if(e&&!Yc.isObject(e))throw TypeError("options must be an object");this.options=e,this.parsedOptions=null,this.name=r,this._edition=null,this._defaultEdition="proto2",this._features={},this._featuresResolved=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(ct.prototype,{root:{get:function(){for(var r=this;r.parent!==null;)r=r.parent;return r}},fullName:{get:function(){for(var r=[this.name],e=this.parent;e;)r.unshift(e.name),e=e.parent;return r.join(".")}}});ct.prototype.toJSON=function(){throw Error()};ct.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 v_&&t._handleAdd(this)};ct.prototype.onRemove=function(e){var t=e.root;t instanceof v_&&t._handleRemove(this),this.parent=null,this.resolved=!1};ct.prototype.resolve=function(){return this.resolved?this:(this.root instanceof v_&&(this.resolved=!0),this)};ct.prototype._resolveFeaturesRecursive=function(e){return this._resolveFeatures(this._edition||e)};ct.prototype._resolveFeatures=function(e){if(!this._featuresResolved){var t={};if(!e)throw new Error("Unknown edition for "+this.fullName);var o=Object.assign(this.options?Object.assign({},this.options.features):{},this._inferLegacyProtoFeatures(e));if(this._edition){if(e==="proto2")t=Object.assign({},bpe);else if(e==="proto3")t=Object.assign({},Lpe);else if(e==="2023")t=Object.assign({},Ipe);else throw new Error("Unknown edition: "+e);this._features=Object.assign(t,o||{}),this._featuresResolved=!0;return}if(this.partOf instanceof Ppe){var s=Object.assign({},this.partOf._features);this._features=Object.assign(s,o||{})}else if(!this.declaringField)if(this.parent){var a=Object.assign({},this.parent._features);this._features=Object.assign(a,o||{})}else throw new Error("Unable to find a parent for "+this.fullName);this.extensionField&&(this.extensionField._features=this._features),this._featuresResolved=!0}};ct.prototype._inferLegacyProtoFeatures=function(){return{}};ct.prototype.getOption=function(e){if(this.options)return this.options[e]};ct.prototype.setOption=function(e,t,o){return this.options||(this.options={}),/^features\./.test(e)?Yc.setProperty(this.options,e,t,o):(!o||this.options[e]===void 0)&&(this.getOption(e)!==t&&(this.resolved=!1),this.options[e]=t),this};ct.prototype.setParsedOption=function(e,t,o){this.parsedOptions||(this.parsedOptions=[]);var s=this.parsedOptions;if(o){var a=s.find(function(l){return Object.prototype.hasOwnProperty.call(l,e)});if(a){var i=a[e];Yc.setProperty(i,o,t)}else a={},a[e]=Yc.setProperty({},o,t),s.push(a)}else{var n={};n[e]=t,s.push(n)}return this};ct.prototype.setOptions=function(e,t){if(e)for(var o=Object.keys(e),s=0;s{"use strict";mq.exports=Rr;var My=ri();((Rr.prototype=Object.create(My.prototype)).constructor=Rr).className="Enum";var Eq=ua(),y_=rt();function Rr(r,e,t,o,s,a){if(My.call(this,r,t),e&&typeof e!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=s||{},this.valuesOptions=a,this._valuesFeatures={},this.reserved=void 0,e)for(var i=Object.keys(e),n=0;n{var o=Object.assign({},this._features);this._valuesFeatures[t]=Object.assign(o,this.valuesOptions&&this.valuesOptions[t]&&this.valuesOptions[t].features)}),this};Rr.fromJSON=function(e,t){var o=new Rr(e,t.values,t.options,t.comment,t.comments);return o.reserved=t.reserved,t.edition&&(o._edition=t.edition),o._defaultEdition="proto3",o};Rr.prototype.toJSON=function(e){var t=e?!!e.keepComments:!1;return y_.toObject(["edition",this._editionToJSON(),"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])};Rr.prototype.add=function(e,t,o,s){if(!y_.isString(e))throw TypeError("name must be a string");if(!y_.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 s&&(this.valuesOptions===void 0&&(this.valuesOptions={}),this.valuesOptions[e]=s||null),this.comments[e]=o||null,this};Rr.prototype.remove=function(e){if(!y_.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};Rr.prototype.isReservedId=function(e){return Eq.isReservedId(this.reserved,e)};Rr.prototype.isReservedName=function(e){return Eq.isReservedName(this.reserved,e)}});var Ny=T((vFe,Sq)=>{"use strict";Sq.exports=Mpe;var xpe=Ar(),wy=fo(),Dy=rt();function Tq(r,e,t,o){return e.delimited?r("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",t,o,(e.id<<3|3)>>>0,(e.id<<3|4)>>>0):r("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",t,o,(e.id<<3|2)>>>0)}function Mpe(r){for(var e=Dy.codegen(["m","w"],r.name+"$encode")("if(!w)")("w=Writer.create()"),t,o,s=r.fieldsArray.slice().sort(Dy.compareFieldsById),t=0;t>>0,8|wy.mapKey[a.keyType],a.keyType),l===void 0?e("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",i,o):e(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|l,n,o),e("}")("}")):a.repeated?(e("if(%s!=null&&%s.length){",o,o),a.packed&&wy.packed[n]!==void 0?e("w.uint32(%i).fork()",(a.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",o)("w.%s(%s[i])",n,o)("w.ldelim()"):(e("for(var i=0;i<%s.length;++i)",o),l===void 0?Tq(e,a,i,o+"[i]"):e("w.uint32(%i).%s(%s[i])",(a.id<<3|l)>>>0,n,o)),e("}")):(a.optional&&e("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",o,a.name),l===void 0?Tq(e,a,i,o):e("w.uint32(%i).%s(%s)",(a.id<<3|l)>>>0,n,o))}return e("return w")}});var vq=T((yFe,gq)=>{"use strict";var de=gq.exports=sv();de.build="light";function wpe(r,e,t){return typeof e=="function"?(t=e,e=new de.Root):e||(e=new de.Root),e.load(r,t)}de.load=wpe;function Dpe(r,e){return e||(e=new de.Root),e.loadSync(r)}de.loadSync=Dpe;de.encoder=Ny();de.decoder=_y();de.verifier=Ty();de.converter=vy();de.ReflectionObject=ri();de.Namespace=ua();de.Root=T_();de.Enum=Ar();de.Type=h_();de.Field=ti();de.OneOf=uo();de.MapField=l_();de.Service=u_();de.Method=c_();de.Message=f_();de.wrappers=yy();de.types=fo();de.util=rt();de.ReflectionObject._configure(de.Root);de.Namespace._configure(de.Type,de.Service,de.Enum);de.Root._configure(de.Type);de.Field._configure(de.Type)});var ky=T((OFe,Aq)=>{"use strict";Aq.exports=Oq;var Uy=/[\s{}=;:[\],'"()<>]/g,Upe=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,kpe=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,Bpe=/^ *[*/]+ */,Vpe=/^\s*\*?\/*/,Fpe=/\n/g,Gpe=/\s/,Hpe=/\\(.?)/g,qpe={0:"\0",r:"\r",n:` `,t:" "};function yq(r){return r.replace(Hpe,function(e,t){switch(t){case"\\":case"":return t;default:return qpe[t]||""}})}Oq.unescape=yq;function Oq(r,e){r=r.toString();var t=0,o=r.length,s=1,a=0,i={},n=[],l=null;function c(N){return Error("illegal "+N+" (line "+s+")")}function u(){var N=l==="'"?kpe:Upe;N.lastIndex=t-1;var z=N.exec(r);if(!z)throw c("string");return t=N.lastIndex,A(l),l=null,yq(z[1])}function f(N){return r.charAt(N)}function _(N,z,B){var G={type:r.charAt(N++),lineEmpty:!1,leading:B},te;e?te=2:te=3;var $=N-te,le;do if(--$<0||(le=r.charAt($))===` `){G.lineEmpty=!0;break}while(le===" "||le===" ");for(var v=r.substring(N,z).split(Fpe),W=0;W0)return n.shift();if(l)return u();var N,z,B,G,te,$=t===0;do{if(t===o)return null;for(N=!1;Gpe.test(B=f(t));)if(B===` `&&($=!0,++s),++t===o)return null;if(f(t)==="/"){if(++t===o)throw c("comment");if(f(t)==="/")if(e){if(G=t,te=!1,m(t-1)){te=!0;do if(t=O(t),t===o||(t++,!$))break;while(m(t))}else t=Math.min(o,O(t)+1);te&&(_(G,t,$),$=!0),s++,N=!0}else{for(te=f(G=t+1)==="/";f(++t)!==` `;)if(t===o)return null;++t,te&&(_(G,t-1,$),$=!0),++s,N=!0}else if((B=f(t))==="*"){G=t+1,te=e||f(G)==="*";do{if(B===` `&&++s,++t===o)throw c("comment");z=B,B=f(t)}while(z!=="*"||B!=="/");++t,te&&(_(G,t-2,$),$=!0),N=!0}else return"/"}}while(N);var le=t;Uy.lastIndex=0;var v=Uy.test(f(le++));if(!v)for(;le{"use strict";Iq.exports=vn;vn.filename=null;vn.defaults={keepCase:!1};var jpe=ky(),Rq=T_(),Nq=h_(),Cq=ti(),Ype=l_(),Pq=uo(),zpe=Ar(),Kpe=u_(),$pe=c_(),Xpe=ri(),Wpe=fo(),By=rt(),Jpe=/^[1-9][0-9]*$/,Qpe=/^-?[1-9][0-9]*$/,Zpe=/^0[x][0-9a-fA-F]+$/,ede=/^-?0[x][0-9a-fA-F]+$/,tde=/^0[0-7]+$/,rde=/^-?0[0-7]+$/,nde=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,Xr=/^[a-zA-Z_][a-zA-Z_0-9]*$/,Wr=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;function vn(r,e,t){e instanceof Rq||(t=e,e=new Rq),t||(t=vn.defaults);var o=t.preferTrailingComment||!1,s=jpe(r,t.alternateCommentMode||!1),a=s.next,i=s.push,n=s.peek,l=s.skip,c=s.cmnt,u=!0,f,_,m,O="proto2",y=e,A=[],I={},M=t.keepCase?function(L){return L}:By.camelCase;function F(){A.forEach(L=>{L._edition=O,Object.keys(I).forEach(b=>{L.getOption(b)===void 0&&L.setOption(b,I[b],!0)})})}function N(L,b,x){var j=vn.filename;return x||(vn.filename=null),Error("illegal "+(b||"token")+" '"+L+"' ("+(j?j+", ":"")+"line "+s.line+")")}function z(){var L=[],b;do{if((b=a())!=='"'&&b!=="'")throw N(b);L.push(a()),l(b),b=n()}while(b==='"'||b==="'");return L.join("")}function B(L){var b=a();switch(b){case"'":case'"':return i(b),z();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return te(b,!0)}catch{if(L&&Wr.test(b))return b;throw N(b,"value")}}function G(L,b){var x,j;do if(b&&((x=n())==='"'||x==="'")){var q=z();if(L.push(q),O>=2023)throw N(q,"id")}else try{L.push([j=$(a()),l("to",!0)?$(a()):j])}catch(Le){if(b&&Wr.test(x)&&O>=2023)L.push(x);else throw Le}while(l(",",!0));var ne={options:void 0};ne.setOption=function(Le,ut){this.options===void 0&&(this.options={}),this.options[Le]=ut},C(ne,function(ut){if(ut==="option")Z(ne,ut),l(";");else throw N(ut)},function(){We(ne)})}function te(L,b){var x=1;switch(L.charAt(0)==="-"&&(x=-1,L=L.substring(1)),L){case"inf":case"INF":case"Inf":return x*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(Jpe.test(L))return x*parseInt(L,10);if(Zpe.test(L))return x*parseInt(L,16);if(tde.test(L))return x*parseInt(L,8);if(nde.test(L))return x*parseFloat(L);throw N(L,"number",b)}function $(L,b){switch(L){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!b&&L.charAt(0)==="-")throw N(L,"id");if(Qpe.test(L))return parseInt(L,10);if(ede.test(L))return parseInt(L,16);if(rde.test(L))return parseInt(L,8);throw N(L,"id")}function le(){if(f!==void 0)throw N("package");if(f=a(),!Wr.test(f))throw N(f,"name");y=y.define(f),l(";")}function v(){var L=n(),b;switch(L){case"weak":b=m||(m=[]),a();break;case"public":a();default:b=_||(_=[]);break}L=z(),l(";"),b.push(L)}function W(){if(l("="),O=z(),O<2023)throw N(O,"syntax");l(";")}function R(){if(l("="),O=z(),!["2023"].includes(O))throw N(O,"edition");l(";")}function E(L,b){switch(b){case"option":return Z(L,b),l(";"),!0;case"message":return Q(L,b),!0;case"enum":return Me(L,b),!0;case"service":return wo(L,b),!0;case"extend":return _i(L,b),!0}return!1}function C(L,b,x){var j=s.line;if(L&&(typeof L.comment!="string"&&(L.comment=c()),L.filename=vn.filename),l("{",!0)){for(var q;(q=a())!=="}";)b(q);l(";",!0)}else x&&x(),l(";"),L&&(typeof L.comment!="string"||o)&&(L.comment=c(j)||L.comment)}function Q(L,b){if(!Xr.test(b=a()))throw N(b,"type name");var x=new Nq(b);C(x,function(q){if(!E(x,q))switch(q){case"map":ce(x,q);break;case"required":if(O!=="proto2")throw N(q);case"repeated":Y(x,q);break;case"optional":if(O==="proto3")Y(x,"proto3_optional");else{if(O!=="proto2")throw N(q);Y(x,"optional")}break;case"oneof":Ne(x,q);break;case"extensions":G(x.extensions||(x.extensions=[]));break;case"reserved":G(x.reserved||(x.reserved=[]),!0);break;default:if(O==="proto2"||!Wr.test(q))throw N(q);i(q),Y(x,"optional");break}}),L.add(x),L===y&&A.push(x)}function Y(L,b,x){var j=a();if(j==="group"){J(L,b);return}for(;j.endsWith(".")||n().startsWith(".");)j+=a();if(!Wr.test(j))throw N(j,"type");var q=a();if(!Xr.test(q))throw N(q,"name");q=M(q),l("=");var ne=new Cq(q,$(a()),j,b,x);if(C(ne,function(Et){if(Et==="option")Z(ne,Et),l(";");else throw N(Et)},function(){We(ne)}),b==="proto3_optional"){var Le=new Pq("_"+q);ne.setOption("proto3_optional",!0),Le.add(ne),L.add(Le)}else L.add(ne);L===y&&A.push(ne)}function J(L,b){if(O>=2023)throw N("group");var x=a();if(!Xr.test(x))throw N(x,"name");var j=By.lcFirst(x);x===j&&(x=By.ucFirst(x)),l("=");var q=$(a()),ne=new Nq(x);ne.group=!0;var Le=new Cq(j,q,x,b);Le.filename=vn.filename,C(ne,function(Et){switch(Et){case"option":Z(ne,Et),l(";");break;case"required":case"repeated":Y(ne,Et);break;case"optional":O==="proto3"?Y(ne,"proto3_optional"):Y(ne,"optional");break;case"message":Q(ne,Et);break;case"enum":Me(ne,Et);break;case"reserved":G(ne.reserved||(ne.reserved=[]),!0);break;default:throw N(Et)}}),L.add(ne).add(Le)}function ce(L){l("<");var b=a();if(Wpe.mapKey[b]===void 0)throw N(b,"type");l(",");var x=a();if(!Wr.test(x))throw N(x,"type");l(">");var j=a();if(!Xr.test(j))throw N(j,"name");l("=");var q=new Ype(M(j),$(a()),b,x);C(q,function(Le){if(Le==="option")Z(q,Le),l(";");else throw N(Le)},function(){We(q)}),L.add(q)}function Ne(L,b){if(!Xr.test(b=a()))throw N(b,"name");var x=new Pq(M(b));C(x,function(q){q==="option"?(Z(x,q),l(";")):(i(q),Y(x,"optional"))}),L.add(x)}function Me(L,b){if(!Xr.test(b=a()))throw N(b,"name");var x=new zpe(b);C(x,function(q){switch(q){case"option":Z(x,q),l(";");break;case"reserved":G(x.reserved||(x.reserved=[]),!0),x.reserved===void 0&&(x.reserved=[]);break;default:Te(x,q)}}),L.add(x),L===y&&A.push(x)}function Te(L,b){if(!Xr.test(b))throw N(b,"name");l("=");var x=$(a(),!0),j={options:void 0};j.getOption=function(q){return this.options[q]},j.setOption=function(q,ne){Xpe.prototype.setOption.call(j,q,ne)},j.setParsedOption=function(){},C(j,function(ne){if(ne==="option")Z(j,ne),l(";");else throw N(ne)},function(){We(j)}),L.add(b,x,j.comment,j.parsedOptions||j.options)}function Z(L,b){var x,j,q=!0;for(b==="option"&&(b=a());b!=="=";){if(b==="("){var ne=a();l(")"),b="("+ne+")"}if(q){if(q=!1,b.includes(".")&&!b.includes("(")){var Le=b.split(".");x=Le[0]+".",b=Le[1];continue}x=b}else j=j?j+=b:b;b=a()}var ut=j?x.concat(j):x,Et=je(L,ut);j=j&&j[0]==="."?j.slice(1):j,x=x&&x[x.length-1]==="."?x.slice(0,-1):x,we(L,x,Et,j)}function je(L,b){if(l("{",!0)){for(var x={};!l("}",!0);){if(!Xr.test(Ye=a()))throw N(Ye,"name");if(Ye===null)throw N(Ye,"end of input");var j,q=Ye;if(l(":",!0),n()==="{")j=je(L,b+"."+Ye);else if(n()==="["){j=[];var ne;if(l("[",!0)){do ne=B(!0),j.push(ne);while(l(",",!0));l("]"),typeof ne<"u"&&me(L,b+"."+Ye,ne)}}else j=B(!0),me(L,b+"."+Ye,j);var Le=x[q];Le&&(j=[].concat(Le).concat(j)),x[q]=j,l(",",!0),l(";",!0)}return x}var ut=B(!0);return me(L,b,ut),ut}function me(L,b,x){if(y===L&&/^features\./.test(b)){I[b]=x;return}L.setOption&&L.setOption(b,x)}function we(L,b,x,j){L.setParsedOption&&L.setParsedOption(b,x,j)}function We(L){if(l("[",!0)){do Z(L,"option");while(l(",",!0));l("]")}return L}function wo(L,b){if(!Xr.test(b=a()))throw N(b,"service name");var x=new Kpe(b);C(x,function(q){if(!E(x,q))if(q==="rpc")Do(x,q);else throw N(q)}),L.add(x),L===y&&A.push(x)}function Do(L,b){var x=c(),j=b;if(!Xr.test(b=a()))throw N(b,"name");var q=b,ne,Le,ut,Et;if(l("("),l("stream",!0)&&(Le=!0),!Wr.test(b=a())||(ne=b,l(")"),l("returns"),l("("),l("stream",!0)&&(Et=!0),!Wr.test(b=a())))throw N(b);ut=b,l(")");var Lu=new $pe(q,j,ne,ut,Le,Et);Lu.comment=x,C(Lu,function(dm){if(dm==="option")Z(Lu,dm),l(";");else throw N(dm)}),L.add(Lu)}function _i(L,b){if(!Wr.test(b=a()))throw N(b,"reference");var x=b;C(null,function(q){switch(q){case"required":case"repeated":Y(L,q,x);break;case"optional":O==="proto3"?Y(L,"proto3_optional",x):Y(L,"optional",x);break;default:if(O==="proto2"||!Wr.test(q))throw N(q);i(q),Y(L,"optional",x);break}})}for(var Ye;(Ye=a())!==null;)switch(Ye){case"package":if(!u)throw N(Ye);le();break;case"import":if(!u)throw N(Ye);v();break;case"syntax":if(!u)throw N(Ye);W();break;case"edition":if(!u)throw N(Ye);R();break;case"option":Z(y,Ye),l(";",!0);break;default:if(E(y,Ye)){u=!1;continue}throw N(Ye)}return F(),vn.filename=null,{package:f,imports:_,weakImports:m,root:e}}});var Mq=T((RFe,xq)=>{"use strict";xq.exports=Nr;var ide=/\/|\./;function Nr(r,e){ide.test(r)||(r="google/protobuf/"+r+".proto",e={nested:{google:{nested:{protobuf:{nested:e}}}}}),Nr[r]=e}Nr("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var Lq;Nr("duration",{Duration:Lq={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}});Nr("timestamp",{Timestamp:Lq});Nr("empty",{Empty:{fields:{}}});Nr("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}}}});Nr("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}}}});Nr("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}});Nr.get=function(e){return Nr[e]||null}});var Dq=T((NFe,wq)=>{"use strict";var ii=wq.exports=vq();ii.build="full";ii.tokenize=ky();ii.parse=bq();ii.common=Mq();ii.Root._configure(ii.Type,ii.parse,ii.common)});var O_=T((CFe,Uq)=>{"use strict";Uq.exports=Dq()});var Vy=T((PFe,ode)=>{ode.exports={nested:{google:{nested:{protobuf:{options:{go_package:"google.golang.org/protobuf/types/descriptorpb",java_package:"com.google.protobuf",java_outer_classname:"DescriptorProtos",csharp_namespace:"Google.Protobuf.Reflection",objc_class_prefix:"GPB",cc_enable_arenas:!0,optimize_for:"SPEED"},nested:{FileDescriptorSet:{edition:"proto2",fields:{file:{rule:"repeated",type:"FileDescriptorProto",id:1}},extensions:[[536e6,536e6]]},Edition:{edition:"proto2",values:{EDITION_UNKNOWN:0,EDITION_LEGACY:900,EDITION_PROTO2:998,EDITION_PROTO3:999,EDITION_2023:1e3,EDITION_2024:1001,EDITION_1_TEST_ONLY:1,EDITION_2_TEST_ONLY:2,EDITION_99997_TEST_ONLY:99997,EDITION_99998_TEST_ONLY:99998,EDITION_99999_TEST_ONLY:99999,EDITION_MAX:2147483647}},FileDescriptorProto:{edition:"proto2",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},weakDependency:{rule:"repeated",type:"int32",id:11},optionDependency:{rule:"repeated",type:"string",id:15},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},edition:{type:"Edition",id:14}}},DescriptorProto:{edition:"proto2",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},visibility:{type:"SymbolVisibility",id:11}},nested:{ExtensionRange:{fields:{start:{type:"int32",id:1},end:{type:"int32",id:2},options:{type:"ExtensionRangeOptions",id:3}}},ReservedRange:{fields:{start:{type:"int32",id:1},end:{type:"int32",id:2}}}}},ExtensionRangeOptions:{edition:"proto2",fields:{uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999},declaration:{rule:"repeated",type:"Declaration",id:2,options:{retention:"RETENTION_SOURCE"}},features:{type:"FeatureSet",id:50},verification:{type:"VerificationState",id:3,options:{default:"UNVERIFIED",retention:"RETENTION_SOURCE"}}},extensions:[[1e3,536870911]],nested:{Declaration:{fields:{number:{type:"int32",id:1},fullName:{type:"string",id:2},type:{type:"string",id:3},reserved:{type:"bool",id:5},repeated:{type:"bool",id:6}},reserved:[[4,4]]},VerificationState:{values:{DECLARATION:0,UNVERIFIED:1}}}},FieldDescriptorProto:{edition:"proto2",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},proto3Optional:{type:"bool",id:17}},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_REPEATED:3,LABEL_REQUIRED:2}}}},OneofDescriptorProto:{edition:"proto2",fields:{name:{type:"string",id:1},options:{type:"OneofOptions",id:2}}},EnumDescriptorProto:{edition:"proto2",fields:{name:{type:"string",id:1},value:{rule:"repeated",type:"EnumValueDescriptorProto",id:2},options:{type:"EnumOptions",id:3},reservedRange:{rule:"repeated",type:"EnumReservedRange",id:4},reservedName:{rule:"repeated",type:"string",id:5},visibility:{type:"SymbolVisibility",id:6}},nested:{EnumReservedRange:{fields:{start:{type:"int32",id:1},end:{type:"int32",id:2}}}}},EnumValueDescriptorProto:{edition:"proto2",fields:{name:{type:"string",id:1},number:{type:"int32",id:2},options:{type:"EnumValueOptions",id:3}}},ServiceDescriptorProto:{edition:"proto2",fields:{name:{type:"string",id:1},method:{rule:"repeated",type:"MethodDescriptorProto",id:2},options:{type:"ServiceOptions",id:3}}},MethodDescriptorProto:{edition:"proto2",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:{edition:"proto2",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,options:{default:!0}},objcClassPrefix:{type:"string",id:36},csharpNamespace:{type:"string",id:37},swiftPrefix:{type:"string",id:39},phpClassPrefix:{type:"string",id:40},phpNamespace:{type:"string",id:41},phpMetadataNamespace:{type:"string",id:44},rubyPackage:{type:"string",id:45},features:{type:"FeatureSet",id:50},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],reserved:[[42,42],"php_generic_services",[38,38]],nested:{OptimizeMode:{values:{SPEED:1,CODE_SIZE:2,LITE_RUNTIME:3}}}},MessageOptions:{edition:"proto2",fields:{messageSetWireFormat:{type:"bool",id:1},noStandardDescriptorAccessor:{type:"bool",id:2},deprecated:{type:"bool",id:3},mapEntry:{type:"bool",id:7},deprecatedLegacyJsonFieldConflicts:{type:"bool",id:11,options:{deprecated:!0}},features:{type:"FeatureSet",id:12},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],reserved:[[4,4],[5,5],[6,6],[8,8],[9,9]]},FieldOptions:{edition:"proto2",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},unverifiedLazy:{type:"bool",id:15},deprecated:{type:"bool",id:3},weak:{type:"bool",id:10,options:{deprecated:!0}},debugRedact:{type:"bool",id:16},retention:{type:"OptionRetention",id:17},targets:{rule:"repeated",type:"OptionTargetType",id:19},editionDefaults:{rule:"repeated",type:"EditionDefault",id:20},features:{type:"FeatureSet",id:21},featureSupport:{type:"FeatureSupport",id:22},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],reserved:[[4,4],[18,18]],nested:{CType:{values:{STRING:0,CORD:1,STRING_PIECE:2}},JSType:{values:{JS_NORMAL:0,JS_STRING:1,JS_NUMBER:2}},OptionRetention:{values:{RETENTION_UNKNOWN:0,RETENTION_RUNTIME:1,RETENTION_SOURCE:2}},OptionTargetType:{values:{TARGET_TYPE_UNKNOWN:0,TARGET_TYPE_FILE:1,TARGET_TYPE_EXTENSION_RANGE:2,TARGET_TYPE_MESSAGE:3,TARGET_TYPE_FIELD:4,TARGET_TYPE_ONEOF:5,TARGET_TYPE_ENUM:6,TARGET_TYPE_ENUM_ENTRY:7,TARGET_TYPE_SERVICE:8,TARGET_TYPE_METHOD:9}},EditionDefault:{fields:{edition:{type:"Edition",id:3},value:{type:"string",id:2}}},FeatureSupport:{fields:{editionIntroduced:{type:"Edition",id:1},editionDeprecated:{type:"Edition",id:2},deprecationWarning:{type:"string",id:3},editionRemoved:{type:"Edition",id:4}}}}},OneofOptions:{edition:"proto2",fields:{features:{type:"FeatureSet",id:1},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},EnumOptions:{edition:"proto2",fields:{allowAlias:{type:"bool",id:2},deprecated:{type:"bool",id:3},deprecatedLegacyJsonFieldConflicts:{type:"bool",id:6,options:{deprecated:!0}},features:{type:"FeatureSet",id:7},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],reserved:[[5,5]]},EnumValueOptions:{edition:"proto2",fields:{deprecated:{type:"bool",id:1},features:{type:"FeatureSet",id:2},debugRedact:{type:"bool",id:3},featureSupport:{type:"FieldOptions.FeatureSupport",id:4},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},ServiceOptions:{edition:"proto2",fields:{features:{type:"FeatureSet",id:34},deprecated:{type:"bool",id:33},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},MethodOptions:{edition:"proto2",fields:{deprecated:{type:"bool",id:33},idempotencyLevel:{type:"IdempotencyLevel",id:34,options:{default:"IDEMPOTENCY_UNKNOWN"}},features:{type:"FeatureSet",id:35},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],nested:{IdempotencyLevel:{values:{IDEMPOTENCY_UNKNOWN:0,NO_SIDE_EFFECTS:1,IDEMPOTENT:2}}}},UninterpretedOption:{edition:"proto2",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}}}}},FeatureSet:{edition:"proto2",fields:{fieldPresence:{type:"FieldPresence",id:1,options:{retention:"RETENTION_RUNTIME",targets:"TARGET_TYPE_FILE","feature_support.edition_introduced":"EDITION_2023","edition_defaults.edition":"EDITION_2023","edition_defaults.value":"EXPLICIT"}},enumType:{type:"EnumType",id:2,options:{retention:"RETENTION_RUNTIME",targets:"TARGET_TYPE_FILE","feature_support.edition_introduced":"EDITION_2023","edition_defaults.edition":"EDITION_PROTO3","edition_defaults.value":"OPEN"}},repeatedFieldEncoding:{type:"RepeatedFieldEncoding",id:3,options:{retention:"RETENTION_RUNTIME",targets:"TARGET_TYPE_FILE","feature_support.edition_introduced":"EDITION_2023","edition_defaults.edition":"EDITION_PROTO3","edition_defaults.value":"PACKED"}},utf8Validation:{type:"Utf8Validation",id:4,options:{retention:"RETENTION_RUNTIME",targets:"TARGET_TYPE_FILE","feature_support.edition_introduced":"EDITION_2023","edition_defaults.edition":"EDITION_PROTO3","edition_defaults.value":"VERIFY"}},messageEncoding:{type:"MessageEncoding",id:5,options:{retention:"RETENTION_RUNTIME",targets:"TARGET_TYPE_FILE","feature_support.edition_introduced":"EDITION_2023","edition_defaults.edition":"EDITION_LEGACY","edition_defaults.value":"LENGTH_PREFIXED"}},jsonFormat:{type:"JsonFormat",id:6,options:{retention:"RETENTION_RUNTIME",targets:"TARGET_TYPE_FILE","feature_support.edition_introduced":"EDITION_2023","edition_defaults.edition":"EDITION_PROTO3","edition_defaults.value":"ALLOW"}},enforceNamingStyle:{type:"EnforceNamingStyle",id:7,options:{retention:"RETENTION_SOURCE",targets:"TARGET_TYPE_METHOD","feature_support.edition_introduced":"EDITION_2024","edition_defaults.edition":"EDITION_2024","edition_defaults.value":"STYLE2024"}},defaultSymbolVisibility:{type:"VisibilityFeature.DefaultSymbolVisibility",id:8,options:{retention:"RETENTION_SOURCE",targets:"TARGET_TYPE_FILE","feature_support.edition_introduced":"EDITION_2024","edition_defaults.edition":"EDITION_2024","edition_defaults.value":"EXPORT_TOP_LEVEL"}}},extensions:[[1e3,9994],[9995,9999],[1e4,1e4]],reserved:[[999,999]],nested:{FieldPresence:{values:{FIELD_PRESENCE_UNKNOWN:0,EXPLICIT:1,IMPLICIT:2,LEGACY_REQUIRED:3}},EnumType:{values:{ENUM_TYPE_UNKNOWN:0,OPEN:1,CLOSED:2}},RepeatedFieldEncoding:{values:{REPEATED_FIELD_ENCODING_UNKNOWN:0,PACKED:1,EXPANDED:2}},Utf8Validation:{values:{UTF8_VALIDATION_UNKNOWN:0,VERIFY:2,NONE:3}},MessageEncoding:{values:{MESSAGE_ENCODING_UNKNOWN:0,LENGTH_PREFIXED:1,DELIMITED:2}},JsonFormat:{values:{JSON_FORMAT_UNKNOWN:0,ALLOW:1,LEGACY_BEST_EFFORT:2}},EnforceNamingStyle:{values:{ENFORCE_NAMING_STYLE_UNKNOWN:0,STYLE2024:1,STYLE_LEGACY:2}},VisibilityFeature:{fields:{},reserved:[[1,536870911]],nested:{DefaultSymbolVisibility:{values:{DEFAULT_SYMBOL_VISIBILITY_UNKNOWN:0,EXPORT_ALL:1,EXPORT_TOP_LEVEL:2,LOCAL_ALL:3,STRICT:4}}}}}},FeatureSetDefaults:{edition:"proto2",fields:{defaults:{rule:"repeated",type:"FeatureSetEditionDefault",id:1},minimumEdition:{type:"Edition",id:4},maximumEdition:{type:"Edition",id:5}},nested:{FeatureSetEditionDefault:{fields:{edition:{type:"Edition",id:3},overridableFeatures:{type:"FeatureSet",id:4},fixedFeatures:{type:"FeatureSet",id:5}},reserved:[[1,1],[2,2],"features"]}}},SourceCodeInfo:{edition:"proto2",fields:{location:{rule:"repeated",type:"Location",id:1}},extensions:[[536e6,536e6]],nested:{Location:{fields:{path:{rule:"repeated",type:"int32",id:1,options:{packed:!0}},span:{rule:"repeated",type:"int32",id:2,options:{packed:!0}},leadingComments:{type:"string",id:3},trailingComments:{type:"string",id:4},leadingDetachedComments:{rule:"repeated",type:"string",id:6}}}}},GeneratedCodeInfo:{edition:"proto2",fields:{annotation:{rule:"repeated",type:"Annotation",id:1}},nested:{Annotation:{fields:{path:{rule:"repeated",type:"int32",id:1,options:{packed:!0}},sourceFile:{type:"string",id:2},begin:{type:"int32",id:3},end:{type:"int32",id:4},semantic:{type:"Semantic",id:5}},nested:{Semantic:{values:{NONE:0,SET:1,ALIAS:2}}}}}},SymbolVisibility:{edition:"proto2",values:{VISIBILITY_UNSET:0,VISIBILITY_LOCAL:1,VISIBILITY_EXPORT:2}}}}}}}}});var qq=T((ae,Hq)=>{"use strict";var Ht=O_();Hq.exports=ae=Ht.descriptor=Ht.Root.fromJSON(Vy()).lookup(".google.protobuf");var kq=Ht.Namespace,zc=Ht.Root,yn=Ht.Enum,Jr=Ht.Type,oi=Ht.Field,sde=Ht.MapField,A_=Ht.OneOf,Kc=Ht.Service,R_=Ht.Method;zc.fromDescriptor=function(e){typeof e.length=="number"&&(e=ae.FileDescriptorSet.decode(e));var t=new zc;if(e.file)for(var o,s,a=0,i;a{Tde.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 Yq=T((bFe,Sde)=>{Sde.exports={nested:{google:{nested:{protobuf:{nested:{SourceContext:{fields:{fileName:{type:"string",id:1}}}}}}}}}});var zq=T((LFe,gde)=>{gde.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 Wq=T(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.addCommonProtos=si.loadProtosWithOptionsSync=si.loadProtosWithOptions=void 0;var Kq=V("fs"),$q=V("path"),ha=O_();function Xq(r,e){let t=r.resolvePath;r.resolvePath=(o,s)=>{if($q.isAbsolute(s))return s;for(let a of e){let i=$q.join(a,s);try{return Kq.accessSync(i,Kq.constants.R_OK),i}catch{continue}}return process.emitWarning(`${s} not found in any of the include paths ${e}`),t(o,s)}}async function vde(r,e){let t=new ha.Root;if(e=e||{},e.includeDirs){if(!Array.isArray(e.includeDirs))return Promise.reject(new Error("The includeDirs option must be an array"));Xq(t,e.includeDirs)}let o=await t.load(r,e);return o.resolveAll(),o}si.loadProtosWithOptions=vde;function yde(r,e){let t=new ha.Root;if(e=e||{},e.includeDirs){if(!Array.isArray(e.includeDirs))throw new Error("The includeDirs option must be an array");Xq(t,e.includeDirs)}let o=t.loadSync(r,e);return o.resolveAll(),o}si.loadProtosWithOptionsSync=yde;function Ode(){let r=jq(),e=Vy(),t=Yq(),o=zq();ha.common("api",r.nested.google.nested.protobuf.nested),ha.common("descriptor",e.nested.google.nested.protobuf.nested),ha.common("source_context",t.nested.google.nested.protobuf.nested),ha.common("type",o.nested.google.nested.protobuf.nested)}si.addCommonProtos=Ode});var Jq=T(($c,Gy)=>{(function(r,e){function t(o){return o.default||o}typeof define=="function"&&define.amd?define([],function(){var o={};return e(o),t(o)}):typeof $c=="object"?(e($c),typeof Gy=="object"&&(Gy.exports=t($c))):(function(){var o={};e(o),r.Long=t(o)})()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:$c,function(r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.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(R,E,C){this.low=R|0,this.high=E|0,this.unsigned=!!C}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0});function o(R){return(R&&R.__isLong__)===!0}function s(R){var E=Math.clz32(R&-R);return R?31-E:E}t.isLong=o;var a={},i={};function n(R,E){var C,Q,Y;return E?(R>>>=0,(Y=0<=R&&R<256)&&(Q=i[R],Q)?Q:(C=c(R,0,!0),Y&&(i[R]=C),C)):(R|=0,(Y=-128<=R&&R<128)&&(Q=a[R],Q)?Q:(C=c(R,R<0?-1:0,!1),Y&&(a[R]=C),C))}t.fromInt=n;function l(R,E){if(isNaN(R))return E?N:F;if(E){if(R<0)return N;if(R>=A)return $}else{if(R<=-I)return le;if(R+1>=I)return te}return R<0?l(-R,E).neg():c(R%y|0,R/y|0,E)}t.fromNumber=l;function c(R,E,C){return new t(R,E,C)}t.fromBits=c;var u=Math.pow;function f(R,E,C){if(R.length===0)throw Error("empty string");if(typeof E=="number"?(C=E,E=!1):E=!!E,R==="NaN"||R==="Infinity"||R==="+Infinity"||R==="-Infinity")return E?N:F;if(C=C||10,C<2||360)throw Error("interior hyphen");if(Q===0)return f(R.substring(1),E,C).neg();for(var Y=l(u(C,8)),J=F,ce=0;ce>>0:this.low},v.toNumber=function(){return this.unsigned?(this.high>>>0)*y+(this.low>>>0):this.high*y+(this.low>>>0)},v.toString=function(E){if(E=E||10,E<2||36>>0,Z=Te.toString(E);if(ce=Me,ce.isZero())return Z+Ne;for(;Z.length<6;)Z="0"+Z;Ne=""+Z+Ne}},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 E=this.high!=0?this.high:this.low,C=31;C>0&&(E&1<>21;return E?this.unsigned?!1:E===-1&&!(this.low===0&&this.high===-2097152):!0},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(E){return o(E)||(E=_(E)),this.unsigned!==E.unsigned&&this.high>>>31===1&&E.high>>>31===1?!1:this.high===E.high&&this.low===E.low},v.eq=v.equals,v.notEquals=function(E){return!this.eq(E)},v.neq=v.notEquals,v.ne=v.notEquals,v.lessThan=function(E){return this.comp(E)<0},v.lt=v.lessThan,v.lessThanOrEqual=function(E){return this.comp(E)<=0},v.lte=v.lessThanOrEqual,v.le=v.lessThanOrEqual,v.greaterThan=function(E){return this.comp(E)>0},v.gt=v.greaterThan,v.greaterThanOrEqual=function(E){return this.comp(E)>=0},v.gte=v.greaterThanOrEqual,v.ge=v.greaterThanOrEqual,v.compare=function(E){if(o(E)||(E=_(E)),this.eq(E))return 0;var C=this.isNegative(),Q=E.isNegative();return C&&!Q?-1:!C&&Q?1:this.unsigned?E.high>>>0>this.high>>>0||E.high===this.high&&E.low>>>0>this.low>>>0?-1:1:this.sub(E).isNegative()?-1:1},v.comp=v.compare,v.negate=function(){return!this.unsigned&&this.eq(le)?le:this.not().add(z)},v.neg=v.negate,v.add=function(E){o(E)||(E=_(E));var C=this.high>>>16,Q=this.high&65535,Y=this.low>>>16,J=this.low&65535,ce=E.high>>>16,Ne=E.high&65535,Me=E.low>>>16,Te=E.low&65535,Z=0,je=0,me=0,we=0;return we+=J+Te,me+=we>>>16,we&=65535,me+=Y+Me,je+=me>>>16,me&=65535,je+=Q+Ne,Z+=je>>>16,je&=65535,Z+=C+ce,Z&=65535,c(me<<16|we,Z<<16|je,this.unsigned)},v.subtract=function(E){return o(E)||(E=_(E)),this.add(E.neg())},v.sub=v.subtract,v.multiply=function(E){if(this.isZero())return this;if(o(E)||(E=_(E)),e){var C=e.mul(this.low,this.high,E.low,E.high);return c(C,e.get_high(),this.unsigned)}if(E.isZero())return this.unsigned?N:F;if(this.eq(le))return E.isOdd()?le:F;if(E.eq(le))return this.isOdd()?le:F;if(this.isNegative())return E.isNegative()?this.neg().mul(E.neg()):this.neg().mul(E).neg();if(E.isNegative())return this.mul(E.neg()).neg();if(this.lt(M)&&E.lt(M))return l(this.toNumber()*E.toNumber(),this.unsigned);var Q=this.high>>>16,Y=this.high&65535,J=this.low>>>16,ce=this.low&65535,Ne=E.high>>>16,Me=E.high&65535,Te=E.low>>>16,Z=E.low&65535,je=0,me=0,we=0,We=0;return We+=ce*Z,we+=We>>>16,We&=65535,we+=J*Z,me+=we>>>16,we&=65535,we+=ce*Te,me+=we>>>16,we&=65535,me+=Y*Z,je+=me>>>16,me&=65535,me+=J*Te,je+=me>>>16,me&=65535,me+=ce*Me,je+=me>>>16,me&=65535,je+=Q*Z+Y*Te+J*Me+ce*Ne,je&=65535,c(we<<16|We,je<<16|me,this.unsigned)},v.mul=v.multiply,v.divide=function(E){if(o(E)||(E=_(E)),E.isZero())throw Error("division by zero");if(e){if(!this.unsigned&&this.high===-2147483648&&E.low===-1&&E.high===-1)return this;var C=(this.unsigned?e.div_u:e.div_s)(this.low,this.high,E.low,E.high);return c(C,e.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?N:F;var Q,Y,J;if(this.unsigned){if(E.unsigned||(E=E.toUnsigned()),E.gt(this))return N;if(E.gt(this.shru(1)))return B;J=N}else{if(this.eq(le)){if(E.eq(z)||E.eq(G))return le;if(E.eq(le))return z;var ce=this.shr(1);return Q=ce.div(E).shl(1),Q.eq(F)?E.isNegative()?z:G:(Y=this.sub(E.mul(Q)),J=Q.add(Y.div(E)),J)}else if(E.eq(le))return this.unsigned?N:F;if(this.isNegative())return E.isNegative()?this.neg().div(E.neg()):this.neg().div(E).neg();if(E.isNegative())return this.div(E.neg()).neg();J=F}for(Y=this;Y.gte(E);){Q=Math.max(1,Math.floor(Y.toNumber()/E.toNumber()));for(var Ne=Math.ceil(Math.log(Q)/Math.LN2),Me=Ne<=48?1:u(2,Ne-48),Te=l(Q),Z=Te.mul(E);Z.isNegative()||Z.gt(Y);)Q-=Me,Te=l(Q,this.unsigned),Z=Te.mul(E);Te.isZero()&&(Te=z),J=J.add(Te),Y=Y.sub(Z)}return J},v.div=v.divide,v.modulo=function(E){if(o(E)||(E=_(E)),e){var C=(this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,E.low,E.high);return c(C,e.get_high(),this.unsigned)}return this.sub(this.div(E).mul(E))},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?s(this.low):s(this.high)+32},v.ctz=v.countTrailingZeros,v.and=function(E){return o(E)||(E=_(E)),c(this.low&E.low,this.high&E.high,this.unsigned)},v.or=function(E){return o(E)||(E=_(E)),c(this.low|E.low,this.high|E.high,this.unsigned)},v.xor=function(E){return o(E)||(E=_(E)),c(this.low^E.low,this.high^E.high,this.unsigned)},v.shiftLeft=function(E){return o(E)&&(E=E.toInt()),(E&=63)===0?this:E<32?c(this.low<>>32-E,this.unsigned):c(0,this.low<>>E|this.high<<32-E,this.high>>E,this.unsigned):c(this.high>>E-32,this.high>=0?0:-1,this.unsigned)},v.shr=v.shiftRight,v.shiftRightUnsigned=function(E){return o(E)&&(E=E.toInt()),(E&=63)===0?this:E<32?c(this.low>>>E|this.high<<32-E,this.high>>>E,this.unsigned):E===32?c(this.high,0,this.unsigned):c(this.high>>>E-32,0,this.unsigned)},v.shru=v.shiftRightUnsigned,v.shr_u=v.shiftRightUnsigned,v.rotateLeft=function(E){var C;return o(E)&&(E=E.toInt()),(E&=63)===0?this:E===32?c(this.high,this.low,this.unsigned):E<32?(C=32-E,c(this.low<>>C,this.high<>>C,this.unsigned)):(E-=32,C=32-E,c(this.high<>>C,this.low<>>C,this.unsigned))},v.rotl=v.rotateLeft,v.rotateRight=function(E){var C;return o(E)&&(E=E.toInt()),(E&=63)===0?this:E===32?c(this.high,this.low,this.unsigned):E<32?(C=32-E,c(this.high<>>E,this.low<>>E,this.unsigned)):(E-=32,C=32-E,c(this.low<>>E,this.high<>>E,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(E){return E?this.toBytesLE():this.toBytesBE()},v.toBytesLE=function(){var E=this.high,C=this.low;return[C&255,C>>>8&255,C>>>16&255,C>>>24,E&255,E>>>8&255,E>>>16&255,E>>>24]},v.toBytesBE=function(){var E=this.high,C=this.low;return[E>>>24,E>>>16&255,E>>>8&255,E&255,C>>>24,C>>>16&255,C>>>8&255,C&255]},t.fromBytes=function(E,C,Q){return Q?t.fromBytesLE(E,C):t.fromBytesBE(E,C)},t.fromBytesLE=function(E,C){return new t(E[0]|E[1]<<8|E[2]<<16|E[3]<<24,E[4]|E[5]<<8|E[6]<<16|E[7]<<24,C)},t.fromBytesBE=function(E,C){return new t(E[4]<<24|E[5]<<16|E[6]<<8|E[7],E[0]<<24|E[1]<<16|E[2]<<8|E[3],C)},typeof BigInt=="function"&&(t.fromBigInt=function(E,C){var Q=Number(BigInt.asIntN(32,E)),Y=Number(BigInt.asIntN(32,E>>BigInt(32)));return c(Q,Y,C)},t.fromValue=function(E,C){return typeof E=="bigint"?t.fromBigInt(E,C):_(E,C)},v.toBigInt=function(){var E=BigInt(this.low>>>0),C=BigInt(this.unsigned?this.high>>>0:this.high);return C<{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.loadFileDescriptorSetFromObject=Je.loadFileDescriptorSetFromBuffer=Je.fromJSON=Je.loadSync=Je.load=Je.IdempotencyLevel=Je.isAnyExtension=Je.Long=void 0;var Ade=wH(),Qr=O_(),qy=qq(),jy=Wq(),Rde=Jq();Je.Long=Rde;function Nde(r){return"@type"in r&&typeof r["@type"]=="string"}Je.isAnyExtension=Nde;var ej;(function(r){r.IDEMPOTENCY_UNKNOWN="IDEMPOTENCY_UNKNOWN",r.NO_SIDE_EFFECTS="NO_SIDE_EFFECTS",r.IDEMPOTENT="IDEMPOTENT"})(ej=Je.IdempotencyLevel||(Je.IdempotencyLevel={}));var tj={longs:String,enums:String,bytes:String,defaults:!0,oneofs:!0,json:!0};function Cde(r,e){return r===""?e:r+"."+e}function Pde(r){return r instanceof Qr.Service||r instanceof Qr.Type||r instanceof Qr.Enum}function Ide(r){return r instanceof Qr.Namespace||r instanceof Qr.Root}function rj(r,e){let t=Cde(e,r.name);return Pde(r)?[[t,r]]:Ide(r)&&typeof r.nested<"u"?Object.keys(r.nested).map(o=>rj(r.nested[o],t)).reduce((o,s)=>o.concat(s),[]):[]}function Qq(r,e){return function(o){return r.toObject(r.decode(o),e)}}function Zq(r){return function(t){if(Array.isArray(t))throw new Error(`Failed to serialize message: expected object with ${r.name} structure, got array instead`);let o=r.fromObject(t);return r.encode(o).finish()}}function bde(r){return(r||[]).reduce((e,t)=>{for(let[o,s]of Object.entries(t))switch(o){case"uninterpreted_option":e.uninterpreted_option.push(t.uninterpreted_option);break;default:e[o]=s}return e},{deprecated:!1,idempotency_level:ej.IDEMPOTENCY_UNKNOWN,uninterpreted_option:[]})}function Lde(r,e,t,o){let s=r.resolvedRequestType,a=r.resolvedResponseType;return{path:"/"+e+"/"+r.name,requestStream:!!r.requestStream,responseStream:!!r.responseStream,requestSerialize:Zq(s),requestDeserialize:Qq(s,t),responseSerialize:Zq(a),responseDeserialize:Qq(a,t),originalName:Ade(r.name),requestType:Hy(s,o),responseType:Hy(a,o),options:bde(r.parsedOptions)}}function xde(r,e,t,o){let s={};for(let a of r.methodsArray)s[a.name]=Lde(a,e,t,o);return s}function Hy(r,e){let t=r.toDescriptor("proto3");return{format:"Protocol Buffer 3 DescriptorProto",type:t.$type.toObject(t,tj),fileDescriptorProtos:e}}function Mde(r,e){let t=r.toDescriptor("proto3");return{format:"Protocol Buffer 3 EnumDescriptorProto",type:t.$type.toObject(t,tj),fileDescriptorProtos:e}}function wde(r,e,t,o){if(r instanceof Qr.Service)return xde(r,e,t,o);if(r instanceof Qr.Type)return Hy(r,o);if(r instanceof Qr.Enum)return Mde(r,o);throw new Error("Type mismatch in reflection object handling")}function N_(r,e){let t={};r.resolveAll();let s=r.toDescriptor("proto3").file.map(a=>Buffer.from(qy.FileDescriptorProto.encode(a).finish()));for(let[a,i]of rj(r,""))t[a]=wde(i,a,e,s);return t}function nj(r,e){e=e||{};let t=Qr.Root.fromDescriptor(r);return t.resolveAll(),N_(t,e)}function Dde(r,e){return(0,jy.loadProtosWithOptions)(r,e).then(t=>N_(t,e))}Je.load=Dde;function Ude(r,e){let t=(0,jy.loadProtosWithOptionsSync)(r,e);return N_(t,e)}Je.loadSync=Ude;function kde(r,e){e=e||{};let t=Qr.Root.fromJSON(r);return t.resolveAll(),N_(t,e)}Je.fromJSON=kde;function Bde(r,e){let t=qy.FileDescriptorSet.decode(r);return nj(t,e)}Je.loadFileDescriptorSetFromBuffer=Bde;function Vde(r,e){let t=qy.FileDescriptorSet.fromObject(r);return nj(t,e)}Je.loadFileDescriptorSetFromObject=Vde;(0,jy.addCommonProtos)()});var _o=T(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.registerChannelzSocket=Ie.registerChannelzServer=Ie.registerChannelzSubchannel=Ie.registerChannelzChannel=Ie.ChannelzCallTrackerStub=Ie.ChannelzCallTracker=Ie.ChannelzChildrenTrackerStub=Ie.ChannelzChildrenTracker=Ie.ChannelzTrace=Ie.ChannelzTraceStub=void 0;Ie.unregisterChannelzRef=jde;Ie.getChannelzHandlers=pj;Ie.getChannelzServiceDefinition=dj;Ie.setup=the;var P_=V("net"),ho=(rH(),ee(tH)),Xc=rr(),Wc=ue(),Fde=nr(),Gde=Qh(),Hde=ry();function Yy(r){return{channel_id:r.id,name:r.name}}function Wy(r){return{subchannel_id:r.id,name:r.name}}function qde(r){return{server_id:r.id}}function L_(r){return{socket_id:r.id,name:r.name}}var oj=32,Jy=100,zy=class{constructor(){this.events=[],this.creationTimestamp=new Date,this.eventsLogged=0}addTrace(){}getTraceMessage(){return{creation_timestamp:Zr(this.creationTimestamp),num_events_logged:this.eventsLogged,events:[]}}};Ie.ChannelzTraceStub=zy;var Ky=class{constructor(){this.events=[],this.eventsLogged=0,this.creationTimestamp=new Date}addTrace(e,t,o){let s=new Date;this.events.push({description:t,severity:e,timestamp:s,childChannel:(o==null?void 0:o.kind)==="channel"?o:void 0,childSubchannel:(o==null?void 0:o.kind)==="subchannel"?o:void 0}),this.events.length>=oj*2&&(this.events=this.events.slice(oj)),this.eventsLogged+=1}getTraceMessage(){return{creation_timestamp:Zr(this.creationTimestamp),num_events_logged:this.eventsLogged,events:this.events.map(e=>({description:e.description,severity:e.severity,timestamp:Zr(e.timestamp),channel_ref:e.childChannel?Yy(e.childChannel):null,subchannel_ref:e.childSubchannel?Wy(e.childSubchannel):null}))}}};Ie.ChannelzTrace=Ky;var I_=class{constructor(){this.channelChildren=new ho.OrderedMap,this.subchannelChildren=new ho.OrderedMap,this.socketChildren=new ho.OrderedMap,this.trackerMap={channel:this.channelChildren,subchannel:this.subchannelChildren,socket:this.socketChildren}}refChild(e){let t=this.trackerMap[e.kind],o=t.find(e.id);o.equals(t.end())?t.setElement(e.id,{ref:e,count:1},o):o.pointer[1].count+=1}unrefChild(e){let t=this.trackerMap[e.kind],o=t.getElementByKey(e.id);o!==void 0&&(o.count-=1,o.count===0&&t.eraseElementByKey(e.id))}getChildLists(){return{channels:this.channelChildren,subchannels:this.subchannelChildren,sockets:this.socketChildren}}};Ie.ChannelzChildrenTracker=I_;var $y=class extends I_{refChild(){}unrefChild(){}};Ie.ChannelzChildrenTrackerStub=$y;var b_=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}};Ie.ChannelzCallTracker=b_;var Xy=class extends b_{addCallStarted(){}addCallSucceeded(){}addCallFailed(){}};Ie.ChannelzCallTrackerStub=Xy;var On={channel:new ho.OrderedMap,subchannel:new ho.OrderedMap,server:new ho.OrderedMap,socket:new ho.OrderedMap},x_=r=>{let e=1;function t(){return e++}let o=On[r];return(s,a,i)=>{let n=t(),l={id:n,name:s,kind:r};return i&&o.setElement(n,{ref:l,getInfo:a}),l}};Ie.registerChannelzChannel=x_("channel");Ie.registerChannelzSubchannel=x_("subchannel");Ie.registerChannelzServer=x_("server");Ie.registerChannelzSocket=x_("socket");function jde(r){On[r.kind].eraseElementByKey(r.id)}function Yde(r){let e=Number.parseInt(r,16);return[e/256|0,e%256]}function sj(r){if(r==="")return[];let e=r.split(":").map(o=>Yde(o));return[].concat(...e)}function zde(r){return(0,P_.isIPv6)(r)&&r.toLowerCase().startsWith("::ffff:")&&(0,P_.isIPv4)(r.substring(7))}function aj(r){return Buffer.from(Uint8Array.from(r.split(".").map(e=>Number.parseInt(e))))}function Kde(r){if((0,P_.isIPv4)(r))return aj(r);if(zde(r))return aj(r.substring(7));if((0,P_.isIPv6)(r)){let e,t,o=r.indexOf("::");o===-1?(e=r,t=""):(e=r.substring(0,o),t=r.substring(o+2));let s=Buffer.from(sj(e)),a=Buffer.from(sj(t)),i=Buffer.alloc(16-s.length-a.length,0);return Buffer.concat([s,i,a])}else return null}function cj(r){switch(r){case Xc.ConnectivityState.CONNECTING:return{state:"CONNECTING"};case Xc.ConnectivityState.IDLE:return{state:"IDLE"};case Xc.ConnectivityState.READY:return{state:"READY"};case Xc.ConnectivityState.SHUTDOWN:return{state:"SHUTDOWN"};case Xc.ConnectivityState.TRANSIENT_FAILURE:return{state:"TRANSIENT_FAILURE"};default:return{state:"UNKNOWN"}}}function Zr(r){if(!r)return null;let e=r.getTime();return{seconds:e/1e3|0,nanos:e%1e3*1e6}}function uj(r){let e=r.getInfo(),t=[],o=[];return e.children.channels.forEach(s=>{t.push(Yy(s[1].ref))}),e.children.subchannels.forEach(s=>{o.push(Wy(s[1].ref))}),{ref:Yy(r.ref),data:{target:e.target,state:cj(e.state),calls_started:e.callTracker.callsStarted,calls_succeeded:e.callTracker.callsSucceeded,calls_failed:e.callTracker.callsFailed,last_call_started_timestamp:Zr(e.callTracker.lastCallStartedTimestamp),trace:e.trace.getTraceMessage()},channel_ref:t,subchannel_ref:o}}function $de(r,e){let t=parseInt(r.request.channel_id,10),o=On.channel.getElementByKey(t);if(o===void 0){e({code:Wc.Status.NOT_FOUND,details:"No channel data found for id "+t});return}e(null,{channel:uj(o)})}function Xde(r,e){let t=parseInt(r.request.max_results,10)||Jy,o=[],s=parseInt(r.request.start_channel_id,10),a=On.channel,i;for(i=a.lowerBound(s);!i.equals(a.end())&&o.length{t.push(L_(o[1].ref))}),{ref:qde(r.ref),data:{calls_started:e.callTracker.callsStarted,calls_succeeded:e.callTracker.callsSucceeded,calls_failed:e.callTracker.callsFailed,last_call_started_timestamp:Zr(e.callTracker.lastCallStartedTimestamp),trace:e.trace.getTraceMessage()},listen_socket:t}}function Wde(r,e){let t=parseInt(r.request.server_id,10),s=On.server.getElementByKey(t);if(s===void 0){e({code:Wc.Status.NOT_FOUND,details:"No server data found for id "+t});return}e(null,{server:fj(s)})}function Jde(r,e){let t=parseInt(r.request.max_results,10)||Jy,o=parseInt(r.request.start_server_id,10),s=On.server,a=[],i;for(i=s.lowerBound(o);!i.equals(s.end())&&a.length{a.push(L_(n[1].ref))});let i={ref:Wy(o.ref),data:{target:s.target,state:cj(s.state),calls_started:s.callTracker.callsStarted,calls_succeeded:s.callTracker.callsSucceeded,calls_failed:s.callTracker.callsFailed,last_call_started_timestamp:Zr(s.callTracker.lastCallStartedTimestamp),trace:s.trace.getTraceMessage()},socket_ref:a};e(null,{subchannel:i})}function lj(r){var e;return(0,Fde.isTcpSubchannelAddress)(r)?{address:"tcpip_address",tcpip_address:{ip_address:(e=Kde(r.host))!==null&&e!==void 0?e:void 0,port:r.port}}:{address:"uds_address",uds_address:{filename:r.path}}}function Zde(r,e){var t,o,s,a,i;let n=parseInt(r.request.socket_id,10),l=On.socket.getElementByKey(n);if(l===void 0){e({code:Wc.Status.NOT_FOUND,details:"No socket data found for id "+n});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:(o=c.security.cipherSuiteOtherName)!==null&&o!==void 0?o:void 0,local_certificate:(s=c.security.localCertificate)!==null&&s!==void 0?s:void 0,remote_certificate:(a=c.security.remoteCertificate)!==null&&a!==void 0?a:void 0}}:null,f={ref:L_(l.ref),local:c.localAddress?lj(c.localAddress):null,remote:c.remoteAddress?lj(c.remoteAddress):null,remote_name:(i=c.remoteName)!==null&&i!==void 0?i: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:Zr(c.lastLocalStreamCreatedTimestamp),last_remote_stream_created_timestamp:Zr(c.lastRemoteStreamCreatedTimestamp),messages_received:c.messagesReceived,messages_sent:c.messagesSent,last_message_received_timestamp:Zr(c.lastMessageReceivedTimestamp),last_message_sent_timestamp:Zr(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:f})}function ehe(r,e){let t=parseInt(r.request.server_id,10),o=On.server.getElementByKey(t);if(o===void 0){e({code:Wc.Status.NOT_FOUND,details:"No server data found for id "+t});return}let s=parseInt(r.request.start_socket_id,10),a=parseInt(r.request.max_results,10)||Jy,n=o.getInfo().sessionChildren.sockets,l=[],c;for(c=n.lowerBound(s);!c.equals(n.end())&&l.length{"use strict";Object.defineProperty(w_,"__esModule",{value:!0});w_.Subchannel=void 0;var ye=rr(),rhe=Nc(),Qy=Pe(),M_=ue(),nhe=Pt(),ihe=nr(),en=_o(),ohe="subchannel",she=~(1<<31),Zy=class{constructor(e,t,o,s,a){var i;this.channelTarget=e,this.subchannelAddress=t,this.options=o,this.connector=a,this.connectivityState=ye.ConnectivityState.IDLE,this.transport=null,this.continueConnecting=!1,this.stateListeners=new Set,this.refcount=0,this.channelzEnabled=!0;let n={initialDelay:o["grpc.initial_reconnect_backoff_ms"],maxDelay:o["grpc.max_reconnect_backoff_ms"]};this.backoffTimeout=new rhe.BackoffTimeout(()=>{this.handleBackoffTimer()},n),this.backoffTimeout.unref(),this.subchannelAddressString=(0,ihe.subchannelAddressToString)(t),this.keepaliveTime=(i=o["grpc.keepalive_time_ms"])!==null&&i!==void 0?i:-1,o["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.channelzTrace=new en.ChannelzTraceStub,this.callTracker=new en.ChannelzCallTrackerStub,this.childrenTracker=new en.ChannelzChildrenTrackerStub,this.streamTracker=new en.ChannelzCallTrackerStub):(this.channelzTrace=new en.ChannelzTrace,this.callTracker=new en.ChannelzCallTracker,this.childrenTracker=new en.ChannelzChildrenTracker,this.streamTracker=new en.ChannelzCallTracker),this.channelzRef=(0,en.registerChannelzSubchannel)(this.subchannelAddressString,()=>this.getChannelzInfo(),this.channelzEnabled),this.channelzTrace.addTrace("CT_INFO","Subchannel created"),this.trace("Subchannel constructed with options "+JSON.stringify(o,void 0,2)),this.secureConnector=s._createSecureConnector(e,o)}getChannelzInfo(){return{state:this.connectivityState,trace:this.channelzTrace,callTracker:this.callTracker,children:this.childrenTracker.getChildLists(),target:this.subchannelAddressString}}trace(e){Qy.trace(M_.LogVerbosity.DEBUG,ohe,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}refTrace(e){Qy.trace(M_.LogVerbosity.DEBUG,"subchannel_refcount","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}handleBackoffTimer(){this.continueConnecting?this.transitionToState([ye.ConnectivityState.TRANSIENT_FAILURE],ye.ConnectivityState.CONNECTING):this.transitionToState([ye.ConnectivityState.TRANSIENT_FAILURE],ye.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,she);e=Object.assign(Object.assign({},e),{"grpc.keepalive_time_ms":t})}this.connector.connect(this.subchannelAddress,this.secureConnector,e).then(t=>{this.transitionToState([ye.ConnectivityState.CONNECTING],ye.ConnectivityState.READY)?(this.transport=t,this.channelzEnabled&&this.childrenTracker.refChild(t.getChannelzRef()),t.addDisconnectListener(o=>{this.transitionToState([ye.ConnectivityState.READY],ye.ConnectivityState.IDLE),o&&this.keepaliveTime>0&&(this.keepaliveTime*=2,Qy.log(M_.LogVerbosity.ERROR,`Connection to ${(0,nhe.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([ye.ConnectivityState.CONNECTING],ye.ConnectivityState.TRANSIENT_FAILURE,`${t}`)})}transitionToState(e,t,o){var s,a;if(e.indexOf(this.connectivityState)===-1)return!1;o?this.trace(ye.ConnectivityState[this.connectivityState]+" -> "+ye.ConnectivityState[t]+' with error "'+o+'"'):this.trace(ye.ConnectivityState[this.connectivityState]+" -> "+ye.ConnectivityState[t]),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Connectivity state change to "+ye.ConnectivityState[t]);let i=this.connectivityState;switch(this.connectivityState=t,t){case ye.ConnectivityState.READY:this.stopBackoff();break;case ye.ConnectivityState.CONNECTING:this.startBackoff(),this.startConnectingInternal(),this.continueConnecting=!1;break;case ye.ConnectivityState.TRANSIENT_FAILURE:this.channelzEnabled&&this.transport&&this.childrenTracker.unrefChild(this.transport.getChannelzRef()),(s=this.transport)===null||s===void 0||s.shutdown(),this.transport=null,this.backoffTimeout.isRunning()||process.nextTick(()=>{this.handleBackoffTimer()});break;case ye.ConnectivityState.IDLE:this.channelzEnabled&&this.transport&&this.childrenTracker.unrefChild(this.transport.getChannelzRef()),(a=this.transport)===null||a===void 0||a.shutdown(),this.transport=null;break;default:throw new Error(`Invalid state: unknown ConnectivityState ${t}`)}for(let n of this.stateListeners)n(this,i,t,this.keepaliveTime,o);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,en.unregisterChannelzRef)(this.channelzRef),this.secureConnector.destroy(),process.nextTick(()=>{this.transitionToState([ye.ConnectivityState.CONNECTING,ye.ConnectivityState.READY],ye.ConnectivityState.IDLE)}))}unrefIfOneRef(){return this.refcount===1?(this.unref(),!0):!1}createCall(e,t,o,s){if(!this.transport)throw new Error("Cannot create call, subchannel not READY");let a;return this.channelzEnabled?(this.callTracker.addCallStarted(),this.streamTracker.addCallStarted(),a={onCallEnd:i=>{i.code===M_.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()}}):a={},this.transport.createCall(e,t,o,s,a)}startConnecting(){process.nextTick(()=>{this.transitionToState([ye.ConnectivityState.IDLE],ye.ConnectivityState.CONNECTING)||this.connectivityState===ye.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([ye.ConnectivityState.TRANSIENT_FAILURE],ye.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)}getCallCredentials(){return this.secureConnector.getCallCredentials()}};w_.Subchannel=Zy});var _j=T(D_=>{"use strict";var eO;Object.defineProperty(D_,"__esModule",{value:!0});D_.GRPC_NODE_USE_ALTERNATIVE_RESOLVER=void 0;D_.GRPC_NODE_USE_ALTERNATIVE_RESOLVER=((eO=process.env.GRPC_NODE_USE_ALTERNATIVE_RESOLVER)!==null&&eO!==void 0?eO:"false")==="true"});var oO=T(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.DEFAULT_PORT=void 0;Eo.setup=dhe;var Ej=jr(),tO=V("dns"),ahe=bv(),rO=ue(),nO=ht(),lhe=Pe(),che=ue(),ai=Pt(),mj=V("net"),uhe=Nc(),Tj=_j(),fhe="dns_resolver";function tn(r){lhe.trace(che.LogVerbosity.DEBUG,fhe,r)}Eo.DEFAULT_PORT=443;var phe=3e4,iO=class{constructor(e,t,o){var s,a,i;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,this.alternativeResolver=new tO.promises.Resolver,tn("Resolver constructed for target "+(0,ai.uriToString)(e)),e.authority&&this.alternativeResolver.setServers([e.authority]);let n=(0,ai.splitHostPort)(e.path);n===null?(this.ipResult=null,this.dnsHostname=null,this.port=null):(0,mj.isIPv4)(n.host)||(0,mj.isIPv6)(n.host)?(this.ipResult=[{addresses:[{host:n.host,port:(s=n.port)!==null&&s!==void 0?s:Eo.DEFAULT_PORT}]}],this.dnsHostname=null,this.port=null):(this.ipResult=null,this.dnsHostname=n.host,this.port=(a=n.port)!==null&&a!==void 0?a:Eo.DEFAULT_PORT),this.percentage=Math.random()*100,o["grpc.service_config_disable_resolution"]===1&&(this.isServiceConfigEnabled=!1),this.defaultResolutionError={code:rO.Status.UNAVAILABLE,details:`Name resolution failed for target ${(0,ai.uriToString)(this.target)}`,metadata:new nO.Metadata};let l={initialDelay:o["grpc.initial_reconnect_backoff_ms"],maxDelay:o["grpc.max_reconnect_backoff_ms"]};this.backoff=new uhe.BackoffTimeout(()=>{this.continueResolving&&this.startResolutionWithBackoff()},l),this.backoff.unref(),this.minTimeBetweenResolutionsMs=(i=o["grpc.dns_min_time_between_resolutions_ms"])!==null&&i!==void 0?i:phe,this.nextResolutionTimer=setTimeout(()=>{},0),clearTimeout(this.nextResolutionTimer)}startResolution(){if(this.ipResult!==null){this.returnedIpResult||(tn("Returning IP address for target "+(0,ai.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)tn("Failed to parse DNS address "+(0,ai.uriToString)(this.target)),setImmediate(()=>{this.listener.onError({code:rO.Status.UNAVAILABLE,details:`Failed to parse DNS address ${(0,ai.uriToString)(this.target)}`,metadata:new nO.Metadata})}),this.stopNextResolutionTimer();else{if(this.pendingLookupPromise!==null)return;tn("Looking up DNS hostname "+this.dnsHostname),this.latestLookupResult=null;let e=this.dnsHostname;this.pendingLookupPromise=this.lookup(e),this.pendingLookupPromise.then(t=>{if(this.pendingLookupPromise===null)return;this.pendingLookupPromise=null,this.backoff.reset(),this.backoff.stop(),this.latestLookupResult=t.map(s=>({addresses:[s]}));let o="["+t.map(s=>s.host+":"+s.port).join(",")+"]";if(tn("Resolved addresses for target "+(0,ai.uriToString)(this.target)+": "+o),this.latestLookupResult.length===0){this.listener.onError(this.defaultResolutionError);return}this.listener.onSuccessfulResolution(this.latestLookupResult,this.latestServiceConfig,this.latestServiceConfigError,null,{})},t=>{this.pendingLookupPromise!==null&&(tn("Resolution error for target "+(0,ai.uriToString)(this.target)+": "+t.message),this.pendingLookupPromise=null,this.stopNextResolutionTimer(),this.listener.onError(this.defaultResolutionError))}),this.isServiceConfigEnabled&&this.pendingTxtPromise===null&&(this.pendingTxtPromise=this.resolveTxt(e),this.pendingTxtPromise.then(t=>{if(this.pendingTxtPromise!==null){this.pendingTxtPromise=null;try{this.latestServiceConfig=(0,ahe.extractAndSelectServiceConfig)(t,this.percentage)}catch(o){this.latestServiceConfigError={code:rO.Status.UNAVAILABLE,details:`Parsing service config failed with error ${o.message}`,metadata:new nO.Metadata}}this.latestLookupResult!==null&&this.listener.onSuccessfulResolution(this.latestLookupResult,this.latestServiceConfig,this.latestServiceConfigError,null,{})}},t=>{}))}}async lookup(e){if(Tj.GRPC_NODE_USE_ALTERNATIVE_RESOLVER){tn("Using alternative DNS resolver.");let o=await Promise.allSettled([this.alternativeResolver.resolve4(e),this.alternativeResolver.resolve6(e)]);if(o.every(s=>s.status==="rejected"))throw new Error(o[0].reason);return o.reduce((s,a)=>a.status==="fulfilled"?[...s,...a.value]:s,[]).map(s=>({host:s,port:+this.port}))}return(await tO.promises.lookup(e,{all:!0})).map(o=>({host:o.address,port:+this.port}))}async resolveTxt(e){return Tj.GRPC_NODE_USE_ALTERNATIVE_RESOLVER?(tn("Using alternative DNS resolver."),this.alternativeResolver.resolveTxt(e)):tO.promises.resolveTxt(e)}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?tn('resolution update delayed by "min time between resolutions" rate limit'):tn("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 dhe(){(0,Ej.registerResolver)("dns",iO),(0,Ej.registerDefaultScheme)("dns")}});var sO=T(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.parseCIDR=vj;Zc.mapProxyName=Ohe;Zc.getProxiedConnection=Ahe;var Jc=Pe(),_a=ue(),gj=V("net"),hhe=V("http"),_he=Pe(),Sj=nr(),Qc=Pt(),Ehe=V("url"),mhe=oO(),The="proxy";function Ea(r){_he.trace(_a.LogVerbosity.DEBUG,The,r)}function She(){let r="",e="";if(process.env.grpc_proxy)e="grpc_proxy",r=process.env.grpc_proxy;else if(process.env.https_proxy)e="https_proxy",r=process.env.https_proxy;else if(process.env.http_proxy)e="http_proxy",r=process.env.http_proxy;else return{};let t;try{t=new Ehe.URL(r)}catch{return(0,Jc.log)(_a.LogVerbosity.ERROR,`cannot parse value of "${e}" env var`),{}}if(t.protocol!=="http:")return(0,Jc.log)(_a.LogVerbosity.ERROR,`"${t.protocol}" scheme not supported in proxy URI`),{};let o=null;t.username&&(t.password?((0,Jc.log)(_a.LogVerbosity.INFO,"userinfo found in proxy URI"),o=decodeURIComponent(`${t.username}:${t.password}`)):o=t.username);let s=t.hostname,a=t.port;a===""&&(a="80");let i={address:`${s}:${a}`};return o&&(i.creds=o),Ea("Proxy server "+i.address+" set by environment variable "+e),i}function ghe(){let r=process.env.no_grpc_proxy,e="no_grpc_proxy";return r||(r=process.env.no_proxy,e="no_proxy"),r?(Ea("No proxy server list set by environment variable "+e),r.split(",")):[]}function vj(r){let e=r.split("/");if(e.length!==2)return null;let t=parseInt(e[1],10);return!(0,gj.isIPv4)(e[0])||Number.isNaN(t)||t<0||t>32?null:{ip:yj(e[0]),prefixLength:t}}function yj(r){return r.split(".").reduce((e,t)=>(e<<8)+parseInt(t,10),0)}function vhe(r,e){let t=r.ip,o=-1<<32-r.prefixLength;return(yj(e)&o)===(t&o)}function yhe(r){for(let e of ghe()){let t=vj(e);if((0,gj.isIPv4)(r)&&t&&vhe(t,r))return!0;if(r.endsWith(e))return!0}return!1}function Ohe(r,e){var t;let o={target:r,extraOptions:{}};if(((t=e["grpc.enable_http_proxy"])!==null&&t!==void 0?t:1)===0||r.scheme==="unix")return o;let s=She();if(!s.address)return o;let a=(0,Qc.splitHostPort)(r.path);if(!a)return o;let i=a.host;if(yhe(i))return Ea("Not using proxy for target in no_proxy list: "+(0,Qc.uriToString)(r)),o;let n={"grpc.http_connect_target":(0,Qc.uriToString)(r)};return s.creds&&(n["grpc.http_connect_creds"]=s.creds),{target:{scheme:"dns",path:s.address},extraOptions:n}}function Ahe(r,e){var t;if(!("grpc.http_connect_target"in e))return Promise.resolve(null);let o=e["grpc.http_connect_target"],s=(0,Qc.parseUri)(o);if(s===null)return Promise.resolve(null);let a=(0,Qc.splitHostPort)(s.path);if(a===null)return Promise.resolve(null);let i=`${a.host}:${(t=a.port)!==null&&t!==void 0?t:mhe.DEFAULT_PORT}`,n={method:"CONNECT",path:i},l={Host:i};(0,Sj.isTcpSubchannelAddress)(r)?(n.host=r.host,n.port=r.port):n.socketPath=r.path,"grpc.http_connect_creds"in e&&(l["Proxy-Authorization"]="Basic "+Buffer.from(e["grpc.http_connect_creds"]).toString("base64")),n.headers=l;let c=(0,Sj.subchannelAddressToString)(r);return Ea("Using proxy "+c+" to connect to "+n.path),new Promise((u,f)=>{let _=hhe.request(n);_.once("connect",(m,O,y)=>{_.removeAllListeners(),O.removeAllListeners(),m.statusCode===200?(Ea("Successfully connected to "+n.path+" through proxy "+c),y.length>0&&O.unshift(y),Ea("Successfully established a plaintext connection to "+n.path+" through proxy "+c),u(O)):((0,Jc.log)(_a.LogVerbosity.ERROR,"Failed to connect to "+n.path+" through proxy "+c+" with status "+m.statusCode),f())}),_.once("error",m=>{_.removeAllListeners(),(0,Jc.log)(_a.LogVerbosity.ERROR,"Failed to connect to proxy "+c+" with error "+m.message),f()}),_.end()})}});var lO=T(U_=>{"use strict";Object.defineProperty(U_,"__esModule",{value:!0});U_.StreamDecoder=void 0;var rn;(function(r){r[r.NO_DATA=0]="NO_DATA",r[r.READING_SIZE=1]="READING_SIZE",r[r.READING_MESSAGE=2]="READING_MESSAGE"})(rn||(rn={}));var aO=class{constructor(e){this.maxReadMessageLength=e,this.readState=rn.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,o,s=[];for(;tthis.maxReadMessageLength)throw new Error(`Received message larger than max (${this.readMessageSize} vs ${this.maxReadMessageLength})`);if(this.readMessageRemaining=this.readMessageSize,this.readMessageRemaining>0)this.readState=rn.READING_MESSAGE;else{let a=Buffer.concat([this.readCompressFlag,this.readPartialSize],5);this.readState=rn.NO_DATA,s.push(a)}}break;case rn.READING_MESSAGE:if(o=Math.min(e.length-t,this.readMessageRemaining),this.readPartialMessage.push(e.slice(t,t+o)),this.readMessageRemaining-=o,t+=o,this.readMessageRemaining===0){let a=[this.readCompressFlag,this.readPartialSize].concat(this.readPartialMessage),i=Buffer.concat(a,this.readMessageSize+5);this.readState=rn.NO_DATA,s.push(i)}break;default:throw new Error("Unexpected read state")}return s}};U_.StreamDecoder=aO});var Oj=T(k_=>{"use strict";Object.defineProperty(k_,"__esModule",{value:!0});k_.Http2SubchannelCall=void 0;var An=V("http2"),Rhe=V("os"),Oe=ue(),Rn=ht(),Nhe=lO(),Che=Pe(),Phe=ue(),Ihe="subchannel_call";function bhe(r){for(let[e,t]of Object.entries(Rhe.constants.errno))if(t===r)return e;return"Unknown system error "+r}function cO(r){let e=`Received HTTP status code ${r}`,t;switch(r){case 400:t=Oe.Status.INTERNAL;break;case 401:t=Oe.Status.UNAUTHENTICATED;break;case 403:t=Oe.Status.PERMISSION_DENIED;break;case 404:t=Oe.Status.UNIMPLEMENTED;break;case 429:case 502:case 503:case 504:t=Oe.Status.UNAVAILABLE;break;default:t=Oe.Status.UNKNOWN}return{code:t,details:e,metadata:new Rn.Metadata}}var uO=class{constructor(e,t,o,s,a){var i;this.http2Stream=e,this.callEventTracker=t,this.listener=o,this.transport=s,this.callId=a,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,this.connectionDropped=!1;let n=(i=s.getOptions()["grpc.max_receive_message_length"])!==null&&i!==void 0?i:Oe.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH;this.decoder=new Nhe.StreamDecoder(n),e.on("response",(l,c)=>{let u="";for(let f of Object.keys(l))u+=" "+f+": "+l[f]+` `;if(this.trace(`Received server headers: `+u),this.httpStatusCode=l[":status"],c&An.constants.NGHTTP2_FLAG_END_STREAM)this.handleTrailers(l);else{let f;try{f=Rn.Metadata.fromHttp2Headers(l)}catch(_){this.endCall({code:Oe.Status.UNKNOWN,details:_.message,metadata:new Rn.Metadata});return}this.listener.onReceiveMetadata(f)}}),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){if(this.httpStatusCode!==void 0&&this.httpStatusCode!==200){let f=cO(this.httpStatusCode);this.cancelWithStatus(f.code,f.details)}else this.cancelWithStatus(Oe.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)===Oe.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 f=cO(this.httpStatusCode);c=f.code,u=f.details}else c=Oe.Status.INTERNAL,u=`Received RST_STREAM with code ${e.rstCode} (Call ended without gRPC status)`;break;case An.constants.NGHTTP2_REFUSED_STREAM:c=Oe.Status.UNAVAILABLE,u="Stream refused by server";break;case An.constants.NGHTTP2_CANCEL:this.connectionDropped?(c=Oe.Status.UNAVAILABLE,u="Connection dropped"):(c=Oe.Status.CANCELLED,u="Call cancelled");break;case An.constants.NGHTTP2_ENHANCE_YOUR_CALM:c=Oe.Status.RESOURCE_EXHAUSTED,u="Bandwidth exhausted or memory limit exceeded";break;case An.constants.NGHTTP2_INADEQUATE_SECURITY:c=Oe.Status.PERMISSION_DENIED,u="Protocol not secure enough";break;case An.constants.NGHTTP2_INTERNAL_ERROR:c=Oe.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=Oe.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=Oe.Status.INTERNAL,u=`Received RST_STREAM with code ${e.rstCode}`}this.endCall({code:c,details:u,metadata:new Rn.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="+bhe(l.errno)+" syscall="+l.syscall),this.internalError=l),this.callEventTracker.onStreamEnd(!1)})}getDeadlineInfo(){return[`remote_addr=${this.getPeer()}`]}onDisconnect(){this.connectionDropped=!0,setImmediate(()=>{this.endCall({code:Oe.Status.UNAVAILABLE,details:"Connection dropped",metadata:new Rn.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){Che.trace(Phe.LogVerbosity.DEBUG,Ihe,"["+this.callId+"] "+e)}endCall(e){(this.finalStatus===null||this.finalStatus.code===Oe.Status.OK)&&(this.finalStatus=e,this.maybeOutputStatus()),this.destroyHttp2Stream()}maybeOutputStatus(){this.finalStatus!==null&&(this.finalStatus.code!==Oe.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 i of Object.keys(e))t+=" "+i+": "+e[i]+` `;this.trace(`Received server trailers: `+t);let o;try{o=Rn.Metadata.fromHttp2Headers(e)}catch{o=new Rn.Metadata}let s=o.getMap(),a;if(typeof s["grpc-status"]=="string"){let i=Number(s["grpc-status"]);this.trace("received status code "+i+" from server"),o.remove("grpc-status");let n="";if(typeof s["grpc-message"]=="string"){try{n=decodeURI(s["grpc-message"])}catch{n=s["grpc-message"]}o.remove("grpc-message"),this.trace('received status details string "'+n+'" from server')}a={code:i,details:n,metadata:o}}else this.httpStatusCode?(a=cO(this.httpStatusCode),a.metadata=o):a={code:Oe.Status.UNKNOWN,details:"No status information received",metadata:o};this.endCall(a)}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)===Oe.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 Rn.Metadata})}getStatus(){return this.finalStatus}getPeer(){return this.transport.getPeerName()}getCallNumber(){return this.callId}startRead(){if(this.finalStatus!==null&&this.finalStatus.code!==Oe.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 o=s=>{process.nextTick(()=>{var a;let i=Oe.Status.UNAVAILABLE;(s==null?void 0:s.code)==="ERR_STREAM_WRITE_AFTER_END"&&(i=Oe.Status.INTERNAL),s&&this.cancelWithStatus(i,`Write error: ${s.message}`),(a=e.callback)===null||a===void 0||a.call(e)})};this.trace("sending data chunk of length "+t.length),this.callEventTracker.addMessageSent();try{this.http2Stream.write(t,o)}catch(s){this.endCall({code:Oe.Status.UNAVAILABLE,details:`Write failed with error ${s.message}`,metadata:new Rn.Metadata})}}halfClose(){this.trace("end() called"),this.trace("calling end() on HTTP/2 stream"),this.http2Stream.end()}};k_.Http2SubchannelCall=uO});var pO=T(fO=>{"use strict";Object.defineProperty(fO,"__esModule",{value:!0});fO.getNextCallNumber=xhe;var Lhe=0;function xhe(){return Lhe++}});var Aj=T(F_=>{"use strict";Object.defineProperty(F_,"__esModule",{value:!0});F_.Http2SubchannelConnector=void 0;var mO=V("http2"),B_=_o(),eu=ue(),Mhe=sO(),ma=Pe(),whe=jr(),V_=nr(),dO=Pt(),Dhe=V("net"),Uhe=Oj(),khe=pO(),hO="transport",Bhe="transport_flowctrl",Vhe=uv().version,{HTTP2_HEADER_AUTHORITY:Fhe,HTTP2_HEADER_CONTENT_TYPE:Ghe,HTTP2_HEADER_METHOD:Hhe,HTTP2_HEADER_PATH:qhe,HTTP2_HEADER_TE:jhe,HTTP2_HEADER_USER_AGENT:Yhe}=mO.constants,zhe=2e4,Khe=Buffer.from("too_many_pings","ascii"),_O=class{constructor(e,t,o,s){this.session=e,this.options=o,this.remoteName=s,this.keepaliveTimer=null,this.pendingSendKeepalivePing=!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,V_.subchannelAddressToString)(t),o["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.streamTracker=new B_.ChannelzCallTrackerStub):this.streamTracker=new B_.ChannelzCallTracker,this.channelzRef=(0,B_.registerChannelzSocket)(this.subchannelAddressString,()=>this.getChannelzInfo(),this.channelzEnabled),this.userAgent=[o["grpc.primary_user_agent"],`grpc-node-js/${Vhe}`,o["grpc.secondary_user_agent"]].filter(a=>a).join(" "),"grpc.keepalive_time_ms"in o?this.keepaliveTimeMs=o["grpc.keepalive_time_ms"]:this.keepaliveTimeMs=-1,"grpc.keepalive_timeout_ms"in o?this.keepaliveTimeoutMs=o["grpc.keepalive_timeout_ms"]:this.keepaliveTimeoutMs=zhe,"grpc.keepalive_permit_without_calls"in o?this.keepaliveWithoutCalls=o["grpc.keepalive_permit_without_calls"]===1:this.keepaliveWithoutCalls=!1,e.once("close",()=>{this.trace("session closed"),this.handleDisconnect()}),e.once("goaway",(a,i,n)=>{let l=!1;a===mO.constants.NGHTTP2_ENHANCE_YOUR_CALM&&n&&n.equals(Khe)&&(l=!0),this.trace("connection closed by GOAWAY with code "+a+" and data "+(n==null?void 0:n.toString())),this.reportDisconnectToOwner(l)}),e.once("error",a=>{this.trace("connection closed with error "+a.message),this.handleDisconnect()}),e.socket.once("close",a=>{this.trace("connection closed. hadError="+a),this.handleDisconnect()}),ma.isTracerEnabled(hO)&&(e.on("remoteSettings",a=>{this.trace("new settings received"+(this.session!==e?" on the old connection":"")+": "+JSON.stringify(a))}),e.on("localSettings",a=>{this.trace("local settings acknowledged by remote"+(this.session!==e?" on the old connection":"")+": "+JSON.stringify(a))})),this.keepaliveWithoutCalls&&this.maybeStartKeepalivePingTimer()}getChannelzInfo(){var e,t,o;let s=this.session.socket,a=s.remoteAddress?(0,V_.stringToSubchannelAddress)(s.remoteAddress,s.remotePort):null,i=s.localAddress?(0,V_.stringToSubchannelAddress)(s.localAddress,s.localPort):null,n;if(this.session.encrypted){let c=s,u=c.getCipher(),f=c.getCertificate(),_=c.getPeerCertificate();n={cipherSuiteStandardName:(e=u.standardName)!==null&&e!==void 0?e:null,cipherSuiteOtherName:u.standardName?null:u.name,localCertificate:f&&"raw"in f?f.raw:null,remoteCertificate:_&&"raw"in _?_.raw:null}}else n=null;return{remoteAddress:a,localAddress:i,security:n,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:(o=this.session.state.remoteWindowSize)!==null&&o!==void 0?o:null}}trace(e){ma.trace(eu.LogVerbosity.DEBUG,hO,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}keepaliveTrace(e){ma.trace(eu.LogVerbosity.DEBUG,"keepalive","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}flowControlTrace(e){ma.trace(eu.LogVerbosity.DEBUG,Bhe,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}internalsTrace(e){ma.trace(eu.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.clearKeepaliveTimeout(),this.reportDisconnectToOwner(!1);for(let e of this.activeCalls)e.onDisconnect();setImmediate(()=>{this.session.destroy()})}addDisconnectListener(e){this.disconnectListeners.push(e)}canSendPing(){return!this.session.destroyed&&this.keepaliveTimeMs>0&&(this.keepaliveWithoutCalls||this.activeCalls.size>0)}maybeSendPing(){var e,t;if(!this.canSendPing()){this.pendingSendKeepalivePing=!0;return}if(this.keepaliveTimer){console.error("keepaliveTimeout is not null");return}this.channelzEnabled&&(this.keepalivesSent+=1),this.keepaliveTrace("Sending ping with timeout "+this.keepaliveTimeoutMs+"ms"),this.keepaliveTimer=setTimeout(()=>{this.keepaliveTimer=null,this.keepaliveTrace("Ping timeout passed without response"),this.handleDisconnect()},this.keepaliveTimeoutMs),(t=(e=this.keepaliveTimer).unref)===null||t===void 0||t.call(e);let o="";try{this.session.ping((a,i,n)=>{this.clearKeepaliveTimeout(),a?(this.keepaliveTrace("Ping failed with error "+a.message),this.handleDisconnect()):(this.keepaliveTrace("Received ping response"),this.maybeStartKeepalivePingTimer())})||(o="Ping returned false")}catch(s){o=(s instanceof Error?s.message:"")||"Unknown error"}o&&(this.keepaliveTrace("Ping send failed: "+o),this.handleDisconnect())}maybeStartKeepalivePingTimer(){var e,t;this.canSendPing()&&(this.pendingSendKeepalivePing?(this.pendingSendKeepalivePing=!1,this.maybeSendPing()):this.keepaliveTimer||(this.keepaliveTrace("Starting keepalive timer for "+this.keepaliveTimeMs+"ms"),this.keepaliveTimer=setTimeout(()=>{this.keepaliveTimer=null,this.maybeSendPing()},this.keepaliveTimeMs),(t=(e=this.keepaliveTimer).unref)===null||t===void 0||t.call(e)))}clearKeepaliveTimeout(){this.keepaliveTimer&&(clearTimeout(this.keepaliveTimer),this.keepaliveTimer=null)}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,o,s,a){let i=e.toHttp2Headers();i[Fhe]=t,i[Yhe]=this.userAgent,i[Ghe]="application/grpc",i[Hhe]="POST",i[qhe]=o,i[jhe]="trailers";let n;try{n=this.session.request(i)}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=a.addMessageSent)===null||u===void 0||u.call(a)},addMessageReceived:()=>{var u;this.messagesReceived+=1,this.lastMessageReceivedTimestamp=new Date,(u=a.addMessageReceived)===null||u===void 0||u.call(a)},onCallEnd:u=>{var f;(f=a.onCallEnd)===null||f===void 0||f.call(a,u),this.removeActiveCall(c)},onStreamEnd:u=>{var f;u?this.streamTracker.addCallSucceeded():this.streamTracker.addCallFailed(),(f=a.onStreamEnd)===null||f===void 0||f.call(a,u)}}):l={addMessageSent:()=>{var u;(u=a.addMessageSent)===null||u===void 0||u.call(a)},addMessageReceived:()=>{var u;(u=a.addMessageReceived)===null||u===void 0||u.call(a)},onCallEnd:u=>{var f;(f=a.onCallEnd)===null||f===void 0||f.call(a,u),this.removeActiveCall(c)},onStreamEnd:u=>{var f;(f=a.onStreamEnd)===null||f===void 0||f.call(a,u)}},c=new Uhe.Http2SubchannelCall(n,l,s,this,(0,khe.getNextCallNumber)()),this.addActiveCall(c),c}getChannelzRef(){return this.channelzRef}getPeerName(){return this.subchannelAddressString}getOptions(){return this.options}shutdown(){this.session.close(),(0,B_.unregisterChannelzRef)(this.channelzRef)}},EO=class{constructor(e){this.channelTarget=e,this.session=null,this.isShutdown=!1}trace(e){ma.trace(eu.LogVerbosity.DEBUG,hO,(0,dO.uriToString)(this.channelTarget)+" "+e)}createSession(e,t,o){return this.isShutdown?Promise.reject():e.socket.closed?Promise.reject("Connection closed before starting HTTP/2 handshake"):new Promise((s,a)=>{let i=null,n=this.channelTarget;if("grpc.http_connect_target"in o){let A=(0,dO.parseUri)(o["grpc.http_connect_target"]);A&&(n=A,i=(0,dO.uriToString)(A))}let l=e.secure?"https":"http",c=(0,whe.getDefaultAuthority)(n),u=()=>{var A;(A=this.session)===null||A===void 0||A.destroy(),this.session=null,setImmediate(()=>{y||(y=!0,a(`${O.trim()} (${new Date().toISOString()})`))})},f=A=>{var I;(I=this.session)===null||I===void 0||I.destroy(),O=A.message,this.trace("connection failed with error "+O),y||(y=!0,a(`${O} (${new Date().toISOString()})`))},_={createConnection:(A,I)=>e.socket};o["grpc-node.flow_control_window"]!==void 0&&(_.settings={initialWindowSize:o["grpc-node.flow_control_window"]});let m=mO.connect(`${l}://${c}`,_);this.session=m;let O="Failed to connect",y=!1;m.unref(),m.once("remoteSettings",()=>{m.removeAllListeners(),e.socket.removeListener("close",u),e.socket.removeListener("error",f),s(new _O(m,t,o,i)),this.session=null}),m.once("close",u),m.once("error",f),e.socket.once("close",u),e.socket.once("error",f)})}tcpConnect(e,t){return(0,Mhe.getProxiedConnection)(e,t).then(o=>o||new Promise((s,a)=>{let i=()=>{a(new Error("Socket closed"))},n=c=>{a(c)},l=Dhe.connect(e,()=>{l.removeListener("close",i),l.removeListener("error",n),s(l)});l.once("close",i),l.once("error",n)}))}async connect(e,t,o){if(this.isShutdown)return Promise.reject();let s=null,a=null,i=(0,V_.subchannelAddressToString)(e);try{return this.trace(i+" Waiting for secureConnector to be ready"),await t.waitForReady(),this.trace(i+" secureConnector is ready"),s=await this.tcpConnect(e,o),s.setNoDelay(),this.trace(i+" Established TCP connection"),a=await t.connect(s),this.trace(i+" Established secure connection"),this.createSession(a,e,o)}catch(n){throw s==null||s.destroy(),a==null||a.socket.destroy(),n}}shutdown(){var e;this.isShutdown=!0,(e=this.session)===null||e===void 0||e.close(),this.session=null}};F_.Http2SubchannelConnector=EO});var Rj=T(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.SubchannelPool=void 0;ru.getSubchannelPool=t_e;var $he=W3(),Xhe=hj(),Whe=nr(),Jhe=Pt(),Qhe=Aj(),Zhe=1e4,tu=class{constructor(){this.pool=Object.create(null),this.cleanupTimer=null}unrefUnusedSubchannels(){let e=!0;for(let t in this.pool){let s=this.pool[t].filter(a=>!a.subchannel.unrefIfOneRef());s.length>0&&(e=!1),this.pool[t]=s}e&&this.cleanupTimer!==null&&(clearInterval(this.cleanupTimer),this.cleanupTimer=null)}ensureCleanupTask(){var e,t;this.cleanupTimer===null&&(this.cleanupTimer=setInterval(()=>{this.unrefUnusedSubchannels()},Zhe),(t=(e=this.cleanupTimer).unref)===null||t===void 0||t.call(e))}getOrCreateSubchannel(e,t,o,s){this.ensureCleanupTask();let a=(0,Jhe.uriToString)(e);if(a in this.pool){let n=this.pool[a];for(let l of n)if((0,Whe.subchannelAddressEqual)(t,l.subchannelAddress)&&(0,$he.channelOptionsEqual)(o,l.channelArguments)&&s._equals(l.channelCredentials))return l.subchannel}let i=new Xhe.Subchannel(e,t,o,s,new Qhe.Http2SubchannelConnector(e));return a in this.pool||(this.pool[a]=[]),this.pool[a].push({subchannelAddress:t,channelArguments:o,channelCredentials:s,subchannel:i}),i.ref(),i}};ru.SubchannelPool=tu;var e_e=new tu;function t_e(r){return r?e_e:new tu}});var SO=T(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.FilterStackFactory=Ta.FilterStack=void 0;var G_=class{constructor(e){this.filters=e}sendMetadata(e){let t=e;for(let o=0;o=0;o--)t=this.filters[o].receiveMetadata(t);return t}sendMessage(e){let t=e;for(let o=0;o=0;o--)t=this.filters[o].receiveMessage(t);return t}receiveTrailers(e){let t=e;for(let o=this.filters.length-1;o>=0;o--)t=this.filters[o].receiveTrailers(t);return t}push(e){this.filters.unshift(...e)}getFilters(){return this.filters}};Ta.FilterStack=G_;var TO=class r{constructor(e){this.factories=e}push(e){this.factories.unshift(...e)}clone(){return new r([...this.factories])}createFilter(){return new G_(this.factories.map(e=>e.createFilter()))}};Ta.FilterStackFactory=TO});var gO=T(H_=>{"use strict";Object.defineProperty(H_,"__esModule",{value:!0});H_.CompressionAlgorithms=void 0;var Nj;(function(r){r[r.identity=0]="identity",r[r.deflate=1]="deflate",r[r.gzip=2]="gzip"})(Nj||(H_.CompressionAlgorithms=Nj={}))});var yO=T(q_=>{"use strict";Object.defineProperty(q_,"__esModule",{value:!0});q_.BaseFilter=void 0;var vO=class{async sendMetadata(e){return e}receiveMetadata(e){return e}async sendMessage(e){return e}async receiveMessage(e){return e}receiveTrailers(e){return e}};q_.BaseFilter=vO});var Ij=T(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.CompressionFilterFactory=va.CompressionFilter=void 0;var j_=V("zlib"),Pj=gO(),Sa=ue(),r_e=yO(),n_e=Pe(),i_e=r=>typeof r=="number"&&typeof Pj.CompressionAlgorithms[r]=="string",ga=class{async writeMessage(e,t){let o=e;t&&(o=await this.compressMessage(o));let s=Buffer.allocUnsafe(o.length+5);return s.writeUInt8(t?1:0,0),s.writeUInt32BE(o.length,1),o.copy(s,5),s}async readMessage(e){let t=e.readUInt8(0)===1,o=e.slice(5);return t&&(o=await this.decompressMessage(o)),o}},mo=class extends ga{async compressMessage(e){return e}async writeMessage(e,t){let o=Buffer.allocUnsafe(e.length+5);return o.writeUInt8(0,0),o.writeUInt32BE(e.length,1),e.copy(o,5),o}decompressMessage(e){return Promise.reject(new Error('Received compressed message but "grpc-encoding" header was identity'))}},OO=class extends ga{constructor(e){super(),this.maxRecvMessageLength=e}compressMessage(e){return new Promise((t,o)=>{j_.deflate(e,(s,a)=>{s?o(s):t(a)})})}decompressMessage(e){return new Promise((t,o)=>{let s=0,a=[],i=j_.createInflate();i.on("data",n=>{a.push(n),s+=n.byteLength,this.maxRecvMessageLength!==-1&&s>this.maxRecvMessageLength&&(i.destroy(),o({code:Sa.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxRecvMessageLength}`}))}),i.on("end",()=>{t(Buffer.concat(a))}),i.write(e),i.end()})}},AO=class extends ga{constructor(e){super(),this.maxRecvMessageLength=e}compressMessage(e){return new Promise((t,o)=>{j_.gzip(e,(s,a)=>{s?o(s):t(a)})})}decompressMessage(e){return new Promise((t,o)=>{let s=0,a=[],i=j_.createGunzip();i.on("data",n=>{a.push(n),s+=n.byteLength,this.maxRecvMessageLength!==-1&&s>this.maxRecvMessageLength&&(i.destroy(),o({code:Sa.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxRecvMessageLength}`}))}),i.on("end",()=>{t(Buffer.concat(a))}),i.write(e),i.end()})}},RO=class extends ga{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 Cj(r,e){switch(r){case"identity":return new mo;case"deflate":return new OO(e);case"gzip":return new AO(e);default:return new RO(r)}}var Y_=class extends r_e.BaseFilter{constructor(e,t){var o,s,a;super(),this.sharedFilterConfig=t,this.sendCompression=new mo,this.receiveCompression=new mo,this.currentCompressionAlgorithm="identity";let i=e["grpc.default_compression_algorithm"];if(this.maxReceiveMessageLength=(o=e["grpc.max_receive_message_length"])!==null&&o!==void 0?o:Sa.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH,this.maxSendMessageLength=(s=e["grpc.max_send_message_length"])!==null&&s!==void 0?s:Sa.DEFAULT_MAX_SEND_MESSAGE_LENGTH,i!==void 0)if(i_e(i)){let n=Pj.CompressionAlgorithms[i],l=(a=t.serverSupportedEncodingHeader)===null||a===void 0?void 0:a.split(",");(!l||l.includes(n))&&(this.currentCompressionAlgorithm=n,this.sendCompression=Cj(this.currentCompressionAlgorithm,-1))}else n_e.log(Sa.LogVerbosity.ERROR,`Invalid value provided for grpc.default_compression_algorithm option: ${i}`)}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 s=t[0];typeof s=="string"&&(this.receiveCompression=Cj(s,this.maxReceiveMessageLength))}e.remove("grpc-encoding");let o=e.get("grpc-accept-encoding")[0];return o&&(this.sharedFilterConfig.serverSupportedEncodingHeader=o,o.split(",").includes(this.currentCompressionAlgorithm)||(this.sendCompression=new mo,this.currentCompressionAlgorithm="identity")),e.remove("grpc-accept-encoding"),e}async sendMessage(e){var t;let o=await e;if(this.maxSendMessageLength!==-1&&o.message.length>this.maxSendMessageLength)throw{code:Sa.Status.RESOURCE_EXHAUSTED,details:`Attempted to send message with a size larger than ${this.maxSendMessageLength}`};let s;return this.sendCompression instanceof mo?s=!1:s=(((t=o.flags)!==null&&t!==void 0?t:0)&2)===0,{message:await this.sendCompression.writeMessage(o.message,s),flags:o.flags}}async receiveMessage(e){return this.receiveCompression.readMessage(await e)}};va.CompressionFilter=Y_;var NO=class{constructor(e,t){this.options=t,this.sharedFilterConfig={}}createFilter(){return new Y_(this.options,this.sharedFilterConfig)}};va.CompressionFilterFactory=NO});var nu=T(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.minDeadline=o_e;To.getDeadlineTimeoutString=a_e;To.getRelativeTimeout=c_e;To.deadlineToString=u_e;To.formatDateDifference=f_e;function o_e(...r){let e=1/0;for(let t of r){let o=t instanceof Date?t.getTime():t;ol_e?1/0:o}function u_e(r){if(r instanceof Date)return r.toISOString();{let e=new Date(r);return Number.isNaN(e.getTime())?""+r:e.toISOString()}}function f_e(r,e){return((e.getTime()-r.getTime())/1e3).toFixed(3)+"s"}});var z_=T(CO=>{"use strict";Object.defineProperty(CO,"__esModule",{value:!0});CO.restrictControlPlaneStatusCode=d_e;var nn=ue(),p_e=[nn.Status.OK,nn.Status.INVALID_ARGUMENT,nn.Status.NOT_FOUND,nn.Status.ALREADY_EXISTS,nn.Status.FAILED_PRECONDITION,nn.Status.ABORTED,nn.Status.OUT_OF_RANGE,nn.Status.DATA_LOSS];function d_e(r,e){return p_e.includes(r)?{code:nn.Status.INTERNAL,details:`Invalid status from control plane: ${r} ${nn.Status[r]} ${e}`}:{code:r,details:e}}});var xj=T(X_=>{"use strict";Object.defineProperty(X_,"__esModule",{value:!0});X_.LoadBalancingCall=void 0;var bj=rr(),K_=ue(),Lj=nu(),$_=ht(),iu=Zn(),h_e=Pt(),__e=Pe(),PO=z_(),E_e=V("http2"),m_e="load_balancing_call",IO=class{constructor(e,t,o,s,a,i,n){var l,c;this.channel=e,this.callConfig=t,this.methodName=o,this.host=s,this.credentials=a,this.deadline=i,this.callNumber=n,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("/"),f="";u.length>=2&&(f=u[1]);let _=(c=(l=(0,h_e.splitHostPort)(this.host))===null||l===void 0?void 0:l.host)!==null&&c!==void 0?c:"localhost";this.serviceUrl=`https://${_}/${f}`,this.startTime=new Date}getDeadlineInfo(){var e,t;let o=[];return this.childStartTime?(this.childStartTime>this.startTime&&(!((e=this.metadata)===null||e===void 0)&&e.getOptions().waitForReady&&o.push("wait_for_ready"),o.push(`LB pick: ${(0,Lj.formatDateDifference)(this.startTime,this.childStartTime)}`)),o.push(...this.child.getDeadlineInfo()),o):(!((t=this.metadata)===null||t===void 0)&&t.getOptions().waitForReady&&o.push("wait_for_ready"),o.push("Waiting for LB pick"),o)}trace(e){__e.trace(K_.LogVerbosity.DEBUG,m_e,"["+this.callNumber+"] "+e)}outputStatus(e,t){var o,s;if(!this.ended){this.ended=!0,this.trace("ended with status: code="+e.code+' details="'+e.details+'" start time='+this.startTime.toISOString());let a=Object.assign(Object.assign({},e),{progress:t});(o=this.listener)===null||o===void 0||o.onReceiveStatus(a),(s=this.onCallEnded)===null||s===void 0||s.call(this,a.code)}}doPick(){var e,t;if(this.ended)return;if(!this.metadata)throw new Error("doPick called before start");this.trace("Pick called");let o=this.metadata.clone(),s=this.channel.doPick(o,this.callConfig.pickInformation),a=s.subchannel?"("+s.subchannel.getChannelzRef().id+") "+s.subchannel.getAddress():""+s.subchannel;switch(this.trace("Pick result: "+iu.PickResultType[s.pickResultType]+" subchannel: "+a+" status: "+((e=s.status)===null||e===void 0?void 0:e.code)+" "+((t=s.status)===null||t===void 0?void 0:t.details)),s.pickResultType){case iu.PickResultType.COMPLETE:this.credentials.compose(s.subchannel.getCallCredentials()).generateMetadata({method_name:this.methodName,service_url:this.serviceUrl}).then(c=>{var u;if(this.ended){this.trace("Credentials metadata generation finished after call ended");return}if(o.merge(c),o.get("authorization").length>1&&this.outputStatus({code:K_.Status.INTERNAL,details:'"authorization" metadata cannot have multiple values',metadata:new $_.Metadata},"PROCESSED"),s.subchannel.getConnectivityState()!==bj.ConnectivityState.READY){this.trace("Picked subchannel "+a+" has state "+bj.ConnectivityState[s.subchannel.getConnectivityState()]+" after getting credentials metadata. Retrying pick"),this.doPick();return}this.deadline!==1/0&&o.set("grpc-timeout",(0,Lj.getDeadlineTimeoutString)(this.deadline));try{this.child=s.subchannel.getRealSubchannel().createCall(o,this.host,this.methodName,{onReceiveMetadata:f=>{this.trace("Received metadata"),this.listener.onReceiveMetadata(f)},onReceiveMessage:f=>{this.trace("Received message"),this.listener.onReceiveMessage(f)},onReceiveStatus:f=>{this.trace("Received status"),f.rstCode===E_e.constants.NGHTTP2_REFUSED_STREAM?this.outputStatus(f,"REFUSED"):this.outputStatus(f,"PROCESSED")}}),this.childStartTime=new Date}catch(f){this.trace("Failed to start call on picked subchannel "+a+" with error "+f.message),this.outputStatus({code:K_.Status.INTERNAL,details:"Failed to start HTTP/2 stream with error "+f.message,metadata:new $_.Metadata},"NOT_STARTED");return}(u=s.onCallStarted)===null||u===void 0||u.call(s),this.onCallEnded=s.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()},c=>{let{code:u,details:f}=(0,PO.restrictControlPlaneStatusCode)(typeof c.code=="number"?c.code:K_.Status.UNKNOWN,`Getting metadata from plugin failed with error: ${c.message}`);this.outputStatus({code:u,details:f,metadata:new $_.Metadata},"PROCESSED")});break;case iu.PickResultType.DROP:let{code:n,details:l}=(0,PO.restrictControlPlaneStatusCode)(s.status.code,s.status.details);setImmediate(()=>{this.outputStatus({code:n,details:l,metadata:s.status.metadata},"DROP")});break;case iu.PickResultType.TRANSIENT_FAILURE:if(this.metadata.getOptions().waitForReady)this.channel.queueCallForPick(this);else{let{code:c,details:u}=(0,PO.restrictControlPlaneStatusCode)(s.status.code,s.status.details);setImmediate(()=>{this.outputStatus({code:c,details:u,metadata:s.status.metadata},"PROCESSED")})}break;case iu.PickResultType.QUEUE:this.channel.queueCallForPick(this)}}cancelWithStatus(e,t){var o;this.trace("cancelWithStatus code: "+e+' details: "'+t+'"'),(o=this.child)===null||o===void 0||o.cancelWithStatus(e,t),this.outputStatus({code:e,details:t,metadata:new $_.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}};X_.LoadBalancingCall=IO});var wj=T(W_=>{"use strict";Object.defineProperty(W_,"__esModule",{value:!0});W_.ResolvingCall=void 0;var T_e=kh(),So=ue(),go=nu(),Mj=ht(),S_e=Pe(),g_e=z_(),v_e="resolving_call",bO=class{constructor(e,t,o,s,a){this.channel=e,this.method=t,this.filterStackFactory=s,this.callNumber=a,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.credentials=T_e.CallCredentials.createEmpty(),this.deadline=o.deadline,this.host=o.host,o.parentCall&&(o.flags&So.Propagate.CANCELLATION&&o.parentCall.on("cancelled",()=>{this.cancelWithStatus(So.Status.CANCELLED,"Cancelled by parent call")}),o.flags&So.Propagate.DEADLINE&&(this.trace("Propagating deadline from parent: "+o.parentCall.getDeadline()),this.deadline=(0,go.minDeadline)(this.deadline,o.parentCall.getDeadline()))),this.trace("Created"),this.runDeadlineTimer()}trace(e){S_e.trace(So.LogVerbosity.DEBUG,v_e,"["+this.callNumber+"] "+e)}runDeadlineTimer(){clearTimeout(this.deadlineTimer),this.deadlineStartTime=new Date,this.trace("Deadline: "+(0,go.deadlineToString)(this.deadline));let e=(0,go.getRelativeTimeout)(this.deadline);if(e!==1/0){this.trace("Deadline will be reached in "+e+"ms");let t=()=>{if(!this.deadlineStartTime){this.cancelWithStatus(So.Status.DEADLINE_EXCEEDED,"Deadline exceeded");return}let o=[],s=new Date;o.push(`Deadline exceeded after ${(0,go.formatDateDifference)(this.deadlineStartTime,s)}`),this.configReceivedTime?(this.configReceivedTime>this.deadlineStartTime&&o.push(`name resolution: ${(0,go.formatDateDifference)(this.deadlineStartTime,this.configReceivedTime)}`),this.childStartTime?this.childStartTime>this.configReceivedTime&&o.push(`metadata filters: ${(0,go.formatDateDifference)(this.configReceivedTime,this.childStartTime)}`):o.push("waiting for metadata filters")):o.push("waiting for name resolution"),this.child&&o.push(...this.child.getDeadlineInfo()),this.cancelWithStatus(So.Status.DEADLINE_EXCEEDED,o.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(o=>o(t)),process.nextTick(()=>{var o;(o=this.listener)===null||o===void 0||o.onReceiveStatus(t)})}}sendMessageOnChild(e,t){if(!this.child)throw new Error("sendMessageonChild called with child not populated");let o=this.child;this.writeFilterPending=!0,this.filterStack.sendMessage(Promise.resolve({message:t,flags:e.flags})).then(s=>{this.writeFilterPending=!1,o.sendMessageWithContext(e,s.message),this.pendingHalfClose&&o.halfClose()},s=>{this.cancelWithStatus(s.code,s.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!==So.Status.OK){let{code:o,details:s}=(0,g_e.restrictControlPlaneStatusCode)(t.status,"Failed to route call to method "+this.method);this.outputStatus({code:o,details:s,metadata:new Mj.Metadata});return}if(t.methodConfig.timeout){let o=new Date;o.setSeconds(o.getSeconds()+t.methodConfig.timeout.seconds),o.setMilliseconds(o.getMilliseconds()+t.methodConfig.timeout.nanos/1e6),this.deadline=(0,go.minDeadline)(this.deadline,o),this.runDeadlineTimer()}this.filterStackFactory.push(t.dynamicFilterFactories),this.filterStack=this.filterStackFactory.createFilter(),this.filterStack.sendMetadata(Promise.resolve(this.metadata)).then(o=>{this.child=this.channel.createRetryingCall(t,this.method,this.host,this.credentials,this.deadline),this.trace("Created child ["+this.child.getCallNumber()+"]"),this.childStartTime=new Date,this.child.start(o,{onReceiveMetadata:s=>{this.trace("Received metadata"),this.listener.onReceiveMetadata(this.filterStack.receiveMetadata(s))},onReceiveMessage:s=>{this.trace("Received message"),this.readFilterPending=!0,this.filterStack.receiveMessage(s).then(a=>{this.trace("Finished filtering received message"),this.readFilterPending=!1,this.listener.onReceiveMessage(a),this.pendingChildStatus&&this.outputStatus(this.pendingChildStatus)},a=>{this.cancelWithStatus(a.code,a.details)})},onReceiveStatus:s=>{this.trace("Received status"),this.readFilterPending?this.pendingChildStatus=s:this.outputStatus(s)}}),this.readPending&&this.child.startRead(),this.pendingMessage?this.sendMessageOnChild(this.pendingMessage.context,this.pendingMessage.message):this.pendingHalfClose&&this.child.halfClose()},o=>{this.outputStatus(o)})}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 o;this.trace("cancelWithStatus code: "+e+' details: "'+t+'"'),(o=this.child)===null||o===void 0||o.cancelWithStatus(e,t),this.outputStatus({code:e,details:t,metadata:new Mj.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=e}addStatusWatcher(e){this.statusWatchers.push(e)}getCallNumber(){return this.callNumber}};W_.ResolvingCall=bO});var Dj=T(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.RetryingCall=li.MessageBufferTracker=li.RetryThrottler=void 0;var J_=ue(),y_e=nu(),O_e=ht(),A_e=Pe(),R_e="retrying_call",xO=class{constructor(e,t,o){this.maxTokens=e,this.tokenRatio=t,o?this.tokens=o.tokens*(e/o.maxTokens):this.tokens=e}addCallSucceeded(){this.tokens=Math.min(this.tokens+this.tokenRatio,this.maxTokens)}addCallFailed(){this.tokens=Math.max(this.tokens-1,0)}canRetryCall(){return this.tokens>this.maxTokens/2}};li.RetryThrottler=xO;var MO=class{constructor(e,t){this.totalLimit=e,this.limitPerCall=t,this.totalAllocated=0,this.allocatedPerCall=new Map}allocate(e,t){var o;let s=(o=this.allocatedPerCall.get(t))!==null&&o!==void 0?o:0;return this.limitPerCall-s total allocated ${this.totalAllocated}`);this.totalAllocated-=e;let s=(o=this.allocatedPerCall.get(t))!==null&&o!==void 0?o:0;if(s allocated for call ${s}`);this.allocatedPerCall.set(t,s-e)}freeAll(e){var t;let o=(t=this.allocatedPerCall.get(e))!==null&&t!==void 0?t:0;if(this.totalAllocated total allocated ${this.totalAllocated}`);this.totalAllocated-=o,this.allocatedPerCall.delete(e)}};li.MessageBufferTracker=MO;var LO="grpc-previous-rpc-attempts",N_e=5,wO=class{constructor(e,t,o,s,a,i,n,l,c){var u;this.channel=e,this.callConfig=t,this.methodName=o,this.host=s,this.credentials=a,this.deadline=i,this.callNumber=n,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;let f=(u=e.getOptions()["grpc-node.retry_max_attempts_limit"])!==null&&u!==void 0?u:N_e;if(e.getOptions()["grpc.enable_retries"]===0)this.state="NO_RETRY",this.maxAttempts=1;else if(t.methodConfig.retryPolicy){this.state="RETRY";let _=t.methodConfig.retryPolicy;this.nextRetryBackoffSec=this.initialRetryBackoffSec=Number(_.initialBackoff.substring(0,_.initialBackoff.length-1)),this.maxAttempts=Math.min(_.maxAttempts,f)}else t.methodConfig.hedgingPolicy?(this.state="HEDGING",this.maxAttempts=Math.min(t.methodConfig.hedgingPolicy.maxAttempts,f)):(this.state="TRANSPARENT_ONLY",this.maxAttempts=1);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,y_e.formatDateDifference)(this.startTime,t.startTime)}`),e.push(...t.call.getDeadlineInfo()),e}getCallNumber(){return this.callNumber}trace(e){A_e.trace(J_.LogVerbosity.DEBUG,R_e,"["+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 O_e.Metadata});for(let{call:o}of this.underlyingCalls)o.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].state==="COMPLETED"?e=this.getNextBufferIndex():e=this.underlyingCalls[this.committedCallIndex].nextMessageToSend;for(let t=this.writeBufferOffset;te&&(e=s.nextMessageToSend,t=o);t===-1?this.state="TRANSPARENT_ONLY":this.commitCall(t)}isStatusCodeInList(e,t){return e.some(o=>{var s;return o===t||o.toString().toLowerCase()===((s=J_.Status[t])===null||s===void 0?void 0:s.toLowerCase())})}getNextRetryBackoffMs(){var e;let t=(e=this.callConfig)===null||e===void 0?void 0:e.methodConfig.retryPolicy;if(!t)return 0;let o=Math.random()*this.nextRetryBackoffSec*1e3,s=Number(t.maxBackoff.substring(0,t.maxBackoff.length-1));return this.nextRetryBackoffSec=Math.min(this.nextRetryBackoffSec*t.backoffMultiplier,s),o}maybeRetryCall(e,t){if(this.state!=="RETRY"){t(!1);return}if(this.attempts>=this.maxAttempts){t(!1);return}let o;if(e===null)o=this.getNextRetryBackoffMs();else if(e<0){this.state="TRANSPARENT_ONLY",t(!1);return}else o=e,this.nextRetryBackoffSec=this.initialRetryBackoffSec;setTimeout(()=>{var s,a;if(this.state!=="RETRY"){t(!1);return}!((a=(s=this.retryThrottler)===null||s===void 0?void 0:s.canRetryCall())!==null&&a!==void 0)||a?(t(!0),this.attempts+=1,this.startNewAttempt()):(this.trace("Retry attempt denied by throttling policy"),t(!1))},o)}countActiveCalls(){let e=0;for(let t of this.underlyingCalls)(t==null?void 0:t.state)==="ACTIVE"&&(e+=1);return e}handleProcessedStatus(e,t,o){var s,a,i;switch(this.state){case"COMMITTED":case"NO_RETRY":case"TRANSPARENT_ONLY":this.commitCall(t),this.reportStatus(e);break;case"HEDGING":if(this.isStatusCodeInList((s=this.callConfig.methodConfig.hedgingPolicy.nonFatalStatusCodes)!==null&&s!==void 0?s:[],e.code)){(a=this.retryThrottler)===null||a===void 0||a.addCallFailed();let n;if(o===null)n=0;else if(o<0){this.state="TRANSPARENT_ONLY",this.commitCall(t),this.reportStatus(e);return}else n=o;setTimeout(()=>{this.maybeStartHedgingAttempt(),this.countActiveCalls()===0&&(this.commitCall(t),this.reportStatus(e))},n)}else this.commitCall(t),this.reportStatus(e);break;case"RETRY":this.isStatusCodeInList(this.callConfig.methodConfig.retryPolicy.retryableStatusCodes,e.code)?((i=this.retryThrottler)===null||i===void 0||i.addCallFailed(),this.maybeRetryCall(o,n=>{n||(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 o;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===J_.Status.OK){(o=this.retryThrottler)===null||o===void 0||o.addCallSucceeded(),this.commitCall(t),this.reportStatus(e);return}if(this.state==="NO_RETRY"){this.commitCall(t),this.reportStatus(e);return}if(this.state==="COMMITTED"){this.reportStatus(e);return}let s=this.getPushback(e.metadata);switch(e.progress){case"NOT_STARTED":this.startNewAttempt();break;case"REFUSED":this.transparentRetryUsed?this.handleProcessedStatus(e,t,s):(this.transparentRetryUsed=!0,this.startNewAttempt());break;case"DROP":this.commitCall(t),this.reportStatus(e);break;case"PROCESSED":this.handleProcessedStatus(e,t,s);break}}maybeStartHedgingAttempt(){this.state==="HEDGING"&&this.callConfig.methodConfig.hedgingPolicy&&(this.attempts>=this.maxAttempts||(this.attempts+=1,this.startNewAttempt(),this.maybeStartHedgingTimer()))}maybeStartHedgingTimer(){var e,t,o;if(this.hedgingTimer&&clearTimeout(this.hedgingTimer),this.state!=="HEDGING"||!this.callConfig.methodConfig.hedgingPolicy)return;let s=this.callConfig.methodConfig.hedgingPolicy;if(this.attempts>=this.maxAttempts)return;let a=(e=s.hedgingDelay)!==null&&e!==void 0?e:"0s",i=Number(a.substring(0,a.length-1));this.hedgingTimer=setTimeout(()=>{this.maybeStartHedgingAttempt()},i*1e3),(o=(t=this.hedgingTimer).unref)===null||o===void 0||o.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 o=this.attempts-1,s=this.initialMetadata.clone();o>0&&s.set(LO,`${o}`);let a=!1;e.start(s,{onReceiveMetadata:i=>{this.trace("Received metadata from child ["+e.getCallNumber()+"]"),this.commitCall(t),a=!0,o>0&&i.set(LO,`${o}`),this.underlyingCalls[t].state==="ACTIVE"&&this.listener.onReceiveMetadata(i)},onReceiveMessage:i=>{this.trace("Received message from child ["+e.getCallNumber()+"]"),this.commitCall(t),this.underlyingCalls[t].state==="ACTIVE"&&this.listener.onReceiveMessage(i)},onReceiveStatus:i=>{this.trace("Received status from child ["+e.getCallNumber()+"]"),!a&&o>0&&i.metadata.set(LO,`${o}`),this.handleChildStatus(i,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,o;let s=this.underlyingCalls[e],a=s.nextMessageToSend;(o=(t=this.getBufferEntry(a)).callback)===null||o===void 0||o.call(t),this.clearSentMessages(),s.nextMessageToSend+=1,this.sendNextChildMessage(e)}sendNextChildMessage(e){let t=this.underlyingCalls[e];if(t.state!=="COMPLETED"&&this.getBufferEntry(t.nextMessageToSend)){let o=this.getBufferEntry(t.nextMessageToSend);switch(o.entryType){case"MESSAGE":t.call.sendMessageWithContext({callback:s=>{this.handleChildWriteCompleted(e)}},o.message.message);break;case"HALF_CLOSE":t.nextMessageToSend+=1,t.call.halfClose();break;case"FREED":break}}}sendMessageWithContext(e,t){var o;this.trace("write() called with message of length "+t.length);let s={message:t,flags:e.flags},a=this.getNextBufferIndex(),i={entryType:"MESSAGE",message:s,allocated:this.bufferTracker.allocate(t.length,this.callNumber)};if(this.writeBuffer.push(i),i.allocated){(o=e.callback)===null||o===void 0||o.call(e);for(let[n,l]of this.underlyingCalls.entries())l.state==="ACTIVE"&&l.nextMessageToSend===a&&l.call.sendMessageWithContext({callback:c=>{this.handleChildWriteCompleted(n)}},t)}else{if(this.commitCallWithMostMessages(),this.committedCallIndex===null)return;let n=this.underlyingCalls[this.committedCallIndex];i.callback=e.callback,n.state==="ACTIVE"&&n.nextMessageToSend===a&&n.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}};li.RetryingCall=wO});var Z_=T(Q_=>{"use strict";Object.defineProperty(Q_,"__esModule",{value:!0});Q_.BaseSubchannelWrapper=void 0;var DO=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()}getCallCredentials(){return this.child.getCallCredentials()}};Q_.BaseSubchannelWrapper=DO});var qO=T(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.InternalChannel=vo.SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX=void 0;var C_e=Oc(),P_e=X3(),I_e=Rj(),BO=Zn(),b_e=ht(),ci=ue(),L_e=SO(),x_e=Ij(),Uj=jr(),eE=Pe(),M_e=sO(),tE=Pt(),sr=rr(),ou=_o(),w_e=xj(),D_e=nu(),U_e=wj(),UO=pO(),k_e=z_(),kO=Dj(),B_e=Z_(),V_e=2147483647,F_e=1e3,G_e=1800*1e3,rE=new Map,H_e=1<<24,q_e=1<<20,VO=class extends B_e.BaseSubchannelWrapper{constructor(e,t){super(e),this.channel=t,this.refCount=0,this.subchannelStateListener=(o,s,a,i)=>{t.throttleKeepalive(i)}}ref(){this.refCount===0&&(this.child.addConnectivityStateListener(this.subchannelStateListener),this.channel.addWrappedSubchannel(this)),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))}},FO=class{pick(e){return{pickResultType:BO.PickResultType.DROP,status:{code:ci.Status.UNAVAILABLE,details:"Channel closed before call started",metadata:new b_e.Metadata},subchannel:null,onCallStarted:null,onCallEnded:null}}};vo.SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX="grpc.internal.no_subchannel";var GO=class{constructor(e){this.target=e,this.trace=new ou.ChannelzTrace,this.callTracker=new ou.ChannelzCallTracker,this.childrenTracker=new ou.ChannelzChildrenTracker,this.state=sr.ConnectivityState.IDLE}getChannelzInfoCallback(){return()=>({target:this.target,state:this.state,trace:this.trace,callTracker:this.callTracker,children:this.childrenTracker.getChildLists()})}},HO=class{constructor(e,t,o){var s,a,i,n,l,c;if(this.credentials=t,this.options=o,this.connectivityState=sr.ConnectivityState.IDLE,this.currentPicker=new BO.UnavailablePicker,this.configSelectionQueue=[],this.pickQueue=[],this.connectivityStateWatchers=[],this.callRefTimer=null,this.configSelector=null,this.currentResolutionError=null,this.wrappedSubchannels=new Set,this.callCount=0,this.idleTimer=null,this.channelzEnabled=!0,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 C_e.ChannelCredentials))throw new TypeError("Channel credentials must be a ChannelCredentials object");if(o&&typeof o!="object")throw new TypeError("Channel options must be an object");this.channelzInfoTracker=new GO(e);let u=(0,tE.parseUri)(e);if(u===null)throw new Error(`Could not parse target name "${e}"`);let f=(0,Uj.mapUriDefaultScheme)(u);if(f===null)throw new Error(`Could not find a default scheme for target name "${e}"`);this.options["grpc.enable_channelz"]===0&&(this.channelzEnabled=!1),this.channelzRef=(0,ou.registerChannelzChannel)(e,this.channelzInfoTracker.getChannelzInfoCallback(),this.channelzEnabled),this.channelzEnabled&&this.channelzInfoTracker.trace.addTrace("CT_INFO","Channel created"),this.options["grpc.default_authority"]?this.defaultAuthority=this.options["grpc.default_authority"]:this.defaultAuthority=(0,Uj.getDefaultAuthority)(f);let _=(0,M_e.mapProxyName)(f,o);this.target=_.target,this.options=Object.assign({},this.options,_.extraOptions),this.subchannelPool=(0,I_e.getSubchannelPool)(((s=this.options["grpc.use_local_subchannel_pool"])!==null&&s!==void 0?s:0)===0),this.retryBufferTracker=new kO.MessageBufferTracker((a=this.options["grpc.retry_buffer_size"])!==null&&a!==void 0?a:H_e,(i=this.options["grpc.per_rpc_retry_buffer_size"])!==null&&i!==void 0?i:q_e),this.keepaliveTime=(n=this.options["grpc.keepalive_time_ms"])!==null&&n!==void 0?n:-1,this.idleTimeoutMs=Math.max((l=this.options["grpc.client_idle_timeout_ms"])!==null&&l!==void 0?l:G_e,F_e);let m={createSubchannel:(y,A)=>{let I={};for(let[N,z]of Object.entries(A))N.startsWith(vo.SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX)||(I[N]=z);let M=this.subchannelPool.getOrCreateSubchannel(this.target,y,I,this.credentials);return M.throttleKeepalive(this.keepaliveTime),this.channelzEnabled&&this.channelzInfoTracker.trace.addTrace("CT_INFO","Created subchannel or used existing subchannel",M.getChannelzRef()),new VO(M,this)},updateState:(y,A)=>{this.currentPicker=A;let I=this.pickQueue.slice();this.pickQueue=[],I.length>0&&this.callRefTimerUnref();for(let M of I)M.doPick();this.updateState(y)},requestReresolution:()=>{throw new Error("Resolving load balancer should never call requestReresolution")},addChannelzChild:y=>{this.channelzEnabled&&this.channelzInfoTracker.childrenTracker.refChild(y)},removeChannelzChild:y=>{this.channelzEnabled&&this.channelzInfoTracker.childrenTracker.unrefChild(y)}};this.resolvingLoadBalancer=new P_e.ResolvingLoadBalancer(this.target,m,this.options,(y,A)=>{var I;y.retryThrottling?rE.set(this.getTarget(),new kO.RetryThrottler(y.retryThrottling.maxTokens,y.retryThrottling.tokenRatio,rE.get(this.getTarget()))):rE.delete(this.getTarget()),this.channelzEnabled&&this.channelzInfoTracker.trace.addTrace("CT_INFO","Address resolution succeeded"),(I=this.configSelector)===null||I===void 0||I.unref(),this.configSelector=A,this.currentResolutionError=null,process.nextTick(()=>{let M=this.configSelectionQueue;this.configSelectionQueue=[],M.length>0&&this.callRefTimerUnref();for(let F of M)F.getConfig()})},y=>{this.channelzEnabled&&this.channelzInfoTracker.trace.addTrace("CT_WARNING","Address resolution failed with code "+y.code+' and details "'+y.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,k_e.restrictControlPlaneStatusCode)(y.code,y.details)),{metadata:y.metadata}));let A=this.configSelectionQueue;this.configSelectionQueue=[],A.length>0&&this.callRefTimerUnref();for(let I of A)I.reportResolverError(y)}),this.filterStackFactory=new L_e.FilterStackFactory([new x_e.CompressionFilterFactory(this,this.options)]),this.trace("Channel constructed with options "+JSON.stringify(o,void 0,2));let O=new Error;(0,eE.isTracerEnabled)("channel_stacktrace")&&(0,eE.trace)(ci.LogVerbosity.DEBUG,"channel_stacktrace","("+this.channelzRef.id+`) Channel constructed `+((c=O.stack)===null||c===void 0?void 0:c.substring(O.stack.indexOf(` `)+1))),this.lastActivityTimestamp=new Date}trace(e,t){(0,eE.trace)(t??ci.LogVerbosity.DEBUG,"channel","("+this.channelzRef.id+") "+(0,tE.uriToString)(this.target)+" "+e)}callRefTimerRef(){var e,t,o,s;this.callRefTimer||(this.callRefTimer=setInterval(()=>{},V_e)),!((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),(s=(o=this.callRefTimer).ref)===null||s===void 0||s.call(o))}callRefTimerUnref(){var e,t,o;(!(!((e=this.callRefTimer)===null||e===void 0)&&e.hasRef)||this.callRefTimer.hasRef())&&(this.trace("callRefTimer.unref | configSelectionQueue.length="+this.configSelectionQueue.length+" pickQueue.length="+this.pickQueue.length),(o=(t=this.callRefTimer)===null||t===void 0?void 0:t.unref)===null||o===void 0||o.call(t))}removeConnectivityStateWatcher(e){let t=this.connectivityStateWatchers.findIndex(o=>o===e);t>=0&&this.connectivityStateWatchers.splice(t,1)}updateState(e){(0,eE.trace)(ci.LogVerbosity.DEBUG,"connectivity_state","("+this.channelzRef.id+") "+(0,tE.uriToString)(this.target)+" "+sr.ConnectivityState[this.connectivityState]+" -> "+sr.ConnectivityState[e]),this.channelzEnabled&&this.channelzInfoTracker.trace.addTrace("CT_INFO","Connectivity state change to "+sr.ConnectivityState[e]),this.connectivityState=e,this.channelzInfoTracker.state=e;let t=this.connectivityStateWatchers.slice();for(let o of t)e!==o.currentState&&(o.timer&&clearTimeout(o.timer),this.removeConnectivityStateWatcher(o),o.callback());e!==sr.ConnectivityState.TRANSIENT_FAILURE&&(this.currentResolutionError=null)}throttleKeepalive(e){if(e>this.keepaliveTime){this.keepaliveTime=e;for(let t of this.wrappedSubchannels)t.throttleKeepalive(e)}}addWrappedSubchannel(e){this.wrappedSubchannels.add(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.connectivityState!==sr.ConnectivityState.SHUTDOWN&&this.resolvingLoadBalancer.exitIdle(),this.configSelector?{type:"SUCCESS",config:this.configSelector.invoke(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(sr.ConnectivityState.IDLE),this.currentPicker=new BO.QueuePicker(this.resolvingLoadBalancer),this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null),this.callRefTimer&&(clearInterval(this.callRefTimer),this.callRefTimer=null)}startIdleTimeout(e){var t,o;this.idleTimer=setTimeout(()=>{if(this.callCount>0){this.startIdleTimeout(this.idleTimeoutMs);return}let a=new Date().valueOf()-this.lastActivityTimestamp.valueOf();a>=this.idleTimeoutMs?(this.trace("Idle timer triggered after "+this.idleTimeoutMs+"ms of inactivity"),this.enterIdle()):this.startIdleTimeout(this.idleTimeoutMs-a)},e),(o=(t=this.idleTimer).unref)===null||o===void 0||o.call(t)}maybeStartIdleTimer(){this.connectivityState!==sr.ConnectivityState.SHUTDOWN&&!this.idleTimer&&this.startIdleTimeout(this.idleTimeoutMs)}onCallStart(){this.channelzEnabled&&this.channelzInfoTracker.callTracker.addCallStarted(),this.callCount+=1}onCallEnd(e){this.channelzEnabled&&(e.code===ci.Status.OK?this.channelzInfoTracker.callTracker.addCallSucceeded():this.channelzInfoTracker.callTracker.addCallFailed()),this.callCount-=1,this.lastActivityTimestamp=new Date,this.maybeStartIdleTimer()}createLoadBalancingCall(e,t,o,s,a){let i=(0,UO.getNextCallNumber)();return this.trace("createLoadBalancingCall ["+i+'] method="'+t+'"'),new w_e.LoadBalancingCall(this,e,t,o,s,a,i)}createRetryingCall(e,t,o,s,a){let i=(0,UO.getNextCallNumber)();return this.trace("createRetryingCall ["+i+'] method="'+t+'"'),new kO.RetryingCall(this,e,t,o,s,a,i,this.retryBufferTracker,rE.get(this.getTarget()))}createResolvingCall(e,t,o,s,a){let i=(0,UO.getNextCallNumber)();this.trace("createResolvingCall ["+i+'] method="'+e+'", deadline='+(0,D_e.deadlineToString)(t));let n={deadline:t,flags:a??ci.Propagate.DEFAULTS,host:o??this.defaultAuthority,parentCall:s},l=new U_e.ResolvingCall(this,e,n,this.filterStackFactory.clone(),i);return this.onCallStart(),l.addStatusWatcher(c=>{this.onCallEnd(c)}),l}close(){var e;this.resolvingLoadBalancer.destroy(),this.updateState(sr.ConnectivityState.SHUTDOWN),this.currentPicker=new FO;for(let t of this.configSelectionQueue)t.cancelWithStatus(ci.Status.UNAVAILABLE,"Channel closed before call started");this.configSelectionQueue=[];for(let t of this.pickQueue)t.cancelWithStatus(ci.Status.UNAVAILABLE,"Channel closed before call started");this.pickQueue=[],this.callRefTimer&&clearInterval(this.callRefTimer),this.idleTimer&&clearTimeout(this.idleTimer),this.channelzEnabled&&(0,ou.unregisterChannelzRef)(this.channelzRef),this.subchannelPool.unrefUnusedSubchannels(),(e=this.configSelector)===null||e===void 0||e.unref(),this.configSelector=null}getTarget(){return(0,tE.uriToString)(this.target)}getConnectivityState(e){let t=this.connectivityState;return e&&(this.resolvingLoadBalancer.exitIdle(),this.lastActivityTimestamp=new Date,this.maybeStartIdleTimer()),t}watchConnectivityState(e,t,o){if(this.connectivityState===sr.ConnectivityState.SHUTDOWN)throw new Error("Channel has been shut down");let s=null;if(t!==1/0){let i=t instanceof Date?t:new Date(t),n=new Date;if(t===-1/0||i<=n){process.nextTick(o,new Error("Deadline passed without connectivity state change"));return}s=setTimeout(()=>{this.removeConnectivityStateWatcher(a),o(new Error("Deadline passed without connectivity state change"))},i.getTime()-n.getTime())}let a={currentState:e,callback:o,timer:s};this.connectivityStateWatchers.push(a)}getChannelzRef(){return this.channelzRef}createCall(e,t,o,s,a){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===sr.ConnectivityState.SHUTDOWN)throw new Error("Channel has been shut down");return this.createResolvingCall(e,t,o,s,a)}getOptions(){return this.options}};vo.InternalChannel=HO});var ey=T(nE=>{"use strict";Object.defineProperty(nE,"__esModule",{value:!0});nE.ChannelImplementation=void 0;var j_e=Oc(),Y_e=qO(),jO=class{constructor(e,t,o){if(typeof e!="string")throw new TypeError("Channel target must be a string");if(!(t instanceof j_e.ChannelCredentials))throw new TypeError("Channel credentials must be a ChannelCredentials object");if(o&&typeof o!="object")throw new TypeError("Channel options must be an object");this.internalChannel=new Y_e.InternalChannel(e,t,o)}close(){this.internalChannel.close()}getTarget(){return this.internalChannel.getTarget()}getConnectivityState(e){return this.internalChannel.getConnectivityState(e)}watchConnectivityState(e,t,o){this.internalChannel.watchConnectivityState(e,t,o)}getChannelzRef(){return this.internalChannel.getChannelzRef()}createCall(e,t,o,s,a){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,o,s,a)}};nE.ChannelImplementation=jO});var Bj=T(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.ServerDuplexStreamImpl=Cr.ServerWritableStreamImpl=Cr.ServerReadableStreamImpl=Cr.ServerUnaryCallImpl=void 0;Cr.serverErrorToStatus=JO;var z_e=V("events"),XO=V("stream"),WO=ue(),kj=ht();function JO(r,e){var t;let o={code:WO.Status.UNKNOWN,details:"message"in r?r.message:"Unknown Error",metadata:(t=e??r.metadata)!==null&&t!==void 0?t:null};return"code"in r&&typeof r.code=="number"&&Number.isInteger(r.code)&&(o.code=r.code,"details"in r&&typeof r.details=="string"&&(o.details=r.details)),o}var YO=class extends z_e.EventEmitter{constructor(e,t,o,s){super(),this.path=e,this.call=t,this.metadata=o,this.request=s,this.cancelled=!1}getPeer(){return this.call.getPeer()}sendMetadata(e){this.call.sendMetadata(e)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}getHost(){return this.call.getHost()}};Cr.ServerUnaryCallImpl=YO;var zO=class extends XO.Readable{constructor(e,t,o){super({objectMode:!0}),this.path=e,this.call=t,this.metadata=o,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}getHost(){return this.call.getHost()}};Cr.ServerReadableStreamImpl=zO;var KO=class extends XO.Writable{constructor(e,t,o,s){super({objectMode:!0}),this.path=e,this.call=t,this.metadata=o,this.request=s,this.pendingStatus={code:WO.Status.OK,details:"OK"},this.cancelled=!1,this.trailingMetadata=new kj.Metadata,this.on("error",a=>{this.pendingStatus=JO(a),this.end()})}getPeer(){return this.call.getPeer()}sendMetadata(e){this.call.sendMetadata(e)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}getHost(){return this.call.getHost()}_write(e,t,o){this.call.sendMessage(e,o)}_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=KO;var $O=class extends XO.Duplex{constructor(e,t,o){super({objectMode:!0}),this.path=e,this.call=t,this.metadata=o,this.pendingStatus={code:WO.Status.OK,details:"OK"},this.cancelled=!1,this.trailingMetadata=new kj.Metadata,this.on("error",s=>{this.pendingStatus=JO(s),this.end()})}getPeer(){return this.call.getPeer()}sendMetadata(e){this.call.sendMetadata(e)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}getHost(){return this.call.getHost()}_read(e){this.call.startRead()}_write(e,t,o){this.call.sendMessage(e,o)}_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=$O});var iE=T(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});ya.ServerCredentials=void 0;ya.createCertificateProviderServerCredentials=K_e;ya.createServerCredentialsWithInterceptors=$_e;var QO=yv(),yo=class{constructor(e,t){this.serverConstructorOptions=e,this.watchers=new Set,this.latestContextOptions=null,this.latestContextOptions=t??null}_addWatcher(e){this.watchers.add(e)}_removeWatcher(e){this.watchers.delete(e)}getWatcherCount(){return this.watchers.size}updateSecureContextOptions(e){this.latestContextOptions=e;for(let t of this.watchers)t(this.latestContextOptions)}_isSecure(){return this.serverConstructorOptions!==null}_getSecureContextOptions(){return this.latestContextOptions}_getConstructorOptions(){return this.serverConstructorOptions}_getInterceptors(){return[]}static createInsecure(){return new ZO}static createSsl(e,t,o=!1){var s;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 o!="boolean")throw new TypeError("checkClientCertificate must be a boolean");let a=[],i=[];for(let n=0;n{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.BaseServerInterceptingCall=ar.ServerInterceptingCall=ar.ResponderBuilder=ar.ServerListenerBuilder=void 0;ar.isInterceptingServerListener=W_e;ar.getServerInterceptingCall=tEe;var iA=ht(),bt=ue(),Oa=V("http2"),Vj=Mh(),Fj=V("zlib"),X_e=lO(),jj=Pe(),Yj="server_call";function Oo(r){jj.trace(bt.LogVerbosity.DEBUG,Yj,r)}var oA=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}}};ar.ServerListenerBuilder=oA;function W_e(r){return r.onReceiveMetadata!==void 0&&r.onReceiveMetadata.length===1}var sA=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()}},aA=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}}};ar.ResponderBuilder=aA;var oE={onReceiveMetadata:(r,e)=>{e(r)},onReceiveMessage:(r,e)=>{e(r)},onReceiveHalfClose:r=>{r()},onCancel:()=>{}},sE={start:r=>{r()},sendMetadata:(r,e)=>{e(r)},sendMessage:(r,e)=>{e(r)},sendStatus:(r,e)=>{e(r)}},lA=class{constructor(e,t){var o,s,a,i;this.nextCall=e,this.processingMetadata=!1,this.sentMetadata=!1,this.processingMessage=!1,this.pendingMessage=null,this.pendingMessageCallback=null,this.pendingStatus=null,this.responder={start:(o=t==null?void 0:t.start)!==null&&o!==void 0?o:sE.start,sendMetadata:(s=t==null?void 0:t.sendMetadata)!==null&&s!==void 0?s:sE.sendMetadata,sendMessage:(a=t==null?void 0:t.sendMessage)!==null&&a!==void 0?a:sE.sendMessage,sendStatus:(i=t==null?void 0:t.sendStatus)!==null&&i!==void 0?i:sE.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 o,s,a,i;let n={onReceiveMetadata:(o=t==null?void 0:t.onReceiveMetadata)!==null&&o!==void 0?o:oE.onReceiveMetadata,onReceiveMessage:(s=t==null?void 0:t.onReceiveMessage)!==null&&s!==void 0?s:oE.onReceiveMessage,onReceiveHalfClose:(a=t==null?void 0:t.onReceiveHalfClose)!==null&&a!==void 0?a:oE.onReceiveHalfClose,onCancel:(i=t==null?void 0:t.onCancel)!==null&&i!==void 0?i:oE.onCancel},l=new sA(n,e);this.nextCall.start(l)})}sendMetadata(e){this.processingMetadata=!0,this.sentMetadata=!0,this.responder.sendMetadata(e,t=>{this.processingMetadata=!1,this.nextCall.sendMetadata(t),this.processPendingMessage(),this.processPendingStatus()})}sendMessage(e,t){this.processingMessage=!0,this.sentMetadata||this.sendMetadata(new iA.Metadata),this.responder.sendMessage(e,o=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessage=o,this.pendingMessageCallback=t):this.nextCall.sendMessage(o,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()}getHost(){return this.nextCall.getHost()}};ar.ServerInterceptingCall=lA;var zj="grpc-accept-encoding",cA="grpc-encoding",Gj="grpc-message",Hj="grpc-status",nA="grpc-timeout",J_e=/(\d{1,8})\s*([HMSmun])/,Q_e={H:36e5,M:6e4,S:1e3,m:1,u:.001,n:1e-6},Z_e={[zj]:"identity,deflate,gzip",[cA]:"identity"},qj={[Oa.constants.HTTP2_HEADER_STATUS]:Oa.constants.HTTP_STATUS_OK,[Oa.constants.HTTP2_HEADER_CONTENT_TYPE]:"application/grpc+proto"},eEe={waitForTrailers:!0},aE=class{constructor(e,t,o,s,a){var i;this.stream=e,this.callEventTracker=o,this.handler=s,this.listener=null,this.deadlineTimer=null,this.deadline=1/0,this.maxSendMessageSize=bt.DEFAULT_MAX_SEND_MESSAGE_LENGTH,this.maxReceiveMessageSize=bt.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",u=>{}),this.stream.once("close",()=>{var u;Oo("Request to method "+((u=this.handler)===null||u===void 0?void 0:u.path)+" stream closed with rstCode "+this.stream.rstCode),this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!1),this.callEventTracker.onCallEnd({code:bt.Status.CANCELLED,details:"Stream closed before sending status",metadata:null})),this.notifyOnCancel()}),this.stream.on("data",u=>{this.handleDataFrame(u)}),this.stream.pause(),this.stream.on("end",()=>{this.handleEndEvent()}),"grpc.max_send_message_length"in a&&(this.maxSendMessageSize=a["grpc.max_send_message_length"]),"grpc.max_receive_message_length"in a&&(this.maxReceiveMessageSize=a["grpc.max_receive_message_length"]),this.host=(i=t[":authority"])!==null&&i!==void 0?i:t.host,this.decoder=new X_e.StreamDecoder(this.maxReceiveMessageSize);let n=iA.Metadata.fromHttp2Headers(t);jj.isTracerEnabled(Yj)&&Oo("Request to "+this.handler.path+" received headers "+JSON.stringify(n.toJSON()));let l=n.get(nA);l.length>0&&this.handleTimeoutHeader(l[0]);let c=n.get(cA);c.length>0&&(this.incomingEncoding=c[0]),n.remove(nA),n.remove(cA),n.remove(zj),n.remove(Oa.constants.HTTP2_HEADER_ACCEPT_ENCODING),n.remove(Oa.constants.HTTP2_HEADER_TE),n.remove(Oa.constants.HTTP2_HEADER_CONTENT_TYPE),this.metadata=n}handleTimeoutHeader(e){let t=e.toString().match(J_e);if(t===null){let a={code:bt.Status.INTERNAL,details:`Invalid ${nA} value "${e}"`,metadata:null};process.nextTick(()=>{this.sendStatus(a)});return}let o=+t[1]*Q_e[t[2]]|0,s=new Date;this.deadline=s.setMilliseconds(s.getMilliseconds()+o),this.deadlineTimer=setTimeout(()=>{let a={code:bt.Status.DEADLINE_EXCEEDED,details:"Deadline exceeded",metadata:null};this.sendStatus(a)},o)}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 iA.Metadata)}serializeMessage(e){let t=this.handler.serialize(e),o=t.byteLength,s=Buffer.allocUnsafe(o+5);return s.writeUInt8(0,0),s.writeUInt32BE(o,1),t.copy(s,5),s}decompressMessage(e,t){let o=e.subarray(5);if(t==="identity")return o;if(t==="deflate"||t==="gzip"){let s;return t==="deflate"?s=Fj.createInflate():s=Fj.createGunzip(),new Promise((a,i)=>{let n=0,l=[];s.on("data",c=>{l.push(c),n+=c.byteLength,this.maxReceiveMessageSize!==-1&&n>this.maxReceiveMessageSize&&(s.destroy(),i({code:bt.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxReceiveMessageSize}`}))}),s.on("end",()=>{a(Buffer.concat(l))}),s.write(o),s.end()})}else return Promise.reject({code:bt.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 o=e.compressedMessage.readUInt8(0)===1?this.incomingEncoding:"identity",s;try{s=await this.decompressMessage(e.compressedMessage,o)}catch(a){this.sendStatus(a);return}try{e.parsedMessage=this.handler.deserialize(s)}catch(a){this.sendStatus({code:bt.Status.INTERNAL,details:`Error deserializing request: ${a.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;Oo("Request to "+this.handler.path+" received data frame of size "+e.length);let o;try{o=this.decoder.write(e)}catch(s){this.sendStatus({code:bt.Status.RESOURCE_EXHAUSTED,details:s.message});return}for(let s of o){this.stream.pause();let a={type:"COMPRESSED",compressedMessage:s,parsedMessage:null};this.readQueue.push(a),this.decompressAndMaybePush(a),(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){Oo("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,o=Object.assign(Object.assign(Object.assign({},qj),Z_e),t);this.stream.respond(o,eEe)}sendMessage(e,t){if(this.checkCancelled())return;let o;try{o=this.serializeMessage(e)}catch(s){this.sendStatus({code:bt.Status.INTERNAL,details:`Error serializing response: ${(0,Vj.getErrorMessage)(s)}`,metadata:null});return}if(this.maxSendMessageSize!==-1&&o.length-5>this.maxSendMessageSize){this.sendStatus({code:bt.Status.RESOURCE_EXHAUSTED,details:`Sent message larger than max (${o.length} vs. ${this.maxSendMessageSize})`,metadata:null});return}this.maybeSendMetadata(),Oo("Request to "+this.handler.path+" sent data frame of size "+o.length),this.stream.write(o,s=>{var a;if(s){this.sendStatus({code:bt.Status.INTERNAL,details:`Error writing message: ${(0,Vj.getErrorMessage)(s)}`,metadata:null});return}(a=this.callEventTracker)===null||a===void 0||a.addMessageSent(),t()})}sendStatus(e){var t,o;if(!this.checkCancelled())if(Oo("Request to method "+((t=this.handler)===null||t===void 0?void 0:t.path)+" ended with status code: "+bt.Status[e.code]+" details: "+e.details),this.metadataSent)this.wantTrailers?this.notifyOnCancel():(this.wantTrailers=!0,this.stream.once("wantTrailers",()=>{var s;this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!0),this.callEventTracker.onCallEnd(e));let a=Object.assign({[Hj]:e.code,[Gj]:encodeURI(e.details)},(s=e.metadata)===null||s===void 0?void 0:s.toHttp2Headers());this.stream.sendTrailers(a),this.notifyOnCancel()}),this.stream.end());else{this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!0),this.callEventTracker.onCallEnd(e));let s=Object.assign(Object.assign({[Hj]:e.code,[Gj]:encodeURI(e.details)},qj),(o=e.metadata)===null||o===void 0?void 0:o.toHttp2Headers());this.stream.respond(s,{endStream:!0}),this.notifyOnCancel()}}startRead(){Oo("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}getHost(){return this.host}};ar.BaseServerInterceptingCall=aE;function tEe(r,e,t,o,s,a){let i={path:s.path,requestStream:s.type==="clientStream"||s.type==="bidi",responseStream:s.type==="serverStream"||s.type==="bidi",requestDeserialize:s.deserialize,responseSerialize:s.serialize},n=new aE(e,t,o,s,a);return r.reduce((l,c)=>c(i,l),n)}});var Zj=T(fi=>{"use strict";var rEe=fi&&fi.__runInitializers||function(r,e,t){for(var o=arguments.length>2,s=0;s=0;m--){var O={};for(var y in o)O[y]=y==="access"?{}:o[y];for(var y in o.access)O.access[y]=o.access[y];O.addInitializer=function(I){if(_)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(I||null))};var A=(0,t[m])(n==="accessor"?{get:u.get,set:u.set}:u[l],O);if(n==="accessor"){if(A===void 0)continue;if(A===null||typeof A!="object")throw new TypeError("Object expected");(f=i(A.get))&&(u.get=f),(f=i(A.set))&&(u.set=f),(f=i(A.init))&&s.unshift(f)}else(f=i(A))&&(n==="field"?s.unshift(f):u[l]=f)}c&&Object.defineProperty(c,o.name,u),_=!0};Object.defineProperty(fi,"__esModule",{value:!0});fi.Server=void 0;var Lt=V("http2"),iEe=V("util"),qe=ue(),Na=Bj(),fA=iE(),Kj=jr(),Ra=Pe(),ui=nr(),Pr=Pt(),Qe=_o(),$j=uA(),Aa=~(1<<31),pA=~(1<<31),oEe=2e4,Xj=~(1<<31),{HTTP2_HEADER_PATH:Wj}=Lt.constants,sEe="server",Jj=Buffer.from("max_age");function Qj(r){Ra.trace(qe.LogVerbosity.DEBUG,"server_call",r)}function aEe(){}function lEe(r){return function(e,t){return iEe.deprecate(e,r)}}function dA(r){return{code:qe.Status.UNIMPLEMENTED,details:`The server does not implement the method ${r}`}}function cEe(r,e){let t=dA(e);switch(r){case"unary":return(o,s)=>{s(t,null)};case"clientStream":return(o,s)=>{s(t,null)};case"serverStream":return o=>{o.emit("error",t)};case"bidi":return o=>{o.emit("error",t)};default:throw new Error(`Invalid handlerType ${r}`)}}var uEe=(()=>{var r;let e=[],t;return r=class{constructor(s){var a,i,n,l,c,u;this.boundPorts=(rEe(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=s??{},this.options["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.channelzTrace=new Qe.ChannelzTraceStub,this.callTracker=new Qe.ChannelzCallTrackerStub,this.listenerChildrenTracker=new Qe.ChannelzChildrenTrackerStub,this.sessionChildrenTracker=new Qe.ChannelzChildrenTrackerStub):(this.channelzTrace=new Qe.ChannelzTrace,this.callTracker=new Qe.ChannelzCallTracker,this.listenerChildrenTracker=new Qe.ChannelzChildrenTracker,this.sessionChildrenTracker=new Qe.ChannelzChildrenTracker),this.channelzRef=(0,Qe.registerChannelzServer)("server",()=>this.getChannelzInfo(),this.channelzEnabled),this.channelzTrace.addTrace("CT_INFO","Server created"),this.maxConnectionAgeMs=(a=this.options["grpc.max_connection_age_ms"])!==null&&a!==void 0?a:Aa,this.maxConnectionAgeGraceMs=(i=this.options["grpc.max_connection_age_grace_ms"])!==null&&i!==void 0?i:Aa,this.keepaliveTimeMs=(n=this.options["grpc.keepalive_time_ms"])!==null&&n!==void 0?n:pA,this.keepaliveTimeoutMs=(l=this.options["grpc.keepalive_timeout_ms"])!==null&&l!==void 0?l:oEe,this.sessionIdleTimeout=(c=this.options["grpc.max_connection_idle_ms"])!==null&&c!==void 0?c:Xj,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(s){var a,i,n;let l=this.sessions.get(s),c=s.socket,u=c.remoteAddress?(0,ui.stringToSubchannelAddress)(c.remoteAddress,c.remotePort):null,f=c.localAddress?(0,ui.stringToSubchannelAddress)(c.localAddress,c.localPort):null,_;if(s.encrypted){let O=c,y=O.getCipher(),A=O.getCertificate(),I=O.getPeerCertificate();_={cipherSuiteStandardName:(a=y.standardName)!==null&&a!==void 0?a:null,cipherSuiteOtherName:y.standardName?null:y.name,localCertificate:A&&"raw"in A?A.raw:null,remoteCertificate:I&&"raw"in I?I.raw:null}}else _=null;return{remoteAddress:u,localAddress:f,security:_,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:(i=s.state.localWindowSize)!==null&&i!==void 0?i:null,remoteFlowControlWindow:(n=s.state.remoteWindowSize)!==null&&n!==void 0?n:null}}trace(s){Ra.trace(qe.LogVerbosity.DEBUG,sEe,"("+this.channelzRef.id+") "+s)}keepaliveTrace(s){Ra.trace(qe.LogVerbosity.DEBUG,"keepalive","("+this.channelzRef.id+") "+s)}addProtoService(){throw new Error("Not implemented. Use addService() instead")}addService(s,a){if(s===null||typeof s!="object"||a===null||typeof a!="object")throw new Error("addService() requires two objects as arguments");let i=Object.keys(s);if(i.length===0)throw new Error("Cannot add an empty service to a server");i.forEach(n=>{let l=s[n],c;l.requestStream?l.responseStream?c="bidi":c="clientStream":l.responseStream?c="serverStream":c="unary";let u=a[n],f;if(u===void 0&&typeof l.originalName=="string"&&(u=a[l.originalName]),u!==void 0?f=u.bind(a):f=cEe(c,n),this.register(l.path,f,l.responseSerialize,l.requestDeserialize,c)===!1)throw new Error(`Method handler for ${l.path} already provided.`)})}removeService(s){if(s===null||typeof s!="object")throw new Error("removeService() requires object as argument");Object.keys(s).forEach(i=>{let n=s[i];this.unregister(n.path)})}bind(s,a){throw new Error("Not implemented. Use bindAsync() instead")}experimentalRegisterListenerToChannelz(s){return(0,Qe.registerChannelzSocket)((0,ui.subchannelAddressToString)(s),()=>({localAddress:s,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)}experimentalUnregisterListenerFromChannelz(s){(0,Qe.unregisterChannelzRef)(s)}createHttp2Server(s){let a;if(s._isSecure()){let i=s._getConstructorOptions(),n=s._getSecureContextOptions(),l=Object.assign(Object.assign(Object.assign(Object.assign({},this.commonServerOptions),i),n),{enableTrace:this.options["grpc-node.tls_enable_trace"]===1}),c=n!==null;this.trace("Initial credentials valid: "+c),a=Lt.createSecureServer(l),a.prependListener("connection",f=>{c||(this.trace("Dropped connection from "+JSON.stringify(f.address())+" due to unloaded credentials"),f.destroy())}),a.on("secureConnection",f=>{f.on("error",_=>{this.trace("An incoming TLS connection closed with error: "+_.message)})});let u=f=>{if(f){let _=a;try{_.setSecureContext(f)}catch(m){Ra.log(qe.LogVerbosity.ERROR,"Failed to set secure context with error "+m.message),f=null}}c=f!==null,this.trace("Post-update credentials valid: "+c)};s._addWatcher(u),a.on("close",()=>{s._removeWatcher(u)})}else a=Lt.createServer(this.commonServerOptions);return a.setTimeout(0,aEe),this._setupHandlers(a,s._getInterceptors()),a}bindOneAddress(s,a){this.trace("Attempting to bind "+(0,ui.subchannelAddressToString)(s));let i=this.createHttp2Server(a.credentials);return new Promise((n,l)=>{let c=u=>{this.trace("Failed to bind "+(0,ui.subchannelAddressToString)(s)+" with error "+u.message),n({port:"port"in s?s.port:1,error:u.message})};i.once("error",c),i.listen(s,()=>{let u=i.address(),f;typeof u=="string"?f={path:u}:f={host:u.address,port:u.port};let _=this.experimentalRegisterListenerToChannelz(f);this.listenerChildrenTracker.refChild(_),this.http2Servers.set(i,{channelzRef:_,sessions:new Set,ownsChannelzRef:!0}),a.listeningServers.add(i),this.trace("Successfully bound "+(0,ui.subchannelAddressToString)(f)),n({port:"port"in f?f.port:1}),i.removeListener("error",c)})})}async bindManyPorts(s,a){if(s.length===0)return{count:0,port:0,errors:[]};if((0,ui.isTcpSubchannelAddress)(s[0])&&s[0].port===0){let i=await this.bindOneAddress(s[0],a);if(i.error){let n=await this.bindManyPorts(s.slice(1),a);return Object.assign(Object.assign({},n),{errors:[i.error,...n.errors]})}else{let n=s.slice(1).map(u=>(0,ui.isTcpSubchannelAddress)(u)?{host:u.host,port:i.port}:u),l=await Promise.all(n.map(u=>this.bindOneAddress(u,a))),c=[i,...l];return{count:c.filter(u=>u.error===void 0).length,port:i.port,errors:c.filter(u=>u.error).map(u=>u.error)}}}else{let i=await Promise.all(s.map(n=>this.bindOneAddress(n,a)));return{count:i.filter(n=>n.error===void 0).length,port:i[0].port,errors:i.filter(n=>n.error).map(n=>n.error)}}}async bindAddressList(s,a){let i=await this.bindManyPorts(s,a);if(i.count>0)return i.count{let n={onSuccessfulResolution:(c,u,f)=>{n.onSuccessfulResolution=()=>{};let _=[].concat(...c.map(m=>m.addresses));if(_.length===0){i(new Error(`No addresses resolved for port ${s}`));return}a(_)},onError:c=>{i(new Error(c.details))}};(0,Kj.createResolver)(s,n,this.options).updateResolution()})}async bindPort(s,a){let i=await this.resolvePort(s);if(a.cancelled)throw this.completeUnbind(a),new Error("bindAsync operation cancelled by unbind call");let n=await this.bindAddressList(i,a);if(a.cancelled)throw this.completeUnbind(a),new Error("bindAsync operation cancelled by unbind call");return n}normalizePort(s){let a=(0,Pr.parseUri)(s);if(a===null)throw new Error(`Could not parse port "${s}"`);let i=(0,Kj.mapUriDefaultScheme)(a);if(i===null)throw new Error(`Could not get a default scheme for port "${s}"`);return i}bindAsync(s,a,i){if(this.shutdown)throw new Error("bindAsync called after shutdown");if(typeof s!="string")throw new TypeError("port must be a string");if(a===null||!(a instanceof fA.ServerCredentials))throw new TypeError("creds must be a ServerCredentials object");if(typeof i!="function")throw new TypeError("callback must be a function");this.trace("bindAsync port="+s);let n=this.normalizePort(s),l=(_,m)=>{process.nextTick(()=>i(_,m))},c=this.boundPorts.get((0,Pr.uriToString)(n));if(c){if(!a._equals(c.credentials)){l(new Error(`${s} already bound with incompatible credentials`),0);return}c.cancelled=!1,c.completionPromise?c.completionPromise.then(_=>i(null,_),_=>i(_,0)):l(null,c.portNumber);return}c={mapKey:(0,Pr.uriToString)(n),originalUri:n,completionPromise:null,cancelled:!1,portNumber:0,credentials:a,listeningServers:new Set};let u=(0,Pr.splitHostPort)(n.path),f=this.bindPort(n,c);c.completionPromise=f,(u==null?void 0:u.port)===0?f.then(_=>{let m={scheme:n.scheme,authority:n.authority,path:(0,Pr.combineHostPort)({host:u.host,port:_})};c.mapKey=(0,Pr.uriToString)(m),c.completionPromise=null,c.portNumber=_,this.boundPorts.set(c.mapKey,c),i(null,_)},_=>{i(_,0)}):(this.boundPorts.set(c.mapKey,c),f.then(_=>{c.completionPromise=null,c.portNumber=_,i(null,_)},_=>{i(_,0)}))}registerInjectorToChannelz(){return(0,Qe.registerChannelzSocket)("injector",()=>({localAddress:null,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)}experimentalCreateConnectionInjectorWithChannelzRef(s,a,i=!1){if(s===null||!(s instanceof fA.ServerCredentials))throw new TypeError("creds must be a ServerCredentials object");this.channelzEnabled&&this.listenerChildrenTracker.refChild(a);let n=this.createHttp2Server(s),l=new Set;return this.http2Servers.set(n,{channelzRef:a,sessions:l,ownsChannelzRef:i}),{injectConnection:c=>{n.emit("connection",c)},drain:c=>{var u,f;for(let _ of l)this.closeSession(_);(f=(u=setTimeout(()=>{for(let _ of l)_.destroy(Lt.constants.NGHTTP2_CANCEL)},c)).unref)===null||f===void 0||f.call(u)},destroy:()=>{this.closeServer(n);for(let c of l)this.closeSession(c)}}}createConnectionInjector(s){if(s===null||!(s instanceof fA.ServerCredentials))throw new TypeError("creds must be a ServerCredentials object");let a=this.registerInjectorToChannelz();return this.experimentalCreateConnectionInjectorWithChannelzRef(s,a,!0)}closeServer(s,a){this.trace("Closing server with address "+JSON.stringify(s.address()));let i=this.http2Servers.get(s);s.close(()=>{i&&i.ownsChannelzRef&&(this.listenerChildrenTracker.unrefChild(i.channelzRef),(0,Qe.unregisterChannelzRef)(i.channelzRef)),this.http2Servers.delete(s),a==null||a()})}closeSession(s,a){var i;this.trace("Closing session initiated by "+((i=s.socket)===null||i===void 0?void 0:i.remoteAddress));let n=this.sessions.get(s),l=()=>{n&&(this.sessionChildrenTracker.unrefChild(n.ref),(0,Qe.unregisterChannelzRef)(n.ref)),a==null||a()};s.closed?queueMicrotask(l):s.close(l)}completeUnbind(s){for(let a of s.listeningServers){let i=this.http2Servers.get(a);if(this.closeServer(a,()=>{s.listeningServers.delete(a)}),i)for(let n of i.sessions)this.closeSession(n)}this.boundPorts.delete(s.mapKey)}unbind(s){this.trace("unbind port="+s);let a=this.normalizePort(s),i=(0,Pr.splitHostPort)(a.path);if((i==null?void 0:i.port)===0)throw new Error("Cannot unbind port 0");let n=this.boundPorts.get((0,Pr.uriToString)(a));n&&(this.trace("unbinding "+n.mapKey+" originally bound as "+(0,Pr.uriToString)(n.originalUri)),n.completionPromise?n.cancelled=!0:this.completeUnbind(n))}drain(s,a){var i,n;this.trace("drain port="+s+" graceTimeMs="+a);let l=this.normalizePort(s),c=(0,Pr.splitHostPort)(l.path);if((c==null?void 0:c.port)===0)throw new Error("Cannot drain port 0");let u=this.boundPorts.get((0,Pr.uriToString)(l));if(!u)return;let f=new Set;for(let _ of u.listeningServers){let m=this.http2Servers.get(_);if(m)for(let O of m.sessions)f.add(O),this.closeSession(O,()=>{f.delete(O)})}(n=(i=setTimeout(()=>{for(let _ of f)_.destroy(Lt.constants.NGHTTP2_CANCEL)},a)).unref)===null||n===void 0||n.call(i)}forceShutdown(){for(let s of this.boundPorts.values())s.cancelled=!0;this.boundPorts.clear();for(let s of this.http2Servers.keys())this.closeServer(s);this.sessions.forEach((s,a)=>{this.closeSession(a),a.destroy(Lt.constants.NGHTTP2_CANCEL)}),this.sessions.clear(),(0,Qe.unregisterChannelzRef)(this.channelzRef),this.shutdown=!0}register(s,a,i,n,l){return this.handlers.has(s)?!1:(this.handlers.set(s,{func:a,serialize:i,deserialize:n,type:l,path:s}),!0)}unregister(s){return this.handlers.delete(s)}start(){if(this.http2Servers.size===0||[...this.http2Servers.keys()].every(s=>!s.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(s){var a;let i=c=>{(0,Qe.unregisterChannelzRef)(this.channelzRef),s(c)},n=0;function l(){n--,n===0&&i()}this.shutdown=!0;for(let[c,u]of this.http2Servers.entries()){n++;let f=u.channelzRef.name;this.trace("Waiting for server "+f+" to close"),this.closeServer(c,()=>{this.trace("Server "+f+" finished closing"),l()});for(let _ of u.sessions.keys()){n++;let m=(a=_.socket)===null||a===void 0?void 0:a.remoteAddress;this.trace("Waiting for session "+m+" to close"),this.closeSession(_,()=>{this.trace("Session "+m+" finished closing"),l()})}}n===0&&i()}addHttp2Port(){throw new Error("Not yet implemented")}getChannelzRef(){return this.channelzRef}_verifyContentType(s,a){let i=a[Lt.constants.HTTP2_HEADER_CONTENT_TYPE];return typeof i!="string"||!i.startsWith("application/grpc")?(s.respond({[Lt.constants.HTTP2_HEADER_STATUS]:Lt.constants.HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE},{endStream:!0}),!1):!0}_retrieveHandler(s){Qj("Received call to method "+s+" at address "+this.serverAddressString);let a=this.handlers.get(s);return a===void 0?(Qj("No handler registered for method "+s+". Sending UNIMPLEMENTED status."),null):a}_respondWithError(s,a,i=null){var n,l;let c=Object.assign({"grpc-status":(n=s.code)!==null&&n!==void 0?n:qe.Status.INTERNAL,"grpc-message":s.details,[Lt.constants.HTTP2_HEADER_STATUS]:Lt.constants.HTTP_STATUS_OK,[Lt.constants.HTTP2_HEADER_CONTENT_TYPE]:"application/grpc+proto"},(l=s.metadata)===null||l===void 0?void 0:l.toHttp2Headers());a.respond(c,{endStream:!0}),this.callTracker.addCallFailed(),i==null||i.streamTracker.addCallFailed()}_channelzHandler(s,a,i){this.onStreamOpened(a);let n=this.sessions.get(a.session);if(this.callTracker.addCallStarted(),n==null||n.streamTracker.addCallStarted(),!this._verifyContentType(a,i)){this.callTracker.addCallFailed(),n==null||n.streamTracker.addCallFailed();return}let l=i[Wj],c=this._retrieveHandler(l);if(!c){this._respondWithError(dA(l),a,n);return}let u={addMessageSent:()=>{n&&(n.messagesSent+=1,n.lastMessageSentTimestamp=new Date)},addMessageReceived:()=>{n&&(n.messagesReceived+=1,n.lastMessageReceivedTimestamp=new Date)},onCallEnd:_=>{_.code===qe.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()},onStreamEnd:_=>{n&&(_?n.streamTracker.addCallSucceeded():n.streamTracker.addCallFailed())}},f=(0,$j.getServerInterceptingCall)([...s,...this.interceptors],a,i,u,c,this.options);this._runHandlerForCall(f,c)||(this.callTracker.addCallFailed(),n==null||n.streamTracker.addCallFailed(),f.sendStatus({code:qe.Status.INTERNAL,details:`Unknown handler type: ${c.type}`}))}_streamHandler(s,a,i){if(this.onStreamOpened(a),this._verifyContentType(a,i)!==!0)return;let n=i[Wj],l=this._retrieveHandler(n);if(!l){this._respondWithError(dA(n),a,null);return}let c=(0,$j.getServerInterceptingCall)([...s,...this.interceptors],a,i,null,l,this.options);this._runHandlerForCall(c,l)||c.sendStatus({code:qe.Status.INTERNAL,details:`Unknown handler type: ${l.type}`})}_runHandlerForCall(s,a){let{type:i}=a;if(i==="unary")fEe(s,a);else if(i==="clientStream")pEe(s,a);else if(i==="serverStream")dEe(s,a);else if(i==="bidi")hEe(s,a);else return!1;return!0}_setupHandlers(s,a){if(s===null)return;let i=s.address(),n="null";i&&(typeof i=="string"?n=i:n=i.address+":"+i.port),this.serverAddressString=n;let l=this.channelzEnabled?this._channelzHandler:this._streamHandler,c=this.channelzEnabled?this._channelzSessionHandler(s):this._sessionHandler(s);s.on("stream",l.bind(this,a)),s.on("session",c)}_sessionHandler(s){return a=>{var i,n;(i=this.http2Servers.get(s))===null||i===void 0||i.sessions.add(a);let l=null,c=null,u=null,f=!1,_=this.enableIdleTimeout(a);if(this.maxConnectionAgeMs!==Aa){let I=this.maxConnectionAgeMs/10,M=Math.random()*I*2-I;l=setTimeout(()=>{var F,N;f=!0,this.trace("Connection dropped by max connection age: "+((F=a.socket)===null||F===void 0?void 0:F.remoteAddress));try{a.goaway(Lt.constants.NGHTTP2_NO_ERROR,~(1<<31),Jj)}catch{a.destroy();return}a.close(),this.maxConnectionAgeGraceMs!==Aa&&(c=setTimeout(()=>{a.destroy()},this.maxConnectionAgeGraceMs),(N=c.unref)===null||N===void 0||N.call(c))},this.maxConnectionAgeMs+M),(n=l.unref)===null||n===void 0||n.call(l)}let m=()=>{u&&(clearTimeout(u),u=null)},O=()=>!a.destroyed&&this.keepaliveTimeMs0,y,A=()=>{var I;O()&&(this.keepaliveTrace("Starting keepalive timer for "+this.keepaliveTimeMs+"ms"),u=setTimeout(()=>{m(),y()},this.keepaliveTimeMs),(I=u.unref)===null||I===void 0||I.call(u))};y=()=>{var I;if(!O())return;this.keepaliveTrace("Sending ping with timeout "+this.keepaliveTimeoutMs+"ms");let M="";try{a.ping((N,z,B)=>{m(),N?(this.keepaliveTrace("Ping failed with error: "+N.message),f=!0,a.close()):(this.keepaliveTrace("Received ping response"),A())})||(M="Ping returned false")}catch(F){M=(F instanceof Error?F.message:"")||"Unknown error"}if(M){this.keepaliveTrace("Ping send failed: "+M),this.trace("Connection dropped due to ping send error: "+M),f=!0,a.close();return}u=setTimeout(()=>{m(),this.keepaliveTrace("Ping timeout passed without response"),this.trace("Connection dropped by keepalive timeout"),f=!0,a.close()},this.keepaliveTimeoutMs),(I=u.unref)===null||I===void 0||I.call(u)},A(),a.on("close",()=>{var I,M;f||this.trace(`Connection dropped by client ${(I=a.socket)===null||I===void 0?void 0:I.remoteAddress}`),l&&clearTimeout(l),c&&clearTimeout(c),m(),_!==null&&(clearTimeout(_.timeout),this.sessionIdleTimeouts.delete(a)),(M=this.http2Servers.get(s))===null||M===void 0||M.sessions.delete(a)})}}_channelzSessionHandler(s){return a=>{var i,n,l,c;let u=(0,Qe.registerChannelzSocket)((n=(i=a.socket)===null||i===void 0?void 0:i.remoteAddress)!==null&&n!==void 0?n:"unknown",this.getChannelzSessionInfo.bind(this,a),this.channelzEnabled),f={ref:u,streamTracker:new Qe.ChannelzCallTracker,messagesSent:0,messagesReceived:0,keepAlivesSent:0,lastMessageSentTimestamp:null,lastMessageReceivedTimestamp:null};(l=this.http2Servers.get(s))===null||l===void 0||l.sessions.add(a),this.sessions.set(a,f);let _=`${a.socket.remoteAddress}:${a.socket.remotePort}`;this.channelzTrace.addTrace("CT_INFO","Connection established by client "+_),this.trace("Connection established by client "+_),this.sessionChildrenTracker.refChild(u);let m=null,O=null,y=null,A=!1,I=this.enableIdleTimeout(a);if(this.maxConnectionAgeMs!==Aa){let B=this.maxConnectionAgeMs/10,G=Math.random()*B*2-B;m=setTimeout(()=>{var te;A=!0,this.channelzTrace.addTrace("CT_INFO","Connection dropped by max connection age from "+_);try{a.goaway(Lt.constants.NGHTTP2_NO_ERROR,~(1<<31),Jj)}catch{a.destroy();return}a.close(),this.maxConnectionAgeGraceMs!==Aa&&(O=setTimeout(()=>{a.destroy()},this.maxConnectionAgeGraceMs),(te=O.unref)===null||te===void 0||te.call(O))},this.maxConnectionAgeMs+G),(c=m.unref)===null||c===void 0||c.call(m)}let M=()=>{y&&(clearTimeout(y),y=null)},F=()=>!a.destroyed&&this.keepaliveTimeMs0,N,z=()=>{var B;F()&&(this.keepaliveTrace("Starting keepalive timer for "+this.keepaliveTimeMs+"ms"),y=setTimeout(()=>{M(),N()},this.keepaliveTimeMs),(B=y.unref)===null||B===void 0||B.call(y))};N=()=>{var B;if(!F())return;this.keepaliveTrace("Sending ping with timeout "+this.keepaliveTimeoutMs+"ms");let G="";try{a.ping(($,le,v)=>{M(),$?(this.keepaliveTrace("Ping failed with error: "+$.message),this.channelzTrace.addTrace("CT_INFO","Connection dropped due to error of a ping frame "+$.message+" return in "+le),A=!0,a.close()):(this.keepaliveTrace("Received ping response"),z())})||(G="Ping returned false")}catch(te){G=(te instanceof Error?te.message:"")||"Unknown error"}if(G){this.keepaliveTrace("Ping send failed: "+G),this.channelzTrace.addTrace("CT_INFO","Connection dropped due to ping send error: "+G),A=!0,a.close();return}f.keepAlivesSent+=1,y=setTimeout(()=>{M(),this.keepaliveTrace("Ping timeout passed without response"),this.channelzTrace.addTrace("CT_INFO","Connection dropped by keepalive timeout from "+_),A=!0,a.close()},this.keepaliveTimeoutMs),(B=y.unref)===null||B===void 0||B.call(y)},z(),a.on("close",()=>{var B;A||this.channelzTrace.addTrace("CT_INFO","Connection dropped by client "+_),this.sessionChildrenTracker.unrefChild(u),(0,Qe.unregisterChannelzRef)(u),m&&clearTimeout(m),O&&clearTimeout(O),M(),I!==null&&(clearTimeout(I.timeout),this.sessionIdleTimeouts.delete(a)),(B=this.http2Servers.get(s))===null||B===void 0||B.sessions.delete(a),this.sessions.delete(a)})}}enableIdleTimeout(s){var a,i;if(this.sessionIdleTimeout>=Xj)return null;let n={activeStreams:0,lastIdle:Date.now(),onClose:this.onStreamClose.bind(this,s),timeout:setTimeout(this.onIdleTimeout,this.sessionIdleTimeout,this,s)};(i=(a=n.timeout).unref)===null||i===void 0||i.call(a),this.sessionIdleTimeouts.set(s,n);let{socket:l}=s;return this.trace("Enable idle timeout for "+l.remoteAddress+":"+l.remotePort),n}onIdleTimeout(s,a){let{socket:i}=a,n=s.sessionIdleTimeouts.get(a);n!==void 0&&n.activeStreams===0&&(Date.now()-n.lastIdle>=s.sessionIdleTimeout?(s.trace("Session idle timeout triggered for "+(i==null?void 0:i.remoteAddress)+":"+(i==null?void 0:i.remotePort)+" last idle at "+n.lastIdle),s.closeSession(a)):n.timeout.refresh())}onStreamOpened(s){let a=s.session,i=this.sessionIdleTimeouts.get(a);i&&(i.activeStreams+=1,s.once("close",i.onClose))}onStreamClose(s){var a,i;let n=this.sessionIdleTimeouts.get(s);n&&(n.activeStreams-=1,n.activeStreams===0&&(n.lastIdle=Date.now(),n.timeout.refresh(),this.trace("Session onStreamClose"+((a=s.socket)===null||a===void 0?void 0:a.remoteAddress)+":"+((i=s.socket)===null||i===void 0?void 0:i.remotePort)+" at "+n.lastIdle)))}},(()=>{let o=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;t=[lEe("Calling start() is no longer necessary. It can be safely omitted.")],nEe(r,null,t,{kind:"method",name:"start",static:!1,private:!1,access:{has:s=>"start"in s,get:s=>s.start},metadata:o},null,e),o&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:o})})(),r})();fi.Server=uEe;async function fEe(r,e){let t;function o(i,n,l,c){if(i){r.sendStatus((0,Na.serverErrorToStatus)(i,l));return}r.sendMessage(n,()=>{r.sendStatus({code:qe.Status.OK,details:"OK",metadata:l??null})})}let s,a=null;r.start({onReceiveMetadata(i){s=i,r.startRead()},onReceiveMessage(i){if(a){r.sendStatus({code:qe.Status.UNIMPLEMENTED,details:`Received a second request message for server streaming method ${e.path}`,metadata:null});return}a=i,r.startRead()},onReceiveHalfClose(){if(!a){r.sendStatus({code:qe.Status.UNIMPLEMENTED,details:`Received no request message for server streaming method ${e.path}`,metadata:null});return}t=new Na.ServerWritableStreamImpl(e.path,r,s,a);try{e.func(t,o)}catch(i){r.sendStatus({code:qe.Status.UNKNOWN,details:`Server method handler threw error ${i.message}`,metadata:null})}},onCancel(){t&&(t.cancelled=!0,t.emit("cancelled","cancelled"))}})}function pEe(r,e){let t;function o(s,a,i,n){if(s){r.sendStatus((0,Na.serverErrorToStatus)(s,i));return}r.sendMessage(a,()=>{r.sendStatus({code:qe.Status.OK,details:"OK",metadata:i??null})})}r.start({onReceiveMetadata(s){t=new Na.ServerDuplexStreamImpl(e.path,r,s);try{e.func(t,o)}catch(a){r.sendStatus({code:qe.Status.UNKNOWN,details:`Server method handler threw error ${a.message}`,metadata:null})}},onReceiveMessage(s){t.push(s)},onReceiveHalfClose(){t.push(null)},onCancel(){t&&(t.cancelled=!0,t.emit("cancelled","cancelled"),t.destroy())}})}function dEe(r,e){let t,o,s=null;r.start({onReceiveMetadata(a){o=a,r.startRead()},onReceiveMessage(a){if(s){r.sendStatus({code:qe.Status.UNIMPLEMENTED,details:`Received a second request message for server streaming method ${e.path}`,metadata:null});return}s=a,r.startRead()},onReceiveHalfClose(){if(!s){r.sendStatus({code:qe.Status.UNIMPLEMENTED,details:`Received no request message for server streaming method ${e.path}`,metadata:null});return}t=new Na.ServerWritableStreamImpl(e.path,r,o,s);try{e.func(t)}catch(a){r.sendStatus({code:qe.Status.UNKNOWN,details:`Server method handler threw error ${a.message}`,metadata:null})}},onCancel(){t&&(t.cancelled=!0,t.emit("cancelled","cancelled"),t.destroy())}})}function hEe(r,e){let t;r.start({onReceiveMetadata(o){t=new Na.ServerDuplexStreamImpl(e.path,r,o);try{e.func(t)}catch(s){r.sendStatus({code:qe.Status.UNKNOWN,details:`Server method handler threw error ${s.message}`,metadata:null})}},onReceiveMessage(o){t.push(o)},onReceiveHalfClose(){t.push(null)},onCancel(){t&&(t.cancelled=!0,t.emit("cancelled","cancelled"),t.destroy())}})}});var e4=T(lE=>{"use strict";Object.defineProperty(lE,"__esModule",{value:!0});lE.StatusBuilder=void 0;var hA=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}};lE.StatusBuilder=hA});var _A=T(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.msToDuration=_Ee;Ca.durationToMs=EEe;Ca.isDuration=mEe;Ca.parseDuration=SEe;function _Ee(r){return{seconds:r/1e3|0,nanos:r%1e3*1e6|0}}function EEe(r){return r.seconds*1e3+r.nanos/1e6|0}function mEe(r){return typeof r.seconds=="number"&&typeof r.nanos=="number"}var TEe=/^(\d+)(?:\.(\d+))?s$/;function SEe(r){let e=r.match(TEe);return e?{seconds:Number.parseInt(e[1],10),nanos:e[2]?Number.parseInt(e[2].padEnd(9,"0"),10):0}:null}});var cE=T(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.LeafLoadBalancer=on.PickFirstLoadBalancer=on.PickFirstLoadBalancingConfig=void 0;on.shuffled=i4;on.setup=NEe;var EA=so(),$e=rr(),Ao=Zn(),t4=nr(),gEe=Pe(),vEe=ue(),r4=nr(),n4=V("net"),yEe="pick_first";function su(r){gEe.trace(vEe.LogVerbosity.DEBUG,yEe,r)}var au="pick_first",OEe=250,Pa=class r{constructor(e){this.shuffleAddressList=e}getLoadBalancerName(){return au}toJsonObject(){return{[au]:{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 r(e.shuffleAddressList===!0)}};on.PickFirstLoadBalancingConfig=Pa;var mA=class{constructor(e){this.subchannel=e}pick(e){return{pickResultType:Ao.PickResultType.COMPLETE,subchannel:this.subchannel,status:null,onCallStarted:null,onCallEnded:null}}};function i4(r){let e=r.slice();for(let t=e.length-1;t>1;t--){let o=Math.floor(Math.random()*(t+1)),s=e[t];e[t]=e[o],e[o]=s}return e}function AEe(r){if(r.length===0)return[];let e=[],t=[],o=[],s=(0,r4.isTcpSubchannelAddress)(r[0])&&(0,n4.isIPv6)(r[0].host);for(let n of r)(0,r4.isTcpSubchannelAddress)(n)&&(0,n4.isIPv6)(n.host)?t.push(n):o.push(n);let a=s?t:o,i=s?o:t;for(let n=0;n{this.onSubchannelStateUpdate(t,o,s,i)},this.pickedSubchannelHealthListener=()=>this.calculateAndReportNewState(),this.stickyTransientFailureMode=!1,this.reportHealthStatus=!1,this.lastError=null,this.latestAddressList=null,this.latestOptions={},this.connectionDelayTimeout=setTimeout(()=>{},0),clearTimeout(this.connectionDelayTimeout)}allChildrenHaveReportedTF(){return this.children.every(e=>e.hasReportedTransientFailure)}resetChildrenReportedTF(){this.children.every(e=>e.hasReportedTransientFailure=!1)}calculateAndReportNewState(){var e;if(this.currentPick)if(this.reportHealthStatus&&!this.currentPick.isHealthy()){let t=`Picked subchannel ${this.currentPick.getAddress()} is unhealthy`;this.updateState($e.ConnectivityState.TRANSIENT_FAILURE,new Ao.UnavailablePicker({details:t}),t)}else this.updateState($e.ConnectivityState.READY,new mA(this.currentPick),null);else if(((e=this.latestAddressList)===null||e===void 0?void 0:e.length)===0){let t=`No connection established. Last error: ${this.lastError}`;this.updateState($e.ConnectivityState.TRANSIENT_FAILURE,new Ao.UnavailablePicker({details:t}),t)}else if(this.children.length===0)this.updateState($e.ConnectivityState.IDLE,new Ao.QueuePicker(this),null);else if(this.stickyTransientFailureMode){let t=`No connection established. Last error: ${this.lastError}`;this.updateState($e.ConnectivityState.TRANSIENT_FAILURE,new Ao.UnavailablePicker({details:t}),t)}else this.updateState($e.ConnectivityState.CONNECTING,new Ao.QueuePicker(this),null)}requestReresolution(){this.channelControlHelper.requestReresolution()}maybeEnterStickyTransientFailureMode(){if(this.allChildrenHaveReportedTF()){if(this.requestReresolution(),this.resetChildrenReportedTF(),this.stickyTransientFailureMode){this.calculateAndReportNewState();return}this.stickyTransientFailureMode=!0;for(let{subchannel:e}of this.children)e.startConnecting();this.calculateAndReportNewState()}}removeCurrentPick(){this.currentPick!==null&&(this.currentPick.removeConnectivityStateListener(this.subchannelStateListener),this.channelControlHelper.removeChannelzChild(this.currentPick.getChannelzRef()),this.currentPick.removeHealthStateWatcher(this.pickedSubchannelHealthListener),this.currentPick.unref(),this.currentPick=null)}onSubchannelStateUpdate(e,t,o,s){var a;if(!((a=this.currentPick)===null||a===void 0)&&a.realSubchannelEquals(e)){o!==$e.ConnectivityState.READY&&(this.removeCurrentPick(),this.calculateAndReportNewState());return}for(let[i,n]of this.children.entries())if(e.realSubchannelEquals(n.subchannel)){o===$e.ConnectivityState.READY&&this.pickSubchannel(n.subchannel),o===$e.ConnectivityState.TRANSIENT_FAILURE&&(n.hasReportedTransientFailure=!0,s&&(this.lastError=s),this.maybeEnterStickyTransientFailureMode(),i===this.currentSubchannelIndex&&this.startNextSubchannelConnecting(i+1)),n.subchannel.startConnecting();return}}startNextSubchannelConnecting(e){clearTimeout(this.connectionDelayTimeout);for(let[t,o]of this.children.entries())if(t>=e){let s=o.subchannel.getConnectivityState();if(s===$e.ConnectivityState.IDLE||s===$e.ConnectivityState.CONNECTING){this.startConnecting(t);return}}this.maybeEnterStickyTransientFailureMode()}startConnecting(e){var t,o;clearTimeout(this.connectionDelayTimeout),this.currentSubchannelIndex=e,this.children[e].subchannel.getConnectivityState()===$e.ConnectivityState.IDLE&&(su("Start connecting to subchannel with address "+this.children[e].subchannel.getAddress()),process.nextTick(()=>{var s;(s=this.children[e])===null||s===void 0||s.subchannel.startConnecting()})),this.connectionDelayTimeout=setTimeout(()=>{this.startNextSubchannelConnecting(e+1)},OEe),(o=(t=this.connectionDelayTimeout).unref)===null||o===void 0||o.call(t)}pickSubchannel(e){su("Pick subchannel with address "+e.getAddress()),this.stickyTransientFailureMode=!1,e.ref(),this.channelControlHelper.addChannelzChild(e.getChannelzRef()),this.removeCurrentPick(),this.resetSubchannelList(),e.addConnectivityStateListener(this.subchannelStateListener),e.addHealthStateWatcher(this.pickedSubchannelHealthListener),this.currentPick=e,clearTimeout(this.connectionDelayTimeout),this.calculateAndReportNewState()}updateState(e,t,o){su($e.ConnectivityState[this.currentState]+" -> "+$e.ConnectivityState[e]),this.currentState=e,this.channelControlHelper.updateState(e,t,o)}resetSubchannelList(){for(let e of this.children)e.subchannel.removeConnectivityStateListener(this.subchannelStateListener),e.subchannel.unref(),this.channelControlHelper.removeChannelzChild(e.subchannel.getChannelzRef());this.currentSubchannelIndex=0,this.children=[]}connectToAddressList(e,t){su("connectToAddressList(["+e.map(s=>(0,t4.subchannelAddressToString)(s))+"])");let o=e.map(s=>({subchannel:this.channelControlHelper.createSubchannel(s,t),hasReportedTransientFailure:!1}));for(let{subchannel:s}of o)if(s.getConnectivityState()===$e.ConnectivityState.READY){this.pickSubchannel(s);return}for(let{subchannel:s}of o)s.ref(),this.channelControlHelper.addChannelzChild(s.getChannelzRef());this.resetSubchannelList(),this.children=o;for(let{subchannel:s}of this.children)s.addConnectivityStateListener(this.subchannelStateListener);for(let s of this.children)s.subchannel.getConnectivityState()===$e.ConnectivityState.TRANSIENT_FAILURE&&(s.hasReportedTransientFailure=!0);this.startNextSubchannelConnecting(0),this.calculateAndReportNewState()}updateAddressList(e,t,o){if(!(t instanceof Pa))return;this.reportHealthStatus=o[o4],t.getShuffleAddressList()&&(e=i4(e));let s=[].concat(...e.map(i=>i.addresses));su("updateAddressList(["+s.map(i=>(0,t4.subchannelAddressToString)(i))+"])"),s.length===0&&(this.lastError="No addresses resolved");let a=AEe(s);this.latestAddressList=a,this.latestOptions=o,this.connectToAddressList(a,o)}exitIdle(){this.currentState===$e.ConnectivityState.IDLE&&this.latestAddressList&&this.connectToAddressList(this.latestAddressList,this.latestOptions)}resetBackoff(){}destroy(){this.resetSubchannelList(),this.removeCurrentPick()}getTypeName(){return au}};on.PickFirstLoadBalancer=lu;var REe=new Pa(!1),TA=class{constructor(e,t,o){this.endpoint=e,this.options=o,this.latestState=$e.ConnectivityState.IDLE;let s=(0,EA.createChildChannelControlHelper)(t,{updateState:(a,i,n)=>{this.latestState=a,this.latestPicker=i,t.updateState(a,i,n)}});this.pickFirstBalancer=new lu(s),this.latestPicker=new Ao.QueuePicker(this.pickFirstBalancer)}startConnecting(){this.pickFirstBalancer.updateAddressList([this.endpoint],REe,Object.assign(Object.assign({},this.options),{[o4]:!0}))}updateEndpoint(e,t){this.options=t,this.endpoint=e,this.latestState!==$e.ConnectivityState.IDLE&&this.startConnecting()}getConnectivityState(){return this.latestState}getPicker(){return this.latestPicker}getEndpoint(){return this.endpoint}exitIdle(){this.pickFirstBalancer.exitIdle()}destroy(){this.pickFirstBalancer.destroy()}};on.LeafLoadBalancer=TA;function NEe(){(0,EA.registerLoadBalancerType)(au,lu,Pa),(0,EA.registerDefaultLoadBalancerType)(au)}});var s4=T(fE=>{"use strict";Object.defineProperty(fE,"__esModule",{value:!0});fE.FileWatcherCertificateProvider=void 0;var CEe=V("fs"),PEe=Pe(),IEe=ue(),bEe=V("util"),LEe="certificate_provider";function uE(r){PEe.trace(IEe.LogVerbosity.DEBUG,LEe,r)}var SA=(0,bEe.promisify)(CEe.readFile),gA=class{constructor(e){if(this.config=e,this.refreshTimer=null,this.fileResultPromise=null,this.latestCaUpdate=void 0,this.caListeners=new Set,this.latestIdentityUpdate=void 0,this.identityListeners=new Set,this.lastUpdateTime=null,e.certificateFile===void 0!=(e.privateKeyFile===void 0))throw new Error("certificateFile and privateKeyFile must be set or unset together");if(e.certificateFile===void 0&&e.caCertificateFile===void 0)throw new Error("At least one of certificateFile and caCertificateFile must be set");uE("File watcher constructed with config "+JSON.stringify(e))}updateCertificates(){this.fileResultPromise||(this.fileResultPromise=Promise.allSettled([this.config.certificateFile?SA(this.config.certificateFile):Promise.reject(),this.config.privateKeyFile?SA(this.config.privateKeyFile):Promise.reject(),this.config.caCertificateFile?SA(this.config.caCertificateFile):Promise.reject()]),this.fileResultPromise.then(([e,t,o])=>{if(this.refreshTimer){uE("File watcher read certificates certificate "+e.status+", privateKey "+t.status+", CA certificate "+o.status),this.lastUpdateTime=new Date,this.fileResultPromise=null,e.status==="fulfilled"&&t.status==="fulfilled"?this.latestIdentityUpdate={certificate:e.value,privateKey:t.value}:this.latestIdentityUpdate=null,o.status==="fulfilled"?this.latestCaUpdate={caCertificate:o.value}:this.latestCaUpdate=null;for(let s of this.identityListeners)s(this.latestIdentityUpdate);for(let s of this.caListeners)s(this.latestCaUpdate)}}),uE("File watcher initiated certificate update"))}maybeStartWatchingFiles(){if(!this.refreshTimer){let e=this.lastUpdateTime?new Date().getTime()-this.lastUpdateTime.getTime():1/0;e>this.config.refreshIntervalMs&&this.updateCertificates(),e>this.config.refreshIntervalMs*2&&(this.latestCaUpdate=void 0,this.latestIdentityUpdate=void 0),this.refreshTimer=setInterval(()=>this.updateCertificates(),this.config.refreshIntervalMs),uE("File watcher started watching")}}maybeStopWatchingFiles(){this.caListeners.size===0&&this.identityListeners.size===0&&(this.fileResultPromise=null,this.refreshTimer&&(clearInterval(this.refreshTimer),this.refreshTimer=null))}addCaCertificateListener(e){this.caListeners.add(e),this.maybeStartWatchingFiles(),this.latestCaUpdate!==void 0&&process.nextTick(e,this.latestCaUpdate)}removeCaCertificateListener(e){this.caListeners.delete(e),this.maybeStopWatchingFiles()}addIdentityCertificateListener(e){this.identityListeners.add(e),this.maybeStartWatchingFiles(),this.latestIdentityUpdate!==void 0&&process.nextTick(e,this.latestIdentityUpdate)}removeIdentityCertificateListener(e){this.identityListeners.delete(e),this.maybeStopWatchingFiles()}};fE.FileWatcherCertificateProvider=gA});var yA=T(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX=k.createCertificateProviderChannelCredentials=k.FileWatcherCertificateProvider=k.createCertificateProviderServerCredentials=k.createServerCredentialsWithInterceptors=k.BaseSubchannelWrapper=k.registerAdminService=k.FilterStackFactory=k.BaseFilter=k.PickResultType=k.QueuePicker=k.UnavailablePicker=k.ChildLoadBalancerHandler=k.EndpointMap=k.endpointHasAddress=k.endpointToString=k.subchannelAddressToString=k.LeafLoadBalancer=k.isLoadBalancerNameRegistered=k.parseLoadBalancingConfig=k.selectLbConfigFromList=k.registerLoadBalancerType=k.createChildChannelControlHelper=k.BackoffTimeout=k.parseDuration=k.durationToMs=k.splitHostPort=k.uriToString=k.createResolver=k.registerResolver=k.log=k.trace=void 0;var a4=Pe();Object.defineProperty(k,"trace",{enumerable:!0,get:function(){return a4.trace}});Object.defineProperty(k,"log",{enumerable:!0,get:function(){return a4.log}});var l4=jr();Object.defineProperty(k,"registerResolver",{enumerable:!0,get:function(){return l4.registerResolver}});Object.defineProperty(k,"createResolver",{enumerable:!0,get:function(){return l4.createResolver}});var c4=Pt();Object.defineProperty(k,"uriToString",{enumerable:!0,get:function(){return c4.uriToString}});Object.defineProperty(k,"splitHostPort",{enumerable:!0,get:function(){return c4.splitHostPort}});var u4=_A();Object.defineProperty(k,"durationToMs",{enumerable:!0,get:function(){return u4.durationToMs}});Object.defineProperty(k,"parseDuration",{enumerable:!0,get:function(){return u4.parseDuration}});var xEe=Nc();Object.defineProperty(k,"BackoffTimeout",{enumerable:!0,get:function(){return xEe.BackoffTimeout}});var cu=so();Object.defineProperty(k,"createChildChannelControlHelper",{enumerable:!0,get:function(){return cu.createChildChannelControlHelper}});Object.defineProperty(k,"registerLoadBalancerType",{enumerable:!0,get:function(){return cu.registerLoadBalancerType}});Object.defineProperty(k,"selectLbConfigFromList",{enumerable:!0,get:function(){return cu.selectLbConfigFromList}});Object.defineProperty(k,"parseLoadBalancingConfig",{enumerable:!0,get:function(){return cu.parseLoadBalancingConfig}});Object.defineProperty(k,"isLoadBalancerNameRegistered",{enumerable:!0,get:function(){return cu.isLoadBalancerNameRegistered}});var MEe=cE();Object.defineProperty(k,"LeafLoadBalancer",{enumerable:!0,get:function(){return MEe.LeafLoadBalancer}});var pE=nr();Object.defineProperty(k,"subchannelAddressToString",{enumerable:!0,get:function(){return pE.subchannelAddressToString}});Object.defineProperty(k,"endpointToString",{enumerable:!0,get:function(){return pE.endpointToString}});Object.defineProperty(k,"endpointHasAddress",{enumerable:!0,get:function(){return pE.endpointHasAddress}});Object.defineProperty(k,"EndpointMap",{enumerable:!0,get:function(){return pE.EndpointMap}});var wEe=$h();Object.defineProperty(k,"ChildLoadBalancerHandler",{enumerable:!0,get:function(){return wEe.ChildLoadBalancerHandler}});var vA=Zn();Object.defineProperty(k,"UnavailablePicker",{enumerable:!0,get:function(){return vA.UnavailablePicker}});Object.defineProperty(k,"QueuePicker",{enumerable:!0,get:function(){return vA.QueuePicker}});Object.defineProperty(k,"PickResultType",{enumerable:!0,get:function(){return vA.PickResultType}});var DEe=yO();Object.defineProperty(k,"BaseFilter",{enumerable:!0,get:function(){return DEe.BaseFilter}});var UEe=SO();Object.defineProperty(k,"FilterStackFactory",{enumerable:!0,get:function(){return UEe.FilterStackFactory}});var kEe=Qh();Object.defineProperty(k,"registerAdminService",{enumerable:!0,get:function(){return kEe.registerAdminService}});var BEe=Z_();Object.defineProperty(k,"BaseSubchannelWrapper",{enumerable:!0,get:function(){return BEe.BaseSubchannelWrapper}});var f4=iE();Object.defineProperty(k,"createServerCredentialsWithInterceptors",{enumerable:!0,get:function(){return f4.createServerCredentialsWithInterceptors}});Object.defineProperty(k,"createCertificateProviderServerCredentials",{enumerable:!0,get:function(){return f4.createCertificateProviderServerCredentials}});var VEe=s4();Object.defineProperty(k,"FileWatcherCertificateProvider",{enumerable:!0,get:function(){return VEe.FileWatcherCertificateProvider}});var FEe=Oc();Object.defineProperty(k,"createCertificateProviderChannelCredentials",{enumerable:!0,get:function(){return FEe.createCertificateProviderChannelCredentials}});var GEe=qO();Object.defineProperty(k,"SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX",{enumerable:!0,get:function(){return GEe.SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX}})});var p4=T(AA=>{"use strict";Object.defineProperty(AA,"__esModule",{value:!0});AA.setup=qEe;var HEe=jr(),OA=class{constructor(e,t,o){this.listener=t,this.hasReturnedResult=!1,this.endpoints=[];let s;e.authority===""?s="/"+e.path:s=e.path,this.endpoints=[{addresses:[{path:s}]}]}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 qEe(){(0,HEe.registerResolver)("unix",OA)}});var m4=T(PA=>{"use strict";Object.defineProperty(PA,"__esModule",{value:!0});PA.setup=KEe;var d4=V("net"),dE=ue(),RA=ht(),h4=jr(),_4=Pt(),jEe=Pe(),YEe="ip_resolver";function E4(r){jEe.trace(dE.LogVerbosity.DEBUG,YEe,r)}var NA="ipv4",CA="ipv6",zEe=443,hE=class{constructor(e,t,o){var s;this.listener=t,this.endpoints=[],this.error=null,this.hasReturnedResult=!1,E4("Resolver constructed for target "+(0,_4.uriToString)(e));let a=[];if(!(e.scheme===NA||e.scheme===CA)){this.error={code:dE.Status.UNAVAILABLE,details:`Unrecognized scheme ${e.scheme} in IP resolver`,metadata:new RA.Metadata};return}let i=e.path.split(",");for(let n of i){let l=(0,_4.splitHostPort)(n);if(l===null){this.error={code:dE.Status.UNAVAILABLE,details:`Failed to parse ${e.scheme} address ${n}`,metadata:new RA.Metadata};return}if(e.scheme===NA&&!(0,d4.isIPv4)(l.host)||e.scheme===CA&&!(0,d4.isIPv6)(l.host)){this.error={code:dE.Status.UNAVAILABLE,details:`Failed to parse ${e.scheme} address ${n}`,metadata:new RA.Metadata};return}a.push({host:l.host,port:(s=l.port)!==null&&s!==void 0?s:zEe})}this.endpoints=a.map(n=>({addresses:[n]})),E4("Parsed "+e.scheme+" address list "+a)}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 KEe(){(0,h4.registerResolver)(NA,hE),(0,h4.registerResolver)(CA,hE)}});var v4=T(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.RoundRobinLoadBalancer=void 0;uu.setup=QEe;var g4=so(),yt=rr(),IA=Zn(),$Ee=Pe(),XEe=ue(),T4=nr(),WEe=cE(),JEe="round_robin";function S4(r){$Ee.trace(XEe.LogVerbosity.DEBUG,JEe,r)}var _E="round_robin",bA=class r{getLoadBalancerName(){return _E}constructor(){}toJsonObject(){return{[_E]:{}}}static createFromJson(e){return new r}},LA=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}},EE=class{constructor(e){this.channelControlHelper=e,this.children=[],this.currentState=yt.ConnectivityState.IDLE,this.currentReadyPicker=null,this.updatesPaused=!1,this.lastError=null,this.childChannelControlHelper=(0,g4.createChildChannelControlHelper)(e,{updateState:(t,o,s)=>{this.currentState===yt.ConnectivityState.READY&&t!==yt.ConnectivityState.READY&&this.channelControlHelper.requestReresolution(),s&&(this.lastError=s),this.calculateAndUpdateState()}})}countChildrenWithState(e){return this.children.filter(t=>t.getConnectivityState()===e).length}calculateAndUpdateState(){if(!this.updatesPaused){if(this.countChildrenWithState(yt.ConnectivityState.READY)>0){let e=this.children.filter(o=>o.getConnectivityState()===yt.ConnectivityState.READY),t=0;if(this.currentReadyPicker!==null){let o=this.currentReadyPicker.peekNextEndpoint();t=e.findIndex(s=>(0,T4.endpointEqual)(s.getEndpoint(),o)),t<0&&(t=0)}this.updateState(yt.ConnectivityState.READY,new LA(e.map(o=>({endpoint:o.getEndpoint(),picker:o.getPicker()})),t),null)}else if(this.countChildrenWithState(yt.ConnectivityState.CONNECTING)>0)this.updateState(yt.ConnectivityState.CONNECTING,new IA.QueuePicker(this),null);else if(this.countChildrenWithState(yt.ConnectivityState.TRANSIENT_FAILURE)>0){let e=`round_robin: No connection established. Last error: ${this.lastError}`;this.updateState(yt.ConnectivityState.TRANSIENT_FAILURE,new IA.UnavailablePicker({details:e}),e)}else this.updateState(yt.ConnectivityState.IDLE,new IA.QueuePicker(this),null);for(let e of this.children)e.getConnectivityState()===yt.ConnectivityState.IDLE&&e.exitIdle()}}updateState(e,t,o){S4(yt.ConnectivityState[this.currentState]+" -> "+yt.ConnectivityState[e]),e===yt.ConnectivityState.READY?this.currentReadyPicker=t:this.currentReadyPicker=null,this.currentState=e,this.channelControlHelper.updateState(e,t,o)}resetSubchannelList(){for(let e of this.children)e.destroy()}updateAddressList(e,t,o){this.resetSubchannelList(),S4("Connect to endpoint list "+e.map(T4.endpointToString)),this.updatesPaused=!0,this.children=e.map(s=>new WEe.LeafLoadBalancer(s,this.childChannelControlHelper,o));for(let s of this.children)s.startConnecting();this.updatesPaused=!1,this.calculateAndUpdateState()}exitIdle(){}resetBackoff(){}destroy(){this.resetSubchannelList()}getTypeName(){return _E}};uu.RoundRobinLoadBalancer=EE;function QEe(){(0,g4.registerLoadBalancerType)(_E,EE,bA)}});var A4=T(No=>{"use strict";var xA;Object.defineProperty(No,"__esModule",{value:!0});No.OutlierDetectionLoadBalancer=No.OutlierDetectionLoadBalancingConfig=void 0;No.setup=cme;var ZEe=rr(),y4=ue(),Ro=_A(),O4=yA(),eme=so(),tme=$h(),rme=Zn(),MA=nr(),nme=Z_(),ime=Pe(),ome="outlier_detection";function it(r){ime.trace(y4.LogVerbosity.DEBUG,ome,r)}var VA="outlier_detection",sme=((xA=process.env.GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION)!==null&&xA!==void 0?xA:"true")==="true",ame={stdev_factor:1900,enforcement_percentage:100,minimum_hosts:5,request_volume:100},lme={threshold:85,enforcement_percentage:100,minimum_hosts:5,request_volume:50};function Ia(r,e,t,o){if(e in r&&r[e]!==void 0&&typeof r[e]!==t){let s=o?`${o}.${e}`:e;throw new Error(`outlier detection config ${s} parse error: expected ${t}, got ${typeof r[e]}`)}}function wA(r,e,t){let o=t?`${t}.${e}`:e;if(e in r&&r[e]!==void 0){if(!(0,Ro.isDuration)(r[e]))throw new Error(`outlier detection config ${o} parse error: expected Duration, got ${typeof r[e]}`);if(!(r[e].seconds>=0&&r[e].seconds<=315576e6&&r[e].nanos>=0&&r[e].nanos<=999999999))throw new Error(`outlier detection config ${o} parse error: values out of range for non-negative Duaration`)}}function mE(r,e,t){let o=t?`${t}.${e}`:e;if(Ia(r,e,"number",t),e in r&&r[e]!==void 0&&!(r[e]>=0&&r[e]<=100))throw new Error(`outlier detection config ${o} parse error: value out of range for percentage (0-100)`)}var fu=class r{constructor(e,t,o,s,a,i,n){if(this.childPolicy=n,n.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=o??3e5,this.maxEjectionPercent=s??10,this.successRateEjection=a?Object.assign(Object.assign({},ame),a):null,this.failurePercentageEjection=i?Object.assign(Object.assign({},lme),i):null}getLoadBalancerName(){return VA}toJsonObject(){var e,t;return{outlier_detection:{interval:(0,Ro.msToDuration)(this.intervalMs),base_ejection_time:(0,Ro.msToDuration)(this.baseEjectionTimeMs),max_ejection_time:(0,Ro.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(wA(e,"interval"),wA(e,"base_ejection_time"),wA(e,"max_ejection_time"),mE(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");Ia(e.success_rate_ejection,"stdev_factor","number","success_rate_ejection"),mE(e.success_rate_ejection,"enforcement_percentage","success_rate_ejection"),Ia(e.success_rate_ejection,"minimum_hosts","number","success_rate_ejection"),Ia(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");mE(e.failure_percentage_ejection,"threshold","failure_percentage_ejection"),mE(e.failure_percentage_ejection,"enforcement_percentage","failure_percentage_ejection"),Ia(e.failure_percentage_ejection,"minimum_hosts","number","failure_percentage_ejection"),Ia(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 o=(0,eme.selectLbConfigFromList)(e.child_policy);if(!o)throw new Error("outlier detection config child_policy: no valid recognized policy found");return new r(e.interval?(0,Ro.durationToMs)(e.interval):null,e.base_ejection_time?(0,Ro.durationToMs)(e.base_ejection_time):null,e.max_ejection_time?(0,Ro.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,o)}};No.OutlierDetectionLoadBalancingConfig=fu;var UA=class extends nme.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 DA(){return{success:0,failure:0}}var kA=class{constructor(){this.activeBucket=DA(),this.inactiveBucket=DA()}addSuccess(){this.activeBucket.success+=1}addFailure(){this.activeBucket.failure+=1}switchBuckets(){this.inactiveBucket=this.activeBucket,this.activeBucket=DA()}getLastSuccesses(){return this.inactiveBucket.success}getLastFailures(){return this.inactiveBucket.failure}},BA=class{constructor(e,t){this.wrappedPicker=e,this.countCalls=t}pick(e){let t=this.wrappedPicker.pick(e);if(t.pickResultType===rme.PickResultType.COMPLETE){let o=t.subchannel,s=o.getMapEntry();if(s){let a=t.onCallEnded;return this.countCalls&&(a=i=>{var n;i===y4.Status.OK?s.counter.addSuccess():s.counter.addFailure(),(n=t.onCallEnded)===null||n===void 0||n.call(t,i)}),Object.assign(Object.assign({},t),{subchannel:o.getWrappedSubchannel(),onCallEnded:a})}else return Object.assign(Object.assign({},t),{subchannel:o.getWrappedSubchannel()})}else return t}},TE=class{constructor(e){this.entryMap=new MA.EndpointMap,this.latestConfig=null,this.timerStartTime=null,this.childBalancer=new tme.ChildLoadBalancerHandler((0,O4.createChildChannelControlHelper)(e,{createSubchannel:(t,o)=>{let s=e.createSubchannel(t,o),a=this.entryMap.getForSubchannelAddress(t),i=new UA(s,a);return(a==null?void 0:a.currentEjectionTimestamp)!==null&&i.eject(),a==null||a.subchannelWrappers.push(i),i},updateState:(t,o,s)=>{t===ZEe.ConnectivityState.READY?e.updateState(t,new BA(o,this.isCountingEnabled()),s):e.updateState(t,o,s)}})),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 o=t.request_volume,s=0,a=[];for(let[f,_]of this.entryMap.entries()){let m=_.counter.getLastSuccesses(),O=_.counter.getLastFailures();it("Stats for "+(0,MA.endpointToString)(f)+": successes="+m+" failures="+O+" targetRequestVolume="+o),m+O>=o&&(s+=1,a.push(m/(m+O)))}if(it("Found "+s+" success rate candidates; currentEjectionPercent="+this.getCurrentEjectionPercent()+" successRates=["+a+"]"),sf+_)/a.length,n=0;for(let f of a){let _=f-i;n+=_*_}let l=n/a.length,c=Math.sqrt(l),u=i-c*(t.stdev_factor/1e3);it("stdev="+c+" ejectionThreshold="+u);for(let[f,_]of this.entryMap.entries()){if(this.getCurrentEjectionPercent()>=this.latestConfig.getMaxEjectionPercent())break;let m=_.counter.getLastSuccesses(),O=_.counter.getLastFailures();if(m+Othis.runChecks(),e),(o=(t=this.ejectionTimer).unref)===null||o===void 0||o.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,o]of this.entryMap.entries())if(o.currentEjectionTimestamp===null)o.ejectionTimeMultiplier>0&&(o.ejectionTimeMultiplier-=1);else{let s=this.latestConfig.getBaseEjectionTimeMs(),a=this.latestConfig.getMaxEjectionTimeMs(),i=new Date(o.currentEjectionTimestamp.getTime());i.setMilliseconds(i.getMilliseconds()+Math.min(s*o.ejectionTimeMultiplier,Math.max(s,a))),i{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.experimental=w.ServerInterceptingCall=w.ResponderBuilder=w.ServerListenerBuilder=w.addAdminServicesToServer=w.getChannelzHandlers=w.getChannelzServiceDefinition=w.InterceptorConfigurationError=w.InterceptingCall=w.RequesterBuilder=w.ListenerBuilder=w.StatusBuilder=w.getClientChannel=w.ServerCredentials=w.Server=w.setLogVerbosity=w.setLogger=w.load=w.loadObject=w.CallCredentials=w.ChannelCredentials=w.waitForClientReady=w.closeClient=w.Channel=w.makeGenericClientConstructor=w.makeClientConstructor=w.loadPackageDefinition=w.Client=w.compressionAlgorithms=w.propagate=w.connectivityState=w.status=w.logVerbosity=w.Metadata=w.credentials=void 0;var SE=kh();Object.defineProperty(w,"CallCredentials",{enumerable:!0,get:function(){return SE.CallCredentials}});var ume=ey();Object.defineProperty(w,"Channel",{enumerable:!0,get:function(){return ume.ChannelImplementation}});var fme=gO();Object.defineProperty(w,"compressionAlgorithms",{enumerable:!0,get:function(){return fme.CompressionAlgorithms}});var pme=rr();Object.defineProperty(w,"connectivityState",{enumerable:!0,get:function(){return pme.ConnectivityState}});var gE=Oc();Object.defineProperty(w,"ChannelCredentials",{enumerable:!0,get:function(){return gE.ChannelCredentials}});var R4=Zv();Object.defineProperty(w,"Client",{enumerable:!0,get:function(){return R4.Client}});var FA=ue();Object.defineProperty(w,"logVerbosity",{enumerable:!0,get:function(){return FA.LogVerbosity}});Object.defineProperty(w,"status",{enumerable:!0,get:function(){return FA.Status}});Object.defineProperty(w,"propagate",{enumerable:!0,get:function(){return FA.Propagate}});var N4=Pe(),GA=ry();Object.defineProperty(w,"loadPackageDefinition",{enumerable:!0,get:function(){return GA.loadPackageDefinition}});Object.defineProperty(w,"makeClientConstructor",{enumerable:!0,get:function(){return GA.makeClientConstructor}});Object.defineProperty(w,"makeGenericClientConstructor",{enumerable:!0,get:function(){return GA.makeClientConstructor}});var dme=ht();Object.defineProperty(w,"Metadata",{enumerable:!0,get:function(){return dme.Metadata}});var hme=Zj();Object.defineProperty(w,"Server",{enumerable:!0,get:function(){return hme.Server}});var _me=iE();Object.defineProperty(w,"ServerCredentials",{enumerable:!0,get:function(){return _me.ServerCredentials}});var Eme=e4();Object.defineProperty(w,"StatusBuilder",{enumerable:!0,get:function(){return Eme.StatusBuilder}});w.credentials={combineChannelCredentials:(r,...e)=>e.reduce((t,o)=>t.compose(o),r),combineCallCredentials:(r,...e)=>e.reduce((t,o)=>t.compose(o),r),createInsecure:gE.ChannelCredentials.createInsecure,createSsl:gE.ChannelCredentials.createSsl,createFromSecureContext:gE.ChannelCredentials.createFromSecureContext,createFromMetadataGenerator:SE.CallCredentials.createFromMetadataGenerator,createFromGoogleCredential:SE.CallCredentials.createFromGoogleCredential,createEmpty:SE.CallCredentials.createEmpty};var mme=r=>r.close();w.closeClient=mme;var Tme=(r,e,t)=>r.waitForReady(e,t);w.waitForClientReady=Tme;var Sme=(r,e)=>{throw new Error("Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead")};w.loadObject=Sme;var gme=(r,e,t)=>{throw new Error("Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead")};w.load=gme;var vme=r=>{N4.setLogger(r)};w.setLogger=vme;var yme=r=>{N4.setLoggerVerbosity(r)};w.setLogVerbosity=yme;var Ome=r=>R4.Client.prototype.getChannel.call(r);w.getClientChannel=Ome;var vE=Wv();Object.defineProperty(w,"ListenerBuilder",{enumerable:!0,get:function(){return vE.ListenerBuilder}});Object.defineProperty(w,"RequesterBuilder",{enumerable:!0,get:function(){return vE.RequesterBuilder}});Object.defineProperty(w,"InterceptingCall",{enumerable:!0,get:function(){return vE.InterceptingCall}});Object.defineProperty(w,"InterceptorConfigurationError",{enumerable:!0,get:function(){return vE.InterceptorConfigurationError}});var C4=_o();Object.defineProperty(w,"getChannelzServiceDefinition",{enumerable:!0,get:function(){return C4.getChannelzServiceDefinition}});Object.defineProperty(w,"getChannelzHandlers",{enumerable:!0,get:function(){return C4.getChannelzHandlers}});var Ame=Qh();Object.defineProperty(w,"addAdminServicesToServer",{enumerable:!0,get:function(){return Ame.addAdminServicesToServer}});var HA=uA();Object.defineProperty(w,"ServerListenerBuilder",{enumerable:!0,get:function(){return HA.ServerListenerBuilder}});Object.defineProperty(w,"ResponderBuilder",{enumerable:!0,get:function(){return HA.ResponderBuilder}});Object.defineProperty(w,"ServerInterceptingCall",{enumerable:!0,get:function(){return HA.ServerInterceptingCall}});var Rme=yA();w.experimental=Rme;var Nme=oO(),Cme=p4(),Pme=m4(),Ime=cE(),bme=v4(),Lme=A4(),xme=_o();Nme.setup(),Cme.setup(),Pme.setup(),Ime.setup(),bme.setup(),Lme.setup(),xme.setup()});var P4=T(yE=>{"use strict";Object.defineProperty(yE,"__esModule",{value:!0});yE.createServiceClientConstructor=void 0;var Mme=pu();function wme(r,e){let t={export:{path:r,requestStream:!1,responseStream:!1,requestSerialize:o=>o,requestDeserialize:o=>o,responseSerialize:o=>o,responseDeserialize:o=>o}};return Mme.makeGenericClientConstructor(t,e)}yE.createServiceClientConstructor=wme});var du=T(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.createOtlpGrpcExporterTransport=lr.GrpcExporterTransport=lr.createEmptyMetadata=lr.createSslCredentials=lr.createInsecureCredentials=void 0;var Dme=0,Ume=2;function kme(r){return r==="gzip"?Ume:Dme}function Bme(){let{credentials:r}=pu();return r.createInsecure()}lr.createInsecureCredentials=Bme;function Vme(r,e,t){let{credentials:o}=pu();return o.createSsl(r,e,t)}lr.createSslCredentials=Vme;function Fme(){let{Metadata:r}=pu();return new r}lr.createEmptyMetadata=Fme;var OE=class{constructor(e){this._parameters=e}shutdown(){var e;(e=this._client)===null||e===void 0||e.close()}send(e,t){let o=Buffer.from(e);if(this._client==null){let{createServiceClientConstructor:s}=P4();try{this._metadata=this._parameters.metadata()}catch(i){return Promise.resolve({status:"failure",error:i})}let a=s(this._parameters.grpcPath,this._parameters.grpcName);try{this._client=new a(this._parameters.address,this._parameters.credentials(),{"grpc.default_compression_algorithm":kme(this._parameters.compression)})}catch(i){return Promise.resolve({status:"failure",error:i})}}return new Promise(s=>{let a=Date.now()+t;if(this._metadata==null)return s({error:new Error("metadata was null"),status:"failure"});this._client.export(o,this._metadata,{deadline:a},(i,n)=>{s(i?{status:"failure",error:i}:{data:n,status:"success"})})})}};lr.GrpcExporterTransport=OE;function Gme(r){return new OE(r)}lr.createOtlpGrpcExporterTransport=Gme});var I4=T(AE=>{"use strict";Object.defineProperty(AE,"__esModule",{value:!0});AE.VERSION=void 0;AE.VERSION="0.56.0"});var w4=T(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.getOtlpGrpcDefaultConfiguration=pi.mergeOtlpGrpcConfigurationWithDefaults=pi.validateAndNormalizeUrl=void 0;var x4=(_n(),ee(hc)),hu=du(),Hme=I4(),qme=V("url"),b4=(P(),ee(ot));function M4(r){var e;r=r.trim(),r.match(/^([\w]{1,8}):\/\//)||(r=`https://${r}`);let o=new qme.URL(r);return o.protocol==="unix:"?r:(o.pathname&&o.pathname!=="/"&&b4.diag.warn("URL path should not be set when using grpc, the path part of the URL will be ignored."),o.protocol!==""&&!(!((e=o.protocol)===null||e===void 0)&&e.match(/^(http)s?:$/))&&b4.diag.warn("URL protocol should be http(s)://. Using http://."),o.host)}pi.validateAndNormalizeUrl=M4;function L4(r,e){for(let[t,o]of Object.entries(e.getMap()))r.get(t).length<1&&r.set(t,o)}function jme(r,e,t){var o,s,a,i,n;let l=(s=(o=r.url)!==null&&o!==void 0?o:e.url)!==null&&s!==void 0?s:t.url;return Object.assign(Object.assign({},(0,x4.mergeOtlpSharedConfigurationWithDefaults)(r,e,t)),{metadata:()=>{var c,u,f,_;let m=t.metadata();return L4(m,(u=(c=r.metadata)===null||c===void 0?void 0:c.call(r).clone())!==null&&u!==void 0?u:(0,hu.createEmptyMetadata)()),L4(m,(_=(f=e.metadata)===null||f===void 0?void 0:f.call(e))!==null&&_!==void 0?_:(0,hu.createEmptyMetadata)()),m},url:M4(l),credentials:(n=(a=r.credentials)!==null&&a!==void 0?a:(i=e.credentials)===null||i===void 0?void 0:i.call(e,l))!==null&&n!==void 0?n:t.credentials(l)})}pi.mergeOtlpGrpcConfigurationWithDefaults=jme;function Yme(){return Object.assign(Object.assign({},(0,x4.getSharedConfigurationDefaults)()),{metadata:()=>{let r=(0,hu.createEmptyMetadata)();return r.set("User-Agent",`OTel-OTLP-Exporter-JavaScript/${Hme.VERSION}`),r},url:"http://localhost:4317",credentials:r=>r.startsWith("http://")?()=>(0,hu.createInsecureCredentials)():()=>(0,hu.createSslCredentials)()})}pi.getOtlpGrpcDefaultConfiguration=Yme});function RE(r){return r.setValue(qA,!0)}function D4(r){return r.deleteValue(qA)}function ba(r){return r.getValue(qA)===!0}var qA,_u=p(()=>{P();qA=De("OpenTelemetry SDK Context Key SUPPRESS_TRACING")});var NE,U4=p(()=>{NE="baggage"});function PE(r){return r.reduce((e,t)=>{let o=`${e}${e!==""?",":""}${t}`;return o.length>8192?e:o},"")}function IE(r){return r.getAllEntries().map(([e,t])=>{let o=`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`;return t.metadata!==void 0&&(o+=";"+t.metadata.toString()),o})}function Eu(r){let e=r.split(";");if(e.length<=0)return;let t=e.shift();if(!t)return;let o=t.indexOf("=");if(o<=0)return;let s=decodeURIComponent(t.substring(0,o).trim()),a=decodeURIComponent(t.substring(o+1).trim()),i;return e.length>0&&(i=Lr(e.join(";"))),{key:s,value:a,metadata:i}}function B4(r){return typeof r!="string"||r.length===0?{}:r.split(",").map(e=>Eu(e)).filter(e=>e!==void 0&&e.value.length>0).reduce((e,t)=>(e[t.key]=t.value,e),{})}var jA=p(()=>{P()});var bE,V4=p(()=>{P();_u();U4();jA();bE=class{inject(e,t,o){let s=Ue.getBaggage(e);if(!s||ba(e))return;let a=IE(s).filter(n=>n.length<=4096).slice(0,180),i=PE(a);i.length>0&&o.set(t,NE,i)}extract(e,t,o){let s=o.get(t,NE),a=Array.isArray(s)?s.join(","):s;if(!a)return e;let i={};return a.length===0||(a.split(",").forEach(l=>{let c=Eu(l);if(c){let u={value:c.value};c.metadata&&(u.metadata=c.metadata),i[c.key]=u}}),Object.entries(i).length===0)?e:Ue.setBaggage(e,Ue.createBaggage(i))}fields(){return[NE]}}});var LE,F4=p(()=>{LE=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 G4(r){let e={};if(typeof r!="object"||r==null)return e;for(let[t,o]of Object.entries(r)){if(!YA(t)){S.warn(`Invalid attribute key: ${t}`);continue}if(!zA(o)){S.warn(`Invalid attribute value set for key: ${t}`);continue}Array.isArray(o)?e[t]=o.slice():e[t]=o}return e}function YA(r){return typeof r=="string"&&r.length>0}function zA(r){return r==null?!0:Array.isArray(r)?$me(r):H4(r)}function $me(r){let e;for(let t of r)if(t!=null){if(!e){if(H4(t)){e=typeof t;continue}return!1}if(typeof t!==e)return!1}return!0}function H4(r){switch(typeof r){case"number":case"boolean":case"string":return!0}return!1}var q4=p(()=>{P()});function xE(){return r=>{S.error(Xme(r))}}function Xme(r){return typeof r=="string"?r:JSON.stringify(Wme(r))}function Wme(r){let e={},t=r;for(;t!==null;)Object.getOwnPropertyNames(t).forEach(o=>{if(e[o])return;let s=t[o];s&&(e[o]=String(s))}),t=Object.getPrototypeOf(t);return e}var KA=p(()=>{P()});function Y4(r){j4=r}function ME(r){try{j4(r)}catch{}}var j4,$A=p(()=>{KA();j4=xE()});var La,XA=p(()=>{(function(r){r.AlwaysOff="always_off",r.AlwaysOn="always_on",r.ParentBasedAlwaysOff="parentbased_always_off",r.ParentBasedAlwaysOn="parentbased_always_on",r.ParentBasedTraceIdRatio="parentbased_traceidratio",r.TraceIdRatio="traceidratio"})(La||(La={}))});function Zme(r){return Qme.indexOf(r)>-1}function tTe(r){return eTe.indexOf(r)>-1}function nTe(r){return rTe.indexOf(r)>-1}function iTe(r,e,t){if(typeof t[r]>"u")return;let o=String(t[r]);e[r]=o.toLowerCase()==="true"}function oTe(r,e,t,o=-1/0,s=1/0){if(typeof t[r]<"u"){let a=Number(t[r]);isNaN(a)||(as?e[r]=s:e[r]=a)}}function sTe(r,e,t,o=Jme){let s=t[r];typeof s=="string"&&(e[r]=s.split(o).map(a=>a.trim()))}function lTe(r,e,t){let o=t[r];if(typeof o=="string"){let s=aTe[o.toUpperCase()];s!=null&&(e[r]=s)}}function gu(r){let e={};for(let t in Su){let o=t;switch(o){case"OTEL_LOG_LEVEL":lTe(o,e,r);break;default:if(Zme(o))iTe(o,e,r);else if(tTe(o))oTe(o,e,r);else if(nTe(o))sTe(o,e,r);else{let s=r[o];typeof s<"u"&&s!==null&&(e[o]=String(s))}}}return e}var Jme,Qme,eTe,rTe,mu,Tu,WA,JA,Su,aTe,QA=p(()=>{P();XA();Jme=",",Qme=["OTEL_SDK_DISABLED"];eTe=["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"];rTe=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];mu=1/0,Tu=128,WA=128,JA=128,Su={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:H.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:mu,OTEL_ATTRIBUTE_COUNT_LIMIT:Tu,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:mu,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Tu,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:mu,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Tu,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:WA,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:JA,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:La.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};aTe={ALL:H.ALL,VERBOSE:H.VERBOSE,DEBUG:H.DEBUG,INFO:H.INFO,WARN:H.WARN,ERROR:H.ERROR,NONE:H.NONE}});function wE(){let r=gu(process.env);return Object.assign({},Su,r)}function DE(){return gu(process.env)}var z4=p(()=>{QA()});var UE,K4=p(()=>{UE=typeof globalThis=="object"?globalThis:global});function $4(r){return r>=48&&r<=57?r-48:r>=97&&r<=102?r-87:r-55}function kE(r){let e=new Uint8Array(r.length/2),t=0;for(let o=0;o{});function BE(r){return Buffer.from(kE(r)).toString("base64")}var X4=p(()=>{ZA()});function W4(r){return function(){for(let t=0;t>>0,t*4);for(let t=0;t0);t++)t===r-1&&(VE[r-1]=1);return VE.toString("hex",0,r)}}var xa,VE,J4=p(()=>{xa=class{constructor(){this.generateTraceId=W4(16),this.generateSpanId=W4(8)}},VE=Buffer.allocUnsafe(16)});import{performance as cTe}from"perf_hooks";var di,Q4=p(()=>{di=cTe});var FE,eR=p(()=>{FE="1.29.0"});var GE,Z4=p(()=>{eR();Ve();GE={[Se]:"opentelemetry",[st]:"node",[ge]:wt,[ve]:FE}});function HE(r){r.unref()}var e6=p(()=>{});var t6=p(()=>{z4();K4();X4();J4();Q4();Z4();e6()});var tR=p(()=>{t6()});function Ma(r){let e=r/1e3,t=Math.trunc(e),o=Math.round(r%1e3*fTe);return[t,o]}function jE(){let r=di.timeOrigin;if(typeof r!="number"){let e=di;r=e.timing&&e.timing.fetchStart}return r}function rR(r){let e=Ma(jE()),t=Ma(typeof r=="number"?r:di.now());return nR(e,t)}function n6(r){if(YE(r))return r;if(typeof r=="number")return r=qE&&(t[1]-=qE,t[0]+=1),t}var r6,uTe,fTe,qE,u6=p(()=>{tR();r6=9,uTe=6,fTe=Math.pow(10,uTe),qE=Math.pow(10,r6)});var zE,f6=p(()=>{(function(r){r[r.SUCCESS=0]="SUCCESS",r[r.FAILED=1]="FAILED"})(zE||(zE={}))});var KE,p6=p(()=>{P();KE=class{constructor(e={}){var t;this._propagators=(t=e.propagators)!==null&&t!==void 0?t:[],this._fields=Array.from(new Set(this._propagators.map(o=>typeof o.fields=="function"?o.fields():[]).reduce((o,s)=>o.concat(s),[])))}inject(e,t,o){for(let s of this._propagators)try{s.inject(e,t,o)}catch(a){S.warn(`Failed to inject with ${s.constructor.name}. Err: ${a.message}`)}}extract(e,t,o){return this._propagators.reduce((s,a)=>{try{return a.extract(s,t,o)}catch(i){S.warn(`Failed to extract with ${a.constructor.name}. Err: ${i.message}`)}return s},e)}fields(){return this._fields.slice()}}});function d6(r){return hTe.test(r)}function h6(r){return _Te.test(r)&&!ETe.test(r)}var iR,pTe,dTe,hTe,_Te,ETe,_6=p(()=>{iR="[_0-9a-z-*/]",pTe=`[a-z]${iR}{0,255}`,dTe=`[a-z0-9]${iR}{0,240}@[a-z]${iR}{0,13}`,hTe=new RegExp(`^(?:${pTe}|${dTe})$`),_Te=/^[ -~]{0,255}[!-~]$/,ETe=/,|=/});var E6,mTe,m6,T6,wa,oR=p(()=>{_6();E6=32,mTe=512,m6=",",T6="=",wa=class r{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let o=this._clone();return o._internalState.has(e)&&o._internalState.delete(e),o._internalState.set(e,t),o}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+T6+this.get(t)),e),[]).join(m6)}_parse(e){e.length>mTe||(this._internalState=e.split(m6).reverse().reduce((t,o)=>{let s=o.trim(),a=s.indexOf(T6);if(a!==-1){let i=s.slice(0,a),n=s.slice(a+1,o.length);d6(i)&&h6(n)&&t.set(i,n)}return t},new Map),this._internalState.size>E6&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,E6))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new r;return e._internalState=new Map(this._internalState),e}}});function sR(r){let e=OTe.exec(r);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var vu,yu,TTe,STe,gTe,vTe,yTe,OTe,$E,S6=p(()=>{P();_u();oR();vu="traceparent",yu="tracestate",TTe="00",STe="(?!ff)[\\da-f]{2}",gTe="(?![0]{32})[\\da-f]{32}",vTe="(?![0]{16})[\\da-f]{16}",yTe="[\\da-f]{2}",OTe=new RegExp(`^\\s?(${STe})-(${gTe})-(${vTe})-(${yTe})(-.*)?\\s?$`);$E=class{inject(e,t,o){let s=ie.getSpanContext(e);if(!s||ba(e)||!xe(s))return;let a=`${TTe}-${s.traceId}-${s.spanId}-0${Number(s.traceFlags||se.NONE).toString(16)}`;o.set(t,vu,a),s.traceState&&o.set(t,yu,s.traceState.serialize())}extract(e,t,o){let s=o.get(t,vu);if(!s)return e;let a=Array.isArray(s)?s[0]:s;if(typeof a!="string")return e;let i=sR(a);if(!i)return e;i.isRemote=!0;let n=o.get(t,yu);if(n){let l=Array.isArray(n)?n.join(","):n;i.traceState=new wa(typeof l=="string"?l:void 0)}return ie.setSpanContext(e,i)}fields(){return[vu,yu]}}});function g6(r,e){return r.setValue(aR,e)}function v6(r){return r.deleteValue(aR)}function y6(r){return r.getValue(aR)}var aR,XE,O6=p(()=>{P();aR=De("OpenTelemetry SDK Context Key RPC_METADATA");(function(r){r.HTTP="http"})(XE||(XE={}))});var Co,lR=p(()=>{P();Co=class{shouldSample(){return{decision:ke.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}});var hi,cR=p(()=>{P();hi=class{shouldSample(){return{decision:ke.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}});var WE,A6=p(()=>{P();$A();lR();cR();WE=class{constructor(e){var t,o,s,a;this._root=e.root,this._root||(ME(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new hi),this._remoteParentSampled=(t=e.remoteParentSampled)!==null&&t!==void 0?t:new hi,this._remoteParentNotSampled=(o=e.remoteParentNotSampled)!==null&&o!==void 0?o:new Co,this._localParentSampled=(s=e.localParentSampled)!==null&&s!==void 0?s:new hi,this._localParentNotSampled=(a=e.localParentNotSampled)!==null&&a!==void 0?a:new Co}shouldSample(e,t,o,s,a,i){let n=ie.getSpanContext(e);return!n||!xe(n)?this._root.shouldSample(e,t,o,s,a,i):n.isRemote?n.traceFlags&se.SAMPLED?this._remoteParentSampled.shouldSample(e,t,o,s,a,i):this._remoteParentNotSampled.shouldSample(e,t,o,s,a,i):n.traceFlags&se.SAMPLED?this._localParentSampled.shouldSample(e,t,o,s,a,i):this._localParentNotSampled.shouldSample(e,t,o,s,a,i)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}});var JE,R6=p(()=>{P();JE=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:Mt(t)&&this._accumulate(t)=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let o=0;o>>0}return t}}});function bTe(r,e){return function(t){return r(e(t))}}function uR(r){if(!LTe(r)||xTe(r)!==ATe)return!1;let e=ITe(r);if(e===null)return!0;let t=P6.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&N6.call(t)===PTe}function LTe(r){return r!=null&&typeof r=="object"}function xTe(r){return r==null?r===void 0?NTe:RTe:Po&&Po in Object(r)?MTe(r):wTe(r)}function MTe(r){let e=P6.call(r,Po),t=r[Po],o=!1;try{r[Po]=void 0,o=!0}catch{}let s=I6.call(r);return o&&(e?r[Po]=t:delete r[Po]),s}function wTe(r){return I6.call(r)}var ATe,RTe,NTe,CTe,N6,PTe,ITe,C6,P6,Po,I6,b6=p(()=>{ATe="[object Object]",RTe="[object Null]",NTe="[object Undefined]",CTe=Function.prototype,N6=CTe.toString,PTe=N6.call(Object),ITe=bTe(Object.getPrototypeOf,Object),C6=Object.prototype,P6=C6.hasOwnProperty,Po=Symbol?Symbol.toStringTag:void 0,I6=C6.toString});function x6(...r){let e=r.shift(),t=new WeakMap;for(;r.length>0;)e=M6(e,r.shift(),0,t);return e}function fR(r){return ZE(r)?r.slice():r}function M6(r,e,t=0,o){let s;if(!(t>DTe)){if(t++,QE(r)||QE(e)||w6(e))s=fR(e);else if(ZE(r)){if(s=r.slice(),ZE(e))for(let a=0,i=e.length;a"u"?delete s[l]:s[l]=c;else{let u=s[l],f=c;if(L6(r,l,o)||L6(e,l,o))delete s[l];else{if(Ou(u)&&Ou(f)){let _=o.get(u)||[],m=o.get(f)||[];_.push({obj:r,key:l}),m.push({obj:e,key:l}),o.set(u,_),o.set(f,m)}s[l]=M6(s[l],c,t,o)}}}}else s=e;return s}}function L6(r,e,t){let o=t.get(r[e])||[];for(let s=0,a=o.length;s"u"||r instanceof Date||r instanceof RegExp||r===null}function UTe(r,e){return!(!uR(r)||!uR(e))}var DTe,D6=p(()=>{b6();DTe=20});function U6(r,e){let t,o=new Promise(function(a,i){t=setTimeout(function(){i(new Au("Operation timed out."))},e)});return Promise.race([r,o]).then(s=>(clearTimeout(t),s),s=>{throw clearTimeout(t),s})}var Au,k6=p(()=>{Au=class r extends Error{constructor(e){super(e),Object.setPrototypeOf(this,r.prototype)}}});function pR(r,e){return typeof e=="string"?r===e:!!r.match(e)}function B6(r,e){if(!e)return!1;for(let t of e)if(pR(r,t))return!0;return!1}var V6=p(()=>{});function F6(r){return typeof r=="function"&&typeof r.__original=="function"&&typeof r.__unwrap=="function"&&r.__wrapped===!0}var G6=p(()=>{});var em,H6=p(()=>{em=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 tm,q6=p(()=>{H6();tm=class{constructor(e,t){this._callback=e,this._that=t,this._isCalled=!1,this._deferred=new em}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 j6(r,e){return new Promise(t=>{he.with(RE(he.active()),()=>{r.export(e,o=>{t(o)})})})}var Y6=p(()=>{P();_u()});var z6={};Ae(z6,{AlwaysOffSampler:()=>Co,AlwaysOnSampler:()=>hi,AnchoredClock:()=>LE,BindOnceFuture:()=>tm,CompositePropagator:()=>KE,DEFAULT_ATTRIBUTE_COUNT_LIMIT:()=>Tu,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>mu,DEFAULT_ENVIRONMENT:()=>Su,DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:()=>WA,DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:()=>JA,ExportResultCode:()=>zE,ParentBasedSampler:()=>WE,RPCType:()=>XE,RandomIdGenerator:()=>xa,SDK_INFO:()=>GE,TRACE_PARENT_HEADER:()=>vu,TRACE_STATE_HEADER:()=>yu,TimeoutError:()=>Au,TraceIdRatioBasedSampler:()=>JE,TraceState:()=>wa,TracesSamplerValues:()=>La,VERSION:()=>FE,W3CBaggagePropagator:()=>bE,W3CTraceContextPropagator:()=>$E,_globalThis:()=>UE,addHrTimes:()=>nR,baggageUtils:()=>kTe,callWithTimeout:()=>U6,deleteRPCMetadata:()=>v6,getEnv:()=>wE,getEnvWithoutDefaults:()=>DE,getRPCMetadata:()=>y6,getTimeOrigin:()=>jE,globalErrorHandler:()=>ME,hexToBase64:()=>BE,hexToBinary:()=>kE,hrTime:()=>rR,hrTimeDuration:()=>i6,hrTimeToMicroseconds:()=>l6,hrTimeToMilliseconds:()=>a6,hrTimeToNanoseconds:()=>s6,hrTimeToTimeStamp:()=>o6,internal:()=>BTe,isAttributeKey:()=>YA,isAttributeValue:()=>zA,isTimeInput:()=>c6,isTimeInputHrTime:()=>YE,isTracingSuppressed:()=>ba,isUrlIgnored:()=>B6,isWrapped:()=>F6,loggingErrorHandler:()=>xE,merge:()=>x6,millisToHrTime:()=>Ma,otperformance:()=>di,parseEnvironment:()=>gu,parseTraceParent:()=>sR,sanitizeAttributes:()=>G4,setGlobalErrorHandler:()=>Y4,setRPCMetadata:()=>g6,suppressTracing:()=>RE,timeInputToHrTime:()=>n6,unrefTimer:()=>HE,unsuppressTracing:()=>D4,urlMatches:()=>pR});var kTe,BTe,K6=p(()=>{V4();F4();q4();$A();KA();u6();ZA();f6();jA();tR();p6();S6();O6();lR();cR();A6();R6();_u();oR();QA();D6();XA();k6();V6();G6();q6();eR();Y6();kTe={getKeyPairs:IE,serializeKeyPairs:PE,parseKeyPairsIntoRecord:B4,parsePairKeyValue:Eu},BTe={_export:j6}});var Q6=T(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});rm.getOtlpGrpcConfigurationFromEnv=void 0;var $6=(K6(),ee(z6)),Ru=du(),VTe=(Js(),ee(C3)),FTe=V("fs"),GTe=V("path"),W6=(P(),ee(ot));function dR(r,e){if(r!=null&&r!=="")return r;if(e!=null&&e!=="")return e}function HTe(r){var e,t;let o=(e=process.env[`OTEL_EXPORTER_OTLP_${r}_HEADERS`])===null||e===void 0?void 0:e.trim(),s=(t=process.env.OTEL_EXPORTER_OTLP_HEADERS)===null||t===void 0?void 0:t.trim(),a=$6.baggageUtils.parseKeyPairsIntoRecord(o),i=$6.baggageUtils.parseKeyPairsIntoRecord(s);if(Object.keys(a).length===0&&Object.keys(i).length===0)return;let n=Object.assign({},i,a),l=(0,Ru.createEmptyMetadata)();for(let[c,u]of Object.entries(n))l.set(c,u);return l}function qTe(r){let e=HTe(r);if(e!=null)return()=>e}function jTe(r){var e,t;let o=(e=process.env[`OTEL_EXPORTER_OTLP_${r}_ENDPOINT`])===null||e===void 0?void 0:e.trim(),s=(t=process.env.OTEL_EXPORTER_OTLP_ENDPOINT)===null||t===void 0?void 0:t.trim();return dR(o,s)}function YTe(r){var e,t;let o=(e=process.env[`OTEL_EXPORTER_OTLP_${r}_INSECURE`])===null||e===void 0?void 0:e.toLowerCase().trim(),s=(t=process.env.OTEL_EXPORTER_OTLP_INSECURE)===null||t===void 0?void 0:t.toLowerCase().trim();return dR(o,s)==="true"}function hR(r,e,t){var o,s;let a=(o=process.env[r])===null||o===void 0?void 0:o.trim(),i=(s=process.env[e])===null||s===void 0?void 0:s.trim(),n=dR(a,i);if(n!=null)try{return FTe.readFileSync(GTe.resolve(process.cwd(),n))}catch{W6.diag.warn(t);return}else return}function zTe(r){return hR(`OTEL_EXPORTER_OTLP_${r}_CLIENT_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE","Failed to read client certificate chain file")}function KTe(r){return hR(`OTEL_EXPORTER_OTLP_${r}_CLIENT_KEY`,"OTEL_EXPORTER_OTLP_CLIENT_KEY","Failed to read client certificate private key file")}function X6(r){return hR(`OTEL_EXPORTER_OTLP_${r}_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CERTIFICATE","Failed to read root certificate file")}function J6(r){let e=KTe(r),t=zTe(r),o=X6(r),s=e!=null&&t!=null;return o!=null&&!s?(W6.diag.warn("Client key and certificate must both be provided, but one was missing - attempting to create credentials from just the root certificate"),(0,Ru.createSslCredentials)(X6(r))):(0,Ru.createSslCredentials)(o,e,t)}function $Te(r){return YTe(r)?(0,Ru.createInsecureCredentials)():J6(r)}function XTe(r){return Object.assign(Object.assign({},(0,VTe.getSharedConfigurationFromEnvironment)(r)),{metadata:qTe(r),url:jTe(r),credentials:e=>e.startsWith("http://")?()=>(0,Ru.createInsecureCredentials)():e.startsWith("https://")?()=>J6(r):()=>$Te(r)})}rm.getOtlpGrpcConfigurationFromEnv=XTe});var eY=T(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});nm.convertLegacyOtlpGrpcOptions=void 0;var WTe=(P(),ee(ot)),Z6=w4(),JTe=du(),QTe=Q6();function ZTe(r,e){r.headers&&WTe.diag.warn("Headers cannot be set when using grpc");let t=r.credentials;return(0,Z6.mergeOtlpGrpcConfigurationWithDefaults)({url:r.url,metadata:()=>{var o;return(o=r.metadata)!==null&&o!==void 0?o:(0,JTe.createEmptyMetadata)()},compression:r.compression,timeoutMillis:r.timeoutMillis,concurrencyLimit:r.concurrencyLimit,credentials:t!=null?()=>t:void 0},(0,QTe.getOtlpGrpcConfigurationFromEnv)(e),(0,Z6.getOtlpGrpcDefaultConfiguration)())}nm.convertLegacyOtlpGrpcOptions=ZTe});var tY=T(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});im.createOtlpGrpcExportDelegate=void 0;var eSe=(_n(),ee(hc)),tSe=du();function rSe(r,e,t,o){return(0,eSe.createOtlpNetworkExportDelegate)(r,e,(0,tSe.createOtlpGrpcExporterTransport)({address:r.url,compression:r.compression,credentials:r.credentials,metadata:r.metadata,grpcName:t,grpcPath:o}))}im.createOtlpGrpcExportDelegate=rSe});var _R=T(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.createOtlpGrpcExportDelegate=Da.convertLegacyOtlpGrpcOptions=void 0;var nSe=eY();Object.defineProperty(Da,"convertLegacyOtlpGrpcOptions",{enumerable:!0,get:function(){return nSe.convertLegacyOtlpGrpcOptions}});var iSe=tY();Object.defineProperty(Da,"createOtlpGrpcExportDelegate",{enumerable:!0,get:function(){return iSe.createOtlpGrpcExportDelegate}})});var nY=T(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});om.OTLPLogExporter=void 0;var rY=_R(),oSe=(to(),ee(av)),sSe=(_n(),ee(hc)),ER=class extends sSe.OTLPExporterBase{constructor(e={}){super((0,rY.createOtlpGrpcExportDelegate)((0,rY.convertLegacyOtlpGrpcOptions)(e,"LOGS"),oSe.ProtobufLogsSerializer,"LogsExportService","/opentelemetry.proto.collector.logs.v1.LogsService/Export"))}};om.OTLPLogExporter=ER});var iY=T(Io=>{"use strict";var aSe=Io&&Io.__createBinding||(Object.create?(function(r,e,t,o){o===void 0&&(o=t),Object.defineProperty(r,o,{enumerable:!0,get:function(){return e[t]}})}):(function(r,e,t,o){o===void 0&&(o=t),r[o]=e[t]})),lSe=Io&&Io.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&aSe(e,r,t)};Object.defineProperty(Io,"__esModule",{value:!0});lSe(nY(),Io)});var oY,sY=p(()=>{oY="0.56.0"});var Ua,aY=p(()=>{_n();to();Js();sY();Ua=class extends Br{constructor(e={}){super(Hr(qr(e,"LOGS","v1/logs",{"User-Agent":`OTel-OTLP-Exporter-JavaScript/${oY}`,"Content-Type":"application/x-protobuf"}),Ah))}}});var lY=p(()=>{aY()});var cY=p(()=>{lY()});var uY={};Ae(uY,{OTLPLogExporter:()=>Ua});var fY=p(()=>{cY()});var pY,dY=p(()=>{pY="0.56.0"});var ka,hY=p(()=>{_n();to();dY();Js();ka=class extends Br{constructor(e={}){super(Hr(qr(e,"TRACES","v1/traces",{"User-Agent":`OTel-OTLP-Exporter-JavaScript/${pY}`,"Content-Type":"application/x-protobuf"}),Rh))}}});var _Y=p(()=>{hY()});var EY=p(()=>{_Y()});var mY={};Ae(mY,{OTLPTraceExporter:()=>ka});var TY=p(()=>{EY()});var SY,gY=p(()=>{SY="0.56.0"});var mR,vY=p(()=>{_n();gY();to();Js();mR=class extends Br{constructor(e={}){super(Hr(qr(e,"TRACES","v1/traces",{"User-Agent":`OTel-OTLP-Exporter-JavaScript/${SY}`,"Content-Type":"application/json"}),Nh))}}});var yY=p(()=>{vY()});var OY=p(()=>{yY()});var AY={};Ae(AY,{OTLPTraceExporter:()=>mR});var RY=p(()=>{OY()});var CY=T(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});sm.OTLPTraceExporter=void 0;var NY=_R(),cSe=(to(),ee(av)),uSe=(_n(),ee(hc)),TR=class extends uSe.OTLPExporterBase{constructor(e={}){super((0,NY.createOtlpGrpcExportDelegate)((0,NY.convertLegacyOtlpGrpcOptions)(e,"TRACES"),cSe.ProtobufTraceSerializer,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export"))}};sm.OTLPTraceExporter=TR});var PY=T(bo=>{"use strict";var fSe=bo&&bo.__createBinding||(Object.create?(function(r,e,t,o){o===void 0&&(o=t),Object.defineProperty(r,o,{enumerable:!0,get:function(){return e[t]}})}):(function(r,e,t,o){o===void 0&&(o=t),r[o]=e[t]})),pSe=bo&&bo.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&fSe(e,r,t)};Object.defineProperty(bo,"__esModule",{value:!0});pSe(CY(),bo)});var am,IY=p(()=>{(function(r){r.AlwaysOff="always_off",r.AlwaysOn="always_on",r.ParentBasedAlwaysOff="parentbased_always_off",r.ParentBasedAlwaysOn="parentbased_always_on",r.ParentBasedTraceIdRatio="parentbased_traceidratio",r.TraceIdRatio="traceidratio"})(am||(am={}))});function _Se(r){return hSe.indexOf(r)>-1}function mSe(r){return ESe.indexOf(r)>-1}function SSe(r){return TSe.indexOf(r)>-1}function ySe(r,e,t){if(typeof t[r]>"u")return;let o=String(t[r]);e[r]=o.toLowerCase()==="true"}function OSe(r,e,t,o=-1/0,s=1/0){if(typeof t[r]<"u"){let a=Number(t[r]);isNaN(a)||(as?e[r]=s:e[r]=a)}}function ASe(r,e,t,o=dSe){let s=t[r];typeof s=="string"&&(e[r]=s.split(o).map(a=>a.trim()))}function NSe(r,e,t){let o=t[r];if(typeof o=="string"){let s=RSe[o.toUpperCase()];s!=null&&(e[r]=s)}}function bY(r){let e={};for(let t in vR){let o=t;switch(o){case"OTEL_LOG_LEVEL":NSe(o,e,r);break;default:if(_Se(o))ySe(o,e,r);else if(mSe(o))OSe(o,e,r);else if(SSe(o))ASe(o,e,r);else{let s=r[o];typeof s<"u"&&s!==null&&(e[o]=String(s))}}}return e}var dSe,hSe,ESe,TSe,SR,gR,gSe,vSe,vR,RSe,LY=p(()=>{P();IY();dSe=",",hSe=["OTEL_SDK_DISABLED"];ESe=["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"];TSe=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];SR=1/0,gR=128,gSe=128,vSe=128,vR={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:H.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:SR,OTEL_ATTRIBUTE_COUNT_LIMIT:gR,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:SR,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:gR,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:SR,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:gR,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:gSe,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:vSe,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:am.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};RSe={ALL:H.ALL,VERBOSE:H.VERBOSE,DEBUG:H.DEBUG,INFO:H.INFO,WARN:H.WARN,ERROR:H.ERROR,NONE:H.NONE}});function Nu(){let r=bY(process.env);return Object.assign({},vR,r)}var xY=p(()=>{LY()});var wY=p(()=>{xY()});var DY=p(()=>{wY()});function Cu(r){return r[0]*1e6+r[1]/1e3}var MSe,wSe,yqe,Oqe,UY=p(()=>{MSe=9,wSe=6,yqe=Math.pow(10,wSe),Oqe=Math.pow(10,MSe)});var sn,kY=p(()=>{(function(r){r[r.SUCCESS=0]="SUCCESS",r[r.FAILED=1]="FAILED"})(sn||(sn={}))});var lm=p(()=>{UY();kY();DY()});import*as DSe from"http";import*as USe from"https";import*as BY from"url";function Lo(r,e){let t=BY.parse(r),o=Object.assign({method:"POST",headers:Object.assign({"Content-Type":"application/json"},e)},t);return function(a,i){if(a.length===0)return S.debug("Zipkin send with empty spans"),i({code:sn.SUCCESS});let{request:n}=o.protocol==="http:"?DSe:USe,l=n(o,u=>{let f="";u.on("data",_=>{f+=_}),u.on("end",()=>{let _=u.statusCode||0;return S.debug(`Zipkin response status code: ${_}, body: ${f}`),_<400?i({code:sn.SUCCESS}):i({code:sn.FAILED,error:new Error(`Got unexpected status code from zipkin: ${_}`)})})});l.on("error",u=>i({code:sn.FAILED,error:u}));let c=JSON.stringify(a);S.debug(`Zipkin request payload: ${c}`),l.write(c,"utf8"),l.end()}}var VY=p(()=>{P();lm()});var FY=p(()=>{VY()});var yR=p(()=>{FY()});var xo,GY=p(()=>{(function(r){r.CLIENT="CLIENT",r.SERVER="SERVER",r.CONSUMER="CONSUMER",r.PRODUCER="PRODUCER"})(xo||(xo={}))});function jY(r,e,t,o){return{traceId:r.spanContext().traceId,parentId:r.parentSpanId,name:r.name,id:r.spanContext().spanId,kind:BSe[r.kind],timestamp:Cu(r.startTime),duration:Math.round(Cu(r.duration)),localEndpoint:{serviceName:e},tags:VSe(r,t,o),annotations:r.events.length?FSe(r.events):void 0}}function VSe({attributes:r,resource:e,status:t,droppedAttributesCount:o,droppedEventsCount:s,droppedLinksCount:a},i,n){let l={};for(let c of Object.keys(r))l[c]=String(r[c]);return t.code!==jt.UNSET&&(l[i]=String(jt[t.code])),t.code===jt.ERROR&&t.message&&(l[n]=t.message),o&&(l["otel.dropped_attributes_count"]=String(o)),s&&(l["otel.dropped_events_count"]=String(s)),a&&(l["otel.dropped_links_count"]=String(a)),Object.keys(e.attributes).forEach(c=>l[c]=String(e.attributes[c])),l}function FSe(r){return r.map(e=>({timestamp:Math.round(Cu(e.time)),value:e.name}))}var BSe,HY,qY,YY=p(()=>{P();lm();GY();BSe={[qt.CLIENT]:xo.CLIENT,[qt.SERVER]:xo.SERVER,[qt.CONSUMER]:xo.CONSUMER,[qt.PRODUCER]:xo.PRODUCER,[qt.INTERNAL]:void 0},HY="otel.status_code",qY="error"});function zY(r){return function(){return r()}}var KY=p(()=>{});var cm,$Y=p(()=>{P();lm();yR();YY();Ve();KY();cm=class{constructor(e={}){this.DEFAULT_SERVICE_NAME="OpenTelemetry Service",this._sendingPromises=[],this._urlStr=e.url||Nu().OTEL_EXPORTER_ZIPKIN_ENDPOINT,this._send=Lo(this._urlStr,e.headers),this._serviceName=e.serviceName,this._statusCodeTagName=e.statusCodeTagName||HY,this._statusDescriptionTagName=e.statusDescriptionTagName||qY,this._isShutdown=!1,typeof e.getExportRequestHeaders=="function"?this._getHeaders=zY(e.getExportRequestHeaders):this._beforeSend=function(){}}export(e,t){let o=String(this._serviceName||e[0].resource.attributes[at]||this.DEFAULT_SERVICE_NAME);if(S.debug("Zipkin exporter export"),this._isShutdown){setTimeout(()=>t({code:sn.FAILED,error:new Error("Exporter has been shutdown")}));return}let s=new Promise(i=>{this._sendSpans(e,o,n=>{i(),t(n)})});this._sendingPromises.push(s);let a=()=>{let i=this._sendingPromises.indexOf(s);this._sendingPromises.splice(i,1)};s.then(a,a)}shutdown(){return S.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=Lo(this._urlStr,this._getHeaders()))}_sendSpans(e,t,o){let s=e.map(a=>jY(a,String(a.attributes[at]||a.resource.attributes[at]||t),this._statusCodeTagName,this._statusDescriptionTagName));return this._beforeSend(),this._send(s,a=>{if(o)return o(a)})}}});var XY={};Ae(XY,{ZipkinExporter:()=>cm,prepareSend:()=>Lo});var WY=p(()=>{yR();$Y()});var ez=T(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.getSpanProcessorsFromEnv=an.getOtlpProtocolFromEnv=an.filterBlanksAndNulls=an.getResourceDetectorsFromEnv=void 0;var Mo=(P(),ee(ot)),fm=(xr(),ee(Pf)),JY=(TY(),ee(mY)),GSe=(RY(),ee(AY)),HSe=PY(),qSe=(WY(),ee(XY)),Pu=(Fd(),ee(Vd)),um=(Gi(),ee(xs)),jSe="env",YSe="host",zSe="os",KSe="process",$Se="serviceinstance";function XSe(){var r,e;let t=new Map([[jSe,Pu.envDetectorSync],[YSe,Pu.hostDetectorSync],[zSe,Pu.osDetectorSync],[$Se,Pu.serviceInstanceIdDetectorSync],[KSe,Pu.processDetectorSync]]),o=(e=(r=process.env.OTEL_NODE_RESOURCE_DETECTORS)===null||r===void 0?void 0:r.split(","))!==null&&e!==void 0?e:["all"];return o.includes("all")?[...t.values()].flat():o.includes("none")?[]:o.flatMap(s=>{let a=t.get(s);return a||Mo.diag.warn(`Invalid resource detector "${s}" specified in the environment variable OTEL_NODE_RESOURCE_DETECTORS`),a||[]})}an.getResourceDetectorsFromEnv=XSe;function QY(r){return r.map(e=>e.trim()).filter(e=>e!=="null"&&e!=="")}an.filterBlanksAndNulls=QY;function ZY(){var r,e,t;let o=(0,fm.getEnvWithoutDefaults)();return(t=(e=(r=o.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL)!==null&&r!==void 0?r:o.OTEL_EXPORTER_OTLP_PROTOCOL)!==null&&e!==void 0?e:(0,fm.getEnv)().OTEL_EXPORTER_OTLP_TRACES_PROTOCOL)!==null&&t!==void 0?t:(0,fm.getEnv)().OTEL_EXPORTER_OTLP_PROTOCOL}an.getOtlpProtocolFromEnv=ZY;function WSe(){let r=ZY();switch(r){case"grpc":return new HSe.OTLPTraceExporter;case"http/json":return new GSe.OTLPTraceExporter;case"http/protobuf":return new JY.OTLPTraceExporter;default:return Mo.diag.warn(`Unsupported OTLP traces protocol: ${r}. Using http/protobuf.`),new JY.OTLPTraceExporter}}function JSe(){try{let{JaegerExporter:r}=V("@opentelemetry/exporter-jaeger");return new r}catch(r){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: ${r}`)}}function QSe(){var r;let e=new Map([["otlp",()=>WSe()],["zipkin",()=>new qSe.ZipkinExporter],["console",()=>new um.ConsoleSpanExporter],["jaeger",()=>JSe()]]),t=[],o=[],s=QY(Array.from(new Set((0,fm.getEnv)().OTEL_TRACES_EXPORTER.split(","))));if(s[0]==="none")return Mo.diag.warn('OTEL_TRACES_EXPORTER contains "none". SDK will not be initialized.'),[];s.length===0?(Mo.diag.warn("OTEL_TRACES_EXPORTER is empty. Using default otlp exporter."),s=["otlp"]):s.length>1&&s.includes("none")&&(Mo.diag.warn('OTEL_TRACES_EXPORTER contains "none" along with other exporters. Using default otlp exporter.'),s=["otlp"]);for(let a of s){let i=(r=e.get(a))===null||r===void 0?void 0:r();i?t.push(i):Mo.diag.warn(`Unrecognized OTEL_TRACES_EXPORTER value: ${a}.`)}for(let a of t)a instanceof um.ConsoleSpanExporter?o.push(new um.SimpleSpanProcessor(a)):o.push(new um.BatchSpanProcessor(a));return t.length===0&&Mo.diag.warn("Unable to set up trace exporter(s) due to invalid exporter and/or protocol values."),o}an.getSpanProcessorsFromEnv=QSe});var rz=T(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});pm.NodeSDK=void 0;var ln=(P(),ee(ot)),ZSe=(El(),ee(Uw)),ege=(MF(),ee(xF)),Ba=(Fd(),ee(Vd)),Iu=(UT(),ee(DT)),tge=(x3(),ee(L3)),rge=iY(),OR=(fY(),ee(uY)),nge=(Gp(),ee(eS)),ige=(Gi(),ee(xs)),oge=zS(),sge=(Ve(),ee(Qx)),tz=(xr(),ee(Pf)),AR=ez(),RR=class{constructor(e={}){var t,o,s,a,i,n,l;let c=(0,tz.getEnv)(),u=(0,tz.getEnvWithoutDefaults)();if(c.OTEL_SDK_DISABLED&&(this._disabled=!0),u.OTEL_LOG_LEVEL&&ln.diag.setLogger(new ln.DiagConsoleLogger,{logLevel:u.OTEL_LOG_LEVEL}),this._configuration=e,this._resource=(t=e.resource)!==null&&t!==void 0?t:new Ba.Resource({}),this._mergeResourceWithDefaults=(o=e.mergeResourceWithDefaults)!==null&&o!==void 0?o:!0,this._autoDetectResources=(s=e.autoDetectResources)!==null&&s!==void 0?s:!0,this._autoDetectResources?e.resourceDetectors!=null?this._resourceDetectors=e.resourceDetectors:process.env.OTEL_NODE_RESOURCE_DETECTORS!=null?this._resourceDetectors=(0,AR.getResourceDetectorsFromEnv)():this._resourceDetectors=[Ba.envDetector,Ba.processDetector,Ba.hostDetector]:this._resourceDetectors=[],this._serviceName=e.serviceName,e.traceExporter||e.spanProcessor||e.spanProcessors){let f={};e.sampler&&(f.sampler=e.sampler),e.spanLimits&&(f.spanLimits=e.spanLimits),e.idGenerator&&(f.idGenerator=e.idGenerator),e.spanProcessor&&ln.diag.warn("The 'spanProcessor' option is deprecated. Please use 'spanProcessors' instead.");let _=(a=e.spanProcessor)!==null&&a!==void 0?a:new ige.BatchSpanProcessor(e.traceExporter),m=(i=e.spanProcessors)!==null&&i!==void 0?i:[_];this._tracerProviderConfig={tracerConfig:f,spanProcessors:m,contextManager:e.contextManager,textMapPropagator:e.textMapPropagator}}if(e.logRecordProcessors?this._loggerProviderConfig={logRecordProcessors:e.logRecordProcessors}:e.logRecordProcessor?(this._loggerProviderConfig={logRecordProcessors:[e.logRecordProcessor]},ln.diag.warn("The 'logRecordProcessor' option is deprecated. Please use 'logRecordProcessors' instead.")):this.configureLoggerProviderFromEnv(),e.metricReader||e.views){let f={};e.metricReader&&(f.reader=e.metricReader),e.views&&(f.views=e.views),this._meterProviderConfig=f}this._instrumentations=(l=(n=e.instrumentations)===null||n===void 0?void 0:n.flat())!==null&&l!==void 0?l:[]}start(){var e,t,o,s,a,i;if(this._disabled)return;if((0,ege.registerInstrumentations)({instrumentations:this._instrumentations}),this._autoDetectResources){let l={detectors:this._resourceDetectors};this._resource=this._resource.merge((0,Ba.detectResourcesSync)(l))}this._resource=this._serviceName===void 0?this._resource:this._resource.merge(new Ba.Resource({[sge.SEMRESATTRS_SERVICE_NAME]:this._serviceName}));let n=this._tracerProviderConfig?this._tracerProviderConfig.spanProcessors:(0,AR.getSpanProcessorsFromEnv)();if(this._tracerProvider=new oge.NodeTracerProvider(Object.assign(Object.assign({},this._configuration),{resource:this._resource,mergeResourceWithDefaults:this._mergeResourceWithDefaults,spanProcessors:n})),n.length>0&&this._tracerProvider.register({contextManager:(t=(e=this._tracerProviderConfig)===null||e===void 0?void 0:e.contextManager)!==null&&t!==void 0?t:(o=this._configuration)===null||o===void 0?void 0:o.contextManager,propagator:(s=this._tracerProviderConfig)===null||s===void 0?void 0:s.textMapPropagator}),this._loggerProviderConfig){let l=new Iu.LoggerProvider({resource:this._resource,mergeResourceWithDefaults:this._mergeResourceWithDefaults});for(let c of this._loggerProviderConfig.logRecordProcessors)l.addLogRecordProcessor(c);this._loggerProvider=l,ZSe.logs.setGlobalLoggerProvider(l)}if(this._meterProviderConfig){let l=[];this._meterProviderConfig.reader&&l.push(this._meterProviderConfig.reader);let c=new nge.MeterProvider({resource:this._resource,views:(i=(a=this._meterProviderConfig)===null||a===void 0?void 0:a.views)!==null&&i!==void 0?i:[],readers:l,mergeResourceWithDefaults:this._mergeResourceWithDefaults});this._meterProvider=c,ln.metrics.setGlobalMeterProvider(c);for(let u of this._instrumentations)u.setMeterProvider(ln.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:"",o=(0,AR.filterBlanksAndNulls)(t.split(","));if(o.length===0&&(ln.diag.info("OTEL_LOGS_EXPORTER is empty. Using default otlp exporter."),o.push("otlp")),o.includes("none")){ln.diag.info('OTEL_LOGS_EXPORTER contains "none". Logger provider will not be initialized.');return}let s=[];o.forEach(a=>{var i,n;if(a==="otlp"){let l=(n=(i=process.env.OTEL_EXPORTER_OTLP_LOGS_PROTOCOL)!==null&&i!==void 0?i:process.env.OTEL_EXPORTER_OTLP_PROTOCOL)===null||n===void 0?void 0:n.trim();switch(l){case"grpc":s.push(new rge.OTLPLogExporter);break;case"http/json":s.push(new tge.OTLPLogExporter);break;case"http/protobuf":s.push(new OR.OTLPLogExporter);break;case void 0:case"":s.push(new OR.OTLPLogExporter);break;default:ln.diag.warn(`Unsupported OTLP logs protocol: "${l}". Using http/protobuf.`),s.push(new OR.OTLPLogExporter)}}else a==="console"?s.push(new Iu.ConsoleLogRecordExporter):ln.diag.warn(`Unsupported OTEL_LOGS_EXPORTER value: "${a}". Supported values are: otlp, console, none.`)}),s.length>0&&(this._loggerProviderConfig={logRecordProcessors:s.map(a=>a instanceof Iu.ConsoleLogRecordExporter?new Iu.SimpleLogRecordProcessor(a):new Iu.BatchLogRecordProcessor(a))})}};pm.NodeSDK=RR});var nz=T(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.NodeSDK=Xe.tracing=Xe.resources=Xe.node=Xe.metrics=Xe.logs=Xe.core=Xe.contextBase=Xe.api=void 0;Xe.api=(P(),ee(ot));Xe.contextBase=(P(),ee(ot));Xe.core=(xr(),ee(Pf));Xe.logs=(UT(),ee(DT));Xe.metrics=(Gp(),ee(eS));Xe.node=zS();Xe.resources=(Fd(),ee(Vd));Xe.tracing=(Gi(),ee(xs));var age=rz();Object.defineProperty(Xe,"NodeSDK",{enumerable:!0,get:function(){return age.NodeSDK}})});import{env as bu,version as lge}from"process";P();var vi=typeof globalThis=="object"?globalThis:global;function LN(r){return r>=48&&r<=57?r-48:r>=97&&r<=102?r-87:r-55}function $a(r){let e=new Uint8Array(r.length/2),t=0;for(let o=0;o{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}};var Qa=class{constructor(e,t){this._callback=e,this._that=t,this._isCalled=!1,this._deferred=new Ku}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 eM(r){let e=BigInt(1e9);return BigInt(r[0])*e+BigInt(r[1])}function tZ(r){let e=Number(BigInt.asUintN(32,r)),t=Number(BigInt.asUintN(32,r>>BigInt(32)));return{low:e,high:t}}function tM(r){let e=eM(r);return tZ(e)}function rZ(r){return eM(r).toString()}var nZ=typeof BigInt<"u"?rZ:Xm;function Zx(r){return r}function rM(r){if(r!==void 0)return $a(r)}var iZ={encodeHrTime:tM,encodeSpanContext:$a,encodeOptionalSpanContext:rM};function nM(r){var e,t;if(r===void 0)return iZ;let o=(e=r.useLongBits)!==null&&e!==void 0?e:!0,s=(t=r.useHex)!==null&&t!==void 0?t:!1;return{encodeHrTime:o?tM:nZ,encodeSpanContext:s?Zx:$a,encodeOptionalSpanContext:s?Zx:rM}}function iM(r){return{attributes:Za(r.attributes),droppedAttributesCount:0}}function oM(r){return{name:r.name,version:r.version}}function Za(r){return Object.keys(r).map(e=>sM(e,r[e]))}function sM(r,e){return{key:r,value:aM(e)}}function aM(r){let e=typeof r;return e==="string"?{stringValue:r}:e==="number"?Number.isInteger(r)?{intValue:r}:{doubleValue:r}:e==="boolean"?{boolValue:r}:r instanceof Uint8Array?{bytesValue:r}:Array.isArray(r)?{arrayValue:{values:r.map(aM)}}:e==="object"&&r!=null?{kvlistValue:{values:Object.entries(r).map(([t,o])=>sM(t,o))}}:{}}P();Ve();function $u(){return`unknown_service:${process.argv0}`}var Oi=class r{constructor(e,t){var o;this._attributes=e,this.asyncAttributesPending=t!=null,this._syncAttributes=(o=this._attributes)!==null&&o!==void 0?o:{},this._asyncAttributesPromise=t==null?void 0:t.then(s=>(this._attributes=Object.assign({},this._attributes,s),this.asyncAttributesPending=!1,s),s=>(S.debug("a resource's async attributes promise rejected: %s",s),this.asyncAttributesPending=!1,{}))}static empty(){return r.EMPTY}static default(){return new r({[at]:$u(),[ge]:yi[ge],[Se]:yi[Se],[ve]:yi[ve]})}get attributes(){var e;return this.asyncAttributesPending&&S.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 o=Object.assign(Object.assign({},this._syncAttributes),(t=e._syncAttributes)!==null&&t!==void 0?t:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new r(o);let s=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(([a,i])=>{var n;return Object.assign(Object.assign(Object.assign(Object.assign({},this._syncAttributes),a),(n=e._syncAttributes)!==null&&n!==void 0?n:e.attributes),i)});return new r(o,s)}};Oi.EMPTY=new Oi({});function oZ(r,e){var t;let o=r.spanContext(),s=r.status;return{traceId:e.encodeSpanContext(o.traceId),spanId:e.encodeSpanContext(o.spanId),parentSpanId:e.encodeOptionalSpanContext(r.parentSpanId),traceState:(t=o.traceState)===null||t===void 0?void 0:t.serialize(),name:r.name,kind:r.kind==null?0:r.kind+1,startTimeUnixNano:e.encodeHrTime(r.startTime),endTimeUnixNano:e.encodeHrTime(r.endTime),attributes:Za(r.attributes),droppedAttributesCount:r.droppedAttributesCount,events:r.events.map(a=>aZ(a,e)),droppedEventsCount:r.droppedEventsCount,status:{code:s.code,message:s.message},links:r.links.map(a=>sZ(a,e)),droppedLinksCount:r.droppedLinksCount}}function sZ(r,e){var t;return{attributes:r.attributes?Za(r.attributes):[],spanId:e.encodeSpanContext(r.context.spanId),traceId:e.encodeSpanContext(r.context.traceId),traceState:(t=r.context.traceState)===null||t===void 0?void 0:t.serialize(),droppedAttributesCount:r.droppedAttributesCount||0}}function aZ(r,e){return{attributes:r.attributes?Za(r.attributes):[],name:r.name,timeUnixNano:e.encodeHrTime(r.time),droppedAttributesCount:r.droppedAttributesCount||0}}function lM(r,e){let t=nM(e);return{resourceSpans:cZ(r,t)}}function lZ(r){let e=new Map;for(let t of r){let o=e.get(t.resource);o||(o=new Map,e.set(t.resource,o));let s=`${t.instrumentationLibrary.name}@${t.instrumentationLibrary.version||""}:${t.instrumentationLibrary.schemaUrl||""}`,a=o.get(s);a||(a=[],o.set(s,a)),a.push(t)}return e}function cZ(r,e){let t=lZ(r),o=[],s=t.entries(),a=s.next();for(;!a.done;){let[i,n]=a.value,l=[],c=n.values(),u=c.next();for(;!u.done;){let _=u.value;if(_.length>0){let m=_.map(O=>oZ(O,e));l.push({scope:oM(_[0].instrumentationLibrary),spans:m,schemaUrl:_[0].instrumentationLibrary.schemaUrl})}u=c.next()}let f={resource:iM(i),scopeSpans:l,schemaUrl:void 0};o.push(f),a=s.next()}return o}var Xu={serializeRequest:r=>{let e=lM(r,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:r=>{let e=new TextDecoder;return JSON.parse(e.decode(r))}};var uM=r=>{throw TypeError(r)},Jm=(r,e,t)=>e.has(r)||uM("Cannot "+t),el=(r,e,t)=>(Jm(r,e,"read from private field"),t?t.call(r):e.get(r)),Wu=(r,e,t)=>e.has(r)?uM("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),cM=(r,e,t,o)=>(Jm(r,e,"write to private field"),o?o.call(r,t):e.set(r,t),t),uZ=(r,e,t)=>(Jm(r,e,"access private method"),t),fZ="__nfOTLPTrace",tl,rl,Qm,Wm,fM,pM=class dM{constructor(){Wu(this,Wm),Wu(this,tl),Wu(this,rl),cM(this,tl,new Qa(uZ(this,Wm,fM),this)),cM(this,rl,S.createComponentLogger({namespace:"netlify-span-exporter"}))}export(e,t){if(el(this,rl).debug(`export ${e.length.toString()} spans`),el(this,tl).isCalled){t({code:Bo.FAILED,error:new Error("Exporter has been shutdown")});return}console.log(fZ,el(dM,Qm).decode(Xu.serializeRequest(e))),t({code:Bo.SUCCESS})}shutdown(){return el(this,tl).call()}};tl=new WeakMap;rl=new WeakMap;Qm=new WeakMap;Wm=new WeakSet;fM=function(){return el(this,rl).debug("Shutting down"),Promise.resolve()};Wu(pM,Qm,new TextDecoder);var hM=pM;P();var pZ=function(r,e){e.recordException(r),e.setStatus({code:jt.ERROR})};var Ju=(function(){function r(e){this._tracer=e,this.startSpan=e.startSpan.bind(this._tracer),this.startActiveSpan=e.startActiveSpan.bind(this._tracer)}return r.prototype.withActiveSpan=function(e,t,o,s){var a=_M(t,o,s),i=a.opts,n=a.ctx,l=a.fn;return this._tracer.startActiveSpan(e,i,n,function(c){return EM(c,i,l)})},r.prototype.withSpan=function(e,t,o,s){var a=_M(t,o,s),i=a.opts,n=a.ctx,l=a.fn,c=this._tracer.startSpan(e,i,n);return EM(c,i,l)},r})();function _M(r,e,t){var o,s,a;return!e&&!t?a=r:t?(o=r,s=e,a=t):(o=r,a=e),o=o??{},s=s??he.active(),{opts:o,ctx:s,fn:a}}function EM(r,e,t){var o,s=(o=e.onException)!==null&&o!==void 0?o:pZ,a=function(n){throw s(n,r),r.end(),n};try{var i=t(r);return typeof(i==null?void 0:i.then)=="function"?i.then(function(n){return r.end(),n},a):(r.end(),i)}catch(n){throw a(n)}}var mM=class{constructor(r={}){this.instrumentationName="@netlify/otel/instrumentation-fetch",this.instrumentationVersion="1.0.0",this.originalFetch=null,this.config=r}getConfig(){return this.config}setConfig(){}setMeterProvider(){}setTracerProvider(r){this.provider=r}getTracerProvider(){return this.provider}annotateFromRequest(r,e){var s,a;let t=((a=(s=this.config).getRequestAttributes)==null?void 0:a.call(s,e))??{},o=new URL(e.url);r.setAttributes({...t,"http.request.method":e.method,"url.full":o.href,"url.host":o.host,"url.scheme":o.protocol.slice(0,-1),"server.address":o.hostname,"server.port":o.port,...this.prepareHeaders("request",e.headers)})}annotateFromResponse(r,e){var o,s;let t=((s=(o=this.config).getResponseAttributes)==null?void 0:s.call(o,e))??{};r.setAttributes({...t,"http.response.status_code":e.status,...this.prepareHeaders("response",e.headers)})}prepareHeaders(r,e){if(this.config.skipHeaders===!0)return{};let t=["*","/.*/"],o=this.config.skipHeaders??[],s=this.config.redactHeaders??[],a=o.some(l=>t.includes(l.toString())),i={};if(a)return i;let n=e.entries();for(let[l,c]of n){if(o.some(f=>typeof f=="string"?f==l:f.test(l)))continue;let u=`http.${r}.header.${l}`;s===!0||s.some(f=>typeof f=="string"?f==l:f.test(l))?i[u]="REDACTED":i[u]=c}return i}getTracer(){if(!this.provider)return;let r=this.provider.getTracer(this.instrumentationName,this.instrumentationVersion);return r instanceof Ju?r:new Ju(r)}enable(){let r=vi.fetch;this.originalFetch=r,vi.fetch=async(e,t)=>{var a;let o=typeof e=="string"?e:e instanceof URL?e.href:e.url,s=this.getTracer();return!s||(a=this.config.skipURLs)!=null&&a.some(i=>typeof i=="string"?o.startsWith(i):i.test(o))?await r(e,t):s.withActiveSpan("fetch",async i=>{let n=new Request(e,t);this.annotateFromRequest(i,n);let l=await r(n,t);return this.annotateFromResponse(i,l),l})}}disable(){this.originalFetch&&(vi.fetch=this.originalFetch,this.originalFetch=null)}};P();var oz=Nn(nz(),1);bu.NETLIFY_DEBUG_OPENTELEMETRY&&S.setLogger(new Du,{logLevel:H.ALL,suppressOverrideMessage:!0});var iz,cge=new Oi({"service.name":SERVICE_NAME??"lambda-function","service.version":SERVICE_VERSION,"process.runtime.name":"nodejs","process.runtime.version":lge.slice(1),"deployment.environment":(iz=bu.URL)!=null&&iz.includes("netlifystg.com")?"staging":"production","http.url":bu.URL,"netlify.site.id":bu.SITE_ID,"netlify.site.name":bu.SITE_NAME}),uge=new oz.default.NodeSDK({resource:cge,traceExporter:new hM,instrumentations:[new mM({skipHeaders:!0})]});uge.start(); /*! Bundled license information: @grpc/proto-loader/build/src/util.js: @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. * *) 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 *) */