@iflow-ai/iflow-cli 0.4.0-beta.1 → 0.4.0-beta.20251203165712
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/entry.js +136 -0
- package/bundle/iflow-cli-vscode-ide-companion-0.2.9.vsix +0 -0
- package/bundle/iflow.js +10 -10
- package/package.json +2 -3
- package/bundle/entry.cjs +0 -134
package/bundle/entry.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url); globalThis.__filename = require('url').fileURLToPath(import.meta.url); globalThis.__dirname = require('path').dirname(globalThis.__filename);
|
|
3
|
+
var WZ=Object.create;var $d=Object.defineProperty;var KZ=Object.getOwnPropertyDescriptor;var XZ=Object.getOwnPropertyNames;var JZ=Object.getPrototypeOf,QZ=Object.prototype.hasOwnProperty;var b=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var k=(t,e)=>()=>(t&&(e=t(t=0)),e);var p=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Yd=(t,e)=>{for(var r in e)$d(t,r,{get:e[r],enumerable:!0})},Ow=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of XZ(e))!QZ.call(t,s)&&s!==r&&$d(t,s,{get:()=>e[s],enumerable:!(o=KZ(e,s))||o.enumerable});return t};var he=(t,e,r)=>(r=t!=null?WZ(JZ(t)):{},Ow(e||!t||!t.__esModule?$d(r,"default",{value:t,enumerable:!0}):r,t)),y=t=>Ow($d({},"__esModule",{value:!0}),t);var rL=p((UHe,tL)=>{tL.exports=eL;eL.sync=Zee;var Qw=b("fs");function Qee(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var o=0;o<r.length;o++){var s=r[o].toLowerCase();if(s&&t.substr(-s.length).toLowerCase()===s)return!0}return!1}function Zw(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:Qee(e,r)}function eL(t,e,r){Qw.stat(t,function(o,s){r(o,o?!1:Zw(s,t,e))})}function Zee(t,e){return Zw(Qw.statSync(t),t,e)}});var aL=p((kHe,sL)=>{sL.exports=iL;iL.sync=ete;var nL=b("fs");function iL(t,e,r){nL.stat(t,function(o,s){r(o,o?!1:oL(s,e))})}function ete(t,e){return oL(nL.statSync(t),e)}function oL(t,e){return t.isFile()&&tte(t,e)}function tte(t,e){var r=t.mode,o=t.uid,s=t.gid,a=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),i=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),n=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),l=n|c,d=r&u||r&c&&s===i||r&n&&o===a||r&l&&a===0;return d}});var uL=p((FHe,cL)=>{var BHe=b("fs"),sp;process.platform==="win32"||global.TESTING_WINDOWS?sp=rL():sp=aL();cL.exports=Rv;Rv.sync=rte;function Rv(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(o,s){Rv(t,e||{},function(a,i){a?s(a):o(i)})})}sp(t,e||{},function(o,s){o&&(o.code==="EACCES"||e&&e.ignoreErrors)&&(o=null,s=!1),r(o,s)})}function rte(t,e){try{return sp.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var _L=p((VHe,mL)=>{var Ws=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",lL=b("path"),nte=Ws?";":":",dL=uL(),pL=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),fL=(t,e)=>{let r=e.colon||nte,o=t.match(/\//)||Ws&&t.match(/\\/)?[""]:[...Ws?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],s=Ws?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=Ws?s.split(r):[""];return Ws&&t.indexOf(".")!==-1&&a[0]!==""&&a.unshift(""),{pathEnv:o,pathExt:a,pathExtExe:s}},hL=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:o,pathExt:s,pathExtExe:a}=fL(t,e),i=[],n=u=>new Promise((l,d)=>{if(u===o.length)return e.all&&i.length?l(i):d(pL(t));let h=o[u],g=/^".*"$/.test(h)?h.slice(1,-1):h,E=lL.join(g,t),S=!g&&/^\.[\\\/]/.test(t)?t.slice(0,2)+E:E;l(c(S,u,0))}),c=(u,l,d)=>new Promise((h,g)=>{if(d===s.length)return h(n(l+1));let E=s[d];dL(u+E,{pathExt:a},(S,v)=>{if(!S&&v)if(e.all)i.push(u+E);else return h(u+E);return h(c(u,l,d+1))})});return r?n(0).then(u=>r(null,u),r):n(0)},ite=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:o,pathExtExe:s}=fL(t,e),a=[];for(let i=0;i<r.length;i++){let n=r[i],c=/^".*"$/.test(n)?n.slice(1,-1):n,u=lL.join(c,t),l=!c&&/^\.[\\\/]/.test(t)?t.slice(0,2)+u:u;for(let d=0;d<o.length;d++){let h=l+o[d];try{if(dL.sync(h,{pathExt:s}))if(e.all)a.push(h);else return h}catch{}}}if(e.all&&a.length)return a;if(e.nothrow)return null;throw pL(t)};mL.exports=hL;hL.sync=ite});var EL=p((GHe,Pv)=>{"use strict";var gL=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"};Pv.exports=gL;Pv.exports.default=gL});var vL=p((qHe,yL)=>{"use strict";var SL=b("path"),ote=_L(),ste=EL();function TL(t,e){let r=t.options.env||process.env,o=process.cwd(),s=t.options.cwd!=null,a=s&&process.chdir!==void 0&&!process.chdir.disabled;if(a)try{process.chdir(t.options.cwd)}catch{}let i;try{i=ote.sync(t.command,{path:r[ste({env:r})],pathExt:e?SL.delimiter:void 0})}catch{}finally{a&&process.chdir(o)}return i&&(i=SL.resolve(s?t.options.cwd:"",i)),i}function ate(t){return TL(t)||TL(t,!0)}yL.exports=ate});var AL=p((jHe,Nv)=>{"use strict";var Cv=/([()\][%!^"`<>&|;, *?])/g;function cte(t){return t=t.replace(Cv,"^$1"),t}function ute(t,e){return t=`${t}`,t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),t=t.replace(/(?=(\\+?)?)\1$/,"$1$1"),t=`"${t}"`,t=t.replace(Cv,"^$1"),e&&(t=t.replace(Cv,"^$1")),t}Nv.exports.command=cte;Nv.exports.argument=ute});var bL=p((HHe,OL)=>{"use strict";OL.exports=/^#!(.*)/});var PL=p((zHe,RL)=>{"use strict";var lte=bL();RL.exports=(t="")=>{let e=t.match(lte);if(!e)return null;let[r,o]=e[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return s==="env"?o:o?`${s} ${o}`:s}});var NL=p(($He,CL)=>{"use strict";var Mv=b("fs"),dte=PL();function pte(t){let r=Buffer.alloc(150),o;try{o=Mv.openSync(t,"r"),Mv.readSync(o,r,0,150,0),Mv.closeSync(o)}catch{}return dte(r.toString())}CL.exports=pte});var wL=p((YHe,xL)=>{"use strict";var fte=b("path"),ML=vL(),IL=AL(),hte=NL(),mte=process.platform==="win32",_te=/\.(?:com|exe)$/i,gte=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Ete(t){t.file=ML(t);let e=t.file&&hte(t.file);return e?(t.args.unshift(t.file),t.command=e,ML(t)):t.file}function Ste(t){if(!mte)return t;let e=Ete(t),r=!_te.test(e);if(t.options.forceShell||r){let o=gte.test(e);t.command=fte.normalize(t.command),t.command=IL.command(t.command),t.args=t.args.map(a=>IL.argument(a,o));let s=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${s}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function Tte(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let o={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?o:Ste(o)}xL.exports=Tte});var UL=p((WHe,DL)=>{"use strict";var Iv=process.platform==="win32";function xv(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function yte(t,e){if(!Iv)return;let r=t.emit;t.emit=function(o,s){if(o==="exit"){let a=LL(s,e);if(a)return r.call(t,"error",a)}return r.apply(t,arguments)}}function LL(t,e){return Iv&&t===1&&!e.file?xv(e.original,"spawn"):null}function vte(t,e){return Iv&&t===1&&!e.file?xv(e.original,"spawnSync"):null}DL.exports={hookChildProcess:yte,verifyENOENT:LL,verifyENOENTSync:vte,notFoundError:xv}});var FL=p((KHe,Ks)=>{"use strict";var kL=b("child_process"),wv=wL(),Lv=UL();function BL(t,e,r){let o=wv(t,e,r),s=kL.spawn(o.command,o.args,o.options);return Lv.hookChildProcess(s,o),s}function Ate(t,e,r){let o=wv(t,e,r),s=kL.spawnSync(o.command,o.args,o.options);return s.error=s.error||Lv.verifyENOENTSync(s.status,o),s}Ks.exports=BL;Ks.exports.spawn=BL;Ks.exports.sync=Ate;Ks.exports._parse=wv;Ks.exports._enoent=Lv});var Ik,xk=k(()=>{Ik=typeof globalThis=="object"?globalThis:global});var wk=k(()=>{xk()});var Lk=k(()=>{wk()});var hi,YA=k(()=>{hi="1.9.0"});function bae(t){var e=new Set([t]),r=new Set,o=t.match(Dk);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(c){return c===t};function a(n){return r.add(n),!1}function i(n){return e.add(n),!0}return function(c){if(e.has(c))return!0;if(r.has(c))return!1;var u=c.match(Dk);if(!u)return a(c);var l={major:+u[1],minor:+u[2],patch:+u[3],prerelease:u[4]};return l.prerelease!=null||s.major!==l.major?a(c):s.major===0?s.minor===l.minor&&s.patch<=l.patch?i(c):a(c):s.minor<=l.minor?i(c):a(c)}}var Dk,Uk,kk=k(()=>{YA();Dk=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;Uk=bae(hi)});function fn(t,e,r,o){var s;o===void 0&&(o=!1);var a=bu[Ou]=(s=bu[Ou])!==null&&s!==void 0?s:{version:hi};if(!o&&a[t]){var i=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);return r.error(i.stack||i.message),!1}if(a.version!==hi){var i=new Error("@opentelemetry/api: Registration of version v"+a.version+" for "+t+" does not match previously registered API v"+hi);return r.error(i.stack||i.message),!1}return a[t]=e,r.debug("@opentelemetry/api: Registered a global for "+t+" v"+hi+"."),!0}function or(t){var e,r,o=(e=bu[Ou])===null||e===void 0?void 0:e.version;if(!(!o||!Uk(o)))return(r=bu[Ou])===null||r===void 0?void 0:r[t]}function hn(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+hi+".");var r=bu[Ou];r&&delete r[t]}var Rae,Ou,bu,Lo=k(()=>{Lk();YA();kk();Rae=hi.split(".")[0],Ou=Symbol.for("opentelemetry.js.api."+Rae),bu=Ik});function Ru(t,e,r){var o=or("diag");if(o)return r.unshift(e),o[t].apply(o,Cae([],Pae(r),!1))}var Pae,Cae,Bk,Fk=k(()=>{Lo();Pae=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o=r.call(t),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&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Cae=function(t,e,r){if(r||arguments.length===2)for(var o=0,s=e.length,a;o<s;o++)(a||!(o in e))&&(a||(a=Array.prototype.slice.call(e,0,o)),a[o]=e[o]);return t.concat(a||Array.prototype.slice.call(e))},Bk=(function(){function t(e){this._namespace=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Ru("debug",this._namespace,e)},t.prototype.error=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Ru("error",this._namespace,e)},t.prototype.info=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Ru("info",this._namespace,e)},t.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Ru("warn",this._namespace,e)},t.prototype.verbose=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Ru("verbose",this._namespace,e)},t})()});var dt,nf=k(()=>{(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(dt||(dt={}))});function Vk(t,e){t<dt.NONE?t=dt.NONE:t>dt.ALL&&(t=dt.ALL),e=e||{};function r(o,s){var a=e[o];return typeof a=="function"&&t>=s?a.bind(e):function(){}}return{error:r("error",dt.ERROR),warn:r("warn",dt.WARN),info:r("info",dt.INFO),debug:r("debug",dt.DEBUG),verbose:r("verbose",dt.VERBOSE)}}var Gk=k(()=>{nf()});var Nae,Mae,Iae,Tt,Do=k(()=>{Fk();Gk();nf();Lo();Nae=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o=r.call(t),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&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Mae=function(t,e,r){if(r||arguments.length===2)for(var o=0,s=e.length,a;o<s;o++)(a||!(o in e))&&(a||(a=Array.prototype.slice.call(e,0,o)),a[o]=e[o]);return t.concat(a||Array.prototype.slice.call(e))},Iae="diag",Tt=(function(){function t(){function e(s){return function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];var n=or("diag");if(n)return n[s].apply(n,Mae([],Nae(a),!1))}}var r=this,o=function(s,a){var i,n,c;if(a===void 0&&(a={logLevel:dt.INFO}),s===r){var u=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((i=u.stack)!==null&&i!==void 0?i:u.message),!1}typeof a=="number"&&(a={logLevel:a});var l=or("diag"),d=Vk((n=a.logLevel)!==null&&n!==void 0?n:dt.INFO,s);if(l&&!a.suppressOverrideMessage){var h=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";l.warn("Current logger will be overwritten from "+h),d.warn("Current logger will overwrite one already registered from "+h)}return fn("diag",d,r,!0)};r.setLogger=o,r.disable=function(){hn(Iae,r)},r.createComponentLogger=function(s){return new Bk(s)},r.verbose=e("verbose"),r.debug=e("debug"),r.info=e("info"),r.warn=e("warn"),r.error=e("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t})()});var xae,wae,qk,jk=k(()=>{xae=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o=r.call(t),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&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},wae=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],o=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},qk=(function(){function t(e){this._entries=e?new Map(e):new Map}return t.prototype.getEntry=function(e){var r=this._entries.get(e);if(r)return Object.assign({},r)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var r=xae(e,2),o=r[0],s=r[1];return[o,s]})},t.prototype.setEntry=function(e,r){var o=new t(this._entries);return o._entries.set(e,r),o},t.prototype.removeEntry=function(e){var r=new t(this._entries);return r._entries.delete(e),r},t.prototype.removeEntries=function(){for(var e,r,o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=new t(this._entries);try{for(var i=wae(o),n=i.next();!n.done;n=i.next()){var c=n.value;a._entries.delete(c)}}catch(u){e={error:u}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return a},t.prototype.clear=function(){return new t},t})()});var Hk,zk=k(()=>{Hk=Symbol("BaggageEntryMetadata")});function $k(t){return t===void 0&&(t={}),new qk(new Map(Object.entries(t)))}function Yk(t){return typeof t!="string"&&(Lae.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:Hk,toString:function(){return t}}}var Lae,WA=k(()=>{Do();jk();zk();Lae=Tt.instance()});function sa(t){return Symbol.for(t)}var Dae,of,Pu=k(()=>{Dae=(function(){function t(e){var r=this;r._currentContext=e?new Map(e):new Map,r.getValue=function(o){return r._currentContext.get(o)},r.setValue=function(o,s){var a=new t(r._currentContext);return a._currentContext.set(o,s),a},r.deleteValue=function(o){var s=new t(r._currentContext);return s._currentContext.delete(o),s}}return t})(),of=new Dae});var KA,Wk,Kk=k(()=>{KA=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],Wk=(function(){function t(){function e(o){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];if(console){var i=console[o];if(typeof i!="function"&&(i=console.log),typeof i=="function")return i.apply(console,s)}}}for(var r=0;r<KA.length;r++)this[KA[r].n]=e(KA[r].c)}return t})()});function Xk(){return JA}var Uo,Uae,sf,kae,Bae,Fae,Vae,XA,Gae,qae,jae,JA,Hae,zae,$ae,Yae,Wae,Kae,Xae,QA=k(()=>{Uo=(function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),Uae=(function(){function t(){}return t.prototype.createGauge=function(e,r){return zae},t.prototype.createHistogram=function(e,r){return $ae},t.prototype.createCounter=function(e,r){return Hae},t.prototype.createUpDownCounter=function(e,r){return Yae},t.prototype.createObservableGauge=function(e,r){return Kae},t.prototype.createObservableCounter=function(e,r){return Wae},t.prototype.createObservableUpDownCounter=function(e,r){return Xae},t.prototype.addBatchObservableCallback=function(e,r){},t.prototype.removeBatchObservableCallback=function(e){},t})(),sf=(function(){function t(){}return t})(),kae=(function(t){Uo(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,o){},e})(sf),Bae=(function(t){Uo(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,o){},e})(sf),Fae=(function(t){Uo(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(r,o){},e})(sf),Vae=(function(t){Uo(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(r,o){},e})(sf),XA=(function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t})(),Gae=(function(t){Uo(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(XA),qae=(function(t){Uo(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(XA),jae=(function(t){Uo(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(XA),JA=new Uae,Hae=new kae,zae=new Fae,$ae=new Vae,Yae=new Bae,Wae=new Gae,Kae=new qae,Xae=new jae});var af,Jk=k(()=>{(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(af||(af={}))});var cf,uf,ZA=k(()=>{cf={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},uf={set:function(t,e,r){t!=null&&(t[e]=r)}}});var Jae,Qae,Qk,Zk=k(()=>{Pu();Jae=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o=r.call(t),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&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},Qae=function(t,e,r){if(r||arguments.length===2)for(var o=0,s=e.length,a;o<s;o++)(a||!(o in e))&&(a||(a=Array.prototype.slice.call(e,0,o)),a[o]=e[o]);return t.concat(a||Array.prototype.slice.call(e))},Qk=(function(){function t(){}return t.prototype.active=function(){return of},t.prototype.with=function(e,r,o){for(var s=[],a=3;a<arguments.length;a++)s[a-3]=arguments[a];return r.call.apply(r,Qae([o],Jae(s),!1))},t.prototype.bind=function(e,r){return r},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t})()});var Zae,ece,eO,tce,Vi,Cu=k(()=>{Zk();Lo();Do();Zae=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o=r.call(t),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&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},ece=function(t,e,r){if(r||arguments.length===2)for(var o=0,s=e.length,a;o<s;o++)(a||!(o in e))&&(a||(a=Array.prototype.slice.call(e,0,o)),a[o]=e[o]);return t.concat(a||Array.prototype.slice.call(e))},eO="context",tce=new Qk,Vi=(function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(e){return fn(eO,e,Tt.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(e,r,o){for(var s,a=[],i=3;i<arguments.length;i++)a[i-3]=arguments[i];return(s=this._getContextManager()).with.apply(s,ece([e,r,o],Zae(a),!1))},t.prototype.bind=function(e,r){return this._getContextManager().bind(e,r)},t.prototype._getContextManager=function(){return or(eO)||tce},t.prototype.disable=function(){this._getContextManager().disable(),hn(eO,Tt.instance())},t})()});var aa,tO=k(()=>{(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(aa||(aa={}))});var Nu,Mu,lf,df=k(()=>{tO();Nu="0000000000000000",Mu="00000000000000000000000000000000",lf={traceId:Mu,spanId:Nu,traceFlags:aa.NONE}});var Gi,pf=k(()=>{df();Gi=(function(){function t(e){e===void 0&&(e=lf),this._spanContext=e}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,r){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,r){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,r){},t})()});function ff(t){return t.getValue(rO)||void 0}function eB(){return ff(Vi.getInstance().active())}function Iu(t,e){return t.setValue(rO,e)}function tB(t){return t.deleteValue(rO)}function rB(t,e){return Iu(t,new Gi(e))}function hf(t){var e;return(e=ff(t))===null||e===void 0?void 0:e.spanContext()}var rO,nO=k(()=>{Pu();pf();Cu();rO=sa("OpenTelemetry Context Key SPAN")});function iO(t){return rce.test(t)&&t!==Mu}function oO(t){return nce.test(t)&&t!==Nu}function ca(t){return iO(t.traceId)&&oO(t.spanId)}function nB(t){return new Gi(t)}var rce,nce,mf=k(()=>{df();pf();rce=/^([0-9a-f]{32})$/i,nce=/^[0-9a-f]{16}$/i});function ice(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var sO,_f,aO=k(()=>{Cu();nO();pf();mf();sO=Vi.getInstance(),_f=(function(){function t(){}return t.prototype.startSpan=function(e,r,o){o===void 0&&(o=sO.active());var s=!!r?.root;if(s)return new Gi;var a=o&&hf(o);return ice(a)&&ca(a)?new Gi(a):new Gi},t.prototype.startActiveSpan=function(e,r,o,s){var a,i,n;if(!(arguments.length<2)){arguments.length===2?n=r:arguments.length===3?(a=r,n=o):(a=r,i=o,n=s);var c=i??sO.active(),u=this.startSpan(e,a,c),l=Iu(c,u);return sO.with(l,n,void 0,u)}},t})()});var oce,gf,cO=k(()=>{aO();oce=new _f,gf=(function(){function t(e,r,o,s){this._provider=e,this.name=r,this.version=o,this.options=s}return t.prototype.startSpan=function(e,r,o){return this._getTracer().startSpan(e,r,o)},t.prototype.startActiveSpan=function(e,r,o,s){var a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)},t.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):oce},t})()});var iB,oB=k(()=>{aO();iB=(function(){function t(){}return t.prototype.getTracer=function(e,r,o){return new _f},t})()});var sce,xu,uO=k(()=>{cO();oB();sce=new iB,xu=(function(){function t(){}return t.prototype.getTracer=function(e,r,o){var s;return(s=this.getDelegateTracer(e,r,o))!==null&&s!==void 0?s:new gf(this,e,r,o)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:sce},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateTracer=function(e,r,o){var s;return(s=this._delegate)===null||s===void 0?void 0:s.getTracer(e,r,o)},t})()});var Ef,sB=k(()=>{(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Ef||(Ef={}))});var Sf,aB=k(()=>{(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(Sf||(Sf={}))});var Tf,cB=k(()=>{(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(Tf||(Tf={}))});function uB(t){return uce.test(t)}function lB(t){return lce.test(t)&&!dce.test(t)}var lO,ace,cce,uce,lce,dce,dB=k(()=>{lO="[_0-9a-z-*/]",ace="[a-z]"+lO+"{0,255}",cce="[a-z0-9]"+lO+"{0,240}@[a-z]"+lO+"{0,13}",uce=new RegExp("^(?:"+ace+"|"+cce+")$"),lce=/^[ -~]{0,255}[!-~]$/,dce=/,|=/});var pB,pce,fB,hB,mB,_B=k(()=>{dB();pB=32,pce=512,fB=",",hB="=",mB=(function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,r){var o=this._clone();return o._internalState.has(e)&&o._internalState.delete(e),o._internalState.set(e,r),o},t.prototype.unset=function(e){var r=this._clone();return r._internalState.delete(e),r},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(r,o){return r.push(o+hB+e.get(o)),r},[]).join(fB)},t.prototype._parse=function(e){e.length>pce||(this._internalState=e.split(fB).reverse().reduce(function(r,o){var s=o.trim(),a=s.indexOf(hB);if(a!==-1){var i=s.slice(0,a),n=s.slice(a+1,o.length);uB(i)&&lB(n)&&r.set(i,n)}return r},new Map),this._internalState.size>pB&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,pB))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t})()});function gB(t){return new mB(t)}var EB=k(()=>{_B()});var dO,SB=k(()=>{Cu();dO=Vi.getInstance()});var Qe,TB=k(()=>{Do();Qe=Tt.instance()});var fce,yB,vB=k(()=>{QA();fce=(function(){function t(){}return t.prototype.getMeter=function(e,r,o){return JA},t})(),yB=new fce});var pO,AB,OB=k(()=>{vB();Lo();Do();pO="metrics",AB=(function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(e){return fn(pO,e,Tt.instance())},t.prototype.getMeterProvider=function(){return or(pO)||yB},t.prototype.getMeter=function(e,r,o){return this.getMeterProvider().getMeter(e,r,o)},t.prototype.disable=function(){hn(pO,Tt.instance())},t})()});var ua,bB=k(()=>{OB();ua=AB.getInstance()});var RB,PB=k(()=>{RB=(function(){function t(){}return t.prototype.inject=function(e,r){},t.prototype.extract=function(e,r){return e},t.prototype.fields=function(){return[]},t})()});function hO(t){return t.getValue(fO)||void 0}function CB(){return hO(Vi.getInstance().active())}function NB(t,e){return t.setValue(fO,e)}function MB(t){return t.deleteValue(fO)}var fO,IB=k(()=>{Cu();Pu();fO=sa("OpenTelemetry Baggage Key")});var mO,hce,xB,wB=k(()=>{Lo();PB();ZA();IB();WA();Do();mO="propagation",hce=new RB,xB=(function(){function t(){this.createBaggage=$k,this.getBaggage=hO,this.getActiveBaggage=CB,this.setBaggage=NB,this.deleteBaggage=MB}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(e){return fn(mO,e,Tt.instance())},t.prototype.inject=function(e,r,o){return o===void 0&&(o=uf),this._getGlobalPropagator().inject(e,r,o)},t.prototype.extract=function(e,r,o){return o===void 0&&(o=cf),this._getGlobalPropagator().extract(e,r,o)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){hn(mO,Tt.instance())},t.prototype._getGlobalPropagator=function(){return or(mO)||hce},t})()});var _O,LB=k(()=>{wB();_O=xB.getInstance()});var gO,DB,UB=k(()=>{Lo();uO();mf();nO();Do();gO="trace",DB=(function(){function t(){this._proxyTracerProvider=new xu,this.wrapSpanContext=nB,this.isSpanContextValid=ca,this.deleteSpan=tB,this.getSpan=ff,this.getActiveSpan=eB,this.getSpanContext=hf,this.setSpan=Iu,this.setSpanContext=rB}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(e){var r=fn(gO,this._proxyTracerProvider,Tt.instance());return r&&this._proxyTracerProvider.setDelegate(e),r},t.prototype.getTracerProvider=function(){return or(gO)||this._proxyTracerProvider},t.prototype.getTracer=function(e,r){return this.getTracerProvider().getTracer(e,r)},t.prototype.disable=function(){hn(gO,Tt.instance()),this._proxyTracerProvider=new xu},t})()});var EO,kB=k(()=>{UB();EO=DB.getInstance()});var C={};Yd(C,{DiagConsoleLogger:()=>Wk,DiagLogLevel:()=>dt,INVALID_SPANID:()=>Nu,INVALID_SPAN_CONTEXT:()=>lf,INVALID_TRACEID:()=>Mu,ProxyTracer:()=>gf,ProxyTracerProvider:()=>xu,ROOT_CONTEXT:()=>of,SamplingDecision:()=>Ef,SpanKind:()=>Sf,SpanStatusCode:()=>Tf,TraceFlags:()=>aa,ValueType:()=>af,baggageEntryMetadataFromString:()=>Yk,context:()=>dO,createContextKey:()=>sa,createNoopMeter:()=>Xk,createTraceState:()=>gB,default:()=>mce,defaultTextMapGetter:()=>cf,defaultTextMapSetter:()=>uf,diag:()=>Qe,isSpanContextValid:()=>ca,isValidSpanId:()=>oO,isValidTraceId:()=>iO,metrics:()=>ua,propagation:()=>_O,trace:()=>EO});var mce,R=k(()=>{WA();Pu();Kk();nf();QA();Jk();ZA();cO();uO();sB();aB();cB();tO();EB();mf();df();SB();TB();bB();LB();kB();mce={context:dO,diag:Qe,metrics:ua,propagation:_O,trace:EO}});var wu=p(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.isTracingSuppressed=qi.unsuppressTracing=qi.suppressTracing=void 0;var _ce=(R(),y(C)),SO=(0,_ce.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function gce(t){return t.setValue(SO,!0)}qi.suppressTracing=gce;function Ece(t){return t.deleteValue(SO)}qi.unsuppressTracing=Ece;function Sce(t){return t.getValue(SO)===!0}qi.isTracingSuppressed=Sce});var TO=p(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.BAGGAGE_MAX_TOTAL_LENGTH=yt.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=yt.BAGGAGE_MAX_NAME_VALUE_PAIRS=yt.BAGGAGE_HEADER=yt.BAGGAGE_ITEMS_SEPARATOR=yt.BAGGAGE_PROPERTIES_SEPARATOR=yt.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;yt.BAGGAGE_KEY_PAIR_SEPARATOR="=";yt.BAGGAGE_PROPERTIES_SEPARATOR=";";yt.BAGGAGE_ITEMS_SEPARATOR=",";yt.BAGGAGE_HEADER="baggage";yt.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;yt.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;yt.BAGGAGE_MAX_TOTAL_LENGTH=8192});var yO=p(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.parseKeyPairsIntoRecord=mn.parsePairKeyValue=mn.getKeyPairs=mn.serializeKeyPairs=void 0;var Tce=(R(),y(C)),ko=TO();function yce(t){return t.reduce((e,r)=>{let o=`${e}${e!==""?ko.BAGGAGE_ITEMS_SEPARATOR:""}${r}`;return o.length>ko.BAGGAGE_MAX_TOTAL_LENGTH?e:o},"")}mn.serializeKeyPairs=yce;function vce(t){return t.getAllEntries().map(([e,r])=>{let o=`${encodeURIComponent(e)}=${encodeURIComponent(r.value)}`;return r.metadata!==void 0&&(o+=ko.BAGGAGE_PROPERTIES_SEPARATOR+r.metadata.toString()),o})}mn.getKeyPairs=vce;function BB(t){let e=t.split(ko.BAGGAGE_PROPERTIES_SEPARATOR);if(e.length<=0)return;let r=e.shift();if(!r)return;let o=r.indexOf(ko.BAGGAGE_KEY_PAIR_SEPARATOR);if(o<=0)return;let s=decodeURIComponent(r.substring(0,o).trim()),a=decodeURIComponent(r.substring(o+1).trim()),i;return e.length>0&&(i=(0,Tce.baggageEntryMetadataFromString)(e.join(ko.BAGGAGE_PROPERTIES_SEPARATOR))),{key:s,value:a,metadata:i}}mn.parsePairKeyValue=BB;function Ace(t){let e={};return typeof t=="string"&&t.length>0&&t.split(ko.BAGGAGE_ITEMS_SEPARATOR).forEach(r=>{let o=BB(r);o!==void 0&&o.value.length>0&&(e[o.key]=o.value)}),e}mn.parseKeyPairsIntoRecord=Ace});var FB=p(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.W3CBaggagePropagator=void 0;var vO=(R(),y(C)),Oce=wu(),Bo=TO(),AO=yO(),OO=class{inject(e,r,o){let s=vO.propagation.getBaggage(e);if(!s||(0,Oce.isTracingSuppressed)(e))return;let a=(0,AO.getKeyPairs)(s).filter(n=>n.length<=Bo.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Bo.BAGGAGE_MAX_NAME_VALUE_PAIRS),i=(0,AO.serializeKeyPairs)(a);i.length>0&&o.set(r,Bo.BAGGAGE_HEADER,i)}extract(e,r,o){let s=o.get(r,Bo.BAGGAGE_HEADER),a=Array.isArray(s)?s.join(Bo.BAGGAGE_ITEMS_SEPARATOR):s;if(!a)return e;let i={};return a.length===0||(a.split(Bo.BAGGAGE_ITEMS_SEPARATOR).forEach(c=>{let u=(0,AO.parsePairKeyValue)(c);if(u){let l={value:u.value};u.metadata&&(l.metadata=u.metadata),i[u.key]=l}}),Object.entries(i).length===0)?e:vO.propagation.setBaggage(e,vO.propagation.createBaggage(i))}fields(){return[Bo.BAGGAGE_HEADER]}};yf.W3CBaggagePropagator=OO});var VB=p(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});vf.AnchoredClock=void 0;var bO=class{_monotonicClock;_epochMillis;_performanceMillis;constructor(e,r){this._monotonicClock=r,this._epochMillis=e.now(),this._performanceMillis=r.now()}now(){let e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e}};vf.AnchoredClock=bO});var zB=p(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.isAttributeValue=ji.isAttributeKey=ji.sanitizeAttributes=void 0;var GB=(R(),y(C));function bce(t){let e={};if(typeof t!="object"||t==null)return e;for(let[r,o]of Object.entries(t)){if(!qB(r)){GB.diag.warn(`Invalid attribute key: ${r}`);continue}if(!jB(o)){GB.diag.warn(`Invalid attribute value set for key: ${r}`);continue}Array.isArray(o)?e[r]=o.slice():e[r]=o}return e}ji.sanitizeAttributes=bce;function qB(t){return typeof t=="string"&&t.length>0}ji.isAttributeKey=qB;function jB(t){return t==null?!0:Array.isArray(t)?Rce(t):HB(t)}ji.isAttributeValue=jB;function Rce(t){let e;for(let r of t)if(r!=null){if(!e){if(HB(r)){e=typeof r;continue}return!1}if(typeof r!==e)return!1}return!0}function HB(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}});var RO=p(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.loggingErrorHandler=void 0;var Pce=(R(),y(C));function Cce(){return t=>{Pce.diag.error(Nce(t))}}Af.loggingErrorHandler=Cce;function Nce(t){return typeof t=="string"?t:JSON.stringify(Mce(t))}function Mce(t){let e={},r=t;for(;r!==null;)Object.getOwnPropertyNames(r).forEach(o=>{if(e[o])return;let s=r[o];s&&(e[o]=String(s))}),r=Object.getPrototypeOf(r);return e}});var YB=p(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.globalErrorHandler=la.setGlobalErrorHandler=void 0;var Ice=RO(),$B=(0,Ice.loggingErrorHandler)();function xce(t){$B=t}la.setGlobalErrorHandler=xce;function wce(t){try{$B(t)}catch{}}la.globalErrorHandler=wce});var JB=p(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.getStringListFromEnv=_n.getBooleanFromEnv=_n.getStringFromEnv=_n.getNumberFromEnv=void 0;var WB=(R(),y(C)),KB=b("util");function Lce(t){let e=process.env[t];if(e==null||e.trim()==="")return;let r=Number(e);if(isNaN(r)){WB.diag.warn(`Unknown value ${(0,KB.inspect)(e)} for ${t}, expected a number, using defaults`);return}return r}_n.getNumberFromEnv=Lce;function XB(t){let e=process.env[t];if(!(e==null||e.trim()===""))return e}_n.getStringFromEnv=XB;function Dce(t){let e=process.env[t]?.trim().toLowerCase();return e==null||e===""?!1:e==="true"?!0:(e==="false"||WB.diag.warn(`Unknown value ${(0,KB.inspect)(e)} for ${t}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}_n.getBooleanFromEnv=Dce;function Uce(t){return XB(t)?.split(",").map(e=>e.trim()).filter(e=>e!=="")}_n.getStringListFromEnv=Uce});var QB=p(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of._globalThis=void 0;Of._globalThis=typeof globalThis=="object"?globalThis:global});var ZB=p(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});bf.otperformance=void 0;var kce=b("perf_hooks");bf.otperformance=kce.performance});var eF=p(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.VERSION=void 0;Rf.VERSION="2.1.0"});function ke(t){let e={},r=t.length;for(let o=0;o<r;o++){let s=t[o];s&&(e[String(s).toUpperCase().replace(/[-.]/g,"_")]=s)}return e}var PO=k(()=>{});var tF,rF,nF,iF,oF,sF,aF,cF,uF,lF,dF,pF,fF,hF,mF,_F,gF,EF,SF,TF,yF,vF,AF,OF,bF,RF,PF,CF,NF,MF,IF,xF,wF,LF,DF,UF,kF,BF,FF,VF,GF,qF,jF,HF,zF,$F,YF,WF,KF,XF,JF,QF,ZF,eV,tV,rV,nV,iV,oV,sV,aV,cV,uV,lV,dV,pV,fV,hV,mV,_V,gV,EV,SV,TV,yV,vV,AV,OV,bV,RV,PV,CV,NV,MV,IV,xV,wV,LV,DV,UV,kV,BV,FV,VV,GV,qV,jV,HV,zV,$V,YV,WV,KV,XV,JV,QV,ZV,eG,tG,rG,nG,iG,oG,sG,aG,cG,uG,lG,dG,pG,fG,hG,mG,_G,gG,EG,SG,TG,Bce,Fce,Vce,Gce,qce,jce,Hce,zce,$ce,Yce,Wce,Kce,Xce,Jce,Qce,Zce,eue,tue,rue,nue,iue,oue,sue,aue,cue,uue,lue,due,pue,fue,hue,mue,_ue,gue,Eue,Sue,Tue,yue,vue,Aue,Oue,bue,Rue,Pue,Cue,Nue,Mue,Iue,xue,wue,Lue,Due,Uue,kue,Bue,Fue,Vue,Gue,que,jue,Hue,zue,$ue,Yue,Wue,Kue,Xue,Jue,Que,Zue,ele,tle,rle,nle,ile,ole,sle,ale,cle,ule,lle,dle,ple,fle,hle,mle,_le,gle,Ele,Sle,Tle,yle,vle,Ale,Ole,ble,Rle,Ple,Cle,Nle,Mle,Ile,xle,wle,Lle,Dle,Ule,kle,Ble,Fle,Vle,Gle,qle,jle,Hle,zle,$le,Yle,Wle,Kle,Xle,Jle,Qle,Zle,ede,tde,rde,nde,ide,yG,vG,AG,OG,bG,RG,PG,CG,NG,MG,IG,xG,wG,LG,DG,UG,kG,BG,FG,VG,GG,qG,jG,HG,zG,$G,YG,WG,KG,XG,JG,QG,ZG,eq,tq,rq,nq,iq,oq,sq,aq,cq,uq,lq,dq,pq,fq,ode,sde,ade,cde,ude,lde,dde,pde,fde,hde,mde,_de,gde,Ede,Sde,Tde,yde,vde,Ade,Ode,bde,Rde,Pde,Cde,Nde,Mde,Ide,xde,wde,Lde,Dde,Ude,kde,Bde,Fde,Vde,Gde,qde,jde,Hde,zde,$de,Yde,Wde,Kde,Xde,Jde,Qde,hq,mq,_q,gq,Eq,Sq,Tq,yq,vq,Aq,Oq,Zde,epe,tpe,rpe,npe,ipe,ope,spe,ape,cpe,upe,lpe,bq,Rq,Pq,Cq,Nq,dpe,ppe,fpe,hpe,mpe,_pe,Mq,Iq,xq,gpe,Epe,Spe,Tpe,wq,Lq,Dq,Uq,ype,vpe,Ape,Ope,bpe,kq,Bq,Fq,Vq,Gq,qq,jq,Rpe,Ppe,Cpe,Npe,Mpe,Ipe,xpe,wpe,Hq,zq,$q,Yq,Wq,Lpe,Dpe,Upe,kpe,Bpe,Fpe,Kq,Xq,Jq,Qq,Zq,e2,t2,r2,n2,i2,o2,s2,a2,c2,u2,l2,d2,p2,f2,h2,m2,Vpe,Gpe,qpe,jpe,Hpe,zpe,$pe,Ype,Wpe,Kpe,Xpe,Jpe,Qpe,Zpe,efe,tfe,rfe,nfe,ife,ofe,sfe,afe,_2,g2,E2,S2,T2,cfe,ufe,lfe,dfe,pfe,ffe,y2,v2,hfe,mfe,_fe,A2,O2,gfe,Efe,Sfe,b2,R2,P2,C2,N2,M2,I2,x2,w2,L2,D2,U2,k2,B2,F2,V2,G2,Tfe,yfe,vfe,Afe,Ofe,bfe,Rfe,Pfe,Cfe,Nfe,Mfe,Ife,xfe,wfe,Lfe,Dfe,Ufe,kfe,q2,j2,Bfe,Ffe,Vfe,H2=k(()=>{PO();tF="aws.lambda.invoked_arn",rF="db.system",nF="db.connection_string",iF="db.user",oF="db.jdbc.driver_classname",sF="db.name",aF="db.statement",cF="db.operation",uF="db.mssql.instance_name",lF="db.cassandra.keyspace",dF="db.cassandra.page_size",pF="db.cassandra.consistency_level",fF="db.cassandra.table",hF="db.cassandra.idempotence",mF="db.cassandra.speculative_execution_count",_F="db.cassandra.coordinator.id",gF="db.cassandra.coordinator.dc",EF="db.hbase.namespace",SF="db.redis.database_index",TF="db.mongodb.collection",yF="db.sql.table",vF="exception.type",AF="exception.message",OF="exception.stacktrace",bF="exception.escaped",RF="faas.trigger",PF="faas.execution",CF="faas.document.collection",NF="faas.document.operation",MF="faas.document.time",IF="faas.document.name",xF="faas.time",wF="faas.cron",LF="faas.coldstart",DF="faas.invoked_name",UF="faas.invoked_provider",kF="faas.invoked_region",BF="net.transport",FF="net.peer.ip",VF="net.peer.port",GF="net.peer.name",qF="net.host.ip",jF="net.host.port",HF="net.host.name",zF="net.host.connection.type",$F="net.host.connection.subtype",YF="net.host.carrier.name",WF="net.host.carrier.mcc",KF="net.host.carrier.mnc",XF="net.host.carrier.icc",JF="peer.service",QF="enduser.id",ZF="enduser.role",eV="enduser.scope",tV="thread.id",rV="thread.name",nV="code.function",iV="code.namespace",oV="code.filepath",sV="code.lineno",aV="http.method",cV="http.url",uV="http.target",lV="http.host",dV="http.scheme",pV="http.status_code",fV="http.flavor",hV="http.user_agent",mV="http.request_content_length",_V="http.request_content_length_uncompressed",gV="http.response_content_length",EV="http.response_content_length_uncompressed",SV="http.server_name",TV="http.route",yV="http.client_ip",vV="aws.dynamodb.table_names",AV="aws.dynamodb.consumed_capacity",OV="aws.dynamodb.item_collection_metrics",bV="aws.dynamodb.provisioned_read_capacity",RV="aws.dynamodb.provisioned_write_capacity",PV="aws.dynamodb.consistent_read",CV="aws.dynamodb.projection",NV="aws.dynamodb.limit",MV="aws.dynamodb.attributes_to_get",IV="aws.dynamodb.index_name",xV="aws.dynamodb.select",wV="aws.dynamodb.global_secondary_indexes",LV="aws.dynamodb.local_secondary_indexes",DV="aws.dynamodb.exclusive_start_table",UV="aws.dynamodb.table_count",kV="aws.dynamodb.scan_forward",BV="aws.dynamodb.segment",FV="aws.dynamodb.total_segments",VV="aws.dynamodb.count",GV="aws.dynamodb.scanned_count",qV="aws.dynamodb.attribute_definitions",jV="aws.dynamodb.global_secondary_index_updates",HV="messaging.system",zV="messaging.destination",$V="messaging.destination_kind",YV="messaging.temp_destination",WV="messaging.protocol",KV="messaging.protocol_version",XV="messaging.url",JV="messaging.message_id",QV="messaging.conversation_id",ZV="messaging.message_payload_size_bytes",eG="messaging.message_payload_compressed_size_bytes",tG="messaging.operation",rG="messaging.consumer_id",nG="messaging.rabbitmq.routing_key",iG="messaging.kafka.message_key",oG="messaging.kafka.consumer_group",sG="messaging.kafka.client_id",aG="messaging.kafka.partition",cG="messaging.kafka.tombstone",uG="rpc.system",lG="rpc.service",dG="rpc.method",pG="rpc.grpc.status_code",fG="rpc.jsonrpc.version",hG="rpc.jsonrpc.request_id",mG="rpc.jsonrpc.error_code",_G="rpc.jsonrpc.error_message",gG="message.type",EG="message.id",SG="message.compressed_size",TG="message.uncompressed_size",Bce=tF,Fce=rF,Vce=nF,Gce=iF,qce=oF,jce=sF,Hce=aF,zce=cF,$ce=uF,Yce=lF,Wce=dF,Kce=pF,Xce=fF,Jce=hF,Qce=mF,Zce=_F,eue=gF,tue=EF,rue=SF,nue=TF,iue=yF,oue=vF,sue=AF,aue=OF,cue=bF,uue=RF,lue=PF,due=CF,pue=NF,fue=MF,hue=IF,mue=xF,_ue=wF,gue=LF,Eue=DF,Sue=UF,Tue=kF,yue=BF,vue=FF,Aue=VF,Oue=GF,bue=qF,Rue=jF,Pue=HF,Cue=zF,Nue=$F,Mue=YF,Iue=WF,xue=KF,wue=XF,Lue=JF,Due=QF,Uue=ZF,kue=eV,Bue=tV,Fue=rV,Vue=nV,Gue=iV,que=oV,jue=sV,Hue=aV,zue=cV,$ue=uV,Yue=lV,Wue=dV,Kue=pV,Xue=fV,Jue=hV,Que=mV,Zue=_V,ele=gV,tle=EV,rle=SV,nle=TV,ile=yV,ole=vV,sle=AV,ale=OV,cle=bV,ule=RV,lle=PV,dle=CV,ple=NV,fle=MV,hle=IV,mle=xV,_le=wV,gle=LV,Ele=DV,Sle=UV,Tle=kV,yle=BV,vle=FV,Ale=VV,Ole=GV,ble=qV,Rle=jV,Ple=HV,Cle=zV,Nle=$V,Mle=YV,Ile=WV,xle=KV,wle=XV,Lle=JV,Dle=QV,Ule=ZV,kle=eG,Ble=tG,Fle=rG,Vle=nG,Gle=iG,qle=oG,jle=sG,Hle=aG,zle=cG,$le=uG,Yle=lG,Wle=dG,Kle=pG,Xle=fG,Jle=hG,Qle=mG,Zle=_G,ede=gG,tde=EG,rde=SG,nde=TG,ide=ke([tF,rF,nF,iF,oF,sF,aF,cF,uF,lF,dF,pF,fF,hF,mF,_F,gF,EF,SF,TF,yF,vF,AF,OF,bF,RF,PF,CF,NF,MF,IF,xF,wF,LF,DF,UF,kF,BF,FF,VF,GF,qF,jF,HF,zF,$F,YF,WF,KF,XF,JF,QF,ZF,eV,tV,rV,nV,iV,oV,sV,aV,cV,uV,lV,dV,pV,fV,hV,mV,_V,gV,EV,SV,TV,yV,vV,AV,OV,bV,RV,PV,CV,NV,MV,IV,xV,wV,LV,DV,UV,kV,BV,FV,VV,GV,qV,jV,HV,zV,$V,YV,WV,KV,XV,JV,QV,ZV,eG,tG,rG,nG,iG,oG,sG,aG,cG,uG,lG,dG,pG,fG,hG,mG,_G,gG,EG,SG,TG]),yG="other_sql",vG="mssql",AG="mysql",OG="oracle",bG="db2",RG="postgresql",PG="redshift",CG="hive",NG="cloudscape",MG="hsqldb",IG="progress",xG="maxdb",wG="hanadb",LG="ingres",DG="firstsql",UG="edb",kG="cache",BG="adabas",FG="firebird",VG="derby",GG="filemaker",qG="informix",jG="instantdb",HG="interbase",zG="mariadb",$G="netezza",YG="pervasive",WG="pointbase",KG="sqlite",XG="sybase",JG="teradata",QG="vertica",ZG="h2",eq="coldfusion",tq="cassandra",rq="hbase",nq="mongodb",iq="redis",oq="couchbase",sq="couchdb",aq="cosmosdb",cq="dynamodb",uq="neo4j",lq="geode",dq="elasticsearch",pq="memcached",fq="cockroachdb",ode=yG,sde=vG,ade=AG,cde=OG,ude=bG,lde=RG,dde=PG,pde=CG,fde=NG,hde=MG,mde=IG,_de=xG,gde=wG,Ede=LG,Sde=DG,Tde=UG,yde=kG,vde=BG,Ade=FG,Ode=VG,bde=GG,Rde=qG,Pde=jG,Cde=HG,Nde=zG,Mde=$G,Ide=YG,xde=WG,wde=KG,Lde=XG,Dde=JG,Ude=QG,kde=ZG,Bde=eq,Fde=tq,Vde=rq,Gde=nq,qde=iq,jde=oq,Hde=sq,zde=aq,$de=cq,Yde=uq,Wde=lq,Kde=dq,Xde=pq,Jde=fq,Qde=ke([yG,vG,AG,OG,bG,RG,PG,CG,NG,MG,IG,xG,wG,LG,DG,UG,kG,BG,FG,VG,GG,qG,jG,HG,zG,$G,YG,WG,KG,XG,JG,QG,ZG,eq,tq,rq,nq,iq,oq,sq,aq,cq,uq,lq,dq,pq,fq]),hq="all",mq="each_quorum",_q="quorum",gq="local_quorum",Eq="one",Sq="two",Tq="three",yq="local_one",vq="any",Aq="serial",Oq="local_serial",Zde=hq,epe=mq,tpe=_q,rpe=gq,npe=Eq,ipe=Sq,ope=Tq,spe=yq,ape=vq,cpe=Aq,upe=Oq,lpe=ke([hq,mq,_q,gq,Eq,Sq,Tq,yq,vq,Aq,Oq]),bq="datasource",Rq="http",Pq="pubsub",Cq="timer",Nq="other",dpe=bq,ppe=Rq,fpe=Pq,hpe=Cq,mpe=Nq,_pe=ke([bq,Rq,Pq,Cq,Nq]),Mq="insert",Iq="edit",xq="delete",gpe=Mq,Epe=Iq,Spe=xq,Tpe=ke([Mq,Iq,xq]),wq="alibaba_cloud",Lq="aws",Dq="azure",Uq="gcp",ype=wq,vpe=Lq,Ape=Dq,Ope=Uq,bpe=ke([wq,Lq,Dq,Uq]),kq="ip_tcp",Bq="ip_udp",Fq="ip",Vq="unix",Gq="pipe",qq="inproc",jq="other",Rpe=kq,Ppe=Bq,Cpe=Fq,Npe=Vq,Mpe=Gq,Ipe=qq,xpe=jq,wpe=ke([kq,Bq,Fq,Vq,Gq,qq,jq]),Hq="wifi",zq="wired",$q="cell",Yq="unavailable",Wq="unknown",Lpe=Hq,Dpe=zq,Upe=$q,kpe=Yq,Bpe=Wq,Fpe=ke([Hq,zq,$q,Yq,Wq]),Kq="gprs",Xq="edge",Jq="umts",Qq="cdma",Zq="evdo_0",e2="evdo_a",t2="cdma2000_1xrtt",r2="hsdpa",n2="hsupa",i2="hspa",o2="iden",s2="evdo_b",a2="lte",c2="ehrpd",u2="hspap",l2="gsm",d2="td_scdma",p2="iwlan",f2="nr",h2="nrnsa",m2="lte_ca",Vpe=Kq,Gpe=Xq,qpe=Jq,jpe=Qq,Hpe=Zq,zpe=e2,$pe=t2,Ype=r2,Wpe=n2,Kpe=i2,Xpe=o2,Jpe=s2,Qpe=a2,Zpe=c2,efe=u2,tfe=l2,rfe=d2,nfe=p2,ife=f2,ofe=h2,sfe=m2,afe=ke([Kq,Xq,Jq,Qq,Zq,e2,t2,r2,n2,i2,o2,s2,a2,c2,u2,l2,d2,p2,f2,h2,m2]),_2="1.0",g2="1.1",E2="2.0",S2="SPDY",T2="QUIC",cfe=_2,ufe=g2,lfe=E2,dfe=S2,pfe=T2,ffe={HTTP_1_0:_2,HTTP_1_1:g2,HTTP_2_0:E2,SPDY:S2,QUIC:T2},y2="queue",v2="topic",hfe=y2,mfe=v2,_fe=ke([y2,v2]),A2="receive",O2="process",gfe=A2,Efe=O2,Sfe=ke([A2,O2]),b2=0,R2=1,P2=2,C2=3,N2=4,M2=5,I2=6,x2=7,w2=8,L2=9,D2=10,U2=11,k2=12,B2=13,F2=14,V2=15,G2=16,Tfe=b2,yfe=R2,vfe=P2,Afe=C2,Ofe=N2,bfe=M2,Rfe=I2,Pfe=x2,Cfe=w2,Nfe=L2,Mfe=D2,Ife=U2,xfe=k2,wfe=B2,Lfe=F2,Dfe=V2,Ufe=G2,kfe={OK:b2,CANCELLED:R2,UNKNOWN:P2,INVALID_ARGUMENT:C2,DEADLINE_EXCEEDED:N2,NOT_FOUND:M2,ALREADY_EXISTS:I2,PERMISSION_DENIED:x2,RESOURCE_EXHAUSTED:w2,FAILED_PRECONDITION:L2,ABORTED:D2,OUT_OF_RANGE:U2,UNIMPLEMENTED:k2,INTERNAL:B2,UNAVAILABLE:F2,DATA_LOSS:V2,UNAUTHENTICATED:G2},q2="SENT",j2="RECEIVED",Bfe=q2,Ffe=j2,Vfe=ke([q2,j2])});var z2=k(()=>{H2()});var $2,Y2,W2,K2,X2,J2,Q2,Z2,ej,tj,rj,nj,ij,oj,sj,aj,cj,uj,lj,dj,pj,fj,hj,mj,_j,gj,Ej,Sj,Tj,yj,vj,Aj,Oj,bj,Rj,Pj,Cj,Nj,Mj,Ij,xj,wj,Lj,Dj,Uj,kj,Bj,Fj,Vj,Gj,qj,jj,Hj,zj,$j,Yj,Wj,Kj,Xj,Jj,Qj,Zj,eH,tH,rH,nH,iH,oH,sH,aH,cH,uH,lH,dH,pH,fH,hH,mH,_H,gH,EH,Gfe,qfe,jfe,Hfe,zfe,$fe,Yfe,Wfe,Kfe,Xfe,Jfe,Qfe,Zfe,ehe,the,rhe,nhe,ihe,ohe,she,ahe,che,uhe,lhe,dhe,phe,fhe,hhe,mhe,_he,ghe,Ehe,She,The,yhe,vhe,Ahe,Ohe,bhe,Rhe,Phe,Che,Nhe,Mhe,Ihe,xhe,whe,Lhe,Dhe,Uhe,khe,Bhe,Fhe,Vhe,Ghe,qhe,jhe,Hhe,zhe,$he,Yhe,Whe,Khe,Xhe,Jhe,Qhe,Zhe,eme,tme,rme,nme,ime,ome,sme,ame,cme,ume,lme,dme,pme,fme,hme,SH,TH,yH,vH,mme,_me,gme,Eme,Sme,AH,OH,bH,RH,PH,CH,NH,MH,IH,xH,wH,LH,DH,UH,kH,BH,FH,Tme,yme,vme,Ame,Ome,bme,Rme,Pme,Cme,Nme,Mme,Ime,xme,wme,Lme,Dme,Ume,kme,VH,GH,Bme,Fme,Vme,qH,jH,HH,zH,$H,YH,WH,Gme,qme,jme,Hme,zme,$me,Yme,Wme,KH,XH,JH,QH,ZH,e3,t3,r3,n3,i3,o3,Kme,Xme,Jme,Qme,Zme,e_e,t_e,r_e,n_e,i_e,o_e,s_e,s3,a3,c3,u3,l3,d3,p3,f3,h3,m3,a_e,c_e,u_e,l_e,d_e,p_e,f_e,h_e,m_e,__e,g_e,_3=k(()=>{PO();$2="cloud.provider",Y2="cloud.account.id",W2="cloud.region",K2="cloud.availability_zone",X2="cloud.platform",J2="aws.ecs.container.arn",Q2="aws.ecs.cluster.arn",Z2="aws.ecs.launchtype",ej="aws.ecs.task.arn",tj="aws.ecs.task.family",rj="aws.ecs.task.revision",nj="aws.eks.cluster.arn",ij="aws.log.group.names",oj="aws.log.group.arns",sj="aws.log.stream.names",aj="aws.log.stream.arns",cj="container.name",uj="container.id",lj="container.runtime",dj="container.image.name",pj="container.image.tag",fj="deployment.environment",hj="device.id",mj="device.model.identifier",_j="device.model.name",gj="faas.name",Ej="faas.id",Sj="faas.version",Tj="faas.instance",yj="faas.max_memory",vj="host.id",Aj="host.name",Oj="host.type",bj="host.arch",Rj="host.image.name",Pj="host.image.id",Cj="host.image.version",Nj="k8s.cluster.name",Mj="k8s.node.name",Ij="k8s.node.uid",xj="k8s.namespace.name",wj="k8s.pod.uid",Lj="k8s.pod.name",Dj="k8s.container.name",Uj="k8s.replicaset.uid",kj="k8s.replicaset.name",Bj="k8s.deployment.uid",Fj="k8s.deployment.name",Vj="k8s.statefulset.uid",Gj="k8s.statefulset.name",qj="k8s.daemonset.uid",jj="k8s.daemonset.name",Hj="k8s.job.uid",zj="k8s.job.name",$j="k8s.cronjob.uid",Yj="k8s.cronjob.name",Wj="os.type",Kj="os.description",Xj="os.name",Jj="os.version",Qj="process.pid",Zj="process.executable.name",eH="process.executable.path",tH="process.command",rH="process.command_line",nH="process.command_args",iH="process.owner",oH="process.runtime.name",sH="process.runtime.version",aH="process.runtime.description",cH="service.name",uH="service.namespace",lH="service.instance.id",dH="service.version",pH="telemetry.sdk.name",fH="telemetry.sdk.language",hH="telemetry.sdk.version",mH="telemetry.auto.version",_H="webengine.name",gH="webengine.version",EH="webengine.description",Gfe=$2,qfe=Y2,jfe=W2,Hfe=K2,zfe=X2,$fe=J2,Yfe=Q2,Wfe=Z2,Kfe=ej,Xfe=tj,Jfe=rj,Qfe=nj,Zfe=ij,ehe=oj,the=sj,rhe=aj,nhe=cj,ihe=uj,ohe=lj,she=dj,ahe=pj,che=fj,uhe=hj,lhe=mj,dhe=_j,phe=gj,fhe=Ej,hhe=Sj,mhe=Tj,_he=yj,ghe=vj,Ehe=Aj,She=Oj,The=bj,yhe=Rj,vhe=Pj,Ahe=Cj,Ohe=Nj,bhe=Mj,Rhe=Ij,Phe=xj,Che=wj,Nhe=Lj,Mhe=Dj,Ihe=Uj,xhe=kj,whe=Bj,Lhe=Fj,Dhe=Vj,Uhe=Gj,khe=qj,Bhe=jj,Fhe=Hj,Vhe=zj,Ghe=$j,qhe=Yj,jhe=Wj,Hhe=Kj,zhe=Xj,$he=Jj,Yhe=Qj,Whe=Zj,Khe=eH,Xhe=tH,Jhe=rH,Qhe=nH,Zhe=iH,eme=oH,tme=sH,rme=aH,nme=cH,ime=uH,ome=lH,sme=dH,ame=pH,cme=fH,ume=hH,lme=mH,dme=_H,pme=gH,fme=EH,hme=ke([$2,Y2,W2,K2,X2,J2,Q2,Z2,ej,tj,rj,nj,ij,oj,sj,aj,cj,uj,lj,dj,pj,fj,hj,mj,_j,gj,Ej,Sj,Tj,yj,vj,Aj,Oj,bj,Rj,Pj,Cj,Nj,Mj,Ij,xj,wj,Lj,Dj,Uj,kj,Bj,Fj,Vj,Gj,qj,jj,Hj,zj,$j,Yj,Wj,Kj,Xj,Jj,Qj,Zj,eH,tH,rH,nH,iH,oH,sH,aH,cH,uH,lH,dH,pH,fH,hH,mH,_H,gH,EH]),SH="alibaba_cloud",TH="aws",yH="azure",vH="gcp",mme=SH,_me=TH,gme=yH,Eme=vH,Sme=ke([SH,TH,yH,vH]),AH="alibaba_cloud_ecs",OH="alibaba_cloud_fc",bH="aws_ec2",RH="aws_ecs",PH="aws_eks",CH="aws_lambda",NH="aws_elastic_beanstalk",MH="azure_vm",IH="azure_container_instances",xH="azure_aks",wH="azure_functions",LH="azure_app_service",DH="gcp_compute_engine",UH="gcp_cloud_run",kH="gcp_kubernetes_engine",BH="gcp_cloud_functions",FH="gcp_app_engine",Tme=AH,yme=OH,vme=bH,Ame=RH,Ome=PH,bme=CH,Rme=NH,Pme=MH,Cme=IH,Nme=xH,Mme=wH,Ime=LH,xme=DH,wme=UH,Lme=kH,Dme=BH,Ume=FH,kme=ke([AH,OH,bH,RH,PH,CH,NH,MH,IH,xH,wH,LH,DH,UH,kH,BH,FH]),VH="ec2",GH="fargate",Bme=VH,Fme=GH,Vme=ke([VH,GH]),qH="amd64",jH="arm32",HH="arm64",zH="ia64",$H="ppc32",YH="ppc64",WH="x86",Gme=qH,qme=jH,jme=HH,Hme=zH,zme=$H,$me=YH,Yme=WH,Wme=ke([qH,jH,HH,zH,$H,YH,WH]),KH="windows",XH="linux",JH="darwin",QH="freebsd",ZH="netbsd",e3="openbsd",t3="dragonflybsd",r3="hpux",n3="aix",i3="solaris",o3="z_os",Kme=KH,Xme=XH,Jme=JH,Qme=QH,Zme=ZH,e_e=e3,t_e=t3,r_e=r3,n_e=n3,i_e=i3,o_e=o3,s_e=ke([KH,XH,JH,QH,ZH,e3,t3,r3,n3,i3,o3]),s3="cpp",a3="dotnet",c3="erlang",u3="go",l3="java",d3="nodejs",p3="php",f3="python",h3="ruby",m3="webjs",a_e=s3,c_e=a3,u_e=c3,l_e=u3,d_e=l3,p_e=d3,f_e=p3,h_e=f3,m_e=h3,__e=m3,g_e=ke([s3,a3,c3,u3,l3,d3,p3,f3,h3,m3])});var g3=k(()=>{_3()});var E_e,S_e,T_e,y_e,v_e,A_e,O_e,b_e,R_e,P_e,C_e,N_e,M_e,I_e,x_e,w_e,L_e,D_e,U_e,k_e,B_e,F_e,V_e,G_e,q_e,j_e,H_e,z_e,$_e,Y_e,W_e,K_e,X_e,J_e,Q_e,Z_e,ege,tge,rge,nge,ige,oge,q9e,j9e,sge,age,cge,uge,lge,dge,pge,fge,hge,mge,_ge,H9e,gge,Ege,Sge,Tge,z9e,yge,vge,Age,Oge,bge,Rge,Pge,Cge,Nge,Mge,Ige,xge,wge,Lge,Dge,$9e,Uge,kge,Bge,Fge,Vge,Gge,qge,jge,Hge,zge,$ge,Yge,Wge,Y9e,W9e,Kge,Xge,Jge,Qge,Zge,eEe,tEe,rEe,K9e,nEe,iEe,oEe,CO,NO,sEe,aEe,cEe,uEe,lEe,dEe,pEe,fEe,hEe,X9e,mEe,_Ee,J9e,gEe,EEe,Q9e,SEe,TEe,yEe,vEe,AEe,OEe,bEe,REe,PEe,CEe,NEe,MEe,IEe,E3=k(()=>{E_e="aspnetcore.diagnostics.exception.result",S_e="aborted",T_e="handled",y_e="skipped",v_e="unhandled",A_e="aspnetcore.diagnostics.handler.type",O_e="aspnetcore.rate_limiting.policy",b_e="aspnetcore.rate_limiting.result",R_e="acquired",P_e="endpoint_limiter",C_e="global_limiter",N_e="request_canceled",M_e="aspnetcore.request.is_unhandled",I_e="aspnetcore.routing.is_fallback",x_e="aspnetcore.routing.match_status",w_e="failure",L_e="success",D_e="aspnetcore.user.is_authenticated",U_e="client.address",k_e="client.port",B_e="code.column.number",F_e="code.file.path",V_e="code.function.name",G_e="code.line.number",q_e="code.stacktrace",j_e="db.collection.name",H_e="db.namespace",z_e="db.operation.batch.size",$_e="db.operation.name",Y_e="db.query.summary",W_e="db.query.text",K_e="db.response.status_code",X_e="db.stored_procedure.name",J_e="db.system.name",Q_e="mariadb",Z_e="microsoft.sql_server",ege="mysql",tge="postgresql",rge="dotnet.gc.heap.generation",nge="gen0",ige="gen1",oge="gen2",q9e="loh",j9e="poh",sge="error.type",age="_OTHER",cge="exception.escaped",uge="exception.message",lge="exception.stacktrace",dge="exception.type",pge=t=>`http.request.header.${t}`,fge="http.request.method",hge="_OTHER",mge="CONNECT",_ge="DELETE",H9e="GET",gge="HEAD",Ege="OPTIONS",Sge="PATCH",Tge="POST",z9e="PUT",yge="TRACE",vge="http.request.method_original",Age="http.request.resend_count",Oge=t=>`http.response.header.${t}`,bge="http.response.status_code",Rge="http.route",Pge="jvm.gc.action",Cge="jvm.gc.name",Nge="jvm.memory.pool.name",Mge="jvm.memory.type",Ige="heap",xge="non_heap",wge="jvm.thread.daemon",Lge="jvm.thread.state",Dge="blocked",$9e="new",Uge="runnable",kge="terminated",Bge="timed_waiting",Fge="waiting",Vge="network.local.address",Gge="network.local.port",qge="network.peer.address",jge="network.peer.port",Hge="network.protocol.name",zge="network.protocol.version",$ge="network.transport",Yge="pipe",Wge="quic",Y9e="tcp",W9e="udp",Kge="unix",Xge="network.type",Jge="ipv4",Qge="ipv6",Zge="otel.scope.name",eEe="otel.scope.version",tEe="otel.status_code",rEe="ERROR",K9e="OK",nEe="otel.status_description",iEe="server.address",oEe="server.port",CO="service.name",NO="service.version",sEe="signalr.connection.status",aEe="app_shutdown",cEe="normal_closure",uEe="timeout",lEe="signalr.transport",dEe="long_polling",pEe="server_sent_events",fEe="web_sockets",hEe="telemetry.sdk.language",X9e="cpp",mEe="dotnet",_Ee="erlang",J9e="go",gEe="java",EEe="nodejs",Q9e="php",SEe="python",TEe="ruby",yEe="rust",vEe="swift",AEe="webjs",OEe="telemetry.sdk.name",bEe="telemetry.sdk.version",REe="url.fragment",PEe="url.full",CEe="url.path",NEe="url.query",MEe="url.scheme",IEe="user_agent.original"});var xEe,wEe,LEe,DEe,UEe,kEe,BEe,FEe,VEe,GEe,qEe,jEe,HEe,zEe,$Ee,YEe,WEe,KEe,XEe,JEe,QEe,ZEe,eSe,tSe,rSe,nSe,iSe,oSe,sSe,aSe,cSe,uSe,lSe,dSe,pSe,fSe,hSe,mSe,_Se,gSe,ESe,SSe,TSe,ySe,vSe,ASe,OSe,bSe,RSe,PSe,CSe,S3=k(()=>{xEe="aspnetcore.diagnostics.exceptions",wEe="aspnetcore.rate_limiting.active_request_leases",LEe="aspnetcore.rate_limiting.queued_requests",DEe="aspnetcore.rate_limiting.request.time_in_queue",UEe="aspnetcore.rate_limiting.request_lease.duration",kEe="aspnetcore.rate_limiting.requests",BEe="aspnetcore.routing.match_attempts",FEe="db.client.operation.duration",VEe="dotnet.assembly.count",GEe="dotnet.exceptions",qEe="dotnet.gc.collections",jEe="dotnet.gc.heap.total_allocated",HEe="dotnet.gc.last_collection.heap.fragmentation.size",zEe="dotnet.gc.last_collection.heap.size",$Ee="dotnet.gc.last_collection.memory.committed_size",YEe="dotnet.gc.pause.time",WEe="dotnet.jit.compilation.time",KEe="dotnet.jit.compiled_il.size",XEe="dotnet.jit.compiled_methods",JEe="dotnet.monitor.lock_contentions",QEe="dotnet.process.cpu.count",ZEe="dotnet.process.cpu.time",eSe="dotnet.process.memory.working_set",tSe="dotnet.thread_pool.queue.length",rSe="dotnet.thread_pool.thread.count",nSe="dotnet.thread_pool.work_item.count",iSe="dotnet.timer.count",oSe="http.client.request.duration",sSe="http.server.request.duration",aSe="jvm.class.count",cSe="jvm.class.loaded",uSe="jvm.class.unloaded",lSe="jvm.cpu.count",dSe="jvm.cpu.recent_utilization",pSe="jvm.cpu.time",fSe="jvm.gc.duration",hSe="jvm.memory.committed",mSe="jvm.memory.limit",_Se="jvm.memory.used",gSe="jvm.memory.used_after_last_gc",ESe="jvm.thread.count",SSe="kestrel.active_connections",TSe="kestrel.active_tls_handshakes",ySe="kestrel.connection.duration",vSe="kestrel.queued_connections",ASe="kestrel.queued_requests",OSe="kestrel.rejected_connections",bSe="kestrel.tls_handshake.duration",RSe="kestrel.upgraded_connections",PSe="signalr.server.active_connections",CSe="signalr.server.connection.duration"});var NSe,T3=k(()=>{NSe="exception"});var Ut={};Yd(Ut,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>S_e,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>T_e,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>y_e,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>v_e,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>R_e,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>P_e,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>C_e,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>N_e,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>w_e,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>L_e,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>E_e,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>A_e,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>O_e,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>b_e,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>M_e,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>I_e,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>x_e,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>D_e,ATTR_CLIENT_ADDRESS:()=>U_e,ATTR_CLIENT_PORT:()=>k_e,ATTR_CODE_COLUMN_NUMBER:()=>B_e,ATTR_CODE_FILE_PATH:()=>F_e,ATTR_CODE_FUNCTION_NAME:()=>V_e,ATTR_CODE_LINE_NUMBER:()=>G_e,ATTR_CODE_STACKTRACE:()=>q_e,ATTR_DB_COLLECTION_NAME:()=>j_e,ATTR_DB_NAMESPACE:()=>H_e,ATTR_DB_OPERATION_BATCH_SIZE:()=>z_e,ATTR_DB_OPERATION_NAME:()=>$_e,ATTR_DB_QUERY_SUMMARY:()=>Y_e,ATTR_DB_QUERY_TEXT:()=>W_e,ATTR_DB_RESPONSE_STATUS_CODE:()=>K_e,ATTR_DB_STORED_PROCEDURE_NAME:()=>X_e,ATTR_DB_SYSTEM_NAME:()=>J_e,ATTR_DOTNET_GC_HEAP_GENERATION:()=>rge,ATTR_ERROR_TYPE:()=>sge,ATTR_EXCEPTION_ESCAPED:()=>cge,ATTR_EXCEPTION_MESSAGE:()=>uge,ATTR_EXCEPTION_STACKTRACE:()=>lge,ATTR_EXCEPTION_TYPE:()=>dge,ATTR_HTTP_REQUEST_HEADER:()=>pge,ATTR_HTTP_REQUEST_METHOD:()=>fge,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>vge,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>Age,ATTR_HTTP_RESPONSE_HEADER:()=>Oge,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>bge,ATTR_HTTP_ROUTE:()=>Rge,ATTR_JVM_GC_ACTION:()=>Pge,ATTR_JVM_GC_NAME:()=>Cge,ATTR_JVM_MEMORY_POOL_NAME:()=>Nge,ATTR_JVM_MEMORY_TYPE:()=>Mge,ATTR_JVM_THREAD_DAEMON:()=>wge,ATTR_JVM_THREAD_STATE:()=>Lge,ATTR_NETWORK_LOCAL_ADDRESS:()=>Vge,ATTR_NETWORK_LOCAL_PORT:()=>Gge,ATTR_NETWORK_PEER_ADDRESS:()=>qge,ATTR_NETWORK_PEER_PORT:()=>jge,ATTR_NETWORK_PROTOCOL_NAME:()=>Hge,ATTR_NETWORK_PROTOCOL_VERSION:()=>zge,ATTR_NETWORK_TRANSPORT:()=>$ge,ATTR_NETWORK_TYPE:()=>Xge,ATTR_OTEL_SCOPE_NAME:()=>Zge,ATTR_OTEL_SCOPE_VERSION:()=>eEe,ATTR_OTEL_STATUS_CODE:()=>tEe,ATTR_OTEL_STATUS_DESCRIPTION:()=>nEe,ATTR_SERVER_ADDRESS:()=>iEe,ATTR_SERVER_PORT:()=>oEe,ATTR_SERVICE_NAME:()=>CO,ATTR_SERVICE_VERSION:()=>NO,ATTR_SIGNALR_CONNECTION_STATUS:()=>sEe,ATTR_SIGNALR_TRANSPORT:()=>lEe,ATTR_TELEMETRY_SDK_LANGUAGE:()=>hEe,ATTR_TELEMETRY_SDK_NAME:()=>OEe,ATTR_TELEMETRY_SDK_VERSION:()=>bEe,ATTR_URL_FRAGMENT:()=>REe,ATTR_URL_FULL:()=>PEe,ATTR_URL_PATH:()=>CEe,ATTR_URL_QUERY:()=>NEe,ATTR_URL_SCHEME:()=>MEe,ATTR_USER_AGENT_ORIGINAL:()=>IEe,AWSECSLAUNCHTYPEVALUES_EC2:()=>Bme,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>Fme,AwsEcsLaunchtypeValues:()=>Vme,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>Tme,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>yme,CLOUDPLATFORMVALUES_AWS_EC2:()=>vme,CLOUDPLATFORMVALUES_AWS_ECS:()=>Ame,CLOUDPLATFORMVALUES_AWS_EKS:()=>Ome,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>Rme,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>bme,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Nme,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Ime,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>Cme,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>Mme,CLOUDPLATFORMVALUES_AZURE_VM:()=>Pme,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>Ume,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>Dme,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>wme,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>xme,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>Lme,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>mme,CLOUDPROVIDERVALUES_AWS:()=>_me,CLOUDPROVIDERVALUES_AZURE:()=>gme,CLOUDPROVIDERVALUES_GCP:()=>Eme,CloudPlatformValues:()=>kme,CloudProviderValues:()=>Sme,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>Zde,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>ape,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>epe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>spe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>rpe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>upe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>npe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>tpe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>cpe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>ope,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>ipe,DBSYSTEMVALUES_ADABAS:()=>vde,DBSYSTEMVALUES_CACHE:()=>yde,DBSYSTEMVALUES_CASSANDRA:()=>Fde,DBSYSTEMVALUES_CLOUDSCAPE:()=>fde,DBSYSTEMVALUES_COCKROACHDB:()=>Jde,DBSYSTEMVALUES_COLDFUSION:()=>Bde,DBSYSTEMVALUES_COSMOSDB:()=>zde,DBSYSTEMVALUES_COUCHBASE:()=>jde,DBSYSTEMVALUES_COUCHDB:()=>Hde,DBSYSTEMVALUES_DB2:()=>ude,DBSYSTEMVALUES_DERBY:()=>Ode,DBSYSTEMVALUES_DYNAMODB:()=>$de,DBSYSTEMVALUES_EDB:()=>Tde,DBSYSTEMVALUES_ELASTICSEARCH:()=>Kde,DBSYSTEMVALUES_FILEMAKER:()=>bde,DBSYSTEMVALUES_FIREBIRD:()=>Ade,DBSYSTEMVALUES_FIRSTSQL:()=>Sde,DBSYSTEMVALUES_GEODE:()=>Wde,DBSYSTEMVALUES_H2:()=>kde,DBSYSTEMVALUES_HANADB:()=>gde,DBSYSTEMVALUES_HBASE:()=>Vde,DBSYSTEMVALUES_HIVE:()=>pde,DBSYSTEMVALUES_HSQLDB:()=>hde,DBSYSTEMVALUES_INFORMIX:()=>Rde,DBSYSTEMVALUES_INGRES:()=>Ede,DBSYSTEMVALUES_INSTANTDB:()=>Pde,DBSYSTEMVALUES_INTERBASE:()=>Cde,DBSYSTEMVALUES_MARIADB:()=>Nde,DBSYSTEMVALUES_MAXDB:()=>_de,DBSYSTEMVALUES_MEMCACHED:()=>Xde,DBSYSTEMVALUES_MONGODB:()=>Gde,DBSYSTEMVALUES_MSSQL:()=>sde,DBSYSTEMVALUES_MYSQL:()=>ade,DBSYSTEMVALUES_NEO4J:()=>Yde,DBSYSTEMVALUES_NETEZZA:()=>Mde,DBSYSTEMVALUES_ORACLE:()=>cde,DBSYSTEMVALUES_OTHER_SQL:()=>ode,DBSYSTEMVALUES_PERVASIVE:()=>Ide,DBSYSTEMVALUES_POINTBASE:()=>xde,DBSYSTEMVALUES_POSTGRESQL:()=>lde,DBSYSTEMVALUES_PROGRESS:()=>mde,DBSYSTEMVALUES_REDIS:()=>qde,DBSYSTEMVALUES_REDSHIFT:()=>dde,DBSYSTEMVALUES_SQLITE:()=>wde,DBSYSTEMVALUES_SYBASE:()=>Lde,DBSYSTEMVALUES_TERADATA:()=>Dde,DBSYSTEMVALUES_VERTICA:()=>Ude,DB_SYSTEM_NAME_VALUE_MARIADB:()=>Q_e,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>Z_e,DB_SYSTEM_NAME_VALUE_MYSQL:()=>ege,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>tge,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>nge,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>ige,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>oge,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>q9e,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>j9e,DbCassandraConsistencyLevelValues:()=>lpe,DbSystemValues:()=>Qde,ERROR_TYPE_VALUE_OTHER:()=>age,EVENT_EXCEPTION:()=>NSe,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>Spe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>Epe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>gpe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>ype,FAASINVOKEDPROVIDERVALUES_AWS:()=>vpe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Ape,FAASINVOKEDPROVIDERVALUES_GCP:()=>Ope,FAASTRIGGERVALUES_DATASOURCE:()=>dpe,FAASTRIGGERVALUES_HTTP:()=>ppe,FAASTRIGGERVALUES_OTHER:()=>mpe,FAASTRIGGERVALUES_PUBSUB:()=>fpe,FAASTRIGGERVALUES_TIMER:()=>hpe,FaasDocumentOperationValues:()=>Tpe,FaasInvokedProviderValues:()=>bpe,FaasTriggerValues:()=>_pe,HOSTARCHVALUES_AMD64:()=>Gme,HOSTARCHVALUES_ARM32:()=>qme,HOSTARCHVALUES_ARM64:()=>jme,HOSTARCHVALUES_IA64:()=>Hme,HOSTARCHVALUES_PPC32:()=>zme,HOSTARCHVALUES_PPC64:()=>$me,HOSTARCHVALUES_X86:()=>Yme,HTTPFLAVORVALUES_HTTP_1_0:()=>cfe,HTTPFLAVORVALUES_HTTP_1_1:()=>ufe,HTTPFLAVORVALUES_HTTP_2_0:()=>lfe,HTTPFLAVORVALUES_QUIC:()=>pfe,HTTPFLAVORVALUES_SPDY:()=>dfe,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>mge,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>_ge,HTTP_REQUEST_METHOD_VALUE_GET:()=>H9e,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>gge,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>Ege,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>hge,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>Sge,HTTP_REQUEST_METHOD_VALUE_POST:()=>Tge,HTTP_REQUEST_METHOD_VALUE_PUT:()=>z9e,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>yge,HostArchValues:()=>Wme,HttpFlavorValues:()=>ffe,JVM_MEMORY_TYPE_VALUE_HEAP:()=>Ige,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>xge,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Dge,JVM_THREAD_STATE_VALUE_NEW:()=>$9e,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Uge,JVM_THREAD_STATE_VALUE_TERMINATED:()=>kge,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>Bge,JVM_THREAD_STATE_VALUE_WAITING:()=>Fge,MESSAGETYPEVALUES_RECEIVED:()=>Ffe,MESSAGETYPEVALUES_SENT:()=>Bfe,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>hfe,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>mfe,MESSAGINGOPERATIONVALUES_PROCESS:()=>Efe,MESSAGINGOPERATIONVALUES_RECEIVE:()=>gfe,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>xEe,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>wEe,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>LEe,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>kEe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>UEe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>DEe,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>BEe,METRIC_DB_CLIENT_OPERATION_DURATION:()=>FEe,METRIC_DOTNET_ASSEMBLY_COUNT:()=>VEe,METRIC_DOTNET_EXCEPTIONS:()=>GEe,METRIC_DOTNET_GC_COLLECTIONS:()=>qEe,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>jEe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>HEe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>zEe,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>$Ee,METRIC_DOTNET_GC_PAUSE_TIME:()=>YEe,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>WEe,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>KEe,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>XEe,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>JEe,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>QEe,METRIC_DOTNET_PROCESS_CPU_TIME:()=>ZEe,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>eSe,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>tSe,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>rSe,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>nSe,METRIC_DOTNET_TIMER_COUNT:()=>iSe,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>oSe,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>sSe,METRIC_JVM_CLASS_COUNT:()=>aSe,METRIC_JVM_CLASS_LOADED:()=>cSe,METRIC_JVM_CLASS_UNLOADED:()=>uSe,METRIC_JVM_CPU_COUNT:()=>lSe,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>dSe,METRIC_JVM_CPU_TIME:()=>pSe,METRIC_JVM_GC_DURATION:()=>fSe,METRIC_JVM_MEMORY_COMMITTED:()=>hSe,METRIC_JVM_MEMORY_LIMIT:()=>mSe,METRIC_JVM_MEMORY_USED:()=>_Se,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>gSe,METRIC_JVM_THREAD_COUNT:()=>ESe,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>SSe,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>TSe,METRIC_KESTREL_CONNECTION_DURATION:()=>ySe,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>vSe,METRIC_KESTREL_QUEUED_REQUESTS:()=>ASe,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>OSe,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>bSe,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>RSe,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>PSe,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>CSe,MessageTypeValues:()=>Vfe,MessagingDestinationKindValues:()=>_fe,MessagingOperationValues:()=>Sfe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>jpe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>$pe,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>Gpe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>Zpe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>Hpe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>zpe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>Jpe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>Vpe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>tfe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>Ype,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>Kpe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>efe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>Wpe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>Xpe,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>nfe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>Qpe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>sfe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>ife,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>ofe,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>rfe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>qpe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>Upe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>kpe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>Bpe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>Lpe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>Dpe,NETTRANSPORTVALUES_INPROC:()=>Ipe,NETTRANSPORTVALUES_IP:()=>Cpe,NETTRANSPORTVALUES_IP_TCP:()=>Rpe,NETTRANSPORTVALUES_IP_UDP:()=>Ppe,NETTRANSPORTVALUES_OTHER:()=>xpe,NETTRANSPORTVALUES_PIPE:()=>Mpe,NETTRANSPORTVALUES_UNIX:()=>Npe,NETWORK_TRANSPORT_VALUE_PIPE:()=>Yge,NETWORK_TRANSPORT_VALUE_QUIC:()=>Wge,NETWORK_TRANSPORT_VALUE_TCP:()=>Y9e,NETWORK_TRANSPORT_VALUE_UDP:()=>W9e,NETWORK_TRANSPORT_VALUE_UNIX:()=>Kge,NETWORK_TYPE_VALUE_IPV4:()=>Jge,NETWORK_TYPE_VALUE_IPV6:()=>Qge,NetHostConnectionSubtypeValues:()=>afe,NetHostConnectionTypeValues:()=>Fpe,NetTransportValues:()=>wpe,OSTYPEVALUES_AIX:()=>n_e,OSTYPEVALUES_DARWIN:()=>Jme,OSTYPEVALUES_DRAGONFLYBSD:()=>t_e,OSTYPEVALUES_FREEBSD:()=>Qme,OSTYPEVALUES_HPUX:()=>r_e,OSTYPEVALUES_LINUX:()=>Xme,OSTYPEVALUES_NETBSD:()=>Zme,OSTYPEVALUES_OPENBSD:()=>e_e,OSTYPEVALUES_SOLARIS:()=>i_e,OSTYPEVALUES_WINDOWS:()=>Kme,OSTYPEVALUES_Z_OS:()=>o_e,OTEL_STATUS_CODE_VALUE_ERROR:()=>rEe,OTEL_STATUS_CODE_VALUE_OK:()=>K9e,OsTypeValues:()=>s_e,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>Mfe,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>Rfe,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>yfe,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>Dfe,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>Ofe,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>Nfe,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>wfe,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>Afe,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>bfe,RPCGRPCSTATUSCODEVALUES_OK:()=>Tfe,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>Ife,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>Pfe,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>Cfe,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>Ufe,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>Lfe,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>xfe,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>vfe,RpcGrpcStatusCodeValues:()=>kfe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>fle,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>ble,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>lle,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>sle,SEMATTRS_AWS_DYNAMODB_COUNT:()=>Ale,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>Ele,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>_le,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>Rle,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>hle,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>ale,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>ple,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>gle,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>dle,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>cle,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>ule,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>Ole,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>Tle,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>yle,SEMATTRS_AWS_DYNAMODB_SELECT:()=>mle,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>Sle,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>ole,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>vle,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>Bce,SEMATTRS_CODE_FILEPATH:()=>que,SEMATTRS_CODE_FUNCTION:()=>Vue,SEMATTRS_CODE_LINENO:()=>jue,SEMATTRS_CODE_NAMESPACE:()=>Gue,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>Kce,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>eue,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>Zce,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>Jce,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>Yce,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>Wce,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>Qce,SEMATTRS_DB_CASSANDRA_TABLE:()=>Xce,SEMATTRS_DB_CONNECTION_STRING:()=>Vce,SEMATTRS_DB_HBASE_NAMESPACE:()=>tue,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>qce,SEMATTRS_DB_MONGODB_COLLECTION:()=>nue,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>$ce,SEMATTRS_DB_NAME:()=>jce,SEMATTRS_DB_OPERATION:()=>zce,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>rue,SEMATTRS_DB_SQL_TABLE:()=>iue,SEMATTRS_DB_STATEMENT:()=>Hce,SEMATTRS_DB_SYSTEM:()=>Fce,SEMATTRS_DB_USER:()=>Gce,SEMATTRS_ENDUSER_ID:()=>Due,SEMATTRS_ENDUSER_ROLE:()=>Uue,SEMATTRS_ENDUSER_SCOPE:()=>kue,SEMATTRS_EXCEPTION_ESCAPED:()=>cue,SEMATTRS_EXCEPTION_MESSAGE:()=>sue,SEMATTRS_EXCEPTION_STACKTRACE:()=>aue,SEMATTRS_EXCEPTION_TYPE:()=>oue,SEMATTRS_FAAS_COLDSTART:()=>gue,SEMATTRS_FAAS_CRON:()=>_ue,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>due,SEMATTRS_FAAS_DOCUMENT_NAME:()=>hue,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>pue,SEMATTRS_FAAS_DOCUMENT_TIME:()=>fue,SEMATTRS_FAAS_EXECUTION:()=>lue,SEMATTRS_FAAS_INVOKED_NAME:()=>Eue,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>Sue,SEMATTRS_FAAS_INVOKED_REGION:()=>Tue,SEMATTRS_FAAS_TIME:()=>mue,SEMATTRS_FAAS_TRIGGER:()=>uue,SEMATTRS_HTTP_CLIENT_IP:()=>ile,SEMATTRS_HTTP_FLAVOR:()=>Xue,SEMATTRS_HTTP_HOST:()=>Yue,SEMATTRS_HTTP_METHOD:()=>Hue,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>Que,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>Zue,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>ele,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>tle,SEMATTRS_HTTP_ROUTE:()=>nle,SEMATTRS_HTTP_SCHEME:()=>Wue,SEMATTRS_HTTP_SERVER_NAME:()=>rle,SEMATTRS_HTTP_STATUS_CODE:()=>Kue,SEMATTRS_HTTP_TARGET:()=>$ue,SEMATTRS_HTTP_URL:()=>zue,SEMATTRS_HTTP_USER_AGENT:()=>Jue,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>rde,SEMATTRS_MESSAGE_ID:()=>tde,SEMATTRS_MESSAGE_TYPE:()=>ede,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>nde,SEMATTRS_MESSAGING_CONSUMER_ID:()=>Fle,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>Dle,SEMATTRS_MESSAGING_DESTINATION:()=>Cle,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>Nle,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>jle,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>qle,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>Gle,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>Hle,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>zle,SEMATTRS_MESSAGING_MESSAGE_ID:()=>Lle,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>kle,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>Ule,SEMATTRS_MESSAGING_OPERATION:()=>Ble,SEMATTRS_MESSAGING_PROTOCOL:()=>Ile,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>xle,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>Vle,SEMATTRS_MESSAGING_SYSTEM:()=>Ple,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>Mle,SEMATTRS_MESSAGING_URL:()=>wle,SEMATTRS_NET_HOST_CARRIER_ICC:()=>wue,SEMATTRS_NET_HOST_CARRIER_MCC:()=>Iue,SEMATTRS_NET_HOST_CARRIER_MNC:()=>xue,SEMATTRS_NET_HOST_CARRIER_NAME:()=>Mue,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>Nue,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>Cue,SEMATTRS_NET_HOST_IP:()=>bue,SEMATTRS_NET_HOST_NAME:()=>Pue,SEMATTRS_NET_HOST_PORT:()=>Rue,SEMATTRS_NET_PEER_IP:()=>vue,SEMATTRS_NET_PEER_NAME:()=>Oue,SEMATTRS_NET_PEER_PORT:()=>Aue,SEMATTRS_NET_TRANSPORT:()=>yue,SEMATTRS_PEER_SERVICE:()=>Lue,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>Kle,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>Qle,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>Zle,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>Jle,SEMATTRS_RPC_JSONRPC_VERSION:()=>Xle,SEMATTRS_RPC_METHOD:()=>Wle,SEMATTRS_RPC_SERVICE:()=>Yle,SEMATTRS_RPC_SYSTEM:()=>$le,SEMATTRS_THREAD_ID:()=>Bue,SEMATTRS_THREAD_NAME:()=>Fue,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>Yfe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>$fe,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>Wfe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>Kfe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>Xfe,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>Jfe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>Qfe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>ehe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>Zfe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>rhe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>the,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>qfe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>Hfe,SEMRESATTRS_CLOUD_PLATFORM:()=>zfe,SEMRESATTRS_CLOUD_PROVIDER:()=>Gfe,SEMRESATTRS_CLOUD_REGION:()=>jfe,SEMRESATTRS_CONTAINER_ID:()=>ihe,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>she,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>ahe,SEMRESATTRS_CONTAINER_NAME:()=>nhe,SEMRESATTRS_CONTAINER_RUNTIME:()=>ohe,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>che,SEMRESATTRS_DEVICE_ID:()=>uhe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>lhe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>dhe,SEMRESATTRS_FAAS_ID:()=>fhe,SEMRESATTRS_FAAS_INSTANCE:()=>mhe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>_he,SEMRESATTRS_FAAS_NAME:()=>phe,SEMRESATTRS_FAAS_VERSION:()=>hhe,SEMRESATTRS_HOST_ARCH:()=>The,SEMRESATTRS_HOST_ID:()=>ghe,SEMRESATTRS_HOST_IMAGE_ID:()=>vhe,SEMRESATTRS_HOST_IMAGE_NAME:()=>yhe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>Ahe,SEMRESATTRS_HOST_NAME:()=>Ehe,SEMRESATTRS_HOST_TYPE:()=>She,SEMRESATTRS_K8S_CLUSTER_NAME:()=>Ohe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>Mhe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>qhe,SEMRESATTRS_K8S_CRONJOB_UID:()=>Ghe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>Bhe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>khe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>Lhe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>whe,SEMRESATTRS_K8S_JOB_NAME:()=>Vhe,SEMRESATTRS_K8S_JOB_UID:()=>Fhe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>Phe,SEMRESATTRS_K8S_NODE_NAME:()=>bhe,SEMRESATTRS_K8S_NODE_UID:()=>Rhe,SEMRESATTRS_K8S_POD_NAME:()=>Nhe,SEMRESATTRS_K8S_POD_UID:()=>Che,SEMRESATTRS_K8S_REPLICASET_NAME:()=>xhe,SEMRESATTRS_K8S_REPLICASET_UID:()=>Ihe,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>Uhe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>Dhe,SEMRESATTRS_OS_DESCRIPTION:()=>Hhe,SEMRESATTRS_OS_NAME:()=>zhe,SEMRESATTRS_OS_TYPE:()=>jhe,SEMRESATTRS_OS_VERSION:()=>$he,SEMRESATTRS_PROCESS_COMMAND:()=>Xhe,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>Qhe,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>Jhe,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>Whe,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>Khe,SEMRESATTRS_PROCESS_OWNER:()=>Zhe,SEMRESATTRS_PROCESS_PID:()=>Yhe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>rme,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>eme,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>tme,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>ome,SEMRESATTRS_SERVICE_NAME:()=>nme,SEMRESATTRS_SERVICE_NAMESPACE:()=>ime,SEMRESATTRS_SERVICE_VERSION:()=>sme,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>lme,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>cme,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>ame,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>ume,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>fme,SEMRESATTRS_WEBENGINE_NAME:()=>dme,SEMRESATTRS_WEBENGINE_VERSION:()=>pme,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>aEe,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>cEe,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>uEe,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>dEe,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>pEe,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>fEe,SemanticAttributes:()=>ide,SemanticResourceAttributes:()=>hme,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>a_e,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>c_e,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>u_e,TELEMETRYSDKLANGUAGEVALUES_GO:()=>l_e,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>d_e,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>p_e,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>f_e,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>h_e,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>m_e,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>__e,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>X9e,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>mEe,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>_Ee,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>J9e,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>gEe,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>EEe,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Q9e,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>SEe,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>TEe,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>yEe,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>vEe,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>AEe,TelemetrySdkLanguageValues:()=>g_e});var vt=k(()=>{z2();g3();E3();S3();T3()});var y3=p(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.ATTR_PROCESS_RUNTIME_NAME=void 0;Pf.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var v3=p(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.SDK_INFO=void 0;var MSe=eF(),Cf=(vt(),y(Ut)),ISe=y3();Nf.SDK_INFO={[Cf.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[ISe.ATTR_PROCESS_RUNTIME_NAME]:"node",[Cf.ATTR_TELEMETRY_SDK_LANGUAGE]:Cf.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[Cf.ATTR_TELEMETRY_SDK_VERSION]:MSe.VERSION}});var A3=p(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.unrefTimer=void 0;function xSe(t){t.unref()}Mf.unrefTimer=xSe});var O3=p(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.unrefTimer=Ze.SDK_INFO=Ze.otperformance=Ze._globalThis=Ze.getStringListFromEnv=Ze.getNumberFromEnv=Ze.getBooleanFromEnv=Ze.getStringFromEnv=void 0;var If=JB();Object.defineProperty(Ze,"getStringFromEnv",{enumerable:!0,get:function(){return If.getStringFromEnv}});Object.defineProperty(Ze,"getBooleanFromEnv",{enumerable:!0,get:function(){return If.getBooleanFromEnv}});Object.defineProperty(Ze,"getNumberFromEnv",{enumerable:!0,get:function(){return If.getNumberFromEnv}});Object.defineProperty(Ze,"getStringListFromEnv",{enumerable:!0,get:function(){return If.getStringListFromEnv}});var wSe=QB();Object.defineProperty(Ze,"_globalThis",{enumerable:!0,get:function(){return wSe._globalThis}});var LSe=ZB();Object.defineProperty(Ze,"otperformance",{enumerable:!0,get:function(){return LSe.otperformance}});var DSe=v3();Object.defineProperty(Ze,"SDK_INFO",{enumerable:!0,get:function(){return DSe.SDK_INFO}});var USe=A3();Object.defineProperty(Ze,"unrefTimer",{enumerable:!0,get:function(){return USe.unrefTimer}})});var MO=p(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.getStringListFromEnv=et.getNumberFromEnv=et.getStringFromEnv=et.getBooleanFromEnv=et.unrefTimer=et.otperformance=et._globalThis=et.SDK_INFO=void 0;var Hi=O3();Object.defineProperty(et,"SDK_INFO",{enumerable:!0,get:function(){return Hi.SDK_INFO}});Object.defineProperty(et,"_globalThis",{enumerable:!0,get:function(){return Hi._globalThis}});Object.defineProperty(et,"otperformance",{enumerable:!0,get:function(){return Hi.otperformance}});Object.defineProperty(et,"unrefTimer",{enumerable:!0,get:function(){return Hi.unrefTimer}});Object.defineProperty(et,"getBooleanFromEnv",{enumerable:!0,get:function(){return Hi.getBooleanFromEnv}});Object.defineProperty(et,"getStringFromEnv",{enumerable:!0,get:function(){return Hi.getStringFromEnv}});Object.defineProperty(et,"getNumberFromEnv",{enumerable:!0,get:function(){return Hi.getNumberFromEnv}});Object.defineProperty(et,"getStringListFromEnv",{enumerable:!0,get:function(){return Hi.getStringListFromEnv}})});var C3=p(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.addHrTimes=ye.isTimeInput=ye.isTimeInputHrTime=ye.hrTimeToMicroseconds=ye.hrTimeToMilliseconds=ye.hrTimeToNanoseconds=ye.hrTimeToTimeStamp=ye.hrTimeDuration=ye.timeInputToHrTime=ye.hrTime=ye.getTimeOrigin=ye.millisToHrTime=void 0;var IO=MO(),b3=9,kSe=6,BSe=Math.pow(10,kSe),xf=Math.pow(10,b3);function Lu(t){let e=t/1e3,r=Math.trunc(e),o=Math.round(t%1e3*BSe);return[r,o]}ye.millisToHrTime=Lu;function xO(){let t=IO.otperformance.timeOrigin;if(typeof t!="number"){let e=IO.otperformance;t=e.timing&&e.timing.fetchStart}return t}ye.getTimeOrigin=xO;function R3(t){let e=Lu(xO()),r=Lu(typeof t=="number"?t:IO.otperformance.now());return P3(e,r)}ye.hrTime=R3;function FSe(t){if(wO(t))return t;if(typeof t=="number")return t<xO()?R3(t):Lu(t);if(t instanceof Date)return Lu(t.getTime());throw TypeError("Invalid input type")}ye.timeInputToHrTime=FSe;function VSe(t,e){let r=e[0]-t[0],o=e[1]-t[1];return o<0&&(r-=1,o+=xf),[r,o]}ye.hrTimeDuration=VSe;function GSe(t){let e=b3,r=`${"0".repeat(e)}${t[1]}Z`,o=r.substring(r.length-e-1);return new Date(t[0]*1e3).toISOString().replace("000Z",o)}ye.hrTimeToTimeStamp=GSe;function qSe(t){return t[0]*xf+t[1]}ye.hrTimeToNanoseconds=qSe;function jSe(t){return t[0]*1e3+t[1]/1e6}ye.hrTimeToMilliseconds=jSe;function HSe(t){return t[0]*1e6+t[1]/1e3}ye.hrTimeToMicroseconds=HSe;function wO(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}ye.isTimeInputHrTime=wO;function zSe(t){return wO(t)||typeof t=="number"||t instanceof Date}ye.isTimeInput=zSe;function P3(t,e){let r=[t[0]+e[0],t[1]+e[1]];return r[1]>=xf&&(r[1]-=xf,r[0]+=1),r}ye.addHrTimes=P3});var N3=p(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.ExportResultCode=void 0;var $Se;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})($Se=Du.ExportResultCode||(Du.ExportResultCode={}))});var I3=p(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.CompositePropagator=void 0;var M3=(R(),y(C)),LO=class{_propagators;_fields;constructor(e={}){this._propagators=e.propagators??[],this._fields=Array.from(new Set(this._propagators.map(r=>typeof r.fields=="function"?r.fields():[]).reduce((r,o)=>r.concat(o),[])))}inject(e,r,o){for(let s of this._propagators)try{s.inject(e,r,o)}catch(a){M3.diag.warn(`Failed to inject with ${s.constructor.name}. Err: ${a.message}`)}}extract(e,r,o){return this._propagators.reduce((s,a)=>{try{return a.extract(s,r,o)}catch(i){M3.diag.warn(`Failed to extract with ${a.constructor.name}. Err: ${i.message}`)}return s},e)}fields(){return this._fields.slice()}};wf.CompositePropagator=LO});var x3=p(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.validateValue=da.validateKey=void 0;var DO="[_0-9a-z-*/]",YSe=`[a-z]${DO}{0,255}`,WSe=`[a-z0-9]${DO}{0,240}@[a-z]${DO}{0,13}`,KSe=new RegExp(`^(?:${YSe}|${WSe})$`),XSe=/^[ -~]{0,255}[!-~]$/,JSe=/,|=/;function QSe(t){return KSe.test(t)}da.validateKey=QSe;function ZSe(t){return XSe.test(t)&&!JSe.test(t)}da.validateValue=ZSe});var kO=p(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.TraceState=void 0;var w3=x3(),L3=32,eTe=512,D3=",",U3="=",UO=class t{_internalState=new Map;constructor(e){e&&this._parse(e)}set(e,r){let o=this._clone();return o._internalState.has(e)&&o._internalState.delete(e),o._internalState.set(e,r),o}unset(e){let r=this._clone();return r._internalState.delete(e),r}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,r)=>(e.push(r+U3+this.get(r)),e),[]).join(D3)}_parse(e){e.length>eTe||(this._internalState=e.split(D3).reverse().reduce((r,o)=>{let s=o.trim(),a=s.indexOf(U3);if(a!==-1){let i=s.slice(0,a),n=s.slice(a+1,o.length);(0,w3.validateKey)(i)&&(0,w3.validateValue)(n)&&r.set(i,n)}return r},new Map),this._internalState.size>L3&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,L3))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new t;return e._internalState=new Map(this._internalState),e}};Lf.TraceState=UO});var B3=p(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.W3CTraceContextPropagator=At.parseTraceParent=At.TRACE_STATE_HEADER=At.TRACE_PARENT_HEADER=void 0;var Df=(R(),y(C)),tTe=wu(),rTe=kO();At.TRACE_PARENT_HEADER="traceparent";At.TRACE_STATE_HEADER="tracestate";var nTe="00",iTe="(?!ff)[\\da-f]{2}",oTe="(?![0]{32})[\\da-f]{32}",sTe="(?![0]{16})[\\da-f]{16}",aTe="[\\da-f]{2}",cTe=new RegExp(`^\\s?(${iTe})-(${oTe})-(${sTe})-(${aTe})(-.*)?\\s?$`);function k3(t){let e=cTe.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}At.parseTraceParent=k3;var BO=class{inject(e,r,o){let s=Df.trace.getSpanContext(e);if(!s||(0,tTe.isTracingSuppressed)(e)||!(0,Df.isSpanContextValid)(s))return;let a=`${nTe}-${s.traceId}-${s.spanId}-0${Number(s.traceFlags||Df.TraceFlags.NONE).toString(16)}`;o.set(r,At.TRACE_PARENT_HEADER,a),s.traceState&&o.set(r,At.TRACE_STATE_HEADER,s.traceState.serialize())}extract(e,r,o){let s=o.get(r,At.TRACE_PARENT_HEADER);if(!s)return e;let a=Array.isArray(s)?s[0]:s;if(typeof a!="string")return e;let i=k3(a);if(!i)return e;i.isRemote=!0;let n=o.get(r,At.TRACE_STATE_HEADER);if(n){let c=Array.isArray(n)?n.join(","):n;i.traceState=new rTe.TraceState(typeof c=="string"?c:void 0)}return Df.trace.setSpanContext(e,i)}fields(){return[At.TRACE_PARENT_HEADER,At.TRACE_STATE_HEADER]}};At.W3CTraceContextPropagator=BO});var F3=p(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.getRPCMetadata=Gr.deleteRPCMetadata=Gr.setRPCMetadata=Gr.RPCType=void 0;var uTe=(R(),y(C)),FO=(0,uTe.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),lTe;(function(t){t.HTTP="http"})(lTe=Gr.RPCType||(Gr.RPCType={}));function dTe(t,e){return t.setValue(FO,e)}Gr.setRPCMetadata=dTe;function pTe(t){return t.deleteValue(FO)}Gr.deleteRPCMetadata=pTe;function fTe(t){return t.getValue(FO)}Gr.getRPCMetadata=fTe});var H3=p(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.isPlainObject=void 0;var hTe="[object Object]",mTe="[object Null]",_Te="[object Undefined]",gTe=Function.prototype,V3=gTe.toString,ETe=V3.call(Object),STe=Object.getPrototypeOf,G3=Object.prototype,q3=G3.hasOwnProperty,Fo=Symbol?Symbol.toStringTag:void 0,j3=G3.toString;function TTe(t){if(!yTe(t)||vTe(t)!==hTe)return!1;let e=STe(t);if(e===null)return!0;let r=q3.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&V3.call(r)===ETe}Uf.isPlainObject=TTe;function yTe(t){return t!=null&&typeof t=="object"}function vTe(t){return t==null?t===void 0?_Te:mTe:Fo&&Fo in Object(t)?ATe(t):OTe(t)}function ATe(t){let e=q3.call(t,Fo),r=t[Fo],o=!1;try{t[Fo]=void 0,o=!0}catch{}let s=j3.call(t);return o&&(e?t[Fo]=r:delete t[Fo]),s}function OTe(t){return j3.call(t)}});var K3=p(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.merge=void 0;var z3=H3(),bTe=20;function RTe(...t){let e=t.shift(),r=new WeakMap;for(;t.length>0;)e=Y3(e,t.shift(),0,r);return e}Ff.merge=RTe;function VO(t){return Bf(t)?t.slice():t}function Y3(t,e,r=0,o){let s;if(!(r>bTe)){if(r++,kf(t)||kf(e)||W3(e))s=VO(e);else if(Bf(t)){if(s=t.slice(),Bf(e))for(let a=0,i=e.length;a<i;a++)s.push(VO(e[a]));else if(Uu(e)){let a=Object.keys(e);for(let i=0,n=a.length;i<n;i++){let c=a[i];s[c]=VO(e[c])}}}else if(Uu(t))if(Uu(e)){if(!PTe(t,e))return e;s=Object.assign({},t);let a=Object.keys(e);for(let i=0,n=a.length;i<n;i++){let c=a[i],u=e[c];if(kf(u))typeof u>"u"?delete s[c]:s[c]=u;else{let l=s[c],d=u;if($3(t,c,o)||$3(e,c,o))delete s[c];else{if(Uu(l)&&Uu(d)){let h=o.get(l)||[],g=o.get(d)||[];h.push({obj:t,key:c}),g.push({obj:e,key:c}),o.set(l,h),o.set(d,g)}s[c]=Y3(s[c],u,r,o)}}}}else s=e;return s}}function $3(t,e,r){let o=r.get(t[e])||[];for(let s=0,a=o.length;s<a;s++){let i=o[s];if(i.key===e&&i.obj===t)return!0}return!1}function Bf(t){return Array.isArray(t)}function W3(t){return typeof t=="function"}function Uu(t){return!kf(t)&&!Bf(t)&&!W3(t)&&typeof t=="object"}function kf(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function PTe(t,e){return!(!(0,z3.isPlainObject)(t)||!(0,z3.isPlainObject)(e))}});var X3=p(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.callWithTimeout=pa.TimeoutError=void 0;var Vf=class t extends Error{constructor(e){super(e),Object.setPrototypeOf(this,t.prototype)}};pa.TimeoutError=Vf;function CTe(t,e){let r,o=new Promise(function(a,i){r=setTimeout(function(){i(new Vf("Operation timed out."))},e)});return Promise.race([t,o]).then(s=>(clearTimeout(r),s),s=>{throw clearTimeout(r),s})}pa.callWithTimeout=CTe});var Q3=p(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.isUrlIgnored=fa.urlMatches=void 0;function J3(t,e){return typeof e=="string"?t===e:!!t.match(e)}fa.urlMatches=J3;function NTe(t,e){if(!e)return!1;for(let r of e)if(J3(t,r))return!0;return!1}fa.isUrlIgnored=NTe});var Z3=p(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.Deferred=void 0;var GO=class{_promise;_resolve;_reject;constructor(){this._promise=new Promise((e,r)=>{this._resolve=e,this._reject=r})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}};Gf.Deferred=GO});var ez=p(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.BindOnceFuture=void 0;var MTe=Z3(),qO=class{_callback;_that;_isCalled=!1;_deferred=new MTe.Deferred;constructor(e,r){this._callback=e,this._that=r}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(r=>this._deferred.resolve(r),r=>this._deferred.reject(r))}catch(r){this._deferred.reject(r)}}return this._deferred.promise}};qf.BindOnceFuture=qO});var rz=p(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.diagLogLevelFromString=void 0;var mi=(R(),y(C)),tz={ALL:mi.DiagLogLevel.ALL,VERBOSE:mi.DiagLogLevel.VERBOSE,DEBUG:mi.DiagLogLevel.DEBUG,INFO:mi.DiagLogLevel.INFO,WARN:mi.DiagLogLevel.WARN,ERROR:mi.DiagLogLevel.ERROR,NONE:mi.DiagLogLevel.NONE};function ITe(t){if(t==null)return;let e=tz[t.toUpperCase()];return e??(mi.diag.warn(`Unknown log level "${t}", expected one of ${Object.keys(tz)}, using default`),mi.DiagLogLevel.INFO)}jf.diagLogLevelFromString=ITe});var iz=p(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});Hf._export=void 0;var nz=(R(),y(C)),xTe=wu();function wTe(t,e){return new Promise(r=>{nz.context.with((0,xTe.suppressTracing)(nz.context.active()),()=>{t.export(e,o=>{r(o)})})})}Hf._export=wTe});var K=p(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.internal=w.diagLogLevelFromString=w.BindOnceFuture=w.urlMatches=w.isUrlIgnored=w.callWithTimeout=w.TimeoutError=w.merge=w.TraceState=w.unsuppressTracing=w.suppressTracing=w.isTracingSuppressed=w.setRPCMetadata=w.getRPCMetadata=w.deleteRPCMetadata=w.RPCType=w.parseTraceParent=w.W3CTraceContextPropagator=w.TRACE_STATE_HEADER=w.TRACE_PARENT_HEADER=w.CompositePropagator=w.unrefTimer=w.otperformance=w.getStringListFromEnv=w.getNumberFromEnv=w.getBooleanFromEnv=w.getStringFromEnv=w._globalThis=w.SDK_INFO=w.parseKeyPairsIntoRecord=w.ExportResultCode=w.timeInputToHrTime=w.millisToHrTime=w.isTimeInputHrTime=w.isTimeInput=w.hrTimeToTimeStamp=w.hrTimeToNanoseconds=w.hrTimeToMilliseconds=w.hrTimeToMicroseconds=w.hrTimeDuration=w.hrTime=w.getTimeOrigin=w.addHrTimes=w.loggingErrorHandler=w.setGlobalErrorHandler=w.globalErrorHandler=w.sanitizeAttributes=w.isAttributeValue=w.AnchoredClock=w.W3CBaggagePropagator=void 0;var LTe=FB();Object.defineProperty(w,"W3CBaggagePropagator",{enumerable:!0,get:function(){return LTe.W3CBaggagePropagator}});var DTe=VB();Object.defineProperty(w,"AnchoredClock",{enumerable:!0,get:function(){return DTe.AnchoredClock}});var oz=zB();Object.defineProperty(w,"isAttributeValue",{enumerable:!0,get:function(){return oz.isAttributeValue}});Object.defineProperty(w,"sanitizeAttributes",{enumerable:!0,get:function(){return oz.sanitizeAttributes}});var sz=YB();Object.defineProperty(w,"globalErrorHandler",{enumerable:!0,get:function(){return sz.globalErrorHandler}});Object.defineProperty(w,"setGlobalErrorHandler",{enumerable:!0,get:function(){return sz.setGlobalErrorHandler}});var UTe=RO();Object.defineProperty(w,"loggingErrorHandler",{enumerable:!0,get:function(){return UTe.loggingErrorHandler}});var gr=C3();Object.defineProperty(w,"addHrTimes",{enumerable:!0,get:function(){return gr.addHrTimes}});Object.defineProperty(w,"getTimeOrigin",{enumerable:!0,get:function(){return gr.getTimeOrigin}});Object.defineProperty(w,"hrTime",{enumerable:!0,get:function(){return gr.hrTime}});Object.defineProperty(w,"hrTimeDuration",{enumerable:!0,get:function(){return gr.hrTimeDuration}});Object.defineProperty(w,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return gr.hrTimeToMicroseconds}});Object.defineProperty(w,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return gr.hrTimeToMilliseconds}});Object.defineProperty(w,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return gr.hrTimeToNanoseconds}});Object.defineProperty(w,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return gr.hrTimeToTimeStamp}});Object.defineProperty(w,"isTimeInput",{enumerable:!0,get:function(){return gr.isTimeInput}});Object.defineProperty(w,"isTimeInputHrTime",{enumerable:!0,get:function(){return gr.isTimeInputHrTime}});Object.defineProperty(w,"millisToHrTime",{enumerable:!0,get:function(){return gr.millisToHrTime}});Object.defineProperty(w,"timeInputToHrTime",{enumerable:!0,get:function(){return gr.timeInputToHrTime}});var kTe=N3();Object.defineProperty(w,"ExportResultCode",{enumerable:!0,get:function(){return kTe.ExportResultCode}});var BTe=yO();Object.defineProperty(w,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return BTe.parseKeyPairsIntoRecord}});var zi=MO();Object.defineProperty(w,"SDK_INFO",{enumerable:!0,get:function(){return zi.SDK_INFO}});Object.defineProperty(w,"_globalThis",{enumerable:!0,get:function(){return zi._globalThis}});Object.defineProperty(w,"getStringFromEnv",{enumerable:!0,get:function(){return zi.getStringFromEnv}});Object.defineProperty(w,"getBooleanFromEnv",{enumerable:!0,get:function(){return zi.getBooleanFromEnv}});Object.defineProperty(w,"getNumberFromEnv",{enumerable:!0,get:function(){return zi.getNumberFromEnv}});Object.defineProperty(w,"getStringListFromEnv",{enumerable:!0,get:function(){return zi.getStringListFromEnv}});Object.defineProperty(w,"otperformance",{enumerable:!0,get:function(){return zi.otperformance}});Object.defineProperty(w,"unrefTimer",{enumerable:!0,get:function(){return zi.unrefTimer}});var FTe=I3();Object.defineProperty(w,"CompositePropagator",{enumerable:!0,get:function(){return FTe.CompositePropagator}});var zf=B3();Object.defineProperty(w,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return zf.TRACE_PARENT_HEADER}});Object.defineProperty(w,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return zf.TRACE_STATE_HEADER}});Object.defineProperty(w,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return zf.W3CTraceContextPropagator}});Object.defineProperty(w,"parseTraceParent",{enumerable:!0,get:function(){return zf.parseTraceParent}});var $f=F3();Object.defineProperty(w,"RPCType",{enumerable:!0,get:function(){return $f.RPCType}});Object.defineProperty(w,"deleteRPCMetadata",{enumerable:!0,get:function(){return $f.deleteRPCMetadata}});Object.defineProperty(w,"getRPCMetadata",{enumerable:!0,get:function(){return $f.getRPCMetadata}});Object.defineProperty(w,"setRPCMetadata",{enumerable:!0,get:function(){return $f.setRPCMetadata}});var jO=wu();Object.defineProperty(w,"isTracingSuppressed",{enumerable:!0,get:function(){return jO.isTracingSuppressed}});Object.defineProperty(w,"suppressTracing",{enumerable:!0,get:function(){return jO.suppressTracing}});Object.defineProperty(w,"unsuppressTracing",{enumerable:!0,get:function(){return jO.unsuppressTracing}});var VTe=kO();Object.defineProperty(w,"TraceState",{enumerable:!0,get:function(){return VTe.TraceState}});var GTe=K3();Object.defineProperty(w,"merge",{enumerable:!0,get:function(){return GTe.merge}});var az=X3();Object.defineProperty(w,"TimeoutError",{enumerable:!0,get:function(){return az.TimeoutError}});Object.defineProperty(w,"callWithTimeout",{enumerable:!0,get:function(){return az.callWithTimeout}});var cz=Q3();Object.defineProperty(w,"isUrlIgnored",{enumerable:!0,get:function(){return cz.isUrlIgnored}});Object.defineProperty(w,"urlMatches",{enumerable:!0,get:function(){return cz.urlMatches}});var qTe=ez();Object.defineProperty(w,"BindOnceFuture",{enumerable:!0,get:function(){return qTe.BindOnceFuture}});var jTe=rz();Object.defineProperty(w,"diagLogLevelFromString",{enumerable:!0,get:function(){return jTe.diagLogLevelFromString}});var HTe=iz();w.internal={_export:HTe._export}});var uz=p(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.SeverityNumber=void 0;var zTe;(function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.TRACE=1]="TRACE",t[t.TRACE2=2]="TRACE2",t[t.TRACE3=3]="TRACE3",t[t.TRACE4=4]="TRACE4",t[t.DEBUG=5]="DEBUG",t[t.DEBUG2=6]="DEBUG2",t[t.DEBUG3=7]="DEBUG3",t[t.DEBUG4=8]="DEBUG4",t[t.INFO=9]="INFO",t[t.INFO2=10]="INFO2",t[t.INFO3=11]="INFO3",t[t.INFO4=12]="INFO4",t[t.WARN=13]="WARN",t[t.WARN2=14]="WARN2",t[t.WARN3=15]="WARN3",t[t.WARN4=16]="WARN4",t[t.ERROR=17]="ERROR",t[t.ERROR2=18]="ERROR2",t[t.ERROR3=19]="ERROR3",t[t.ERROR4=20]="ERROR4",t[t.FATAL=21]="FATAL",t[t.FATAL2=22]="FATAL2",t[t.FATAL3=23]="FATAL3",t[t.FATAL4=24]="FATAL4"})(zTe=ku.SeverityNumber||(ku.SeverityNumber={}))});var Wf=p(ha=>{"use strict";Object.defineProperty(ha,"__esModule",{value:!0});ha.NOOP_LOGGER=ha.NoopLogger=void 0;var Yf=class{emit(e){}};ha.NoopLogger=Yf;ha.NOOP_LOGGER=new Yf});var Xf=p(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.NOOP_LOGGER_PROVIDER=ma.NoopLoggerProvider=void 0;var $Te=Wf(),Kf=class{getLogger(e,r,o){return new $Te.NoopLogger}};ma.NoopLoggerProvider=Kf;ma.NOOP_LOGGER_PROVIDER=new Kf});var zO=p(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});Jf.ProxyLogger=void 0;var YTe=Wf(),HO=class{constructor(e,r,o,s){this._provider=e,this.name=r,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):YTe.NOOP_LOGGER}};Jf.ProxyLogger=HO});var YO=p(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});Qf.ProxyLoggerProvider=void 0;var WTe=Xf(),KTe=zO(),$O=class{getLogger(e,r,o){var s;return(s=this._getDelegateLogger(e,r,o))!==null&&s!==void 0?s:new KTe.ProxyLogger(this,e,r,o)}_getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:WTe.NOOP_LOGGER_PROVIDER}_setDelegate(e){this._delegate=e}_getDelegateLogger(e,r,o){var s;return(s=this._delegate)===null||s===void 0?void 0:s.getLogger(e,r,o)}};Qf.ProxyLoggerProvider=$O});var lz=p(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf._globalThis=void 0;Zf._globalThis=typeof globalThis=="object"?globalThis:global});var dz=p(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0});eh._globalThis=void 0;var XTe=lz();Object.defineProperty(eh,"_globalThis",{enumerable:!0,get:function(){return XTe._globalThis}})});var pz=p(th=>{"use strict";Object.defineProperty(th,"__esModule",{value:!0});th._globalThis=void 0;var JTe=dz();Object.defineProperty(th,"_globalThis",{enumerable:!0,get:function(){return JTe._globalThis}})});var fz=p(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.API_BACKWARDS_COMPATIBILITY_VERSION=gn.makeGetter=gn._global=gn.GLOBAL_LOGS_API_KEY=void 0;var QTe=pz();gn.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");gn._global=QTe._globalThis;function ZTe(t,e,r){return o=>o===t?e:r}gn.makeGetter=ZTe;gn.API_BACKWARDS_COMPATIBILITY_VERSION=1});var mz=p(rh=>{"use strict";Object.defineProperty(rh,"__esModule",{value:!0});rh.LogsAPI=void 0;var Er=fz(),eye=Xf(),hz=YO(),WO=class t{constructor(){this._proxyLoggerProvider=new hz.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new t),this._instance}setGlobalLoggerProvider(e){return Er._global[Er.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Er._global[Er.GLOBAL_LOGS_API_KEY]=(0,Er.makeGetter)(Er.API_BACKWARDS_COMPATIBILITY_VERSION,e,eye.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(e),e)}getLoggerProvider(){var e,r;return(r=(e=Er._global[Er.GLOBAL_LOGS_API_KEY])===null||e===void 0?void 0:e.call(Er._global,Er.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&r!==void 0?r:this._proxyLoggerProvider}getLogger(e,r,o){return this.getLoggerProvider().getLogger(e,r,o)}disable(){delete Er._global[Er.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new hz.ProxyLoggerProvider}};rh.LogsAPI=WO});var Bu=p(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.logs=tt.ProxyLoggerProvider=tt.ProxyLogger=tt.NoopLoggerProvider=tt.NOOP_LOGGER_PROVIDER=tt.NoopLogger=tt.NOOP_LOGGER=tt.SeverityNumber=void 0;var tye=uz();Object.defineProperty(tt,"SeverityNumber",{enumerable:!0,get:function(){return tye.SeverityNumber}});var _z=Wf();Object.defineProperty(tt,"NOOP_LOGGER",{enumerable:!0,get:function(){return _z.NOOP_LOGGER}});Object.defineProperty(tt,"NoopLogger",{enumerable:!0,get:function(){return _z.NoopLogger}});var gz=Xf();Object.defineProperty(tt,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return gz.NOOP_LOGGER_PROVIDER}});Object.defineProperty(tt,"NoopLoggerProvider",{enumerable:!0,get:function(){return gz.NoopLoggerProvider}});var rye=zO();Object.defineProperty(tt,"ProxyLogger",{enumerable:!0,get:function(){return rye.ProxyLogger}});var nye=YO();Object.defineProperty(tt,"ProxyLoggerProvider",{enumerable:!0,get:function(){return nye.ProxyLoggerProvider}});var iye=mz();tt.logs=iye.LogsAPI.getInstance()});var Ez=p(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0});nh.defaultServiceName=void 0;function oye(){return`unknown_service:${process.argv0}`}nh.defaultServiceName=oye});var Sz=p(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});ih.defaultServiceName=void 0;var sye=Ez();Object.defineProperty(ih,"defaultServiceName",{enumerable:!0,get:function(){return sye.defaultServiceName}})});var KO=p(oh=>{"use strict";Object.defineProperty(oh,"__esModule",{value:!0});oh.defaultServiceName=void 0;var aye=Sz();Object.defineProperty(oh,"defaultServiceName",{enumerable:!0,get:function(){return aye.defaultServiceName}})});var Tz=p(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});_a.identity=_a.isPromiseLike=void 0;var cye=t=>t!==null&&typeof t=="object"&&typeof t.then=="function";_a.isPromiseLike=cye;function uye(t){return t}_a.identity=uye});var QO=p(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.defaultResource=En.emptyResource=En.resourceFromDetectedResource=En.resourceFromAttributes=void 0;var Vu=(R(),y(C)),XO=K(),Vo=(vt(),y(Ut)),lye=KO(),Fu=Tz(),sh=class t{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(e,r){let o=new t({},r);return o._rawAttributes=yz(e),o._asyncAttributesPending=e.filter(([s,a])=>(0,Fu.isPromiseLike)(a)).length>0,o}constructor(e,r){let o=e.attributes??{};this._rawAttributes=Object.entries(o).map(([s,a])=>((0,Fu.isPromiseLike)(a)&&(this._asyncAttributesPending=!0),[s,a])),this._rawAttributes=yz(this._rawAttributes),this._schemaUrl=hye(r?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){let[r,o]=this._rawAttributes[e];this._rawAttributes[e]=[r,(0,Fu.isPromiseLike)(o)?await o:o]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&Vu.diag.error("Accessing resource attributes before async attributes settled"),this._memoizedAttributes)return this._memoizedAttributes;let e={};for(let[r,o]of this._rawAttributes){if((0,Fu.isPromiseLike)(o)){Vu.diag.debug(`Unsettled resource attribute ${r} skipped`);continue}o!=null&&(e[r]??=o)}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(e){if(e==null)return this;let r=mye(this,e),o=r?{schemaUrl:r}:void 0;return t.FromAttributeList([...e.getRawAttributes(),...this.getRawAttributes()],o)}};function JO(t,e){return sh.FromAttributeList(Object.entries(t),e)}En.resourceFromAttributes=JO;function dye(t,e){return new sh(t,e)}En.resourceFromDetectedResource=dye;function pye(){return JO({})}En.emptyResource=pye;function fye(){return JO({[Vo.ATTR_SERVICE_NAME]:(0,lye.defaultServiceName)(),[Vo.ATTR_TELEMETRY_SDK_LANGUAGE]:XO.SDK_INFO[Vo.ATTR_TELEMETRY_SDK_LANGUAGE],[Vo.ATTR_TELEMETRY_SDK_NAME]:XO.SDK_INFO[Vo.ATTR_TELEMETRY_SDK_NAME],[Vo.ATTR_TELEMETRY_SDK_VERSION]:XO.SDK_INFO[Vo.ATTR_TELEMETRY_SDK_VERSION]})}En.defaultResource=fye;function yz(t){return t.map(([e,r])=>(0,Fu.isPromiseLike)(r)?[e,r.catch(o=>{Vu.diag.debug("promise rejection for resource attribute: %s - %s",e,o)})]:[e,r])}function hye(t){if(typeof t=="string"||t===void 0)return t;Vu.diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",t)}function mye(t,e){let r=t?.schemaUrl,o=e?.schemaUrl,s=r===void 0||r==="",a=o===void 0||o==="";if(s)return o;if(a||r===o)return r;Vu.diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',r,o)}});var Az=p(ah=>{"use strict";Object.defineProperty(ah,"__esModule",{value:!0});ah.detectResources=void 0;var vz=(R(),y(C)),ZO=QO(),_ye=(t={})=>(t.detectors||[]).map(r=>{try{let o=(0,ZO.resourceFromDetectedResource)(r.detect(t));return vz.diag.debug(`${r.constructor.name} found resource.`,o),o}catch(o){return vz.diag.debug(`${r.constructor.name} failed: ${o.message}`),(0,ZO.emptyResource)()}}).reduce((r,o)=>r.merge(o),(0,ZO.emptyResource)());ah.detectResources=_ye});var bz=p(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});ch.envDetector=void 0;var gye=(R(),y(C)),Eye=(vt(),y(Ut)),Oz=K(),eb=class{_MAX_LENGTH=255;_COMMA_SEPARATOR=",";_LABEL_KEY_VALUE_SPLITTER="=";_ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.";_ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters.";detect(e){let r={},o=(0,Oz.getStringFromEnv)("OTEL_RESOURCE_ATTRIBUTES"),s=(0,Oz.getStringFromEnv)("OTEL_SERVICE_NAME");if(o)try{let a=this._parseResourceAttributes(o);Object.assign(r,a)}catch(a){gye.diag.debug(`EnvDetector failed: ${a.message}`)}return s&&(r[Eye.ATTR_SERVICE_NAME]=s),{attributes:r}}_parseResourceAttributes(e){if(!e)return{};let r={},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}`);r[i]=decodeURIComponent(n)}return r}_isValid(e){return e.length<=this._MAX_LENGTH&&this._isBaggageOctetString(e)}_isBaggageOctetString(e){for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o<33||o===44||o===59||o===92||o>126)return!1}return!0}_isValidAndNotEmpty(e){return e.length>0&&this._isValid(e)}};ch.envDetector=new eb});var Gu=p(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.ATTR_WEBENGINE_VERSION=F.ATTR_WEBENGINE_NAME=F.ATTR_WEBENGINE_DESCRIPTION=F.ATTR_SERVICE_NAMESPACE=F.ATTR_SERVICE_INSTANCE_ID=F.ATTR_PROCESS_RUNTIME_VERSION=F.ATTR_PROCESS_RUNTIME_NAME=F.ATTR_PROCESS_RUNTIME_DESCRIPTION=F.ATTR_PROCESS_PID=F.ATTR_PROCESS_OWNER=F.ATTR_PROCESS_EXECUTABLE_PATH=F.ATTR_PROCESS_EXECUTABLE_NAME=F.ATTR_PROCESS_COMMAND_ARGS=F.ATTR_PROCESS_COMMAND=F.ATTR_OS_VERSION=F.ATTR_OS_TYPE=F.ATTR_K8S_POD_NAME=F.ATTR_K8S_NAMESPACE_NAME=F.ATTR_K8S_DEPLOYMENT_NAME=F.ATTR_K8S_CLUSTER_NAME=F.ATTR_HOST_TYPE=F.ATTR_HOST_NAME=F.ATTR_HOST_IMAGE_VERSION=F.ATTR_HOST_IMAGE_NAME=F.ATTR_HOST_IMAGE_ID=F.ATTR_HOST_ID=F.ATTR_HOST_ARCH=F.ATTR_CONTAINER_NAME=F.ATTR_CONTAINER_IMAGE_TAGS=F.ATTR_CONTAINER_IMAGE_NAME=F.ATTR_CONTAINER_ID=F.ATTR_CLOUD_REGION=F.ATTR_CLOUD_PROVIDER=F.ATTR_CLOUD_AVAILABILITY_ZONE=F.ATTR_CLOUD_ACCOUNT_ID=void 0;F.ATTR_CLOUD_ACCOUNT_ID="cloud.account.id";F.ATTR_CLOUD_AVAILABILITY_ZONE="cloud.availability_zone";F.ATTR_CLOUD_PROVIDER="cloud.provider";F.ATTR_CLOUD_REGION="cloud.region";F.ATTR_CONTAINER_ID="container.id";F.ATTR_CONTAINER_IMAGE_NAME="container.image.name";F.ATTR_CONTAINER_IMAGE_TAGS="container.image.tags";F.ATTR_CONTAINER_NAME="container.name";F.ATTR_HOST_ARCH="host.arch";F.ATTR_HOST_ID="host.id";F.ATTR_HOST_IMAGE_ID="host.image.id";F.ATTR_HOST_IMAGE_NAME="host.image.name";F.ATTR_HOST_IMAGE_VERSION="host.image.version";F.ATTR_HOST_NAME="host.name";F.ATTR_HOST_TYPE="host.type";F.ATTR_K8S_CLUSTER_NAME="k8s.cluster.name";F.ATTR_K8S_DEPLOYMENT_NAME="k8s.deployment.name";F.ATTR_K8S_NAMESPACE_NAME="k8s.namespace.name";F.ATTR_K8S_POD_NAME="k8s.pod.name";F.ATTR_OS_TYPE="os.type";F.ATTR_OS_VERSION="os.version";F.ATTR_PROCESS_COMMAND="process.command";F.ATTR_PROCESS_COMMAND_ARGS="process.command_args";F.ATTR_PROCESS_EXECUTABLE_NAME="process.executable.name";F.ATTR_PROCESS_EXECUTABLE_PATH="process.executable.path";F.ATTR_PROCESS_OWNER="process.owner";F.ATTR_PROCESS_PID="process.pid";F.ATTR_PROCESS_RUNTIME_DESCRIPTION="process.runtime.description";F.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name";F.ATTR_PROCESS_RUNTIME_VERSION="process.runtime.version";F.ATTR_SERVICE_INSTANCE_ID="service.instance.id";F.ATTR_SERVICE_NAMESPACE="service.namespace";F.ATTR_WEBENGINE_DESCRIPTION="webengine.description";F.ATTR_WEBENGINE_NAME="webengine.name";F.ATTR_WEBENGINE_VERSION="webengine.version"});var lh=p(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});uh.execAsync=void 0;var Sye=b("child_process"),Tye=b("util");uh.execAsync=Tye.promisify(Sye.exec)});var Rz=p(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});dh.getMachineId=void 0;var yye=lh(),vye=(R(),y(C));async function Aye(){try{let e=(await(0,yye.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
|
|
4
|
+
`).find(o=>o.includes("IOPlatformUUID"));if(!e)return;let r=e.split('" = "');if(r.length===2)return r[1].slice(0,-1)}catch(t){vye.diag.debug(`error reading machine id: ${t}`)}}dh.getMachineId=Aye});var Pz=p(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});ph.getMachineId=void 0;var Oye=b("fs"),bye=(R(),y(C));async function Rye(){let t=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let e of t)try{return(await Oye.promises.readFile(e,{encoding:"utf8"})).trim()}catch(r){bye.diag.debug(`error reading machine id: ${r}`)}}ph.getMachineId=Rye});var Nz=p(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});fh.getMachineId=void 0;var Pye=b("fs"),Cye=lh(),Cz=(R(),y(C));async function Nye(){try{return(await Pye.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(t){Cz.diag.debug(`error reading machine id: ${t}`)}try{return(await(0,Cye.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(t){Cz.diag.debug(`error reading machine id: ${t}`)}}fh.getMachineId=Nye});var Iz=p(hh=>{"use strict";Object.defineProperty(hh,"__esModule",{value:!0});hh.getMachineId=void 0;var Mz=b("process"),Mye=lh(),Iye=(R(),y(C));async function xye(){let t="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",e="%windir%\\System32\\REG.exe";Mz.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in Mz.env&&(e="%windir%\\sysnative\\cmd.exe /c "+e);try{let o=(await(0,Mye.execAsync)(`${e} ${t}`)).stdout.split("REG_SZ");if(o.length===2)return o[1].trim()}catch(r){Iye.diag.debug(`error reading machine id: ${r}`)}}hh.getMachineId=xye});var xz=p(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});mh.getMachineId=void 0;var wye=(R(),y(C));async function Lye(){wye.diag.debug("could not read machine-id: unsupported platform")}mh.getMachineId=Lye});var wz=p(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});_h.getMachineId=void 0;var Dye=b("process"),Go;async function Uye(){if(!Go)switch(Dye.platform){case"darwin":Go=(await Promise.resolve().then(()=>he(Rz()))).getMachineId;break;case"linux":Go=(await Promise.resolve().then(()=>he(Pz()))).getMachineId;break;case"freebsd":Go=(await Promise.resolve().then(()=>he(Nz()))).getMachineId;break;case"win32":Go=(await Promise.resolve().then(()=>he(Iz()))).getMachineId;break;default:Go=(await Promise.resolve().then(()=>he(xz()))).getMachineId;break}return Go()}_h.getMachineId=Uye});var tb=p(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.normalizeType=ga.normalizeArch=void 0;var kye=t=>{switch(t){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return t}};ga.normalizeArch=kye;var Bye=t=>{switch(t){case"sunos":return"solaris";case"win32":return"windows";default:return t}};ga.normalizeType=Bye});var Dz=p(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});gh.hostDetector=void 0;var rb=Gu(),Lz=b("os"),Fye=wz(),Vye=tb(),nb=class{detect(e){return{attributes:{[rb.ATTR_HOST_NAME]:(0,Lz.hostname)(),[rb.ATTR_HOST_ARCH]:(0,Vye.normalizeArch)((0,Lz.arch)()),[rb.ATTR_HOST_ID]:(0,Fye.getMachineId)()}}}};gh.hostDetector=new nb});var Bz=p(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});Eh.osDetector=void 0;var Uz=Gu(),kz=b("os"),Gye=tb(),ib=class{detect(e){return{attributes:{[Uz.ATTR_OS_TYPE]:(0,Gye.normalizeType)((0,kz.platform)()),[Uz.ATTR_OS_VERSION]:(0,kz.release)()}}}};Eh.osDetector=new ib});var Fz=p(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});Sh.processDetector=void 0;var qye=(R(),y(C)),_i=Gu(),jye=b("os"),ob=class{detect(e){let r={[_i.ATTR_PROCESS_PID]:process.pid,[_i.ATTR_PROCESS_EXECUTABLE_NAME]:process.title,[_i.ATTR_PROCESS_EXECUTABLE_PATH]:process.execPath,[_i.ATTR_PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[_i.ATTR_PROCESS_RUNTIME_VERSION]:process.versions.node,[_i.ATTR_PROCESS_RUNTIME_NAME]:"nodejs",[_i.ATTR_PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};process.argv.length>1&&(r[_i.ATTR_PROCESS_COMMAND]=process.argv[1]);try{let o=jye.userInfo();r[_i.ATTR_PROCESS_OWNER]=o.username}catch(o){qye.diag.debug(`error obtaining process owner: ${o}`)}return{attributes:r}}};Sh.processDetector=new ob});var Vz=p(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});Th.serviceInstanceIdDetector=void 0;var Hye=Gu(),zye=b("crypto"),sb=class{detect(e){return{attributes:{[Hye.ATTR_SERVICE_INSTANCE_ID]:(0,zye.randomUUID)()}}}};Th.serviceInstanceIdDetector=new sb});var Gz=p(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.serviceInstanceIdDetector=Sn.processDetector=Sn.osDetector=Sn.hostDetector=void 0;var $ye=Dz();Object.defineProperty(Sn,"hostDetector",{enumerable:!0,get:function(){return $ye.hostDetector}});var Yye=Bz();Object.defineProperty(Sn,"osDetector",{enumerable:!0,get:function(){return Yye.osDetector}});var Wye=Fz();Object.defineProperty(Sn,"processDetector",{enumerable:!0,get:function(){return Wye.processDetector}});var Kye=Vz();Object.defineProperty(Sn,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return Kye.serviceInstanceIdDetector}})});var qz=p(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.serviceInstanceIdDetector=Tn.processDetector=Tn.osDetector=Tn.hostDetector=void 0;var yh=Gz();Object.defineProperty(Tn,"hostDetector",{enumerable:!0,get:function(){return yh.hostDetector}});Object.defineProperty(Tn,"osDetector",{enumerable:!0,get:function(){return yh.osDetector}});Object.defineProperty(Tn,"processDetector",{enumerable:!0,get:function(){return yh.processDetector}});Object.defineProperty(Tn,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return yh.serviceInstanceIdDetector}})});var jz=p(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.noopDetector=Ea.NoopDetector=void 0;var vh=class{detect(){return{attributes:{}}}};Ea.NoopDetector=vh;Ea.noopDetector=new vh});var Hz=p(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.noopDetector=qt.serviceInstanceIdDetector=qt.processDetector=qt.osDetector=qt.hostDetector=qt.envDetector=void 0;var Xye=bz();Object.defineProperty(qt,"envDetector",{enumerable:!0,get:function(){return Xye.envDetector}});var Ah=qz();Object.defineProperty(qt,"hostDetector",{enumerable:!0,get:function(){return Ah.hostDetector}});Object.defineProperty(qt,"osDetector",{enumerable:!0,get:function(){return Ah.osDetector}});Object.defineProperty(qt,"processDetector",{enumerable:!0,get:function(){return Ah.processDetector}});Object.defineProperty(qt,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return Ah.serviceInstanceIdDetector}});var Jye=jz();Object.defineProperty(qt,"noopDetector",{enumerable:!0,get:function(){return Jye.noopDetector}})});var Sa=p(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.defaultServiceName=Me.emptyResource=Me.defaultResource=Me.resourceFromAttributes=Me.serviceInstanceIdDetector=Me.processDetector=Me.osDetector=Me.hostDetector=Me.envDetector=Me.detectResources=void 0;var Qye=Az();Object.defineProperty(Me,"detectResources",{enumerable:!0,get:function(){return Qye.detectResources}});var qu=Hz();Object.defineProperty(Me,"envDetector",{enumerable:!0,get:function(){return qu.envDetector}});Object.defineProperty(Me,"hostDetector",{enumerable:!0,get:function(){return qu.hostDetector}});Object.defineProperty(Me,"osDetector",{enumerable:!0,get:function(){return qu.osDetector}});Object.defineProperty(Me,"processDetector",{enumerable:!0,get:function(){return qu.processDetector}});Object.defineProperty(Me,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return qu.serviceInstanceIdDetector}});var ab=QO();Object.defineProperty(Me,"resourceFromAttributes",{enumerable:!0,get:function(){return ab.resourceFromAttributes}});Object.defineProperty(Me,"defaultResource",{enumerable:!0,get:function(){return ab.defaultResource}});Object.defineProperty(Me,"emptyResource",{enumerable:!0,get:function(){return ab.emptyResource}});var Zye=KO();Object.defineProperty(Me,"defaultServiceName",{enumerable:!0,get:function(){return Zye.defaultServiceName}})});var zz=p(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});bh.LogRecordImpl=void 0;var qo=(R(),y(C)),Oh=K(),cb=class{hrTime;hrTimeObserved;spanContext;resource;instrumentationScope;attributes={};_severityText;_severityNumber;_body;_eventName;totalAttributesCount=0;_isReadonly=!1;_logRecordLimits;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 eventName(){return this._eventName}set eventName(e){this._isLogRecordReadonly()||(this._eventName=e)}get droppedAttributesCount(){return this.totalAttributesCount-Object.keys(this.attributes).length}constructor(e,r,o){let{timestamp:s,observedTimestamp:a,eventName:i,severityNumber:n,severityText:c,body:u,attributes:l={},context:d}=o,h=Date.now();if(this.hrTime=(0,Oh.timeInputToHrTime)(s??h),this.hrTimeObserved=(0,Oh.timeInputToHrTime)(a??h),d){let g=qo.trace.getSpanContext(d);g&&qo.isSpanContextValid(g)&&(this.spanContext=g)}this.severityNumber=n,this.severityText=c,this.body=u,this.resource=e.resource,this.instrumentationScope=r,this._logRecordLimits=e.logRecordLimits,this._eventName=i,this.setAttributes(l)}setAttribute(e,r){return this._isLogRecordReadonly()?this:r===null?this:e.length===0?(qo.diag.warn(`Invalid attribute key: ${e}`),this):!(0,Oh.isAttributeValue)(r)&&!(typeof r=="object"&&!Array.isArray(r)&&Object.keys(r).length>0)?(qo.diag.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&&qo.diag.warn("Dropping extra attributes."),this):((0,Oh.isAttributeValue)(r)?this.attributes[e]=this._truncateToSize(r):this.attributes[e]=r,this))}setAttributes(e){for(let[r,o]of Object.entries(e))this.setAttribute(r,o);return this}setBody(e){return this.body=e,this}setEventName(e){return this.eventName=e,this}setSeverityNumber(e){return this.severityNumber=e,this}setSeverityText(e){return this.severityText=e,this}_makeReadonly(){this._isReadonly=!0}_truncateToSize(e){let r=this._logRecordLimits.attributeValueLengthLimit;return r<=0?(qo.diag.warn(`Attribute value limit must be positive, got ${r}`),e):typeof e=="string"?this._truncateToLimitUtil(e,r):Array.isArray(e)?e.map(o=>typeof o=="string"?this._truncateToLimitUtil(o,r):o):e}_truncateToLimitUtil(e,r){return e.length<=r?e:e.substring(0,r)}_isLogRecordReadonly(){return this._isReadonly&&qo.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly}};bh.LogRecordImpl=cb});var $z=p(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});Rh.Logger=void 0;var eve=(R(),y(C)),tve=zz(),ub=class{instrumentationScope;_sharedState;constructor(e,r){this.instrumentationScope=e,this._sharedState=r}emit(e){let r=e.context||eve.context.active(),o=new tve.LogRecordImpl(this._sharedState,this.instrumentationScope,{context:r,...e});this._sharedState.activeProcessor.onEmit(o,r),o._makeReadonly()}};Rh.Logger=ub});var Yz=p(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});ya.reconfigureLimits=ya.loadDefaultConfig=void 0;var Ta=K();function rve(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,Ta.getNumberFromEnv)("OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT")??1/0,attributeCountLimit:(0,Ta.getNumberFromEnv)("OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT")??128},includeTraceContext:!0}}ya.loadDefaultConfig=rve;function nve(t){return{attributeCountLimit:t.attributeCountLimit??(0,Ta.getNumberFromEnv)("OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT")??(0,Ta.getNumberFromEnv)("OTEL_ATTRIBUTE_COUNT_LIMIT")??128,attributeValueLengthLimit:t.attributeValueLengthLimit??(0,Ta.getNumberFromEnv)("OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT")??(0,Ta.getNumberFromEnv)("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT")??1/0}}ya.reconfigureLimits=nve});var db=p(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});Ph.NoopLogRecordProcessor=void 0;var lb=class{forceFlush(){return Promise.resolve()}onEmit(e,r){}shutdown(){return Promise.resolve()}};Ph.NoopLogRecordProcessor=lb});var Wz=p(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});Ch.MultiLogRecordProcessor=void 0;var ive=K(),pb=class{processors;forceFlushTimeoutMillis;constructor(e,r){this.processors=e,this.forceFlushTimeoutMillis=r}async forceFlush(){let e=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(r=>(0,ive.callWithTimeout)(r.forceFlush(),e)))}onEmit(e,r){this.processors.forEach(o=>o.onEmit(e,r))}async shutdown(){await Promise.all(this.processors.map(e=>e.shutdown()))}};Ch.MultiLogRecordProcessor=pb});var Kz=p(Nh=>{"use strict";Object.defineProperty(Nh,"__esModule",{value:!0});Nh.LoggerProviderSharedState=void 0;var ove=db(),sve=Wz(),fb=class{resource;forceFlushTimeoutMillis;logRecordLimits;processors;loggers=new Map;activeProcessor;registeredLogRecordProcessors=[];constructor(e,r,o,s){this.resource=e,this.forceFlushTimeoutMillis=r,this.logRecordLimits=o,this.processors=s,s.length>0?(this.registeredLogRecordProcessors=s,this.activeProcessor=new sve.MultiLogRecordProcessor(this.registeredLogRecordProcessors,this.forceFlushTimeoutMillis)):this.activeProcessor=new ove.NoopLogRecordProcessor}};Nh.LoggerProviderSharedState=fb});var Qz=p(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.LoggerProvider=jo.DEFAULT_LOGGER_NAME=void 0;var Mh=(R(),y(C)),ave=Bu(),cve=Sa(),Xz=K(),uve=$z(),Jz=Yz(),lve=Kz();jo.DEFAULT_LOGGER_NAME="unknown";var hb=class{_shutdownOnce;_sharedState;constructor(e={}){let r=(0,Xz.merge)({},(0,Jz.loadDefaultConfig)(),e),o=e.resource??(0,cve.defaultResource)();this._sharedState=new lve.LoggerProviderSharedState(o,r.forceFlushTimeoutMillis,(0,Jz.reconfigureLimits)(r.logRecordLimits),e?.processors??[]),this._shutdownOnce=new Xz.BindOnceFuture(this._shutdown,this)}getLogger(e,r,o){if(this._shutdownOnce.isCalled)return Mh.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),ave.NOOP_LOGGER;e||Mh.diag.warn("Logger requested without instrumentation scope name.");let s=e||jo.DEFAULT_LOGGER_NAME,a=`${s}@${r||""}:${o?.schemaUrl||""}`;return this._sharedState.loggers.has(a)||this._sharedState.loggers.set(a,new uve.Logger({name:s,version:r,schemaUrl:o?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(a)}forceFlush(){return this._shutdownOnce.isCalled?(Mh.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(Mh.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}};jo.LoggerProvider=hb});var e$=p(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});Ih.ConsoleLogRecordExporter=void 0;var Zz=K(),mb=class{export(e,r){this._sendLogRecords(e,r)}shutdown(){return Promise.resolve()}_exportInfo(e){return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationScope,timestamp:(0,Zz.hrTimeToMicroseconds)(e.hrTime),traceId:e.spanContext?.traceId,spanId:e.spanContext?.spanId,traceFlags:e.spanContext?.traceFlags,severityText:e.severityText,severityNumber:e.severityNumber,body:e.body,attributes:e.attributes}}_sendLogRecords(e,r){for(let o of e)console.dir(this._exportInfo(o),{depth:3});r?.({code:Zz.ExportResultCode.SUCCESS})}};Ih.ConsoleLogRecordExporter=mb});var t$=p(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});xh.SimpleLogRecordProcessor=void 0;var va=K(),_b=class{_exporter;_shutdownOnce;_unresolvedExports;constructor(e){this._exporter=e,this._shutdownOnce=new va.BindOnceFuture(this._shutdown,this),this._unresolvedExports=new Set}onEmit(e){if(this._shutdownOnce.isCalled)return;let r=()=>va.internal._export(this._exporter,[e]).then(o=>{o.code!==va.ExportResultCode.SUCCESS&&(0,va.globalErrorHandler)(o.error??new Error(`SimpleLogRecordProcessor: log record export failed (status ${o})`))}).catch(va.globalErrorHandler);if(e.resource.asyncAttributesPending){let o=e.resource.waitForAsyncAttributes?.().then(()=>(this._unresolvedExports.delete(o),r()),va.globalErrorHandler);o!=null&&this._unresolvedExports.add(o)}else r()}async forceFlush(){await Promise.all(Array.from(this._unresolvedExports))}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};xh.SimpleLogRecordProcessor=_b});var n$=p(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});wh.InMemoryLogRecordExporter=void 0;var r$=K(),gb=class{_finishedLogRecords=[];_stopped=!1;export(e,r){if(this._stopped)return r({code:r$.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedLogRecords.push(...e),r({code:r$.ExportResultCode.SUCCESS})}shutdown(){return this._stopped=!0,this.reset(),Promise.resolve()}getFinishedLogRecords(){return this._finishedLogRecords}reset(){this._finishedLogRecords=[]}};wh.InMemoryLogRecordExporter=gb});var i$=p(Lh=>{"use strict";Object.defineProperty(Lh,"__esModule",{value:!0});Lh.BatchLogRecordProcessorBase=void 0;var dve=(R(),y(C)),sr=K(),Eb=class{_exporter;_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_finishedLogRecords=[];_timer;_shutdownOnce;constructor(e,r){this._exporter=e,this._maxExportBatchSize=r?.maxExportBatchSize??(0,sr.getNumberFromEnv)("OTEL_BLRP_MAX_EXPORT_BATCH_SIZE")??512,this._maxQueueSize=r?.maxQueueSize??(0,sr.getNumberFromEnv)("OTEL_BLRP_MAX_QUEUE_SIZE")??2048,this._scheduledDelayMillis=r?.scheduledDelayMillis??(0,sr.getNumberFromEnv)("OTEL_BLRP_SCHEDULE_DELAY")??5e3,this._exportTimeoutMillis=r?.exportTimeoutMillis??(0,sr.getNumberFromEnv)("OTEL_BLRP_EXPORT_TIMEOUT")??3e4,this._shutdownOnce=new sr.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(dve.diag.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,r)=>{let o=[],s=Math.ceil(this._finishedLogRecords.length/this._maxExportBatchSize);for(let a=0;a<s;a++)o.push(this._flushOneBatch());Promise.all(o).then(()=>{e()}).catch(r)})}_flushOneBatch(){return this._clearTimer(),this._finishedLogRecords.length===0?Promise.resolve():new Promise((e,r)=>{(0,sr.callWithTimeout)(this._export(this._finishedLogRecords.splice(0,this._maxExportBatchSize)),this._exportTimeoutMillis).then(()=>e()).catch(r)})}_maybeStartTimer(){this._timer===void 0&&(this._timer=setTimeout(()=>{this._flushOneBatch().then(()=>{this._finishedLogRecords.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(e=>{(0,sr.globalErrorHandler)(e)})},this._scheduledDelayMillis),(0,sr.unrefTimer)(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}_export(e){let r=()=>sr.internal._export(this._exporter,e).then(s=>{s.code!==sr.ExportResultCode.SUCCESS&&(0,sr.globalErrorHandler)(s.error??new Error(`BatchLogRecordProcessor: log record export failed (status ${s})`))}).catch(sr.globalErrorHandler),o=e.map(s=>s.resource).filter(s=>s.asyncAttributesPending);return o.length===0?r():Promise.all(o.map(s=>s.waitForAsyncAttributes?.())).then(r,sr.globalErrorHandler)}};Lh.BatchLogRecordProcessorBase=Eb});var o$=p(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});Dh.BatchLogRecordProcessor=void 0;var pve=i$(),Sb=class extends pve.BatchLogRecordProcessorBase{onShutdown(){}};Dh.BatchLogRecordProcessor=Sb});var s$=p(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});Uh.BatchLogRecordProcessor=void 0;var fve=o$();Object.defineProperty(Uh,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return fve.BatchLogRecordProcessor}})});var a$=p(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});kh.BatchLogRecordProcessor=void 0;var hve=s$();Object.defineProperty(kh,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return hve.BatchLogRecordProcessor}})});var Tb=p(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.BatchLogRecordProcessor=jt.InMemoryLogRecordExporter=jt.SimpleLogRecordProcessor=jt.ConsoleLogRecordExporter=jt.NoopLogRecordProcessor=jt.LoggerProvider=void 0;var mve=Qz();Object.defineProperty(jt,"LoggerProvider",{enumerable:!0,get:function(){return mve.LoggerProvider}});var _ve=db();Object.defineProperty(jt,"NoopLogRecordProcessor",{enumerable:!0,get:function(){return _ve.NoopLogRecordProcessor}});var gve=e$();Object.defineProperty(jt,"ConsoleLogRecordExporter",{enumerable:!0,get:function(){return gve.ConsoleLogRecordExporter}});var Eve=t$();Object.defineProperty(jt,"SimpleLogRecordProcessor",{enumerable:!0,get:function(){return Eve.SimpleLogRecordProcessor}});var Sve=n$();Object.defineProperty(jt,"InMemoryLogRecordExporter",{enumerable:!0,get:function(){return Sve.InMemoryLogRecordExporter}});var Tve=a$();Object.defineProperty(jt,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return Tve.BatchLogRecordProcessor}})});var Bh=p(ju=>{"use strict";Object.defineProperty(ju,"__esModule",{value:!0});ju.AggregationTemporality=void 0;var yve;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE"})(yve=ju.AggregationTemporality||(ju.AggregationTemporality={}))});var Yi=p($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.DataPointType=$i.InstrumentType=void 0;var vve;(function(t){t.COUNTER="COUNTER",t.GAUGE="GAUGE",t.HISTOGRAM="HISTOGRAM",t.UP_DOWN_COUNTER="UP_DOWN_COUNTER",t.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",t.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",t.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(vve=$i.InstrumentType||($i.InstrumentType={}));var Ave;(function(t){t[t.HISTOGRAM=0]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",t[t.GAUGE=2]="GAUGE",t[t.SUM=3]="SUM"})(Ave=$i.DataPointType||($i.DataPointType={}))});var qr=p(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.equalsCaseInsensitive=Ce.binarySearchUB=Ce.setEquals=Ce.FlatMap=Ce.isPromiseAllSettledRejectionResult=Ce.PromiseAllSettled=Ce.callWithTimeout=Ce.TimeoutError=Ce.instrumentationScopeId=Ce.hashAttributes=Ce.isNotNullish=void 0;function Ove(t){return t!=null}Ce.isNotNullish=Ove;function bve(t){let e=Object.keys(t);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(r=>[r,t[r]])))}Ce.hashAttributes=bve;function Rve(t){return`${t.name}:${t.version??""}:${t.schemaUrl??""}`}Ce.instrumentationScopeId=Rve;var Fh=class t extends Error{constructor(e){super(e),Object.setPrototypeOf(this,t.prototype)}};Ce.TimeoutError=Fh;function Pve(t,e){let r,o=new Promise(function(a,i){r=setTimeout(function(){i(new Fh("Operation timed out."))},e)});return Promise.race([t,o]).then(s=>(clearTimeout(r),s),s=>{throw clearTimeout(r),s})}Ce.callWithTimeout=Pve;async function Cve(t){return Promise.all(t.map(async e=>{try{return{status:"fulfilled",value:await e}}catch(r){return{status:"rejected",reason:r}}}))}Ce.PromiseAllSettled=Cve;function Nve(t){return t.status==="rejected"}Ce.isPromiseAllSettledRejectionResult=Nve;function Mve(t,e){let r=[];return t.forEach(o=>{r.push(...e(o))}),r}Ce.FlatMap=Mve;function Ive(t,e){if(t.size!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;return!0}Ce.setEquals=Ive;function xve(t,e){let r=0,o=t.length-1,s=t.length;for(;o>=r;){let a=r+Math.trunc((o-r)/2);t[a]<e?r=a+1:(s=a,o=a-1)}return s}Ce.binarySearchUB=xve;function wve(t,e){return t.toLowerCase()===e.toLowerCase()}Ce.equalsCaseInsensitive=wve});var Aa=p(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});Hu.AggregatorKind=void 0;var Lve;(function(t){t[t.DROP=0]="DROP",t[t.SUM=1]="SUM",t[t.LAST_VALUE=2]="LAST_VALUE",t[t.HISTOGRAM=3]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(Lve=Hu.AggregatorKind||(Hu.AggregatorKind={}))});var c$=p(Vh=>{"use strict";Object.defineProperty(Vh,"__esModule",{value:!0});Vh.DropAggregator=void 0;var Dve=Aa(),yb=class{kind=Dve.AggregatorKind.DROP;createAccumulation(){}merge(e,r){}diff(e,r){}toMetricData(e,r,o,s){}};Vh.DropAggregator=yb});var u$=p(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});ba.HistogramAggregator=ba.HistogramAccumulation=void 0;var Uve=Aa(),zu=Yi(),kve=qr();function Bve(t){let e=t.map(()=>0);return e.push(0),{buckets:{boundaries:t,counts:e},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var Oa=class{startTime;_boundaries;_recordMinMax;_current;constructor(e,r,o=!0,s=Bve(r)){this.startTime=e,this._boundaries=r,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 r=(0,kve.binarySearchUB)(this._boundaries,e);this._current.buckets.counts[r]+=1}setStartTime(e){this.startTime=e}toPointValue(){return this._current}};ba.HistogramAccumulation=Oa;var vb=class{_boundaries;_recordMinMax;kind=Uve.AggregatorKind.HISTOGRAM;constructor(e,r){this._boundaries=e,this._recordMinMax=r}createAccumulation(e){return new Oa(e,this._boundaries,this._recordMinMax)}merge(e,r){let o=e.toPointValue(),s=r.toPointValue(),a=o.buckets.counts,i=s.buckets.counts,n=new Array(a.length);for(let l=0;l<a.length;l++)n[l]=a[l]+i[l];let c=1/0,u=-1/0;return this._recordMinMax&&(o.hasMinMax&&s.hasMinMax?(c=Math.min(o.min,s.min),u=Math.max(o.max,s.max)):o.hasMinMax?(c=o.min,u=o.max):s.hasMinMax&&(c=s.min,u=s.max)),new Oa(e.startTime,o.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:o.buckets.boundaries,counts:n},count:o.count+s.count,sum:o.sum+s.sum,hasMinMax:this._recordMinMax&&(o.hasMinMax||s.hasMinMax),min:c,max:u})}diff(e,r){let o=e.toPointValue(),s=r.toPointValue(),a=o.buckets.counts,i=s.buckets.counts,n=new Array(a.length);for(let c=0;c<a.length;c++)n[c]=i[c]-a[c];return new Oa(r.startTime,o.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:o.buckets.boundaries,counts:n},count:s.count-o.count,sum:s.sum-o.sum,hasMinMax:!1,min:1/0,max:-1/0})}toMetricData(e,r,o,s){return{descriptor:e,aggregationTemporality:r,dataPointType:zu.DataPointType.HISTOGRAM,dataPoints:o.map(([a,i])=>{let n=i.toPointValue(),c=e.type===zu.InstrumentType.GAUGE||e.type===zu.InstrumentType.UP_DOWN_COUNTER||e.type===zu.InstrumentType.OBSERVABLE_GAUGE||e.type===zu.InstrumentType.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:c?void 0:n.sum,buckets:n.buckets,count:n.count}}})}}};ba.HistogramAggregator=vb});var l$=p(Gh=>{"use strict";Object.defineProperty(Gh,"__esModule",{value:!0});Gh.Buckets=void 0;var Ab=class t{backing;indexBase;indexStart;indexEnd;constructor(e=new Ob,r=0,o=0,s=0){this.backing=e,this.indexBase=r,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,r)=>this.at(r))}at(e){let r=this.indexBase-this.indexStart;return e<r&&(e+=this.backing.length),e-=r,this.backing.countAt(e)}incrementBucket(e,r){this.backing.increment(e,r)}decrementBucket(e,r){this.backing.decrement(e,r)}trim(){for(let e=0;e<this.length;e++)if(this.at(e)!==0){this.indexStart+=e;break}else if(e===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(let e=this.length-1;e>=0;e--)if(this.at(e)!==0){this.indexEnd-=this.length-e-1;break}this._rotate()}downscale(e){this._rotate();let r=1+this.indexEnd-this.indexStart,o=1<<e,s=0,a=0;for(let i=this.indexStart;i<=this.indexEnd;){let n=i%o;n<0&&(n+=o);for(let c=n;c<o&&s<r;c++)this._relocateBucket(a,s),s++,i++;a++}this.indexStart>>=e,this.indexEnd>>=e,this.indexBase=this.indexStart}clone(){return new t(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,r){e!==r&&this.incrementBucket(e,this.backing.emptyBucket(r))}};Gh.Buckets=Ab;var Ob=class t{_counts;constructor(e=[0]){this._counts=e}get length(){return this._counts.length}countAt(e){return this._counts[e]}growTo(e,r,o){let s=new Array(e).fill(0);s.splice(o,this._counts.length-r,...this._counts.slice(r)),s.splice(0,r,...this._counts.slice(0,r)),this._counts=s}reverse(e,r){let o=Math.floor((e+r)/2)-e;for(let s=0;s<o;s++){let a=this._counts[e+s];this._counts[e+s]=this._counts[r-s-1],this._counts[r-s-1]=a}}emptyBucket(e){let r=this._counts[e];return this._counts[e]=0,r}increment(e,r){this._counts[e]+=r}decrement(e,r){this._counts[e]>=r?this._counts[e]-=r:this._counts[e]=0}clone(){return new t([...this._counts])}}});var Rb=p(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.getSignificand=Ht.getNormalBase2=Ht.MIN_VALUE=Ht.MAX_NORMAL_EXPONENT=Ht.MIN_NORMAL_EXPONENT=Ht.SIGNIFICAND_WIDTH=void 0;Ht.SIGNIFICAND_WIDTH=52;var Fve=2146435072,Vve=1048575,bb=1023;Ht.MIN_NORMAL_EXPONENT=-bb+1;Ht.MAX_NORMAL_EXPONENT=bb;Ht.MIN_VALUE=Math.pow(2,-1022);function Gve(t){let e=new DataView(new ArrayBuffer(8));return e.setFloat64(0,t),((e.getUint32(0)&Fve)>>20)-bb}Ht.getNormalBase2=Gve;function qve(t){let e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);let r=e.getUint32(0),o=e.getUint32(4);return(r&Vve)*Math.pow(2,32)+o}Ht.getSignificand=qve});var qh=p(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.nextGreaterSquare=Ra.ldexp=void 0;function jve(t,e){return t===0||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||Number.isNaN(t)?t:t*Math.pow(2,e)}Ra.ldexp=jve;function Hve(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}Ra.nextGreaterSquare=Hve});var Hh=p(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});jh.MappingError=void 0;var Pb=class extends Error{};jh.MappingError=Pb});var p$=p(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});zh.ExponentMapping=void 0;var Pa=Rb(),zve=qh(),d$=Hh(),Cb=class{_shift;constructor(e){this._shift=-e}mapToIndex(e){if(e<Pa.MIN_VALUE)return this._minNormalLowerBoundaryIndex();let r=Pa.getNormalBase2(e),o=this._rightShift(Pa.getSignificand(e)-1,Pa.SIGNIFICAND_WIDTH);return r+o>>this._shift}lowerBoundary(e){let r=this._minNormalLowerBoundaryIndex();if(e<r)throw new d$.MappingError(`underflow: ${e} is < minimum lower boundary: ${r}`);let o=this._maxNormalLowerBoundaryIndex();if(e>o)throw new d$.MappingError(`overflow: ${e} is > maximum lower boundary: ${o}`);return zve.ldexp(1,e<<this._shift)}get scale(){return this._shift===0?0:-this._shift}_minNormalLowerBoundaryIndex(){let e=Pa.MIN_NORMAL_EXPONENT>>this._shift;return this._shift<2&&e--,e}_maxNormalLowerBoundaryIndex(){return Pa.MAX_NORMAL_EXPONENT>>this._shift}_rightShift(e,r){return Math.floor(e*Math.pow(2,-r))}};zh.ExponentMapping=Cb});var m$=p($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});$h.LogarithmMapping=void 0;var Ca=Rb(),f$=qh(),h$=Hh(),Nb=class{_scale;_scaleFactor;_inverseFactor;constructor(e){this._scale=e,this._scaleFactor=f$.ldexp(Math.LOG2E,e),this._inverseFactor=f$.ldexp(Math.LN2,-e)}mapToIndex(e){if(e<=Ca.MIN_VALUE)return this._minNormalLowerBoundaryIndex()-1;if(Ca.getSignificand(e)===0)return(Ca.getNormalBase2(e)<<this._scale)-1;let r=Math.floor(Math.log(e)*this._scaleFactor),o=this._maxNormalLowerBoundaryIndex();return r>=o?o:r}lowerBoundary(e){let r=this._maxNormalLowerBoundaryIndex();if(e>=r){if(e===r)return 2*Math.exp((e-(1<<this._scale))/this._scaleFactor);throw new h$.MappingError(`overflow: ${e} is > maximum lower boundary: ${r}`)}let o=this._minNormalLowerBoundaryIndex();if(e<=o){if(e===o)return Ca.MIN_VALUE;if(e===o-1)return Math.exp((e+(1<<this._scale))/this._scaleFactor)/2;throw new h$.MappingError(`overflow: ${e} is < minimum lower boundary: ${o}`)}return Math.exp(e*this._inverseFactor)}get scale(){return this._scale}_minNormalLowerBoundaryIndex(){return Ca.MIN_NORMAL_EXPONENT<<this._scale}_maxNormalLowerBoundaryIndex(){return(Ca.MAX_NORMAL_EXPONENT+1<<this._scale)-1}};$h.LogarithmMapping=Nb});var E$=p(Yh=>{"use strict";Object.defineProperty(Yh,"__esModule",{value:!0});Yh.getMapping=void 0;var $ve=p$(),Yve=m$(),Wve=Hh(),_$=-10,g$=20,Kve=Array.from({length:31},(t,e)=>e>10?new Yve.LogarithmMapping(e-10):new $ve.ExponentMapping(e-10));function Xve(t){if(t>g$||t<_$)throw new Wve.MappingError(`expected scale >= ${_$} && <= ${g$}, got: ${t}`);return Kve[t+10]}Yh.getMapping=Xve});var y$=p(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.ExponentialHistogramAggregator=Ma.ExponentialHistogramAccumulation=void 0;var Jve=Aa(),$u=Yi(),Qve=(R(),y(C)),S$=l$(),T$=E$(),Zve=qh(),Na=class t{low;high;static combine(e,r){return new t(Math.min(e.low,r.low),Math.max(e.high,r.high))}constructor(e,r){this.low=e,this.high=r}},eAe=20,tAe=160,Mb=2,Wh=class t{startTime;_maxSize;_recordMinMax;_sum;_count;_zeroCount;_min;_max;_positive;_negative;_mapping;constructor(e,r=tAe,o=!0,s=0,a=0,i=0,n=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,u=new S$.Buckets,l=new S$.Buckets,d=(0,T$.getMapping)(eAe)){this.startTime=e,this._maxSize=r,this._recordMinMax=o,this._sum=s,this._count=a,this._zeroCount=i,this._min=n,this._max=c,this._positive=u,this._negative=l,this._mapping=d,this._maxSize<Mb&&(Qve.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${Mb}`),this._maxSize=Mb)}record(e){this.updateByIncrement(e,1)}setStartTime(e){this.startTime=e}toPointValue(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}}get sum(){return this._sum}get min(){return this._min}get max(){return this._max}get count(){return this._count}get zeroCount(){return this._zeroCount}get scale(){return this._count===this._zeroCount?0:this._mapping.scale}get positive(){return this._positive}get negative(){return this._negative}updateByIncrement(e,r){if(!Number.isNaN(e)){if(e>this._max&&(this._max=e),e<this._min&&(this._min=e),this._count+=r,e===0){this._zeroCount+=r;return}this._sum+=e*r,e>0?this._updateBuckets(this._positive,e,r):this._updateBuckets(this._negative,-e,r)}}merge(e){this._count===0?(this._min=e.min,this._max=e.max):e.count!==0&&(e.min<this.min&&(this._min=e.min),e.max>this.max&&(this._max=e.max)),this.startTime=e.startTime,this._sum+=e.sum,this._count+=e.count,this._zeroCount+=e.zeroCount;let r=this._minScale(e);this._downscale(this.scale-r),this._mergeBuckets(this.positive,e,e.positive,r),this._mergeBuckets(this.negative,e,e.negative,r)}diff(e){this._min=1/0,this._max=-1/0,this._sum-=e.sum,this._count-=e.count,this._zeroCount-=e.zeroCount;let r=this._minScale(e);this._downscale(this.scale-r),this._diffBuckets(this.positive,e,e.positive,r),this._diffBuckets(this.negative,e,e.negative,r)}clone(){return new t(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)}_updateBuckets(e,r,o){let s=this._mapping.mapToIndex(r),a=!1,i=0,n=0;if(e.length===0?(e.indexStart=s,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):s<e.indexStart&&e.indexEnd-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 c=this._changeScale(i,n);this._downscale(c),s=this._mapping.mapToIndex(r)}this._incrementIndexBy(e,s,o)}_incrementIndexBy(e,r,o){if(o===0)return;if(e.length===0&&(e.indexStart=e.indexEnd=e.indexBase=r),r<e.indexStart){let a=e.indexEnd-r;a>=e.backing.length&&this._grow(e,a+1),e.indexStart=r}else if(r>e.indexEnd){let a=r-e.indexStart;a>=e.backing.length&&this._grow(e,a+1),e.indexEnd=r}let s=r-e.indexBase;s<0&&(s+=e.backing.length),e.incrementBucket(s,o)}_grow(e,r){let o=e.backing.length,s=e.indexBase-e.indexStart,a=o-s,i=(0,Zve.nextGreaterSquare)(r);i>this._maxSize&&(i=this._maxSize);let n=i-s;e.backing.growTo(i,a,n)}_changeScale(e,r){let o=0;for(;e-r>=this._maxSize;)e>>=1,r>>=1,o++;return o}_downscale(e){if(e===0)return;if(e<0)throw new Error(`impossible change of scale: ${this.scale}`);let r=this._mapping.scale-e;this._positive.downscale(e),this._negative.downscale(e),this._mapping=(0,T$.getMapping)(r)}_minScale(e){let r=Math.min(this.scale,e.scale),o=Na.combine(this._highLowAtScale(this.positive,this.scale,r),this._highLowAtScale(e.positive,e.scale,r)),s=Na.combine(this._highLowAtScale(this.negative,this.scale,r),this._highLowAtScale(e.negative,e.scale,r));return Math.min(r-this._changeScale(o.high,o.low),r-this._changeScale(s.high,s.low))}_highLowAtScale(e,r,o){if(e.length===0)return new Na(0,-1);let s=r-o;return new Na(e.indexStart>>s,e.indexEnd>>s)}_mergeBuckets(e,r,o,s){let a=o.offset,i=r.scale-s;for(let n=0;n<o.length;n++)this._incrementIndexBy(e,a+n>>i,o.at(n))}_diffBuckets(e,r,o,s){let a=o.offset,i=r.scale-s;for(let n=0;n<o.length;n++){let u=(a+n>>i)-e.indexBase;u<0&&(u+=e.backing.length),e.decrementBucket(u,o.at(n))}e.trim()}};Ma.ExponentialHistogramAccumulation=Wh;var Ib=class{_maxSize;_recordMinMax;kind=Jve.AggregatorKind.EXPONENTIAL_HISTOGRAM;constructor(e,r){this._maxSize=e,this._recordMinMax=r}createAccumulation(e){return new Wh(e,this._maxSize,this._recordMinMax)}merge(e,r){let o=r.clone();return o.merge(e),o}diff(e,r){let o=r.clone();return o.diff(e),o}toMetricData(e,r,o,s){return{descriptor:e,aggregationTemporality:r,dataPointType:$u.DataPointType.EXPONENTIAL_HISTOGRAM,dataPoints:o.map(([a,i])=>{let n=i.toPointValue(),c=e.type===$u.InstrumentType.GAUGE||e.type===$u.InstrumentType.UP_DOWN_COUNTER||e.type===$u.InstrumentType.OBSERVABLE_GAUGE||e.type===$u.InstrumentType.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:c?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}}})}}};Ma.ExponentialHistogramAggregator=Ib});var v$=p(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.LastValueAggregator=xa.LastValueAccumulation=void 0;var rAe=Aa(),Yu=K(),nAe=Yi(),Ia=class{startTime;_current;sampleTime;constructor(e,r=0,o=[0,0]){this.startTime=e,this._current=r,this.sampleTime=o}record(e){this._current=e,this.sampleTime=(0,Yu.millisToHrTime)(Date.now())}setStartTime(e){this.startTime=e}toPointValue(){return this._current}};xa.LastValueAccumulation=Ia;var xb=class{kind=rAe.AggregatorKind.LAST_VALUE;createAccumulation(e){return new Ia(e)}merge(e,r){let o=(0,Yu.hrTimeToMicroseconds)(r.sampleTime)>=(0,Yu.hrTimeToMicroseconds)(e.sampleTime)?r:e;return new Ia(e.startTime,o.toPointValue(),o.sampleTime)}diff(e,r){let o=(0,Yu.hrTimeToMicroseconds)(r.sampleTime)>=(0,Yu.hrTimeToMicroseconds)(e.sampleTime)?r:e;return new Ia(r.startTime,o.toPointValue(),o.sampleTime)}toMetricData(e,r,o,s){return{descriptor:e,aggregationTemporality:r,dataPointType:nAe.DataPointType.GAUGE,dataPoints:o.map(([a,i])=>({attributes:a,startTime:i.startTime,endTime:s,value:i.toPointValue()}))}}};xa.LastValueAggregator=xb});var A$=p(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.SumAggregator=wa.SumAccumulation=void 0;var iAe=Aa(),oAe=Yi(),Wi=class{startTime;monotonic;_current;reset;constructor(e,r,o=0,s=!1){this.startTime=e,this.monotonic=r,this._current=o,this.reset=s}record(e){this.monotonic&&e<0||(this._current+=e)}setStartTime(e){this.startTime=e}toPointValue(){return this._current}};wa.SumAccumulation=Wi;var wb=class{monotonic;kind=iAe.AggregatorKind.SUM;constructor(e){this.monotonic=e}createAccumulation(e){return new Wi(e,this.monotonic)}merge(e,r){let o=e.toPointValue(),s=r.toPointValue();return r.reset?new Wi(r.startTime,this.monotonic,s,r.reset):new Wi(e.startTime,this.monotonic,o+s)}diff(e,r){let o=e.toPointValue(),s=r.toPointValue();return this.monotonic&&o>s?new Wi(r.startTime,this.monotonic,s,!0):new Wi(r.startTime,this.monotonic,s-o)}toMetricData(e,r,o,s){return{descriptor:e,aggregationTemporality:r,dataPointType:oAe.DataPointType.SUM,dataPoints:o.map(([a,i])=>({attributes:a,startTime:i.startTime,endTime:s,value:i.toPointValue()})),isMonotonic:this.monotonic}}};wa.SumAggregator=wb});var C$=p(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.SumAggregator=je.SumAccumulation=je.LastValueAggregator=je.LastValueAccumulation=je.ExponentialHistogramAggregator=je.ExponentialHistogramAccumulation=je.HistogramAggregator=je.HistogramAccumulation=je.DropAggregator=void 0;var sAe=c$();Object.defineProperty(je,"DropAggregator",{enumerable:!0,get:function(){return sAe.DropAggregator}});var O$=u$();Object.defineProperty(je,"HistogramAccumulation",{enumerable:!0,get:function(){return O$.HistogramAccumulation}});Object.defineProperty(je,"HistogramAggregator",{enumerable:!0,get:function(){return O$.HistogramAggregator}});var b$=y$();Object.defineProperty(je,"ExponentialHistogramAccumulation",{enumerable:!0,get:function(){return b$.ExponentialHistogramAccumulation}});Object.defineProperty(je,"ExponentialHistogramAggregator",{enumerable:!0,get:function(){return b$.ExponentialHistogramAggregator}});var R$=v$();Object.defineProperty(je,"LastValueAccumulation",{enumerable:!0,get:function(){return R$.LastValueAccumulation}});Object.defineProperty(je,"LastValueAggregator",{enumerable:!0,get:function(){return R$.LastValueAggregator}});var P$=A$();Object.defineProperty(je,"SumAccumulation",{enumerable:!0,get:function(){return P$.SumAccumulation}});Object.defineProperty(je,"SumAggregator",{enumerable:!0,get:function(){return P$.SumAggregator}})});var N$=p(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.DEFAULT_AGGREGATION=fe.EXPONENTIAL_HISTOGRAM_AGGREGATION=fe.HISTOGRAM_AGGREGATION=fe.LAST_VALUE_AGGREGATION=fe.SUM_AGGREGATION=fe.DROP_AGGREGATION=fe.DefaultAggregation=fe.ExponentialHistogramAggregation=fe.ExplicitBucketHistogramAggregation=fe.HistogramAggregation=fe.LastValueAggregation=fe.SumAggregation=fe.DropAggregation=void 0;var aAe=(R(),y(C)),Ho=C$(),yn=Yi(),Kh=class t{static DEFAULT_INSTANCE=new Ho.DropAggregator;createAggregator(e){return t.DEFAULT_INSTANCE}};fe.DropAggregation=Kh;var Xh=class t{static MONOTONIC_INSTANCE=new Ho.SumAggregator(!0);static NON_MONOTONIC_INSTANCE=new Ho.SumAggregator(!1);createAggregator(e){switch(e.type){case yn.InstrumentType.COUNTER:case yn.InstrumentType.OBSERVABLE_COUNTER:case yn.InstrumentType.HISTOGRAM:return t.MONOTONIC_INSTANCE;default:return t.NON_MONOTONIC_INSTANCE}}};fe.SumAggregation=Xh;var Jh=class t{static DEFAULT_INSTANCE=new Ho.LastValueAggregator;createAggregator(e){return t.DEFAULT_INSTANCE}};fe.LastValueAggregation=Jh;var Qh=class t{static DEFAULT_INSTANCE=new Ho.HistogramAggregator([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0);createAggregator(e){return t.DEFAULT_INSTANCE}};fe.HistogramAggregation=Qh;var Zh=class{_recordMinMax;_boundaries;constructor(e,r=!0){if(this._recordMinMax=r,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 Ho.HistogramAggregator(this._boundaries,this._recordMinMax)}};fe.ExplicitBucketHistogramAggregation=Zh;var em=class{_maxSize;_recordMinMax;constructor(e=160,r=!0){this._maxSize=e,this._recordMinMax=r}createAggregator(e){return new Ho.ExponentialHistogramAggregator(this._maxSize,this._recordMinMax)}};fe.ExponentialHistogramAggregation=em;var tm=class{_resolve(e){switch(e.type){case yn.InstrumentType.COUNTER:case yn.InstrumentType.UP_DOWN_COUNTER:case yn.InstrumentType.OBSERVABLE_COUNTER:case yn.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return fe.SUM_AGGREGATION;case yn.InstrumentType.GAUGE:case yn.InstrumentType.OBSERVABLE_GAUGE:return fe.LAST_VALUE_AGGREGATION;case yn.InstrumentType.HISTOGRAM:return e.advice.explicitBucketBoundaries?new Zh(e.advice.explicitBucketBoundaries):fe.HISTOGRAM_AGGREGATION}return aAe.diag.warn(`Unable to recognize instrument type: ${e.type}`),fe.DROP_AGGREGATION}createAggregator(e){return this._resolve(e).createAggregator(e)}};fe.DefaultAggregation=tm;fe.DROP_AGGREGATION=new Kh;fe.SUM_AGGREGATION=new Xh;fe.LAST_VALUE_AGGREGATION=new Jh;fe.HISTOGRAM_AGGREGATION=new Qh;fe.EXPONENTIAL_HISTOGRAM_AGGREGATION=new em;fe.DEFAULT_AGGREGATION=new tm});var Wu=p(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.toAggregation=Yo.AggregationType=void 0;var zo=N$(),$o;(function(t){t[t.DEFAULT=0]="DEFAULT",t[t.DROP=1]="DROP",t[t.SUM=2]="SUM",t[t.LAST_VALUE=3]="LAST_VALUE",t[t.EXPLICIT_BUCKET_HISTOGRAM=4]="EXPLICIT_BUCKET_HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=5]="EXPONENTIAL_HISTOGRAM"})($o=Yo.AggregationType||(Yo.AggregationType={}));function cAe(t){switch(t.type){case $o.DEFAULT:return zo.DEFAULT_AGGREGATION;case $o.DROP:return zo.DROP_AGGREGATION;case $o.SUM:return zo.SUM_AGGREGATION;case $o.LAST_VALUE:return zo.LAST_VALUE_AGGREGATION;case $o.EXPONENTIAL_HISTOGRAM:{let e=t;return new zo.ExponentialHistogramAggregation(e.options?.maxSize,e.options?.recordMinMax)}case $o.EXPLICIT_BUCKET_HISTOGRAM:{let e=t;return e.options==null?zo.HISTOGRAM_AGGREGATION:new zo.ExplicitBucketHistogramAggregation(e.options?.boundaries,e.options?.recordMinMax)}default:throw new Error("Unsupported Aggregation")}}Yo.toAggregation=cAe});var Lb=p(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=La.DEFAULT_AGGREGATION_SELECTOR=void 0;var uAe=Bh(),lAe=Wu(),dAe=t=>({type:lAe.AggregationType.DEFAULT});La.DEFAULT_AGGREGATION_SELECTOR=dAe;var pAe=t=>uAe.AggregationTemporality.CUMULATIVE;La.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR=pAe});var Ub=p(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});nm.MetricReader=void 0;var M$=(R(),y(C)),rm=qr(),I$=Lb(),Db=class{_shutdown=!1;_metricProducers;_sdkMetricProducer;_aggregationTemporalitySelector;_aggregationSelector;_cardinalitySelector;constructor(e){this._aggregationSelector=e?.aggregationSelector??I$.DEFAULT_AGGREGATION_SELECTOR,this._aggregationTemporalitySelector=e?.aggregationTemporalitySelector??I$.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR,this._metricProducers=e?.metricProducers??[],this._cardinalitySelector=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[r,...o]=await Promise.all([this._sdkMetricProducer.collect({timeoutMillis:e?.timeoutMillis}),...this._metricProducers.map(n=>n.collect({timeoutMillis:e?.timeoutMillis}))]),s=r.errors.concat((0,rm.FlatMap)(o,n=>n.errors)),a=r.resourceMetrics.resource,i=r.resourceMetrics.scopeMetrics.concat((0,rm.FlatMap)(o,n=>n.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:a,scopeMetrics:i},errors:s}}async shutdown(e){if(this._shutdown){M$.diag.error("Cannot call shutdown twice.");return}e?.timeoutMillis==null?await this.onShutdown():await(0,rm.callWithTimeout)(this.onShutdown(),e.timeoutMillis),this._shutdown=!0}async forceFlush(e){if(this._shutdown){M$.diag.warn("Cannot forceFlush on already shutdown MetricReader.");return}if(e?.timeoutMillis==null){await this.onForceFlush();return}await(0,rm.callWithTimeout)(this.onForceFlush(),e.timeoutMillis)}};nm.MetricReader=Db});var w$=p(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});im.PeriodicExportingMetricReader=void 0;var kb=(R(),y(C)),Ku=K(),fAe=Ub(),x$=qr(),Bb=class extends fAe.MetricReader{_interval;_exporter;_exportInterval;_exportTimeout;constructor(e){if(super({aggregationSelector:e.exporter.selectAggregation?.bind(e.exporter),aggregationTemporalitySelector:e.exporter.selectAggregationTemporality?.bind(e.exporter),metricProducers:e.metricProducers}),e.exportIntervalMillis!==void 0&&e.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(e.exportTimeoutMillis!==void 0&&e.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(e.exportTimeoutMillis!==void 0&&e.exportIntervalMillis!==void 0&&e.exportIntervalMillis<e.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");this._exportInterval=e.exportIntervalMillis??6e4,this._exportTimeout=e.exportTimeoutMillis??3e4,this._exporter=e.exporter}async _runOnce(){try{await(0,x$.callWithTimeout)(this._doRun(),this._exportTimeout)}catch(e){if(e instanceof x$.TimeoutError){kb.diag.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout);return}(0,Ku.globalErrorHandler)(e)}}async _doRun(){let{resourceMetrics:e,errors:r}=await this.collect({timeoutMillis:this._exportTimeout});if(r.length>0&&kb.diag.error("PeriodicExportingMetricReader: metrics collection errors",...r),e.resource.asyncAttributesPending)try{await e.resource.waitForAsyncAttributes?.()}catch(s){kb.diag.debug("Error while resolving async portion of resource: ",s),(0,Ku.globalErrorHandler)(s)}if(e.scopeMetrics.length===0)return;let o=await Ku.internal._export(this._exporter,e);if(o.code!==Ku.ExportResultCode.SUCCESS)throw new Error(`PeriodicExportingMetricReader: metrics export failed (error ${o.error})`)}onInitialized(){this._interval=setInterval(()=>{this._runOnce()},this._exportInterval),(0,Ku.unrefTimer)(this._interval)}async onForceFlush(){await this._runOnce(),await this._exporter.forceFlush()}async onShutdown(){this._interval&&clearInterval(this._interval),await this.onForceFlush(),await this._exporter.shutdown()}};im.PeriodicExportingMetricReader=Bb});var D$=p(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});om.InMemoryMetricExporter=void 0;var L$=K(),Fb=class{_shutdown=!1;_aggregationTemporality;_metrics=[];constructor(e){this._aggregationTemporality=e}export(e,r){if(this._shutdown){setTimeout(()=>r({code:L$.ExportResultCode.FAILED}),0);return}this._metrics.push(e),setTimeout(()=>r({code:L$.ExportResultCode.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()}};om.InMemoryMetricExporter=Fb});var k$=p(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});sm.ConsoleMetricExporter=void 0;var U$=K(),hAe=Lb(),Vb=class t{_shutdown=!1;_temporalitySelector;constructor(e){this._temporalitySelector=e?.temporalitySelector??hAe.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR}export(e,r){if(this._shutdown){setImmediate(r,{code:U$.ExportResultCode.FAILED});return}return t._sendMetrics(e,r)}forceFlush(){return Promise.resolve()}selectAggregationTemporality(e){return this._temporalitySelector(e)}shutdown(){return this._shutdown=!0,Promise.resolve()}static _sendMetrics(e,r){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});r({code:U$.ExportResultCode.SUCCESS})}};sm.ConsoleMetricExporter=Vb});var B$=p(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});am.defaultServiceName=void 0;function mAe(){return`unknown_service:${process.argv0}`}am.defaultServiceName=mAe});var F$=p(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});cm.defaultServiceName=void 0;var _Ae=B$();Object.defineProperty(cm,"defaultServiceName",{enumerable:!0,get:function(){return _Ae.defaultServiceName}})});var Gb=p(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});um.defaultServiceName=void 0;var gAe=F$();Object.defineProperty(um,"defaultServiceName",{enumerable:!0,get:function(){return gAe.defaultServiceName}})});var V$=p(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.identity=Da.isPromiseLike=void 0;var EAe=t=>t!==null&&typeof t=="object"&&typeof t.then=="function";Da.isPromiseLike=EAe;function SAe(t){return t}Da.identity=SAe});var Hb=p(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.defaultResource=vn.emptyResource=vn.resourceFromDetectedResource=vn.resourceFromAttributes=void 0;var Ju=(R(),y(C)),qb=K(),Wo=(vt(),y(Ut)),TAe=Gb(),Xu=V$(),lm=class t{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(e,r){let o=new t({},r);return o._rawAttributes=G$(e),o._asyncAttributesPending=e.filter(([s,a])=>(0,Xu.isPromiseLike)(a)).length>0,o}constructor(e,r){let o=e.attributes??{};this._rawAttributes=Object.entries(o).map(([s,a])=>((0,Xu.isPromiseLike)(a)&&(this._asyncAttributesPending=!0),[s,a])),this._rawAttributes=G$(this._rawAttributes),this._schemaUrl=OAe(r?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){let[r,o]=this._rawAttributes[e];this._rawAttributes[e]=[r,(0,Xu.isPromiseLike)(o)?await o:o]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&Ju.diag.error("Accessing resource attributes before async attributes settled"),this._memoizedAttributes)return this._memoizedAttributes;let e={};for(let[r,o]of this._rawAttributes){if((0,Xu.isPromiseLike)(o)){Ju.diag.debug(`Unsettled resource attribute ${r} skipped`);continue}o!=null&&(e[r]??=o)}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(e){if(e==null)return this;let r=bAe(this,e),o=r?{schemaUrl:r}:void 0;return t.FromAttributeList([...e.getRawAttributes(),...this.getRawAttributes()],o)}};function jb(t,e){return lm.FromAttributeList(Object.entries(t),e)}vn.resourceFromAttributes=jb;function yAe(t,e){return new lm(t,e)}vn.resourceFromDetectedResource=yAe;function vAe(){return jb({})}vn.emptyResource=vAe;function AAe(){return jb({[Wo.ATTR_SERVICE_NAME]:(0,TAe.defaultServiceName)(),[Wo.ATTR_TELEMETRY_SDK_LANGUAGE]:qb.SDK_INFO[Wo.ATTR_TELEMETRY_SDK_LANGUAGE],[Wo.ATTR_TELEMETRY_SDK_NAME]:qb.SDK_INFO[Wo.ATTR_TELEMETRY_SDK_NAME],[Wo.ATTR_TELEMETRY_SDK_VERSION]:qb.SDK_INFO[Wo.ATTR_TELEMETRY_SDK_VERSION]})}vn.defaultResource=AAe;function G$(t){return t.map(([e,r])=>(0,Xu.isPromiseLike)(r)?[e,r.catch(o=>{Ju.diag.debug("promise rejection for resource attribute: %s - %s",e,o)})]:[e,r])}function OAe(t){if(typeof t=="string"||t===void 0)return t;Ju.diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",t)}function bAe(t,e){let r=t?.schemaUrl,o=e?.schemaUrl,s=r===void 0||r==="",a=o===void 0||o==="";if(s)return o;if(a||r===o)return r;Ju.diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',r,o)}});var j$=p(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});dm.detectResources=void 0;var q$=(R(),y(C)),zb=Hb(),RAe=(t={})=>(t.detectors||[]).map(r=>{try{let o=(0,zb.resourceFromDetectedResource)(r.detect(t));return q$.diag.debug(`${r.constructor.name} found resource.`,o),o}catch(o){return q$.diag.debug(`${r.constructor.name} failed: ${o.message}`),(0,zb.emptyResource)()}}).reduce((r,o)=>r.merge(o),(0,zb.emptyResource)());dm.detectResources=RAe});var z$=p(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});pm.envDetector=void 0;var PAe=(R(),y(C)),CAe=(vt(),y(Ut)),H$=K(),$b=class{_MAX_LENGTH=255;_COMMA_SEPARATOR=",";_LABEL_KEY_VALUE_SPLITTER="=";_ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.";_ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters.";detect(e){let r={},o=(0,H$.getStringFromEnv)("OTEL_RESOURCE_ATTRIBUTES"),s=(0,H$.getStringFromEnv)("OTEL_SERVICE_NAME");if(o)try{let a=this._parseResourceAttributes(o);Object.assign(r,a)}catch(a){PAe.diag.debug(`EnvDetector failed: ${a.message}`)}return s&&(r[CAe.ATTR_SERVICE_NAME]=s),{attributes:r}}_parseResourceAttributes(e){if(!e)return{};let r={},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}`);r[i]=decodeURIComponent(n)}return r}_isValid(e){return e.length<=this._MAX_LENGTH&&this._isBaggageOctetString(e)}_isBaggageOctetString(e){for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o<33||o===44||o===59||o===92||o>126)return!1}return!0}_isValidAndNotEmpty(e){return e.length>0&&this._isValid(e)}};pm.envDetector=new $b});var Qu=p(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.ATTR_WEBENGINE_VERSION=V.ATTR_WEBENGINE_NAME=V.ATTR_WEBENGINE_DESCRIPTION=V.ATTR_SERVICE_NAMESPACE=V.ATTR_SERVICE_INSTANCE_ID=V.ATTR_PROCESS_RUNTIME_VERSION=V.ATTR_PROCESS_RUNTIME_NAME=V.ATTR_PROCESS_RUNTIME_DESCRIPTION=V.ATTR_PROCESS_PID=V.ATTR_PROCESS_OWNER=V.ATTR_PROCESS_EXECUTABLE_PATH=V.ATTR_PROCESS_EXECUTABLE_NAME=V.ATTR_PROCESS_COMMAND_ARGS=V.ATTR_PROCESS_COMMAND=V.ATTR_OS_VERSION=V.ATTR_OS_TYPE=V.ATTR_K8S_POD_NAME=V.ATTR_K8S_NAMESPACE_NAME=V.ATTR_K8S_DEPLOYMENT_NAME=V.ATTR_K8S_CLUSTER_NAME=V.ATTR_HOST_TYPE=V.ATTR_HOST_NAME=V.ATTR_HOST_IMAGE_VERSION=V.ATTR_HOST_IMAGE_NAME=V.ATTR_HOST_IMAGE_ID=V.ATTR_HOST_ID=V.ATTR_HOST_ARCH=V.ATTR_CONTAINER_NAME=V.ATTR_CONTAINER_IMAGE_TAGS=V.ATTR_CONTAINER_IMAGE_NAME=V.ATTR_CONTAINER_ID=V.ATTR_CLOUD_REGION=V.ATTR_CLOUD_PROVIDER=V.ATTR_CLOUD_AVAILABILITY_ZONE=V.ATTR_CLOUD_ACCOUNT_ID=void 0;V.ATTR_CLOUD_ACCOUNT_ID="cloud.account.id";V.ATTR_CLOUD_AVAILABILITY_ZONE="cloud.availability_zone";V.ATTR_CLOUD_PROVIDER="cloud.provider";V.ATTR_CLOUD_REGION="cloud.region";V.ATTR_CONTAINER_ID="container.id";V.ATTR_CONTAINER_IMAGE_NAME="container.image.name";V.ATTR_CONTAINER_IMAGE_TAGS="container.image.tags";V.ATTR_CONTAINER_NAME="container.name";V.ATTR_HOST_ARCH="host.arch";V.ATTR_HOST_ID="host.id";V.ATTR_HOST_IMAGE_ID="host.image.id";V.ATTR_HOST_IMAGE_NAME="host.image.name";V.ATTR_HOST_IMAGE_VERSION="host.image.version";V.ATTR_HOST_NAME="host.name";V.ATTR_HOST_TYPE="host.type";V.ATTR_K8S_CLUSTER_NAME="k8s.cluster.name";V.ATTR_K8S_DEPLOYMENT_NAME="k8s.deployment.name";V.ATTR_K8S_NAMESPACE_NAME="k8s.namespace.name";V.ATTR_K8S_POD_NAME="k8s.pod.name";V.ATTR_OS_TYPE="os.type";V.ATTR_OS_VERSION="os.version";V.ATTR_PROCESS_COMMAND="process.command";V.ATTR_PROCESS_COMMAND_ARGS="process.command_args";V.ATTR_PROCESS_EXECUTABLE_NAME="process.executable.name";V.ATTR_PROCESS_EXECUTABLE_PATH="process.executable.path";V.ATTR_PROCESS_OWNER="process.owner";V.ATTR_PROCESS_PID="process.pid";V.ATTR_PROCESS_RUNTIME_DESCRIPTION="process.runtime.description";V.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name";V.ATTR_PROCESS_RUNTIME_VERSION="process.runtime.version";V.ATTR_SERVICE_INSTANCE_ID="service.instance.id";V.ATTR_SERVICE_NAMESPACE="service.namespace";V.ATTR_WEBENGINE_DESCRIPTION="webengine.description";V.ATTR_WEBENGINE_NAME="webengine.name";V.ATTR_WEBENGINE_VERSION="webengine.version"});var hm=p(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});fm.execAsync=void 0;var NAe=b("child_process"),MAe=b("util");fm.execAsync=MAe.promisify(NAe.exec)});var $$=p(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});mm.getMachineId=void 0;var IAe=hm(),xAe=(R(),y(C));async function wAe(){try{let e=(await(0,IAe.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
|
|
5
|
+
`).find(o=>o.includes("IOPlatformUUID"));if(!e)return;let r=e.split('" = "');if(r.length===2)return r[1].slice(0,-1)}catch(t){xAe.diag.debug(`error reading machine id: ${t}`)}}mm.getMachineId=wAe});var Y$=p(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});_m.getMachineId=void 0;var LAe=b("fs"),DAe=(R(),y(C));async function UAe(){let t=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let e of t)try{return(await LAe.promises.readFile(e,{encoding:"utf8"})).trim()}catch(r){DAe.diag.debug(`error reading machine id: ${r}`)}}_m.getMachineId=UAe});var K$=p(gm=>{"use strict";Object.defineProperty(gm,"__esModule",{value:!0});gm.getMachineId=void 0;var kAe=b("fs"),BAe=hm(),W$=(R(),y(C));async function FAe(){try{return(await kAe.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(t){W$.diag.debug(`error reading machine id: ${t}`)}try{return(await(0,BAe.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(t){W$.diag.debug(`error reading machine id: ${t}`)}}gm.getMachineId=FAe});var J$=p(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});Em.getMachineId=void 0;var X$=b("process"),VAe=hm(),GAe=(R(),y(C));async function qAe(){let t="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",e="%windir%\\System32\\REG.exe";X$.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in X$.env&&(e="%windir%\\sysnative\\cmd.exe /c "+e);try{let o=(await(0,VAe.execAsync)(`${e} ${t}`)).stdout.split("REG_SZ");if(o.length===2)return o[1].trim()}catch(r){GAe.diag.debug(`error reading machine id: ${r}`)}}Em.getMachineId=qAe});var Q$=p(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});Sm.getMachineId=void 0;var jAe=(R(),y(C));async function HAe(){jAe.diag.debug("could not read machine-id: unsupported platform")}Sm.getMachineId=HAe});var Z$=p(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});Tm.getMachineId=void 0;var zAe=b("process"),Ko;async function $Ae(){if(!Ko)switch(zAe.platform){case"darwin":Ko=(await Promise.resolve().then(()=>he($$()))).getMachineId;break;case"linux":Ko=(await Promise.resolve().then(()=>he(Y$()))).getMachineId;break;case"freebsd":Ko=(await Promise.resolve().then(()=>he(K$()))).getMachineId;break;case"win32":Ko=(await Promise.resolve().then(()=>he(J$()))).getMachineId;break;default:Ko=(await Promise.resolve().then(()=>he(Q$()))).getMachineId;break}return Ko()}Tm.getMachineId=$Ae});var Yb=p(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.normalizeType=Ua.normalizeArch=void 0;var YAe=t=>{switch(t){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return t}};Ua.normalizeArch=YAe;var WAe=t=>{switch(t){case"sunos":return"solaris";case"win32":return"windows";default:return t}};Ua.normalizeType=WAe});var tY=p(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});ym.hostDetector=void 0;var Wb=Qu(),eY=b("os"),KAe=Z$(),XAe=Yb(),Kb=class{detect(e){return{attributes:{[Wb.ATTR_HOST_NAME]:(0,eY.hostname)(),[Wb.ATTR_HOST_ARCH]:(0,XAe.normalizeArch)((0,eY.arch)()),[Wb.ATTR_HOST_ID]:(0,KAe.getMachineId)()}}}};ym.hostDetector=new Kb});var iY=p(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});vm.osDetector=void 0;var rY=Qu(),nY=b("os"),JAe=Yb(),Xb=class{detect(e){return{attributes:{[rY.ATTR_OS_TYPE]:(0,JAe.normalizeType)((0,nY.platform)()),[rY.ATTR_OS_VERSION]:(0,nY.release)()}}}};vm.osDetector=new Xb});var oY=p(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});Am.processDetector=void 0;var QAe=(R(),y(C)),gi=Qu(),ZAe=b("os"),Jb=class{detect(e){let r={[gi.ATTR_PROCESS_PID]:process.pid,[gi.ATTR_PROCESS_EXECUTABLE_NAME]:process.title,[gi.ATTR_PROCESS_EXECUTABLE_PATH]:process.execPath,[gi.ATTR_PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[gi.ATTR_PROCESS_RUNTIME_VERSION]:process.versions.node,[gi.ATTR_PROCESS_RUNTIME_NAME]:"nodejs",[gi.ATTR_PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};process.argv.length>1&&(r[gi.ATTR_PROCESS_COMMAND]=process.argv[1]);try{let o=ZAe.userInfo();r[gi.ATTR_PROCESS_OWNER]=o.username}catch(o){QAe.diag.debug(`error obtaining process owner: ${o}`)}return{attributes:r}}};Am.processDetector=new Jb});var sY=p(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});Om.serviceInstanceIdDetector=void 0;var eOe=Qu(),tOe=b("crypto"),Qb=class{detect(e){return{attributes:{[eOe.ATTR_SERVICE_INSTANCE_ID]:(0,tOe.randomUUID)()}}}};Om.serviceInstanceIdDetector=new Qb});var aY=p(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.serviceInstanceIdDetector=An.processDetector=An.osDetector=An.hostDetector=void 0;var rOe=tY();Object.defineProperty(An,"hostDetector",{enumerable:!0,get:function(){return rOe.hostDetector}});var nOe=iY();Object.defineProperty(An,"osDetector",{enumerable:!0,get:function(){return nOe.osDetector}});var iOe=oY();Object.defineProperty(An,"processDetector",{enumerable:!0,get:function(){return iOe.processDetector}});var oOe=sY();Object.defineProperty(An,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return oOe.serviceInstanceIdDetector}})});var cY=p(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.serviceInstanceIdDetector=On.processDetector=On.osDetector=On.hostDetector=void 0;var bm=aY();Object.defineProperty(On,"hostDetector",{enumerable:!0,get:function(){return bm.hostDetector}});Object.defineProperty(On,"osDetector",{enumerable:!0,get:function(){return bm.osDetector}});Object.defineProperty(On,"processDetector",{enumerable:!0,get:function(){return bm.processDetector}});Object.defineProperty(On,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return bm.serviceInstanceIdDetector}})});var uY=p(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.noopDetector=ka.NoopDetector=void 0;var Rm=class{detect(){return{attributes:{}}}};ka.NoopDetector=Rm;ka.noopDetector=new Rm});var lY=p(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.noopDetector=zt.serviceInstanceIdDetector=zt.processDetector=zt.osDetector=zt.hostDetector=zt.envDetector=void 0;var sOe=z$();Object.defineProperty(zt,"envDetector",{enumerable:!0,get:function(){return sOe.envDetector}});var Pm=cY();Object.defineProperty(zt,"hostDetector",{enumerable:!0,get:function(){return Pm.hostDetector}});Object.defineProperty(zt,"osDetector",{enumerable:!0,get:function(){return Pm.osDetector}});Object.defineProperty(zt,"processDetector",{enumerable:!0,get:function(){return Pm.processDetector}});Object.defineProperty(zt,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return Pm.serviceInstanceIdDetector}});var aOe=uY();Object.defineProperty(zt,"noopDetector",{enumerable:!0,get:function(){return aOe.noopDetector}})});var dY=p(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.defaultServiceName=Ie.emptyResource=Ie.defaultResource=Ie.resourceFromAttributes=Ie.serviceInstanceIdDetector=Ie.processDetector=Ie.osDetector=Ie.hostDetector=Ie.envDetector=Ie.detectResources=void 0;var cOe=j$();Object.defineProperty(Ie,"detectResources",{enumerable:!0,get:function(){return cOe.detectResources}});var Zu=lY();Object.defineProperty(Ie,"envDetector",{enumerable:!0,get:function(){return Zu.envDetector}});Object.defineProperty(Ie,"hostDetector",{enumerable:!0,get:function(){return Zu.hostDetector}});Object.defineProperty(Ie,"osDetector",{enumerable:!0,get:function(){return Zu.osDetector}});Object.defineProperty(Ie,"processDetector",{enumerable:!0,get:function(){return Zu.processDetector}});Object.defineProperty(Ie,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return Zu.serviceInstanceIdDetector}});var Zb=Hb();Object.defineProperty(Ie,"resourceFromAttributes",{enumerable:!0,get:function(){return Zb.resourceFromAttributes}});Object.defineProperty(Ie,"defaultResource",{enumerable:!0,get:function(){return Zb.defaultResource}});Object.defineProperty(Ie,"emptyResource",{enumerable:!0,get:function(){return Zb.emptyResource}});var uOe=Gb();Object.defineProperty(Ie,"defaultServiceName",{enumerable:!0,get:function(){return uOe.defaultServiceName}})});var pY=p(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});Cm.ViewRegistry=void 0;var eR=class{_registeredViews=[];addView(e){this._registeredViews.push(e)}findViews(e,r){return this._registeredViews.filter(s=>this._matchInstrument(s.instrumentSelector,e)&&this._matchMeter(s.meterSelector,r))}_matchInstrument(e,r){return(e.getType()===void 0||r.type===e.getType())&&e.getNameFilter().match(r.name)&&e.getUnitFilter().match(r.unit)}_matchMeter(e,r){return e.getNameFilter().match(r.name)&&(r.version===void 0||e.getVersionFilter().match(r.version))&&(r.schemaUrl===void 0||e.getSchemaUrlFilter().match(r.schemaUrl))}};Cm.ViewRegistry=eR});var el=p(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.isValidName=bn.isDescriptorCompatibleWith=bn.createInstrumentDescriptorWithView=bn.createInstrumentDescriptor=void 0;var fY=(R(),y(C)),lOe=qr();function dOe(t,e,r){return hY(t)||fY.diag.warn(`Invalid metric name: "${t}". The metric name should be a ASCII string with a length no greater than 255 characters.`),{name:t,type:e,description:r?.description??"",unit:r?.unit??"",valueType:r?.valueType??fY.ValueType.DOUBLE,advice:r?.advice??{}}}bn.createInstrumentDescriptor=dOe;function pOe(t,e){return{name:t.name??e.name,description:t.description??e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}bn.createInstrumentDescriptorWithView=pOe;function fOe(t,e){return(0,lOe.equalsCaseInsensitive)(t.name,e.name)&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType}bn.isDescriptorCompatibleWith=fOe;var hOe=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function hY(t){return t.match(hOe)!=null}bn.isValidName=hY});var Nm=p(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.isObservableInstrument=xe.ObservableUpDownCounterInstrument=xe.ObservableGaugeInstrument=xe.ObservableCounterInstrument=xe.ObservableInstrument=xe.HistogramInstrument=xe.GaugeInstrument=xe.CounterInstrument=xe.UpDownCounterInstrument=xe.SyncInstrument=void 0;var Ba=(R(),y(C)),mOe=K(),Xo=class{_writableMetricStorage;_descriptor;constructor(e,r){this._writableMetricStorage=e,this._descriptor=r}_record(e,r={},o=Ba.context.active()){if(typeof e!="number"){Ba.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${e}`);return}this._descriptor.valueType===Ba.ValueType.INT&&!Number.isInteger(e)&&(Ba.diag.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,r,o,(0,mOe.millisToHrTime)(Date.now()))}};xe.SyncInstrument=Xo;var tR=class extends Xo{add(e,r,o){this._record(e,r,o)}};xe.UpDownCounterInstrument=tR;var rR=class extends Xo{add(e,r,o){if(e<0){Ba.diag.warn(`negative value provided to counter ${this._descriptor.name}: ${e}`);return}this._record(e,r,o)}};xe.CounterInstrument=rR;var nR=class extends Xo{record(e,r,o){this._record(e,r,o)}};xe.GaugeInstrument=nR;var iR=class extends Xo{record(e,r,o){if(e<0){Ba.diag.warn(`negative value provided to histogram ${this._descriptor.name}: ${e}`);return}this._record(e,r,o)}};xe.HistogramInstrument=iR;var Jo=class{_observableRegistry;_metricStorages;_descriptor;constructor(e,r,o){this._observableRegistry=o,this._descriptor=e,this._metricStorages=r}addCallback(e){this._observableRegistry.addCallback(e,this)}removeCallback(e){this._observableRegistry.removeCallback(e,this)}};xe.ObservableInstrument=Jo;var oR=class extends Jo{};xe.ObservableCounterInstrument=oR;var sR=class extends Jo{};xe.ObservableGaugeInstrument=sR;var aR=class extends Jo{};xe.ObservableUpDownCounterInstrument=aR;function _Oe(t){return t instanceof Jo}xe.isObservableInstrument=_Oe});var mY=p(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});Mm.Meter=void 0;var Qo=el(),Zo=Nm(),es=Yi(),cR=class{_meterSharedState;constructor(e){this._meterSharedState=e}createGauge(e,r){let o=(0,Qo.createInstrumentDescriptor)(e,es.InstrumentType.GAUGE,r),s=this._meterSharedState.registerMetricStorage(o);return new Zo.GaugeInstrument(s,o)}createHistogram(e,r){let o=(0,Qo.createInstrumentDescriptor)(e,es.InstrumentType.HISTOGRAM,r),s=this._meterSharedState.registerMetricStorage(o);return new Zo.HistogramInstrument(s,o)}createCounter(e,r){let o=(0,Qo.createInstrumentDescriptor)(e,es.InstrumentType.COUNTER,r),s=this._meterSharedState.registerMetricStorage(o);return new Zo.CounterInstrument(s,o)}createUpDownCounter(e,r){let o=(0,Qo.createInstrumentDescriptor)(e,es.InstrumentType.UP_DOWN_COUNTER,r),s=this._meterSharedState.registerMetricStorage(o);return new Zo.UpDownCounterInstrument(s,o)}createObservableGauge(e,r){let o=(0,Qo.createInstrumentDescriptor)(e,es.InstrumentType.OBSERVABLE_GAUGE,r),s=this._meterSharedState.registerAsyncMetricStorage(o);return new Zo.ObservableGaugeInstrument(o,s,this._meterSharedState.observableRegistry)}createObservableCounter(e,r){let o=(0,Qo.createInstrumentDescriptor)(e,es.InstrumentType.OBSERVABLE_COUNTER,r),s=this._meterSharedState.registerAsyncMetricStorage(o);return new Zo.ObservableCounterInstrument(o,s,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(e,r){let o=(0,Qo.createInstrumentDescriptor)(e,es.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER,r),s=this._meterSharedState.registerAsyncMetricStorage(o);return new Zo.ObservableUpDownCounterInstrument(o,s,this._meterSharedState.observableRegistry)}addBatchObservableCallback(e,r){this._meterSharedState.observableRegistry.addBatchCallback(e,r)}removeBatchObservableCallback(e,r){this._meterSharedState.observableRegistry.removeBatchCallback(e,r)}};Mm.Meter=cR});var lR=p(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});Im.MetricStorage=void 0;var gOe=el(),uR=class{_instrumentDescriptor;constructor(e){this._instrumentDescriptor=e}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(e){this._instrumentDescriptor=(0,gOe.createInstrumentDescriptor)(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:e,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}};Im.MetricStorage=uR});var tl=p(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.AttributeHashMap=Fa.HashMap=void 0;var EOe=qr(),xm=class{_hash;_valueMap=new Map;_keyMap=new Map;constructor(e){this._hash=e}get(e,r){return r??=this._hash(e),this._valueMap.get(r)}getOrDefault(e,r){let o=this._hash(e);if(this._valueMap.has(o))return this._valueMap.get(o);let s=r();return this._keyMap.has(o)||this._keyMap.set(o,e),this._valueMap.set(o,s),s}set(e,r,o){o??=this._hash(e),this._keyMap.has(o)||this._keyMap.set(o,e),this._valueMap.set(o,r)}has(e,r){return r??=this._hash(e),this._valueMap.has(r)}*keys(){let e=this._keyMap.entries(),r=e.next();for(;r.done!==!0;)yield[r.value[1],r.value[0]],r=e.next()}*entries(){let e=this._valueMap.entries(),r=e.next();for(;r.done!==!0;)yield[this._keyMap.get(r.value[0]),r.value[1],r.value[0]],r=e.next()}get size(){return this._valueMap.size}};Fa.HashMap=xm;var dR=class extends xm{constructor(){super(EOe.hashAttributes)}};Fa.AttributeHashMap=dR});var hR=p(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});wm.DeltaMetricProcessor=void 0;var SOe=qr(),pR=tl(),fR=class{_aggregator;_activeCollectionStorage=new pR.AttributeHashMap;_cumulativeMemoStorage=new pR.AttributeHashMap;_cardinalityLimit;_overflowAttributes={"otel.metric.overflow":!0};_overflowHashCode;constructor(e,r){this._aggregator=e,this._cardinalityLimit=(r??2e3)-1,this._overflowHashCode=(0,SOe.hashAttributes)(this._overflowAttributes)}record(e,r,o,s){let a=this._activeCollectionStorage.get(r);if(!a){if(this._activeCollectionStorage.size>=this._cardinalityLimit){this._activeCollectionStorage.getOrDefault(this._overflowAttributes,()=>this._aggregator.createAccumulation(s))?.record(e);return}a=this._aggregator.createAccumulation(s),this._activeCollectionStorage.set(r,a)}a?.record(e)}batchCumulate(e,r){Array.from(e.entries()).forEach(([o,s,a])=>{let i=this._aggregator.createAccumulation(r);i?.record(s);let n=i;if(this._cumulativeMemoStorage.has(o,a)){let c=this._cumulativeMemoStorage.get(o,a);n=this._aggregator.diff(c,i)}else if(this._cumulativeMemoStorage.size>=this._cardinalityLimit&&(o=this._overflowAttributes,a=this._overflowHashCode,this._cumulativeMemoStorage.has(o,a))){let c=this._cumulativeMemoStorage.get(o,a);n=this._aggregator.diff(c,i)}if(this._activeCollectionStorage.has(o,a)){let c=this._activeCollectionStorage.get(o,a);n=this._aggregator.merge(c,n)}this._cumulativeMemoStorage.set(o,i,a),this._activeCollectionStorage.set(o,n,a)})}collect(){let e=this._activeCollectionStorage;return this._activeCollectionStorage=new pR.AttributeHashMap,e}};wm.DeltaMetricProcessor=fR});var _R=p(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});Lm.TemporalMetricProcessor=void 0;var TOe=Bh(),yOe=tl(),mR=class t{_aggregator;_unreportedAccumulations=new Map;_reportHistory=new Map;constructor(e,r){this._aggregator=e,r.forEach(o=>{this._unreportedAccumulations.set(o,[])})}buildMetrics(e,r,o,s){this._stashAccumulations(o);let a=this._getMergedUnreportedAccumulations(e),i=a,n;if(this._reportHistory.has(e)){let u=this._reportHistory.get(e),l=u.collectionTime;n=u.aggregationTemporality,n===TOe.AggregationTemporality.CUMULATIVE?i=t.merge(u.accumulations,a,this._aggregator):i=t.calibrateStartTime(u.accumulations,a,l)}else n=e.selectAggregationTemporality(r.type);this._reportHistory.set(e,{accumulations:i,collectionTime:s,aggregationTemporality:n});let c=vOe(i);if(c.length!==0)return this._aggregator.toMetricData(r,n,c,s)}_stashAccumulations(e){let r=this._unreportedAccumulations.keys();for(let o of r){let s=this._unreportedAccumulations.get(o);s===void 0&&(s=[],this._unreportedAccumulations.set(o,s)),s.push(e)}}_getMergedUnreportedAccumulations(e){let r=new yOe.AttributeHashMap,o=this._unreportedAccumulations.get(e);if(this._unreportedAccumulations.set(e,[]),o===void 0)return r;for(let s of o)r=t.merge(r,s,this._aggregator);return r}static merge(e,r,o){let s=e,a=r.entries(),i=a.next();for(;i.done!==!0;){let[n,c,u]=i.value;if(e.has(n,u)){let l=e.get(n,u),d=o.merge(l,c);s.set(n,d,u)}else s.set(n,c,u);i=a.next()}return s}static calibrateStartTime(e,r,o){for(let[s,a]of e.keys())r.get(s,a)?.setStartTime(o);return r}};Lm.TemporalMetricProcessor=mR;function vOe(t){return Array.from(t.entries())}});var _Y=p(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});Dm.AsyncMetricStorage=void 0;var AOe=lR(),OOe=hR(),bOe=_R(),ROe=tl(),gR=class extends AOe.MetricStorage{_attributesProcessor;_aggregationCardinalityLimit;_deltaMetricStorage;_temporalMetricStorage;constructor(e,r,o,s,a){super(e),this._attributesProcessor=o,this._aggregationCardinalityLimit=a,this._deltaMetricStorage=new OOe.DeltaMetricProcessor(r,this._aggregationCardinalityLimit),this._temporalMetricStorage=new bOe.TemporalMetricProcessor(r,s)}record(e,r){let o=new ROe.AttributeHashMap;Array.from(e.entries()).forEach(([s,a])=>{o.set(this._attributesProcessor.process(s),a)}),this._deltaMetricStorage.batchCumulate(o,r)}collect(e,r){let o=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,o,r)}};Dm.AsyncMetricStorage=gR});var yY=p($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.getConflictResolutionRecipe=$t.getDescriptionResolutionRecipe=$t.getTypeConflictResolutionRecipe=$t.getUnitConflictResolutionRecipe=$t.getValueTypeConflictResolutionRecipe=$t.getIncompatibilityDetails=void 0;function POe(t,e){let r="";return t.unit!==e.unit&&(r+=` - Unit '${t.unit}' does not match '${e.unit}'
|
|
6
|
+
`),t.type!==e.type&&(r+=` - Type '${t.type}' does not match '${e.type}'
|
|
7
|
+
`),t.valueType!==e.valueType&&(r+=` - Value Type '${t.valueType}' does not match '${e.valueType}'
|
|
8
|
+
`),t.description!==e.description&&(r+=` - Description '${t.description}' does not match '${e.description}'
|
|
9
|
+
`),r}$t.getIncompatibilityDetails=POe;function gY(t,e){return` - use valueType '${t.valueType}' on instrument creation or use an instrument name other than '${e.name}'`}$t.getValueTypeConflictResolutionRecipe=gY;function EY(t,e){return` - use unit '${t.unit}' on instrument creation or use an instrument name other than '${e.name}'`}$t.getUnitConflictResolutionRecipe=EY;function SY(t,e){let r={name:e.name,type:e.type,unit:e.unit},o=JSON.stringify(r);return` - create a new view with a name other than '${t.name}' and InstrumentSelector '${o}'`}$t.getTypeConflictResolutionRecipe=SY;function TY(t,e){let r={name:e.name,type:e.type,unit:e.unit},o=JSON.stringify(r);return` - create a new view with a name other than '${t.name}' and InstrumentSelector '${o}'
|
|
10
|
+
- OR - create a new view with the name ${t.name} and description '${t.description}' and InstrumentSelector ${o}
|
|
11
|
+
- OR - create a new view with the name ${e.name} and description '${t.description}' and InstrumentSelector ${o}`}$t.getDescriptionResolutionRecipe=TY;function COe(t,e){return t.valueType!==e.valueType?gY(t,e):t.unit!==e.unit?EY(t,e):t.type!==e.type?SY(t,e):t.description!==e.description?TY(t,e):""}$t.getConflictResolutionRecipe=COe});var AY=p(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});km.MetricStorageRegistry=void 0;var NOe=el(),vY=(R(),y(C)),Um=yY(),ER=class t{_sharedRegistry=new Map;_perCollectorRegistry=new Map;static create(){return new t}getStorages(e){let r=[];for(let s of this._sharedRegistry.values())r=r.concat(s);let o=this._perCollectorRegistry.get(e);if(o!=null)for(let s of o.values())r=r.concat(s);return r}register(e){this._registerStorage(e,this._sharedRegistry)}registerForCollector(e,r){let o=this._perCollectorRegistry.get(e);o==null&&(o=new Map,this._perCollectorRegistry.set(e,o)),this._registerStorage(r,o)}findOrUpdateCompatibleStorage(e){let r=this._sharedRegistry.get(e.name);return r===void 0?null:this._findOrUpdateCompatibleStorage(e,r)}findOrUpdateCompatibleCollectorStorage(e,r){let o=this._perCollectorRegistry.get(e);if(o===void 0)return null;let s=o.get(r.name);return s===void 0?null:this._findOrUpdateCompatibleStorage(r,s)}_registerStorage(e,r){let o=e.getInstrumentDescriptor(),s=r.get(o.name);if(s===void 0){r.set(o.name,[e]);return}s.push(e)}_findOrUpdateCompatibleStorage(e,r){let o=null;for(let s of r){let a=s.getInstrumentDescriptor();(0,NOe.isDescriptorCompatibleWith)(a,e)?(a.description!==e.description&&(e.description.length>a.description.length&&s.updateDescription(e.description),vY.diag.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.
|
|
12
|
+
`,`Details:
|
|
13
|
+
`,(0,Um.getIncompatibilityDetails)(a,e),`The longer description will be used.
|
|
14
|
+
To resolve the conflict:`,(0,Um.getConflictResolutionRecipe)(a,e))),o=s):vY.diag.warn("A view or instrument with the name ",e.name,` has already been registered and is incompatible with another registered view.
|
|
15
|
+
`,`Details:
|
|
16
|
+
`,(0,Um.getIncompatibilityDetails)(a,e),`To resolve the conflict:
|
|
17
|
+
`,(0,Um.getConflictResolutionRecipe)(a,e))}return o}};km.MetricStorageRegistry=ER});var OY=p(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});Bm.MultiMetricStorage=void 0;var SR=class{_backingStorages;constructor(e){this._backingStorages=e}record(e,r,o,s){this._backingStorages.forEach(a=>{a.record(e,r,o,s)})}};Bm.MultiMetricStorage=SR});var RY=p(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.BatchObservableResultImpl=Ga.ObservableResultImpl=void 0;var Va=(R(),y(C)),bY=tl(),MOe=Nm(),TR=class{_instrumentName;_valueType;_buffer=new bY.AttributeHashMap;constructor(e,r){this._instrumentName=e,this._valueType=r}observe(e,r={}){if(typeof e!="number"){Va.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${e}`);return}this._valueType===Va.ValueType.INT&&!Number.isInteger(e)&&(Va.diag.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(r,e)}};Ga.ObservableResultImpl=TR;var yR=class{_buffer=new Map;observe(e,r,o={}){if(!(0,MOe.isObservableInstrument)(e))return;let s=this._buffer.get(e);if(s==null&&(s=new bY.AttributeHashMap,this._buffer.set(e,s)),typeof r!="number"){Va.diag.warn(`non-number value provided to metric ${e._descriptor.name}: ${r}`);return}e._descriptor.valueType===Va.ValueType.INT&&!Number.isInteger(r)&&(Va.diag.warn(`INT value type cannot accept a floating-point value for ${e._descriptor.name}, ignoring the fractional digits.`),r=Math.trunc(r),!Number.isInteger(r))||s.set(o,r)}};Ga.BatchObservableResultImpl=yR});var NY=p(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});Fm.ObservableRegistry=void 0;var IOe=(R(),y(C)),PY=Nm(),CY=RY(),rl=qr(),vR=class{_callbacks=[];_batchCallbacks=[];addCallback(e,r){this._findCallback(e,r)>=0||this._callbacks.push({callback:e,instrument:r})}removeCallback(e,r){let o=this._findCallback(e,r);o<0||this._callbacks.splice(o,1)}addBatchCallback(e,r){let o=new Set(r.filter(PY.isObservableInstrument));if(o.size===0){IOe.diag.error("BatchObservableCallback is not associated with valid instruments",r);return}this._findBatchCallback(e,o)>=0||this._batchCallbacks.push({callback:e,instruments:o})}removeBatchCallback(e,r){let o=new Set(r.filter(PY.isObservableInstrument)),s=this._findBatchCallback(e,o);s<0||this._batchCallbacks.splice(s,1)}async observe(e,r){let o=this._observeCallbacks(e,r),s=this._observeBatchCallbacks(e,r);return(await(0,rl.PromiseAllSettled)([...o,...s])).filter(rl.isPromiseAllSettledRejectionResult).map(n=>n.reason)}_observeCallbacks(e,r){return this._callbacks.map(async({callback:o,instrument:s})=>{let a=new CY.ObservableResultImpl(s._descriptor.name,s._descriptor.valueType),i=Promise.resolve(o(a));r!=null&&(i=(0,rl.callWithTimeout)(i,r)),await i,s._metricStorages.forEach(n=>{n.record(a._buffer,e)})})}_observeBatchCallbacks(e,r){return this._batchCallbacks.map(async({callback:o,instruments:s})=>{let a=new CY.BatchObservableResultImpl,i=Promise.resolve(o(a));r!=null&&(i=(0,rl.callWithTimeout)(i,r)),await i,s.forEach(n=>{let c=a._buffer.get(n);c!=null&&n._metricStorages.forEach(u=>{u.record(c,e)})})})}_findCallback(e,r){return this._callbacks.findIndex(o=>o.callback===e&&o.instrument===r)}_findBatchCallback(e,r){return this._batchCallbacks.findIndex(o=>o.callback===e&&(0,rl.setEquals)(o.instruments,r))}};Fm.ObservableRegistry=vR});var MY=p(Vm=>{"use strict";Object.defineProperty(Vm,"__esModule",{value:!0});Vm.SyncMetricStorage=void 0;var xOe=lR(),wOe=hR(),LOe=_R(),AR=class extends xOe.MetricStorage{_attributesProcessor;_aggregationCardinalityLimit;_deltaMetricStorage;_temporalMetricStorage;constructor(e,r,o,s,a){super(e),this._attributesProcessor=o,this._aggregationCardinalityLimit=a,this._deltaMetricStorage=new wOe.DeltaMetricProcessor(r,this._aggregationCardinalityLimit),this._temporalMetricStorage=new LOe.TemporalMetricProcessor(r,s)}record(e,r,o,s){r=this._attributesProcessor.process(r,o),this._deltaMetricStorage.record(e,r,o,s)}collect(e,r){let o=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,o,r)}};Vm.SyncMetricStorage=AR});var Gm=p(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.createDenyListAttributesProcessor=Rn.createAllowListAttributesProcessor=Rn.createMultiAttributesProcessor=Rn.createNoopAttributesProcessor=void 0;var OR=class{process(e,r){return e}},bR=class{_processors;constructor(e){this._processors=e}process(e,r){let o=e;for(let s of this._processors)o=s.process(o,r);return o}},RR=class{_allowedAttributeNames;constructor(e){this._allowedAttributeNames=e}process(e,r){let o={};return Object.keys(e).filter(s=>this._allowedAttributeNames.includes(s)).forEach(s=>o[s]=e[s]),o}},PR=class{_deniedAttributeNames;constructor(e){this._deniedAttributeNames=e}process(e,r){let o={};return Object.keys(e).filter(s=>!this._deniedAttributeNames.includes(s)).forEach(s=>o[s]=e[s]),o}};function DOe(){return FOe}Rn.createNoopAttributesProcessor=DOe;function UOe(t){return new bR(t)}Rn.createMultiAttributesProcessor=UOe;function kOe(t){return new RR(t)}Rn.createAllowListAttributesProcessor=kOe;function BOe(t){return new PR(t)}Rn.createDenyListAttributesProcessor=BOe;var FOe=new OR});var IY=p(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0});qm.MeterSharedState=void 0;var VOe=el(),GOe=mY(),qOe=qr(),jOe=_Y(),HOe=AY(),zOe=OY(),$Oe=NY(),YOe=MY(),WOe=Gm(),CR=class{_meterProviderSharedState;_instrumentationScope;metricStorageRegistry=new HOe.MetricStorageRegistry;observableRegistry=new $Oe.ObservableRegistry;meter;constructor(e,r){this._meterProviderSharedState=e,this._instrumentationScope=r,this.meter=new GOe.Meter(this)}registerMetricStorage(e){let r=this._registerMetricStorage(e,YOe.SyncMetricStorage);return r.length===1?r[0]:new zOe.MultiMetricStorage(r)}registerAsyncMetricStorage(e){return this._registerMetricStorage(e,jOe.AsyncMetricStorage)}async collect(e,r,o){let s=await this.observableRegistry.observe(r,o?.timeoutMillis),a=this.metricStorageRegistry.getStorages(e);if(a.length===0)return null;let i=a.map(n=>n.collect(e,r)).filter(qOe.isNotNullish);return i.length===0?{errors:s}:{scopeMetrics:{scope:this._instrumentationScope,metrics:i},errors:s}}_registerMetricStorage(e,r){let s=this._meterProviderSharedState.viewRegistry.findViews(e,this._instrumentationScope).map(a=>{let i=(0,VOe.createInstrumentDescriptorWithView)(a,e),n=this.metricStorageRegistry.findOrUpdateCompatibleStorage(i);if(n!=null)return n;let c=a.aggregation.createAggregator(i),u=new r(i,c,a.attributesProcessor,this._meterProviderSharedState.metricCollectors,a.aggregationCardinalityLimit);return this.metricStorageRegistry.register(u),u});if(s.length===0){let i=this._meterProviderSharedState.selectAggregations(e.type).map(([n,c])=>{let u=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(n,e);if(u!=null)return u;let l=c.createAggregator(e),d=n.selectCardinalityLimit(e.type),h=new r(e,l,(0,WOe.createNoopAttributesProcessor)(),[n],d);return this.metricStorageRegistry.registerForCollector(n,h),h});s=s.concat(i)}return s}};qm.MeterSharedState=CR});var xY=p(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});jm.MeterProviderSharedState=void 0;var KOe=qr(),XOe=pY(),JOe=IY(),QOe=Wu(),NR=class{resource;viewRegistry=new XOe.ViewRegistry;metricCollectors=[];meterSharedStates=new Map;constructor(e){this.resource=e}getMeterSharedState(e){let r=(0,KOe.instrumentationScopeId)(e),o=this.meterSharedStates.get(r);return o==null&&(o=new JOe.MeterSharedState(this,e),this.meterSharedStates.set(r,o)),o}selectAggregations(e){let r=[];for(let o of this.metricCollectors)r.push([o,(0,QOe.toAggregation)(o.selectAggregation(e))]);return r}};jm.MeterProviderSharedState=NR});var wY=p(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0});Hm.MetricCollector=void 0;var ZOe=K(),MR=class{_sharedState;_metricReader;constructor(e,r){this._sharedState=e,this._metricReader=r}async collect(e){let r=(0,ZOe.millisToHrTime)(Date.now()),o=[],s=[],a=Array.from(this._sharedState.meterSharedStates.values()).map(async i=>{let n=await i.collect(this,r,e);n?.scopeMetrics!=null&&o.push(n.scopeMetrics),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){return this._metricReader.selectCardinalityLimit?.(e)??2e3}};Hm.MetricCollector=MR});var zm=p(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.ExactPredicate=qa.PatternPredicate=void 0;var ebe=/[\^$\\.+?()[\]{}|]/g,IR=class t{_matchAll;_regexp;constructor(e){e==="*"?(this._matchAll=!0,this._regexp=/.*/):(this._matchAll=!1,this._regexp=new RegExp(t.escapePattern(e)))}match(e){return this._matchAll?!0:this._regexp.test(e)}static escapePattern(e){return`^${e.replace(ebe,"\\$&").replace("*",".*")}$`}static hasWildcard(e){return e.includes("*")}};qa.PatternPredicate=IR;var xR=class{_matchAll;_pattern;constructor(e){this._matchAll=e===void 0,this._pattern=e}match(e){return!!(this._matchAll||e===this._pattern)}};qa.ExactPredicate=xR});var DY=p($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.InstrumentSelector=void 0;var LY=zm(),wR=class{_nameFilter;_type;_unitFilter;constructor(e){this._nameFilter=new LY.PatternPredicate(e?.name??"*"),this._type=e?.type,this._unitFilter=new LY.ExactPredicate(e?.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}};$m.InstrumentSelector=wR});var UY=p(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0});Ym.MeterSelector=void 0;var LR=zm(),DR=class{_nameFilter;_versionFilter;_schemaUrlFilter;constructor(e){this._nameFilter=new LR.ExactPredicate(e?.name),this._versionFilter=new LR.ExactPredicate(e?.version),this._schemaUrlFilter=new LR.ExactPredicate(e?.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}};Ym.MeterSelector=DR});var FY=p(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0});Wm.View=void 0;var tbe=zm(),kY=Gm(),rbe=DY(),nbe=UY(),BY=Wu();function ibe(t){return t.instrumentName==null&&t.instrumentType==null&&t.instrumentUnit==null&&t.meterName==null&&t.meterVersion==null&&t.meterSchemaUrl==null}function obe(t){if(ibe(t))throw new Error("Cannot create view with no selector arguments supplied");if(t.name!=null&&(t?.instrumentName==null||tbe.PatternPredicate.hasWildcard(t.instrumentName)))throw new Error("Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.")}var UR=class{name;description;aggregation;attributesProcessor;instrumentSelector;meterSelector;aggregationCardinalityLimit;constructor(e){obe(e),e.attributesProcessors!=null?this.attributesProcessor=(0,kY.createMultiAttributesProcessor)(e.attributesProcessors):this.attributesProcessor=(0,kY.createNoopAttributesProcessor)(),this.name=e.name,this.description=e.description,this.aggregation=(0,BY.toAggregation)(e.aggregation??{type:BY.AggregationType.DEFAULT}),this.instrumentSelector=new rbe.InstrumentSelector({name:e.instrumentName,type:e.instrumentType,unit:e.instrumentUnit}),this.meterSelector=new nbe.MeterSelector({name:e.meterName,version:e.meterVersion,schemaUrl:e.meterSchemaUrl}),this.aggregationCardinalityLimit=e.aggregationCardinalityLimit}};Wm.View=UR});var VY=p(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0});Xm.MeterProvider=void 0;var Km=(R(),y(C)),sbe=dY(),abe=xY(),cbe=wY(),ube=FY(),kR=class{_sharedState;_shutdown=!1;constructor(e){if(this._sharedState=new abe.MeterProviderSharedState(e?.resource??(0,sbe.defaultResource)()),e?.views!=null&&e.views.length>0)for(let r of e.views)this._sharedState.viewRegistry.addView(new ube.View(r));if(e?.readers!=null&&e.readers.length>0)for(let r of e.readers){let o=new cbe.MetricCollector(this._sharedState,r);r.setMetricProducer(o),this._sharedState.metricCollectors.push(o)}}getMeter(e,r="",o={}){return this._shutdown?(Km.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,Km.createNoopMeter)()):this._sharedState.getMeterSharedState({name:e,version:r,schemaUrl:o.schemaUrl}).meter}async shutdown(e){if(this._shutdown){Km.diag.warn("shutdown may only be called once per MeterProvider");return}this._shutdown=!0,await Promise.all(this._sharedState.metricCollectors.map(r=>r.shutdown(e)))}async forceFlush(e){if(this._shutdown){Km.diag.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(r=>r.forceFlush(e)))}};Xm.MeterProvider=kR});var Ei=p(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.TimeoutError=ve.createDenyListAttributesProcessor=ve.createAllowListAttributesProcessor=ve.AggregationType=ve.MeterProvider=ve.ConsoleMetricExporter=ve.InMemoryMetricExporter=ve.PeriodicExportingMetricReader=ve.MetricReader=ve.InstrumentType=ve.DataPointType=ve.AggregationTemporality=void 0;var lbe=Bh();Object.defineProperty(ve,"AggregationTemporality",{enumerable:!0,get:function(){return lbe.AggregationTemporality}});var GY=Yi();Object.defineProperty(ve,"DataPointType",{enumerable:!0,get:function(){return GY.DataPointType}});Object.defineProperty(ve,"InstrumentType",{enumerable:!0,get:function(){return GY.InstrumentType}});var dbe=Ub();Object.defineProperty(ve,"MetricReader",{enumerable:!0,get:function(){return dbe.MetricReader}});var pbe=w$();Object.defineProperty(ve,"PeriodicExportingMetricReader",{enumerable:!0,get:function(){return pbe.PeriodicExportingMetricReader}});var fbe=D$();Object.defineProperty(ve,"InMemoryMetricExporter",{enumerable:!0,get:function(){return fbe.InMemoryMetricExporter}});var hbe=k$();Object.defineProperty(ve,"ConsoleMetricExporter",{enumerable:!0,get:function(){return hbe.ConsoleMetricExporter}});var mbe=VY();Object.defineProperty(ve,"MeterProvider",{enumerable:!0,get:function(){return mbe.MeterProvider}});var _be=Wu();Object.defineProperty(ve,"AggregationType",{enumerable:!0,get:function(){return _be.AggregationType}});var qY=Gm();Object.defineProperty(ve,"createAllowListAttributesProcessor",{enumerable:!0,get:function(){return qY.createAllowListAttributesProcessor}});Object.defineProperty(ve,"createDenyListAttributesProcessor",{enumerable:!0,get:function(){return qY.createDenyListAttributesProcessor}});var gbe=qr();Object.defineProperty(ve,"TimeoutError",{enumerable:!0,get:function(){return gbe.TimeoutError}})});var FR=p(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});Jm.AbstractAsyncHooksContextManager=void 0;var Ebe=b("events"),Sbe=["addListener","on","once","prependListener","prependOnceListener"],BR=class{bind(e,r){return r instanceof Ebe.EventEmitter?this._bindEventEmitter(e,r):typeof r=="function"?this._bindFunction(e,r):r}_bindFunction(e,r){let o=this,s=function(...a){return o.with(e,()=>r.apply(this,a))};return Object.defineProperty(s,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),s}_bindEventEmitter(e,r){return this._getPatchMap(r)!==void 0||(this._createPatchMap(r),Sbe.forEach(s=>{r[s]!==void 0&&(r[s]=this._patchAddListener(r,r[s],e))}),typeof r.removeListener=="function"&&(r.removeListener=this._patchRemoveListener(r,r.removeListener)),typeof r.off=="function"&&(r.off=this._patchRemoveListener(r,r.off)),typeof r.removeAllListeners=="function"&&(r.removeAllListeners=this._patchRemoveAllListeners(r,r.removeAllListeners))),r}_patchRemoveListener(e,r){let o=this;return function(s,a){let i=o._getPatchMap(e)?.[s];if(i===void 0)return r.call(this,s,a);let n=i.get(a);return r.call(this,s,n||a)}}_patchRemoveAllListeners(e,r){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]),r.apply(this,arguments)}}_patchAddListener(e,r,o){let s=this;return function(a,i){if(s._wrapped)return r.call(this,a,i);let n=s._getPatchMap(e);n===void 0&&(n=s._createPatchMap(e));let c=n[a];c===void 0&&(c=new WeakMap,n[a]=c);let u=s.bind(o,i);c.set(i,u),s._wrapped=!0;try{return r.call(this,a,u)}finally{s._wrapped=!1}}}_createPatchMap(e){let r=Object.create(null);return e[this._kOtListeners]=r,r}_getPatchMap(e){return e[this._kOtListeners]}_kOtListeners=Symbol("OtListeners");_wrapped=!1};Jm.AbstractAsyncHooksContextManager=BR});var jY=p(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0});Qm.AsyncHooksContextManager=void 0;var Tbe=(R(),y(C)),ybe=b("async_hooks"),vbe=FR(),VR=class extends vbe.AbstractAsyncHooksContextManager{_asyncHook;_contexts=new Map;_stack=[];constructor(){super(),this._asyncHook=ybe.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(){return this._stack[this._stack.length-1]??Tbe.ROOT_CONTEXT}with(e,r,o,...s){this._enterContext(e);try{return r.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,r){if(r==="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 r=this._contexts.get(e);r!==void 0&&this._enterContext(r)}_after(){this._exitContext()}_enterContext(e){this._stack.push(e)}_exitContext(){this._stack.pop()}};Qm.AsyncHooksContextManager=VR});var HY=p(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0});Zm.AsyncLocalStorageContextManager=void 0;var Abe=(R(),y(C)),Obe=b("async_hooks"),bbe=FR(),GR=class extends bbe.AbstractAsyncHooksContextManager{_asyncLocalStorage;constructor(){super(),this._asyncLocalStorage=new Obe.AsyncLocalStorage}active(){return this._asyncLocalStorage.getStore()??Abe.ROOT_CONTEXT}with(e,r,o,...s){let a=o==null?r:r.bind(o);return this._asyncLocalStorage.run(e,a,...s)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};Zm.AsyncLocalStorageContextManager=GR});var zY=p(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});ja.AsyncLocalStorageContextManager=ja.AsyncHooksContextManager=void 0;var Rbe=jY();Object.defineProperty(ja,"AsyncHooksContextManager",{enumerable:!0,get:function(){return Rbe.AsyncHooksContextManager}});var Pbe=HY();Object.defineProperty(ja,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return Pbe.AsyncLocalStorageContextManager}})});var $Y=p(e_=>{"use strict";Object.defineProperty(e_,"__esModule",{value:!0});e_.defaultServiceName=void 0;function Cbe(){return`unknown_service:${process.argv0}`}e_.defaultServiceName=Cbe});var YY=p(t_=>{"use strict";Object.defineProperty(t_,"__esModule",{value:!0});t_.defaultServiceName=void 0;var Nbe=$Y();Object.defineProperty(t_,"defaultServiceName",{enumerable:!0,get:function(){return Nbe.defaultServiceName}})});var qR=p(r_=>{"use strict";Object.defineProperty(r_,"__esModule",{value:!0});r_.defaultServiceName=void 0;var Mbe=YY();Object.defineProperty(r_,"defaultServiceName",{enumerable:!0,get:function(){return Mbe.defaultServiceName}})});var WY=p(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});Ha.identity=Ha.isPromiseLike=void 0;var Ibe=t=>t!==null&&typeof t=="object"&&typeof t.then=="function";Ha.isPromiseLike=Ibe;function xbe(t){return t}Ha.identity=xbe});var zR=p(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.defaultResource=Pn.emptyResource=Pn.resourceFromDetectedResource=Pn.resourceFromAttributes=void 0;var il=(R(),y(C)),jR=K(),ts=(vt(),y(Ut)),wbe=qR(),nl=WY(),n_=class t{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(e,r){let o=new t({},r);return o._rawAttributes=KY(e),o._asyncAttributesPending=e.filter(([s,a])=>(0,nl.isPromiseLike)(a)).length>0,o}constructor(e,r){let o=e.attributes??{};this._rawAttributes=Object.entries(o).map(([s,a])=>((0,nl.isPromiseLike)(a)&&(this._asyncAttributesPending=!0),[s,a])),this._rawAttributes=KY(this._rawAttributes),this._schemaUrl=kbe(r?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){let[r,o]=this._rawAttributes[e];this._rawAttributes[e]=[r,(0,nl.isPromiseLike)(o)?await o:o]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&il.diag.error("Accessing resource attributes before async attributes settled"),this._memoizedAttributes)return this._memoizedAttributes;let e={};for(let[r,o]of this._rawAttributes){if((0,nl.isPromiseLike)(o)){il.diag.debug(`Unsettled resource attribute ${r} skipped`);continue}o!=null&&(e[r]??=o)}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(e){if(e==null)return this;let r=Bbe(this,e),o=r?{schemaUrl:r}:void 0;return t.FromAttributeList([...e.getRawAttributes(),...this.getRawAttributes()],o)}};function HR(t,e){return n_.FromAttributeList(Object.entries(t),e)}Pn.resourceFromAttributes=HR;function Lbe(t,e){return new n_(t,e)}Pn.resourceFromDetectedResource=Lbe;function Dbe(){return HR({})}Pn.emptyResource=Dbe;function Ube(){return HR({[ts.ATTR_SERVICE_NAME]:(0,wbe.defaultServiceName)(),[ts.ATTR_TELEMETRY_SDK_LANGUAGE]:jR.SDK_INFO[ts.ATTR_TELEMETRY_SDK_LANGUAGE],[ts.ATTR_TELEMETRY_SDK_NAME]:jR.SDK_INFO[ts.ATTR_TELEMETRY_SDK_NAME],[ts.ATTR_TELEMETRY_SDK_VERSION]:jR.SDK_INFO[ts.ATTR_TELEMETRY_SDK_VERSION]})}Pn.defaultResource=Ube;function KY(t){return t.map(([e,r])=>(0,nl.isPromiseLike)(r)?[e,r.catch(o=>{il.diag.debug("promise rejection for resource attribute: %s - %s",e,o)})]:[e,r])}function kbe(t){if(typeof t=="string"||t===void 0)return t;il.diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",t)}function Bbe(t,e){let r=t?.schemaUrl,o=e?.schemaUrl,s=r===void 0||r==="",a=o===void 0||o==="";if(s)return o;if(a||r===o)return r;il.diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',r,o)}});var JY=p(i_=>{"use strict";Object.defineProperty(i_,"__esModule",{value:!0});i_.detectResources=void 0;var XY=(R(),y(C)),$R=zR(),Fbe=(t={})=>(t.detectors||[]).map(r=>{try{let o=(0,$R.resourceFromDetectedResource)(r.detect(t));return XY.diag.debug(`${r.constructor.name} found resource.`,o),o}catch(o){return XY.diag.debug(`${r.constructor.name} failed: ${o.message}`),(0,$R.emptyResource)()}}).reduce((r,o)=>r.merge(o),(0,$R.emptyResource)());i_.detectResources=Fbe});var ZY=p(o_=>{"use strict";Object.defineProperty(o_,"__esModule",{value:!0});o_.envDetector=void 0;var Vbe=(R(),y(C)),Gbe=(vt(),y(Ut)),QY=K(),YR=class{_MAX_LENGTH=255;_COMMA_SEPARATOR=",";_LABEL_KEY_VALUE_SPLITTER="=";_ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.";_ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters.";detect(e){let r={},o=(0,QY.getStringFromEnv)("OTEL_RESOURCE_ATTRIBUTES"),s=(0,QY.getStringFromEnv)("OTEL_SERVICE_NAME");if(o)try{let a=this._parseResourceAttributes(o);Object.assign(r,a)}catch(a){Vbe.diag.debug(`EnvDetector failed: ${a.message}`)}return s&&(r[Gbe.ATTR_SERVICE_NAME]=s),{attributes:r}}_parseResourceAttributes(e){if(!e)return{};let r={},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}`);r[i]=decodeURIComponent(n)}return r}_isValid(e){return e.length<=this._MAX_LENGTH&&this._isBaggageOctetString(e)}_isBaggageOctetString(e){for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o<33||o===44||o===59||o===92||o>126)return!1}return!0}_isValidAndNotEmpty(e){return e.length>0&&this._isValid(e)}};o_.envDetector=new YR});var ol=p(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.ATTR_WEBENGINE_VERSION=G.ATTR_WEBENGINE_NAME=G.ATTR_WEBENGINE_DESCRIPTION=G.ATTR_SERVICE_NAMESPACE=G.ATTR_SERVICE_INSTANCE_ID=G.ATTR_PROCESS_RUNTIME_VERSION=G.ATTR_PROCESS_RUNTIME_NAME=G.ATTR_PROCESS_RUNTIME_DESCRIPTION=G.ATTR_PROCESS_PID=G.ATTR_PROCESS_OWNER=G.ATTR_PROCESS_EXECUTABLE_PATH=G.ATTR_PROCESS_EXECUTABLE_NAME=G.ATTR_PROCESS_COMMAND_ARGS=G.ATTR_PROCESS_COMMAND=G.ATTR_OS_VERSION=G.ATTR_OS_TYPE=G.ATTR_K8S_POD_NAME=G.ATTR_K8S_NAMESPACE_NAME=G.ATTR_K8S_DEPLOYMENT_NAME=G.ATTR_K8S_CLUSTER_NAME=G.ATTR_HOST_TYPE=G.ATTR_HOST_NAME=G.ATTR_HOST_IMAGE_VERSION=G.ATTR_HOST_IMAGE_NAME=G.ATTR_HOST_IMAGE_ID=G.ATTR_HOST_ID=G.ATTR_HOST_ARCH=G.ATTR_CONTAINER_NAME=G.ATTR_CONTAINER_IMAGE_TAGS=G.ATTR_CONTAINER_IMAGE_NAME=G.ATTR_CONTAINER_ID=G.ATTR_CLOUD_REGION=G.ATTR_CLOUD_PROVIDER=G.ATTR_CLOUD_AVAILABILITY_ZONE=G.ATTR_CLOUD_ACCOUNT_ID=void 0;G.ATTR_CLOUD_ACCOUNT_ID="cloud.account.id";G.ATTR_CLOUD_AVAILABILITY_ZONE="cloud.availability_zone";G.ATTR_CLOUD_PROVIDER="cloud.provider";G.ATTR_CLOUD_REGION="cloud.region";G.ATTR_CONTAINER_ID="container.id";G.ATTR_CONTAINER_IMAGE_NAME="container.image.name";G.ATTR_CONTAINER_IMAGE_TAGS="container.image.tags";G.ATTR_CONTAINER_NAME="container.name";G.ATTR_HOST_ARCH="host.arch";G.ATTR_HOST_ID="host.id";G.ATTR_HOST_IMAGE_ID="host.image.id";G.ATTR_HOST_IMAGE_NAME="host.image.name";G.ATTR_HOST_IMAGE_VERSION="host.image.version";G.ATTR_HOST_NAME="host.name";G.ATTR_HOST_TYPE="host.type";G.ATTR_K8S_CLUSTER_NAME="k8s.cluster.name";G.ATTR_K8S_DEPLOYMENT_NAME="k8s.deployment.name";G.ATTR_K8S_NAMESPACE_NAME="k8s.namespace.name";G.ATTR_K8S_POD_NAME="k8s.pod.name";G.ATTR_OS_TYPE="os.type";G.ATTR_OS_VERSION="os.version";G.ATTR_PROCESS_COMMAND="process.command";G.ATTR_PROCESS_COMMAND_ARGS="process.command_args";G.ATTR_PROCESS_EXECUTABLE_NAME="process.executable.name";G.ATTR_PROCESS_EXECUTABLE_PATH="process.executable.path";G.ATTR_PROCESS_OWNER="process.owner";G.ATTR_PROCESS_PID="process.pid";G.ATTR_PROCESS_RUNTIME_DESCRIPTION="process.runtime.description";G.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name";G.ATTR_PROCESS_RUNTIME_VERSION="process.runtime.version";G.ATTR_SERVICE_INSTANCE_ID="service.instance.id";G.ATTR_SERVICE_NAMESPACE="service.namespace";G.ATTR_WEBENGINE_DESCRIPTION="webengine.description";G.ATTR_WEBENGINE_NAME="webengine.name";G.ATTR_WEBENGINE_VERSION="webengine.version"});var a_=p(s_=>{"use strict";Object.defineProperty(s_,"__esModule",{value:!0});s_.execAsync=void 0;var qbe=b("child_process"),jbe=b("util");s_.execAsync=jbe.promisify(qbe.exec)});var eW=p(c_=>{"use strict";Object.defineProperty(c_,"__esModule",{value:!0});c_.getMachineId=void 0;var Hbe=a_(),zbe=(R(),y(C));async function $be(){try{let e=(await(0,Hbe.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
|
|
18
|
+
`).find(o=>o.includes("IOPlatformUUID"));if(!e)return;let r=e.split('" = "');if(r.length===2)return r[1].slice(0,-1)}catch(t){zbe.diag.debug(`error reading machine id: ${t}`)}}c_.getMachineId=$be});var tW=p(u_=>{"use strict";Object.defineProperty(u_,"__esModule",{value:!0});u_.getMachineId=void 0;var Ybe=b("fs"),Wbe=(R(),y(C));async function Kbe(){let t=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let e of t)try{return(await Ybe.promises.readFile(e,{encoding:"utf8"})).trim()}catch(r){Wbe.diag.debug(`error reading machine id: ${r}`)}}u_.getMachineId=Kbe});var nW=p(l_=>{"use strict";Object.defineProperty(l_,"__esModule",{value:!0});l_.getMachineId=void 0;var Xbe=b("fs"),Jbe=a_(),rW=(R(),y(C));async function Qbe(){try{return(await Xbe.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(t){rW.diag.debug(`error reading machine id: ${t}`)}try{return(await(0,Jbe.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(t){rW.diag.debug(`error reading machine id: ${t}`)}}l_.getMachineId=Qbe});var oW=p(d_=>{"use strict";Object.defineProperty(d_,"__esModule",{value:!0});d_.getMachineId=void 0;var iW=b("process"),Zbe=a_(),eRe=(R(),y(C));async function tRe(){let t="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",e="%windir%\\System32\\REG.exe";iW.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in iW.env&&(e="%windir%\\sysnative\\cmd.exe /c "+e);try{let o=(await(0,Zbe.execAsync)(`${e} ${t}`)).stdout.split("REG_SZ");if(o.length===2)return o[1].trim()}catch(r){eRe.diag.debug(`error reading machine id: ${r}`)}}d_.getMachineId=tRe});var sW=p(p_=>{"use strict";Object.defineProperty(p_,"__esModule",{value:!0});p_.getMachineId=void 0;var rRe=(R(),y(C));async function nRe(){rRe.diag.debug("could not read machine-id: unsupported platform")}p_.getMachineId=nRe});var aW=p(f_=>{"use strict";Object.defineProperty(f_,"__esModule",{value:!0});f_.getMachineId=void 0;var iRe=b("process"),rs;async function oRe(){if(!rs)switch(iRe.platform){case"darwin":rs=(await Promise.resolve().then(()=>he(eW()))).getMachineId;break;case"linux":rs=(await Promise.resolve().then(()=>he(tW()))).getMachineId;break;case"freebsd":rs=(await Promise.resolve().then(()=>he(nW()))).getMachineId;break;case"win32":rs=(await Promise.resolve().then(()=>he(oW()))).getMachineId;break;default:rs=(await Promise.resolve().then(()=>he(sW()))).getMachineId;break}return rs()}f_.getMachineId=oRe});var WR=p(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.normalizeType=za.normalizeArch=void 0;var sRe=t=>{switch(t){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return t}};za.normalizeArch=sRe;var aRe=t=>{switch(t){case"sunos":return"solaris";case"win32":return"windows";default:return t}};za.normalizeType=aRe});var uW=p(h_=>{"use strict";Object.defineProperty(h_,"__esModule",{value:!0});h_.hostDetector=void 0;var KR=ol(),cW=b("os"),cRe=aW(),uRe=WR(),XR=class{detect(e){return{attributes:{[KR.ATTR_HOST_NAME]:(0,cW.hostname)(),[KR.ATTR_HOST_ARCH]:(0,uRe.normalizeArch)((0,cW.arch)()),[KR.ATTR_HOST_ID]:(0,cRe.getMachineId)()}}}};h_.hostDetector=new XR});var pW=p(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});m_.osDetector=void 0;var lW=ol(),dW=b("os"),lRe=WR(),JR=class{detect(e){return{attributes:{[lW.ATTR_OS_TYPE]:(0,lRe.normalizeType)((0,dW.platform)()),[lW.ATTR_OS_VERSION]:(0,dW.release)()}}}};m_.osDetector=new JR});var fW=p(__=>{"use strict";Object.defineProperty(__,"__esModule",{value:!0});__.processDetector=void 0;var dRe=(R(),y(C)),Si=ol(),pRe=b("os"),QR=class{detect(e){let r={[Si.ATTR_PROCESS_PID]:process.pid,[Si.ATTR_PROCESS_EXECUTABLE_NAME]:process.title,[Si.ATTR_PROCESS_EXECUTABLE_PATH]:process.execPath,[Si.ATTR_PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[Si.ATTR_PROCESS_RUNTIME_VERSION]:process.versions.node,[Si.ATTR_PROCESS_RUNTIME_NAME]:"nodejs",[Si.ATTR_PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};process.argv.length>1&&(r[Si.ATTR_PROCESS_COMMAND]=process.argv[1]);try{let o=pRe.userInfo();r[Si.ATTR_PROCESS_OWNER]=o.username}catch(o){dRe.diag.debug(`error obtaining process owner: ${o}`)}return{attributes:r}}};__.processDetector=new QR});var hW=p(g_=>{"use strict";Object.defineProperty(g_,"__esModule",{value:!0});g_.serviceInstanceIdDetector=void 0;var fRe=ol(),hRe=b("crypto"),ZR=class{detect(e){return{attributes:{[fRe.ATTR_SERVICE_INSTANCE_ID]:(0,hRe.randomUUID)()}}}};g_.serviceInstanceIdDetector=new ZR});var mW=p(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.serviceInstanceIdDetector=Cn.processDetector=Cn.osDetector=Cn.hostDetector=void 0;var mRe=uW();Object.defineProperty(Cn,"hostDetector",{enumerable:!0,get:function(){return mRe.hostDetector}});var _Re=pW();Object.defineProperty(Cn,"osDetector",{enumerable:!0,get:function(){return _Re.osDetector}});var gRe=fW();Object.defineProperty(Cn,"processDetector",{enumerable:!0,get:function(){return gRe.processDetector}});var ERe=hW();Object.defineProperty(Cn,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return ERe.serviceInstanceIdDetector}})});var _W=p(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.serviceInstanceIdDetector=Nn.processDetector=Nn.osDetector=Nn.hostDetector=void 0;var E_=mW();Object.defineProperty(Nn,"hostDetector",{enumerable:!0,get:function(){return E_.hostDetector}});Object.defineProperty(Nn,"osDetector",{enumerable:!0,get:function(){return E_.osDetector}});Object.defineProperty(Nn,"processDetector",{enumerable:!0,get:function(){return E_.processDetector}});Object.defineProperty(Nn,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return E_.serviceInstanceIdDetector}})});var gW=p($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});$a.noopDetector=$a.NoopDetector=void 0;var S_=class{detect(){return{attributes:{}}}};$a.NoopDetector=S_;$a.noopDetector=new S_});var EW=p(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.noopDetector=Yt.serviceInstanceIdDetector=Yt.processDetector=Yt.osDetector=Yt.hostDetector=Yt.envDetector=void 0;var SRe=ZY();Object.defineProperty(Yt,"envDetector",{enumerable:!0,get:function(){return SRe.envDetector}});var T_=_W();Object.defineProperty(Yt,"hostDetector",{enumerable:!0,get:function(){return T_.hostDetector}});Object.defineProperty(Yt,"osDetector",{enumerable:!0,get:function(){return T_.osDetector}});Object.defineProperty(Yt,"processDetector",{enumerable:!0,get:function(){return T_.processDetector}});Object.defineProperty(Yt,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return T_.serviceInstanceIdDetector}});var TRe=gW();Object.defineProperty(Yt,"noopDetector",{enumerable:!0,get:function(){return TRe.noopDetector}})});var SW=p(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.defaultServiceName=we.emptyResource=we.defaultResource=we.resourceFromAttributes=we.serviceInstanceIdDetector=we.processDetector=we.osDetector=we.hostDetector=we.envDetector=we.detectResources=void 0;var yRe=JY();Object.defineProperty(we,"detectResources",{enumerable:!0,get:function(){return yRe.detectResources}});var sl=EW();Object.defineProperty(we,"envDetector",{enumerable:!0,get:function(){return sl.envDetector}});Object.defineProperty(we,"hostDetector",{enumerable:!0,get:function(){return sl.hostDetector}});Object.defineProperty(we,"osDetector",{enumerable:!0,get:function(){return sl.osDetector}});Object.defineProperty(we,"processDetector",{enumerable:!0,get:function(){return sl.processDetector}});Object.defineProperty(we,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return sl.serviceInstanceIdDetector}});var eP=zR();Object.defineProperty(we,"resourceFromAttributes",{enumerable:!0,get:function(){return eP.resourceFromAttributes}});Object.defineProperty(we,"defaultResource",{enumerable:!0,get:function(){return eP.defaultResource}});Object.defineProperty(we,"emptyResource",{enumerable:!0,get:function(){return eP.emptyResource}});var vRe=qR();Object.defineProperty(we,"defaultServiceName",{enumerable:!0,get:function(){return vRe.defaultServiceName}})});var TW=p(y_=>{"use strict";Object.defineProperty(y_,"__esModule",{value:!0});y_.ExceptionEventName=void 0;y_.ExceptionEventName="exception"});var yW=p(v_=>{"use strict";Object.defineProperty(v_,"__esModule",{value:!0});v_.SpanImpl=void 0;var Sr=(R(),y(C)),Ot=K(),ns=(vt(),y(Ut)),ARe=TW(),tP=class{_spanContext;kind;parentSpanContext;attributes={};links=[];events=[];startTime;resource;instrumentationScope;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;name;status={code:Sr.SpanStatusCode.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(e){let r=Date.now();this._spanContext=e.spanContext,this._performanceStartTime=Ot.otperformance.now(),this._performanceOffset=r-(this._performanceStartTime+(0,Ot.getTimeOrigin)()),this._startTimeProvided=e.startTime!=null,this._spanLimits=e.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,this._spanProcessor=e.spanProcessor,this.name=e.name,this.parentSpanContext=e.parentSpanContext,this.kind=e.kind,this.links=e.links||[],this.startTime=this._getTime(e.startTime??r),this.resource=e.resource,this.instrumentationScope=e.scope,e.attributes!=null&&this.setAttributes(e.attributes),this._spanProcessor.onStart(this,e.context)}spanContext(){return this._spanContext}setAttribute(e,r){if(r==null||this._isSpanEnded())return this;if(e.length===0)return Sr.diag.warn(`Invalid attribute key: ${e}`),this;if(!(0,Ot.isAttributeValue)(r))return Sr.diag.warn(`Invalid attribute value set for key: ${e}`),this;let{attributeCountLimit:o}=this._spanLimits;return o!==void 0&&Object.keys(this.attributes).length>=o&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(r),this)}setAttributes(e){for(let[r,o]of Object.entries(e))this.setAttribute(r,o);return this}addEvent(e,r,o){if(this._isSpanEnded())return this;let{eventCountLimit:s}=this._spanLimits;if(s===0)return Sr.diag.warn("No events allowed."),this._droppedEventsCount++,this;s!==void 0&&this.events.length>=s&&(this._droppedEventsCount===0&&Sr.diag.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,Ot.isTimeInput)(r)&&((0,Ot.isTimeInput)(o)||(o=r),r=void 0);let a=(0,Ot.sanitizeAttributes)(r);return this.events.push({name:e,attributes:a,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={...e},this.status.message!=null&&typeof e.message!="string"&&(Sr.diag.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()){Sr.diag.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=(0,Ot.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(Sr.diag.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&&Sr.diag.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e=="number"&&e<=Ot.otperformance.now())return(0,Ot.hrTime)(e+this._performanceOffset);if(typeof e=="number")return(0,Ot.millisToHrTime)(e);if(e instanceof Date)return(0,Ot.millisToHrTime)(e.getTime());if((0,Ot.isTimeInputHrTime)(e))return e;if(this._startTimeProvided)return(0,Ot.millisToHrTime)(Date.now());let r=Ot.otperformance.now()-this._performanceStartTime;return(0,Ot.addHrTimes)(this.startTime,(0,Ot.millisToHrTime)(r))}isRecording(){return this._ended===!1}recordException(e,r){let o={};typeof e=="string"?o[ns.ATTR_EXCEPTION_MESSAGE]=e:e&&(e.code?o[ns.ATTR_EXCEPTION_TYPE]=e.code.toString():e.name&&(o[ns.ATTR_EXCEPTION_TYPE]=e.name),e.message&&(o[ns.ATTR_EXCEPTION_MESSAGE]=e.message),e.stack&&(o[ns.ATTR_EXCEPTION_STACKTRACE]=e.stack)),o[ns.ATTR_EXCEPTION_TYPE]||o[ns.ATTR_EXCEPTION_MESSAGE]?this.addEvent(ARe.ExceptionEventName,o,r):Sr.diag.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(){if(this._ended){let e=new Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);Sr.diag.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,e)}return this._ended}_truncateToLimitUtil(e,r){return e.length<=r?e:e.substring(0,r)}_truncateToSize(e){let r=this._attributeValueLengthLimit;return r<=0?(Sr.diag.warn(`Attribute value limit must be positive, got ${r}`),e):typeof e=="string"?this._truncateToLimitUtil(e,r):Array.isArray(e)?e.map(o=>typeof o=="string"?this._truncateToLimitUtil(o,r):o):e}};v_.SpanImpl=tP});var cl=p(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.SamplingDecision=void 0;var ORe;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ORe=al.SamplingDecision||(al.SamplingDecision={}))});var O_=p(A_=>{"use strict";Object.defineProperty(A_,"__esModule",{value:!0});A_.AlwaysOffSampler=void 0;var bRe=cl(),rP=class{shouldSample(){return{decision:bRe.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};A_.AlwaysOffSampler=rP});var R_=p(b_=>{"use strict";Object.defineProperty(b_,"__esModule",{value:!0});b_.AlwaysOnSampler=void 0;var RRe=cl(),nP=class{shouldSample(){return{decision:RRe.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};b_.AlwaysOnSampler=nP});var sP=p(C_=>{"use strict";Object.defineProperty(C_,"__esModule",{value:!0});C_.ParentBasedSampler=void 0;var P_=(R(),y(C)),PRe=K(),vW=O_(),iP=R_(),oP=class{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(e){this._root=e.root,this._root||((0,PRe.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new iP.AlwaysOnSampler),this._remoteParentSampled=e.remoteParentSampled??new iP.AlwaysOnSampler,this._remoteParentNotSampled=e.remoteParentNotSampled??new vW.AlwaysOffSampler,this._localParentSampled=e.localParentSampled??new iP.AlwaysOnSampler,this._localParentNotSampled=e.localParentNotSampled??new vW.AlwaysOffSampler}shouldSample(e,r,o,s,a,i){let n=P_.trace.getSpanContext(e);return!n||!(0,P_.isSpanContextValid)(n)?this._root.shouldSample(e,r,o,s,a,i):n.isRemote?n.traceFlags&P_.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,r,o,s,a,i):this._remoteParentNotSampled.shouldSample(e,r,o,s,a,i):n.traceFlags&P_.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,r,o,s,a,i):this._localParentNotSampled.shouldSample(e,r,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()}}`}};C_.ParentBasedSampler=oP});var cP=p(N_=>{"use strict";Object.defineProperty(N_,"__esModule",{value:!0});N_.TraceIdRatioBasedSampler=void 0;var CRe=(R(),y(C)),AW=cl(),aP=class{_ratio;_upperBound;constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,r){return{decision:(0,CRe.isValidTraceId)(r)&&this._accumulate(r)<this._upperBound?AW.SamplingDecision.RECORD_AND_SAMPLED:AW.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let r=0;for(let o=0;o<e.length/8;o++){let s=o*8,a=parseInt(e.slice(s,s+8),16);r=(r^a)>>>0}return r}};N_.TraceIdRatioBasedSampler=aP});var dP=p(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.buildSamplerFromEnv=Ya.loadDefaultConfig=void 0;var lP=(R(),y(C)),Mn=K(),OW=O_(),uP=R_(),M_=sP(),bW=cP(),In;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(In||(In={}));var I_=1;function NRe(){return{sampler:PW(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,Mn.getNumberFromEnv)("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT")??1/0,attributeCountLimit:(0,Mn.getNumberFromEnv)("OTEL_ATTRIBUTE_COUNT_LIMIT")??128},spanLimits:{attributeValueLengthLimit:(0,Mn.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT")??1/0,attributeCountLimit:(0,Mn.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT")??128,linkCountLimit:(0,Mn.getNumberFromEnv)("OTEL_SPAN_LINK_COUNT_LIMIT")??128,eventCountLimit:(0,Mn.getNumberFromEnv)("OTEL_SPAN_EVENT_COUNT_LIMIT")??128,attributePerEventCountLimit:(0,Mn.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT")??128,attributePerLinkCountLimit:(0,Mn.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT")??128}}}Ya.loadDefaultConfig=NRe;function PW(){let t=(0,Mn.getStringFromEnv)("OTEL_TRACES_SAMPLER")??In.ParentBasedAlwaysOn;switch(t){case In.AlwaysOn:return new uP.AlwaysOnSampler;case In.AlwaysOff:return new OW.AlwaysOffSampler;case In.ParentBasedAlwaysOn:return new M_.ParentBasedSampler({root:new uP.AlwaysOnSampler});case In.ParentBasedAlwaysOff:return new M_.ParentBasedSampler({root:new OW.AlwaysOffSampler});case In.TraceIdRatio:return new bW.TraceIdRatioBasedSampler(RW());case In.ParentBasedTraceIdRatio:return new M_.ParentBasedSampler({root:new bW.TraceIdRatioBasedSampler(RW())});default:return lP.diag.error(`OTEL_TRACES_SAMPLER value "${t}" invalid, defaulting to "${In.ParentBasedAlwaysOn}".`),new M_.ParentBasedSampler({root:new uP.AlwaysOnSampler})}}Ya.buildSamplerFromEnv=PW;function RW(){let t=(0,Mn.getNumberFromEnv)("OTEL_TRACES_SAMPLER_ARG");return t==null?(lP.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${I_}.`),I_):t<0||t>1?(lP.diag.error(`OTEL_TRACES_SAMPLER_ARG=${t} was given, but it is out of range ([0..1]), defaulting to ${I_}.`),I_):t}});var pP=p(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.reconfigureLimits=Tr.mergeConfig=Tr.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=Tr.DEFAULT_ATTRIBUTE_COUNT_LIMIT=void 0;var CW=dP(),x_=K();Tr.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;Tr.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;function MRe(t){let e={sampler:(0,CW.buildSamplerFromEnv)()},r=(0,CW.loadDefaultConfig)(),o=Object.assign({},r,e,t);return o.generalLimits=Object.assign({},r.generalLimits,t.generalLimits||{}),o.spanLimits=Object.assign({},r.spanLimits,t.spanLimits||{}),o}Tr.mergeConfig=MRe;function IRe(t){let e=Object.assign({},t.spanLimits);return e.attributeCountLimit=t.spanLimits?.attributeCountLimit??t.generalLimits?.attributeCountLimit??(0,x_.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT")??(0,x_.getNumberFromEnv)("OTEL_ATTRIBUTE_COUNT_LIMIT")??Tr.DEFAULT_ATTRIBUTE_COUNT_LIMIT,e.attributeValueLengthLimit=t.spanLimits?.attributeValueLengthLimit??t.generalLimits?.attributeValueLengthLimit??(0,x_.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT")??(0,x_.getNumberFromEnv)("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT")??Tr.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},t,{spanLimits:e})}Tr.reconfigureLimits=IRe});var NW=p(w_=>{"use strict";Object.defineProperty(w_,"__esModule",{value:!0});w_.BatchSpanProcessorBase=void 0;var Wa=(R(),y(C)),xn=K(),fP=class{_exporter;_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_isExporting=!1;_finishedSpans=[];_timer;_shutdownOnce;_droppedSpansCount=0;constructor(e,r){this._exporter=e,this._maxExportBatchSize=typeof r?.maxExportBatchSize=="number"?r.maxExportBatchSize:(0,xn.getNumberFromEnv)("OTEL_BSP_MAX_EXPORT_BATCH_SIZE")??512,this._maxQueueSize=typeof r?.maxQueueSize=="number"?r.maxQueueSize:(0,xn.getNumberFromEnv)("OTEL_BSP_MAX_QUEUE_SIZE")??2048,this._scheduledDelayMillis=typeof r?.scheduledDelayMillis=="number"?r.scheduledDelayMillis:(0,xn.getNumberFromEnv)("OTEL_BSP_SCHEDULE_DELAY")??5e3,this._exportTimeoutMillis=typeof r?.exportTimeoutMillis=="number"?r.exportTimeoutMillis:(0,xn.getNumberFromEnv)("OTEL_BSP_EXPORT_TIMEOUT")??3e4,this._shutdownOnce=new xn.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Wa.diag.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,r){}onEnd(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&Wa.TraceFlags.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&&Wa.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(Wa.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,r)=>{let o=[],s=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let a=0,i=s;a<i;a++)o.push(this._flushOneBatch());Promise.all(o).then(()=>{e()}).catch(r)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,r)=>{let o=setTimeout(()=>{r(new Error("Timeout"))},this._exportTimeoutMillis);Wa.context.with((0,xn.suppressTracing)(Wa.context.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=>{clearTimeout(o),n.code===xn.ExportResultCode.SUCCESS?e():r(n.error??new Error("BatchSpanProcessor: span export failed"))}),i=null;for(let n=0,c=s.length;n<c;n++){let u=s[n];u.resource.asyncAttributesPending&&u.resource.waitForAsyncAttributes&&(i??=[],i.push(u.resource.waitForAsyncAttributes()))}i===null?a():Promise.all(i).then(a,n=>{(0,xn.globalErrorHandler)(n),r(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(r=>{this._isExporting=!1,(0,xn.globalErrorHandler)(r)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),(0,xn.unrefTimer)(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}};w_.BatchSpanProcessorBase=fP});var MW=p(L_=>{"use strict";Object.defineProperty(L_,"__esModule",{value:!0});L_.BatchSpanProcessor=void 0;var xRe=NW(),hP=class extends xRe.BatchSpanProcessorBase{onShutdown(){}};L_.BatchSpanProcessor=hP});var wW=p(U_=>{"use strict";Object.defineProperty(U_,"__esModule",{value:!0});U_.RandomIdGenerator=void 0;var wRe=8,xW=16,mP=class{generateTraceId=IW(xW);generateSpanId=IW(wRe)};U_.RandomIdGenerator=mP;var D_=Buffer.allocUnsafe(xW);function IW(t){return function(){for(let r=0;r<t/4;r++)D_.writeUInt32BE(Math.random()*2**32>>>0,r*4);for(let r=0;r<t&&!(D_[r]>0);r++)r===t-1&&(D_[t-1]=1);return D_.toString("hex",0,t)}}});var LW=p(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.RandomIdGenerator=Ka.BatchSpanProcessor=void 0;var LRe=MW();Object.defineProperty(Ka,"BatchSpanProcessor",{enumerable:!0,get:function(){return LRe.BatchSpanProcessor}});var DRe=wW();Object.defineProperty(Ka,"RandomIdGenerator",{enumerable:!0,get:function(){return DRe.RandomIdGenerator}})});var _P=p(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});Xa.RandomIdGenerator=Xa.BatchSpanProcessor=void 0;var DW=LW();Object.defineProperty(Xa,"BatchSpanProcessor",{enumerable:!0,get:function(){return DW.BatchSpanProcessor}});Object.defineProperty(Xa,"RandomIdGenerator",{enumerable:!0,get:function(){return DW.RandomIdGenerator}})});var UW=p(B_=>{"use strict";Object.defineProperty(B_,"__esModule",{value:!0});B_.Tracer=void 0;var pt=(R(),y(C)),k_=K(),URe=yW(),kRe=pP(),BRe=_P(),gP=class{_sampler;_generalLimits;_spanLimits;_idGenerator;instrumentationScope;_resource;_spanProcessor;constructor(e,r,o,s){let a=(0,kRe.mergeConfig)(r);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=r.idGenerator||new BRe.RandomIdGenerator,this._resource=o,this._spanProcessor=s,this.instrumentationScope=e}startSpan(e,r={},o=pt.context.active()){r.root&&(o=pt.trace.deleteSpan(o));let s=pt.trace.getSpan(o);if((0,k_.isTracingSuppressed)(o))return pt.diag.debug("Instrumentation suppressed, returning Noop Span"),pt.trace.wrapSpanContext(pt.INVALID_SPAN_CONTEXT);let a=s?.spanContext(),i=this._idGenerator.generateSpanId(),n,c,u;!a||!pt.trace.isSpanContextValid(a)?c=this._idGenerator.generateTraceId():(c=a.traceId,u=a.traceState,n=a);let l=r.kind??pt.SpanKind.INTERNAL,d=(r.links??[]).map(x=>({context:x.context,attributes:(0,k_.sanitizeAttributes)(x.attributes)})),h=(0,k_.sanitizeAttributes)(r.attributes),g=this._sampler.shouldSample(o,c,e,l,h,d);u=g.traceState??u;let E=g.decision===pt.SamplingDecision.RECORD_AND_SAMPLED?pt.TraceFlags.SAMPLED:pt.TraceFlags.NONE,S={traceId:c,spanId:i,traceFlags:E,traceState:u};if(g.decision===pt.SamplingDecision.NOT_RECORD)return pt.diag.debug("Recording is off, propagating context in a non-recording span"),pt.trace.wrapSpanContext(S);let v=(0,k_.sanitizeAttributes)(Object.assign(h,g.attributes));return new URe.SpanImpl({resource:this._resource,scope:this.instrumentationScope,context:o,spanContext:S,name:e,kind:l,links:d,parentSpanContext:n,attributes:v,startTime:r.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits})}startActiveSpan(e,r,o,s){let a,i,n;if(arguments.length<2)return;arguments.length===2?n=r:arguments.length===3?(a=r,n=o):(a=r,i=o,n=s);let c=i??pt.context.active(),u=this.startSpan(e,a,c),l=pt.trace.setSpan(c,u);return pt.context.with(l,n,void 0,u)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}};B_.Tracer=gP});var kW=p(F_=>{"use strict";Object.defineProperty(F_,"__esModule",{value:!0});F_.MultiSpanProcessor=void 0;var FRe=K(),EP=class{_spanProcessors;constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let r of this._spanProcessors)e.push(r.forceFlush());return new Promise(r=>{Promise.all(e).then(()=>{r()}).catch(o=>{(0,FRe.globalErrorHandler)(o||new Error("MultiSpanProcessor: forceFlush failed")),r()})})}onStart(e,r){for(let o of this._spanProcessors)o.onStart(e,r)}onEnd(e){for(let r of this._spanProcessors)r.onEnd(e)}shutdown(){let e=[];for(let r of this._spanProcessors)e.push(r.shutdown());return new Promise((r,o)=>{Promise.all(e).then(()=>{r()},o)})}};F_.MultiSpanProcessor=EP});var BW=p(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.BasicTracerProvider=is.ForceFlushState=void 0;var VRe=K(),GRe=SW(),qRe=UW(),jRe=dP(),HRe=kW(),zRe=pP(),Ja;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Ja=is.ForceFlushState||(is.ForceFlushState={}));var SP=class{_config;_tracers=new Map;_resource;_activeSpanProcessor;constructor(e={}){let r=(0,VRe.merge)({},(0,jRe.loadDefaultConfig)(),(0,zRe.reconfigureLimits)(e));this._resource=r.resource??(0,GRe.defaultResource)(),this._config=Object.assign({},r,{resource:this._resource});let o=[];e.spanProcessors?.length&&o.push(...e.spanProcessors),this._activeSpanProcessor=new HRe.MultiSpanProcessor(o)}getTracer(e,r,o){let s=`${e}@${r||""}:${o?.schemaUrl||""}`;return this._tracers.has(s)||this._tracers.set(s,new qRe.Tracer({name:e,version:r,schemaUrl:o?.schemaUrl},this._config,this._resource,this._activeSpanProcessor)),this._tracers.get(s)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,r=this._activeSpanProcessor._spanProcessors.map(o=>new Promise(s=>{let a,i=setTimeout(()=>{s(new Error(`Span processor did not completed within timeout period of ${e} ms`)),a=Ja.timeout},e);o.forceFlush().then(()=>{clearTimeout(i),a!==Ja.timeout&&(a=Ja.resolved,s(a))}).catch(n=>{clearTimeout(i),a=Ja.error,s(n)})}));return new Promise((o,s)=>{Promise.all(r).then(a=>{let i=a.filter(n=>n!==Ja.resolved);i.length>0?s(i):o()}).catch(a=>s([a]))})}shutdown(){return this._activeSpanProcessor.shutdown()}};is.BasicTracerProvider=SP});var FW=p(V_=>{"use strict";Object.defineProperty(V_,"__esModule",{value:!0});V_.ConsoleSpanExporter=void 0;var TP=K(),yP=class{export(e,r){return this._sendSpans(e,r)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(e){return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationScope,traceId:e.spanContext().traceId,parentSpanContext:e.parentSpanContext,traceState:e.spanContext().traceState?.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:(0,TP.hrTimeToMicroseconds)(e.startTime),duration:(0,TP.hrTimeToMicroseconds)(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}}_sendSpans(e,r){for(let o of e)console.dir(this._exportInfo(o),{depth:3});if(r)return r({code:TP.ExportResultCode.SUCCESS})}};V_.ConsoleSpanExporter=yP});var GW=p(G_=>{"use strict";Object.defineProperty(G_,"__esModule",{value:!0});G_.InMemorySpanExporter=void 0;var VW=K(),vP=class{_finishedSpans=[];_stopped=!1;export(e,r){if(this._stopped)return r({code:VW.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...e),setTimeout(()=>r({code:VW.ExportResultCode.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}};G_.InMemorySpanExporter=vP});var qW=p(j_=>{"use strict";Object.defineProperty(j_,"__esModule",{value:!0});j_.SimpleSpanProcessor=void 0;var $Re=(R(),y(C)),q_=K(),AP=class{_exporter;_shutdownOnce;_pendingExports;constructor(e){this._exporter=e,this._shutdownOnce=new q_.BindOnceFuture(this._shutdown,this),this._pendingExports=new Set}async forceFlush(){await Promise.all(Array.from(this._pendingExports)),this._exporter.forceFlush&&await this._exporter.forceFlush()}onStart(e,r){}onEnd(e){if(this._shutdownOnce.isCalled||(e.spanContext().traceFlags&$Re.TraceFlags.SAMPLED)===0)return;let r=this._doExport(e).catch(o=>(0,q_.globalErrorHandler)(o));this._pendingExports.add(r),r.finally(()=>this._pendingExports.delete(r))}async _doExport(e){e.resource.asyncAttributesPending&&await e.resource.waitForAsyncAttributes?.();let r=await q_.internal._export(this._exporter,[e]);if(r.code!==q_.ExportResultCode.SUCCESS)throw r.error??new Error(`SimpleSpanProcessor: span export failed (status ${r})`)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};j_.SimpleSpanProcessor=AP});var jW=p(H_=>{"use strict";Object.defineProperty(H_,"__esModule",{value:!0});H_.NoopSpanProcessor=void 0;var OP=class{onStart(e,r){}onEnd(e){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};H_.NoopSpanProcessor=OP});var bP=p(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.SamplingDecision=Ae.TraceIdRatioBasedSampler=Ae.ParentBasedSampler=Ae.AlwaysOnSampler=Ae.AlwaysOffSampler=Ae.NoopSpanProcessor=Ae.SimpleSpanProcessor=Ae.InMemorySpanExporter=Ae.ConsoleSpanExporter=Ae.RandomIdGenerator=Ae.BatchSpanProcessor=Ae.BasicTracerProvider=void 0;var YRe=BW();Object.defineProperty(Ae,"BasicTracerProvider",{enumerable:!0,get:function(){return YRe.BasicTracerProvider}});var HW=_P();Object.defineProperty(Ae,"BatchSpanProcessor",{enumerable:!0,get:function(){return HW.BatchSpanProcessor}});Object.defineProperty(Ae,"RandomIdGenerator",{enumerable:!0,get:function(){return HW.RandomIdGenerator}});var WRe=FW();Object.defineProperty(Ae,"ConsoleSpanExporter",{enumerable:!0,get:function(){return WRe.ConsoleSpanExporter}});var KRe=GW();Object.defineProperty(Ae,"InMemorySpanExporter",{enumerable:!0,get:function(){return KRe.InMemorySpanExporter}});var XRe=qW();Object.defineProperty(Ae,"SimpleSpanProcessor",{enumerable:!0,get:function(){return XRe.SimpleSpanProcessor}});var JRe=jW();Object.defineProperty(Ae,"NoopSpanProcessor",{enumerable:!0,get:function(){return JRe.NoopSpanProcessor}});var QRe=O_();Object.defineProperty(Ae,"AlwaysOffSampler",{enumerable:!0,get:function(){return QRe.AlwaysOffSampler}});var ZRe=R_();Object.defineProperty(Ae,"AlwaysOnSampler",{enumerable:!0,get:function(){return ZRe.AlwaysOnSampler}});var ePe=sP();Object.defineProperty(Ae,"ParentBasedSampler",{enumerable:!0,get:function(){return ePe.ParentBasedSampler}});var tPe=cP();Object.defineProperty(Ae,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return tPe.TraceIdRatioBasedSampler}});var rPe=cl();Object.defineProperty(Ae,"SamplingDecision",{enumerable:!0,get:function(){return rPe.SamplingDecision}})});var zW=p(z_=>{"use strict";Object.defineProperty(z_,"__esModule",{value:!0});z_.NodeTracerProvider=void 0;var nPe=zY(),iPe=bP(),ul=(R(),y(C)),RP=K();function oPe(t){if(t!==null){if(t===void 0){let e=new nPe.AsyncLocalStorageContextManager;e.enable(),ul.context.setGlobalContextManager(e);return}t.enable(),ul.context.setGlobalContextManager(t)}}function sPe(t){if(t!==null){if(t===void 0){ul.propagation.setGlobalPropagator(new RP.CompositePropagator({propagators:[new RP.W3CTraceContextPropagator,new RP.W3CBaggagePropagator]}));return}ul.propagation.setGlobalPropagator(t)}}var PP=class extends iPe.BasicTracerProvider{constructor(e={}){super(e)}register(e={}){ul.trace.setGlobalTracerProvider(this),oPe(e.contextManager),sPe(e.propagator)}};z_.NodeTracerProvider=PP});var CP=p(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.TraceIdRatioBasedSampler=me.SimpleSpanProcessor=me.SamplingDecision=me.RandomIdGenerator=me.ParentBasedSampler=me.NoopSpanProcessor=me.InMemorySpanExporter=me.ConsoleSpanExporter=me.BatchSpanProcessor=me.BasicTracerProvider=me.AlwaysOnSampler=me.AlwaysOffSampler=me.NodeTracerProvider=void 0;var aPe=zW();Object.defineProperty(me,"NodeTracerProvider",{enumerable:!0,get:function(){return aPe.NodeTracerProvider}});var yr=bP();Object.defineProperty(me,"AlwaysOffSampler",{enumerable:!0,get:function(){return yr.AlwaysOffSampler}});Object.defineProperty(me,"AlwaysOnSampler",{enumerable:!0,get:function(){return yr.AlwaysOnSampler}});Object.defineProperty(me,"BasicTracerProvider",{enumerable:!0,get:function(){return yr.BasicTracerProvider}});Object.defineProperty(me,"BatchSpanProcessor",{enumerable:!0,get:function(){return yr.BatchSpanProcessor}});Object.defineProperty(me,"ConsoleSpanExporter",{enumerable:!0,get:function(){return yr.ConsoleSpanExporter}});Object.defineProperty(me,"InMemorySpanExporter",{enumerable:!0,get:function(){return yr.InMemorySpanExporter}});Object.defineProperty(me,"NoopSpanProcessor",{enumerable:!0,get:function(){return yr.NoopSpanProcessor}});Object.defineProperty(me,"ParentBasedSampler",{enumerable:!0,get:function(){return yr.ParentBasedSampler}});Object.defineProperty(me,"RandomIdGenerator",{enumerable:!0,get:function(){return yr.RandomIdGenerator}});Object.defineProperty(me,"SamplingDecision",{enumerable:!0,get:function(){return yr.SamplingDecision}});Object.defineProperty(me,"SimpleSpanProcessor",{enumerable:!0,get:function(){return yr.SimpleSpanProcessor}});Object.defineProperty(me,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return yr.TraceIdRatioBasedSampler}})});var $W=p($_=>{"use strict";Object.defineProperty($_,"__esModule",{value:!0});$_.ExceptionEventName=void 0;$_.ExceptionEventName="exception"});var YW=p(Y_=>{"use strict";Object.defineProperty(Y_,"__esModule",{value:!0});Y_.SpanImpl=void 0;var vr=(R(),y(C)),bt=K(),os=(vt(),y(Ut)),cPe=$W(),NP=class{_spanContext;kind;parentSpanContext;attributes={};links=[];events=[];startTime;resource;instrumentationScope;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;name;status={code:vr.SpanStatusCode.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(e){let r=Date.now();this._spanContext=e.spanContext,this._performanceStartTime=bt.otperformance.now(),this._performanceOffset=r-(this._performanceStartTime+(0,bt.getTimeOrigin)()),this._startTimeProvided=e.startTime!=null,this._spanLimits=e.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,this._spanProcessor=e.spanProcessor,this.name=e.name,this.parentSpanContext=e.parentSpanContext,this.kind=e.kind,this.links=e.links||[],this.startTime=this._getTime(e.startTime??r),this.resource=e.resource,this.instrumentationScope=e.scope,e.attributes!=null&&this.setAttributes(e.attributes),this._spanProcessor.onStart(this,e.context)}spanContext(){return this._spanContext}setAttribute(e,r){if(r==null||this._isSpanEnded())return this;if(e.length===0)return vr.diag.warn(`Invalid attribute key: ${e}`),this;if(!(0,bt.isAttributeValue)(r))return vr.diag.warn(`Invalid attribute value set for key: ${e}`),this;let{attributeCountLimit:o}=this._spanLimits;return o!==void 0&&Object.keys(this.attributes).length>=o&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(r),this)}setAttributes(e){for(let[r,o]of Object.entries(e))this.setAttribute(r,o);return this}addEvent(e,r,o){if(this._isSpanEnded())return this;let{eventCountLimit:s}=this._spanLimits;if(s===0)return vr.diag.warn("No events allowed."),this._droppedEventsCount++,this;s!==void 0&&this.events.length>=s&&(this._droppedEventsCount===0&&vr.diag.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,bt.isTimeInput)(r)&&((0,bt.isTimeInput)(o)||(o=r),r=void 0);let a=(0,bt.sanitizeAttributes)(r);return this.events.push({name:e,attributes:a,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={...e},this.status.message!=null&&typeof e.message!="string"&&(vr.diag.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()){vr.diag.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=(0,bt.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(vr.diag.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&&vr.diag.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e=="number"&&e<=bt.otperformance.now())return(0,bt.hrTime)(e+this._performanceOffset);if(typeof e=="number")return(0,bt.millisToHrTime)(e);if(e instanceof Date)return(0,bt.millisToHrTime)(e.getTime());if((0,bt.isTimeInputHrTime)(e))return e;if(this._startTimeProvided)return(0,bt.millisToHrTime)(Date.now());let r=bt.otperformance.now()-this._performanceStartTime;return(0,bt.addHrTimes)(this.startTime,(0,bt.millisToHrTime)(r))}isRecording(){return this._ended===!1}recordException(e,r){let o={};typeof e=="string"?o[os.ATTR_EXCEPTION_MESSAGE]=e:e&&(e.code?o[os.ATTR_EXCEPTION_TYPE]=e.code.toString():e.name&&(o[os.ATTR_EXCEPTION_TYPE]=e.name),e.message&&(o[os.ATTR_EXCEPTION_MESSAGE]=e.message),e.stack&&(o[os.ATTR_EXCEPTION_STACKTRACE]=e.stack)),o[os.ATTR_EXCEPTION_TYPE]||o[os.ATTR_EXCEPTION_MESSAGE]?this.addEvent(cPe.ExceptionEventName,o,r):vr.diag.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(){if(this._ended){let e=new Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);vr.diag.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,e)}return this._ended}_truncateToLimitUtil(e,r){return e.length<=r?e:e.substring(0,r)}_truncateToSize(e){let r=this._attributeValueLengthLimit;return r<=0?(vr.diag.warn(`Attribute value limit must be positive, got ${r}`),e):typeof e=="string"?this._truncateToLimitUtil(e,r):Array.isArray(e)?e.map(o=>typeof o=="string"?this._truncateToLimitUtil(o,r):o):e}};Y_.SpanImpl=NP});var dl=p(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.SamplingDecision=void 0;var uPe;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(uPe=ll.SamplingDecision||(ll.SamplingDecision={}))});var K_=p(W_=>{"use strict";Object.defineProperty(W_,"__esModule",{value:!0});W_.AlwaysOffSampler=void 0;var lPe=dl(),MP=class{shouldSample(){return{decision:lPe.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};W_.AlwaysOffSampler=MP});var J_=p(X_=>{"use strict";Object.defineProperty(X_,"__esModule",{value:!0});X_.AlwaysOnSampler=void 0;var dPe=dl(),IP=class{shouldSample(){return{decision:dPe.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};X_.AlwaysOnSampler=IP});var LP=p(Z_=>{"use strict";Object.defineProperty(Z_,"__esModule",{value:!0});Z_.ParentBasedSampler=void 0;var Q_=(R(),y(C)),pPe=K(),WW=K_(),xP=J_(),wP=class{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(e){this._root=e.root,this._root||((0,pPe.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new xP.AlwaysOnSampler),this._remoteParentSampled=e.remoteParentSampled??new xP.AlwaysOnSampler,this._remoteParentNotSampled=e.remoteParentNotSampled??new WW.AlwaysOffSampler,this._localParentSampled=e.localParentSampled??new xP.AlwaysOnSampler,this._localParentNotSampled=e.localParentNotSampled??new WW.AlwaysOffSampler}shouldSample(e,r,o,s,a,i){let n=Q_.trace.getSpanContext(e);return!n||!(0,Q_.isSpanContextValid)(n)?this._root.shouldSample(e,r,o,s,a,i):n.isRemote?n.traceFlags&Q_.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,r,o,s,a,i):this._remoteParentNotSampled.shouldSample(e,r,o,s,a,i):n.traceFlags&Q_.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,r,o,s,a,i):this._localParentNotSampled.shouldSample(e,r,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()}}`}};Z_.ParentBasedSampler=wP});var UP=p(eg=>{"use strict";Object.defineProperty(eg,"__esModule",{value:!0});eg.TraceIdRatioBasedSampler=void 0;var fPe=(R(),y(C)),KW=dl(),DP=class{_ratio;_upperBound;constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,r){return{decision:(0,fPe.isValidTraceId)(r)&&this._accumulate(r)<this._upperBound?KW.SamplingDecision.RECORD_AND_SAMPLED:KW.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let r=0;for(let o=0;o<e.length/8;o++){let s=o*8,a=parseInt(e.slice(s,s+8),16);r=(r^a)>>>0}return r}};eg.TraceIdRatioBasedSampler=DP});var FP=p(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.buildSamplerFromEnv=Qa.loadDefaultConfig=void 0;var BP=(R(),y(C)),wn=K(),XW=K_(),kP=J_(),tg=LP(),JW=UP(),Ln;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(Ln||(Ln={}));var rg=1;function hPe(){return{sampler:ZW(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,wn.getNumberFromEnv)("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT")??1/0,attributeCountLimit:(0,wn.getNumberFromEnv)("OTEL_ATTRIBUTE_COUNT_LIMIT")??128},spanLimits:{attributeValueLengthLimit:(0,wn.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT")??1/0,attributeCountLimit:(0,wn.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT")??128,linkCountLimit:(0,wn.getNumberFromEnv)("OTEL_SPAN_LINK_COUNT_LIMIT")??128,eventCountLimit:(0,wn.getNumberFromEnv)("OTEL_SPAN_EVENT_COUNT_LIMIT")??128,attributePerEventCountLimit:(0,wn.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT")??128,attributePerLinkCountLimit:(0,wn.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT")??128}}}Qa.loadDefaultConfig=hPe;function ZW(){let t=(0,wn.getStringFromEnv)("OTEL_TRACES_SAMPLER")??Ln.ParentBasedAlwaysOn;switch(t){case Ln.AlwaysOn:return new kP.AlwaysOnSampler;case Ln.AlwaysOff:return new XW.AlwaysOffSampler;case Ln.ParentBasedAlwaysOn:return new tg.ParentBasedSampler({root:new kP.AlwaysOnSampler});case Ln.ParentBasedAlwaysOff:return new tg.ParentBasedSampler({root:new XW.AlwaysOffSampler});case Ln.TraceIdRatio:return new JW.TraceIdRatioBasedSampler(QW());case Ln.ParentBasedTraceIdRatio:return new tg.ParentBasedSampler({root:new JW.TraceIdRatioBasedSampler(QW())});default:return BP.diag.error(`OTEL_TRACES_SAMPLER value "${t}" invalid, defaulting to "${Ln.ParentBasedAlwaysOn}".`),new tg.ParentBasedSampler({root:new kP.AlwaysOnSampler})}}Qa.buildSamplerFromEnv=ZW;function QW(){let t=(0,wn.getNumberFromEnv)("OTEL_TRACES_SAMPLER_ARG");return t==null?(BP.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${rg}.`),rg):t<0||t>1?(BP.diag.error(`OTEL_TRACES_SAMPLER_ARG=${t} was given, but it is out of range ([0..1]), defaulting to ${rg}.`),rg):t}});var VP=p(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.reconfigureLimits=Ar.mergeConfig=Ar.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=Ar.DEFAULT_ATTRIBUTE_COUNT_LIMIT=void 0;var eK=FP(),ng=K();Ar.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;Ar.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;function mPe(t){let e={sampler:(0,eK.buildSamplerFromEnv)()},r=(0,eK.loadDefaultConfig)(),o=Object.assign({},r,e,t);return o.generalLimits=Object.assign({},r.generalLimits,t.generalLimits||{}),o.spanLimits=Object.assign({},r.spanLimits,t.spanLimits||{}),o}Ar.mergeConfig=mPe;function _Pe(t){let e=Object.assign({},t.spanLimits);return e.attributeCountLimit=t.spanLimits?.attributeCountLimit??t.generalLimits?.attributeCountLimit??(0,ng.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT")??(0,ng.getNumberFromEnv)("OTEL_ATTRIBUTE_COUNT_LIMIT")??Ar.DEFAULT_ATTRIBUTE_COUNT_LIMIT,e.attributeValueLengthLimit=t.spanLimits?.attributeValueLengthLimit??t.generalLimits?.attributeValueLengthLimit??(0,ng.getNumberFromEnv)("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT")??(0,ng.getNumberFromEnv)("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT")??Ar.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},t,{spanLimits:e})}Ar.reconfigureLimits=_Pe});var tK=p(ig=>{"use strict";Object.defineProperty(ig,"__esModule",{value:!0});ig.BatchSpanProcessorBase=void 0;var Za=(R(),y(C)),Dn=K(),GP=class{_exporter;_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_isExporting=!1;_finishedSpans=[];_timer;_shutdownOnce;_droppedSpansCount=0;constructor(e,r){this._exporter=e,this._maxExportBatchSize=typeof r?.maxExportBatchSize=="number"?r.maxExportBatchSize:(0,Dn.getNumberFromEnv)("OTEL_BSP_MAX_EXPORT_BATCH_SIZE")??512,this._maxQueueSize=typeof r?.maxQueueSize=="number"?r.maxQueueSize:(0,Dn.getNumberFromEnv)("OTEL_BSP_MAX_QUEUE_SIZE")??2048,this._scheduledDelayMillis=typeof r?.scheduledDelayMillis=="number"?r.scheduledDelayMillis:(0,Dn.getNumberFromEnv)("OTEL_BSP_SCHEDULE_DELAY")??5e3,this._exportTimeoutMillis=typeof r?.exportTimeoutMillis=="number"?r.exportTimeoutMillis:(0,Dn.getNumberFromEnv)("OTEL_BSP_EXPORT_TIMEOUT")??3e4,this._shutdownOnce=new Dn.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Za.diag.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,r){}onEnd(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&Za.TraceFlags.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&&Za.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(Za.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,r)=>{let o=[],s=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let a=0,i=s;a<i;a++)o.push(this._flushOneBatch());Promise.all(o).then(()=>{e()}).catch(r)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,r)=>{let o=setTimeout(()=>{r(new Error("Timeout"))},this._exportTimeoutMillis);Za.context.with((0,Dn.suppressTracing)(Za.context.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=>{clearTimeout(o),n.code===Dn.ExportResultCode.SUCCESS?e():r(n.error??new Error("BatchSpanProcessor: span export failed"))}),i=null;for(let n=0,c=s.length;n<c;n++){let u=s[n];u.resource.asyncAttributesPending&&u.resource.waitForAsyncAttributes&&(i??=[],i.push(u.resource.waitForAsyncAttributes()))}i===null?a():Promise.all(i).then(a,n=>{(0,Dn.globalErrorHandler)(n),r(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(r=>{this._isExporting=!1,(0,Dn.globalErrorHandler)(r)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),(0,Dn.unrefTimer)(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}};ig.BatchSpanProcessorBase=GP});var rK=p(og=>{"use strict";Object.defineProperty(og,"__esModule",{value:!0});og.BatchSpanProcessor=void 0;var gPe=tK(),qP=class extends gPe.BatchSpanProcessorBase{onShutdown(){}};og.BatchSpanProcessor=qP});var oK=p(ag=>{"use strict";Object.defineProperty(ag,"__esModule",{value:!0});ag.RandomIdGenerator=void 0;var EPe=8,iK=16,jP=class{generateTraceId=nK(iK);generateSpanId=nK(EPe)};ag.RandomIdGenerator=jP;var sg=Buffer.allocUnsafe(iK);function nK(t){return function(){for(let r=0;r<t/4;r++)sg.writeUInt32BE(Math.random()*2**32>>>0,r*4);for(let r=0;r<t&&!(sg[r]>0);r++)r===t-1&&(sg[t-1]=1);return sg.toString("hex",0,t)}}});var sK=p(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});ec.RandomIdGenerator=ec.BatchSpanProcessor=void 0;var SPe=rK();Object.defineProperty(ec,"BatchSpanProcessor",{enumerable:!0,get:function(){return SPe.BatchSpanProcessor}});var TPe=oK();Object.defineProperty(ec,"RandomIdGenerator",{enumerable:!0,get:function(){return TPe.RandomIdGenerator}})});var HP=p(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});tc.RandomIdGenerator=tc.BatchSpanProcessor=void 0;var aK=sK();Object.defineProperty(tc,"BatchSpanProcessor",{enumerable:!0,get:function(){return aK.BatchSpanProcessor}});Object.defineProperty(tc,"RandomIdGenerator",{enumerable:!0,get:function(){return aK.RandomIdGenerator}})});var cK=p(ug=>{"use strict";Object.defineProperty(ug,"__esModule",{value:!0});ug.Tracer=void 0;var ft=(R(),y(C)),cg=K(),yPe=YW(),vPe=VP(),APe=HP(),zP=class{_sampler;_generalLimits;_spanLimits;_idGenerator;instrumentationScope;_resource;_spanProcessor;constructor(e,r,o,s){let a=(0,vPe.mergeConfig)(r);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=r.idGenerator||new APe.RandomIdGenerator,this._resource=o,this._spanProcessor=s,this.instrumentationScope=e}startSpan(e,r={},o=ft.context.active()){r.root&&(o=ft.trace.deleteSpan(o));let s=ft.trace.getSpan(o);if((0,cg.isTracingSuppressed)(o))return ft.diag.debug("Instrumentation suppressed, returning Noop Span"),ft.trace.wrapSpanContext(ft.INVALID_SPAN_CONTEXT);let a=s?.spanContext(),i=this._idGenerator.generateSpanId(),n,c,u;!a||!ft.trace.isSpanContextValid(a)?c=this._idGenerator.generateTraceId():(c=a.traceId,u=a.traceState,n=a);let l=r.kind??ft.SpanKind.INTERNAL,d=(r.links??[]).map(x=>({context:x.context,attributes:(0,cg.sanitizeAttributes)(x.attributes)})),h=(0,cg.sanitizeAttributes)(r.attributes),g=this._sampler.shouldSample(o,c,e,l,h,d);u=g.traceState??u;let E=g.decision===ft.SamplingDecision.RECORD_AND_SAMPLED?ft.TraceFlags.SAMPLED:ft.TraceFlags.NONE,S={traceId:c,spanId:i,traceFlags:E,traceState:u};if(g.decision===ft.SamplingDecision.NOT_RECORD)return ft.diag.debug("Recording is off, propagating context in a non-recording span"),ft.trace.wrapSpanContext(S);let v=(0,cg.sanitizeAttributes)(Object.assign(h,g.attributes));return new yPe.SpanImpl({resource:this._resource,scope:this.instrumentationScope,context:o,spanContext:S,name:e,kind:l,links:d,parentSpanContext:n,attributes:v,startTime:r.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits})}startActiveSpan(e,r,o,s){let a,i,n;if(arguments.length<2)return;arguments.length===2?n=r:arguments.length===3?(a=r,n=o):(a=r,i=o,n=s);let c=i??ft.context.active(),u=this.startSpan(e,a,c),l=ft.trace.setSpan(c,u);return ft.context.with(l,n,void 0,u)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}};ug.Tracer=zP});var uK=p(lg=>{"use strict";Object.defineProperty(lg,"__esModule",{value:!0});lg.MultiSpanProcessor=void 0;var OPe=K(),$P=class{_spanProcessors;constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let r of this._spanProcessors)e.push(r.forceFlush());return new Promise(r=>{Promise.all(e).then(()=>{r()}).catch(o=>{(0,OPe.globalErrorHandler)(o||new Error("MultiSpanProcessor: forceFlush failed")),r()})})}onStart(e,r){for(let o of this._spanProcessors)o.onStart(e,r)}onEnd(e){for(let r of this._spanProcessors)r.onEnd(e)}shutdown(){let e=[];for(let r of this._spanProcessors)e.push(r.shutdown());return new Promise((r,o)=>{Promise.all(e).then(()=>{r()},o)})}};lg.MultiSpanProcessor=$P});var lK=p(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.BasicTracerProvider=ss.ForceFlushState=void 0;var bPe=K(),RPe=Sa(),PPe=cK(),CPe=FP(),NPe=uK(),MPe=VP(),rc;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(rc=ss.ForceFlushState||(ss.ForceFlushState={}));var YP=class{_config;_tracers=new Map;_resource;_activeSpanProcessor;constructor(e={}){let r=(0,bPe.merge)({},(0,CPe.loadDefaultConfig)(),(0,MPe.reconfigureLimits)(e));this._resource=r.resource??(0,RPe.defaultResource)(),this._config=Object.assign({},r,{resource:this._resource});let o=[];e.spanProcessors?.length&&o.push(...e.spanProcessors),this._activeSpanProcessor=new NPe.MultiSpanProcessor(o)}getTracer(e,r,o){let s=`${e}@${r||""}:${o?.schemaUrl||""}`;return this._tracers.has(s)||this._tracers.set(s,new PPe.Tracer({name:e,version:r,schemaUrl:o?.schemaUrl},this._config,this._resource,this._activeSpanProcessor)),this._tracers.get(s)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,r=this._activeSpanProcessor._spanProcessors.map(o=>new Promise(s=>{let a,i=setTimeout(()=>{s(new Error(`Span processor did not completed within timeout period of ${e} ms`)),a=rc.timeout},e);o.forceFlush().then(()=>{clearTimeout(i),a!==rc.timeout&&(a=rc.resolved,s(a))}).catch(n=>{clearTimeout(i),a=rc.error,s(n)})}));return new Promise((o,s)=>{Promise.all(r).then(a=>{let i=a.filter(n=>n!==rc.resolved);i.length>0?s(i):o()}).catch(a=>s([a]))})}shutdown(){return this._activeSpanProcessor.shutdown()}};ss.BasicTracerProvider=YP});var dK=p(dg=>{"use strict";Object.defineProperty(dg,"__esModule",{value:!0});dg.ConsoleSpanExporter=void 0;var WP=K(),KP=class{export(e,r){return this._sendSpans(e,r)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(e){return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationScope,traceId:e.spanContext().traceId,parentSpanContext:e.parentSpanContext,traceState:e.spanContext().traceState?.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:(0,WP.hrTimeToMicroseconds)(e.startTime),duration:(0,WP.hrTimeToMicroseconds)(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}}_sendSpans(e,r){for(let o of e)console.dir(this._exportInfo(o),{depth:3});if(r)return r({code:WP.ExportResultCode.SUCCESS})}};dg.ConsoleSpanExporter=KP});var fK=p(pg=>{"use strict";Object.defineProperty(pg,"__esModule",{value:!0});pg.InMemorySpanExporter=void 0;var pK=K(),XP=class{_finishedSpans=[];_stopped=!1;export(e,r){if(this._stopped)return r({code:pK.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...e),setTimeout(()=>r({code:pK.ExportResultCode.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}};pg.InMemorySpanExporter=XP});var hK=p(hg=>{"use strict";Object.defineProperty(hg,"__esModule",{value:!0});hg.SimpleSpanProcessor=void 0;var IPe=(R(),y(C)),fg=K(),JP=class{_exporter;_shutdownOnce;_pendingExports;constructor(e){this._exporter=e,this._shutdownOnce=new fg.BindOnceFuture(this._shutdown,this),this._pendingExports=new Set}async forceFlush(){await Promise.all(Array.from(this._pendingExports)),this._exporter.forceFlush&&await this._exporter.forceFlush()}onStart(e,r){}onEnd(e){if(this._shutdownOnce.isCalled||(e.spanContext().traceFlags&IPe.TraceFlags.SAMPLED)===0)return;let r=this._doExport(e).catch(o=>(0,fg.globalErrorHandler)(o));this._pendingExports.add(r),r.finally(()=>this._pendingExports.delete(r))}async _doExport(e){e.resource.asyncAttributesPending&&await e.resource.waitForAsyncAttributes?.();let r=await fg.internal._export(this._exporter,[e]);if(r.code!==fg.ExportResultCode.SUCCESS)throw r.error??new Error(`SimpleSpanProcessor: span export failed (status ${r})`)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};hg.SimpleSpanProcessor=JP});var mK=p(mg=>{"use strict";Object.defineProperty(mg,"__esModule",{value:!0});mg.NoopSpanProcessor=void 0;var QP=class{onStart(e,r){}onEnd(e){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};mg.NoopSpanProcessor=QP});var _g=p(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.SamplingDecision=Oe.TraceIdRatioBasedSampler=Oe.ParentBasedSampler=Oe.AlwaysOnSampler=Oe.AlwaysOffSampler=Oe.NoopSpanProcessor=Oe.SimpleSpanProcessor=Oe.InMemorySpanExporter=Oe.ConsoleSpanExporter=Oe.RandomIdGenerator=Oe.BatchSpanProcessor=Oe.BasicTracerProvider=void 0;var xPe=lK();Object.defineProperty(Oe,"BasicTracerProvider",{enumerable:!0,get:function(){return xPe.BasicTracerProvider}});var _K=HP();Object.defineProperty(Oe,"BatchSpanProcessor",{enumerable:!0,get:function(){return _K.BatchSpanProcessor}});Object.defineProperty(Oe,"RandomIdGenerator",{enumerable:!0,get:function(){return _K.RandomIdGenerator}});var wPe=dK();Object.defineProperty(Oe,"ConsoleSpanExporter",{enumerable:!0,get:function(){return wPe.ConsoleSpanExporter}});var LPe=fK();Object.defineProperty(Oe,"InMemorySpanExporter",{enumerable:!0,get:function(){return LPe.InMemorySpanExporter}});var DPe=hK();Object.defineProperty(Oe,"SimpleSpanProcessor",{enumerable:!0,get:function(){return DPe.SimpleSpanProcessor}});var UPe=mK();Object.defineProperty(Oe,"NoopSpanProcessor",{enumerable:!0,get:function(){return UPe.NoopSpanProcessor}});var kPe=K_();Object.defineProperty(Oe,"AlwaysOffSampler",{enumerable:!0,get:function(){return kPe.AlwaysOffSampler}});var BPe=J_();Object.defineProperty(Oe,"AlwaysOnSampler",{enumerable:!0,get:function(){return BPe.AlwaysOnSampler}});var FPe=LP();Object.defineProperty(Oe,"ParentBasedSampler",{enumerable:!0,get:function(){return FPe.ParentBasedSampler}});var VPe=UP();Object.defineProperty(Oe,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return VPe.TraceIdRatioBasedSampler}});var GPe=dl();Object.defineProperty(Oe,"SamplingDecision",{enumerable:!0,get:function(){return GPe.SamplingDecision}})});var gK=p(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});nc.disableInstrumentations=nc.enableInstrumentations=void 0;function qPe(t,e,r,o){for(let s=0,a=t.length;s<a;s++){let i=t[s];e&&i.setTracerProvider(e),r&&i.setMeterProvider(r),o&&i.setLoggerProvider&&i.setLoggerProvider(o),i.getConfig().enabled||i.enable()}}nc.enableInstrumentations=qPe;function jPe(t){t.forEach(e=>e.disable())}nc.disableInstrumentations=jPe});var TK=p(gg=>{"use strict";Object.defineProperty(gg,"__esModule",{value:!0});gg.registerInstrumentations=void 0;var EK=(R(),y(C)),HPe=Bu(),SK=gK();function zPe(t){let e=t.tracerProvider||EK.trace.getTracerProvider(),r=t.meterProvider||EK.metrics.getMeterProvider(),o=t.loggerProvider||HPe.logs.getLoggerProvider(),s=t.instrumentations?.flat()??[];return(0,SK.enableInstrumentations)(s,e,r,o),()=>{(0,SK.disableInstrumentations)(s)}}gg.registerInstrumentations=zPe});var NK=p(Eg=>{"use strict";Object.defineProperty(Eg,"__esModule",{value:!0});Eg.satisfies=void 0;var rC=(R(),y(C)),bK=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,$Pe=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,YPe={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function WPe(t,e,r){if(!KPe(t))return rC.diag.error(`Invalid version: ${t}`),!1;if(!e)return!0;e=e.replace(/([<>=~^]+)\s+/g,"$1");let o=ZPe(t);if(!o)return!1;let s=[],a=RK(o,e,s,r);return a&&!r?.includePrerelease?JPe(o,s):a}Eg.satisfies=WPe;function KPe(t){return typeof t=="string"&&bK.test(t)}function RK(t,e,r,o){if(e.includes("||")){let s=e.trim().split("||");for(let a of s)if(ZP(t,a,r,o))return!0;return!1}else if(e.includes(" - "))e=TCe(e,o);else if(e.includes(" ")){let s=e.trim().replace(/\s{2,}/g," ").split(" ");for(let a of s)if(!ZP(t,a,r,o))return!1;return!0}return ZP(t,e,r,o)}function ZP(t,e,r,o){if(e=QPe(e,o),e.includes(" "))return RK(t,e,r,o);{let s=eCe(e);return r.push(s),XPe(t,s)}}function XPe(t,e){if(e.invalid)return!1;if(!e.version||tC(e.version))return!0;let r=vK(t.versionSegments||[],e.versionSegments||[]);if(r===0){let o=t.prereleaseSegments||[],s=e.prereleaseSegments||[];!o.length&&!s.length?r=0:!o.length&&s.length?r=1:o.length&&!s.length?r=-1:r=vK(o,s)}return YPe[e.op]?.includes(r)}function JPe(t,e){return t.prerelease?e.some(r=>r.prerelease&&r.version===t.version):!0}function QPe(t,e){return t=t.trim(),t=ECe(t,e),t=gCe(t),t=SCe(t,e),t=t.trim(),t}function kt(t){return!t||t.toLowerCase()==="x"||t==="*"}function ZPe(t){let e=t.match(bK);if(!e){rC.diag.error(`Invalid version: ${t}`);return}let r=e.groups.version,o=e.groups.prerelease,s=e.groups.build,a=r.split("."),i=o?.split(".");return{op:void 0,version:r,versionSegments:a,versionSegmentCount:a.length,prerelease:o,prereleaseSegments:i,prereleaseSegmentCount:i?i.length:0,build:s}}function eCe(t){if(!t)return{};let e=t.match($Pe);if(!e)return rC.diag.error(`Invalid range: ${t}`),{invalid:!0};let r=e.groups.op,o=e.groups.version,s=e.groups.prerelease,a=e.groups.build,i=o.split("."),n=s?.split(".");return r==="=="&&(r="="),{op:r||"=",version:o,versionSegments:i,versionSegmentCount:i.length,prerelease:s,prereleaseSegments:n,prereleaseSegmentCount:n?n.length:0,build:a}}function tC(t){return t==="*"||t==="x"||t==="X"}function yK(t){let e=parseInt(t,10);return isNaN(e)?t:e}function tCe(t,e){if(typeof t==typeof e){if(typeof t=="number")return[t,e];if(typeof t=="string")return[t,e];throw new Error("Version segments can only be strings or numbers")}else return[String(t),String(e)]}function rCe(t,e){if(tC(t)||tC(e))return 0;let[r,o]=tCe(yK(t),yK(e));return r>o?1:r<o?-1:0}function vK(t,e){for(let r=0;r<Math.max(t.length,e.length);r++){let o=rCe(t[r]||"0",e[r]||"0");if(o!==0)return o}return 0}var PK="[a-zA-Z0-9-]",CK="0|[1-9]\\d*",nCe=`\\d*[a-zA-Z-]${PK}*`,iCe="((?:<|>)?=?)",AK=`(?:${CK}|${nCe})`,oCe=`(?:-(${AK}(?:\\.${AK})*))`,OK=`${PK}+`,sCe=`(?:\\+(${OK}(?:\\.${OK})*))`,eC=`${CK}|x|X|\\*`,pl=`[v=\\s]*(${eC})(?:\\.(${eC})(?:\\.(${eC})(?:${oCe})?${sCe}?)?)?`,aCe=`^${iCe}\\s*${pl}$`,cCe=new RegExp(aCe),uCe=`^\\s*(${pl})\\s+-\\s+(${pl})\\s*$`,lCe=new RegExp(uCe),dCe="(?:~>?)",pCe=`^${dCe}${pl}$`,fCe=new RegExp(pCe),hCe="(?:\\^)",mCe=`^${hCe}${pl}$`,_Ce=new RegExp(mCe);function gCe(t){let e=fCe;return t.replace(e,(r,o,s,a,i)=>{let n;return kt(o)?n="":kt(s)?n=`>=${o}.0.0 <${+o+1}.0.0-0`:kt(a)?n=`>=${o}.${s}.0 <${o}.${+s+1}.0-0`:i?n=`>=${o}.${s}.${a}-${i} <${o}.${+s+1}.0-0`:n=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`,n})}function ECe(t,e){let r=_Ce,o=e?.includePrerelease?"-0":"";return t.replace(r,(s,a,i,n,c)=>{let u;return kt(a)?u="":kt(i)?u=`>=${a}.0.0${o} <${+a+1}.0.0-0`:kt(n)?a==="0"?u=`>=${a}.${i}.0${o} <${a}.${+i+1}.0-0`:u=`>=${a}.${i}.0${o} <${+a+1}.0.0-0`:c?a==="0"?i==="0"?u=`>=${a}.${i}.${n}-${c} <${a}.${i}.${+n+1}-0`:u=`>=${a}.${i}.${n}-${c} <${a}.${+i+1}.0-0`:u=`>=${a}.${i}.${n}-${c} <${+a+1}.0.0-0`:a==="0"?i==="0"?u=`>=${a}.${i}.${n}${o} <${a}.${i}.${+n+1}-0`:u=`>=${a}.${i}.${n}${o} <${a}.${+i+1}.0-0`:u=`>=${a}.${i}.${n} <${+a+1}.0.0-0`,u})}function SCe(t,e){let r=cCe;return t.replace(r,(o,s,a,i,n,c)=>{let u=kt(a),l=u||kt(i),d=l||kt(n),h=d;return s==="="&&h&&(s=""),c=e?.includePrerelease?"-0":"",u?s===">"||s==="<"?o="<0.0.0-0":o="*":s&&h?(l&&(i=0),n=0,s===">"?(s=">=",l?(a=+a+1,i=0,n=0):(i=+i+1,n=0)):s==="<="&&(s="<",l?a=+a+1:i=+i+1),s==="<"&&(c="-0"),o=`${s+a}.${i}.${n}${c}`):l?o=`>=${a}.0.0${c} <${+a+1}.0.0-0`:d&&(o=`>=${a}.${i}.0${c} <${a}.${+i+1}.0-0`),o})}function TCe(t,e){let r=lCe;return t.replace(r,(o,s,a,i,n,c,u,l,d,h,g,E)=>(kt(a)?s="":kt(i)?s=`>=${a}.0.0${e?.includePrerelease?"-0":""}`:kt(n)?s=`>=${a}.${i}.0${e?.includePrerelease?"-0":""}`:c?s=`>=${s}`:s=`>=${s}${e?.includePrerelease?"-0":""}`,kt(d)?l="":kt(h)?l=`<${+d+1}.0.0-0`:kt(g)?l=`<${d}.${+h+1}.0-0`:E?l=`<=${d}.${h}.${g}-${E}`:e?.includePrerelease?l=`<${d}.${h}.${+g+1}-0`:l=`<=${l}`,`${s} ${l}`.trim()))}});var nC=p(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.massUnwrap=ht.unwrap=ht.massWrap=ht.wrap=void 0;var Bt=console.error.bind(console);function fl(t,e,r){let o=!!t[e]&&Object.prototype.propertyIsEnumerable.call(t,e);Object.defineProperty(t,e,{configurable:!0,enumerable:o,writable:!0,value:r})}var yCe=(t,e,r)=>{if(!t||!t[e]){Bt("no original function "+String(e)+" to wrap");return}if(!r){Bt("no wrapper function"),Bt(new Error().stack);return}let o=t[e];if(typeof o!="function"||typeof r!="function"){Bt("original object and wrapper must be functions");return}let s=r(o,e);return fl(s,"__original",o),fl(s,"__unwrap",()=>{t[e]===s&&fl(t,e,o)}),fl(s,"__wrapped",!0),fl(t,e,s),s};ht.wrap=yCe;var vCe=(t,e,r)=>{if(t)Array.isArray(t)||(t=[t]);else{Bt("must provide one or more modules to patch"),Bt(new Error().stack);return}if(!(e&&Array.isArray(e))){Bt("must provide one or more functions to wrap on modules");return}t.forEach(o=>{e.forEach(s=>{(0,ht.wrap)(o,s,r)})})};ht.massWrap=vCe;var ACe=(t,e)=>{if(!t||!t[e]){Bt("no function to unwrap."),Bt(new Error().stack);return}let r=t[e];if(!r.__unwrap)Bt("no original to unwrap to -- has "+String(e)+" already been unwrapped?");else{r.__unwrap();return}};ht.unwrap=ACe;var OCe=(t,e)=>{if(t)Array.isArray(t)||(t=[t]);else{Bt("must provide one or more modules to patch"),Bt(new Error().stack);return}if(!(e&&Array.isArray(e))){Bt("must provide one or more functions to unwrap on modules");return}t.forEach(r=>{e.forEach(o=>{(0,ht.unwrap)(r,o)})})};ht.massUnwrap=OCe;function hl(t){t&&t.logger&&(typeof t.logger!="function"?Bt("new logger isn't a function, not replacing"):Bt=t.logger)}ht.default=hl;hl.wrap=ht.wrap;hl.massWrap=ht.massWrap;hl.unwrap=ht.unwrap;hl.massUnwrap=ht.massUnwrap});var MK=p(Tg=>{"use strict";Object.defineProperty(Tg,"__esModule",{value:!0});Tg.InstrumentationAbstract=void 0;var iC=(R(),y(C)),bCe=Bu(),Sg=nC(),oC=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(e,r,o){this.instrumentationName=e,this.instrumentationVersion=r,this.setConfig(o),this._diag=iC.diag.createComponentLogger({namespace:e}),this._tracer=iC.trace.getTracer(e,r),this._meter=iC.metrics.getMeter(e,r),this._logger=bCe.logs.getLogger(e,r),this._updateMetricInstruments()}_wrap=Sg.wrap;_unwrap=Sg.unwrap;_massWrap=Sg.massWrap;_massUnwrap=Sg.massUnwrap;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(){let e=this.init()??[];return Array.isArray(e)?e:[e]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e){this._config={enabled:!0,...e}}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(e,r,o,s){if(e)try{e(o,s)}catch(a){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},a)}}};Tg.InstrumentationAbstract=oC});var xK=p((Eet,IK)=>{var ic=1e3,oc=ic*60,sc=oc*60,as=sc*24,RCe=as*7,PCe=as*365.25;IK.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return CCe(t);if(r==="number"&&isFinite(t))return e.long?MCe(t):NCe(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function CCe(t){if(t=String(t),!(t.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(t);if(e){var r=parseFloat(e[1]),o=(e[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return r*PCe;case"weeks":case"week":case"w":return r*RCe;case"days":case"day":case"d":return r*as;case"hours":case"hour":case"hrs":case"hr":case"h":return r*sc;case"minutes":case"minute":case"mins":case"min":case"m":return r*oc;case"seconds":case"second":case"secs":case"sec":case"s":return r*ic;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function NCe(t){var e=Math.abs(t);return e>=as?Math.round(t/as)+"d":e>=sc?Math.round(t/sc)+"h":e>=oc?Math.round(t/oc)+"m":e>=ic?Math.round(t/ic)+"s":t+"ms"}function MCe(t){var e=Math.abs(t);return e>=as?yg(t,e,as,"day"):e>=sc?yg(t,e,sc,"hour"):e>=oc?yg(t,e,oc,"minute"):e>=ic?yg(t,e,ic,"second"):t+" ms"}function yg(t,e,r,o){var s=e>=r*1.5;return Math.round(t/r)+" "+o+(s?"s":"")}});var sC=p((Tet,wK)=>{function ICe(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=s,r.enabled=n,r.humanize=xK(),r.destroy=u,Object.keys(t).forEach(l=>{r[l]=t[l]}),r.names=[],r.skips=[],r.formatters={};function e(l){let d=0;for(let h=0;h<l.length;h++)d=(d<<5)-d+l.charCodeAt(h),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=e;function r(l){let d,h=null,g,E;function S(...v){if(!S.enabled)return;let O=S,x=Number(new Date),H=x-(d||x);O.diff=H,O.prev=d,O.curr=x,d=x,v[0]=r.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let A=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(z,Q)=>{if(z==="%%")return"%";A++;let oe=r.formatters[Q];if(typeof oe=="function"){let te=v[A];z=oe.call(O,te),v.splice(A,1),A--}return z}),r.formatArgs.call(O,v),(O.log||r.log).apply(O,v)}return S.namespace=l,S.useColors=r.useColors(),S.color=r.selectColor(l),S.extend=o,S.destroy=r.destroy,Object.defineProperty(S,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(g!==r.namespaces&&(g=r.namespaces,E=r.enabled(l)),E),set:v=>{h=v}}),typeof r.init=="function"&&r.init(S),S}function o(l,d){let h=r(this.namespace+(typeof d>"u"?":":d)+l);return h.log=this.log,h}function s(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let d=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let h of d)h[0]==="-"?r.skips.push(h.slice(1)):r.names.push(h)}function a(l,d){let h=0,g=0,E=-1,S=0;for(;h<l.length;)if(g<d.length&&(d[g]===l[h]||d[g]==="*"))d[g]==="*"?(E=g,S=h,g++):(h++,g++);else if(E!==-1)g=E+1,S++,h=S;else return!1;for(;g<d.length&&d[g]==="*";)g++;return g===d.length}function i(){let l=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),l}function n(l){for(let d of r.skips)if(a(l,d))return!1;for(let d of r.names)if(a(l,d))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){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 r.enable(r.load()),r}wK.exports=ICe});var LK=p((Wt,vg)=>{Wt.formatArgs=wCe;Wt.save=LCe;Wt.load=DCe;Wt.useColors=xCe;Wt.storage=UCe();Wt.destroy=(()=>{let t=!1;return()=>{t||(t=!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`."))}})();Wt.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 xCe(){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 t;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&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function wCe(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+vg.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(o=r))}),t.splice(o,0,e)}Wt.log=console.debug||console.log||(()=>{});function LCe(t){try{t?Wt.storage.setItem("debug",t):Wt.storage.removeItem("debug")}catch{}}function DCe(){let t;try{t=Wt.storage.getItem("debug")||Wt.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function UCe(){try{return localStorage}catch{}}vg.exports=sC()(Wt);var{formatters:kCe}=vg.exports;kCe.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var UK=p((rt,Og)=>{var BCe=b("tty"),Ag=b("util");rt.init=zCe;rt.log=qCe;rt.formatArgs=VCe;rt.save=jCe;rt.load=HCe;rt.useColors=FCe;rt.destroy=Ag.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");rt.colors=[6,2,3,4,5,1];try{let t=b("supports-color");t&&(t.stderr||t).level>=2&&(rt.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}rt.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=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),t[r]=o,t},{});function FCe(){return"colors"in rt.inspectOpts?!!rt.inspectOpts.colors:BCe.isatty(process.stderr.fd)}function VCe(t){let{namespace:e,useColors:r}=this;if(r){let o=this.color,s="\x1B[3"+(o<8?o:"8;5;"+o),a=` ${s};1m${e} \x1B[0m`;t[0]=a+t[0].split(`
|
|
19
|
+
`).join(`
|
|
20
|
+
`+a),t.push(s+"m+"+Og.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=GCe()+e+" "+t[0]}function GCe(){return rt.inspectOpts.hideDate?"":new Date().toISOString()+" "}function qCe(...t){return process.stderr.write(Ag.formatWithOptions(rt.inspectOpts,...t)+`
|
|
21
|
+
`)}function jCe(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function HCe(){return process.env.DEBUG}function zCe(t){t.inspectOpts={};let e=Object.keys(rt.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=rt.inspectOpts[e[r]]}Og.exports=sC()(rt);var{formatters:DK}=Og.exports;DK.o=function(t){return this.inspectOpts.colors=this.useColors,Ag.inspect(t,this.inspectOpts).split(`
|
|
22
|
+
`).map(e=>e.trim()).join(" ")};DK.O=function(t){return this.inspectOpts.colors=this.useColors,Ag.inspect(t,this.inspectOpts)}});var kK=p((yet,aC)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?aC.exports=LK():aC.exports=UK()});var uC=p((vet,BK)=>{"use strict";var cC=b("path").sep;BK.exports=function(t){var e=t.split(cC),r=e.lastIndexOf("node_modules");if(r!==-1&&e[r+1]){for(var o=e[r+1][0]==="@",s=o?e[r+1]+"/"+e[r+2]:e[r+1],a=o?3:2,i="",n=r+a-1,c=0;c<=n;c++)c===n?i+=e[c]:i+=e[c]+cC;for(var u="",l=e.length-1,d=r+a;d<=l;d++)d===l?u+=e[d]:u+=e[d]+cC;return{name:s,basedir:i,path:u}}}});var fC=p((Aet,pC)=>{"use strict";var ac=b("path"),jr=b("module"),Be=kK()("require-in-the-middle"),$Ce=uC();pC.exports=ml;pC.exports.Hook=ml;var lC,bg;if(jr.isBuiltin)bg=jr.isBuiltin;else if(jr.builtinModules)bg=t=>t.startsWith("node:")?!0:(lC===void 0&&(lC=new Set(jr.builtinModules)),lC.has(t));else throw new Error("'require-in-the-middle' requires Node.js >=v9.3.0 or >=v8.10.0");var YCe=/([/\\]index)?(\.js)?$/,dC=class{constructor(){this._localCache=new Map,this._kRitmExports=Symbol("RitmExports")}has(e,r){if(this._localCache.has(e))return!0;if(r)return!1;{let o=b.cache[e];return!!(o&&this._kRitmExports in o)}}get(e,r){let o=this._localCache.get(e);if(o!==void 0)return o;if(!r){let s=b.cache[e];return s&&s[this._kRitmExports]}}set(e,r,o){o?this._localCache.set(e,r):e in b.cache?b.cache[e][this._kRitmExports]=r:(Be('non-core module is unexpectedly not in require.cache: "%s"',e),this._localCache.set(e,r))}};function ml(t,e,r){if(!(this instanceof ml))return new ml(t,e,r);if(typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),typeof jr._resolveFilename!="function"){console.error("Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!",typeof jr._resolveFilename),console.error("Please report this error as an issue related to Node.js %s at https://github.com/nodejs/require-in-the-middle/issues",process.version);return}this._cache=new dC,this._unhooked=!1,this._origRequire=jr.prototype.require;let o=this,s=new Set,a=e?e.internals===!0:!1,i=Array.isArray(t);Be("registering require hook"),this._require=jr.prototype.require=function(c){return o._unhooked===!0?(Be("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(c){return o._unhooked===!0?(Be("ignoring process.getBuiltinModule call - module is soft-unhooked"),o._origGetBuiltinModule.apply(this,arguments)):n.call(this,arguments,!0)});function n(c,u){let l=c[0],d=bg(l),h;if(d){if(h=l,l.startsWith("node:")){let x=l.slice(5);bg(x)&&(h=x)}}else{if(u)return Be("call to process.getBuiltinModule with unknown built-in id"),o._origGetBuiltinModule.apply(this,c);try{h=jr._resolveFilename(l,this)}catch(x){return Be('Module._resolveFilename("%s") threw %j, calling original Module.require',l,x.message),o._origRequire.apply(this,c)}}let g,E;if(Be("processing %s module require('%s'): %s",d===!0?"core":"non-core",l,h),o._cache.has(h,d)===!0)return Be("returning already patched cached module: %s",h),o._cache.get(h,d);let S=s.has(h);S===!1&&s.add(h);let v=u?o._origGetBuiltinModule.apply(this,c):o._origRequire.apply(this,c);if(S===!0)return Be("module is in the process of being patched already - ignoring: %s",h),v;if(s.delete(h),d===!0){if(i===!0&&t.includes(h)===!1)return Be("ignoring core module not on whitelist: %s",h),v;g=h}else if(i===!0&&t.includes(h)){let x=ac.parse(h);g=x.name,E=x.dir}else{let x=$Ce(h);if(x===void 0)return Be("could not parse filename: %s",h),v;g=x.name,E=x.basedir;let H=WCe(x);Be("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)",g,l,H,E);let A=!1;if(i){if(!l.startsWith(".")&&t.includes(l)&&(g=l,A=!0),!t.includes(g)&&!t.includes(H))return v;t.includes(H)&&H!==g&&(g=H,A=!0)}if(!A){let $;try{$=b.resolve(g,{paths:[E]})}catch{return Be("could not resolve module: %s",g),o._cache.set(h,v,d),v}if($!==h)if(a===!0)g=g+ac.sep+ac.relative(E,h),Be("preparing to process require of internal file: %s",g);else return Be("ignoring require of non-main module file: %s",$),o._cache.set(h,v,d),v}}o._cache.set(h,v,d),Be("calling require hook: %s",g);let O=r(v,g,E);return o._cache.set(h,O,d),Be("returning module: %s",g),O}}ml.prototype.unhook=function(){this._unhooked=!0,this._require===jr.prototype.require?(jr.prototype.require=this._origRequire,Be("require unhook successful")):Be("require unhook unsuccessful"),process.getBuiltinModule!==void 0&&(this._getBuiltinModule===process.getBuiltinModule?(process.getBuiltinModule=this._origGetBuiltinModule,Be("process.getBuiltinModule unhook successful")):Be("process.getBuiltinModule unhook unsuccessful"))};function WCe(t){let e=ac.sep!=="/"?t.path.split(ac.sep).join("/"):t.path;return ac.posix.join(t.name,e).replace(YCe,"")}});var FK=p(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.ModuleNameTrie=Ki.ModuleNameSeparator=void 0;Ki.ModuleNameSeparator="/";var Rg=class{hooks=[];children=new Map},hC=class{_trie=new Rg;_counter=0;insert(e){let r=this._trie;for(let o of e.moduleName.split(Ki.ModuleNameSeparator)){let s=r.children.get(o);s||(s=new Rg,r.children.set(o,s)),r=s}r.hooks.push({hook:e,insertedId:this._counter++})}search(e,{maintainInsertionOrder:r,fullOnly:o}={}){let s=this._trie,a=[],i=!0;for(let n of e.split(Ki.ModuleNameSeparator)){let c=s.children.get(n);if(!c){i=!1;break}o||a.push(...c.hooks),s=c}return o&&i&&a.push(...s.hooks),a.length===0?[]:a.length===1?[a[0].hook]:(r&&a.sort((n,c)=>n.insertedId-c.insertedId),a.map(({hook:n})=>n))}};Ki.ModuleNameTrie=hC});var GK=p(Pg=>{"use strict";Object.defineProperty(Pg,"__esModule",{value:!0});Pg.RequireInTheMiddleSingleton=void 0;var KCe=fC(),VK=b("path"),mC=FK(),XCe=["afterEach","after","beforeEach","before","describe","it"].every(t=>typeof global[t]=="function"),_C=class t{_moduleNameTrie=new mC.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new KCe.Hook(null,{internals:!0},(e,r,o)=>{let s=JCe(r),a=this._moduleNameTrie.search(s,{maintainInsertionOrder:!0,fullOnly:o===void 0});for(let{onRequire:i}of a)e=i(e,r,o);return e})}register(e,r){let o={moduleName:e,onRequire:r};return this._moduleNameTrie.insert(o),o}static getInstance(){return XCe?new t:this._instance=this._instance??new t}};Pg.RequireInTheMiddleSingleton=_C;function JCe(t){return VK.sep!==mC.ModuleNameSeparator?t.split(VK.sep).join(mC.ModuleNameSeparator):t}});var YK=p(cs=>{var qK=[],gC=new WeakMap,jK=new WeakMap,HK=new Map,zK=[],QCe={set(t,e,r){return gC.get(t)[e](r)},get(t,e){if(e===Symbol.toStringTag)return"Module";let r=jK.get(t)[e];if(typeof r=="function")return r()},defineProperty(t,e,r){if(!("value"in r))throw new Error("Getters/setters are not supported for exports property descriptors.");return gC.get(t)[e](r.value)}};function ZCe(t,e,r,o,s){HK.set(t,s),gC.set(e,r),jK.set(e,o);let a=new Proxy(e,QCe);qK.forEach(i=>i(t,a)),zK.push([t,a])}var $K=!1;function eNe(){return $K}function tNe(t){$K=t}cs.register=ZCe;cs.importHooks=qK;cs.specifiers=HK;cs.toHook=zK;cs.getExperimentalPatchInternals=eNe;cs.setExperimentalPatchInternals=tNe});var ZK=p((Cet,cc)=>{var WK=b("path"),rNe=uC(),{fileURLToPath:KK}=b("url"),{MessageChannel:nNe}=b("worker_threads"),{importHooks:EC,specifiers:iNe,toHook:oNe,getExperimentalPatchInternals:sNe}=YK();function JK(t){EC.push(t),oNe.forEach(([e,r])=>t(e,r))}function QK(t){let e=EC.indexOf(t);e>-1&&EC.splice(e,1)}function XK(t,e,r,o){let s=t(e,r,o);s&&s!==e&&(e.default=s)}var SC;function aNe(){let{port1:t,port2:e}=new nNe,r=0,o;SC=n=>{r++,t.postMessage(n)},t.on("message",()=>{r--,o&&r<=0&&o()}).unref();function s(){let n=setInterval(()=>{},1e3),c=new Promise(u=>{o=u}).then(()=>{clearInterval(n)});return r===0&&o(),c}let a=e;return{registerOptions:{data:{addHookMessagePort:a,include:[]},transferList:[a]},addHookMessagePort:a,waitForAllMessagesAcknowledged:s}}function _l(t,e,r){if(!(this instanceof _l))return new _l(t,e,r);typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null);let o=e?e.internals===!0:!1;SC&&Array.isArray(t)&&SC(t),this._iitmHook=(s,a)=>{let i=s,n=s.startsWith("node:"),c;if(n)s=s.replace(/^node:/,"");else{if(s.startsWith("file://"))try{s=KK(s)}catch{}let u=rNe(s);u&&(s=u.name,c=u.basedir)}if(t){for(let u of t)if(u===s){if(c){if(o)s=s+WK.sep+WK.relative(c,KK(i));else if(!sNe()&&!c.endsWith(iNe.get(i)))continue}XK(r,a,s,c)}}else XK(r,a,s,c)},JK(this._iitmHook)}_l.prototype.unhook=function(){QK(this._iitmHook)};cc.exports=_l;cc.exports.Hook=_l;cc.exports.addHook=JK;cc.exports.removeHook=QK;cc.exports.createAddHookMessageChannel=aNe});var TC=p(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.isWrapped=Xi.safeExecuteInTheMiddleAsync=Xi.safeExecuteInTheMiddle=void 0;function cNe(t,e,r){let o,s;try{s=t()}catch(a){o=a}finally{if(e(o,s),o&&!r)throw o;return s}}Xi.safeExecuteInTheMiddle=cNe;async function uNe(t,e,r){let o,s;try{s=await t()}catch(a){o=a}finally{if(e(o,s),o&&!r)throw o;return s}}Xi.safeExecuteInTheMiddleAsync=uNe;function lNe(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}Xi.isWrapped=lNe});var r6=p(Cg=>{"use strict";Object.defineProperty(Cg,"__esModule",{value:!0});Cg.InstrumentationBase=void 0;var gl=b("path"),e6=b("util"),dNe=NK(),yC=nC(),pNe=MK(),fNe=GK(),hNe=ZK(),El=(R(),y(C)),mNe=fC(),_Ne=b("fs"),gNe=TC(),vC=class extends pNe.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=fNe.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(e,r,o){super(e,r,o);let s=this.init();s&&!Array.isArray(s)&&(s=[s]),this._modules=s||[],this._config.enabled&&this.enable()}_wrap=(e,r,o)=>{if((0,gNe.isWrapped)(e[r])&&this._unwrap(e,r),e6.types.isProxy(e)){let s=(0,yC.wrap)(Object.assign({},e),r,o);return Object.defineProperty(e,r,{value:s}),s}else return(0,yC.wrap)(e,r,o)};_unwrap=(e,r)=>e6.types.isProxy(e)?Object.defineProperty(e,r,{value:e[r]}):(0,yC.unwrap)(e,r);_massWrap=(e,r,o)=>{if(e)Array.isArray(e)||(e=[e]);else{El.diag.error("must provide one or more modules to patch");return}if(!(r&&Array.isArray(r))){El.diag.error("must provide one or more functions to wrap on modules");return}e.forEach(s=>{r.forEach(a=>{this._wrap(s,a,o)})})};_massUnwrap=(e,r)=>{if(e)Array.isArray(e)||(e=[e]);else{El.diag.error("must provide one or more modules to patch");return}if(!(r&&Array.isArray(r))){El.diag.error("must provide one or more functions to wrap on modules");return}e.forEach(o=>{r.forEach(s=>{this._unwrap(o,s)})})};_warnOnPreloadedModules(){this._modules.forEach(e=>{let{name:r}=e;try{let o=b.resolve(r);b.cache[o]&&this._diag.warn(`Module ${r} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${r}`)}catch{}})}_extractPackageVersion(e){try{let r=(0,_Ne.readFileSync)(gl.join(e,"package.json"),{encoding:"utf8"}),o=JSON.parse(r).version;return typeof o=="string"?o:void 0}catch{El.diag.warn("Failed extracting version",e)}}_onRequire(e,r,o,s){if(!s)return typeof e.patch=="function"&&(e.moduleExports=r,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:e.name}),e.patch(r)):r;let a=this._extractPackageVersion(s);if(e.moduleVersion=a,e.name===o)return t6(e.supportedVersions,a,e.includePrerelease)&&typeof e.patch=="function"&&(e.moduleExports=r,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:e.name,version:e.moduleVersion,baseDir:s}),e.patch(r,e.moduleVersion)):r;let i=e.files??[],n=gl.normalize(o);return i.filter(u=>u.name===n).filter(u=>t6(u.supportedVersions,a,e.includePrerelease)).reduce((u,l)=>(l.moduleExports=u,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:e.name,version:e.moduleVersion,fileName:l.name,baseDir:s}),l.patch(u,e.moduleVersion)):u),r)}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 r of e.files)r.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:e.name,version:e.moduleVersion,fileName:r.name}),r.patch(r.moduleExports,e.moduleVersion))}return}this._warnOnPreloadedModules();for(let e of this._modules){let r=(i,n,c)=>{if(!c&&gl.isAbsolute(n)){let u=gl.parse(n);n=u.name,c=u.dir}return this._onRequire(e,i,n,c)},o=(i,n,c)=>this._onRequire(e,i,n,c),s=gl.isAbsolute(e.name)?new mNe.Hook([e.name],{internals:!0},o):this._requireInTheMiddleSingleton.register(e.name,o);this._hooks.push(s);let a=new hNe.Hook([e.name],{internals:!1},r);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 r of e.files)r.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:e.name,version:e.moduleVersion,fileName:r.name}),r.unpatch(r.moduleExports,e.moduleVersion))}}}isEnabled(){return this._enabled}};Cg.InstrumentationBase=vC;function t6(t,e,r){return typeof e>"u"?t.includes("*"):t.some(o=>(0,dNe.satisfies)(e,o,{includePrerelease:r}))}});var n6=p(Ng=>{"use strict";Object.defineProperty(Ng,"__esModule",{value:!0});Ng.normalize=void 0;var ENe=b("path");Object.defineProperty(Ng,"normalize",{enumerable:!0,get:function(){return ENe.normalize}})});var i6=p(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});uc.normalize=uc.InstrumentationBase=void 0;var SNe=r6();Object.defineProperty(uc,"InstrumentationBase",{enumerable:!0,get:function(){return SNe.InstrumentationBase}});var TNe=n6();Object.defineProperty(uc,"normalize",{enumerable:!0,get:function(){return TNe.normalize}})});var AC=p(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});lc.normalize=lc.InstrumentationBase=void 0;var o6=i6();Object.defineProperty(lc,"InstrumentationBase",{enumerable:!0,get:function(){return o6.InstrumentationBase}});Object.defineProperty(lc,"normalize",{enumerable:!0,get:function(){return o6.normalize}})});var s6=p(Mg=>{"use strict";Object.defineProperty(Mg,"__esModule",{value:!0});Mg.InstrumentationNodeModuleDefinition=void 0;var OC=class{name;supportedVersions;patch;unpatch;files;constructor(e,r,o,s,a){this.name=e,this.supportedVersions=r,this.patch=o,this.unpatch=s,this.files=a||[]}};Mg.InstrumentationNodeModuleDefinition=OC});var a6=p(Ig=>{"use strict";Object.defineProperty(Ig,"__esModule",{value:!0});Ig.InstrumentationNodeModuleFile=void 0;var yNe=AC(),bC=class{supportedVersions;patch;unpatch;name;constructor(e,r,o,s){this.supportedVersions=r,this.patch=o,this.unpatch=s,this.name=(0,yNe.normalize)(e)}};Ig.InstrumentationNodeModuleFile=bC});var c6=p(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});us.semconvStabilityFromStr=us.SemconvStability=void 0;var xg;(function(t){t[t.STABLE=1]="STABLE",t[t.OLD=2]="OLD",t[t.DUPLICATE=3]="DUPLICATE"})(xg=us.SemconvStability||(us.SemconvStability={}));function vNe(t,e){let r=xg.OLD,o=e?.split(",").map(s=>s.trim()).filter(s=>s!=="");for(let s of o??[])if(s.toLowerCase()===t+"/dup"){r=xg.DUPLICATE;break}else s.toLowerCase()===t&&(r=xg.STABLE);return r}us.semconvStabilityFromStr=vNe});var l6=p(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.semconvStabilityFromStr=He.SemconvStability=He.safeExecuteInTheMiddleAsync=He.safeExecuteInTheMiddle=He.isWrapped=He.InstrumentationNodeModuleFile=He.InstrumentationNodeModuleDefinition=He.InstrumentationBase=He.registerInstrumentations=void 0;var ANe=TK();Object.defineProperty(He,"registerInstrumentations",{enumerable:!0,get:function(){return ANe.registerInstrumentations}});var ONe=AC();Object.defineProperty(He,"InstrumentationBase",{enumerable:!0,get:function(){return ONe.InstrumentationBase}});var bNe=s6();Object.defineProperty(He,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return bNe.InstrumentationNodeModuleDefinition}});var RNe=a6();Object.defineProperty(He,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return RNe.InstrumentationNodeModuleFile}});var RC=TC();Object.defineProperty(He,"isWrapped",{enumerable:!0,get:function(){return RC.isWrapped}});Object.defineProperty(He,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return RC.safeExecuteInTheMiddle}});Object.defineProperty(He,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return RC.safeExecuteInTheMiddleAsync}});var u6=c6();Object.defineProperty(He,"SemconvStability",{enumerable:!0,get:function(){return u6.SemconvStability}});Object.defineProperty(He,"semconvStabilityFromStr",{enumerable:!0,get:function(){return u6.semconvStabilityFromStr}})});var wg,d6=k(()=>{wg=class{_delegate;constructor(e){this._delegate=e}export(e,r){this._delegate.export(e,r)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}});var Ti,Lg=k(()=>{Ti=class extends Error{code;name="OTLPExporterError";data;constructor(e,r,o){super(e),this.data=o,this.code=r}}});function PNe(t){if(Number.isFinite(t)&&t>0)return t;throw new Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${t}')`)}function Dg(t){if(t!=null)return()=>t}function Ug(t,e,r){return{timeoutMillis:PNe(t.timeoutMillis??e.timeoutMillis??r.timeoutMillis),concurrencyLimit:t.concurrencyLimit??e.concurrencyLimit??r.concurrencyLimit,compression:t.compression??e.compression??r.compression}}function kg(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var Sl=k(()=>{});var Bg,p6=k(()=>{(function(t){t.NONE="none",t.GZIP="gzip"})(Bg||(Bg={}))});function Fg(t){return new PC(t.concurrencyLimit)}var PC,CC=k(()=>{PC=class{_concurrencyLimit;_sendingPromises=[];constructor(e){this._concurrencyLimit=e}pushPromise(e){if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(e);let r=()=>{let o=this._sendingPromises.indexOf(e);this._sendingPromises.splice(o,1)};e.then(r,r)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}});function CNe(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function f6(){return{handleResponse(t){t==null||!CNe(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||Qe.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}var h6=k(()=>{R()});function Vg(t,e){return new NC(t.transport,t.serializer,f6(),t.promiseHandler,e.timeout)}var Ji,NC,MC=k(()=>{Ji=he(K());Lg();h6();R();NC=class{_transport;_serializer;_responseHandler;_promiseQueue;_timeout;_diagLogger;constructor(e,r,o,s,a){this._transport=e,this._serializer=r,this._responseHandler=o,this._promiseQueue=s,this._timeout=a,this._diagLogger=Qe.createComponentLogger({namespace:"OTLPExportDelegate"})}export(e,r){if(this._diagLogger.debug("items to be sent",e),this._promiseQueue.hasReachedLimit()){r({code:Ji.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}let o=this._serializer.serializeRequest(e);if(o==null){r({code:Ji.ExportResultCode.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(o,this._timeout).then(s=>{if(s.status==="success"){if(s.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(s.data))}catch(a){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",a,s.data)}r({code:Ji.ExportResultCode.SUCCESS});return}else if(s.status==="failure"&&s.error){r({code:Ji.ExportResultCode.FAILED,error:s.error});return}else s.status==="retryable"?r({code:Ji.ExportResultCode.FAILED,error:new Ti("Export failed with retryable status")}):r({code:Ji.ExportResultCode.FAILED,error:new Ti("Export failed with unknown error")})},s=>r({code:Ji.ExportResultCode.FAILED,error:s})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}});function m6(t,e,r){return Vg({transport:r,serializer:e,promiseHandler:Fg(t)},{timeout:t.timeoutMillis})}var _6=k(()=>{CC();MC()});var Un={};Yd(Un,{CompressionAlgorithm:()=>Bg,OTLPExporterBase:()=>wg,OTLPExporterError:()=>Ti,createOtlpNetworkExportDelegate:()=>m6,getSharedConfigurationDefaults:()=>kg,mergeOtlpSharedConfigurationWithDefaults:()=>Ug});var kn=k(()=>{d6();Lg();Sl();p6();_6()});var IC=p((itt,g6)=>{"use strict";g6.exports=NNe;function NNe(t,e){for(var r=new Array(arguments.length-1),o=0,s=2,a=!0;s<arguments.length;)r[o++]=arguments[s++];return new Promise(function(n,c){r[o]=function(l){if(a)if(a=!1,l)c(l);else{for(var d=new Array(arguments.length-1),h=0;h<d.length;)d[h++]=arguments[h];n.apply(null,d)}};try{t.apply(e||null,r)}catch(u){a&&(a=!1,c(u))}})}});var y6=p(T6=>{"use strict";var Gg=T6;Gg.length=function(e){var r=e.length;if(!r)return 0;for(var o=0;--r%4>1&&e.charAt(r)==="=";)++o;return Math.ceil(e.length*3)/4-o};var dc=new Array(64),S6=new Array(123);for(Hr=0;Hr<64;)S6[dc[Hr]=Hr<26?Hr+65:Hr<52?Hr+71:Hr<62?Hr-4:Hr-59|43]=Hr++;var Hr;Gg.encode=function(e,r,o){for(var s=null,a=[],i=0,n=0,c;r<o;){var u=e[r++];switch(n){case 0:a[i++]=dc[u>>2],c=(u&3)<<4,n=1;break;case 1:a[i++]=dc[c|u>>4],c=(u&15)<<2,n=2;break;case 2:a[i++]=dc[c|u>>6],a[i++]=dc[u&63],n=0;break}i>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,a)),i=0)}return n&&(a[i++]=dc[c],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 E6="invalid encoding";Gg.decode=function(e,r,o){for(var s=o,a=0,i,n=0;n<e.length;){var c=e.charCodeAt(n++);if(c===61&&a>1)break;if((c=S6[c])===void 0)throw Error(E6);switch(a){case 0:i=c,a=1;break;case 1:r[o++]=i<<2|(c&48)>>4,i=c,a=2;break;case 2:r[o++]=(i&15)<<4|(c&60)>>2,i=c,a=3;break;case 3:r[o++]=(i&3)<<6|c,a=0;break}}if(a===1)throw Error(E6);return o-s};Gg.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}});var A6=p((stt,v6)=>{"use strict";v6.exports=qg;function qg(){this._listeners={}}qg.prototype.on=function(e,r,o){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:r,ctx:o||this}),this};qg.prototype.off=function(e,r){if(e===void 0)this._listeners={};else if(r===void 0)this._listeners[e]=[];else for(var o=this._listeners[e],s=0;s<o.length;)o[s].fn===r?o.splice(s,1):++s;return this};qg.prototype.emit=function(e){var r=this._listeners[e];if(r){for(var o=[],s=1;s<arguments.length;)o.push(arguments[s++]);for(s=0;s<r.length;)r[s].fn.apply(r[s++].ctx,o)}return this}});var M6=p((att,N6)=>{"use strict";N6.exports=O6(O6);function O6(t){return typeof Float32Array<"u"?(function(){var e=new Float32Array([-0]),r=new Uint8Array(e.buffer),o=r[3]===128;function s(c,u,l){e[0]=c,u[l]=r[0],u[l+1]=r[1],u[l+2]=r[2],u[l+3]=r[3]}function a(c,u,l){e[0]=c,u[l]=r[3],u[l+1]=r[2],u[l+2]=r[1],u[l+3]=r[0]}t.writeFloatLE=o?s:a,t.writeFloatBE=o?a:s;function i(c,u){return r[0]=c[u],r[1]=c[u+1],r[2]=c[u+2],r[3]=c[u+3],e[0]}function n(c,u){return r[3]=c[u],r[2]=c[u+1],r[1]=c[u+2],r[0]=c[u+3],e[0]}t.readFloatLE=o?i:n,t.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 c=Math.floor(Math.log(s)/Math.LN2),u=Math.round(s*Math.pow(2,-c)*8388608)&8388607;o((n<<31|c+127<<23|u)>>>0,a,i)}}t.writeFloatLE=e.bind(null,b6),t.writeFloatBE=e.bind(null,R6);function r(o,s,a){var i=o(s,a),n=(i>>31)*2+1,c=i>>>23&255,u=i&8388607;return c===255?u?NaN:n*(1/0):c===0?n*1401298464324817e-60*u:n*Math.pow(2,c-150)*(u+8388608)}t.readFloatLE=r.bind(null,P6),t.readFloatBE=r.bind(null,C6)})(),typeof Float64Array<"u"?(function(){var e=new Float64Array([-0]),r=new Uint8Array(e.buffer),o=r[7]===128;function s(c,u,l){e[0]=c,u[l]=r[0],u[l+1]=r[1],u[l+2]=r[2],u[l+3]=r[3],u[l+4]=r[4],u[l+5]=r[5],u[l+6]=r[6],u[l+7]=r[7]}function a(c,u,l){e[0]=c,u[l]=r[7],u[l+1]=r[6],u[l+2]=r[5],u[l+3]=r[4],u[l+4]=r[3],u[l+5]=r[2],u[l+6]=r[1],u[l+7]=r[0]}t.writeDoubleLE=o?s:a,t.writeDoubleBE=o?a:s;function i(c,u){return r[0]=c[u],r[1]=c[u+1],r[2]=c[u+2],r[3]=c[u+3],r[4]=c[u+4],r[5]=c[u+5],r[6]=c[u+6],r[7]=c[u+7],e[0]}function n(c,u){return r[7]=c[u],r[6]=c[u+1],r[5]=c[u+2],r[4]=c[u+3],r[3]=c[u+4],r[2]=c[u+5],r[1]=c[u+6],r[0]=c[u+7],e[0]}t.readDoubleLE=o?i:n,t.readDoubleBE=o?n:i})():(function(){function e(o,s,a,i,n,c){var u=i<0?1:0;if(u&&(i=-i),i===0)o(0,n,c+s),o(1/i>0?0:2147483648,n,c+a);else if(isNaN(i))o(0,n,c+s),o(2146959360,n,c+a);else if(i>17976931348623157e292)o(0,n,c+s),o((u<<31|2146435072)>>>0,n,c+a);else{var l;if(i<22250738585072014e-324)l=i/5e-324,o(l>>>0,n,c+s),o((u<<31|l/4294967296)>>>0,n,c+a);else{var d=Math.floor(Math.log(i)/Math.LN2);d===1024&&(d=1023),l=i*Math.pow(2,-d),o(l*4503599627370496>>>0,n,c+s),o((u<<31|d+1023<<20|l*1048576&1048575)>>>0,n,c+a)}}}t.writeDoubleLE=e.bind(null,b6,0,4),t.writeDoubleBE=e.bind(null,R6,4,0);function r(o,s,a,i,n){var c=o(i,n+s),u=o(i,n+a),l=(u>>31)*2+1,d=u>>>20&2047,h=4294967296*(u&1048575)+c;return d===2047?h?NaN:l*(1/0):d===0?l*5e-324*h:l*Math.pow(2,d-1075)*(h+4503599627370496)}t.readDoubleLE=r.bind(null,P6,0,4),t.readDoubleBE=r.bind(null,C6,4,0)})(),t}function b6(t,e,r){e[r]=t&255,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}function R6(t,e,r){e[r]=t>>>24,e[r+1]=t>>>16&255,e[r+2]=t>>>8&255,e[r+3]=t&255}function P6(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function C6(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}});var xC=p((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(t){}return null}});var x6=p(I6=>{"use strict";var wC=I6;wC.length=function(e){for(var r=0,o=0,s=0;s<e.length;++s)o=e.charCodeAt(s),o<128?r+=1:o<2048?r+=2:(o&64512)===55296&&(e.charCodeAt(s+1)&64512)===56320?(++s,r+=4):r+=3;return r};wC.read=function(e,r,o){var s=o-r;if(s<1)return"";for(var a=null,i=[],n=0,c;r<o;)c=e[r++],c<128?i[n++]=c:c>191&&c<224?i[n++]=(c&31)<<6|e[r++]&63:c>239&&c<365?(c=((c&7)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,i[n++]=55296+(c>>10),i[n++]=56320+(c&1023)):i[n++]=(c&15)<<12|(e[r++]&63)<<6|e[r++]&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))};wC.write=function(e,r,o){for(var s=o,a,i,n=0;n<e.length;++n)a=e.charCodeAt(n),a<128?r[o++]=a:a<2048?(r[o++]=a>>6|192,r[o++]=a&63|128):(a&64512)===55296&&((i=e.charCodeAt(n+1))&64512)===56320?(a=65536+((a&1023)<<10)+(i&1023),++n,r[o++]=a>>18|240,r[o++]=a>>12&63|128,r[o++]=a>>6&63|128,r[o++]=a&63|128):(r[o++]=a>>12|224,r[o++]=a>>6&63|128,r[o++]=a&63|128);return o-s}});var L6=p((utt,w6)=>{"use strict";w6.exports=MNe;function MNe(t,e,r){var o=r||8192,s=o>>>1,a=null,i=o;return function(c){if(c<1||c>s)return t(c);i+c>o&&(a=t(o),i=0);var u=e.call(a,i,i+=c);return i&7&&(i=(i|7)+1),u}}});var U6=p((ltt,D6)=>{"use strict";D6.exports=nt;var Tl=Bn();function nt(t,e){this.lo=t>>>0,this.hi=e>>>0}var ls=nt.zero=new nt(0,0);ls.toNumber=function(){return 0};ls.zzEncode=ls.zzDecode=function(){return this};ls.length=function(){return 1};var INe=nt.zeroHash="\0\0\0\0\0\0\0\0";nt.fromNumber=function(e){if(e===0)return ls;var r=e<0;r&&(e=-e);var o=e>>>0,s=(e-o)/4294967296>>>0;return r&&(s=~s>>>0,o=~o>>>0,++o>4294967295&&(o=0,++s>4294967295&&(s=0))),new nt(o,s)};nt.from=function(e){if(typeof e=="number")return nt.fromNumber(e);if(Tl.isString(e))if(Tl.Long)e=Tl.Long.fromString(e);else return nt.fromNumber(parseInt(e,10));return e.low||e.high?new nt(e.low>>>0,e.high>>>0):ls};nt.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var r=~this.lo+1>>>0,o=~this.hi>>>0;return r||(o=o+1>>>0),-(r+o*4294967296)}return this.lo+this.hi*4294967296};nt.prototype.toLong=function(e){return Tl.Long?new Tl.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var Qi=String.prototype.charCodeAt;nt.fromHash=function(e){return e===INe?ls:new nt((Qi.call(e,0)|Qi.call(e,1)<<8|Qi.call(e,2)<<16|Qi.call(e,3)<<24)>>>0,(Qi.call(e,4)|Qi.call(e,5)<<8|Qi.call(e,6)<<16|Qi.call(e,7)<<24)>>>0)};nt.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)};nt.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};nt.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};nt.prototype.length=function(){var e=this.lo,r=(this.lo>>>28|this.hi<<4)>>>0,o=this.hi>>>24;return o===0?r===0?e<16384?e<128?1:2:e<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:o<128?9:10}});var Bn=p(LC=>{"use strict";var X=LC;X.asPromise=IC();X.base64=y6();X.EventEmitter=A6();X.float=M6();X.inquire=xC();X.utf8=x6();X.pool=L6();X.LongBits=U6();X.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);X.global=X.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||LC;X.emptyArray=Object.freeze?Object.freeze([]):[];X.emptyObject=Object.freeze?Object.freeze({}):{};X.isInteger=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};X.isString=function(e){return typeof e=="string"||e instanceof String};X.isObject=function(e){return e&&typeof e=="object"};X.isset=X.isSet=function(e,r){var o=e[r];return o!=null&&e.hasOwnProperty(r)?typeof o!="object"||(Array.isArray(o)?o.length:Object.keys(o).length)>0:!1};X.Buffer=(function(){try{var t=X.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch{return null}})();X._Buffer_from=null;X._Buffer_allocUnsafe=null;X.newBuffer=function(e){return typeof e=="number"?X.Buffer?X._Buffer_allocUnsafe(e):new X.Array(e):X.Buffer?X._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)};X.Array=typeof Uint8Array<"u"?Uint8Array:Array;X.Long=X.global.dcodeIO&&X.global.dcodeIO.Long||X.global.Long||X.inquire("long");X.key2Re=/^true|false|0|1$/;X.key32Re=/^-?(?:0|[1-9][0-9]*)$/;X.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;X.longToHash=function(e){return e?X.LongBits.from(e).toHash():X.LongBits.zeroHash};X.longFromHash=function(e,r){var o=X.LongBits.fromHash(e);return X.Long?X.Long.fromBits(o.lo,o.hi,r):o.toNumber(!!r)};function k6(t,e,r){for(var o=Object.keys(e),s=0;s<o.length;++s)(t[o[s]]===void 0||!r)&&(t[o[s]]=e[o[s]]);return t}X.merge=k6;X.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)};function B6(t){function e(r,o){if(!(this instanceof e))return new e(r,o);Object.defineProperty(this,"message",{get:function(){return r}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:new Error().stack||""}),o&&k6(this,o)}return e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),e}X.newError=B6;X.ProtocolError=B6("ProtocolError");X.oneOfGetter=function(e){for(var r={},o=0;o<e.length;++o)r[e[o]]=1;return function(){for(var s=Object.keys(this),a=s.length-1;a>-1;--a)if(r[s[a]]===1&&this[s[a]]!==void 0&&this[s[a]]!==null)return s[a]}};X.oneOfSetter=function(e){return function(r){for(var o=0;o<e.length;++o)e[o]!==r&&delete this[e[o]]}};X.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};X._configure=function(){var t=X.Buffer;if(!t){X._Buffer_from=X._Buffer_allocUnsafe=null;return}X._Buffer_from=t.from!==Uint8Array.from&&t.from||function(r,o){return new t(r,o)},X._Buffer_allocUnsafe=t.allocUnsafe||function(r){return new t(r)}}});var Hg=p((ptt,q6)=>{"use strict";q6.exports=de;var Or=Bn(),DC,jg=Or.LongBits,F6=Or.base64,V6=Or.utf8;function yl(t,e,r){this.fn=t,this.len=e,this.next=void 0,this.val=r}function kC(){}function xNe(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function de(){this.len=0,this.head=new yl(kC,0,0),this.tail=this.head,this.states=null}var G6=function(){return Or.Buffer?function(){return(de.create=function(){return new DC})()}:function(){return new de}};de.create=G6();de.alloc=function(e){return new Or.Array(e)};Or.Array!==Array&&(de.alloc=Or.pool(de.alloc,Or.Array.prototype.subarray));de.prototype._push=function(e,r,o){return this.tail=this.tail.next=new yl(e,r,o),this.len+=r,this};function BC(t,e,r){e[r]=t&255}function wNe(t,e,r){for(;t>127;)e[r++]=t&127|128,t>>>=7;e[r]=t}function FC(t,e){this.len=t,this.next=void 0,this.val=e}FC.prototype=Object.create(yl.prototype);FC.prototype.fn=wNe;de.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new FC((e=e>>>0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this};de.prototype.int32=function(e){return e<0?this._push(VC,10,jg.fromNumber(e)):this.uint32(e)};de.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)};function VC(t,e,r){for(;t.hi;)e[r++]=t.lo&127|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=t.lo&127|128,t.lo=t.lo>>>7;e[r++]=t.lo}de.prototype.uint64=function(e){var r=jg.from(e);return this._push(VC,r.length(),r)};de.prototype.int64=de.prototype.uint64;de.prototype.sint64=function(e){var r=jg.from(e).zzEncode();return this._push(VC,r.length(),r)};de.prototype.bool=function(e){return this._push(BC,1,e?1:0)};function UC(t,e,r){e[r]=t&255,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}de.prototype.fixed32=function(e){return this._push(UC,4,e>>>0)};de.prototype.sfixed32=de.prototype.fixed32;de.prototype.fixed64=function(e){var r=jg.from(e);return this._push(UC,4,r.lo)._push(UC,4,r.hi)};de.prototype.sfixed64=de.prototype.fixed64;de.prototype.float=function(e){return this._push(Or.float.writeFloatLE,4,e)};de.prototype.double=function(e){return this._push(Or.float.writeDoubleLE,8,e)};var LNe=Or.Array.prototype.set?function(e,r,o){r.set(e,o)}:function(e,r,o){for(var s=0;s<e.length;++s)r[o+s]=e[s]};de.prototype.bytes=function(e){var r=e.length>>>0;if(!r)return this._push(BC,1,0);if(Or.isString(e)){var o=de.alloc(r=F6.length(e));F6.decode(e,o,0),e=o}return this.uint32(r)._push(LNe,r,e)};de.prototype.string=function(e){var r=V6.length(e);return r?this.uint32(r)._push(V6.write,r,e):this._push(BC,1,0)};de.prototype.fork=function(){return this.states=new xNe(this),this.head=this.tail=new yl(kC,0,0),this.len=0,this};de.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 yl(kC,0,0),this.len=0),this};de.prototype.ldelim=function(){var e=this.head,r=this.tail,o=this.len;return this.reset().uint32(o),o&&(this.tail.next=e.next,this.tail=r,this.len+=o),this};de.prototype.finish=function(){for(var e=this.head.next,r=this.constructor.alloc(this.len),o=0;e;)e.fn(e.val,r,o),o+=e.len,e=e.next;return r};de._configure=function(t){DC=t,de.create=G6(),DC._configure()}});var z6=p((ftt,H6)=>{"use strict";H6.exports=Fn;var j6=Hg();(Fn.prototype=Object.create(j6.prototype)).constructor=Fn;var Zi=Bn();function Fn(){j6.call(this)}Fn._configure=function(){Fn.alloc=Zi._Buffer_allocUnsafe,Fn.writeBytesBuffer=Zi.Buffer&&Zi.Buffer.prototype instanceof Uint8Array&&Zi.Buffer.prototype.set.name==="set"?function(e,r,o){r.set(e,o)}:function(e,r,o){if(e.copy)e.copy(r,o,0,e.length);else for(var s=0;s<e.length;)r[o++]=e[s++]}};Fn.prototype.bytes=function(e){Zi.isString(e)&&(e=Zi._Buffer_from(e,"base64"));var r=e.length>>>0;return this.uint32(r),r&&this._push(Fn.writeBytesBuffer,r,e),this};function DNe(t,e,r){t.length<40?Zi.utf8.write(t,e,r):e.utf8Write?e.utf8Write(t,r):e.write(t,r)}Fn.prototype.string=function(e){var r=Zi.Buffer.byteLength(e);return this.uint32(r),r&&this._push(DNe,r,e),this};Fn._configure()});var $g=p((htt,X6)=>{"use strict";X6.exports=Fe;var zr=Bn(),qC,W6=zr.LongBits,UNe=zr.utf8;function $r(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function Fe(t){this.buf=t,this.pos=0,this.len=t.length}var $6=typeof Uint8Array<"u"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new Fe(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new Fe(e);throw Error("illegal buffer")},K6=function(){return zr.Buffer?function(r){return(Fe.create=function(s){return zr.Buffer.isBuffer(s)?new qC(s):$6(s)})(r)}:$6};Fe.create=K6();Fe.prototype._slice=zr.Array.prototype.subarray||zr.Array.prototype.slice;Fe.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,$r(this,10);return e}})();Fe.prototype.int32=function(){return this.uint32()|0};Fe.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(e&1)|0};function GC(){var t=new W6(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(t.lo=(t.lo|(this.buf[this.pos]&127)<<e*7)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(this.buf[this.pos]&127)<<28)>>>0,t.hi=(t.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return t;e=0}else{for(;e<3;++e){if(this.pos>=this.len)throw $r(this);if(t.lo=(t.lo|(this.buf[this.pos]&127)<<e*7)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(this.buf[this.pos++]&127)<<e*7)>>>0,t}if(this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(this.buf[this.pos]&127)<<e*7+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw $r(this);if(t.hi=(t.hi|(this.buf[this.pos]&127)<<e*7+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}Fe.prototype.bool=function(){return this.uint32()!==0};function zg(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}Fe.prototype.fixed32=function(){if(this.pos+4>this.len)throw $r(this,4);return zg(this.buf,this.pos+=4)};Fe.prototype.sfixed32=function(){if(this.pos+4>this.len)throw $r(this,4);return zg(this.buf,this.pos+=4)|0};function Y6(){if(this.pos+8>this.len)throw $r(this,8);return new W6(zg(this.buf,this.pos+=4),zg(this.buf,this.pos+=4))}Fe.prototype.float=function(){if(this.pos+4>this.len)throw $r(this,4);var e=zr.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e};Fe.prototype.double=function(){if(this.pos+8>this.len)throw $r(this,4);var e=zr.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e};Fe.prototype.bytes=function(){var e=this.uint32(),r=this.pos,o=this.pos+e;if(o>this.len)throw $r(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(r,o);if(r===o){var s=zr.Buffer;return s?s.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,r,o)};Fe.prototype.string=function(){var e=this.bytes();return UNe.read(e,0,e.length)};Fe.prototype.skip=function(e){if(typeof e=="number"){if(this.pos+e>this.len)throw $r(this,e);this.pos+=e}else do if(this.pos>=this.len)throw $r(this);while(this.buf[this.pos++]&128);return this};Fe.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(t=this.uint32()&7)!==4;)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this};Fe._configure=function(t){qC=t,Fe.create=K6(),qC._configure();var e=zr.Long?"toLong":"toNumber";zr.merge(Fe.prototype,{int64:function(){return GC.call(this)[e](!1)},uint64:function(){return GC.call(this)[e](!0)},sint64:function(){return GC.call(this).zzDecode()[e](!1)},fixed64:function(){return Y6.call(this)[e](!0)},sfixed64:function(){return Y6.call(this)[e](!1)}})}});var e4=p((mtt,Z6)=>{"use strict";Z6.exports=ds;var Q6=$g();(ds.prototype=Object.create(Q6.prototype)).constructor=ds;var J6=Bn();function ds(t){Q6.call(this,t)}ds._configure=function(){J6.Buffer&&(ds.prototype._slice=J6.Buffer.prototype.slice)};ds.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))};ds._configure()});var r4=p((_tt,t4)=>{"use strict";t4.exports=vl;var jC=Bn();(vl.prototype=Object.create(jC.EventEmitter.prototype)).constructor=vl;function vl(t,e,r){if(typeof t!="function")throw TypeError("rpcImpl must be a function");jC.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!e,this.responseDelimited=!!r}vl.prototype.rpcCall=function t(e,r,o,s,a){if(!s)throw TypeError("request must be specified");var i=this;if(!a)return jC.asPromise(t,i,e,r,o,s);if(!i.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return i.rpcImpl(e,r[i.requestDelimited?"encodeDelimited":"encode"](s).finish(),function(c,u){if(c)return i.emit("error",c,e),a(c);if(u===null){i.end(!0);return}if(!(u instanceof o))try{u=o[i.responseDelimited?"decodeDelimited":"decode"](u)}catch(l){return i.emit("error",l,e),a(l)}return i.emit("data",u,e),a(null,u)})}catch(n){i.emit("error",n,e),setTimeout(function(){a(n)},0);return}};vl.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var HC=p(n4=>{"use strict";var kNe=n4;kNe.Service=r4()});var zC=p((Ett,i4)=>{"use strict";i4.exports={}});var $C=p(s4=>{"use strict";var Kt=s4;Kt.build="minimal";Kt.Writer=Hg();Kt.BufferWriter=z6();Kt.Reader=$g();Kt.BufferReader=e4();Kt.util=Bn();Kt.rpc=HC();Kt.roots=zC();Kt.configure=o4;function o4(){Kt.util._configure(),Kt.Writer._configure(Kt.BufferWriter),Kt.Reader._configure(Kt.BufferReader)}o4()});var c4=p((Ttt,a4)=>{"use strict";a4.exports=$C()});var Yg=p((u4,l4)=>{"use strict";Object.defineProperty(u4,"__esModule",{value:!0});var J=c4(),T=J.Reader,ee=J.Writer,m=J.util,f=J.roots.default||(J.roots.default={});f.opentelemetry=(function(){var t={};return t.proto=(function(){var e={};return e.common=(function(){var r={};return r.v1=(function(){var o={};return o.AnyValue=(function(){function s(i){if(i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}s.prototype.stringValue=null,s.prototype.boolValue=null,s.prototype.intValue=null,s.prototype.doubleValue=null,s.prototype.arrayValue=null,s.prototype.kvlistValue=null,s.prototype.bytesValue=null;var a;return Object.defineProperty(s.prototype,"value",{get:m.oneOfGetter(a=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:m.oneOfSetter(a)}),s.create=function(n){return new s(n)},s.encode=function(n,c){return c||(c=ee.create()),n.stringValue!=null&&Object.hasOwnProperty.call(n,"stringValue")&&c.uint32(10).string(n.stringValue),n.boolValue!=null&&Object.hasOwnProperty.call(n,"boolValue")&&c.uint32(16).bool(n.boolValue),n.intValue!=null&&Object.hasOwnProperty.call(n,"intValue")&&c.uint32(24).int64(n.intValue),n.doubleValue!=null&&Object.hasOwnProperty.call(n,"doubleValue")&&c.uint32(33).double(n.doubleValue),n.arrayValue!=null&&Object.hasOwnProperty.call(n,"arrayValue")&&f.opentelemetry.proto.common.v1.ArrayValue.encode(n.arrayValue,c.uint32(42).fork()).ldelim(),n.kvlistValue!=null&&Object.hasOwnProperty.call(n,"kvlistValue")&&f.opentelemetry.proto.common.v1.KeyValueList.encode(n.kvlistValue,c.uint32(50).fork()).ldelim(),n.bytesValue!=null&&Object.hasOwnProperty.call(n,"bytesValue")&&c.uint32(58).bytes(n.bytesValue),c},s.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},s.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.common.v1.AnyValue;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 1:{d.stringValue=n.string();break}case 2:{d.boolValue=n.bool();break}case 3:{d.intValue=n.int64();break}case 4:{d.doubleValue=n.double();break}case 5:{d.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.decode(n,n.uint32());break}case 6:{d.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.decode(n,n.uint32());break}case 7:{d.bytesValue=n.bytes();break}default:n.skipType(h&7);break}}return d},s.decodeDelimited=function(n){return n instanceof T||(n=new T(n)),this.decode(n,n.uint32())},s.verify=function(n){if(typeof n!="object"||n===null)return"object expected";var c={};if(n.stringValue!=null&&n.hasOwnProperty("stringValue")&&(c.value=1,!m.isString(n.stringValue)))return"stringValue: string expected";if(n.boolValue!=null&&n.hasOwnProperty("boolValue")){if(c.value===1)return"value: multiple values";if(c.value=1,typeof n.boolValue!="boolean")return"boolValue: boolean expected"}if(n.intValue!=null&&n.hasOwnProperty("intValue")){if(c.value===1)return"value: multiple values";if(c.value=1,!m.isInteger(n.intValue)&&!(n.intValue&&m.isInteger(n.intValue.low)&&m.isInteger(n.intValue.high)))return"intValue: integer|Long expected"}if(n.doubleValue!=null&&n.hasOwnProperty("doubleValue")){if(c.value===1)return"value: multiple values";if(c.value=1,typeof n.doubleValue!="number")return"doubleValue: number expected"}if(n.arrayValue!=null&&n.hasOwnProperty("arrayValue")){if(c.value===1)return"value: multiple values";c.value=1;{var u=f.opentelemetry.proto.common.v1.ArrayValue.verify(n.arrayValue);if(u)return"arrayValue."+u}}if(n.kvlistValue!=null&&n.hasOwnProperty("kvlistValue")){if(c.value===1)return"value: multiple values";c.value=1;{var u=f.opentelemetry.proto.common.v1.KeyValueList.verify(n.kvlistValue);if(u)return"kvlistValue."+u}}if(n.bytesValue!=null&&n.hasOwnProperty("bytesValue")){if(c.value===1)return"value: multiple values";if(c.value=1,!(n.bytesValue&&typeof n.bytesValue.length=="number"||m.isString(n.bytesValue)))return"bytesValue: buffer expected"}return null},s.fromObject=function(n){if(n instanceof f.opentelemetry.proto.common.v1.AnyValue)return n;var c=new f.opentelemetry.proto.common.v1.AnyValue;if(n.stringValue!=null&&(c.stringValue=String(n.stringValue)),n.boolValue!=null&&(c.boolValue=!!n.boolValue),n.intValue!=null&&(m.Long?(c.intValue=m.Long.fromValue(n.intValue)).unsigned=!1:typeof n.intValue=="string"?c.intValue=parseInt(n.intValue,10):typeof n.intValue=="number"?c.intValue=n.intValue:typeof n.intValue=="object"&&(c.intValue=new m.LongBits(n.intValue.low>>>0,n.intValue.high>>>0).toNumber())),n.doubleValue!=null&&(c.doubleValue=Number(n.doubleValue)),n.arrayValue!=null){if(typeof n.arrayValue!="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");c.arrayValue=f.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");c.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.fromObject(n.kvlistValue)}return n.bytesValue!=null&&(typeof n.bytesValue=="string"?m.base64.decode(n.bytesValue,c.bytesValue=m.newBuffer(m.base64.length(n.bytesValue)),0):n.bytesValue.length>=0&&(c.bytesValue=n.bytesValue)),c},s.toObject=function(n,c){c||(c={});var u={};return n.stringValue!=null&&n.hasOwnProperty("stringValue")&&(u.stringValue=n.stringValue,c.oneofs&&(u.value="stringValue")),n.boolValue!=null&&n.hasOwnProperty("boolValue")&&(u.boolValue=n.boolValue,c.oneofs&&(u.value="boolValue")),n.intValue!=null&&n.hasOwnProperty("intValue")&&(typeof n.intValue=="number"?u.intValue=c.longs===String?String(n.intValue):n.intValue:u.intValue=c.longs===String?m.Long.prototype.toString.call(n.intValue):c.longs===Number?new m.LongBits(n.intValue.low>>>0,n.intValue.high>>>0).toNumber():n.intValue,c.oneofs&&(u.value="intValue")),n.doubleValue!=null&&n.hasOwnProperty("doubleValue")&&(u.doubleValue=c.json&&!isFinite(n.doubleValue)?String(n.doubleValue):n.doubleValue,c.oneofs&&(u.value="doubleValue")),n.arrayValue!=null&&n.hasOwnProperty("arrayValue")&&(u.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.toObject(n.arrayValue,c),c.oneofs&&(u.value="arrayValue")),n.kvlistValue!=null&&n.hasOwnProperty("kvlistValue")&&(u.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.toObject(n.kvlistValue,c),c.oneofs&&(u.value="kvlistValue")),n.bytesValue!=null&&n.hasOwnProperty("bytesValue")&&(u.bytesValue=c.bytes===String?m.base64.encode(n.bytesValue,0,n.bytesValue.length):c.bytes===Array?Array.prototype.slice.call(n.bytesValue):n.bytesValue,c.oneofs&&(u.value="bytesValue")),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.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<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.values=m.emptyArray,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.values!=null&&i.values.length)for(var c=0;c<i.values.length;++c)f.opentelemetry.proto.common.v1.AnyValue.encode(i.values[c],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.common.v1.ArrayValue;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.values&&l.values.length||(l.values=[]),l.values.push(f.opentelemetry.proto.common.v1.AnyValue.decode(i,i.uint32()));break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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<i.values.length;++n){var c=f.opentelemetry.proto.common.v1.AnyValue.verify(i.values[n]);if(c)return"values."+c}}return null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.common.v1.ArrayValue)return i;var n=new f.opentelemetry.proto.common.v1.ArrayValue;if(i.values){if(!Array.isArray(i.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");n.values=[];for(var c=0;c<i.values.length;++c){if(typeof i.values[c]!="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");n.values[c]=f.opentelemetry.proto.common.v1.AnyValue.fromObject(i.values[c])}}return n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.values=[]),i.values&&i.values.length){c.values=[];for(var u=0;u<i.values.length;++u)c.values[u]=f.opentelemetry.proto.common.v1.AnyValue.toObject(i.values[u],n)}return c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.common.v1.ArrayValue"},s})(),o.KeyValueList=(function(){function s(a){if(this.values=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.values=m.emptyArray,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.values!=null&&i.values.length)for(var c=0;c<i.values.length;++c)f.opentelemetry.proto.common.v1.KeyValue.encode(i.values[c],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.common.v1.KeyValueList;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.values&&l.values.length||(l.values=[]),l.values.push(f.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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<i.values.length;++n){var c=f.opentelemetry.proto.common.v1.KeyValue.verify(i.values[n]);if(c)return"values."+c}}return null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.common.v1.KeyValueList)return i;var n=new f.opentelemetry.proto.common.v1.KeyValueList;if(i.values){if(!Array.isArray(i.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");n.values=[];for(var c=0;c<i.values.length;++c){if(typeof i.values[c]!="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");n.values[c]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(i.values[c])}}return n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.values=[]),i.values&&i.values.length){c.values=[];for(var u=0;u<i.values.length;++u)c.values[u]=f.opentelemetry.proto.common.v1.KeyValue.toObject(i.values[u],n)}return c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.common.v1.KeyValueList"},s})(),o.KeyValue=(function(){function s(a){if(a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.key=null,s.prototype.value=null,s.create=function(i){return new s(i)},s.encode=function(i,n){return n||(n=ee.create()),i.key!=null&&Object.hasOwnProperty.call(i,"key")&&n.uint32(10).string(i.key),i.value!=null&&Object.hasOwnProperty.call(i,"value")&&f.opentelemetry.proto.common.v1.AnyValue.encode(i.value,n.uint32(18).fork()).ldelim(),n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.common.v1.KeyValue;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.key=i.string();break}case 2:{l.value=f.opentelemetry.proto.common.v1.AnyValue.decode(i,i.uint32());break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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")&&!m.isString(i.key))return"key: string expected";if(i.value!=null&&i.hasOwnProperty("value")){var n=f.opentelemetry.proto.common.v1.AnyValue.verify(i.value);if(n)return"value."+n}return null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.common.v1.KeyValue)return i;var n=new f.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=f.opentelemetry.proto.common.v1.AnyValue.fromObject(i.value)}return n},s.toObject=function(i,n){n||(n={});var c={};return n.defaults&&(c.key="",c.value=null),i.key!=null&&i.hasOwnProperty("key")&&(c.key=i.key),i.value!=null&&i.hasOwnProperty("value")&&(c.value=f.opentelemetry.proto.common.v1.AnyValue.toObject(i.value,n)),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.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<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.name=null,s.prototype.version=null,s.prototype.attributes=m.emptyArray,s.prototype.droppedAttributesCount=null,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.name!=null&&Object.hasOwnProperty.call(i,"name")&&n.uint32(10).string(i.name),i.version!=null&&Object.hasOwnProperty.call(i,"version")&&n.uint32(18).string(i.version),i.attributes!=null&&i.attributes.length)for(var c=0;c<i.attributes.length;++c)f.opentelemetry.proto.common.v1.KeyValue.encode(i.attributes[c],n.uint32(26).fork()).ldelim();return i.droppedAttributesCount!=null&&Object.hasOwnProperty.call(i,"droppedAttributesCount")&&n.uint32(32).uint32(i.droppedAttributesCount),n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.common.v1.InstrumentationScope;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.name=i.string();break}case 2:{l.version=i.string();break}case 3:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break}case 4:{l.droppedAttributesCount=i.uint32();break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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")&&!m.isString(i.name))return"name: string expected";if(i.version!=null&&i.hasOwnProperty("version")&&!m.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<i.attributes.length;++n){var c=f.opentelemetry.proto.common.v1.KeyValue.verify(i.attributes[n]);if(c)return"attributes."+c}}return i.droppedAttributesCount!=null&&i.hasOwnProperty("droppedAttributesCount")&&!m.isInteger(i.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.common.v1.InstrumentationScope)return i;var n=new f.opentelemetry.proto.common.v1.InstrumentationScope;if(i.name!=null&&(n.name=String(i.name)),i.version!=null&&(n.version=String(i.version)),i.attributes){if(!Array.isArray(i.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");n.attributes=[];for(var c=0;c<i.attributes.length;++c){if(typeof i.attributes[c]!="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");n.attributes[c]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(i.attributes[c])}}return i.droppedAttributesCount!=null&&(n.droppedAttributesCount=i.droppedAttributesCount>>>0),n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.attributes=[]),n.defaults&&(c.name="",c.version="",c.droppedAttributesCount=0),i.name!=null&&i.hasOwnProperty("name")&&(c.name=i.name),i.version!=null&&i.hasOwnProperty("version")&&(c.version=i.version),i.attributes&&i.attributes.length){c.attributes=[];for(var u=0;u<i.attributes.length;++u)c.attributes[u]=f.opentelemetry.proto.common.v1.KeyValue.toObject(i.attributes[u],n)}return i.droppedAttributesCount!=null&&i.hasOwnProperty("droppedAttributesCount")&&(c.droppedAttributesCount=i.droppedAttributesCount),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.common.v1.InstrumentationScope"},s})(),o.EntityRef=(function(){function s(a){if(this.idKeys=[],this.descriptionKeys=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.schemaUrl=null,s.prototype.type=null,s.prototype.idKeys=m.emptyArray,s.prototype.descriptionKeys=m.emptyArray,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.schemaUrl!=null&&Object.hasOwnProperty.call(i,"schemaUrl")&&n.uint32(10).string(i.schemaUrl),i.type!=null&&Object.hasOwnProperty.call(i,"type")&&n.uint32(18).string(i.type),i.idKeys!=null&&i.idKeys.length)for(var c=0;c<i.idKeys.length;++c)n.uint32(26).string(i.idKeys[c]);if(i.descriptionKeys!=null&&i.descriptionKeys.length)for(var c=0;c<i.descriptionKeys.length;++c)n.uint32(34).string(i.descriptionKeys[c]);return n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.common.v1.EntityRef;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.schemaUrl=i.string();break}case 2:{l.type=i.string();break}case 3:{l.idKeys&&l.idKeys.length||(l.idKeys=[]),l.idKeys.push(i.string());break}case 4:{l.descriptionKeys&&l.descriptionKeys.length||(l.descriptionKeys=[]),l.descriptionKeys.push(i.string());break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(i)),this.decode(i,i.uint32())},s.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.schemaUrl!=null&&i.hasOwnProperty("schemaUrl")&&!m.isString(i.schemaUrl))return"schemaUrl: string expected";if(i.type!=null&&i.hasOwnProperty("type")&&!m.isString(i.type))return"type: string expected";if(i.idKeys!=null&&i.hasOwnProperty("idKeys")){if(!Array.isArray(i.idKeys))return"idKeys: array expected";for(var n=0;n<i.idKeys.length;++n)if(!m.isString(i.idKeys[n]))return"idKeys: string[] expected"}if(i.descriptionKeys!=null&&i.hasOwnProperty("descriptionKeys")){if(!Array.isArray(i.descriptionKeys))return"descriptionKeys: array expected";for(var n=0;n<i.descriptionKeys.length;++n)if(!m.isString(i.descriptionKeys[n]))return"descriptionKeys: string[] expected"}return null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.common.v1.EntityRef)return i;var n=new f.opentelemetry.proto.common.v1.EntityRef;if(i.schemaUrl!=null&&(n.schemaUrl=String(i.schemaUrl)),i.type!=null&&(n.type=String(i.type)),i.idKeys){if(!Array.isArray(i.idKeys))throw TypeError(".opentelemetry.proto.common.v1.EntityRef.idKeys: array expected");n.idKeys=[];for(var c=0;c<i.idKeys.length;++c)n.idKeys[c]=String(i.idKeys[c])}if(i.descriptionKeys){if(!Array.isArray(i.descriptionKeys))throw TypeError(".opentelemetry.proto.common.v1.EntityRef.descriptionKeys: array expected");n.descriptionKeys=[];for(var c=0;c<i.descriptionKeys.length;++c)n.descriptionKeys[c]=String(i.descriptionKeys[c])}return n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.idKeys=[],c.descriptionKeys=[]),n.defaults&&(c.schemaUrl="",c.type=""),i.schemaUrl!=null&&i.hasOwnProperty("schemaUrl")&&(c.schemaUrl=i.schemaUrl),i.type!=null&&i.hasOwnProperty("type")&&(c.type=i.type),i.idKeys&&i.idKeys.length){c.idKeys=[];for(var u=0;u<i.idKeys.length;++u)c.idKeys[u]=i.idKeys[u]}if(i.descriptionKeys&&i.descriptionKeys.length){c.descriptionKeys=[];for(var u=0;u<i.descriptionKeys.length;++u)c.descriptionKeys[u]=i.descriptionKeys[u]}return c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.common.v1.EntityRef"},s})(),o})(),r})(),e.resource=(function(){var r={};return r.v1=(function(){var o={};return o.Resource=(function(){function s(a){if(this.attributes=[],this.entityRefs=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.attributes=m.emptyArray,s.prototype.droppedAttributesCount=null,s.prototype.entityRefs=m.emptyArray,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.attributes!=null&&i.attributes.length)for(var c=0;c<i.attributes.length;++c)f.opentelemetry.proto.common.v1.KeyValue.encode(i.attributes[c],n.uint32(10).fork()).ldelim();if(i.droppedAttributesCount!=null&&Object.hasOwnProperty.call(i,"droppedAttributesCount")&&n.uint32(16).uint32(i.droppedAttributesCount),i.entityRefs!=null&&i.entityRefs.length)for(var c=0;c<i.entityRefs.length;++c)f.opentelemetry.proto.common.v1.EntityRef.encode(i.entityRefs[c],n.uint32(26).fork()).ldelim();return n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.resource.v1.Resource;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break}case 2:{l.droppedAttributesCount=i.uint32();break}case 3:{l.entityRefs&&l.entityRefs.length||(l.entityRefs=[]),l.entityRefs.push(f.opentelemetry.proto.common.v1.EntityRef.decode(i,i.uint32()));break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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<i.attributes.length;++n){var c=f.opentelemetry.proto.common.v1.KeyValue.verify(i.attributes[n]);if(c)return"attributes."+c}}if(i.droppedAttributesCount!=null&&i.hasOwnProperty("droppedAttributesCount")&&!m.isInteger(i.droppedAttributesCount))return"droppedAttributesCount: integer expected";if(i.entityRefs!=null&&i.hasOwnProperty("entityRefs")){if(!Array.isArray(i.entityRefs))return"entityRefs: array expected";for(var n=0;n<i.entityRefs.length;++n){var c=f.opentelemetry.proto.common.v1.EntityRef.verify(i.entityRefs[n]);if(c)return"entityRefs."+c}}return null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.resource.v1.Resource)return i;var n=new f.opentelemetry.proto.resource.v1.Resource;if(i.attributes){if(!Array.isArray(i.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");n.attributes=[];for(var c=0;c<i.attributes.length;++c){if(typeof i.attributes[c]!="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");n.attributes[c]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(i.attributes[c])}}if(i.droppedAttributesCount!=null&&(n.droppedAttributesCount=i.droppedAttributesCount>>>0),i.entityRefs){if(!Array.isArray(i.entityRefs))throw TypeError(".opentelemetry.proto.resource.v1.Resource.entityRefs: array expected");n.entityRefs=[];for(var c=0;c<i.entityRefs.length;++c){if(typeof i.entityRefs[c]!="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.entityRefs: object expected");n.entityRefs[c]=f.opentelemetry.proto.common.v1.EntityRef.fromObject(i.entityRefs[c])}}return n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.attributes=[],c.entityRefs=[]),n.defaults&&(c.droppedAttributesCount=0),i.attributes&&i.attributes.length){c.attributes=[];for(var u=0;u<i.attributes.length;++u)c.attributes[u]=f.opentelemetry.proto.common.v1.KeyValue.toObject(i.attributes[u],n)}if(i.droppedAttributesCount!=null&&i.hasOwnProperty("droppedAttributesCount")&&(c.droppedAttributesCount=i.droppedAttributesCount),i.entityRefs&&i.entityRefs.length){c.entityRefs=[];for(var u=0;u<i.entityRefs.length;++u)c.entityRefs[u]=f.opentelemetry.proto.common.v1.EntityRef.toObject(i.entityRefs[u],n)}return c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.resource.v1.Resource"},s})(),o})(),r})(),e.trace=(function(){var r={};return r.v1=(function(){var o={};return o.TracesData=(function(){function s(a){if(this.resourceSpans=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.resourceSpans=m.emptyArray,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.resourceSpans!=null&&i.resourceSpans.length)for(var c=0;c<i.resourceSpans.length;++c)f.opentelemetry.proto.trace.v1.ResourceSpans.encode(i.resourceSpans[c],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.trace.v1.TracesData;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.resourceSpans&&l.resourceSpans.length||(l.resourceSpans=[]),l.resourceSpans.push(f.opentelemetry.proto.trace.v1.ResourceSpans.decode(i,i.uint32()));break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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<i.resourceSpans.length;++n){var c=f.opentelemetry.proto.trace.v1.ResourceSpans.verify(i.resourceSpans[n]);if(c)return"resourceSpans."+c}}return null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.trace.v1.TracesData)return i;var n=new f.opentelemetry.proto.trace.v1.TracesData;if(i.resourceSpans){if(!Array.isArray(i.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");n.resourceSpans=[];for(var c=0;c<i.resourceSpans.length;++c){if(typeof i.resourceSpans[c]!="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");n.resourceSpans[c]=f.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(i.resourceSpans[c])}}return n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.resourceSpans=[]),i.resourceSpans&&i.resourceSpans.length){c.resourceSpans=[];for(var u=0;u<i.resourceSpans.length;++u)c.resourceSpans[u]=f.opentelemetry.proto.trace.v1.ResourceSpans.toObject(i.resourceSpans[u],n)}return c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.trace.v1.TracesData"},s})(),o.ResourceSpans=(function(){function s(a){if(this.scopeSpans=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.resource=null,s.prototype.scopeSpans=m.emptyArray,s.prototype.schemaUrl=null,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.resource!=null&&Object.hasOwnProperty.call(i,"resource")&&f.opentelemetry.proto.resource.v1.Resource.encode(i.resource,n.uint32(10).fork()).ldelim(),i.scopeSpans!=null&&i.scopeSpans.length)for(var c=0;c<i.scopeSpans.length;++c)f.opentelemetry.proto.trace.v1.ScopeSpans.encode(i.scopeSpans[c],n.uint32(18).fork()).ldelim();return i.schemaUrl!=null&&Object.hasOwnProperty.call(i,"schemaUrl")&&n.uint32(26).string(i.schemaUrl),n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.trace.v1.ResourceSpans;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.resource=f.opentelemetry.proto.resource.v1.Resource.decode(i,i.uint32());break}case 2:{l.scopeSpans&&l.scopeSpans.length||(l.scopeSpans=[]),l.scopeSpans.push(f.opentelemetry.proto.trace.v1.ScopeSpans.decode(i,i.uint32()));break}case 3:{l.schemaUrl=i.string();break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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=f.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 c=0;c<i.scopeSpans.length;++c){var n=f.opentelemetry.proto.trace.v1.ScopeSpans.verify(i.scopeSpans[c]);if(n)return"scopeSpans."+n}}return i.schemaUrl!=null&&i.hasOwnProperty("schemaUrl")&&!m.isString(i.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.trace.v1.ResourceSpans)return i;var n=new f.opentelemetry.proto.trace.v1.ResourceSpans;if(i.resource!=null){if(typeof i.resource!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");n.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(i.resource)}if(i.scopeSpans){if(!Array.isArray(i.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");n.scopeSpans=[];for(var c=0;c<i.scopeSpans.length;++c){if(typeof i.scopeSpans[c]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");n.scopeSpans[c]=f.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(i.scopeSpans[c])}}return i.schemaUrl!=null&&(n.schemaUrl=String(i.schemaUrl)),n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.scopeSpans=[]),n.defaults&&(c.resource=null,c.schemaUrl=""),i.resource!=null&&i.hasOwnProperty("resource")&&(c.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(i.resource,n)),i.scopeSpans&&i.scopeSpans.length){c.scopeSpans=[];for(var u=0;u<i.scopeSpans.length;++u)c.scopeSpans[u]=f.opentelemetry.proto.trace.v1.ScopeSpans.toObject(i.scopeSpans[u],n)}return i.schemaUrl!=null&&i.hasOwnProperty("schemaUrl")&&(c.schemaUrl=i.schemaUrl),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.trace.v1.ResourceSpans"},s})(),o.ScopeSpans=(function(){function s(a){if(this.spans=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.scope=null,s.prototype.spans=m.emptyArray,s.prototype.schemaUrl=null,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.scope!=null&&Object.hasOwnProperty.call(i,"scope")&&f.opentelemetry.proto.common.v1.InstrumentationScope.encode(i.scope,n.uint32(10).fork()).ldelim(),i.spans!=null&&i.spans.length)for(var c=0;c<i.spans.length;++c)f.opentelemetry.proto.trace.v1.Span.encode(i.spans[c],n.uint32(18).fork()).ldelim();return i.schemaUrl!=null&&Object.hasOwnProperty.call(i,"schemaUrl")&&n.uint32(26).string(i.schemaUrl),n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.trace.v1.ScopeSpans;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(i,i.uint32());break}case 2:{l.spans&&l.spans.length||(l.spans=[]),l.spans.push(f.opentelemetry.proto.trace.v1.Span.decode(i,i.uint32()));break}case 3:{l.schemaUrl=i.string();break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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=f.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 c=0;c<i.spans.length;++c){var n=f.opentelemetry.proto.trace.v1.Span.verify(i.spans[c]);if(n)return"spans."+n}}return i.schemaUrl!=null&&i.hasOwnProperty("schemaUrl")&&!m.isString(i.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.trace.v1.ScopeSpans)return i;var n=new f.opentelemetry.proto.trace.v1.ScopeSpans;if(i.scope!=null){if(typeof i.scope!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");n.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(i.scope)}if(i.spans){if(!Array.isArray(i.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");n.spans=[];for(var c=0;c<i.spans.length;++c){if(typeof i.spans[c]!="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");n.spans[c]=f.opentelemetry.proto.trace.v1.Span.fromObject(i.spans[c])}}return i.schemaUrl!=null&&(n.schemaUrl=String(i.schemaUrl)),n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.spans=[]),n.defaults&&(c.scope=null,c.schemaUrl=""),i.scope!=null&&i.hasOwnProperty("scope")&&(c.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(i.scope,n)),i.spans&&i.spans.length){c.spans=[];for(var u=0;u<i.spans.length;++u)c.spans[u]=f.opentelemetry.proto.trace.v1.Span.toObject(i.spans[u],n)}return i.schemaUrl!=null&&i.hasOwnProperty("schemaUrl")&&(c.schemaUrl=i.schemaUrl),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.trace.v1.ScopeSpans"},s})(),o.Span=(function(){function s(a){if(this.attributes=[],this.events=[],this.links=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.traceId=null,s.prototype.spanId=null,s.prototype.traceState=null,s.prototype.parentSpanId=null,s.prototype.flags=null,s.prototype.name=null,s.prototype.kind=null,s.prototype.startTimeUnixNano=null,s.prototype.endTimeUnixNano=null,s.prototype.attributes=m.emptyArray,s.prototype.droppedAttributesCount=null,s.prototype.events=m.emptyArray,s.prototype.droppedEventsCount=null,s.prototype.links=m.emptyArray,s.prototype.droppedLinksCount=null,s.prototype.status=null,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.traceId!=null&&Object.hasOwnProperty.call(i,"traceId")&&n.uint32(10).bytes(i.traceId),i.spanId!=null&&Object.hasOwnProperty.call(i,"spanId")&&n.uint32(18).bytes(i.spanId),i.traceState!=null&&Object.hasOwnProperty.call(i,"traceState")&&n.uint32(26).string(i.traceState),i.parentSpanId!=null&&Object.hasOwnProperty.call(i,"parentSpanId")&&n.uint32(34).bytes(i.parentSpanId),i.name!=null&&Object.hasOwnProperty.call(i,"name")&&n.uint32(42).string(i.name),i.kind!=null&&Object.hasOwnProperty.call(i,"kind")&&n.uint32(48).int32(i.kind),i.startTimeUnixNano!=null&&Object.hasOwnProperty.call(i,"startTimeUnixNano")&&n.uint32(57).fixed64(i.startTimeUnixNano),i.endTimeUnixNano!=null&&Object.hasOwnProperty.call(i,"endTimeUnixNano")&&n.uint32(65).fixed64(i.endTimeUnixNano),i.attributes!=null&&i.attributes.length)for(var c=0;c<i.attributes.length;++c)f.opentelemetry.proto.common.v1.KeyValue.encode(i.attributes[c],n.uint32(74).fork()).ldelim();if(i.droppedAttributesCount!=null&&Object.hasOwnProperty.call(i,"droppedAttributesCount")&&n.uint32(80).uint32(i.droppedAttributesCount),i.events!=null&&i.events.length)for(var c=0;c<i.events.length;++c)f.opentelemetry.proto.trace.v1.Span.Event.encode(i.events[c],n.uint32(90).fork()).ldelim();if(i.droppedEventsCount!=null&&Object.hasOwnProperty.call(i,"droppedEventsCount")&&n.uint32(96).uint32(i.droppedEventsCount),i.links!=null&&i.links.length)for(var c=0;c<i.links.length;++c)f.opentelemetry.proto.trace.v1.Span.Link.encode(i.links[c],n.uint32(106).fork()).ldelim();return i.droppedLinksCount!=null&&Object.hasOwnProperty.call(i,"droppedLinksCount")&&n.uint32(112).uint32(i.droppedLinksCount),i.status!=null&&Object.hasOwnProperty.call(i,"status")&&f.opentelemetry.proto.trace.v1.Status.encode(i.status,n.uint32(122).fork()).ldelim(),i.flags!=null&&Object.hasOwnProperty.call(i,"flags")&&n.uint32(133).fixed32(i.flags),n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.trace.v1.Span;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.traceId=i.bytes();break}case 2:{l.spanId=i.bytes();break}case 3:{l.traceState=i.string();break}case 4:{l.parentSpanId=i.bytes();break}case 16:{l.flags=i.fixed32();break}case 5:{l.name=i.string();break}case 6:{l.kind=i.int32();break}case 7:{l.startTimeUnixNano=i.fixed64();break}case 8:{l.endTimeUnixNano=i.fixed64();break}case 9:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break}case 10:{l.droppedAttributesCount=i.uint32();break}case 11:{l.events&&l.events.length||(l.events=[]),l.events.push(f.opentelemetry.proto.trace.v1.Span.Event.decode(i,i.uint32()));break}case 12:{l.droppedEventsCount=i.uint32();break}case 13:{l.links&&l.links.length||(l.links=[]),l.links.push(f.opentelemetry.proto.trace.v1.Span.Link.decode(i,i.uint32()));break}case 14:{l.droppedLinksCount=i.uint32();break}case 15:{l.status=f.opentelemetry.proto.trace.v1.Status.decode(i,i.uint32());break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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"||m.isString(i.traceId)))return"traceId: buffer expected";if(i.spanId!=null&&i.hasOwnProperty("spanId")&&!(i.spanId&&typeof i.spanId.length=="number"||m.isString(i.spanId)))return"spanId: buffer expected";if(i.traceState!=null&&i.hasOwnProperty("traceState")&&!m.isString(i.traceState))return"traceState: string expected";if(i.parentSpanId!=null&&i.hasOwnProperty("parentSpanId")&&!(i.parentSpanId&&typeof i.parentSpanId.length=="number"||m.isString(i.parentSpanId)))return"parentSpanId: buffer expected";if(i.flags!=null&&i.hasOwnProperty("flags")&&!m.isInteger(i.flags))return"flags: integer expected";if(i.name!=null&&i.hasOwnProperty("name")&&!m.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")&&!m.isInteger(i.startTimeUnixNano)&&!(i.startTimeUnixNano&&m.isInteger(i.startTimeUnixNano.low)&&m.isInteger(i.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(i.endTimeUnixNano!=null&&i.hasOwnProperty("endTimeUnixNano")&&!m.isInteger(i.endTimeUnixNano)&&!(i.endTimeUnixNano&&m.isInteger(i.endTimeUnixNano.low)&&m.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<i.attributes.length;++n){var c=f.opentelemetry.proto.common.v1.KeyValue.verify(i.attributes[n]);if(c)return"attributes."+c}}if(i.droppedAttributesCount!=null&&i.hasOwnProperty("droppedAttributesCount")&&!m.isInteger(i.droppedAttributesCount))return"droppedAttributesCount: integer expected";if(i.events!=null&&i.hasOwnProperty("events")){if(!Array.isArray(i.events))return"events: array expected";for(var n=0;n<i.events.length;++n){var c=f.opentelemetry.proto.trace.v1.Span.Event.verify(i.events[n]);if(c)return"events."+c}}if(i.droppedEventsCount!=null&&i.hasOwnProperty("droppedEventsCount")&&!m.isInteger(i.droppedEventsCount))return"droppedEventsCount: integer expected";if(i.links!=null&&i.hasOwnProperty("links")){if(!Array.isArray(i.links))return"links: array expected";for(var n=0;n<i.links.length;++n){var c=f.opentelemetry.proto.trace.v1.Span.Link.verify(i.links[n]);if(c)return"links."+c}}if(i.droppedLinksCount!=null&&i.hasOwnProperty("droppedLinksCount")&&!m.isInteger(i.droppedLinksCount))return"droppedLinksCount: integer expected";if(i.status!=null&&i.hasOwnProperty("status")){var c=f.opentelemetry.proto.trace.v1.Status.verify(i.status);if(c)return"status."+c}return null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.trace.v1.Span)return i;var n=new f.opentelemetry.proto.trace.v1.Span;switch(i.traceId!=null&&(typeof i.traceId=="string"?m.base64.decode(i.traceId,n.traceId=m.newBuffer(m.base64.length(i.traceId)),0):i.traceId.length>=0&&(n.traceId=i.traceId)),i.spanId!=null&&(typeof i.spanId=="string"?m.base64.decode(i.spanId,n.spanId=m.newBuffer(m.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"?m.base64.decode(i.parentSpanId,n.parentSpanId=m.newBuffer(m.base64.length(i.parentSpanId)),0):i.parentSpanId.length>=0&&(n.parentSpanId=i.parentSpanId)),i.flags!=null&&(n.flags=i.flags>>>0),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&&(m.Long?(n.startTimeUnixNano=m.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 m.LongBits(i.startTimeUnixNano.low>>>0,i.startTimeUnixNano.high>>>0).toNumber())),i.endTimeUnixNano!=null&&(m.Long?(n.endTimeUnixNano=m.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 m.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 c=0;c<i.attributes.length;++c){if(typeof i.attributes[c]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");n.attributes[c]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(i.attributes[c])}}if(i.droppedAttributesCount!=null&&(n.droppedAttributesCount=i.droppedAttributesCount>>>0),i.events){if(!Array.isArray(i.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");n.events=[];for(var c=0;c<i.events.length;++c){if(typeof i.events[c]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");n.events[c]=f.opentelemetry.proto.trace.v1.Span.Event.fromObject(i.events[c])}}if(i.droppedEventsCount!=null&&(n.droppedEventsCount=i.droppedEventsCount>>>0),i.links){if(!Array.isArray(i.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");n.links=[];for(var c=0;c<i.links.length;++c){if(typeof i.links[c]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");n.links[c]=f.opentelemetry.proto.trace.v1.Span.Link.fromObject(i.links[c])}}if(i.droppedLinksCount!=null&&(n.droppedLinksCount=i.droppedLinksCount>>>0),i.status!=null){if(typeof i.status!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");n.status=f.opentelemetry.proto.trace.v1.Status.fromObject(i.status)}return n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.attributes=[],c.events=[],c.links=[]),n.defaults){if(n.bytes===String?c.traceId="":(c.traceId=[],n.bytes!==Array&&(c.traceId=m.newBuffer(c.traceId))),n.bytes===String?c.spanId="":(c.spanId=[],n.bytes!==Array&&(c.spanId=m.newBuffer(c.spanId))),c.traceState="",n.bytes===String?c.parentSpanId="":(c.parentSpanId=[],n.bytes!==Array&&(c.parentSpanId=m.newBuffer(c.parentSpanId))),c.name="",c.kind=n.enums===String?"SPAN_KIND_UNSPECIFIED":0,m.Long){var u=new m.Long(0,0,!1);c.startTimeUnixNano=n.longs===String?u.toString():n.longs===Number?u.toNumber():u}else c.startTimeUnixNano=n.longs===String?"0":0;if(m.Long){var u=new m.Long(0,0,!1);c.endTimeUnixNano=n.longs===String?u.toString():n.longs===Number?u.toNumber():u}else c.endTimeUnixNano=n.longs===String?"0":0;c.droppedAttributesCount=0,c.droppedEventsCount=0,c.droppedLinksCount=0,c.status=null,c.flags=0}if(i.traceId!=null&&i.hasOwnProperty("traceId")&&(c.traceId=n.bytes===String?m.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")&&(c.spanId=n.bytes===String?m.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")&&(c.traceState=i.traceState),i.parentSpanId!=null&&i.hasOwnProperty("parentSpanId")&&(c.parentSpanId=n.bytes===String?m.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")&&(c.name=i.name),i.kind!=null&&i.hasOwnProperty("kind")&&(c.kind=n.enums===String?f.opentelemetry.proto.trace.v1.Span.SpanKind[i.kind]===void 0?i.kind:f.opentelemetry.proto.trace.v1.Span.SpanKind[i.kind]:i.kind),i.startTimeUnixNano!=null&&i.hasOwnProperty("startTimeUnixNano")&&(typeof i.startTimeUnixNano=="number"?c.startTimeUnixNano=n.longs===String?String(i.startTimeUnixNano):i.startTimeUnixNano:c.startTimeUnixNano=n.longs===String?m.Long.prototype.toString.call(i.startTimeUnixNano):n.longs===Number?new m.LongBits(i.startTimeUnixNano.low>>>0,i.startTimeUnixNano.high>>>0).toNumber():i.startTimeUnixNano),i.endTimeUnixNano!=null&&i.hasOwnProperty("endTimeUnixNano")&&(typeof i.endTimeUnixNano=="number"?c.endTimeUnixNano=n.longs===String?String(i.endTimeUnixNano):i.endTimeUnixNano:c.endTimeUnixNano=n.longs===String?m.Long.prototype.toString.call(i.endTimeUnixNano):n.longs===Number?new m.LongBits(i.endTimeUnixNano.low>>>0,i.endTimeUnixNano.high>>>0).toNumber():i.endTimeUnixNano),i.attributes&&i.attributes.length){c.attributes=[];for(var l=0;l<i.attributes.length;++l)c.attributes[l]=f.opentelemetry.proto.common.v1.KeyValue.toObject(i.attributes[l],n)}if(i.droppedAttributesCount!=null&&i.hasOwnProperty("droppedAttributesCount")&&(c.droppedAttributesCount=i.droppedAttributesCount),i.events&&i.events.length){c.events=[];for(var l=0;l<i.events.length;++l)c.events[l]=f.opentelemetry.proto.trace.v1.Span.Event.toObject(i.events[l],n)}if(i.droppedEventsCount!=null&&i.hasOwnProperty("droppedEventsCount")&&(c.droppedEventsCount=i.droppedEventsCount),i.links&&i.links.length){c.links=[];for(var l=0;l<i.links.length;++l)c.links[l]=f.opentelemetry.proto.trace.v1.Span.Link.toObject(i.links[l],n)}return i.droppedLinksCount!=null&&i.hasOwnProperty("droppedLinksCount")&&(c.droppedLinksCount=i.droppedLinksCount),i.status!=null&&i.hasOwnProperty("status")&&(c.status=f.opentelemetry.proto.trace.v1.Status.toObject(i.status,n)),i.flags!=null&&i.hasOwnProperty("flags")&&(c.flags=i.flags),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.trace.v1.Span"},s.SpanKind=(function(){var a={},i=Object.create(a);return i[a[0]="SPAN_KIND_UNSPECIFIED"]=0,i[a[1]="SPAN_KIND_INTERNAL"]=1,i[a[2]="SPAN_KIND_SERVER"]=2,i[a[3]="SPAN_KIND_CLIENT"]=3,i[a[4]="SPAN_KIND_PRODUCER"]=4,i[a[5]="SPAN_KIND_CONSUMER"]=5,i})(),s.Event=(function(){function a(i){if(this.attributes=[],i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}return a.prototype.timeUnixNano=null,a.prototype.name=null,a.prototype.attributes=m.emptyArray,a.prototype.droppedAttributesCount=null,a.create=function(n){return new a(n)},a.encode=function(n,c){if(c||(c=ee.create()),n.timeUnixNano!=null&&Object.hasOwnProperty.call(n,"timeUnixNano")&&c.uint32(9).fixed64(n.timeUnixNano),n.name!=null&&Object.hasOwnProperty.call(n,"name")&&c.uint32(18).string(n.name),n.attributes!=null&&n.attributes.length)for(var u=0;u<n.attributes.length;++u)f.opentelemetry.proto.common.v1.KeyValue.encode(n.attributes[u],c.uint32(26).fork()).ldelim();return n.droppedAttributesCount!=null&&Object.hasOwnProperty.call(n,"droppedAttributesCount")&&c.uint32(32).uint32(n.droppedAttributesCount),c},a.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},a.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.trace.v1.Span.Event;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 1:{d.timeUnixNano=n.fixed64();break}case 2:{d.name=n.string();break}case 3:{d.attributes&&d.attributes.length||(d.attributes=[]),d.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 4:{d.droppedAttributesCount=n.uint32();break}default:n.skipType(h&7);break}}return d},a.decodeDelimited=function(n){return n instanceof T||(n=new T(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")&&!m.isInteger(n.timeUnixNano)&&!(n.timeUnixNano&&m.isInteger(n.timeUnixNano.low)&&m.isInteger(n.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(n.name!=null&&n.hasOwnProperty("name")&&!m.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 c=0;c<n.attributes.length;++c){var u=f.opentelemetry.proto.common.v1.KeyValue.verify(n.attributes[c]);if(u)return"attributes."+u}}return n.droppedAttributesCount!=null&&n.hasOwnProperty("droppedAttributesCount")&&!m.isInteger(n.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},a.fromObject=function(n){if(n instanceof f.opentelemetry.proto.trace.v1.Span.Event)return n;var c=new f.opentelemetry.proto.trace.v1.Span.Event;if(n.timeUnixNano!=null&&(m.Long?(c.timeUnixNano=m.Long.fromValue(n.timeUnixNano)).unsigned=!1:typeof n.timeUnixNano=="string"?c.timeUnixNano=parseInt(n.timeUnixNano,10):typeof n.timeUnixNano=="number"?c.timeUnixNano=n.timeUnixNano:typeof n.timeUnixNano=="object"&&(c.timeUnixNano=new m.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber())),n.name!=null&&(c.name=String(n.name)),n.attributes){if(!Array.isArray(n.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");c.attributes=[];for(var u=0;u<n.attributes.length;++u){if(typeof n.attributes[u]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");c.attributes[u]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(n.attributes[u])}}return n.droppedAttributesCount!=null&&(c.droppedAttributesCount=n.droppedAttributesCount>>>0),c},a.toObject=function(n,c){c||(c={});var u={};if((c.arrays||c.defaults)&&(u.attributes=[]),c.defaults){if(m.Long){var l=new m.Long(0,0,!1);u.timeUnixNano=c.longs===String?l.toString():c.longs===Number?l.toNumber():l}else u.timeUnixNano=c.longs===String?"0":0;u.name="",u.droppedAttributesCount=0}if(n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&(typeof n.timeUnixNano=="number"?u.timeUnixNano=c.longs===String?String(n.timeUnixNano):n.timeUnixNano:u.timeUnixNano=c.longs===String?m.Long.prototype.toString.call(n.timeUnixNano):c.longs===Number?new m.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber():n.timeUnixNano),n.name!=null&&n.hasOwnProperty("name")&&(u.name=n.name),n.attributes&&n.attributes.length){u.attributes=[];for(var d=0;d<n.attributes.length;++d)u.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(n.attributes[d],c)}return n.droppedAttributesCount!=null&&n.hasOwnProperty("droppedAttributesCount")&&(u.droppedAttributesCount=n.droppedAttributesCount),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.trace.v1.Span.Event"},a})(),s.Link=(function(){function a(i){if(this.attributes=[],i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}return a.prototype.traceId=null,a.prototype.spanId=null,a.prototype.traceState=null,a.prototype.attributes=m.emptyArray,a.prototype.droppedAttributesCount=null,a.prototype.flags=null,a.create=function(n){return new a(n)},a.encode=function(n,c){if(c||(c=ee.create()),n.traceId!=null&&Object.hasOwnProperty.call(n,"traceId")&&c.uint32(10).bytes(n.traceId),n.spanId!=null&&Object.hasOwnProperty.call(n,"spanId")&&c.uint32(18).bytes(n.spanId),n.traceState!=null&&Object.hasOwnProperty.call(n,"traceState")&&c.uint32(26).string(n.traceState),n.attributes!=null&&n.attributes.length)for(var u=0;u<n.attributes.length;++u)f.opentelemetry.proto.common.v1.KeyValue.encode(n.attributes[u],c.uint32(34).fork()).ldelim();return n.droppedAttributesCount!=null&&Object.hasOwnProperty.call(n,"droppedAttributesCount")&&c.uint32(40).uint32(n.droppedAttributesCount),n.flags!=null&&Object.hasOwnProperty.call(n,"flags")&&c.uint32(53).fixed32(n.flags),c},a.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},a.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.trace.v1.Span.Link;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 1:{d.traceId=n.bytes();break}case 2:{d.spanId=n.bytes();break}case 3:{d.traceState=n.string();break}case 4:{d.attributes&&d.attributes.length||(d.attributes=[]),d.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 5:{d.droppedAttributesCount=n.uint32();break}case 6:{d.flags=n.fixed32();break}default:n.skipType(h&7);break}}return d},a.decodeDelimited=function(n){return n instanceof T||(n=new T(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"||m.isString(n.traceId)))return"traceId: buffer expected";if(n.spanId!=null&&n.hasOwnProperty("spanId")&&!(n.spanId&&typeof n.spanId.length=="number"||m.isString(n.spanId)))return"spanId: buffer expected";if(n.traceState!=null&&n.hasOwnProperty("traceState")&&!m.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 c=0;c<n.attributes.length;++c){var u=f.opentelemetry.proto.common.v1.KeyValue.verify(n.attributes[c]);if(u)return"attributes."+u}}return n.droppedAttributesCount!=null&&n.hasOwnProperty("droppedAttributesCount")&&!m.isInteger(n.droppedAttributesCount)?"droppedAttributesCount: integer expected":n.flags!=null&&n.hasOwnProperty("flags")&&!m.isInteger(n.flags)?"flags: integer expected":null},a.fromObject=function(n){if(n instanceof f.opentelemetry.proto.trace.v1.Span.Link)return n;var c=new f.opentelemetry.proto.trace.v1.Span.Link;if(n.traceId!=null&&(typeof n.traceId=="string"?m.base64.decode(n.traceId,c.traceId=m.newBuffer(m.base64.length(n.traceId)),0):n.traceId.length>=0&&(c.traceId=n.traceId)),n.spanId!=null&&(typeof n.spanId=="string"?m.base64.decode(n.spanId,c.spanId=m.newBuffer(m.base64.length(n.spanId)),0):n.spanId.length>=0&&(c.spanId=n.spanId)),n.traceState!=null&&(c.traceState=String(n.traceState)),n.attributes){if(!Array.isArray(n.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");c.attributes=[];for(var u=0;u<n.attributes.length;++u){if(typeof n.attributes[u]!="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");c.attributes[u]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(n.attributes[u])}}return n.droppedAttributesCount!=null&&(c.droppedAttributesCount=n.droppedAttributesCount>>>0),n.flags!=null&&(c.flags=n.flags>>>0),c},a.toObject=function(n,c){c||(c={});var u={};if((c.arrays||c.defaults)&&(u.attributes=[]),c.defaults&&(c.bytes===String?u.traceId="":(u.traceId=[],c.bytes!==Array&&(u.traceId=m.newBuffer(u.traceId))),c.bytes===String?u.spanId="":(u.spanId=[],c.bytes!==Array&&(u.spanId=m.newBuffer(u.spanId))),u.traceState="",u.droppedAttributesCount=0,u.flags=0),n.traceId!=null&&n.hasOwnProperty("traceId")&&(u.traceId=c.bytes===String?m.base64.encode(n.traceId,0,n.traceId.length):c.bytes===Array?Array.prototype.slice.call(n.traceId):n.traceId),n.spanId!=null&&n.hasOwnProperty("spanId")&&(u.spanId=c.bytes===String?m.base64.encode(n.spanId,0,n.spanId.length):c.bytes===Array?Array.prototype.slice.call(n.spanId):n.spanId),n.traceState!=null&&n.hasOwnProperty("traceState")&&(u.traceState=n.traceState),n.attributes&&n.attributes.length){u.attributes=[];for(var l=0;l<n.attributes.length;++l)u.attributes[l]=f.opentelemetry.proto.common.v1.KeyValue.toObject(n.attributes[l],c)}return n.droppedAttributesCount!=null&&n.hasOwnProperty("droppedAttributesCount")&&(u.droppedAttributesCount=n.droppedAttributesCount),n.flags!=null&&n.hasOwnProperty("flags")&&(u.flags=n.flags),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.trace.v1.Span.Link"},a})(),s})(),o.Status=(function(){function s(a){if(a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.message=null,s.prototype.code=null,s.create=function(i){return new s(i)},s.encode=function(i,n){return n||(n=ee.create()),i.message!=null&&Object.hasOwnProperty.call(i,"message")&&n.uint32(18).string(i.message),i.code!=null&&Object.hasOwnProperty.call(i,"code")&&n.uint32(24).int32(i.code),n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.trace.v1.Status;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 2:{l.message=i.string();break}case 3:{l.code=i.int32();break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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")&&!m.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 f.opentelemetry.proto.trace.v1.Status)return i;var n=new f.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 c={};return n.defaults&&(c.message="",c.code=n.enums===String?"STATUS_CODE_UNSET":0),i.message!=null&&i.hasOwnProperty("message")&&(c.message=i.message),i.code!=null&&i.hasOwnProperty("code")&&(c.code=n.enums===String?f.opentelemetry.proto.trace.v1.Status.StatusCode[i.code]===void 0?i.code:f.opentelemetry.proto.trace.v1.Status.StatusCode[i.code]:i.code),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.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.SpanFlags=(function(){var s={},a=Object.create(s);return a[s[0]="SPAN_FLAGS_DO_NOT_USE"]=0,a[s[255]="SPAN_FLAGS_TRACE_FLAGS_MASK"]=255,a[s[256]="SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK"]=256,a[s[512]="SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK"]=512,a})(),o})(),r})(),e.collector=(function(){var r={};return r.trace=(function(){var o={};return o.v1=(function(){var s={};return s.TraceService=(function(){function a(i,n,c){J.rpc.Service.call(this,i,n,c)}return(a.prototype=Object.create(J.rpc.Service.prototype)).constructor=a,a.create=function(n,c,u){return new this(n,c,u)},Object.defineProperty(a.prototype.export=function i(n,c){return this.rpcCall(i,f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,n,c)},"name",{value:"Export"}),a})(),s.ExportTraceServiceRequest=(function(){function a(i){if(this.resourceSpans=[],i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}return a.prototype.resourceSpans=m.emptyArray,a.create=function(n){return new a(n)},a.encode=function(n,c){if(c||(c=ee.create()),n.resourceSpans!=null&&n.resourceSpans.length)for(var u=0;u<n.resourceSpans.length;++u)f.opentelemetry.proto.trace.v1.ResourceSpans.encode(n.resourceSpans[u],c.uint32(10).fork()).ldelim();return c},a.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},a.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 1:{d.resourceSpans&&d.resourceSpans.length||(d.resourceSpans=[]),d.resourceSpans.push(f.opentelemetry.proto.trace.v1.ResourceSpans.decode(n,n.uint32()));break}default:n.skipType(h&7);break}}return d},a.decodeDelimited=function(n){return n instanceof T||(n=new T(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 c=0;c<n.resourceSpans.length;++c){var u=f.opentelemetry.proto.trace.v1.ResourceSpans.verify(n.resourceSpans[c]);if(u)return"resourceSpans."+u}}return null},a.fromObject=function(n){if(n instanceof f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return n;var c=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(n.resourceSpans){if(!Array.isArray(n.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");c.resourceSpans=[];for(var u=0;u<n.resourceSpans.length;++u){if(typeof n.resourceSpans[u]!="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");c.resourceSpans[u]=f.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(n.resourceSpans[u])}}return c},a.toObject=function(n,c){c||(c={});var u={};if((c.arrays||c.defaults)&&(u.resourceSpans=[]),n.resourceSpans&&n.resourceSpans.length){u.resourceSpans=[];for(var l=0;l<n.resourceSpans.length;++l)u.resourceSpans[l]=f.opentelemetry.proto.trace.v1.ResourceSpans.toObject(n.resourceSpans[l],c)}return u},a.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},a})(),s.ExportTraceServiceResponse=(function(){function a(i){if(i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}return a.prototype.partialSuccess=null,a.create=function(n){return new a(n)},a.encode=function(n,c){return c||(c=ee.create()),n.partialSuccess!=null&&Object.hasOwnProperty.call(n,"partialSuccess")&&f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(n.partialSuccess,c.uint32(10).fork()).ldelim(),c},a.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},a.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 1:{d.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(n,n.uint32());break}default:n.skipType(h&7);break}}return d},a.decodeDelimited=function(n){return n instanceof T||(n=new T(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 c=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(n.partialSuccess);if(c)return"partialSuccess."+c}return null},a.fromObject=function(n){if(n instanceof f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return n;var c=new f.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");c.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(n.partialSuccess)}return c},a.toObject=function(n,c){c||(c={});var u={};return c.defaults&&(u.partialSuccess=null),n.partialSuccess!=null&&n.hasOwnProperty("partialSuccess")&&(u.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(n.partialSuccess,c)),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},a})(),s.ExportTracePartialSuccess=(function(){function a(i){if(i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}return a.prototype.rejectedSpans=null,a.prototype.errorMessage=null,a.create=function(n){return new a(n)},a.encode=function(n,c){return c||(c=ee.create()),n.rejectedSpans!=null&&Object.hasOwnProperty.call(n,"rejectedSpans")&&c.uint32(8).int64(n.rejectedSpans),n.errorMessage!=null&&Object.hasOwnProperty.call(n,"errorMessage")&&c.uint32(18).string(n.errorMessage),c},a.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},a.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 1:{d.rejectedSpans=n.int64();break}case 2:{d.errorMessage=n.string();break}default:n.skipType(h&7);break}}return d},a.decodeDelimited=function(n){return n instanceof T||(n=new T(n)),this.decode(n,n.uint32())},a.verify=function(n){return typeof n!="object"||n===null?"object expected":n.rejectedSpans!=null&&n.hasOwnProperty("rejectedSpans")&&!m.isInteger(n.rejectedSpans)&&!(n.rejectedSpans&&m.isInteger(n.rejectedSpans.low)&&m.isInteger(n.rejectedSpans.high))?"rejectedSpans: integer|Long expected":n.errorMessage!=null&&n.hasOwnProperty("errorMessage")&&!m.isString(n.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(n){if(n instanceof f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return n;var c=new f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return n.rejectedSpans!=null&&(m.Long?(c.rejectedSpans=m.Long.fromValue(n.rejectedSpans)).unsigned=!1:typeof n.rejectedSpans=="string"?c.rejectedSpans=parseInt(n.rejectedSpans,10):typeof n.rejectedSpans=="number"?c.rejectedSpans=n.rejectedSpans:typeof n.rejectedSpans=="object"&&(c.rejectedSpans=new m.LongBits(n.rejectedSpans.low>>>0,n.rejectedSpans.high>>>0).toNumber())),n.errorMessage!=null&&(c.errorMessage=String(n.errorMessage)),c},a.toObject=function(n,c){c||(c={});var u={};if(c.defaults){if(m.Long){var l=new m.Long(0,0,!1);u.rejectedSpans=c.longs===String?l.toString():c.longs===Number?l.toNumber():l}else u.rejectedSpans=c.longs===String?"0":0;u.errorMessage=""}return n.rejectedSpans!=null&&n.hasOwnProperty("rejectedSpans")&&(typeof n.rejectedSpans=="number"?u.rejectedSpans=c.longs===String?String(n.rejectedSpans):n.rejectedSpans:u.rejectedSpans=c.longs===String?m.Long.prototype.toString.call(n.rejectedSpans):c.longs===Number?new m.LongBits(n.rejectedSpans.low>>>0,n.rejectedSpans.high>>>0).toNumber():n.rejectedSpans),n.errorMessage!=null&&n.hasOwnProperty("errorMessage")&&(u.errorMessage=n.errorMessage),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},a})(),s})(),o})(),r.metrics=(function(){var o={};return o.v1=(function(){var s={};return s.MetricsService=(function(){function a(i,n,c){J.rpc.Service.call(this,i,n,c)}return(a.prototype=Object.create(J.rpc.Service.prototype)).constructor=a,a.create=function(n,c,u){return new this(n,c,u)},Object.defineProperty(a.prototype.export=function i(n,c){return this.rpcCall(i,f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,n,c)},"name",{value:"Export"}),a})(),s.ExportMetricsServiceRequest=(function(){function a(i){if(this.resourceMetrics=[],i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}return a.prototype.resourceMetrics=m.emptyArray,a.create=function(n){return new a(n)},a.encode=function(n,c){if(c||(c=ee.create()),n.resourceMetrics!=null&&n.resourceMetrics.length)for(var u=0;u<n.resourceMetrics.length;++u)f.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(n.resourceMetrics[u],c.uint32(10).fork()).ldelim();return c},a.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},a.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 1:{d.resourceMetrics&&d.resourceMetrics.length||(d.resourceMetrics=[]),d.resourceMetrics.push(f.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(n,n.uint32()));break}default:n.skipType(h&7);break}}return d},a.decodeDelimited=function(n){return n instanceof T||(n=new T(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 c=0;c<n.resourceMetrics.length;++c){var u=f.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(n.resourceMetrics[c]);if(u)return"resourceMetrics."+u}}return null},a.fromObject=function(n){if(n instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return n;var c=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(n.resourceMetrics){if(!Array.isArray(n.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");c.resourceMetrics=[];for(var u=0;u<n.resourceMetrics.length;++u){if(typeof n.resourceMetrics[u]!="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");c.resourceMetrics[u]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(n.resourceMetrics[u])}}return c},a.toObject=function(n,c){c||(c={});var u={};if((c.arrays||c.defaults)&&(u.resourceMetrics=[]),n.resourceMetrics&&n.resourceMetrics.length){u.resourceMetrics=[];for(var l=0;l<n.resourceMetrics.length;++l)u.resourceMetrics[l]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(n.resourceMetrics[l],c)}return u},a.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},a})(),s.ExportMetricsServiceResponse=(function(){function a(i){if(i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}return a.prototype.partialSuccess=null,a.create=function(n){return new a(n)},a.encode=function(n,c){return c||(c=ee.create()),n.partialSuccess!=null&&Object.hasOwnProperty.call(n,"partialSuccess")&&f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(n.partialSuccess,c.uint32(10).fork()).ldelim(),c},a.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},a.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 1:{d.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(n,n.uint32());break}default:n.skipType(h&7);break}}return d},a.decodeDelimited=function(n){return n instanceof T||(n=new T(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 c=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(n.partialSuccess);if(c)return"partialSuccess."+c}return null},a.fromObject=function(n){if(n instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return n;var c=new f.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");c.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(n.partialSuccess)}return c},a.toObject=function(n,c){c||(c={});var u={};return c.defaults&&(u.partialSuccess=null),n.partialSuccess!=null&&n.hasOwnProperty("partialSuccess")&&(u.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(n.partialSuccess,c)),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},a})(),s.ExportMetricsPartialSuccess=(function(){function a(i){if(i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}return a.prototype.rejectedDataPoints=null,a.prototype.errorMessage=null,a.create=function(n){return new a(n)},a.encode=function(n,c){return c||(c=ee.create()),n.rejectedDataPoints!=null&&Object.hasOwnProperty.call(n,"rejectedDataPoints")&&c.uint32(8).int64(n.rejectedDataPoints),n.errorMessage!=null&&Object.hasOwnProperty.call(n,"errorMessage")&&c.uint32(18).string(n.errorMessage),c},a.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},a.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 1:{d.rejectedDataPoints=n.int64();break}case 2:{d.errorMessage=n.string();break}default:n.skipType(h&7);break}}return d},a.decodeDelimited=function(n){return n instanceof T||(n=new T(n)),this.decode(n,n.uint32())},a.verify=function(n){return typeof n!="object"||n===null?"object expected":n.rejectedDataPoints!=null&&n.hasOwnProperty("rejectedDataPoints")&&!m.isInteger(n.rejectedDataPoints)&&!(n.rejectedDataPoints&&m.isInteger(n.rejectedDataPoints.low)&&m.isInteger(n.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":n.errorMessage!=null&&n.hasOwnProperty("errorMessage")&&!m.isString(n.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(n){if(n instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return n;var c=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return n.rejectedDataPoints!=null&&(m.Long?(c.rejectedDataPoints=m.Long.fromValue(n.rejectedDataPoints)).unsigned=!1:typeof n.rejectedDataPoints=="string"?c.rejectedDataPoints=parseInt(n.rejectedDataPoints,10):typeof n.rejectedDataPoints=="number"?c.rejectedDataPoints=n.rejectedDataPoints:typeof n.rejectedDataPoints=="object"&&(c.rejectedDataPoints=new m.LongBits(n.rejectedDataPoints.low>>>0,n.rejectedDataPoints.high>>>0).toNumber())),n.errorMessage!=null&&(c.errorMessage=String(n.errorMessage)),c},a.toObject=function(n,c){c||(c={});var u={};if(c.defaults){if(m.Long){var l=new m.Long(0,0,!1);u.rejectedDataPoints=c.longs===String?l.toString():c.longs===Number?l.toNumber():l}else u.rejectedDataPoints=c.longs===String?"0":0;u.errorMessage=""}return n.rejectedDataPoints!=null&&n.hasOwnProperty("rejectedDataPoints")&&(typeof n.rejectedDataPoints=="number"?u.rejectedDataPoints=c.longs===String?String(n.rejectedDataPoints):n.rejectedDataPoints:u.rejectedDataPoints=c.longs===String?m.Long.prototype.toString.call(n.rejectedDataPoints):c.longs===Number?new m.LongBits(n.rejectedDataPoints.low>>>0,n.rejectedDataPoints.high>>>0).toNumber():n.rejectedDataPoints),n.errorMessage!=null&&n.hasOwnProperty("errorMessage")&&(u.errorMessage=n.errorMessage),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},a})(),s})(),o})(),r.logs=(function(){var o={};return o.v1=(function(){var s={};return s.LogsService=(function(){function a(i,n,c){J.rpc.Service.call(this,i,n,c)}return(a.prototype=Object.create(J.rpc.Service.prototype)).constructor=a,a.create=function(n,c,u){return new this(n,c,u)},Object.defineProperty(a.prototype.export=function i(n,c){return this.rpcCall(i,f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,n,c)},"name",{value:"Export"}),a})(),s.ExportLogsServiceRequest=(function(){function a(i){if(this.resourceLogs=[],i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}return a.prototype.resourceLogs=m.emptyArray,a.create=function(n){return new a(n)},a.encode=function(n,c){if(c||(c=ee.create()),n.resourceLogs!=null&&n.resourceLogs.length)for(var u=0;u<n.resourceLogs.length;++u)f.opentelemetry.proto.logs.v1.ResourceLogs.encode(n.resourceLogs[u],c.uint32(10).fork()).ldelim();return c},a.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},a.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 1:{d.resourceLogs&&d.resourceLogs.length||(d.resourceLogs=[]),d.resourceLogs.push(f.opentelemetry.proto.logs.v1.ResourceLogs.decode(n,n.uint32()));break}default:n.skipType(h&7);break}}return d},a.decodeDelimited=function(n){return n instanceof T||(n=new T(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 c=0;c<n.resourceLogs.length;++c){var u=f.opentelemetry.proto.logs.v1.ResourceLogs.verify(n.resourceLogs[c]);if(u)return"resourceLogs."+u}}return null},a.fromObject=function(n){if(n instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return n;var c=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(n.resourceLogs){if(!Array.isArray(n.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");c.resourceLogs=[];for(var u=0;u<n.resourceLogs.length;++u){if(typeof n.resourceLogs[u]!="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");c.resourceLogs[u]=f.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(n.resourceLogs[u])}}return c},a.toObject=function(n,c){c||(c={});var u={};if((c.arrays||c.defaults)&&(u.resourceLogs=[]),n.resourceLogs&&n.resourceLogs.length){u.resourceLogs=[];for(var l=0;l<n.resourceLogs.length;++l)u.resourceLogs[l]=f.opentelemetry.proto.logs.v1.ResourceLogs.toObject(n.resourceLogs[l],c)}return u},a.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},a})(),s.ExportLogsServiceResponse=(function(){function a(i){if(i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}return a.prototype.partialSuccess=null,a.create=function(n){return new a(n)},a.encode=function(n,c){return c||(c=ee.create()),n.partialSuccess!=null&&Object.hasOwnProperty.call(n,"partialSuccess")&&f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(n.partialSuccess,c.uint32(10).fork()).ldelim(),c},a.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},a.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 1:{d.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(n,n.uint32());break}default:n.skipType(h&7);break}}return d},a.decodeDelimited=function(n){return n instanceof T||(n=new T(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 c=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(n.partialSuccess);if(c)return"partialSuccess."+c}return null},a.fromObject=function(n){if(n instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return n;var c=new f.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");c.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(n.partialSuccess)}return c},a.toObject=function(n,c){c||(c={});var u={};return c.defaults&&(u.partialSuccess=null),n.partialSuccess!=null&&n.hasOwnProperty("partialSuccess")&&(u.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(n.partialSuccess,c)),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},a})(),s.ExportLogsPartialSuccess=(function(){function a(i){if(i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}return a.prototype.rejectedLogRecords=null,a.prototype.errorMessage=null,a.create=function(n){return new a(n)},a.encode=function(n,c){return c||(c=ee.create()),n.rejectedLogRecords!=null&&Object.hasOwnProperty.call(n,"rejectedLogRecords")&&c.uint32(8).int64(n.rejectedLogRecords),n.errorMessage!=null&&Object.hasOwnProperty.call(n,"errorMessage")&&c.uint32(18).string(n.errorMessage),c},a.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},a.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 1:{d.rejectedLogRecords=n.int64();break}case 2:{d.errorMessage=n.string();break}default:n.skipType(h&7);break}}return d},a.decodeDelimited=function(n){return n instanceof T||(n=new T(n)),this.decode(n,n.uint32())},a.verify=function(n){return typeof n!="object"||n===null?"object expected":n.rejectedLogRecords!=null&&n.hasOwnProperty("rejectedLogRecords")&&!m.isInteger(n.rejectedLogRecords)&&!(n.rejectedLogRecords&&m.isInteger(n.rejectedLogRecords.low)&&m.isInteger(n.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":n.errorMessage!=null&&n.hasOwnProperty("errorMessage")&&!m.isString(n.errorMessage)?"errorMessage: string expected":null},a.fromObject=function(n){if(n instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return n;var c=new f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return n.rejectedLogRecords!=null&&(m.Long?(c.rejectedLogRecords=m.Long.fromValue(n.rejectedLogRecords)).unsigned=!1:typeof n.rejectedLogRecords=="string"?c.rejectedLogRecords=parseInt(n.rejectedLogRecords,10):typeof n.rejectedLogRecords=="number"?c.rejectedLogRecords=n.rejectedLogRecords:typeof n.rejectedLogRecords=="object"&&(c.rejectedLogRecords=new m.LongBits(n.rejectedLogRecords.low>>>0,n.rejectedLogRecords.high>>>0).toNumber())),n.errorMessage!=null&&(c.errorMessage=String(n.errorMessage)),c},a.toObject=function(n,c){c||(c={});var u={};if(c.defaults){if(m.Long){var l=new m.Long(0,0,!1);u.rejectedLogRecords=c.longs===String?l.toString():c.longs===Number?l.toNumber():l}else u.rejectedLogRecords=c.longs===String?"0":0;u.errorMessage=""}return n.rejectedLogRecords!=null&&n.hasOwnProperty("rejectedLogRecords")&&(typeof n.rejectedLogRecords=="number"?u.rejectedLogRecords=c.longs===String?String(n.rejectedLogRecords):n.rejectedLogRecords:u.rejectedLogRecords=c.longs===String?m.Long.prototype.toString.call(n.rejectedLogRecords):c.longs===Number?new m.LongBits(n.rejectedLogRecords.low>>>0,n.rejectedLogRecords.high>>>0).toNumber():n.rejectedLogRecords),n.errorMessage!=null&&n.hasOwnProperty("errorMessage")&&(u.errorMessage=n.errorMessage),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},a})(),s})(),o})(),r})(),e.metrics=(function(){var r={};return r.v1=(function(){var o={};return o.MetricsData=(function(){function s(a){if(this.resourceMetrics=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.resourceMetrics=m.emptyArray,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.resourceMetrics!=null&&i.resourceMetrics.length)for(var c=0;c<i.resourceMetrics.length;++c)f.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(i.resourceMetrics[c],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.metrics.v1.MetricsData;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.resourceMetrics&&l.resourceMetrics.length||(l.resourceMetrics=[]),l.resourceMetrics.push(f.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(i,i.uint32()));break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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<i.resourceMetrics.length;++n){var c=f.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(i.resourceMetrics[n]);if(c)return"resourceMetrics."+c}}return null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.metrics.v1.MetricsData)return i;var n=new f.opentelemetry.proto.metrics.v1.MetricsData;if(i.resourceMetrics){if(!Array.isArray(i.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");n.resourceMetrics=[];for(var c=0;c<i.resourceMetrics.length;++c){if(typeof i.resourceMetrics[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");n.resourceMetrics[c]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(i.resourceMetrics[c])}}return n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.resourceMetrics=[]),i.resourceMetrics&&i.resourceMetrics.length){c.resourceMetrics=[];for(var u=0;u<i.resourceMetrics.length;++u)c.resourceMetrics[u]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(i.resourceMetrics[u],n)}return c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.metrics.v1.MetricsData"},s})(),o.ResourceMetrics=(function(){function s(a){if(this.scopeMetrics=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.resource=null,s.prototype.scopeMetrics=m.emptyArray,s.prototype.schemaUrl=null,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.resource!=null&&Object.hasOwnProperty.call(i,"resource")&&f.opentelemetry.proto.resource.v1.Resource.encode(i.resource,n.uint32(10).fork()).ldelim(),i.scopeMetrics!=null&&i.scopeMetrics.length)for(var c=0;c<i.scopeMetrics.length;++c)f.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(i.scopeMetrics[c],n.uint32(18).fork()).ldelim();return i.schemaUrl!=null&&Object.hasOwnProperty.call(i,"schemaUrl")&&n.uint32(26).string(i.schemaUrl),n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.metrics.v1.ResourceMetrics;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.resource=f.opentelemetry.proto.resource.v1.Resource.decode(i,i.uint32());break}case 2:{l.scopeMetrics&&l.scopeMetrics.length||(l.scopeMetrics=[]),l.scopeMetrics.push(f.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(i,i.uint32()));break}case 3:{l.schemaUrl=i.string();break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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=f.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 c=0;c<i.scopeMetrics.length;++c){var n=f.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(i.scopeMetrics[c]);if(n)return"scopeMetrics."+n}}return i.schemaUrl!=null&&i.hasOwnProperty("schemaUrl")&&!m.isString(i.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.metrics.v1.ResourceMetrics)return i;var n=new f.opentelemetry.proto.metrics.v1.ResourceMetrics;if(i.resource!=null){if(typeof i.resource!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");n.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(i.resource)}if(i.scopeMetrics){if(!Array.isArray(i.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");n.scopeMetrics=[];for(var c=0;c<i.scopeMetrics.length;++c){if(typeof i.scopeMetrics[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");n.scopeMetrics[c]=f.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(i.scopeMetrics[c])}}return i.schemaUrl!=null&&(n.schemaUrl=String(i.schemaUrl)),n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.scopeMetrics=[]),n.defaults&&(c.resource=null,c.schemaUrl=""),i.resource!=null&&i.hasOwnProperty("resource")&&(c.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(i.resource,n)),i.scopeMetrics&&i.scopeMetrics.length){c.scopeMetrics=[];for(var u=0;u<i.scopeMetrics.length;++u)c.scopeMetrics[u]=f.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(i.scopeMetrics[u],n)}return i.schemaUrl!=null&&i.hasOwnProperty("schemaUrl")&&(c.schemaUrl=i.schemaUrl),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},s})(),o.ScopeMetrics=(function(){function s(a){if(this.metrics=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.scope=null,s.prototype.metrics=m.emptyArray,s.prototype.schemaUrl=null,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.scope!=null&&Object.hasOwnProperty.call(i,"scope")&&f.opentelemetry.proto.common.v1.InstrumentationScope.encode(i.scope,n.uint32(10).fork()).ldelim(),i.metrics!=null&&i.metrics.length)for(var c=0;c<i.metrics.length;++c)f.opentelemetry.proto.metrics.v1.Metric.encode(i.metrics[c],n.uint32(18).fork()).ldelim();return i.schemaUrl!=null&&Object.hasOwnProperty.call(i,"schemaUrl")&&n.uint32(26).string(i.schemaUrl),n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.metrics.v1.ScopeMetrics;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(i,i.uint32());break}case 2:{l.metrics&&l.metrics.length||(l.metrics=[]),l.metrics.push(f.opentelemetry.proto.metrics.v1.Metric.decode(i,i.uint32()));break}case 3:{l.schemaUrl=i.string();break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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=f.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 c=0;c<i.metrics.length;++c){var n=f.opentelemetry.proto.metrics.v1.Metric.verify(i.metrics[c]);if(n)return"metrics."+n}}return i.schemaUrl!=null&&i.hasOwnProperty("schemaUrl")&&!m.isString(i.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.metrics.v1.ScopeMetrics)return i;var n=new f.opentelemetry.proto.metrics.v1.ScopeMetrics;if(i.scope!=null){if(typeof i.scope!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");n.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(i.scope)}if(i.metrics){if(!Array.isArray(i.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");n.metrics=[];for(var c=0;c<i.metrics.length;++c){if(typeof i.metrics[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");n.metrics[c]=f.opentelemetry.proto.metrics.v1.Metric.fromObject(i.metrics[c])}}return i.schemaUrl!=null&&(n.schemaUrl=String(i.schemaUrl)),n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.metrics=[]),n.defaults&&(c.scope=null,c.schemaUrl=""),i.scope!=null&&i.hasOwnProperty("scope")&&(c.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(i.scope,n)),i.metrics&&i.metrics.length){c.metrics=[];for(var u=0;u<i.metrics.length;++u)c.metrics[u]=f.opentelemetry.proto.metrics.v1.Metric.toObject(i.metrics[u],n)}return i.schemaUrl!=null&&i.hasOwnProperty("schemaUrl")&&(c.schemaUrl=i.schemaUrl),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},s})(),o.Metric=(function(){function s(i){if(this.metadata=[],i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}s.prototype.name=null,s.prototype.description=null,s.prototype.unit=null,s.prototype.gauge=null,s.prototype.sum=null,s.prototype.histogram=null,s.prototype.exponentialHistogram=null,s.prototype.summary=null,s.prototype.metadata=m.emptyArray;var a;return Object.defineProperty(s.prototype,"data",{get:m.oneOfGetter(a=["gauge","sum","histogram","exponentialHistogram","summary"]),set:m.oneOfSetter(a)}),s.create=function(n){return new s(n)},s.encode=function(n,c){if(c||(c=ee.create()),n.name!=null&&Object.hasOwnProperty.call(n,"name")&&c.uint32(10).string(n.name),n.description!=null&&Object.hasOwnProperty.call(n,"description")&&c.uint32(18).string(n.description),n.unit!=null&&Object.hasOwnProperty.call(n,"unit")&&c.uint32(26).string(n.unit),n.gauge!=null&&Object.hasOwnProperty.call(n,"gauge")&&f.opentelemetry.proto.metrics.v1.Gauge.encode(n.gauge,c.uint32(42).fork()).ldelim(),n.sum!=null&&Object.hasOwnProperty.call(n,"sum")&&f.opentelemetry.proto.metrics.v1.Sum.encode(n.sum,c.uint32(58).fork()).ldelim(),n.histogram!=null&&Object.hasOwnProperty.call(n,"histogram")&&f.opentelemetry.proto.metrics.v1.Histogram.encode(n.histogram,c.uint32(74).fork()).ldelim(),n.exponentialHistogram!=null&&Object.hasOwnProperty.call(n,"exponentialHistogram")&&f.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(n.exponentialHistogram,c.uint32(82).fork()).ldelim(),n.summary!=null&&Object.hasOwnProperty.call(n,"summary")&&f.opentelemetry.proto.metrics.v1.Summary.encode(n.summary,c.uint32(90).fork()).ldelim(),n.metadata!=null&&n.metadata.length)for(var u=0;u<n.metadata.length;++u)f.opentelemetry.proto.common.v1.KeyValue.encode(n.metadata[u],c.uint32(98).fork()).ldelim();return c},s.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},s.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.metrics.v1.Metric;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 1:{d.name=n.string();break}case 2:{d.description=n.string();break}case 3:{d.unit=n.string();break}case 5:{d.gauge=f.opentelemetry.proto.metrics.v1.Gauge.decode(n,n.uint32());break}case 7:{d.sum=f.opentelemetry.proto.metrics.v1.Sum.decode(n,n.uint32());break}case 9:{d.histogram=f.opentelemetry.proto.metrics.v1.Histogram.decode(n,n.uint32());break}case 10:{d.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(n,n.uint32());break}case 11:{d.summary=f.opentelemetry.proto.metrics.v1.Summary.decode(n,n.uint32());break}case 12:{d.metadata&&d.metadata.length||(d.metadata=[]),d.metadata.push(f.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}default:n.skipType(h&7);break}}return d},s.decodeDelimited=function(n){return n instanceof T||(n=new T(n)),this.decode(n,n.uint32())},s.verify=function(n){if(typeof n!="object"||n===null)return"object expected";var c={};if(n.name!=null&&n.hasOwnProperty("name")&&!m.isString(n.name))return"name: string expected";if(n.description!=null&&n.hasOwnProperty("description")&&!m.isString(n.description))return"description: string expected";if(n.unit!=null&&n.hasOwnProperty("unit")&&!m.isString(n.unit))return"unit: string expected";if(n.gauge!=null&&n.hasOwnProperty("gauge")){c.data=1;{var u=f.opentelemetry.proto.metrics.v1.Gauge.verify(n.gauge);if(u)return"gauge."+u}}if(n.sum!=null&&n.hasOwnProperty("sum")){if(c.data===1)return"data: multiple values";c.data=1;{var u=f.opentelemetry.proto.metrics.v1.Sum.verify(n.sum);if(u)return"sum."+u}}if(n.histogram!=null&&n.hasOwnProperty("histogram")){if(c.data===1)return"data: multiple values";c.data=1;{var u=f.opentelemetry.proto.metrics.v1.Histogram.verify(n.histogram);if(u)return"histogram."+u}}if(n.exponentialHistogram!=null&&n.hasOwnProperty("exponentialHistogram")){if(c.data===1)return"data: multiple values";c.data=1;{var u=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(n.exponentialHistogram);if(u)return"exponentialHistogram."+u}}if(n.summary!=null&&n.hasOwnProperty("summary")){if(c.data===1)return"data: multiple values";c.data=1;{var u=f.opentelemetry.proto.metrics.v1.Summary.verify(n.summary);if(u)return"summary."+u}}if(n.metadata!=null&&n.hasOwnProperty("metadata")){if(!Array.isArray(n.metadata))return"metadata: array expected";for(var l=0;l<n.metadata.length;++l){var u=f.opentelemetry.proto.common.v1.KeyValue.verify(n.metadata[l]);if(u)return"metadata."+u}}return null},s.fromObject=function(n){if(n instanceof f.opentelemetry.proto.metrics.v1.Metric)return n;var c=new f.opentelemetry.proto.metrics.v1.Metric;if(n.name!=null&&(c.name=String(n.name)),n.description!=null&&(c.description=String(n.description)),n.unit!=null&&(c.unit=String(n.unit)),n.gauge!=null){if(typeof n.gauge!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");c.gauge=f.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");c.sum=f.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");c.histogram=f.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");c.exponentialHistogram=f.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");c.summary=f.opentelemetry.proto.metrics.v1.Summary.fromObject(n.summary)}if(n.metadata){if(!Array.isArray(n.metadata))throw TypeError(".opentelemetry.proto.metrics.v1.Metric.metadata: array expected");c.metadata=[];for(var u=0;u<n.metadata.length;++u){if(typeof n.metadata[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.metadata: object expected");c.metadata[u]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(n.metadata[u])}}return c},s.toObject=function(n,c){c||(c={});var u={};if((c.arrays||c.defaults)&&(u.metadata=[]),c.defaults&&(u.name="",u.description="",u.unit=""),n.name!=null&&n.hasOwnProperty("name")&&(u.name=n.name),n.description!=null&&n.hasOwnProperty("description")&&(u.description=n.description),n.unit!=null&&n.hasOwnProperty("unit")&&(u.unit=n.unit),n.gauge!=null&&n.hasOwnProperty("gauge")&&(u.gauge=f.opentelemetry.proto.metrics.v1.Gauge.toObject(n.gauge,c),c.oneofs&&(u.data="gauge")),n.sum!=null&&n.hasOwnProperty("sum")&&(u.sum=f.opentelemetry.proto.metrics.v1.Sum.toObject(n.sum,c),c.oneofs&&(u.data="sum")),n.histogram!=null&&n.hasOwnProperty("histogram")&&(u.histogram=f.opentelemetry.proto.metrics.v1.Histogram.toObject(n.histogram,c),c.oneofs&&(u.data="histogram")),n.exponentialHistogram!=null&&n.hasOwnProperty("exponentialHistogram")&&(u.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(n.exponentialHistogram,c),c.oneofs&&(u.data="exponentialHistogram")),n.summary!=null&&n.hasOwnProperty("summary")&&(u.summary=f.opentelemetry.proto.metrics.v1.Summary.toObject(n.summary,c),c.oneofs&&(u.data="summary")),n.metadata&&n.metadata.length){u.metadata=[];for(var l=0;l<n.metadata.length;++l)u.metadata[l]=f.opentelemetry.proto.common.v1.KeyValue.toObject(n.metadata[l],c)}return u},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.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<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.dataPoints=m.emptyArray,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.dataPoints!=null&&i.dataPoints.length)for(var c=0;c<i.dataPoints.length;++c)f.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(i.dataPoints[c],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.metrics.v1.Gauge;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.dataPoints&&l.dataPoints.length||(l.dataPoints=[]),l.dataPoints.push(f.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(i,i.uint32()));break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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<i.dataPoints.length;++n){var c=f.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(i.dataPoints[n]);if(c)return"dataPoints."+c}}return null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.metrics.v1.Gauge)return i;var n=new f.opentelemetry.proto.metrics.v1.Gauge;if(i.dataPoints){if(!Array.isArray(i.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");n.dataPoints=[];for(var c=0;c<i.dataPoints.length;++c){if(typeof i.dataPoints[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");n.dataPoints[c]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(i.dataPoints[c])}}return n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.dataPoints=[]),i.dataPoints&&i.dataPoints.length){c.dataPoints=[];for(var u=0;u<i.dataPoints.length;++u)c.dataPoints[u]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(i.dataPoints[u],n)}return c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.metrics.v1.Gauge"},s})(),o.Sum=(function(){function s(a){if(this.dataPoints=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.dataPoints=m.emptyArray,s.prototype.aggregationTemporality=null,s.prototype.isMonotonic=null,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.dataPoints!=null&&i.dataPoints.length)for(var c=0;c<i.dataPoints.length;++c)f.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(i.dataPoints[c],n.uint32(10).fork()).ldelim();return i.aggregationTemporality!=null&&Object.hasOwnProperty.call(i,"aggregationTemporality")&&n.uint32(16).int32(i.aggregationTemporality),i.isMonotonic!=null&&Object.hasOwnProperty.call(i,"isMonotonic")&&n.uint32(24).bool(i.isMonotonic),n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.metrics.v1.Sum;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.dataPoints&&l.dataPoints.length||(l.dataPoints=[]),l.dataPoints.push(f.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(i,i.uint32()));break}case 2:{l.aggregationTemporality=i.int32();break}case 3:{l.isMonotonic=i.bool();break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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<i.dataPoints.length;++n){var c=f.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(i.dataPoints[n]);if(c)return"dataPoints."+c}}if(i.aggregationTemporality!=null&&i.hasOwnProperty("aggregationTemporality"))switch(i.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return i.isMonotonic!=null&&i.hasOwnProperty("isMonotonic")&&typeof i.isMonotonic!="boolean"?"isMonotonic: boolean expected":null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.metrics.v1.Sum)return i;var n=new f.opentelemetry.proto.metrics.v1.Sum;if(i.dataPoints){if(!Array.isArray(i.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");n.dataPoints=[];for(var c=0;c<i.dataPoints.length;++c){if(typeof i.dataPoints[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");n.dataPoints[c]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(i.dataPoints[c])}}switch(i.aggregationTemporality){default:if(typeof i.aggregationTemporality=="number"){n.aggregationTemporality=i.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:n.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:n.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:n.aggregationTemporality=2;break}return i.isMonotonic!=null&&(n.isMonotonic=!!i.isMonotonic),n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.dataPoints=[]),n.defaults&&(c.aggregationTemporality=n.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,c.isMonotonic=!1),i.dataPoints&&i.dataPoints.length){c.dataPoints=[];for(var u=0;u<i.dataPoints.length;++u)c.dataPoints[u]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(i.dataPoints[u],n)}return i.aggregationTemporality!=null&&i.hasOwnProperty("aggregationTemporality")&&(c.aggregationTemporality=n.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[i.aggregationTemporality]===void 0?i.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[i.aggregationTemporality]:i.aggregationTemporality),i.isMonotonic!=null&&i.hasOwnProperty("isMonotonic")&&(c.isMonotonic=i.isMonotonic),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.metrics.v1.Sum"},s})(),o.Histogram=(function(){function s(a){if(this.dataPoints=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.dataPoints=m.emptyArray,s.prototype.aggregationTemporality=null,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.dataPoints!=null&&i.dataPoints.length)for(var c=0;c<i.dataPoints.length;++c)f.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(i.dataPoints[c],n.uint32(10).fork()).ldelim();return i.aggregationTemporality!=null&&Object.hasOwnProperty.call(i,"aggregationTemporality")&&n.uint32(16).int32(i.aggregationTemporality),n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.metrics.v1.Histogram;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.dataPoints&&l.dataPoints.length||(l.dataPoints=[]),l.dataPoints.push(f.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(i,i.uint32()));break}case 2:{l.aggregationTemporality=i.int32();break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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<i.dataPoints.length;++n){var c=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(i.dataPoints[n]);if(c)return"dataPoints."+c}}if(i.aggregationTemporality!=null&&i.hasOwnProperty("aggregationTemporality"))switch(i.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.metrics.v1.Histogram)return i;var n=new f.opentelemetry.proto.metrics.v1.Histogram;if(i.dataPoints){if(!Array.isArray(i.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");n.dataPoints=[];for(var c=0;c<i.dataPoints.length;++c){if(typeof i.dataPoints[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");n.dataPoints[c]=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(i.dataPoints[c])}}switch(i.aggregationTemporality){default:if(typeof i.aggregationTemporality=="number"){n.aggregationTemporality=i.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:n.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:n.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:n.aggregationTemporality=2;break}return n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.dataPoints=[]),n.defaults&&(c.aggregationTemporality=n.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),i.dataPoints&&i.dataPoints.length){c.dataPoints=[];for(var u=0;u<i.dataPoints.length;++u)c.dataPoints[u]=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(i.dataPoints[u],n)}return i.aggregationTemporality!=null&&i.hasOwnProperty("aggregationTemporality")&&(c.aggregationTemporality=n.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[i.aggregationTemporality]===void 0?i.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[i.aggregationTemporality]:i.aggregationTemporality),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.metrics.v1.Histogram"},s})(),o.ExponentialHistogram=(function(){function s(a){if(this.dataPoints=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.dataPoints=m.emptyArray,s.prototype.aggregationTemporality=null,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.dataPoints!=null&&i.dataPoints.length)for(var c=0;c<i.dataPoints.length;++c)f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(i.dataPoints[c],n.uint32(10).fork()).ldelim();return i.aggregationTemporality!=null&&Object.hasOwnProperty.call(i,"aggregationTemporality")&&n.uint32(16).int32(i.aggregationTemporality),n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.metrics.v1.ExponentialHistogram;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.dataPoints&&l.dataPoints.length||(l.dataPoints=[]),l.dataPoints.push(f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(i,i.uint32()));break}case 2:{l.aggregationTemporality=i.int32();break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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<i.dataPoints.length;++n){var c=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(i.dataPoints[n]);if(c)return"dataPoints."+c}}if(i.aggregationTemporality!=null&&i.hasOwnProperty("aggregationTemporality"))switch(i.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogram)return i;var n=new f.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(i.dataPoints){if(!Array.isArray(i.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");n.dataPoints=[];for(var c=0;c<i.dataPoints.length;++c){if(typeof i.dataPoints[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");n.dataPoints[c]=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(i.dataPoints[c])}}switch(i.aggregationTemporality){default:if(typeof i.aggregationTemporality=="number"){n.aggregationTemporality=i.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:n.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:n.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:n.aggregationTemporality=2;break}return n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.dataPoints=[]),n.defaults&&(c.aggregationTemporality=n.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),i.dataPoints&&i.dataPoints.length){c.dataPoints=[];for(var u=0;u<i.dataPoints.length;++u)c.dataPoints[u]=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(i.dataPoints[u],n)}return i.aggregationTemporality!=null&&i.hasOwnProperty("aggregationTemporality")&&(c.aggregationTemporality=n.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[i.aggregationTemporality]===void 0?i.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[i.aggregationTemporality]:i.aggregationTemporality),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},s})(),o.Summary=(function(){function s(a){if(this.dataPoints=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.dataPoints=m.emptyArray,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.dataPoints!=null&&i.dataPoints.length)for(var c=0;c<i.dataPoints.length;++c)f.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(i.dataPoints[c],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.metrics.v1.Summary;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.dataPoints&&l.dataPoints.length||(l.dataPoints=[]),l.dataPoints.push(f.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(i,i.uint32()));break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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<i.dataPoints.length;++n){var c=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(i.dataPoints[n]);if(c)return"dataPoints."+c}}return null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.metrics.v1.Summary)return i;var n=new f.opentelemetry.proto.metrics.v1.Summary;if(i.dataPoints){if(!Array.isArray(i.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");n.dataPoints=[];for(var c=0;c<i.dataPoints.length;++c){if(typeof i.dataPoints[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");n.dataPoints[c]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(i.dataPoints[c])}}return n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.dataPoints=[]),i.dataPoints&&i.dataPoints.length){c.dataPoints=[];for(var u=0;u<i.dataPoints.length;++u)c.dataPoints[u]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(i.dataPoints[u],n)}return c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.metrics.v1.Summary"},s})(),o.AggregationTemporality=(function(){var s={},a=Object.create(s);return a[s[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,a[s[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,a[s[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,a})(),o.DataPointFlags=(function(){var s={},a=Object.create(s);return a[s[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,a[s[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,a})(),o.NumberDataPoint=(function(){function s(i){if(this.attributes=[],this.exemplars=[],i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}s.prototype.attributes=m.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.asDouble=null,s.prototype.asInt=null,s.prototype.exemplars=m.emptyArray,s.prototype.flags=null;var a;return Object.defineProperty(s.prototype,"value",{get:m.oneOfGetter(a=["asDouble","asInt"]),set:m.oneOfSetter(a)}),s.create=function(n){return new s(n)},s.encode=function(n,c){if(c||(c=ee.create()),n.startTimeUnixNano!=null&&Object.hasOwnProperty.call(n,"startTimeUnixNano")&&c.uint32(17).fixed64(n.startTimeUnixNano),n.timeUnixNano!=null&&Object.hasOwnProperty.call(n,"timeUnixNano")&&c.uint32(25).fixed64(n.timeUnixNano),n.asDouble!=null&&Object.hasOwnProperty.call(n,"asDouble")&&c.uint32(33).double(n.asDouble),n.exemplars!=null&&n.exemplars.length)for(var u=0;u<n.exemplars.length;++u)f.opentelemetry.proto.metrics.v1.Exemplar.encode(n.exemplars[u],c.uint32(42).fork()).ldelim();if(n.asInt!=null&&Object.hasOwnProperty.call(n,"asInt")&&c.uint32(49).sfixed64(n.asInt),n.attributes!=null&&n.attributes.length)for(var u=0;u<n.attributes.length;++u)f.opentelemetry.proto.common.v1.KeyValue.encode(n.attributes[u],c.uint32(58).fork()).ldelim();return n.flags!=null&&Object.hasOwnProperty.call(n,"flags")&&c.uint32(64).uint32(n.flags),c},s.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},s.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.metrics.v1.NumberDataPoint;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 7:{d.attributes&&d.attributes.length||(d.attributes=[]),d.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 2:{d.startTimeUnixNano=n.fixed64();break}case 3:{d.timeUnixNano=n.fixed64();break}case 4:{d.asDouble=n.double();break}case 6:{d.asInt=n.sfixed64();break}case 5:{d.exemplars&&d.exemplars.length||(d.exemplars=[]),d.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(n,n.uint32()));break}case 8:{d.flags=n.uint32();break}default:n.skipType(h&7);break}}return d},s.decodeDelimited=function(n){return n instanceof T||(n=new T(n)),this.decode(n,n.uint32())},s.verify=function(n){if(typeof n!="object"||n===null)return"object expected";var c={};if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var u=0;u<n.attributes.length;++u){var l=f.opentelemetry.proto.common.v1.KeyValue.verify(n.attributes[u]);if(l)return"attributes."+l}}if(n.startTimeUnixNano!=null&&n.hasOwnProperty("startTimeUnixNano")&&!m.isInteger(n.startTimeUnixNano)&&!(n.startTimeUnixNano&&m.isInteger(n.startTimeUnixNano.low)&&m.isInteger(n.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&!m.isInteger(n.timeUnixNano)&&!(n.timeUnixNano&&m.isInteger(n.timeUnixNano.low)&&m.isInteger(n.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(n.asDouble!=null&&n.hasOwnProperty("asDouble")&&(c.value=1,typeof n.asDouble!="number"))return"asDouble: number expected";if(n.asInt!=null&&n.hasOwnProperty("asInt")){if(c.value===1)return"value: multiple values";if(c.value=1,!m.isInteger(n.asInt)&&!(n.asInt&&m.isInteger(n.asInt.low)&&m.isInteger(n.asInt.high)))return"asInt: integer|Long expected"}if(n.exemplars!=null&&n.hasOwnProperty("exemplars")){if(!Array.isArray(n.exemplars))return"exemplars: array expected";for(var u=0;u<n.exemplars.length;++u){var l=f.opentelemetry.proto.metrics.v1.Exemplar.verify(n.exemplars[u]);if(l)return"exemplars."+l}}return n.flags!=null&&n.hasOwnProperty("flags")&&!m.isInteger(n.flags)?"flags: integer expected":null},s.fromObject=function(n){if(n instanceof f.opentelemetry.proto.metrics.v1.NumberDataPoint)return n;var c=new f.opentelemetry.proto.metrics.v1.NumberDataPoint;if(n.attributes){if(!Array.isArray(n.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");c.attributes=[];for(var u=0;u<n.attributes.length;++u){if(typeof n.attributes[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");c.attributes[u]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(n.attributes[u])}}if(n.startTimeUnixNano!=null&&(m.Long?(c.startTimeUnixNano=m.Long.fromValue(n.startTimeUnixNano)).unsigned=!1:typeof n.startTimeUnixNano=="string"?c.startTimeUnixNano=parseInt(n.startTimeUnixNano,10):typeof n.startTimeUnixNano=="number"?c.startTimeUnixNano=n.startTimeUnixNano:typeof n.startTimeUnixNano=="object"&&(c.startTimeUnixNano=new m.LongBits(n.startTimeUnixNano.low>>>0,n.startTimeUnixNano.high>>>0).toNumber())),n.timeUnixNano!=null&&(m.Long?(c.timeUnixNano=m.Long.fromValue(n.timeUnixNano)).unsigned=!1:typeof n.timeUnixNano=="string"?c.timeUnixNano=parseInt(n.timeUnixNano,10):typeof n.timeUnixNano=="number"?c.timeUnixNano=n.timeUnixNano:typeof n.timeUnixNano=="object"&&(c.timeUnixNano=new m.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber())),n.asDouble!=null&&(c.asDouble=Number(n.asDouble)),n.asInt!=null&&(m.Long?(c.asInt=m.Long.fromValue(n.asInt)).unsigned=!1:typeof n.asInt=="string"?c.asInt=parseInt(n.asInt,10):typeof n.asInt=="number"?c.asInt=n.asInt:typeof n.asInt=="object"&&(c.asInt=new m.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");c.exemplars=[];for(var u=0;u<n.exemplars.length;++u){if(typeof n.exemplars[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");c.exemplars[u]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(n.exemplars[u])}}return n.flags!=null&&(c.flags=n.flags>>>0),c},s.toObject=function(n,c){c||(c={});var u={};if((c.arrays||c.defaults)&&(u.exemplars=[],u.attributes=[]),c.defaults){if(m.Long){var l=new m.Long(0,0,!1);u.startTimeUnixNano=c.longs===String?l.toString():c.longs===Number?l.toNumber():l}else u.startTimeUnixNano=c.longs===String?"0":0;if(m.Long){var l=new m.Long(0,0,!1);u.timeUnixNano=c.longs===String?l.toString():c.longs===Number?l.toNumber():l}else u.timeUnixNano=c.longs===String?"0":0;u.flags=0}if(n.startTimeUnixNano!=null&&n.hasOwnProperty("startTimeUnixNano")&&(typeof n.startTimeUnixNano=="number"?u.startTimeUnixNano=c.longs===String?String(n.startTimeUnixNano):n.startTimeUnixNano:u.startTimeUnixNano=c.longs===String?m.Long.prototype.toString.call(n.startTimeUnixNano):c.longs===Number?new m.LongBits(n.startTimeUnixNano.low>>>0,n.startTimeUnixNano.high>>>0).toNumber():n.startTimeUnixNano),n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&(typeof n.timeUnixNano=="number"?u.timeUnixNano=c.longs===String?String(n.timeUnixNano):n.timeUnixNano:u.timeUnixNano=c.longs===String?m.Long.prototype.toString.call(n.timeUnixNano):c.longs===Number?new m.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber():n.timeUnixNano),n.asDouble!=null&&n.hasOwnProperty("asDouble")&&(u.asDouble=c.json&&!isFinite(n.asDouble)?String(n.asDouble):n.asDouble,c.oneofs&&(u.value="asDouble")),n.exemplars&&n.exemplars.length){u.exemplars=[];for(var d=0;d<n.exemplars.length;++d)u.exemplars[d]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(n.exemplars[d],c)}if(n.asInt!=null&&n.hasOwnProperty("asInt")&&(typeof n.asInt=="number"?u.asInt=c.longs===String?String(n.asInt):n.asInt:u.asInt=c.longs===String?m.Long.prototype.toString.call(n.asInt):c.longs===Number?new m.LongBits(n.asInt.low>>>0,n.asInt.high>>>0).toNumber():n.asInt,c.oneofs&&(u.value="asInt")),n.attributes&&n.attributes.length){u.attributes=[];for(var d=0;d<n.attributes.length;++d)u.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(n.attributes[d],c)}return n.flags!=null&&n.hasOwnProperty("flags")&&(u.flags=n.flags),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},s})(),o.HistogramDataPoint=(function(){function s(i){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}s.prototype.attributes=m.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.count=null,s.prototype.sum=null,s.prototype.bucketCounts=m.emptyArray,s.prototype.explicitBounds=m.emptyArray,s.prototype.exemplars=m.emptyArray,s.prototype.flags=null,s.prototype.min=null,s.prototype.max=null;var a;return Object.defineProperty(s.prototype,"_sum",{get:m.oneOfGetter(a=["sum"]),set:m.oneOfSetter(a)}),Object.defineProperty(s.prototype,"_min",{get:m.oneOfGetter(a=["min"]),set:m.oneOfSetter(a)}),Object.defineProperty(s.prototype,"_max",{get:m.oneOfGetter(a=["max"]),set:m.oneOfSetter(a)}),s.create=function(n){return new s(n)},s.encode=function(n,c){if(c||(c=ee.create()),n.startTimeUnixNano!=null&&Object.hasOwnProperty.call(n,"startTimeUnixNano")&&c.uint32(17).fixed64(n.startTimeUnixNano),n.timeUnixNano!=null&&Object.hasOwnProperty.call(n,"timeUnixNano")&&c.uint32(25).fixed64(n.timeUnixNano),n.count!=null&&Object.hasOwnProperty.call(n,"count")&&c.uint32(33).fixed64(n.count),n.sum!=null&&Object.hasOwnProperty.call(n,"sum")&&c.uint32(41).double(n.sum),n.bucketCounts!=null&&n.bucketCounts.length){c.uint32(50).fork();for(var u=0;u<n.bucketCounts.length;++u)c.fixed64(n.bucketCounts[u]);c.ldelim()}if(n.explicitBounds!=null&&n.explicitBounds.length){c.uint32(58).fork();for(var u=0;u<n.explicitBounds.length;++u)c.double(n.explicitBounds[u]);c.ldelim()}if(n.exemplars!=null&&n.exemplars.length)for(var u=0;u<n.exemplars.length;++u)f.opentelemetry.proto.metrics.v1.Exemplar.encode(n.exemplars[u],c.uint32(66).fork()).ldelim();if(n.attributes!=null&&n.attributes.length)for(var u=0;u<n.attributes.length;++u)f.opentelemetry.proto.common.v1.KeyValue.encode(n.attributes[u],c.uint32(74).fork()).ldelim();return n.flags!=null&&Object.hasOwnProperty.call(n,"flags")&&c.uint32(80).uint32(n.flags),n.min!=null&&Object.hasOwnProperty.call(n,"min")&&c.uint32(89).double(n.min),n.max!=null&&Object.hasOwnProperty.call(n,"max")&&c.uint32(97).double(n.max),c},s.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},s.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.metrics.v1.HistogramDataPoint;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 9:{d.attributes&&d.attributes.length||(d.attributes=[]),d.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 2:{d.startTimeUnixNano=n.fixed64();break}case 3:{d.timeUnixNano=n.fixed64();break}case 4:{d.count=n.fixed64();break}case 5:{d.sum=n.double();break}case 6:{if(d.bucketCounts&&d.bucketCounts.length||(d.bucketCounts=[]),(h&7)===2)for(var g=n.uint32()+n.pos;n.pos<g;)d.bucketCounts.push(n.fixed64());else d.bucketCounts.push(n.fixed64());break}case 7:{if(d.explicitBounds&&d.explicitBounds.length||(d.explicitBounds=[]),(h&7)===2)for(var g=n.uint32()+n.pos;n.pos<g;)d.explicitBounds.push(n.double());else d.explicitBounds.push(n.double());break}case 8:{d.exemplars&&d.exemplars.length||(d.exemplars=[]),d.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(n,n.uint32()));break}case 10:{d.flags=n.uint32();break}case 11:{d.min=n.double();break}case 12:{d.max=n.double();break}default:n.skipType(h&7);break}}return d},s.decodeDelimited=function(n){return n instanceof T||(n=new T(n)),this.decode(n,n.uint32())},s.verify=function(n){if(typeof n!="object"||n===null)return"object expected";var c={};if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var u=0;u<n.attributes.length;++u){var l=f.opentelemetry.proto.common.v1.KeyValue.verify(n.attributes[u]);if(l)return"attributes."+l}}if(n.startTimeUnixNano!=null&&n.hasOwnProperty("startTimeUnixNano")&&!m.isInteger(n.startTimeUnixNano)&&!(n.startTimeUnixNano&&m.isInteger(n.startTimeUnixNano.low)&&m.isInteger(n.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&!m.isInteger(n.timeUnixNano)&&!(n.timeUnixNano&&m.isInteger(n.timeUnixNano.low)&&m.isInteger(n.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(n.count!=null&&n.hasOwnProperty("count")&&!m.isInteger(n.count)&&!(n.count&&m.isInteger(n.count.low)&&m.isInteger(n.count.high)))return"count: integer|Long expected";if(n.sum!=null&&n.hasOwnProperty("sum")&&(c._sum=1,typeof n.sum!="number"))return"sum: number expected";if(n.bucketCounts!=null&&n.hasOwnProperty("bucketCounts")){if(!Array.isArray(n.bucketCounts))return"bucketCounts: array expected";for(var u=0;u<n.bucketCounts.length;++u)if(!m.isInteger(n.bucketCounts[u])&&!(n.bucketCounts[u]&&m.isInteger(n.bucketCounts[u].low)&&m.isInteger(n.bucketCounts[u].high)))return"bucketCounts: integer|Long[] expected"}if(n.explicitBounds!=null&&n.hasOwnProperty("explicitBounds")){if(!Array.isArray(n.explicitBounds))return"explicitBounds: array expected";for(var u=0;u<n.explicitBounds.length;++u)if(typeof n.explicitBounds[u]!="number")return"explicitBounds: number[] expected"}if(n.exemplars!=null&&n.hasOwnProperty("exemplars")){if(!Array.isArray(n.exemplars))return"exemplars: array expected";for(var u=0;u<n.exemplars.length;++u){var l=f.opentelemetry.proto.metrics.v1.Exemplar.verify(n.exemplars[u]);if(l)return"exemplars."+l}}return n.flags!=null&&n.hasOwnProperty("flags")&&!m.isInteger(n.flags)?"flags: integer expected":n.min!=null&&n.hasOwnProperty("min")&&(c._min=1,typeof n.min!="number")?"min: number expected":n.max!=null&&n.hasOwnProperty("max")&&(c._max=1,typeof n.max!="number")?"max: number expected":null},s.fromObject=function(n){if(n instanceof f.opentelemetry.proto.metrics.v1.HistogramDataPoint)return n;var c=new f.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(n.attributes){if(!Array.isArray(n.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");c.attributes=[];for(var u=0;u<n.attributes.length;++u){if(typeof n.attributes[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");c.attributes[u]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(n.attributes[u])}}if(n.startTimeUnixNano!=null&&(m.Long?(c.startTimeUnixNano=m.Long.fromValue(n.startTimeUnixNano)).unsigned=!1:typeof n.startTimeUnixNano=="string"?c.startTimeUnixNano=parseInt(n.startTimeUnixNano,10):typeof n.startTimeUnixNano=="number"?c.startTimeUnixNano=n.startTimeUnixNano:typeof n.startTimeUnixNano=="object"&&(c.startTimeUnixNano=new m.LongBits(n.startTimeUnixNano.low>>>0,n.startTimeUnixNano.high>>>0).toNumber())),n.timeUnixNano!=null&&(m.Long?(c.timeUnixNano=m.Long.fromValue(n.timeUnixNano)).unsigned=!1:typeof n.timeUnixNano=="string"?c.timeUnixNano=parseInt(n.timeUnixNano,10):typeof n.timeUnixNano=="number"?c.timeUnixNano=n.timeUnixNano:typeof n.timeUnixNano=="object"&&(c.timeUnixNano=new m.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber())),n.count!=null&&(m.Long?(c.count=m.Long.fromValue(n.count)).unsigned=!1:typeof n.count=="string"?c.count=parseInt(n.count,10):typeof n.count=="number"?c.count=n.count:typeof n.count=="object"&&(c.count=new m.LongBits(n.count.low>>>0,n.count.high>>>0).toNumber())),n.sum!=null&&(c.sum=Number(n.sum)),n.bucketCounts){if(!Array.isArray(n.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");c.bucketCounts=[];for(var u=0;u<n.bucketCounts.length;++u)m.Long?(c.bucketCounts[u]=m.Long.fromValue(n.bucketCounts[u])).unsigned=!1:typeof n.bucketCounts[u]=="string"?c.bucketCounts[u]=parseInt(n.bucketCounts[u],10):typeof n.bucketCounts[u]=="number"?c.bucketCounts[u]=n.bucketCounts[u]:typeof n.bucketCounts[u]=="object"&&(c.bucketCounts[u]=new m.LongBits(n.bucketCounts[u].low>>>0,n.bucketCounts[u].high>>>0).toNumber())}if(n.explicitBounds){if(!Array.isArray(n.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");c.explicitBounds=[];for(var u=0;u<n.explicitBounds.length;++u)c.explicitBounds[u]=Number(n.explicitBounds[u])}if(n.exemplars){if(!Array.isArray(n.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");c.exemplars=[];for(var u=0;u<n.exemplars.length;++u){if(typeof n.exemplars[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");c.exemplars[u]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(n.exemplars[u])}}return n.flags!=null&&(c.flags=n.flags>>>0),n.min!=null&&(c.min=Number(n.min)),n.max!=null&&(c.max=Number(n.max)),c},s.toObject=function(n,c){c||(c={});var u={};if((c.arrays||c.defaults)&&(u.bucketCounts=[],u.explicitBounds=[],u.exemplars=[],u.attributes=[]),c.defaults){if(m.Long){var l=new m.Long(0,0,!1);u.startTimeUnixNano=c.longs===String?l.toString():c.longs===Number?l.toNumber():l}else u.startTimeUnixNano=c.longs===String?"0":0;if(m.Long){var l=new m.Long(0,0,!1);u.timeUnixNano=c.longs===String?l.toString():c.longs===Number?l.toNumber():l}else u.timeUnixNano=c.longs===String?"0":0;if(m.Long){var l=new m.Long(0,0,!1);u.count=c.longs===String?l.toString():c.longs===Number?l.toNumber():l}else u.count=c.longs===String?"0":0;u.flags=0}if(n.startTimeUnixNano!=null&&n.hasOwnProperty("startTimeUnixNano")&&(typeof n.startTimeUnixNano=="number"?u.startTimeUnixNano=c.longs===String?String(n.startTimeUnixNano):n.startTimeUnixNano:u.startTimeUnixNano=c.longs===String?m.Long.prototype.toString.call(n.startTimeUnixNano):c.longs===Number?new m.LongBits(n.startTimeUnixNano.low>>>0,n.startTimeUnixNano.high>>>0).toNumber():n.startTimeUnixNano),n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&(typeof n.timeUnixNano=="number"?u.timeUnixNano=c.longs===String?String(n.timeUnixNano):n.timeUnixNano:u.timeUnixNano=c.longs===String?m.Long.prototype.toString.call(n.timeUnixNano):c.longs===Number?new m.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber():n.timeUnixNano),n.count!=null&&n.hasOwnProperty("count")&&(typeof n.count=="number"?u.count=c.longs===String?String(n.count):n.count:u.count=c.longs===String?m.Long.prototype.toString.call(n.count):c.longs===Number?new m.LongBits(n.count.low>>>0,n.count.high>>>0).toNumber():n.count),n.sum!=null&&n.hasOwnProperty("sum")&&(u.sum=c.json&&!isFinite(n.sum)?String(n.sum):n.sum,c.oneofs&&(u._sum="sum")),n.bucketCounts&&n.bucketCounts.length){u.bucketCounts=[];for(var d=0;d<n.bucketCounts.length;++d)typeof n.bucketCounts[d]=="number"?u.bucketCounts[d]=c.longs===String?String(n.bucketCounts[d]):n.bucketCounts[d]:u.bucketCounts[d]=c.longs===String?m.Long.prototype.toString.call(n.bucketCounts[d]):c.longs===Number?new m.LongBits(n.bucketCounts[d].low>>>0,n.bucketCounts[d].high>>>0).toNumber():n.bucketCounts[d]}if(n.explicitBounds&&n.explicitBounds.length){u.explicitBounds=[];for(var d=0;d<n.explicitBounds.length;++d)u.explicitBounds[d]=c.json&&!isFinite(n.explicitBounds[d])?String(n.explicitBounds[d]):n.explicitBounds[d]}if(n.exemplars&&n.exemplars.length){u.exemplars=[];for(var d=0;d<n.exemplars.length;++d)u.exemplars[d]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(n.exemplars[d],c)}if(n.attributes&&n.attributes.length){u.attributes=[];for(var d=0;d<n.attributes.length;++d)u.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(n.attributes[d],c)}return n.flags!=null&&n.hasOwnProperty("flags")&&(u.flags=n.flags),n.min!=null&&n.hasOwnProperty("min")&&(u.min=c.json&&!isFinite(n.min)?String(n.min):n.min,c.oneofs&&(u._min="min")),n.max!=null&&n.hasOwnProperty("max")&&(u.max=c.json&&!isFinite(n.max)?String(n.max):n.max,c.oneofs&&(u._max="max")),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},s})(),o.ExponentialHistogramDataPoint=(function(){function s(i){if(this.attributes=[],this.exemplars=[],i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}s.prototype.attributes=m.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.count=null,s.prototype.sum=null,s.prototype.scale=null,s.prototype.zeroCount=null,s.prototype.positive=null,s.prototype.negative=null,s.prototype.flags=null,s.prototype.exemplars=m.emptyArray,s.prototype.min=null,s.prototype.max=null,s.prototype.zeroThreshold=null;var a;return Object.defineProperty(s.prototype,"_sum",{get:m.oneOfGetter(a=["sum"]),set:m.oneOfSetter(a)}),Object.defineProperty(s.prototype,"_min",{get:m.oneOfGetter(a=["min"]),set:m.oneOfSetter(a)}),Object.defineProperty(s.prototype,"_max",{get:m.oneOfGetter(a=["max"]),set:m.oneOfSetter(a)}),s.create=function(n){return new s(n)},s.encode=function(n,c){if(c||(c=ee.create()),n.attributes!=null&&n.attributes.length)for(var u=0;u<n.attributes.length;++u)f.opentelemetry.proto.common.v1.KeyValue.encode(n.attributes[u],c.uint32(10).fork()).ldelim();if(n.startTimeUnixNano!=null&&Object.hasOwnProperty.call(n,"startTimeUnixNano")&&c.uint32(17).fixed64(n.startTimeUnixNano),n.timeUnixNano!=null&&Object.hasOwnProperty.call(n,"timeUnixNano")&&c.uint32(25).fixed64(n.timeUnixNano),n.count!=null&&Object.hasOwnProperty.call(n,"count")&&c.uint32(33).fixed64(n.count),n.sum!=null&&Object.hasOwnProperty.call(n,"sum")&&c.uint32(41).double(n.sum),n.scale!=null&&Object.hasOwnProperty.call(n,"scale")&&c.uint32(48).sint32(n.scale),n.zeroCount!=null&&Object.hasOwnProperty.call(n,"zeroCount")&&c.uint32(57).fixed64(n.zeroCount),n.positive!=null&&Object.hasOwnProperty.call(n,"positive")&&f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(n.positive,c.uint32(66).fork()).ldelim(),n.negative!=null&&Object.hasOwnProperty.call(n,"negative")&&f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(n.negative,c.uint32(74).fork()).ldelim(),n.flags!=null&&Object.hasOwnProperty.call(n,"flags")&&c.uint32(80).uint32(n.flags),n.exemplars!=null&&n.exemplars.length)for(var u=0;u<n.exemplars.length;++u)f.opentelemetry.proto.metrics.v1.Exemplar.encode(n.exemplars[u],c.uint32(90).fork()).ldelim();return n.min!=null&&Object.hasOwnProperty.call(n,"min")&&c.uint32(97).double(n.min),n.max!=null&&Object.hasOwnProperty.call(n,"max")&&c.uint32(105).double(n.max),n.zeroThreshold!=null&&Object.hasOwnProperty.call(n,"zeroThreshold")&&c.uint32(113).double(n.zeroThreshold),c},s.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},s.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 1:{d.attributes&&d.attributes.length||(d.attributes=[]),d.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 2:{d.startTimeUnixNano=n.fixed64();break}case 3:{d.timeUnixNano=n.fixed64();break}case 4:{d.count=n.fixed64();break}case 5:{d.sum=n.double();break}case 6:{d.scale=n.sint32();break}case 7:{d.zeroCount=n.fixed64();break}case 8:{d.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(n,n.uint32());break}case 9:{d.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(n,n.uint32());break}case 10:{d.flags=n.uint32();break}case 11:{d.exemplars&&d.exemplars.length||(d.exemplars=[]),d.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(n,n.uint32()));break}case 12:{d.min=n.double();break}case 13:{d.max=n.double();break}case 14:{d.zeroThreshold=n.double();break}default:n.skipType(h&7);break}}return d},s.decodeDelimited=function(n){return n instanceof T||(n=new T(n)),this.decode(n,n.uint32())},s.verify=function(n){if(typeof n!="object"||n===null)return"object expected";var c={};if(n.attributes!=null&&n.hasOwnProperty("attributes")){if(!Array.isArray(n.attributes))return"attributes: array expected";for(var u=0;u<n.attributes.length;++u){var l=f.opentelemetry.proto.common.v1.KeyValue.verify(n.attributes[u]);if(l)return"attributes."+l}}if(n.startTimeUnixNano!=null&&n.hasOwnProperty("startTimeUnixNano")&&!m.isInteger(n.startTimeUnixNano)&&!(n.startTimeUnixNano&&m.isInteger(n.startTimeUnixNano.low)&&m.isInteger(n.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&!m.isInteger(n.timeUnixNano)&&!(n.timeUnixNano&&m.isInteger(n.timeUnixNano.low)&&m.isInteger(n.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(n.count!=null&&n.hasOwnProperty("count")&&!m.isInteger(n.count)&&!(n.count&&m.isInteger(n.count.low)&&m.isInteger(n.count.high)))return"count: integer|Long expected";if(n.sum!=null&&n.hasOwnProperty("sum")&&(c._sum=1,typeof n.sum!="number"))return"sum: number expected";if(n.scale!=null&&n.hasOwnProperty("scale")&&!m.isInteger(n.scale))return"scale: integer expected";if(n.zeroCount!=null&&n.hasOwnProperty("zeroCount")&&!m.isInteger(n.zeroCount)&&!(n.zeroCount&&m.isInteger(n.zeroCount.low)&&m.isInteger(n.zeroCount.high)))return"zeroCount: integer|Long expected";if(n.positive!=null&&n.hasOwnProperty("positive")){var l=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(n.positive);if(l)return"positive."+l}if(n.negative!=null&&n.hasOwnProperty("negative")){var l=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(n.negative);if(l)return"negative."+l}if(n.flags!=null&&n.hasOwnProperty("flags")&&!m.isInteger(n.flags))return"flags: integer expected";if(n.exemplars!=null&&n.hasOwnProperty("exemplars")){if(!Array.isArray(n.exemplars))return"exemplars: array expected";for(var u=0;u<n.exemplars.length;++u){var l=f.opentelemetry.proto.metrics.v1.Exemplar.verify(n.exemplars[u]);if(l)return"exemplars."+l}}return n.min!=null&&n.hasOwnProperty("min")&&(c._min=1,typeof n.min!="number")?"min: number expected":n.max!=null&&n.hasOwnProperty("max")&&(c._max=1,typeof n.max!="number")?"max: number expected":n.zeroThreshold!=null&&n.hasOwnProperty("zeroThreshold")&&typeof n.zeroThreshold!="number"?"zeroThreshold: number expected":null},s.fromObject=function(n){if(n instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return n;var c=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(n.attributes){if(!Array.isArray(n.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");c.attributes=[];for(var u=0;u<n.attributes.length;++u){if(typeof n.attributes[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");c.attributes[u]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(n.attributes[u])}}if(n.startTimeUnixNano!=null&&(m.Long?(c.startTimeUnixNano=m.Long.fromValue(n.startTimeUnixNano)).unsigned=!1:typeof n.startTimeUnixNano=="string"?c.startTimeUnixNano=parseInt(n.startTimeUnixNano,10):typeof n.startTimeUnixNano=="number"?c.startTimeUnixNano=n.startTimeUnixNano:typeof n.startTimeUnixNano=="object"&&(c.startTimeUnixNano=new m.LongBits(n.startTimeUnixNano.low>>>0,n.startTimeUnixNano.high>>>0).toNumber())),n.timeUnixNano!=null&&(m.Long?(c.timeUnixNano=m.Long.fromValue(n.timeUnixNano)).unsigned=!1:typeof n.timeUnixNano=="string"?c.timeUnixNano=parseInt(n.timeUnixNano,10):typeof n.timeUnixNano=="number"?c.timeUnixNano=n.timeUnixNano:typeof n.timeUnixNano=="object"&&(c.timeUnixNano=new m.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber())),n.count!=null&&(m.Long?(c.count=m.Long.fromValue(n.count)).unsigned=!1:typeof n.count=="string"?c.count=parseInt(n.count,10):typeof n.count=="number"?c.count=n.count:typeof n.count=="object"&&(c.count=new m.LongBits(n.count.low>>>0,n.count.high>>>0).toNumber())),n.sum!=null&&(c.sum=Number(n.sum)),n.scale!=null&&(c.scale=n.scale|0),n.zeroCount!=null&&(m.Long?(c.zeroCount=m.Long.fromValue(n.zeroCount)).unsigned=!1:typeof n.zeroCount=="string"?c.zeroCount=parseInt(n.zeroCount,10):typeof n.zeroCount=="number"?c.zeroCount=n.zeroCount:typeof n.zeroCount=="object"&&(c.zeroCount=new m.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");c.positive=f.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");c.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(n.negative)}if(n.flags!=null&&(c.flags=n.flags>>>0),n.exemplars){if(!Array.isArray(n.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");c.exemplars=[];for(var u=0;u<n.exemplars.length;++u){if(typeof n.exemplars[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");c.exemplars[u]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(n.exemplars[u])}}return n.min!=null&&(c.min=Number(n.min)),n.max!=null&&(c.max=Number(n.max)),n.zeroThreshold!=null&&(c.zeroThreshold=Number(n.zeroThreshold)),c},s.toObject=function(n,c){c||(c={});var u={};if((c.arrays||c.defaults)&&(u.attributes=[],u.exemplars=[]),c.defaults){if(m.Long){var l=new m.Long(0,0,!1);u.startTimeUnixNano=c.longs===String?l.toString():c.longs===Number?l.toNumber():l}else u.startTimeUnixNano=c.longs===String?"0":0;if(m.Long){var l=new m.Long(0,0,!1);u.timeUnixNano=c.longs===String?l.toString():c.longs===Number?l.toNumber():l}else u.timeUnixNano=c.longs===String?"0":0;if(m.Long){var l=new m.Long(0,0,!1);u.count=c.longs===String?l.toString():c.longs===Number?l.toNumber():l}else u.count=c.longs===String?"0":0;if(u.scale=0,m.Long){var l=new m.Long(0,0,!1);u.zeroCount=c.longs===String?l.toString():c.longs===Number?l.toNumber():l}else u.zeroCount=c.longs===String?"0":0;u.positive=null,u.negative=null,u.flags=0,u.zeroThreshold=0}if(n.attributes&&n.attributes.length){u.attributes=[];for(var d=0;d<n.attributes.length;++d)u.attributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(n.attributes[d],c)}if(n.startTimeUnixNano!=null&&n.hasOwnProperty("startTimeUnixNano")&&(typeof n.startTimeUnixNano=="number"?u.startTimeUnixNano=c.longs===String?String(n.startTimeUnixNano):n.startTimeUnixNano:u.startTimeUnixNano=c.longs===String?m.Long.prototype.toString.call(n.startTimeUnixNano):c.longs===Number?new m.LongBits(n.startTimeUnixNano.low>>>0,n.startTimeUnixNano.high>>>0).toNumber():n.startTimeUnixNano),n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&(typeof n.timeUnixNano=="number"?u.timeUnixNano=c.longs===String?String(n.timeUnixNano):n.timeUnixNano:u.timeUnixNano=c.longs===String?m.Long.prototype.toString.call(n.timeUnixNano):c.longs===Number?new m.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber():n.timeUnixNano),n.count!=null&&n.hasOwnProperty("count")&&(typeof n.count=="number"?u.count=c.longs===String?String(n.count):n.count:u.count=c.longs===String?m.Long.prototype.toString.call(n.count):c.longs===Number?new m.LongBits(n.count.low>>>0,n.count.high>>>0).toNumber():n.count),n.sum!=null&&n.hasOwnProperty("sum")&&(u.sum=c.json&&!isFinite(n.sum)?String(n.sum):n.sum,c.oneofs&&(u._sum="sum")),n.scale!=null&&n.hasOwnProperty("scale")&&(u.scale=n.scale),n.zeroCount!=null&&n.hasOwnProperty("zeroCount")&&(typeof n.zeroCount=="number"?u.zeroCount=c.longs===String?String(n.zeroCount):n.zeroCount:u.zeroCount=c.longs===String?m.Long.prototype.toString.call(n.zeroCount):c.longs===Number?new m.LongBits(n.zeroCount.low>>>0,n.zeroCount.high>>>0).toNumber():n.zeroCount),n.positive!=null&&n.hasOwnProperty("positive")&&(u.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(n.positive,c)),n.negative!=null&&n.hasOwnProperty("negative")&&(u.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(n.negative,c)),n.flags!=null&&n.hasOwnProperty("flags")&&(u.flags=n.flags),n.exemplars&&n.exemplars.length){u.exemplars=[];for(var d=0;d<n.exemplars.length;++d)u.exemplars[d]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(n.exemplars[d],c)}return n.min!=null&&n.hasOwnProperty("min")&&(u.min=c.json&&!isFinite(n.min)?String(n.min):n.min,c.oneofs&&(u._min="min")),n.max!=null&&n.hasOwnProperty("max")&&(u.max=c.json&&!isFinite(n.max)?String(n.max):n.max,c.oneofs&&(u._max="max")),n.zeroThreshold!=null&&n.hasOwnProperty("zeroThreshold")&&(u.zeroThreshold=c.json&&!isFinite(n.zeroThreshold)?String(n.zeroThreshold):n.zeroThreshold),u},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},s.Buckets=(function(){function i(n){if(this.bucketCounts=[],n)for(var c=Object.keys(n),u=0;u<c.length;++u)n[c[u]]!=null&&(this[c[u]]=n[c[u]])}return i.prototype.offset=null,i.prototype.bucketCounts=m.emptyArray,i.create=function(c){return new i(c)},i.encode=function(c,u){if(u||(u=ee.create()),c.offset!=null&&Object.hasOwnProperty.call(c,"offset")&&u.uint32(8).sint32(c.offset),c.bucketCounts!=null&&c.bucketCounts.length){u.uint32(18).fork();for(var l=0;l<c.bucketCounts.length;++l)u.uint64(c.bucketCounts[l]);u.ldelim()}return u},i.encodeDelimited=function(c,u){return this.encode(c,u).ldelim()},i.decode=function(c,u,l){c instanceof T||(c=T.create(c));for(var d=u===void 0?c.len:c.pos+u,h=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;c.pos<d;){var g=c.uint32();if(g===l)break;switch(g>>>3){case 1:{h.offset=c.sint32();break}case 2:{if(h.bucketCounts&&h.bucketCounts.length||(h.bucketCounts=[]),(g&7)===2)for(var E=c.uint32()+c.pos;c.pos<E;)h.bucketCounts.push(c.uint64());else h.bucketCounts.push(c.uint64());break}default:c.skipType(g&7);break}}return h},i.decodeDelimited=function(c){return c instanceof T||(c=new T(c)),this.decode(c,c.uint32())},i.verify=function(c){if(typeof c!="object"||c===null)return"object expected";if(c.offset!=null&&c.hasOwnProperty("offset")&&!m.isInteger(c.offset))return"offset: integer expected";if(c.bucketCounts!=null&&c.hasOwnProperty("bucketCounts")){if(!Array.isArray(c.bucketCounts))return"bucketCounts: array expected";for(var u=0;u<c.bucketCounts.length;++u)if(!m.isInteger(c.bucketCounts[u])&&!(c.bucketCounts[u]&&m.isInteger(c.bucketCounts[u].low)&&m.isInteger(c.bucketCounts[u].high)))return"bucketCounts: integer|Long[] expected"}return null},i.fromObject=function(c){if(c instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return c;var u=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(c.offset!=null&&(u.offset=c.offset|0),c.bucketCounts){if(!Array.isArray(c.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");u.bucketCounts=[];for(var l=0;l<c.bucketCounts.length;++l)m.Long?(u.bucketCounts[l]=m.Long.fromValue(c.bucketCounts[l])).unsigned=!0:typeof c.bucketCounts[l]=="string"?u.bucketCounts[l]=parseInt(c.bucketCounts[l],10):typeof c.bucketCounts[l]=="number"?u.bucketCounts[l]=c.bucketCounts[l]:typeof c.bucketCounts[l]=="object"&&(u.bucketCounts[l]=new m.LongBits(c.bucketCounts[l].low>>>0,c.bucketCounts[l].high>>>0).toNumber(!0))}return u},i.toObject=function(c,u){u||(u={});var l={};if((u.arrays||u.defaults)&&(l.bucketCounts=[]),u.defaults&&(l.offset=0),c.offset!=null&&c.hasOwnProperty("offset")&&(l.offset=c.offset),c.bucketCounts&&c.bucketCounts.length){l.bucketCounts=[];for(var d=0;d<c.bucketCounts.length;++d)typeof c.bucketCounts[d]=="number"?l.bucketCounts[d]=u.longs===String?String(c.bucketCounts[d]):c.bucketCounts[d]:l.bucketCounts[d]=u.longs===String?m.Long.prototype.toString.call(c.bucketCounts[d]):u.longs===Number?new m.LongBits(c.bucketCounts[d].low>>>0,c.bucketCounts[d].high>>>0).toNumber(!0):c.bucketCounts[d]}return l},i.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},i.getTypeUrl=function(c){return c===void 0&&(c="type.googleapis.com"),c+"/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<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.attributes=m.emptyArray,s.prototype.startTimeUnixNano=null,s.prototype.timeUnixNano=null,s.prototype.count=null,s.prototype.sum=null,s.prototype.quantileValues=m.emptyArray,s.prototype.flags=null,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.startTimeUnixNano!=null&&Object.hasOwnProperty.call(i,"startTimeUnixNano")&&n.uint32(17).fixed64(i.startTimeUnixNano),i.timeUnixNano!=null&&Object.hasOwnProperty.call(i,"timeUnixNano")&&n.uint32(25).fixed64(i.timeUnixNano),i.count!=null&&Object.hasOwnProperty.call(i,"count")&&n.uint32(33).fixed64(i.count),i.sum!=null&&Object.hasOwnProperty.call(i,"sum")&&n.uint32(41).double(i.sum),i.quantileValues!=null&&i.quantileValues.length)for(var c=0;c<i.quantileValues.length;++c)f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(i.quantileValues[c],n.uint32(50).fork()).ldelim();if(i.attributes!=null&&i.attributes.length)for(var c=0;c<i.attributes.length;++c)f.opentelemetry.proto.common.v1.KeyValue.encode(i.attributes[c],n.uint32(58).fork()).ldelim();return i.flags!=null&&Object.hasOwnProperty.call(i,"flags")&&n.uint32(64).uint32(i.flags),n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 7:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break}case 2:{l.startTimeUnixNano=i.fixed64();break}case 3:{l.timeUnixNano=i.fixed64();break}case 4:{l.count=i.fixed64();break}case 5:{l.sum=i.double();break}case 6:{l.quantileValues&&l.quantileValues.length||(l.quantileValues=[]),l.quantileValues.push(f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(i,i.uint32()));break}case 8:{l.flags=i.uint32();break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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<i.attributes.length;++n){var c=f.opentelemetry.proto.common.v1.KeyValue.verify(i.attributes[n]);if(c)return"attributes."+c}}if(i.startTimeUnixNano!=null&&i.hasOwnProperty("startTimeUnixNano")&&!m.isInteger(i.startTimeUnixNano)&&!(i.startTimeUnixNano&&m.isInteger(i.startTimeUnixNano.low)&&m.isInteger(i.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(i.timeUnixNano!=null&&i.hasOwnProperty("timeUnixNano")&&!m.isInteger(i.timeUnixNano)&&!(i.timeUnixNano&&m.isInteger(i.timeUnixNano.low)&&m.isInteger(i.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(i.count!=null&&i.hasOwnProperty("count")&&!m.isInteger(i.count)&&!(i.count&&m.isInteger(i.count.low)&&m.isInteger(i.count.high)))return"count: integer|Long expected";if(i.sum!=null&&i.hasOwnProperty("sum")&&typeof i.sum!="number")return"sum: number expected";if(i.quantileValues!=null&&i.hasOwnProperty("quantileValues")){if(!Array.isArray(i.quantileValues))return"quantileValues: array expected";for(var n=0;n<i.quantileValues.length;++n){var c=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(i.quantileValues[n]);if(c)return"quantileValues."+c}}return i.flags!=null&&i.hasOwnProperty("flags")&&!m.isInteger(i.flags)?"flags: integer expected":null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.metrics.v1.SummaryDataPoint)return i;var n=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(i.attributes){if(!Array.isArray(i.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");n.attributes=[];for(var c=0;c<i.attributes.length;++c){if(typeof i.attributes[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");n.attributes[c]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(i.attributes[c])}}if(i.startTimeUnixNano!=null&&(m.Long?(n.startTimeUnixNano=m.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 m.LongBits(i.startTimeUnixNano.low>>>0,i.startTimeUnixNano.high>>>0).toNumber())),i.timeUnixNano!=null&&(m.Long?(n.timeUnixNano=m.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 m.LongBits(i.timeUnixNano.low>>>0,i.timeUnixNano.high>>>0).toNumber())),i.count!=null&&(m.Long?(n.count=m.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 m.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 c=0;c<i.quantileValues.length;++c){if(typeof i.quantileValues[c]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");n.quantileValues[c]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(i.quantileValues[c])}}return i.flags!=null&&(n.flags=i.flags>>>0),n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.quantileValues=[],c.attributes=[]),n.defaults){if(m.Long){var u=new m.Long(0,0,!1);c.startTimeUnixNano=n.longs===String?u.toString():n.longs===Number?u.toNumber():u}else c.startTimeUnixNano=n.longs===String?"0":0;if(m.Long){var u=new m.Long(0,0,!1);c.timeUnixNano=n.longs===String?u.toString():n.longs===Number?u.toNumber():u}else c.timeUnixNano=n.longs===String?"0":0;if(m.Long){var u=new m.Long(0,0,!1);c.count=n.longs===String?u.toString():n.longs===Number?u.toNumber():u}else c.count=n.longs===String?"0":0;c.sum=0,c.flags=0}if(i.startTimeUnixNano!=null&&i.hasOwnProperty("startTimeUnixNano")&&(typeof i.startTimeUnixNano=="number"?c.startTimeUnixNano=n.longs===String?String(i.startTimeUnixNano):i.startTimeUnixNano:c.startTimeUnixNano=n.longs===String?m.Long.prototype.toString.call(i.startTimeUnixNano):n.longs===Number?new m.LongBits(i.startTimeUnixNano.low>>>0,i.startTimeUnixNano.high>>>0).toNumber():i.startTimeUnixNano),i.timeUnixNano!=null&&i.hasOwnProperty("timeUnixNano")&&(typeof i.timeUnixNano=="number"?c.timeUnixNano=n.longs===String?String(i.timeUnixNano):i.timeUnixNano:c.timeUnixNano=n.longs===String?m.Long.prototype.toString.call(i.timeUnixNano):n.longs===Number?new m.LongBits(i.timeUnixNano.low>>>0,i.timeUnixNano.high>>>0).toNumber():i.timeUnixNano),i.count!=null&&i.hasOwnProperty("count")&&(typeof i.count=="number"?c.count=n.longs===String?String(i.count):i.count:c.count=n.longs===String?m.Long.prototype.toString.call(i.count):n.longs===Number?new m.LongBits(i.count.low>>>0,i.count.high>>>0).toNumber():i.count),i.sum!=null&&i.hasOwnProperty("sum")&&(c.sum=n.json&&!isFinite(i.sum)?String(i.sum):i.sum),i.quantileValues&&i.quantileValues.length){c.quantileValues=[];for(var l=0;l<i.quantileValues.length;++l)c.quantileValues[l]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(i.quantileValues[l],n)}if(i.attributes&&i.attributes.length){c.attributes=[];for(var l=0;l<i.attributes.length;++l)c.attributes[l]=f.opentelemetry.proto.common.v1.KeyValue.toObject(i.attributes[l],n)}return i.flags!=null&&i.hasOwnProperty("flags")&&(c.flags=i.flags),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},s.ValueAtQuantile=(function(){function a(i){if(i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}return a.prototype.quantile=null,a.prototype.value=null,a.create=function(n){return new a(n)},a.encode=function(n,c){return c||(c=ee.create()),n.quantile!=null&&Object.hasOwnProperty.call(n,"quantile")&&c.uint32(9).double(n.quantile),n.value!=null&&Object.hasOwnProperty.call(n,"value")&&c.uint32(17).double(n.value),c},a.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},a.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 1:{d.quantile=n.double();break}case 2:{d.value=n.double();break}default:n.skipType(h&7);break}}return d},a.decodeDelimited=function(n){return n instanceof T||(n=new T(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 f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return n;var c=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return n.quantile!=null&&(c.quantile=Number(n.quantile)),n.value!=null&&(c.value=Number(n.value)),c},a.toObject=function(n,c){c||(c={});var u={};return c.defaults&&(u.quantile=0,u.value=0),n.quantile!=null&&n.hasOwnProperty("quantile")&&(u.quantile=c.json&&!isFinite(n.quantile)?String(n.quantile):n.quantile),n.value!=null&&n.hasOwnProperty("value")&&(u.value=c.json&&!isFinite(n.value)?String(n.value):n.value),u},a.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},a.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},a})(),s})(),o.Exemplar=(function(){function s(i){if(this.filteredAttributes=[],i)for(var n=Object.keys(i),c=0;c<n.length;++c)i[n[c]]!=null&&(this[n[c]]=i[n[c]])}s.prototype.filteredAttributes=m.emptyArray,s.prototype.timeUnixNano=null,s.prototype.asDouble=null,s.prototype.asInt=null,s.prototype.spanId=null,s.prototype.traceId=null;var a;return Object.defineProperty(s.prototype,"value",{get:m.oneOfGetter(a=["asDouble","asInt"]),set:m.oneOfSetter(a)}),s.create=function(n){return new s(n)},s.encode=function(n,c){if(c||(c=ee.create()),n.timeUnixNano!=null&&Object.hasOwnProperty.call(n,"timeUnixNano")&&c.uint32(17).fixed64(n.timeUnixNano),n.asDouble!=null&&Object.hasOwnProperty.call(n,"asDouble")&&c.uint32(25).double(n.asDouble),n.spanId!=null&&Object.hasOwnProperty.call(n,"spanId")&&c.uint32(34).bytes(n.spanId),n.traceId!=null&&Object.hasOwnProperty.call(n,"traceId")&&c.uint32(42).bytes(n.traceId),n.asInt!=null&&Object.hasOwnProperty.call(n,"asInt")&&c.uint32(49).sfixed64(n.asInt),n.filteredAttributes!=null&&n.filteredAttributes.length)for(var u=0;u<n.filteredAttributes.length;++u)f.opentelemetry.proto.common.v1.KeyValue.encode(n.filteredAttributes[u],c.uint32(58).fork()).ldelim();return c},s.encodeDelimited=function(n,c){return this.encode(n,c).ldelim()},s.decode=function(n,c,u){n instanceof T||(n=T.create(n));for(var l=c===void 0?n.len:n.pos+c,d=new f.opentelemetry.proto.metrics.v1.Exemplar;n.pos<l;){var h=n.uint32();if(h===u)break;switch(h>>>3){case 7:{d.filteredAttributes&&d.filteredAttributes.length||(d.filteredAttributes=[]),d.filteredAttributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(n,n.uint32()));break}case 2:{d.timeUnixNano=n.fixed64();break}case 3:{d.asDouble=n.double();break}case 6:{d.asInt=n.sfixed64();break}case 4:{d.spanId=n.bytes();break}case 5:{d.traceId=n.bytes();break}default:n.skipType(h&7);break}}return d},s.decodeDelimited=function(n){return n instanceof T||(n=new T(n)),this.decode(n,n.uint32())},s.verify=function(n){if(typeof n!="object"||n===null)return"object expected";var c={};if(n.filteredAttributes!=null&&n.hasOwnProperty("filteredAttributes")){if(!Array.isArray(n.filteredAttributes))return"filteredAttributes: array expected";for(var u=0;u<n.filteredAttributes.length;++u){var l=f.opentelemetry.proto.common.v1.KeyValue.verify(n.filteredAttributes[u]);if(l)return"filteredAttributes."+l}}if(n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&!m.isInteger(n.timeUnixNano)&&!(n.timeUnixNano&&m.isInteger(n.timeUnixNano.low)&&m.isInteger(n.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(n.asDouble!=null&&n.hasOwnProperty("asDouble")&&(c.value=1,typeof n.asDouble!="number"))return"asDouble: number expected";if(n.asInt!=null&&n.hasOwnProperty("asInt")){if(c.value===1)return"value: multiple values";if(c.value=1,!m.isInteger(n.asInt)&&!(n.asInt&&m.isInteger(n.asInt.low)&&m.isInteger(n.asInt.high)))return"asInt: integer|Long expected"}return n.spanId!=null&&n.hasOwnProperty("spanId")&&!(n.spanId&&typeof n.spanId.length=="number"||m.isString(n.spanId))?"spanId: buffer expected":n.traceId!=null&&n.hasOwnProperty("traceId")&&!(n.traceId&&typeof n.traceId.length=="number"||m.isString(n.traceId))?"traceId: buffer expected":null},s.fromObject=function(n){if(n instanceof f.opentelemetry.proto.metrics.v1.Exemplar)return n;var c=new f.opentelemetry.proto.metrics.v1.Exemplar;if(n.filteredAttributes){if(!Array.isArray(n.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");c.filteredAttributes=[];for(var u=0;u<n.filteredAttributes.length;++u){if(typeof n.filteredAttributes[u]!="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");c.filteredAttributes[u]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(n.filteredAttributes[u])}}return n.timeUnixNano!=null&&(m.Long?(c.timeUnixNano=m.Long.fromValue(n.timeUnixNano)).unsigned=!1:typeof n.timeUnixNano=="string"?c.timeUnixNano=parseInt(n.timeUnixNano,10):typeof n.timeUnixNano=="number"?c.timeUnixNano=n.timeUnixNano:typeof n.timeUnixNano=="object"&&(c.timeUnixNano=new m.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber())),n.asDouble!=null&&(c.asDouble=Number(n.asDouble)),n.asInt!=null&&(m.Long?(c.asInt=m.Long.fromValue(n.asInt)).unsigned=!1:typeof n.asInt=="string"?c.asInt=parseInt(n.asInt,10):typeof n.asInt=="number"?c.asInt=n.asInt:typeof n.asInt=="object"&&(c.asInt=new m.LongBits(n.asInt.low>>>0,n.asInt.high>>>0).toNumber())),n.spanId!=null&&(typeof n.spanId=="string"?m.base64.decode(n.spanId,c.spanId=m.newBuffer(m.base64.length(n.spanId)),0):n.spanId.length>=0&&(c.spanId=n.spanId)),n.traceId!=null&&(typeof n.traceId=="string"?m.base64.decode(n.traceId,c.traceId=m.newBuffer(m.base64.length(n.traceId)),0):n.traceId.length>=0&&(c.traceId=n.traceId)),c},s.toObject=function(n,c){c||(c={});var u={};if((c.arrays||c.defaults)&&(u.filteredAttributes=[]),c.defaults){if(m.Long){var l=new m.Long(0,0,!1);u.timeUnixNano=c.longs===String?l.toString():c.longs===Number?l.toNumber():l}else u.timeUnixNano=c.longs===String?"0":0;c.bytes===String?u.spanId="":(u.spanId=[],c.bytes!==Array&&(u.spanId=m.newBuffer(u.spanId))),c.bytes===String?u.traceId="":(u.traceId=[],c.bytes!==Array&&(u.traceId=m.newBuffer(u.traceId)))}if(n.timeUnixNano!=null&&n.hasOwnProperty("timeUnixNano")&&(typeof n.timeUnixNano=="number"?u.timeUnixNano=c.longs===String?String(n.timeUnixNano):n.timeUnixNano:u.timeUnixNano=c.longs===String?m.Long.prototype.toString.call(n.timeUnixNano):c.longs===Number?new m.LongBits(n.timeUnixNano.low>>>0,n.timeUnixNano.high>>>0).toNumber():n.timeUnixNano),n.asDouble!=null&&n.hasOwnProperty("asDouble")&&(u.asDouble=c.json&&!isFinite(n.asDouble)?String(n.asDouble):n.asDouble,c.oneofs&&(u.value="asDouble")),n.spanId!=null&&n.hasOwnProperty("spanId")&&(u.spanId=c.bytes===String?m.base64.encode(n.spanId,0,n.spanId.length):c.bytes===Array?Array.prototype.slice.call(n.spanId):n.spanId),n.traceId!=null&&n.hasOwnProperty("traceId")&&(u.traceId=c.bytes===String?m.base64.encode(n.traceId,0,n.traceId.length):c.bytes===Array?Array.prototype.slice.call(n.traceId):n.traceId),n.asInt!=null&&n.hasOwnProperty("asInt")&&(typeof n.asInt=="number"?u.asInt=c.longs===String?String(n.asInt):n.asInt:u.asInt=c.longs===String?m.Long.prototype.toString.call(n.asInt):c.longs===Number?new m.LongBits(n.asInt.low>>>0,n.asInt.high>>>0).toNumber():n.asInt,c.oneofs&&(u.value="asInt")),n.filteredAttributes&&n.filteredAttributes.length){u.filteredAttributes=[];for(var d=0;d<n.filteredAttributes.length;++d)u.filteredAttributes[d]=f.opentelemetry.proto.common.v1.KeyValue.toObject(n.filteredAttributes[d],c)}return u},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(n){return n===void 0&&(n="type.googleapis.com"),n+"/opentelemetry.proto.metrics.v1.Exemplar"},s})(),o})(),r})(),e.logs=(function(){var r={};return r.v1=(function(){var o={};return o.LogsData=(function(){function s(a){if(this.resourceLogs=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.resourceLogs=m.emptyArray,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.resourceLogs!=null&&i.resourceLogs.length)for(var c=0;c<i.resourceLogs.length;++c)f.opentelemetry.proto.logs.v1.ResourceLogs.encode(i.resourceLogs[c],n.uint32(10).fork()).ldelim();return n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.logs.v1.LogsData;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.resourceLogs&&l.resourceLogs.length||(l.resourceLogs=[]),l.resourceLogs.push(f.opentelemetry.proto.logs.v1.ResourceLogs.decode(i,i.uint32()));break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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<i.resourceLogs.length;++n){var c=f.opentelemetry.proto.logs.v1.ResourceLogs.verify(i.resourceLogs[n]);if(c)return"resourceLogs."+c}}return null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.logs.v1.LogsData)return i;var n=new f.opentelemetry.proto.logs.v1.LogsData;if(i.resourceLogs){if(!Array.isArray(i.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");n.resourceLogs=[];for(var c=0;c<i.resourceLogs.length;++c){if(typeof i.resourceLogs[c]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");n.resourceLogs[c]=f.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(i.resourceLogs[c])}}return n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.resourceLogs=[]),i.resourceLogs&&i.resourceLogs.length){c.resourceLogs=[];for(var u=0;u<i.resourceLogs.length;++u)c.resourceLogs[u]=f.opentelemetry.proto.logs.v1.ResourceLogs.toObject(i.resourceLogs[u],n)}return c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.logs.v1.LogsData"},s})(),o.ResourceLogs=(function(){function s(a){if(this.scopeLogs=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.resource=null,s.prototype.scopeLogs=m.emptyArray,s.prototype.schemaUrl=null,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.resource!=null&&Object.hasOwnProperty.call(i,"resource")&&f.opentelemetry.proto.resource.v1.Resource.encode(i.resource,n.uint32(10).fork()).ldelim(),i.scopeLogs!=null&&i.scopeLogs.length)for(var c=0;c<i.scopeLogs.length;++c)f.opentelemetry.proto.logs.v1.ScopeLogs.encode(i.scopeLogs[c],n.uint32(18).fork()).ldelim();return i.schemaUrl!=null&&Object.hasOwnProperty.call(i,"schemaUrl")&&n.uint32(26).string(i.schemaUrl),n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.logs.v1.ResourceLogs;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.resource=f.opentelemetry.proto.resource.v1.Resource.decode(i,i.uint32());break}case 2:{l.scopeLogs&&l.scopeLogs.length||(l.scopeLogs=[]),l.scopeLogs.push(f.opentelemetry.proto.logs.v1.ScopeLogs.decode(i,i.uint32()));break}case 3:{l.schemaUrl=i.string();break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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=f.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 c=0;c<i.scopeLogs.length;++c){var n=f.opentelemetry.proto.logs.v1.ScopeLogs.verify(i.scopeLogs[c]);if(n)return"scopeLogs."+n}}return i.schemaUrl!=null&&i.hasOwnProperty("schemaUrl")&&!m.isString(i.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.logs.v1.ResourceLogs)return i;var n=new f.opentelemetry.proto.logs.v1.ResourceLogs;if(i.resource!=null){if(typeof i.resource!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");n.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(i.resource)}if(i.scopeLogs){if(!Array.isArray(i.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");n.scopeLogs=[];for(var c=0;c<i.scopeLogs.length;++c){if(typeof i.scopeLogs[c]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");n.scopeLogs[c]=f.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(i.scopeLogs[c])}}return i.schemaUrl!=null&&(n.schemaUrl=String(i.schemaUrl)),n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.scopeLogs=[]),n.defaults&&(c.resource=null,c.schemaUrl=""),i.resource!=null&&i.hasOwnProperty("resource")&&(c.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(i.resource,n)),i.scopeLogs&&i.scopeLogs.length){c.scopeLogs=[];for(var u=0;u<i.scopeLogs.length;++u)c.scopeLogs[u]=f.opentelemetry.proto.logs.v1.ScopeLogs.toObject(i.scopeLogs[u],n)}return i.schemaUrl!=null&&i.hasOwnProperty("schemaUrl")&&(c.schemaUrl=i.schemaUrl),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.logs.v1.ResourceLogs"},s})(),o.ScopeLogs=(function(){function s(a){if(this.logRecords=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.scope=null,s.prototype.logRecords=m.emptyArray,s.prototype.schemaUrl=null,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.scope!=null&&Object.hasOwnProperty.call(i,"scope")&&f.opentelemetry.proto.common.v1.InstrumentationScope.encode(i.scope,n.uint32(10).fork()).ldelim(),i.logRecords!=null&&i.logRecords.length)for(var c=0;c<i.logRecords.length;++c)f.opentelemetry.proto.logs.v1.LogRecord.encode(i.logRecords[c],n.uint32(18).fork()).ldelim();return i.schemaUrl!=null&&Object.hasOwnProperty.call(i,"schemaUrl")&&n.uint32(26).string(i.schemaUrl),n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.logs.v1.ScopeLogs;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(i,i.uint32());break}case 2:{l.logRecords&&l.logRecords.length||(l.logRecords=[]),l.logRecords.push(f.opentelemetry.proto.logs.v1.LogRecord.decode(i,i.uint32()));break}case 3:{l.schemaUrl=i.string();break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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=f.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 c=0;c<i.logRecords.length;++c){var n=f.opentelemetry.proto.logs.v1.LogRecord.verify(i.logRecords[c]);if(n)return"logRecords."+n}}return i.schemaUrl!=null&&i.hasOwnProperty("schemaUrl")&&!m.isString(i.schemaUrl)?"schemaUrl: string expected":null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.logs.v1.ScopeLogs)return i;var n=new f.opentelemetry.proto.logs.v1.ScopeLogs;if(i.scope!=null){if(typeof i.scope!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");n.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(i.scope)}if(i.logRecords){if(!Array.isArray(i.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");n.logRecords=[];for(var c=0;c<i.logRecords.length;++c){if(typeof i.logRecords[c]!="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");n.logRecords[c]=f.opentelemetry.proto.logs.v1.LogRecord.fromObject(i.logRecords[c])}}return i.schemaUrl!=null&&(n.schemaUrl=String(i.schemaUrl)),n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.logRecords=[]),n.defaults&&(c.scope=null,c.schemaUrl=""),i.scope!=null&&i.hasOwnProperty("scope")&&(c.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(i.scope,n)),i.logRecords&&i.logRecords.length){c.logRecords=[];for(var u=0;u<i.logRecords.length;++u)c.logRecords[u]=f.opentelemetry.proto.logs.v1.LogRecord.toObject(i.logRecords[u],n)}return i.schemaUrl!=null&&i.hasOwnProperty("schemaUrl")&&(c.schemaUrl=i.schemaUrl),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.logs.v1.ScopeLogs"},s})(),o.SeverityNumber=(function(){var s={},a=Object.create(s);return a[s[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,a[s[1]="SEVERITY_NUMBER_TRACE"]=1,a[s[2]="SEVERITY_NUMBER_TRACE2"]=2,a[s[3]="SEVERITY_NUMBER_TRACE3"]=3,a[s[4]="SEVERITY_NUMBER_TRACE4"]=4,a[s[5]="SEVERITY_NUMBER_DEBUG"]=5,a[s[6]="SEVERITY_NUMBER_DEBUG2"]=6,a[s[7]="SEVERITY_NUMBER_DEBUG3"]=7,a[s[8]="SEVERITY_NUMBER_DEBUG4"]=8,a[s[9]="SEVERITY_NUMBER_INFO"]=9,a[s[10]="SEVERITY_NUMBER_INFO2"]=10,a[s[11]="SEVERITY_NUMBER_INFO3"]=11,a[s[12]="SEVERITY_NUMBER_INFO4"]=12,a[s[13]="SEVERITY_NUMBER_WARN"]=13,a[s[14]="SEVERITY_NUMBER_WARN2"]=14,a[s[15]="SEVERITY_NUMBER_WARN3"]=15,a[s[16]="SEVERITY_NUMBER_WARN4"]=16,a[s[17]="SEVERITY_NUMBER_ERROR"]=17,a[s[18]="SEVERITY_NUMBER_ERROR2"]=18,a[s[19]="SEVERITY_NUMBER_ERROR3"]=19,a[s[20]="SEVERITY_NUMBER_ERROR4"]=20,a[s[21]="SEVERITY_NUMBER_FATAL"]=21,a[s[22]="SEVERITY_NUMBER_FATAL2"]=22,a[s[23]="SEVERITY_NUMBER_FATAL3"]=23,a[s[24]="SEVERITY_NUMBER_FATAL4"]=24,a})(),o.LogRecordFlags=(function(){var s={},a=Object.create(s);return a[s[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,a[s[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,a})(),o.LogRecord=(function(){function s(a){if(this.attributes=[],a)for(var i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]!=null&&(this[i[n]]=a[i[n]])}return s.prototype.timeUnixNano=null,s.prototype.observedTimeUnixNano=null,s.prototype.severityNumber=null,s.prototype.severityText=null,s.prototype.body=null,s.prototype.attributes=m.emptyArray,s.prototype.droppedAttributesCount=null,s.prototype.flags=null,s.prototype.traceId=null,s.prototype.spanId=null,s.prototype.eventName=null,s.create=function(i){return new s(i)},s.encode=function(i,n){if(n||(n=ee.create()),i.timeUnixNano!=null&&Object.hasOwnProperty.call(i,"timeUnixNano")&&n.uint32(9).fixed64(i.timeUnixNano),i.severityNumber!=null&&Object.hasOwnProperty.call(i,"severityNumber")&&n.uint32(16).int32(i.severityNumber),i.severityText!=null&&Object.hasOwnProperty.call(i,"severityText")&&n.uint32(26).string(i.severityText),i.body!=null&&Object.hasOwnProperty.call(i,"body")&&f.opentelemetry.proto.common.v1.AnyValue.encode(i.body,n.uint32(42).fork()).ldelim(),i.attributes!=null&&i.attributes.length)for(var c=0;c<i.attributes.length;++c)f.opentelemetry.proto.common.v1.KeyValue.encode(i.attributes[c],n.uint32(50).fork()).ldelim();return i.droppedAttributesCount!=null&&Object.hasOwnProperty.call(i,"droppedAttributesCount")&&n.uint32(56).uint32(i.droppedAttributesCount),i.flags!=null&&Object.hasOwnProperty.call(i,"flags")&&n.uint32(69).fixed32(i.flags),i.traceId!=null&&Object.hasOwnProperty.call(i,"traceId")&&n.uint32(74).bytes(i.traceId),i.spanId!=null&&Object.hasOwnProperty.call(i,"spanId")&&n.uint32(82).bytes(i.spanId),i.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(i,"observedTimeUnixNano")&&n.uint32(89).fixed64(i.observedTimeUnixNano),i.eventName!=null&&Object.hasOwnProperty.call(i,"eventName")&&n.uint32(98).string(i.eventName),n},s.encodeDelimited=function(i,n){return this.encode(i,n).ldelim()},s.decode=function(i,n,c){i instanceof T||(i=T.create(i));for(var u=n===void 0?i.len:i.pos+n,l=new f.opentelemetry.proto.logs.v1.LogRecord;i.pos<u;){var d=i.uint32();if(d===c)break;switch(d>>>3){case 1:{l.timeUnixNano=i.fixed64();break}case 11:{l.observedTimeUnixNano=i.fixed64();break}case 2:{l.severityNumber=i.int32();break}case 3:{l.severityText=i.string();break}case 5:{l.body=f.opentelemetry.proto.common.v1.AnyValue.decode(i,i.uint32());break}case 6:{l.attributes&&l.attributes.length||(l.attributes=[]),l.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break}case 7:{l.droppedAttributesCount=i.uint32();break}case 8:{l.flags=i.fixed32();break}case 9:{l.traceId=i.bytes();break}case 10:{l.spanId=i.bytes();break}case 12:{l.eventName=i.string();break}default:i.skipType(d&7);break}}return l},s.decodeDelimited=function(i){return i instanceof T||(i=new T(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")&&!m.isInteger(i.timeUnixNano)&&!(i.timeUnixNano&&m.isInteger(i.timeUnixNano.low)&&m.isInteger(i.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(i.observedTimeUnixNano!=null&&i.hasOwnProperty("observedTimeUnixNano")&&!m.isInteger(i.observedTimeUnixNano)&&!(i.observedTimeUnixNano&&m.isInteger(i.observedTimeUnixNano.low)&&m.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")&&!m.isString(i.severityText))return"severityText: string expected";if(i.body!=null&&i.hasOwnProperty("body")){var n=f.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 c=0;c<i.attributes.length;++c){var n=f.opentelemetry.proto.common.v1.KeyValue.verify(i.attributes[c]);if(n)return"attributes."+n}}return i.droppedAttributesCount!=null&&i.hasOwnProperty("droppedAttributesCount")&&!m.isInteger(i.droppedAttributesCount)?"droppedAttributesCount: integer expected":i.flags!=null&&i.hasOwnProperty("flags")&&!m.isInteger(i.flags)?"flags: integer expected":i.traceId!=null&&i.hasOwnProperty("traceId")&&!(i.traceId&&typeof i.traceId.length=="number"||m.isString(i.traceId))?"traceId: buffer expected":i.spanId!=null&&i.hasOwnProperty("spanId")&&!(i.spanId&&typeof i.spanId.length=="number"||m.isString(i.spanId))?"spanId: buffer expected":i.eventName!=null&&i.hasOwnProperty("eventName")&&!m.isString(i.eventName)?"eventName: string expected":null},s.fromObject=function(i){if(i instanceof f.opentelemetry.proto.logs.v1.LogRecord)return i;var n=new f.opentelemetry.proto.logs.v1.LogRecord;switch(i.timeUnixNano!=null&&(m.Long?(n.timeUnixNano=m.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 m.LongBits(i.timeUnixNano.low>>>0,i.timeUnixNano.high>>>0).toNumber())),i.observedTimeUnixNano!=null&&(m.Long?(n.observedTimeUnixNano=m.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 m.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=f.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 c=0;c<i.attributes.length;++c){if(typeof i.attributes[c]!="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");n.attributes[c]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(i.attributes[c])}}return i.droppedAttributesCount!=null&&(n.droppedAttributesCount=i.droppedAttributesCount>>>0),i.flags!=null&&(n.flags=i.flags>>>0),i.traceId!=null&&(typeof i.traceId=="string"?m.base64.decode(i.traceId,n.traceId=m.newBuffer(m.base64.length(i.traceId)),0):i.traceId.length>=0&&(n.traceId=i.traceId)),i.spanId!=null&&(typeof i.spanId=="string"?m.base64.decode(i.spanId,n.spanId=m.newBuffer(m.base64.length(i.spanId)),0):i.spanId.length>=0&&(n.spanId=i.spanId)),i.eventName!=null&&(n.eventName=String(i.eventName)),n},s.toObject=function(i,n){n||(n={});var c={};if((n.arrays||n.defaults)&&(c.attributes=[]),n.defaults){if(m.Long){var u=new m.Long(0,0,!1);c.timeUnixNano=n.longs===String?u.toString():n.longs===Number?u.toNumber():u}else c.timeUnixNano=n.longs===String?"0":0;if(c.severityNumber=n.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,c.severityText="",c.body=null,c.droppedAttributesCount=0,c.flags=0,n.bytes===String?c.traceId="":(c.traceId=[],n.bytes!==Array&&(c.traceId=m.newBuffer(c.traceId))),n.bytes===String?c.spanId="":(c.spanId=[],n.bytes!==Array&&(c.spanId=m.newBuffer(c.spanId))),m.Long){var u=new m.Long(0,0,!1);c.observedTimeUnixNano=n.longs===String?u.toString():n.longs===Number?u.toNumber():u}else c.observedTimeUnixNano=n.longs===String?"0":0;c.eventName=""}if(i.timeUnixNano!=null&&i.hasOwnProperty("timeUnixNano")&&(typeof i.timeUnixNano=="number"?c.timeUnixNano=n.longs===String?String(i.timeUnixNano):i.timeUnixNano:c.timeUnixNano=n.longs===String?m.Long.prototype.toString.call(i.timeUnixNano):n.longs===Number?new m.LongBits(i.timeUnixNano.low>>>0,i.timeUnixNano.high>>>0).toNumber():i.timeUnixNano),i.severityNumber!=null&&i.hasOwnProperty("severityNumber")&&(c.severityNumber=n.enums===String?f.opentelemetry.proto.logs.v1.SeverityNumber[i.severityNumber]===void 0?i.severityNumber:f.opentelemetry.proto.logs.v1.SeverityNumber[i.severityNumber]:i.severityNumber),i.severityText!=null&&i.hasOwnProperty("severityText")&&(c.severityText=i.severityText),i.body!=null&&i.hasOwnProperty("body")&&(c.body=f.opentelemetry.proto.common.v1.AnyValue.toObject(i.body,n)),i.attributes&&i.attributes.length){c.attributes=[];for(var l=0;l<i.attributes.length;++l)c.attributes[l]=f.opentelemetry.proto.common.v1.KeyValue.toObject(i.attributes[l],n)}return i.droppedAttributesCount!=null&&i.hasOwnProperty("droppedAttributesCount")&&(c.droppedAttributesCount=i.droppedAttributesCount),i.flags!=null&&i.hasOwnProperty("flags")&&(c.flags=i.flags),i.traceId!=null&&i.hasOwnProperty("traceId")&&(c.traceId=n.bytes===String?m.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")&&(c.spanId=n.bytes===String?m.base64.encode(i.spanId,0,i.spanId.length):n.bytes===Array?Array.prototype.slice.call(i.spanId):i.spanId),i.observedTimeUnixNano!=null&&i.hasOwnProperty("observedTimeUnixNano")&&(typeof i.observedTimeUnixNano=="number"?c.observedTimeUnixNano=n.longs===String?String(i.observedTimeUnixNano):i.observedTimeUnixNano:c.observedTimeUnixNano=n.longs===String?m.Long.prototype.toString.call(i.observedTimeUnixNano):n.longs===Number?new m.LongBits(i.observedTimeUnixNano.low>>>0,i.observedTimeUnixNano.high>>>0).toNumber():i.observedTimeUnixNano),i.eventName!=null&&i.hasOwnProperty("eventName")&&(c.eventName=i.eventName),c},s.prototype.toJSON=function(){return this.constructor.toObject(this,J.util.toJSONOptions)},s.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/opentelemetry.proto.logs.v1.LogRecord"},s})(),o})(),r})(),e})(),t})();l4.exports=f});var p4=p(Wg=>{"use strict";Object.defineProperty(Wg,"__esModule",{value:!0});Wg.hexToBinary=void 0;function d4(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function BNe(t){let e=new Uint8Array(t.length/2),r=0;for(let o=0;o<t.length;o+=2){let s=d4(t.charCodeAt(o)),a=d4(t.charCodeAt(o+1));e[r++]=s<<4|a}return e}Wg.hexToBinary=BNe});var Kg=p(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.getOtlpEncoder=br.encodeAsString=br.encodeAsLongBits=br.toLongBits=br.hrTimeToNanos=void 0;var FNe=K(),YC=p4();function WC(t){let e=BigInt(1e9);return BigInt(Math.trunc(t[0]))*e+BigInt(Math.trunc(t[1]))}br.hrTimeToNanos=WC;function h4(t){let e=Number(BigInt.asUintN(32,t)),r=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:r}}br.toLongBits=h4;function KC(t){let e=WC(t);return h4(e)}br.encodeAsLongBits=KC;function m4(t){return WC(t).toString()}br.encodeAsString=m4;var VNe=typeof BigInt<"u"?m4:FNe.hrTimeToNanoseconds;function f4(t){return t}function _4(t){if(t!==void 0)return(0,YC.hexToBinary)(t)}var GNe={encodeHrTime:KC,encodeSpanContext:YC.hexToBinary,encodeOptionalSpanContext:_4};function qNe(t){if(t===void 0)return GNe;let e=t.useLongBits??!0,r=t.useHex??!1;return{encodeHrTime:e?KC:VNe,encodeSpanContext:r?f4:YC.hexToBinary,encodeOptionalSpanContext:r?f4:_4}}br.getOtlpEncoder=qNe});var Xg=p(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.toAnyValue=Rr.toKeyValue=Rr.toAttributes=Rr.createInstrumentationScope=Rr.createResource=void 0;function jNe(t){let e={attributes:g4(t.attributes),droppedAttributesCount:0},r=t.schemaUrl;return r&&r!==""&&(e.schemaUrl=r),e}Rr.createResource=jNe;function HNe(t){return{name:t.name,version:t.version}}Rr.createInstrumentationScope=HNe;function g4(t){return Object.keys(t).map(e=>XC(e,t[e]))}Rr.toAttributes=g4;function XC(t,e){return{key:t,value:JC(e)}}Rr.toKeyValue=XC;function JC(t){let e=typeof t;return e==="string"?{stringValue:t}:e==="number"?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:e==="boolean"?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(JC)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(([r,o])=>XC(r,o))}}:{}}Rr.toAnyValue=JC});var QC=p(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});pc.toLogAttributes=pc.createExportLogsServiceRequest=void 0;var zNe=Kg(),Jg=Xg();function $Ne(t,e){let r=(0,zNe.getOtlpEncoder)(e);return{resourceLogs:WNe(t,r)}}pc.createExportLogsServiceRequest=$Ne;function YNe(t){let e=new Map;for(let r of t){let{resource:o,instrumentationScope:{name:s,version:a="",schemaUrl:i=""}}=r,n=e.get(o);n||(n=new Map,e.set(o,n));let c=`${s}@${a}:${i}`,u=n.get(c);u||(u=[],n.set(c,u)),u.push(r)}return e}function WNe(t,e){let r=YNe(t);return Array.from(r,([o,s])=>{let a=(0,Jg.createResource)(o);return{resource:a,scopeLogs:Array.from(s,([,i])=>({scope:(0,Jg.createInstrumentationScope)(i[0].instrumentationScope),logRecords:i.map(n=>KNe(n,e)),schemaUrl:i[0].instrumentationScope.schemaUrl})),schemaUrl:a.schemaUrl}})}function KNe(t,e){return{timeUnixNano:e.encodeHrTime(t.hrTime),observedTimeUnixNano:e.encodeHrTime(t.hrTimeObserved),severityNumber:t.severityNumber,severityText:t.severityText,body:(0,Jg.toAnyValue)(t.body),eventName:t.eventName,attributes:E4(t.attributes),droppedAttributesCount:t.droppedAttributesCount,flags:t.spanContext?.traceFlags,traceId:e.encodeOptionalSpanContext(t.spanContext?.traceId),spanId:e.encodeOptionalSpanContext(t.spanContext?.spanId)}}function E4(t){return Object.keys(t).map(e=>(0,Jg.toKeyValue)(e,t[e]))}pc.toLogAttributes=E4});var T4=p(Qg=>{"use strict";Object.defineProperty(Qg,"__esModule",{value:!0});Qg.ProtobufLogsSerializer=void 0;var S4=Yg(),XNe=QC(),JNe=S4.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,QNe=S4.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;Qg.ProtobufLogsSerializer={serializeRequest:t=>{let e=(0,XNe.createExportLogsServiceRequest)(t);return QNe.encode(e).finish()},deserializeResponse:t=>JNe.decode(t)}});var y4=p(Zg=>{"use strict";Object.defineProperty(Zg,"__esModule",{value:!0});Zg.ProtobufLogsSerializer=void 0;var ZNe=T4();Object.defineProperty(Zg,"ProtobufLogsSerializer",{enumerable:!0,get:function(){return ZNe.ProtobufLogsSerializer}})});var v4=p(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.EAggregationTemporality=void 0;var eMe;(function(t){t[t.AGGREGATION_TEMPORALITY_UNSPECIFIED=0]="AGGREGATION_TEMPORALITY_UNSPECIFIED",t[t.AGGREGATION_TEMPORALITY_DELTA=1]="AGGREGATION_TEMPORALITY_DELTA",t[t.AGGREGATION_TEMPORALITY_CUMULATIVE=2]="AGGREGATION_TEMPORALITY_CUMULATIVE"})(eMe=Al.EAggregationTemporality||(Al.EAggregationTemporality={}))});var ZC=p(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.createExportMetricsServiceRequest=Vn.toMetric=Vn.toScopeMetrics=Vn.toResourceMetrics=void 0;var A4=(R(),y(C)),fc=Ei(),O4=v4(),tMe=Kg(),Ol=Xg();function R4(t,e){let r=(0,tMe.getOtlpEncoder)(e),o=(0,Ol.createResource)(t.resource);return{resource:o,schemaUrl:o.schemaUrl,scopeMetrics:P4(t.scopeMetrics,r)}}Vn.toResourceMetrics=R4;function P4(t,e){return Array.from(t.map(r=>({scope:(0,Ol.createInstrumentationScope)(r.scope),metrics:r.metrics.map(o=>C4(o,e)),schemaUrl:r.scope.schemaUrl})))}Vn.toScopeMetrics=P4;function C4(t,e){let r={name:t.descriptor.name,description:t.descriptor.description,unit:t.descriptor.unit},o=oMe(t.aggregationTemporality);switch(t.dataPointType){case fc.DataPointType.SUM:r.sum={aggregationTemporality:o,isMonotonic:t.isMonotonic,dataPoints:b4(t,e)};break;case fc.DataPointType.GAUGE:r.gauge={dataPoints:b4(t,e)};break;case fc.DataPointType.HISTOGRAM:r.histogram={aggregationTemporality:o,dataPoints:nMe(t,e)};break;case fc.DataPointType.EXPONENTIAL_HISTOGRAM:r.exponentialHistogram={aggregationTemporality:o,dataPoints:iMe(t,e)};break}return r}Vn.toMetric=C4;function rMe(t,e,r){let o={attributes:(0,Ol.toAttributes)(t.attributes),startTimeUnixNano:r.encodeHrTime(t.startTime),timeUnixNano:r.encodeHrTime(t.endTime)};switch(e){case A4.ValueType.INT:o.asInt=t.value;break;case A4.ValueType.DOUBLE:o.asDouble=t.value;break}return o}function b4(t,e){return t.dataPoints.map(r=>rMe(r,t.descriptor.valueType,e))}function nMe(t,e){return t.dataPoints.map(r=>{let o=r.value;return{attributes:(0,Ol.toAttributes)(r.attributes),bucketCounts:o.buckets.counts,explicitBounds:o.buckets.boundaries,count:o.count,sum:o.sum,min:o.min,max:o.max,startTimeUnixNano:e.encodeHrTime(r.startTime),timeUnixNano:e.encodeHrTime(r.endTime)}})}function iMe(t,e){return t.dataPoints.map(r=>{let o=r.value;return{attributes:(0,Ol.toAttributes)(r.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(r.startTime),timeUnixNano:e.encodeHrTime(r.endTime)}})}function oMe(t){switch(t){case fc.AggregationTemporality.DELTA:return O4.EAggregationTemporality.AGGREGATION_TEMPORALITY_DELTA;case fc.AggregationTemporality.CUMULATIVE:return O4.EAggregationTemporality.AGGREGATION_TEMPORALITY_CUMULATIVE}}function sMe(t,e){return{resourceMetrics:t.map(r=>R4(r,e))}}Vn.createExportMetricsServiceRequest=sMe});var M4=p(eE=>{"use strict";Object.defineProperty(eE,"__esModule",{value:!0});eE.ProtobufMetricsSerializer=void 0;var N4=Yg(),aMe=ZC(),cMe=N4.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,uMe=N4.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;eE.ProtobufMetricsSerializer={serializeRequest:t=>{let e=(0,aMe.createExportMetricsServiceRequest)([t]);return uMe.encode(e).finish()},deserializeResponse:t=>cMe.decode(t)}});var I4=p(tE=>{"use strict";Object.defineProperty(tE,"__esModule",{value:!0});tE.ProtobufMetricsSerializer=void 0;var lMe=M4();Object.defineProperty(tE,"ProtobufMetricsSerializer",{enumerable:!0,get:function(){return lMe.ProtobufMetricsSerializer}})});var eN=p(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.createExportTraceServiceRequest=Gn.toOtlpSpanEvent=Gn.toOtlpLink=Gn.sdkSpanToOtlpSpan=void 0;var bl=Xg(),dMe=Kg(),pMe=256,fMe=512;function x4(t,e){let r=t&255|pMe;return e&&(r|=fMe),r}function w4(t,e){let r=t.spanContext(),o=t.status,s=t.parentSpanContext?.spanId?e.encodeSpanContext(t.parentSpanContext?.spanId):void 0;return{traceId:e.encodeSpanContext(r.traceId),spanId:e.encodeSpanContext(r.spanId),parentSpanId:s,traceState:r.traceState?.serialize(),name:t.name,kind:t.kind==null?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:(0,bl.toAttributes)(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(a=>D4(a,e)),droppedEventsCount:t.droppedEventsCount,status:{code:o.code,message:o.message},links:t.links.map(a=>L4(a,e)),droppedLinksCount:t.droppedLinksCount,flags:x4(r.traceFlags,t.parentSpanContext?.isRemote)}}Gn.sdkSpanToOtlpSpan=w4;function L4(t,e){return{attributes:t.attributes?(0,bl.toAttributes)(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:t.context.traceState?.serialize(),droppedAttributesCount:t.droppedAttributesCount||0,flags:x4(t.context.traceFlags,t.context.isRemote)}}Gn.toOtlpLink=L4;function D4(t,e){return{attributes:t.attributes?(0,bl.toAttributes)(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}Gn.toOtlpSpanEvent=D4;function hMe(t,e){let r=(0,dMe.getOtlpEncoder)(e);return{resourceSpans:_Me(t,r)}}Gn.createExportTraceServiceRequest=hMe;function mMe(t){let e=new Map;for(let r of t){let o=e.get(r.resource);o||(o=new Map,e.set(r.resource,o));let s=`${r.instrumentationScope.name}@${r.instrumentationScope.version||""}:${r.instrumentationScope.schemaUrl||""}`,a=o.get(s);a||(a=[],o.set(s,a)),a.push(r)}return e}function _Me(t,e){let r=mMe(t),o=[],s=r.entries(),a=s.next();for(;!a.done;){let[i,n]=a.value,c=[],u=n.values(),l=u.next();for(;!l.done;){let g=l.value;if(g.length>0){let E=g.map(S=>w4(S,e));c.push({scope:(0,bl.createInstrumentationScope)(g[0].instrumentationScope),spans:E,schemaUrl:g[0].instrumentationScope.schemaUrl})}l=u.next()}let d=(0,bl.createResource)(i),h={resource:d,scopeSpans:c,schemaUrl:d.schemaUrl};o.push(h),a=s.next()}return o}});var k4=p(rE=>{"use strict";Object.defineProperty(rE,"__esModule",{value:!0});rE.ProtobufTraceSerializer=void 0;var U4=Yg(),gMe=eN(),EMe=U4.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,SMe=U4.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;rE.ProtobufTraceSerializer={serializeRequest:t=>{let e=(0,gMe.createExportTraceServiceRequest)(t);return SMe.encode(e).finish()},deserializeResponse:t=>EMe.decode(t)}});var B4=p(nE=>{"use strict";Object.defineProperty(nE,"__esModule",{value:!0});nE.ProtobufTraceSerializer=void 0;var TMe=k4();Object.defineProperty(nE,"ProtobufTraceSerializer",{enumerable:!0,get:function(){return TMe.ProtobufTraceSerializer}})});var F4=p(iE=>{"use strict";Object.defineProperty(iE,"__esModule",{value:!0});iE.JsonLogsSerializer=void 0;var yMe=QC();iE.JsonLogsSerializer={serializeRequest:t=>{let e=(0,yMe.createExportLogsServiceRequest)(t,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:t=>{if(t.length===0)return{};let e=new TextDecoder;return JSON.parse(e.decode(t))}}});var V4=p(oE=>{"use strict";Object.defineProperty(oE,"__esModule",{value:!0});oE.JsonLogsSerializer=void 0;var vMe=F4();Object.defineProperty(oE,"JsonLogsSerializer",{enumerable:!0,get:function(){return vMe.JsonLogsSerializer}})});var G4=p(sE=>{"use strict";Object.defineProperty(sE,"__esModule",{value:!0});sE.JsonMetricsSerializer=void 0;var AMe=ZC();sE.JsonMetricsSerializer={serializeRequest:t=>{let e=(0,AMe.createExportMetricsServiceRequest)([t],{useLongBits:!1});return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:t=>{if(t.length===0)return{};let e=new TextDecoder;return JSON.parse(e.decode(t))}}});var q4=p(aE=>{"use strict";Object.defineProperty(aE,"__esModule",{value:!0});aE.JsonMetricsSerializer=void 0;var OMe=G4();Object.defineProperty(aE,"JsonMetricsSerializer",{enumerable:!0,get:function(){return OMe.JsonMetricsSerializer}})});var j4=p(cE=>{"use strict";Object.defineProperty(cE,"__esModule",{value:!0});cE.JsonTraceSerializer=void 0;var bMe=eN();cE.JsonTraceSerializer={serializeRequest:t=>{let e=(0,bMe.createExportTraceServiceRequest)(t,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(e))},deserializeResponse:t=>{if(t.length===0)return{};let e=new TextDecoder;return JSON.parse(e.decode(t))}}});var H4=p(uE=>{"use strict";Object.defineProperty(uE,"__esModule",{value:!0});uE.JsonTraceSerializer=void 0;var RMe=j4();Object.defineProperty(uE,"JsonTraceSerializer",{enumerable:!0,get:function(){return RMe.JsonTraceSerializer}})});var qn=p(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.JsonTraceSerializer=Xt.JsonMetricsSerializer=Xt.JsonLogsSerializer=Xt.ProtobufTraceSerializer=Xt.ProtobufMetricsSerializer=Xt.ProtobufLogsSerializer=void 0;var PMe=y4();Object.defineProperty(Xt,"ProtobufLogsSerializer",{enumerable:!0,get:function(){return PMe.ProtobufLogsSerializer}});var CMe=I4();Object.defineProperty(Xt,"ProtobufMetricsSerializer",{enumerable:!0,get:function(){return CMe.ProtobufMetricsSerializer}});var NMe=B4();Object.defineProperty(Xt,"ProtobufTraceSerializer",{enumerable:!0,get:function(){return NMe.ProtobufTraceSerializer}});var MMe=V4();Object.defineProperty(Xt,"JsonLogsSerializer",{enumerable:!0,get:function(){return MMe.JsonLogsSerializer}});var IMe=q4();Object.defineProperty(Xt,"JsonMetricsSerializer",{enumerable:!0,get:function(){return IMe.JsonMetricsSerializer}});var xMe=H4();Object.defineProperty(Xt,"JsonTraceSerializer",{enumerable:!0,get:function(){return xMe.JsonTraceSerializer}})});var z4=p(lE=>{"use strict";Object.defineProperty(lE,"__esModule",{value:!0});lE.VERSION=void 0;lE.VERSION="0.206.0"});function $4(t){return()=>{let e={};return Object.entries(t?.()??{}).forEach(([r,o])=>{typeof o<"u"?e[r]=String(o):Qe.warn(`Header "${r}" has invalid value (${o}) and will be ignored`)}),e}}var Y4=k(()=>{R()});function wMe(t,e,r){let o={...r()},s={};return()=>(e!=null&&Object.assign(s,e()),t!=null&&Object.assign(s,t()),Object.assign(s,o))}function LMe(t){if(t!=null)try{let e=globalThis.location?.href;return new URL(t,e).href}catch{throw new Error(`Configuration: Could not parse user-provided export URL: '${t}'`)}}function W4(t,e,r){return{...Ug(t,e,r),headers:wMe($4(t.headers),e.headers,r.headers),url:LMe(t.url)??e.url??r.url}}function K4(t,e){return{...kg(),headers:()=>t,url:"http://localhost:4318/"+e}}var X4=k(()=>{Sl();Y4()});function Rl(t){return async e=>{let r=e==="http:"?import("http"):import("https"),{Agent:o}=await r;return new o(t)}}function J4(t,e,r){return{...W4(t,e,r),agentFactory:t.agentFactory??e.agentFactory??r.agentFactory}}function Q4(t,e){return{...K4(t,e),agentFactory:Rl({keepAlive:!0})}}var tN=k(()=>{X4()});function Z4(t){return[429,502,503,504].includes(t)}function e8(t){if(t==null)return;let e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;let r=new Date(t).getTime()-Date.now();return r>=0?r:0}var t8=k(()=>{});import*as r8 from"zlib";import{Readable as DMe}from"stream";function n8(t,e,r,o,s,a){let i=new URL(e.url),n={hostname:i.hostname,port:i.port,path:i.pathname,method:"POST",headers:{...e.headers()},agent:r},c=t(n,u=>{let l=[];u.on("data",d=>l.push(d)),u.on("end",()=>{if(u.statusCode&&u.statusCode<299)s({status:"success",data:Buffer.concat(l)});else if(u.statusCode&&Z4(u.statusCode))s({status:"retryable",retryInMillis:e8(u.headers["retry-after"])});else{let d=new Ti(u.statusMessage,u.statusCode,Buffer.concat(l).toString());s({status:"failure",error:d})}})});c.setTimeout(a,()=>{c.destroy(),s({status:"failure",error:new Error("Request Timeout")})}),c.on("error",u=>{s({status:"failure",error:u})}),UMe(c,e.compression,o,u=>{s({status:"failure",error:u})})}function UMe(t,e,r,o){let s=kMe(r);e==="gzip"&&(t.setHeader("Content-Encoding","gzip"),s=s.on("error",o).pipe(r8.createGzip()).on("error",o)),s.pipe(t).on("error",o)}function kMe(t){let e=new DMe;return e.push(t),e.push(null),e}var i8=k(()=>{t8();Lg()});async function BMe(t){let e=t==="http:"?import("http"):import("https"),{request:r}=await e;return r}function o8(t){return new rN(t)}var rN,s8=k(()=>{i8();rN=class{_parameters;_utils=null;constructor(e){this._parameters=e}async send(e,r){let{agent:o,request:s}=await this._loadUtils();return new Promise(a=>{n8(s,this._parameters,o,e,i=>{a(i)},r)})}shutdown(){}async _loadUtils(){let e=this._utils;if(e===null){let r=new URL(this._parameters.url).protocol,[o,s]=await Promise.all([this._parameters.agentFactory(r),BMe(r)]);e=this._utils={agent:o,request:s}}return e}}});function FMe(){return Math.random()*(2*.2)-.2}function a8(t){return new nN(t.transport)}var nN,c8=k(()=>{nN=class{_transport;constructor(e){this._transport=e}retry(e,r,o){return new Promise((s,a)=>{setTimeout(()=>{this._transport.send(e,r).then(s,a)},o)})}async send(e,r){let o=Date.now()+r,s=await this._transport.send(e,r),a=5,i=1e3;for(;s.status==="retryable"&&a>0;){a--;let n=Math.max(Math.min(i,5e3)+FMe(),0);i=i*1.5;let c=s.retryInMillis??n,u=o-Date.now();if(c>u)return s;s=await this.retry(e,u,c)}return s}shutdown(){return this._transport.shutdown()}}});function u8(t,e){return Vg({transport:a8({transport:o8(t)}),serializer:e,promiseHandler:Fg(t)},{timeout:t.timeoutMillis})}var l8=k(()=>{MC();s8();CC();c8()});function d8(t){let e=(0,dE.getNumberFromEnv)(t);if(e!=null){if(Number.isFinite(e)&&e>0)return e;Qe.warn(`Configuration: ${t} is invalid, expected number greater than 0 (actual: ${e})`)}}function VMe(t){let e=d8(`OTEL_EXPORTER_OTLP_${t}_TIMEOUT`),r=d8("OTEL_EXPORTER_OTLP_TIMEOUT");return e??r}function p8(t){let e=(0,dE.getStringFromEnv)(t)?.trim();if(e==null||e==="none"||e==="gzip")return e;Qe.warn(`Configuration: ${t} is invalid, expected 'none' or 'gzip' (actual: '${e}')`)}function GMe(t){let e=p8(`OTEL_EXPORTER_OTLP_${t}_COMPRESSION`),r=p8("OTEL_EXPORTER_OTLP_COMPRESSION");return e??r}function pE(t){return{timeoutMillis:VMe(t),compression:GMe(t)}}var dE,iN=k(()=>{dE=he(K());R()});function qMe(t){let e=(0,jn.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${t}_HEADERS`),r=(0,jn.getStringFromEnv)("OTEL_EXPORTER_OTLP_HEADERS"),o=(0,jn.parseKeyPairsIntoRecord)(e),s=(0,jn.parseKeyPairsIntoRecord)(r);if(!(Object.keys(o).length===0&&Object.keys(s).length===0))return Object.assign({},(0,jn.parseKeyPairsIntoRecord)(r),(0,jn.parseKeyPairsIntoRecord)(e))}function jMe(t){try{return new URL(t).toString()}catch{Qe.warn(`Configuration: Could not parse environment-provided export URL: '${t}', falling back to undefined`);return}}function HMe(t,e){try{new URL(t)}catch{Qe.warn(`Configuration: Could not parse environment-provided export URL: '${t}', falling back to undefined`);return}t.endsWith("/")||(t=t+"/"),t+=e;try{new URL(t)}catch{Qe.warn(`Configuration: Provided URL appended with '${e}' is not a valid URL, using 'undefined' instead of '${t}'`);return}return t}function zMe(t){let e=(0,jn.getStringFromEnv)("OTEL_EXPORTER_OTLP_ENDPOINT");if(e!==void 0)return HMe(e,t)}function $Me(t){let e=(0,jn.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${t}_ENDPOINT`);if(e!==void 0)return jMe(e)}function f8(t,e){return{...pE(t),url:$Me(t)??zMe(e),headers:Dg(qMe(t))}}var jn,h8=k(()=>{jn=he(K());R();iN();Sl()});function YMe(t){if(typeof t.httpAgentOptions=="function")return t.httpAgentOptions;let e=t.httpAgentOptions;if(t.keepAlive!=null&&(e={keepAlive:t.keepAlive,...e}),e!=null)return Rl(e)}function m8(t,e,r,o){return t.metadata&&Qe.warn("Metadata cannot be set when using http"),J4({url:t.url,headers:Dg(t.headers),concurrencyLimit:t.concurrencyLimit,timeoutMillis:t.timeoutMillis,compression:t.compression,agentFactory:YMe(t)},f8(e,r),Q4(o,r))}var _8=k(()=>{R();Sl();tN();yi();h8()});var eo={};Yd(eo,{convertLegacyHttpOptions:()=>m8,createOtlpHttpExportDelegate:()=>u8,getSharedConfigurationFromEnvironment:()=>pE,httpAgentFactoryFromOptions:()=>Rl});var yi=k(()=>{tN();l8();iN();_8()});var E8=p(fE=>{"use strict";Object.defineProperty(fE,"__esModule",{value:!0});fE.OTLPLogExporter=void 0;var WMe=(kn(),y(Un)),KMe=qn(),XMe=z4(),g8=(yi(),y(eo)),oN=class extends WMe.OTLPExporterBase{constructor(e={}){super((0,g8.createOtlpHttpExportDelegate)((0,g8.convertLegacyHttpOptions)(e,"LOGS","v1/logs",{"User-Agent":`OTel-OTLP-Exporter-JavaScript/${XMe.VERSION}`,"Content-Type":"application/json"}),KMe.JsonLogsSerializer))}};fE.OTLPLogExporter=oN});var S8=p(hE=>{"use strict";Object.defineProperty(hE,"__esModule",{value:!0});hE.OTLPLogExporter=void 0;var JMe=E8();Object.defineProperty(hE,"OTLPLogExporter",{enumerable:!0,get:function(){return JMe.OTLPLogExporter}})});var T8=p(mE=>{"use strict";Object.defineProperty(mE,"__esModule",{value:!0});mE.OTLPLogExporter=void 0;var QMe=S8();Object.defineProperty(mE,"OTLPLogExporter",{enumerable:!0,get:function(){return QMe.OTLPLogExporter}})});var y8=p(_E=>{"use strict";Object.defineProperty(_E,"__esModule",{value:!0});_E.OTLPLogExporter=void 0;var ZMe=T8();Object.defineProperty(_E,"OTLPLogExporter",{enumerable:!0,get:function(){return ZMe.OTLPLogExporter}})});var se=p(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=Pr.DEFAULT_MAX_SEND_MESSAGE_LENGTH=Pr.Propagate=Pr.LogVerbosity=Pr.Status=void 0;var v8;(function(t){t[t.OK=0]="OK",t[t.CANCELLED=1]="CANCELLED",t[t.UNKNOWN=2]="UNKNOWN",t[t.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",t[t.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",t[t.NOT_FOUND=5]="NOT_FOUND",t[t.ALREADY_EXISTS=6]="ALREADY_EXISTS",t[t.PERMISSION_DENIED=7]="PERMISSION_DENIED",t[t.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",t[t.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",t[t.ABORTED=10]="ABORTED",t[t.OUT_OF_RANGE=11]="OUT_OF_RANGE",t[t.UNIMPLEMENTED=12]="UNIMPLEMENTED",t[t.INTERNAL=13]="INTERNAL",t[t.UNAVAILABLE=14]="UNAVAILABLE",t[t.DATA_LOSS=15]="DATA_LOSS",t[t.UNAUTHENTICATED=16]="UNAUTHENTICATED"})(v8||(Pr.Status=v8={}));var A8;(function(t){t[t.DEBUG=0]="DEBUG",t[t.INFO=1]="INFO",t[t.ERROR=2]="ERROR",t[t.NONE=3]="NONE"})(A8||(Pr.LogVerbosity=A8={}));var O8;(function(t){t[t.DEADLINE=1]="DEADLINE",t[t.CENSUS_STATS_CONTEXT=2]="CENSUS_STATS_CONTEXT",t[t.CENSUS_TRACING_CONTEXT=4]="CENSUS_TRACING_CONTEXT",t[t.CANCELLATION=8]="CANCELLATION",t[t.DEFAULTS=65535]="DEFAULTS"})(O8||(Pr.Propagate=O8={}));Pr.DEFAULT_MAX_SEND_MESSAGE_LENGTH=-1;Pr.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=4*1024*1024});var sN=p((Nrt,eIe)=>{eIe.exports={name:"@grpc/grpc-js",version:"1.14.1",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 copy-protos && npm run generate-types && npm run generate-test-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 proto/ proto/xds/ proto/protoc-gen-validate/ -O src/generated/ --grpcLib ../index channelz.proto xds/service/orca/v3/orca.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 echo_service.proto","copy-protos":"node ./copy-protos"},dependencies:{"@grpc/proto-loader":"^0.8.0","@js-sdsl/ordered-map":"^4.4.2"},files:["src/**/*.ts","build/src/**/*.{js,d.ts,js.map}","proto/**/*.proto","proto/**/LICENSE","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 Se=p(ar=>{"use strict";var aN,cN,uN,lN;Object.defineProperty(ar,"__esModule",{value:!0});ar.log=ar.setLoggerVerbosity=ar.setLogger=ar.getLogger=void 0;ar.trace=dIe;ar.isTracerEnabled=R8;var to=se(),tIe=b("process"),rIe=sN().version,nIe={error:(t,...e)=>{console.error("E "+t,...e)},info:(t,...e)=>{console.error("I "+t,...e)},debug:(t,...e)=>{console.error("D "+t,...e)}},ps=nIe,hc=to.LogVerbosity.ERROR,iIe=(cN=(aN=process.env.GRPC_NODE_VERBOSITY)!==null&&aN!==void 0?aN:process.env.GRPC_VERBOSITY)!==null&&cN!==void 0?cN:"";switch(iIe.toUpperCase()){case"DEBUG":hc=to.LogVerbosity.DEBUG;break;case"INFO":hc=to.LogVerbosity.INFO;break;case"ERROR":hc=to.LogVerbosity.ERROR;break;case"NONE":hc=to.LogVerbosity.NONE;break;default:}var oIe=()=>ps;ar.getLogger=oIe;var sIe=t=>{ps=t};ar.setLogger=sIe;var aIe=t=>{hc=t};ar.setLoggerVerbosity=aIe;var cIe=(t,...e)=>{let r;if(t>=hc){switch(t){case to.LogVerbosity.DEBUG:r=ps.debug;break;case to.LogVerbosity.INFO:r=ps.info;break;case to.LogVerbosity.ERROR:r=ps.error;break}r||(r=ps.error),r&&r.bind(ps)(...e)}};ar.log=cIe;var uIe=(lN=(uN=process.env.GRPC_NODE_TRACE)!==null&&uN!==void 0?uN:process.env.GRPC_TRACE)!==null&&lN!==void 0?lN:"",dN=new Set,b8=new Set;for(let t of uIe.split(","))t.startsWith("-")?b8.add(t.substring(1)):dN.add(t);var lIe=dN.has("all");function dIe(t,e,r){R8(e)&&(0,ar.log)(t,new Date().toISOString()+" | v"+rIe+" "+tIe.pid+" | "+e+" | "+r)}function R8(t){return!b8.has(t)&&(lIe||dN.has(t))}});var EE=p(gE=>{"use strict";Object.defineProperty(gE,"__esModule",{value:!0});gE.getErrorMessage=pIe;gE.getErrorCode=fIe;function pIe(t){return t instanceof Error?t.message:String(t)}function fIe(t){return typeof t=="object"&&t!==null&&"code"in t&&typeof t.code=="number"?t.code:null}});var it=p(TE=>{"use strict";Object.defineProperty(TE,"__esModule",{value:!0});TE.Metadata=void 0;var hIe=Se(),mIe=se(),_Ie=EE(),gIe=/^[:0-9a-z_.-]+$/,EIe=/^[ -~]*$/;function SIe(t){return gIe.test(t)}function TIe(t){return EIe.test(t)}function C8(t){return t.endsWith("-bin")}function yIe(t){return!t.startsWith("grpc-")}function SE(t){return t.toLowerCase()}function P8(t,e){if(!SIe(t))throw new Error('Metadata key "'+t+'" contains illegal characters');if(e!=null)if(C8(t)){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(!TIe(e))throw new Error('Metadata string value "'+e+'" contains illegal characters')}}var pN=class t{constructor(e={}){this.internalRepr=new Map,this.opaqueData=new Map,this.options=e}set(e,r){e=SE(e),P8(e,r),this.internalRepr.set(e,[r])}add(e,r){e=SE(e),P8(e,r);let o=this.internalRepr.get(e);o===void 0?this.internalRepr.set(e,[r]):o.push(r)}remove(e){e=SE(e),this.internalRepr.delete(e)}get(e){return e=SE(e),this.internalRepr.get(e)||[]}getMap(){let e={};for(let[r,o]of this.internalRepr)if(o.length>0){let s=o[0];e[r]=Buffer.isBuffer(s)?Buffer.from(s):s}return e}clone(){let e=new t(this.options),r=e.internalRepr;for(let[o,s]of this.internalRepr){let a=s.map(i=>Buffer.isBuffer(i)?Buffer.from(i):i);r.set(o,a)}return e}merge(e){for(let[r,o]of e.internalRepr){let s=(this.internalRepr.get(r)||[]).concat(o);this.internalRepr.set(r,s)}}setOptions(e){this.options=e}getOptions(){return this.options}toHttp2Headers(){let e={};for(let[r,o]of this.internalRepr)r.startsWith(":")||(e[r]=o.map(vIe));return e}toJSON(){let e={};for(let[r,o]of this.internalRepr)e[r]=o;return e}setOpaque(e,r){this.opaqueData.set(e,r)}getOpaque(e){return this.opaqueData.get(e)}static fromHttp2Headers(e){let r=new t;for(let o of Object.keys(e)){if(o.charAt(0)===":")continue;let s=e[o];try{C8(o)?Array.isArray(s)?s.forEach(a=>{r.add(o,Buffer.from(a,"base64"))}):s!==void 0&&(yIe(o)?s.split(",").forEach(a=>{r.add(o,Buffer.from(a.trim(),"base64"))}):r.add(o,Buffer.from(s,"base64"))):Array.isArray(s)?s.forEach(a=>{r.add(o,a)}):s!==void 0&&r.add(o,s)}catch(a){let i=`Failed to add metadata entry ${o}: ${s}. ${(0,_Ie.getErrorMessage)(a)}. For more information see https://github.com/grpc/grpc-node/issues/1173`;(0,hIe.log)(mIe.LogVerbosity.ERROR,i)}}return r}};TE.Metadata=pN;var vIe=t=>Buffer.isBuffer(t)?t.toString("base64"):t});var vE=p(yE=>{"use strict";Object.defineProperty(yE,"__esModule",{value:!0});yE.CallCredentials=void 0;var _N=it();function AIe(t){return"getRequestHeaders"in t&&typeof t.getRequestHeaders=="function"}var mc=class t{static createFromMetadataGenerator(e){return new hN(e)}static createFromGoogleCredential(e){return t.createFromMetadataGenerator((r,o)=>{let s;AIe(e)?s=e.getRequestHeaders(r.service_url):s=new Promise((a,i)=>{e.getRequestMetadata(r.service_url,(n,c)=>{if(n){i(n);return}if(!c){i(new Error("Headers not set by metadata plugin"));return}a(c)})}),s.then(a=>{let i=new _N.Metadata;for(let n of Object.keys(a))i.add(n,a[n]);o(null,i)},a=>{o(a)})})}static createEmpty(){return new mN}};yE.CallCredentials=mc;var fN=class t extends mc{constructor(e){super(),this.creds=e}async generateMetadata(e){let r=new _N.Metadata,o=await Promise.all(this.creds.map(s=>s.generateMetadata(e)));for(let s of o)r.merge(s);return r}compose(e){return new t(this.creds.concat([e]))}_equals(e){return this===e?!0:e instanceof t?this.creds.every((r,o)=>r._equals(e.creds[o])):!1}},hN=class t extends mc{constructor(e){super(),this.metadataGenerator=e}generateMetadata(e){return new Promise((r,o)=>{this.metadataGenerator(e,(s,a)=>{a!==void 0?r(a):o(s)})})}compose(e){return new fN([this,e])}_equals(e){return this===e?!0:e instanceof t?this.metadataGenerator===e.metadataGenerator:!1}},mN=class t extends mc{generateMetadata(e){return Promise.resolve(new _N.Metadata)}compose(e){return e}_equals(e){return e instanceof t}}});var EN=p(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.CIPHER_SUITES=void 0;Pl.getDefaultRootsData=bIe;var OIe=b("fs");Pl.CIPHER_SUITES=process.env.GRPC_SSL_CIPHER_SUITES;var N8=process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH,gN=null;function bIe(){return N8?(gN===null&&(gN=OIe.readFileSync(N8)),gN):null}});var Ft=p(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});_c.parseUri=PIe;_c.splitHostPort=CIe;_c.combineHostPort=NIe;_c.uriToString=MIe;var RIe=/^(?:([A-Za-z0-9+.-]+):)?(?:\/\/([^/]*)\/)?(.+)$/;function PIe(t){let e=RIe.exec(t);return e===null?null:{scheme:e[1],authority:e[2],path:e[3]}}var M8=/^\d+$/;function CIe(t){if(t.startsWith("[")){let e=t.indexOf("]");if(e===-1)return null;let r=t.substring(1,e);if(r.indexOf(":")===-1)return null;if(t.length>e+1)if(t[e+1]===":"){let o=t.substring(e+2);return M8.test(o)?{host:r,port:+o}:null}else return null;else return{host:r}}else{let e=t.split(":");return e.length===2?M8.test(e[1])?{host:e[0],port:+e[1]}:null:{host:t}}}function NIe(t){return t.port===void 0?t.host:t.host.includes(":")?`[${t.host}]:${t.port}`:`${t.host}:${t.port}`}function MIe(t){let e="";return t.scheme!==void 0&&(e+=t.scheme+":"),t.authority!==void 0&&(e+="//"+t.authority+"/"),e+=t.path,e}});var Yr=p(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.CHANNEL_ARGS_CONFIG_SELECTOR_KEY=void 0;vi.registerResolver=IIe;vi.registerDefaultScheme=xIe;vi.createResolver=wIe;vi.getDefaultAuthority=LIe;vi.mapUriDefaultScheme=DIe;var TN=Ft();vi.CHANNEL_ARGS_CONFIG_SELECTOR_KEY="grpc.internal.config_selector";var gc={},SN=null;function IIe(t,e){gc[t]=e}function xIe(t){SN=t}function wIe(t,e,r){if(t.scheme!==void 0&&t.scheme in gc)return new gc[t.scheme](t,e,r);throw new Error(`No resolver could be created for target ${(0,TN.uriToString)(t)}`)}function LIe(t){if(t.scheme!==void 0&&t.scheme in gc)return gc[t.scheme].getDefaultAuthority(t);throw new Error(`Invalid target ${(0,TN.uriToString)(t)}`)}function DIe(t){return t.scheme===void 0||!(t.scheme in gc)?SN!==null?{scheme:SN,authority:void 0,path:(0,TN.uriToString)(t)}:null:t}});var Ec=p(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});Nl.ChannelCredentials=void 0;Nl.createCertificateProviderChannelCredentials=FIe;var Cl=b("tls"),bE=vE(),vN=EN(),I8=Ft(),UIe=Yr(),kIe=Se(),BIe=se();function yN(t,e){if(t&&!(t instanceof Buffer))throw new TypeError(`${e}, if provided, must be a Buffer.`)}var fs=class{compose(e){return new bN(this,e)}static createSsl(e,r,o,s){var a;if(yN(e,"Root certificate"),yN(r,"Private key"),yN(o,"Certificate chain"),r&&!o)throw new Error("Private key must be given with accompanying certificate chain");if(!r&&o)throw new Error("Certificate chain must be given with accompanying private key");let i=(0,Cl.createSecureContext)({ca:(a=e??(0,vN.getDefaultRootsData)())!==null&&a!==void 0?a:void 0,key:r??void 0,cert:o??void 0,ciphers:vN.CIPHER_SUITES});return new AE(i,s??{})}static createFromSecureContext(e,r){return new AE(e,r??{})}static createInsecure(){return new AN}};Nl.ChannelCredentials=fs;var AN=class t extends fs{constructor(){super()}compose(e){throw new Error("Cannot compose insecure credentials")}_isSecure(){return!1}_equals(e){return e instanceof t}_createSecureConnector(e,r,o){return{connect(s){return Promise.resolve({socket:s,secure:!1})},waitForReady:()=>Promise.resolve(),getCallCredentials:()=>o??bE.CallCredentials.createEmpty(),destroy(){}}}};function x8(t,e,r,o){var s,a;let i={secureContext:t},n=r;if("grpc.http_connect_target"in o){let d=(0,I8.parseUri)(o["grpc.http_connect_target"]);d&&(n=d)}let c=(0,UIe.getDefaultAuthority)(n),u=(0,I8.splitHostPort)(c),l=(s=u?.host)!==null&&s!==void 0?s:c;if(i.host=l,e.checkServerIdentity&&(i.checkServerIdentity=e.checkServerIdentity),e.rejectUnauthorized!==void 0&&(i.rejectUnauthorized=e.rejectUnauthorized),i.ALPNProtocols=["h2"],o["grpc.ssl_target_name_override"]){let d=o["grpc.ssl_target_name_override"],h=(a=i.checkServerIdentity)!==null&&a!==void 0?a:Cl.checkServerIdentity;i.checkServerIdentity=(g,E)=>h(d,E),i.servername=d}else i.servername=l;return o["grpc-node.tls_enable_trace"]&&(i.enableTrace=!0),i}var ON=class{constructor(e,r){this.connectionOptions=e,this.callCredentials=r}connect(e){let r=Object.assign({socket:e},this.connectionOptions);return new Promise((o,s)=>{let a=(0,Cl.connect)(r,()=>{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(){}},AE=class t extends fs{constructor(e,r){super(),this.secureContext=e,this.verifyOptions=r}_isSecure(){return!0}_equals(e){return this===e?!0:e instanceof t?this.secureContext===e.secureContext&&this.verifyOptions.checkServerIdentity===e.verifyOptions.checkServerIdentity:!1}_createSecureConnector(e,r,o){let s=x8(this.secureContext,this.verifyOptions,e,r);return new ON(s,o??bE.CallCredentials.createEmpty())}},OE=class t extends fs{constructor(e,r,o){super(),this.caCertificateProvider=e,this.identityCertificateProvider=r,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 r,o;return this===e?!0:e instanceof t?this.caCertificateProvider===e.caCertificateProvider&&this.identityCertificateProvider===e.identityCertificateProvider&&((r=this.verifyOptions)===null||r===void 0?void 0:r.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,r,o){return this.ref(),new t.SecureConnectorImpl(this,e,r,o??bE.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,r;if(!this.latestCaUpdate||this.identityCertificateProvider!==null&&!this.latestIdentityUpdate)return null;try{return(0,Cl.createSecureContext)({ca:this.latestCaUpdate.caCertificate,key:(e=this.latestIdentityUpdate)===null||e===void 0?void 0:e.privateKey,cert:(r=this.latestIdentityUpdate)===null||r===void 0?void 0:r.certificate,ciphers:vN.CIPHER_SUITES})}catch(o){return(0,kIe.log)(BIe.LogVerbosity.ERROR,"Failed to createSecureContext with error "+o.message),null}}};OE.SecureConnectorImpl=class{constructor(t,e,r,o){this.parent=t,this.channelTarget=e,this.options=r,this.callCredentials=o}connect(t){return new Promise((e,r)=>{let o=this.parent.getLatestSecureContext();if(!o){r(new Error("Failed to load credentials"));return}t.closed&&r(new Error("Socket closed while loading credentials"));let s=x8(o,this.parent.verifyOptions,this.channelTarget,this.options),a=Object.assign({socket:t},s),i=()=>{r(new Error("Socket closed"))},n=u=>{r(u)},c=(0,Cl.connect)(a,()=>{var u;if(c.removeListener("close",i),c.removeListener("error",n),(!((u=this.parent.verifyOptions.rejectUnauthorized)!==null&&u!==void 0)||u)&&!c.authorized){r(c.authorizationError);return}e({socket:c,secure:!0})});c.once("close",i),c.once("error",n)})}async waitForReady(){await this.parent.getSecureContext()}getCallCredentials(){return this.callCredentials}destroy(){this.parent.unref()}};function FIe(t,e,r){return new OE(t,e,r??{})}var bN=class t extends fs{constructor(e,r){if(super(),this.channelCredentials=e,this.callCredentials=r,!e._isSecure())throw new Error("Cannot compose insecure credentials")}compose(e){let r=this.callCredentials.compose(e);return new t(this.channelCredentials,r)}_isSecure(){return!0}_equals(e){return this===e?!0:e instanceof t?this.channelCredentials._equals(e.channelCredentials)&&this.callCredentials._equals(e.callCredentials):!1}_createSecureConnector(e,r,o){let s=this.callCredentials.compose(o??bE.CallCredentials.createEmpty());return this.channelCredentials._createSecureConnector(e,r,s)}}});var no=p(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.createChildChannelControlHelper=qIe;Hn.registerLoadBalancerType=jIe;Hn.registerDefaultLoadBalancerType=HIe;Hn.createLoadBalancer=zIe;Hn.isLoadBalancerNameRegistered=$Ie;Hn.parseLoadBalancingConfig=w8;Hn.getDefaultConfig=YIe;Hn.selectLbConfigFromList=WIe;var VIe=Se(),GIe=se();function qIe(t,e){var r,o,s,a,i,n,c,u,l,d;return{createSubchannel:(o=(r=e.createSubchannel)===null||r===void 0?void 0:r.bind(e))!==null&&o!==void 0?o:t.createSubchannel.bind(t),updateState:(a=(s=e.updateState)===null||s===void 0?void 0:s.bind(e))!==null&&a!==void 0?a:t.updateState.bind(t),requestReresolution:(n=(i=e.requestReresolution)===null||i===void 0?void 0:i.bind(e))!==null&&n!==void 0?n:t.requestReresolution.bind(t),addChannelzChild:(u=(c=e.addChannelzChild)===null||c===void 0?void 0:c.bind(e))!==null&&u!==void 0?u:t.addChannelzChild.bind(t),removeChannelzChild:(d=(l=e.removeChannelzChild)===null||l===void 0?void 0:l.bind(e))!==null&&d!==void 0?d:t.removeChannelzChild.bind(t)}}var ro={},Ml=null;function jIe(t,e,r){ro[t]={LoadBalancer:e,LoadBalancingConfig:r}}function HIe(t){Ml=t}function zIe(t,e){let r=t.getLoadBalancerName();return r in ro?new ro[r].LoadBalancer(e):null}function $Ie(t){return t in ro}function w8(t){let e=Object.keys(t);if(e.length!==1)throw new Error("Provided load balancing config has multiple conflicting entries");let r=e[0];if(r in ro)try{return ro[r].LoadBalancingConfig.createFromJson(t[r])}catch(o){throw new Error(`${r}: ${o.message}`)}else throw new Error(`Unrecognized load balancing config name ${r}`)}function YIe(){if(!Ml)throw new Error("No default load balancer type registered");return new ro[Ml].LoadBalancingConfig}function WIe(t,e=!1){for(let r of t)try{return w8(r)}catch(o){(0,VIe.log)(GIe.LogVerbosity.DEBUG,"Config parsing failed with error",o.message);continue}return e&&Ml?new ro[Ml].LoadBalancingConfig:null}});var RN=p(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.validateRetryThrottling=L8;Il.validateServiceConfig=D8;Il.extractAndSelectServiceConfig=i0e;var KIe=b("os"),RE=se(),PE=/^\d+(\.\d{1,9})?s$/,XIe="node";function JIe(t){if("service"in t&&t.service!==""){if(typeof t.service!="string")throw new Error(`Invalid method config name: invalid service: expected type string, got ${typeof t.service}`);if("method"in t&&t.method!==""){if(typeof t.method!="string")throw new Error(`Invalid method config name: invalid method: expected type string, got ${typeof t.service}`);return{service:t.service,method:t.method}}else return{service:t.service}}else{if("method"in t&&t.method!==void 0)throw new Error("Invalid method config name: method set with empty or unset service");return{}}}function QIe(t){if(!("maxAttempts"in t)||!Number.isInteger(t.maxAttempts)||t.maxAttempts<2)throw new Error("Invalid method config retry policy: maxAttempts must be an integer at least 2");if(!("initialBackoff"in t)||typeof t.initialBackoff!="string"||!PE.test(t.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 t)||typeof t.maxBackoff!="string"||!PE.test(t.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 t)||typeof t.backoffMultiplier!="number"||t.backoffMultiplier<=0)throw new Error("Invalid method config retry policy: backoffMultiplier must be a number greater than 0");if(!("retryableStatusCodes"in t&&Array.isArray(t.retryableStatusCodes)))throw new Error("Invalid method config retry policy: retryableStatusCodes is required");if(t.retryableStatusCodes.length===0)throw new Error("Invalid method config retry policy: retryableStatusCodes must be non-empty");for(let e of t.retryableStatusCodes)if(typeof e=="number"){if(!Object.values(RE.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(RE.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:t.maxAttempts,initialBackoff:t.initialBackoff,maxBackoff:t.maxBackoff,backoffMultiplier:t.backoffMultiplier,retryableStatusCodes:t.retryableStatusCodes}}function ZIe(t){if(!("maxAttempts"in t)||!Number.isInteger(t.maxAttempts)||t.maxAttempts<2)throw new Error("Invalid method config hedging policy: maxAttempts must be an integer at least 2");if("hedgingDelay"in t&&(typeof t.hedgingDelay!="string"||!PE.test(t.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 t&&Array.isArray(t.nonFatalStatusCodes))for(let r of t.nonFatalStatusCodes)if(typeof r=="number"){if(!Object.values(RE.Status).includes(r))throw new Error("Invalid method config hedging policy: nonFatalStatusCodes value not in status code range")}else if(typeof r=="string"){if(!Object.values(RE.Status).includes(r.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:t.maxAttempts};return t.hedgingDelay&&(e.hedgingDelay=t.hedgingDelay),t.nonFatalStatusCodes&&(e.nonFatalStatusCodes=t.nonFatalStatusCodes),e}function e0e(t){var e;let r={name:[]};if(!("name"in t)||!Array.isArray(t.name))throw new Error("Invalid method config: invalid name array");for(let o of t.name)r.name.push(JIe(o));if("waitForReady"in t){if(typeof t.waitForReady!="boolean")throw new Error("Invalid method config: invalid waitForReady");r.waitForReady=t.waitForReady}if("timeout"in t)if(typeof t.timeout=="object"){if(!("seconds"in t.timeout)||typeof t.timeout.seconds!="number")throw new Error("Invalid method config: invalid timeout.seconds");if(!("nanos"in t.timeout)||typeof t.timeout.nanos!="number")throw new Error("Invalid method config: invalid timeout.nanos");r.timeout=t.timeout}else if(typeof t.timeout=="string"&&PE.test(t.timeout)){let o=t.timeout.substring(0,t.timeout.length-1).split(".");r.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 t){if(typeof t.maxRequestBytes!="number")throw new Error("Invalid method config: invalid maxRequestBytes");r.maxRequestBytes=t.maxRequestBytes}if("maxResponseBytes"in t){if(typeof t.maxResponseBytes!="number")throw new Error("Invalid method config: invalid maxRequestBytes");r.maxResponseBytes=t.maxResponseBytes}if("retryPolicy"in t){if("hedgingPolicy"in t)throw new Error("Invalid method config: retryPolicy and hedgingPolicy cannot both be specified");r.retryPolicy=QIe(t.retryPolicy)}else"hedgingPolicy"in t&&(r.hedgingPolicy=ZIe(t.hedgingPolicy));return r}function L8(t){if(!("maxTokens"in t)||typeof t.maxTokens!="number"||t.maxTokens<=0||t.maxTokens>1e3)throw new Error("Invalid retryThrottling: maxTokens must be a number in (0, 1000]");if(!("tokenRatio"in t)||typeof t.tokenRatio!="number"||t.tokenRatio<=0)throw new Error("Invalid retryThrottling: tokenRatio must be a number greater than 0");return{maxTokens:+t.maxTokens.toFixed(3),tokenRatio:+t.tokenRatio.toFixed(3)}}function t0e(t){if(!(typeof t=="object"&&t!==null))throw new Error(`Invalid loadBalancingConfig: unexpected type ${typeof t}`);let e=Object.keys(t);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]]:t[e[0]]}}function D8(t){let e={loadBalancingConfig:[],methodConfig:[]};if("loadBalancingPolicy"in t)if(typeof t.loadBalancingPolicy=="string")e.loadBalancingPolicy=t.loadBalancingPolicy;else throw new Error("Invalid service config: invalid loadBalancingPolicy");if("loadBalancingConfig"in t)if(Array.isArray(t.loadBalancingConfig))for(let o of t.loadBalancingConfig)e.loadBalancingConfig.push(t0e(o));else throw new Error("Invalid service config: invalid loadBalancingConfig");if("methodConfig"in t&&Array.isArray(t.methodConfig))for(let o of t.methodConfig)e.methodConfig.push(e0e(o));"retryThrottling"in t&&(e.retryThrottling=L8(t.retryThrottling));let r=[];for(let o of e.methodConfig)for(let s of o.name){for(let a of r)if(s.service===a.service&&s.method===a.method)throw new Error(`Invalid service config: duplicate name ${s.service}/${s.method}`);r.push(s)}return e}function r0e(t){if(!("serviceConfig"in t))throw new Error("Invalid service config choice: missing service config");let e={serviceConfig:D8(t.serviceConfig)};if("clientLanguage"in t)if(Array.isArray(t.clientLanguage)){e.clientLanguage=[];for(let o of t.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 t)if(Array.isArray(t.clientHostname)){e.clientHostname=[];for(let o of t.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 t)if(typeof t.percentage=="number"&&0<=t.percentage&&t.percentage<=100)e.percentage=t.percentage;else throw new Error("Invalid service config choice: invalid percentage");let r=["clientLanguage","percentage","clientHostname","serviceConfig"];for(let o in t)if(!r.includes(o))throw new Error(`Invalid service config choice: unexpected field ${o}`);return e}function n0e(t,e){if(!Array.isArray(t))throw new Error("Invalid service config list");for(let r of t){let o=r0e(r);if(!(typeof o.percentage=="number"&&e>o.percentage)){if(Array.isArray(o.clientHostname)){let s=!1;for(let a of o.clientHostname)a===KIe.hostname()&&(s=!0);if(!s)continue}if(Array.isArray(o.clientLanguage)){let s=!1;for(let a of o.clientLanguage)a===XIe&&(s=!0);if(!s)continue}return o.serviceConfig}}throw new Error("No matching service config found")}function i0e(t,e){for(let r of t)if(r.length>0&&r[0].startsWith("grpc_config=")){let o=r.join("").substring(12),s=JSON.parse(o);return n0e(s,e)}return null}});var Vt=p(CE=>{"use strict";Object.defineProperty(CE,"__esModule",{value:!0});CE.ConnectivityState=void 0;var U8;(function(t){t[t.IDLE=0]="IDLE",t[t.CONNECTING=1]="CONNECTING",t[t.READY=2]="READY",t[t.TRANSIENT_FAILURE=3]="TRANSIENT_FAILURE",t[t.SHUTDOWN=4]="SHUTDOWN"})(U8||(CE.ConnectivityState=U8={}))});var Ai=p(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.QueuePicker=io.UnavailablePicker=io.PickResultType=void 0;var o0e=it(),s0e=se(),NE;(function(t){t[t.COMPLETE=0]="COMPLETE",t[t.QUEUE=1]="QUEUE",t[t.TRANSIENT_FAILURE=2]="TRANSIENT_FAILURE",t[t.DROP=3]="DROP"})(NE||(io.PickResultType=NE={}));var PN=class{constructor(e){this.status=Object.assign({code:s0e.Status.UNAVAILABLE,details:"No connection established",metadata:new o0e.Metadata},e)}pick(e){return{pickResultType:NE.TRANSIENT_FAILURE,subchannel:null,status:this.status,onCallStarted:null,onCallEnded:null}}};io.UnavailablePicker=PN;var CN=class{constructor(e,r){this.loadBalancer=e,this.childPicker=r,this.calledExitIdle=!1}pick(e){return this.calledExitIdle||(process.nextTick(()=>{this.loadBalancer.exitIdle()}),this.calledExitIdle=!0),this.childPicker?this.childPicker.pick(e):{pickResultType:NE.QUEUE,subchannel:null,status:null,onCallStarted:null,onCallEnded:null}}};io.QueuePicker=CN});var Sc=p(IE=>{"use strict";Object.defineProperty(IE,"__esModule",{value:!0});IE.BackoffTimeout=void 0;var a0e=se(),c0e=Se(),u0e="backoff",l0e=1e3,d0e=1.6,p0e=12e4,f0e=.2;function h0e(t,e){return Math.random()*(e-t)+t}var ME=class t{constructor(e,r){this.callback=e,this.initialDelay=l0e,this.multiplier=d0e,this.maxDelay=p0e,this.jitter=f0e,this.running=!1,this.hasRef=!0,this.startTime=new Date,this.endTime=new Date,this.id=t.getNextId(),r&&(r.initialDelay&&(this.initialDelay=r.initialDelay),r.multiplier&&(this.multiplier=r.multiplier),r.jitter&&(this.jitter=r.jitter),r.maxDelay&&(this.maxDelay=r.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){c0e.trace(a0e.LogVerbosity.DEBUG,u0e,"{"+this.id+"} "+e)}runTimer(e){var r,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=(r=this.timerId).unref)===null||o===void 0||o.call(r)}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),r=e*this.jitter;this.nextDelay=e+h0e(-r,r)}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,r=this.startTime;r.setMilliseconds(r.getMilliseconds()+this.nextDelay),clearTimeout(this.timerId),e<r?this.runTimer(r.getTime()-e.getTime()):this.running=!1}}isRunning(){return this.running}ref(){var e,r;this.hasRef=!0,(r=(e=this.timerId).ref)===null||r===void 0||r.call(e)}unref(){var e,r;this.hasRef=!1,(r=(e=this.timerId).unref)===null||r===void 0||r.call(e)}getEndTime(){return this.endTime}};IE.BackoffTimeout=ME;ME.nextId=0});var wE=p(xE=>{"use strict";Object.defineProperty(xE,"__esModule",{value:!0});xE.ChildLoadBalancerHandler=void 0;var m0e=no(),_0e=Vt(),g0e="child_load_balancer_helper",NN=class{constructor(e){this.channelControlHelper=e,this.currentChild=null,this.pendingChild=null,this.latestConfig=null,this.ChildPolicyHelper=class{constructor(r){this.parent=r,this.child=null}createSubchannel(r,o){return this.parent.channelControlHelper.createSubchannel(r,o)}updateState(r,o,s){var a;if(this.calledByPendingChild()){if(r===_0e.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(r,o,s)}requestReresolution(){var r;let o=(r=this.parent.pendingChild)!==null&&r!==void 0?r:this.parent.currentChild;this.child===o&&this.parent.channelControlHelper.requestReresolution()}setChild(r){this.child=r}addChannelzChild(r){this.parent.channelControlHelper.addChannelzChild(r)}removeChannelzChild(r){this.parent.channelControlHelper.removeChannelzChild(r)}calledByPendingChild(){return this.child===this.parent.pendingChild}calledByCurrentChild(){return this.child===this.parent.currentChild}}}configUpdateRequiresNewPolicyInstance(e,r){return e.getLoadBalancerName()!==r.getLoadBalancerName()}updateAddressList(e,r,o,s){let a;if(this.currentChild===null||this.latestConfig===null||this.configUpdateRequiresNewPolicyInstance(this.latestConfig,r)){let i=new this.ChildPolicyHelper(this),n=(0,m0e.createLoadBalancer)(r,i);i.setChild(n),this.currentChild===null?(this.currentChild=n,a=this.currentChild):(this.pendingChild&&this.pendingChild.destroy(),this.pendingChild=n,a=this.pendingChild)}else this.pendingChild===null?a=this.currentChild:a=this.pendingChild;return this.latestConfig=r,a.updateAddressList(e,r,o,s)}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 g0e}};xE.ChildLoadBalancerHandler=NN});var F8=p(LE=>{"use strict";Object.defineProperty(LE,"__esModule",{value:!0});LE.ResolvingLoadBalancer=void 0;var E0e=no(),S0e=RN(),Jt=Vt(),k8=Yr(),xl=Ai(),T0e=Sc(),MN=se(),y0e=it(),v0e=Se(),A0e=se(),O0e=Ft(),b0e=wE(),R0e="resolving_load_balancer";function B8(t){v0e.trace(A0e.LogVerbosity.DEBUG,R0e,t)}var P0e=["SERVICE_AND_METHOD","SERVICE","EMPTY"];function C0e(t,e,r,o){for(let s of r.name)switch(o){case"EMPTY":if(!s.service&&!s.method)return!0;break;case"SERVICE":if(s.service===t&&!s.method)return!0;break;case"SERVICE_AND_METHOD":if(s.service===t&&s.method===e)return!0}return!1}function N0e(t,e,r,o){for(let s of r)if(C0e(t,e,s,o))return s;return null}function M0e(t){return{invoke(e,r){var o,s;let a=e.split("/").filter(c=>c.length>0),i=(o=a[0])!==null&&o!==void 0?o:"",n=(s=a[1])!==null&&s!==void 0?s:"";if(t&&t.methodConfig)for(let c of P0e){let u=N0e(i,n,t.methodConfig,c);if(u)return{methodConfig:u,pickInformation:{},status:MN.Status.OK,dynamicFilterFactories:[]}}return{methodConfig:{name:[]},pickInformation:{},status:MN.Status.OK,dynamicFilterFactories:[]}},unref(){}}}var IN=class{constructor(e,r,o,s,a){this.target=e,this.channelControlHelper=r,this.channelOptions=o,this.onSuccessfulResolution=s,this.onFailedResolution=a,this.latestChildState=Jt.ConnectivityState.IDLE,this.latestChildPicker=new xl.QueuePicker(this),this.latestChildErrorMessage=null,this.currentState=Jt.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1,o["grpc.service_config"]?this.defaultServiceConfig=(0,S0e.validateServiceConfig)(JSON.parse(o["grpc.service_config"])):this.defaultServiceConfig={loadBalancingConfig:[],methodConfig:[]},this.updateState(Jt.ConnectivityState.IDLE,new xl.QueuePicker(this),null),this.childLoadBalancer=new b0e.ChildLoadBalancerHandler({createSubchannel:r.createSubchannel.bind(r),requestReresolution:()=>{this.backoffTimeout.isRunning()?(B8("requestReresolution delayed by backoff timer until "+this.backoffTimeout.getEndTime().toISOString()),this.continueResolving=!0):this.updateResolution()},updateState:(n,c,u)=>{this.latestChildState=n,this.latestChildPicker=c,this.latestChildErrorMessage=u,this.updateState(n,c,u)},addChannelzChild:r.addChannelzChild.bind(r),removeChannelzChild:r.removeChannelzChild.bind(r)}),this.innerResolver=(0,k8.createResolver)(e,this.handleResolverResult.bind(this),o);let i={initialDelay:o["grpc.initial_reconnect_backoff_ms"],maxDelay:o["grpc.max_reconnect_backoff_ms"]};this.backoffTimeout=new T0e.BackoffTimeout(()=>{this.continueResolving?(this.updateResolution(),this.continueResolving=!1):this.updateState(this.latestChildState,this.latestChildPicker,this.latestChildErrorMessage)},i),this.backoffTimeout.unref()}handleResolverResult(e,r,o,s){var a,i;this.backoffTimeout.stop(),this.backoffTimeout.reset();let n=!0,c=null;if(o===null?c=this.defaultServiceConfig:o.ok?c=o.value:this.previousServiceConfig!==null?c=this.previousServiceConfig:(n=!1,this.handleResolutionFailure(o.error)),c!==null){let u=(a=c?.loadBalancingConfig)!==null&&a!==void 0?a:[],l=(0,E0e.selectLbConfigFromList)(u,!0);l===null?(n=!1,this.handleResolutionFailure({code:MN.Status.UNAVAILABLE,details:"All load balancer options in service config are not compatible",metadata:new y0e.Metadata})):n=this.childLoadBalancer.updateAddressList(e,l,Object.assign(Object.assign({},this.channelOptions),r),s)}return n&&this.onSuccessfulResolution(c,(i=r[k8.CHANNEL_ARGS_CONFIG_SELECTOR_KEY])!==null&&i!==void 0?i:M0e(c)),n}updateResolution(){this.innerResolver.updateResolution(),this.currentState===Jt.ConnectivityState.IDLE&&this.updateState(Jt.ConnectivityState.CONNECTING,this.latestChildPicker,this.latestChildErrorMessage),this.backoffTimeout.runOnce()}updateState(e,r,o){B8((0,O0e.uriToString)(this.target)+" "+Jt.ConnectivityState[this.currentState]+" -> "+Jt.ConnectivityState[e]),e===Jt.ConnectivityState.IDLE&&(r=new xl.QueuePicker(this,r)),this.currentState=e,this.channelControlHelper.updateState(e,r,o)}handleResolutionFailure(e){this.latestChildState===Jt.ConnectivityState.IDLE&&(this.updateState(Jt.ConnectivityState.TRANSIENT_FAILURE,new xl.UnavailablePicker(e),e.details),this.onFailedResolution(e))}exitIdle(){(this.currentState===Jt.ConnectivityState.IDLE||this.currentState===Jt.ConnectivityState.TRANSIENT_FAILURE)&&(this.backoffTimeout.isRunning()?this.continueResolving=!0:this.updateResolution()),this.childLoadBalancer.exitIdle()}updateAddressList(e,r){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=Jt.ConnectivityState.IDLE,this.latestChildPicker=new xl.QueuePicker(this),this.currentState=Jt.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1}getTypeName(){return"resolving_load_balancer"}};LE.ResolvingLoadBalancer=IN});var V8=p(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});wl.recognizedOptions=void 0;wl.channelOptionsEqual=I0e;wl.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,"grpc.server_call_metric_recording":!0};function I0e(t,e){let r=Object.keys(t).sort(),o=Object.keys(e).sort();if(r.length!==o.length)return!1;for(let s=0;s<r.length;s+=1)if(r[s]!==o[s]||t[r[s]]!==e[o[s]])return!1;return!0}});var Qt=p(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.EndpointMap=void 0;Wr.isTcpSubchannelAddress=Dl;Wr.subchannelAddressEqual=DE;Wr.subchannelAddressToString=q8;Wr.stringToSubchannelAddress=w0e;Wr.endpointEqual=L0e;Wr.endpointToString=D0e;Wr.endpointHasAddress=j8;var G8=b("net");function Dl(t){return"port"in t}function DE(t,e){return!t&&!e?!0:!t||!e?!1:Dl(t)?Dl(e)&&t.host===e.host&&t.port===e.port:!Dl(e)&&t.path===e.path}function q8(t){return Dl(t)?(0,G8.isIPv6)(t.host)?"["+t.host+"]:"+t.port:t.host+":"+t.port:t.path}var x0e=443;function w0e(t,e){return(0,G8.isIP)(t)?{host:t,port:e??x0e}:{path:t}}function L0e(t,e){if(t.addresses.length!==e.addresses.length)return!1;for(let r=0;r<t.addresses.length;r++)if(!DE(t.addresses[r],e.addresses[r]))return!1;return!0}function D0e(t){return"["+t.addresses.map(q8).join(", ")+"]"}function j8(t,e){for(let r of t.addresses)if(DE(r,e))return!0;return!1}function Ll(t,e){if(t.addresses.length!==e.addresses.length)return!1;for(let r of t.addresses){let o=!1;for(let s of e.addresses)if(DE(r,s)){o=!0;break}if(!o)return!1}return!0}var xN=class{constructor(){this.map=new Set}get size(){return this.map.size}getForSubchannelAddress(e){for(let r of this.map)if(j8(r.key,e))return r.value}deleteMissing(e){let r=[];for(let o of this.map){let s=!1;for(let a of e)Ll(a,o.key)&&(s=!0);s||(r.push(o.value),this.map.delete(o))}return r}get(e){for(let r of this.map)if(Ll(e,r.key))return r.value}set(e,r){for(let o of this.map)if(Ll(e,o.key)){o.value=r;return}this.map.add({key:e,value:r})}delete(e){for(let r of this.map)if(Ll(e,r.key)){this.map.delete(r);return}}has(e){for(let r of this.map)if(Ll(e,r.key))return!0;return!1}clear(){this.map.clear()}*keys(){for(let e of this.map)yield e.key}*values(){for(let e of this.map)yield e.value}*entries(){for(let e of this.map)yield[e.key,e.value]}};Wr.EndpointMap=xN});var H8=p(VN=>{"use strict";Object.defineProperty(VN,"t",{value:!0});var UE=class{constructor(e,r,o=1){this.i=void 0,this.h=void 0,this.o=void 0,this.u=e,this.l=r,this.p=o}I(){let e=this,r=e.o.o===e;if(r&&e.p===1)e=e.h;else if(e.i)for(e=e.i;e.h;)e=e.h;else{if(r)return e.o;let o=e.o;for(;o.i===e;)e=o,o=e.o;e=o}return e}B(){let e=this;if(e.h){for(e=e.h;e.i;)e=e.i;return e}else{let r=e.o;for(;r.h===e;)e=r,r=e.o;return e.h!==r?r:e}}_(){let e=this.o,r=this.h,o=r.i;return e.o===this?e.o=r:e.i===this?e.i=r:e.h=r,r.o=e,r.i=this,this.o=r,this.h=o,o&&(o.o=this),r}g(){let e=this.o,r=this.i,o=r.h;return e.o===this?e.o=r:e.i===this?e.i=r:e.h=r,r.o=e,r.h=this,this.o=r,this.i=o,o&&(o.o=this),r}},wN=class extends UE{constructor(){super(...arguments),this.M=1}_(){let e=super._();return this.O(),e.O(),e}g(){let e=super.g();return this.O(),e.O(),e}O(){this.M=1,this.i&&(this.M+=this.i.M),this.h&&(this.M+=this.h.M)}},LN=class{constructor(e=0){this.iteratorType=e}equals(e){return this.T===e.T}},DN=class{constructor(){this.m=0}get length(){return this.m}size(){return this.m}empty(){return this.m===0}},UN=class extends DN{};function hs(){throw new RangeError("Iterator access denied!")}var kN=class extends UN{constructor(e=function(o,s){return o<s?-1:o>s?1:0},r=!1){super(),this.v=void 0,this.A=e,this.enableIndex=r,this.N=r?wN:UE,this.C=new this.N}R(e,r){let o=this.C;for(;e;){let s=this.A(e.u,r);if(s<0)e=e.h;else if(s>0)o=e,e=e.i;else return e}return o}K(e,r){let o=this.C;for(;e;)this.A(e.u,r)<=0?e=e.h:(o=e,e=e.i);return o}L(e,r){let o=this.C;for(;e;){let s=this.A(e.u,r);if(s<0)o=e,e=e.h;else if(s>0)e=e.i;else return e}return o}k(e,r){let o=this.C;for(;e;)this.A(e.u,r)<0?(o=e,e=e.h):e=e.i;return o}P(e){for(;;){let r=e.o;if(r===this.C)return;if(e.p===1){e.p=0;return}if(e===r.i){let o=r.h;if(o.p===1)o.p=0,r.p=1,r===this.v?this.v=r._():r._();else if(o.h&&o.h.p===1){o.p=r.p,r.p=0,o.h.p=0,r===this.v?this.v=r._():r._();return}else o.i&&o.i.p===1?(o.p=1,o.i.p=0,o.g()):(o.p=1,e=r)}else{let o=r.i;if(o.p===1)o.p=0,r.p=1,r===this.v?this.v=r.g():r.g();else if(o.i&&o.i.p===1){o.p=r.p,r.p=0,o.i.p=0,r===this.v?this.v=r.g():r.g();return}else o.h&&o.h.p===1?(o.p=1,o.h.p=0,o._()):(o.p=1,e=r)}}}S(e){if(this.m===1){this.clear();return}let r=e;for(;r.i||r.h;){if(r.h)for(r=r.h;r.i;)r=r.i;else r=r.i;let s=e.u;e.u=r.u,r.u=s;let a=e.l;e.l=r.l,r.l=a,e=r}this.C.i===r?this.C.i=r.o:this.C.h===r&&(this.C.h=r.o),this.P(r);let o=r.o;if(r===o.i?o.i=void 0:o.h=void 0,this.m-=1,this.v.p=0,this.enableIndex)for(;o!==this.C;)o.M-=1,o=o.o}U(e){let r=typeof e=="number"?e:void 0,o=typeof e=="function"?e:void 0,s=typeof e>"u"?[]:void 0,a=0,i=this.v,n=[];for(;n.length||i;)if(i)n.push(i),i=i.i;else{if(i=n.pop(),a===r)return i;s&&s.push(i),o&&o(i,a,this),a+=1,i=i.h}return s}j(e){for(;;){let r=e.o;if(r.p===0)return;let o=r.o;if(r===o.i){let s=o.h;if(s&&s.p===1){if(s.p=r.p=0,o===this.v)return;o.p=1,e=o;continue}else if(e===r.h){if(e.p=0,e.i&&(e.i.o=r),e.h&&(e.h.o=o),r.h=e.i,o.i=e.h,e.i=r,e.h=o,o===this.v)this.v=e,this.C.o=e;else{let a=o.o;a.i===o?a.i=e:a.h=e}e.o=o.o,r.o=e,o.o=e,o.p=1}else{r.p=0,o===this.v?this.v=o.g():o.g(),o.p=1;return}}else{let s=o.i;if(s&&s.p===1){if(s.p=r.p=0,o===this.v)return;o.p=1,e=o;continue}else if(e===r.i){if(e.p=0,e.i&&(e.i.o=o),e.h&&(e.h.o=r),o.h=e.i,r.i=e.h,e.i=o,e.h=r,o===this.v)this.v=e,this.C.o=e;else{let a=o.o;a.i===o?a.i=e:a.h=e}e.o=o.o,r.o=e,o.o=e,o.p=1}else{r.p=0,o===this.v?this.v=o._():o._(),o.p=1;return}}this.enableIndex&&(r.O(),o.O(),e.O());return}}q(e,r,o){if(this.v===void 0)return this.m+=1,this.v=new this.N(e,r,0),this.v.o=this.C,this.C.o=this.C.i=this.C.h=this.v,this.m;let s,a=this.C.i,i=this.A(a.u,e);if(i===0)return a.l=r,this.m;if(i>0)a.i=new this.N(e,r),a.i.o=a,s=a.i,this.C.i=s;else{let n=this.C.h,c=this.A(n.u,e);if(c===0)return n.l=r,this.m;if(c<0)n.h=new this.N(e,r),n.h.o=n,s=n.h,this.C.h=s;else{if(o!==void 0){let u=o.T;if(u!==this.C){let l=this.A(u.u,e);if(l===0)return u.l=r,this.m;if(l>0){let d=u.I(),h=this.A(d.u,e);if(h===0)return d.l=r,this.m;h<0&&(s=new this.N(e,r),d.h===void 0?(d.h=s,s.o=d):(u.i=s,s.o=u))}}}if(s===void 0)for(s=this.v;;){let u=this.A(s.u,e);if(u>0){if(s.i===void 0){s.i=new this.N(e,r),s.i.o=s,s=s.i;break}s=s.i}else if(u<0){if(s.h===void 0){s.h=new this.N(e,r),s.h.o=s,s=s.h;break}s=s.h}else return s.l=r,this.m}}}if(this.enableIndex){let n=s.o;for(;n!==this.C;)n.M+=1,n=n.o}return this.j(s),this.m+=1,this.m}H(e,r){for(;e;){let o=this.A(e.u,r);if(o<0)e=e.h;else if(o>0)e=e.i;else return e}return e||this.C}clear(){this.m=0,this.v=void 0,this.C.o=void 0,this.C.i=this.C.h=void 0}updateKeyByIterator(e,r){let o=e.T;if(o===this.C&&hs(),this.m===1)return o.u=r,!0;let s=o.B().u;if(o===this.C.i)return this.A(s,r)>0?(o.u=r,!0):!1;let a=o.I().u;return o===this.C.h?this.A(a,r)<0?(o.u=r,!0):!1:this.A(a,r)>=0||this.A(s,r)<=0?!1:(o.u=r,!0)}eraseElementByPos(e){if(e<0||e>this.m-1)throw new RangeError;let r=this.U(e);return this.S(r),this.m}eraseElementByKey(e){if(this.m===0)return!1;let r=this.H(this.v,e);return r===this.C?!1:(this.S(r),!0)}eraseElementByIterator(e){let r=e.T;r===this.C&&hs();let o=r.h===void 0;return e.iteratorType===0?o&&e.next():(!o||r.i===void 0)&&e.next(),this.S(r),e}getHeight(){if(this.m===0)return 0;function e(r){return r?Math.max(e(r.i),e(r.h))+1:0}return e(this.v)}},BN=class extends LN{constructor(e,r,o){super(o),this.T=e,this.C=r,this.iteratorType===0?(this.pre=function(){return this.T===this.C.i&&hs(),this.T=this.T.I(),this},this.next=function(){return this.T===this.C&&hs(),this.T=this.T.B(),this}):(this.pre=function(){return this.T===this.C.h&&hs(),this.T=this.T.B(),this},this.next=function(){return this.T===this.C&&hs(),this.T=this.T.I(),this})}get index(){let e=this.T,r=this.C.o;if(e===this.C)return r?r.M-1:0;let o=0;for(e.i&&(o+=e.i.M);e!==r;){let s=e.o;e===s.h&&(o+=1,s.i&&(o+=s.i.M)),e=s}return o}isAccessible(){return this.T!==this.C}},Kr=class t extends BN{constructor(e,r,o,s){super(e,r,s),this.container=o}get pointer(){this.T===this.C&&hs();let e=this;return new Proxy([],{get(r,o){return o==="0"?e.T.u:o==="1"?e.T.l:(r[0]=e.T.u,r[1]=e.T.l,r[o])},set(r,o,s){if(o!=="1")throw new TypeError("prop must be 1");return e.T.l=s,!0}})}copy(){return new t(this.T,this.C,this.container,this.iteratorType)}},FN=class extends kN{constructor(e=[],r,o){super(r,o);let s=this;e.forEach((function(a){s.setElement(a[0],a[1])}))}begin(){return new Kr(this.C.i||this.C,this.C,this)}end(){return new Kr(this.C,this.C,this)}rBegin(){return new Kr(this.C.h||this.C,this.C,this,1)}rEnd(){return new Kr(this.C,this.C,this,1)}front(){if(this.m===0)return;let e=this.C.i;return[e.u,e.l]}back(){if(this.m===0)return;let e=this.C.h;return[e.u,e.l]}lowerBound(e){let r=this.R(this.v,e);return new Kr(r,this.C,this)}upperBound(e){let r=this.K(this.v,e);return new Kr(r,this.C,this)}reverseLowerBound(e){let r=this.L(this.v,e);return new Kr(r,this.C,this)}reverseUpperBound(e){let r=this.k(this.v,e);return new Kr(r,this.C,this)}forEach(e){this.U((function(r,o,s){e([r.u,r.l],o,s)}))}setElement(e,r,o){return this.q(e,r,o)}getElementByPos(e){if(e<0||e>this.m-1)throw new RangeError;let r=this.U(e);return[r.u,r.l]}find(e){let r=this.H(this.v,e);return new Kr(r,this.C,this)}getElementByKey(e){return this.H(this.v,e).l}union(e){let r=this;return e.forEach((function(o){r.setElement(o[0],o[1])})),this.m}*[Symbol.iterator](){let e=this.m,r=this.U();for(let o=0;o<e;++o){let s=r[o];yield[s.u,s.l]}}};VN.OrderedMap=FN});var BE=p(kE=>{"use strict";Object.defineProperty(kE,"__esModule",{value:!0});kE.registerAdminService=U0e;kE.addAdminServicesToServer=k0e;var z8=[];function U0e(t,e){z8.push({getServiceDefinition:t,getHandlers:e})}function k0e(t){for(let{getServiceDefinition:e,getHandlers:r}of z8)t.addService(e(),r())}});var $8=p(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.ClientDuplexStreamImpl=Xr.ClientWritableStreamImpl=Xr.ClientReadableStreamImpl=Xr.ClientUnaryCallImpl=void 0;Xr.callErrorFromStatus=F0e;var B0e=b("events"),zN=b("stream"),Ul=se();function F0e(t,e){let r=`${t.code} ${Ul.Status[t.code]}: ${t.details}`,s=`${new Error(r).stack}
|
|
23
|
+
for call at
|
|
24
|
+
${e}`;return Object.assign(new Error(r),t,{stack:s})}var GN=class extends B0e.EventEmitter{constructor(){super()}cancel(){var e;(e=this.call)===null||e===void 0||e.cancelWithStatus(Ul.Status.CANCELLED,"Cancelled on client")}getPeer(){var e,r;return(r=(e=this.call)===null||e===void 0?void 0:e.getPeer())!==null&&r!==void 0?r:"unknown"}getAuthContext(){var e,r;return(r=(e=this.call)===null||e===void 0?void 0:e.getAuthContext())!==null&&r!==void 0?r:null}};Xr.ClientUnaryCallImpl=GN;var qN=class extends zN.Readable{constructor(e){super({objectMode:!0}),this.deserialize=e}cancel(){var e;(e=this.call)===null||e===void 0||e.cancelWithStatus(Ul.Status.CANCELLED,"Cancelled on client")}getPeer(){var e,r;return(r=(e=this.call)===null||e===void 0?void 0:e.getPeer())!==null&&r!==void 0?r:"unknown"}getAuthContext(){var e,r;return(r=(e=this.call)===null||e===void 0?void 0:e.getAuthContext())!==null&&r!==void 0?r:null}_read(e){var r;(r=this.call)===null||r===void 0||r.startRead()}};Xr.ClientReadableStreamImpl=qN;var jN=class extends zN.Writable{constructor(e){super({objectMode:!0}),this.serialize=e}cancel(){var e;(e=this.call)===null||e===void 0||e.cancelWithStatus(Ul.Status.CANCELLED,"Cancelled on client")}getPeer(){var e,r;return(r=(e=this.call)===null||e===void 0?void 0:e.getPeer())!==null&&r!==void 0?r:"unknown"}getAuthContext(){var e,r;return(r=(e=this.call)===null||e===void 0?void 0:e.getAuthContext())!==null&&r!==void 0?r:null}_write(e,r,o){var s;let a={callback:o},i=Number(r);Number.isNaN(i)||(a.flags=i),(s=this.call)===null||s===void 0||s.sendMessageWithContext(a,e)}_final(e){var r;(r=this.call)===null||r===void 0||r.halfClose(),e()}};Xr.ClientWritableStreamImpl=jN;var HN=class extends zN.Duplex{constructor(e,r){super({objectMode:!0}),this.serialize=e,this.deserialize=r}cancel(){var e;(e=this.call)===null||e===void 0||e.cancelWithStatus(Ul.Status.CANCELLED,"Cancelled on client")}getPeer(){var e,r;return(r=(e=this.call)===null||e===void 0?void 0:e.getPeer())!==null&&r!==void 0?r:"unknown"}getAuthContext(){var e,r;return(r=(e=this.call)===null||e===void 0?void 0:e.getAuthContext())!==null&&r!==void 0?r:null}_read(e){var r;(r=this.call)===null||r===void 0||r.startRead()}_write(e,r,o){var s;let a={callback:o},i=Number(r);Number.isNaN(i)||(a.flags=i),(s=this.call)===null||s===void 0||s.sendMessageWithContext(a,e)}_final(e){var r;(r=this.call)===null||r===void 0||r.halfClose(),e()}};Xr.ClientDuplexStreamImpl=HN});var _s=p(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});ms.InterceptingListenerImpl=void 0;ms.statusOrFromValue=G0e;ms.statusOrFromError=q0e;ms.isInterceptingListener=j0e;var V0e=it();function G0e(t){return{ok:!0,value:t}}function q0e(t){var e;return{ok:!1,error:Object.assign(Object.assign({},t),{metadata:(e=t.metadata)!==null&&e!==void 0?e:new V0e.Metadata})}}function j0e(t){return t.onReceiveMetadata!==void 0&&t.onReceiveMetadata.length===1}var $N=class{constructor(e,r){this.listener=e,this.nextListener=r,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,r=>{this.processingMetadata=!1,this.nextListener.onReceiveMetadata(r),this.processPendingMessage(),this.processPendingStatus()})}onReceiveMessage(e){this.processingMessage=!0,this.listener.onReceiveMessage(e,r=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessage=r,this.hasPendingMessage=!0):(this.nextListener.onReceiveMessage(r),this.processPendingStatus())})}onReceiveStatus(e){this.listener.onReceiveStatus(e,r=>{this.processingMetadata||this.processingMessage?this.pendingStatus=r:this.nextListener.onReceiveStatus(r)})}};ms.InterceptingListenerImpl=$N});var ZN=p(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.InterceptingCall=Jr.RequesterBuilder=Jr.ListenerBuilder=Jr.InterceptorConfigurationError=void 0;Jr.getInterceptingCall=Y0e;var H0e=it(),Y8=_s(),W8=se(),K8=EE(),Bl=class t extends Error{constructor(e){super(e),this.name="InterceptorConfigurationError",Error.captureStackTrace(this,t)}};Jr.InterceptorConfigurationError=Bl;var WN=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}}};Jr.ListenerBuilder=WN;var KN=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}}};Jr.RequesterBuilder=KN;var YN={onReceiveMetadata:(t,e)=>{e(t)},onReceiveMessage:(t,e)=>{e(t)},onReceiveStatus:(t,e)=>{e(t)}},kl={start:(t,e,r)=>{r(t,e)},sendMessage:(t,e)=>{e(t)},halfClose:t=>{t()},cancel:t=>{t()}},XN=class{constructor(e,r){var o,s,a,i;this.nextCall=e,this.processingMetadata=!1,this.pendingMessageContext=null,this.processingMessage=!1,this.pendingHalfClose=!1,r?this.requester={start:(o=r.start)!==null&&o!==void 0?o:kl.start,sendMessage:(s=r.sendMessage)!==null&&s!==void 0?s:kl.sendMessage,halfClose:(a=r.halfClose)!==null&&a!==void 0?a:kl.halfClose,cancel:(i=r.cancel)!==null&&i!==void 0?i:kl.cancel}:this.requester=kl}cancelWithStatus(e,r){this.requester.cancel(()=>{this.nextCall.cancelWithStatus(e,r)})}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,r){var o,s,a,i,n,c;let u={onReceiveMetadata:(s=(o=r?.onReceiveMetadata)===null||o===void 0?void 0:o.bind(r))!==null&&s!==void 0?s:(l=>{}),onReceiveMessage:(i=(a=r?.onReceiveMessage)===null||a===void 0?void 0:a.bind(r))!==null&&i!==void 0?i:(l=>{}),onReceiveStatus:(c=(n=r?.onReceiveStatus)===null||n===void 0?void 0:n.bind(r))!==null&&c!==void 0?c:(l=>{})};this.processingMetadata=!0,this.requester.start(e,u,(l,d)=>{var h,g,E;this.processingMetadata=!1;let S;if((0,Y8.isInterceptingListener)(d))S=d;else{let v={onReceiveMetadata:(h=d.onReceiveMetadata)!==null&&h!==void 0?h:YN.onReceiveMetadata,onReceiveMessage:(g=d.onReceiveMessage)!==null&&g!==void 0?g:YN.onReceiveMessage,onReceiveStatus:(E=d.onReceiveStatus)!==null&&E!==void 0?E:YN.onReceiveStatus};S=new Y8.InterceptingListenerImpl(v,u)}this.nextCall.start(l,S),this.processPendingMessage(),this.processPendingHalfClose()})}sendMessageWithContext(e,r){this.processingMessage=!0,this.requester.sendMessage(r,o=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessageContext=e,this.pendingMessage=r):(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()})}getAuthContext(){return this.nextCall.getAuthContext()}};Jr.InterceptingCall=XN;function z0e(t,e,r){var o,s;let a=(o=r.deadline)!==null&&o!==void 0?o:1/0,i=r.host,n=(s=r.parent)!==null&&s!==void 0?s:null,c=r.propagate_flags,u=r.credentials,l=t.createCall(e,a,i,n,c);return u&&l.setCredentials(u),l}var FE=class{constructor(e,r){this.call=e,this.methodDefinition=r}cancelWithStatus(e,r){this.call.cancelWithStatus(e,r)}getPeer(){return this.call.getPeer()}sendMessageWithContext(e,r){let o;try{o=this.methodDefinition.requestSerialize(r)}catch(s){this.call.cancelWithStatus(W8.Status.INTERNAL,`Request message serialization failure: ${(0,K8.getErrorMessage)(s)}`);return}this.call.sendMessageWithContext(e,o)}sendMessage(e){this.sendMessageWithContext({},e)}start(e,r){let o=null;this.call.start(e,{onReceiveMetadata:s=>{var a;(a=r?.onReceiveMetadata)===null||a===void 0||a.call(r,s)},onReceiveMessage:s=>{var a;let i;try{i=this.methodDefinition.responseDeserialize(s)}catch(n){o={code:W8.Status.INTERNAL,details:`Response message parsing error: ${(0,K8.getErrorMessage)(n)}`,metadata:new H0e.Metadata},this.call.cancelWithStatus(o.code,o.details);return}(a=r?.onReceiveMessage)===null||a===void 0||a.call(r,i)},onReceiveStatus:s=>{var a,i;o?(a=r?.onReceiveStatus)===null||a===void 0||a.call(r,o):(i=r?.onReceiveStatus)===null||i===void 0||i.call(r,s)}})}startRead(){this.call.startRead()}halfClose(){this.call.halfClose()}getAuthContext(){return this.call.getAuthContext()}},JN=class extends FE{constructor(e,r){super(e,r)}start(e,r){var o,s;let a=!1,i={onReceiveMetadata:(s=(o=r?.onReceiveMetadata)===null||o===void 0?void 0:o.bind(r))!==null&&s!==void 0?s:(n=>{}),onReceiveMessage:n=>{var c;a=!0,(c=r?.onReceiveMessage)===null||c===void 0||c.call(r,n)},onReceiveStatus:n=>{var c,u;a||(c=r?.onReceiveMessage)===null||c===void 0||c.call(r,null),(u=r?.onReceiveStatus)===null||u===void 0||u.call(r,n)}};super.start(e,i),this.call.startRead()}},QN=class extends FE{};function $0e(t,e,r){let o=z0e(t,r.path,e);return r.responseStream?new QN(o,r):new JN(o,r)}function Y0e(t,e,r,o){if(t.clientInterceptors.length>0&&t.clientInterceptorProviders.length>0)throw new Bl("Both interceptors and interceptor_providers were passed as options to the client constructor. Only one of these is allowed.");if(t.callInterceptors.length>0&&t.callInterceptorProviders.length>0)throw new Bl("Both interceptors and interceptor_providers were passed as call options. Only one of these is allowed.");let s=[];t.callInterceptors.length>0||t.callInterceptorProviders.length>0?s=[].concat(t.callInterceptors,t.callInterceptorProviders.map(n=>n(e))).filter(n=>n):s=[].concat(t.clientInterceptors,t.clientInterceptorProviders.map(n=>n(e))).filter(n=>n);let a=Object.assign({},r,{method_definition:e});return s.reduceRight((n,c)=>u=>c(u,n),n=>$0e(o,n,e))(a)}});var rM=p(GE=>{"use strict";Object.defineProperty(GE,"__esModule",{value:!0});GE.Client=void 0;var zn=$8(),W0e=nM(),K0e=Vt(),oo=se(),Tc=it(),VE=ZN(),Qr=Symbol(),yc=Symbol(),vc=Symbol(),Oi=Symbol();function eM(t){return typeof t=="function"}function Ac(t){var e;return((e=t.stack)===null||e===void 0?void 0:e.split(`
|
|
25
|
+
`).slice(1).join(`
|
|
26
|
+
`))||"no stack trace available"}var tM=class{constructor(e,r,o={}){var s,a;if(o=Object.assign({},o),this[yc]=(s=o.interceptors)!==null&&s!==void 0?s:[],delete o.interceptors,this[vc]=(a=o.interceptor_providers)!==null&&a!==void 0?a:[],delete o.interceptor_providers,this[yc].length>0&&this[vc].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[Oi]=o.callInvocationTransformer,delete o.callInvocationTransformer,o.channelOverride)this[Qr]=o.channelOverride;else if(o.channelFactoryOverride){let i=o.channelFactoryOverride;delete o.channelFactoryOverride,this[Qr]=i(e,r,o)}else this[Qr]=new W0e.ChannelImplementation(e,r,o)}close(){this[Qr].close()}getChannel(){return this[Qr]}waitForReady(e,r){let o=s=>{if(s){r(new Error("Failed to connect before the deadline"));return}let a;try{a=this[Qr].getConnectivityState(!0)}catch{r(new Error("The channel has been closed"));return}if(a===K0e.ConnectivityState.READY)r();else try{this[Qr].watchConnectivityState(a,e,o)}catch{r(new Error("The channel has been closed"))}};setImmediate(o)}checkOptionalUnaryResponseArguments(e,r,o){if(eM(e))return{metadata:new Tc.Metadata,options:{},callback:e};if(eM(r))return e instanceof Tc.Metadata?{metadata:e,options:{},callback:r}:{metadata:new Tc.Metadata,options:e,callback:r};if(!(e instanceof Tc.Metadata&&r instanceof Object&&eM(o)))throw new Error("Incorrect arguments passed");return{metadata:e,options:r,callback:o}}makeUnaryRequest(e,r,o,s,a,i,n){var c,u;let l=this.checkOptionalUnaryResponseArguments(a,i,n),d={path:e,requestStream:!1,responseStream:!1,requestSerialize:r,responseDeserialize:o},h={argument:s,metadata:l.metadata,call:new zn.ClientUnaryCallImpl,channel:this[Qr],methodDefinition:d,callOptions:l.options,callback:l.callback};this[Oi]&&(h=this[Oi](h));let g=h.call,E={clientInterceptors:this[yc],clientInterceptorProviders:this[vc],callInterceptors:(c=h.callOptions.interceptors)!==null&&c!==void 0?c:[],callInterceptorProviders:(u=h.callOptions.interceptor_providers)!==null&&u!==void 0?u:[]},S=(0,VE.getInterceptingCall)(E,h.methodDefinition,h.callOptions,h.channel);g.call=S;let v=null,O=!1,x=new Error;return S.start(h.metadata,{onReceiveMetadata:H=>{g.emit("metadata",H)},onReceiveMessage(H){v!==null&&S.cancelWithStatus(oo.Status.UNIMPLEMENTED,"Too many responses received"),v=H},onReceiveStatus(H){if(!O){if(O=!0,H.code===oo.Status.OK)if(v===null){let A=Ac(x);h.callback((0,zn.callErrorFromStatus)({code:oo.Status.UNIMPLEMENTED,details:"No message received",metadata:H.metadata},A))}else h.callback(null,v);else{let A=Ac(x);h.callback((0,zn.callErrorFromStatus)(H,A))}x=null,g.emit("status",H)}}}),S.sendMessage(s),S.halfClose(),g}makeClientStreamRequest(e,r,o,s,a,i){var n,c;let u=this.checkOptionalUnaryResponseArguments(s,a,i),l={path:e,requestStream:!0,responseStream:!1,requestSerialize:r,responseDeserialize:o},d={metadata:u.metadata,call:new zn.ClientWritableStreamImpl(r),channel:this[Qr],methodDefinition:l,callOptions:u.options,callback:u.callback};this[Oi]&&(d=this[Oi](d));let h=d.call,g={clientInterceptors:this[yc],clientInterceptorProviders:this[vc],callInterceptors:(n=d.callOptions.interceptors)!==null&&n!==void 0?n:[],callInterceptorProviders:(c=d.callOptions.interceptor_providers)!==null&&c!==void 0?c:[]},E=(0,VE.getInterceptingCall)(g,d.methodDefinition,d.callOptions,d.channel);h.call=E;let S=null,v=!1,O=new Error;return E.start(d.metadata,{onReceiveMetadata:x=>{h.emit("metadata",x)},onReceiveMessage(x){S!==null&&E.cancelWithStatus(oo.Status.UNIMPLEMENTED,"Too many responses received"),S=x,E.startRead()},onReceiveStatus(x){if(!v){if(v=!0,x.code===oo.Status.OK)if(S===null){let H=Ac(O);d.callback((0,zn.callErrorFromStatus)({code:oo.Status.UNIMPLEMENTED,details:"No message received",metadata:x.metadata},H))}else d.callback(null,S);else{let H=Ac(O);d.callback((0,zn.callErrorFromStatus)(x,H))}O=null,h.emit("status",x)}}}),h}checkMetadataAndOptions(e,r){let o,s;return e instanceof Tc.Metadata?(o=e,r?s=r:s={}):(e?s=e:s={},o=new Tc.Metadata),{metadata:o,options:s}}makeServerStreamRequest(e,r,o,s,a,i){var n,c;let u=this.checkMetadataAndOptions(a,i),l={path:e,requestStream:!1,responseStream:!0,requestSerialize:r,responseDeserialize:o},d={argument:s,metadata:u.metadata,call:new zn.ClientReadableStreamImpl(o),channel:this[Qr],methodDefinition:l,callOptions:u.options};this[Oi]&&(d=this[Oi](d));let h=d.call,g={clientInterceptors:this[yc],clientInterceptorProviders:this[vc],callInterceptors:(n=d.callOptions.interceptors)!==null&&n!==void 0?n:[],callInterceptorProviders:(c=d.callOptions.interceptor_providers)!==null&&c!==void 0?c:[]},E=(0,VE.getInterceptingCall)(g,d.methodDefinition,d.callOptions,d.channel);h.call=E;let S=!1,v=new Error;return E.start(d.metadata,{onReceiveMetadata(O){h.emit("metadata",O)},onReceiveMessage(O){h.push(O)},onReceiveStatus(O){if(!S){if(S=!0,h.push(null),O.code!==oo.Status.OK){let x=Ac(v);h.emit("error",(0,zn.callErrorFromStatus)(O,x))}v=null,h.emit("status",O)}}}),E.sendMessage(s),E.halfClose(),h}makeBidiStreamRequest(e,r,o,s,a){var i,n;let c=this.checkMetadataAndOptions(s,a),u={path:e,requestStream:!0,responseStream:!0,requestSerialize:r,responseDeserialize:o},l={metadata:c.metadata,call:new zn.ClientDuplexStreamImpl(r,o),channel:this[Qr],methodDefinition:u,callOptions:c.options};this[Oi]&&(l=this[Oi](l));let d=l.call,h={clientInterceptors:this[yc],clientInterceptorProviders:this[vc],callInterceptors:(i=l.callOptions.interceptors)!==null&&i!==void 0?i:[],callInterceptorProviders:(n=l.callOptions.interceptor_providers)!==null&&n!==void 0?n:[]},g=(0,VE.getInterceptingCall)(h,l.methodDefinition,l.callOptions,l.channel);d.call=g;let E=!1,S=new Error;return g.start(l.metadata,{onReceiveMetadata(v){d.emit("metadata",v)},onReceiveMessage(v){d.push(v)},onReceiveStatus(v){if(!E){if(E=!0,d.push(null),v.code!==oo.Status.OK){let O=Ac(S);d.emit("error",(0,zn.callErrorFromStatus)(v,O))}S=null,d.emit("status",v)}}}),d}};GE.Client=tM});var jE=p(qE=>{"use strict";Object.defineProperty(qE,"__esModule",{value:!0});qE.makeClientConstructor=X8;qE.loadPackageDefinition=Z0e;var Fl=rM(),X0e={unary:Fl.Client.prototype.makeUnaryRequest,server_stream:Fl.Client.prototype.makeServerStreamRequest,client_stream:Fl.Client.prototype.makeClientStreamRequest,bidi:Fl.Client.prototype.makeBidiStreamRequest};function iM(t){return["__proto__","prototype","constructor"].includes(t)}function X8(t,e,r){r||(r={});class o extends Fl.Client{}return Object.keys(t).forEach(s=>{if(iM(s))return;let a=t[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,c=a.responseDeserialize,u=J0e(X0e[i],a.path,n,c);o.prototype[s]=u,Object.assign(o.prototype[s],a),a.originalName&&!iM(a.originalName)&&(o.prototype[a.originalName]=o.prototype[s])}),o.service=t,o.serviceName=e,o}function J0e(t,e,r,o){return function(...s){return t.call(this,e,r,o,...s)}}function Q0e(t){return"format"in t}function Z0e(t){let e={};for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let o=t[r],s=r.split(".");if(s.some(n=>iM(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];Q0e(o)?i[a]=o:i[a]=X8(o,a,{})}return e}});var yX=p((rnt,TX)=>{var exe=1/0,txe="[object Symbol]",rxe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,nxe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,zE="\\ud800-\\udfff",iX="\\u0300-\\u036f\\ufe20-\\ufe23",oX="\\u20d0-\\u20f0",sX="\\u2700-\\u27bf",aX="a-z\\xdf-\\xf6\\xf8-\\xff",ixe="\\xac\\xb1\\xd7\\xf7",oxe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",sxe="\\u2000-\\u206f",axe=" \\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",cX="A-Z\\xc0-\\xd6\\xd8-\\xde",uX="\\ufe0e\\ufe0f",lX=ixe+oxe+sxe+axe,sM="['\u2019]",cxe="["+zE+"]",J8="["+lX+"]",HE="["+iX+oX+"]",dX="\\d+",uxe="["+sX+"]",pX="["+aX+"]",fX="[^"+zE+lX+dX+sX+aX+cX+"]",oM="\\ud83c[\\udffb-\\udfff]",lxe="(?:"+HE+"|"+oM+")",hX="[^"+zE+"]",aM="(?:\\ud83c[\\udde6-\\uddff]){2}",cM="[\\ud800-\\udbff][\\udc00-\\udfff]",Oc="["+cX+"]",mX="\\u200d",Q8="(?:"+pX+"|"+fX+")",dxe="(?:"+Oc+"|"+fX+")",Z8="(?:"+sM+"(?:d|ll|m|re|s|t|ve))?",eX="(?:"+sM+"(?:D|LL|M|RE|S|T|VE))?",_X=lxe+"?",gX="["+uX+"]?",pxe="(?:"+mX+"(?:"+[hX,aM,cM].join("|")+")"+gX+_X+")*",EX=gX+_X+pxe,fxe="(?:"+[uxe,aM,cM].join("|")+")"+EX,hxe="(?:"+[hX+HE+"?",HE,aM,cM,cxe].join("|")+")",mxe=RegExp(sM,"g"),_xe=RegExp(HE,"g"),gxe=RegExp(oM+"(?="+oM+")|"+hxe+EX,"g"),Exe=RegExp([Oc+"?"+pX+"+"+Z8+"(?="+[J8,Oc,"$"].join("|")+")",dxe+"+"+eX+"(?="+[J8,Oc+Q8,"$"].join("|")+")",Oc+"?"+Q8+"+"+Z8,Oc+"+"+eX,dX,fxe].join("|"),"g"),Sxe=RegExp("["+mX+zE+iX+oX+uX+"]"),Txe=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,yxe={\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"},vxe=typeof global=="object"&&global&&global.Object===Object&&global,Axe=typeof self=="object"&&self&&self.Object===Object&&self,Oxe=vxe||Axe||Function("return this")();function bxe(t,e,r,o){var s=-1,a=t?t.length:0;for(o&&a&&(r=t[++s]);++s<a;)r=e(r,t[s],s,t);return r}function Rxe(t){return t.split("")}function Pxe(t){return t.match(rxe)||[]}function Cxe(t){return function(e){return t?.[e]}}var Nxe=Cxe(yxe);function SX(t){return Sxe.test(t)}function Mxe(t){return Txe.test(t)}function Ixe(t){return SX(t)?xxe(t):Rxe(t)}function xxe(t){return t.match(gxe)||[]}function wxe(t){return t.match(Exe)||[]}var Lxe=Object.prototype,Dxe=Lxe.toString,tX=Oxe.Symbol,rX=tX?tX.prototype:void 0,nX=rX?rX.toString:void 0;function Uxe(t,e,r){var o=-1,s=t.length;e<0&&(e=-e>s?0:s+e),r=r>s?s:r,r<0&&(r+=s),s=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(s);++o<s;)a[o]=t[o+e];return a}function kxe(t){if(typeof t=="string")return t;if(qxe(t))return nX?nX.call(t):"";var e=t+"";return e=="0"&&1/t==-exe?"-0":e}function Bxe(t,e,r){var o=t.length;return r=r===void 0?o:r,!e&&r>=o?t:Uxe(t,e,r)}function Fxe(t){return function(e){e=$E(e);var r=SX(e)?Ixe(e):void 0,o=r?r[0]:e.charAt(0),s=r?Bxe(r,1).join(""):e.slice(1);return o[t]()+s}}function Vxe(t){return function(e){return bxe(Yxe(zxe(e).replace(mxe,"")),t,"")}}function Gxe(t){return!!t&&typeof t=="object"}function qxe(t){return typeof t=="symbol"||Gxe(t)&&Dxe.call(t)==txe}function $E(t){return t==null?"":kxe(t)}var jxe=Vxe(function(t,e,r){return e=e.toLowerCase(),t+(r?Hxe(e):e)});function Hxe(t){return $xe($E(t).toLowerCase())}function zxe(t){return t=$E(t),t&&t.replace(nxe,Nxe).replace(_xe,"")}var $xe=Fxe("toUpperCase");function Yxe(t,e,r){return t=$E(t),e=r?void 0:e,e===void 0?Mxe(t)?wxe(t):Pxe(t):t.match(e)||[]}TX.exports=jxe});var AX=p((nnt,vX)=>{"use strict";vX.exports=uM;function uM(t,e){typeof t=="string"&&(e=t,t=void 0);var r=[];function o(a){if(typeof a!="string"){var i=s();if(uM.verbose&&console.log("codegen: "+i),i="return "+i,a){for(var n=Object.keys(a),c=new Array(n.length+1),u=new Array(n.length),l=0;l<n.length;)c[l]=n[l],u[l]=a[n[l++]];return c[l]=i,Function.apply(null,c).apply(null,u)}return Function(i)()}for(var d=new Array(arguments.length-1),h=0;h<d.length;)d[h]=arguments[++h];if(h=0,a=a.replace(/%([%dfijs])/g,function(E,S){var v=d[h++];switch(S){case"d":case"f":return String(Number(v));case"i":return String(Math.floor(v));case"j":return JSON.stringify(v);case"s":return String(v)}return"%"}),h!==d.length)throw Error("parameter count mismatch");return r.push(a),o}function s(a){return"function "+(a||e||"")+"("+(t&&t.join(",")||"")+`){
|
|
27
|
+
`+r.join(`
|
|
28
|
+
`)+`
|
|
29
|
+
}`}return o.toString=s,o}uM.verbose=!1});var bX=p((int,OX)=>{"use strict";OX.exports=Vl;var Wxe=IC(),Kxe=xC(),lM=Kxe("fs");function Vl(t,e,r){return typeof e=="function"?(r=e,e={}):e||(e={}),r?!e.xhr&&lM&&lM.readFile?lM.readFile(t,function(s,a){return s&&typeof XMLHttpRequest<"u"?Vl.xhr(t,e,r):s?r(s):r(null,e.binary?a:a.toString("utf8"))}):Vl.xhr(t,e,r):Wxe(Vl,this,t,e)}Vl.xhr=function(e,r,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(r.binary){var i=s.response;if(!i){i=[];for(var n=0;n<s.responseText.length;++n)i.push(s.responseText.charCodeAt(n)&255)}return o(null,typeof Uint8Array<"u"?new Uint8Array(i):i)}return o(null,s.responseText)}},r.binary&&("overrideMimeType"in s&&s.overrideMimeType("text/plain; charset=x-user-defined"),s.responseType="arraybuffer"),s.open("GET",e),s.send()}});var CX=p(PX=>{"use strict";var pM=PX,RX=pM.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},dM=pM.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var r=e.split("/"),o=RX(e),s="";o&&(s=r.shift()+"/");for(var a=0;a<r.length;)r[a]===".."?a>0&&r[a-1]!==".."?r.splice(--a,2):o?r.splice(a,1):++a:r[a]==="."?r.splice(a,1):++a;return s+r.join("/")};pM.resolve=function(e,r,o){return o||(r=dM(r)),RX(r)?r:(o||(e=dM(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?dM(e+"/"+r):r)}});var Rc=p((snt,IX)=>{"use strict";IX.exports=ue;var YE=ao();((ue.prototype=Object.create(YE.prototype)).constructor=ue).className="Namespace";var fM=so(),WE=ot(),Xxe=Ss(),gs,bc,Es;ue.fromJSON=function(e,r){return new ue(e,r.options).addJSON(r.nested)};function NX(t,e){if(t&&t.length){for(var r={},o=0;o<t.length;++o)r[t[o].name]=t[o].toJSON(e);return r}}ue.arrayToJSON=NX;ue.isReservedId=function(e,r){if(e){for(var o=0;o<e.length;++o)if(typeof e[o]!="string"&&e[o][0]<=r&&e[o][1]>r)return!0}return!1};ue.isReservedName=function(e,r){if(e){for(var o=0;o<e.length;++o)if(e[o]===r)return!0}return!1};function ue(t,e){YE.call(this,t,e),this.nested=void 0,this._nestedArray=null,this._lookupCache={},this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0}function MX(t){t._nestedArray=null,t._lookupCache={};for(var e=t;e=e.parent;)e._lookupCache={};return t}Object.defineProperty(ue.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=WE.toArray(this.nested))}});ue.prototype.toJSON=function(e){return WE.toObject(["options",this.options,"nested",NX(this.nestedArray,e)])};ue.prototype.addJSON=function(e){var r=this;if(e)for(var o=Object.keys(e),s=0,a;s<o.length;++s)a=e[o[s]],r.add((a.fields!==void 0?gs.fromJSON:a.values!==void 0?Es.fromJSON:a.methods!==void 0?bc.fromJSON:a.id!==void 0?fM.fromJSON:ue.fromJSON)(o[s],a));return this};ue.prototype.get=function(e){return this.nested&&this.nested[e]||null};ue.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof Es)return this.nested[e].values;throw Error("no such enum: "+e)};ue.prototype.add=function(e){if(!(e instanceof fM&&e.extend!==void 0||e instanceof gs||e instanceof Xxe||e instanceof Es||e instanceof bc||e instanceof ue))throw TypeError("object must be a valid nested object");if(!this.nested)this.nested={};else{var r=this.get(e.name);if(r)if(r instanceof ue&&e instanceof ue&&!(r instanceof gs||r instanceof bc)){for(var o=r.nestedArray,s=0;s<o.length;++s)e.add(o[s]);this.remove(r),this.nested||(this.nested={}),e.setOptions(r.options,!0)}else throw Error("duplicate name '"+e.name+"' in "+this)}this.nested[e.name]=e,this instanceof gs||this instanceof bc||this instanceof Es||this instanceof fM||e._edition||(e._edition=e._defaultEdition),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0;for(var a=this;a=a.parent;)a._needsRecursiveFeatureResolution=!0,a._needsRecursiveResolve=!0;return e.onAdd(this),MX(this)};ue.prototype.remove=function(e){if(!(e instanceof YE))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),MX(this)};ue.prototype.define=function(e,r){if(WE.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&e[0]==="")throw Error("path must be relative");for(var o=this;e.length>0;){var s=e.shift();if(o.nested&&o.nested[s]){if(o=o.nested[s],!(o instanceof ue))throw Error("path conflicts with non-namespace objects")}else o.add(o=new ue(s))}return r&&o.addJSON(r),o};ue.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;this._resolveFeaturesRecursive(this._edition);var e=this.nestedArray,r=0;for(this.resolve();r<e.length;)e[r]instanceof ue?e[r++].resolveAll():e[r++].resolve();return this._needsRecursiveResolve=!1,this};ue.prototype._resolveFeaturesRecursive=function(e){return this._needsRecursiveFeatureResolution?(this._needsRecursiveFeatureResolution=!1,e=this._edition||e,YE.prototype._resolveFeaturesRecursive.call(this,e),this.nestedArray.forEach(r=>{r._resolveFeaturesRecursive(e)}),this):this};ue.prototype.lookup=function(e,r,o){if(typeof r=="boolean"?(o=r,r=void 0):r&&!Array.isArray(r)&&(r=[r]),WE.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),r);var a=this.root._fullyQualifiedObjects&&this.root._fullyQualifiedObjects["."+s];if(a&&(!r||r.indexOf(a.constructor)>-1)||(a=this._lookupImpl(e,s),a&&(!r||r.indexOf(a.constructor)>-1)))return a;if(o)return null;for(var i=this;i.parent;){if(a=i.parent._lookupImpl(e,s),a&&(!r||r.indexOf(a.constructor)>-1))return a;i=i.parent}return null};ue.prototype._lookupImpl=function(e,r){if(Object.prototype.hasOwnProperty.call(this._lookupCache,r))return this._lookupCache[r];var o=this.get(e[0]),s=null;if(o)e.length===1?s=o:o instanceof ue&&(e=e.slice(1),s=o._lookupImpl(e,e.join(".")));else for(var a=0;a<this.nestedArray.length;++a)this._nestedArray[a]instanceof ue&&(o=this._nestedArray[a]._lookupImpl(e,r))&&(s=o);return this._lookupCache[r]=s,s};ue.prototype.lookupType=function(e){var r=this.lookup(e,[gs]);if(!r)throw Error("no such type: "+e);return r};ue.prototype.lookupEnum=function(e){var r=this.lookup(e,[Es]);if(!r)throw Error("no such Enum '"+e+"' in "+this);return r};ue.prototype.lookupTypeOrEnum=function(e){var r=this.lookup(e,[gs,Es]);if(!r)throw Error("no such Type or Enum '"+e+"' in "+this);return r};ue.prototype.lookupService=function(e){var r=this.lookup(e,[bc]);if(!r)throw Error("no such Service '"+e+"' in "+this);return r};ue._configure=function(t,e,r){gs=t,bc=e,Es=r}});var KE=p((ant,xX)=>{"use strict";xX.exports=bi;var hM=so();((bi.prototype=Object.create(hM.prototype)).constructor=bi).className="MapField";var Jxe=Ts(),Gl=ot();function bi(t,e,r,o,s,a){if(hM.call(this,t,e,o,void 0,void 0,s,a),!Gl.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}bi.fromJSON=function(e,r){return new bi(e,r.id,r.keyType,r.type,r.options,r.comment)};bi.prototype.toJSON=function(e){var r=e?!!e.keepComments:!1;return Gl.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",r?this.comment:void 0])};bi.prototype.resolve=function(){if(this.resolved)return this;if(Jxe.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return hM.prototype.resolve.call(this)};bi.d=function(e,r,o){return typeof o=="function"?o=Gl.decorateType(o).name:o&&typeof o=="object"&&(o=Gl.decorateEnum(o).name),function(a,i){Gl.decorateType(a.constructor).add(new bi(i,e,r,o))}}});var XE=p((cnt,wX)=>{"use strict";wX.exports=ys;var mM=ao();((ys.prototype=Object.create(mM.prototype)).constructor=ys).className="Method";var Pc=ot();function ys(t,e,r,o,s,a,i,n,c){if(Pc.isObject(s)?(i=s,s=a=void 0):Pc.isObject(a)&&(i=a,a=void 0),!(e===void 0||Pc.isString(e)))throw TypeError("type must be a string");if(!Pc.isString(r))throw TypeError("requestType must be a string");if(!Pc.isString(o))throw TypeError("responseType must be a string");mM.call(this,t,i),this.type=e||"rpc",this.requestType=r,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=c}ys.fromJSON=function(e,r){return new ys(e,r.type,r.requestType,r.responseType,r.requestStream,r.responseStream,r.options,r.comment,r.parsedOptions)};ys.prototype.toJSON=function(e){var r=e?!!e.keepComments:!1;return Pc.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",r?this.comment:void 0,"parsedOptions",this.parsedOptions])};ys.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),mM.prototype.resolve.call(this))}});var JE=p((unt,DX)=>{"use strict";DX.exports=cr;var Ri=Rc();((cr.prototype=Object.create(Ri.prototype)).constructor=cr).className="Service";var _M=XE(),ql=ot(),Qxe=HC();function cr(t,e){Ri.call(this,t,e),this.methods={},this._methodsArray=null}cr.fromJSON=function(e,r){var o=new cr(e,r.options);if(r.methods)for(var s=Object.keys(r.methods),a=0;a<s.length;++a)o.add(_M.fromJSON(s[a],r.methods[s[a]]));return r.nested&&o.addJSON(r.nested),r.edition&&(o._edition=r.edition),o.comment=r.comment,o._defaultEdition="proto3",o};cr.prototype.toJSON=function(e){var r=Ri.prototype.toJSON.call(this,e),o=e?!!e.keepComments:!1;return ql.toObject(["edition",this._editionToJSON(),"options",r&&r.options||void 0,"methods",Ri.arrayToJSON(this.methodsArray,e)||{},"nested",r&&r.nested||void 0,"comment",o?this.comment:void 0])};Object.defineProperty(cr.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=ql.toArray(this.methods))}});function LX(t){return t._methodsArray=null,t}cr.prototype.get=function(e){return this.methods[e]||Ri.prototype.get.call(this,e)};cr.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;Ri.prototype.resolve.call(this);for(var e=this.methodsArray,r=0;r<e.length;++r)e[r].resolve();return this};cr.prototype._resolveFeaturesRecursive=function(e){return this._needsRecursiveFeatureResolution?(e=this._edition||e,Ri.prototype._resolveFeaturesRecursive.call(this,e),this.methodsArray.forEach(r=>{r._resolveFeaturesRecursive(e)}),this):this};cr.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof _M?(this.methods[e.name]=e,e.parent=this,LX(this)):Ri.prototype.add.call(this,e)};cr.prototype.remove=function(e){if(e instanceof _M){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,LX(this)}return Ri.prototype.remove.call(this,e)};cr.prototype.create=function(e,r,o){for(var s=new Qxe.Service(e,r,o),a=0,i;a<this.methodsArray.length;++a){var n=ql.lcFirst((i=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");s[n]=ql.codegen(["r","c"],ql.isReserved(n)?n+"_":n)("return this.rpcCall(m,q,s,r,c)")({m:i,q:i.resolvedRequestType.ctor,s:i.resolvedResponseType.ctor})}return s}});var QE=p((lnt,UX)=>{"use strict";UX.exports=$n;var Zxe=Bn();function $n(t){if(t)for(var e=Object.keys(t),r=0;r<e.length;++r)this[e[r]]=t[e[r]]}$n.create=function(e){return this.$type.create(e)};$n.encode=function(e,r){return this.$type.encode(e,r)};$n.encodeDelimited=function(e,r){return this.$type.encodeDelimited(e,r)};$n.decode=function(e){return this.$type.decode(e)};$n.decodeDelimited=function(e){return this.$type.decodeDelimited(e)};$n.verify=function(e){return this.$type.verify(e)};$n.fromObject=function(e){return this.$type.fromObject(e)};$n.toObject=function(e,r){return this.$type.toObject(e,r)};$n.prototype.toJSON=function(){return this.$type.toObject(this,Zxe.toJSONOptions)}});var gM=p((dnt,BX)=>{"use strict";BX.exports=rwe;var ewe=Zr(),Pi=Ts(),kX=ot();function twe(t){return"missing required '"+t.name+"'"}function rwe(t){for(var e=kX.codegen(["r","l","e"],t.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(t.fieldsArray.filter(function(n){return n.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"),r=0;r<t.fieldsArray.length;++r){var o=t._fieldsArray[r].resolve(),s=o.resolvedType instanceof ewe?"int32":o.type,a="m"+kX.safeProp(o.name);e("case %i: {",o.id),o.map?(e("if(%s===util.emptyObject)",a)("%s={}",a)("var c2 = r.uint32()+r.pos"),Pi.defaults[o.keyType]!==void 0?e("k=%j",Pi.defaults[o.keyType]):e("k=null"),Pi.defaults[s]!==void 0?e("value=%j",Pi.defaults[s]):e("value=null"),e("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",o.keyType)("case 2:"),Pi.basic[s]===void 0?e("value=types[%i].decode(r,r.uint32())",r):e("value=r.%s()",s),e("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),Pi.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),Pi.packed[s]!==void 0&&e("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",a,s)("}else"),Pi.basic[s]===void 0?e(o.delimited?"%s.push(types[%i].decode(r,undefined,((t&~7)|4)))":"%s.push(types[%i].decode(r,r.uint32()))",a,r):e("%s.push(r.%s())",a,s)):Pi.basic[s]===void 0?e(o.delimited?"%s=types[%i].decode(r,undefined,((t&~7)|4))":"%s=types[%i].decode(r,r.uint32())",a,r):e("%s=r.%s()",a,s),e("break")("}")}for(e("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<t._fieldsArray.length;++r){var i=t._fieldsArray[r];i.required&&e("if(!m.hasOwnProperty(%j))",i.name)("throw util.ProtocolError(%j,{instance:m})",twe(i))}return e("return m")}});var TM=p((pnt,FX)=>{"use strict";FX.exports=owe;var nwe=Zr(),EM=ot();function Cr(t,e){return t.name+": "+e+(t.repeated&&e!=="array"?"[]":t.map&&e!=="object"?"{k:"+t.keyType+"}":"")+" expected"}function SM(t,e,r,o){if(e.resolvedType)if(e.resolvedType instanceof nwe){t("switch(%s){",o)("default:")("return%j",Cr(e,"enum value"));for(var s=Object.keys(e.resolvedType.values),a=0;a<s.length;++a)t("case %i:",e.resolvedType.values[s[a]]);t("break")("}")}else t("{")("var e=types[%i].verify(%s);",r,o)("if(e)")("return%j+e",e.name+".")("}");else switch(e.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.isInteger(%s))",o)("return%j",Cr(e,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",o,o,o,o)("return%j",Cr(e,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',o)("return%j",Cr(e,"number"));break;case"bool":t('if(typeof %s!=="boolean")',o)("return%j",Cr(e,"boolean"));break;case"string":t("if(!util.isString(%s))",o)("return%j",Cr(e,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',o,o,o)("return%j",Cr(e,"buffer"));break}return t}function iwe(t,e,r){switch(e.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.key32Re.test(%s))",r)("return%j",Cr(e,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.key64Re.test(%s))",r)("return%j",Cr(e,"integer|Long key"));break;case"bool":t("if(!util.key2Re.test(%s))",r)("return%j",Cr(e,"boolean key"));break}return t}function owe(t){var e=EM.codegen(["m"],t.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),r=t.oneofsArray,o={};r.length&&e("var p={}");for(var s=0;s<t.fieldsArray.length;++s){var a=t._fieldsArray[s].resolve(),i="m"+EM.safeProp(a.name);if(a.optional&&e("if(%s!=null&&m.hasOwnProperty(%j)){",i,a.name),a.map)e("if(!util.isObject(%s))",i)("return%j",Cr(a,"object"))("var k=Object.keys(%s)",i)("for(var i=0;i<k.length;++i){"),iwe(e,a,"k[i]"),SM(e,a,s,i+"[k[i]]")("}");else if(a.repeated)e("if(!Array.isArray(%s))",i)("return%j",Cr(a,"array"))("for(var i=0;i<%s.length;++i){",i),SM(e,a,s,i+"[i]")("}");else{if(a.partOf){var n=EM.safeProp(a.partOf.name);o[a.partOf.name]===1&&e("if(p%s===1)",n)("return%j",a.partOf.name+": multiple values"),o[a.partOf.name]=1,e("p%s=1",n)}SM(e,a,s,i)}a.optional&&e("}")}return e("return null")}});var AM=p(GX=>{"use strict";var VX=GX,jl=Zr(),Yn=ot();function yM(t,e,r,o){var s=!1;if(e.resolvedType)if(e.resolvedType instanceof jl){t("switch(d%s){",o);for(var a=e.resolvedType.values,i=Object.keys(a),n=0;n<i.length;++n)a[i[n]]===e.typeDefault&&!s&&(t("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',o,o,o),e.repeated||t("break"),s=!0),t("case%j:",i[n])("case %i:",a[i[n]])("m%s=%j",o,a[i[n]])("break");t("}")}else t('if(typeof d%s!=="object")',o)("throw TypeError(%j)",e.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",o,r,o);else{var c=!1;switch(e.type){case"double":case"float":t("m%s=Number(d%s)",o,o);break;case"uint32":case"fixed32":t("m%s=d%s>>>0",o,o);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",o,o);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",o,o,c)('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,c?"true":"");break;case"bytes":t('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":t("m%s=String(d%s)",o,o);break;case"bool":t("m%s=Boolean(d%s)",o,o);break}}return t}VX.fromObject=function(e){var r=e.fieldsArray,o=Yn.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!r.length)return o("return new this.ctor");o("var m=new this.ctor");for(var s=0;s<r.length;++s){var a=r[s].resolve(),i=Yn.safeProp(a.name);a.map?(o("if(d%s){",i)('if(typeof d%s!=="object")',i)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",i)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",i),yM(o,a,s,i+"[ks[i]]")("}")("}")):a.repeated?(o("if(d%s){",i)("if(!Array.isArray(d%s))",i)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",i)("for(var i=0;i<d%s.length;++i){",i),yM(o,a,s,i+"[i]")("}")("}")):(a.resolvedType instanceof jl||o("if(d%s!=null){",i),yM(o,a,s,i),a.resolvedType instanceof jl||o("}"))}return o("return m")};function vM(t,e,r,o){if(e.resolvedType)e.resolvedType instanceof jl?t("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",o,r,o,o,r,o,o):t("d%s=types[%i].toObject(m%s,o)",o,r,o);else{var s=!1;switch(e.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",o,o,o,o);break;case"uint64":s=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('if(typeof m%s==="number")',o)("d%s=o.longs===String?String(m%s):m%s",o,o,o)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",o,o,o,o,s?"true":"",o);break;case"bytes":t("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:t("d%s=m%s",o,o);break}}return t}VX.toObject=function(e){var r=e.fieldsArray.slice().sort(Yn.compareFieldsById);if(!r.length)return Yn.codegen()("return {}");for(var o=Yn.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),s=[],a=[],i=[],n=0;n<r.length;++n)r[n].partOf||(r[n].resolve().repeated?s:r[n].map?a:i).push(r[n]);if(s.length){for(o("if(o.arrays||o.defaults){"),n=0;n<s.length;++n)o("d%s=[]",Yn.safeProp(s[n].name));o("}")}if(a.length){for(o("if(o.objects||o.defaults){"),n=0;n<a.length;++n)o("d%s={}",Yn.safeProp(a[n].name));o("}")}if(i.length){for(o("if(o.defaults){"),n=0;n<i.length;++n){var c=i[n],u=Yn.safeProp(c.name);if(c.resolvedType instanceof jl)o("d%s=o.enums===String?%j:%j",u,c.resolvedType.valuesById[c.typeDefault],c.typeDefault);else if(c.long)o("if(util.Long){")("var n=new util.Long(%i,%i,%j)",c.typeDefault.low,c.typeDefault.high,c.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",u)("}else")("d%s=o.longs===String?%j:%i",u,c.typeDefault.toString(),c.typeDefault.toNumber());else if(c.bytes){var l="["+Array.prototype.slice.call(c.typeDefault).join(",")+"]";o("if(o.bytes===String)d%s=%j",u,String.fromCharCode.apply(String,c.typeDefault))("else{")("d%s=%s",u,l)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",u,u)("}")}else o("d%s=%j",u,c.typeDefault)}o("}")}var d=!1;for(n=0;n<r.length;++n){var c=r[n],h=e._fieldsArray.indexOf(c),u=Yn.safeProp(c.name);c.map?(d||(d=!0,o("var ks2")),o("if(m%s&&(ks2=Object.keys(m%s)).length){",u,u)("d%s={}",u)("for(var j=0;j<ks2.length;++j){"),vM(o,c,h,u+"[ks2[j]]")("}")):c.repeated?(o("if(m%s&&m%s.length){",u,u)("d%s=[]",u)("for(var j=0;j<m%s.length;++j){",u),vM(o,c,h,u+"[j]")("}")):(o("if(m%s!=null&&m.hasOwnProperty(%j)){",u,c.name),vM(o,c,h,u),c.partOf&&o("if(o.oneofs)")("d%s=%j",Yn.safeProp(c.partOf.name),c.name)),o("}")}return o("return d")}});var OM=p(qX=>{"use strict";var swe=qX,awe=QE();swe[".google.protobuf.Any"]={fromObject:function(t){if(t&&t["@type"]){var e=t["@type"].substring(t["@type"].lastIndexOf("/")+1),r=this.lookup(e);if(r){var o=t["@type"].charAt(0)==="."?t["@type"].slice(1):t["@type"];return o.indexOf("/")===-1&&(o="/"+o),this.create({type_url:o,value:r.encode(r.fromObject(t)).finish()})}}return this.fromObject(t)},toObject:function(t,e){var r="type.googleapis.com/",o="",s="";if(e&&e.json&&t.type_url&&t.value){s=t.type_url.substring(t.type_url.lastIndexOf("/")+1),o=t.type_url.substring(0,t.type_url.lastIndexOf("/")+1);var a=this.lookup(s);a&&(t=a.decode(t.value))}if(!(t instanceof this.ctor)&&t instanceof awe){var i=t.$type.toObject(t,e),n=t.$type.fullName[0]==="."?t.$type.fullName.slice(1):t.$type.fullName;return o===""&&(o=r),s=o+n,i["@type"]=s,i}return this.toObject(t,e)}}});var tS=p((mnt,HX)=>{"use strict";HX.exports=Te;var Nr=Rc();((Te.prototype=Object.create(Nr.prototype)).constructor=Te).className="Type";var cwe=Zr(),PM=Ss(),ZE=so(),uwe=KE(),lwe=JE(),bM=QE(),RM=$g(),dwe=Hg(),Rt=ot(),pwe=CM(),fwe=gM(),hwe=TM(),jX=AM(),mwe=OM();function Te(t,e){Nr.call(this,t,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(Te.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var t=Object.keys(this.fields),e=0;e<t.length;++e){var r=this.fields[t[e]],o=r.id;if(this._fieldsById[o])throw Error("duplicate id "+o+" in "+this);this._fieldsById[o]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=Rt.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=Rt.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=Te.generateConstructor(this)())},set:function(t){var e=t.prototype;e instanceof bM||((t.prototype=new bM).constructor=t,Rt.merge(t.prototype,e)),t.$type=t.prototype.$type=this,Rt.merge(t,bM,!0),this._ctor=t;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var o={};for(r=0;r<this.oneofsArray.length;++r)o[this._oneofsArray[r].resolve().name]={get:Rt.oneOfGetter(this._oneofsArray[r].oneof),set:Rt.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(t.prototype,o)}}});Te.generateConstructor=function(e){for(var r=Rt.codegen(["p"],e.name),o=0,s;o<e.fieldsArray.length;++o)(s=e._fieldsArray[o]).map?r("this%s={}",Rt.safeProp(s.name)):s.repeated&&r("this%s=[]",Rt.safeProp(s.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")};function eS(t){return t._fieldsById=t._fieldsArray=t._oneofsArray=null,delete t.encode,delete t.decode,delete t.verify,t}Te.fromJSON=function(e,r){var o=new Te(e,r.options);o.extensions=r.extensions,o.reserved=r.reserved;for(var s=Object.keys(r.fields),a=0;a<s.length;++a)o.add((typeof r.fields[s[a]].keyType<"u"?uwe.fromJSON:ZE.fromJSON)(s[a],r.fields[s[a]]));if(r.oneofs)for(s=Object.keys(r.oneofs),a=0;a<s.length;++a)o.add(PM.fromJSON(s[a],r.oneofs[s[a]]));if(r.nested)for(s=Object.keys(r.nested),a=0;a<s.length;++a){var i=r.nested[s[a]];o.add((i.id!==void 0?ZE.fromJSON:i.fields!==void 0?Te.fromJSON:i.values!==void 0?cwe.fromJSON:i.methods!==void 0?lwe.fromJSON:Nr.fromJSON)(s[a],i))}return r.extensions&&r.extensions.length&&(o.extensions=r.extensions),r.reserved&&r.reserved.length&&(o.reserved=r.reserved),r.group&&(o.group=!0),r.comment&&(o.comment=r.comment),r.edition&&(o._edition=r.edition),o._defaultEdition="proto3",o};Te.prototype.toJSON=function(e){var r=Nr.prototype.toJSON.call(this,e),o=e?!!e.keepComments:!1;return Rt.toObject(["edition",this._editionToJSON(),"options",r&&r.options||void 0,"oneofs",Nr.arrayToJSON(this.oneofsArray,e),"fields",Nr.arrayToJSON(this.fieldsArray.filter(function(s){return!s.declaringField}),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",r&&r.nested||void 0,"comment",o?this.comment:void 0])};Te.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;Nr.prototype.resolveAll.call(this);var e=this.oneofsArray;for(o=0;o<e.length;)e[o++].resolve();for(var r=this.fieldsArray,o=0;o<r.length;)r[o++].resolve();return this};Te.prototype._resolveFeaturesRecursive=function(e){return this._needsRecursiveFeatureResolution?(e=this._edition||e,Nr.prototype._resolveFeaturesRecursive.call(this,e),this.oneofsArray.forEach(r=>{r._resolveFeatures(e)}),this.fieldsArray.forEach(r=>{r._resolveFeatures(e)}),this):this};Te.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null};Te.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof ZE&&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),eS(this)}return e instanceof PM?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),eS(this)):Nr.prototype.add.call(this,e)};Te.prototype.remove=function(e){if(e instanceof ZE&&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),eS(this)}if(e instanceof PM){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),eS(this)}return Nr.prototype.remove.call(this,e)};Te.prototype.isReservedId=function(e){return Nr.isReservedId(this.reserved,e)};Te.prototype.isReservedName=function(e){return Nr.isReservedName(this.reserved,e)};Te.prototype.create=function(e){return new this.ctor(e)};Te.prototype.setup=function(){for(var e=this.fullName,r=[],o=0;o<this.fieldsArray.length;++o)r.push(this._fieldsArray[o].resolve().resolvedType);this.encode=pwe(this)({Writer:dwe,types:r,util:Rt}),this.decode=fwe(this)({Reader:RM,types:r,util:Rt}),this.verify=hwe(this)({types:r,util:Rt}),this.fromObject=jX.fromObject(this)({types:r,util:Rt}),this.toObject=jX.toObject(this)({types:r,util:Rt});var s=mwe[e];if(s){var a=Object.create(this);a.fromObject=this.fromObject,this.fromObject=s.fromObject.bind(a),a.toObject=this.toObject,this.toObject=s.toObject.bind(a)}return this};Te.prototype.encode=function(e,r){return this.setup().encode(e,r)};Te.prototype.encodeDelimited=function(e,r){return this.encode(e,r&&r.len?r.fork():r).ldelim()};Te.prototype.decode=function(e,r){return this.setup().decode(e,r)};Te.prototype.decodeDelimited=function(e){return e instanceof RM||(e=RM.create(e)),this.decode(e,e.uint32())};Te.prototype.verify=function(e){return this.setup().verify(e)};Te.prototype.fromObject=function(e){return this.setup().fromObject(e)};Te.prototype.toObject=function(e,r){return this.setup().toObject(e,r)};Te.d=function(e){return function(o){Rt.decorateType(o,e)}}});var oS=p((_nt,YX)=>{"use strict";YX.exports=ur;var iS=Rc();((ur.prototype=Object.create(iS.prototype)).constructor=ur).className="Root";var rS=so(),NM=Zr(),_we=Ss(),co=ot(),MM,IM,Hl;function ur(t){iS.call(this,"",t),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}ur.fromJSON=function(e,r){return r||(r=new ur),e.options&&r.setOptions(e.options),r.addJSON(e.nested).resolveAll()};ur.prototype.resolvePath=co.path.resolve;ur.prototype.fetch=co.fetch;function $X(){}ur.prototype.load=function t(e,r,o){typeof r=="function"&&(o=r,r=void 0);var s=this;if(!o)return co.asPromise(t,s,e,r);var a=o===$X;function i(g,E){if(o){if(a)throw g;E&&E.resolveAll();var S=o;o=null,S(g,E)}}function n(g){var E=g.lastIndexOf("google/protobuf/");if(E>-1){var S=g.substring(E);if(S in Hl)return S}return null}function c(g,E){try{if(co.isString(E)&&E.charAt(0)==="{"&&(E=JSON.parse(E)),!co.isString(E))s.setOptions(E.options).addJSON(E.nested);else{IM.filename=g;var S=IM(E,s,r),v,O=0;if(S.imports)for(;O<S.imports.length;++O)(v=n(S.imports[O])||s.resolvePath(g,S.imports[O]))&&u(v);if(S.weakImports)for(O=0;O<S.weakImports.length;++O)(v=n(S.weakImports[O])||s.resolvePath(g,S.weakImports[O]))&&u(v,!0)}}catch(x){i(x)}!a&&!l&&i(null,s)}function u(g,E){if(g=n(g)||g,!(s.files.indexOf(g)>-1)){if(s.files.push(g),g in Hl){a?c(g,Hl[g]):(++l,setTimeout(function(){--l,c(g,Hl[g])}));return}if(a){var S;try{S=co.fs.readFileSync(g).toString("utf8")}catch(v){E||i(v);return}c(g,S)}else++l,s.fetch(g,function(v,O){if(--l,!!o){if(v){E?l||i(null,s):i(v);return}c(g,O)}})}}var l=0;co.isString(e)&&(e=[e]);for(var d=0,h;d<e.length;++d)(h=s.resolvePath("",e[d]))&&u(h);return a?(s.resolveAll(),s):(l||i(null,s),s)};ur.prototype.loadSync=function(e,r){if(!co.isNode)throw Error("not supported");return this.load(e,r,$X)};ur.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return iS.prototype.resolveAll.call(this)};var nS=/^[A-Z]/;function zX(t,e){var r=e.parent.lookup(e.extend);if(r){var o=new rS(e.fullName,e.id,e.type,e.rule,void 0,e.options);return r.get(o.name)||(o.declaringField=e,e.extensionField=o,r.add(o)),!0}return!1}ur.prototype._handleAdd=function(e){if(e instanceof rS)e.extend!==void 0&&!e.extensionField&&(zX(this,e)||this.deferred.push(e));else if(e instanceof NM)nS.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof _we)){if(e instanceof MM)for(var r=0;r<this.deferred.length;)zX(this,this.deferred[r])?this.deferred.splice(r,1):++r;for(var o=0;o<e.nestedArray.length;++o)this._handleAdd(e._nestedArray[o]);nS.test(e.name)&&(e.parent[e.name]=e)}(e instanceof MM||e instanceof NM||e instanceof rS)&&(this._fullyQualifiedObjects[e.fullName]=e)};ur.prototype._handleRemove=function(e){if(e instanceof rS){if(e.extend!==void 0)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var r=this.deferred.indexOf(e);r>-1&&this.deferred.splice(r,1)}}else if(e instanceof NM)nS.test(e.name)&&delete e.parent[e.name];else if(e instanceof iS){for(var o=0;o<e.nestedArray.length;++o)this._handleRemove(e._nestedArray[o]);nS.test(e.name)&&delete e.parent[e.name]}delete this._fullyQualifiedObjects[e.fullName]};ur._configure=function(t,e,r){MM=t,IM=e,Hl=r}});var ot=p((gnt,KX)=>{"use strict";var Ve=KX.exports=Bn(),WX=zC(),xM,wM;Ve.codegen=AX();Ve.fetch=bX();Ve.path=CX();Ve.fs=Ve.inquire("fs");Ve.toArray=function(e){if(e){for(var r=Object.keys(e),o=new Array(r.length),s=0;s<r.length;)o[s]=e[r[s++]];return o}return[]};Ve.toObject=function(e){for(var r={},o=0;o<e.length;){var s=e[o++],a=e[o++];a!==void 0&&(r[s]=a)}return r};var gwe=/\\/g,Ewe=/"/g;Ve.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)};Ve.safeProp=function(e){return!/^[$\w_]+$/.test(e)||Ve.isReserved(e)?'["'+e.replace(gwe,"\\\\").replace(Ewe,'\\"')+'"]':"."+e};Ve.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var Swe=/_([a-z])/g;Ve.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(Swe,function(r,o){return o.toUpperCase()})};Ve.compareFieldsById=function(e,r){return e.id-r.id};Ve.decorateType=function(e,r){if(e.$type)return r&&e.$type.name!==r&&(Ve.decorateRoot.remove(e.$type),e.$type.name=r,Ve.decorateRoot.add(e.$type)),e.$type;xM||(xM=tS());var o=new xM(r||e.name);return Ve.decorateRoot.add(o),o.ctor=e,Object.defineProperty(e,"$type",{value:o,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:o,enumerable:!1}),o};var Twe=0;Ve.decorateEnum=function(e){if(e.$type)return e.$type;wM||(wM=Zr());var r=new wM("Enum"+Twe++,e);return Ve.decorateRoot.add(r),Object.defineProperty(e,"$type",{value:r,enumerable:!1}),r};Ve.setProperty=function(e,r,o,s){function a(i,n,c){var u=n.shift();if(u==="__proto__"||u==="prototype")return i;if(n.length>0)i[u]=a(i[u]||{},n,c);else{var l=i[u];if(l&&s)return i;l&&(c=[].concat(l).concat(c)),i[u]=c}return i}if(typeof e!="object")throw TypeError("dst must be an object");if(!r)throw TypeError("path must be specified");return r=r.split("."),a(e,r,o)};Object.defineProperty(Ve,"decorateRoot",{get:function(){return WX.decorated||(WX.decorated=new(oS()))}})});var Ts=p(XX=>{"use strict";var zl=XX,ywe=ot(),vwe=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function $l(t,e){var r=0,o={};for(e|=0;r<t.length;)o[vwe[r+e]]=t[r++];return o}zl.basic=$l([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]);zl.defaults=$l([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",ywe.emptyArray,null]);zl.long=$l([0,0,0,1,1],7);zl.mapKey=$l([0,0,0,5,5,0,0,0,1,1,0,2],2);zl.packed=$l([1,5,0,0,0,5,5,0,0,0,1,1,0])});var so=p((Snt,QX)=>{"use strict";QX.exports=st;var Wl=ao();((st.prototype=Object.create(Wl.prototype)).constructor=st).className="Field";var JX=Zr(),LM=Ts(),ze=ot(),Yl,Awe=/^required|optional|repeated$/;st.fromJSON=function(e,r){var o=new st(e,r.id,r.type,r.rule,r.extend,r.options,r.comment);return r.edition&&(o._edition=r.edition),o._defaultEdition="proto3",o};function st(t,e,r,o,s,a,i){if(ze.isObject(o)?(i=s,a=o,o=s=void 0):ze.isObject(s)&&(i=a,a=s,s=void 0),Wl.call(this,t,a),!ze.isInteger(e)||e<0)throw TypeError("id must be a non-negative integer");if(!ze.isString(r))throw TypeError("type must be a string");if(o!==void 0&&!Awe.test(o=o.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(s!==void 0&&!ze.isString(s))throw TypeError("extend must be a string");o==="proto3_optional"&&(o="optional"),this.rule=o&&o!=="optional"?o:void 0,this.type=r,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=ze.Long?LM.long[r]!==void 0:!1,this.bytes=r==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=i}Object.defineProperty(st.prototype,"required",{get:function(){return this._features.field_presence==="LEGACY_REQUIRED"}});Object.defineProperty(st.prototype,"optional",{get:function(){return!this.required}});Object.defineProperty(st.prototype,"delimited",{get:function(){return this.resolvedType instanceof Yl&&this._features.message_encoding==="DELIMITED"}});Object.defineProperty(st.prototype,"packed",{get:function(){return this._features.repeated_field_encoding==="PACKED"}});Object.defineProperty(st.prototype,"hasPresence",{get:function(){return this.repeated||this.map?!1:this.partOf||this.declaringField||this.extensionField||this._features.field_presence!=="IMPLICIT"}});st.prototype.setOption=function(e,r,o){return Wl.prototype.setOption.call(this,e,r,o)};st.prototype.toJSON=function(e){var r=e?!!e.keepComments:!1;return ze.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",r?this.comment:void 0])};st.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=LM.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof Yl?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 JX&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof JX)&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=ze.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;ze.base64.test(this.typeDefault)?ze.base64.decode(this.typeDefault,e=ze.newBuffer(ze.base64.length(this.typeDefault)),0):ze.utf8.write(this.typeDefault,e=ze.newBuffer(ze.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=ze.emptyObject:this.repeated?this.defaultValue=ze.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof Yl&&(this.parent.ctor.prototype[this.name]=this.defaultValue),Wl.prototype.resolve.call(this)};st.prototype._inferLegacyProtoFeatures=function(e){if(e!=="proto2"&&e!=="proto3")return{};var r={};if(this.rule==="required"&&(r.field_presence="LEGACY_REQUIRED"),this.parent&&LM.defaults[this.type]===void 0){var o=this.parent.get(this.type.split(".").pop());o&&o instanceof Yl&&o.group&&(r.message_encoding="DELIMITED")}return this.getOption("packed")===!0?r.repeated_field_encoding="PACKED":this.getOption("packed")===!1&&(r.repeated_field_encoding="EXPANDED"),r};st.prototype._resolveFeatures=function(e){return Wl.prototype._resolveFeatures.call(this,this._edition||e)};st.d=function(e,r,o,s){return typeof r=="function"?r=ze.decorateType(r).name:r&&typeof r=="object"&&(r=ze.decorateEnum(r).name),function(i,n){ze.decorateType(i.constructor).add(new st(n,e,r,o,{default:s}))}};st._configure=function(e){Yl=e}});var Ss=p((Tnt,t5)=>{"use strict";t5.exports=lr;var aS=ao();((lr.prototype=Object.create(aS.prototype)).constructor=lr).className="OneOf";var ZX=so(),sS=ot();function lr(t,e,r,o){if(Array.isArray(e)||(r=e,e=void 0),aS.call(this,t,r),!(e===void 0||Array.isArray(e)))throw TypeError("fieldNames must be an Array");this.oneof=e||[],this.fieldsArray=[],this.comment=o}lr.fromJSON=function(e,r){return new lr(e,r.oneof,r.options,r.comment)};lr.prototype.toJSON=function(e){var r=e?!!e.keepComments:!1;return sS.toObject(["options",this.options,"oneof",this.oneof,"comment",r?this.comment:void 0])};function e5(t){if(t.parent)for(var e=0;e<t.fieldsArray.length;++e)t.fieldsArray[e].parent||t.parent.add(t.fieldsArray[e])}lr.prototype.add=function(e){if(!(e instanceof ZX))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,e5(this),this};lr.prototype.remove=function(e){if(!(e instanceof ZX))throw TypeError("field must be a Field");var r=this.fieldsArray.indexOf(e);if(r<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(r,1),r=this.oneof.indexOf(e.name),r>-1&&this.oneof.splice(r,1),e.partOf=null,this};lr.prototype.onAdd=function(e){aS.prototype.onAdd.call(this,e);for(var r=this,o=0;o<this.oneof.length;++o){var s=e.get(this.oneof[o]);s&&!s.partOf&&(s.partOf=r,r.fieldsArray.push(s))}e5(this)};lr.prototype.onRemove=function(e){for(var r=0,o;r<this.fieldsArray.length;++r)(o=this.fieldsArray[r]).parent&&o.parent.remove(o);aS.prototype.onRemove.call(this,e)};Object.defineProperty(lr.prototype,"isProto3Optional",{get:function(){if(this.fieldsArray==null||this.fieldsArray.length!==1)return!1;var t=this.fieldsArray[0];return t.options!=null&&t.options.proto3_optional===!0}});lr.d=function(){for(var e=new Array(arguments.length),r=0;r<arguments.length;)e[r]=arguments[r++];return function(s,a){sS.decorateType(s.constructor).add(new lr(a,e)),Object.defineProperty(s,a,{get:sS.oneOfGetter(e),set:sS.oneOfSetter(e)})}}});var ao=p((ynt,r5)=>{"use strict";r5.exports=mt;mt.className="ReflectionObject";var Owe=Ss(),Kl=ot(),cS,bwe={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"},Rwe={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE"},Pwe={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"};function mt(t,e){if(!Kl.isString(t))throw TypeError("name must be a string");if(e&&!Kl.isObject(e))throw TypeError("options must be an object");this.options=e,this.parsedOptions=null,this.name=t,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(mt.prototype,{root:{get:function(){for(var t=this;t.parent!==null;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],e=this.parent;e;)t.unshift(e.name),e=e.parent;return t.join(".")}}});mt.prototype.toJSON=function(){throw Error()};mt.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var r=e.root;r instanceof cS&&r._handleAdd(this)};mt.prototype.onRemove=function(e){var r=e.root;r instanceof cS&&r._handleRemove(this),this.parent=null,this.resolved=!1};mt.prototype.resolve=function(){return this.resolved?this:(this.root instanceof cS&&(this.resolved=!0),this)};mt.prototype._resolveFeaturesRecursive=function(e){return this._resolveFeatures(this._edition||e)};mt.prototype._resolveFeatures=function(e){if(!this._featuresResolved){var r={};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")r=Object.assign({},Rwe);else if(e==="proto3")r=Object.assign({},Pwe);else if(e==="2023")r=Object.assign({},bwe);else throw new Error("Unknown edition: "+e);this._features=Object.assign(r,o||{}),this._featuresResolved=!0;return}if(this.partOf instanceof Owe){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}};mt.prototype._inferLegacyProtoFeatures=function(){return{}};mt.prototype.getOption=function(e){if(this.options)return this.options[e]};mt.prototype.setOption=function(e,r,o){return this.options||(this.options={}),/^features\./.test(e)?Kl.setProperty(this.options,e,r,o):(!o||this.options[e]===void 0)&&(this.getOption(e)!==r&&(this.resolved=!1),this.options[e]=r),this};mt.prototype.setParsedOption=function(e,r,o){this.parsedOptions||(this.parsedOptions=[]);var s=this.parsedOptions;if(o){var a=s.find(function(c){return Object.prototype.hasOwnProperty.call(c,e)});if(a){var i=a[e];Kl.setProperty(i,o,r)}else a={},a[e]=Kl.setProperty({},o,r),s.push(a)}else{var n={};n[e]=r,s.push(n)}return this};mt.prototype.setOptions=function(e,r){if(e)for(var o=Object.keys(e),s=0;s<o.length;++s)this.setOption(o[s],e[o[s]],r);return this};mt.prototype.toString=function(){var e=this.constructor.className,r=this.fullName;return r.length?e+" "+r:e};mt.prototype._editionToJSON=function(){if(!(!this._edition||this._edition==="proto3"))return this._edition};mt._configure=function(t){cS=t}});var Zr=p((vnt,i5)=>{"use strict";i5.exports=en;var DM=ao();((en.prototype=Object.create(DM.prototype)).constructor=en).className="Enum";var n5=Rc(),uS=ot();function en(t,e,r,o,s,a){if(DM.call(this,t,r),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<i.length;++n)typeof e[i[n]]=="number"&&(this.valuesById[this.values[i[n]]=e[i[n]]]=i[n])}en.prototype._resolveFeatures=function(e){return e=this._edition||e,DM.prototype._resolveFeatures.call(this,e),Object.keys(this.values).forEach(r=>{var o=Object.assign({},this._features);this._valuesFeatures[r]=Object.assign(o,this.valuesOptions&&this.valuesOptions[r]&&this.valuesOptions[r].features)}),this};en.fromJSON=function(e,r){var o=new en(e,r.values,r.options,r.comment,r.comments);return o.reserved=r.reserved,r.edition&&(o._edition=r.edition),o._defaultEdition="proto3",o};en.prototype.toJSON=function(e){var r=e?!!e.keepComments:!1;return uS.toObject(["edition",this._editionToJSON(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",r?this.comment:void 0,"comments",r?this.comments:void 0])};en.prototype.add=function(e,r,o,s){if(!uS.isString(e))throw TypeError("name must be a string");if(!uS.isInteger(r))throw TypeError("id must be an integer");if(this.values[e]!==void 0)throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(r))throw Error("id "+r+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(this.valuesById[r]!==void 0){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+r+" in "+this);this.values[e]=r}else this.valuesById[this.values[e]=r]=e;return s&&(this.valuesOptions===void 0&&(this.valuesOptions={}),this.valuesOptions[e]=s||null),this.comments[e]=o||null,this};en.prototype.remove=function(e){if(!uS.isString(e))throw TypeError("name must be a string");var r=this.values[e];if(r==null)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[r],delete this.values[e],delete this.comments[e],this.valuesOptions&&delete this.valuesOptions[e],this};en.prototype.isReservedId=function(e){return n5.isReservedId(this.reserved,e)};en.prototype.isReservedName=function(e){return n5.isReservedName(this.reserved,e)}});var CM=p((Ant,s5)=>{"use strict";s5.exports=Nwe;var Cwe=Zr(),UM=Ts(),kM=ot();function o5(t,e,r,o){return e.delimited?t("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,o,(e.id<<3|3)>>>0,(e.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,o,(e.id<<3|2)>>>0)}function Nwe(t){for(var e=kM.codegen(["m","w"],t.name+"$encode")("if(!w)")("w=Writer.create()"),r,o,s=t.fieldsArray.slice().sort(kM.compareFieldsById),r=0;r<s.length;++r){var a=s[r].resolve(),i=t._fieldsArray.indexOf(a),n=a.resolvedType instanceof Cwe?"int32":a.type,c=UM.basic[n];o="m"+kM.safeProp(a.name),a.map?(e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",o,a.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",o)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(a.id<<3|2)>>>0,8|UM.mapKey[a.keyType],a.keyType),c===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|c,n,o),e("}")("}")):a.repeated?(e("if(%s!=null&&%s.length){",o,o),a.packed&&UM.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),c===void 0?o5(e,a,i,o+"[i]"):e("w.uint32(%i).%s(%s[i])",(a.id<<3|c)>>>0,n,o)),e("}")):(a.optional&&e("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",o,a.name),c===void 0?o5(e,a,i,o):e("w.uint32(%i).%s(%s)",(a.id<<3|c)>>>0,n,o))}return e("return w")}});var c5=p((Ont,a5)=>{"use strict";var le=a5.exports=$C();le.build="light";function Mwe(t,e,r){return typeof e=="function"?(r=e,e=new le.Root):e||(e=new le.Root),e.load(t,r)}le.load=Mwe;function Iwe(t,e){return e||(e=new le.Root),e.loadSync(t)}le.loadSync=Iwe;le.encoder=CM();le.decoder=gM();le.verifier=TM();le.converter=AM();le.ReflectionObject=ao();le.Namespace=Rc();le.Root=oS();le.Enum=Zr();le.Type=tS();le.Field=so();le.OneOf=Ss();le.MapField=KE();le.Service=JE();le.Method=XE();le.Message=QE();le.wrappers=OM();le.types=Ts();le.util=ot();le.ReflectionObject._configure(le.Root);le.Namespace._configure(le.Type,le.Service,le.Enum);le.Root._configure(le.Type);le.Field._configure(le.Type)});var FM=p((bnt,d5)=>{"use strict";d5.exports=l5;var BM=/[\s{}=;:[\],'"()<>]/g,xwe=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,wwe=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,Lwe=/^ *[*/]+ */,Dwe=/^\s*\*?\/*/,Uwe=/\n/g,kwe=/\s/,Bwe=/\\(.?)/g,Fwe={0:"\0",r:"\r",n:`
|
|
30
|
+
`,t:" "};function u5(t){return t.replace(Bwe,function(e,r){switch(r){case"\\":case"":return r;default:return Fwe[r]||""}})}l5.unescape=u5;function l5(t,e){t=t.toString();var r=0,o=t.length,s=1,a=0,i={},n=[],c=null;function u(A){return Error("illegal "+A+" (line "+s+")")}function l(){var A=c==="'"?wwe:xwe;A.lastIndex=r-1;var $=A.exec(t);if(!$)throw u("string");return r=A.lastIndex,v(c),c=null,u5($[1])}function d(A){return t.charAt(A)}function h(A,$,z){var Q={type:t.charAt(A++),lineEmpty:!1,leading:z},oe;e?oe=2:oe=3;var te=A-oe,Z;do if(--te<0||(Z=t.charAt(te))===`
|
|
31
|
+
`){Q.lineEmpty=!0;break}while(Z===" "||Z===" ");for(var P=t.substring(A,$).split(Uwe),It=0;It<P.length;++It)P[It]=P[It].replace(e?Dwe:Lwe,"").trim();Q.text=P.join(`
|
|
32
|
+
`).trim(),i[s]=Q,a=s}function g(A){var $=E(A),z=t.substring(A,$),Q=/^\s*\/\//.test(z);return Q}function E(A){for(var $=A;$<o&&d($)!==`
|
|
33
|
+
`;)$++;return $}function S(){if(n.length>0)return n.shift();if(c)return l();var A,$,z,Q,oe,te=r===0;do{if(r===o)return null;for(A=!1;kwe.test(z=d(r));)if(z===`
|
|
34
|
+
`&&(te=!0,++s),++r===o)return null;if(d(r)==="/"){if(++r===o)throw u("comment");if(d(r)==="/")if(e){if(Q=r,oe=!1,g(r-1)){oe=!0;do if(r=E(r),r===o||(r++,!te))break;while(g(r))}else r=Math.min(o,E(r)+1);oe&&(h(Q,r,te),te=!0),s++,A=!0}else{for(oe=d(Q=r+1)==="/";d(++r)!==`
|
|
35
|
+
`;)if(r===o)return null;++r,oe&&(h(Q,r-1,te),te=!0),++s,A=!0}else if((z=d(r))==="*"){Q=r+1,oe=e||d(Q)==="*";do{if(z===`
|
|
36
|
+
`&&++s,++r===o)throw u("comment");$=z,z=d(r)}while($!=="*"||z!=="/");++r,oe&&(h(Q,r-2,te),te=!0),A=!0}else return"/"}}while(A);var Z=r;BM.lastIndex=0;var P=BM.test(d(Z++));if(!P)for(;Z<o&&!BM.test(d(Z));)++Z;var It=t.substring(r,r=Z);return(It==='"'||It==="'")&&(c=It),It}function v(A){n.push(A)}function O(){if(!n.length){var A=S();if(A===null)return null;v(A)}return n[0]}function x(A,$){var z=O(),Q=z===A;if(Q)return S(),!0;if(!$)throw u("token '"+z+"', '"+A+"' expected");return!1}function H(A){var $=null,z;return A===void 0?(z=i[s-1],delete i[s-1],z&&(e||z.type==="*"||z.lineEmpty)&&($=z.leading?z.text:null)):(a<A&&O(),z=i[A],delete i[A],z&&!z.lineEmpty&&(e||z.type==="/")&&($=z.leading?null:z.text)),$}return Object.defineProperty({next:S,peek:O,push:v,skip:x,cmnt:H},"line",{get:function(){return s}})}});var g5=p((Rnt,_5)=>{"use strict";_5.exports=Ci;Ci.filename=null;Ci.defaults={keepCase:!1};var Vwe=FM(),p5=oS(),f5=tS(),h5=so(),Gwe=KE(),m5=Ss(),qwe=Zr(),jwe=JE(),Hwe=XE(),zwe=ao(),$we=Ts(),VM=ot(),Ywe=/^[1-9][0-9]*$/,Wwe=/^-?[1-9][0-9]*$/,Kwe=/^0[x][0-9a-fA-F]+$/,Xwe=/^-?0[x][0-9a-fA-F]+$/,Jwe=/^0[0-7]+$/,Qwe=/^-?0[0-7]+$/,Zwe=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,Wn=/^[a-zA-Z_][a-zA-Z_0-9]*$/,Kn=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;function Ci(t,e,r){e instanceof p5||(r=e,e=new p5),r||(r=Ci.defaults);var o=r.preferTrailingComment||!1,s=Vwe(t,r.alternateCommentMode||!1),a=s.next,i=s.push,n=s.peek,c=s.skip,u=s.cmnt,l=!0,d,h,g,E="proto2",S=e,v=[],O={},x=r.keepCase?function(M){return M}:VM.camelCase;function H(){v.forEach(M=>{M._edition=E,Object.keys(O).forEach(N=>{M.getOption(N)===void 0&&M.setOption(N,O[N],!0)})})}function A(M,N,D){var W=Ci.filename;return D||(Ci.filename=null),Error("illegal "+(N||"token")+" '"+M+"' ("+(W?W+", ":"")+"line "+s.line+")")}function $(){var M=[],N;do{if((N=a())!=='"'&&N!=="'")throw A(N);M.push(a()),c(N),N=n()}while(N==='"'||N==="'");return M.join("")}function z(M){var N=a();switch(N){case"'":case'"':return i(N),$();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return oe(N,!0)}catch{if(M&&Kn.test(N))return N;throw A(N,"value")}}function Q(M,N){var D,W;do if(N&&((D=n())==='"'||D==="'")){var Y=$();if(M.push(Y),E>=2023)throw A(Y,"id")}else try{M.push([W=te(a()),c("to",!0)?te(a()):W])}catch(Pe){if(N&&Kn.test(D)&&E>=2023)M.push(D);else throw Pe}while(c(",",!0));var re={options:void 0};re.setOption=function(Pe,St){this.options===void 0&&(this.options={}),this.options[Pe]=St},U(re,function(St){if(St==="option")pe(re,St),c(";");else throw A(St)},function(){ui(re)})}function oe(M,N){var D=1;switch(M.charAt(0)==="-"&&(D=-1,M=M.substring(1)),M){case"inf":case"INF":case"Inf":return D*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(Ywe.test(M))return D*parseInt(M,10);if(Kwe.test(M))return D*parseInt(M,16);if(Jwe.test(M))return D*parseInt(M,8);if(Zwe.test(M))return D*parseFloat(M);throw A(M,"number",N)}function te(M,N){switch(M){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!N&&M.charAt(0)==="-")throw A(M,"id");if(Wwe.test(M))return parseInt(M,10);if(Xwe.test(M))return parseInt(M,16);if(Qwe.test(M))return parseInt(M,8);throw A(M,"id")}function Z(){if(d!==void 0)throw A("package");if(d=a(),!Kn.test(d))throw A(d,"name");S=S.define(d),c(";")}function P(){var M=n(),N;switch(M){case"weak":N=g||(g=[]),a();break;case"public":a();default:N=h||(h=[]);break}M=$(),c(";"),N.push(M)}function It(){if(c("="),E=$(),E<2023)throw A(E,"syntax");c(";")}function I(){if(c("="),E=$(),!["2023"].includes(E))throw A(E,"edition");c(";")}function _(M,N){switch(N){case"option":return pe(M,N),c(";"),!0;case"message":return ce(M,N),!0;case"enum":return xt(M,N),!0;case"service":return zZ(M,N),!0;case"extend":return YZ(M,N),!0}return!1}function U(M,N,D){var W=s.line;if(M&&(typeof M.comment!="string"&&(M.comment=u()),M.filename=Ci.filename),c("{",!0)){for(var Y;(Y=a())!=="}";)N(Y);c(";",!0)}else D&&D(),c(";"),M&&(typeof M.comment!="string"||o)&&(M.comment=u(W)||M.comment)}function ce(M,N){if(!Wn.test(N=a()))throw A(N,"type name");var D=new f5(N);U(D,function(Y){if(!_(D,Y))switch(Y){case"map":De(D,Y);break;case"required":if(E!=="proto2")throw A(Y);case"repeated":ae(D,Y);break;case"optional":if(E==="proto3")ae(D,"proto3_optional");else{if(E!=="proto2")throw A(Y);ae(D,"optional")}break;case"oneof":Et(D,Y);break;case"extensions":Q(D.extensions||(D.extensions=[]));break;case"reserved":Q(D.reserved||(D.reserved=[]),!0);break;default:if(E==="proto2"||!Kn.test(Y))throw A(Y);i(Y),ae(D,"optional");break}}),M.add(D),M===S&&v.push(D)}function ae(M,N,D){var W=a();if(W==="group"){Ee(M,N);return}for(;W.endsWith(".")||n().startsWith(".");)W+=a();if(!Kn.test(W))throw A(W,"type");var Y=a();if(!Wn.test(Y))throw A(Y,"name");Y=x(Y),c("=");var re=new h5(Y,te(a()),W,N,D);if(U(re,function(Dt){if(Dt==="option")pe(re,Dt),c(";");else throw A(Dt)},function(){ui(re)}),N==="proto3_optional"){var Pe=new m5("_"+Y);re.setOption("proto3_optional",!0),Pe.add(re),M.add(Pe)}else M.add(re);M===S&&v.push(re)}function Ee(M,N){if(E>=2023)throw A("group");var D=a();if(!Wn.test(D))throw A(D,"name");var W=VM.lcFirst(D);D===W&&(D=VM.ucFirst(D)),c("=");var Y=te(a()),re=new f5(D);re.group=!0;var Pe=new h5(W,Y,D,N);Pe.filename=Ci.filename,U(re,function(Dt){switch(Dt){case"option":pe(re,Dt),c(";");break;case"required":case"repeated":ae(re,Dt);break;case"optional":E==="proto3"?ae(re,"proto3_optional"):ae(re,"optional");break;case"message":ce(re,Dt);break;case"enum":xt(re,Dt);break;case"reserved":Q(re.reserved||(re.reserved=[]),!0);break;default:throw A(Dt)}}),M.add(re).add(Pe)}function De(M){c("<");var N=a();if($we.mapKey[N]===void 0)throw A(N,"type");c(",");var D=a();if(!Kn.test(D))throw A(D,"type");c(">");var W=a();if(!Wn.test(W))throw A(W,"name");c("=");var Y=new Gwe(x(W),te(a()),N,D);U(Y,function(Pe){if(Pe==="option")pe(Y,Pe),c(";");else throw A(Pe)},function(){ui(Y)}),M.add(Y)}function Et(M,N){if(!Wn.test(N=a()))throw A(N,"name");var D=new m5(x(N));U(D,function(Y){Y==="option"?(pe(D,Y),c(";")):(i(Y),ae(D,"optional"))}),M.add(D)}function xt(M,N){if(!Wn.test(N=a()))throw A(N,"name");var D=new qwe(N);U(D,function(Y){switch(Y){case"option":pe(D,Y),c(";");break;case"reserved":Q(D.reserved||(D.reserved=[]),!0),D.reserved===void 0&&(D.reserved=[]);break;default:Je(D,Y)}}),M.add(D),M===S&&v.push(D)}function Je(M,N){if(!Wn.test(N))throw A(N,"name");c("=");var D=te(a(),!0),W={options:void 0};W.getOption=function(Y){return this.options[Y]},W.setOption=function(Y,re){zwe.prototype.setOption.call(W,Y,re)},W.setParsedOption=function(){},U(W,function(re){if(re==="option")pe(W,re),c(";");else throw A(re)},function(){ui(W)}),M.add(N,D,W.comment,W.parsedOptions||W.options)}function pe(M,N){var D,W,Y=!0;for(N==="option"&&(N=a());N!=="=";){if(N==="("){var re=a();c(")"),N="("+re+")"}if(Y){if(Y=!1,N.includes(".")&&!N.includes("(")){var Pe=N.split(".");D=Pe[0]+".",N=Pe[1];continue}D=N}else W=W?W+=N:N;N=a()}var St=W?D.concat(W):D,Dt=wt(M,St);W=W&&W[0]==="."?W.slice(1):W,D=D&&D[D.length-1]==="."?D.slice(0,-1):D,Lt(M,D,Dt,W)}function wt(M,N){if(c("{",!0)){for(var D={};!c("}",!0);){if(!Wn.test(lt=a()))throw A(lt,"name");if(lt===null)throw A(lt,"end of input");var W,Y=lt;if(c(":",!0),n()==="{")W=wt(M,N+"."+lt);else if(n()==="["){W=[];var re;if(c("[",!0)){do re=z(!0),W.push(re);while(c(",",!0));c("]"),typeof re<"u"&&Ne(M,N+"."+lt,re)}}else W=z(!0),Ne(M,N+"."+lt,W);var Pe=D[Y];Pe&&(W=[].concat(Pe).concat(W)),D[Y]=W,c(",",!0),c(";",!0)}return D}var St=z(!0);return Ne(M,N,St),St}function Ne(M,N,D){if(S===M&&/^features\./.test(N)){O[N]=D;return}M.setOption&&M.setOption(N,D)}function Lt(M,N,D,W){M.setParsedOption&&M.setParsedOption(N,D,W)}function ui(M){if(c("[",!0)){do pe(M,"option");while(c(",",!0));c("]")}return M}function zZ(M,N){if(!Wn.test(N=a()))throw A(N,"service name");var D=new jwe(N);U(D,function(Y){if(!_(D,Y))if(Y==="rpc")$Z(D,Y);else throw A(Y)}),M.add(D),M===S&&v.push(D)}function $Z(M,N){var D=u(),W=N;if(!Wn.test(N=a()))throw A(N,"name");var Y=N,re,Pe,St,Dt;if(c("("),c("stream",!0)&&(Pe=!0),!Kn.test(N=a())||(re=N,c(")"),c("returns"),c("("),c("stream",!0)&&(Dt=!0),!Kn.test(N=a())))throw A(N);St=N,c(")");var zd=new Hwe(Y,W,re,St,Pe,Dt);zd.comment=D,U(zd,function(mv){if(mv==="option")pe(zd,mv),c(";");else throw A(mv)}),M.add(zd)}function YZ(M,N){if(!Kn.test(N=a()))throw A(N,"reference");var D=N;U(null,function(Y){switch(Y){case"required":case"repeated":ae(M,Y,D);break;case"optional":E==="proto3"?ae(M,"proto3_optional",D):ae(M,"optional",D);break;default:if(E==="proto2"||!Kn.test(Y))throw A(Y);i(Y),ae(M,"optional",D);break}})}for(var lt;(lt=a())!==null;)switch(lt){case"package":if(!l)throw A(lt);Z();break;case"import":if(!l)throw A(lt);P();break;case"syntax":if(!l)throw A(lt);It();break;case"edition":if(!l)throw A(lt);I();break;case"option":pe(S,lt),c(";",!0);break;default:if(_(S,lt)){l=!1;continue}throw A(lt)}return H(),Ci.filename=null,{package:d,imports:h,weakImports:g,root:e}}});var T5=p((Pnt,S5)=>{"use strict";S5.exports=tn;var eLe=/\/|\./;function tn(t,e){eLe.test(t)||(t="google/protobuf/"+t+".proto",e={nested:{google:{nested:{protobuf:{nested:e}}}}}),tn[t]=e}tn("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var E5;tn("duration",{Duration:E5={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}});tn("timestamp",{Timestamp:E5});tn("empty",{Empty:{fields:{}}});tn("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}}}});tn("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}}}});tn("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}});tn.get=function(e){return tn[e]||null}});var v5=p((Cnt,y5)=>{"use strict";var uo=y5.exports=c5();uo.build="full";uo.tokenize=FM();uo.parse=g5();uo.common=T5();uo.Root._configure(uo.Type,uo.parse,uo.common)});var lS=p((Nnt,A5)=>{"use strict";A5.exports=v5()});var GM=p((Mnt,tLe)=>{tLe.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],[38,38],"php_generic_services"],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 M5=p((ie,N5)=>{"use strict";var dr=lS();N5.exports=ie=dr.descriptor=dr.Root.fromJSON(GM()).lookup(".google.protobuf");var O5=dr.Namespace,Xl=dr.Root,Ni=dr.Enum,Xn=dr.Type,lo=dr.Field,rLe=dr.MapField,dS=dr.OneOf,Jl=dr.Service,pS=dr.Method;Xl.fromDescriptor=function(e){typeof e.length=="number"&&(e=ie.FileDescriptorSet.decode(e));var r=new Xl;if(e.file)for(var o,s,a=0,i;a<e.file.length;++a){s=r,(o=e.file[a]).package&&o.package.length&&(s=r.define(o.package));var n=pLe(o);if(o.name&&o.name.length&&r.files.push(s.filename=o.name),o.messageType)for(i=0;i<o.messageType.length;++i)s.add(Xn.fromDescriptor(o.messageType[i],n));if(o.enumType)for(i=0;i<o.enumType.length;++i)s.add(Ni.fromDescriptor(o.enumType[i],n));if(o.extension)for(i=0;i<o.extension.length;++i)s.add(lo.fromDescriptor(o.extension[i],n));if(o.service)for(i=0;i<o.service.length;++i)s.add(Jl.fromDescriptor(o.service[i],n));var c=Cc(o.options,ie.FileOptions);if(c){var u=Object.keys(c);for(i=0;i<u.length;++i)s.setOption(u[i],c[u[i]])}}return r.resolveAll()};Xl.prototype.toDescriptor=function(e){var r=ie.FileDescriptorSet.create();return b5(this,r.file,e),r};function b5(t,e,r){var o=ie.FileDescriptorProto.create({name:t.filename||(t.fullName.substring(1).replace(/\./g,"_")||"root")+".proto"});fLe(r,o),t instanceof Xl||(o.package=t.fullName.substring(1));for(var s=0,a;s<t.nestedArray.length;++s)(a=t._nestedArray[s])instanceof Xn?o.messageType.push(a.toDescriptor(r)):a instanceof Ni?o.enumType.push(a.toDescriptor()):a instanceof lo?o.extension.push(a.toDescriptor(r)):a instanceof Jl?o.service.push(a.toDescriptor()):a instanceof O5&&b5(a,e,r);o.options=Nc(t.options,ie.FileOptions),o.messageType.length+o.enumType.length+o.extension.length+o.service.length&&e.push(o)}var nLe=0;Xn.fromDescriptor=function(e,r,o){typeof e.length=="number"&&(e=ie.DescriptorProto.decode(e));var s=new Xn(e.name.length?e.name:"Type"+nLe++,Cc(e.options,ie.MessageOptions)),a;if(o||(s._edition=r),e.oneofDecl)for(a=0;a<e.oneofDecl.length;++a)s.add(dS.fromDescriptor(e.oneofDecl[a]));if(e.field)for(a=0;a<e.field.length;++a){var i=lo.fromDescriptor(e.field[a],r,!0);s.add(i),e.field[a].hasOwnProperty("oneofIndex")&&s.oneofsArray[e.field[a].oneofIndex].add(i)}if(e.extension)for(a=0;a<e.extension.length;++a)s.add(lo.fromDescriptor(e.extension[a],r,!0));if(e.nestedType)for(a=0;a<e.nestedType.length;++a)s.add(Xn.fromDescriptor(e.nestedType[a],r,!0)),e.nestedType[a].options&&e.nestedType[a].options.mapEntry&&s.setOption("map_entry",!0);if(e.enumType)for(a=0;a<e.enumType.length;++a)s.add(Ni.fromDescriptor(e.enumType[a],r,!0));if(e.extensionRange&&e.extensionRange.length)for(s.extensions=[],a=0;a<e.extensionRange.length;++a)s.extensions.push([e.extensionRange[a].start,e.extensionRange[a].end]);if(e.reservedRange&&e.reservedRange.length||e.reservedName&&e.reservedName.length){if(s.reserved=[],e.reservedRange)for(a=0;a<e.reservedRange.length;++a)s.reserved.push([e.reservedRange[a].start,e.reservedRange[a].end]);if(e.reservedName)for(a=0;a<e.reservedName.length;++a)s.reserved.push(e.reservedName[a])}return s};Xn.prototype.toDescriptor=function(e){var r=ie.DescriptorProto.create({name:this.name}),o;for(o=0;o<this.fieldsArray.length;++o){var s;if(r.field.push(s=this._fieldsArray[o].toDescriptor(e)),this._fieldsArray[o]instanceof rLe){var a=qM(this._fieldsArray[o].keyType,this._fieldsArray[o].resolvedKeyType,!1),i=qM(this._fieldsArray[o].type,this._fieldsArray[o].resolvedType,!1),n=i===11||i===14?this._fieldsArray[o].resolvedType&&C5(this.parent,this._fieldsArray[o].resolvedType)||this._fieldsArray[o].type:void 0;r.nestedType.push(ie.DescriptorProto.create({name:s.typeName,field:[ie.FieldDescriptorProto.create({name:"key",number:1,label:1,type:a}),ie.FieldDescriptorProto.create({name:"value",number:2,label:1,type:i,typeName:n})],options:ie.MessageOptions.create({mapEntry:!0})}))}}for(o=0;o<this.oneofsArray.length;++o)r.oneofDecl.push(this._oneofsArray[o].toDescriptor());for(o=0;o<this.nestedArray.length;++o)this._nestedArray[o]instanceof lo?r.field.push(this._nestedArray[o].toDescriptor(e)):this._nestedArray[o]instanceof Xn?r.nestedType.push(this._nestedArray[o].toDescriptor(e)):this._nestedArray[o]instanceof Ni&&r.enumType.push(this._nestedArray[o].toDescriptor());if(this.extensions)for(o=0;o<this.extensions.length;++o)r.extensionRange.push(ie.DescriptorProto.ExtensionRange.create({start:this.extensions[o][0],end:this.extensions[o][1]}));if(this.reserved)for(o=0;o<this.reserved.length;++o)typeof this.reserved[o]=="string"?r.reservedName.push(this.reserved[o]):r.reservedRange.push(ie.DescriptorProto.ReservedRange.create({start:this.reserved[o][0],end:this.reserved[o][1]}));return r.options=Nc(this.options,ie.MessageOptions),r};var iLe=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/;lo.fromDescriptor=function(e,r,o){if(typeof e.length=="number"&&(e=ie.DescriptorProto.decode(e)),typeof e.number!="number")throw Error("missing field id");var s;e.typeName&&e.typeName.length?s=e.typeName:s=uLe(e.type);var a;switch(e.label){case 1:a=void 0;break;case 2:a="required";break;case 3:a="repeated";break;default:throw Error("illegal label: "+e.label)}var i=e.extendee;e.extendee!==void 0&&(i=i.length?i:void 0);var n=new lo(e.name.length?e.name:"field"+e.number,e.number,s,a,i);if(o||(n._edition=r),n.options=Cc(e.options,ie.FieldOptions),e.proto3_optional&&(n.options.proto3_optional=!0),e.defaultValue&&e.defaultValue.length){var c=e.defaultValue;switch(c){case"true":case"TRUE":c=!0;break;case"false":case"FALSE":c=!1;break;default:var u=iLe.exec(c);u&&(c=parseInt(c));break}n.setOption("default",c)}return lLe(e.type)&&(r==="proto3"?e.options&&!e.options.packed&&n.setOption("packed",!1):(!r||r==="proto2")&&e.options&&e.options.packed&&n.setOption("packed",!0)),n};lo.prototype.toDescriptor=function(e){var r=ie.FieldDescriptorProto.create({name:this.name,number:this.id});if(this.map)r.type=11,r.typeName=dr.util.ucFirst(this.name),r.label=3;else{switch(r.type=qM(this.type,this.resolve().resolvedType,this.delimited)){case 10:case 11:case 14:r.typeName=this.resolvedType?C5(this.parent,this.resolvedType):this.type;break}this.rule==="repeated"?r.label=3:this.required&&e==="proto2"?r.label=2:r.label=1}if(r.extendee=this.extensionField?this.extensionField.parent.fullName:this.extend,this.partOf&&(r.oneofIndex=this.parent.oneofsArray.indexOf(this.partOf))<0)throw Error("missing oneof");return this.options&&(r.options=Nc(this.options,ie.FieldOptions),this.options.default!=null&&(r.defaultValue=String(this.options.default)),this.options.proto3_optional&&(r.proto3_optional=!0)),e==="proto3"?this.packed||((r.options||(r.options=ie.FieldOptions.create())).packed=!1):(!e||e==="proto2")&&this.packed&&((r.options||(r.options=ie.FieldOptions.create())).packed=!0),r};var oLe=0;Ni.fromDescriptor=function(e,r,o){typeof e.length=="number"&&(e=ie.EnumDescriptorProto.decode(e));var s={};if(e.value)for(var a=0;a<e.value.length;++a){var i=e.value[a].name,n=e.value[a].number||0;s[i&&i.length?i:"NAME"+n]=n}var c=new Ni(e.name&&e.name.length?e.name:"Enum"+oLe++,s,Cc(e.options,ie.EnumOptions));return o||(c._edition=r),c};Ni.prototype.toDescriptor=function(){for(var e=[],r=0,o=Object.keys(this.values);r<o.length;++r)e.push(ie.EnumValueDescriptorProto.create({name:o[r],number:this.values[o[r]]}));return ie.EnumDescriptorProto.create({name:this.name,value:e,options:Nc(this.options,ie.EnumOptions)})};var sLe=0;dS.fromDescriptor=function(e){return typeof e.length=="number"&&(e=ie.OneofDescriptorProto.decode(e)),new dS(e.name&&e.name.length?e.name:"oneof"+sLe++)};dS.prototype.toDescriptor=function(){return ie.OneofDescriptorProto.create({name:this.name})};var aLe=0;Jl.fromDescriptor=function(e,r,o){typeof e.length=="number"&&(e=ie.ServiceDescriptorProto.decode(e));var s=new Jl(e.name&&e.name.length?e.name:"Service"+aLe++,Cc(e.options,ie.ServiceOptions));if(o||(s._edition=r),e.method)for(var a=0;a<e.method.length;++a)s.add(pS.fromDescriptor(e.method[a]));return s};Jl.prototype.toDescriptor=function(){for(var e=[],r=0;r<this.methodsArray.length;++r)e.push(this._methodsArray[r].toDescriptor());return ie.ServiceDescriptorProto.create({name:this.name,method:e,options:Nc(this.options,ie.ServiceOptions)})};var cLe=0;pS.fromDescriptor=function(e){return typeof e.length=="number"&&(e=ie.MethodDescriptorProto.decode(e)),new pS(e.name&&e.name.length?e.name:"Method"+cLe++,"rpc",e.inputType,e.outputType,!!e.clientStreaming,!!e.serverStreaming,Cc(e.options,ie.MethodOptions))};pS.prototype.toDescriptor=function(){return ie.MethodDescriptorProto.create({name:this.name,inputType:this.resolvedRequestType?this.resolvedRequestType.fullName:this.requestType,outputType:this.resolvedResponseType?this.resolvedResponseType.fullName:this.responseType,clientStreaming:this.requestStream,serverStreaming:this.responseStream,options:Nc(this.options,ie.MethodOptions)})};function uLe(t){switch(t){case 1:return"double";case 2:return"float";case 3:return"int64";case 4:return"uint64";case 5:return"int32";case 6:return"fixed64";case 7:return"fixed32";case 8:return"bool";case 9:return"string";case 12:return"bytes";case 13:return"uint32";case 15:return"sfixed32";case 16:return"sfixed64";case 17:return"sint32";case 18:return"sint64"}throw Error("illegal type: "+t)}function lLe(t){switch(t){case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 13:case 14:case 15:case 16:case 17:case 18:return!0}return!1}function qM(t,e,r){switch(t){case"double":return 1;case"float":return 2;case"int64":return 3;case"uint64":return 4;case"int32":return 5;case"fixed64":return 6;case"fixed32":return 7;case"bool":return 8;case"string":return 9;case"bytes":return 12;case"uint32":return 13;case"sfixed32":return 15;case"sfixed64":return 16;case"sint32":return 17;case"sint64":return 18}if(e instanceof Ni)return 14;if(e instanceof Xn)return r?10:11;throw Error("illegal type: "+t)}function R5(t,e){for(var r={},o=0,s,a;o<e.fieldsArray.length;++o)if((a=(s=e._fieldsArray[o]).name)!=="uninterpretedOption"&&Object.prototype.hasOwnProperty.call(t,a)){var i=dLe(a);s.resolvedType instanceof Xn?r[i]=R5(t[a],s.resolvedType):s.resolvedType instanceof Ni?r[i]=s.resolvedType.valuesById[t[a]]:r[i]=t[a]}return r}function Cc(t,e){if(t)return R5(e.toObject(t),e)}function P5(t,e){for(var r={},o=Object.keys(t),s=0;s<o.length;++s){var a=o[s],i=dr.util.camelCase(a);if(Object.prototype.hasOwnProperty.call(e.fields,i)){var n=e.fields[i];n.resolvedType instanceof Xn?r[i]=P5(t[a],n.resolvedType):r[i]=t[a],n.repeated&&!Array.isArray(r[i])&&(r[i]=[r[i]])}}return r}function Nc(t,e){if(t)return e.fromObject(P5(t,e))}function C5(t,e){var r=t.fullName.split("."),o=e.fullName.split("."),s=0,a=0,i=o.length-1;if(!(t instanceof Xl)&&e instanceof O5)for(;s<r.length&&a<i&&r[s]===o[a];){var n=e.lookup(r[s++],!0);if(n!==null&&n!==e)break;++a}else for(;s<r.length&&a<i&&r[s]===o[a];++s,++a);return o.slice(a).join(".")}function dLe(t){return t.substring(0,1)+t.substring(1).replace(/([A-Z])(?=[a-z]|$)/g,function(e,r){return"_"+r.toLowerCase()})}function pLe(t){if(t.syntax==="editions")switch(t.edition){case ie.Edition.EDITION_2023:return"2023";default:throw new Error("Unsupported edition "+t.edition)}return t.syntax==="proto3"?"proto3":"proto2"}function fLe(t,e){if(t)if(t==="proto2"||t==="proto3")e.syntax=t;else switch(e.syntax="editions",t){case"2023":e.edition=ie.Edition.EDITION_2023;break;default:throw new Error("Unsupported edition "+t)}}});var I5=p((Int,hLe)=>{hLe.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 x5=p((xnt,mLe)=>{mLe.exports={nested:{google:{nested:{protobuf:{nested:{SourceContext:{fields:{fileName:{type:"string",id:1}}}}}}}}}});var w5=p((wnt,_Le)=>{_Le.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 k5=p(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.addCommonProtos=po.loadProtosWithOptionsSync=po.loadProtosWithOptions=void 0;var L5=b("fs"),D5=b("path"),Mc=lS();function U5(t,e){let r=t.resolvePath;t.resolvePath=(o,s)=>{if(D5.isAbsolute(s))return s;for(let a of e){let i=D5.join(a,s);try{return L5.accessSync(i,L5.constants.R_OK),i}catch{continue}}return process.emitWarning(`${s} not found in any of the include paths ${e}`),r(o,s)}}async function gLe(t,e){let r=new Mc.Root;if(e=e||{},e.includeDirs){if(!Array.isArray(e.includeDirs))return Promise.reject(new Error("The includeDirs option must be an array"));U5(r,e.includeDirs)}let o=await r.load(t,e);return o.resolveAll(),o}po.loadProtosWithOptions=gLe;function ELe(t,e){let r=new Mc.Root;if(e=e||{},e.includeDirs){if(!Array.isArray(e.includeDirs))throw new Error("The includeDirs option must be an array");U5(r,e.includeDirs)}let o=r.loadSync(t,e);return o.resolveAll(),o}po.loadProtosWithOptionsSync=ELe;function SLe(){let t=I5(),e=GM(),r=x5(),o=w5();Mc.common("api",t.nested.google.nested.protobuf.nested),Mc.common("descriptor",e.nested.google.nested.protobuf.nested),Mc.common("source_context",r.nested.google.nested.protobuf.nested),Mc.common("type",o.nested.google.nested.protobuf.nested)}po.addCommonProtos=SLe});var B5=p((Ql,jM)=>{(function(t,e){function r(o){return o.default||o}typeof define=="function"&&define.amd?define([],function(){var o={};return e(o),r(o)}):typeof Ql=="object"?(e(Ql),typeof jM=="object"&&(jM.exports=r(Ql))):(function(){var o={};e(o),t.Long=r(o)})()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Ql,function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.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 r(I,_,U){this.low=I|0,this.high=_|0,this.unsigned=!!U}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0});function o(I){return(I&&I.__isLong__)===!0}function s(I){var _=Math.clz32(I&-I);return I?31-_:_}r.isLong=o;var a={},i={};function n(I,_){var U,ce,ae;return _?(I>>>=0,(ae=0<=I&&I<256)&&(ce=i[I],ce)?ce:(U=u(I,0,!0),ae&&(i[I]=U),U)):(I|=0,(ae=-128<=I&&I<128)&&(ce=a[I],ce)?ce:(U=u(I,I<0?-1:0,!1),ae&&(a[I]=U),U))}r.fromInt=n;function c(I,_){if(isNaN(I))return _?A:H;if(_){if(I<0)return A;if(I>=v)return te}else{if(I<=-O)return Z;if(I+1>=O)return oe}return I<0?c(-I,_).neg():u(I%S|0,I/S|0,_)}r.fromNumber=c;function u(I,_,U){return new r(I,_,U)}r.fromBits=u;var l=Math.pow;function d(I,_,U){if(I.length===0)throw Error("empty string");if(typeof _=="number"?(U=_,_=!1):_=!!_,I==="NaN"||I==="Infinity"||I==="+Infinity"||I==="-Infinity")return _?A:H;if(U=U||10,U<2||36<U)throw RangeError("radix");var ce;if((ce=I.indexOf("-"))>0)throw Error("interior hyphen");if(ce===0)return d(I.substring(1),_,U).neg();for(var ae=c(l(U,8)),Ee=H,De=0;De<I.length;De+=8){var Et=Math.min(8,I.length-De),xt=parseInt(I.substring(De,De+Et),U);if(Et<8){var Je=c(l(U,Et));Ee=Ee.mul(Je).add(c(xt))}else Ee=Ee.mul(ae),Ee=Ee.add(c(xt))}return Ee.unsigned=_,Ee}r.fromString=d;function h(I,_){return typeof I=="number"?c(I,_):typeof I=="string"?d(I,_):u(I.low,I.high,typeof _=="boolean"?_:I.unsigned)}r.fromValue=h;var g=65536,E=1<<24,S=g*g,v=S*S,O=v/2,x=n(E),H=n(0);r.ZERO=H;var A=n(0,!0);r.UZERO=A;var $=n(1);r.ONE=$;var z=n(1,!0);r.UONE=z;var Q=n(-1);r.NEG_ONE=Q;var oe=u(-1,2147483647,!1);r.MAX_VALUE=oe;var te=u(-1,-1,!0);r.MAX_UNSIGNED_VALUE=te;var Z=u(0,-2147483648,!1);r.MIN_VALUE=Z;var P=r.prototype;P.toInt=function(){return this.unsigned?this.low>>>0:this.low},P.toNumber=function(){return this.unsigned?(this.high>>>0)*S+(this.low>>>0):this.high*S+(this.low>>>0)},P.toString=function(_){if(_=_||10,_<2||36<_)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(Z)){var U=c(_),ce=this.div(U),ae=ce.mul(U).sub(this);return ce.toString(_)+ae.toInt().toString(_)}else return"-"+this.neg().toString(_);for(var Ee=c(l(_,6),this.unsigned),De=this,Et="";;){var xt=De.div(Ee),Je=De.sub(xt.mul(Ee)).toInt()>>>0,pe=Je.toString(_);if(De=xt,De.isZero())return pe+Et;for(;pe.length<6;)pe="0"+pe;Et=""+pe+Et}},P.getHighBits=function(){return this.high},P.getHighBitsUnsigned=function(){return this.high>>>0},P.getLowBits=function(){return this.low},P.getLowBitsUnsigned=function(){return this.low>>>0},P.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Z)?64:this.neg().getNumBitsAbs();for(var _=this.high!=0?this.high:this.low,U=31;U>0&&(_&1<<U)==0;U--);return this.high!=0?U+33:U+1},P.isSafeInteger=function(){var _=this.high>>21;return _?this.unsigned?!1:_===-1&&!(this.low===0&&this.high===-2097152):!0},P.isZero=function(){return this.high===0&&this.low===0},P.eqz=P.isZero,P.isNegative=function(){return!this.unsigned&&this.high<0},P.isPositive=function(){return this.unsigned||this.high>=0},P.isOdd=function(){return(this.low&1)===1},P.isEven=function(){return(this.low&1)===0},P.equals=function(_){return o(_)||(_=h(_)),this.unsigned!==_.unsigned&&this.high>>>31===1&&_.high>>>31===1?!1:this.high===_.high&&this.low===_.low},P.eq=P.equals,P.notEquals=function(_){return!this.eq(_)},P.neq=P.notEquals,P.ne=P.notEquals,P.lessThan=function(_){return this.comp(_)<0},P.lt=P.lessThan,P.lessThanOrEqual=function(_){return this.comp(_)<=0},P.lte=P.lessThanOrEqual,P.le=P.lessThanOrEqual,P.greaterThan=function(_){return this.comp(_)>0},P.gt=P.greaterThan,P.greaterThanOrEqual=function(_){return this.comp(_)>=0},P.gte=P.greaterThanOrEqual,P.ge=P.greaterThanOrEqual,P.compare=function(_){if(o(_)||(_=h(_)),this.eq(_))return 0;var U=this.isNegative(),ce=_.isNegative();return U&&!ce?-1:!U&&ce?1:this.unsigned?_.high>>>0>this.high>>>0||_.high===this.high&&_.low>>>0>this.low>>>0?-1:1:this.sub(_).isNegative()?-1:1},P.comp=P.compare,P.negate=function(){return!this.unsigned&&this.eq(Z)?Z:this.not().add($)},P.neg=P.negate,P.add=function(_){o(_)||(_=h(_));var U=this.high>>>16,ce=this.high&65535,ae=this.low>>>16,Ee=this.low&65535,De=_.high>>>16,Et=_.high&65535,xt=_.low>>>16,Je=_.low&65535,pe=0,wt=0,Ne=0,Lt=0;return Lt+=Ee+Je,Ne+=Lt>>>16,Lt&=65535,Ne+=ae+xt,wt+=Ne>>>16,Ne&=65535,wt+=ce+Et,pe+=wt>>>16,wt&=65535,pe+=U+De,pe&=65535,u(Ne<<16|Lt,pe<<16|wt,this.unsigned)},P.subtract=function(_){return o(_)||(_=h(_)),this.add(_.neg())},P.sub=P.subtract,P.multiply=function(_){if(this.isZero())return this;if(o(_)||(_=h(_)),e){var U=e.mul(this.low,this.high,_.low,_.high);return u(U,e.get_high(),this.unsigned)}if(_.isZero())return this.unsigned?A:H;if(this.eq(Z))return _.isOdd()?Z:H;if(_.eq(Z))return this.isOdd()?Z:H;if(this.isNegative())return _.isNegative()?this.neg().mul(_.neg()):this.neg().mul(_).neg();if(_.isNegative())return this.mul(_.neg()).neg();if(this.lt(x)&&_.lt(x))return c(this.toNumber()*_.toNumber(),this.unsigned);var ce=this.high>>>16,ae=this.high&65535,Ee=this.low>>>16,De=this.low&65535,Et=_.high>>>16,xt=_.high&65535,Je=_.low>>>16,pe=_.low&65535,wt=0,Ne=0,Lt=0,ui=0;return ui+=De*pe,Lt+=ui>>>16,ui&=65535,Lt+=Ee*pe,Ne+=Lt>>>16,Lt&=65535,Lt+=De*Je,Ne+=Lt>>>16,Lt&=65535,Ne+=ae*pe,wt+=Ne>>>16,Ne&=65535,Ne+=Ee*Je,wt+=Ne>>>16,Ne&=65535,Ne+=De*xt,wt+=Ne>>>16,Ne&=65535,wt+=ce*pe+ae*Je+Ee*xt+De*Et,wt&=65535,u(Lt<<16|ui,wt<<16|Ne,this.unsigned)},P.mul=P.multiply,P.divide=function(_){if(o(_)||(_=h(_)),_.isZero())throw Error("division by zero");if(e){if(!this.unsigned&&this.high===-2147483648&&_.low===-1&&_.high===-1)return this;var U=(this.unsigned?e.div_u:e.div_s)(this.low,this.high,_.low,_.high);return u(U,e.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?A:H;var ce,ae,Ee;if(this.unsigned){if(_.unsigned||(_=_.toUnsigned()),_.gt(this))return A;if(_.gt(this.shru(1)))return z;Ee=A}else{if(this.eq(Z)){if(_.eq($)||_.eq(Q))return Z;if(_.eq(Z))return $;var De=this.shr(1);return ce=De.div(_).shl(1),ce.eq(H)?_.isNegative()?$:Q:(ae=this.sub(_.mul(ce)),Ee=ce.add(ae.div(_)),Ee)}else if(_.eq(Z))return this.unsigned?A:H;if(this.isNegative())return _.isNegative()?this.neg().div(_.neg()):this.neg().div(_).neg();if(_.isNegative())return this.div(_.neg()).neg();Ee=H}for(ae=this;ae.gte(_);){ce=Math.max(1,Math.floor(ae.toNumber()/_.toNumber()));for(var Et=Math.ceil(Math.log(ce)/Math.LN2),xt=Et<=48?1:l(2,Et-48),Je=c(ce),pe=Je.mul(_);pe.isNegative()||pe.gt(ae);)ce-=xt,Je=c(ce,this.unsigned),pe=Je.mul(_);Je.isZero()&&(Je=$),Ee=Ee.add(Je),ae=ae.sub(pe)}return Ee},P.div=P.divide,P.modulo=function(_){if(o(_)||(_=h(_)),e){var U=(this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,_.low,_.high);return u(U,e.get_high(),this.unsigned)}return this.sub(this.div(_).mul(_))},P.mod=P.modulo,P.rem=P.modulo,P.not=function(){return u(~this.low,~this.high,this.unsigned)},P.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},P.clz=P.countLeadingZeros,P.countTrailingZeros=function(){return this.low?s(this.low):s(this.high)+32},P.ctz=P.countTrailingZeros,P.and=function(_){return o(_)||(_=h(_)),u(this.low&_.low,this.high&_.high,this.unsigned)},P.or=function(_){return o(_)||(_=h(_)),u(this.low|_.low,this.high|_.high,this.unsigned)},P.xor=function(_){return o(_)||(_=h(_)),u(this.low^_.low,this.high^_.high,this.unsigned)},P.shiftLeft=function(_){return o(_)&&(_=_.toInt()),(_&=63)===0?this:_<32?u(this.low<<_,this.high<<_|this.low>>>32-_,this.unsigned):u(0,this.low<<_-32,this.unsigned)},P.shl=P.shiftLeft,P.shiftRight=function(_){return o(_)&&(_=_.toInt()),(_&=63)===0?this:_<32?u(this.low>>>_|this.high<<32-_,this.high>>_,this.unsigned):u(this.high>>_-32,this.high>=0?0:-1,this.unsigned)},P.shr=P.shiftRight,P.shiftRightUnsigned=function(_){return o(_)&&(_=_.toInt()),(_&=63)===0?this:_<32?u(this.low>>>_|this.high<<32-_,this.high>>>_,this.unsigned):_===32?u(this.high,0,this.unsigned):u(this.high>>>_-32,0,this.unsigned)},P.shru=P.shiftRightUnsigned,P.shr_u=P.shiftRightUnsigned,P.rotateLeft=function(_){var U;return o(_)&&(_=_.toInt()),(_&=63)===0?this:_===32?u(this.high,this.low,this.unsigned):_<32?(U=32-_,u(this.low<<_|this.high>>>U,this.high<<_|this.low>>>U,this.unsigned)):(_-=32,U=32-_,u(this.high<<_|this.low>>>U,this.low<<_|this.high>>>U,this.unsigned))},P.rotl=P.rotateLeft,P.rotateRight=function(_){var U;return o(_)&&(_=_.toInt()),(_&=63)===0?this:_===32?u(this.high,this.low,this.unsigned):_<32?(U=32-_,u(this.high<<U|this.low>>>_,this.low<<U|this.high>>>_,this.unsigned)):(_-=32,U=32-_,u(this.low<<U|this.high>>>_,this.high<<U|this.low>>>_,this.unsigned))},P.rotr=P.rotateRight,P.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},P.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},P.toBytes=function(_){return _?this.toBytesLE():this.toBytesBE()},P.toBytesLE=function(){var _=this.high,U=this.low;return[U&255,U>>>8&255,U>>>16&255,U>>>24,_&255,_>>>8&255,_>>>16&255,_>>>24]},P.toBytesBE=function(){var _=this.high,U=this.low;return[_>>>24,_>>>16&255,_>>>8&255,_&255,U>>>24,U>>>16&255,U>>>8&255,U&255]},r.fromBytes=function(_,U,ce){return ce?r.fromBytesLE(_,U):r.fromBytesBE(_,U)},r.fromBytesLE=function(_,U){return new r(_[0]|_[1]<<8|_[2]<<16|_[3]<<24,_[4]|_[5]<<8|_[6]<<16|_[7]<<24,U)},r.fromBytesBE=function(_,U){return new r(_[4]<<24|_[5]<<16|_[6]<<8|_[7],_[0]<<24|_[1]<<16|_[2]<<8|_[3],U)},typeof BigInt=="function"&&(r.fromBigInt=function(_,U){var ce=Number(BigInt.asIntN(32,_)),ae=Number(BigInt.asIntN(32,_>>BigInt(32)));return u(ce,ae,U)},r.fromValue=function(_,U){return typeof _=="bigint"?r.fromBigInt(_,U):h(_,U)},P.toBigInt=function(){var _=BigInt(this.low>>>0),U=BigInt(this.unsigned?this.high>>>0:this.high);return U<<BigInt(32)|_});var It=t.default=r})});var KM=p(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.loadFileDescriptorSetFromObject=Ke.loadFileDescriptorSetFromBuffer=Ke.fromJSON=Ke.loadSync=Ke.load=Ke.IdempotencyLevel=Ke.isAnyExtension=Ke.Long=void 0;var TLe=yX(),Jn=lS(),YM=M5(),WM=k5(),yLe=B5();Ke.Long=yLe;function vLe(t){return"@type"in t&&typeof t["@type"]=="string"}Ke.isAnyExtension=vLe;var F5;(function(t){t.IDEMPOTENCY_UNKNOWN="IDEMPOTENCY_UNKNOWN",t.NO_SIDE_EFFECTS="NO_SIDE_EFFECTS",t.IDEMPOTENT="IDEMPOTENT"})(F5=Ke.IdempotencyLevel||(Ke.IdempotencyLevel={}));var V5={longs:String,enums:String,bytes:String,defaults:!0,oneofs:!0,json:!0};function ALe(t,e){return t===""?e:t+"."+e}function OLe(t){return t instanceof Jn.Service||t instanceof Jn.Type||t instanceof Jn.Enum}function bLe(t){return t instanceof Jn.Namespace||t instanceof Jn.Root}function G5(t,e){let r=ALe(e,t.name);return OLe(t)?[[r,t]]:bLe(t)&&typeof t.nested<"u"?Object.keys(t.nested).map(o=>G5(t.nested[o],r)).reduce((o,s)=>o.concat(s),[]):[]}function HM(t,e){return function(o){return t.toObject(t.decode(o),e)}}function zM(t){return function(r){if(Array.isArray(r))throw new Error(`Failed to serialize message: expected object with ${t.name} structure, got array instead`);let o=t.fromObject(r);return t.encode(o).finish()}}function RLe(t){return(t||[]).reduce((e,r)=>{for(let[o,s]of Object.entries(r))switch(o){case"uninterpreted_option":e.uninterpreted_option.push(r.uninterpreted_option);break;default:e[o]=s}return e},{deprecated:!1,idempotency_level:F5.IDEMPOTENCY_UNKNOWN,uninterpreted_option:[]})}function PLe(t,e,r,o){let s=t.resolvedRequestType,a=t.resolvedResponseType;return{path:"/"+e+"/"+t.name,requestStream:!!t.requestStream,responseStream:!!t.responseStream,requestSerialize:zM(s),requestDeserialize:HM(s,r),responseSerialize:zM(a),responseDeserialize:HM(a,r),originalName:TLe(t.name),requestType:$M(s,r,o),responseType:$M(a,r,o),options:RLe(t.parsedOptions)}}function CLe(t,e,r,o){let s={};for(let a of t.methodsArray)s[a.name]=PLe(a,e,r,o);return s}function $M(t,e,r){let o=t.toDescriptor("proto3");return{format:"Protocol Buffer 3 DescriptorProto",type:o.$type.toObject(o,V5),fileDescriptorProtos:r,serialize:zM(t),deserialize:HM(t,e)}}function NLe(t,e){let r=t.toDescriptor("proto3");return{format:"Protocol Buffer 3 EnumDescriptorProto",type:r.$type.toObject(r,V5),fileDescriptorProtos:e}}function MLe(t,e,r,o){if(t instanceof Jn.Service)return CLe(t,e,r,o);if(t instanceof Jn.Type)return $M(t,r,o);if(t instanceof Jn.Enum)return NLe(t,o);throw new Error("Type mismatch in reflection object handling")}function fS(t,e){let r={};t.resolveAll();let s=t.toDescriptor("proto3").file.map(a=>Buffer.from(YM.FileDescriptorProto.encode(a).finish()));for(let[a,i]of G5(t,""))r[a]=MLe(i,a,e,s);return r}function q5(t,e){e=e||{};let r=Jn.Root.fromDescriptor(t);return r.resolveAll(),fS(r,e)}function ILe(t,e){return(0,WM.loadProtosWithOptions)(t,e).then(r=>fS(r,e))}Ke.load=ILe;function xLe(t,e){let r=(0,WM.loadProtosWithOptionsSync)(t,e);return fS(r,e)}Ke.loadSync=xLe;function wLe(t,e){e=e||{};let r=Jn.Root.fromJSON(t);return r.resolveAll(),fS(r,e)}Ke.fromJSON=wLe;function LLe(t,e){let r=YM.FileDescriptorSet.decode(t);return q5(r,e)}Ke.loadFileDescriptorSetFromBuffer=LLe;function DLe(t,e){let r=YM.FileDescriptorSet.fromObject(t);return q5(r,e)}Ke.loadFileDescriptorSetFromObject=DLe;(0,WM.addCommonProtos)()});var fo=p(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.registerChannelzSocket=be.registerChannelzServer=be.registerChannelzSubchannel=be.registerChannelzChannel=be.ChannelzCallTrackerStub=be.ChannelzCallTracker=be.ChannelzChildrenTrackerStub=be.ChannelzChildrenTracker=be.ChannelzTrace=be.ChannelzTraceStub=void 0;be.unregisterChannelzRef=VLe;be.getChannelzHandlers=X5;be.getChannelzServiceDefinition=J5;be.setup=JLe;var mS=b("net"),vs=H8(),Zl=Vt(),ed=se(),ULe=Qt(),kLe=BE(),BLe=jE();function XM(t){return{channel_id:t.id,name:t.name}}function tI(t){return{subchannel_id:t.id,name:t.name}}function FLe(t){return{server_id:t.id}}function ES(t){return{socket_id:t.id,name:t.name}}var j5=32,rI=100,JM=class{constructor(){this.events=[],this.creationTimestamp=new Date,this.eventsLogged=0}addTrace(){}getTraceMessage(){return{creation_timestamp:Qn(this.creationTimestamp),num_events_logged:this.eventsLogged,events:[]}}};be.ChannelzTraceStub=JM;var QM=class{constructor(){this.events=[],this.eventsLogged=0,this.creationTimestamp=new Date}addTrace(e,r,o){let s=new Date;this.events.push({description:r,severity:e,timestamp:s,childChannel:o?.kind==="channel"?o:void 0,childSubchannel:o?.kind==="subchannel"?o:void 0}),this.events.length>=j5*2&&(this.events=this.events.slice(j5)),this.eventsLogged+=1}getTraceMessage(){return{creation_timestamp:Qn(this.creationTimestamp),num_events_logged:this.eventsLogged,events:this.events.map(e=>({description:e.description,severity:e.severity,timestamp:Qn(e.timestamp),channel_ref:e.childChannel?XM(e.childChannel):null,subchannel_ref:e.childSubchannel?tI(e.childSubchannel):null}))}}};be.ChannelzTrace=QM;var _S=class{constructor(){this.channelChildren=new vs.OrderedMap,this.subchannelChildren=new vs.OrderedMap,this.socketChildren=new vs.OrderedMap,this.trackerMap={channel:this.channelChildren,subchannel:this.subchannelChildren,socket:this.socketChildren}}refChild(e){let r=this.trackerMap[e.kind],o=r.find(e.id);o.equals(r.end())?r.setElement(e.id,{ref:e,count:1},o):o.pointer[1].count+=1}unrefChild(e){let r=this.trackerMap[e.kind],o=r.getElementByKey(e.id);o!==void 0&&(o.count-=1,o.count===0&&r.eraseElementByKey(e.id))}getChildLists(){return{channels:this.channelChildren,subchannels:this.subchannelChildren,sockets:this.socketChildren}}};be.ChannelzChildrenTracker=_S;var ZM=class extends _S{refChild(){}unrefChild(){}};be.ChannelzChildrenTrackerStub=ZM;var gS=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}};be.ChannelzCallTracker=gS;var eI=class extends gS{addCallStarted(){}addCallSucceeded(){}addCallFailed(){}};be.ChannelzCallTrackerStub=eI;var Mi={channel:new vs.OrderedMap,subchannel:new vs.OrderedMap,server:new vs.OrderedMap,socket:new vs.OrderedMap},SS=t=>{let e=1;function r(){return e++}let o=Mi[t];return(s,a,i)=>{let n=r(),c={id:n,name:s,kind:t};return i&&o.setElement(n,{ref:c,getInfo:a}),c}};be.registerChannelzChannel=SS("channel");be.registerChannelzSubchannel=SS("subchannel");be.registerChannelzServer=SS("server");be.registerChannelzSocket=SS("socket");function VLe(t){Mi[t.kind].eraseElementByKey(t.id)}function GLe(t){let e=Number.parseInt(t,16);return[e/256|0,e%256]}function H5(t){if(t==="")return[];let e=t.split(":").map(o=>GLe(o));return[].concat(...e)}function qLe(t){return(0,mS.isIPv6)(t)&&t.toLowerCase().startsWith("::ffff:")&&(0,mS.isIPv4)(t.substring(7))}function z5(t){return Buffer.from(Uint8Array.from(t.split(".").map(e=>Number.parseInt(e))))}function jLe(t){if((0,mS.isIPv4)(t))return z5(t);if(qLe(t))return z5(t.substring(7));if((0,mS.isIPv6)(t)){let e,r,o=t.indexOf("::");o===-1?(e=t,r=""):(e=t.substring(0,o),r=t.substring(o+2));let s=Buffer.from(H5(e)),a=Buffer.from(H5(r)),i=Buffer.alloc(16-s.length-a.length,0);return Buffer.concat([s,i,a])}else return null}function Y5(t){switch(t){case Zl.ConnectivityState.CONNECTING:return{state:"CONNECTING"};case Zl.ConnectivityState.IDLE:return{state:"IDLE"};case Zl.ConnectivityState.READY:return{state:"READY"};case Zl.ConnectivityState.SHUTDOWN:return{state:"SHUTDOWN"};case Zl.ConnectivityState.TRANSIENT_FAILURE:return{state:"TRANSIENT_FAILURE"};default:return{state:"UNKNOWN"}}}function Qn(t){if(!t)return null;let e=t.getTime();return{seconds:e/1e3|0,nanos:e%1e3*1e6}}function W5(t){let e=t.getInfo(),r=[],o=[];return e.children.channels.forEach(s=>{r.push(XM(s[1].ref))}),e.children.subchannels.forEach(s=>{o.push(tI(s[1].ref))}),{ref:XM(t.ref),data:{target:e.target,state:Y5(e.state),calls_started:e.callTracker.callsStarted,calls_succeeded:e.callTracker.callsSucceeded,calls_failed:e.callTracker.callsFailed,last_call_started_timestamp:Qn(e.callTracker.lastCallStartedTimestamp),trace:e.trace.getTraceMessage()},channel_ref:r,subchannel_ref:o}}function HLe(t,e){let r=parseInt(t.request.channel_id,10),o=Mi.channel.getElementByKey(r);if(o===void 0){e({code:ed.Status.NOT_FOUND,details:"No channel data found for id "+r});return}e(null,{channel:W5(o)})}function zLe(t,e){let r=parseInt(t.request.max_results,10)||rI,o=[],s=parseInt(t.request.start_channel_id,10),a=Mi.channel,i;for(i=a.lowerBound(s);!i.equals(a.end())&&o.length<r;i=i.next())o.push(W5(i.pointer[1]));e(null,{channel:o,end:i.equals(a.end())})}function K5(t){let e=t.getInfo(),r=[];return e.listenerChildren.sockets.forEach(o=>{r.push(ES(o[1].ref))}),{ref:FLe(t.ref),data:{calls_started:e.callTracker.callsStarted,calls_succeeded:e.callTracker.callsSucceeded,calls_failed:e.callTracker.callsFailed,last_call_started_timestamp:Qn(e.callTracker.lastCallStartedTimestamp),trace:e.trace.getTraceMessage()},listen_socket:r}}function $Le(t,e){let r=parseInt(t.request.server_id,10),s=Mi.server.getElementByKey(r);if(s===void 0){e({code:ed.Status.NOT_FOUND,details:"No server data found for id "+r});return}e(null,{server:K5(s)})}function YLe(t,e){let r=parseInt(t.request.max_results,10)||rI,o=parseInt(t.request.start_server_id,10),s=Mi.server,a=[],i;for(i=s.lowerBound(o);!i.equals(s.end())&&a.length<r;i=i.next())a.push(K5(i.pointer[1]));e(null,{server:a,end:i.equals(s.end())})}function WLe(t,e){let r=parseInt(t.request.subchannel_id,10),o=Mi.subchannel.getElementByKey(r);if(o===void 0){e({code:ed.Status.NOT_FOUND,details:"No subchannel data found for id "+r});return}let s=o.getInfo(),a=[];s.children.sockets.forEach(n=>{a.push(ES(n[1].ref))});let i={ref:tI(o.ref),data:{target:s.target,state:Y5(s.state),calls_started:s.callTracker.callsStarted,calls_succeeded:s.callTracker.callsSucceeded,calls_failed:s.callTracker.callsFailed,last_call_started_timestamp:Qn(s.callTracker.lastCallStartedTimestamp),trace:s.trace.getTraceMessage()},socket_ref:a};e(null,{subchannel:i})}function $5(t){var e;return(0,ULe.isTcpSubchannelAddress)(t)?{address:"tcpip_address",tcpip_address:{ip_address:(e=jLe(t.host))!==null&&e!==void 0?e:void 0,port:t.port}}:{address:"uds_address",uds_address:{filename:t.path}}}function KLe(t,e){var r,o,s,a,i;let n=parseInt(t.request.socket_id,10),c=Mi.socket.getElementByKey(n);if(c===void 0){e({code:ed.Status.NOT_FOUND,details:"No socket data found for id "+n});return}let u=c.getInfo(),l=u.security?{model:"tls",tls:{cipher_suite:u.security.cipherSuiteStandardName?"standard_name":"other_name",standard_name:(r=u.security.cipherSuiteStandardName)!==null&&r!==void 0?r:void 0,other_name:(o=u.security.cipherSuiteOtherName)!==null&&o!==void 0?o:void 0,local_certificate:(s=u.security.localCertificate)!==null&&s!==void 0?s:void 0,remote_certificate:(a=u.security.remoteCertificate)!==null&&a!==void 0?a:void 0}}:null,d={ref:ES(c.ref),local:u.localAddress?$5(u.localAddress):null,remote:u.remoteAddress?$5(u.remoteAddress):null,remote_name:(i=u.remoteName)!==null&&i!==void 0?i:void 0,security:l,data:{keep_alives_sent:u.keepAlivesSent,streams_started:u.streamsStarted,streams_succeeded:u.streamsSucceeded,streams_failed:u.streamsFailed,last_local_stream_created_timestamp:Qn(u.lastLocalStreamCreatedTimestamp),last_remote_stream_created_timestamp:Qn(u.lastRemoteStreamCreatedTimestamp),messages_received:u.messagesReceived,messages_sent:u.messagesSent,last_message_received_timestamp:Qn(u.lastMessageReceivedTimestamp),last_message_sent_timestamp:Qn(u.lastMessageSentTimestamp),local_flow_control_window:u.localFlowControlWindow?{value:u.localFlowControlWindow}:null,remote_flow_control_window:u.remoteFlowControlWindow?{value:u.remoteFlowControlWindow}:null}};e(null,{socket:d})}function XLe(t,e){let r=parseInt(t.request.server_id,10),o=Mi.server.getElementByKey(r);if(o===void 0){e({code:ed.Status.NOT_FOUND,details:"No server data found for id "+r});return}let s=parseInt(t.request.start_socket_id,10),a=parseInt(t.request.max_results,10)||rI,n=o.getInfo().sessionChildren.sockets,c=[],u;for(u=n.lowerBound(s);!u.equals(n.end())&&c.length<a;u=u.next())c.push(ES(u.pointer[1].ref));e(null,{socket_ref:c,end:u.equals(n.end())})}function X5(){return{GetChannel:HLe,GetTopChannels:zLe,GetServer:$Le,GetServers:YLe,GetSubchannel:WLe,GetSocket:KLe,GetServerSockets:XLe}}var hS=null;function J5(){if(hS)return hS;let t=KM().loadSync,e=t("channelz.proto",{keepCase:!0,longs:String,enums:String,defaults:!0,oneofs:!0,includeDirs:[`${__dirname}/../../proto`]});return hS=(0,BLe.loadPackageDefinition)(e).grpc.channelz.v1.Channelz.service,hS}function JLe(){(0,kLe.registerAdminService)(J5,X5)}});var TS=p(nI=>{"use strict";Object.defineProperty(nI,"__esModule",{value:!0});nI.getNextCallNumber=ZLe;var QLe=0;function ZLe(){return QLe++}});var iI=p(yS=>{"use strict";Object.defineProperty(yS,"__esModule",{value:!0});yS.CompressionAlgorithms=void 0;var Q5;(function(t){t[t.identity=0]="identity",t[t.deflate=1]="deflate",t[t.gzip=2]="gzip"})(Q5||(yS.CompressionAlgorithms=Q5={}))});var sI=p(vS=>{"use strict";Object.defineProperty(vS,"__esModule",{value:!0});vS.BaseFilter=void 0;var oI=class{async sendMetadata(e){return e}receiveMetadata(e){return e}async sendMessage(e){return e}async receiveMessage(e){return e}receiveTrailers(e){return e}};vS.BaseFilter=oI});var dI=p(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});wc.CompressionFilterFactory=wc.CompressionFilter=void 0;var AS=b("zlib"),e9=iI(),Ic=se(),eDe=sI(),tDe=Se(),rDe=t=>typeof t=="number"&&typeof e9.CompressionAlgorithms[t]=="string",xc=class{async writeMessage(e,r){let o=e;r&&(o=await this.compressMessage(o));let s=Buffer.allocUnsafe(o.length+5);return s.writeUInt8(r?1:0,0),s.writeUInt32BE(o.length,1),o.copy(s,5),s}async readMessage(e){let r=e.readUInt8(0)===1,o=e.slice(5);return r&&(o=await this.decompressMessage(o)),o}},As=class extends xc{async compressMessage(e){return e}async writeMessage(e,r){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'))}},aI=class extends xc{constructor(e){super(),this.maxRecvMessageLength=e}compressMessage(e){return new Promise((r,o)=>{AS.deflate(e,(s,a)=>{s?o(s):r(a)})})}decompressMessage(e){return new Promise((r,o)=>{let s=0,a=[],i=AS.createInflate();i.on("data",n=>{a.push(n),s+=n.byteLength,this.maxRecvMessageLength!==-1&&s>this.maxRecvMessageLength&&(i.destroy(),o({code:Ic.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxRecvMessageLength}`}))}),i.on("end",()=>{r(Buffer.concat(a))}),i.write(e),i.end()})}},cI=class extends xc{constructor(e){super(),this.maxRecvMessageLength=e}compressMessage(e){return new Promise((r,o)=>{AS.gzip(e,(s,a)=>{s?o(s):r(a)})})}decompressMessage(e){return new Promise((r,o)=>{let s=0,a=[],i=AS.createGunzip();i.on("data",n=>{a.push(n),s+=n.byteLength,this.maxRecvMessageLength!==-1&&s>this.maxRecvMessageLength&&(i.destroy(),o({code:Ic.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxRecvMessageLength}`}))}),i.on("end",()=>{r(Buffer.concat(a))}),i.write(e),i.end()})}},uI=class extends xc{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 Z5(t,e){switch(t){case"identity":return new As;case"deflate":return new aI(e);case"gzip":return new cI(e);default:return new uI(t)}}var OS=class extends eDe.BaseFilter{constructor(e,r){var o,s,a;super(),this.sharedFilterConfig=r,this.sendCompression=new As,this.receiveCompression=new As,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:Ic.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH,this.maxSendMessageLength=(s=e["grpc.max_send_message_length"])!==null&&s!==void 0?s:Ic.DEFAULT_MAX_SEND_MESSAGE_LENGTH,i!==void 0)if(rDe(i)){let n=e9.CompressionAlgorithms[i],c=(a=r.serverSupportedEncodingHeader)===null||a===void 0?void 0:a.split(",");(!c||c.includes(n))&&(this.currentCompressionAlgorithm=n,this.sendCompression=Z5(this.currentCompressionAlgorithm,-1))}else tDe.log(Ic.LogVerbosity.ERROR,`Invalid value provided for grpc.default_compression_algorithm option: ${i}`)}async sendMetadata(e){let r=await e;return r.set("grpc-accept-encoding","identity,deflate,gzip"),r.set("accept-encoding","identity"),this.currentCompressionAlgorithm==="identity"?r.remove("grpc-encoding"):r.set("grpc-encoding",this.currentCompressionAlgorithm),r}receiveMetadata(e){let r=e.get("grpc-encoding");if(r.length>0){let s=r[0];typeof s=="string"&&(this.receiveCompression=Z5(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 As,this.currentCompressionAlgorithm="identity")),e.remove("grpc-accept-encoding"),e}async sendMessage(e){var r;let o=await e;if(this.maxSendMessageLength!==-1&&o.message.length>this.maxSendMessageLength)throw{code:Ic.Status.RESOURCE_EXHAUSTED,details:`Attempted to send message with a size larger than ${this.maxSendMessageLength}`};let s;return this.sendCompression instanceof As?s=!1:s=(((r=o.flags)!==null&&r!==void 0?r:0)&2)===0,{message:await this.sendCompression.writeMessage(o.message,s),flags:o.flags}}async receiveMessage(e){return this.receiveCompression.readMessage(await e)}};wc.CompressionFilter=OS;var lI=class{constructor(e,r){this.options=r,this.sharedFilterConfig={}}createFilter(){return new OS(this.options,this.sharedFilterConfig)}};wc.CompressionFilterFactory=lI});var td=p(pI=>{"use strict";Object.defineProperty(pI,"__esModule",{value:!0});pI.restrictControlPlaneStatusCode=iDe;var Zn=se(),nDe=[Zn.Status.OK,Zn.Status.INVALID_ARGUMENT,Zn.Status.NOT_FOUND,Zn.Status.ALREADY_EXISTS,Zn.Status.FAILED_PRECONDITION,Zn.Status.ABORTED,Zn.Status.OUT_OF_RANGE,Zn.Status.DATA_LOSS];function iDe(t,e){return nDe.includes(t)?{code:Zn.Status.INTERNAL,details:`Invalid status from control plane: ${t} ${Zn.Status[t]} ${e}`}:{code:t,details:e}}});var Lc=p(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});Os.minDeadline=oDe;Os.getDeadlineTimeoutString=aDe;Os.getRelativeTimeout=uDe;Os.deadlineToString=lDe;Os.formatDateDifference=dDe;function oDe(...t){let e=1/0;for(let r of t){let o=r instanceof Date?r.getTime():r;o<e&&(e=o)}return e}var sDe=[["m",1],["S",1e3],["M",60*1e3],["H",3600*1e3]];function aDe(t){let e=new Date().getTime();t instanceof Date&&(t=t.getTime());let r=Math.max(t-e,0);for(let[o,s]of sDe){let a=r/s;if(a<1e8)return String(Math.ceil(a))+o}throw new Error("Deadline is too far in the future")}var cDe=2147483647;function uDe(t){let e=t instanceof Date?t.getTime():t,r=new Date().getTime(),o=e-r;return o<0?0:o>cDe?1/0:o}function lDe(t){if(t instanceof Date)return t.toISOString();{let e=new Date(t);return Number.isNaN(e.getTime())?""+t:e.toISOString()}}function dDe(t,e){return((e.getTime()-t.getTime())/1e3).toFixed(3)+"s"}});var RS=p(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});Dc.FilterStackFactory=Dc.FilterStack=void 0;var bS=class{constructor(e){this.filters=e}sendMetadata(e){let r=e;for(let o=0;o<this.filters.length;o++)r=this.filters[o].sendMetadata(r);return r}receiveMetadata(e){let r=e;for(let o=this.filters.length-1;o>=0;o--)r=this.filters[o].receiveMetadata(r);return r}sendMessage(e){let r=e;for(let o=0;o<this.filters.length;o++)r=this.filters[o].sendMessage(r);return r}receiveMessage(e){let r=e;for(let o=this.filters.length-1;o>=0;o--)r=this.filters[o].receiveMessage(r);return r}receiveTrailers(e){let r=e;for(let o=this.filters.length-1;o>=0;o--)r=this.filters[o].receiveTrailers(r);return r}push(e){this.filters.unshift(...e)}getFilters(){return this.filters}};Dc.FilterStack=bS;var fI=class t{constructor(e){this.factories=e}push(e){this.factories.unshift(...e)}clone(){return new t([...this.factories])}createFilter(){return new bS(this.factories.map(e=>e.createFilter()))}};Dc.FilterStackFactory=fI});var t9=p(CS=>{"use strict";Object.defineProperty(CS,"__esModule",{value:!0});CS.SingleSubchannelChannel=void 0;var pDe=TS(),rd=fo(),fDe=dI(),hDe=Vt(),nd=se(),mDe=td(),_De=Lc(),gDe=RS(),hI=it(),EDe=Yr(),PS=Ft(),mI=class{constructor(e,r,o,s,a){var i,n;this.subchannel=e,this.method=r,this.options=s,this.callNumber=a,this.childCall=null,this.pendingMessage=null,this.readPending=!1,this.halfClosePending=!1,this.pendingStatus=null,this.readFilterPending=!1,this.writeFilterPending=!1;let c=this.method.split("/"),u="";c.length>=2&&(u=c[1]);let l=(n=(i=(0,PS.splitHostPort)(this.options.host))===null||i===void 0?void 0:i.host)!==null&&n!==void 0?n:"localhost";this.serviceUrl=`https://${l}/${u}`;let d=(0,_De.getRelativeTimeout)(s.deadline);d!==1/0&&(d<=0?this.cancelWithStatus(nd.Status.DEADLINE_EXCEEDED,"Deadline exceeded"):setTimeout(()=>{this.cancelWithStatus(nd.Status.DEADLINE_EXCEEDED,"Deadline exceeded")},d)),this.filterStack=o.createFilter()}cancelWithStatus(e,r){this.childCall?this.childCall.cancelWithStatus(e,r):this.pendingStatus={code:e,details:r,metadata:new hI.Metadata}}getPeer(){var e,r;return(r=(e=this.childCall)===null||e===void 0?void 0:e.getPeer())!==null&&r!==void 0?r:this.subchannel.getAddress()}async start(e,r){if(this.pendingStatus){r.onReceiveStatus(this.pendingStatus);return}if(this.subchannel.getConnectivityState()!==hDe.ConnectivityState.READY){r.onReceiveStatus({code:nd.Status.UNAVAILABLE,details:"Subchannel not ready",metadata:new hI.Metadata});return}let o=await this.filterStack.sendMetadata(Promise.resolve(e)),s;try{s=await this.subchannel.getCallCredentials().generateMetadata({method_name:this.method,service_url:this.serviceUrl})}catch(i){let n=i,{code:c,details:u}=(0,mDe.restrictControlPlaneStatusCode)(typeof n.code=="number"?n.code:nd.Status.UNKNOWN,`Getting metadata from plugin failed with error: ${n.message}`);r.onReceiveStatus({code:c,details:u,metadata:new hI.Metadata});return}s.merge(o);let a={onReceiveMetadata:async i=>{r.onReceiveMetadata(await this.filterStack.receiveMetadata(i))},onReceiveMessage:async i=>{this.readFilterPending=!0;let n=await this.filterStack.receiveMessage(i);this.readFilterPending=!1,r.onReceiveMessage(n),this.pendingStatus&&r.onReceiveStatus(this.pendingStatus)},onReceiveStatus:async i=>{let n=await this.filterStack.receiveTrailers(i);this.readFilterPending?this.pendingStatus=n:r.onReceiveStatus(n)}};this.childCall=this.subchannel.createCall(s,this.options.host,this.method,a),this.readPending&&this.childCall.startRead(),this.pendingMessage&&this.childCall.sendMessageWithContext(this.pendingMessage.context,this.pendingMessage.message),this.halfClosePending&&!this.writeFilterPending&&this.childCall.halfClose()}async sendMessageWithContext(e,r){this.writeFilterPending=!0;let o=await this.filterStack.sendMessage(Promise.resolve({message:r,flags:e.flags}));this.writeFilterPending=!1,this.childCall?(this.childCall.sendMessageWithContext(e,o.message),this.halfClosePending&&this.childCall.halfClose()):this.pendingMessage={context:e,message:o.message}}startRead(){this.childCall?this.childCall.startRead():this.readPending=!0}halfClose(){this.childCall&&!this.writeFilterPending?this.childCall.halfClose():this.halfClosePending=!0}getCallNumber(){return this.callNumber}setCredentials(e){throw new Error("Method not implemented.")}getAuthContext(){return this.childCall?this.childCall.getAuthContext():null}},_I=class{constructor(e,r,o){this.subchannel=e,this.target=r,this.channelzEnabled=!1,this.channelzTrace=new rd.ChannelzTrace,this.callTracker=new rd.ChannelzCallTracker,this.childrenTracker=new rd.ChannelzChildrenTracker,this.channelzEnabled=o["grpc.enable_channelz"]!==0,this.channelzRef=(0,rd.registerChannelzChannel)((0,PS.uriToString)(r),()=>({target:`${(0,PS.uriToString)(r)} (${e.getAddress()})`,state:this.subchannel.getConnectivityState(),trace:this.channelzTrace,callTracker:this.callTracker,children:this.childrenTracker.getChildLists()}),this.channelzEnabled),this.channelzEnabled&&this.childrenTracker.refChild(e.getChannelzRef()),this.filterStackFactory=new gDe.FilterStackFactory([new fDe.CompressionFilterFactory(this,o)])}close(){this.channelzEnabled&&this.childrenTracker.unrefChild(this.subchannel.getChannelzRef()),(0,rd.unregisterChannelzRef)(this.channelzRef)}getTarget(){return(0,PS.uriToString)(this.target)}getConnectivityState(e){throw new Error("Method not implemented.")}watchConnectivityState(e,r,o){throw new Error("Method not implemented.")}getChannelzRef(){return this.channelzRef}createCall(e,r){let o={deadline:r,host:(0,EDe.getDefaultAuthority)(this.target),flags:nd.Propagate.DEFAULTS,parentCall:null};return new mI(this.subchannel,e,this.filterStackFactory,o,(0,pDe.getNextCallNumber)())}};CS.SingleSubchannelChannel=_I});var r9=p(MS=>{"use strict";Object.defineProperty(MS,"__esModule",{value:!0});MS.Subchannel=void 0;var _e=Vt(),SDe=Sc(),gI=Se(),NS=se(),TDe=Ft(),yDe=Qt(),ei=fo(),vDe=t9(),ADe="subchannel",ODe=~(1<<31),EI=class{constructor(e,r,o,s,a){var i;this.channelTarget=e,this.subchannelAddress=r,this.options=o,this.connector=a,this.connectivityState=_e.ConnectivityState.IDLE,this.transport=null,this.continueConnecting=!1,this.stateListeners=new Set,this.refcount=0,this.channelzEnabled=!0,this.dataProducers=new Map,this.subchannelChannel=null;let n={initialDelay:o["grpc.initial_reconnect_backoff_ms"],maxDelay:o["grpc.max_reconnect_backoff_ms"]};this.backoffTimeout=new SDe.BackoffTimeout(()=>{this.handleBackoffTimer()},n),this.backoffTimeout.unref(),this.subchannelAddressString=(0,yDe.subchannelAddressToString)(r),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 ei.ChannelzTraceStub,this.callTracker=new ei.ChannelzCallTrackerStub,this.childrenTracker=new ei.ChannelzChildrenTrackerStub,this.streamTracker=new ei.ChannelzCallTrackerStub):(this.channelzTrace=new ei.ChannelzTrace,this.callTracker=new ei.ChannelzCallTracker,this.childrenTracker=new ei.ChannelzChildrenTracker,this.streamTracker=new ei.ChannelzCallTracker),this.channelzRef=(0,ei.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){gI.trace(NS.LogVerbosity.DEBUG,ADe,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}refTrace(e){gI.trace(NS.LogVerbosity.DEBUG,"subchannel_refcount","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}handleBackoffTimer(){this.continueConnecting?this.transitionToState([_e.ConnectivityState.TRANSIENT_FAILURE],_e.ConnectivityState.CONNECTING):this.transitionToState([_e.ConnectivityState.TRANSIENT_FAILURE],_e.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 r=Math.min(this.keepaliveTime,ODe);e=Object.assign(Object.assign({},e),{"grpc.keepalive_time_ms":r})}this.connector.connect(this.subchannelAddress,this.secureConnector,e).then(r=>{this.transitionToState([_e.ConnectivityState.CONNECTING],_e.ConnectivityState.READY)?(this.transport=r,this.channelzEnabled&&this.childrenTracker.refChild(r.getChannelzRef()),r.addDisconnectListener(o=>{this.transitionToState([_e.ConnectivityState.READY],_e.ConnectivityState.IDLE),o&&this.keepaliveTime>0&&(this.keepaliveTime*=2,gI.log(NS.LogVerbosity.ERROR,`Connection to ${(0,TDe.uriToString)(this.channelTarget)} at ${this.subchannelAddressString} rejected by server because of excess pings. Increasing ping interval to ${this.keepaliveTime} ms`))})):r.shutdown()},r=>{this.transitionToState([_e.ConnectivityState.CONNECTING],_e.ConnectivityState.TRANSIENT_FAILURE,`${r}`)})}transitionToState(e,r,o){var s,a;if(e.indexOf(this.connectivityState)===-1)return!1;o?this.trace(_e.ConnectivityState[this.connectivityState]+" -> "+_e.ConnectivityState[r]+' with error "'+o+'"'):this.trace(_e.ConnectivityState[this.connectivityState]+" -> "+_e.ConnectivityState[r]),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Connectivity state change to "+_e.ConnectivityState[r]);let i=this.connectivityState;switch(this.connectivityState=r,r){case _e.ConnectivityState.READY:this.stopBackoff();break;case _e.ConnectivityState.CONNECTING:this.startBackoff(),this.startConnectingInternal(),this.continueConnecting=!1;break;case _e.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 _e.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 ${r}`)}for(let n of this.stateListeners)n(this,i,r,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,ei.unregisterChannelzRef)(this.channelzRef),this.secureConnector.destroy(),process.nextTick(()=>{this.transitionToState([_e.ConnectivityState.CONNECTING,_e.ConnectivityState.READY],_e.ConnectivityState.IDLE)}))}unrefIfOneRef(){return this.refcount===1?(this.unref(),!0):!1}createCall(e,r,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===NS.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()}}):a={},this.transport.createCall(e,r,o,s,a)}startConnecting(){process.nextTick(()=>{this.transitionToState([_e.ConnectivityState.IDLE],_e.ConnectivityState.CONNECTING)||this.connectivityState===_e.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([_e.ConnectivityState.TRANSIENT_FAILURE],_e.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()}getChannel(){return this.subchannelChannel||(this.subchannelChannel=new vDe.SingleSubchannelChannel(this,this.channelTarget,this.options)),this.subchannelChannel}addDataWatcher(e){throw new Error("Not implemented")}getOrCreateDataProducer(e,r){let o=this.dataProducers.get(e);if(o)return o;let s=r(this);return this.dataProducers.set(e,s),s}removeDataProducer(e){this.dataProducers.delete(e)}};MS.Subchannel=EI});var n9=p(IS=>{"use strict";var SI;Object.defineProperty(IS,"__esModule",{value:!0});IS.GRPC_NODE_USE_ALTERNATIVE_RESOLVER=void 0;IS.GRPC_NODE_USE_ALTERNATIVE_RESOLVER=((SI=process.env.GRPC_NODE_USE_ALTERNATIVE_RESOLVER)!==null&&SI!==void 0?SI:"false")==="true"});var AI=p(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});bs.DEFAULT_PORT=void 0;bs.setup=xDe;var i9=Yr(),TI=b("dns"),bDe=RN(),yI=se(),Uc=_s(),RDe=it(),PDe=Se(),CDe=se(),ho=Ft(),o9=b("net"),NDe=Sc(),s9=n9(),MDe="dns_resolver";function ti(t){PDe.trace(CDe.LogVerbosity.DEBUG,MDe,t)}bs.DEFAULT_PORT=443;var IDe=3e4,vI=class{constructor(e,r,o){var s,a,i;this.target=e,this.listener=r,this.pendingLookupPromise=null,this.pendingTxtPromise=null,this.latestLookupResult=null,this.latestServiceConfigResult=null,this.continueResolving=!1,this.isNextResolutionTimerRunning=!1,this.isServiceConfigEnabled=!0,this.returnedIpResult=!1,this.alternativeResolver=new TI.promises.Resolver,ti("Resolver constructed for target "+(0,ho.uriToString)(e)),e.authority&&this.alternativeResolver.setServers([e.authority]);let n=(0,ho.splitHostPort)(e.path);n===null?(this.ipResult=null,this.dnsHostname=null,this.port=null):(0,o9.isIPv4)(n.host)||(0,o9.isIPv6)(n.host)?(this.ipResult=[{addresses:[{host:n.host,port:(s=n.port)!==null&&s!==void 0?s:bs.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:bs.DEFAULT_PORT),this.percentage=Math.random()*100,o["grpc.service_config_disable_resolution"]===1&&(this.isServiceConfigEnabled=!1),this.defaultResolutionError={code:yI.Status.UNAVAILABLE,details:`Name resolution failed for target ${(0,ho.uriToString)(this.target)}`,metadata:new RDe.Metadata};let c={initialDelay:o["grpc.initial_reconnect_backoff_ms"],maxDelay:o["grpc.max_reconnect_backoff_ms"]};this.backoff=new NDe.BackoffTimeout(()=>{this.continueResolving&&this.startResolutionWithBackoff()},c),this.backoff.unref(),this.minTimeBetweenResolutionsMs=(i=o["grpc.dns_min_time_between_resolutions_ms"])!==null&&i!==void 0?i:IDe,this.nextResolutionTimer=setTimeout(()=>{},0),clearTimeout(this.nextResolutionTimer)}startResolution(){if(this.ipResult!==null){this.returnedIpResult||(ti("Returning IP address for target "+(0,ho.uriToString)(this.target)),setImmediate(()=>{this.listener((0,Uc.statusOrFromValue)(this.ipResult),{},null,"")}),this.returnedIpResult=!0),this.backoff.stop(),this.backoff.reset(),this.stopNextResolutionTimer();return}if(this.dnsHostname===null)ti("Failed to parse DNS address "+(0,ho.uriToString)(this.target)),setImmediate(()=>{this.listener((0,Uc.statusOrFromError)({code:yI.Status.UNAVAILABLE,details:`Failed to parse DNS address ${(0,ho.uriToString)(this.target)}`}),{},null,"")}),this.stopNextResolutionTimer();else{if(this.pendingLookupPromise!==null)return;ti("Looking up DNS hostname "+this.dnsHostname),this.latestLookupResult=null;let e=this.dnsHostname;this.pendingLookupPromise=this.lookup(e),this.pendingLookupPromise.then(r=>{if(this.pendingLookupPromise===null)return;this.pendingLookupPromise=null,this.latestLookupResult=(0,Uc.statusOrFromValue)(r.map(a=>({addresses:[a]})));let o="["+r.map(a=>a.host+":"+a.port).join(",")+"]";ti("Resolved addresses for target "+(0,ho.uriToString)(this.target)+": "+o);let s=this.listener(this.latestLookupResult,{},this.latestServiceConfigResult,"");this.handleHealthStatus(s)},r=>{this.pendingLookupPromise!==null&&(ti("Resolution error for target "+(0,ho.uriToString)(this.target)+": "+r.message),this.pendingLookupPromise=null,this.stopNextResolutionTimer(),this.listener((0,Uc.statusOrFromError)(this.defaultResolutionError),{},this.latestServiceConfigResult,""))}),this.isServiceConfigEnabled&&this.pendingTxtPromise===null&&(this.pendingTxtPromise=this.resolveTxt(e),this.pendingTxtPromise.then(r=>{if(this.pendingTxtPromise===null)return;this.pendingTxtPromise=null;let o;try{o=(0,bDe.extractAndSelectServiceConfig)(r,this.percentage),o?this.latestServiceConfigResult=(0,Uc.statusOrFromValue)(o):this.latestServiceConfigResult=null}catch(s){this.latestServiceConfigResult=(0,Uc.statusOrFromError)({code:yI.Status.UNAVAILABLE,details:`Parsing service config failed with error ${s.message}`})}this.latestLookupResult!==null&&this.listener(this.latestLookupResult,{},this.latestServiceConfigResult,"")},r=>{}))}}handleHealthStatus(e){e?(this.backoff.stop(),this.backoff.reset()):this.continueResolving=!0}async lookup(e){if(s9.GRPC_NODE_USE_ALTERNATIVE_RESOLVER){ti("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 TI.promises.lookup(e,{all:!0})).map(o=>({host:o.address,port:+this.port}))}async resolveTxt(e){return s9.GRPC_NODE_USE_ALTERNATIVE_RESOLVER?(ti("Using alternative DNS resolver."),this.alternativeResolver.resolveTxt(e)):TI.promises.resolveTxt(e)}startNextResolutionTimer(){var e,r;clearTimeout(this.nextResolutionTimer),this.nextResolutionTimer=setTimeout(()=>{this.stopNextResolutionTimer(),this.continueResolving&&this.startResolutionWithBackoff()},this.minTimeBetweenResolutionsMs),(r=(e=this.nextResolutionTimer).unref)===null||r===void 0||r.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?ti('resolution update delayed by "min time between resolutions" rate limit'):ti("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.latestServiceConfigResult=null,this.returnedIpResult=!1}static getDefaultAuthority(e){return e.path}};function xDe(){(0,i9.registerResolver)("dns",vI),(0,i9.registerDefaultScheme)("dns")}});var OI=p(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});sd.parseCIDR=u9;sd.mapProxyName=qDe;sd.getProxiedConnection=jDe;var id=Se(),kc=se(),c9=b("net"),wDe=b("http"),LDe=Se(),a9=Qt(),od=Ft(),DDe=b("url"),UDe=AI(),kDe="proxy";function Bc(t){LDe.trace(kc.LogVerbosity.DEBUG,kDe,t)}function BDe(){let t="",e="";if(process.env.grpc_proxy)e="grpc_proxy",t=process.env.grpc_proxy;else if(process.env.https_proxy)e="https_proxy",t=process.env.https_proxy;else if(process.env.http_proxy)e="http_proxy",t=process.env.http_proxy;else return{};let r;try{r=new DDe.URL(t)}catch{return(0,id.log)(kc.LogVerbosity.ERROR,`cannot parse value of "${e}" env var`),{}}if(r.protocol!=="http:")return(0,id.log)(kc.LogVerbosity.ERROR,`"${r.protocol}" scheme not supported in proxy URI`),{};let o=null;r.username&&(r.password?((0,id.log)(kc.LogVerbosity.INFO,"userinfo found in proxy URI"),o=decodeURIComponent(`${r.username}:${r.password}`)):o=r.username);let s=r.hostname,a=r.port;a===""&&(a="80");let i={address:`${s}:${a}`};return o&&(i.creds=o),Bc("Proxy server "+i.address+" set by environment variable "+e),i}function FDe(){let t=process.env.no_grpc_proxy,e="no_grpc_proxy";return t||(t=process.env.no_proxy,e="no_proxy"),t?(Bc("No proxy server list set by environment variable "+e),t.split(",")):[]}function u9(t){let e=t.split("/");if(e.length!==2)return null;let r=parseInt(e[1],10);return!(0,c9.isIPv4)(e[0])||Number.isNaN(r)||r<0||r>32?null:{ip:l9(e[0]),prefixLength:r}}function l9(t){return t.split(".").reduce((e,r)=>(e<<8)+parseInt(r,10),0)}function VDe(t,e){let r=t.ip,o=-1<<32-t.prefixLength;return(l9(e)&o)===(r&o)}function GDe(t){for(let e of FDe()){let r=u9(e);if((0,c9.isIPv4)(t)&&r&&VDe(r,t))return!0;if(t.endsWith(e))return!0}return!1}function qDe(t,e){var r;let o={target:t,extraOptions:{}};if(((r=e["grpc.enable_http_proxy"])!==null&&r!==void 0?r:1)===0||t.scheme==="unix")return o;let s=BDe();if(!s.address)return o;let a=(0,od.splitHostPort)(t.path);if(!a)return o;let i=a.host;if(GDe(i))return Bc("Not using proxy for target in no_proxy list: "+(0,od.uriToString)(t)),o;let n={"grpc.http_connect_target":(0,od.uriToString)(t)};return s.creds&&(n["grpc.http_connect_creds"]=s.creds),{target:{scheme:"dns",path:s.address},extraOptions:n}}function jDe(t,e){var r;if(!("grpc.http_connect_target"in e))return Promise.resolve(null);let o=e["grpc.http_connect_target"],s=(0,od.parseUri)(o);if(s===null)return Promise.resolve(null);let a=(0,od.splitHostPort)(s.path);if(a===null)return Promise.resolve(null);let i=`${a.host}:${(r=a.port)!==null&&r!==void 0?r:UDe.DEFAULT_PORT}`,n={method:"CONNECT",path:i},c={Host:i};(0,a9.isTcpSubchannelAddress)(t)?(n.host=t.host,n.port=t.port):n.socketPath=t.path,"grpc.http_connect_creds"in e&&(c["Proxy-Authorization"]="Basic "+Buffer.from(e["grpc.http_connect_creds"]).toString("base64")),n.headers=c;let u=(0,a9.subchannelAddressToString)(t);return Bc("Using proxy "+u+" to connect to "+n.path),new Promise((l,d)=>{let h=wDe.request(n);h.once("connect",(g,E,S)=>{h.removeAllListeners(),E.removeAllListeners(),g.statusCode===200?(Bc("Successfully connected to "+n.path+" through proxy "+u),S.length>0&&E.unshift(S),Bc("Successfully established a plaintext connection to "+n.path+" through proxy "+u),l(E)):((0,id.log)(kc.LogVerbosity.ERROR,"Failed to connect to "+n.path+" through proxy "+u+" with status "+g.statusCode),d())}),h.once("error",g=>{h.removeAllListeners(),(0,id.log)(kc.LogVerbosity.ERROR,"Failed to connect to proxy "+u+" with error "+g.message),d()}),h.end()})}});var RI=p(xS=>{"use strict";Object.defineProperty(xS,"__esModule",{value:!0});xS.StreamDecoder=void 0;var ri;(function(t){t[t.NO_DATA=0]="NO_DATA",t[t.READING_SIZE=1]="READING_SIZE",t[t.READING_MESSAGE=2]="READING_MESSAGE"})(ri||(ri={}));var bI=class{constructor(e){this.maxReadMessageLength=e,this.readState=ri.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 r=0,o,s=[];for(;r<e.length;)switch(this.readState){case ri.NO_DATA:this.readCompressFlag=e.slice(r,r+1),r+=1,this.readState=ri.READING_SIZE,this.readPartialSize.fill(0),this.readSizeRemaining=4,this.readMessageSize=0,this.readMessageRemaining=0,this.readPartialMessage=[];break;case ri.READING_SIZE:if(o=Math.min(e.length-r,this.readSizeRemaining),e.copy(this.readPartialSize,4-this.readSizeRemaining,r,r+o),this.readSizeRemaining-=o,r+=o,this.readSizeRemaining===0){if(this.readMessageSize=this.readPartialSize.readUInt32BE(0),this.maxReadMessageLength!==-1&&this.readMessageSize>this.maxReadMessageLength)throw new Error(`Received message larger than max (${this.readMessageSize} vs ${this.maxReadMessageLength})`);if(this.readMessageRemaining=this.readMessageSize,this.readMessageRemaining>0)this.readState=ri.READING_MESSAGE;else{let a=Buffer.concat([this.readCompressFlag,this.readPartialSize],5);this.readState=ri.NO_DATA,s.push(a)}}break;case ri.READING_MESSAGE:if(o=Math.min(e.length-r,this.readMessageRemaining),this.readPartialMessage.push(e.slice(r,r+o)),this.readMessageRemaining-=o,r+=o,this.readMessageRemaining===0){let a=[this.readCompressFlag,this.readPartialSize].concat(this.readPartialMessage),i=Buffer.concat(a,this.readMessageSize+5);this.readState=ri.NO_DATA,s.push(i)}break;default:throw new Error("Unexpected read state")}return s}};xS.StreamDecoder=bI});var d9=p(wS=>{"use strict";Object.defineProperty(wS,"__esModule",{value:!0});wS.Http2SubchannelCall=void 0;var Ii=b("http2"),HDe=b("os"),ge=se(),xi=it(),zDe=RI(),$De=Se(),YDe=se(),WDe="subchannel_call";function KDe(t){for(let[e,r]of Object.entries(HDe.constants.errno))if(r===t)return e;return"Unknown system error "+t}function PI(t){let e=`Received HTTP status code ${t}`,r;switch(t){case 400:r=ge.Status.INTERNAL;break;case 401:r=ge.Status.UNAUTHENTICATED;break;case 403:r=ge.Status.PERMISSION_DENIED;break;case 404:r=ge.Status.UNIMPLEMENTED;break;case 429:case 502:case 503:case 504:r=ge.Status.UNAVAILABLE;break;default:r=ge.Status.UNKNOWN}return{code:r,details:e,metadata:new xi.Metadata}}var CI=class{constructor(e,r,o,s,a){var i;this.http2Stream=e,this.callEventTracker=r,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:ge.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH;this.decoder=new zDe.StreamDecoder(n),e.on("response",(c,u)=>{let l="";for(let d of Object.keys(c))l+=" "+d+": "+c[d]+`
|
|
37
|
+
`;if(this.trace(`Received server headers:
|
|
38
|
+
`+l),this.httpStatusCode=c[":status"],u&Ii.constants.NGHTTP2_FLAG_END_STREAM)this.handleTrailers(c);else{let d;try{d=xi.Metadata.fromHttp2Headers(c)}catch(h){this.endCall({code:ge.Status.UNKNOWN,details:h.message,metadata:new xi.Metadata});return}this.listener.onReceiveMetadata(d)}}),e.on("trailers",c=>{this.handleTrailers(c)}),e.on("data",c=>{if(this.statusOutput)return;this.trace("receive HTTP/2 data frame of length "+c.length);let u;try{u=this.decoder.write(c)}catch(l){if(this.httpStatusCode!==void 0&&this.httpStatusCode!==200){let d=PI(this.httpStatusCode);this.cancelWithStatus(d.code,d.details)}else this.cancelWithStatus(ge.Status.RESOURCE_EXHAUSTED,l.message);return}for(let l of u)this.trace("parsed message of length "+l.length),this.callEventTracker.addMessageReceived(),this.tryPush(l)}),e.on("end",()=>{this.readsClosed=!0,this.maybeOutputStatus()}),e.on("close",()=>{this.serverEndedCall=!0,process.nextTick(()=>{var c;if(this.trace("HTTP/2 stream closed with code "+e.rstCode),((c=this.finalStatus)===null||c===void 0?void 0:c.code)===ge.Status.OK)return;let u,l="";switch(e.rstCode){case Ii.constants.NGHTTP2_NO_ERROR:if(this.finalStatus!==null)return;if(this.httpStatusCode&&this.httpStatusCode!==200){let d=PI(this.httpStatusCode);u=d.code,l=d.details}else u=ge.Status.INTERNAL,l=`Received RST_STREAM with code ${e.rstCode} (Call ended without gRPC status)`;break;case Ii.constants.NGHTTP2_REFUSED_STREAM:u=ge.Status.UNAVAILABLE,l="Stream refused by server";break;case Ii.constants.NGHTTP2_CANCEL:this.connectionDropped?(u=ge.Status.UNAVAILABLE,l="Connection dropped"):(u=ge.Status.CANCELLED,l="Call cancelled");break;case Ii.constants.NGHTTP2_ENHANCE_YOUR_CALM:u=ge.Status.RESOURCE_EXHAUSTED,l="Bandwidth exhausted or memory limit exceeded";break;case Ii.constants.NGHTTP2_INADEQUATE_SECURITY:u=ge.Status.PERMISSION_DENIED,l="Protocol not secure enough";break;case Ii.constants.NGHTTP2_INTERNAL_ERROR:u=ge.Status.INTERNAL,this.internalError===null?l=`Received RST_STREAM with code ${e.rstCode} (Internal server error)`:this.internalError.code==="ECONNRESET"||this.internalError.code==="ETIMEDOUT"?(u=ge.Status.UNAVAILABLE,l=this.internalError.message):l=`Received RST_STREAM with code ${e.rstCode} triggered by internal client error: ${this.internalError.message}`;break;default:u=ge.Status.INTERNAL,l=`Received RST_STREAM with code ${e.rstCode}`}this.endCall({code:u,details:l,metadata:new xi.Metadata,rstCode:e.rstCode})})}),e.on("error",c=>{c.code!=="ERR_HTTP2_STREAM_ERROR"&&(this.trace("Node error event: message="+c.message+" code="+c.code+" errno="+KDe(c.errno)+" syscall="+c.syscall),this.internalError=c),this.callEventTracker.onStreamEnd(!1)})}getDeadlineInfo(){return[`remote_addr=${this.getPeer()}`]}onDisconnect(){this.connectionDropped=!0,setImmediate(()=>{this.endCall({code:ge.Status.UNAVAILABLE,details:"Connection dropped",metadata:new xi.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){$De.trace(YDe.LogVerbosity.DEBUG,WDe,"["+this.callId+"] "+e)}endCall(e){(this.finalStatus===null||this.finalStatus.code===ge.Status.OK)&&(this.finalStatus=e,this.maybeOutputStatus()),this.destroyHttp2Stream()}maybeOutputStatus(){this.finalStatus!==null&&(this.finalStatus.code!==ge.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 r="";for(let i of Object.keys(e))r+=" "+i+": "+e[i]+`
|
|
39
|
+
`;this.trace(`Received server trailers:
|
|
40
|
+
`+r);let o;try{o=xi.Metadata.fromHttp2Headers(e)}catch{o=new xi.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=PI(this.httpStatusCode),a.metadata=o):a={code:ge.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 r;((e=this.finalStatus)===null||e===void 0?void 0:e.code)===ge.Status.OK?r=Ii.constants.NGHTTP2_NO_ERROR:r=Ii.constants.NGHTTP2_CANCEL,this.trace("close http2 stream with code "+r),this.http2Stream.close(r)}}cancelWithStatus(e,r){this.trace("cancelWithStatus code: "+e+' details: "'+r+'"'),this.endCall({code:e,details:r,metadata:new xi.Metadata})}getStatus(){return this.finalStatus}getPeer(){return this.transport.getPeerName()}getCallNumber(){return this.callId}getAuthContext(){return this.transport.getAuthContext()}startRead(){if(this.finalStatus!==null&&this.finalStatus.code!==ge.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,r){this.trace("write() called with message of length "+r.length);let o=s=>{process.nextTick(()=>{var a;let i=ge.Status.UNAVAILABLE;s?.code==="ERR_STREAM_WRITE_AFTER_END"&&(i=ge.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 "+r.length),this.callEventTracker.addMessageSent();try{this.http2Stream.write(r,o)}catch(s){this.endCall({code:ge.Status.UNAVAILABLE,details:`Write failed with error ${s.message}`,metadata:new xi.Metadata})}}halfClose(){this.trace("end() called"),this.trace("calling end() on HTTP/2 stream"),this.http2Stream.end()}};wS.Http2SubchannelCall=CI});var p9=p(US=>{"use strict";Object.defineProperty(US,"__esModule",{value:!0});US.Http2SubchannelConnector=void 0;var Rs=b("http2"),XDe=b("tls"),LS=fo(),ad=se(),JDe=OI(),Fc=Se(),QDe=Yr(),DS=Qt(),NI=Ft(),ZDe=b("net"),e1e=d9(),t1e=TS(),MI="transport",r1e="transport_flowctrl",n1e=sN().version,{HTTP2_HEADER_AUTHORITY:i1e,HTTP2_HEADER_CONTENT_TYPE:o1e,HTTP2_HEADER_METHOD:s1e,HTTP2_HEADER_PATH:a1e,HTTP2_HEADER_TE:c1e,HTTP2_HEADER_USER_AGENT:u1e}=Rs.constants,l1e=2e4,d1e=Buffer.from("too_many_pings","ascii"),II=class{constructor(e,r,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,DS.subchannelAddressToString)(r),o["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.streamTracker=new LS.ChannelzCallTrackerStub):this.streamTracker=new LS.ChannelzCallTracker,this.channelzRef=(0,LS.registerChannelzSocket)(this.subchannelAddressString,()=>this.getChannelzInfo(),this.channelzEnabled),this.userAgent=[o["grpc.primary_user_agent"],`grpc-node-js/${n1e}`,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=l1e,"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 c=!1;a===Rs.constants.NGHTTP2_ENHANCE_YOUR_CALM&&n&&n.equals(d1e)&&(c=!0),this.trace("connection closed by GOAWAY with code "+a+" and data "+n?.toString()),this.reportDisconnectToOwner(c)}),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()}),Fc.isTracerEnabled(MI)&&(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(),e.socket instanceof XDe.TLSSocket?this.authContext={transportSecurityType:"ssl",sslPeerCertificate:e.socket.getPeerCertificate()}:this.authContext={}}getChannelzInfo(){var e,r,o;let s=this.session.socket,a=s.remoteAddress?(0,DS.stringToSubchannelAddress)(s.remoteAddress,s.remotePort):null,i=s.localAddress?(0,DS.stringToSubchannelAddress)(s.localAddress,s.localPort):null,n;if(this.session.encrypted){let u=s,l=u.getCipher(),d=u.getCertificate(),h=u.getPeerCertificate();n={cipherSuiteStandardName:(e=l.standardName)!==null&&e!==void 0?e:null,cipherSuiteOtherName:l.standardName?null:l.name,localCertificate:d&&"raw"in d?d.raw:null,remoteCertificate:h&&"raw"in h?h.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:(r=this.session.state.localWindowSize)!==null&&r!==void 0?r:null,remoteFlowControlWindow:(o=this.session.state.remoteWindowSize)!==null&&o!==void 0?o:null}}trace(e){Fc.trace(ad.LogVerbosity.DEBUG,MI,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}keepaliveTrace(e){Fc.trace(ad.LogVerbosity.DEBUG,"keepalive","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}flowControlTrace(e){Fc.trace(ad.LogVerbosity.DEBUG,r1e,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}internalsTrace(e){Fc.trace(ad.LogVerbosity.DEBUG,"transport_internals","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+e)}reportDisconnectToOwner(e){this.disconnectHandled||(this.disconnectHandled=!0,this.disconnectListeners.forEach(r=>r(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,r;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),(r=(e=this.keepaliveTimer).unref)===null||r===void 0||r.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,r;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),(r=(e=this.keepaliveTimer).unref)===null||r===void 0||r.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,r,o,s,a){let i=e.toHttp2Headers();i[i1e]=r,i[u1e]=this.userAgent,i[o1e]="application/grpc",i[s1e]="POST",i[a1e]=o,i[c1e]="trailers";let n;try{n=this.session.request(i)}catch(l){throw this.handleDisconnect(),l}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 c,u;return this.channelzEnabled?(this.streamTracker.addCallStarted(),c={addMessageSent:()=>{var l;this.messagesSent+=1,this.lastMessageSentTimestamp=new Date,(l=a.addMessageSent)===null||l===void 0||l.call(a)},addMessageReceived:()=>{var l;this.messagesReceived+=1,this.lastMessageReceivedTimestamp=new Date,(l=a.addMessageReceived)===null||l===void 0||l.call(a)},onCallEnd:l=>{var d;(d=a.onCallEnd)===null||d===void 0||d.call(a,l),this.removeActiveCall(u)},onStreamEnd:l=>{var d;l?this.streamTracker.addCallSucceeded():this.streamTracker.addCallFailed(),(d=a.onStreamEnd)===null||d===void 0||d.call(a,l)}}):c={addMessageSent:()=>{var l;(l=a.addMessageSent)===null||l===void 0||l.call(a)},addMessageReceived:()=>{var l;(l=a.addMessageReceived)===null||l===void 0||l.call(a)},onCallEnd:l=>{var d;(d=a.onCallEnd)===null||d===void 0||d.call(a,l),this.removeActiveCall(u)},onStreamEnd:l=>{var d;(d=a.onStreamEnd)===null||d===void 0||d.call(a,l)}},u=new e1e.Http2SubchannelCall(n,c,s,this,(0,t1e.getNextCallNumber)()),this.addActiveCall(u),u}getChannelzRef(){return this.channelzRef}getPeerName(){return this.subchannelAddressString}getOptions(){return this.options}getAuthContext(){return this.authContext}shutdown(){this.session.close(),(0,LS.unregisterChannelzRef)(this.channelzRef)}},xI=class{constructor(e){this.channelTarget=e,this.session=null,this.isShutdown=!1}trace(e){Fc.trace(ad.LogVerbosity.DEBUG,MI,(0,NI.uriToString)(this.channelTarget)+" "+e)}createSession(e,r,o){return this.isShutdown?Promise.reject():e.socket.closed?Promise.reject("Connection closed before starting HTTP/2 handshake"):new Promise((s,a)=>{var i,n,c,u,l,d,h,g;let E=null,S=this.channelTarget;if("grpc.http_connect_target"in o){let Z=(0,NI.parseUri)(o["grpc.http_connect_target"]);Z&&(S=Z,E=(0,NI.uriToString)(Z))}let v=e.secure?"https":"http",O=(0,QDe.getDefaultAuthority)(S),x=()=>{var Z;(Z=this.session)===null||Z===void 0||Z.destroy(),this.session=null,setImmediate(()=>{te||(te=!0,a(`${oe.trim()} (${new Date().toISOString()})`))})},H=Z=>{var P;(P=this.session)===null||P===void 0||P.destroy(),oe=Z.message,this.trace("connection failed with error "+oe),te||(te=!0,a(`${oe} (${new Date().toISOString()})`))},A={createConnection:(Z,P)=>e.socket,settings:{initialWindowSize:(u=(i=o["grpc-node.flow_control_window"])!==null&&i!==void 0?i:(c=(n=Rs.getDefaultSettings)===null||n===void 0?void 0:n.call(Rs))===null||c===void 0?void 0:c.initialWindowSize)!==null&&u!==void 0?u:65535},maxSendHeaderBlockLength:Number.MAX_SAFE_INTEGER,maxSessionMemory:(l=o["grpc-node.max_session_memory"])!==null&&l!==void 0?l:Number.MAX_SAFE_INTEGER},$=Rs.connect(`${v}://${O}`,A),z=(g=(h=(d=Rs.getDefaultSettings)===null||d===void 0?void 0:d.call(Rs))===null||h===void 0?void 0:h.initialWindowSize)!==null&&g!==void 0?g:65535,Q=o["grpc-node.flow_control_window"];this.session=$;let oe="Failed to connect",te=!1;$.unref(),$.once("remoteSettings",()=>{var Z;if(Q&&Q>z)try{$.setLocalWindowSize(Q)}catch{let It=Q-((Z=$.state.localWindowSize)!==null&&Z!==void 0?Z:z);It>0&&$.incrementWindowSize(It)}$.removeAllListeners(),e.socket.removeListener("close",x),e.socket.removeListener("error",H),s(new II($,r,o,E)),this.session=null}),$.once("close",x),$.once("error",H),e.socket.once("close",x),e.socket.once("error",H)})}tcpConnect(e,r){return(0,JDe.getProxiedConnection)(e,r).then(o=>o||new Promise((s,a)=>{let i=()=>{a(new Error("Socket closed"))},n=u=>{a(u)},c=ZDe.connect(e,()=>{c.removeListener("close",i),c.removeListener("error",n),s(c)});c.once("close",i),c.once("error",n)}))}async connect(e,r,o){if(this.isShutdown)return Promise.reject();let s=null,a=null,i=(0,DS.subchannelAddressToString)(e);try{return this.trace(i+" Waiting for secureConnector to be ready"),await r.waitForReady(),this.trace(i+" secureConnector is ready"),s=await this.tcpConnect(e,o),s.setNoDelay(),this.trace(i+" Established TCP connection"),a=await r.connect(s),this.trace(i+" Established secure connection"),this.createSession(a,e,o)}catch(n){throw s?.destroy(),a?.socket.destroy(),n}}shutdown(){var e;this.isShutdown=!0,(e=this.session)===null||e===void 0||e.close(),this.session=null}};US.Http2SubchannelConnector=xI});var f9=p(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});ud.SubchannelPool=void 0;ud.getSubchannelPool=S1e;var p1e=V8(),f1e=r9(),h1e=Qt(),m1e=Ft(),_1e=p9(),g1e=1e4,cd=class{constructor(){this.pool=Object.create(null),this.cleanupTimer=null}unrefUnusedSubchannels(){let e=!0;for(let r in this.pool){let s=this.pool[r].filter(a=>!a.subchannel.unrefIfOneRef());s.length>0&&(e=!1),this.pool[r]=s}e&&this.cleanupTimer!==null&&(clearInterval(this.cleanupTimer),this.cleanupTimer=null)}ensureCleanupTask(){var e,r;this.cleanupTimer===null&&(this.cleanupTimer=setInterval(()=>{this.unrefUnusedSubchannels()},g1e),(r=(e=this.cleanupTimer).unref)===null||r===void 0||r.call(e))}getOrCreateSubchannel(e,r,o,s){this.ensureCleanupTask();let a=(0,m1e.uriToString)(e);if(a in this.pool){let n=this.pool[a];for(let c of n)if((0,h1e.subchannelAddressEqual)(r,c.subchannelAddress)&&(0,p1e.channelOptionsEqual)(o,c.channelArguments)&&s._equals(c.channelCredentials))return c.subchannel}let i=new f1e.Subchannel(e,r,o,s,new _1e.Http2SubchannelConnector(e));return a in this.pool||(this.pool[a]=[]),this.pool[a].push({subchannelAddress:r,channelArguments:o,channelCredentials:s,subchannel:i}),i.ref(),i}};ud.SubchannelPool=cd;var E1e=new cd;function S1e(t){return t?E1e:new cd}});var _9=p(FS=>{"use strict";Object.defineProperty(FS,"__esModule",{value:!0});FS.LoadBalancingCall=void 0;var h9=Vt(),kS=se(),m9=Lc(),BS=it(),ld=Ai(),T1e=Ft(),y1e=Se(),wI=td(),v1e=b("http2"),A1e="load_balancing_call",LI=class{constructor(e,r,o,s,a,i,n){var c,u;this.channel=e,this.callConfig=r,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 l=this.methodName.split("/"),d="";l.length>=2&&(d=l[1]);let h=(u=(c=(0,T1e.splitHostPort)(this.host))===null||c===void 0?void 0:c.host)!==null&&u!==void 0?u:"localhost";this.serviceUrl=`https://${h}/${d}`,this.startTime=new Date}getDeadlineInfo(){var e,r;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,m9.formatDateDifference)(this.startTime,this.childStartTime)}`)),o.push(...this.child.getDeadlineInfo()),o):(!((r=this.metadata)===null||r===void 0)&&r.getOptions().waitForReady&&o.push("wait_for_ready"),o.push("Waiting for LB pick"),o)}trace(e){y1e.trace(kS.LogVerbosity.DEBUG,A1e,"["+this.callNumber+"] "+e)}outputStatus(e,r){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:r});(o=this.listener)===null||o===void 0||o.onReceiveStatus(a),(s=this.onCallEnded)===null||s===void 0||s.call(this,a.code,a.details,a.metadata)}}doPick(){var e,r;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: "+ld.PickResultType[s.pickResultType]+" subchannel: "+a+" status: "+((e=s.status)===null||e===void 0?void 0:e.code)+" "+((r=s.status)===null||r===void 0?void 0:r.details)),s.pickResultType){case ld.PickResultType.COMPLETE:this.credentials.compose(s.subchannel.getCallCredentials()).generateMetadata({method_name:this.methodName,service_url:this.serviceUrl}).then(u=>{var l;if(this.ended){this.trace("Credentials metadata generation finished after call ended");return}if(o.merge(u),o.get("authorization").length>1&&this.outputStatus({code:kS.Status.INTERNAL,details:'"authorization" metadata cannot have multiple values',metadata:new BS.Metadata},"PROCESSED"),s.subchannel.getConnectivityState()!==h9.ConnectivityState.READY){this.trace("Picked subchannel "+a+" has state "+h9.ConnectivityState[s.subchannel.getConnectivityState()]+" after getting credentials metadata. Retrying pick"),this.doPick();return}this.deadline!==1/0&&o.set("grpc-timeout",(0,m9.getDeadlineTimeoutString)(this.deadline));try{this.child=s.subchannel.getRealSubchannel().createCall(o,this.host,this.methodName,{onReceiveMetadata:d=>{this.trace("Received metadata"),this.listener.onReceiveMetadata(d)},onReceiveMessage:d=>{this.trace("Received message"),this.listener.onReceiveMessage(d)},onReceiveStatus:d=>{this.trace("Received status"),d.rstCode===v1e.constants.NGHTTP2_REFUSED_STREAM?this.outputStatus(d,"REFUSED"):this.outputStatus(d,"PROCESSED")}}),this.childStartTime=new Date}catch(d){this.trace("Failed to start call on picked subchannel "+a+" with error "+d.message),this.outputStatus({code:kS.Status.INTERNAL,details:"Failed to start HTTP/2 stream with error "+d.message,metadata:new BS.Metadata},"NOT_STARTED");return}(l=s.onCallStarted)===null||l===void 0||l.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()},u=>{let{code:l,details:d}=(0,wI.restrictControlPlaneStatusCode)(typeof u.code=="number"?u.code:kS.Status.UNKNOWN,`Getting metadata from plugin failed with error: ${u.message}`);this.outputStatus({code:l,details:d,metadata:new BS.Metadata},"PROCESSED")});break;case ld.PickResultType.DROP:let{code:n,details:c}=(0,wI.restrictControlPlaneStatusCode)(s.status.code,s.status.details);setImmediate(()=>{this.outputStatus({code:n,details:c,metadata:s.status.metadata},"DROP")});break;case ld.PickResultType.TRANSIENT_FAILURE:if(this.metadata.getOptions().waitForReady)this.channel.queueCallForPick(this);else{let{code:u,details:l}=(0,wI.restrictControlPlaneStatusCode)(s.status.code,s.status.details);setImmediate(()=>{this.outputStatus({code:u,details:l,metadata:s.status.metadata},"PROCESSED")})}break;case ld.PickResultType.QUEUE:this.channel.queueCallForPick(this)}}cancelWithStatus(e,r){var o;this.trace("cancelWithStatus code: "+e+' details: "'+r+'"'),(o=this.child)===null||o===void 0||o.cancelWithStatus(e,r),this.outputStatus({code:e,details:r,metadata:new BS.Metadata},"PROCESSED")}getPeer(){var e,r;return(r=(e=this.child)===null||e===void 0?void 0:e.getPeer())!==null&&r!==void 0?r:this.channel.getTarget()}start(e,r){this.trace("start called"),this.listener=r,this.metadata=e,this.doPick()}sendMessageWithContext(e,r){this.trace("write() called with message of length "+r.length),this.child?this.child.sendMessageWithContext(e,r):this.pendingMessage={context:e,message:r}}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}getAuthContext(){return this.child?this.child.getAuthContext():null}};FS.LoadBalancingCall=LI});var E9=p(VS=>{"use strict";Object.defineProperty(VS,"__esModule",{value:!0});VS.ResolvingCall=void 0;var O1e=vE(),Ps=se(),Cs=Lc(),g9=it(),b1e=Se(),R1e=td(),P1e="resolving_call",DI=class{constructor(e,r,o,s,a){this.channel=e,this.method=r,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=O1e.CallCredentials.createEmpty(),this.deadline=o.deadline,this.host=o.host,o.parentCall&&(o.flags&Ps.Propagate.CANCELLATION&&o.parentCall.on("cancelled",()=>{this.cancelWithStatus(Ps.Status.CANCELLED,"Cancelled by parent call")}),o.flags&Ps.Propagate.DEADLINE&&(this.trace("Propagating deadline from parent: "+o.parentCall.getDeadline()),this.deadline=(0,Cs.minDeadline)(this.deadline,o.parentCall.getDeadline()))),this.trace("Created"),this.runDeadlineTimer()}trace(e){b1e.trace(Ps.LogVerbosity.DEBUG,P1e,"["+this.callNumber+"] "+e)}runDeadlineTimer(){clearTimeout(this.deadlineTimer),this.deadlineStartTime=new Date,this.trace("Deadline: "+(0,Cs.deadlineToString)(this.deadline));let e=(0,Cs.getRelativeTimeout)(this.deadline);if(e!==1/0){this.trace("Deadline will be reached in "+e+"ms");let r=()=>{if(!this.deadlineStartTime){this.cancelWithStatus(Ps.Status.DEADLINE_EXCEEDED,"Deadline exceeded");return}let o=[],s=new Date;o.push(`Deadline exceeded after ${(0,Cs.formatDateDifference)(this.deadlineStartTime,s)}`),this.configReceivedTime?(this.configReceivedTime>this.deadlineStartTime&&o.push(`name resolution: ${(0,Cs.formatDateDifference)(this.deadlineStartTime,this.configReceivedTime)}`),this.childStartTime?this.childStartTime>this.configReceivedTime&&o.push(`metadata filters: ${(0,Cs.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(Ps.Status.DEADLINE_EXCEEDED,o.join(","))};e<=0?process.nextTick(r):this.deadlineTimer=setTimeout(r,e)}}outputStatus(e){if(!this.ended){this.ended=!0,this.filterStack||(this.filterStack=this.filterStackFactory.createFilter()),clearTimeout(this.deadlineTimer);let r=this.filterStack.receiveTrailers(e);this.trace("ended with status: code="+r.code+' details="'+r.details+'"'),this.statusWatchers.forEach(o=>o(r)),process.nextTick(()=>{var o;(o=this.listener)===null||o===void 0||o.onReceiveStatus(r)})}}sendMessageOnChild(e,r){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:r,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 r=e.config;if(r.status!==Ps.Status.OK){let{code:o,details:s}=(0,R1e.restrictControlPlaneStatusCode)(r.status,"Failed to route call to method "+this.method);this.outputStatus({code:o,details:s,metadata:new g9.Metadata});return}if(r.methodConfig.timeout){let o=new Date;o.setSeconds(o.getSeconds()+r.methodConfig.timeout.seconds),o.setMilliseconds(o.getMilliseconds()+r.methodConfig.timeout.nanos/1e6),this.deadline=(0,Cs.minDeadline)(this.deadline,o),this.runDeadlineTimer()}this.filterStackFactory.push(r.dynamicFilterFactories),this.filterStack=this.filterStackFactory.createFilter(),this.filterStack.sendMetadata(Promise.resolve(this.metadata)).then(o=>{this.child=this.channel.createRetryingCall(r,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 r;!((r=this.metadata)===null||r===void 0)&&r.getOptions().waitForReady?this.channel.queueCallForConfig(this):this.outputStatus(e)}cancelWithStatus(e,r){var o;this.trace("cancelWithStatus code: "+e+' details: "'+r+'"'),(o=this.child)===null||o===void 0||o.cancelWithStatus(e,r),this.outputStatus({code:e,details:r,metadata:new g9.Metadata})}getPeer(){var e,r;return(r=(e=this.child)===null||e===void 0?void 0:e.getPeer())!==null&&r!==void 0?r:this.channel.getTarget()}start(e,r){this.trace("start called"),this.metadata=e.clone(),this.listener=r,this.getConfig()}sendMessageWithContext(e,r){this.trace("write() called with message of length "+r.length),this.child?this.sendMessageOnChild(e,r):this.pendingMessage={context:e,message:r}}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}getAuthContext(){return this.child?this.child.getAuthContext():null}};VS.ResolvingCall=DI});var S9=p(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.RetryingCall=mo.MessageBufferTracker=mo.RetryThrottler=void 0;var GS=se(),C1e=Lc(),N1e=it(),M1e=Se(),I1e="retrying_call",kI=class{constructor(e,r,o){this.maxTokens=e,this.tokenRatio=r,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}};mo.RetryThrottler=kI;var BI=class{constructor(e,r){this.totalLimit=e,this.limitPerCall=r,this.totalAllocated=0,this.allocatedPerCall=new Map}allocate(e,r){var o;let s=(o=this.allocatedPerCall.get(r))!==null&&o!==void 0?o:0;return this.limitPerCall-s<e||this.totalLimit-this.totalAllocated<e?!1:(this.allocatedPerCall.set(r,s+e),this.totalAllocated+=e,!0)}free(e,r){var o;if(this.totalAllocated<e)throw new Error(`Invalid buffer allocation state: call ${r} freed ${e} > total allocated ${this.totalAllocated}`);this.totalAllocated-=e;let s=(o=this.allocatedPerCall.get(r))!==null&&o!==void 0?o:0;if(s<e)throw new Error(`Invalid buffer allocation state: call ${r} freed ${e} > allocated for call ${s}`);this.allocatedPerCall.set(r,s-e)}freeAll(e){var r;let o=(r=this.allocatedPerCall.get(e))!==null&&r!==void 0?r:0;if(this.totalAllocated<o)throw new Error(`Invalid buffer allocation state: call ${e} allocated ${o} > total allocated ${this.totalAllocated}`);this.totalAllocated-=o,this.allocatedPerCall.delete(e)}};mo.MessageBufferTracker=BI;var UI="grpc-previous-rpc-attempts",x1e=5,FI=class{constructor(e,r,o,s,a,i,n,c,u){var l;this.channel=e,this.callConfig=r,this.methodName=o,this.host=s,this.credentials=a,this.deadline=i,this.callNumber=n,this.bufferTracker=c,this.retryThrottler=u,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 d=(l=e.getOptions()["grpc-node.retry_max_attempts_limit"])!==null&&l!==void 0?l:x1e;if(e.getOptions()["grpc.enable_retries"]===0)this.state="NO_RETRY",this.maxAttempts=1;else if(r.methodConfig.retryPolicy){this.state="RETRY";let h=r.methodConfig.retryPolicy;this.nextRetryBackoffSec=this.initialRetryBackoffSec=Number(h.initialBackoff.substring(0,h.initialBackoff.length-1)),this.maxAttempts=Math.min(h.maxAttempts,d)}else r.methodConfig.hedgingPolicy?(this.state="HEDGING",this.maxAttempts=Math.min(r.methodConfig.hedgingPolicy.maxAttempts,d)):(this.state="TRANSPARENT_ONLY",this.maxAttempts=1);this.startTime=new Date}getDeadlineInfo(){if(this.underlyingCalls.length===0)return[];let e=[],r=this.underlyingCalls[this.underlyingCalls.length-1];return this.underlyingCalls.length>1&&e.push(`previous attempts: ${this.underlyingCalls.length-1}`),r.startTime>this.startTime&&e.push(`time to current attempt start: ${(0,C1e.formatDateDifference)(this.startTime,r.startTime)}`),e.push(...r.call.getDeadlineInfo()),e}getCallNumber(){return this.callNumber}trace(e){M1e.trace(GS.LogVerbosity.DEBUG,I1e,"["+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 r;(r=this.listener)===null||r===void 0||r.onReceiveStatus({code:e.code,details:e.details,metadata:e.metadata})})}cancelWithStatus(e,r){this.trace("cancelWithStatus code: "+e+' details: "'+r+'"'),this.reportStatus({code:e,details:r,metadata:new N1e.Metadata});for(let{call:o}of this.underlyingCalls)o.cancelWithStatus(e,r)}getPeer(){return this.committedCallIndex!==null?this.underlyingCalls[this.committedCallIndex].call.getPeer():"unknown"}getBufferEntry(e){var r;return(r=this.writeBuffer[e-this.writeBufferOffset])!==null&&r!==void 0?r:{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 r=this.writeBufferOffset;r<e;r++){let o=this.getBufferEntry(r);o.allocated&&this.bufferTracker.free(o.message.message.length,this.callNumber)}this.writeBuffer=this.writeBuffer.slice(e-this.writeBufferOffset),this.writeBufferOffset=e}commitCall(e){var r,o;if(this.state!=="COMMITTED"){this.trace("Committing call ["+this.underlyingCalls[e].call.getCallNumber()+"] at index "+e),this.state="COMMITTED",(o=(r=this.callConfig).onCommitted)===null||o===void 0||o.call(r),this.committedCallIndex=e;for(let s=0;s<this.underlyingCalls.length;s++)s!==e&&this.underlyingCalls[s].state!=="COMPLETED"&&(this.underlyingCalls[s].state="COMPLETED",this.underlyingCalls[s].call.cancelWithStatus(GS.Status.CANCELLED,"Discarded in favor of other hedged attempt"));this.clearSentMessages()}}commitCallWithMostMessages(){if(this.state==="COMMITTED")return;let e=-1,r=-1;for(let[o,s]of this.underlyingCalls.entries())s.state==="ACTIVE"&&s.nextMessageToSend>e&&(e=s.nextMessageToSend,r=o);r===-1?this.state="TRANSPARENT_ONLY":this.commitCall(r)}isStatusCodeInList(e,r){return e.some(o=>{var s;return o===r||o.toString().toLowerCase()===((s=GS.Status[r])===null||s===void 0?void 0:s.toLowerCase())})}getNextRetryJitter(){return Math.random()*(1.2-.8)+.8}getNextRetryBackoffMs(){var e;let r=(e=this.callConfig)===null||e===void 0?void 0:e.methodConfig.retryPolicy;if(!r)return 0;let s=this.getNextRetryJitter()*this.nextRetryBackoffSec*1e3,a=Number(r.maxBackoff.substring(0,r.maxBackoff.length-1));return this.nextRetryBackoffSec=Math.min(this.nextRetryBackoffSec*r.backoffMultiplier,a),s}maybeRetryCall(e,r){if(this.state!=="RETRY"){r(!1);return}if(this.attempts>=this.maxAttempts){r(!1);return}let o;if(e===null)o=this.getNextRetryBackoffMs();else if(e<0){this.state="TRANSPARENT_ONLY",r(!1);return}else o=e,this.nextRetryBackoffSec=this.initialRetryBackoffSec;setTimeout(()=>{var s,a;if(this.state!=="RETRY"){r(!1);return}!((a=(s=this.retryThrottler)===null||s===void 0?void 0:s.canRetryCall())!==null&&a!==void 0)||a?(r(!0),this.attempts+=1,this.startNewAttempt()):(this.trace("Retry attempt denied by throttling policy"),r(!1))},o)}countActiveCalls(){let e=0;for(let r of this.underlyingCalls)r?.state==="ACTIVE"&&(e+=1);return e}handleProcessedStatus(e,r,o){var s,a,i;switch(this.state){case"COMMITTED":case"NO_RETRY":case"TRANSPARENT_ONLY":this.commitCall(r),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(r),this.reportStatus(e);return}else n=o;setTimeout(()=>{this.maybeStartHedgingAttempt(),this.countActiveCalls()===0&&(this.commitCall(r),this.reportStatus(e))},n)}else this.commitCall(r),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(r),this.reportStatus(e))})):(this.commitCall(r),this.reportStatus(e));break}}getPushback(e){let r=e.get("grpc-retry-pushback-ms");if(r.length===0)return null;try{return parseInt(r[0])}catch{return-1}}handleChildStatus(e,r){var o;if(this.underlyingCalls[r].state==="COMPLETED")return;if(this.trace("state="+this.state+" handling status with progress "+e.progress+" from child ["+this.underlyingCalls[r].call.getCallNumber()+"] in state "+this.underlyingCalls[r].state),this.underlyingCalls[r].state="COMPLETED",e.code===GS.Status.OK){(o=this.retryThrottler)===null||o===void 0||o.addCallSucceeded(),this.commitCall(r),this.reportStatus(e);return}if(this.state==="NO_RETRY"){this.commitCall(r),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,r,s):(this.transparentRetryUsed=!0,this.startNewAttempt());break;case"DROP":this.commitCall(r),this.reportStatus(e);break;case"PROCESSED":this.handleProcessedStatus(e,r,s);break}}maybeStartHedgingAttempt(){this.state==="HEDGING"&&this.callConfig.methodConfig.hedgingPolicy&&(this.attempts>=this.maxAttempts||(this.attempts+=1,this.startNewAttempt(),this.maybeStartHedgingTimer()))}maybeStartHedgingTimer(){var e,r,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=(r=this.hedgingTimer).unref)===null||o===void 0||o.call(r)}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 r=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(UI,`${o}`);let a=!1;e.start(s,{onReceiveMetadata:i=>{this.trace("Received metadata from child ["+e.getCallNumber()+"]"),this.commitCall(r),a=!0,o>0&&i.set(UI,`${o}`),this.underlyingCalls[r].state==="ACTIVE"&&this.listener.onReceiveMetadata(i)},onReceiveMessage:i=>{this.trace("Received message from child ["+e.getCallNumber()+"]"),this.commitCall(r),this.underlyingCalls[r].state==="ACTIVE"&&this.listener.onReceiveMessage(i)},onReceiveStatus:i=>{this.trace("Received status from child ["+e.getCallNumber()+"]"),!a&&o>0&&i.metadata.set(UI,`${o}`),this.handleChildStatus(i,r)}}),this.sendNextChildMessage(r),this.readStarted&&e.startRead()}start(e,r){this.trace("start called"),this.listener=r,this.initialMetadata=e,this.attempts+=1,this.startNewAttempt(),this.maybeStartHedgingTimer()}handleChildWriteCompleted(e){var r,o;let s=this.underlyingCalls[e],a=s.nextMessageToSend;(o=(r=this.getBufferEntry(a)).callback)===null||o===void 0||o.call(r),this.clearSentMessages(),s.nextMessageToSend+=1,this.sendNextChildMessage(e)}sendNextChildMessage(e){let r=this.underlyingCalls[e];if(r.state!=="COMPLETED"&&this.getBufferEntry(r.nextMessageToSend)){let o=this.getBufferEntry(r.nextMessageToSend);switch(o.entryType){case"MESSAGE":r.call.sendMessageWithContext({callback:s=>{this.handleChildWriteCompleted(e)}},o.message.message);break;case"HALF_CLOSE":r.nextMessageToSend+=1,r.call.halfClose();break;case"FREED":break}}}sendMessageWithContext(e,r){var o;this.trace("write() called with message of length "+r.length);let s={message:r,flags:e.flags},a=this.getNextBufferIndex(),i={entryType:"MESSAGE",message:s,allocated:this.bufferTracker.allocate(r.length,this.callNumber)};if(this.writeBuffer.push(i),i.allocated){(o=e.callback)===null||o===void 0||o.call(e);for(let[n,c]of this.underlyingCalls.entries())c.state==="ACTIVE"&&c.nextMessageToSend===a&&c.call.sendMessageWithContext({callback:u=>{this.handleChildWriteCompleted(n)}},r)}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:c=>{this.handleChildWriteCompleted(this.committedCallIndex)}},r)}}startRead(){this.trace("startRead called"),this.readStarted=!0;for(let e of this.underlyingCalls)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 r of this.underlyingCalls)r?.state==="ACTIVE"&&r.nextMessageToSend===e&&(r.nextMessageToSend+=1,r.call.halfClose())}setCredentials(e){throw new Error("Method not implemented.")}getMethod(){return this.methodName}getHost(){return this.host}getAuthContext(){return this.committedCallIndex!==null?this.underlyingCalls[this.committedCallIndex].call.getAuthContext():null}};mo.RetryingCall=FI});var dd=p(qS=>{"use strict";Object.defineProperty(qS,"__esModule",{value:!0});qS.BaseSubchannelWrapper=void 0;var VI=class{constructor(e){this.child=e,this.healthy=!0,this.healthListeners=new Set,this.refcount=0,this.dataWatchers=new Set,e.addHealthStateWatcher(r=>{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(),this.refcount+=1}unref(){this.child.unref(),this.refcount-=1,this.refcount===0&&this.destroy()}destroy(){for(let e of this.dataWatchers)e.destroy()}getChannelzRef(){return this.child.getChannelzRef()}isHealthy(){return this.healthy&&this.child.isHealthy()}addHealthStateWatcher(e){this.healthListeners.add(e)}removeHealthStateWatcher(e){this.healthListeners.delete(e)}addDataWatcher(e){e.setSubchannel(this.getRealSubchannel()),this.dataWatchers.add(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()}getChannel(){return this.child.getChannel()}};qS.BaseSubchannelWrapper=VI});var WI=p(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});Ns.InternalChannel=Ns.SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX=void 0;var w1e=Ec(),L1e=F8(),D1e=f9(),jI=Ai(),U1e=it(),_o=se(),k1e=RS(),B1e=dI(),T9=Yr(),jS=Se(),F1e=OI(),HS=Ft(),Mr=Vt(),pd=fo(),V1e=_9(),G1e=Lc(),q1e=E9(),GI=TS(),j1e=td(),qI=S9(),H1e=dd(),z1e=2147483647,$1e=1e3,Y1e=1800*1e3,zS=new Map,W1e=1<<24,K1e=1<<20,HI=class extends H1e.BaseSubchannelWrapper{constructor(e,r){super(e),this.channel=r,this.refCount=0,this.subchannelStateListener=(o,s,a,i)=>{r.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))}},zI=class{pick(e){return{pickResultType:jI.PickResultType.DROP,status:{code:_o.Status.UNAVAILABLE,details:"Channel closed before call started",metadata:new U1e.Metadata},subchannel:null,onCallStarted:null,onCallEnded:null}}};Ns.SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX="grpc.internal.no_subchannel";var $I=class{constructor(e){this.target=e,this.trace=new pd.ChannelzTrace,this.callTracker=new pd.ChannelzCallTracker,this.childrenTracker=new pd.ChannelzChildrenTracker,this.state=Mr.ConnectivityState.IDLE}getChannelzInfoCallback(){return()=>({target:this.target,state:this.state,trace:this.trace,callTracker:this.callTracker,children:this.childrenTracker.getChildLists()})}},YI=class{constructor(e,r,o){var s,a,i,n,c,u;if(this.credentials=r,this.options=o,this.connectivityState=Mr.ConnectivityState.IDLE,this.currentPicker=new jI.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(!(r instanceof w1e.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 $I(e);let l=(0,HS.parseUri)(e);if(l===null)throw new Error(`Could not parse target name "${e}"`);let d=(0,T9.mapUriDefaultScheme)(l);if(d===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,pd.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,T9.getDefaultAuthority)(d);let h=(0,F1e.mapProxyName)(d,o);this.target=h.target,this.options=Object.assign({},this.options,h.extraOptions),this.subchannelPool=(0,D1e.getSubchannelPool)(((s=this.options["grpc.use_local_subchannel_pool"])!==null&&s!==void 0?s:0)===0),this.retryBufferTracker=new qI.MessageBufferTracker((a=this.options["grpc.retry_buffer_size"])!==null&&a!==void 0?a:W1e,(i=this.options["grpc.per_rpc_retry_buffer_size"])!==null&&i!==void 0?i:K1e),this.keepaliveTime=(n=this.options["grpc.keepalive_time_ms"])!==null&&n!==void 0?n:-1,this.idleTimeoutMs=Math.max((c=this.options["grpc.client_idle_timeout_ms"])!==null&&c!==void 0?c:Y1e,$1e);let g={createSubchannel:(S,v)=>{let O={};for(let[A,$]of Object.entries(v))A.startsWith(Ns.SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX)||(O[A]=$);let x=this.subchannelPool.getOrCreateSubchannel(this.target,S,O,this.credentials);return x.throttleKeepalive(this.keepaliveTime),this.channelzEnabled&&this.channelzInfoTracker.trace.addTrace("CT_INFO","Created subchannel or used existing subchannel",x.getChannelzRef()),new HI(x,this)},updateState:(S,v)=>{this.currentPicker=v;let O=this.pickQueue.slice();this.pickQueue=[],O.length>0&&this.callRefTimerUnref();for(let x of O)x.doPick();this.updateState(S)},requestReresolution:()=>{throw new Error("Resolving load balancer should never call requestReresolution")},addChannelzChild:S=>{this.channelzEnabled&&this.channelzInfoTracker.childrenTracker.refChild(S)},removeChannelzChild:S=>{this.channelzEnabled&&this.channelzInfoTracker.childrenTracker.unrefChild(S)}};this.resolvingLoadBalancer=new L1e.ResolvingLoadBalancer(this.target,g,this.options,(S,v)=>{var O;S.retryThrottling?zS.set(this.getTarget(),new qI.RetryThrottler(S.retryThrottling.maxTokens,S.retryThrottling.tokenRatio,zS.get(this.getTarget()))):zS.delete(this.getTarget()),this.channelzEnabled&&this.channelzInfoTracker.trace.addTrace("CT_INFO","Address resolution succeeded"),(O=this.configSelector)===null||O===void 0||O.unref(),this.configSelector=v,this.currentResolutionError=null,process.nextTick(()=>{let x=this.configSelectionQueue;this.configSelectionQueue=[],x.length>0&&this.callRefTimerUnref();for(let H of x)H.getConfig()})},S=>{this.channelzEnabled&&this.channelzInfoTracker.trace.addTrace("CT_WARNING","Address resolution failed with code "+S.code+' and details "'+S.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,j1e.restrictControlPlaneStatusCode)(S.code,S.details)),{metadata:S.metadata}));let v=this.configSelectionQueue;this.configSelectionQueue=[],v.length>0&&this.callRefTimerUnref();for(let O of v)O.reportResolverError(S)}),this.filterStackFactory=new k1e.FilterStackFactory([new B1e.CompressionFilterFactory(this,this.options)]),this.trace("Channel constructed with options "+JSON.stringify(o,void 0,2));let E=new Error;(0,jS.isTracerEnabled)("channel_stacktrace")&&(0,jS.trace)(_o.LogVerbosity.DEBUG,"channel_stacktrace","("+this.channelzRef.id+`) Channel constructed
|
|
41
|
+
`+((u=E.stack)===null||u===void 0?void 0:u.substring(E.stack.indexOf(`
|
|
42
|
+
`)+1))),this.lastActivityTimestamp=new Date}trace(e,r){(0,jS.trace)(r??_o.LogVerbosity.DEBUG,"channel","("+this.channelzRef.id+") "+(0,HS.uriToString)(this.target)+" "+e)}callRefTimerRef(){var e,r,o,s;this.callRefTimer||(this.callRefTimer=setInterval(()=>{},z1e)),!((r=(e=this.callRefTimer).hasRef)===null||r===void 0)&&r.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,r,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=(r=this.callRefTimer)===null||r===void 0?void 0:r.unref)===null||o===void 0||o.call(r))}removeConnectivityStateWatcher(e){let r=this.connectivityStateWatchers.findIndex(o=>o===e);r>=0&&this.connectivityStateWatchers.splice(r,1)}updateState(e){(0,jS.trace)(_o.LogVerbosity.DEBUG,"connectivity_state","("+this.channelzRef.id+") "+(0,HS.uriToString)(this.target)+" "+Mr.ConnectivityState[this.connectivityState]+" -> "+Mr.ConnectivityState[e]),this.channelzEnabled&&this.channelzInfoTracker.trace.addTrace("CT_INFO","Connectivity state change to "+Mr.ConnectivityState[e]),this.connectivityState=e,this.channelzInfoTracker.state=e;let r=this.connectivityStateWatchers.slice();for(let o of r)e!==o.currentState&&(o.timer&&clearTimeout(o.timer),this.removeConnectivityStateWatcher(o),o.callback());e!==Mr.ConnectivityState.TRANSIENT_FAILURE&&(this.currentResolutionError=null)}throttleKeepalive(e){if(e>this.keepaliveTime){this.keepaliveTime=e;for(let r of this.wrappedSubchannels)r.throttleKeepalive(e)}}addWrappedSubchannel(e){this.wrappedSubchannels.add(e)}removeWrappedSubchannel(e){this.wrappedSubchannels.delete(e)}doPick(e,r){return this.currentPicker.pick({metadata:e,extraPickInfo:r})}queueCallForPick(e){this.pickQueue.push(e),this.callRefTimerRef()}getConfig(e,r){return this.connectivityState!==Mr.ConnectivityState.SHUTDOWN&&this.resolvingLoadBalancer.exitIdle(),this.configSelector?{type:"SUCCESS",config:this.configSelector.invoke(e,r,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(Mr.ConnectivityState.IDLE),this.currentPicker=new jI.QueuePicker(this.resolvingLoadBalancer),this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null),this.callRefTimer&&(clearInterval(this.callRefTimer),this.callRefTimer=null)}startIdleTimeout(e){var r,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=(r=this.idleTimer).unref)===null||o===void 0||o.call(r)}maybeStartIdleTimer(){this.connectivityState!==Mr.ConnectivityState.SHUTDOWN&&!this.idleTimer&&this.startIdleTimeout(this.idleTimeoutMs)}onCallStart(){this.channelzEnabled&&this.channelzInfoTracker.callTracker.addCallStarted(),this.callCount+=1}onCallEnd(e){this.channelzEnabled&&(e.code===_o.Status.OK?this.channelzInfoTracker.callTracker.addCallSucceeded():this.channelzInfoTracker.callTracker.addCallFailed()),this.callCount-=1,this.lastActivityTimestamp=new Date,this.maybeStartIdleTimer()}createLoadBalancingCall(e,r,o,s,a){let i=(0,GI.getNextCallNumber)();return this.trace("createLoadBalancingCall ["+i+'] method="'+r+'"'),new V1e.LoadBalancingCall(this,e,r,o,s,a,i)}createRetryingCall(e,r,o,s,a){let i=(0,GI.getNextCallNumber)();return this.trace("createRetryingCall ["+i+'] method="'+r+'"'),new qI.RetryingCall(this,e,r,o,s,a,i,this.retryBufferTracker,zS.get(this.getTarget()))}createResolvingCall(e,r,o,s,a){let i=(0,GI.getNextCallNumber)();this.trace("createResolvingCall ["+i+'] method="'+e+'", deadline='+(0,G1e.deadlineToString)(r));let n={deadline:r,flags:a??_o.Propagate.DEFAULTS,host:o??this.defaultAuthority,parentCall:s},c=new q1e.ResolvingCall(this,e,n,this.filterStackFactory.clone(),i);return this.onCallStart(),c.addStatusWatcher(u=>{this.onCallEnd(u)}),c}close(){var e;this.resolvingLoadBalancer.destroy(),this.updateState(Mr.ConnectivityState.SHUTDOWN),this.currentPicker=new zI;for(let r of this.configSelectionQueue)r.cancelWithStatus(_o.Status.UNAVAILABLE,"Channel closed before call started");this.configSelectionQueue=[];for(let r of this.pickQueue)r.cancelWithStatus(_o.Status.UNAVAILABLE,"Channel closed before call started");this.pickQueue=[],this.callRefTimer&&clearInterval(this.callRefTimer),this.idleTimer&&clearTimeout(this.idleTimer),this.channelzEnabled&&(0,pd.unregisterChannelzRef)(this.channelzRef),this.subchannelPool.unrefUnusedSubchannels(),(e=this.configSelector)===null||e===void 0||e.unref(),this.configSelector=null}getTarget(){return(0,HS.uriToString)(this.target)}getConnectivityState(e){let r=this.connectivityState;return e&&(this.resolvingLoadBalancer.exitIdle(),this.lastActivityTimestamp=new Date,this.maybeStartIdleTimer()),r}watchConnectivityState(e,r,o){if(this.connectivityState===Mr.ConnectivityState.SHUTDOWN)throw new Error("Channel has been shut down");let s=null;if(r!==1/0){let i=r instanceof Date?r:new Date(r),n=new Date;if(r===-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,r,o,s,a){if(typeof e!="string")throw new TypeError("Channel#createCall: method must be a string");if(!(typeof r=="number"||r instanceof Date))throw new TypeError("Channel#createCall: deadline must be a number or Date");if(this.connectivityState===Mr.ConnectivityState.SHUTDOWN)throw new Error("Channel has been shut down");return this.createResolvingCall(e,r,o,s,a)}getOptions(){return this.options}};Ns.InternalChannel=YI});var nM=p($S=>{"use strict";Object.defineProperty($S,"__esModule",{value:!0});$S.ChannelImplementation=void 0;var X1e=Ec(),J1e=WI(),KI=class{constructor(e,r,o){if(typeof e!="string")throw new TypeError("Channel target must be a string");if(!(r instanceof X1e.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 J1e.InternalChannel(e,r,o)}close(){this.internalChannel.close()}getTarget(){return this.internalChannel.getTarget()}getConnectivityState(e){return this.internalChannel.getConnectivityState(e)}watchConnectivityState(e,r,o){this.internalChannel.watchConnectivityState(e,r,o)}getChannelzRef(){return this.internalChannel.getChannelzRef()}createCall(e,r,o,s,a){if(typeof e!="string")throw new TypeError("Channel#createCall: method must be a string");if(!(typeof r=="number"||r instanceof Date))throw new TypeError("Channel#createCall: deadline must be a number or Date");return this.internalChannel.createCall(e,r,o,s,a)}};$S.ChannelImplementation=KI});var v9=p(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.ServerDuplexStreamImpl=rn.ServerWritableStreamImpl=rn.ServerReadableStreamImpl=rn.ServerUnaryCallImpl=void 0;rn.serverErrorToStatus=r0;var Q1e=b("events"),e0=b("stream"),t0=se(),y9=it();function r0(t,e){var r;let o={code:t0.Status.UNKNOWN,details:"message"in t?t.message:"Unknown Error",metadata:(r=e??t.metadata)!==null&&r!==void 0?r:null};return"code"in t&&typeof t.code=="number"&&Number.isInteger(t.code)&&(o.code=t.code,"details"in t&&typeof t.details=="string"&&(o.details=t.details)),o}var XI=class extends Q1e.EventEmitter{constructor(e,r,o,s){super(),this.path=e,this.call=r,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()}getAuthContext(){return this.call.getAuthContext()}getMetricsRecorder(){return this.call.getMetricsRecorder()}};rn.ServerUnaryCallImpl=XI;var JI=class extends e0.Readable{constructor(e,r,o){super({objectMode:!0}),this.path=e,this.call=r,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()}getAuthContext(){return this.call.getAuthContext()}getMetricsRecorder(){return this.call.getMetricsRecorder()}};rn.ServerReadableStreamImpl=JI;var QI=class extends e0.Writable{constructor(e,r,o,s){super({objectMode:!0}),this.path=e,this.call=r,this.metadata=o,this.request=s,this.pendingStatus={code:t0.Status.OK,details:"OK"},this.cancelled=!1,this.trailingMetadata=new y9.Metadata,this.on("error",a=>{this.pendingStatus=r0(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()}getAuthContext(){return this.call.getAuthContext()}getMetricsRecorder(){return this.call.getMetricsRecorder()}_write(e,r,o){this.call.sendMessage(e,o)}_final(e){var r;e(null),this.call.sendStatus(Object.assign(Object.assign({},this.pendingStatus),{metadata:(r=this.pendingStatus.metadata)!==null&&r!==void 0?r:this.trailingMetadata}))}end(e){return e&&(this.trailingMetadata=e),super.end()}};rn.ServerWritableStreamImpl=QI;var ZI=class extends e0.Duplex{constructor(e,r,o){super({objectMode:!0}),this.path=e,this.call=r,this.metadata=o,this.pendingStatus={code:t0.Status.OK,details:"OK"},this.cancelled=!1,this.trailingMetadata=new y9.Metadata,this.on("error",s=>{this.pendingStatus=r0(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()}getAuthContext(){return this.call.getAuthContext()}getMetricsRecorder(){return this.call.getMetricsRecorder()}_read(e){this.call.startRead()}_write(e,r,o){this.call.sendMessage(e,o)}_final(e){var r;e(null),this.call.sendStatus(Object.assign(Object.assign({},this.pendingStatus),{metadata:(r=this.pendingStatus.metadata)!==null&&r!==void 0?r:this.trailingMetadata}))}end(e){return e&&(this.trailingMetadata=e),super.end()}};rn.ServerDuplexStreamImpl=ZI});var YS=p(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.ServerCredentials=void 0;Vc.createCertificateProviderServerCredentials=Z1e;Vc.createServerCredentialsWithInterceptors=eUe;var n0=EN(),Ms=class{constructor(e,r){this.serverConstructorOptions=e,this.watchers=new Set,this.latestContextOptions=null,this.latestContextOptions=r??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 r of this.watchers)r(this.latestContextOptions)}_isSecure(){return this.serverConstructorOptions!==null}_getSecureContextOptions(){return this.latestContextOptions}_getConstructorOptions(){return this.serverConstructorOptions}_getInterceptors(){return[]}static createInsecure(){return new i0}static createSsl(e,r,o=!1){var s;if(e!==null&&!Buffer.isBuffer(e))throw new TypeError("rootCerts must be null or a Buffer");if(!Array.isArray(r))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<r.length;n++){let c=r[n];if(c===null||typeof c!="object")throw new TypeError(`keyCertPair[${n}] must be an object`);if(!Buffer.isBuffer(c.private_key))throw new TypeError(`keyCertPair[${n}].private_key must be a Buffer`);if(!Buffer.isBuffer(c.cert_chain))throw new TypeError(`keyCertPair[${n}].cert_chain must be a Buffer`);a.push(c.cert_chain),i.push(c.private_key)}return new o0({requestCert:o,ciphers:n0.CIPHER_SUITES},{ca:(s=e??(0,n0.getDefaultRootsData)())!==null&&s!==void 0?s:void 0,cert:a,key:i})}};Vc.ServerCredentials=Ms;var i0=class t extends Ms{constructor(){super(null)}_getSettings(){return null}_equals(e){return e instanceof t}},o0=class t extends Ms{constructor(e,r){super(e,r),this.options=Object.assign(Object.assign({},e),r)}_equals(e){if(this===e)return!0;if(!(e instanceof t))return!1;if(Buffer.isBuffer(this.options.ca)&&Buffer.isBuffer(e.options.ca)){if(!this.options.ca.equals(e.options.ca))return!1}else if(this.options.ca!==e.options.ca)return!1;if(Array.isArray(this.options.cert)&&Array.isArray(e.options.cert)){if(this.options.cert.length!==e.options.cert.length)return!1;for(let r=0;r<this.options.cert.length;r++){let o=this.options.cert[r],s=e.options.cert[r];if(Buffer.isBuffer(o)&&Buffer.isBuffer(s)){if(!o.equals(s))return!1}else if(o!==s)return!1}}else if(this.options.cert!==e.options.cert)return!1;if(Array.isArray(this.options.key)&&Array.isArray(e.options.key)){if(this.options.key.length!==e.options.key.length)return!1;for(let r=0;r<this.options.key.length;r++){let o=this.options.key[r],s=e.options.key[r];if(Buffer.isBuffer(o)&&Buffer.isBuffer(s)){if(!o.equals(s))return!1}else if(o!==s)return!1}}else if(this.options.key!==e.options.key)return!1;return this.options.requestCert===e.options.requestCert}},s0=class t extends Ms{constructor(e,r,o){super({requestCert:r!==null,rejectUnauthorized:o,ciphers:n0.CIPHER_SUITES}),this.identityCertificateProvider=e,this.caCertificateProvider=r,this.requireClientCertificate=o,this.latestCaUpdate=null,this.latestIdentityUpdate=null,this.caCertificateUpdateListener=this.handleCaCertificateUpdate.bind(this),this.identityCertificateUpdateListener=this.handleIdentityCertitificateUpdate.bind(this)}_addWatcher(e){var r;this.getWatcherCount()===0&&((r=this.caCertificateProvider)===null||r===void 0||r.addCaCertificateListener(this.caCertificateUpdateListener),this.identityCertificateProvider.addIdentityCertificateListener(this.identityCertificateUpdateListener)),super._addWatcher(e)}_removeWatcher(e){var r;super._removeWatcher(e),this.getWatcherCount()===0&&((r=this.caCertificateProvider)===null||r===void 0||r.removeCaCertificateListener(this.caCertificateUpdateListener),this.identityCertificateProvider.removeIdentityCertificateListener(this.identityCertificateUpdateListener))}_equals(e){return this===e?!0:e instanceof t?this.caCertificateProvider===e.caCertificateProvider&&this.identityCertificateProvider===e.identityCertificateProvider&&this.requireClientCertificate===e.requireClientCertificate:!1}calculateSecureContextOptions(){var e;return this.latestIdentityUpdate===null||this.caCertificateProvider!==null&&this.latestCaUpdate===null?null:{ca:(e=this.latestCaUpdate)===null||e===void 0?void 0:e.caCertificate,cert:[this.latestIdentityUpdate.certificate],key:[this.latestIdentityUpdate.privateKey]}}finalizeUpdate(){let e=this.calculateSecureContextOptions();this.updateSecureContextOptions(e)}handleCaCertificateUpdate(e){this.latestCaUpdate=e,this.finalizeUpdate()}handleIdentityCertitificateUpdate(e){this.latestIdentityUpdate=e,this.finalizeUpdate()}};function Z1e(t,e,r){return new s0(t,e,r)}var a0=class t extends Ms{constructor(e,r){super({}),this.childCredentials=e,this.interceptors=r}_isSecure(){return this.childCredentials._isSecure()}_equals(e){if(!(e instanceof t)||!this.childCredentials._equals(e.childCredentials)||this.interceptors.length!==e.interceptors.length)return!1;for(let r=0;r<this.interceptors.length;r++)if(this.interceptors[r]!==e.interceptors[r])return!1;return!0}_getInterceptors(){return this.interceptors}_addWatcher(e){this.childCredentials._addWatcher(e)}_removeWatcher(e){this.childCredentials._removeWatcher(e)}_getConstructorOptions(){return this.childCredentials._getConstructorOptions()}_getSecureContextOptions(){return this.childCredentials._getSecureContextOptions()}};function eUe(t,e){return new a0(t,e)}});var fd=p(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.durationMessageToDuration=tUe;wi.msToDuration=rUe;wi.durationToMs=nUe;wi.isDuration=iUe;wi.isDurationMessage=oUe;wi.parseDuration=aUe;wi.durationToString=cUe;function tUe(t){return{seconds:Number.parseInt(t.seconds),nanos:t.nanos}}function rUe(t){return{seconds:t/1e3|0,nanos:t%1e3*1e6|0}}function nUe(t){return t.seconds*1e3+t.nanos/1e6|0}function iUe(t){return typeof t.seconds=="number"&&typeof t.nanos=="number"}function oUe(t){return typeof t.seconds=="string"&&typeof t.nanos=="number"}var sUe=/^(\d+)(?:\.(\d+))?s$/;function aUe(t){let e=t.match(sUe);return e?{seconds:Number.parseInt(e[1],10),nanos:e[2]?Number.parseInt(e[2].padEnd(9,"0"),10):0}:null}function cUe(t){if(t.nanos===0)return`${t.seconds}s`;let e;return t.nanos%1e6===0?e=1e6:t.nanos%1e3===0?e=1e3:e=1,`${t.seconds}.${t.nanos/e}s`}});var KS=p(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.OrcaOobMetricsSubchannelWrapper=pr.GRPC_METRICS_HEADER=pr.ServerMetricRecorder=pr.PerRequestMetricRecorder=void 0;pr.createOrcaClient=R9;pr.createMetricsReader=mUe;var uUe=jE(),c0=fd(),lUe=Ec(),dUe=dd(),A9=se(),pUe=Sc(),fUe=Vt(),O9=null;function WS(){if(O9)return O9;let t=KM().loadSync,e=t("xds/service/orca/v3/orca.proto",{keepCase:!0,longs:String,enums:String,defaults:!0,oneofs:!0,includeDirs:[`${__dirname}/../../proto/xds`,`${__dirname}/../../proto/protoc-gen-validate`]});return(0,uUe.loadPackageDefinition)(e)}var u0=class{constructor(){this.message={}}recordRequestCostMetric(e,r){this.message.request_cost||(this.message.request_cost={}),this.message.request_cost[e]=r}recordUtilizationMetric(e,r){this.message.utilization||(this.message.utilization={}),this.message.utilization[e]=r}recordNamedMetric(e,r){this.message.named_metrics||(this.message.named_metrics={}),this.message.named_metrics[e]=r}recordCPUUtilizationMetric(e){this.message.cpu_utilization=e}recordMemoryUtilizationMetric(e){this.message.mem_utilization=e}recordApplicationUtilizationMetric(e){this.message.application_utilization=e}recordQpsMetric(e){this.message.rps_fractional=e}recordEpsMetric(e){this.message.eps=e}serialize(){return WS().xds.data.orca.v3.OrcaLoadReport.serialize(this.message)}};pr.PerRequestMetricRecorder=u0;var hUe=3e4,l0=class{constructor(){this.message={},this.serviceImplementation={StreamCoreMetrics:e=>{let r=e.request.report_interval?(0,c0.durationToMs)((0,c0.durationMessageToDuration)(e.request.report_interval)):hUe,o=setInterval(()=>{e.write(this.message)},r);e.on("cancelled",()=>{clearInterval(o)})}}}putUtilizationMetric(e,r){this.message.utilization||(this.message.utilization={}),this.message.utilization[e]=r}setAllUtilizationMetrics(e){this.message.utilization=Object.assign({},e)}deleteUtilizationMetric(e){var r;(r=this.message.utilization)===null||r===void 0||delete r[e]}setCpuUtilizationMetric(e){this.message.cpu_utilization=e}deleteCpuUtilizationMetric(){delete this.message.cpu_utilization}setApplicationUtilizationMetric(e){this.message.application_utilization=e}deleteApplicationUtilizationMetric(){delete this.message.application_utilization}setQpsMetric(e){this.message.rps_fractional=e}deleteQpsMetric(){delete this.message.rps_fractional}setEpsMetric(e){this.message.eps=e}deleteEpsMetric(){delete this.message.eps}addToServer(e){let r=WS().xds.service.orca.v3.OpenRcaService.service;e.addService(r,this.serviceImplementation)}};pr.ServerMetricRecorder=l0;function R9(t){let e=WS().xds.service.orca.v3.OpenRcaService;return new e("unused",lUe.ChannelCredentials.createInsecure(),{channelOverride:t})}pr.GRPC_METRICS_HEADER="endpoint-load-metrics-bin";var b9="grpc_orca_load_report";function mUe(t,e){return(r,o,s)=>{let a=s.getOpaque(b9);if(a)t(a);else{let i=s.get(pr.GRPC_METRICS_HEADER);i.length>0&&(a=WS().xds.data.orca.v3.OrcaLoadReport.deserialize(i[0]),t(a),s.setOpaque(b9,a))}e&&e(r,o,s)}}var P9="orca_oob_metrics",d0=class{constructor(e,r){this.metricsListener=e,this.intervalMs=r,this.dataProducer=null}setSubchannel(e){let r=e.getOrCreateDataProducer(P9,_Ue);this.dataProducer=r,r.addDataWatcher(this)}destroy(){var e;(e=this.dataProducer)===null||e===void 0||e.removeDataWatcher(this)}getInterval(){return this.intervalMs}onMetricsUpdate(e){this.metricsListener(e)}},p0=class{constructor(e){this.subchannel=e,this.dataWatchers=new Set,this.orcaSupported=!0,this.metricsCall=null,this.currentInterval=1/0,this.backoffTimer=new pUe.BackoffTimeout(()=>this.updateMetricsSubscription()),this.subchannelStateListener=()=>this.updateMetricsSubscription();let r=e.getChannel();this.client=R9(r),e.addConnectivityStateListener(this.subchannelStateListener)}addDataWatcher(e){this.dataWatchers.add(e),this.updateMetricsSubscription()}removeDataWatcher(e){var r;this.dataWatchers.delete(e),this.dataWatchers.size===0?(this.subchannel.removeDataProducer(P9),(r=this.metricsCall)===null||r===void 0||r.cancel(),this.metricsCall=null,this.client.close(),this.subchannel.removeConnectivityStateListener(this.subchannelStateListener)):this.updateMetricsSubscription()}updateMetricsSubscription(){var e;if(this.dataWatchers.size===0||!this.orcaSupported||this.subchannel.getConnectivityState()!==fUe.ConnectivityState.READY)return;let r=Math.min(...Array.from(this.dataWatchers).map(o=>o.getInterval()));if(!this.metricsCall||r!==this.currentInterval){(e=this.metricsCall)===null||e===void 0||e.cancel(),this.currentInterval=r;let o=this.client.streamCoreMetrics({report_interval:(0,c0.msToDuration)(r)});this.metricsCall=o,o.on("data",s=>{this.dataWatchers.forEach(a=>{a.onMetricsUpdate(s)})}),o.on("error",s=>{if(this.metricsCall=null,s.code===A9.Status.UNIMPLEMENTED){this.orcaSupported=!1;return}s.code!==A9.Status.CANCELLED&&this.backoffTimer.runOnce()})}}},f0=class extends dUe.BaseSubchannelWrapper{constructor(e,r,o){super(e),this.addDataWatcher(new d0(r,o))}getWrappedSubchannel(){return this.child}};pr.OrcaOobMetricsSubchannelWrapper=f0;function _Ue(t){return new p0(t)}});var T0=p(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.BaseServerInterceptingCall=Ir.ServerInterceptingCall=Ir.ResponderBuilder=Ir.ServerListenerBuilder=void 0;Ir.isInterceptingServerListener=SUe;Ir.getServerInterceptingCall=OUe;var QS=it(),Zt=se(),Gc=b("http2"),C9=EE(),N9=b("zlib"),gUe=RI(),L9=Se(),EUe=b("tls"),M9=KS(),D9="server_call";function Is(t){L9.trace(Zt.LogVerbosity.DEBUG,D9,t)}var m0=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}}};Ir.ServerListenerBuilder=m0;function SUe(t){return t.onReceiveMetadata!==void 0&&t.onReceiveMetadata.length===1}var _0=class{constructor(e,r){this.listener=e,this.nextListener=r,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,r=>{this.processingMetadata=!1,!this.cancelled&&(this.nextListener.onReceiveMetadata(r),this.processPendingMessage(),this.processPendingHalfClose())}))}onReceiveMessage(e){this.cancelled||(this.processingMessage=!0,this.listener.onReceiveMessage(e,r=>{this.processingMessage=!1,!this.cancelled&&(this.processingMetadata?(this.pendingMessage=r,this.hasPendingMessage=!0):(this.nextListener.onReceiveMessage(r),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()}},g0=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}}};Ir.ResponderBuilder=g0;var XS={onReceiveMetadata:(t,e)=>{e(t)},onReceiveMessage:(t,e)=>{e(t)},onReceiveHalfClose:t=>{t()},onCancel:()=>{}},JS={start:t=>{t()},sendMetadata:(t,e)=>{e(t)},sendMessage:(t,e)=>{e(t)},sendStatus:(t,e)=>{e(t)}},E0=class{constructor(e,r){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=r?.start)!==null&&o!==void 0?o:JS.start,sendMetadata:(s=r?.sendMetadata)!==null&&s!==void 0?s:JS.sendMetadata,sendMessage:(a=r?.sendMessage)!==null&&a!==void 0?a:JS.sendMessage,sendStatus:(i=r?.sendStatus)!==null&&i!==void 0?i:JS.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(r=>{var o,s,a,i;let n={onReceiveMetadata:(o=r?.onReceiveMetadata)!==null&&o!==void 0?o:XS.onReceiveMetadata,onReceiveMessage:(s=r?.onReceiveMessage)!==null&&s!==void 0?s:XS.onReceiveMessage,onReceiveHalfClose:(a=r?.onReceiveHalfClose)!==null&&a!==void 0?a:XS.onReceiveHalfClose,onCancel:(i=r?.onCancel)!==null&&i!==void 0?i:XS.onCancel},c=new _0(n,e);this.nextCall.start(c)})}sendMetadata(e){this.processingMetadata=!0,this.sentMetadata=!0,this.responder.sendMetadata(e,r=>{this.processingMetadata=!1,this.nextCall.sendMetadata(r),this.processPendingMessage(),this.processPendingStatus()})}sendMessage(e,r){this.processingMessage=!0,this.sentMetadata||this.sendMetadata(new QS.Metadata),this.responder.sendMessage(e,o=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessage=o,this.pendingMessageCallback=r):this.nextCall.sendMessage(o,r)})}sendStatus(e){this.responder.sendStatus(e,r=>{this.processingMetadata||this.processingMessage?this.pendingStatus=r:this.nextCall.sendStatus(r)})}startRead(){this.nextCall.startRead()}getPeer(){return this.nextCall.getPeer()}getDeadline(){return this.nextCall.getDeadline()}getHost(){return this.nextCall.getHost()}getAuthContext(){return this.nextCall.getAuthContext()}getConnectionInfo(){return this.nextCall.getConnectionInfo()}getMetricsRecorder(){return this.nextCall.getMetricsRecorder()}};Ir.ServerInterceptingCall=E0;var U9="grpc-accept-encoding",S0="grpc-encoding",I9="grpc-message",x9="grpc-status",h0="grpc-timeout",TUe=/(\d{1,8})\s*([HMSmun])/,yUe={H:36e5,M:6e4,S:1e3,m:1,u:.001,n:1e-6},vUe={[U9]:"identity,deflate,gzip",[S0]:"identity"},w9={[Gc.constants.HTTP2_HEADER_STATUS]:Gc.constants.HTTP_STATUS_OK,[Gc.constants.HTTP2_HEADER_CONTENT_TYPE]:"application/grpc+proto"},AUe={waitForTrailers:!0},ZS=class{constructor(e,r,o,s,a){var i,n;this.stream=e,this.callEventTracker=o,this.handler=s,this.listener=null,this.deadlineTimer=null,this.deadline=1/0,this.maxSendMessageSize=Zt.DEFAULT_MAX_SEND_MESSAGE_LENGTH,this.maxReceiveMessageSize=Zt.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.metricsRecorder=new M9.PerRequestMetricRecorder,this.stream.once("error",h=>{}),this.stream.once("close",()=>{var h;Is("Request to method "+((h=this.handler)===null||h===void 0?void 0:h.path)+" stream closed with rstCode "+this.stream.rstCode),this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!1),this.callEventTracker.onCallEnd({code:Zt.Status.CANCELLED,details:"Stream closed before sending status",metadata:null})),this.notifyOnCancel()}),this.stream.on("data",h=>{this.handleDataFrame(h)}),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=r[":authority"])!==null&&i!==void 0?i:r.host,this.decoder=new gUe.StreamDecoder(this.maxReceiveMessageSize);let c=QS.Metadata.fromHttp2Headers(r);L9.isTracerEnabled(D9)&&Is("Request to "+this.handler.path+" received headers "+JSON.stringify(c.toJSON()));let u=c.get(h0);u.length>0&&this.handleTimeoutHeader(u[0]);let l=c.get(S0);l.length>0&&(this.incomingEncoding=l[0]),c.remove(h0),c.remove(S0),c.remove(U9),c.remove(Gc.constants.HTTP2_HEADER_ACCEPT_ENCODING),c.remove(Gc.constants.HTTP2_HEADER_TE),c.remove(Gc.constants.HTTP2_HEADER_CONTENT_TYPE),this.metadata=c;let d=(n=e.session)===null||n===void 0?void 0:n.socket;this.connectionInfo={localAddress:d?.localAddress,localPort:d?.localPort,remoteAddress:d?.remoteAddress,remotePort:d?.remotePort},this.shouldSendMetrics=!!a["grpc.server_call_metric_recording"]}handleTimeoutHeader(e){let r=e.toString().match(TUe);if(r===null){let a={code:Zt.Status.INTERNAL,details:`Invalid ${h0} value "${e}"`,metadata:null};process.nextTick(()=>{this.sendStatus(a)});return}let o=+r[1]*yUe[r[2]]|0,s=new Date;this.deadline=s.setMilliseconds(s.getMilliseconds()+o),this.deadlineTimer=setTimeout(()=>{let a={code:Zt.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 QS.Metadata)}serializeMessage(e){let r=this.handler.serialize(e),o=r.byteLength,s=Buffer.allocUnsafe(o+5);return s.writeUInt8(0,0),s.writeUInt32BE(o,1),r.copy(s,5),s}decompressMessage(e,r){let o=e.subarray(5);if(r==="identity")return o;if(r==="deflate"||r==="gzip"){let s;return r==="deflate"?s=N9.createInflate():s=N9.createGunzip(),new Promise((a,i)=>{let n=0,c=[];s.on("data",u=>{c.push(u),n+=u.byteLength,this.maxReceiveMessageSize!==-1&&n>this.maxReceiveMessageSize&&(s.destroy(),i({code:Zt.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxReceiveMessageSize}`}))}),s.on("end",()=>{a(Buffer.concat(c))}),s.write(o),s.end()})}else return Promise.reject({code:Zt.Status.UNIMPLEMENTED,details:`Received message compressed with unsupported encoding "${r}"`})}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:Zt.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 r;if(this.checkCancelled())return;Is("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:Zt.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),(r=this.callEventTracker)===null||r===void 0||r.addMessageReceived()}}handleEndEvent(){this.readQueue.push({type:"HALF_CLOSE",compressedMessage:null,parsedMessage:null}),this.receivedHalfClose=!0,this.maybePushNextMessage()}start(e){Is("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 r=e?e.toHttp2Headers():null,o=Object.assign(Object.assign(Object.assign({},w9),vUe),r);this.stream.respond(o,AUe)}sendMessage(e,r){if(this.checkCancelled())return;let o;try{o=this.serializeMessage(e)}catch(s){this.sendStatus({code:Zt.Status.INTERNAL,details:`Error serializing response: ${(0,C9.getErrorMessage)(s)}`,metadata:null});return}if(this.maxSendMessageSize!==-1&&o.length-5>this.maxSendMessageSize){this.sendStatus({code:Zt.Status.RESOURCE_EXHAUSTED,details:`Sent message larger than max (${o.length} vs. ${this.maxSendMessageSize})`,metadata:null});return}this.maybeSendMetadata(),Is("Request to "+this.handler.path+" sent data frame of size "+o.length),this.stream.write(o,s=>{var a;if(s){this.sendStatus({code:Zt.Status.INTERNAL,details:`Error writing message: ${(0,C9.getErrorMessage)(s)}`,metadata:null});return}(a=this.callEventTracker)===null||a===void 0||a.addMessageSent(),r()})}sendStatus(e){var r,o,s;if(this.checkCancelled())return;Is("Request to method "+((r=this.handler)===null||r===void 0?void 0:r.path)+" ended with status code: "+Zt.Status[e.code]+" details: "+e.details);let a=(s=(o=e.metadata)===null||o===void 0?void 0:o.clone())!==null&&s!==void 0?s:new QS.Metadata;if(this.shouldSendMetrics&&a.set(M9.GRPC_METRICS_HEADER,this.metricsRecorder.serialize()),this.metadataSent)this.wantTrailers?this.notifyOnCancel():(this.wantTrailers=!0,this.stream.once("wantTrailers",()=>{this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!0),this.callEventTracker.onCallEnd(e));let i=Object.assign({[x9]:e.code,[I9]:encodeURI(e.details)},a.toHttp2Headers());this.stream.sendTrailers(i),this.notifyOnCancel()}),this.stream.end());else{this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!0),this.callEventTracker.onCallEnd(e));let i=Object.assign(Object.assign({[x9]:e.code,[I9]:encodeURI(e.details)},w9),a.toHttp2Headers());this.stream.respond(i,{endStream:!0}),this.notifyOnCancel()}}startRead(){Is("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 r=(e=this.stream.session)===null||e===void 0?void 0:e.socket;return r?.remoteAddress?r.remotePort?`${r.remoteAddress}:${r.remotePort}`:r.remoteAddress:"unknown"}getDeadline(){return this.deadline}getHost(){return this.host}getAuthContext(){var e;if(((e=this.stream.session)===null||e===void 0?void 0:e.socket)instanceof EUe.TLSSocket){let r=this.stream.session.socket.getPeerCertificate();return{transportSecurityType:"ssl",sslPeerCertificate:r.raw?r:void 0}}else return{}}getConnectionInfo(){return this.connectionInfo}getMetricsRecorder(){return this.metricsRecorder}};Ir.BaseServerInterceptingCall=ZS;function OUe(t,e,r,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 ZS(e,r,o,s,a);return t.reduce((c,u)=>u(i,c),n)}});var j9=p(Eo=>{"use strict";var bUe=Eo&&Eo.__runInitializers||function(t,e,r){for(var o=arguments.length>2,s=0;s<e.length;s++)r=o?e[s].call(t,r):e[s].call(t);return o?r:void 0},RUe=Eo&&Eo.__esDecorate||function(t,e,r,o,s,a){function i(O){if(O!==void 0&&typeof O!="function")throw new TypeError("Function expected");return O}for(var n=o.kind,c=n==="getter"?"get":n==="setter"?"set":"value",u=!e&&t?o.static?t:t.prototype:null,l=e||(u?Object.getOwnPropertyDescriptor(u,o.name):{}),d,h=!1,g=r.length-1;g>=0;g--){var E={};for(var S in o)E[S]=S==="access"?{}:o[S];for(var S in o.access)E.access[S]=o.access[S];E.addInitializer=function(O){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(O||null))};var v=(0,r[g])(n==="accessor"?{get:l.get,set:l.set}:l[c],E);if(n==="accessor"){if(v===void 0)continue;if(v===null||typeof v!="object")throw new TypeError("Object expected");(d=i(v.get))&&(l.get=d),(d=i(v.set))&&(l.set=d),(d=i(v.init))&&s.unshift(d)}else(d=i(v))&&(n==="field"?s.unshift(d):l[c]=d)}u&&Object.defineProperty(u,o.name,l),h=!0};Object.defineProperty(Eo,"__esModule",{value:!0});Eo.Server=void 0;var er=b("http2"),PUe=b("util"),Ge=se(),Hc=v9(),y0=YS(),k9=Yr(),jc=Se(),go=Qt(),nn=Ft(),Xe=fo(),B9=T0(),qc=~(1<<31),v0=~(1<<31),CUe=2e4,F9=~(1<<31),{HTTP2_HEADER_PATH:V9}=er.constants,NUe="server",G9=Buffer.from("max_age");function q9(t){jc.trace(Ge.LogVerbosity.DEBUG,"server_call",t)}function MUe(){}function IUe(t){return function(e,r){return PUe.deprecate(e,t)}}function A0(t){return{code:Ge.Status.UNIMPLEMENTED,details:`The server does not implement the method ${t}`}}function xUe(t,e){let r=A0(e);switch(t){case"unary":return(o,s)=>{s(r,null)};case"clientStream":return(o,s)=>{s(r,null)};case"serverStream":return o=>{o.emit("error",r)};case"bidi":return o=>{o.emit("error",r)};default:throw new Error(`Invalid handlerType ${t}`)}}var wUe=(()=>{var t;let e=[],r;return t=class{constructor(s){var a,i,n,c,u,l;this.boundPorts=(bUe(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 Xe.ChannelzTraceStub,this.callTracker=new Xe.ChannelzCallTrackerStub,this.listenerChildrenTracker=new Xe.ChannelzChildrenTrackerStub,this.sessionChildrenTracker=new Xe.ChannelzChildrenTrackerStub):(this.channelzTrace=new Xe.ChannelzTrace,this.callTracker=new Xe.ChannelzCallTracker,this.listenerChildrenTracker=new Xe.ChannelzChildrenTracker,this.sessionChildrenTracker=new Xe.ChannelzChildrenTracker),this.channelzRef=(0,Xe.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:qc,this.maxConnectionAgeGraceMs=(i=this.options["grpc.max_connection_age_grace_ms"])!==null&&i!==void 0?i:qc,this.keepaliveTimeMs=(n=this.options["grpc.keepalive_time_ms"])!==null&&n!==void 0?n:v0,this.keepaliveTimeoutMs=(c=this.options["grpc.keepalive_timeout_ms"])!==null&&c!==void 0?c:CUe,this.sessionIdleTimeout=(u=this.options["grpc.max_connection_idle_ms"])!==null&&u!==void 0?u:F9,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=(l=this.options.interceptors)!==null&&l!==void 0?l:[],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 c=this.sessions.get(s),u=s.socket,l=u.remoteAddress?(0,go.stringToSubchannelAddress)(u.remoteAddress,u.remotePort):null,d=u.localAddress?(0,go.stringToSubchannelAddress)(u.localAddress,u.localPort):null,h;if(s.encrypted){let E=u,S=E.getCipher(),v=E.getCertificate(),O=E.getPeerCertificate();h={cipherSuiteStandardName:(a=S.standardName)!==null&&a!==void 0?a:null,cipherSuiteOtherName:S.standardName?null:S.name,localCertificate:v&&"raw"in v?v.raw:null,remoteCertificate:O&&"raw"in O?O.raw:null}}else h=null;return{remoteAddress:l,localAddress:d,security:h,remoteName:null,streamsStarted:c.streamTracker.callsStarted,streamsSucceeded:c.streamTracker.callsSucceeded,streamsFailed:c.streamTracker.callsFailed,messagesSent:c.messagesSent,messagesReceived:c.messagesReceived,keepAlivesSent:c.keepAlivesSent,lastLocalStreamCreatedTimestamp:null,lastRemoteStreamCreatedTimestamp:c.streamTracker.lastCallStartedTimestamp,lastMessageSentTimestamp:c.lastMessageSentTimestamp,lastMessageReceivedTimestamp:c.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){jc.trace(Ge.LogVerbosity.DEBUG,NUe,"("+this.channelzRef.id+") "+s)}keepaliveTrace(s){jc.trace(Ge.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 c=s[n],u;c.requestStream?c.responseStream?u="bidi":u="clientStream":c.responseStream?u="serverStream":u="unary";let l=a[n],d;if(l===void 0&&typeof c.originalName=="string"&&(l=a[c.originalName]),l!==void 0?d=l.bind(a):d=xUe(u,n),this.register(c.path,d,c.responseSerialize,c.requestDeserialize,u)===!1)throw new Error(`Method handler for ${c.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,Xe.registerChannelzSocket)((0,go.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,Xe.unregisterChannelzRef)(s)}createHttp2Server(s){let a;if(s._isSecure()){let i=s._getConstructorOptions(),n=s._getSecureContextOptions(),c=Object.assign(Object.assign(Object.assign(Object.assign({},this.commonServerOptions),i),n),{enableTrace:this.options["grpc-node.tls_enable_trace"]===1}),u=n!==null;this.trace("Initial credentials valid: "+u),a=er.createSecureServer(c),a.prependListener("connection",d=>{u||(this.trace("Dropped connection from "+JSON.stringify(d.address())+" due to unloaded credentials"),d.destroy())}),a.on("secureConnection",d=>{d.on("error",h=>{this.trace("An incoming TLS connection closed with error: "+h.message)})});let l=d=>{if(d){let h=a;try{h.setSecureContext(d)}catch(g){jc.log(Ge.LogVerbosity.ERROR,"Failed to set secure context with error "+g.message),d=null}}u=d!==null,this.trace("Post-update credentials valid: "+u)};s._addWatcher(l),a.on("close",()=>{s._removeWatcher(l)})}else a=er.createServer(this.commonServerOptions);return a.setTimeout(0,MUe),this._setupHandlers(a,s._getInterceptors()),a}bindOneAddress(s,a){this.trace("Attempting to bind "+(0,go.subchannelAddressToString)(s));let i=this.createHttp2Server(a.credentials);return new Promise((n,c)=>{let u=l=>{this.trace("Failed to bind "+(0,go.subchannelAddressToString)(s)+" with error "+l.message),n({port:"port"in s?s.port:1,error:l.message})};i.once("error",u),i.listen(s,()=>{let l=i.address(),d;typeof l=="string"?d={path:l}:d={host:l.address,port:l.port};let h=this.experimentalRegisterListenerToChannelz(d);this.listenerChildrenTracker.refChild(h),this.http2Servers.set(i,{channelzRef:h,sessions:new Set,ownsChannelzRef:!0}),a.listeningServers.add(i),this.trace("Successfully bound "+(0,go.subchannelAddressToString)(d)),n({port:"port"in d?d.port:1}),i.removeListener("error",u)})})}async bindManyPorts(s,a){if(s.length===0)return{count:0,port:0,errors:[]};if((0,go.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(l=>(0,go.isTcpSubchannelAddress)(l)?{host:l.host,port:i.port}:l),c=await Promise.all(n.map(l=>this.bindOneAddress(l,a))),u=[i,...c];return{count:u.filter(l=>l.error===void 0).length,port:i.port,errors:u.filter(l=>l.error).map(l=>l.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<s.length&&jc.log(Ge.LogVerbosity.INFO,`WARNING Only ${i.count} addresses added out of total ${s.length} resolved`),i.port;{let n=`No address added out of total ${s.length} resolved`;throw jc.log(Ge.LogVerbosity.ERROR,n),new Error(`${n} errors: [${i.errors.join(",")}]`)}}resolvePort(s){return new Promise((a,i)=>{let n=!1,c=(l,d,h,g)=>{if(n)return!0;if(n=!0,!l.ok)return i(new Error(l.error.details)),!0;let E=[].concat(...l.value.map(S=>S.addresses));return E.length===0?(i(new Error(`No addresses resolved for port ${s}`)),!0):(a(E),!0)};(0,k9.createResolver)(s,c,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,nn.parseUri)(s);if(a===null)throw new Error(`Could not parse port "${s}"`);let i=(0,k9.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 y0.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),c=(h,g)=>{process.nextTick(()=>i(h,g))},u=this.boundPorts.get((0,nn.uriToString)(n));if(u){if(!a._equals(u.credentials)){c(new Error(`${s} already bound with incompatible credentials`),0);return}u.cancelled=!1,u.completionPromise?u.completionPromise.then(h=>i(null,h),h=>i(h,0)):c(null,u.portNumber);return}u={mapKey:(0,nn.uriToString)(n),originalUri:n,completionPromise:null,cancelled:!1,portNumber:0,credentials:a,listeningServers:new Set};let l=(0,nn.splitHostPort)(n.path),d=this.bindPort(n,u);u.completionPromise=d,l?.port===0?d.then(h=>{let g={scheme:n.scheme,authority:n.authority,path:(0,nn.combineHostPort)({host:l.host,port:h})};u.mapKey=(0,nn.uriToString)(g),u.completionPromise=null,u.portNumber=h,this.boundPorts.set(u.mapKey,u),i(null,h)},h=>{i(h,0)}):(this.boundPorts.set(u.mapKey,u),d.then(h=>{u.completionPromise=null,u.portNumber=h,i(null,h)},h=>{i(h,0)}))}registerInjectorToChannelz(){return(0,Xe.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 y0.ServerCredentials))throw new TypeError("creds must be a ServerCredentials object");this.channelzEnabled&&this.listenerChildrenTracker.refChild(a);let n=this.createHttp2Server(s),c=new Set;return this.http2Servers.set(n,{channelzRef:a,sessions:c,ownsChannelzRef:i}),{injectConnection:u=>{n.emit("connection",u)},drain:u=>{var l,d;for(let h of c)this.closeSession(h);(d=(l=setTimeout(()=>{for(let h of c)h.destroy(er.constants.NGHTTP2_CANCEL)},u)).unref)===null||d===void 0||d.call(l)},destroy:()=>{this.closeServer(n);for(let u of c)this.closeSession(u)}}}createConnectionInjector(s){if(s===null||!(s instanceof y0.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,Xe.unregisterChannelzRef)(i.channelzRef)),this.http2Servers.delete(s),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),c=()=>{n&&(this.sessionChildrenTracker.unrefChild(n.ref),(0,Xe.unregisterChannelzRef)(n.ref)),a?.()};s.closed?queueMicrotask(c):s.close(c)}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,nn.splitHostPort)(a.path);if(i?.port===0)throw new Error("Cannot unbind port 0");let n=this.boundPorts.get((0,nn.uriToString)(a));n&&(this.trace("unbinding "+n.mapKey+" originally bound as "+(0,nn.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 c=this.normalizePort(s),u=(0,nn.splitHostPort)(c.path);if(u?.port===0)throw new Error("Cannot drain port 0");let l=this.boundPorts.get((0,nn.uriToString)(c));if(!l)return;let d=new Set;for(let h of l.listeningServers){let g=this.http2Servers.get(h);if(g)for(let E of g.sessions)d.add(E),this.closeSession(E,()=>{d.delete(E)})}(n=(i=setTimeout(()=>{for(let h of d)h.destroy(er.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(er.constants.NGHTTP2_CANCEL)}),this.sessions.clear(),(0,Xe.unregisterChannelzRef)(this.channelzRef),this.shutdown=!0}register(s,a,i,n,c){return this.handlers.has(s)?!1:(this.handlers.set(s,{func:a,serialize:i,deserialize:n,type:c,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=u=>{(0,Xe.unregisterChannelzRef)(this.channelzRef),s(u)},n=0;function c(){n--,n===0&&i()}this.shutdown=!0;for(let[u,l]of this.http2Servers.entries()){n++;let d=l.channelzRef.name;this.trace("Waiting for server "+d+" to close"),this.closeServer(u,()=>{this.trace("Server "+d+" finished closing"),c()});for(let h of l.sessions.keys()){n++;let g=(a=h.socket)===null||a===void 0?void 0:a.remoteAddress;this.trace("Waiting for session "+g+" to close"),this.closeSession(h,()=>{this.trace("Session "+g+" finished closing"),c()})}}n===0&&i()}addHttp2Port(){throw new Error("Not yet implemented")}getChannelzRef(){return this.channelzRef}_verifyContentType(s,a){let i=a[er.constants.HTTP2_HEADER_CONTENT_TYPE];return typeof i!="string"||!i.startsWith("application/grpc")?(s.respond({[er.constants.HTTP2_HEADER_STATUS]:er.constants.HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE},{endStream:!0}),!1):!0}_retrieveHandler(s){q9("Received call to method "+s+" at address "+this.serverAddressString);let a=this.handlers.get(s);return a===void 0?(q9("No handler registered for method "+s+". Sending UNIMPLEMENTED status."),null):a}_respondWithError(s,a,i=null){var n,c;let u=Object.assign({"grpc-status":(n=s.code)!==null&&n!==void 0?n:Ge.Status.INTERNAL,"grpc-message":s.details,[er.constants.HTTP2_HEADER_STATUS]:er.constants.HTTP_STATUS_OK,[er.constants.HTTP2_HEADER_CONTENT_TYPE]:"application/grpc+proto"},(c=s.metadata)===null||c===void 0?void 0:c.toHttp2Headers());a.respond(u,{endStream:!0}),this.callTracker.addCallFailed(),i?.streamTracker.addCallFailed()}_channelzHandler(s,a,i){this.onStreamOpened(a);let n=this.sessions.get(a.session);if(this.callTracker.addCallStarted(),n?.streamTracker.addCallStarted(),!this._verifyContentType(a,i)){this.callTracker.addCallFailed(),n?.streamTracker.addCallFailed();return}let c=i[V9],u=this._retrieveHandler(c);if(!u){this._respondWithError(A0(c),a,n);return}let l={addMessageSent:()=>{n&&(n.messagesSent+=1,n.lastMessageSentTimestamp=new Date)},addMessageReceived:()=>{n&&(n.messagesReceived+=1,n.lastMessageReceivedTimestamp=new Date)},onCallEnd:h=>{h.code===Ge.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()},onStreamEnd:h=>{n&&(h?n.streamTracker.addCallSucceeded():n.streamTracker.addCallFailed())}},d=(0,B9.getServerInterceptingCall)([...s,...this.interceptors],a,i,l,u,this.options);this._runHandlerForCall(d,u)||(this.callTracker.addCallFailed(),n?.streamTracker.addCallFailed(),d.sendStatus({code:Ge.Status.INTERNAL,details:`Unknown handler type: ${u.type}`}))}_streamHandler(s,a,i){if(this.onStreamOpened(a),this._verifyContentType(a,i)!==!0)return;let n=i[V9],c=this._retrieveHandler(n);if(!c){this._respondWithError(A0(n),a,null);return}let u=(0,B9.getServerInterceptingCall)([...s,...this.interceptors],a,i,null,c,this.options);this._runHandlerForCall(u,c)||u.sendStatus({code:Ge.Status.INTERNAL,details:`Unknown handler type: ${c.type}`})}_runHandlerForCall(s,a){let{type:i}=a;if(i==="unary")LUe(s,a);else if(i==="clientStream")DUe(s,a);else if(i==="serverStream")UUe(s,a);else if(i==="bidi")kUe(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 c=this.channelzEnabled?this._channelzHandler:this._streamHandler,u=this.channelzEnabled?this._channelzSessionHandler(s):this._sessionHandler(s);s.on("stream",c.bind(this,a)),s.on("session",u)}_sessionHandler(s){return a=>{var i,n;(i=this.http2Servers.get(s))===null||i===void 0||i.sessions.add(a);let c=null,u=null,l=null,d=!1,h=this.enableIdleTimeout(a);if(this.maxConnectionAgeMs!==qc){let O=this.maxConnectionAgeMs/10,x=Math.random()*O*2-O;c=setTimeout(()=>{var H,A;d=!0,this.trace("Connection dropped by max connection age: "+((H=a.socket)===null||H===void 0?void 0:H.remoteAddress));try{a.goaway(er.constants.NGHTTP2_NO_ERROR,~(1<<31),G9)}catch{a.destroy();return}a.close(),this.maxConnectionAgeGraceMs!==qc&&(u=setTimeout(()=>{a.destroy()},this.maxConnectionAgeGraceMs),(A=u.unref)===null||A===void 0||A.call(u))},this.maxConnectionAgeMs+x),(n=c.unref)===null||n===void 0||n.call(c)}let g=()=>{l&&(clearTimeout(l),l=null)},E=()=>!a.destroyed&&this.keepaliveTimeMs<v0&&this.keepaliveTimeMs>0,S,v=()=>{var O;E()&&(this.keepaliveTrace("Starting keepalive timer for "+this.keepaliveTimeMs+"ms"),l=setTimeout(()=>{g(),S()},this.keepaliveTimeMs),(O=l.unref)===null||O===void 0||O.call(l))};S=()=>{var O;if(!E())return;this.keepaliveTrace("Sending ping with timeout "+this.keepaliveTimeoutMs+"ms");let x="";try{a.ping((A,$,z)=>{g(),A?(this.keepaliveTrace("Ping failed with error: "+A.message),d=!0,a.close()):(this.keepaliveTrace("Received ping response"),v())})||(x="Ping returned false")}catch(H){x=(H instanceof Error?H.message:"")||"Unknown error"}if(x){this.keepaliveTrace("Ping send failed: "+x),this.trace("Connection dropped due to ping send error: "+x),d=!0,a.close();return}l=setTimeout(()=>{g(),this.keepaliveTrace("Ping timeout passed without response"),this.trace("Connection dropped by keepalive timeout"),d=!0,a.close()},this.keepaliveTimeoutMs),(O=l.unref)===null||O===void 0||O.call(l)},v(),a.on("close",()=>{var O,x;d||this.trace(`Connection dropped by client ${(O=a.socket)===null||O===void 0?void 0:O.remoteAddress}`),c&&clearTimeout(c),u&&clearTimeout(u),g(),h!==null&&(clearTimeout(h.timeout),this.sessionIdleTimeouts.delete(a)),(x=this.http2Servers.get(s))===null||x===void 0||x.sessions.delete(a)})}}_channelzSessionHandler(s){return a=>{var i,n,c,u;let l=(0,Xe.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),d={ref:l,streamTracker:new Xe.ChannelzCallTracker,messagesSent:0,messagesReceived:0,keepAlivesSent:0,lastMessageSentTimestamp:null,lastMessageReceivedTimestamp:null};(c=this.http2Servers.get(s))===null||c===void 0||c.sessions.add(a),this.sessions.set(a,d);let h=`${a.socket.remoteAddress}:${a.socket.remotePort}`;this.channelzTrace.addTrace("CT_INFO","Connection established by client "+h),this.trace("Connection established by client "+h),this.sessionChildrenTracker.refChild(l);let g=null,E=null,S=null,v=!1,O=this.enableIdleTimeout(a);if(this.maxConnectionAgeMs!==qc){let z=this.maxConnectionAgeMs/10,Q=Math.random()*z*2-z;g=setTimeout(()=>{var oe;v=!0,this.channelzTrace.addTrace("CT_INFO","Connection dropped by max connection age from "+h);try{a.goaway(er.constants.NGHTTP2_NO_ERROR,~(1<<31),G9)}catch{a.destroy();return}a.close(),this.maxConnectionAgeGraceMs!==qc&&(E=setTimeout(()=>{a.destroy()},this.maxConnectionAgeGraceMs),(oe=E.unref)===null||oe===void 0||oe.call(E))},this.maxConnectionAgeMs+Q),(u=g.unref)===null||u===void 0||u.call(g)}let x=()=>{S&&(clearTimeout(S),S=null)},H=()=>!a.destroyed&&this.keepaliveTimeMs<v0&&this.keepaliveTimeMs>0,A,$=()=>{var z;H()&&(this.keepaliveTrace("Starting keepalive timer for "+this.keepaliveTimeMs+"ms"),S=setTimeout(()=>{x(),A()},this.keepaliveTimeMs),(z=S.unref)===null||z===void 0||z.call(S))};A=()=>{var z;if(!H())return;this.keepaliveTrace("Sending ping with timeout "+this.keepaliveTimeoutMs+"ms");let Q="";try{a.ping((te,Z,P)=>{x(),te?(this.keepaliveTrace("Ping failed with error: "+te.message),this.channelzTrace.addTrace("CT_INFO","Connection dropped due to error of a ping frame "+te.message+" return in "+Z),v=!0,a.close()):(this.keepaliveTrace("Received ping response"),$())})||(Q="Ping returned false")}catch(oe){Q=(oe instanceof Error?oe.message:"")||"Unknown error"}if(Q){this.keepaliveTrace("Ping send failed: "+Q),this.channelzTrace.addTrace("CT_INFO","Connection dropped due to ping send error: "+Q),v=!0,a.close();return}d.keepAlivesSent+=1,S=setTimeout(()=>{x(),this.keepaliveTrace("Ping timeout passed without response"),this.channelzTrace.addTrace("CT_INFO","Connection dropped by keepalive timeout from "+h),v=!0,a.close()},this.keepaliveTimeoutMs),(z=S.unref)===null||z===void 0||z.call(S)},$(),a.on("close",()=>{var z;v||this.channelzTrace.addTrace("CT_INFO","Connection dropped by client "+h),this.sessionChildrenTracker.unrefChild(l),(0,Xe.unregisterChannelzRef)(l),g&&clearTimeout(g),E&&clearTimeout(E),x(),O!==null&&(clearTimeout(O.timeout),this.sessionIdleTimeouts.delete(a)),(z=this.http2Servers.get(s))===null||z===void 0||z.sessions.delete(a),this.sessions.delete(a)})}}enableIdleTimeout(s){var a,i;if(this.sessionIdleTimeout>=F9)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:c}=s;return this.trace("Enable idle timeout for "+c.remoteAddress+":"+c.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?.remoteAddress+":"+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;r=[IUe("Calling start() is no longer necessary. It can be safely omitted.")],RUe(t,null,r,{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(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:o})})(),t})();Eo.Server=wUe;async function LUe(t,e){let r;function o(i,n,c,u){if(i){t.sendStatus((0,Hc.serverErrorToStatus)(i,c));return}t.sendMessage(n,()=>{t.sendStatus({code:Ge.Status.OK,details:"OK",metadata:c??null})})}let s,a=null;t.start({onReceiveMetadata(i){s=i,t.startRead()},onReceiveMessage(i){if(a){t.sendStatus({code:Ge.Status.UNIMPLEMENTED,details:`Received a second request message for server streaming method ${e.path}`,metadata:null});return}a=i,t.startRead()},onReceiveHalfClose(){if(!a){t.sendStatus({code:Ge.Status.UNIMPLEMENTED,details:`Received no request message for server streaming method ${e.path}`,metadata:null});return}r=new Hc.ServerWritableStreamImpl(e.path,t,s,a);try{e.func(r,o)}catch(i){t.sendStatus({code:Ge.Status.UNKNOWN,details:`Server method handler threw error ${i.message}`,metadata:null})}},onCancel(){r&&(r.cancelled=!0,r.emit("cancelled","cancelled"))}})}function DUe(t,e){let r;function o(s,a,i,n){if(s){t.sendStatus((0,Hc.serverErrorToStatus)(s,i));return}t.sendMessage(a,()=>{t.sendStatus({code:Ge.Status.OK,details:"OK",metadata:i??null})})}t.start({onReceiveMetadata(s){r=new Hc.ServerDuplexStreamImpl(e.path,t,s);try{e.func(r,o)}catch(a){t.sendStatus({code:Ge.Status.UNKNOWN,details:`Server method handler threw error ${a.message}`,metadata:null})}},onReceiveMessage(s){r.push(s)},onReceiveHalfClose(){r.push(null)},onCancel(){r&&(r.cancelled=!0,r.emit("cancelled","cancelled"),r.destroy())}})}function UUe(t,e){let r,o,s=null;t.start({onReceiveMetadata(a){o=a,t.startRead()},onReceiveMessage(a){if(s){t.sendStatus({code:Ge.Status.UNIMPLEMENTED,details:`Received a second request message for server streaming method ${e.path}`,metadata:null});return}s=a,t.startRead()},onReceiveHalfClose(){if(!s){t.sendStatus({code:Ge.Status.UNIMPLEMENTED,details:`Received no request message for server streaming method ${e.path}`,metadata:null});return}r=new Hc.ServerWritableStreamImpl(e.path,t,o,s);try{e.func(r)}catch(a){t.sendStatus({code:Ge.Status.UNKNOWN,details:`Server method handler threw error ${a.message}`,metadata:null})}},onCancel(){r&&(r.cancelled=!0,r.emit("cancelled","cancelled"),r.destroy())}})}function kUe(t,e){let r;t.start({onReceiveMetadata(o){r=new Hc.ServerDuplexStreamImpl(e.path,t,o);try{e.func(r)}catch(s){t.sendStatus({code:Ge.Status.UNKNOWN,details:`Server method handler threw error ${s.message}`,metadata:null})}},onReceiveMessage(o){r.push(o)},onReceiveHalfClose(){r.push(null)},onCancel(){r&&(r.cancelled=!0,r.emit("cancelled","cancelled"),r.destroy())}})}});var H9=p(eT=>{"use strict";Object.defineProperty(eT,"__esModule",{value:!0});eT.StatusBuilder=void 0;var O0=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}};eT.StatusBuilder=O0});var gd=p(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.LeafLoadBalancer=ni.PickFirstLoadBalancer=ni.PickFirstLoadBalancingConfig=void 0;ni.shuffled=W9;ni.setup=zUe;var b0=no(),qe=Vt(),So=Ai(),z9=Qt(),BUe=Se(),FUe=se(),$9=Qt(),Y9=b("net"),VUe=_s(),GUe="pick_first";function hd(t){BUe.trace(FUe.LogVerbosity.DEBUG,GUe,t)}var md="pick_first",qUe=250,zc=class t{constructor(e){this.shuffleAddressList=e}getLoadBalancerName(){return md}toJsonObject(){return{[md]:{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 t(e.shuffleAddressList===!0)}};ni.PickFirstLoadBalancingConfig=zc;var R0=class{constructor(e){this.subchannel=e}pick(e){return{pickResultType:So.PickResultType.COMPLETE,subchannel:this.subchannel,status:null,onCallStarted:null,onCallEnded:null}}};function W9(t){let e=t.slice();for(let r=e.length-1;r>1;r--){let o=Math.floor(Math.random()*(r+1)),s=e[r];e[r]=e[o],e[o]=s}return e}function jUe(t){if(t.length===0)return[];let e=[],r=[],o=[],s=(0,$9.isTcpSubchannelAddress)(t[0])&&(0,Y9.isIPv6)(t[0].host);for(let n of t)(0,$9.isTcpSubchannelAddress)(n)&&(0,Y9.isIPv6)(n.host)?r.push(n):o.push(n);let a=s?r:o,i=s?o:r;for(let n=0;n<Math.max(a.length,i.length);n++)n<a.length&&e.push(a[n]),n<i.length&&e.push(i[n]);return e}var K9="grpc-node.internal.pick-first.report_health_status",_d=class{constructor(e){this.channelControlHelper=e,this.children=[],this.currentState=qe.ConnectivityState.IDLE,this.currentSubchannelIndex=0,this.currentPick=null,this.subchannelStateListener=(r,o,s,a,i)=>{this.onSubchannelStateUpdate(r,o,s,i)},this.pickedSubchannelHealthListener=()=>this.calculateAndReportNewState(),this.stickyTransientFailureMode=!1,this.reportHealthStatus=!1,this.lastError=null,this.latestAddressList=null,this.latestOptions={},this.latestResolutionNote="",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 r=`Picked subchannel ${this.currentPick.getAddress()} is unhealthy`;this.updateState(qe.ConnectivityState.TRANSIENT_FAILURE,new So.UnavailablePicker({details:r}),r)}else this.updateState(qe.ConnectivityState.READY,new R0(this.currentPick),null);else if(((e=this.latestAddressList)===null||e===void 0?void 0:e.length)===0){let r=`No connection established. Last error: ${this.lastError}. Resolution note: ${this.latestResolutionNote}`;this.updateState(qe.ConnectivityState.TRANSIENT_FAILURE,new So.UnavailablePicker({details:r}),r)}else if(this.children.length===0)this.updateState(qe.ConnectivityState.IDLE,new So.QueuePicker(this),null);else if(this.stickyTransientFailureMode){let r=`No connection established. Last error: ${this.lastError}. Resolution note: ${this.latestResolutionNote}`;this.updateState(qe.ConnectivityState.TRANSIENT_FAILURE,new So.UnavailablePicker({details:r}),r)}else this.updateState(qe.ConnectivityState.CONNECTING,new So.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,r,o,s){var a;if(!((a=this.currentPick)===null||a===void 0)&&a.realSubchannelEquals(e)){o!==qe.ConnectivityState.READY&&(this.removeCurrentPick(),this.calculateAndReportNewState());return}for(let[i,n]of this.children.entries())if(e.realSubchannelEquals(n.subchannel)){o===qe.ConnectivityState.READY&&this.pickSubchannel(n.subchannel),o===qe.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[r,o]of this.children.entries())if(r>=e){let s=o.subchannel.getConnectivityState();if(s===qe.ConnectivityState.IDLE||s===qe.ConnectivityState.CONNECTING){this.startConnecting(r);return}}this.maybeEnterStickyTransientFailureMode()}startConnecting(e){var r,o;clearTimeout(this.connectionDelayTimeout),this.currentSubchannelIndex=e,this.children[e].subchannel.getConnectivityState()===qe.ConnectivityState.IDLE&&(hd("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)},qUe),(o=(r=this.connectionDelayTimeout).unref)===null||o===void 0||o.call(r)}pickSubchannel(e){hd("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,r,o){hd(qe.ConnectivityState[this.currentState]+" -> "+qe.ConnectivityState[e]),this.currentState=e,this.channelControlHelper.updateState(e,r,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,r){hd("connectToAddressList(["+e.map(s=>(0,z9.subchannelAddressToString)(s))+"])");let o=e.map(s=>({subchannel:this.channelControlHelper.createSubchannel(s,r),hasReportedTransientFailure:!1}));for(let{subchannel:s}of o)if(s.getConnectivityState()===qe.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()===qe.ConnectivityState.TRANSIENT_FAILURE&&(s.hasReportedTransientFailure=!0);this.startNextSubchannelConnecting(0),this.calculateAndReportNewState()}updateAddressList(e,r,o,s){if(!(r instanceof zc))return!1;if(!e.ok)return this.children.length===0&&this.currentPick===null&&this.channelControlHelper.updateState(qe.ConnectivityState.TRANSIENT_FAILURE,new So.UnavailablePicker(e.error),e.error.details),!0;let a=e.value;this.reportHealthStatus=o[K9],r.getShuffleAddressList()&&(a=W9(a));let i=[].concat(...a.map(c=>c.addresses));hd("updateAddressList(["+i.map(c=>(0,z9.subchannelAddressToString)(c))+"])");let n=jUe(i);return this.latestAddressList=n,this.latestOptions=o,this.connectToAddressList(n,o),this.latestResolutionNote=s,i.length>0?!0:(this.lastError="No addresses resolved",!1)}exitIdle(){this.currentState===qe.ConnectivityState.IDLE&&this.latestAddressList&&this.connectToAddressList(this.latestAddressList,this.latestOptions)}resetBackoff(){}destroy(){this.resetSubchannelList(),this.removeCurrentPick()}getTypeName(){return md}};ni.PickFirstLoadBalancer=_d;var HUe=new zc(!1),P0=class{constructor(e,r,o,s){this.endpoint=e,this.options=o,this.resolutionNote=s,this.latestState=qe.ConnectivityState.IDLE;let a=(0,b0.createChildChannelControlHelper)(r,{updateState:(i,n,c)=>{this.latestState=i,this.latestPicker=n,r.updateState(i,n,c)}});this.pickFirstBalancer=new _d(a),this.latestPicker=new So.QueuePicker(this.pickFirstBalancer)}startConnecting(){this.pickFirstBalancer.updateAddressList((0,VUe.statusOrFromValue)([this.endpoint]),HUe,Object.assign(Object.assign({},this.options),{[K9]:!0}),this.resolutionNote)}updateEndpoint(e,r){this.options=r,this.endpoint=e,this.latestState!==qe.ConnectivityState.IDLE&&this.startConnecting()}getConnectivityState(){return this.latestState}getPicker(){return this.latestPicker}getEndpoint(){return this.endpoint}exitIdle(){this.pickFirstBalancer.exitIdle()}destroy(){this.pickFirstBalancer.destroy()}};ni.LeafLoadBalancer=P0;function zUe(){(0,b0.registerLoadBalancerType)(md,_d,zc),(0,b0.registerDefaultLoadBalancerType)(md)}});var X9=p(rT=>{"use strict";Object.defineProperty(rT,"__esModule",{value:!0});rT.FileWatcherCertificateProvider=void 0;var $Ue=b("fs"),YUe=Se(),WUe=se(),KUe=b("util"),XUe="certificate_provider";function tT(t){YUe.trace(WUe.LogVerbosity.DEBUG,XUe,t)}var C0=(0,KUe.promisify)($Ue.readFile),N0=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");tT("File watcher constructed with config "+JSON.stringify(e))}updateCertificates(){this.fileResultPromise||(this.fileResultPromise=Promise.allSettled([this.config.certificateFile?C0(this.config.certificateFile):Promise.reject(),this.config.privateKeyFile?C0(this.config.privateKeyFile):Promise.reject(),this.config.caCertificateFile?C0(this.config.caCertificateFile):Promise.reject()]),this.fileResultPromise.then(([e,r,o])=>{if(this.refreshTimer){tT("File watcher read certificates certificate "+e.status+", privateKey "+r.status+", CA certificate "+o.status),this.lastUpdateTime=new Date,this.fileResultPromise=null,e.status==="fulfilled"&&r.status==="fulfilled"?this.latestIdentityUpdate={certificate:e.value,privateKey:r.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)}}),tT("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),tT("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()}};rT.FileWatcherCertificateProvider=N0});var x0=p(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX=q.createCertificateProviderChannelCredentials=q.FileWatcherCertificateProvider=q.createCertificateProviderServerCredentials=q.createServerCredentialsWithInterceptors=q.BaseSubchannelWrapper=q.registerAdminService=q.FilterStackFactory=q.BaseFilter=q.statusOrFromError=q.statusOrFromValue=q.PickResultType=q.QueuePicker=q.UnavailablePicker=q.ChildLoadBalancerHandler=q.EndpointMap=q.endpointHasAddress=q.endpointToString=q.subchannelAddressToString=q.LeafLoadBalancer=q.isLoadBalancerNameRegistered=q.parseLoadBalancingConfig=q.selectLbConfigFromList=q.registerLoadBalancerType=q.createChildChannelControlHelper=q.BackoffTimeout=q.parseDuration=q.durationToMs=q.splitHostPort=q.uriToString=q.CHANNEL_ARGS_CONFIG_SELECTOR_KEY=q.createResolver=q.registerResolver=q.log=q.trace=void 0;var J9=Se();Object.defineProperty(q,"trace",{enumerable:!0,get:function(){return J9.trace}});Object.defineProperty(q,"log",{enumerable:!0,get:function(){return J9.log}});var M0=Yr();Object.defineProperty(q,"registerResolver",{enumerable:!0,get:function(){return M0.registerResolver}});Object.defineProperty(q,"createResolver",{enumerable:!0,get:function(){return M0.createResolver}});Object.defineProperty(q,"CHANNEL_ARGS_CONFIG_SELECTOR_KEY",{enumerable:!0,get:function(){return M0.CHANNEL_ARGS_CONFIG_SELECTOR_KEY}});var Q9=Ft();Object.defineProperty(q,"uriToString",{enumerable:!0,get:function(){return Q9.uriToString}});Object.defineProperty(q,"splitHostPort",{enumerable:!0,get:function(){return Q9.splitHostPort}});var Z9=fd();Object.defineProperty(q,"durationToMs",{enumerable:!0,get:function(){return Z9.durationToMs}});Object.defineProperty(q,"parseDuration",{enumerable:!0,get:function(){return Z9.parseDuration}});var JUe=Sc();Object.defineProperty(q,"BackoffTimeout",{enumerable:!0,get:function(){return JUe.BackoffTimeout}});var Ed=no();Object.defineProperty(q,"createChildChannelControlHelper",{enumerable:!0,get:function(){return Ed.createChildChannelControlHelper}});Object.defineProperty(q,"registerLoadBalancerType",{enumerable:!0,get:function(){return Ed.registerLoadBalancerType}});Object.defineProperty(q,"selectLbConfigFromList",{enumerable:!0,get:function(){return Ed.selectLbConfigFromList}});Object.defineProperty(q,"parseLoadBalancingConfig",{enumerable:!0,get:function(){return Ed.parseLoadBalancingConfig}});Object.defineProperty(q,"isLoadBalancerNameRegistered",{enumerable:!0,get:function(){return Ed.isLoadBalancerNameRegistered}});var QUe=gd();Object.defineProperty(q,"LeafLoadBalancer",{enumerable:!0,get:function(){return QUe.LeafLoadBalancer}});var nT=Qt();Object.defineProperty(q,"subchannelAddressToString",{enumerable:!0,get:function(){return nT.subchannelAddressToString}});Object.defineProperty(q,"endpointToString",{enumerable:!0,get:function(){return nT.endpointToString}});Object.defineProperty(q,"endpointHasAddress",{enumerable:!0,get:function(){return nT.endpointHasAddress}});Object.defineProperty(q,"EndpointMap",{enumerable:!0,get:function(){return nT.EndpointMap}});var ZUe=wE();Object.defineProperty(q,"ChildLoadBalancerHandler",{enumerable:!0,get:function(){return ZUe.ChildLoadBalancerHandler}});var I0=Ai();Object.defineProperty(q,"UnavailablePicker",{enumerable:!0,get:function(){return I0.UnavailablePicker}});Object.defineProperty(q,"QueuePicker",{enumerable:!0,get:function(){return I0.QueuePicker}});Object.defineProperty(q,"PickResultType",{enumerable:!0,get:function(){return I0.PickResultType}});var eJ=_s();Object.defineProperty(q,"statusOrFromValue",{enumerable:!0,get:function(){return eJ.statusOrFromValue}});Object.defineProperty(q,"statusOrFromError",{enumerable:!0,get:function(){return eJ.statusOrFromError}});var eke=sI();Object.defineProperty(q,"BaseFilter",{enumerable:!0,get:function(){return eke.BaseFilter}});var tke=RS();Object.defineProperty(q,"FilterStackFactory",{enumerable:!0,get:function(){return tke.FilterStackFactory}});var rke=BE();Object.defineProperty(q,"registerAdminService",{enumerable:!0,get:function(){return rke.registerAdminService}});var nke=dd();Object.defineProperty(q,"BaseSubchannelWrapper",{enumerable:!0,get:function(){return nke.BaseSubchannelWrapper}});var tJ=YS();Object.defineProperty(q,"createServerCredentialsWithInterceptors",{enumerable:!0,get:function(){return tJ.createServerCredentialsWithInterceptors}});Object.defineProperty(q,"createCertificateProviderServerCredentials",{enumerable:!0,get:function(){return tJ.createCertificateProviderServerCredentials}});var ike=X9();Object.defineProperty(q,"FileWatcherCertificateProvider",{enumerable:!0,get:function(){return ike.FileWatcherCertificateProvider}});var oke=Ec();Object.defineProperty(q,"createCertificateProviderChannelCredentials",{enumerable:!0,get:function(){return oke.createCertificateProviderChannelCredentials}});var ske=WI();Object.defineProperty(q,"SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX",{enumerable:!0,get:function(){return ske.SUBCHANNEL_ARGS_EXCLUDE_KEY_PREFIX}})});var rJ=p(L0=>{"use strict";Object.defineProperty(L0,"__esModule",{value:!0});L0.setup=uke;var ake=Yr(),cke=_s(),w0=class{constructor(e,r,o){this.listener=r,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,(0,cke.statusOrFromValue)(this.endpoints),{},null,""))}destroy(){this.hasReturnedResult=!1}static getDefaultAuthority(e){return"localhost"}};function uke(){(0,ake.registerResolver)("unix",w0)}});var cJ=p(B0=>{"use strict";Object.defineProperty(B0,"__esModule",{value:!0});B0.setup=hke;var nJ=b("net"),iJ=_s(),iT=se(),D0=it(),oJ=Yr(),lke=Qt(),sJ=Ft(),dke=Se(),pke="ip_resolver";function aJ(t){dke.trace(iT.LogVerbosity.DEBUG,pke,t)}var U0="ipv4",k0="ipv6",fke=443,oT=class{constructor(e,r,o){var s;this.listener=r,this.endpoints=[],this.error=null,this.hasReturnedResult=!1,aJ("Resolver constructed for target "+(0,sJ.uriToString)(e));let a=[];if(!(e.scheme===U0||e.scheme===k0)){this.error={code:iT.Status.UNAVAILABLE,details:`Unrecognized scheme ${e.scheme} in IP resolver`,metadata:new D0.Metadata};return}let i=e.path.split(",");for(let n of i){let c=(0,sJ.splitHostPort)(n);if(c===null){this.error={code:iT.Status.UNAVAILABLE,details:`Failed to parse ${e.scheme} address ${n}`,metadata:new D0.Metadata};return}if(e.scheme===U0&&!(0,nJ.isIPv4)(c.host)||e.scheme===k0&&!(0,nJ.isIPv6)(c.host)){this.error={code:iT.Status.UNAVAILABLE,details:`Failed to parse ${e.scheme} address ${n}`,metadata:new D0.Metadata};return}a.push({host:c.host,port:(s=c.port)!==null&&s!==void 0?s:fke})}this.endpoints=a.map(n=>({addresses:[n]})),aJ("Parsed "+e.scheme+" address list "+a.map(lke.subchannelAddressToString))}updateResolution(){this.hasReturnedResult||(this.hasReturnedResult=!0,process.nextTick(()=>{this.error?this.listener((0,iJ.statusOrFromError)(this.error),{},null,""):this.listener((0,iJ.statusOrFromValue)(this.endpoints),{},null,"")}))}destroy(){this.hasReturnedResult=!1}static getDefaultAuthority(e){return e.path.split(",")[0]}};function hke(){(0,oJ.registerResolver)(U0,oT),(0,oJ.registerResolver)(k0,oT)}});var pJ=p(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.RoundRobinLoadBalancer=void 0;Td.setup=Tke;var dJ=no(),_t=Vt(),Sd=Ai(),mke=Se(),_ke=se(),uJ=Qt(),gke=gd(),Eke="round_robin";function lJ(t){mke.trace(_ke.LogVerbosity.DEBUG,Eke,t)}var sT="round_robin",aT=class t{getLoadBalancerName(){return sT}constructor(){}toJsonObject(){return{[sT]:{}}}static createFromJson(e){return new t}},F0=class{constructor(e,r=0){this.children=e,this.nextIndex=r}pick(e){let r=this.children[this.nextIndex].picker;return this.nextIndex=(this.nextIndex+1)%this.children.length,r.pick(e)}peekNextEndpoint(){return this.children[this.nextIndex].endpoint}};function Ske(t,e){return[...t.slice(e),...t.slice(0,e)]}var cT=class{constructor(e){this.channelControlHelper=e,this.children=[],this.currentState=_t.ConnectivityState.IDLE,this.currentReadyPicker=null,this.updatesPaused=!1,this.lastError=null,this.childChannelControlHelper=(0,dJ.createChildChannelControlHelper)(e,{updateState:(r,o,s)=>{this.currentState===_t.ConnectivityState.READY&&r!==_t.ConnectivityState.READY&&this.channelControlHelper.requestReresolution(),s&&(this.lastError=s),this.calculateAndUpdateState()}})}countChildrenWithState(e){return this.children.filter(r=>r.getConnectivityState()===e).length}calculateAndUpdateState(){if(!this.updatesPaused){if(this.countChildrenWithState(_t.ConnectivityState.READY)>0){let e=this.children.filter(o=>o.getConnectivityState()===_t.ConnectivityState.READY),r=0;if(this.currentReadyPicker!==null){let o=this.currentReadyPicker.peekNextEndpoint();r=e.findIndex(s=>(0,uJ.endpointEqual)(s.getEndpoint(),o)),r<0&&(r=0)}this.updateState(_t.ConnectivityState.READY,new F0(e.map(o=>({endpoint:o.getEndpoint(),picker:o.getPicker()})),r),null)}else if(this.countChildrenWithState(_t.ConnectivityState.CONNECTING)>0)this.updateState(_t.ConnectivityState.CONNECTING,new Sd.QueuePicker(this),null);else if(this.countChildrenWithState(_t.ConnectivityState.TRANSIENT_FAILURE)>0){let e=`round_robin: No connection established. Last error: ${this.lastError}`;this.updateState(_t.ConnectivityState.TRANSIENT_FAILURE,new Sd.UnavailablePicker({details:e}),e)}else this.updateState(_t.ConnectivityState.IDLE,new Sd.QueuePicker(this),null);for(let e of this.children)e.getConnectivityState()===_t.ConnectivityState.IDLE&&e.exitIdle()}}updateState(e,r,o){lJ(_t.ConnectivityState[this.currentState]+" -> "+_t.ConnectivityState[e]),e===_t.ConnectivityState.READY?this.currentReadyPicker=r:this.currentReadyPicker=null,this.currentState=e,this.channelControlHelper.updateState(e,r,o)}resetSubchannelList(){for(let e of this.children)e.destroy();this.children=[]}updateAddressList(e,r,o,s){if(!(r instanceof aT))return!1;if(!e.ok)return this.children.length===0&&this.updateState(_t.ConnectivityState.TRANSIENT_FAILURE,new Sd.UnavailablePicker(e.error),e.error.details),!0;let a=Math.random()*e.value.length|0,i=Ske(e.value,a);if(this.resetSubchannelList(),i.length===0){let n=`No addresses resolved. Resolution note: ${s}`;this.updateState(_t.ConnectivityState.TRANSIENT_FAILURE,new Sd.UnavailablePicker({details:n}),n)}lJ("Connect to endpoint list "+i.map(uJ.endpointToString)),this.updatesPaused=!0,this.children=i.map(n=>new gke.LeafLoadBalancer(n,this.childChannelControlHelper,o,s));for(let n of this.children)n.startConnecting();return this.updatesPaused=!1,this.calculateAndUpdateState(),!0}exitIdle(){}resetBackoff(){}destroy(){this.resetSubchannelList()}getTypeName(){return sT}};Td.RoundRobinLoadBalancer=cT;function Tke(){(0,dJ.registerLoadBalancerType)(sT,cT,aT)}});var mJ=p(ws=>{"use strict";var V0;Object.defineProperty(ws,"__esModule",{value:!0});ws.OutlierDetectionLoadBalancer=ws.OutlierDetectionLoadBalancingConfig=void 0;ws.setup=Ike;var yke=Vt(),fJ=se(),xs=fd(),hJ=x0(),vke=no(),Ake=wE(),Oke=Ai(),G0=Qt(),bke=dd(),Rke=Se(),Pke="outlier_detection";function at(t){Rke.trace(fJ.LogVerbosity.DEBUG,Pke,t)}var Y0="outlier_detection",Cke=((V0=process.env.GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION)!==null&&V0!==void 0?V0:"true")==="true",Nke={stdev_factor:1900,enforcement_percentage:100,minimum_hosts:5,request_volume:100},Mke={threshold:85,enforcement_percentage:100,minimum_hosts:5,request_volume:50};function $c(t,e,r,o){if(e in t&&t[e]!==void 0&&typeof t[e]!==r){let s=o?`${o}.${e}`:e;throw new Error(`outlier detection config ${s} parse error: expected ${r}, got ${typeof t[e]}`)}}function q0(t,e,r){let o=r?`${r}.${e}`:e;if(e in t&&t[e]!==void 0){if(!(0,xs.isDuration)(t[e]))throw new Error(`outlier detection config ${o} parse error: expected Duration, got ${typeof t[e]}`);if(!(t[e].seconds>=0&&t[e].seconds<=315576e6&&t[e].nanos>=0&&t[e].nanos<=999999999))throw new Error(`outlier detection config ${o} parse error: values out of range for non-negative Duaration`)}}function uT(t,e,r){let o=r?`${r}.${e}`:e;if($c(t,e,"number",r),e in t&&t[e]!==void 0&&!(t[e]>=0&&t[e]<=100))throw new Error(`outlier detection config ${o} parse error: value out of range for percentage (0-100)`)}var yd=class t{constructor(e,r,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=r??3e4,this.maxEjectionTimeMs=o??3e5,this.maxEjectionPercent=s??10,this.successRateEjection=a?Object.assign(Object.assign({},Nke),a):null,this.failurePercentageEjection=i?Object.assign(Object.assign({},Mke),i):null}getLoadBalancerName(){return Y0}toJsonObject(){var e,r;return{outlier_detection:{interval:(0,xs.msToDuration)(this.intervalMs),base_ejection_time:(0,xs.msToDuration)(this.baseEjectionTimeMs),max_ejection_time:(0,xs.msToDuration)(this.maxEjectionTimeMs),max_ejection_percent:this.maxEjectionPercent,success_rate_ejection:(e=this.successRateEjection)!==null&&e!==void 0?e:void 0,failure_percentage_ejection:(r=this.failurePercentageEjection)!==null&&r!==void 0?r: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 r;if(q0(e,"interval"),q0(e,"base_ejection_time"),q0(e,"max_ejection_time"),uT(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");$c(e.success_rate_ejection,"stdev_factor","number","success_rate_ejection"),uT(e.success_rate_ejection,"enforcement_percentage","success_rate_ejection"),$c(e.success_rate_ejection,"minimum_hosts","number","success_rate_ejection"),$c(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");uT(e.failure_percentage_ejection,"threshold","failure_percentage_ejection"),uT(e.failure_percentage_ejection,"enforcement_percentage","failure_percentage_ejection"),$c(e.failure_percentage_ejection,"minimum_hosts","number","failure_percentage_ejection"),$c(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,vke.selectLbConfigFromList)(e.child_policy);if(!o)throw new Error("outlier detection config child_policy: no valid recognized policy found");return new t(e.interval?(0,xs.durationToMs)(e.interval):null,e.base_ejection_time?(0,xs.durationToMs)(e.base_ejection_time):null,e.max_ejection_time?(0,xs.durationToMs)(e.max_ejection_time):null,(r=e.max_ejection_percent)!==null&&r!==void 0?r:null,e.success_rate_ejection,e.failure_percentage_ejection,o)}};ws.OutlierDetectionLoadBalancingConfig=yd;var H0=class extends bke.BaseSubchannelWrapper{constructor(e,r){super(e),this.mapEntry=r,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 j0(){return{success:0,failure:0}}var z0=class{constructor(){this.activeBucket=j0(),this.inactiveBucket=j0()}addSuccess(){this.activeBucket.success+=1}addFailure(){this.activeBucket.failure+=1}switchBuckets(){this.inactiveBucket=this.activeBucket,this.activeBucket=j0()}getLastSuccesses(){return this.inactiveBucket.success}getLastFailures(){return this.inactiveBucket.failure}},$0=class{constructor(e,r){this.wrappedPicker=e,this.countCalls=r}pick(e){let r=this.wrappedPicker.pick(e);if(r.pickResultType===Oke.PickResultType.COMPLETE){let o=r.subchannel,s=o.getMapEntry();if(s){let a=r.onCallEnded;return this.countCalls&&(a=(i,n,c)=>{var u;i===fJ.Status.OK?s.counter.addSuccess():s.counter.addFailure(),(u=r.onCallEnded)===null||u===void 0||u.call(r,i,n,c)}),Object.assign(Object.assign({},r),{subchannel:o.getWrappedSubchannel(),onCallEnded:a})}else return Object.assign(Object.assign({},r),{subchannel:o.getWrappedSubchannel()})}else return r}},lT=class{constructor(e){this.entryMap=new G0.EndpointMap,this.latestConfig=null,this.timerStartTime=null,this.childBalancer=new Ake.ChildLoadBalancerHandler((0,hJ.createChildChannelControlHelper)(e,{createSubchannel:(r,o)=>{let s=e.createSubchannel(r,o),a=this.entryMap.getForSubchannelAddress(r),i=new H0(s,a);return a?.currentEjectionTimestamp!==null&&i.eject(),a?.subchannelWrappers.push(i),i},updateState:(r,o,s)=>{r===yke.ConnectivityState.READY?e.updateState(r,new $0(o,this.isCountingEnabled()),s):e.updateState(r,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 r of this.entryMap.values())r.currentEjectionTimestamp!==null&&(e+=1);return e*100/this.entryMap.size}runSuccessRateCheck(e){if(!this.latestConfig)return;let r=this.latestConfig.getSuccessRateEjectionConfig();if(!r)return;at("Running success rate check");let o=r.request_volume,s=0,a=[];for(let[d,h]of this.entryMap.entries()){let g=h.counter.getLastSuccesses(),E=h.counter.getLastFailures();at("Stats for "+(0,G0.endpointToString)(d)+": successes="+g+" failures="+E+" targetRequestVolume="+o),g+E>=o&&(s+=1,a.push(g/(g+E)))}if(at("Found "+s+" success rate candidates; currentEjectionPercent="+this.getCurrentEjectionPercent()+" successRates=["+a+"]"),s<r.minimum_hosts)return;let i=a.reduce((d,h)=>d+h)/a.length,n=0;for(let d of a){let h=d-i;n+=h*h}let c=n/a.length,u=Math.sqrt(c),l=i-u*(r.stdev_factor/1e3);at("stdev="+u+" ejectionThreshold="+l);for(let[d,h]of this.entryMap.entries()){if(this.getCurrentEjectionPercent()>=this.latestConfig.getMaxEjectionPercent())break;let g=h.counter.getLastSuccesses(),E=h.counter.getLastFailures();if(g+E<o)continue;let S=g/(g+E);if(at("Checking candidate "+d+" successRate="+S),S<l){let v=Math.random()*100;at("Candidate "+d+" randomNumber="+v+" enforcement_percentage="+r.enforcement_percentage),v<r.enforcement_percentage&&(at("Ejecting candidate "+d),this.eject(h,e))}}}runFailurePercentageCheck(e){if(!this.latestConfig)return;let r=this.latestConfig.getFailurePercentageEjectionConfig();if(!r)return;at("Running failure percentage check. threshold="+r.threshold+" request volume threshold="+r.request_volume);let o=0;for(let s of this.entryMap.values()){let a=s.counter.getLastSuccesses(),i=s.counter.getLastFailures();a+i>=r.request_volume&&(o+=1)}if(!(o<r.minimum_hosts))for(let[s,a]of this.entryMap.entries()){if(this.getCurrentEjectionPercent()>=this.latestConfig.getMaxEjectionPercent())break;let i=a.counter.getLastSuccesses(),n=a.counter.getLastFailures();if(at("Candidate successes="+i+" failures="+n),i+n<r.request_volume)continue;if(n*100/(n+i)>r.threshold){let u=Math.random()*100;at("Candidate "+s+" randomNumber="+u+" enforcement_percentage="+r.enforcement_percentage),u<r.enforcement_percentage&&(at("Ejecting candidate "+s),this.eject(a,e))}}}eject(e,r){e.currentEjectionTimestamp=new Date,e.ejectionTimeMultiplier+=1;for(let o of e.subchannelWrappers)o.eject()}uneject(e){e.currentEjectionTimestamp=null;for(let r of e.subchannelWrappers)r.uneject()}switchAllBuckets(){for(let e of this.entryMap.values())e.counter.switchBuckets()}startTimer(e){var r,o;this.ejectionTimer=setTimeout(()=>this.runChecks(),e),(o=(r=this.ejectionTimer).unref)===null||o===void 0||o.call(r)}runChecks(){let e=new Date;if(at("Ejection timer running"),this.switchAllBuckets(),!!this.latestConfig){this.timerStartTime=e,this.startTimer(this.latestConfig.getIntervalMs()),this.runSuccessRateCheck(e),this.runFailurePercentageCheck(e);for(let[r,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<new Date&&(at("Unejecting "+r),this.uneject(o))}}}updateAddressList(e,r,o,s){if(!(r instanceof yd))return!1;if(at("Received update with config: "+JSON.stringify(r.toJsonObject(),void 0,2)),e.ok){for(let i of e.value)this.entryMap.has(i)||(at("Adding map entry for "+(0,G0.endpointToString)(i)),this.entryMap.set(i,{counter:new z0,currentEjectionTimestamp:null,ejectionTimeMultiplier:0,subchannelWrappers:[]}));this.entryMap.deleteMissing(e.value)}let a=r.getChildPolicy();if(this.childBalancer.updateAddressList(e,a,o,s),r.getSuccessRateEjectionConfig()||r.getFailurePercentageEjectionConfig())if(this.timerStartTime){at("Previous timer existed. Replacing timer"),clearTimeout(this.ejectionTimer);let i=r.getIntervalMs()-(new Date().getTime()-this.timerStartTime.getTime());this.startTimer(i)}else at("Starting new timer"),this.timerStartTime=new Date,this.startTimer(r.getIntervalMs()),this.switchAllBuckets();else{at("Counting disabled. Cancelling timer."),this.timerStartTime=null,clearTimeout(this.ejectionTimer);for(let i of this.entryMap.values())this.uneject(i),i.ejectionTimeMultiplier=0}return this.latestConfig=r,!0}exitIdle(){this.childBalancer.exitIdle()}resetBackoff(){this.childBalancer.resetBackoff()}destroy(){clearTimeout(this.ejectionTimer),this.childBalancer.destroy()}getTypeName(){return Y0}};ws.OutlierDetectionLoadBalancer=lT;function Ike(){Cke&&(0,hJ.registerLoadBalancerType)(Y0,lT,yd)}});var _J=p(pT=>{"use strict";Object.defineProperty(pT,"__esModule",{value:!0});pT.PriorityQueue=void 0;var Yc=0,W0=t=>Math.floor(t/2),dT=t=>t*2+1,vd=t=>t*2+2,K0=class{constructor(e=(r,o)=>r>o){this.comparator=e,this.heap=[]}size(){return this.heap.length}isEmpty(){return this.size()==0}peek(){return this.heap[Yc]}push(...e){return e.forEach(r=>{this.heap.push(r),this.siftUp()}),this.size()}pop(){let e=this.peek(),r=this.size()-1;return r>Yc&&this.swap(Yc,r),this.heap.pop(),this.siftDown(),e}replace(e){let r=this.peek();return this.heap[Yc]=e,this.siftDown(),r}greater(e,r){return this.comparator(this.heap[e],this.heap[r])}swap(e,r){[this.heap[e],this.heap[r]]=[this.heap[r],this.heap[e]]}siftUp(){let e=this.size()-1;for(;e>Yc&&this.greater(e,W0(e));)this.swap(e,W0(e)),e=W0(e)}siftDown(){let e=Yc;for(;dT(e)<this.size()&&this.greater(dT(e),e)||vd(e)<this.size()&&this.greater(vd(e),e);){let r=vd(e)<this.size()&&this.greater(vd(e),dT(e))?vd(e):dT(e);this.swap(e,r),e=r}}};pT.PriorityQueue=K0});var yJ=p(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});Od.WeightedRoundRobinLoadBalancingConfig=void 0;Od.setup=qke;var ct=Vt(),xke=se(),fr=fd(),SJ=no(),wke=gd(),Lke=Se(),TJ=KS(),Wc=Ai(),Dke=_J(),gJ=Qt(),Uke="weighted_round_robin";function X0(t){Lke.trace(xke.LogVerbosity.DEBUG,Uke,t)}var Z0="weighted_round_robin",kke=1e4,Bke=1e4,Fke=3*6e4,Vke=1e3,Gke=1;function EJ(t,e,r){if(e in t&&t[e]!==void 0&&typeof t[e]!==r)throw new Error(`weighted round robin config ${e} parse error: expected ${r}, got ${typeof t[e]}`)}function fT(t,e){if(e in t&&t[e]!==void 0&&t[e]!==null){let r;if((0,fr.isDuration)(t[e]))r=t[e];else if((0,fr.isDurationMessage)(t[e]))r=(0,fr.durationMessageToDuration)(t[e]);else if(typeof t[e]=="string"){let o=(0,fr.parseDuration)(t[e]);if(!o)throw new Error(`weighted round robin config ${e}: failed to parse duration string ${t[e]}`);r=o}else throw new Error(`weighted round robin config ${e}: expected duration, got ${typeof t[e]}`);return(0,fr.durationToMs)(r)}return null}var Ad=class t{constructor(e,r,o,s,a,i){this.enableOobLoadReport=e??!1,this.oobLoadReportingPeriodMs=r??kke,this.blackoutPeriodMs=o??Bke,this.weightExpirationPeriodMs=s??Fke,this.weightUpdatePeriodMs=Math.max(a??Vke,100),this.errorUtilizationPenalty=i??Gke}getLoadBalancerName(){return Z0}toJsonObject(){return{enable_oob_load_report:this.enableOobLoadReport,oob_load_reporting_period:(0,fr.durationToString)((0,fr.msToDuration)(this.oobLoadReportingPeriodMs)),blackout_period:(0,fr.durationToString)((0,fr.msToDuration)(this.blackoutPeriodMs)),weight_expiration_period:(0,fr.durationToString)((0,fr.msToDuration)(this.weightExpirationPeriodMs)),weight_update_period:(0,fr.durationToString)((0,fr.msToDuration)(this.weightUpdatePeriodMs)),error_utilization_penalty:this.errorUtilizationPenalty}}static createFromJson(e){if(EJ(e,"enable_oob_load_report","boolean"),EJ(e,"error_utilization_penalty","number"),e.error_utilization_penalty<0)throw new Error("weighted round robin config error_utilization_penalty < 0");return new t(e.enable_oob_load_report,fT(e,"oob_load_reporting_period"),fT(e,"blackout_period"),fT(e,"weight_expiration_period"),fT(e,"weight_update_period"),e.error_utilization_penalty)}getEnableOobLoadReport(){return this.enableOobLoadReport}getOobLoadReportingPeriodMs(){return this.oobLoadReportingPeriodMs}getBlackoutPeriodMs(){return this.blackoutPeriodMs}getWeightExpirationPeriodMs(){return this.weightExpirationPeriodMs}getWeightUpdatePeriodMs(){return this.weightUpdatePeriodMs}getErrorUtilizationPenalty(){return this.errorUtilizationPenalty}};Od.WeightedRoundRobinLoadBalancingConfig=Ad;var J0=class{constructor(e,r){this.metricsHandler=r,this.queue=new Dke.PriorityQueue((a,i)=>a.deadline<i.deadline);let o=e.filter(a=>a.weight>0),s;if(o.length<2)s=1;else{let a=0;for(let{weight:i}of o)a+=i;s=a/o.length}for(let a of e){let i=a.weight>0?1/a.weight:s;this.queue.push({endpointName:a.endpointName,picker:a.picker,period:i,deadline:Math.random()*i})}}pick(e){let r=this.queue.pop();this.queue.push(Object.assign(Object.assign({},r),{deadline:r.deadline+r.period}));let o=r.picker.pick(e);if(o.pickResultType===Wc.PickResultType.COMPLETE){if(this.metricsHandler)return Object.assign(Object.assign({},o),{onCallEnded:(0,TJ.createMetricsReader)(s=>this.metricsHandler(s,r.endpointName),o.onCallEnded)});{let s=o.subchannel;return Object.assign(Object.assign({},o),{subchannel:s.getWrappedSubchannel()})}}else return o}},Q0=class{constructor(e){this.channelControlHelper=e,this.latestConfig=null,this.children=new Map,this.currentState=ct.ConnectivityState.IDLE,this.updatesPaused=!1,this.lastError=null,this.weightUpdateTimer=null}countChildrenWithState(e){let r=0;for(let o of this.children.values())o.child.getConnectivityState()===e&&(r+=1);return r}updateWeight(e,r){var o,s;let a=r.rps_fractional,i=r.application_utilization;i>0&&a>0&&(i+=r.eps/a*((s=(o=this.latestConfig)===null||o===void 0?void 0:o.getErrorUtilizationPenalty())!==null&&s!==void 0?s:0));let n=i===0?0:a/i;if(n===0)return;let c=new Date;e.nonEmptySince===null&&(e.nonEmptySince=c),e.lastUpdated=c,e.weight=n}getWeight(e){if(!this.latestConfig)return 0;let r=new Date().getTime();if(r-e.lastUpdated.getTime()>=this.latestConfig.getWeightExpirationPeriodMs())return e.nonEmptySince=null,0;let o=this.latestConfig.getBlackoutPeriodMs();return o>0&&(e.nonEmptySince===null||r-e.nonEmptySince.getTime()<o)?0:e.weight}calculateAndUpdateState(){if(!(this.updatesPaused||!this.latestConfig)){if(this.countChildrenWithState(ct.ConnectivityState.READY)>0){let e=[];for(let[o,s]of this.children)s.child.getConnectivityState()===ct.ConnectivityState.READY&&e.push({endpointName:o,picker:s.child.getPicker(),weight:this.getWeight(s)});X0("Created picker with weights: "+e.map(o=>o.endpointName+":"+o.weight).join(","));let r;this.latestConfig.getEnableOobLoadReport()?r=null:r=(o,s)=>{let a=this.children.get(s);a&&this.updateWeight(a,o)},this.updateState(ct.ConnectivityState.READY,new J0(e,r),null)}else if(this.countChildrenWithState(ct.ConnectivityState.CONNECTING)>0)this.updateState(ct.ConnectivityState.CONNECTING,new Wc.QueuePicker(this),null);else if(this.countChildrenWithState(ct.ConnectivityState.TRANSIENT_FAILURE)>0){let e=`weighted_round_robin: No connection established. Last error: ${this.lastError}`;this.updateState(ct.ConnectivityState.TRANSIENT_FAILURE,new Wc.UnavailablePicker({details:e}),e)}else this.updateState(ct.ConnectivityState.IDLE,new Wc.QueuePicker(this),null);for(let{child:e}of this.children.values())e.getConnectivityState()===ct.ConnectivityState.IDLE&&e.exitIdle()}}updateState(e,r,o){X0(ct.ConnectivityState[this.currentState]+" -> "+ct.ConnectivityState[e]),this.currentState=e,this.channelControlHelper.updateState(e,r,o)}updateAddressList(e,r,o,s){var a,i;if(!(r instanceof Ad))return!1;if(!e.ok)return this.children.size===0&&this.updateState(ct.ConnectivityState.TRANSIENT_FAILURE,new Wc.UnavailablePicker(e.error),e.error.details),!0;if(e.value.length===0){let u=`No addresses resolved. Resolution note: ${s}`;return this.updateState(ct.ConnectivityState.TRANSIENT_FAILURE,new Wc.UnavailablePicker({details:u}),u),!1}X0("Connect to endpoint list "+e.value.map(gJ.endpointToString));let n=new Date,c=new Set;this.updatesPaused=!0,this.latestConfig=r;for(let u of e.value){let l=(0,gJ.endpointToString)(u);c.add(l);let d=this.children.get(l);d||(d={child:new wke.LeafLoadBalancer(u,(0,SJ.createChildChannelControlHelper)(this.channelControlHelper,{updateState:(h,g,E)=>{this.currentState===ct.ConnectivityState.READY&&h!==ct.ConnectivityState.READY&&this.channelControlHelper.requestReresolution(),h===ct.ConnectivityState.READY&&(d.nonEmptySince=null),E&&(this.lastError=E),this.calculateAndUpdateState()},createSubchannel:(h,g)=>{let E=this.channelControlHelper.createSubchannel(h,g);return d?.oobMetricsListener?new TJ.OrcaOobMetricsSubchannelWrapper(E,d.oobMetricsListener,this.latestConfig.getOobLoadReportingPeriodMs()):E}}),o,s),lastUpdated:n,nonEmptySince:null,weight:0,oobMetricsListener:null},this.children.set(l,d)),r.getEnableOobLoadReport()?d.oobMetricsListener=h=>{this.updateWeight(d,h)}:d.oobMetricsListener=null}for(let[u,l]of this.children)c.has(u)?l.child.startConnecting():(l.child.destroy(),this.children.delete(u));return this.updatesPaused=!1,this.calculateAndUpdateState(),this.weightUpdateTimer&&clearInterval(this.weightUpdateTimer),this.weightUpdateTimer=(i=(a=setInterval(()=>{this.currentState===ct.ConnectivityState.READY&&this.calculateAndUpdateState()},r.getWeightUpdatePeriodMs())).unref)===null||i===void 0?void 0:i.call(a),!0}exitIdle(){}resetBackoff(){}destroy(){for(let e of this.children.values())e.child.destroy();this.children.clear(),this.weightUpdateTimer&&clearInterval(this.weightUpdateTimer)}getTypeName(){return Z0}};function qke(){(0,SJ.registerLoadBalancerType)(Z0,Q0,Ad)}});var bd=p(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.experimental=B.ServerMetricRecorder=B.ServerInterceptingCall=B.ResponderBuilder=B.ServerListenerBuilder=B.addAdminServicesToServer=B.getChannelzHandlers=B.getChannelzServiceDefinition=B.InterceptorConfigurationError=B.InterceptingCall=B.RequesterBuilder=B.ListenerBuilder=B.StatusBuilder=B.getClientChannel=B.ServerCredentials=B.Server=B.setLogVerbosity=B.setLogger=B.load=B.loadObject=B.CallCredentials=B.ChannelCredentials=B.waitForClientReady=B.closeClient=B.Channel=B.makeGenericClientConstructor=B.makeClientConstructor=B.loadPackageDefinition=B.Client=B.compressionAlgorithms=B.propagate=B.connectivityState=B.status=B.logVerbosity=B.Metadata=B.credentials=void 0;var hT=vE();Object.defineProperty(B,"CallCredentials",{enumerable:!0,get:function(){return hT.CallCredentials}});var jke=nM();Object.defineProperty(B,"Channel",{enumerable:!0,get:function(){return jke.ChannelImplementation}});var Hke=iI();Object.defineProperty(B,"compressionAlgorithms",{enumerable:!0,get:function(){return Hke.CompressionAlgorithms}});var zke=Vt();Object.defineProperty(B,"connectivityState",{enumerable:!0,get:function(){return zke.ConnectivityState}});var mT=Ec();Object.defineProperty(B,"ChannelCredentials",{enumerable:!0,get:function(){return mT.ChannelCredentials}});var vJ=rM();Object.defineProperty(B,"Client",{enumerable:!0,get:function(){return vJ.Client}});var ex=se();Object.defineProperty(B,"logVerbosity",{enumerable:!0,get:function(){return ex.LogVerbosity}});Object.defineProperty(B,"status",{enumerable:!0,get:function(){return ex.Status}});Object.defineProperty(B,"propagate",{enumerable:!0,get:function(){return ex.Propagate}});var AJ=Se(),tx=jE();Object.defineProperty(B,"loadPackageDefinition",{enumerable:!0,get:function(){return tx.loadPackageDefinition}});Object.defineProperty(B,"makeClientConstructor",{enumerable:!0,get:function(){return tx.makeClientConstructor}});Object.defineProperty(B,"makeGenericClientConstructor",{enumerable:!0,get:function(){return tx.makeClientConstructor}});var $ke=it();Object.defineProperty(B,"Metadata",{enumerable:!0,get:function(){return $ke.Metadata}});var Yke=j9();Object.defineProperty(B,"Server",{enumerable:!0,get:function(){return Yke.Server}});var Wke=YS();Object.defineProperty(B,"ServerCredentials",{enumerable:!0,get:function(){return Wke.ServerCredentials}});var Kke=H9();Object.defineProperty(B,"StatusBuilder",{enumerable:!0,get:function(){return Kke.StatusBuilder}});B.credentials={combineChannelCredentials:(t,...e)=>e.reduce((r,o)=>r.compose(o),t),combineCallCredentials:(t,...e)=>e.reduce((r,o)=>r.compose(o),t),createInsecure:mT.ChannelCredentials.createInsecure,createSsl:mT.ChannelCredentials.createSsl,createFromSecureContext:mT.ChannelCredentials.createFromSecureContext,createFromMetadataGenerator:hT.CallCredentials.createFromMetadataGenerator,createFromGoogleCredential:hT.CallCredentials.createFromGoogleCredential,createEmpty:hT.CallCredentials.createEmpty};var Xke=t=>t.close();B.closeClient=Xke;var Jke=(t,e,r)=>t.waitForReady(e,r);B.waitForClientReady=Jke;var Qke=(t,e)=>{throw new Error("Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead")};B.loadObject=Qke;var Zke=(t,e,r)=>{throw new Error("Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead")};B.load=Zke;var eBe=t=>{AJ.setLogger(t)};B.setLogger=eBe;var tBe=t=>{AJ.setLoggerVerbosity(t)};B.setLogVerbosity=tBe;var rBe=t=>vJ.Client.prototype.getChannel.call(t);B.getClientChannel=rBe;var _T=ZN();Object.defineProperty(B,"ListenerBuilder",{enumerable:!0,get:function(){return _T.ListenerBuilder}});Object.defineProperty(B,"RequesterBuilder",{enumerable:!0,get:function(){return _T.RequesterBuilder}});Object.defineProperty(B,"InterceptingCall",{enumerable:!0,get:function(){return _T.InterceptingCall}});Object.defineProperty(B,"InterceptorConfigurationError",{enumerable:!0,get:function(){return _T.InterceptorConfigurationError}});var OJ=fo();Object.defineProperty(B,"getChannelzServiceDefinition",{enumerable:!0,get:function(){return OJ.getChannelzServiceDefinition}});Object.defineProperty(B,"getChannelzHandlers",{enumerable:!0,get:function(){return OJ.getChannelzHandlers}});var nBe=BE();Object.defineProperty(B,"addAdminServicesToServer",{enumerable:!0,get:function(){return nBe.addAdminServicesToServer}});var rx=T0();Object.defineProperty(B,"ServerListenerBuilder",{enumerable:!0,get:function(){return rx.ServerListenerBuilder}});Object.defineProperty(B,"ResponderBuilder",{enumerable:!0,get:function(){return rx.ResponderBuilder}});Object.defineProperty(B,"ServerInterceptingCall",{enumerable:!0,get:function(){return rx.ServerInterceptingCall}});var iBe=KS();Object.defineProperty(B,"ServerMetricRecorder",{enumerable:!0,get:function(){return iBe.ServerMetricRecorder}});var oBe=x0();B.experimental=oBe;var sBe=AI(),aBe=rJ(),cBe=cJ(),uBe=gd(),lBe=pJ(),dBe=mJ(),pBe=yJ(),fBe=fo();sBe.setup(),aBe.setup(),cBe.setup(),uBe.setup(),lBe.setup(),dBe.setup(),pBe.setup(),fBe.setup()});var bJ=p(gT=>{"use strict";Object.defineProperty(gT,"__esModule",{value:!0});gT.createServiceClientConstructor=void 0;var hBe=bd();function mBe(t,e){let r={export:{path:t,requestStream:!1,responseStream:!1,requestSerialize:o=>o,requestDeserialize:o=>o,responseSerialize:o=>o,responseDeserialize:o=>o}};return hBe.makeGenericClientConstructor(r,e)}gT.createServiceClientConstructor=mBe});var Rd=p(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.createOtlpGrpcExporterTransport=xr.GrpcExporterTransport=xr.createEmptyMetadata=xr.createSslCredentials=xr.createInsecureCredentials=void 0;var _Be=0,gBe=2;function EBe(t){return t==="gzip"?gBe:_Be}function SBe(){let{credentials:t}=bd();return t.createInsecure()}xr.createInsecureCredentials=SBe;function TBe(t,e,r){let{credentials:o}=bd();return o.createSsl(t,e,r)}xr.createSslCredentials=TBe;function yBe(){let{Metadata:t}=bd();return new t}xr.createEmptyMetadata=yBe;var ET=class{_parameters;_client;_metadata;constructor(e){this._parameters=e}shutdown(){this._client?.close()}send(e,r){let o=Buffer.from(e);if(this._client==null){let{createServiceClientConstructor:s}=bJ();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":EBe(this._parameters.compression)})}catch(i){return Promise.resolve({status:"failure",error:i})}}return new Promise(s=>{let a=Date.now()+r;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"})})})}};xr.GrpcExporterTransport=ET;function vBe(t){return new ET(t)}xr.createOtlpGrpcExporterTransport=vBe});var RJ=p(ST=>{"use strict";Object.defineProperty(ST,"__esModule",{value:!0});ST.VERSION=void 0;ST.VERSION="0.206.0"});var IJ=p(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.getOtlpGrpcDefaultConfiguration=To.mergeOtlpGrpcConfigurationWithDefaults=To.validateAndNormalizeUrl=void 0;var NJ=(kn(),y(Un)),Pd=Rd(),ABe=RJ(),OBe=b("url"),PJ=(R(),y(C));function MJ(t){t=t.trim(),t.match(/^([\w]{1,8}):\/\//)||(t=`https://${t}`);let r=new OBe.URL(t);return r.protocol==="unix:"?t:(r.pathname&&r.pathname!=="/"&&PJ.diag.warn("URL path should not be set when using grpc, the path part of the URL will be ignored."),r.protocol!==""&&!r.protocol?.match(/^(http)s?:$/)&&PJ.diag.warn("URL protocol should be http(s)://. Using http://."),r.host)}To.validateAndNormalizeUrl=MJ;function CJ(t,e){for(let[r,o]of Object.entries(e.getMap()))t.get(r).length<1&&t.set(r,o)}function bBe(t,e,r){let o=t.url??e.url??r.url;return{...(0,NJ.mergeOtlpSharedConfigurationWithDefaults)(t,e,r),metadata:()=>{let s=r.metadata();return CJ(s,t.metadata?.().clone()??(0,Pd.createEmptyMetadata)()),CJ(s,e.metadata?.()??(0,Pd.createEmptyMetadata)()),s},url:MJ(o),credentials:t.credentials??e.credentials?.(o)??r.credentials(o)}}To.mergeOtlpGrpcConfigurationWithDefaults=bBe;function RBe(){return{...(0,NJ.getSharedConfigurationDefaults)(),metadata:()=>{let t=(0,Pd.createEmptyMetadata)();return t.set("User-Agent",`OTel-OTLP-Exporter-JavaScript/${ABe.VERSION}`),t},url:"http://localhost:4317",credentials:t=>t.startsWith("http://")?()=>(0,Pd.createInsecureCredentials)():()=>(0,Pd.createSslCredentials)()}}To.getOtlpGrpcDefaultConfiguration=RBe});var UJ=p(TT=>{"use strict";Object.defineProperty(TT,"__esModule",{value:!0});TT.getOtlpGrpcConfigurationFromEnv=void 0;var xJ=K(),Cd=Rd(),PBe=(yi(),y(eo)),CBe=b("fs"),NBe=b("path"),LJ=(R(),y(C));function nx(t,e){if(t!=null&&t!=="")return t;if(e!=null&&e!=="")return e}function MBe(t){let e=process.env[`OTEL_EXPORTER_OTLP_${t}_HEADERS`]?.trim(),r=process.env.OTEL_EXPORTER_OTLP_HEADERS?.trim(),o=(0,xJ.parseKeyPairsIntoRecord)(e),s=(0,xJ.parseKeyPairsIntoRecord)(r);if(Object.keys(o).length===0&&Object.keys(s).length===0)return;let a=Object.assign({},s,o),i=(0,Cd.createEmptyMetadata)();for(let[n,c]of Object.entries(a))i.set(n,c);return i}function IBe(t){let e=MBe(t);if(e!=null)return()=>e}function xBe(t){let e=process.env[`OTEL_EXPORTER_OTLP_${t}_ENDPOINT`]?.trim(),r=process.env.OTEL_EXPORTER_OTLP_ENDPOINT?.trim();return nx(e,r)}function wBe(t){let e=process.env[`OTEL_EXPORTER_OTLP_${t}_INSECURE`]?.toLowerCase().trim(),r=process.env.OTEL_EXPORTER_OTLP_INSECURE?.toLowerCase().trim();return nx(e,r)==="true"}function ix(t,e,r){let o=process.env[t]?.trim(),s=process.env[e]?.trim(),a=nx(o,s);if(a!=null)try{return CBe.readFileSync(NBe.resolve(process.cwd(),a))}catch{LJ.diag.warn(r);return}else return}function LBe(t){return ix(`OTEL_EXPORTER_OTLP_${t}_CLIENT_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE","Failed to read client certificate chain file")}function DBe(t){return ix(`OTEL_EXPORTER_OTLP_${t}_CLIENT_KEY`,"OTEL_EXPORTER_OTLP_CLIENT_KEY","Failed to read client certificate private key file")}function wJ(t){return ix(`OTEL_EXPORTER_OTLP_${t}_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CERTIFICATE","Failed to read root certificate file")}function DJ(t){let e=DBe(t),r=LBe(t),o=wJ(t),s=e!=null&&r!=null;return o!=null&&!s?(LJ.diag.warn("Client key and certificate must both be provided, but one was missing - attempting to create credentials from just the root certificate"),(0,Cd.createSslCredentials)(wJ(t))):(0,Cd.createSslCredentials)(o,e,r)}function UBe(t){return wBe(t)?(0,Cd.createInsecureCredentials)():DJ(t)}function kBe(t){return{...(0,PBe.getSharedConfigurationFromEnvironment)(t),metadata:IBe(t),url:xBe(t),credentials:e=>e.startsWith("http://")?()=>(0,Cd.createInsecureCredentials)():e.startsWith("https://")?()=>DJ(t):()=>UBe(t)}}TT.getOtlpGrpcConfigurationFromEnv=kBe});var BJ=p(yT=>{"use strict";Object.defineProperty(yT,"__esModule",{value:!0});yT.convertLegacyOtlpGrpcOptions=void 0;var BBe=(R(),y(C)),kJ=IJ(),FBe=Rd(),VBe=UJ();function GBe(t,e){t.headers&&BBe.diag.warn("Headers cannot be set when using grpc");let r=t.credentials;return(0,kJ.mergeOtlpGrpcConfigurationWithDefaults)({url:t.url,metadata:()=>t.metadata??(0,FBe.createEmptyMetadata)(),compression:t.compression,timeoutMillis:t.timeoutMillis,concurrencyLimit:t.concurrencyLimit,credentials:r!=null?()=>r:void 0},(0,VBe.getOtlpGrpcConfigurationFromEnv)(e),(0,kJ.getOtlpGrpcDefaultConfiguration)())}yT.convertLegacyOtlpGrpcOptions=GBe});var FJ=p(vT=>{"use strict";Object.defineProperty(vT,"__esModule",{value:!0});vT.createOtlpGrpcExportDelegate=void 0;var qBe=(kn(),y(Un)),jBe=Rd();function HBe(t,e,r,o){return(0,qBe.createOtlpNetworkExportDelegate)(t,e,(0,jBe.createOtlpGrpcExporterTransport)({address:t.url,compression:t.compression,credentials:t.credentials,metadata:t.metadata,grpcName:r,grpcPath:o}))}vT.createOtlpGrpcExportDelegate=HBe});var AT=p(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});Kc.createOtlpGrpcExportDelegate=Kc.convertLegacyOtlpGrpcOptions=void 0;var zBe=BJ();Object.defineProperty(Kc,"convertLegacyOtlpGrpcOptions",{enumerable:!0,get:function(){return zBe.convertLegacyOtlpGrpcOptions}});var $Be=FJ();Object.defineProperty(Kc,"createOtlpGrpcExportDelegate",{enumerable:!0,get:function(){return $Be.createOtlpGrpcExportDelegate}})});var GJ=p(OT=>{"use strict";Object.defineProperty(OT,"__esModule",{value:!0});OT.OTLPLogExporter=void 0;var VJ=AT(),YBe=qn(),WBe=(kn(),y(Un)),ox=class extends WBe.OTLPExporterBase{constructor(e={}){super((0,VJ.createOtlpGrpcExportDelegate)((0,VJ.convertLegacyOtlpGrpcOptions)(e,"LOGS"),YBe.ProtobufLogsSerializer,"LogsExportService","/opentelemetry.proto.collector.logs.v1.LogsService/Export"))}};OT.OTLPLogExporter=ox});var qJ=p(bT=>{"use strict";Object.defineProperty(bT,"__esModule",{value:!0});bT.OTLPLogExporter=void 0;var KBe=GJ();Object.defineProperty(bT,"OTLPLogExporter",{enumerable:!0,get:function(){return KBe.OTLPLogExporter}})});var jJ=p(RT=>{"use strict";Object.defineProperty(RT,"__esModule",{value:!0});RT.VERSION=void 0;RT.VERSION="0.206.0"});var zJ=p(PT=>{"use strict";Object.defineProperty(PT,"__esModule",{value:!0});PT.OTLPLogExporter=void 0;var XBe=(kn(),y(Un)),JBe=qn(),HJ=(yi(),y(eo)),QBe=jJ(),sx=class extends XBe.OTLPExporterBase{constructor(e={}){super((0,HJ.createOtlpHttpExportDelegate)((0,HJ.convertLegacyHttpOptions)(e,"LOGS","v1/logs",{"User-Agent":`OTel-OTLP-Exporter-JavaScript/${QBe.VERSION}`,"Content-Type":"application/x-protobuf"}),JBe.ProtobufLogsSerializer))}};PT.OTLPLogExporter=sx});var $J=p(CT=>{"use strict";Object.defineProperty(CT,"__esModule",{value:!0});CT.OTLPLogExporter=void 0;var ZBe=zJ();Object.defineProperty(CT,"OTLPLogExporter",{enumerable:!0,get:function(){return ZBe.OTLPLogExporter}})});var YJ=p(NT=>{"use strict";Object.defineProperty(NT,"__esModule",{value:!0});NT.OTLPLogExporter=void 0;var eFe=$J();Object.defineProperty(NT,"OTLPLogExporter",{enumerable:!0,get:function(){return eFe.OTLPLogExporter}})});var WJ=p(MT=>{"use strict";Object.defineProperty(MT,"__esModule",{value:!0});MT.OTLPLogExporter=void 0;var tFe=YJ();Object.defineProperty(MT,"OTLPLogExporter",{enumerable:!0,get:function(){return tFe.OTLPLogExporter}})});var ax=p(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.AggregationTemporalityPreference=void 0;var rFe;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE",t[t.LOWMEMORY=2]="LOWMEMORY"})(rFe=Nd.AggregationTemporalityPreference||(Nd.AggregationTemporalityPreference={}))});var ux=p(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.OTLPMetricExporterBase=gt.LowMemoryTemporalitySelector=gt.DeltaTemporalitySelector=gt.CumulativeTemporalitySelector=void 0;var nFe=K(),$e=Ei(),KJ=ax(),iFe=(kn(),y(Un)),oFe=(R(),y(C)),sFe=()=>$e.AggregationTemporality.CUMULATIVE;gt.CumulativeTemporalitySelector=sFe;var aFe=t=>{switch(t){case $e.InstrumentType.COUNTER:case $e.InstrumentType.OBSERVABLE_COUNTER:case $e.InstrumentType.GAUGE:case $e.InstrumentType.HISTOGRAM:case $e.InstrumentType.OBSERVABLE_GAUGE:return $e.AggregationTemporality.DELTA;case $e.InstrumentType.UP_DOWN_COUNTER:case $e.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:return $e.AggregationTemporality.CUMULATIVE}};gt.DeltaTemporalitySelector=aFe;var cFe=t=>{switch(t){case $e.InstrumentType.COUNTER:case $e.InstrumentType.HISTOGRAM:return $e.AggregationTemporality.DELTA;case $e.InstrumentType.GAUGE:case $e.InstrumentType.UP_DOWN_COUNTER:case $e.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:case $e.InstrumentType.OBSERVABLE_COUNTER:case $e.InstrumentType.OBSERVABLE_GAUGE:return $e.AggregationTemporality.CUMULATIVE}};gt.LowMemoryTemporalitySelector=cFe;function uFe(){let t=((0,nFe.getStringFromEnv)("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE")??"cumulative").toLowerCase();return t==="cumulative"?gt.CumulativeTemporalitySelector:t==="delta"?gt.DeltaTemporalitySelector:t==="lowmemory"?gt.LowMemoryTemporalitySelector:(oFe.diag.warn(`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '${t}', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.`),gt.CumulativeTemporalitySelector)}function lFe(t){return t!=null?t===KJ.AggregationTemporalityPreference.DELTA?gt.DeltaTemporalitySelector:t===KJ.AggregationTemporalityPreference.LOWMEMORY?gt.LowMemoryTemporalitySelector:gt.CumulativeTemporalitySelector:uFe()}var dFe=Object.freeze({type:$e.AggregationType.DEFAULT});function pFe(t){return t?.aggregationPreference??(()=>dFe)}var cx=class extends iFe.OTLPExporterBase{_aggregationTemporalitySelector;_aggregationSelector;constructor(e,r){super(e),this._aggregationSelector=pFe(r),this._aggregationTemporalitySelector=lFe(r?.temporalityPreference)}selectAggregation(e){return this._aggregationSelector(e)}selectAggregationTemporality(e){return this._aggregationTemporalitySelector(e)}};gt.OTLPMetricExporterBase=cx});var XJ=p(IT=>{"use strict";Object.defineProperty(IT,"__esModule",{value:!0});IT.VERSION=void 0;IT.VERSION="0.206.0"});var QJ=p(xT=>{"use strict";Object.defineProperty(xT,"__esModule",{value:!0});xT.OTLPMetricExporter=void 0;var fFe=ux(),hFe=qn(),mFe=XJ(),JJ=(yi(),y(eo)),_Fe={"User-Agent":`OTel-OTLP-Exporter-JavaScript/${mFe.VERSION}`},lx=class extends fFe.OTLPMetricExporterBase{constructor(e){super((0,JJ.createOtlpHttpExportDelegate)((0,JJ.convertLegacyHttpOptions)(e??{},"METRICS","v1/metrics",{..._Fe,"Content-Type":"application/json"}),hFe.JsonMetricsSerializer),e)}};xT.OTLPMetricExporter=lx});var ZJ=p(wT=>{"use strict";Object.defineProperty(wT,"__esModule",{value:!0});wT.OTLPMetricExporter=void 0;var gFe=QJ();Object.defineProperty(wT,"OTLPMetricExporter",{enumerable:!0,get:function(){return gFe.OTLPMetricExporter}})});var e7=p(LT=>{"use strict";Object.defineProperty(LT,"__esModule",{value:!0});LT.OTLPMetricExporter=void 0;var EFe=ZJ();Object.defineProperty(LT,"OTLPMetricExporter",{enumerable:!0,get:function(){return EFe.OTLPMetricExporter}})});var UT=p(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.OTLPMetricExporterBase=tr.LowMemoryTemporalitySelector=tr.DeltaTemporalitySelector=tr.CumulativeTemporalitySelector=tr.AggregationTemporalityPreference=tr.OTLPMetricExporter=void 0;var SFe=e7();Object.defineProperty(tr,"OTLPMetricExporter",{enumerable:!0,get:function(){return SFe.OTLPMetricExporter}});var TFe=ax();Object.defineProperty(tr,"AggregationTemporalityPreference",{enumerable:!0,get:function(){return TFe.AggregationTemporalityPreference}});var DT=ux();Object.defineProperty(tr,"CumulativeTemporalitySelector",{enumerable:!0,get:function(){return DT.CumulativeTemporalitySelector}});Object.defineProperty(tr,"DeltaTemporalitySelector",{enumerable:!0,get:function(){return DT.DeltaTemporalitySelector}});Object.defineProperty(tr,"LowMemoryTemporalitySelector",{enumerable:!0,get:function(){return DT.LowMemoryTemporalitySelector}});Object.defineProperty(tr,"OTLPMetricExporterBase",{enumerable:!0,get:function(){return DT.OTLPMetricExporterBase}})});var r7=p(kT=>{"use strict";Object.defineProperty(kT,"__esModule",{value:!0});kT.OTLPMetricExporter=void 0;var yFe=UT(),t7=AT(),vFe=qn(),dx=class extends yFe.OTLPMetricExporterBase{constructor(e){super((0,t7.createOtlpGrpcExportDelegate)((0,t7.convertLegacyOtlpGrpcOptions)(e??{},"METRICS"),vFe.ProtobufMetricsSerializer,"MetricsExportService","/opentelemetry.proto.collector.metrics.v1.MetricsService/Export"),e)}};kT.OTLPMetricExporter=dx});var n7=p(BT=>{"use strict";Object.defineProperty(BT,"__esModule",{value:!0});BT.OTLPMetricExporter=void 0;var AFe=r7();Object.defineProperty(BT,"OTLPMetricExporter",{enumerable:!0,get:function(){return AFe.OTLPMetricExporter}})});var i7=p(FT=>{"use strict";Object.defineProperty(FT,"__esModule",{value:!0});FT.VERSION=void 0;FT.VERSION="0.206.0"});var s7=p(VT=>{"use strict";Object.defineProperty(VT,"__esModule",{value:!0});VT.OTLPMetricExporter=void 0;var OFe=UT(),bFe=qn(),RFe=i7(),o7=(yi(),y(eo)),px=class extends OFe.OTLPMetricExporterBase{constructor(e){super((0,o7.createOtlpHttpExportDelegate)((0,o7.convertLegacyHttpOptions)(e??{},"METRICS","v1/metrics",{"User-Agent":`OTel-OTLP-Exporter-JavaScript/${RFe.VERSION}`,"Content-Type":"application/x-protobuf"}),bFe.ProtobufMetricsSerializer),e)}};VT.OTLPMetricExporter=px});var a7=p(GT=>{"use strict";Object.defineProperty(GT,"__esModule",{value:!0});GT.OTLPMetricExporter=void 0;var PFe=s7();Object.defineProperty(GT,"OTLPMetricExporter",{enumerable:!0,get:function(){return PFe.OTLPMetricExporter}})});var c7=p(qT=>{"use strict";Object.defineProperty(qT,"__esModule",{value:!0});qT.OTLPMetricExporter=void 0;var CFe=a7();Object.defineProperty(qT,"OTLPMetricExporter",{enumerable:!0,get:function(){return CFe.OTLPMetricExporter}})});var fx=p(jT=>{"use strict";Object.defineProperty(jT,"__esModule",{value:!0});jT.OTLPMetricExporter=void 0;var NFe=c7();Object.defineProperty(jT,"OTLPMetricExporter",{enumerable:!0,get:function(){return NFe.OTLPMetricExporter}})});var gx=p($T=>{"use strict";Object.defineProperty($T,"__esModule",{value:!0});$T.PrometheusSerializer=void 0;var MFe=(R(),y(C)),Ls=Ei(),u7=K();function zT(t){return t.replace(/\\/g,"\\\\").replace(/\n/g,"\\n")}function l7(t=""){return typeof t!="string"&&(t=JSON.stringify(t)),zT(t).replace(/"/g,'\\"')}var IFe=/[^a-z0-9_]/gi,xFe=/_{2,}/g;function mx(t){return t.replace(IFe,"_").replace(xFe,"_")}function hx(t,e){return!t.endsWith("_total")&&e.dataPointType===Ls.DataPointType.SUM&&e.isMonotonic&&(t=t+"_total"),t}function wFe(t){return t===1/0?"+Inf":t===-1/0?"-Inf":`${t}`}function LFe(t){switch(t.dataPointType){case Ls.DataPointType.SUM:return t.isMonotonic?"counter":"gauge";case Ls.DataPointType.GAUGE:return"gauge";case Ls.DataPointType.HISTOGRAM:return"histogram";default:return"untyped"}}function HT(t,e,r,o,s){let a=!1,i="";for(let[n,c]of Object.entries(e)){let u=mx(n);a=!0,i+=`${i.length>0?",":""}${u}="${l7(c)}"`}if(s)for(let[n,c]of Object.entries(s)){let u=mx(n);a=!0,i+=`${i.length>0?",":""}${u}="${l7(c)}"`}return a&&(t+=`{${i}}`),`${t} ${wFe(r)}${o!==void 0?" "+String(o):""}
|
|
43
|
+
`}var DFe="# no registered metrics",_x=class{_prefix;_appendTimestamp;_additionalAttributes;_withResourceConstantLabels;constructor(e,r=!1,o){e&&(this._prefix=e+"_"),this._appendTimestamp=r,this._withResourceConstantLabels=o}serialize(e){let r="";this._additionalAttributes=this._filterResourceConstantLabels(e.resource.attributes,this._withResourceConstantLabels);for(let o of e.scopeMetrics)r+=this._serializeScopeMetrics(o);return r===""&&(r+=DFe),this._serializeResource(e.resource)+r}_filterResourceConstantLabels(e,r){if(r){let o={};for(let[s,a]of Object.entries(e))s.match(r)&&(o[s]=a);return o}}_serializeScopeMetrics(e){let r="";for(let o of e.metrics)r+=this._serializeMetricData(o)+`
|
|
44
|
+
`;return r}_serializeMetricData(e){let r=mx(zT(e.descriptor.name));this._prefix&&(r=`${this._prefix}${r}`);let o=e.dataPointType;r=hx(r,e);let s=`# HELP ${r} ${zT(e.descriptor.description||"description missing")}`,a=e.descriptor.unit?`
|
|
45
|
+
# UNIT ${r} ${zT(e.descriptor.unit)}`:"",i=`# TYPE ${r} ${LFe(e)}`,n="";switch(o){case Ls.DataPointType.SUM:case Ls.DataPointType.GAUGE:{n=e.dataPoints.map(c=>this._serializeSingularDataPoint(r,e,c)).join("");break}case Ls.DataPointType.HISTOGRAM:{n=e.dataPoints.map(c=>this._serializeHistogramDataPoint(r,e,c)).join("");break}default:MFe.diag.error(`Unrecognizable DataPointType: ${o} for metric "${r}"`)}return`${s}${a}
|
|
46
|
+
${i}
|
|
47
|
+
${n}`.trim()}_serializeSingularDataPoint(e,r,o){let s="";e=hx(e,r);let{value:a,attributes:i}=o,n=(0,u7.hrTimeToMilliseconds)(o.endTime);return s+=HT(e,i,a,this._appendTimestamp?n:void 0,this._additionalAttributes),s}_serializeHistogramDataPoint(e,r,o){let s="";e=hx(e,r);let a=o.attributes,i=o.value,n=(0,u7.hrTimeToMilliseconds)(o.endTime);for(let d of["count","sum"]){let h=i[d];h!=null&&(s+=HT(e+"_"+d,a,h,this._appendTimestamp?n:void 0,this._additionalAttributes))}let c=0,u=i.buckets.counts.entries(),l=!1;for(let[d,h]of u){c+=h;let g=i.buckets.boundaries[d];if(g===void 0&&l)break;g===1/0&&(l=!0),s+=HT(e+"_bucket",a,c,this._appendTimestamp?n:void 0,Object.assign({},this._additionalAttributes??{},{le:g===void 0||g===1/0?"+Inf":String(g)}))}return s}_serializeResource(e){let r="target_info",o=`# HELP ${r} Target metadata`,s=`# TYPE ${r} gauge`,a=HT(r,e.attributes,1).trim();return`${o}
|
|
48
|
+
${s}
|
|
49
|
+
${a}
|
|
50
|
+
`}};$T.PrometheusSerializer=_x});var d7=p(YT=>{"use strict";Object.defineProperty(YT,"__esModule",{value:!0});YT.PrometheusExporter=void 0;var Md=(R(),y(C)),UFe=K(),Ex=Ei(),kFe=b("http"),BFe=gx(),FFe=b("url"),Sx=class t extends Ex.MetricReader{static DEFAULT_OPTIONS={host:void 0,port:9464,endpoint:"/metrics",prefix:"",appendTimestamp:!1,withResourceConstantLabels:void 0};_host;_port;_baseUrl;_endpoint;_server;_prefix;_appendTimestamp;_serializer;_startServerPromise;constructor(e={},r=()=>{}){super({aggregationSelector:s=>({type:Ex.AggregationType.DEFAULT}),aggregationTemporalitySelector:s=>Ex.AggregationTemporality.CUMULATIVE,metricProducers:e.metricProducers}),this._host=e.host||process.env.OTEL_EXPORTER_PROMETHEUS_HOST||t.DEFAULT_OPTIONS.host,this._port=e.port||Number(process.env.OTEL_EXPORTER_PROMETHEUS_PORT)||t.DEFAULT_OPTIONS.port,this._prefix=e.prefix||t.DEFAULT_OPTIONS.prefix,this._appendTimestamp=typeof e.appendTimestamp=="boolean"?e.appendTimestamp:t.DEFAULT_OPTIONS.appendTimestamp;let o=e.withResourceConstantLabels||t.DEFAULT_OPTIONS.withResourceConstantLabels;this._server=(0,kFe.createServer)(this._requestHandler).unref(),this._serializer=new BFe.PrometheusSerializer(this._prefix,this._appendTimestamp,o),this._baseUrl=`http://${this._host}:${this._port}/`,this._endpoint=(e.endpoint||t.DEFAULT_OPTIONS.endpoint).replace(/^([^/])/,"/$1"),e.preventServerStart!==!0?this.startServer().then(r,s=>{Md.diag.error(s),r(s)}):r&&queueMicrotask(r)}async onForceFlush(){}onShutdown(){return this.stopServer()}stopServer(){return this._server?new Promise(e=>{this._server.close(r=>{r?r.code!=="ERR_SERVER_NOT_RUNNING"&&(0,UFe.globalErrorHandler)(r):Md.diag.debug("Prometheus exporter was stopped"),e()})}):(Md.diag.debug("Prometheus stopServer() was called but server was never started."),Promise.resolve())}startServer(){return this._startServerPromise??=new Promise((e,r)=>{this._server.once("error",r),this._server.listen({port:this._port,host:this._host},()=>{Md.diag.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`),e()})}),this._startServerPromise}getMetricsRequestHandler(e,r){this._exportMetrics(r)}_requestHandler=(e,r)=>{e.url!=null&&new FFe.URL(e.url,this._baseUrl).pathname===this._endpoint?this._exportMetrics(r):this._notFound(r)};_exportMetrics=e=>{e.statusCode=200,e.setHeader("content-type","text/plain"),this.collect().then(r=>{let{resourceMetrics:o,errors:s}=r;s.length&&Md.diag.error("PrometheusExporter: metrics collection errors",...s),e.end(this._serializer.serialize(o))},r=>{e.end(`# failed to export metrics: ${r}`)})};_notFound=e=>{e.statusCode=404,e.end()}};YT.PrometheusExporter=Sx});var p7=p(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});Xc.PrometheusSerializer=Xc.PrometheusExporter=void 0;var VFe=d7();Object.defineProperty(Xc,"PrometheusExporter",{enumerable:!0,get:function(){return VFe.PrometheusExporter}});var GFe=gx();Object.defineProperty(Xc,"PrometheusSerializer",{enumerable:!0,get:function(){return GFe.PrometheusSerializer}})});var f7=p(WT=>{"use strict";Object.defineProperty(WT,"__esModule",{value:!0});WT.VERSION=void 0;WT.VERSION="0.206.0"});var m7=p(KT=>{"use strict";Object.defineProperty(KT,"__esModule",{value:!0});KT.OTLPTraceExporter=void 0;var qFe=(kn(),y(Un)),jFe=qn(),HFe=f7(),h7=(yi(),y(eo)),Tx=class extends qFe.OTLPExporterBase{constructor(e={}){super((0,h7.createOtlpHttpExportDelegate)((0,h7.convertLegacyHttpOptions)(e,"TRACES","v1/traces",{"User-Agent":`OTel-OTLP-Exporter-JavaScript/${HFe.VERSION}`,"Content-Type":"application/x-protobuf"}),jFe.ProtobufTraceSerializer))}};KT.OTLPTraceExporter=Tx});var _7=p(XT=>{"use strict";Object.defineProperty(XT,"__esModule",{value:!0});XT.OTLPTraceExporter=void 0;var zFe=m7();Object.defineProperty(XT,"OTLPTraceExporter",{enumerable:!0,get:function(){return zFe.OTLPTraceExporter}})});var g7=p(JT=>{"use strict";Object.defineProperty(JT,"__esModule",{value:!0});JT.OTLPTraceExporter=void 0;var $Fe=_7();Object.defineProperty(JT,"OTLPTraceExporter",{enumerable:!0,get:function(){return $Fe.OTLPTraceExporter}})});var E7=p(QT=>{"use strict";Object.defineProperty(QT,"__esModule",{value:!0});QT.OTLPTraceExporter=void 0;var YFe=g7();Object.defineProperty(QT,"OTLPTraceExporter",{enumerable:!0,get:function(){return YFe.OTLPTraceExporter}})});var S7=p(ZT=>{"use strict";Object.defineProperty(ZT,"__esModule",{value:!0});ZT.VERSION=void 0;ZT.VERSION="0.206.0"});var y7=p(ey=>{"use strict";Object.defineProperty(ey,"__esModule",{value:!0});ey.OTLPTraceExporter=void 0;var WFe=(kn(),y(Un)),KFe=S7(),XFe=qn(),T7=(yi(),y(eo)),yx=class extends WFe.OTLPExporterBase{constructor(e={}){super((0,T7.createOtlpHttpExportDelegate)((0,T7.convertLegacyHttpOptions)(e,"TRACES","v1/traces",{"User-Agent":`OTel-OTLP-Exporter-JavaScript/${KFe.VERSION}`,"Content-Type":"application/json"}),XFe.JsonTraceSerializer))}};ey.OTLPTraceExporter=yx});var v7=p(ty=>{"use strict";Object.defineProperty(ty,"__esModule",{value:!0});ty.OTLPTraceExporter=void 0;var JFe=y7();Object.defineProperty(ty,"OTLPTraceExporter",{enumerable:!0,get:function(){return JFe.OTLPTraceExporter}})});var A7=p(ry=>{"use strict";Object.defineProperty(ry,"__esModule",{value:!0});ry.OTLPTraceExporter=void 0;var QFe=v7();Object.defineProperty(ry,"OTLPTraceExporter",{enumerable:!0,get:function(){return QFe.OTLPTraceExporter}})});var O7=p(ny=>{"use strict";Object.defineProperty(ny,"__esModule",{value:!0});ny.OTLPTraceExporter=void 0;var ZFe=A7();Object.defineProperty(ny,"OTLPTraceExporter",{enumerable:!0,get:function(){return ZFe.OTLPTraceExporter}})});var R7=p(iy=>{"use strict";Object.defineProperty(iy,"__esModule",{value:!0});iy.OTLPTraceExporter=void 0;var b7=AT(),eVe=qn(),tVe=(kn(),y(Un)),vx=class extends tVe.OTLPExporterBase{constructor(e={}){super((0,b7.createOtlpGrpcExportDelegate)((0,b7.convertLegacyOtlpGrpcOptions)(e,"TRACES"),eVe.ProtobufTraceSerializer,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export"))}};iy.OTLPTraceExporter=vx});var P7=p(oy=>{"use strict";Object.defineProperty(oy,"__esModule",{value:!0});oy.OTLPTraceExporter=void 0;var rVe=R7();Object.defineProperty(oy,"OTLPTraceExporter",{enumerable:!0,get:function(){return rVe.OTLPTraceExporter}})});var C7=p(ay=>{"use strict";Object.defineProperty(ay,"__esModule",{value:!0});ay.prepareSend=void 0;var Ax=(R(),y(C)),sy=K(),nVe=b("http"),iVe=b("https");function oVe(t,e){let r=new URL(t),o=Object.assign({method:"POST",headers:{"Content-Type":"application/json",...e}});return function(a,i){if(a.length===0)return Ax.diag.debug("Zipkin send with empty spans"),i({code:sy.ExportResultCode.SUCCESS});let{request:n}=r.protocol==="http:"?nVe:iVe,c=n(r,o,l=>{let d="";l.on("data",h=>{d+=h}),l.on("end",()=>{let h=l.statusCode||0;return Ax.diag.debug(`Zipkin response status code: ${h}, body: ${d}`),h<400?i({code:sy.ExportResultCode.SUCCESS}):i({code:sy.ExportResultCode.FAILED,error:new Error(`Got unexpected status code from zipkin: ${h}`)})})});c.on("error",l=>i({code:sy.ExportResultCode.FAILED,error:l}));let u=JSON.stringify(a);Ax.diag.debug(`Zipkin request payload: ${u}`),c.write(u,"utf8"),c.end()}}ay.prepareSend=oVe});var N7=p(cy=>{"use strict";Object.defineProperty(cy,"__esModule",{value:!0});cy.prepareSend=void 0;var sVe=C7();Object.defineProperty(cy,"prepareSend",{enumerable:!0,get:function(){return sVe.prepareSend}})});var Ox=p(uy=>{"use strict";Object.defineProperty(uy,"__esModule",{value:!0});uy.prepareSend=void 0;var aVe=N7();Object.defineProperty(uy,"prepareSend",{enumerable:!0,get:function(){return aVe.prepareSend}})});var M7=p(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});Id.SpanKind=void 0;var cVe;(function(t){t.CLIENT="CLIENT",t.SERVER="SERVER",t.CONSUMER="CONSUMER",t.PRODUCER="PRODUCER"})(cVe=Id.SpanKind||(Id.SpanKind={}))});var w7=p(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr._toZipkinAnnotations=wr._toZipkinTags=wr.toZipkinSpan=wr.defaultStatusErrorTagName=wr.defaultStatusCodeTagName=void 0;var yo=(R(),y(C)),bx=K(),ly=M7(),uVe={[yo.SpanKind.CLIENT]:ly.SpanKind.CLIENT,[yo.SpanKind.SERVER]:ly.SpanKind.SERVER,[yo.SpanKind.CONSUMER]:ly.SpanKind.CONSUMER,[yo.SpanKind.PRODUCER]:ly.SpanKind.PRODUCER,[yo.SpanKind.INTERNAL]:void 0};wr.defaultStatusCodeTagName="otel.status_code";wr.defaultStatusErrorTagName="error";function lVe(t,e,r,o){return{traceId:t.spanContext().traceId,parentId:t.parentSpanContext?.spanId,name:t.name,id:t.spanContext().spanId,kind:uVe[t.kind],timestamp:(0,bx.hrTimeToMicroseconds)(t.startTime),duration:Math.round((0,bx.hrTimeToMicroseconds)(t.duration)),localEndpoint:{serviceName:e},tags:I7(t,r,o),annotations:t.events.length?x7(t.events):void 0}}wr.toZipkinSpan=lVe;function I7({attributes:t,resource:e,status:r,droppedAttributesCount:o,droppedEventsCount:s,droppedLinksCount:a},i,n){let c={};for(let u of Object.keys(t))c[u]=String(t[u]);return r.code!==yo.SpanStatusCode.UNSET&&(c[i]=String(yo.SpanStatusCode[r.code])),r.code===yo.SpanStatusCode.ERROR&&r.message&&(c[n]=r.message),o&&(c["otel.dropped_attributes_count"]=String(o)),s&&(c["otel.dropped_events_count"]=String(s)),a&&(c["otel.dropped_links_count"]=String(a)),Object.keys(e.attributes).forEach(u=>c[u]=String(e.attributes[u])),c}wr._toZipkinTags=I7;function x7(t){return t.map(e=>({timestamp:Math.round((0,bx.hrTimeToMicroseconds)(e.time)),value:e.name}))}wr._toZipkinAnnotations=x7});var L7=p(dy=>{"use strict";Object.defineProperty(dy,"__esModule",{value:!0});dy.prepareGetHeaders=void 0;function dVe(t){return function(){return t()}}dy.prepareGetHeaders=dVe});var B7=p(py=>{"use strict";Object.defineProperty(py,"__esModule",{value:!0});py.ZipkinExporter=void 0;var D7=(R(),y(C)),U7=K(),k7=Ox(),Rx=w7(),Px=(vt(),y(Ut)),pVe=L7(),Cx=class{DEFAULT_SERVICE_NAME="OpenTelemetry Service";_statusCodeTagName;_statusDescriptionTagName;_urlStr;_send;_getHeaders;_serviceName;_isShutdown;_sendingPromises=[];constructor(e={}){this._urlStr=e.url||((0,U7.getStringFromEnv)("OTEL_EXPORTER_ZIPKIN_ENDPOINT")??"http://localhost:9411/api/v2/spans"),this._send=(0,k7.prepareSend)(this._urlStr,e.headers),this._serviceName=e.serviceName,this._statusCodeTagName=e.statusCodeTagName||Rx.defaultStatusCodeTagName,this._statusDescriptionTagName=e.statusDescriptionTagName||Rx.defaultStatusErrorTagName,this._isShutdown=!1,typeof e.getExportRequestHeaders=="function"?this._getHeaders=(0,pVe.prepareGetHeaders)(e.getExportRequestHeaders):this._beforeSend=function(){}}export(e,r){let o=String(this._serviceName||e[0].resource.attributes[Px.ATTR_SERVICE_NAME]||this.DEFAULT_SERVICE_NAME);if(D7.diag.debug("Zipkin exporter export"),this._isShutdown){setTimeout(()=>r({code:U7.ExportResultCode.FAILED,error:new Error("Exporter has been shutdown")}));return}let s=new Promise(i=>{this._sendSpans(e,o,n=>{i(),r(n)})});this._sendingPromises.push(s);let a=()=>{let i=this._sendingPromises.indexOf(s);this._sendingPromises.splice(i,1)};s.then(a,a)}shutdown(){return D7.diag.debug("Zipkin exporter shutdown"),this._isShutdown=!0,this.forceFlush()}forceFlush(){return new Promise((e,r)=>{Promise.all(this._sendingPromises).then(()=>{e()},r)})}_beforeSend(){this._getHeaders&&(this._send=(0,k7.prepareSend)(this._urlStr,this._getHeaders()))}_sendSpans(e,r,o){let s=e.map(a=>(0,Rx.toZipkinSpan)(a,String(a.attributes[Px.ATTR_SERVICE_NAME]||a.resource.attributes[Px.ATTR_SERVICE_NAME]||r),this._statusCodeTagName,this._statusDescriptionTagName));return this._beforeSend(),this._send(s,a=>{if(o)return o(a)})}};py.ZipkinExporter=Cx});var F7=p(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.ZipkinExporter=Jc.prepareSend=void 0;var fVe=Ox();Object.defineProperty(Jc,"prepareSend",{enumerable:!0,get:function(){return fVe.prepareSend}});var hVe=B7();Object.defineProperty(Jc,"ZipkinExporter",{enumerable:!0,get:function(){return hVe.ZipkinExporter}})});var Nx=p(fy=>{"use strict";Object.defineProperty(fy,"__esModule",{value:!0});fy.B3_DEBUG_FLAG_KEY=void 0;var mVe=(R(),y(C));fy.B3_DEBUG_FLAG_KEY=(0,mVe.createContextKey)("OpenTelemetry Context Key B3 Debug Flag")});var xd=p(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.X_B3_FLAGS=rr.X_B3_PARENT_SPAN_ID=rr.X_B3_SAMPLED=rr.X_B3_SPAN_ID=rr.X_B3_TRACE_ID=rr.B3_CONTEXT_HEADER=void 0;rr.B3_CONTEXT_HEADER="b3";rr.X_B3_TRACE_ID="x-b3-traceid";rr.X_B3_SPAN_ID="x-b3-spanid";rr.X_B3_SAMPLED="x-b3-sampled";rr.X_B3_PARENT_SPAN_ID="x-b3-parentspanid";rr.X_B3_FLAGS="x-b3-flags"});var q7=p(my=>{"use strict";Object.defineProperty(my,"__esModule",{value:!0});my.B3MultiPropagator=void 0;var on=(R(),y(C)),_Ve=K(),V7=Nx(),hr=xd(),gVe=new Set([!0,"true","True","1",1]),EVe=new Set([!1,"false","False","0",0]);function SVe(t){return t===on.TraceFlags.SAMPLED||t===on.TraceFlags.NONE}function TVe(t){return Array.isArray(t)?t[0]:t}function hy(t,e,r){let o=e.get(t,r);return TVe(o)}function yVe(t,e){let r=hy(t,e,hr.X_B3_TRACE_ID);return typeof r=="string"?r.padStart(32,"0"):""}function vVe(t,e){let r=hy(t,e,hr.X_B3_SPAN_ID);return typeof r=="string"?r:""}function G7(t,e){return hy(t,e,hr.X_B3_FLAGS)==="1"?"1":void 0}function AVe(t,e){let r=hy(t,e,hr.X_B3_SAMPLED);if(G7(t,e)==="1"||gVe.has(r))return on.TraceFlags.SAMPLED;if(r===void 0||EVe.has(r))return on.TraceFlags.NONE}var Mx=class{inject(e,r,o){let s=on.trace.getSpanContext(e);if(!s||!(0,on.isSpanContextValid)(s)||(0,_Ve.isTracingSuppressed)(e))return;let a=e.getValue(V7.B3_DEBUG_FLAG_KEY);o.set(r,hr.X_B3_TRACE_ID,s.traceId),o.set(r,hr.X_B3_SPAN_ID,s.spanId),a==="1"?o.set(r,hr.X_B3_FLAGS,a):s.traceFlags!==void 0&&o.set(r,hr.X_B3_SAMPLED,(on.TraceFlags.SAMPLED&s.traceFlags)===on.TraceFlags.SAMPLED?"1":"0")}extract(e,r,o){let s=yVe(r,o),a=vVe(r,o),i=AVe(r,o),n=G7(r,o);return(0,on.isValidTraceId)(s)&&(0,on.isValidSpanId)(a)&&SVe(i)?(e=e.setValue(V7.B3_DEBUG_FLAG_KEY,n),on.trace.setSpanContext(e,{traceId:s,spanId:a,isRemote:!0,traceFlags:i})):e}fields(){return[hr.X_B3_TRACE_ID,hr.X_B3_SPAN_ID,hr.X_B3_FLAGS,hr.X_B3_SAMPLED,hr.X_B3_PARENT_SPAN_ID]}};my.B3MultiPropagator=Mx});var H7=p(_y=>{"use strict";Object.defineProperty(_y,"__esModule",{value:!0});_y.B3SinglePropagator=void 0;var Ds=(R(),y(C)),OVe=K(),j7=Nx(),Ix=xd(),bVe=/((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/,RVe="0".repeat(16),PVe=new Set(["d","1"]),CVe="d";function NVe(t){return t.length===32?t:`${RVe}${t}`}function MVe(t){return t&&PVe.has(t)?Ds.TraceFlags.SAMPLED:Ds.TraceFlags.NONE}var xx=class{inject(e,r,o){let s=Ds.trace.getSpanContext(e);if(!s||!(0,Ds.isSpanContextValid)(s)||(0,OVe.isTracingSuppressed)(e))return;let a=e.getValue(j7.B3_DEBUG_FLAG_KEY)||s.traceFlags&1,i=`${s.traceId}-${s.spanId}-${a}`;o.set(r,Ix.B3_CONTEXT_HEADER,i)}extract(e,r,o){let s=o.get(r,Ix.B3_CONTEXT_HEADER),a=Array.isArray(s)?s[0]:s;if(typeof a!="string")return e;let i=a.match(bVe);if(!i)return e;let[,n,c,u]=i,l=NVe(n);if(!(0,Ds.isValidTraceId)(l)||!(0,Ds.isValidSpanId)(c))return e;let d=MVe(u);return u===CVe&&(e=e.setValue(j7.B3_DEBUG_FLAG_KEY,u)),Ds.trace.setSpanContext(e,{traceId:l,spanId:c,isRemote:!0,traceFlags:d})}fields(){return[Ix.B3_CONTEXT_HEADER]}};_y.B3SinglePropagator=xx});var wx=p(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});wd.B3InjectEncoding=void 0;var IVe;(function(t){t[t.SINGLE_HEADER=0]="SINGLE_HEADER",t[t.MULTI_HEADER=1]="MULTI_HEADER"})(IVe=wd.B3InjectEncoding||(wd.B3InjectEncoding={}))});var z7=p(gy=>{"use strict";Object.defineProperty(gy,"__esModule",{value:!0});gy.B3Propagator=void 0;var xVe=K(),wVe=q7(),LVe=H7(),DVe=xd(),UVe=wx(),Lx=class{_b3MultiPropagator=new wVe.B3MultiPropagator;_b3SinglePropagator=new LVe.B3SinglePropagator;_inject;_fields;constructor(e={}){e.injectEncoding===UVe.B3InjectEncoding.MULTI_HEADER?(this._inject=this._b3MultiPropagator.inject,this._fields=this._b3MultiPropagator.fields()):(this._inject=this._b3SinglePropagator.inject,this._fields=this._b3SinglePropagator.fields())}inject(e,r,o){(0,xVe.isTracingSuppressed)(e)||this._inject(e,r,o)}extract(e,r,o){let s=o.get(r,DVe.B3_CONTEXT_HEADER);return(Array.isArray(s)?s[0]:s)?this._b3SinglePropagator.extract(e,r,o):this._b3MultiPropagator.extract(e,r,o)}fields(){return this._fields}};gy.B3Propagator=Lx});var $7=p(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.B3InjectEncoding=ut.X_B3_TRACE_ID=ut.X_B3_SPAN_ID=ut.X_B3_SAMPLED=ut.X_B3_PARENT_SPAN_ID=ut.X_B3_FLAGS=ut.B3_CONTEXT_HEADER=ut.B3Propagator=void 0;var kVe=z7();Object.defineProperty(ut,"B3Propagator",{enumerable:!0,get:function(){return kVe.B3Propagator}});var Qc=xd();Object.defineProperty(ut,"B3_CONTEXT_HEADER",{enumerable:!0,get:function(){return Qc.B3_CONTEXT_HEADER}});Object.defineProperty(ut,"X_B3_FLAGS",{enumerable:!0,get:function(){return Qc.X_B3_FLAGS}});Object.defineProperty(ut,"X_B3_PARENT_SPAN_ID",{enumerable:!0,get:function(){return Qc.X_B3_PARENT_SPAN_ID}});Object.defineProperty(ut,"X_B3_SAMPLED",{enumerable:!0,get:function(){return Qc.X_B3_SAMPLED}});Object.defineProperty(ut,"X_B3_SPAN_ID",{enumerable:!0,get:function(){return Qc.X_B3_SPAN_ID}});Object.defineProperty(ut,"X_B3_TRACE_ID",{enumerable:!0,get:function(){return Qc.X_B3_TRACE_ID}});var BVe=wx();Object.defineProperty(ut,"B3InjectEncoding",{enumerable:!0,get:function(){return BVe.B3InjectEncoding}})});var Y7=p(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.JaegerPropagator=sn.UBER_BAGGAGE_HEADER_PREFIX=sn.UBER_TRACE_ID_HEADER=void 0;var Us=(R(),y(C)),FVe=K();sn.UBER_TRACE_ID_HEADER="uber-trace-id";sn.UBER_BAGGAGE_HEADER_PREFIX="uberctx";var Dx=class{_jaegerTraceHeader;_jaegerBaggageHeaderPrefix;constructor(e){typeof e=="string"?(this._jaegerTraceHeader=e,this._jaegerBaggageHeaderPrefix=sn.UBER_BAGGAGE_HEADER_PREFIX):(this._jaegerTraceHeader=e?.customTraceHeader||sn.UBER_TRACE_ID_HEADER,this._jaegerBaggageHeaderPrefix=e?.customBaggageHeaderPrefix||sn.UBER_BAGGAGE_HEADER_PREFIX)}inject(e,r,o){let s=Us.trace.getSpanContext(e),a=Us.propagation.getBaggage(e);if(s&&(0,FVe.isTracingSuppressed)(e)===!1){let i=`0${(s.traceFlags||Us.TraceFlags.NONE).toString(16)}`;o.set(r,this._jaegerTraceHeader,`${s.traceId}:${s.spanId}:0:${i}`)}if(a)for(let[i,n]of a.getAllEntries())o.set(r,`${this._jaegerBaggageHeaderPrefix}-${i}`,encodeURIComponent(n.value))}extract(e,r,o){let s=o.get(r,this._jaegerTraceHeader),a=Array.isArray(s)?s[0]:s,i=o.keys(r).filter(u=>u.startsWith(`${this._jaegerBaggageHeaderPrefix}-`)).map(u=>{let l=o.get(r,u);return{key:u.substring(this._jaegerBaggageHeaderPrefix.length+1),value:Array.isArray(l)?l[0]:l}}),n=e;if(typeof a=="string"){let u=GVe(a);u&&(n=Us.trace.setSpanContext(n,u))}if(i.length===0)return n;let c=Us.propagation.getBaggage(e)??Us.propagation.createBaggage();for(let u of i)u.value!==void 0&&(c=c.setEntry(u.key,{value:decodeURIComponent(u.value)}));return n=Us.propagation.setBaggage(n,c),n}fields(){return[this._jaegerTraceHeader]}};sn.JaegerPropagator=Dx;var VVe=/^[0-9a-f]{1,2}$/i;function GVe(t){let e=decodeURIComponent(t).split(":");if(e.length!==4)return null;let[r,o,,s]=e,a=r.padStart(32,"0"),i=o.padStart(16,"0"),n=VVe.test(s)?parseInt(s,16)&1:1;return{traceId:a,spanId:i,isRemote:!0,traceFlags:n}}});var W7=p(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.UBER_TRACE_ID_HEADER=vo.UBER_BAGGAGE_HEADER_PREFIX=vo.JaegerPropagator=void 0;var Ux=Y7();Object.defineProperty(vo,"JaegerPropagator",{enumerable:!0,get:function(){return Ux.JaegerPropagator}});Object.defineProperty(vo,"UBER_BAGGAGE_HEADER_PREFIX",{enumerable:!0,get:function(){return Ux.UBER_BAGGAGE_HEADER_PREFIX}});Object.defineProperty(vo,"UBER_TRACE_ID_HEADER",{enumerable:!0,get:function(){return Ux.UBER_TRACE_ID_HEADER}})});var Q7=p(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.getPropagatorFromEnv=Lr.getSpanProcessorsFromEnv=Lr.getOtlpProtocolFromEnv=Lr.filterBlanksAndNulls=Lr.getResourceDetectorsFromEnv=void 0;var Ao=(R(),y(C)),Oo=K(),K7=E7(),qVe=O7(),jVe=P7(),HVe=F7(),Ld=Sa(),Ey=_g(),kx=$7(),zVe=W7(),$Ve="env",YVe="host",WVe="os",KVe="process",XVe="serviceinstance";function JVe(){let t=new Map([[$Ve,Ld.envDetector],[YVe,Ld.hostDetector],[WVe,Ld.osDetector],[XVe,Ld.serviceInstanceIdDetector],[KVe,Ld.processDetector]]),e=(0,Oo.getStringListFromEnv)("OTEL_NODE_RESOURCE_DETECTORS")??["all"];return e.includes("all")?[...t.values()].flat():e.includes("none")?[]:e.flatMap(r=>{let o=t.get(r);return o||Ao.diag.warn(`Invalid resource detector "${r}" specified in the environment variable OTEL_NODE_RESOURCE_DETECTORS`),o||[]})}Lr.getResourceDetectorsFromEnv=JVe;function X7(t){return t.map(e=>e.trim()).filter(e=>e!=="null"&&e!=="")}Lr.filterBlanksAndNulls=X7;function J7(){return(0,Oo.getStringFromEnv)("OTEL_EXPORTER_OTLP_TRACES_PROTOCOL")??(0,Oo.getStringFromEnv)("OTEL_EXPORTER_OTLP_PROTOCOL")??"http/protobuf"}Lr.getOtlpProtocolFromEnv=J7;function QVe(){let t=J7();switch(t){case"grpc":return new jVe.OTLPTraceExporter;case"http/json":return new qVe.OTLPTraceExporter;case"http/protobuf":return new K7.OTLPTraceExporter;default:return Ao.diag.warn(`Unsupported OTLP traces protocol: ${t}. Using http/protobuf.`),new K7.OTLPTraceExporter}}function ZVe(){try{let{JaegerExporter:t}=b("@opentelemetry/exporter-jaeger");return new t}catch(t){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: ${t}`)}}function eGe(){let t=new Map([["otlp",()=>QVe()],["zipkin",()=>new HVe.ZipkinExporter],["console",()=>new Ey.ConsoleSpanExporter],["jaeger",()=>ZVe()]]),e=[],r=[],o=X7(Array.from(new Set((0,Oo.getStringListFromEnv)("OTEL_TRACES_EXPORTER"))));if(o[0]==="none")return Ao.diag.warn('OTEL_TRACES_EXPORTER contains "none". SDK will not be initialized.'),[];o.length===0?(Ao.diag.debug("OTEL_TRACES_EXPORTER is empty. Using default otlp exporter."),o=["otlp"]):o.length>1&&o.includes("none")&&(Ao.diag.warn('OTEL_TRACES_EXPORTER contains "none" along with other exporters. Using default otlp exporter.'),o=["otlp"]);for(let s of o){let a=t.get(s)?.();a?e.push(a):Ao.diag.warn(`Unrecognized OTEL_TRACES_EXPORTER value: ${s}.`)}for(let s of e)s instanceof Ey.ConsoleSpanExporter?r.push(new Ey.SimpleSpanProcessor(s)):r.push(new Ey.BatchSpanProcessor(s));return e.length===0&&Ao.diag.warn("Unable to set up trace exporter(s) due to invalid exporter and/or protocol values."),r}Lr.getSpanProcessorsFromEnv=eGe;function tGe(){let t=(0,Oo.getStringListFromEnv)("OTEL_PROPAGATORS");if(t==null)return;let e=new Map([["tracecontext",()=>new Oo.W3CTraceContextPropagator],["baggage",()=>new Oo.W3CBaggagePropagator],["b3",()=>new kx.B3Propagator],["b3multi",()=>new kx.B3Propagator({injectEncoding:kx.B3InjectEncoding.MULTI_HEADER})],["jaeger",()=>new zVe.JaegerPropagator]]),r=Array.from(new Set(t)),s=r.map(a=>{let i=e.get(a)?.();if(!i){Ao.diag.warn(`Propagator "${a}" requested through environment variable is unavailable.`);return}return i}).reduce((a,i)=>(i&&a.push(i),a),[]);return s.length===0?null:r.length===1?s[0]:new Oo.CompositePropagator({propagators:s})}Lr.getPropagatorFromEnv=tGe});var tQ=p(Sy=>{"use strict";Object.defineProperty(Sy,"__esModule",{value:!0});Sy.NodeSDK=void 0;var Gt=(R(),y(C)),rGe=Bu(),nGe=l6(),Zc=Sa(),Dd=Tb(),iGe=y8(),oGe=qJ(),Bx=WJ(),sGe=n7(),Z7=fx(),aGe=UT(),cGe=p7(),ks=Ei(),uGe=_g(),lGe=CP(),dGe=(vt(),y(Ut)),bo=K(),Fx=Q7();function eQ(t,e){return parseInt(process.env[t]||"")||e}function pGe(){let t=[],e=(0,bo.getStringListFromEnv)("OTEL_METRICS_EXPORTER");return e?(e.length===0&&Gt.diag.debug("OTEL_METRICS_EXPORTER is empty. Using default otlp exporter."),e.includes("none")?(Gt.diag.info('OTEL_METRICS_EXPORTER contains "none". Metric provider will not be initialized.'),t):(e.forEach(r=>{if(r==="otlp"){let o=process.env.OTEL_EXPORTER_OTLP_METRICS_PROTOCOL?.trim()||process.env.OTEL_EXPORTER_OTLP_PROTOCOL?.trim(),s=eQ("OTEL_METRIC_EXPORT_INTERVAL",6e4),a=eQ("OTEL_METRIC_EXPORT_TIMEOUT",3e4);switch(o){case"grpc":t.push(new ks.PeriodicExportingMetricReader({exporter:new sGe.OTLPMetricExporter,exportIntervalMillis:s,exportTimeoutMillis:a}));break;case"http/json":t.push(new ks.PeriodicExportingMetricReader({exporter:new aGe.OTLPMetricExporter,exportIntervalMillis:s,exportTimeoutMillis:a}));break;case"http/protobuf":t.push(new ks.PeriodicExportingMetricReader({exporter:new Z7.OTLPMetricExporter,exportIntervalMillis:s,exportTimeoutMillis:a}));break;default:Gt.diag.warn(`Unsupported OTLP metrics protocol: "${o}". Using http/protobuf.`),t.push(new ks.PeriodicExportingMetricReader({exporter:new Z7.OTLPMetricExporter,exportIntervalMillis:s,exportTimeoutMillis:a}))}}else r==="console"?t.push(new ks.PeriodicExportingMetricReader({exporter:new ks.ConsoleMetricExporter})):r==="prometheus"?t.push(new cGe.PrometheusExporter):Gt.diag.warn(`Unsupported OTEL_METRICS_EXPORTER value: "${r}". Supported values are: otlp, console, prometheus, none.`)}),t)):t}var Vx=class{_tracerProviderConfig;_loggerProviderConfig;_meterProviderConfig;_instrumentations;_resource;_resourceDetectors;_autoDetectResources;_tracerProvider;_loggerProvider;_meterProvider;_serviceName;_configuration;_disabled;constructor(e={}){(0,bo.getBooleanFromEnv)("OTEL_SDK_DISABLED")&&(this._disabled=!0);let r=(0,bo.getStringFromEnv)("OTEL_LOG_LEVEL");if(r!=null&&Gt.diag.setLogger(new Gt.DiagConsoleLogger,{logLevel:(0,bo.diagLogLevelFromString)(r)}),this._configuration=e,this._resource=e.resource??(0,Zc.defaultResource)(),this._autoDetectResources=e.autoDetectResources??!0,this._autoDetectResources?e.resourceDetectors!=null?this._resourceDetectors=e.resourceDetectors:(0,bo.getStringFromEnv)("OTEL_NODE_RESOURCE_DETECTORS")?this._resourceDetectors=(0,Fx.getResourceDetectorsFromEnv)():this._resourceDetectors=[Zc.envDetector,Zc.processDetector,Zc.hostDetector]:this._resourceDetectors=[],this._serviceName=e.serviceName,e.traceExporter||e.spanProcessor||e.spanProcessors){let o={};e.sampler&&(o.sampler=e.sampler),e.spanLimits&&(o.spanLimits=e.spanLimits),e.idGenerator&&(o.idGenerator=e.idGenerator),e.spanProcessor&&Gt.diag.warn("The 'spanProcessor' option is deprecated. Please use 'spanProcessors' instead.");let s=e.spanProcessor??new uGe.BatchSpanProcessor(e.traceExporter),a=e.spanProcessors??[s];this._tracerProviderConfig={tracerConfig:o,spanProcessors:a,contextManager:e.contextManager,textMapPropagator:e.textMapPropagator}}if(e.logRecordProcessors?this._loggerProviderConfig={logRecordProcessors:e.logRecordProcessors}:e.logRecordProcessor?(this._loggerProviderConfig={logRecordProcessors:[e.logRecordProcessor]},Gt.diag.warn("The 'logRecordProcessor' option is deprecated. Please use 'logRecordProcessors' instead.")):this.configureLoggerProviderFromEnv(),e.metricReaders||e.metricReader||e.views){let o={};e.metricReaders?o.readers=e.metricReaders:e.metricReader&&(o.readers=[e.metricReader],Gt.diag.warn("The 'metricReader' option is deprecated. Please use 'metricReaders' instead.")),e.views&&(o.views=e.views),this._meterProviderConfig=o}this._instrumentations=e.instrumentations?.flat()??[]}start(){if(this._disabled)return;if((0,nGe.registerInstrumentations)({instrumentations:this._instrumentations}),this._autoDetectResources){let o={detectors:this._resourceDetectors};this._resource=this._resource.merge((0,Zc.detectResources)(o))}this._resource=this._serviceName===void 0?this._resource:this._resource.merge((0,Zc.resourceFromAttributes)({[dGe.ATTR_SERVICE_NAME]:this._serviceName}));let e=this._tracerProviderConfig?this._tracerProviderConfig.spanProcessors:(0,Fx.getSpanProcessorsFromEnv)();if(this._tracerProvider=new lGe.NodeTracerProvider({...this._configuration,resource:this._resource,spanProcessors:e}),e.length>0&&this._tracerProvider.register({contextManager:this._tracerProviderConfig?.contextManager??this._configuration?.contextManager,propagator:this._tracerProviderConfig?.textMapPropagator??(0,Fx.getPropagatorFromEnv)()}),this._loggerProviderConfig){let o=new Dd.LoggerProvider({resource:this._resource,processors:this._loggerProviderConfig.logRecordProcessors});this._loggerProvider=o,rGe.logs.setGlobalLoggerProvider(o)}let r=pGe();if(this._meterProviderConfig||r.length>0){let o=[];this._meterProviderConfig?.readers&&o.push(...this._meterProviderConfig.readers),o.length===0&&r.forEach(a=>o.push(a));let s=new ks.MeterProvider({resource:this._resource,views:this._meterProviderConfig?.views??[],readers:o});this._meterProvider=s,Gt.metrics.setGlobalMeterProvider(s);for(let a of this._instrumentations)a.setMeterProvider(Gt.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(){let e=(0,bo.getStringListFromEnv)("OTEL_LOGS_EXPORTER")??[];if(e.length===0&&(Gt.diag.debug("OTEL_LOGS_EXPORTER is empty. Using default otlp exporter."),e.push("otlp")),e.includes("none")){Gt.diag.info('OTEL_LOGS_EXPORTER contains "none". Logger provider will not be initialized.');return}let r=[];e.forEach(o=>{if(o==="otlp"){let s=((0,bo.getStringFromEnv)("OTEL_EXPORTER_OTLP_LOGS_PROTOCOL")??(0,bo.getStringFromEnv)("OTEL_EXPORTER_OTLP_PROTOCOL"))?.trim();switch(s){case"grpc":r.push(new oGe.OTLPLogExporter);break;case"http/json":r.push(new iGe.OTLPLogExporter);break;case"http/protobuf":r.push(new Bx.OTLPLogExporter);break;case void 0:case"":r.push(new Bx.OTLPLogExporter);break;default:Gt.diag.warn(`Unsupported OTLP logs protocol: "${s}". Using http/protobuf.`),r.push(new Bx.OTLPLogExporter)}}else o==="console"?r.push(new Dd.ConsoleLogRecordExporter):Gt.diag.warn(`Unsupported OTEL_LOGS_EXPORTER value: "${o}". Supported values are: otlp, console, none.`)}),r.length>0&&(this._loggerProviderConfig={logRecordProcessors:r.map(o=>o instanceof Dd.ConsoleLogRecordExporter?new Dd.SimpleLogRecordProcessor(o):new Dd.BatchLogRecordProcessor(o))})}};Sy.NodeSDK=Vx});var rQ=p(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.NodeSDK=Ye.tracing=Ye.resources=Ye.node=Ye.metrics=Ye.logs=Ye.core=Ye.contextBase=Ye.api=void 0;Ye.api=(R(),y(C));Ye.contextBase=(R(),y(C));Ye.core=K();Ye.logs=Tb();Ye.metrics=Ei();Ye.node=CP();Ye.resources=Sa();Ye.tracing=_g();var fGe=tQ();Object.defineProperty(Ye,"NodeSDK",{enumerable:!0,get:function(){return fGe.NodeSDK}})});var Ud=p(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.isTracingSuppressed=Ro.unsuppressTracing=Ro.suppressTracing=void 0;var hGe=(R(),y(C)),Gx=(0,hGe.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function mGe(t){return t.setValue(Gx,!0)}Ro.suppressTracing=mGe;function _Ge(t){return t.deleteValue(Gx)}Ro.unsuppressTracing=_Ge;function gGe(t){return t.getValue(Gx)===!0}Ro.isTracingSuppressed=gGe});var qx=p(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.BAGGAGE_MAX_TOTAL_LENGTH=Pt.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Pt.BAGGAGE_MAX_NAME_VALUE_PAIRS=Pt.BAGGAGE_HEADER=Pt.BAGGAGE_ITEMS_SEPARATOR=Pt.BAGGAGE_PROPERTIES_SEPARATOR=Pt.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Pt.BAGGAGE_KEY_PAIR_SEPARATOR="=";Pt.BAGGAGE_PROPERTIES_SEPARATOR=";";Pt.BAGGAGE_ITEMS_SEPARATOR=",";Pt.BAGGAGE_HEADER="baggage";Pt.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Pt.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Pt.BAGGAGE_MAX_TOTAL_LENGTH=8192});var jx=p(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.parseKeyPairsIntoRecord=ii.parsePairKeyValue=ii.getKeyPairs=ii.serializeKeyPairs=void 0;var EGe=(R(),y(C)),Bs=qx();function SGe(t){return t.reduce((e,r)=>{let o=`${e}${e!==""?Bs.BAGGAGE_ITEMS_SEPARATOR:""}${r}`;return o.length>Bs.BAGGAGE_MAX_TOTAL_LENGTH?e:o},"")}ii.serializeKeyPairs=SGe;function TGe(t){return t.getAllEntries().map(([e,r])=>{let o=`${encodeURIComponent(e)}=${encodeURIComponent(r.value)}`;return r.metadata!==void 0&&(o+=Bs.BAGGAGE_PROPERTIES_SEPARATOR+r.metadata.toString()),o})}ii.getKeyPairs=TGe;function nQ(t){let e=t.split(Bs.BAGGAGE_PROPERTIES_SEPARATOR);if(e.length<=0)return;let r=e.shift();if(!r)return;let o=r.indexOf(Bs.BAGGAGE_KEY_PAIR_SEPARATOR);if(o<=0)return;let s=decodeURIComponent(r.substring(0,o).trim()),a=decodeURIComponent(r.substring(o+1).trim()),i;return e.length>0&&(i=(0,EGe.baggageEntryMetadataFromString)(e.join(Bs.BAGGAGE_PROPERTIES_SEPARATOR))),{key:s,value:a,metadata:i}}ii.parsePairKeyValue=nQ;function yGe(t){let e={};return typeof t=="string"&&t.length>0&&t.split(Bs.BAGGAGE_ITEMS_SEPARATOR).forEach(r=>{let o=nQ(r);o!==void 0&&o.value.length>0&&(e[o.key]=o.value)}),e}ii.parseKeyPairsIntoRecord=yGe});var iQ=p(Ty=>{"use strict";Object.defineProperty(Ty,"__esModule",{value:!0});Ty.W3CBaggagePropagator=void 0;var Hx=(R(),y(C)),vGe=Ud(),Fs=qx(),zx=jx(),$x=class{inject(e,r,o){let s=Hx.propagation.getBaggage(e);if(!s||(0,vGe.isTracingSuppressed)(e))return;let a=(0,zx.getKeyPairs)(s).filter(n=>n.length<=Fs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Fs.BAGGAGE_MAX_NAME_VALUE_PAIRS),i=(0,zx.serializeKeyPairs)(a);i.length>0&&o.set(r,Fs.BAGGAGE_HEADER,i)}extract(e,r,o){let s=o.get(r,Fs.BAGGAGE_HEADER),a=Array.isArray(s)?s.join(Fs.BAGGAGE_ITEMS_SEPARATOR):s;if(!a)return e;let i={};return a.length===0||(a.split(Fs.BAGGAGE_ITEMS_SEPARATOR).forEach(c=>{let u=(0,zx.parsePairKeyValue)(c);if(u){let l={value:u.value};u.metadata&&(l.metadata=u.metadata),i[u.key]=l}}),Object.entries(i).length===0)?e:Hx.propagation.setBaggage(e,Hx.propagation.createBaggage(i))}fields(){return[Fs.BAGGAGE_HEADER]}};Ty.W3CBaggagePropagator=$x});var oQ=p(yy=>{"use strict";Object.defineProperty(yy,"__esModule",{value:!0});yy.AnchoredClock=void 0;var Yx=class{_monotonicClock;_epochMillis;_performanceMillis;constructor(e,r){this._monotonicClock=r,this._epochMillis=e.now(),this._performanceMillis=r.now()}now(){let e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e}};yy.AnchoredClock=Yx});var lQ=p(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.isAttributeValue=Po.isAttributeKey=Po.sanitizeAttributes=void 0;var sQ=(R(),y(C));function AGe(t){let e={};if(typeof t!="object"||t==null)return e;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;if(!aQ(r)){sQ.diag.warn(`Invalid attribute key: ${r}`);continue}let o=t[r];if(!cQ(o)){sQ.diag.warn(`Invalid attribute value set for key: ${r}`);continue}Array.isArray(o)?e[r]=o.slice():e[r]=o}return e}Po.sanitizeAttributes=AGe;function aQ(t){return typeof t=="string"&&t!==""}Po.isAttributeKey=aQ;function cQ(t){return t==null?!0:Array.isArray(t)?OGe(t):uQ(typeof t)}Po.isAttributeValue=cQ;function OGe(t){let e;for(let r of t){if(r==null)continue;let o=typeof r;if(o!==e){if(!e){if(uQ(o)){e=o;continue}return!1}return!1}}return!0}function uQ(t){switch(t){case"number":case"boolean":case"string":return!0}return!1}});var Wx=p(vy=>{"use strict";Object.defineProperty(vy,"__esModule",{value:!0});vy.loggingErrorHandler=void 0;var bGe=(R(),y(C));function RGe(){return t=>{bGe.diag.error(PGe(t))}}vy.loggingErrorHandler=RGe;function PGe(t){return typeof t=="string"?t:JSON.stringify(CGe(t))}function CGe(t){let e={},r=t;for(;r!==null;)Object.getOwnPropertyNames(r).forEach(o=>{if(e[o])return;let s=r[o];s&&(e[o]=String(s))}),r=Object.getPrototypeOf(r);return e}});var pQ=p(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.globalErrorHandler=eu.setGlobalErrorHandler=void 0;var NGe=Wx(),dQ=(0,NGe.loggingErrorHandler)();function MGe(t){dQ=t}eu.setGlobalErrorHandler=MGe;function IGe(t){try{dQ(t)}catch{}}eu.globalErrorHandler=IGe});var _Q=p(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.getStringListFromEnv=oi.getBooleanFromEnv=oi.getStringFromEnv=oi.getNumberFromEnv=void 0;var fQ=(R(),y(C)),hQ=b("util");function xGe(t){let e=process.env[t];if(e==null||e.trim()==="")return;let r=Number(e);if(isNaN(r)){fQ.diag.warn(`Unknown value ${(0,hQ.inspect)(e)} for ${t}, expected a number, using defaults`);return}return r}oi.getNumberFromEnv=xGe;function mQ(t){let e=process.env[t];if(!(e==null||e.trim()===""))return e}oi.getStringFromEnv=mQ;function wGe(t){let e=process.env[t]?.trim().toLowerCase();return e==null||e===""?!1:e==="true"?!0:(e==="false"||fQ.diag.warn(`Unknown value ${(0,hQ.inspect)(e)} for ${t}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}oi.getBooleanFromEnv=wGe;function LGe(t){return mQ(t)?.split(",").map(e=>e.trim()).filter(e=>e!=="")}oi.getStringListFromEnv=LGe});var gQ=p(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});Ay._globalThis=void 0;Ay._globalThis=typeof globalThis=="object"?globalThis:global});var EQ=p(Oy=>{"use strict";Object.defineProperty(Oy,"__esModule",{value:!0});Oy.otperformance=void 0;var DGe=b("perf_hooks");Oy.otperformance=DGe.performance});var SQ=p(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});by.VERSION=void 0;by.VERSION="2.2.0"});var TQ=p(Ry=>{"use strict";Object.defineProperty(Ry,"__esModule",{value:!0});Ry.ATTR_PROCESS_RUNTIME_NAME=void 0;Ry.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var yQ=p(Cy=>{"use strict";Object.defineProperty(Cy,"__esModule",{value:!0});Cy.SDK_INFO=void 0;var UGe=SQ(),Py=(vt(),y(Ut)),kGe=TQ();Cy.SDK_INFO={[Py.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[kGe.ATTR_PROCESS_RUNTIME_NAME]:"node",[Py.ATTR_TELEMETRY_SDK_LANGUAGE]:Py.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[Py.ATTR_TELEMETRY_SDK_VERSION]:UGe.VERSION}});var vQ=p(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.SDK_INFO=Ct.otperformance=Ct._globalThis=Ct.getStringListFromEnv=Ct.getNumberFromEnv=Ct.getBooleanFromEnv=Ct.getStringFromEnv=void 0;var Ny=_Q();Object.defineProperty(Ct,"getStringFromEnv",{enumerable:!0,get:function(){return Ny.getStringFromEnv}});Object.defineProperty(Ct,"getBooleanFromEnv",{enumerable:!0,get:function(){return Ny.getBooleanFromEnv}});Object.defineProperty(Ct,"getNumberFromEnv",{enumerable:!0,get:function(){return Ny.getNumberFromEnv}});Object.defineProperty(Ct,"getStringListFromEnv",{enumerable:!0,get:function(){return Ny.getStringListFromEnv}});var BGe=gQ();Object.defineProperty(Ct,"_globalThis",{enumerable:!0,get:function(){return BGe._globalThis}});var FGe=EQ();Object.defineProperty(Ct,"otperformance",{enumerable:!0,get:function(){return FGe.otperformance}});var VGe=yQ();Object.defineProperty(Ct,"SDK_INFO",{enumerable:!0,get:function(){return VGe.SDK_INFO}})});var Kx=p(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.getStringListFromEnv=Nt.getNumberFromEnv=Nt.getStringFromEnv=Nt.getBooleanFromEnv=Nt.otperformance=Nt._globalThis=Nt.SDK_INFO=void 0;var Vs=vQ();Object.defineProperty(Nt,"SDK_INFO",{enumerable:!0,get:function(){return Vs.SDK_INFO}});Object.defineProperty(Nt,"_globalThis",{enumerable:!0,get:function(){return Vs._globalThis}});Object.defineProperty(Nt,"otperformance",{enumerable:!0,get:function(){return Vs.otperformance}});Object.defineProperty(Nt,"getBooleanFromEnv",{enumerable:!0,get:function(){return Vs.getBooleanFromEnv}});Object.defineProperty(Nt,"getStringFromEnv",{enumerable:!0,get:function(){return Vs.getStringFromEnv}});Object.defineProperty(Nt,"getNumberFromEnv",{enumerable:!0,get:function(){return Vs.getNumberFromEnv}});Object.defineProperty(Nt,"getStringListFromEnv",{enumerable:!0,get:function(){return Vs.getStringListFromEnv}})});var RQ=p(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.addHrTimes=Re.isTimeInput=Re.isTimeInputHrTime=Re.hrTimeToMicroseconds=Re.hrTimeToMilliseconds=Re.hrTimeToNanoseconds=Re.hrTimeToTimeStamp=Re.hrTimeDuration=Re.timeInputToHrTime=Re.hrTime=Re.getTimeOrigin=Re.millisToHrTime=void 0;var Xx=Kx(),AQ=9,GGe=6,qGe=Math.pow(10,GGe),My=Math.pow(10,AQ);function kd(t){let e=t/1e3,r=Math.trunc(e),o=Math.round(t%1e3*qGe);return[r,o]}Re.millisToHrTime=kd;function Jx(){let t=Xx.otperformance.timeOrigin;if(typeof t!="number"){let e=Xx.otperformance;t=e.timing&&e.timing.fetchStart}return t}Re.getTimeOrigin=Jx;function OQ(t){let e=kd(Jx()),r=kd(typeof t=="number"?t:Xx.otperformance.now());return bQ(e,r)}Re.hrTime=OQ;function jGe(t){if(Qx(t))return t;if(typeof t=="number")return t<Jx()?OQ(t):kd(t);if(t instanceof Date)return kd(t.getTime());throw TypeError("Invalid input type")}Re.timeInputToHrTime=jGe;function HGe(t,e){let r=e[0]-t[0],o=e[1]-t[1];return o<0&&(r-=1,o+=My),[r,o]}Re.hrTimeDuration=HGe;function zGe(t){let e=AQ,r=`${"0".repeat(e)}${t[1]}Z`,o=r.substring(r.length-e-1);return new Date(t[0]*1e3).toISOString().replace("000Z",o)}Re.hrTimeToTimeStamp=zGe;function $Ge(t){return t[0]*My+t[1]}Re.hrTimeToNanoseconds=$Ge;function YGe(t){return t[0]*1e3+t[1]/1e6}Re.hrTimeToMilliseconds=YGe;function WGe(t){return t[0]*1e6+t[1]/1e3}Re.hrTimeToMicroseconds=WGe;function Qx(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}Re.isTimeInputHrTime=Qx;function KGe(t){return Qx(t)||typeof t=="number"||t instanceof Date}Re.isTimeInput=KGe;function bQ(t,e){let r=[t[0]+e[0],t[1]+e[1]];return r[1]>=My&&(r[1]-=My,r[0]+=1),r}Re.addHrTimes=bQ});var PQ=p(Iy=>{"use strict";Object.defineProperty(Iy,"__esModule",{value:!0});Iy.unrefTimer=void 0;function XGe(t){typeof t!="number"&&t.unref()}Iy.unrefTimer=XGe});var CQ=p(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});Bd.ExportResultCode=void 0;var JGe;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(JGe=Bd.ExportResultCode||(Bd.ExportResultCode={}))});var MQ=p(xy=>{"use strict";Object.defineProperty(xy,"__esModule",{value:!0});xy.CompositePropagator=void 0;var NQ=(R(),y(C)),Zx=class{_propagators;_fields;constructor(e={}){this._propagators=e.propagators??[],this._fields=Array.from(new Set(this._propagators.map(r=>typeof r.fields=="function"?r.fields():[]).reduce((r,o)=>r.concat(o),[])))}inject(e,r,o){for(let s of this._propagators)try{s.inject(e,r,o)}catch(a){NQ.diag.warn(`Failed to inject with ${s.constructor.name}. Err: ${a.message}`)}}extract(e,r,o){return this._propagators.reduce((s,a)=>{try{return a.extract(s,r,o)}catch(i){NQ.diag.warn(`Failed to extract with ${a.constructor.name}. Err: ${i.message}`)}return s},e)}fields(){return this._fields.slice()}};xy.CompositePropagator=Zx});var IQ=p(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.validateValue=tu.validateKey=void 0;var ew="[_0-9a-z-*/]",QGe=`[a-z]${ew}{0,255}`,ZGe=`[a-z0-9]${ew}{0,240}@[a-z]${ew}{0,13}`,eqe=new RegExp(`^(?:${QGe}|${ZGe})$`),tqe=/^[ -~]{0,255}[!-~]$/,rqe=/,|=/;function nqe(t){return eqe.test(t)}tu.validateKey=nqe;function iqe(t){return tqe.test(t)&&!rqe.test(t)}tu.validateValue=iqe});var rw=p(wy=>{"use strict";Object.defineProperty(wy,"__esModule",{value:!0});wy.TraceState=void 0;var xQ=IQ(),wQ=32,oqe=512,LQ=",",DQ="=",tw=class t{_internalState=new Map;constructor(e){e&&this._parse(e)}set(e,r){let o=this._clone();return o._internalState.has(e)&&o._internalState.delete(e),o._internalState.set(e,r),o}unset(e){let r=this._clone();return r._internalState.delete(e),r}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,r)=>(e.push(r+DQ+this.get(r)),e),[]).join(LQ)}_parse(e){e.length>oqe||(this._internalState=e.split(LQ).reverse().reduce((r,o)=>{let s=o.trim(),a=s.indexOf(DQ);if(a!==-1){let i=s.slice(0,a),n=s.slice(a+1,o.length);(0,xQ.validateKey)(i)&&(0,xQ.validateValue)(n)&&r.set(i,n)}return r},new Map),this._internalState.size>wQ&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,wQ))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new t;return e._internalState=new Map(this._internalState),e}};wy.TraceState=tw});var kQ=p(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.W3CTraceContextPropagator=Mt.parseTraceParent=Mt.TRACE_STATE_HEADER=Mt.TRACE_PARENT_HEADER=void 0;var Ly=(R(),y(C)),sqe=Ud(),aqe=rw();Mt.TRACE_PARENT_HEADER="traceparent";Mt.TRACE_STATE_HEADER="tracestate";var cqe="00",uqe="(?!ff)[\\da-f]{2}",lqe="(?![0]{32})[\\da-f]{32}",dqe="(?![0]{16})[\\da-f]{16}",pqe="[\\da-f]{2}",fqe=new RegExp(`^\\s?(${uqe})-(${lqe})-(${dqe})-(${pqe})(-.*)?\\s?$`);function UQ(t){let e=fqe.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}Mt.parseTraceParent=UQ;var nw=class{inject(e,r,o){let s=Ly.trace.getSpanContext(e);if(!s||(0,sqe.isTracingSuppressed)(e)||!(0,Ly.isSpanContextValid)(s))return;let a=`${cqe}-${s.traceId}-${s.spanId}-0${Number(s.traceFlags||Ly.TraceFlags.NONE).toString(16)}`;o.set(r,Mt.TRACE_PARENT_HEADER,a),s.traceState&&o.set(r,Mt.TRACE_STATE_HEADER,s.traceState.serialize())}extract(e,r,o){let s=o.get(r,Mt.TRACE_PARENT_HEADER);if(!s)return e;let a=Array.isArray(s)?s[0]:s;if(typeof a!="string")return e;let i=UQ(a);if(!i)return e;i.isRemote=!0;let n=o.get(r,Mt.TRACE_STATE_HEADER);if(n){let c=Array.isArray(n)?n.join(","):n;i.traceState=new aqe.TraceState(typeof c=="string"?c:void 0)}return Ly.trace.setSpanContext(e,i)}fields(){return[Mt.TRACE_PARENT_HEADER,Mt.TRACE_STATE_HEADER]}};Mt.W3CTraceContextPropagator=nw});var BQ=p(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.getRPCMetadata=an.deleteRPCMetadata=an.setRPCMetadata=an.RPCType=void 0;var hqe=(R(),y(C)),iw=(0,hqe.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),mqe;(function(t){t.HTTP="http"})(mqe=an.RPCType||(an.RPCType={}));function _qe(t,e){return t.setValue(iw,e)}an.setRPCMetadata=_qe;function gqe(t){return t.deleteValue(iw)}an.deleteRPCMetadata=gqe;function Eqe(t){return t.getValue(iw)}an.getRPCMetadata=Eqe});var jQ=p(Dy=>{"use strict";Object.defineProperty(Dy,"__esModule",{value:!0});Dy.isPlainObject=void 0;var Sqe="[object Object]",Tqe="[object Null]",yqe="[object Undefined]",vqe=Function.prototype,FQ=vqe.toString,Aqe=FQ.call(Object),Oqe=Object.getPrototypeOf,VQ=Object.prototype,GQ=VQ.hasOwnProperty,Gs=Symbol?Symbol.toStringTag:void 0,qQ=VQ.toString;function bqe(t){if(!Rqe(t)||Pqe(t)!==Sqe)return!1;let e=Oqe(t);if(e===null)return!0;let r=GQ.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&FQ.call(r)===Aqe}Dy.isPlainObject=bqe;function Rqe(t){return t!=null&&typeof t=="object"}function Pqe(t){return t==null?t===void 0?yqe:Tqe:Gs&&Gs in Object(t)?Cqe(t):Nqe(t)}function Cqe(t){let e=GQ.call(t,Gs),r=t[Gs],o=!1;try{t[Gs]=void 0,o=!0}catch{}let s=qQ.call(t);return o&&(e?t[Gs]=r:delete t[Gs]),s}function Nqe(t){return qQ.call(t)}});var WQ=p(By=>{"use strict";Object.defineProperty(By,"__esModule",{value:!0});By.merge=void 0;var HQ=jQ(),Mqe=20;function Iqe(...t){let e=t.shift(),r=new WeakMap;for(;t.length>0;)e=$Q(e,t.shift(),0,r);return e}By.merge=Iqe;function ow(t){return ky(t)?t.slice():t}function $Q(t,e,r=0,o){let s;if(!(r>Mqe)){if(r++,Uy(t)||Uy(e)||YQ(e))s=ow(e);else if(ky(t)){if(s=t.slice(),ky(e))for(let a=0,i=e.length;a<i;a++)s.push(ow(e[a]));else if(Fd(e)){let a=Object.keys(e);for(let i=0,n=a.length;i<n;i++){let c=a[i];s[c]=ow(e[c])}}}else if(Fd(t))if(Fd(e)){if(!xqe(t,e))return e;s=Object.assign({},t);let a=Object.keys(e);for(let i=0,n=a.length;i<n;i++){let c=a[i],u=e[c];if(Uy(u))typeof u>"u"?delete s[c]:s[c]=u;else{let l=s[c],d=u;if(zQ(t,c,o)||zQ(e,c,o))delete s[c];else{if(Fd(l)&&Fd(d)){let h=o.get(l)||[],g=o.get(d)||[];h.push({obj:t,key:c}),g.push({obj:e,key:c}),o.set(l,h),o.set(d,g)}s[c]=$Q(s[c],u,r,o)}}}}else s=e;return s}}function zQ(t,e,r){let o=r.get(t[e])||[];for(let s=0,a=o.length;s<a;s++){let i=o[s];if(i.key===e&&i.obj===t)return!0}return!1}function ky(t){return Array.isArray(t)}function YQ(t){return typeof t=="function"}function Fd(t){return!Uy(t)&&!ky(t)&&!YQ(t)&&typeof t=="object"}function Uy(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function xqe(t,e){return!(!(0,HQ.isPlainObject)(t)||!(0,HQ.isPlainObject)(e))}});var KQ=p(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.callWithTimeout=ru.TimeoutError=void 0;var Fy=class t extends Error{constructor(e){super(e),Object.setPrototypeOf(this,t.prototype)}};ru.TimeoutError=Fy;function wqe(t,e){let r,o=new Promise(function(a,i){r=setTimeout(function(){i(new Fy("Operation timed out."))},e)});return Promise.race([t,o]).then(s=>(clearTimeout(r),s),s=>{throw clearTimeout(r),s})}ru.callWithTimeout=wqe});var JQ=p(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.isUrlIgnored=nu.urlMatches=void 0;function XQ(t,e){return typeof e=="string"?t===e:!!t.match(e)}nu.urlMatches=XQ;function Lqe(t,e){if(!e)return!1;for(let r of e)if(XQ(t,r))return!0;return!1}nu.isUrlIgnored=Lqe});var QQ=p(Vy=>{"use strict";Object.defineProperty(Vy,"__esModule",{value:!0});Vy.Deferred=void 0;var sw=class{_promise;_resolve;_reject;constructor(){this._promise=new Promise((e,r)=>{this._resolve=e,this._reject=r})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}};Vy.Deferred=sw});var ZQ=p(Gy=>{"use strict";Object.defineProperty(Gy,"__esModule",{value:!0});Gy.BindOnceFuture=void 0;var Dqe=QQ(),aw=class{_callback;_that;_isCalled=!1;_deferred=new Dqe.Deferred;constructor(e,r){this._callback=e,this._that=r}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(r=>this._deferred.resolve(r),r=>this._deferred.reject(r))}catch(r){this._deferred.reject(r)}}return this._deferred.promise}};Gy.BindOnceFuture=aw});var tZ=p(qy=>{"use strict";Object.defineProperty(qy,"__esModule",{value:!0});qy.diagLogLevelFromString=void 0;var Li=(R(),y(C)),eZ={ALL:Li.DiagLogLevel.ALL,VERBOSE:Li.DiagLogLevel.VERBOSE,DEBUG:Li.DiagLogLevel.DEBUG,INFO:Li.DiagLogLevel.INFO,WARN:Li.DiagLogLevel.WARN,ERROR:Li.DiagLogLevel.ERROR,NONE:Li.DiagLogLevel.NONE};function Uqe(t){if(t==null)return;let e=eZ[t.toUpperCase()];return e??(Li.diag.warn(`Unknown log level "${t}", expected one of ${Object.keys(eZ)}, using default`),Li.DiagLogLevel.INFO)}qy.diagLogLevelFromString=Uqe});var nZ=p(jy=>{"use strict";Object.defineProperty(jy,"__esModule",{value:!0});jy._export=void 0;var rZ=(R(),y(C)),kqe=Ud();function Bqe(t,e){return new Promise(r=>{rZ.context.with((0,kqe.suppressTracing)(rZ.context.active()),()=>{t.export(e,o=>{r(o)})})})}jy._export=Bqe});var uw=p(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.internal=L.diagLogLevelFromString=L.BindOnceFuture=L.urlMatches=L.isUrlIgnored=L.callWithTimeout=L.TimeoutError=L.merge=L.TraceState=L.unsuppressTracing=L.suppressTracing=L.isTracingSuppressed=L.setRPCMetadata=L.getRPCMetadata=L.deleteRPCMetadata=L.RPCType=L.parseTraceParent=L.W3CTraceContextPropagator=L.TRACE_STATE_HEADER=L.TRACE_PARENT_HEADER=L.CompositePropagator=L.otperformance=L.getStringListFromEnv=L.getNumberFromEnv=L.getBooleanFromEnv=L.getStringFromEnv=L._globalThis=L.SDK_INFO=L.parseKeyPairsIntoRecord=L.ExportResultCode=L.unrefTimer=L.timeInputToHrTime=L.millisToHrTime=L.isTimeInputHrTime=L.isTimeInput=L.hrTimeToTimeStamp=L.hrTimeToNanoseconds=L.hrTimeToMilliseconds=L.hrTimeToMicroseconds=L.hrTimeDuration=L.hrTime=L.getTimeOrigin=L.addHrTimes=L.loggingErrorHandler=L.setGlobalErrorHandler=L.globalErrorHandler=L.sanitizeAttributes=L.isAttributeValue=L.AnchoredClock=L.W3CBaggagePropagator=void 0;var Fqe=iQ();Object.defineProperty(L,"W3CBaggagePropagator",{enumerable:!0,get:function(){return Fqe.W3CBaggagePropagator}});var Vqe=oQ();Object.defineProperty(L,"AnchoredClock",{enumerable:!0,get:function(){return Vqe.AnchoredClock}});var iZ=lQ();Object.defineProperty(L,"isAttributeValue",{enumerable:!0,get:function(){return iZ.isAttributeValue}});Object.defineProperty(L,"sanitizeAttributes",{enumerable:!0,get:function(){return iZ.sanitizeAttributes}});var oZ=pQ();Object.defineProperty(L,"globalErrorHandler",{enumerable:!0,get:function(){return oZ.globalErrorHandler}});Object.defineProperty(L,"setGlobalErrorHandler",{enumerable:!0,get:function(){return oZ.setGlobalErrorHandler}});var Gqe=Wx();Object.defineProperty(L,"loggingErrorHandler",{enumerable:!0,get:function(){return Gqe.loggingErrorHandler}});var Dr=RQ();Object.defineProperty(L,"addHrTimes",{enumerable:!0,get:function(){return Dr.addHrTimes}});Object.defineProperty(L,"getTimeOrigin",{enumerable:!0,get:function(){return Dr.getTimeOrigin}});Object.defineProperty(L,"hrTime",{enumerable:!0,get:function(){return Dr.hrTime}});Object.defineProperty(L,"hrTimeDuration",{enumerable:!0,get:function(){return Dr.hrTimeDuration}});Object.defineProperty(L,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Dr.hrTimeToMicroseconds}});Object.defineProperty(L,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Dr.hrTimeToMilliseconds}});Object.defineProperty(L,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Dr.hrTimeToNanoseconds}});Object.defineProperty(L,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Dr.hrTimeToTimeStamp}});Object.defineProperty(L,"isTimeInput",{enumerable:!0,get:function(){return Dr.isTimeInput}});Object.defineProperty(L,"isTimeInputHrTime",{enumerable:!0,get:function(){return Dr.isTimeInputHrTime}});Object.defineProperty(L,"millisToHrTime",{enumerable:!0,get:function(){return Dr.millisToHrTime}});Object.defineProperty(L,"timeInputToHrTime",{enumerable:!0,get:function(){return Dr.timeInputToHrTime}});var qqe=PQ();Object.defineProperty(L,"unrefTimer",{enumerable:!0,get:function(){return qqe.unrefTimer}});var jqe=CQ();Object.defineProperty(L,"ExportResultCode",{enumerable:!0,get:function(){return jqe.ExportResultCode}});var Hqe=jx();Object.defineProperty(L,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Hqe.parseKeyPairsIntoRecord}});var qs=Kx();Object.defineProperty(L,"SDK_INFO",{enumerable:!0,get:function(){return qs.SDK_INFO}});Object.defineProperty(L,"_globalThis",{enumerable:!0,get:function(){return qs._globalThis}});Object.defineProperty(L,"getStringFromEnv",{enumerable:!0,get:function(){return qs.getStringFromEnv}});Object.defineProperty(L,"getBooleanFromEnv",{enumerable:!0,get:function(){return qs.getBooleanFromEnv}});Object.defineProperty(L,"getNumberFromEnv",{enumerable:!0,get:function(){return qs.getNumberFromEnv}});Object.defineProperty(L,"getStringListFromEnv",{enumerable:!0,get:function(){return qs.getStringListFromEnv}});Object.defineProperty(L,"otperformance",{enumerable:!0,get:function(){return qs.otperformance}});var zqe=MQ();Object.defineProperty(L,"CompositePropagator",{enumerable:!0,get:function(){return zqe.CompositePropagator}});var Hy=kQ();Object.defineProperty(L,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return Hy.TRACE_PARENT_HEADER}});Object.defineProperty(L,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return Hy.TRACE_STATE_HEADER}});Object.defineProperty(L,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return Hy.W3CTraceContextPropagator}});Object.defineProperty(L,"parseTraceParent",{enumerable:!0,get:function(){return Hy.parseTraceParent}});var zy=BQ();Object.defineProperty(L,"RPCType",{enumerable:!0,get:function(){return zy.RPCType}});Object.defineProperty(L,"deleteRPCMetadata",{enumerable:!0,get:function(){return zy.deleteRPCMetadata}});Object.defineProperty(L,"getRPCMetadata",{enumerable:!0,get:function(){return zy.getRPCMetadata}});Object.defineProperty(L,"setRPCMetadata",{enumerable:!0,get:function(){return zy.setRPCMetadata}});var cw=Ud();Object.defineProperty(L,"isTracingSuppressed",{enumerable:!0,get:function(){return cw.isTracingSuppressed}});Object.defineProperty(L,"suppressTracing",{enumerable:!0,get:function(){return cw.suppressTracing}});Object.defineProperty(L,"unsuppressTracing",{enumerable:!0,get:function(){return cw.unsuppressTracing}});var $qe=rw();Object.defineProperty(L,"TraceState",{enumerable:!0,get:function(){return $qe.TraceState}});var Yqe=WQ();Object.defineProperty(L,"merge",{enumerable:!0,get:function(){return Yqe.merge}});var sZ=KQ();Object.defineProperty(L,"TimeoutError",{enumerable:!0,get:function(){return sZ.TimeoutError}});Object.defineProperty(L,"callWithTimeout",{enumerable:!0,get:function(){return sZ.callWithTimeout}});var aZ=JQ();Object.defineProperty(L,"isUrlIgnored",{enumerable:!0,get:function(){return aZ.isUrlIgnored}});Object.defineProperty(L,"urlMatches",{enumerable:!0,get:function(){return aZ.urlMatches}});var Wqe=ZQ();Object.defineProperty(L,"BindOnceFuture",{enumerable:!0,get:function(){return Wqe.BindOnceFuture}});var Kqe=tZ();Object.defineProperty(L,"diagLogLevelFromString",{enumerable:!0,get:function(){return Kqe.diagLogLevelFromString}});var Xqe=nZ();L.internal={_export:Xqe._export}});var cZ=p($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});$y.defaultServiceName=void 0;function Jqe(){return`unknown_service:${process.argv0}`}$y.defaultServiceName=Jqe});var uZ=p(Yy=>{"use strict";Object.defineProperty(Yy,"__esModule",{value:!0});Yy.defaultServiceName=void 0;var Qqe=cZ();Object.defineProperty(Yy,"defaultServiceName",{enumerable:!0,get:function(){return Qqe.defaultServiceName}})});var lw=p(Wy=>{"use strict";Object.defineProperty(Wy,"__esModule",{value:!0});Wy.defaultServiceName=void 0;var Zqe=uZ();Object.defineProperty(Wy,"defaultServiceName",{enumerable:!0,get:function(){return Zqe.defaultServiceName}})});var lZ=p(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.identity=iu.isPromiseLike=void 0;var e2e=t=>t!==null&&typeof t=="object"&&typeof t.then=="function";iu.isPromiseLike=e2e;function t2e(t){return t}iu.identity=t2e});var fw=p(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.defaultResource=si.emptyResource=si.resourceFromDetectedResource=si.resourceFromAttributes=void 0;var Gd=(R(),y(C)),dw=uw(),js=(vt(),y(Ut)),r2e=lw(),Vd=lZ(),Ky=class t{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(e,r){let o=new t({},r);return o._rawAttributes=dZ(e),o._asyncAttributesPending=e.filter(([s,a])=>(0,Vd.isPromiseLike)(a)).length>0,o}constructor(e,r){let o=e.attributes??{};this._rawAttributes=Object.entries(o).map(([s,a])=>((0,Vd.isPromiseLike)(a)&&(this._asyncAttributesPending=!0),[s,a])),this._rawAttributes=dZ(this._rawAttributes),this._schemaUrl=s2e(r?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){let[r,o]=this._rawAttributes[e];this._rawAttributes[e]=[r,(0,Vd.isPromiseLike)(o)?await o:o]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&Gd.diag.error("Accessing resource attributes before async attributes settled"),this._memoizedAttributes)return this._memoizedAttributes;let e={};for(let[r,o]of this._rawAttributes){if((0,Vd.isPromiseLike)(o)){Gd.diag.debug(`Unsettled resource attribute ${r} skipped`);continue}o!=null&&(e[r]??=o)}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(e){if(e==null)return this;let r=a2e(this,e),o=r?{schemaUrl:r}:void 0;return t.FromAttributeList([...e.getRawAttributes(),...this.getRawAttributes()],o)}};function pw(t,e){return Ky.FromAttributeList(Object.entries(t),e)}si.resourceFromAttributes=pw;function n2e(t,e){return new Ky(t,e)}si.resourceFromDetectedResource=n2e;function i2e(){return pw({})}si.emptyResource=i2e;function o2e(){return pw({[js.ATTR_SERVICE_NAME]:(0,r2e.defaultServiceName)(),[js.ATTR_TELEMETRY_SDK_LANGUAGE]:dw.SDK_INFO[js.ATTR_TELEMETRY_SDK_LANGUAGE],[js.ATTR_TELEMETRY_SDK_NAME]:dw.SDK_INFO[js.ATTR_TELEMETRY_SDK_NAME],[js.ATTR_TELEMETRY_SDK_VERSION]:dw.SDK_INFO[js.ATTR_TELEMETRY_SDK_VERSION]})}si.defaultResource=o2e;function dZ(t){return t.map(([e,r])=>(0,Vd.isPromiseLike)(r)?[e,r.catch(o=>{Gd.diag.debug("promise rejection for resource attribute: %s - %s",e,o)})]:[e,r])}function s2e(t){if(typeof t=="string"||t===void 0)return t;Gd.diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",t)}function a2e(t,e){let r=t?.schemaUrl,o=e?.schemaUrl,s=r===void 0||r==="",a=o===void 0||o==="";if(s)return o;if(a||r===o)return r;Gd.diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',r,o)}});var fZ=p(Xy=>{"use strict";Object.defineProperty(Xy,"__esModule",{value:!0});Xy.detectResources=void 0;var pZ=(R(),y(C)),hw=fw(),c2e=(t={})=>(t.detectors||[]).map(r=>{try{let o=(0,hw.resourceFromDetectedResource)(r.detect(t));return pZ.diag.debug(`${r.constructor.name} found resource.`,o),o}catch(o){return pZ.diag.debug(`${r.constructor.name} failed: ${o.message}`),(0,hw.emptyResource)()}}).reduce((r,o)=>r.merge(o),(0,hw.emptyResource)());Xy.detectResources=c2e});var mZ=p(Jy=>{"use strict";Object.defineProperty(Jy,"__esModule",{value:!0});Jy.envDetector=void 0;var u2e=(R(),y(C)),l2e=(vt(),y(Ut)),hZ=uw(),mw=class{_MAX_LENGTH=255;_COMMA_SEPARATOR=",";_LABEL_KEY_VALUE_SPLITTER="=";_ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.";_ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters.";detect(e){let r={},o=(0,hZ.getStringFromEnv)("OTEL_RESOURCE_ATTRIBUTES"),s=(0,hZ.getStringFromEnv)("OTEL_SERVICE_NAME");if(o)try{let a=this._parseResourceAttributes(o);Object.assign(r,a)}catch(a){u2e.diag.debug(`EnvDetector failed: ${a.message}`)}return s&&(r[l2e.ATTR_SERVICE_NAME]=s),{attributes:r}}_parseResourceAttributes(e){if(!e)return{};let r={},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}`);r[i]=decodeURIComponent(n)}return r}_isValid(e){return e.length<=this._MAX_LENGTH&&this._isBaggageOctetString(e)}_isBaggageOctetString(e){for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o<33||o===44||o===59||o===92||o>126)return!1}return!0}_isValidAndNotEmpty(e){return e.length>0&&this._isValid(e)}};Jy.envDetector=new mw});var qd=p(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.ATTR_WEBENGINE_VERSION=j.ATTR_WEBENGINE_NAME=j.ATTR_WEBENGINE_DESCRIPTION=j.ATTR_SERVICE_NAMESPACE=j.ATTR_SERVICE_INSTANCE_ID=j.ATTR_PROCESS_RUNTIME_VERSION=j.ATTR_PROCESS_RUNTIME_NAME=j.ATTR_PROCESS_RUNTIME_DESCRIPTION=j.ATTR_PROCESS_PID=j.ATTR_PROCESS_OWNER=j.ATTR_PROCESS_EXECUTABLE_PATH=j.ATTR_PROCESS_EXECUTABLE_NAME=j.ATTR_PROCESS_COMMAND_ARGS=j.ATTR_PROCESS_COMMAND=j.ATTR_OS_VERSION=j.ATTR_OS_TYPE=j.ATTR_K8S_POD_NAME=j.ATTR_K8S_NAMESPACE_NAME=j.ATTR_K8S_DEPLOYMENT_NAME=j.ATTR_K8S_CLUSTER_NAME=j.ATTR_HOST_TYPE=j.ATTR_HOST_NAME=j.ATTR_HOST_IMAGE_VERSION=j.ATTR_HOST_IMAGE_NAME=j.ATTR_HOST_IMAGE_ID=j.ATTR_HOST_ID=j.ATTR_HOST_ARCH=j.ATTR_CONTAINER_NAME=j.ATTR_CONTAINER_IMAGE_TAGS=j.ATTR_CONTAINER_IMAGE_NAME=j.ATTR_CONTAINER_ID=j.ATTR_CLOUD_REGION=j.ATTR_CLOUD_PROVIDER=j.ATTR_CLOUD_AVAILABILITY_ZONE=j.ATTR_CLOUD_ACCOUNT_ID=void 0;j.ATTR_CLOUD_ACCOUNT_ID="cloud.account.id";j.ATTR_CLOUD_AVAILABILITY_ZONE="cloud.availability_zone";j.ATTR_CLOUD_PROVIDER="cloud.provider";j.ATTR_CLOUD_REGION="cloud.region";j.ATTR_CONTAINER_ID="container.id";j.ATTR_CONTAINER_IMAGE_NAME="container.image.name";j.ATTR_CONTAINER_IMAGE_TAGS="container.image.tags";j.ATTR_CONTAINER_NAME="container.name";j.ATTR_HOST_ARCH="host.arch";j.ATTR_HOST_ID="host.id";j.ATTR_HOST_IMAGE_ID="host.image.id";j.ATTR_HOST_IMAGE_NAME="host.image.name";j.ATTR_HOST_IMAGE_VERSION="host.image.version";j.ATTR_HOST_NAME="host.name";j.ATTR_HOST_TYPE="host.type";j.ATTR_K8S_CLUSTER_NAME="k8s.cluster.name";j.ATTR_K8S_DEPLOYMENT_NAME="k8s.deployment.name";j.ATTR_K8S_NAMESPACE_NAME="k8s.namespace.name";j.ATTR_K8S_POD_NAME="k8s.pod.name";j.ATTR_OS_TYPE="os.type";j.ATTR_OS_VERSION="os.version";j.ATTR_PROCESS_COMMAND="process.command";j.ATTR_PROCESS_COMMAND_ARGS="process.command_args";j.ATTR_PROCESS_EXECUTABLE_NAME="process.executable.name";j.ATTR_PROCESS_EXECUTABLE_PATH="process.executable.path";j.ATTR_PROCESS_OWNER="process.owner";j.ATTR_PROCESS_PID="process.pid";j.ATTR_PROCESS_RUNTIME_DESCRIPTION="process.runtime.description";j.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name";j.ATTR_PROCESS_RUNTIME_VERSION="process.runtime.version";j.ATTR_SERVICE_INSTANCE_ID="service.instance.id";j.ATTR_SERVICE_NAMESPACE="service.namespace";j.ATTR_WEBENGINE_DESCRIPTION="webengine.description";j.ATTR_WEBENGINE_NAME="webengine.name";j.ATTR_WEBENGINE_VERSION="webengine.version"});var Zy=p(Qy=>{"use strict";Object.defineProperty(Qy,"__esModule",{value:!0});Qy.execAsync=void 0;var d2e=b("child_process"),p2e=b("util");Qy.execAsync=p2e.promisify(d2e.exec)});var _Z=p(ev=>{"use strict";Object.defineProperty(ev,"__esModule",{value:!0});ev.getMachineId=void 0;var f2e=Zy(),h2e=(R(),y(C));async function m2e(){try{let e=(await(0,f2e.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
|
|
51
|
+
`).find(o=>o.includes("IOPlatformUUID"));if(!e)return;let r=e.split('" = "');if(r.length===2)return r[1].slice(0,-1)}catch(t){h2e.diag.debug(`error reading machine id: ${t}`)}}ev.getMachineId=m2e});var gZ=p(tv=>{"use strict";Object.defineProperty(tv,"__esModule",{value:!0});tv.getMachineId=void 0;var _2e=b("fs"),g2e=(R(),y(C));async function E2e(){let t=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let e of t)try{return(await _2e.promises.readFile(e,{encoding:"utf8"})).trim()}catch(r){g2e.diag.debug(`error reading machine id: ${r}`)}}tv.getMachineId=E2e});var SZ=p(rv=>{"use strict";Object.defineProperty(rv,"__esModule",{value:!0});rv.getMachineId=void 0;var S2e=b("fs"),T2e=Zy(),EZ=(R(),y(C));async function y2e(){try{return(await S2e.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(t){EZ.diag.debug(`error reading machine id: ${t}`)}try{return(await(0,T2e.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(t){EZ.diag.debug(`error reading machine id: ${t}`)}}rv.getMachineId=y2e});var yZ=p(nv=>{"use strict";Object.defineProperty(nv,"__esModule",{value:!0});nv.getMachineId=void 0;var TZ=b("process"),v2e=Zy(),A2e=(R(),y(C));async function O2e(){let t="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",e="%windir%\\System32\\REG.exe";TZ.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in TZ.env&&(e="%windir%\\sysnative\\cmd.exe /c "+e);try{let o=(await(0,v2e.execAsync)(`${e} ${t}`)).stdout.split("REG_SZ");if(o.length===2)return o[1].trim()}catch(r){A2e.diag.debug(`error reading machine id: ${r}`)}}nv.getMachineId=O2e});var vZ=p(iv=>{"use strict";Object.defineProperty(iv,"__esModule",{value:!0});iv.getMachineId=void 0;var b2e=(R(),y(C));async function R2e(){b2e.diag.debug("could not read machine-id: unsupported platform")}iv.getMachineId=R2e});var AZ=p(ov=>{"use strict";Object.defineProperty(ov,"__esModule",{value:!0});ov.getMachineId=void 0;var P2e=b("process"),Hs;async function C2e(){if(!Hs)switch(P2e.platform){case"darwin":Hs=(await Promise.resolve().then(()=>he(_Z()))).getMachineId;break;case"linux":Hs=(await Promise.resolve().then(()=>he(gZ()))).getMachineId;break;case"freebsd":Hs=(await Promise.resolve().then(()=>he(SZ()))).getMachineId;break;case"win32":Hs=(await Promise.resolve().then(()=>he(yZ()))).getMachineId;break;default:Hs=(await Promise.resolve().then(()=>he(vZ()))).getMachineId;break}return Hs()}ov.getMachineId=C2e});var _w=p(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.normalizeType=ou.normalizeArch=void 0;var N2e=t=>{switch(t){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return t}};ou.normalizeArch=N2e;var M2e=t=>{switch(t){case"sunos":return"solaris";case"win32":return"windows";default:return t}};ou.normalizeType=M2e});var bZ=p(sv=>{"use strict";Object.defineProperty(sv,"__esModule",{value:!0});sv.hostDetector=void 0;var gw=qd(),OZ=b("os"),I2e=AZ(),x2e=_w(),Ew=class{detect(e){return{attributes:{[gw.ATTR_HOST_NAME]:(0,OZ.hostname)(),[gw.ATTR_HOST_ARCH]:(0,x2e.normalizeArch)((0,OZ.arch)()),[gw.ATTR_HOST_ID]:(0,I2e.getMachineId)()}}}};sv.hostDetector=new Ew});var CZ=p(av=>{"use strict";Object.defineProperty(av,"__esModule",{value:!0});av.osDetector=void 0;var RZ=qd(),PZ=b("os"),w2e=_w(),Sw=class{detect(e){return{attributes:{[RZ.ATTR_OS_TYPE]:(0,w2e.normalizeType)((0,PZ.platform)()),[RZ.ATTR_OS_VERSION]:(0,PZ.release)()}}}};av.osDetector=new Sw});var NZ=p(cv=>{"use strict";Object.defineProperty(cv,"__esModule",{value:!0});cv.processDetector=void 0;var L2e=(R(),y(C)),Di=qd(),D2e=b("os"),Tw=class{detect(e){let r={[Di.ATTR_PROCESS_PID]:process.pid,[Di.ATTR_PROCESS_EXECUTABLE_NAME]:process.title,[Di.ATTR_PROCESS_EXECUTABLE_PATH]:process.execPath,[Di.ATTR_PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[Di.ATTR_PROCESS_RUNTIME_VERSION]:process.versions.node,[Di.ATTR_PROCESS_RUNTIME_NAME]:"nodejs",[Di.ATTR_PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};process.argv.length>1&&(r[Di.ATTR_PROCESS_COMMAND]=process.argv[1]);try{let o=D2e.userInfo();r[Di.ATTR_PROCESS_OWNER]=o.username}catch(o){L2e.diag.debug(`error obtaining process owner: ${o}`)}return{attributes:r}}};cv.processDetector=new Tw});var MZ=p(uv=>{"use strict";Object.defineProperty(uv,"__esModule",{value:!0});uv.serviceInstanceIdDetector=void 0;var U2e=qd(),k2e=b("crypto"),yw=class{detect(e){return{attributes:{[U2e.ATTR_SERVICE_INSTANCE_ID]:(0,k2e.randomUUID)()}}}};uv.serviceInstanceIdDetector=new yw});var IZ=p(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.serviceInstanceIdDetector=ai.processDetector=ai.osDetector=ai.hostDetector=void 0;var B2e=bZ();Object.defineProperty(ai,"hostDetector",{enumerable:!0,get:function(){return B2e.hostDetector}});var F2e=CZ();Object.defineProperty(ai,"osDetector",{enumerable:!0,get:function(){return F2e.osDetector}});var V2e=NZ();Object.defineProperty(ai,"processDetector",{enumerable:!0,get:function(){return V2e.processDetector}});var G2e=MZ();Object.defineProperty(ai,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return G2e.serviceInstanceIdDetector}})});var xZ=p(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.serviceInstanceIdDetector=ci.processDetector=ci.osDetector=ci.hostDetector=void 0;var lv=IZ();Object.defineProperty(ci,"hostDetector",{enumerable:!0,get:function(){return lv.hostDetector}});Object.defineProperty(ci,"osDetector",{enumerable:!0,get:function(){return lv.osDetector}});Object.defineProperty(ci,"processDetector",{enumerable:!0,get:function(){return lv.processDetector}});Object.defineProperty(ci,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return lv.serviceInstanceIdDetector}})});var wZ=p(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});su.noopDetector=su.NoopDetector=void 0;var dv=class{detect(){return{attributes:{}}}};su.NoopDetector=dv;su.noopDetector=new dv});var LZ=p(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.noopDetector=nr.serviceInstanceIdDetector=nr.processDetector=nr.osDetector=nr.hostDetector=nr.envDetector=void 0;var q2e=mZ();Object.defineProperty(nr,"envDetector",{enumerable:!0,get:function(){return q2e.envDetector}});var pv=xZ();Object.defineProperty(nr,"hostDetector",{enumerable:!0,get:function(){return pv.hostDetector}});Object.defineProperty(nr,"osDetector",{enumerable:!0,get:function(){return pv.osDetector}});Object.defineProperty(nr,"processDetector",{enumerable:!0,get:function(){return pv.processDetector}});Object.defineProperty(nr,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return pv.serviceInstanceIdDetector}});var j2e=wZ();Object.defineProperty(nr,"noopDetector",{enumerable:!0,get:function(){return j2e.noopDetector}})});var DZ=p(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.defaultServiceName=Le.emptyResource=Le.defaultResource=Le.resourceFromAttributes=Le.serviceInstanceIdDetector=Le.processDetector=Le.osDetector=Le.hostDetector=Le.envDetector=Le.detectResources=void 0;var H2e=fZ();Object.defineProperty(Le,"detectResources",{enumerable:!0,get:function(){return H2e.detectResources}});var jd=LZ();Object.defineProperty(Le,"envDetector",{enumerable:!0,get:function(){return jd.envDetector}});Object.defineProperty(Le,"hostDetector",{enumerable:!0,get:function(){return jd.hostDetector}});Object.defineProperty(Le,"osDetector",{enumerable:!0,get:function(){return jd.osDetector}});Object.defineProperty(Le,"processDetector",{enumerable:!0,get:function(){return jd.processDetector}});Object.defineProperty(Le,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return jd.serviceInstanceIdDetector}});var vw=fw();Object.defineProperty(Le,"resourceFromAttributes",{enumerable:!0,get:function(){return vw.resourceFromAttributes}});Object.defineProperty(Le,"defaultResource",{enumerable:!0,get:function(){return vw.defaultResource}});Object.defineProperty(Le,"emptyResource",{enumerable:!0,get:function(){return vw.emptyResource}});var z2e=lw();Object.defineProperty(Le,"defaultServiceName",{enumerable:!0,get:function(){return z2e.defaultServiceName}})});import Y2e from"node:path";function Ue(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}import{fileURLToPath as ZZ}from"node:url";var zs=(t,e)=>{let r=gv(eee(t));if(typeof r!="string")throw new TypeError(`${e} must be a string or a file URL: ${r}.`);return r},eee=t=>_v(t)?t.toString():t,_v=t=>typeof t!="string"&&t&&Object.getPrototypeOf(t)===String.prototype,gv=t=>t instanceof URL?ZZ(t):t;var Wd=(t,e=[],r={})=>{let o=zs(t,"First argument"),[s,a]=Ue(e)?[[],e]:[e,r];if(!Array.isArray(s))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${s}`);if(s.some(c=>typeof c=="object"&&c!==null))throw new TypeError(`Second argument must be an array of strings: ${s}`);let i=s.map(String),n=i.find(c=>c.includes("\0"));if(n!==void 0)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${n}`);if(!Ue(a))throw new TypeError(`Last argument must be an options object: ${a}`);return[o,i,a]};import{ChildProcess as aee}from"node:child_process";import{StringDecoder as tee}from"node:string_decoder";var{toString:bw}=Object.prototype,Rw=t=>bw.call(t)==="[object ArrayBuffer]",We=t=>bw.call(t)==="[object Uint8Array]",li=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength),ree=new TextEncoder,Pw=t=>ree.encode(t),nee=new TextDecoder,Kd=t=>nee.decode(t),Cw=(t,e)=>iee(t,e).join(""),iee=(t,e)=>{if(e==="utf8"&&t.every(a=>typeof a=="string"))return t;let r=new tee(e),o=t.map(a=>typeof a=="string"?Pw(a):a).map(a=>r.write(a)),s=r.end();return s===""?o:[...o,s]},au=t=>t.length===1&&We(t[0])?t[0]:Ev(oee(t)),oee=t=>t.map(e=>typeof e=="string"?Pw(e):e),Ev=t=>{let e=new Uint8Array(see(t)),r=0;for(let o of t)e.set(o,r),r+=o.length;return e},see=t=>{let e=0;for(let r of t)e+=r.length;return e};var xw=t=>Array.isArray(t)&&Array.isArray(t.raw),ww=(t,e)=>{let r=[];for(let[a,i]of t.entries())r=cee({templates:t,expressions:e,tokens:r,index:a,template:i});if(r.length===0)throw new TypeError("Template script must not be empty");let[o,...s]=r;return[o,s,{}]},cee=({templates:t,expressions:e,tokens:r,index:o,template:s})=>{if(s===void 0)throw new TypeError(`Invalid backslash sequence: ${t.raw[o]}`);let{nextTokens:a,leadingWhitespaces:i,trailingWhitespaces:n}=uee(s,t.raw[o]),c=Mw(r,a,i);if(o===e.length)return c;let u=e[o],l=Array.isArray(u)?u.map(d=>Iw(d)):[Iw(u)];return Mw(c,l,n)},uee=(t,e)=>{if(e.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let r=[],o=0,s=Nw.has(e[0]);for(let i=0,n=0;i<t.length;i+=1,n+=1){let c=e[n];if(Nw.has(c))o!==i&&r.push(t.slice(o,i)),o=i+1;else if(c==="\\"){let u=e[n+1];u===`
|
|
52
|
+
`?(i-=1,n+=1):u==="u"&&e[n+2]==="{"?n=e.indexOf("}",n+3):n+=lee[u]??1}}let a=o===t.length;return a||r.push(t.slice(o)),{nextTokens:r,leadingWhitespaces:s,trailingWhitespaces:a}},Nw=new Set([" "," ","\r",`
|
|
53
|
+
`]),lee={x:3,u:5},Mw=(t,e,r)=>r||t.length===0||e.length===0?[...t,...e]:[...t.slice(0,-1),`${t.at(-1)}${e[0]}`,...e.slice(1)],Iw=t=>{let e=typeof t;if(e==="string")return t;if(e==="number")return String(t);if(Ue(t)&&("stdout"in t||"isMaxBuffer"in t))return dee(t);throw t instanceof aee||Object.prototype.toString.call(t)==="[object Promise]"?new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}."):new TypeError(`Unexpected "${e}" in template expression`)},dee=({stdout:t})=>{if(typeof t=="string")return t;if(We(t))return Kd(t);throw t===void 0?new TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`):new TypeError(`Unexpected "${typeof t}" stdout in template expression`)};import{spawnSync as _oe}from"node:child_process";import{debuglog as pee}from"node:util";import Sv from"node:process";var kr=t=>Xd.includes(t),Xd=[Sv.stdin,Sv.stdout,Sv.stderr],mr=["stdin","stdout","stderr"],Jd=t=>mr[t]??`stdio[${t}]`;var Dw=t=>{let e={...t};for(let r of vv)e[r]=Tv(t,r);return e},Tv=(t,e)=>{let r=Array.from({length:fee(t)+1}),o=hee(t[e],r,e);return See(o,e)},fee=({stdio:t})=>Array.isArray(t)?Math.max(t.length,mr.length):mr.length,hee=(t,e,r)=>Ue(t)?mee(t,e,r):e.fill(t),mee=(t,e,r)=>{for(let o of Object.keys(t).sort(_ee))for(let s of gee(o,r,e))e[s]=t[o];return e},_ee=(t,e)=>Lw(t)<Lw(e)?1:-1,Lw=t=>t==="stdout"||t==="stderr"?0:t==="all"?2:1,gee=(t,e,r)=>{if(t==="ipc")return[r.length-1];let o=yv(t);if(o===void 0||o===0)throw new TypeError(`"${e}.${t}" is invalid.
|
|
54
|
+
It must be "${e}.stdout", "${e}.stderr", "${e}.all", "${e}.ipc", or "${e}.fd3", "${e}.fd4" (and so on).`);if(o>=r.length)throw new TypeError(`"${e}.${t}" is invalid: that file descriptor does not exist.
|
|
55
|
+
Please set the "stdio" option to ensure that file descriptor exists.`);return o==="all"?[1,2]:[o]},yv=t=>{if(t==="all")return t;if(mr.includes(t))return mr.indexOf(t);let e=Eee.exec(t);if(e!==null)return Number(e[1])},Eee=/^fd(\d+)$/,See=(t,e)=>t.map(r=>r===void 0?yee[e]:r),Tee=pee("execa").enabled?"full":"none",yee={lines:!1,buffer:!0,maxBuffer:1e3*1e3*100,verbose:Tee,stripFinalNewline:!0},vv=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],di=(t,e)=>e==="ipc"?t.at(-1):t[e];var $s=({verbose:t},e)=>Av(t,e)!=="none",Ys=({verbose:t},e)=>!["none","short"].includes(Av(t,e)),Uw=({verbose:t},e)=>{let r=Av(t,e);return Qd(r)?r:void 0},Av=(t,e)=>e===void 0?vee(t):di(t,e),vee=t=>t.find(e=>Qd(e))??Zd.findLast(e=>t.includes(e)),Qd=t=>typeof t=="function",Zd=["none","short","full"];import{inspect as Hee}from"node:util";import{platform as Aee}from"node:process";import{stripVTControlCharacters as Oee}from"node:util";var kw=(t,e)=>{let r=[t,...e],o=r.join(" "),s=r.map(a=>Mee(Bw(a))).join(" ");return{command:o,escapedCommand:s}},cu=t=>Oee(t).split(`
|
|
56
|
+
`).map(e=>Bw(e)).join(`
|
|
57
|
+
`),Bw=t=>t.replaceAll(Pee,e=>bee(e)),bee=t=>{let e=Cee[t];if(e!==void 0)return e;let r=t.codePointAt(0),o=r.toString(16);return r<=Nee?`\\u${o.padStart(4,"0")}`:`\\U${o}`},Ree=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},Pee=Ree(),Cee={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},Nee=65535,Mee=t=>Iee.test(t)?t:Aee==="win32"?`"${t.replaceAll('"','""')}"`:`'${t.replaceAll("'","'\\''")}'`,Iee=/^[\w./-]+$/;import Fw from"node:process";function Ov(){let{env:t}=Fw,{TERM:e,TERM_PROGRAM:r}=t;return Fw.platform!=="win32"?e!=="linux":!!t.WT_SESSION||!!t.TERMINUS_SUBLIME||t.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||e==="xterm-256color"||e==="alacritty"||e==="rxvt-unicode"||e==="rxvt-unicode-256color"||t.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Vw={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},Gw={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},xee={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},wee={...Vw,...Gw},Lee={...Vw,...xee},Dee=Ov(),Uee=Dee?wee:Lee,ep=Uee,Rje=Object.entries(Gw);import kee from"node:tty";var Bee=kee?.WriteStream?.prototype?.hasColors?.()??!1,ne=(t,e)=>{if(!Bee)return s=>s;let r=`\x1B[${t}m`,o=`\x1B[${e}m`;return s=>{let a=s+"",i=a.indexOf(o);if(i===-1)return r+a+o;let n=r,c=0,l=(e===22?o:"")+r;for(;i!==-1;)n+=a.slice(c,i)+l,c=i+o.length,i=a.indexOf(o,c);return n+=a.slice(c)+o,n}},Nje=ne(0,0),qw=ne(1,22),Mje=ne(2,22),Ije=ne(3,23),xje=ne(4,24),wje=ne(53,55),Lje=ne(7,27),Dje=ne(8,28),Uje=ne(9,29),kje=ne(30,39),Bje=ne(31,39),Fje=ne(32,39),Vje=ne(33,39),Gje=ne(34,39),qje=ne(35,39),jje=ne(36,39),Hje=ne(37,39),tp=ne(90,39),zje=ne(40,49),$je=ne(41,49),Yje=ne(42,49),Wje=ne(43,49),Kje=ne(44,49),Xje=ne(45,49),Jje=ne(46,49),Qje=ne(47,49),Zje=ne(100,49),jw=ne(91,39),eHe=ne(92,39),Hw=ne(93,39),tHe=ne(94,39),rHe=ne(95,39),nHe=ne(96,39),iHe=ne(97,39),oHe=ne(101,49),sHe=ne(102,49),aHe=ne(103,49),cHe=ne(104,49),uHe=ne(105,49),lHe=ne(106,49),dHe=ne(107,49);var Yw=({type:t,message:e,timestamp:r,piped:o,commandId:s,result:{failed:a=!1}={},options:{reject:i=!0}})=>{let n=Fee(r),c=Vee[t]({failed:a,reject:i,piped:o}),u=Gee[t]({reject:i});return`${tp(`[${n}]`)} ${tp(`[${s}]`)} ${u(c)} ${u(e)}`},Fee=t=>`${rp(t.getHours(),2)}:${rp(t.getMinutes(),2)}:${rp(t.getSeconds(),2)}.${rp(t.getMilliseconds(),3)}`,rp=(t,e)=>String(t).padStart(e,"0"),zw=({failed:t,reject:e})=>t?e?ep.cross:ep.warning:ep.tick,Vee={command:({piped:t})=>t?"|":"$",output:()=>" ",ipc:()=>"*",error:zw,duration:zw},$w=t=>t,Gee={command:()=>qw,output:()=>$w,ipc:()=>$w,error:({reject:t})=>t?jw:Hw,duration:()=>tp};var Ww=(t,e,r)=>{let o=Uw(e,r);return t.map(({verboseLine:s,verboseObject:a})=>qee(s,a,o)).filter(s=>s!==void 0).map(s=>jee(s)).join("")},qee=(t,e,r)=>{if(r===void 0)return t;let o=r(t,e);if(typeof o=="string")return o},jee=t=>t.endsWith(`
|
|
58
|
+
`)?t:`${t}
|
|
59
|
+
`;var cn=({type:t,verboseMessage:e,fdNumber:r,verboseInfo:o,result:s})=>{let a=zee({type:t,result:s,verboseInfo:o}),i=$ee(e,a),n=Ww(i,o,r);n!==""&&console.warn(n.slice(0,-1))},zee=({type:t,result:e,verboseInfo:{escapedCommand:r,commandId:o,rawOptions:{piped:s=!1,...a}}})=>({type:t,escapedCommand:r,commandId:`${o}`,timestamp:new Date,piped:s,result:e,options:a}),$ee=(t,e)=>t.split(`
|
|
60
|
+
`).map(r=>Yee({...e,message:r})),Yee=t=>({verboseLine:Yw(t),verboseObject:t}),np=t=>{let e=typeof t=="string"?t:Hee(t);return cu(e).replaceAll(" "," ".repeat(Wee))},Wee=2;var Kw=(t,e)=>{$s(e)&&cn({type:"command",verboseMessage:t,verboseInfo:e})};var Xw=(t,e,r)=>{Jee(t);let o=Kee(t);return{verbose:t,escapedCommand:e,commandId:o,rawOptions:r}},Kee=t=>$s({verbose:t})?Xee++:void 0,Xee=0n,Jee=t=>{for(let e of t){if(e===!1)throw new TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(e===!0)throw new TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!Zd.includes(e)&&!Qd(e)){let r=Zd.map(o=>`'${o}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${e}. Allowed values are: ${r} or a function.`)}}};import{hrtime as Jw}from"node:process";var ip=()=>Jw.bigint(),bv=t=>Number(Jw.bigint()-t)/1e6;var op=(t,e,r)=>{let o=ip(),{command:s,escapedCommand:a}=kw(t,e),i=Tv(r,"verbose"),n=Xw(i,a,{...r});return Kw(a,n),{command:s,escapedCommand:a,startTime:o,verboseInfo:n}};var XD=he(FL(),1);import Lre from"node:path";import KD from"node:process";import up from"node:process";import Co from"node:path";function ap(t={}){let{env:e=process.env,platform:r=process.platform}=t;return r!=="win32"?"PATH":Object.keys(e).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"}import{promisify as Ote}from"node:util";import{execFile as bte,execFileSync as ZHe}from"node:child_process";import VL from"node:path";import{fileURLToPath as Rte}from"node:url";var r3e=Ote(bte);function cp(t){return t instanceof URL?Rte(t):t}function GL(t){return{*[Symbol.iterator](){let e=VL.resolve(cp(t)),r;for(;r!==e;)yield e,r=e,e=VL.resolve(e,"..")}}}var n3e=10*1024*1024;var Pte=({cwd:t=up.cwd(),path:e=up.env[ap()],preferLocal:r=!0,execPath:o=up.execPath,addExecPath:s=!0}={})=>{let a=Co.resolve(cp(t)),i=[],n=e.split(Co.delimiter);return r&&Cte(i,n,a),s&&Nte(i,n,o,a),e===""||e===Co.delimiter?`${i.join(Co.delimiter)}${e}`:[...i,e].join(Co.delimiter)},Cte=(t,e,r)=>{for(let o of GL(r)){let s=Co.join(o,"node_modules/.bin");e.includes(s)||t.push(s)}},Nte=(t,e,r,o)=>{let s=Co.resolve(o,cp(r),"..");e.includes(s)||t.push(s)},qL=({env:t=up.env,...e}={})=>{t={...t};let r=ap({env:t});return e.path=t[r],t[r]=Pte(e),t};import{setTimeout as Hte}from"node:timers/promises";var jL=(t,e,r)=>{let o=r?lu:uu,s=t instanceof Br?{}:{cause:t};return new o(e,s)},Br=class extends Error{},HL=(t,e)=>{Object.defineProperty(t.prototype,"name",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,$L,{value:!0,writable:!1,enumerable:!1,configurable:!1})},zL=t=>lp(t)&&$L in t,$L=Symbol("isExecaError"),lp=t=>Object.prototype.toString.call(t)==="[object Error]",uu=class extends Error{};HL(uu,uu.name);var lu=class extends Error{};HL(lu,lu.name);import{constants as du}from"node:os";import{constants as wte}from"node:os";var YL=()=>{let t=KL-WL+1;return Array.from({length:t},Mte)},Mte=(t,e)=>({name:`SIGRT${e+1}`,number:WL+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),WL=34,KL=64;import{constants as Ite}from"node:os";var XL=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var Dv=()=>{let t=YL();return[...XL,...t].map(xte)},xte=({name:t,number:e,description:r,action:o,forced:s=!1,standard:a})=>{let{signals:{[t]:i}}=Ite,n=i!==void 0;return{name:t,number:n?i:e,description:r,supported:n,action:o,forced:s,standard:a}};var Lte=()=>{let t=Dv();return Object.fromEntries(t.map(Dte))},Dte=({name:t,number:e,description:r,supported:o,action:s,forced:a,standard:i})=>[t,{name:t,number:e,description:r,supported:o,action:s,forced:a,standard:i}],JL=Lte(),Ute=()=>{let t=Dv(),e=65,r=Array.from({length:e},(o,s)=>kte(s,t));return Object.assign({},...r)},kte=(t,e)=>{let r=Bte(t,e);if(r===void 0)return{};let{name:o,description:s,supported:a,action:i,forced:n,standard:c}=r;return{[t]:{name:o,number:t,description:s,supported:a,action:i,forced:n,standard:c}}},Bte=(t,e)=>{let r=e.find(({name:o})=>wte.signals[o]===t);return r!==void 0?r:e.find(o=>o.number===t)},T3e=Ute();var ZL=t=>{let e="option `killSignal`";if(t===0)throw new TypeError(`Invalid ${e}: 0 cannot be used.`);return tD(t,e)},eD=t=>t===0?t:tD(t,"`subprocess.kill()`'s argument"),tD=(t,e)=>{if(Number.isInteger(t))return Fte(t,e);if(typeof t=="string")return Gte(t,e);throw new TypeError(`Invalid ${e} ${String(t)}: it must be a string or an integer.
|
|
61
|
+
${Uv()}`)},Fte=(t,e)=>{if(QL.has(t))return QL.get(t);throw new TypeError(`Invalid ${e} ${t}: this signal integer does not exist.
|
|
62
|
+
${Uv()}`)},Vte=()=>new Map(Object.entries(du.signals).reverse().map(([t,e])=>[e,t])),QL=Vte(),Gte=(t,e)=>{if(t in du.signals)return t;throw t.toUpperCase()in du.signals?new TypeError(`Invalid ${e} '${t}': please rename it to '${t.toUpperCase()}'.`):new TypeError(`Invalid ${e} '${t}': this signal name does not exist.
|
|
63
|
+
${Uv()}`)},Uv=()=>`Available signal names: ${qte()}.
|
|
64
|
+
Available signal numbers: ${jte()}.`,qte=()=>Object.keys(du.signals).sort().map(t=>`'${t}'`).join(", "),jte=()=>[...new Set(Object.values(du.signals).sort((t,e)=>t-e))].join(", "),dp=t=>JL[t].description;var rD=t=>{if(t===!1)return t;if(t===!0)return zte;if(!Number.isFinite(t)||t<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);return t},zte=1e3*5,nD=({kill:t,options:{forceKillAfterDelay:e,killSignal:r},onInternalError:o,context:s,controller:a},i,n)=>{let{signal:c,error:u}=$te(i,n,r);Yte(u,o);let l=t(c);return Wte({kill:t,signal:c,forceKillAfterDelay:e,killSignal:r,killResult:l,context:s,controller:a}),l},$te=(t,e,r)=>{let[o=r,s]=lp(t)?[void 0,t]:[t,e];if(typeof o!="string"&&!Number.isInteger(o))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(o)}`);if(s!==void 0&&!lp(s))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${s}`);return{signal:eD(o),error:s}},Yte=(t,e)=>{t!==void 0&&e.reject(t)},Wte=async({kill:t,signal:e,forceKillAfterDelay:r,killSignal:o,killResult:s,context:a,controller:i})=>{e===o&&s&&kv({kill:t,forceKillAfterDelay:r,context:a,controllerSignal:i.signal})},kv=async({kill:t,forceKillAfterDelay:e,context:r,controllerSignal:o})=>{if(e!==!1)try{await Hte(e,void 0,{signal:o}),t("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}};import{once as Kte}from"node:events";var pp=async(t,e)=>{t.aborted||await Kte(t,"abort",{signal:e})};var iD=({cancelSignal:t})=>{if(t!==void 0&&Object.prototype.toString.call(t)!=="[object AbortSignal]")throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(t)}`)},oD=({subprocess:t,cancelSignal:e,gracefulCancel:r,context:o,controller:s})=>e===void 0||r?[]:[Xte(t,e,o,s)],Xte=async(t,e,r,{signal:o})=>{throw await pp(e,o),r.terminationReason??="cancel",t.kill(),e.reason};import{scheduler as gre}from"node:timers/promises";import{promisify as hre}from"node:util";var Xs=({methodName:t,isSubprocess:e,ipc:r,isConnected:o})=>{Jte(t,e,r),Bv(t,e,o)},Jte=(t,e,r)=>{if(!r)throw new Error(`${Fr(t,e)} can only be used if the \`ipc\` option is \`true\`.`)},Bv=(t,e,r)=>{if(!r)throw new Error(`${Fr(t,e)} cannot be used: the ${Ui(e)} has already exited or disconnected.`)},sD=t=>{throw new Error(`${Fr("getOneMessage",t)} could not complete: the ${Ui(t)} exited or disconnected.`)},aD=t=>{throw new Error(`${Fr("sendMessage",t)} failed: the ${Ui(t)} is sending a message too, instead of listening to incoming messages.
|
|
65
|
+
This can be fixed by both sending a message and listening to incoming messages at the same time:
|
|
66
|
+
|
|
67
|
+
const [receivedMessage] = await Promise.all([
|
|
68
|
+
${Fr("getOneMessage",t)},
|
|
69
|
+
${Fr("sendMessage",t,"message, {strict: true}")},
|
|
70
|
+
]);`)},fp=(t,e)=>new Error(`${Fr("sendMessage",e)} failed when sending an acknowledgment response to the ${Ui(e)}.`,{cause:t}),cD=t=>{throw new Error(`${Fr("sendMessage",t)} failed: the ${Ui(t)} is not listening to incoming messages.`)},uD=t=>{throw new Error(`${Fr("sendMessage",t)} failed: the ${Ui(t)} exited without listening to incoming messages.`)},lD=()=>new Error(`\`cancelSignal\` aborted: the ${Ui(!0)} disconnected.`),dD=()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},pD=({error:t,methodName:e,isSubprocess:r})=>{if(t.code==="EPIPE")throw new Error(`${Fr(e,r)} cannot be used: the ${Ui(r)} is disconnecting.`,{cause:t})},fD=({error:t,methodName:e,isSubprocess:r,message:o})=>{if(Qte(t))throw new Error(`${Fr(e,r)}'s argument type is invalid: the message cannot be serialized: ${String(o)}.`,{cause:t})},Qte=({code:t,message:e})=>Zte.has(t)||ere.some(r=>e.includes(r)),Zte=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),ere=["could not be cloned","circular structure","call stack size exceeded"],Fr=(t,e,r="")=>t==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${tre(e)}${t}(${r})`,tre=t=>t?"":"subprocess.",Ui=t=>t?"parent process":"subprocess",Js=t=>{t.connected&&t.disconnect()};var un=()=>{let t={},e=new Promise((r,o)=>{Object.assign(t,{resolve:r,reject:o})});return Object.assign(e,t)};var mp=(t,e="stdin")=>{let{options:o,fileDescriptors:s}=ln.get(t),a=hD(s,e,!0),i=t.stdio[a];if(i===null)throw new TypeError(mD(a,e,o,!0));return i},Qs=(t,e="stdout")=>{let{options:o,fileDescriptors:s}=ln.get(t),a=hD(s,e,!1),i=a==="all"?t.all:t.stdio[a];if(i==null)throw new TypeError(mD(a,e,o,!1));return i},ln=new WeakMap,hD=(t,e,r)=>{let o=rre(e,r);return nre(o,e,r,t),o},rre=(t,e)=>{let r=yv(t);if(r!==void 0)return r;let{validOptions:o,defaultValue:s}=e?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${pu(e)}" must not be "${t}".
|
|
71
|
+
It must be ${o} or "fd3", "fd4" (and so on).
|
|
72
|
+
It is optional and defaults to "${s}".`)},nre=(t,e,r,o)=>{let s=o[_D(t)];if(s===void 0)throw new TypeError(`"${pu(r)}" must not be ${e}. That file descriptor does not exist.
|
|
73
|
+
Please set the "stdio" option to ensure that file descriptor exists.`);if(s.direction==="input"&&!r)throw new TypeError(`"${pu(r)}" must not be ${e}. It must be a readable stream, not writable.`);if(s.direction!=="input"&&r)throw new TypeError(`"${pu(r)}" must not be ${e}. It must be a writable stream, not readable.`)},mD=(t,e,r,o)=>{if(t==="all"&&!r.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:s,optionValue:a}=ire(t,r);return`The "${s}: ${hp(a)}" option is incompatible with using "${pu(o)}: ${hp(e)}".
|
|
74
|
+
Please set this option with "pipe" instead.`},ire=(t,{stdin:e,stdout:r,stderr:o,stdio:s})=>{let a=_D(t);return a===0&&e!==void 0?{optionName:"stdin",optionValue:e}:a===1&&r!==void 0?{optionName:"stdout",optionValue:r}:a===2&&o!==void 0?{optionName:"stderr",optionValue:o}:{optionName:`stdio[${a}]`,optionValue:s[a]}},_D=t=>t==="all"?1:t,pu=t=>t?"to":"from",hp=t=>typeof t=="string"?`'${t}'`:typeof t=="number"?`${t}`:"Stream";import{once as lre}from"node:events";import{addAbortListener as ore}from"node:events";var No=(t,e,r)=>{let o=t.getMaxListeners();o===0||o===Number.POSITIVE_INFINITY||(t.setMaxListeners(o+e),ore(r,()=>{t.setMaxListeners(t.getMaxListeners()-e)}))};import{EventEmitter as cre}from"node:events";import{once as sre}from"node:events";import{scheduler as are}from"node:timers/promises";var _p=(t,e)=>{e&&Fv(t)},Fv=t=>{t.refCounted()},gp=(t,e)=>{e&&Vv(t)},Vv=t=>{t.unrefCounted()},gD=(t,e)=>{e&&(Vv(t),Vv(t))},ED=(t,e)=>{e&&(Fv(t),Fv(t))};var SD=async({anyProcess:t,channel:e,isSubprocess:r,ipcEmitter:o},s)=>{if(vD(s)||OD(s))return;Ep.has(t)||Ep.set(t,[]);let a=Ep.get(t);if(a.push(s),!(a.length>1))for(;a.length>0;){await AD(t,o,s),await are.yield();let i=await yD({wrappedMessage:a[0],anyProcess:t,channel:e,isSubprocess:r,ipcEmitter:o});a.shift(),o.emit("message",i),o.emit("message:done")}},TD=async({anyProcess:t,channel:e,isSubprocess:r,ipcEmitter:o,boundOnMessage:s})=>{Gv();let a=Ep.get(t);for(;a?.length>0;)await sre(o,"message:done");t.removeListener("message",s),ED(e,r),o.connected=!1,o.emit("disconnect")},Ep=new WeakMap;var ki=(t,e,r)=>{if(Sp.has(t))return Sp.get(t);let o=new cre;return o.connected=!0,Sp.set(t,o),ure({ipcEmitter:o,anyProcess:t,channel:e,isSubprocess:r}),o},Sp=new WeakMap,ure=({ipcEmitter:t,anyProcess:e,channel:r,isSubprocess:o})=>{let s=SD.bind(void 0,{anyProcess:e,channel:r,isSubprocess:o,ipcEmitter:t});e.on("message",s),e.once("disconnect",TD.bind(void 0,{anyProcess:e,channel:r,isSubprocess:o,ipcEmitter:t,boundOnMessage:s})),gD(r,o)},Tp=t=>{let e=Sp.get(t);return e===void 0?t.channel!==null:e.connected};var bD=({anyProcess:t,channel:e,isSubprocess:r,message:o,strict:s})=>{if(!s)return o;let a=ki(t,e,r),i=Ap(t,a);return{id:dre++,type:vp,message:o,hasListeners:i}},dre=0n,RD=(t,e)=>{if(!(e?.type!==vp||e.hasListeners))for(let{id:r}of t)r!==void 0&&yp[r].resolve({isDeadlock:!0,hasListeners:!1})},yD=async({wrappedMessage:t,anyProcess:e,channel:r,isSubprocess:o,ipcEmitter:s})=>{if(t?.type!==vp||!e.connected)return t;let{id:a,message:i}=t,n={id:a,type:CD,message:Ap(e,s)};try{await Op({anyProcess:e,channel:r,isSubprocess:o,ipc:!0},n)}catch(c){s.emit("strict:error",c)}return i},vD=t=>{if(t?.type!==CD)return!1;let{id:e,message:r}=t;return yp[e]?.resolve({isDeadlock:!1,hasListeners:r}),!0},PD=async(t,e,r)=>{if(t?.type!==vp)return;let o=un();yp[t.id]=o;let s=new AbortController;try{let{isDeadlock:a,hasListeners:i}=await Promise.race([o,pre(e,r,s)]);a&&aD(r),i||cD(r)}finally{s.abort(),delete yp[t.id]}},yp={},pre=async(t,e,{signal:r})=>{No(t,1,r),await lre(t,"disconnect",{signal:r}),uD(e)},vp="execa:ipc:request",CD="execa:ipc:response";var ND=(t,e,r)=>{fu.has(t)||fu.set(t,new Set);let o=fu.get(t),s=un(),a=r?e.id:void 0,i={onMessageSent:s,id:a};return o.add(i),{outgoingMessages:o,outgoingMessage:i}},MD=({outgoingMessages:t,outgoingMessage:e})=>{t.delete(e),e.onMessageSent.resolve()},AD=async(t,e,r)=>{for(;!Ap(t,e)&&fu.get(t)?.size>0;){let o=[...fu.get(t)];RD(o,r),await Promise.all(o.map(({onMessageSent:s})=>s))}},fu=new WeakMap,Ap=(t,e)=>e.listenerCount("message")>fre(t),fre=t=>ln.has(t)&&!di(ln.get(t).options.buffer,"ipc")?1:0;var Op=({anyProcess:t,channel:e,isSubprocess:r,ipc:o},s,{strict:a=!1}={})=>{let i="sendMessage";return Xs({methodName:i,isSubprocess:r,ipc:o,isConnected:t.connected}),mre({anyProcess:t,channel:e,methodName:i,isSubprocess:r,message:s,strict:a})},mre=async({anyProcess:t,channel:e,methodName:r,isSubprocess:o,message:s,strict:a})=>{let i=bD({anyProcess:t,channel:e,isSubprocess:o,message:s,strict:a}),n=ND(t,i,a);try{await jv({anyProcess:t,methodName:r,isSubprocess:o,wrappedMessage:i,message:s})}catch(c){throw Js(t),c}finally{MD(n)}},jv=async({anyProcess:t,methodName:e,isSubprocess:r,wrappedMessage:o,message:s})=>{let a=_re(t);try{await Promise.all([PD(o,t,r),a(o)])}catch(i){throw pD({error:i,methodName:e,isSubprocess:r}),fD({error:i,methodName:e,isSubprocess:r,message:s}),i}},_re=t=>{if(qv.has(t))return qv.get(t);let e=hre(t.send.bind(t));return qv.set(t,e),e},qv=new WeakMap;var xD=(t,e)=>{let r="cancelSignal";return Bv(r,!1,t.connected),jv({anyProcess:t,methodName:r,isSubprocess:!1,wrappedMessage:{type:LD,message:e},message:e})},wD=async({anyProcess:t,channel:e,isSubprocess:r,ipc:o})=>(await Ere({anyProcess:t,channel:e,isSubprocess:r,ipc:o}),Hv.signal),Ere=async({anyProcess:t,channel:e,isSubprocess:r,ipc:o})=>{if(!ID){if(ID=!0,!o){dD();return}if(e===null){Gv();return}ki(t,e,r),await gre.yield()}},ID=!1,OD=t=>t?.type!==LD?!1:(Hv.abort(t.message),!0),LD="execa:ipc:cancel",Gv=()=>{Hv.abort(lD())},Hv=new AbortController;var DD=({gracefulCancel:t,cancelSignal:e,ipc:r,serialization:o})=>{if(t){if(e===void 0)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(o==="json")throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}},UD=({subprocess:t,cancelSignal:e,gracefulCancel:r,forceKillAfterDelay:o,context:s,controller:a})=>r?[Sre({subprocess:t,cancelSignal:e,forceKillAfterDelay:o,context:s,controller:a})]:[],Sre=async({subprocess:t,cancelSignal:e,forceKillAfterDelay:r,context:o,controller:{signal:s}})=>{await pp(e,s);let a=Tre(e);throw await xD(t,a),kv({kill:t.kill,forceKillAfterDelay:r,context:o,controllerSignal:s}),o.terminationReason??="gracefulCancel",e.reason},Tre=({reason:t})=>{if(!(t instanceof DOMException))return t;let e=new Error(t.message);return Object.defineProperty(e,"stack",{value:t.stack,enumerable:!1,configurable:!0,writable:!0}),e};import{setTimeout as yre}from"node:timers/promises";var kD=({timeout:t})=>{if(t!==void 0&&(!Number.isFinite(t)||t<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`)},BD=(t,e,r,o)=>e===0||e===void 0?[]:[vre(t,e,r,o)],vre=async(t,e,r,{signal:o})=>{throw await yre(e,void 0,{signal:o}),r.terminationReason??="timeout",t.kill(),new Br};import{execPath as Are,execArgv as Ore}from"node:process";import FD from"node:path";var VD=({options:t})=>{if(t.node===!1)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...t,node:!0}}},GD=(t,e,{node:r=!1,nodePath:o=Are,nodeOptions:s=Ore.filter(c=>!c.startsWith("--inspect")),cwd:a,execPath:i,...n})=>{if(i!==void 0)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let c=zs(o,'The "nodePath" option'),u=FD.resolve(a,c),l={...n,nodePath:u,node:r,cwd:a};if(!r)return[t,e,l];if(FD.basename(t,".exe")==="node")throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...s,t,...e],{ipc:!0,...l,shell:!1}]};import{serialize as bre}from"node:v8";var qD=({ipcInput:t,ipc:e,serialization:r})=>{if(t!==void 0){if(!e)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Cre[r](t)}},Rre=t=>{try{bre(t)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},Pre=t=>{try{JSON.stringify(t)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}},Cre={advanced:Rre,json:Pre},jD=async(t,e)=>{e!==void 0&&await t.sendMessage(e)};var zD=({encoding:t})=>{if(zv.has(t))return;let e=Mre(t);if(e!==void 0)throw new TypeError(`Invalid option \`encoding: ${bp(t)}\`.
|
|
75
|
+
Please rename it to ${bp(e)}.`);let r=[...zv].map(o=>bp(o)).join(", ");throw new TypeError(`Invalid option \`encoding: ${bp(t)}\`.
|
|
76
|
+
Please rename it to one of: ${r}.`)},Nre=new Set(["utf8","utf16le"]),ir=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),zv=new Set([...Nre,...ir]),Mre=t=>{if(t===null)return"buffer";if(typeof t!="string")return;let e=t.toLowerCase();if(e in HD)return HD[e];if(zv.has(e))return e},HD={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},bp=t=>typeof t=="string"?`"${t}"`:String(t);import{statSync as Ire}from"node:fs";import xre from"node:path";import wre from"node:process";var $D=(t=YD())=>{let e=zs(t,'The "cwd" option');return xre.resolve(e)},YD=()=>{try{return wre.cwd()}catch(t){throw t.message=`The current directory does not exist.
|
|
77
|
+
${t.message}`,t}},WD=(t,e)=>{if(e===YD())return t;let r;try{r=Ire(e)}catch(o){return`The "cwd" option is invalid: ${e}.
|
|
78
|
+
${o.message}
|
|
79
|
+
${t}`}return r.isDirectory()?t:`The "cwd" option is not a directory: ${e}.
|
|
80
|
+
${t}`};var Rp=(t,e,r)=>{r.cwd=$D(r.cwd);let[o,s,a]=GD(t,e,r),{command:i,args:n,options:c}=XD.default._parse(o,s,a),u=Dw(c),l=Dre(u);return kD(l),zD(l),qD(l),iD(l),DD(l),l.shell=gv(l.shell),l.env=Ure(l),l.killSignal=ZL(l.killSignal),l.forceKillAfterDelay=rD(l.forceKillAfterDelay),l.lines=l.lines.map((d,h)=>d&&!ir.has(l.encoding)&&l.buffer[h]),KD.platform==="win32"&&Lre.basename(i,".exe")==="cmd"&&n.unshift("/q"),{file:i,commandArguments:n,options:l}},Dre=({extendEnv:t=!0,preferLocal:e=!1,cwd:r,localDir:o=r,encoding:s="utf8",reject:a=!0,cleanup:i=!0,all:n=!1,windowsHide:c=!0,killSignal:u="SIGTERM",forceKillAfterDelay:l=!0,gracefulCancel:d=!1,ipcInput:h,ipc:g=h!==void 0||d,serialization:E="advanced",...S})=>({...S,extendEnv:t,preferLocal:e,cwd:r,localDirectory:o,encoding:s,reject:a,cleanup:i,all:n,windowsHide:c,killSignal:u,forceKillAfterDelay:l,gracefulCancel:d,ipcInput:h,ipc:g,serialization:E}),Ure=({env:t,extendEnv:e,preferLocal:r,node:o,localDirectory:s,nodePath:a})=>{let i=e?{...KD.env,...t}:t;return r||o?qL({env:i,cwd:s,execPath:a,preferLocal:r,addExecPath:o}):i};var Pp=(t,e,r)=>r.shell&&e.length>0?[[t,...e].join(" "),[],r]:[t,e,r];import{inspect as gne}from"node:util";function Zs(t){if(typeof t=="string")return kre(t);if(!(ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT===1))throw new Error("Input must be a string or a Uint8Array");return Bre(t)}var kre=t=>t.at(-1)===JD?t.slice(0,t.at(-2)===QD?-2:-1):t,Bre=t=>t.at(-1)===Fre?t.subarray(0,t.at(-2)===Vre?-2:-1):t,JD=`
|
|
81
|
+
`,Fre=JD.codePointAt(0),QD="\r",Vre=QD.codePointAt(0);import{on as fne}from"node:events";import{finished as hne}from"node:stream/promises";function Gre(t,{checkOpen:e=!0}={}){return t!==null&&typeof t=="object"&&(t.writable||t.readable||!e||t.writable===void 0&&t.readable===void 0)&&typeof t.pipe=="function"}function ZD(t,{checkOpen:e=!0}={}){return Gre(t,{checkOpen:e})&&(t.readable||!e)&&typeof t.read=="function"&&typeof t.readable=="boolean"&&typeof t.readableObjectMode=="boolean"&&typeof t.destroy=="function"&&typeof t.destroyed=="boolean"}var qre=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype),$v=class{#t;#r;#e=!1;#n=void 0;constructor(e,r){this.#t=e,this.#r=r}next(){let e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){let r=()=>this.#i(e);return this.#n?this.#n.then(r,r):r()}async#o(){if(this.#e)return{done:!0,value:void 0};let e;try{e=await this.#t.read()}catch(r){throw this.#n=void 0,this.#e=!0,this.#t.releaseLock(),r}return e.done&&(this.#n=void 0,this.#e=!0,this.#t.releaseLock()),e}async#i(e){if(this.#e)return{done:!0,value:e};if(this.#e=!0,!this.#r){let r=this.#t.cancel(e);return this.#t.releaseLock(),await r,{done:!0,value:e}}return this.#t.releaseLock(),{done:!0,value:e}}},Yv=Symbol();function e1(){return this[Yv].next()}Object.defineProperty(e1,"name",{value:"next"});function t1(t){return this[Yv].return(t)}Object.defineProperty(t1,"name",{value:"return"});var jre=Object.create(qre,{next:{enumerable:!0,configurable:!0,writable:!0,value:e1},return:{enumerable:!0,configurable:!0,writable:!0,value:t1}});function Wv({preventCancel:t=!1}={}){let e=this.getReader(),r=new $v(e,t),o=Object.create(jre);return o[Yv]=r,o}var r1=t=>{if(ZD(t,{checkOpen:!1})&&hu.on!==void 0)return zre(t);if(typeof t?.[Symbol.asyncIterator]=="function")return t;if(Hre.call(t)==="[object ReadableStream]")return Wv.call(t);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:Hre}=Object.prototype,zre=async function*(t){let e=new AbortController,r={};$re(t,e,r);try{for await(let[o]of hu.on(t,"data",{signal:e.signal}))yield o}catch(o){if(r.error!==void 0)throw r.error;if(!e.signal.aborted)throw o}finally{t.destroy()}},$re=async(t,e,r)=>{try{await hu.finished(t,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(o){r.error=o}finally{e.abort()}},hu={};var ea=async(t,{init:e,convertChunk:r,getSize:o,truncateChunk:s,addChunk:a,getFinalChunk:i,finalize:n},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{let u=r1(t),l=e();l.length=0;try{for await(let d of u){let h=Wre(d),g=r[h](d,l);o1({convertedChunk:g,state:l,getSize:o,truncateChunk:s,addChunk:a,maxBuffer:c})}return Yre({state:l,convertChunk:r,getSize:o,truncateChunk:s,addChunk:a,getFinalChunk:i,maxBuffer:c}),n(l)}catch(d){let h=typeof d=="object"&&d!==null?d:new Error(d);throw h.bufferedData=n(l),h}},Yre=({state:t,getSize:e,truncateChunk:r,addChunk:o,getFinalChunk:s,maxBuffer:a})=>{let i=s(t);i!==void 0&&o1({convertedChunk:i,state:t,getSize:e,truncateChunk:r,addChunk:o,maxBuffer:a})},o1=({convertedChunk:t,state:e,getSize:r,truncateChunk:o,addChunk:s,maxBuffer:a})=>{let i=r(t),n=e.length+i;if(n<=a){n1(t,e,s,n);return}let c=o(t,a-e.length);throw c!==void 0&&n1(c,e,s,a),new dn},n1=(t,e,r,o)=>{e.contents=r(t,e,o),e.length=o},Wre=t=>{let e=typeof t;if(e==="string")return"string";if(e!=="object"||t===null)return"others";if(globalThis.Buffer?.isBuffer(t))return"buffer";let r=i1.call(t);return r==="[object ArrayBuffer]"?"arrayBuffer":r==="[object DataView]"?"dataView":Number.isInteger(t.byteLength)&&Number.isInteger(t.byteOffset)&&i1.call(t.buffer)==="[object ArrayBuffer]"?"typedArray":"others"},{toString:i1}=Object.prototype,dn=class extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}};var pi=t=>t,mu=()=>{},Cp=({contents:t})=>t,Np=t=>{throw new Error(`Streams in object mode are not supported: ${String(t)}`)},Mp=t=>t.length;async function Ip(t,e){return ea(t,Qre,e)}var Kre=()=>({contents:[]}),Xre=()=>1,Jre=(t,{contents:e})=>(e.push(t),e),Qre={init:Kre,convertChunk:{string:pi,buffer:pi,arrayBuffer:pi,dataView:pi,typedArray:pi,others:pi},getSize:Xre,truncateChunk:mu,addChunk:Jre,getFinalChunk:mu,finalize:Cp};async function xp(t,e){return ea(t,ane,e)}var Zre=()=>({contents:new ArrayBuffer(0)}),ene=t=>tne.encode(t),tne=new TextEncoder,s1=t=>new Uint8Array(t),a1=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength),rne=(t,e)=>t.slice(0,e),nne=(t,{contents:e,length:r},o)=>{let s=l1()?one(e,o):ine(e,o);return new Uint8Array(s).set(t,r),s},ine=(t,e)=>{if(e<=t.byteLength)return t;let r=new ArrayBuffer(u1(e));return new Uint8Array(r).set(new Uint8Array(t),0),r},one=(t,e)=>{if(e<=t.maxByteLength)return t.resize(e),t;let r=new ArrayBuffer(e,{maxByteLength:u1(e)});return new Uint8Array(r).set(new Uint8Array(t),0),r},u1=t=>c1**Math.ceil(Math.log(t)/Math.log(c1)),c1=2,sne=({contents:t,length:e})=>l1()?t:t.slice(0,e),l1=()=>"resize"in ArrayBuffer.prototype,ane={init:Zre,convertChunk:{string:ene,buffer:s1,arrayBuffer:s1,dataView:a1,typedArray:a1,others:Np},getSize:Mp,truncateChunk:rne,addChunk:nne,getFinalChunk:mu,finalize:sne};async function Lp(t,e){return ea(t,pne,e)}var cne=()=>({contents:"",textDecoder:new TextDecoder}),wp=(t,{textDecoder:e})=>e.decode(t,{stream:!0}),une=(t,{contents:e})=>e+t,lne=(t,e)=>t.slice(0,e),dne=({textDecoder:t})=>{let e=t.decode();return e===""?void 0:e},pne={init:cne,convertChunk:{string:pi,buffer:wp,arrayBuffer:wp,dataView:wp,typedArray:wp,others:Np},getSize:Mp,truncateChunk:lne,addChunk:une,getFinalChunk:dne,finalize:Cp};Object.assign(hu,{on:fne,finished:hne});var d1=({error:t,stream:e,readableObjectMode:r,lines:o,encoding:s,fdNumber:a})=>{if(!(t instanceof dn))throw t;if(a==="all")return t;let i=mne(r,o,s);throw t.maxBufferInfo={fdNumber:a,unit:i},e.destroy(),t},mne=(t,e,r)=>t?"objects":e?"lines":r==="buffer"?"bytes":"characters",p1=(t,e,r)=>{if(e.length!==r)return;let o=new dn;throw o.maxBufferInfo={fdNumber:"ipc"},o},f1=(t,e)=>{let{streamName:r,threshold:o,unit:s}=_ne(t,e);return`Command's ${r} was larger than ${o} ${s}`},_ne=(t,e)=>{if(t?.maxBufferInfo===void 0)return{streamName:"output",threshold:e[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:r,unit:o}}=t;delete t.maxBufferInfo;let s=di(e,r);return r==="ipc"?{streamName:"IPC output",threshold:s,unit:"messages"}:{streamName:Jd(r),threshold:s,unit:o}},h1=(t,e,r)=>t?.code==="ENOBUFS"&&e!==null&&e.some(o=>o!==null&&o.length>Dp(r)),m1=(t,e,r)=>{if(!e)return t;let o=Dp(r);return t.length>o?t.slice(0,o):t},Dp=([,t])=>t;var g1=({stdio:t,all:e,ipcOutput:r,originalError:o,signal:s,signalDescription:a,exitCode:i,escapedCommand:n,timedOut:c,isCanceled:u,isGracefullyCanceled:l,isMaxBuffer:d,isForcefullyTerminated:h,forceKillAfterDelay:g,killSignal:E,maxBuffer:S,timeout:v,cwd:O})=>{let x=o?.code,H=Ene({originalError:o,timedOut:c,timeout:v,isMaxBuffer:d,maxBuffer:S,errorCode:x,signal:s,signalDescription:a,exitCode:i,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:h,forceKillAfterDelay:g,killSignal:E}),A=Tne(o,O),$=A===void 0?"":`
|
|
82
|
+
${A}`,z=`${H}: ${n}${$}`,Q=e===void 0?[t[2],t[1]]:[e],oe=[z,...Q,...t.slice(3),r.map(te=>yne(te)).join(`
|
|
83
|
+
`)].map(te=>cu(Zs(vne(te)))).filter(Boolean).join(`
|
|
84
|
+
|
|
85
|
+
`);return{originalMessage:A,shortMessage:z,message:oe}},Ene=({originalError:t,timedOut:e,timeout:r,isMaxBuffer:o,maxBuffer:s,errorCode:a,signal:i,signalDescription:n,exitCode:c,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:d,forceKillAfterDelay:h,killSignal:g})=>{let E=Sne(d,h);return e?`Command timed out after ${r} milliseconds${E}`:l?i===void 0?`Command was gracefully canceled with exit code ${c}`:d?`Command was gracefully canceled${E}`:`Command was gracefully canceled with ${i} (${n})`:u?`Command was canceled${E}`:o?`${f1(t,s)}${E}`:a!==void 0?`Command failed with ${a}${E}`:d?`Command was killed with ${g} (${dp(g)})${E}`:i!==void 0?`Command was killed with ${i} (${n})`:c!==void 0?`Command failed with exit code ${c}`:"Command failed"},Sne=(t,e)=>t?` and was forcefully terminated after ${e} milliseconds`:"",Tne=(t,e)=>{if(t instanceof Br)return;let r=zL(t)?t.originalMessage:String(t?.message??t),o=cu(WD(r,e));return o===""?void 0:o},yne=t=>typeof t=="string"?t:gne(t),vne=t=>Array.isArray(t)?t.map(e=>Zs(_1(e))).filter(Boolean).join(`
|
|
86
|
+
`):_1(t),_1=t=>typeof t=="string"?t:We(t)?Kd(t):"";var Up=({command:t,escapedCommand:e,stdio:r,all:o,ipcOutput:s,options:{cwd:a},startTime:i})=>E1({command:t,escapedCommand:e,cwd:a,durationMs:bv(i),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:o,stdio:r,ipcOutput:s,pipedFrom:[]}),ta=({error:t,command:e,escapedCommand:r,fileDescriptors:o,options:s,startTime:a,isSync:i})=>_u({error:t,command:e,escapedCommand:r,startTime:a,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:o.length}),ipcOutput:[],options:s,isSync:i}),_u=({error:t,command:e,escapedCommand:r,startTime:o,timedOut:s,isCanceled:a,isGracefullyCanceled:i,isMaxBuffer:n,isForcefullyTerminated:c,exitCode:u,signal:l,stdio:d,all:h,ipcOutput:g,options:{timeoutDuration:E,timeout:S=E,forceKillAfterDelay:v,killSignal:O,cwd:x,maxBuffer:H},isSync:A})=>{let{exitCode:$,signal:z,signalDescription:Q}=One(u,l),{originalMessage:oe,shortMessage:te,message:Z}=g1({stdio:d,all:h,ipcOutput:g,originalError:t,signal:z,signalDescription:Q,exitCode:$,escapedCommand:r,timedOut:s,isCanceled:a,isGracefullyCanceled:i,isMaxBuffer:n,isForcefullyTerminated:c,forceKillAfterDelay:v,killSignal:O,maxBuffer:H,timeout:S,cwd:x}),P=jL(t,Z,A);return Object.assign(P,Ane({error:P,command:e,escapedCommand:r,startTime:o,timedOut:s,isCanceled:a,isGracefullyCanceled:i,isMaxBuffer:n,isForcefullyTerminated:c,exitCode:$,signal:z,signalDescription:Q,stdio:d,all:h,ipcOutput:g,cwd:x,originalMessage:oe,shortMessage:te})),P},Ane=({error:t,command:e,escapedCommand:r,startTime:o,timedOut:s,isCanceled:a,isGracefullyCanceled:i,isMaxBuffer:n,isForcefullyTerminated:c,exitCode:u,signal:l,signalDescription:d,stdio:h,all:g,ipcOutput:E,cwd:S,originalMessage:v,shortMessage:O})=>E1({shortMessage:O,originalMessage:v,command:e,escapedCommand:r,cwd:S,durationMs:bv(o),failed:!0,timedOut:s,isCanceled:a,isGracefullyCanceled:i,isTerminated:l!==void 0,isMaxBuffer:n,isForcefullyTerminated:c,exitCode:u,signal:l,signalDescription:d,code:t.cause?.code,stdout:h[1],stderr:h[2],all:g,stdio:h,ipcOutput:E,pipedFrom:[]}),E1=t=>Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0)),One=(t,e)=>{let r=t===null?void 0:t,o=e===null?void 0:e,s=o===void 0?void 0:dp(e);return{exitCode:r,signal:o,signalDescription:s}};var S1=t=>Number.isFinite(t)?t:0;function bne(t){return{days:Math.trunc(t/864e5),hours:Math.trunc(t/36e5%24),minutes:Math.trunc(t/6e4%60),seconds:Math.trunc(t/1e3%60),milliseconds:Math.trunc(t%1e3),microseconds:Math.trunc(S1(t*1e3)%1e3),nanoseconds:Math.trunc(S1(t*1e6)%1e3)}}function Rne(t){return{days:t/86400000n,hours:t/3600000n%24n,minutes:t/60000n%60n,seconds:t/1000n%60n,milliseconds:t%1000n,microseconds:0n,nanoseconds:0n}}function Kv(t){switch(typeof t){case"number":{if(Number.isFinite(t))return bne(t);break}case"bigint":return Rne(t)}throw new TypeError("Expected a finite number or bigint")}var Pne=t=>t===0||t===0n,Cne=(t,e)=>e===1||e===1n?t:`${t}s`,Nne=1e-7,Mne=24n*60n*60n*1000n;function Xv(t,e){let r=typeof t=="bigint";if(!r&&!Number.isFinite(t))throw new TypeError("Expected a finite number or bigint");e={...e};let o=t<0?"-":"";t=t<0?-t:t,e.colonNotation&&(e.compact=!1,e.formatSubMilliseconds=!1,e.separateMilliseconds=!1,e.verbose=!1),e.compact&&(e.unitCount=1,e.secondsDecimalDigits=0,e.millisecondsDecimalDigits=0);let s=[],a=(l,d)=>{let h=Math.floor(l*10**d+Nne);return(Math.round(h)/10**d).toFixed(d)},i=(l,d,h,g)=>{if(!((s.length===0||!e.colonNotation)&&Pne(l)&&!(e.colonNotation&&h==="m"))){if(g??=String(l),e.colonNotation){let E=g.includes(".")?g.split(".")[0].length:g.length,S=s.length>0?2:1;g="0".repeat(Math.max(0,S-E))+g}else g+=e.verbose?" "+Cne(d,l):h;s.push(g)}},n=Kv(t),c=BigInt(n.days);if(e.hideYearAndDays?i(BigInt(c)*24n+BigInt(n.hours),"hour","h"):(e.hideYear?i(c,"day","d"):(i(c/365n,"year","y"),i(c%365n,"day","d")),i(Number(n.hours),"hour","h")),i(Number(n.minutes),"minute","m"),!e.hideSeconds)if(e.separateMilliseconds||e.formatSubMilliseconds||!e.colonNotation&&t<1e3&&!e.subSecondsAsDecimals){let l=Number(n.seconds),d=Number(n.milliseconds),h=Number(n.microseconds),g=Number(n.nanoseconds);if(i(l,"second","s"),e.formatSubMilliseconds)i(d,"millisecond","ms"),i(h,"microsecond","\xB5s"),i(g,"nanosecond","ns");else{let E=d+h/1e3+g/1e6,S=typeof e.millisecondsDecimalDigits=="number"?e.millisecondsDecimalDigits:0,v=E>=1?Math.round(E):Math.ceil(E),O=S?E.toFixed(S):v;i(Number.parseFloat(O),"millisecond","ms",O)}}else{let l=(r?Number(t%Mne):t)/1e3%60,d=typeof e.secondsDecimalDigits=="number"?e.secondsDecimalDigits:1,h=a(l,d),g=e.keepDecimalsOnWholeSeconds?h:h.replace(/\.0+$/,"");i(Number.parseFloat(g),"second","s",g)}if(s.length===0)return o+"0"+(e.verbose?" milliseconds":"ms");let u=e.colonNotation?":":" ";return typeof e.unitCount=="number"&&(s=s.slice(0,Math.max(e.unitCount,1))),o+s.join(u)}var T1=(t,e)=>{t.failed&&cn({type:"error",verboseMessage:t.shortMessage,verboseInfo:e,result:t})};var y1=(t,e)=>{$s(e)&&(T1(t,e),Ine(t,e))},Ine=(t,e)=>{let r=`(done in ${Xv(t.durationMs)})`;cn({type:"duration",verboseMessage:r,verboseInfo:e,result:t})};var ra=(t,e,{reject:r})=>{if(y1(t,e),t.failed&&r)throw t;return t};import{readFileSync as W1}from"node:fs";function Vr(t,{checkOpen:e=!0}={}){return t!==null&&typeof t=="object"&&(t.writable||t.readable||!e||t.writable===void 0&&t.readable===void 0)&&typeof t.pipe=="function"}function Jv(t,{checkOpen:e=!0}={}){return Vr(t,{checkOpen:e})&&(t.writable||!e)&&typeof t.write=="function"&&typeof t.end=="function"&&typeof t.writable=="boolean"&&typeof t.writableObjectMode=="boolean"&&typeof t.destroy=="function"&&typeof t.destroyed=="boolean"}function gu(t,{checkOpen:e=!0}={}){return Vr(t,{checkOpen:e})&&(t.readable||!e)&&typeof t.read=="function"&&typeof t.readable=="boolean"&&typeof t.readableObjectMode=="boolean"&&typeof t.destroy=="function"&&typeof t.destroyed=="boolean"}function Qv(t,e){return Jv(t,e)&&gu(t,e)}var O1=(t,e)=>Mo(t)?"asyncGenerator":P1(t)?"generator":kp(t)?"fileUrl":Une(t)?"filePath":Fne(t)?"webStream":Vr(t,{checkOpen:!1})?"native":We(t)?"uint8Array":Vne(t)?"asyncIterable":Gne(t)?"iterable":tA(t)?b1({transform:t},e):Dne(t)?xne(t,e):"native",xne=(t,e)=>Qv(t.transform,{checkOpen:!1})?wne(t,e):tA(t.transform)?b1(t,e):Lne(t,e),wne=(t,e)=>(R1(t,e,"Duplex stream"),"duplex"),b1=(t,e)=>(R1(t,e,"web TransformStream"),"webTransform"),R1=({final:t,binary:e,objectMode:r},o,s)=>{v1(t,`${o}.final`,s),v1(e,`${o}.binary`,s),Zv(r,`${o}.objectMode`)},v1=(t,e,r)=>{if(t!==void 0)throw new TypeError(`The \`${e}\` option can only be defined when using a generator, not a ${r}.`)},Lne=({transform:t,final:e,binary:r,objectMode:o},s)=>{if(t!==void 0&&!A1(t))throw new TypeError(`The \`${s}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Qv(e,{checkOpen:!1}))throw new TypeError(`The \`${s}.final\` option must not be a Duplex stream.`);if(tA(e))throw new TypeError(`The \`${s}.final\` option must not be a web TransformStream.`);if(e!==void 0&&!A1(e))throw new TypeError(`The \`${s}.final\` option must be a generator.`);return Zv(r,`${s}.binary`),Zv(o,`${s}.objectMode`),Mo(t)||Mo(e)?"asyncGenerator":"generator"},Zv=(t,e)=>{if(t!==void 0&&typeof t!="boolean")throw new TypeError(`The \`${e}\` option must use a boolean.`)},A1=t=>Mo(t)||P1(t),Mo=t=>Object.prototype.toString.call(t)==="[object AsyncGeneratorFunction]",P1=t=>Object.prototype.toString.call(t)==="[object GeneratorFunction]",Dne=t=>Ue(t)&&(t.transform!==void 0||t.final!==void 0),kp=t=>Object.prototype.toString.call(t)==="[object URL]",C1=t=>kp(t)&&t.protocol!=="file:",Une=t=>Ue(t)&&Object.keys(t).length>0&&Object.keys(t).every(e=>kne.has(e))&&eA(t.file),kne=new Set(["file","append"]),eA=t=>typeof t=="string",N1=(t,e)=>t==="native"&&typeof e=="string"&&!Bne.has(e),Bne=new Set(["ipc","ignore","inherit","overlapped","pipe"]),M1=t=>Object.prototype.toString.call(t)==="[object ReadableStream]",Bp=t=>Object.prototype.toString.call(t)==="[object WritableStream]",Fne=t=>M1(t)||Bp(t),tA=t=>M1(t?.readable)&&Bp(t?.writable),Vne=t=>I1(t)&&typeof t[Symbol.asyncIterator]=="function",Gne=t=>I1(t)&&typeof t[Symbol.iterator]=="function",I1=t=>typeof t=="object"&&t!==null,_r=new Set(["generator","asyncGenerator","duplex","webTransform"]),Fp=new Set(["fileUrl","filePath","fileNumber"]),rA=new Set(["fileUrl","filePath"]),x1=new Set([...rA,"webStream","nodeStream"]),w1=new Set(["webTransform","duplex"]),Bi={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"};var nA=(t,e,r,o)=>o==="output"?qne(t,e,r):jne(t,e,r),qne=(t,e,r)=>{let o=e!==0&&r[e-1].value.readableObjectMode;return{writableObjectMode:o,readableObjectMode:t??o}},jne=(t,e,r)=>{let o=e===0?t===!0:r[e-1].value.readableObjectMode,s=e!==r.length-1&&(t??o);return{writableObjectMode:o,readableObjectMode:s}},L1=(t,e)=>{let r=t.findLast(({type:o})=>_r.has(o));return r===void 0?!1:e==="input"?r.value.writableObjectMode:r.value.readableObjectMode};var D1=(t,e,r,o)=>[...t.filter(({type:s})=>!_r.has(s)),...Hne(t,e,r,o)],Hne=(t,e,r,{encoding:o})=>{let s=t.filter(({type:i})=>_r.has(i)),a=Array.from({length:s.length});for(let[i,n]of Object.entries(s))a[i]=zne({stdioItem:n,index:Number(i),newTransforms:a,optionName:e,direction:r,encoding:o});return Kne(a,r)},zne=({stdioItem:t,stdioItem:{type:e},index:r,newTransforms:o,optionName:s,direction:a,encoding:i})=>e==="duplex"?$ne({stdioItem:t,optionName:s}):e==="webTransform"?Yne({stdioItem:t,index:r,newTransforms:o,direction:a}):Wne({stdioItem:t,index:r,newTransforms:o,direction:a,encoding:i}),$ne=({stdioItem:t,stdioItem:{value:{transform:e,transform:{writableObjectMode:r,readableObjectMode:o},objectMode:s=o}},optionName:a})=>{if(s&&!o)throw new TypeError(`The \`${a}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!s&&o)throw new TypeError(`The \`${a}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...t,value:{transform:e,writableObjectMode:r,readableObjectMode:o}}},Yne=({stdioItem:t,stdioItem:{value:e},index:r,newTransforms:o,direction:s})=>{let{transform:a,objectMode:i}=Ue(e)?e:{transform:e},{writableObjectMode:n,readableObjectMode:c}=nA(i,r,o,s);return{...t,value:{transform:a,writableObjectMode:n,readableObjectMode:c}}},Wne=({stdioItem:t,stdioItem:{value:e},index:r,newTransforms:o,direction:s,encoding:a})=>{let{transform:i,final:n,binary:c=!1,preserveNewlines:u=!1,objectMode:l}=Ue(e)?e:{transform:e},d=c||ir.has(a),{writableObjectMode:h,readableObjectMode:g}=nA(l,r,o,s);return{...t,value:{transform:i,final:n,binary:d,preserveNewlines:u,writableObjectMode:h,readableObjectMode:g}}},Kne=(t,e)=>e==="input"?t.reverse():t;import iA from"node:process";var U1=(t,e,r)=>{let o=t.map(s=>Xne(s,e));if(o.includes("input")&&o.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return o.find(Boolean)??Zne},Xne=({type:t,value:e},r)=>Jne[r]??k1[t](e),Jne=["input","output","output"],na=()=>{},oA=()=>"input",k1={generator:na,asyncGenerator:na,fileUrl:na,filePath:na,iterable:oA,asyncIterable:oA,uint8Array:oA,webStream:t=>Bp(t)?"output":"input",nodeStream(t){return gu(t,{checkOpen:!1})?Jv(t,{checkOpen:!1})?void 0:"input":"output"},webTransform:na,duplex:na,native(t){let e=Qne(t);if(e!==void 0)return e;if(Vr(t,{checkOpen:!1}))return k1.nodeStream(t)}},Qne=t=>{if([0,iA.stdin].includes(t))return"input";if([1,2,iA.stdout,iA.stderr].includes(t))return"output"},Zne="output";var B1=(t,e)=>e&&!t.includes("ipc")?[...t,"ipc"]:t;var F1=({stdio:t,ipc:e,buffer:r,...o},s,a)=>{let i=eie(t,o).map((n,c)=>V1(n,c));return a?rie(i,r,s):B1(i,e)},eie=(t,e)=>{if(t===void 0)return mr.map(o=>e[o]);if(tie(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${mr.map(o=>`\`${o}\``).join(", ")}`);if(typeof t=="string")return[t,t,t];if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let r=Math.max(t.length,mr.length);return Array.from({length:r},(o,s)=>t[s])},tie=t=>mr.some(e=>t[e]!==void 0),V1=(t,e)=>Array.isArray(t)?t.map(r=>V1(r,e)):t??(e>=mr.length?"ignore":"pipe"),rie=(t,e,r)=>t.map((o,s)=>!e[s]&&s!==0&&!Ys(r,s)&&nie(o)?"ignore":o),nie=t=>t==="pipe"||Array.isArray(t)&&t.every(e=>e==="pipe");import{readFileSync as iie}from"node:fs";import oie from"node:tty";var q1=({stdioItem:t,stdioItem:{type:e},isStdioArray:r,fdNumber:o,direction:s,isSync:a})=>!r||e!=="native"?t:a?sie({stdioItem:t,fdNumber:o,direction:s}):uie({stdioItem:t,fdNumber:o}),sie=({stdioItem:t,stdioItem:{value:e,optionName:r},fdNumber:o,direction:s})=>{let a=aie({value:e,optionName:r,fdNumber:o,direction:s});if(a!==void 0)return a;if(Vr(e,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return t},aie=({value:t,optionName:e,fdNumber:r,direction:o})=>{let s=cie(t,r);if(s!==void 0){if(o==="output")return{type:"fileNumber",value:s,optionName:e};if(oie.isatty(s))throw new TypeError(`The \`${e}: ${hp(t)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:li(iie(s)),optionName:e}}},cie=(t,e)=>{if(t==="inherit")return e;if(typeof t=="number")return t;let r=Xd.indexOf(t);if(r!==-1)return r},uie=({stdioItem:t,stdioItem:{value:e,optionName:r},fdNumber:o})=>e==="inherit"?{type:"nodeStream",value:G1(o,e,r),optionName:r}:typeof e=="number"?{type:"nodeStream",value:G1(e,e,r),optionName:r}:Vr(e,{checkOpen:!1})?{type:"nodeStream",value:e,optionName:r}:t,G1=(t,e,r)=>{let o=Xd[t];if(o===void 0)throw new TypeError(`The \`${r}: ${e}\` option is invalid: no such standard stream.`);return o};var j1=({input:t,inputFile:e},r)=>r===0?[...lie(t),...pie(e)]:[],lie=t=>t===void 0?[]:[{type:die(t),value:t,optionName:"input"}],die=t=>{if(gu(t,{checkOpen:!1}))return"nodeStream";if(typeof t=="string")return"string";if(We(t))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},pie=t=>t===void 0?[]:[{...fie(t),optionName:"inputFile"}],fie=t=>{if(kp(t))return{type:"fileUrl",value:t};if(eA(t))return{type:"filePath",value:{file:t}};throw new Error("The `inputFile` option must be a file path string or a file URL.")};var H1=t=>t.filter((e,r)=>t.every((o,s)=>e.value!==o.value||r>=s||e.type==="generator"||e.type==="asyncGenerator")),z1=({stdioItem:{type:t,value:e,optionName:r},direction:o,fileDescriptors:s,isSync:a})=>{let i=hie(s,t);if(i.length!==0){if(a){mie({otherStdioItems:i,type:t,value:e,optionName:r,direction:o});return}if(x1.has(t))return $1({otherStdioItems:i,type:t,value:e,optionName:r,direction:o});w1.has(t)&&gie({otherStdioItems:i,type:t,value:e,optionName:r})}},hie=(t,e)=>t.flatMap(({direction:r,stdioItems:o})=>o.filter(s=>s.type===e).map((s=>({...s,direction:r})))),mie=({otherStdioItems:t,type:e,value:r,optionName:o,direction:s})=>{rA.has(e)&&$1({otherStdioItems:t,type:e,value:r,optionName:o,direction:s})},$1=({otherStdioItems:t,type:e,value:r,optionName:o,direction:s})=>{let a=t.filter(n=>_ie(n,r));if(a.length===0)return;let i=a.find(n=>n.direction!==s);return Y1(i,o,e),s==="output"?a[0].stream:void 0},_ie=({type:t,value:e},r)=>t==="filePath"?e.file===r.file:t==="fileUrl"?e.href===r.href:e===r,gie=({otherStdioItems:t,type:e,value:r,optionName:o})=>{let s=t.find(({value:{transform:a}})=>a===r.transform);Y1(s,o,e)},Y1=(t,e,r)=>{if(t!==void 0)throw new TypeError(`The \`${t.optionName}\` and \`${e}\` options must not target ${Bi[r]} that is the same.`)};var Vp=(t,e,r,o)=>{let a=F1(e,r,o).map((n,c)=>Eie({stdioOption:n,fdNumber:c,options:e,isSync:o})),i=Rie({initialFileDescriptors:a,addProperties:t,options:e,isSync:o});return e.stdio=i.map(({stdioItems:n})=>Nie(n)),i},Eie=({stdioOption:t,fdNumber:e,options:r,isSync:o})=>{let s=Jd(e),{stdioItems:a,isStdioArray:i}=Sie({stdioOption:t,fdNumber:e,options:r,optionName:s}),n=U1(a,e,s),c=a.map(d=>q1({stdioItem:d,isStdioArray:i,fdNumber:e,direction:n,isSync:o})),u=D1(c,s,n,r),l=L1(u,n);return bie(u,l),{direction:n,objectMode:l,stdioItems:u}},Sie=({stdioOption:t,fdNumber:e,options:r,optionName:o})=>{let a=[...(Array.isArray(t)?t:[t]).map(c=>Tie(c,o)),...j1(r,e)],i=H1(a),n=i.length>1;return yie(i,n,o),Aie(i),{stdioItems:i,isStdioArray:n}},Tie=(t,e)=>({type:O1(t,e),value:t,optionName:e}),yie=(t,e,r)=>{if(t.length===0)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(e){for(let{value:o,optionName:s}of t)if(vie.has(o))throw new Error(`The \`${s}\` option must not include \`${o}\`.`)}},vie=new Set(["ignore","ipc"]),Aie=t=>{for(let e of t)Oie(e)},Oie=({type:t,value:e,optionName:r})=>{if(C1(e))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.
|
|
87
|
+
For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(N1(t,e))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},bie=(t,e)=>{if(!e)return;let r=t.find(({type:o})=>Fp.has(o));if(r!==void 0)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},Rie=({initialFileDescriptors:t,addProperties:e,options:r,isSync:o})=>{let s=[];try{for(let a of t)s.push(Pie({fileDescriptor:a,fileDescriptors:s,addProperties:e,options:r,isSync:o}));return s}catch(a){throw sA(s),a}},Pie=({fileDescriptor:{direction:t,objectMode:e,stdioItems:r},fileDescriptors:o,addProperties:s,options:a,isSync:i})=>{let n=r.map(c=>Cie({stdioItem:c,addProperties:s,direction:t,options:a,fileDescriptors:o,isSync:i}));return{direction:t,objectMode:e,stdioItems:n}},Cie=({stdioItem:t,addProperties:e,direction:r,options:o,fileDescriptors:s,isSync:a})=>{let i=z1({stdioItem:t,direction:r,fileDescriptors:s,isSync:a});return i!==void 0?{...t,stream:i}:{...t,...e[r][t.type](t,o)}},sA=t=>{for(let{stdioItems:e}of t)for(let{stream:r}of e)r!==void 0&&!kr(r)&&r.destroy()},Nie=t=>{if(t.length>1)return t.some(({value:o})=>o==="overlapped")?"overlapped":"pipe";let[{type:e,value:r}]=t;return e==="native"?r:"pipe"};var X1=(t,e)=>Vp(Iie,t,e,!0),pn=({type:t,optionName:e})=>{J1(e,Bi[t])},Mie=({optionName:t,value:e})=>((e==="ipc"||e==="overlapped")&&J1(t,`"${e}"`),{}),J1=(t,e)=>{throw new TypeError(`The \`${t}\` option cannot be ${e} with synchronous methods.`)},K1={generator(){},asyncGenerator:pn,webStream:pn,nodeStream:pn,webTransform:pn,duplex:pn,asyncIterable:pn,native:Mie},Iie={input:{...K1,fileUrl:({value:t})=>({contents:[li(W1(t))]}),filePath:({value:{file:t}})=>({contents:[li(W1(t))]}),fileNumber:pn,iterable:({value:t})=>({contents:[...t]}),string:({value:t})=>({contents:[t]}),uint8Array:({value:t})=>({contents:[t]})},output:{...K1,fileUrl:({value:t})=>({path:t}),filePath:({value:{file:t,append:e}})=>({path:t,append:e}),fileNumber:({value:t})=>({path:t}),iterable:pn,string:pn,uint8Array:pn}};var fi=(t,{stripFinalNewline:e},r)=>aA(e,r)&&t!==void 0&&!Array.isArray(t)?Zs(t):t,aA=(t,e)=>e==="all"?t[1]||t[2]:t[e];import{Transform as Qie,getDefaultHighWaterMark as cU}from"node:stream";var Gp=(t,e,r,o)=>t||r?void 0:Z1(e,o),uA=(t,e,r)=>r?t.flatMap(o=>Q1(o,e)):Q1(t,e),Q1=(t,e)=>{let{transform:r,final:o}=Z1(e,{});return[...r(t),...o()]},Z1=(t,e)=>(e.previousChunks="",{transform:xie.bind(void 0,e,t),final:Lie.bind(void 0,e)}),xie=function*(t,e,r){if(typeof r!="string"){yield r;return}let{previousChunks:o}=t,s=-1;for(let a=0;a<r.length;a+=1)if(r[a]===`
|
|
88
|
+
`){let i=wie(r,a,e,t),n=r.slice(s+1,a+1-i);o.length>0&&(n=cA(o,n),o=""),yield n,s=a}s!==r.length-1&&(o=cA(o,r.slice(s+1))),t.previousChunks=o},wie=(t,e,r,o)=>r?0:(o.isWindowsNewline=e!==0&&t[e-1]==="\r",o.isWindowsNewline?2:1),Lie=function*({previousChunks:t}){t.length>0&&(yield t)},eU=({binary:t,preserveNewlines:e,readableObjectMode:r,state:o})=>t||e||r?void 0:{transform:Die.bind(void 0,o)},Die=function*({isWindowsNewline:t=!1},e){let{unixNewline:r,windowsNewline:o,LF:s,concatBytes:a}=typeof e=="string"?Uie:Bie;if(e.at(-1)===s){yield e;return}yield a(e,t?o:r)},cA=(t,e)=>`${t}${e}`,Uie={windowsNewline:`\r
|
|
89
|
+
`,unixNewline:`
|
|
90
|
+
`,LF:`
|
|
91
|
+
`,concatBytes:cA},kie=(t,e)=>{let r=new Uint8Array(t.length+e.length);return r.set(t,0),r.set(e,t.length),r},Bie={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:kie};import{Buffer as Fie}from"node:buffer";var tU=(t,e)=>t?void 0:Vie.bind(void 0,e),Vie=function*(t,e){if(typeof e!="string"&&!We(e)&&!Fie.isBuffer(e))throw new TypeError(`The \`${t}\` option's transform must use "objectMode: true" to receive as input: ${typeof e}.`);yield e},rU=(t,e)=>t?Gie.bind(void 0,e):qie.bind(void 0,e),Gie=function*(t,e){nU(t,e),yield e},qie=function*(t,e){if(nU(t,e),typeof e!="string"&&!We(e))throw new TypeError(`The \`${t}\` option's function must yield a string or an Uint8Array, not ${typeof e}.`);yield e},nU=(t,e)=>{if(e==null)throw new TypeError(`The \`${t}\` option's function must not call \`yield ${e}\`.
|
|
92
|
+
Instead, \`yield\` should either be called with a value, or not be called at all. For example:
|
|
93
|
+
if (condition) { yield value; }`)};import{Buffer as jie}from"node:buffer";import{StringDecoder as Hie}from"node:string_decoder";var qp=(t,e,r)=>{if(r)return;if(t)return{transform:zie.bind(void 0,new TextEncoder)};let o=new Hie(e);return{transform:$ie.bind(void 0,o),final:Yie.bind(void 0,o)}},zie=function*(t,e){jie.isBuffer(e)?yield li(e):typeof e=="string"?yield t.encode(e):yield e},$ie=function*(t,e){yield We(e)?t.write(e):e},Yie=function*(t){let e=t.end();e!==""&&(yield e)};import{callbackify as iU}from"node:util";var lA=iU(async(t,e,r,o)=>{e.currentIterable=t(...r);try{for await(let s of e.currentIterable)o.push(s)}finally{delete e.currentIterable}}),jp=async function*(t,e,r){if(r===e.length){yield t;return}let{transform:o=Kie}=e[r];for await(let s of o(t))yield*jp(s,e,r+1)},oU=async function*(t){for(let[e,{final:r}]of Object.entries(t))yield*Wie(r,Number(e),t)},Wie=async function*(t,e,r){if(t!==void 0)for await(let o of t())yield*jp(o,r,e+1)},sU=iU(async({currentIterable:t},e)=>{if(t!==void 0){await(e?t.throw(e):t.return());return}if(e)throw e}),Kie=function*(t){yield t};var dA=(t,e,r,o)=>{try{for(let s of t(...e))r.push(s);o()}catch(s){o(s)}},aU=(t,e)=>[...e.flatMap(r=>[...Io(r,t,0)]),...Eu(t)],Io=function*(t,e,r){if(r===e.length){yield t;return}let{transform:o=Jie}=e[r];for(let s of o(t))yield*Io(s,e,r+1)},Eu=function*(t){for(let[e,{final:r}]of Object.entries(t))yield*Xie(r,Number(e),t)},Xie=function*(t,e,r){if(t!==void 0)for(let o of t())yield*Io(o,r,e+1)},Jie=function*(t){yield t};var pA=({value:t,value:{transform:e,final:r,writableObjectMode:o,readableObjectMode:s},optionName:a},{encoding:i})=>{let n={},c=uU(t,i,a),u=Mo(e),l=Mo(r),d=u?lA.bind(void 0,jp,n):dA.bind(void 0,Io),h=u||l?lA.bind(void 0,oU,n):dA.bind(void 0,Eu),g=u||l?sU.bind(void 0,n):void 0;return{stream:new Qie({writableObjectMode:o,writableHighWaterMark:cU(o),readableObjectMode:s,readableHighWaterMark:cU(s),transform(S,v,O){d([S,c,0],this,O)},flush(S){h([c],this,S)},destroy:g})}},Hp=(t,e,r,o)=>{let s=e.filter(({type:i})=>i==="generator"),a=o?s.reverse():s;for(let{value:i,optionName:n}of a){let c=uU(i,r,n);t=aU(c,t)}return t},uU=({transform:t,final:e,binary:r,writableObjectMode:o,readableObjectMode:s,preserveNewlines:a},i,n)=>{let c={};return[{transform:tU(o,n)},qp(r,i,o),Gp(r,a,o,c),{transform:t,final:e},{transform:rU(s,n)},eU({binary:r,preserveNewlines:a,readableObjectMode:s,state:c})].filter(Boolean)};var lU=(t,e)=>{for(let r of Zie(t))eoe(t,r,e)},Zie=t=>new Set(Object.entries(t).filter(([,{direction:e}])=>e==="input").map(([e])=>Number(e))),eoe=(t,e,r)=>{let{stdioItems:o}=t[e],s=o.filter(({contents:n})=>n!==void 0);if(s.length===0)return;if(e!==0){let[{type:n,optionName:c}]=s;throw new TypeError(`Only the \`stdin\` option, not \`${c}\`, can be ${Bi[n]} with synchronous methods.`)}let i=s.map(({contents:n})=>n).map(n=>toe(n,o));r.input=au(i)},toe=(t,e)=>{let r=Hp(t,e,"utf8",!0);return roe(r),au(r)},roe=t=>{let e=t.find(r=>typeof r!="string"&&!We(r));if(e!==void 0)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${e}.`)};import{writeFileSync as soe,appendFileSync as aoe}from"node:fs";var zp=({stdioItems:t,encoding:e,verboseInfo:r,fdNumber:o})=>o!=="all"&&Ys(r,o)&&!ir.has(e)&&noe(o)&&(t.some(({type:s,value:a})=>s==="native"&&ioe.has(a))||t.every(({type:s})=>_r.has(s))),noe=t=>t===1||t===2,ioe=new Set(["pipe","overlapped"]),dU=async(t,e,r,o)=>{for await(let s of t)ooe(e)||fU(s,r,o)},pU=(t,e,r)=>{for(let o of t)fU(o,e,r)},ooe=t=>t._readableState.pipes.length>0,fU=(t,e,r)=>{let o=np(t);cn({type:"output",verboseMessage:o,fdNumber:e,verboseInfo:r})};var hU=({fileDescriptors:t,syncResult:{output:e},options:r,isMaxBuffer:o,verboseInfo:s})=>{if(e===null)return{output:Array.from({length:3})};let a={},i=new Set([]);return{output:e.map((c,u)=>coe({result:c,fileDescriptors:t,fdNumber:u,state:a,outputFiles:i,isMaxBuffer:o,verboseInfo:s},r)),...a}},coe=({result:t,fileDescriptors:e,fdNumber:r,state:o,outputFiles:s,isMaxBuffer:a,verboseInfo:i},{buffer:n,encoding:c,lines:u,stripFinalNewline:l,maxBuffer:d})=>{if(t===null)return;let h=m1(t,a,d),g=li(h),{stdioItems:E,objectMode:S}=e[r],v=uoe([g],E,c,o),{serializedResult:O,finalResult:x=O}=loe({chunks:v,objectMode:S,encoding:c,lines:u,stripFinalNewline:l,fdNumber:r});doe({serializedResult:O,fdNumber:r,state:o,verboseInfo:i,encoding:c,stdioItems:E,objectMode:S});let H=n[r]?x:void 0;try{return o.error===void 0&&poe(O,E,s),H}catch(A){return o.error=A,H}},uoe=(t,e,r,o)=>{try{return Hp(t,e,r,!1)}catch(s){return o.error=s,t}},loe=({chunks:t,objectMode:e,encoding:r,lines:o,stripFinalNewline:s,fdNumber:a})=>{if(e)return{serializedResult:t};if(r==="buffer")return{serializedResult:au(t)};let i=Cw(t,r);return o[a]?{serializedResult:i,finalResult:uA(i,!s[a],e)}:{serializedResult:i}},doe=({serializedResult:t,fdNumber:e,state:r,verboseInfo:o,encoding:s,stdioItems:a,objectMode:i})=>{if(!zp({stdioItems:a,encoding:s,verboseInfo:o,fdNumber:e}))return;let n=uA(t,!1,i);try{pU(n,e,o)}catch(c){r.error??=c}},poe=(t,e,r)=>{for(let{path:o,append:s}of e.filter(({type:a})=>Fp.has(a))){let a=typeof o=="string"?o:o.toString();s||r.has(a)?aoe(o,t):(r.add(a),soe(o,t))}};var mU=([,t,e],r)=>{if(r.all)return t===void 0?e:e===void 0?t:Array.isArray(t)?Array.isArray(e)?[...t,...e]:[...t,fi(e,r,"all")]:Array.isArray(e)?[fi(t,r,"all"),...e]:We(t)&&We(e)?Ev([t,e]):`${t}${e}`};import{once as fA}from"node:events";var _U=async(t,e)=>{let[r,o]=await foe(t);return e.isForcefullyTerminated??=!1,[r,o]},foe=async t=>{let[e,r]=await Promise.allSettled([fA(t,"spawn"),fA(t,"exit")]);return e.status==="rejected"?[]:r.status==="rejected"?gU(t):r.value},gU=async t=>{try{return await fA(t,"exit")}catch{return gU(t)}},EU=async t=>{let[e,r]=await t;if(!hoe(e,r)&&hA(e,r))throw new Br;return[e,r]},hoe=(t,e)=>t===void 0&&e===void 0,hA=(t,e)=>t!==0||e!==null;var SU=({error:t,status:e,signal:r,output:o},{maxBuffer:s})=>{let a=moe(t,e,r),i=a?.code==="ETIMEDOUT",n=h1(a,o,s);return{resultError:a,exitCode:e,signal:r,timedOut:i,isMaxBuffer:n}},moe=(t,e,r)=>t!==void 0?t:hA(e,r)?new Br:void 0;var TU=(t,e,r)=>{let{file:o,commandArguments:s,command:a,escapedCommand:i,startTime:n,verboseInfo:c,options:u,fileDescriptors:l}=goe(t,e,r),d=Toe({file:o,commandArguments:s,options:u,command:a,escapedCommand:i,verboseInfo:c,fileDescriptors:l,startTime:n});return ra(d,c,u)},goe=(t,e,r)=>{let{command:o,escapedCommand:s,startTime:a,verboseInfo:i}=op(t,e,r),n=Eoe(r),{file:c,commandArguments:u,options:l}=Rp(t,e,n);Soe(l);let d=X1(l,i);return{file:c,commandArguments:u,command:o,escapedCommand:s,startTime:a,verboseInfo:i,options:l,fileDescriptors:d}},Eoe=t=>t.node&&!t.ipc?{...t,ipc:!1}:t,Soe=({ipc:t,ipcInput:e,detached:r,cancelSignal:o})=>{e&&$p("ipcInput"),t&&$p("ipc: true"),r&&$p("detached: true"),o&&$p("cancelSignal")},$p=t=>{throw new TypeError(`The "${t}" option cannot be used with synchronous methods.`)},Toe=({file:t,commandArguments:e,options:r,command:o,escapedCommand:s,verboseInfo:a,fileDescriptors:i,startTime:n})=>{let c=yoe({file:t,commandArguments:e,options:r,command:o,escapedCommand:s,fileDescriptors:i,startTime:n});if(c.failed)return c;let{resultError:u,exitCode:l,signal:d,timedOut:h,isMaxBuffer:g}=SU(c,r),{output:E,error:S=u}=hU({fileDescriptors:i,syncResult:c,options:r,isMaxBuffer:g,verboseInfo:a}),v=E.map((x,H)=>fi(x,r,H)),O=fi(mU(E,r),r,"all");return Aoe({error:S,exitCode:l,signal:d,timedOut:h,isMaxBuffer:g,stdio:v,all:O,options:r,command:o,escapedCommand:s,startTime:n})},yoe=({file:t,commandArguments:e,options:r,command:o,escapedCommand:s,fileDescriptors:a,startTime:i})=>{try{lU(a,r);let n=voe(r);return _oe(...Pp(t,e,n))}catch(n){return ta({error:n,command:o,escapedCommand:s,fileDescriptors:a,options:r,startTime:i,isSync:!0})}},voe=({encoding:t,maxBuffer:e,...r})=>({...r,encoding:"buffer",maxBuffer:Dp(e)}),Aoe=({error:t,exitCode:e,signal:r,timedOut:o,isMaxBuffer:s,stdio:a,all:i,options:n,command:c,escapedCommand:u,startTime:l})=>t===void 0?Up({command:c,escapedCommand:u,stdio:a,all:i,ipcOutput:[],options:n,startTime:l}):_u({error:t,command:c,escapedCommand:u,timedOut:o,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:s,isForcefullyTerminated:!1,exitCode:e,signal:r,stdio:a,all:i,ipcOutput:[],options:n,startTime:l,isSync:!0});import{setMaxListeners as lae}from"node:events";import{spawn as dae}from"node:child_process";import bU from"node:process";import{once as mA,on as Ooe}from"node:events";var yU=({anyProcess:t,channel:e,isSubprocess:r,ipc:o},{reference:s=!0,filter:a}={})=>(Xs({methodName:"getOneMessage",isSubprocess:r,ipc:o,isConnected:Tp(t)}),boe({anyProcess:t,channel:e,isSubprocess:r,filter:a,reference:s})),boe=async({anyProcess:t,channel:e,isSubprocess:r,filter:o,reference:s})=>{_p(e,s);let a=ki(t,e,r),i=new AbortController;try{return await Promise.race([Roe(a,o,i),Poe(a,r,i),Coe(a,r,i)])}catch(n){throw Js(t),n}finally{i.abort(),gp(e,s)}},Roe=async(t,e,{signal:r})=>{if(e===void 0){let[o]=await mA(t,"message",{signal:r});return o}for await(let[o]of Ooe(t,"message",{signal:r}))if(e(o))return o},Poe=async(t,e,{signal:r})=>{await mA(t,"disconnect",{signal:r}),sD(e)},Coe=async(t,e,{signal:r})=>{let[o]=await mA(t,"strict:error",{signal:r});throw fp(o,e)};import{once as AU,on as Noe}from"node:events";var OU=({anyProcess:t,channel:e,isSubprocess:r,ipc:o},{reference:s=!0}={})=>_A({anyProcess:t,channel:e,isSubprocess:r,ipc:o,shouldAwait:!r,reference:s}),_A=({anyProcess:t,channel:e,isSubprocess:r,ipc:o,shouldAwait:s,reference:a})=>{Xs({methodName:"getEachMessage",isSubprocess:r,ipc:o,isConnected:Tp(t)}),_p(e,a);let i=ki(t,e,r),n=new AbortController,c={};return Moe(t,i,n),Ioe({ipcEmitter:i,isSubprocess:r,controller:n,state:c}),xoe({anyProcess:t,channel:e,ipcEmitter:i,isSubprocess:r,shouldAwait:s,controller:n,state:c,reference:a})},Moe=async(t,e,r)=>{try{await AU(e,"disconnect",{signal:r.signal}),r.abort()}catch{}},Ioe=async({ipcEmitter:t,isSubprocess:e,controller:r,state:o})=>{try{let[s]=await AU(t,"strict:error",{signal:r.signal});o.error=fp(s,e),r.abort()}catch{}},xoe=async function*({anyProcess:t,channel:e,ipcEmitter:r,isSubprocess:o,shouldAwait:s,controller:a,state:i,reference:n}){try{for await(let[c]of Noe(r,"message",{signal:a.signal}))vU(i),yield c}catch{vU(i)}finally{a.abort(),gp(e,n),o||Js(t),s&&await t}},vU=({error:t})=>{if(t)throw t};var RU=(t,{ipc:e})=>{Object.assign(t,CU(t,!1,e))},PU=()=>{let t=bU,e=!0,r=bU.channel!==void 0;return{...CU(t,e,r),getCancelSignal:wD.bind(void 0,{anyProcess:t,channel:t.channel,isSubprocess:e,ipc:r})}},CU=(t,e,r)=>({sendMessage:Op.bind(void 0,{anyProcess:t,channel:t.channel,isSubprocess:e,ipc:r}),getOneMessage:yU.bind(void 0,{anyProcess:t,channel:t.channel,isSubprocess:e,ipc:r}),getEachMessage:OU.bind(void 0,{anyProcess:t,channel:t.channel,isSubprocess:e,ipc:r})});import{ChildProcess as woe}from"node:child_process";import{PassThrough as Loe,Readable as Doe,Writable as Uoe,Duplex as koe}from"node:stream";var NU=({error:t,command:e,escapedCommand:r,fileDescriptors:o,options:s,startTime:a,verboseInfo:i})=>{sA(o);let n=new woe;Boe(n,o),Object.assign(n,{readable:Foe,writable:Voe,duplex:Goe});let c=ta({error:t,command:e,escapedCommand:r,fileDescriptors:o,options:s,startTime:a,isSync:!1}),u=qoe(c,i,s);return{subprocess:n,promise:u}},Boe=(t,e)=>{let r=Su(),o=Su(),s=Su(),a=Array.from({length:e.length-3},Su),i=Su(),n=[r,o,s,...a];Object.assign(t,{stdin:r,stdout:o,stderr:s,all:i,stdio:n})},Su=()=>{let t=new Loe;return t.end(),t},Foe=()=>new Doe({read(){}}),Voe=()=>new Uoe({write(){}}),Goe=()=>new koe({read(){},write(){}}),qoe=async(t,e,r)=>ra(t,e,r);import{createReadStream as MU,createWriteStream as IU}from"node:fs";import{Buffer as joe}from"node:buffer";import{Readable as Tu,Writable as Hoe,Duplex as zoe}from"node:stream";var wU=(t,e)=>Vp($oe,t,e,!1),yu=({type:t,optionName:e})=>{throw new TypeError(`The \`${e}\` option cannot be ${Bi[t]}.`)},xU={fileNumber:yu,generator:pA,asyncGenerator:pA,nodeStream:({value:t})=>({stream:t}),webTransform({value:{transform:t,writableObjectMode:e,readableObjectMode:r}}){let o=e||r;return{stream:zoe.fromWeb(t,{objectMode:o})}},duplex:({value:{transform:t}})=>({stream:t}),native(){}},$oe={input:{...xU,fileUrl:({value:t})=>({stream:MU(t)}),filePath:({value:{file:t}})=>({stream:MU(t)}),webStream:({value:t})=>({stream:Tu.fromWeb(t)}),iterable:({value:t})=>({stream:Tu.from(t)}),asyncIterable:({value:t})=>({stream:Tu.from(t)}),string:({value:t})=>({stream:Tu.from(t)}),uint8Array:({value:t})=>({stream:Tu.from(joe.from(t))})},output:{...xU,fileUrl:({value:t})=>({stream:IU(t)}),filePath:({value:{file:t,append:e}})=>({stream:IU(t,e?{flags:"a"}:{})}),webStream:({value:t})=>({stream:Hoe.fromWeb(t)}),iterable:yu,asyncIterable:yu,string:yu,uint8Array:yu}};import{on as Yoe,once as LU}from"node:events";import{PassThrough as Woe,getDefaultHighWaterMark as Koe}from"node:stream";import{finished as kU}from"node:stream/promises";function xo(t){if(!Array.isArray(t))throw new TypeError(`Expected an array, got \`${typeof t}\`.`);for(let s of t)EA(s);let e=t.some(({readableObjectMode:s})=>s),r=Xoe(t,e),o=new gA({objectMode:e,writableHighWaterMark:r,readableHighWaterMark:r});for(let s of t)o.add(s);return o}var Xoe=(t,e)=>{if(t.length===0)return Koe(e);let r=t.filter(({readableObjectMode:o})=>o===e).map(({readableHighWaterMark:o})=>o);return Math.max(...r)},gA=class extends Woe{#t=new Set([]);#r=new Set([]);#e=new Set([]);#n;#o=Symbol("unpipe");#i=new WeakMap;add(e){if(EA(e),this.#t.has(e))return;this.#t.add(e),this.#n??=Joe(this,this.#t,this.#o);let r=ese({passThroughStream:this,stream:e,streams:this.#t,ended:this.#r,aborted:this.#e,onFinished:this.#n,unpipeEvent:this.#o});this.#i.set(e,r),e.pipe(this,{end:!1})}async remove(e){if(EA(e),!this.#t.has(e))return!1;let r=this.#i.get(e);return r===void 0?!1:(this.#i.delete(e),e.unpipe(this),await r,!0)}},Joe=async(t,e,r)=>{Yp(t,DU);let o=new AbortController;try{await Promise.race([Qoe(t,o),Zoe(t,e,r,o)])}finally{o.abort(),Yp(t,-DU)}},Qoe=async(t,{signal:e})=>{try{await kU(t,{signal:e,cleanup:!0})}catch(r){throw BU(t,r),r}},Zoe=async(t,e,r,{signal:o})=>{for await(let[s]of Yoe(t,"unpipe",{signal:o}))e.has(s)&&s.emit(r)},EA=t=>{if(typeof t?.pipe!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof t}\`.`)},ese=async({passThroughStream:t,stream:e,streams:r,ended:o,aborted:s,onFinished:a,unpipeEvent:i})=>{Yp(t,UU);let n=new AbortController;try{await Promise.race([tse(a,e,n),rse({passThroughStream:t,stream:e,streams:r,ended:o,aborted:s,controller:n}),nse({stream:e,streams:r,ended:o,aborted:s,unpipeEvent:i,controller:n})])}finally{n.abort(),Yp(t,-UU)}r.size>0&&r.size===o.size+s.size&&(o.size===0&&s.size>0?SA(t):ise(t))},tse=async(t,e,{signal:r})=>{try{await t,r.aborted||SA(e)}catch(o){r.aborted||BU(e,o)}},rse=async({passThroughStream:t,stream:e,streams:r,ended:o,aborted:s,controller:{signal:a}})=>{try{await kU(e,{signal:a,cleanup:!0,readable:!0,writable:!1}),r.has(e)&&o.add(e)}catch(i){if(a.aborted||!r.has(e))return;FU(i)?s.add(e):VU(t,i)}},nse=async({stream:t,streams:e,ended:r,aborted:o,unpipeEvent:s,controller:{signal:a}})=>{if(await LU(t,s,{signal:a}),!t.readable)return LU(a,"abort",{signal:a});e.delete(t),r.delete(t),o.delete(t)},ise=t=>{t.writable&&t.end()},BU=(t,e)=>{FU(e)?SA(t):VU(t,e)},FU=t=>t?.code==="ERR_STREAM_PREMATURE_CLOSE",SA=t=>{(t.readable||t.writable)&&t.destroy()},VU=(t,e)=>{t.destroyed||(t.once("error",ose),t.destroy(e))},ose=()=>{},Yp=(t,e)=>{let r=t.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&t.setMaxListeners(r+e)},DU=2,UU=1;import{finished as GU}from"node:stream/promises";var ia=(t,e)=>{t.pipe(e),sse(t,e),ase(t,e)},sse=async(t,e)=>{if(!(kr(t)||kr(e))){try{await GU(t,{cleanup:!0,readable:!0,writable:!1})}catch{}TA(e)}},TA=t=>{t.writable&&t.end()},ase=async(t,e)=>{if(!(kr(t)||kr(e))){try{await GU(e,{cleanup:!0,readable:!1,writable:!0})}catch{}yA(t)}},yA=t=>{t.readable&&t.destroy()};var qU=(t,e,r)=>{let o=new Map;for(let[s,{stdioItems:a,direction:i}]of Object.entries(e)){for(let{stream:n}of a.filter(({type:c})=>_r.has(c)))cse(t,n,i,s);for(let{stream:n}of a.filter(({type:c})=>!_r.has(c)))lse({subprocess:t,stream:n,direction:i,fdNumber:s,pipeGroups:o,controller:r})}for(let[s,a]of o.entries()){let i=a.length===1?a[0]:xo(a);ia(i,s)}},cse=(t,e,r,o)=>{r==="output"?ia(t.stdio[o],e):ia(e,t.stdio[o]);let s=use[o];s!==void 0&&(t[s]=e),t.stdio[o]=e},use=["stdin","stdout","stderr"],lse=({subprocess:t,stream:e,direction:r,fdNumber:o,pipeGroups:s,controller:a})=>{if(e===void 0)return;dse(e,a);let[i,n]=r==="output"?[e,t.stdio[o]]:[t.stdio[o],e],c=s.get(i)??[];s.set(i,[...c,n])},dse=(t,{signal:e})=>{kr(t)&&No(t,pse,e)},pse=2;import{addAbortListener as mse}from"node:events";var wo=[];wo.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&wo.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&wo.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Wp=t=>!!t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function",vA=Symbol.for("signal-exit emitter"),AA=globalThis,fse=Object.defineProperty.bind(Object),OA=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(AA[vA])return AA[vA];fse(AA,vA,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,r){this.listeners[e].push(r)}removeListener(e,r){let o=this.listeners[e],s=o.indexOf(r);s!==-1&&(s===0&&o.length===1?o.length=0:o.splice(s,1))}emit(e,r,o){if(this.emitted[e])return!1;this.emitted[e]=!0;let s=!1;for(let a of this.listeners[e])s=a(r,o)===!0||s;return e==="exit"&&(s=this.emit("afterExit",r,o)||s),s}},Kp=class{},hse=t=>({onExit(e,r){return t.onExit(e,r)},load(){return t.load()},unload(){return t.unload()}}),bA=class extends Kp{onExit(){return()=>{}}load(){}unload(){}},RA=class extends Kp{#t=PA.platform==="win32"?"SIGINT":"SIGHUP";#r=new OA;#e;#n;#o;#i={};#s=!1;constructor(e){super(),this.#e=e,this.#i={};for(let r of wo)this.#i[r]=()=>{let o=this.#e.listeners(r),{count:s}=this.#r,a=e;if(typeof a.__signal_exit_emitter__=="object"&&typeof a.__signal_exit_emitter__.count=="number"&&(s+=a.__signal_exit_emitter__.count),o.length===s){this.unload();let i=this.#r.emit("exit",null,r),n=r==="SIGHUP"?this.#t:r;i||e.kill(e.pid,n)}};this.#o=e.reallyExit,this.#n=e.emit}onExit(e,r){if(!Wp(this.#e))return()=>{};this.#s===!1&&this.load();let o=r?.alwaysLast?"afterExit":"exit";return this.#r.on(o,e),()=>{this.#r.removeListener(o,e),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#s){this.#s=!0,this.#r.count+=1;for(let e of wo)try{let r=this.#i[e];r&&this.#e.on(e,r)}catch{}this.#e.emit=(e,...r)=>this.#c(e,...r),this.#e.reallyExit=e=>this.#a(e)}}unload(){this.#s&&(this.#s=!1,wo.forEach(e=>{let r=this.#i[e];if(!r)throw new Error("Listener not defined for signal: "+e);try{this.#e.removeListener(e,r)}catch{}}),this.#e.emit=this.#n,this.#e.reallyExit=this.#o,this.#r.count-=1)}#a(e){return Wp(this.#e)?(this.#e.exitCode=e||0,this.#r.emit("exit",this.#e.exitCode,null),this.#o.call(this.#e,this.#e.exitCode)):0}#c(e,...r){let o=this.#n;if(e==="exit"&&Wp(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let s=o.call(this.#e,e,...r);return this.#r.emit("exit",this.#e.exitCode,null),s}else return o.call(this.#e,e,...r)}},PA=globalThis.process,{onExit:jU,load:i6e,unload:o6e}=hse(Wp(PA)?new RA(PA):new bA);var HU=(t,{cleanup:e,detached:r},{signal:o})=>{if(!e||r)return;let s=jU(()=>{t.kill()});mse(o,()=>{s()})};var $U=({source:t,sourcePromise:e,boundOptions:r,createNested:o},...s)=>{let a=ip(),{destination:i,destinationStream:n,destinationError:c,from:u,unpipeSignal:l}=_se(r,o,s),{sourceStream:d,sourceError:h}=Ese(t,u),{options:g,fileDescriptors:E}=ln.get(t);return{sourcePromise:e,sourceStream:d,sourceOptions:g,sourceError:h,destination:i,destinationStream:n,destinationError:c,unpipeSignal:l,fileDescriptors:E,startTime:a}},_se=(t,e,r)=>{try{let{destination:o,pipeOptions:{from:s,to:a,unpipeSignal:i}={}}=gse(t,e,...r),n=mp(o,a);return{destination:o,destinationStream:n,from:s,unpipeSignal:i}}catch(o){return{destinationError:o}}},gse=(t,e,r,...o)=>{if(Array.isArray(r))return{destination:e(zU,t)(r,...o),pipeOptions:t};if(typeof r=="string"||r instanceof URL||_v(r)){if(Object.keys(t).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[s,a,i]=Wd(r,...o);return{destination:e(zU)(s,a,i),pipeOptions:i}}if(ln.has(r)){if(Object.keys(t).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:o[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},zU=({options:t})=>({options:{...t,stdin:"pipe",piped:!0}}),Ese=(t,e)=>{try{return{sourceStream:Qs(t,e)}}catch(r){return{sourceError:r}}};var WU=({sourceStream:t,sourceError:e,destinationStream:r,destinationError:o,fileDescriptors:s,sourceOptions:a,startTime:i})=>{let n=Sse({sourceStream:t,sourceError:e,destinationStream:r,destinationError:o});if(n!==void 0)throw CA({error:n,fileDescriptors:s,sourceOptions:a,startTime:i})},Sse=({sourceStream:t,sourceError:e,destinationStream:r,destinationError:o})=>{if(e!==void 0&&o!==void 0)return o;if(o!==void 0)return yA(t),o;if(e!==void 0)return TA(r),e},CA=({error:t,fileDescriptors:e,sourceOptions:r,startTime:o})=>ta({error:t,command:YU,escapedCommand:YU,fileDescriptors:e,options:r,startTime:o,isSync:!1}),YU="source.pipe(destination)";var KU=async t=>{let[{status:e,reason:r,value:o=r},{status:s,reason:a,value:i=a}]=await t;if(i.pipedFrom.includes(o)||i.pipedFrom.push(o),s==="rejected")throw i;if(e==="rejected")throw o;return i};import{finished as Tse}from"node:stream/promises";var XU=(t,e,r)=>{let o=Xp.has(e)?vse(t,e):yse(t,e);return No(t,Ose,r.signal),No(e,bse,r.signal),Ase(e),o},yse=(t,e)=>{let r=xo([t]);return ia(r,e),Xp.set(e,r),r},vse=(t,e)=>{let r=Xp.get(e);return r.add(t),r},Ase=async t=>{try{await Tse(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Xp.delete(t)},Xp=new WeakMap,Ose=2,bse=1;import{aborted as Rse}from"node:util";var JU=(t,e)=>t===void 0?[]:[Pse(t,e)],Pse=async(t,{sourceStream:e,mergedStream:r,fileDescriptors:o,sourceOptions:s,startTime:a})=>{await Rse(t,e),await r.remove(e);let i=new Error("Pipe canceled by `unpipeSignal` option.");throw CA({error:i,fileDescriptors:o,sourceOptions:s,startTime:a})};var Jp=(t,...e)=>{if(Ue(e[0]))return Jp.bind(void 0,{...t,boundOptions:{...t.boundOptions,...e[0]}});let{destination:r,...o}=$U(t,...e),s=Cse({...o,destination:r});return s.pipe=Jp.bind(void 0,{...t,source:r,sourcePromise:s,boundOptions:{}}),s},Cse=async({sourcePromise:t,sourceStream:e,sourceOptions:r,sourceError:o,destination:s,destinationStream:a,destinationError:i,unpipeSignal:n,fileDescriptors:c,startTime:u})=>{let l=Nse(t,s);WU({sourceStream:e,sourceError:o,destinationStream:a,destinationError:i,fileDescriptors:c,sourceOptions:r,startTime:u});let d=new AbortController;try{let h=XU(e,a,d);return await Promise.race([KU(l),...JU(n,{sourceStream:e,mergedStream:h,sourceOptions:r,fileDescriptors:c,startTime:u})])}finally{d.abort()}},Nse=(t,e)=>Promise.allSettled([t,e]);import{setImmediate as Use}from"node:timers/promises";import{on as Mse}from"node:events";import{getDefaultHighWaterMark as Ise}from"node:stream";var Qp=({subprocessStdout:t,subprocess:e,binary:r,shouldEncode:o,encoding:s,preserveNewlines:a})=>{let i=new AbortController;return xse(e,i),ZU({stream:t,controller:i,binary:r,shouldEncode:!t.readableObjectMode&&o,encoding:s,shouldSplit:!t.readableObjectMode,preserveNewlines:a})},xse=async(t,e)=>{try{await t}catch{}finally{e.abort()}},NA=({stream:t,onStreamEnd:e,lines:r,encoding:o,stripFinalNewline:s,allMixed:a})=>{let i=new AbortController;wse(e,i,t);let n=t.readableObjectMode&&!a;return ZU({stream:t,controller:i,binary:o==="buffer",shouldEncode:!n,encoding:o,shouldSplit:!n&&r,preserveNewlines:!s})},wse=async(t,e,r)=>{try{await t}catch{r.destroy()}finally{e.abort()}},ZU=({stream:t,controller:e,binary:r,shouldEncode:o,encoding:s,shouldSplit:a,preserveNewlines:i})=>{let n=Mse(t,"data",{signal:e.signal,highWaterMark:QU,highWatermark:QU});return Lse({onStdoutChunk:n,controller:e,binary:r,shouldEncode:o,encoding:s,shouldSplit:a,preserveNewlines:i})},MA=Ise(!0),QU=MA,Lse=async function*({onStdoutChunk:t,controller:e,binary:r,shouldEncode:o,encoding:s,shouldSplit:a,preserveNewlines:i}){let n=Dse({binary:r,shouldEncode:o,encoding:s,shouldSplit:a,preserveNewlines:i});try{for await(let[c]of t)yield*Io(c,n,0)}catch(c){if(!e.signal.aborted)throw c}finally{yield*Eu(n)}},Dse=({binary:t,shouldEncode:e,encoding:r,shouldSplit:o,preserveNewlines:s})=>[qp(t,r,!e),Gp(t,s,!o,{})].filter(Boolean);var ek=async({stream:t,onStreamEnd:e,fdNumber:r,encoding:o,buffer:s,maxBuffer:a,lines:i,allMixed:n,stripFinalNewline:c,verboseInfo:u,streamInfo:l})=>{let d=kse({stream:t,onStreamEnd:e,fdNumber:r,encoding:o,allMixed:n,verboseInfo:u,streamInfo:l});if(!s){await Promise.all([Bse(t),d]);return}let h=aA(c,r),g=NA({stream:t,onStreamEnd:e,lines:i,encoding:o,stripFinalNewline:h,allMixed:n}),[E]=await Promise.all([Fse({stream:t,iterable:g,fdNumber:r,encoding:o,maxBuffer:a,lines:i}),d]);return E},kse=async({stream:t,onStreamEnd:e,fdNumber:r,encoding:o,allMixed:s,verboseInfo:a,streamInfo:{fileDescriptors:i}})=>{if(!zp({stdioItems:i[r]?.stdioItems,encoding:o,verboseInfo:a,fdNumber:r}))return;let n=NA({stream:t,onStreamEnd:e,lines:!0,encoding:o,stripFinalNewline:!0,allMixed:s});await dU(n,t,r,a)},Bse=async t=>{await Use(),t.readableFlowing===null&&t.resume()},Fse=async({stream:t,stream:{readableObjectMode:e},iterable:r,fdNumber:o,encoding:s,maxBuffer:a,lines:i})=>{try{return e||i?await Ip(r,{maxBuffer:a}):s==="buffer"?new Uint8Array(await xp(r,{maxBuffer:a})):await Lp(r,{maxBuffer:a})}catch(n){return tk(d1({error:n,stream:t,readableObjectMode:e,lines:i,encoding:s,fdNumber:o}))}},IA=async t=>{try{return await t}catch(e){return tk(e)}},tk=({bufferedData:t})=>Rw(t)?new Uint8Array(t):t;import{finished as Vse}from"node:stream/promises";var vu=async(t,e,r,{isSameDirection:o,stopOnExit:s=!1}={})=>{let a=Gse(t,r),i=new AbortController;try{await Promise.race([...s?[r.exitPromise]:[],Vse(t,{cleanup:!0,signal:i.signal})])}catch(n){a.stdinCleanedUp||Hse(n,e,r,o)}finally{i.abort()}},Gse=(t,{originalStreams:[e],subprocess:r})=>{let o={stdinCleanedUp:!1};return t===e&&qse(t,r,o),o},qse=(t,e,r)=>{let{_destroy:o}=t;t._destroy=(...s)=>{jse(e,r),o.call(t,...s)}},jse=({exitCode:t,signalCode:e},r)=>{(t!==null||e!==null)&&(r.stdinCleanedUp=!0)},Hse=(t,e,r,o)=>{if(!zse(t,e,r,o))throw t},zse=(t,e,r,o=!0)=>r.propagating?rk(t)||Zp(t):(r.propagating=!0,xA(r,e)===o?rk(t):Zp(t)),xA=({fileDescriptors:t},e)=>e!=="all"&&t[e].direction==="input",Zp=t=>t?.code==="ERR_STREAM_PREMATURE_CLOSE",rk=t=>t?.code==="EPIPE";var nk=({subprocess:t,encoding:e,buffer:r,maxBuffer:o,lines:s,stripFinalNewline:a,verboseInfo:i,streamInfo:n})=>t.stdio.map((c,u)=>wA({stream:c,fdNumber:u,encoding:e,buffer:r[u],maxBuffer:o[u],lines:s[u],allMixed:!1,stripFinalNewline:a,verboseInfo:i,streamInfo:n})),wA=async({stream:t,fdNumber:e,encoding:r,buffer:o,maxBuffer:s,lines:a,allMixed:i,stripFinalNewline:n,verboseInfo:c,streamInfo:u})=>{if(!t)return;let l=vu(t,e,u);if(xA(u,e)){await l;return}let[d]=await Promise.all([ek({stream:t,onStreamEnd:l,fdNumber:e,encoding:r,buffer:o,maxBuffer:s,lines:a,allMixed:i,stripFinalNewline:n,verboseInfo:c,streamInfo:u}),l]);return d};var ik=({stdout:t,stderr:e},{all:r})=>r&&(t||e)?xo([t,e].filter(Boolean)):void 0,ok=({subprocess:t,encoding:e,buffer:r,maxBuffer:o,lines:s,stripFinalNewline:a,verboseInfo:i,streamInfo:n})=>wA({...$se(t,r),fdNumber:"all",encoding:e,maxBuffer:o[1]+o[2],lines:s[1]||s[2],allMixed:Yse(t),stripFinalNewline:a,verboseInfo:i,streamInfo:n}),$se=({stdout:t,stderr:e,all:r},[,o,s])=>{let a=o||s;return a?o?s?{stream:r,buffer:a}:{stream:t,buffer:a}:{stream:e,buffer:a}:{stream:r,buffer:a}},Yse=({all:t,stdout:e,stderr:r})=>t&&e&&r&&e.readableObjectMode!==r.readableObjectMode;import{once as Wse}from"node:events";var sk=t=>Ys(t,"ipc"),ak=(t,e)=>{let r=np(t);cn({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:e})};var ck=async({subprocess:t,buffer:e,maxBuffer:r,ipc:o,ipcOutput:s,verboseInfo:a})=>{if(!o)return s;let i=sk(a),n=di(e,"ipc"),c=di(r,"ipc");for await(let u of _A({anyProcess:t,channel:t.channel,isSubprocess:!1,ipc:o,shouldAwait:!1,reference:!0}))n&&(p1(t,s,c),s.push(u)),i&&ak(u,a);return s},uk=async(t,e)=>(await Promise.allSettled([t]),e);var lk=async({subprocess:t,options:{encoding:e,buffer:r,maxBuffer:o,lines:s,timeoutDuration:a,cancelSignal:i,gracefulCancel:n,forceKillAfterDelay:c,stripFinalNewline:u,ipc:l,ipcInput:d},context:h,verboseInfo:g,fileDescriptors:E,originalStreams:S,onInternalError:v,controller:O})=>{let x=_U(t,h),H={originalStreams:S,fileDescriptors:E,subprocess:t,exitPromise:x,propagating:!1},A=nk({subprocess:t,encoding:e,buffer:r,maxBuffer:o,lines:s,stripFinalNewline:u,verboseInfo:g,streamInfo:H}),$=ok({subprocess:t,encoding:e,buffer:r,maxBuffer:o,lines:s,stripFinalNewline:u,verboseInfo:g,streamInfo:H}),z=[],Q=ck({subprocess:t,buffer:r,maxBuffer:o,ipc:l,ipcOutput:z,verboseInfo:g}),oe=Kse(S,t,H),te=Xse(E,H);try{return await Promise.race([Promise.all([{},EU(x),Promise.all(A),$,Q,jD(t,d),...oe,...te]),v,Jse(t,O),...BD(t,a,h,O),...oD({subprocess:t,cancelSignal:i,gracefulCancel:n,context:h,controller:O}),...UD({subprocess:t,cancelSignal:i,gracefulCancel:n,forceKillAfterDelay:c,context:h,controller:O})])}catch(Z){return h.terminationReason??="other",Promise.all([{error:Z},x,Promise.all(A.map(P=>IA(P))),IA($),uk(Q,z),Promise.allSettled(oe),Promise.allSettled(te)])}},Kse=(t,e,r)=>t.map((o,s)=>o===e.stdio[s]?void 0:vu(o,s,r)),Xse=(t,e)=>t.flatMap(({stdioItems:r},o)=>r.filter(({value:s,stream:a=s})=>Vr(a,{checkOpen:!1})&&!kr(a)).map(({type:s,value:a,stream:i=a})=>vu(i,o,e,{isSameDirection:_r.has(s),stopOnExit:s==="native"}))),Jse=async(t,{signal:e})=>{let[r]=await Wse(t,"error",{signal:e});throw r};var dk=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),Au=(t,e,r)=>{let o=t[r];o.has(e)||o.set(e,[]);let s=o.get(e),a=un();return s.push(a),{resolve:a.resolve.bind(a),promises:s}},oa=async({resolve:t,promises:e},r)=>{t();let[o]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...e])]);return!o};import{Readable as Qse}from"node:stream";import{callbackify as Zse}from"node:util";import{finished as pk}from"node:stream/promises";var LA=async t=>{if(t!==void 0)try{await DA(t)}catch{}},fk=async t=>{if(t!==void 0)try{await UA(t)}catch{}},DA=async t=>{await pk(t,{cleanup:!0,readable:!1,writable:!0})},UA=async t=>{await pk(t,{cleanup:!0,readable:!0,writable:!1})},ef=async(t,e)=>{if(await t,e)throw e},tf=(t,e,r)=>{r&&!Zp(r)?t.destroy(r):e&&t.destroy()};var hk=({subprocess:t,concurrentStreams:e,encoding:r},{from:o,binary:s=!0,preserveNewlines:a=!0}={})=>{let i=s||ir.has(r),{subprocessStdout:n,waitReadableDestroy:c}=kA(t,o,e),{readableEncoding:u,readableObjectMode:l,readableHighWaterMark:d}=BA(n,i),{read:h,onStdoutDataDone:g}=FA({subprocessStdout:n,subprocess:t,binary:i,encoding:r,preserveNewlines:a}),E=new Qse({read:h,destroy:Zse(GA.bind(void 0,{subprocessStdout:n,subprocess:t,waitReadableDestroy:c})),highWaterMark:d,objectMode:l,encoding:u});return VA({subprocessStdout:n,onStdoutDataDone:g,readable:E,subprocess:t}),E},kA=(t,e,r)=>{let o=Qs(t,e),s=Au(r,o,"readableDestroy");return{subprocessStdout:o,waitReadableDestroy:s}},BA=({readableEncoding:t,readableObjectMode:e,readableHighWaterMark:r},o)=>o?{readableEncoding:t,readableObjectMode:e,readableHighWaterMark:r}:{readableEncoding:t,readableObjectMode:!0,readableHighWaterMark:MA},FA=({subprocessStdout:t,subprocess:e,binary:r,encoding:o,preserveNewlines:s})=>{let a=un(),i=Qp({subprocessStdout:t,subprocess:e,binary:r,shouldEncode:!r,encoding:o,preserveNewlines:s});return{read(){eae(this,i,a)},onStdoutDataDone:a}},eae=async(t,e,r)=>{try{let{value:o,done:s}=await e.next();s?r.resolve():t.push(o)}catch{}},VA=async({subprocessStdout:t,onStdoutDataDone:e,readable:r,subprocess:o,subprocessStdin:s})=>{try{await UA(t),await o,await LA(s),await e,r.readable&&r.push(null)}catch(a){await LA(s),mk(r,a)}},GA=async({subprocessStdout:t,subprocess:e,waitReadableDestroy:r},o)=>{await oa(r,e)&&(mk(t,o),await ef(e,o))},mk=(t,e)=>{tf(t,t.readable,e)};import{Writable as tae}from"node:stream";import{callbackify as _k}from"node:util";var gk=({subprocess:t,concurrentStreams:e},{to:r}={})=>{let{subprocessStdin:o,waitWritableFinal:s,waitWritableDestroy:a}=qA(t,r,e),i=new tae({...jA(o,t,s),destroy:_k(zA.bind(void 0,{subprocessStdin:o,subprocess:t,waitWritableFinal:s,waitWritableDestroy:a})),highWaterMark:o.writableHighWaterMark,objectMode:o.writableObjectMode});return HA(o,i),i},qA=(t,e,r)=>{let o=mp(t,e),s=Au(r,o,"writableFinal"),a=Au(r,o,"writableDestroy");return{subprocessStdin:o,waitWritableFinal:s,waitWritableDestroy:a}},jA=(t,e,r)=>({write:rae.bind(void 0,t),final:_k(nae.bind(void 0,t,e,r))}),rae=(t,e,r,o)=>{t.write(e,r)?o():t.once("drain",o)},nae=async(t,e,r)=>{await oa(r,e)&&(t.writable&&t.end(),await e)},HA=async(t,e,r)=>{try{await DA(t),e.writable&&e.end()}catch(o){await fk(r),Ek(e,o)}},zA=async({subprocessStdin:t,subprocess:e,waitWritableFinal:r,waitWritableDestroy:o},s)=>{await oa(r,e),await oa(o,e)&&(Ek(t,s),await ef(e,s))},Ek=(t,e)=>{tf(t,t.writable,e)};import{Duplex as iae}from"node:stream";import{callbackify as oae}from"node:util";var Sk=({subprocess:t,concurrentStreams:e,encoding:r},{from:o,to:s,binary:a=!0,preserveNewlines:i=!0}={})=>{let n=a||ir.has(r),{subprocessStdout:c,waitReadableDestroy:u}=kA(t,o,e),{subprocessStdin:l,waitWritableFinal:d,waitWritableDestroy:h}=qA(t,s,e),{readableEncoding:g,readableObjectMode:E,readableHighWaterMark:S}=BA(c,n),{read:v,onStdoutDataDone:O}=FA({subprocessStdout:c,subprocess:t,binary:n,encoding:r,preserveNewlines:i}),x=new iae({read:v,...jA(l,t,d),destroy:oae(sae.bind(void 0,{subprocessStdout:c,subprocessStdin:l,subprocess:t,waitReadableDestroy:u,waitWritableFinal:d,waitWritableDestroy:h})),readableHighWaterMark:S,writableHighWaterMark:l.writableHighWaterMark,readableObjectMode:E,writableObjectMode:l.writableObjectMode,encoding:g});return VA({subprocessStdout:c,onStdoutDataDone:O,readable:x,subprocess:t,subprocessStdin:l}),HA(l,x,c),x},sae=async({subprocessStdout:t,subprocessStdin:e,subprocess:r,waitReadableDestroy:o,waitWritableFinal:s,waitWritableDestroy:a},i)=>{await Promise.all([GA({subprocessStdout:t,subprocess:r,waitReadableDestroy:o},i),zA({subprocessStdin:e,subprocess:r,waitWritableFinal:s,waitWritableDestroy:a},i)])};var $A=(t,e,{from:r,binary:o=!1,preserveNewlines:s=!1}={})=>{let a=o||ir.has(e),i=Qs(t,r),n=Qp({subprocessStdout:i,subprocess:t,binary:a,shouldEncode:!0,encoding:e,preserveNewlines:s});return aae(n,i,t)},aae=async function*(t,e,r){try{yield*t}finally{e.readable&&e.destroy(),await r}};var Tk=(t,{encoding:e})=>{let r=dk();t.readable=hk.bind(void 0,{subprocess:t,concurrentStreams:r,encoding:e}),t.writable=gk.bind(void 0,{subprocess:t,concurrentStreams:r}),t.duplex=Sk.bind(void 0,{subprocess:t,concurrentStreams:r,encoding:e}),t.iterable=$A.bind(void 0,t,e),t[Symbol.asyncIterator]=$A.bind(void 0,t,e,{})};var yk=(t,e)=>{for(let[r,o]of uae){let s=o.value.bind(e);Reflect.defineProperty(t,r,{...o,value:s})}},cae=(async()=>{})().constructor.prototype,uae=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(cae,t)]);var vk=(t,e,r,o)=>{let{file:s,commandArguments:a,command:i,escapedCommand:n,startTime:c,verboseInfo:u,options:l,fileDescriptors:d}=pae(t,e,r),{subprocess:h,promise:g}=hae({file:s,commandArguments:a,options:l,startTime:c,verboseInfo:u,command:i,escapedCommand:n,fileDescriptors:d});return h.pipe=Jp.bind(void 0,{source:h,sourcePromise:g,boundOptions:{},createNested:o}),yk(h,g),ln.set(h,{options:l,fileDescriptors:d}),h},pae=(t,e,r)=>{let{command:o,escapedCommand:s,startTime:a,verboseInfo:i}=op(t,e,r),{file:n,commandArguments:c,options:u}=Rp(t,e,r),l=fae(u),d=wU(l,i);return{file:n,commandArguments:c,command:o,escapedCommand:s,startTime:a,verboseInfo:i,options:l,fileDescriptors:d}},fae=({timeout:t,signal:e,...r})=>{if(e!==void 0)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...r,timeoutDuration:t}},hae=({file:t,commandArguments:e,options:r,startTime:o,verboseInfo:s,command:a,escapedCommand:i,fileDescriptors:n})=>{let c;try{c=dae(...Pp(t,e,r))}catch(E){return NU({error:E,command:a,escapedCommand:i,fileDescriptors:n,options:r,startTime:o,verboseInfo:s})}let u=new AbortController;lae(Number.POSITIVE_INFINITY,u.signal);let l=[...c.stdio];qU(c,n,u),HU(c,r,u);let d={},h=un();c.kill=nD.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:h,context:d,controller:u}),c.all=ik(c,r),Tk(c,r),RU(c,r);let g=mae({subprocess:c,options:r,startTime:o,verboseInfo:s,fileDescriptors:n,originalStreams:l,command:a,escapedCommand:i,context:d,onInternalError:h,controller:u});return{subprocess:c,promise:g}},mae=async({subprocess:t,options:e,startTime:r,verboseInfo:o,fileDescriptors:s,originalStreams:a,command:i,escapedCommand:n,context:c,onInternalError:u,controller:l})=>{let[d,[h,g],E,S,v]=await lk({subprocess:t,options:e,context:c,verboseInfo:o,fileDescriptors:s,originalStreams:a,onInternalError:u,controller:l});l.abort(),u.resolve();let O=E.map((A,$)=>fi(A,e,$)),x=fi(S,e,"all"),H=_ae({errorInfo:d,exitCode:h,signal:g,stdio:O,all:x,ipcOutput:v,context:c,options:e,command:i,escapedCommand:n,startTime:r});return ra(H,o,e)},_ae=({errorInfo:t,exitCode:e,signal:r,stdio:o,all:s,ipcOutput:a,context:i,options:n,command:c,escapedCommand:u,startTime:l})=>"error"in t?_u({error:t.error,command:c,escapedCommand:u,timedOut:i.terminationReason==="timeout",isCanceled:i.terminationReason==="cancel"||i.terminationReason==="gracefulCancel",isGracefullyCanceled:i.terminationReason==="gracefulCancel",isMaxBuffer:t.error instanceof dn,isForcefullyTerminated:i.isForcefullyTerminated,exitCode:e,signal:r,stdio:o,all:s,ipcOutput:a,options:n,startTime:l,isSync:!1}):Up({command:c,escapedCommand:u,stdio:o,all:s,ipcOutput:a,options:n,startTime:l});var rf=(t,e)=>{let r=Object.fromEntries(Object.entries(e).map(([o,s])=>[o,gae(o,t[o],s)]));return{...t,...r}},gae=(t,e,r)=>Eae.has(t)&&Ue(e)&&Ue(r)?{...e,...r}:r,Eae=new Set(["env",...vv]);var Fi=(t,e,r,o)=>{let s=(i,n,c)=>Fi(i,n,r,c),a=(...i)=>Sae({mapArguments:t,deepOptions:r,boundOptions:e,setBoundExeca:o,createNested:s},...i);return o!==void 0&&o(a,s,e),a},Sae=({mapArguments:t,deepOptions:e={},boundOptions:r={},setBoundExeca:o,createNested:s},a,...i)=>{if(Ue(a))return s(t,rf(r,a),o);let{file:n,commandArguments:c,options:u,isSync:l}=Tae({mapArguments:t,firstArgument:a,nextArguments:i,deepOptions:e,boundOptions:r});return l?TU(n,c,u):vk(n,c,u,s)},Tae=({mapArguments:t,firstArgument:e,nextArguments:r,deepOptions:o,boundOptions:s})=>{let a=xw(e)?ww(e,r):[e,...r],[i,n,c]=Wd(...a),u=rf(rf(o,s),c),{file:l=i,commandArguments:d=n,options:h=u,isSync:g=!1}=t({file:i,commandArguments:n,options:u});return{file:l,commandArguments:d,options:h,isSync:g}};var Ak=({file:t,commandArguments:e})=>bk(t,e),Ok=({file:t,commandArguments:e})=>({...bk(t,e),isSync:!0}),bk=(t,e)=>{if(e.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${t} ${e}.`);let[r,...o]=yae(t);return{file:r,commandArguments:o}},yae=t=>{if(typeof t!="string")throw new TypeError(`The command must be a string: ${String(t)}.`);let e=t.trim();if(e==="")return[];let r=[];for(let o of e.split(vae)){let s=r.at(-1);s&&s.endsWith("\\")?r[r.length-1]=`${s.slice(0,-1)} ${o}`:r.push(o)}return r},vae=/ +/g;var Rk=(t,e,r)=>{t.sync=e(Aae,r),t.s=t.sync},Pk=({options:t})=>Ck(t),Aae=({options:t})=>({...Ck(t),isSync:!0}),Ck=t=>({options:{...Oae(t),...t}}),Oae=({input:t,inputFile:e,stdio:r})=>t===void 0&&e===void 0&&r===void 0?{stdin:"inherit"}:{},Nk={preferLocal:!0};var Mk=Fi(()=>({})),W8e=Fi(()=>({isSync:!0})),K8e=Fi(Ak),X8e=Fi(Ok),J8e=Fi(VD),Q8e=Fi(Pk,{},Nk,Rk),{sendMessage:Z8e,getOneMessage:eXe,getEachMessage:tXe,getCancelSignal:rXe}=PU();R();var FZ=he(rQ(),1),VZ=he(fx(),1),GZ=he(Ei(),1),hv=he(DZ(),1);vt();var UZ=he(Ei(),1);function $2e(t,e){return new Promise((r,o)=>{let s=setTimeout(()=>{o(new Error(`Operation timed out after ${e} ms`))},e);t.then(r).catch(o).finally(()=>clearTimeout(s))})}var fv=class extends UZ.PeriodicExportingMetricReader{_alignSeconds=[0,20,40];_intervalSeconds=20;constructor(e){if(super({...e,exportIntervalMillis:e.exportIntervalMillis??2e4}),(e.exportIntervalMillis??2e4)!==2e4)throw new Error("Aligned reader only supports 20-second intervals for 0/20/40 alignment")}onInitialized(){let e=new Date,r=e.getSeconds(),o=e.getMilliseconds(),s=this._alignSeconds.find(n=>n>=r),a;s!==void 0?a=(s-r)*1e3-o:(a=(60-r)*1e3-o,s=0),a=Math.max(0,a);let i=setTimeout(()=>{this._alignedExport(),this._interval=setInterval(()=>{this._alignedExport()},this._intervalSeconds*1e3);let n=this._interval;typeof n!="number"&&n?.unref&&n.unref()},a);typeof i!="number"&&i?.unref&&i.unref()}async _alignedExport(){let e=this._exportTimeout;try{await $2e(this._doCollectAndExport(),e)}catch{}}async _doCollectAndExport(){let e=this._exportTimeout,{resourceMetrics:r,errors:o}=await this.collect({timeoutMillis:e});if(o.length>0,r.resource.asyncAttributesPending)try{await r.resource.waitForAsyncAttributes?.()}catch{}if(r.scopeMetrics.length===0)return;await this._exporter.export(r)}async onShutdown(){let e=this._interval;e&&clearInterval(e),await super.onShutdown()}};var W2e="iflow_cli.proc.end.count",K2e="iflow_cli.proc.start.count",X2e=process.env.NODE_OPTIONS?.includes("--inspect"),J2e=Y2e.resolve(__dirname,"iflow.js"),qZ=[J2e,...process.argv.slice(2)];X2e&&qZ.unshift("--inspect=9230");var jZ=Mk(process.argv[0],qZ,{stdio:["inherit","inherit","inherit","ipc"],env:process.env}),Ur=null,kZ=null,Aw=null,Hd;async function BZ(){if(Hd)try{await Hd.shutdown()}catch{}process.exit(0)}async function HZ(t,e){if(Ur)try{if(t.add(1,{...JSON.parse(Ur.commonAttributes||"{}"),...e}),Hd)try{let r=ua.getMeterProvider();if("forceFlush"in r)for(let o=0;o<3;o++)try{await r.forceFlush();break}catch{o<2&&await new Promise(a=>setTimeout(a,1e3))}await new Promise(o=>setTimeout(o,1e3))}catch{}}catch{}}jZ.on("message",t=>{if(Ur={otelEndpointUrl:t.OTEL_ENDPOINT_URL,otelServiceName:t.OTEL_SERVICE_NAME,otelServiceVersion:t.OTEL_SERVICE_VERSION,sessionId:t.SESSION_ID,pid:t.PID,version:t.VERSION,commonAttributes:t.COMMON_ATTRIBUTES,checkInterval:2e4},!!Ur){try{if(Ur.otelEndpointUrl&&Ur.otelServiceName){let e=(0,hv.defaultResource)().merge((0,hv.resourceFromAttributes)({[CO]:Ur.otelServiceName,[NO]:Ur.otelServiceVersion,"session.id":Ur.sessionId})),r=[];r.push(new fv({exporter:new VZ.OTLPMetricExporter({url:`${Ur.otelEndpointUrl}/v1/metrics`,temporalityPreference:GZ.AggregationTemporality.DELTA}),exportIntervalMillis:Ur.checkInterval})),Hd=new FZ.NodeSDK({resource:e,metricReaders:r}),Hd.start();let o=ua.getMeter(Ur.otelServiceName);kZ=o.createCounter(K2e,{description:"Number of CLI process start"}),Aw=o.createCounter(W2e,{description:"Number of CLI process end"})}}catch{}HZ(kZ,{})}});jZ.on("exit",(t,e)=>{if(Aw){HZ(Aw,{code:t===null?"unknown":String(t),signal:e||"unknown"}).finally(BZ);return}BZ()});
|
|
94
|
+
/*! Bundled license information:
|
|
95
|
+
|
|
96
|
+
@grpc/proto-loader/build/src/util.js:
|
|
97
|
+
@grpc/proto-loader/build/src/index.js:
|
|
98
|
+
(**
|
|
99
|
+
* @license
|
|
100
|
+
* Copyright 2018 gRPC authors.
|
|
101
|
+
*
|
|
102
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
103
|
+
* you may not use this file except in compliance with the License.
|
|
104
|
+
* You may obtain a copy of the License at
|
|
105
|
+
*
|
|
106
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
107
|
+
*
|
|
108
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
109
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
110
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
111
|
+
* See the License for the specific language governing permissions and
|
|
112
|
+
* limitations under the License.
|
|
113
|
+
*
|
|
114
|
+
*)
|
|
115
|
+
|
|
116
|
+
long/umd/index.js:
|
|
117
|
+
(**
|
|
118
|
+
* @license
|
|
119
|
+
* Copyright 2009 The Closure Library Authors
|
|
120
|
+
* Copyright 2020 Daniel Wirtz / The long.js Authors.
|
|
121
|
+
*
|
|
122
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
123
|
+
* you may not use this file except in compliance with the License.
|
|
124
|
+
* You may obtain a copy of the License at
|
|
125
|
+
*
|
|
126
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
127
|
+
*
|
|
128
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
129
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
130
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
131
|
+
* See the License for the specific language governing permissions and
|
|
132
|
+
* limitations under the License.
|
|
133
|
+
*
|
|
134
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
135
|
+
*)
|
|
136
|
+
*/
|