@nexload-sdk/logger 1.0.2 → 1.0.4

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/dist/index.mjs CHANGED
@@ -1,29 +1,29 @@
1
- // @nexload-sdk/logger v1.0.0 (build 2025-10-30T11:06:26.538Z)
2
- var Mo=Object.create;var qr=Object.defineProperty;var qo=Object.getOwnPropertyDescriptor;var $o=Object.getOwnPropertyNames;var Ro=Object.getPrototypeOf,Io=Object.prototype.hasOwnProperty;var B=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ko=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $o(t))!Io.call(e,i)&&i!==r&&qr(e,i,{get:()=>t[i],enumerable:!(n=qo(t,i))||n.enumerable});return e};var $r=(e,t,r)=>(r=e!=null?Mo(Ro(e)):{},ko(t||!e||!e.__esModule?qr(r,"default",{value:e,enumerable:!0}):r,e));var ot=v((pg,Ur)=>{"use strict";var de=e=>e&&typeof e.message=="string",st=e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let r=e.cause();return de(r)?r:void 0}else return de(t)?t:void 0},zr=(e,t)=>{if(!de(e))return"";let r=e.stack||"";if(t.has(e))return r+`
1
+ // @nexload-sdk/logger v1.0.2 (build 2025-11-01T12:34:11.400Z)
2
+ var No=Object.create;var qr=Object.defineProperty;var Mo=Object.getOwnPropertyDescriptor;var qo=Object.getOwnPropertyNames;var $o=Object.getPrototypeOf,Ro=Object.prototype.hasOwnProperty;var D=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Io=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of qo(t))!Ro.call(e,i)&&i!==r&&qr(e,i,{get:()=>t[i],enumerable:!(n=Mo(t,i))||n.enumerable});return e};var $r=(e,t,r)=>(r=e!=null?No($o(e)):{},Io(t||!e||!e.__esModule?qr(r,"default",{value:e,enumerable:!0}):r,e));var ot=v((hg,Vr)=>{"use strict";var de=e=>e&&typeof e.message=="string",st=e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let r=e.cause();return de(r)?r:void 0}else return de(t)?t:void 0},Kr=(e,t)=>{if(!de(e))return"";let r=e.stack||"";if(t.has(e))return r+`
3
3
  causes have become circular...`;let n=st(e);return n?(t.add(e),r+`
4
- caused by: `+zr(n,t)):r},Zo=e=>zr(e,new Set),Vr=(e,t,r)=>{if(!de(e))return"";let n=r?"":e.message||"";if(t.has(e))return n+": ...";let i=st(e);if(i){t.add(e);let s=typeof e.cause=="function";return n+(s?"":": ")+Vr(i,t,s)}else return n},Qo=e=>Vr(e,new Set);Ur.exports={isErrorLike:de,getErrorCause:st,stackWithCauses:Zo,messageWithCauses:Qo}});var ut=v((mg,Hr)=>{"use strict";var eu=Symbol("circular-ref-tag"),ve=Symbol("pino-raw-err-ref"),Gr=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[ve]},set:function(e){this[ve]=e}}});Object.defineProperty(Gr,ve,{writable:!0,value:{}});Hr.exports={pinoErrProto:Gr,pinoErrorSymbols:{seen:eu,rawSymbol:ve}}});var Xr=v((bg,Yr)=>{"use strict";Yr.exports=ct;var{messageWithCauses:tu,stackWithCauses:ru,isErrorLike:Jr}=ot(),{pinoErrProto:nu,pinoErrorSymbols:iu}=ut(),{seen:ft}=iu,{toString:su}=Object.prototype;function ct(e){if(!Jr(e))return e;e[ft]=void 0;let t=Object.create(nu);t.type=su.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=tu(e),t.stack=ru(e),Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>ct(r)));for(let r in e)if(t[r]===void 0){let n=e[r];Jr(n)?r!=="cause"&&!Object.prototype.hasOwnProperty.call(n,ft)&&(t[r]=ct(n)):t[r]=n}return delete e[ft],t.raw=e,t}});var Qr=v((wg,Zr)=>{"use strict";Zr.exports=_e;var{isErrorLike:lt}=ot(),{pinoErrProto:ou,pinoErrorSymbols:uu}=ut(),{seen:Oe}=uu,{toString:fu}=Object.prototype;function _e(e){if(!lt(e))return e;e[Oe]=void 0;let t=Object.create(ou);t.type=fu.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack,Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>_e(r))),lt(e.cause)&&!Object.prototype.hasOwnProperty.call(e.cause,Oe)&&(t.cause=_e(e.cause));for(let r in e)if(t[r]===void 0){let n=e[r];lt(n)?Object.prototype.hasOwnProperty.call(n,Oe)||(t[r]=_e(n)):t[r]=n}return delete e[Oe],t.raw=e,t}});var nn=v((Sg,rn)=>{"use strict";rn.exports={mapHttpRequest:cu,reqSerializer:tn};var at=Symbol("pino-raw-req-ref"),en=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[at]},set:function(e){this[at]=e}}});Object.defineProperty(en,at,{writable:!0,value:{}});function tn(e){let t=e.info||e.socket,r=Object.create(en);if(r.id=typeof e.id=="function"?e.id():e.id||(e.info?e.info.id:void 0),r.method=e.method,e.originalUrl)r.url=e.originalUrl;else{let n=e.path;r.url=typeof n=="string"?n:e.url?e.url.path||e.url:void 0}return e.query&&(r.query=e.query),e.params&&(r.params=e.params),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function cu(e){return{req:tn(e)}}});var fn=v((Eg,un)=>{"use strict";un.exports={mapHttpResponse:lu,resSerializer:on};var dt=Symbol("pino-raw-res-ref"),sn=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[dt]},set:function(e){this[dt]=e}}});Object.defineProperty(sn,dt,{writable:!0,value:{}});function on(e){let t=Object.create(sn);return t.statusCode=e.headersSent?e.statusCode:null,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function lu(e){return{res:on(e)}}});var yt=v((vg,cn)=>{"use strict";var ht=Xr(),au=Qr(),Le=nn(),xe=fn();cn.exports={err:ht,errWithCause:au,mapHttpRequest:Le.mapHttpRequest,mapHttpResponse:xe.mapHttpResponse,req:Le.reqSerializer,res:xe.resSerializer,wrapErrorSerializer:function(t){return t===ht?t:function(n){return t(ht(n))}},wrapRequestSerializer:function(t){return t===Le.reqSerializer?t:function(n){return t(Le.reqSerializer(n))}},wrapResponseSerializer:function(t){return t===xe.resSerializer?t:function(n){return t(xe.resSerializer(n))}}}});var gt=v((Og,ln)=>{"use strict";function du(e,t){return t}ln.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=du;let r=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(r))return;let n=r.slice(2),i=[];for(let s of n)s&&i.push(s.getFileName());return i}});var pn=v((_g,gn)=>{"use strict";function pt(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){let t=[];for(let r=0;r<e.length;r++)t[r]=pt(e[r]);return t}if(typeof e=="object"){let t=Object.create(Object.getPrototypeOf(e));for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=pt(e[r]));return t}return e}function an(e){let t=[],r="",n=!1,i=!1,s="";for(let o=0;o<e.length;o++){let u=e[o];!n&&u==="."?r&&(t.push(r),r=""):u==="["?(r&&(t.push(r),r=""),n=!0):u==="]"&&n?(t.push(r),r="",n=!1,i=!1):(u==='"'||u==="'")&&n?i?u===s?(i=!1,s=""):r+=u:(i=!0,s=u):r+=u}return r&&t.push(r),t}function dn(e,t,r){let n=e;for(let s=0;s<t.length-1;s++){let o=t[s];if(typeof n!="object"||n===null||!(o in n)||typeof n[o]!="object"||n[o]===null)return!1;n=n[o]}let i=t[t.length-1];if(i==="*"){if(Array.isArray(n))for(let s=0;s<n.length;s++)n[s]=r;else if(typeof n=="object"&&n!==null)for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&(n[s]=r)}else typeof n=="object"&&n!==null&&i in n&&Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=r);return!0}function hn(e,t){let r=e;for(let i=0;i<t.length-1;i++){let s=t[i];if(typeof r!="object"||r===null||!(s in r)||typeof r[s]!="object"||r[s]===null)return!1;r=r[s]}let n=t[t.length-1];if(n==="*"){if(Array.isArray(r))for(let i=0;i<r.length;i++)r[i]=void 0;else if(typeof r=="object"&&r!==null)for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&delete r[i]}else typeof r=="object"&&r!==null&&n in r&&Object.prototype.hasOwnProperty.call(r,n)&&delete r[n];return!0}var Ce=Symbol("PATH_NOT_FOUND");function hu(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object"||r===null||!(n in r))return Ce;r=r[n]}return r}function yu(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object"||r===null)return;r=r[n]}return r}function gu(e,t,r,n=!1){for(let i of t){let s=an(i);if(s.includes("*"))yn(e,s,r,i,n);else if(n)hn(e,s);else{let o=hu(e,s);if(o===Ce)continue;let u=typeof r=="function"?r(o,s):r;dn(e,s,u)}}}function yn(e,t,r,n,i=!1){let s=t.indexOf("*");if(s===t.length-1){let o=t.slice(0,-1),u=e;for(let f of o){if(u==null||typeof u!="object"||u===null)return;u=u[f]}if(Array.isArray(u))if(i)for(let f=0;f<u.length;f++)u[f]=void 0;else for(let f=0;f<u.length;f++){let c=[...o,f.toString()],d=typeof r=="function"?r(u[f],c):r;u[f]=d}else if(typeof u=="object"&&u!==null)if(i){let f=[];for(let c in u)Object.prototype.hasOwnProperty.call(u,c)&&f.push(c);for(let c of f)delete u[c]}else for(let f in u){let c=[...o,f],d=typeof r=="function"?r(u[f],c):r;u[f]=d}}else pu(e,t,r,s,n,i)}function pu(e,t,r,n,i,s=!1){let o=t.slice(0,n),u=t.slice(n+1),f=[];function c(d,l){if(l===o.length){if(Array.isArray(d))for(let y=0;y<d.length;y++)f[l]=y.toString(),c(d[y],l+1);else if(typeof d=="object"&&d!==null)for(let y in d)f[l]=y,c(d[y],l+1)}else if(l<o.length){let y=o[l];d&&typeof d=="object"&&d!==null&&y in d&&(f[l]=y,c(d[y],l+1))}else if(u.includes("*"))yn(d,u,typeof r=="function"?(h,a)=>{let m=[...f.slice(0,l),...a];return r(h,m)}:r,i,s);else if(s)hn(d,u);else{let y=typeof r=="function"?r(yu(d,u),[...f.slice(0,l),...u]):r;dn(d,u,y)}}if(o.length===0)c(e,0);else{let d=e;for(let l=0;l<o.length;l++){let y=o[l];if(d==null||typeof d!="object"||d===null)return;d=d[y],f[l]=y}d!=null&&c(d,o.length)}}function mu(e){if(e.length===0)return null;let t=new Map;for(let r of e){let n=an(r),i=t;for(let s=0;s<n.length;s++){let o=n[s];i.has(o)||i.set(o,new Map),i=i.get(o)}}return t}function bu(e,t){if(!t)return e;function r(n,i,s=0){if(!i||i.size===0||n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(Array.isArray(n)){let u=[];for(let f=0;f<n.length;f++){let c=f.toString();i.has(c)||i.has("*")?u[f]=r(n[f],i.get(c)||i.get("*")):u[f]=n[f]}return u}let o=Object.create(Object.getPrototypeOf(n));for(let u in n)Object.prototype.hasOwnProperty.call(n,u)&&(i.has(u)||i.has("*")?o[u]=r(n[u],i.get(u)||i.get("*")):o[u]=n[u]);return o}return r(e,t)}function wu(e){if(typeof e!="string")throw new Error("Paths must be (non-empty) strings");if(e==="")throw new Error("Invalid redaction path ()");if(e.includes(".."))throw new Error(`Invalid redaction path (${e})`);if(e.includes(","))throw new Error(`Invalid redaction path (${e})`);let t=0,r=!1,n="";for(let i=0;i<e.length;i++){let s=e[i];if((s==='"'||s==="'")&&t>0)r?s===n&&(r=!1,n=""):(r=!0,n=s);else if(s==="["&&!r)t++;else if(s==="]"&&!r&&(t--,t<0))throw new Error(`Invalid redaction path (${e})`)}if(t!==0)throw new Error(`Invalid redaction path (${e})`)}function Su(e){if(!Array.isArray(e))throw new TypeError("paths must be an array");for(let t of e)wu(t)}function Eu(e={}){let{paths:t=[],censor:r="[REDACTED]",serialize:n=JSON.stringify,strict:i=!0,remove:s=!1}=e;Su(t);let o=mu(t);return function(f){if(i&&(f===null||typeof f!="object")&&(f==null||typeof f!="object"))return n?n(f):f;let c=bu(f,o),d=f,l=r;return typeof r=="function"&&(l=r),gu(c,t,l,s),n===!1?(c.restore=function(){return pt(d)},c):typeof n=="function"?n(c):JSON.stringify(c)}}gn.exports=Eu});var ie=v((Lg,mn)=>{"use strict";var vu=Symbol("pino.setLevel"),Ou=Symbol("pino.getLevel"),_u=Symbol("pino.levelVal"),Lu=Symbol("pino.levelComp"),xu=Symbol("pino.useLevelLabels"),Cu=Symbol("pino.useOnlyCustomLevels"),Tu=Symbol("pino.mixin"),Au=Symbol("pino.lsCache"),ju=Symbol("pino.chindings"),Pu=Symbol("pino.asJson"),Nu=Symbol("pino.write"),Bu=Symbol("pino.redactFmt"),Du=Symbol("pino.time"),Mu=Symbol("pino.timeSliceIndex"),qu=Symbol("pino.stream"),$u=Symbol("pino.stringify"),Ru=Symbol("pino.stringifySafe"),Iu=Symbol("pino.stringifiers"),ku=Symbol("pino.end"),Fu=Symbol("pino.formatOpts"),Wu=Symbol("pino.messageKey"),Ku=Symbol("pino.errorKey"),zu=Symbol("pino.nestedKey"),Vu=Symbol("pino.nestedKeyStr"),Uu=Symbol("pino.mixinMergeStrategy"),Gu=Symbol("pino.msgPrefix"),Hu=Symbol("pino.wildcardFirst"),Ju=Symbol.for("pino.serializers"),Yu=Symbol.for("pino.formatters"),Xu=Symbol.for("pino.hooks"),Zu=Symbol.for("pino.metadata");mn.exports={setLevelSym:vu,getLevelSym:Ou,levelValSym:_u,levelCompSym:Lu,useLevelLabelsSym:xu,mixinSym:Tu,lsCacheSym:Au,chindingsSym:ju,asJsonSym:Pu,writeSym:Nu,serializersSym:Ju,redactFmtSym:Bu,timeSym:Du,timeSliceIndexSym:Mu,streamSym:qu,stringifySym:$u,stringifySafeSym:Ru,stringifiersSym:Iu,endSym:ku,formatOptsSym:Fu,messageKeySym:Wu,errorKeySym:Ku,nestedKeySym:zu,wildcardFirstSym:Hu,needsMetadataGsym:Zu,useOnlyCustomLevelsSym:Cu,formattersSym:Yu,hooksSym:Xu,nestedKeyStrSym:Vu,mixinMergeStrategySym:Uu,msgPrefixSym:Gu}});var bt=v((xg,En)=>{"use strict";var bn=pn(),{redactFmtSym:Qu,wildcardFirstSym:Te}=ie(),mt=/[^.[\]]+|\[([^[\]]*?)\]/g,wn="[Redacted]",Sn=!1;function ef(e,t){let{paths:r,censor:n,remove:i}=tf(e),s=r.reduce((f,c)=>{mt.lastIndex=0;let d=mt.exec(c),l=mt.exec(c),y=d[1]!==void 0?d[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):d[0];if(y==="*"&&(y=Te),l===null)return f[y]=null,f;if(f[y]===null)return f;let{index:h}=l,a=`${c.substr(h,c.length-1)}`;return f[y]=f[y]||[],y!==Te&&f[y].length===0&&f[y].push(...f[Te]||[]),y===Te&&Object.keys(f).forEach(function(m){f[m]&&f[m].push(a)}),f[y].push(a),f},{}),o={[Qu]:bn({paths:r,censor:n,serialize:t,strict:Sn,remove:i})},u=(...f)=>t(typeof n=="function"?n(...f):n);return[...Object.keys(s),...Object.getOwnPropertySymbols(s)].reduce((f,c)=>{if(s[c]===null)f[c]=d=>u(d,[c]);else{let d=typeof n=="function"?(l,y)=>n(l,[c,...y]):n;f[c]=bn({paths:s[c],censor:d,serialize:t,strict:Sn,remove:i})}return f},o)}function tf(e){if(Array.isArray(e))return e={paths:e,censor:wn},e;let{paths:t,censor:r=wn,remove:n}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return n===!0&&(r=void 0),{paths:t,censor:r,remove:n}}En.exports=ef});var _n=v((Cg,On)=>{"use strict";var rf=()=>"",nf=()=>`,"time":${Date.now()}`,sf=()=>`,"time":${Math.round(Date.now()/1e3)}`,of=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,uf=1000000n,vn=1000000000n,ff=BigInt(Date.now())*uf,cf=process.hrtime.bigint(),lf=()=>{let e=process.hrtime.bigint()-cf,t=ff+e,r=t/vn,n=t%vn,i=Number(r*1000n+n/1000000n),s=new Date(i),o=s.getUTCFullYear(),u=(s.getUTCMonth()+1).toString().padStart(2,"0"),f=s.getUTCDate().toString().padStart(2,"0"),c=s.getUTCHours().toString().padStart(2,"0"),d=s.getUTCMinutes().toString().padStart(2,"0"),l=s.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${o}-${u}-${f}T${c}:${d}:${l}.${n.toString().padStart(9,"0")}Z"`};On.exports={nullTime:rf,epochTime:nf,unixTime:sf,isoTime:of,isoTimeNano:lf}});var xn=v((Tg,Ln)=>{"use strict";function af(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}Ln.exports=df;function df(e,t,r){var n=r&&r.stringify||af,i=1;if(typeof e=="object"&&e!==null){var s=t.length+i;if(s===1)return e;var o=new Array(s);o[0]=n(e);for(var u=1;u<s;u++)o[u]=n(t[u]);return o.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var c="",d=1-i,l=-1,y=e&&e.length||0,h=0;h<y;){if(e.charCodeAt(h)===37&&h+1<y){switch(l=l>-1?l:0,e.charCodeAt(h+1)){case 100:case 102:if(d>=f||t[d]==null)break;l<h&&(c+=e.slice(l,h)),c+=Number(t[d]),l=h+2,h++;break;case 105:if(d>=f||t[d]==null)break;l<h&&(c+=e.slice(l,h)),c+=Math.floor(Number(t[d])),l=h+2,h++;break;case 79:case 111:case 106:if(d>=f||t[d]===void 0)break;l<h&&(c+=e.slice(l,h));var a=typeof t[d];if(a==="string"){c+="'"+t[d]+"'",l=h+2,h++;break}if(a==="function"){c+=t[d].name||"<anonymous>",l=h+2,h++;break}c+=n(t[d]),l=h+2,h++;break;case 115:if(d>=f)break;l<h&&(c+=e.slice(l,h)),c+=String(t[d]),l=h+2,h++;break;case 37:l<h&&(c+=e.slice(l,h)),c+="%",l=h+2,h++,d--;break}++d}++h}return l===-1?e:(l<y&&(c+=e.slice(l)),c)}});var St=v((Ag,wt)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(e,0,0,Number(r))},e=new Int32Array(new SharedArrayBuffer(4));wt.exports=t}else{let e=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let n=Date.now()+Number(t);for(;n>Date.now(););};wt.exports=e}});var Ot=v((jg,Bn)=>{"use strict";var M=B("fs"),hf=B("events"),yf=B("util").inherits,Cn=B("path"),vt=St(),gf=B("assert"),Ae=100,je=Buffer.allocUnsafe(0),pf=16*1024,Tn="buffer",An="utf8",[mf,bf]=(process.versions.node||"0.0").split(".").map(Number),wf=mf>=22&&bf>=7;function jn(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(s,o){if(s){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",s)}):t.emit("error",s);return}let u=t._reopening;t.fd=o,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t.destroyed&&(!t._writing&&t._len>t.minLength||t._flushPending?t._actualWrite():u&&process.nextTick(()=>t.emit("drain")))}let n=t.append?"a":"w",i=t.mode;if(t.sync)try{t.mkdir&&M.mkdirSync(Cn.dirname(e),{recursive:!0});let s=M.openSync(e,n,i);r(null,s)}catch(s){throw r(s),s}else t.mkdir?M.mkdir(Cn.dirname(e),{recursive:!0},s=>{if(s)return r(s);M.open(e,n,i,r)}):M.open(e,n,i,r)}function k(e){if(!(this instanceof k))return new k(e);let{fd:t,dest:r,minLength:n,maxLength:i,maxWrite:s,periodicFlush:o,sync:u,append:f=!0,mkdir:c,retryEAGAIN:d,fsync:l,contentMode:y,mode:h}=e||{};t=t||r,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(n||0,16387),this.file=null,this.destroyed=!1,this.minLength=n||0,this.maxLength=i||0,this.maxWrite=s||pf,this._periodicFlush=o||0,this._periodicFlushTimer=void 0,this.sync=u||!1,this.writable=!0,this._fsync=l||!1,this.append=f||!1,this.mode=h,this.retryEAGAIN=d||(()=>!0),this.mkdir=c||!1;let a,m;if(y===Tn)this._writingBuf=je,this.write=vf,this.flush=_f,this.flushSync=xf,this._actualWrite=Tf,a=()=>M.writeSync(this.fd,this._writingBuf),m=()=>M.write(this.fd,this._writingBuf,this.release);else if(y===void 0||y===An)this._writingBuf="",this.write=Ef,this.flush=Of,this.flushSync=Lf,this._actualWrite=Cf,a=()=>M.writeSync(this.fd,this._writingBuf,"utf8"),m=()=>M.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${An}" and "${Tn}", but passed ${y}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")jn(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(p,b)=>{if(p){if((p.code==="EAGAIN"||p.code==="EBUSY")&&this.retryEAGAIN(p,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{vt(Ae),this.release(void 0,0)}catch(O){this.release(O)}else setTimeout(m,Ae);else this._writing=!1,this.emit("error",p);return}this.emit("write",b);let w=Et(this._writingBuf,this._len,b);if(this._len=w.len,this._writingBuf=w.writingBuf,this._writingBuf.length){if(!this.sync){m();return}try{do{let O=a(),x=Et(this._writingBuf,this._len,O);this._len=x.len,this._writingBuf=x.writingBuf}while(this._writingBuf.length)}catch(O){this.release(O);return}}this._fsync&&M.fsyncSync(this.fd);let S=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):S>this.minLength?this._actualWrite():this._ending?S>0?this._actualWrite():(this._writing=!1,Pe(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(Sf,this)):this.emit("drain"))},this.on("newListener",function(p){p==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function Et(e,t,r){return typeof e=="string"&&Buffer.byteLength(e)!==r&&(r=Buffer.from(e).subarray(0,r).toString().length),t=Math.max(t-r,0),e=e.slice(r),{writingBuf:e,len:t}}function Sf(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}yf(k,hf);function Pn(e,t){return e.length===0?je:e.length===1?e[0]:Buffer.concat(e,t)}function Ef(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||r[r.length-1].length+e.length>this.maxWrite?r.push(""+e):r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function vf(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs,n=this._lens;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||n[n.length-1]+e.length>this.maxWrite?(r.push([e]),n.push(e.length)):(r[r.length-1].push(e),n[n.length-1]+=e.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function Nn(e){this._flushPending=!0;let t=()=>{if(this._fsync)this._flushPending=!1,e();else try{M.fsync(this.fd,n=>{this._flushPending=!1,e(n)})}catch(n){e(n)}this.off("error",r)},r=n=>{this._flushPending=!1,e(n),this.off("drain",t)};this.once("drain",t),this.once("error",r)}function Of(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Nn.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function _f(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Nn.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}k.prototype.reopen=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(e)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(e&&(this.file=e),this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&M.close(t,r=>{if(r)return this.emit("error",r)})}),jn(this.file,this)};k.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():Pe(this)))};function Lf(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let e="";for(;this._bufs.length||e;){e.length<=0&&(e=this._bufs[0]);try{let t=M.writeSync(this.fd,e,"utf8"),r=Et(e,this._len,t);e=r.writingBuf,this._len=r.len,e.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;vt(Ae)}}try{M.fsyncSync(this.fd)}catch{}}function xf(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=je);let e=je;for(;this._bufs.length||e.length;){e.length<=0&&(e=Pn(this._bufs[0],this._lens[0]));try{let t=M.writeSync(this.fd,e);e=e.subarray(t),this._len=Math.max(this._len-t,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;vt(Ae)}}}k.prototype.destroy=function(){this.destroyed||Pe(this)};function Cf(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf||this._bufs.shift()||"",this.sync)try{let t=M.writeSync(this.fd,this._writingBuf,"utf8");e(null,t)}catch(t){e(t)}else M.write(this.fd,this._writingBuf,"utf8",e)}function Tf(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Pn(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=M.writeSync(this.fd,this._writingBuf);e(null,t)}catch(t){e(t)}else wf&&(this._writingBuf=Buffer.from(this._writingBuf)),M.write(this.fd,this._writingBuf,e)}function Pe(e){if(e.fd===-1){e.once("ready",Pe.bind(null,e));return}e._periodicFlushTimer!==void 0&&clearInterval(e._periodicFlushTimer),e.destroyed=!0,e._bufs=[],e._lens=[],gf(typeof e.fd=="number",`sonic.fd must be a number, got ${typeof e.fd}`);try{M.fsync(e.fd,t)}catch{}function t(){e.fd!==1&&e.fd!==2?M.close(e.fd,r):r()}function r(n){if(n){e.emit("error",n);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}k.SonicBoom=k;k.default=k;Bn.exports=k});var Ne=v((Pg,Rn)=>{"use strict";var F={exit:[],beforeExit:[]},Dn={exit:Pf,beforeExit:Nf},se;function Af(){se===void 0&&(se=new FinalizationRegistry(Bf))}function jf(e){F[e].length>0||process.on(e,Dn[e])}function Mn(e){F[e].length>0||(process.removeListener(e,Dn[e]),F.exit.length===0&&F.beforeExit.length===0&&(se=void 0))}function Pf(){qn("exit")}function Nf(){qn("beforeExit")}function qn(e){for(let t of F[e]){let r=t.deref(),n=t.fn;r!==void 0&&n(r,e)}F[e]=[]}function Bf(e){for(let t of["exit","beforeExit"]){let r=F[t].indexOf(e);F[t].splice(r,r+1),Mn(t)}}function $n(e,t,r){if(t===void 0)throw new Error("the object can't be undefined");jf(e);let n=new WeakRef(t);n.fn=r,Af(),se.register(t,n),F[e].push(n)}function Df(e,t){$n("exit",e,t)}function Mf(e,t){$n("beforeExit",e,t)}function qf(e){if(se!==void 0){se.unregister(e);for(let t of["exit","beforeExit"])F[t]=F[t].filter(r=>{let n=r.deref();return n&&n!==e}),Mn(t)}}Rn.exports={register:Df,registerBeforeExit:Mf,unregister:qf}});var In=v((Ng,$f)=>{$f.exports={name:"thread-stream",version:"3.1.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5",desm:"^1.3.0",fastbench:"^1.0.1",husky:"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1",standard:"^17.0.0",tap:"^16.2.0","ts-node":"^10.8.0",typescript:"^5.3.2","why-is-node-running":"^2.2.2"},scripts:{build:"tsc --noEmit",test:'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts',"test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"',"test:ci:ts":'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',"test:yarn":'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},standard:{ignore:["test/ts/**/*","test/syntax-error.mjs"]},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina <hello@matteocollina.com>",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var Fn=v((Bg,kn)=>{"use strict";function Rf(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o===r){i(null,"ok");return}let u=o,f=c=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{u=o,o=Atomics.load(e,t),o===u?f(c>=1e3?1e3:c*2):o===r?i(null,"ok"):i(null,"not-equal")},c)};f(1)}function If(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o!==r){i(null,"ok");return}let u=f=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{o=Atomics.load(e,t),o!==r?i(null,"ok"):u(f>=1e3?1e3:f*2)},f)};u(1)}kn.exports={wait:Rf,waitDiff:If}});var Kn=v((Dg,Wn)=>{"use strict";Wn.exports={WRITE_INDEX:4,READ_INDEX:8}});var Hn=v((Mg,Gn)=>{"use strict";var{version:kf}=In(),{EventEmitter:Ff}=B("events"),{Worker:Wf}=B("worker_threads"),{join:Kf}=B("path"),{pathToFileURL:zf}=B("url"),{wait:Vf}=Fn(),{WRITE_INDEX:$,READ_INDEX:W}=Kn(),Uf=B("buffer"),Gf=B("assert"),g=Symbol("kImpl"),Hf=Uf.constants.MAX_STRING_LENGTH,he=class{constructor(t){this._value=t}deref(){return this._value}},De=class{register(){}unregister(){}},Jf=process.env.NODE_V8_COVERAGE?De:global.FinalizationRegistry||De,Yf=process.env.NODE_V8_COVERAGE?he:global.WeakRef||he,zn=new Jf(e=>{e.exited||e.terminate()});function Xf(e,t){let{filename:r,workerData:n}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||Kf(__dirname,"lib","worker.js"),o=new Wf(s,{...t.workerOpts,trackUnmanagedFds:!1,workerData:{filename:r.indexOf("file://")===0?r:zf(r).href,dataBuf:e[g].dataBuf,stateBuf:e[g].stateBuf,workerData:{$context:{threadStreamVersion:kf},...n}}});return o.stream=new he(e),o.on("message",Zf),o.on("exit",Un),zn.register(e,o),o}function Vn(e){Gf(!e[g].sync),e[g].needDrain&&(e[g].needDrain=!1,e.emit("drain"))}function Be(e){let t=Atomics.load(e[g].state,$),r=e[g].data.length-t;if(r>0){if(e[g].buf.length===0){e[g].flushing=!1,e[g].ending?Tt(e):e[g].needDrain&&process.nextTick(Vn,e);return}let n=e[g].buf.slice(0,r),i=Buffer.byteLength(n);i<=r?(e[g].buf=e[g].buf.slice(r),Me(e,n,Be.bind(null,e))):e.flush(()=>{if(!e.destroyed){for(Atomics.store(e[g].state,W,0),Atomics.store(e[g].state,$,0);i>e[g].data.length;)r=r/2,n=e[g].buf.slice(0,r),i=Buffer.byteLength(n);e[g].buf=e[g].buf.slice(r),Me(e,n,Be.bind(null,e))}})}else if(r===0){if(t===0&&e[g].buf.length===0)return;e.flush(()=>{Atomics.store(e[g].state,W,0),Atomics.store(e[g].state,$,0),Be(e)})}else K(e,new Error("overwritten"))}function Zf(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}switch(e.code){case"READY":this.stream=new Yf(t),t.flush(()=>{t[g].ready=!0,t.emit("ready")});break;case"ERROR":K(t,e.err);break;case"EVENT":Array.isArray(e.args)?t.emit(e.name,...e.args):t.emit(e.name,e.args);break;case"WARNING":process.emitWarning(e.err);break;default:K(t,new Error("this should not happen: "+e.code))}}function Un(e){let t=this.stream.deref();t!==void 0&&(zn.unregister(t),t.worker.exited=!0,t.worker.off("exit",Un),K(t,e!==0?new Error("the worker thread exited"):null))}var Lt=class extends Ff{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[g]={},this[g].stateBuf=new SharedArrayBuffer(128),this[g].state=new Int32Array(this[g].stateBuf),this[g].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[g].data=Buffer.from(this[g].dataBuf),this[g].sync=t.sync||!1,this[g].ending=!1,this[g].ended=!1,this[g].needDrain=!1,this[g].destroyed=!1,this[g].flushing=!1,this[g].ready=!1,this[g].finished=!1,this[g].errored=null,this[g].closed=!1,this[g].buf="",this.worker=Xf(this,t),this.on("message",(r,n)=>{this.worker.postMessage(r,n)})}write(t){if(this[g].destroyed)return xt(this,new Error("the worker has exited")),!1;if(this[g].ending)return xt(this,new Error("the worker is ending")),!1;if(this[g].flushing&&this[g].buf.length+t.length>=Hf)try{_t(this),this[g].flushing=!0}catch(r){return K(this,r),!1}if(this[g].buf+=t,this[g].sync)try{return _t(this),!0}catch(r){return K(this,r),!1}return this[g].flushing||(this[g].flushing=!0,setImmediate(Be,this)),this[g].needDrain=this[g].data.length-this[g].buf.length-Atomics.load(this[g].state,$)<=0,!this[g].needDrain}end(){this[g].destroyed||(this[g].ending=!0,Tt(this))}flush(t){if(this[g].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let r=Atomics.load(this[g].state,$);Vf(this[g].state,W,r,1/0,(n,i)=>{if(n){K(this,n),process.nextTick(t,n);return}if(i==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[g].destroyed||(_t(this),Ct(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[g].ready}get destroyed(){return this[g].destroyed}get closed(){return this[g].closed}get writable(){return!this[g].destroyed&&!this[g].ending}get writableEnded(){return this[g].ending}get writableFinished(){return this[g].finished}get writableNeedDrain(){return this[g].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[g].errored}};function xt(e,t){setImmediate(()=>{e.emit("error",t)})}function K(e,t){e[g].destroyed||(e[g].destroyed=!0,t&&(e[g].errored=t,xt(e,t)),e.worker.exited?setImmediate(()=>{e[g].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[g].closed=!0,e.emit("close")}))}function Me(e,t,r){let n=Atomics.load(e[g].state,$),i=Buffer.byteLength(t);return e[g].data.write(t,n),Atomics.store(e[g].state,$,n+i),Atomics.notify(e[g].state,$),r(),!0}function Tt(e){if(!(e[g].ended||!e[g].ending||e[g].flushing)){e[g].ended=!0;try{e.flushSync();let t=Atomics.load(e[g].state,W);Atomics.store(e[g].state,$,-1),Atomics.notify(e[g].state,$);let r=0;for(;t!==-1;){if(Atomics.wait(e[g].state,W,t,1e3),t=Atomics.load(e[g].state,W),t===-2){K(e,new Error("end() failed"));return}if(++r===10){K(e,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{e[g].finished=!0,e.emit("finish")})}catch(t){K(e,t)}}}function _t(e){let t=()=>{e[g].ending?Tt(e):e[g].needDrain&&process.nextTick(Vn,e)};for(e[g].flushing=!1;e[g].buf.length!==0;){let r=Atomics.load(e[g].state,$),n=e[g].data.length-r;if(n===0){Ct(e),Atomics.store(e[g].state,W,0),Atomics.store(e[g].state,$,0);continue}else if(n<0)throw new Error("overwritten");let i=e[g].buf.slice(0,n),s=Buffer.byteLength(i);if(s<=n)e[g].buf=e[g].buf.slice(n),Me(e,i,t);else{for(Ct(e),Atomics.store(e[g].state,W,0),Atomics.store(e[g].state,$,0);s>e[g].buf.length;)n=n/2,i=e[g].buf.slice(0,n),s=Buffer.byteLength(i);e[g].buf=e[g].buf.slice(n),Me(e,i,t)}}}function Ct(e){if(e[g].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[g].state,$),r=0;for(;;){let n=Atomics.load(e[g].state,W);if(n===-2)throw Error("_flushSync failed");if(n!==t)Atomics.wait(e[g].state,W,n,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}Gn.exports=Lt});var Pt=v((qg,Jn)=>{"use strict";var{createRequire:Qf}=B("module"),ec=gt(),{join:At,isAbsolute:tc,sep:rc}=B("node:path"),nc=St(),jt=Ne(),ic=Hn();function sc(e){jt.register(e,uc),jt.registerBeforeExit(e,fc),e.on("close",function(){jt.unregister(e)})}function oc(e,t,r,n){let i=new ic({filename:e,workerData:t,workerOpts:r,sync:n});i.on("ready",s),i.on("close",function(){process.removeListener("exit",o)}),process.on("exit",o);function s(){process.removeListener("exit",o),i.unref(),r.autoEnd!==!1&&sc(i)}function o(){i.closed||(i.flushSync(),nc(100),i.end())}return i}function uc(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function fc(e){e.flushSync()}function cc(e){let{pipeline:t,targets:r,levels:n,dedupe:i,worker:s={},caller:o=ec(),sync:u=!1}=e,f={...e.options},c=typeof o=="string"?[o]:o,d="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},l=e.target;if(l&&r)throw new Error("only one of target or targets can be specified");return r?(l=d["pino-worker"]||At(__dirname,"worker.js"),f.targets=r.filter(h=>h.target).map(h=>({...h,target:y(h.target)})),f.pipelines=r.filter(h=>h.pipeline).map(h=>h.pipeline.map(a=>({...a,level:h.level,target:y(a.target)})))):t&&(l=d["pino-worker"]||At(__dirname,"worker.js"),f.pipelines=[t.map(h=>({...h,target:y(h.target)}))]),n&&(f.levels=n),i&&(f.dedupe=i),f.pinoWillSendConfig=!0,oc(y(l),f,s,u);function y(h){if(h=d[h]||h,tc(h)||h.indexOf("file://")===0)return h;if(h==="pino/file")return At(__dirname,"..","file.js");let a;for(let m of c)try{let p=m==="node:repl"?process.cwd()+rc:m;a=Qf(p).resolve(h);break}catch{continue}if(!a)throw new Error(`unable to determine transport target for "${h}"`);return a}}Jn.exports=cc});var Re=v(($g,fi)=>{"use strict";var lc=B("node:diagnostics_channel"),Yn=xn(),{mapHttpRequest:ac,mapHttpResponse:dc}=yt(),Bt=Ot(),Xn=Ne(),{lsCacheSym:hc,chindingsSym:ri,writeSym:Zn,serializersSym:ni,formatOptsSym:Qn,endSym:yc,stringifiersSym:ii,stringifySym:si,stringifySafeSym:Dt,wildcardFirstSym:oi,nestedKeySym:gc,formattersSym:ui,messageKeySym:pc,errorKeySym:mc,nestedKeyStrSym:bc,msgPrefixSym:qe}=ie(),{isMainThread:wc}=B("worker_threads"),Sc=Pt(),ei=lc.tracingChannel("pino_asJson");function oe(){}function Ec(e,t){if(!t)return r;return function(...i){t.call(this,i,r,e)};function r(n,...i){if(typeof n=="object"){let s=n;n!==null&&(n.method&&n.headers&&n.socket?n=ac(n):typeof n.setHeader=="function"&&(n=dc(n)));let o;s===null&&i.length===0?o=[null]:(s=i.shift(),o=i),typeof this[qe]=="string"&&s!==void 0&&s!==null&&(s=this[qe]+s),this[Zn](n,Yn(s,o,this[Qn]),e)}else{let s=n===void 0?i.shift():n;typeof this[qe]=="string"&&s!==void 0&&s!==null&&(s=this[qe]+s),this[Zn](null,Yn(s,i,this[Qn]),e)}}}function Nt(e){let t="",r=0,n=!1,i=255,s=e.length;if(s>100)return JSON.stringify(e);for(var o=0;o<s&&i>=32;o++)i=e.charCodeAt(o),(i===34||i===92)&&(t+=e.slice(r,o)+"\\",r=o,n=!0);return n?t+=e.slice(r):t=e,i<32?JSON.stringify(e):'"'+t+'"'}function vc(e,t,r,n){if(ei.hasSubscribers===!1)return ti.call(this,e,t,r,n);let i={instance:this,arguments};return ei.traceSync(ti,i,this,e,t,r,n)}function ti(e,t,r,n){let i=this[si],s=this[Dt],o=this[ii],u=this[yc],f=this[ri],c=this[ni],d=this[ui],l=this[pc],y=this[mc],h=this[hc][r]+n;h=h+f;let a;d.log&&(e=d.log(e));let m=o[oi],p="";for(let w in e)if(a=e[w],Object.prototype.hasOwnProperty.call(e,w)&&a!==void 0){c[w]?a=c[w](a):w===y&&c.err&&(a=c.err(a));let S=o[w]||m;switch(typeof a){case"undefined":case"function":continue;case"number":Number.isFinite(a)===!1&&(a=null);case"boolean":S&&(a=S(a));break;case"string":a=(S||Nt)(a);break;default:a=(S||i)(a,s)}if(a===void 0)continue;let O=Nt(w);p+=","+O+":"+a}let b="";if(t!==void 0){a=c[l]?c[l](t):t;let w=o[l]||m;switch(typeof a){case"function":break;case"number":Number.isFinite(a)===!1&&(a=null);case"boolean":w&&(a=w(a)),b=',"'+l+'":'+a;break;case"string":a=(w||Nt)(a),b=',"'+l+'":'+a;break;default:a=(w||i)(a,s),b=',"'+l+'":'+a}}return this[gc]&&p?h+this[bc]+p.slice(1)+"}"+b+u:h+p+b+u}function Oc(e,t){let r,n=e[ri],i=e[si],s=e[Dt],o=e[ii],u=o[oi],f=e[ni],c=e[ui].bindings;t=c(t);for(let d in t)if(r=t[d],((d.length<5||d!=="level"&&d!=="serializers"&&d!=="formatters"&&d!=="customLevels")&&t.hasOwnProperty(d)&&r!==void 0)===!0){if(r=f[d]?f[d](r):r,r=(o[d]||u||i)(r,s),r===void 0)continue;n+=',"'+d+'":'+r}return n}function _c(e){return e.write!==e.constructor.prototype.write}function $e(e){let t=new Bt(e);return t.on("error",r),!e.sync&&wc&&(Xn.register(t,Lc),t.on("close",function(){Xn.unregister(t)})),t;function r(n){if(n.code==="EPIPE"){t.write=oe,t.end=oe,t.flushSync=oe,t.destroy=oe;return}t.removeListener("error",r),t.emit("error",n)}}function Lc(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function xc(e){return function(r,n,i={},s){if(typeof i=="string")s=$e({dest:i}),i={};else if(typeof s=="string"){if(i&&i.transport)throw Error("only one of option.transport or stream can be specified");s=$e({dest:s})}else if(i instanceof Bt||i.writable||i._writableState)s=i,i={};else if(i.transport){if(i.transport instanceof Bt||i.transport.writable||i.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(i.transport.targets&&i.transport.targets.length&&i.formatters&&typeof i.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let f;i.customLevels&&(f=i.useOnlyCustomLevels?i.customLevels:Object.assign({},i.levels,i.customLevels)),s=Sc({caller:n,...i.transport,levels:f})}if(i=Object.assign({},e,i),i.serializers=Object.assign({},e.serializers,i.serializers),i.formatters=Object.assign({},e.formatters,i.formatters),i.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:o,onChild:u}=i;return o===!1&&(i.level="silent"),u||(i.onChild=oe),s||(_c(process.stdout)?s=process.stdout:s=$e({fd:process.stdout.fd||1})),{opts:i,stream:s}}}function Cc(e,t){try{return JSON.stringify(e)}catch{try{return(t||this[Dt])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function Tc(e,t,r){return{level:e,bindings:t,log:r}}function Ac(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e===void 0?1:e}fi.exports={noop:oe,buildSafeSonicBoom:$e,asChindings:Oc,asJson:vc,genLog:Ec,createArgsNormalizer:xc,stringify:Cc,buildFormatters:Tc,normalizeDestFileDescriptor:Ac}});var Ie=v((Rg,ci)=>{var jc={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Pc={ASC:"ASC",DESC:"DESC"};ci.exports={DEFAULT_LEVELS:jc,SORTING_ORDER:Pc}});var $t=v((Ig,hi)=>{"use strict";var{lsCacheSym:Nc,levelValSym:Mt,useOnlyCustomLevelsSym:Bc,streamSym:Dc,formattersSym:Mc,hooksSym:qc,levelCompSym:li}=ie(),{noop:$c,genLog:Z}=Re(),{DEFAULT_LEVELS:z,SORTING_ORDER:ai}=Ie(),di={fatal:e=>{let t=Z(z.fatal,e);return function(...r){let n=this[Dc];if(t.call(this,...r),typeof n.flushSync=="function")try{n.flushSync()}catch{}}},error:e=>Z(z.error,e),warn:e=>Z(z.warn,e),info:e=>Z(z.info,e),debug:e=>Z(z.debug,e),trace:e=>Z(z.trace,e)},qt=Object.keys(z).reduce((e,t)=>(e[z[t]]=t,e),{}),Rc=Object.keys(qt).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function Ic(e){let t=e[Mc].level,{labels:r}=e.levels,n={};for(let i in r){let s=t(r[i],Number(i));n[i]=JSON.stringify(s).slice(0,-1)}return e[Nc]=n,e}function kc(e,t){if(t)return!1;switch(e){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function Fc(e){let{labels:t,values:r}=this.levels;if(typeof e=="number"){if(t[e]===void 0)throw Error("unknown level value"+e);e=t[e]}if(r[e]===void 0)throw Error("unknown level "+e);let n=this[Mt],i=this[Mt]=r[e],s=this[Bc],o=this[li],u=this[qc].logMethod;for(let f in r){if(o(r[f],i)===!1){this[f]=$c;continue}this[f]=kc(f,s)?di[f](u):Z(r[f],u)}this.emit("level-change",e,i,t[n],n,this)}function Wc(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function Kc(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&this[li](r,this[Mt])}function zc(e,t,r){return e===ai.DESC?t<=r:t>=r}function Vc(e){return typeof e=="string"?zc.bind(null,e):e}function Uc(e=null,t=!1){let r=e?Object.keys(e).reduce((s,o)=>(s[e[o]]=o,s),{}):null,n=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:qt,r),i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:z,e);return{labels:n,values:i}}function Gc(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),r?[]:Object.keys(qt).map(s=>+s),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:z,t);if(!(e in n))throw Error(`default level:${e} must be included in custom levels`)}function Hc(e,t){let{labels:r,values:n}=e;for(let i in t){if(i in n)throw Error("levels cannot be overridden");if(t[i]in r)throw Error("pre-existing level values cannot be used for new levels")}}function Jc(e){if(typeof e!="function"&&!(typeof e=="string"&&Object.values(ai).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}hi.exports={initialLsCache:Rc,genLsCache:Ic,levelMethods:di,getLevel:Wc,setLevel:Fc,isLevelEnabled:Kc,mappings:Uc,assertNoLevelCollisions:Hc,assertDefaultLevelFound:Gc,genLevelComparison:Vc,assertLevelComparison:Jc}});var Rt=v((kg,yi)=>{"use strict";yi.exports={version:"10.1.0"}});var vi=v((Wg,Ei)=>{"use strict";var{EventEmitter:Yc}=B("node:events"),{lsCacheSym:Xc,levelValSym:Zc,setLevelSym:kt,getLevelSym:gi,chindingsSym:Fe,mixinSym:Qc,asJsonSym:mi,writeSym:el,mixinMergeStrategySym:tl,timeSym:rl,timeSliceIndexSym:nl,streamSym:bi,serializersSym:Q,formattersSym:ye,errorKeySym:il,messageKeySym:sl,useOnlyCustomLevelsSym:ol,needsMetadataGsym:ul,redactFmtSym:fl,stringifySym:cl,formatOptsSym:ll,stringifiersSym:al,msgPrefixSym:Ft,hooksSym:dl}=ie(),{getLevel:hl,setLevel:yl,isLevelEnabled:gl,mappings:pl,initialLsCache:ml,genLsCache:bl,assertNoLevelCollisions:wl}=$t(),{asChindings:Wt,asJson:Sl,buildFormatters:It,stringify:pi,noop:wi}=Re(),{version:El}=Rt(),vl=bt(),Ol=class{},Si={constructor:Ol,child:_l,bindings:Ll,setBindings:xl,flush:Al,isLevelEnabled:gl,version:El,get level(){return this[gi]()},set level(e){this[kt](e)},get levelVal(){return this[Zc]},set levelVal(e){throw Error("levelVal is read-only")},get msgPrefix(){return this[Ft]},get[Symbol.toStringTag](){return"Pino"},[Xc]:ml,[el]:Tl,[mi]:Sl,[gi]:hl,[kt]:yl};Object.setPrototypeOf(Si,Yc.prototype);Ei.exports=function(){return Object.create(Si)};var ke=e=>e;function _l(e,t){if(!e)throw Error("missing bindings for child Pino");let r=this[Q],n=this[ye],i=Object.create(this);if(t==null)return i[ye].bindings!==ke&&(i[ye]=It(n.level,ke,n.log)),i[Fe]=Wt(i,e),this.onChild!==wi&&this.onChild(i),i;if(t.hasOwnProperty("serializers")===!0){i[Q]=Object.create(null);for(let c in r)i[Q][c]=r[c];let u=Object.getOwnPropertySymbols(r);for(var s=0;s<u.length;s++){let c=u[s];i[Q][c]=r[c]}for(let c in t.serializers)i[Q][c]=t.serializers[c];let f=Object.getOwnPropertySymbols(t.serializers);for(var o=0;o<f.length;o++){let c=f[o];i[Q][c]=t.serializers[c]}}else i[Q]=r;if(t.hasOwnProperty("formatters")){let{level:u,bindings:f,log:c}=t.formatters;i[ye]=It(u||n.level,f||ke,c||n.log)}else i[ye]=It(n.level,ke,n.log);if(t.hasOwnProperty("customLevels")===!0&&(wl(this.levels,t.customLevels),i.levels=pl(t.customLevels,i[ol]),bl(i)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){i.redact=t.redact;let u=vl(i.redact,pi),f={stringify:u[fl]};i[cl]=pi,i[al]=u,i[ll]=f}if(typeof t.msgPrefix=="string"&&(i[Ft]=(this[Ft]||"")+t.msgPrefix),i[Fe]=Wt(i,e),t.level!==void 0&&t.level!==this.level||t.hasOwnProperty("customLevels")){let u=t.level||this.level;i[kt](u)}return this.onChild(i),i}function Ll(){let t=`{${this[Fe].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function xl(e){let t=Wt(this,e);this[Fe]=t}function Cl(e,t){return Object.assign(t,e)}function Tl(e,t,r){let n=this[rl](),i=this[Qc],s=this[il],o=this[sl],u=this[tl]||Cl,f,c=this[dl].streamWrite;e==null?f={}:e instanceof Error?(f={[s]:e},t===void 0&&(t=e.message)):(f=e,t===void 0&&e[o]===void 0&&e[s]&&(t=e[s].message)),i&&(f=u(f,i(f,r,this)));let d=this[mi](f,t,r,n),l=this[bi];l[ul]===!0&&(l.lastLevel=r,l.lastObj=f,l.lastMsg=t,l.lastTime=n.slice(this[nl]),l.lastLogger=this),l.write(c?c(d):d)}function Al(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let t=this[bi];typeof t.flush=="function"?t.flush(e||wi):e&&e()}});var xi=v((Ut,Li)=>{"use strict";var{hasOwnProperty:ge}=Object.prototype,te=Vt();te.configure=Vt;te.stringify=te;te.default=te;Ut.stringify=te;Ut.configure=Vt;Li.exports=te;var jl=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function G(e){return e.length<5e3&&!jl.test(e)?`"${e}"`:JSON.stringify(e)}function Kt(e,t){if(e.length>200||t)return e.sort(t);for(let r=1;r<e.length;r++){let n=e[r],i=r;for(;i!==0&&e[i-1]>n;)e[i]=e[i-1],i--;e[i]=n}return e}var Pl=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function zt(e){return Pl.call(e)!==void 0&&e.length!==0}function Oi(e,t,r){e.length<r&&(r=e.length);let n=t===","?"":" ",i=`"0":${n}${e[0]}`;for(let s=1;s<r;s++)i+=`${t}"${s}":${n}${e[s]}`;return i}function Nl(e){if(ge.call(e,"circularValue")){let t=e.circularValue;if(typeof t=="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function Bl(e){let t;if(ge.call(e,"deterministic")&&(t=e.deterministic,typeof t!="boolean"&&typeof t!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return t===void 0?!0:t}function Dl(e,t){let r;if(ge.call(e,t)&&(r=e[t],typeof r!="boolean"))throw new TypeError(`The "${t}" argument must be of type boolean`);return r===void 0?!0:r}function _i(e,t){let r;if(ge.call(e,t)){if(r=e[t],typeof r!="number")throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}function ee(e){return e===1?"1 item":`${e} items`}function Ml(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function ql(e){if(ge.call(e,"strict")){let t=e.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return r=>{let n=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(n+=` (${r.toString()})`),new Error(n)}}}function Vt(e){e={...e};let t=ql(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Nl(e),n=Dl(e,"bigint"),i=Bl(e),s=typeof i=="function"?i:void 0,o=_i(e,"maximumDepth"),u=_i(e,"maximumBreadth");function f(h,a,m,p,b,w){let S=a[h];switch(typeof S=="object"&&S!==null&&typeof S.toJSON=="function"&&(S=S.toJSON(h)),S=p.call(a,h,S),typeof S){case"string":return G(S);case"object":{if(S===null)return"null";if(m.indexOf(S)!==-1)return r;let O="",x=",",P=w;if(Array.isArray(S)){if(S.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(S),b!==""&&(w+=b,O+=`
4
+ caused by: `+Kr(n,t)):r},Jo=e=>Kr(e,new Set),zr=(e,t,r)=>{if(!de(e))return"";let n=r?"":e.message||"";if(t.has(e))return n+": ...";let i=st(e);if(i){t.add(e);let s=typeof e.cause=="function";return n+(s?"":": ")+zr(i,t,s)}else return n},Yo=e=>zr(e,new Set);Vr.exports={isErrorLike:de,getErrorCause:st,stackWithCauses:Jo,messageWithCauses:Yo}});var ut=v((yg,Gr)=>{"use strict";var Xo=Symbol("circular-ref-tag"),ve=Symbol("pino-raw-err-ref"),Ur=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[ve]},set:function(e){this[ve]=e}}});Object.defineProperty(Ur,ve,{writable:!0,value:{}});Gr.exports={pinoErrProto:Ur,pinoErrorSymbols:{seen:Xo,rawSymbol:ve}}});var Yr=v((gg,Jr)=>{"use strict";Jr.exports=ct;var{messageWithCauses:Zo,stackWithCauses:Qo,isErrorLike:Hr}=ot(),{pinoErrProto:eu,pinoErrorSymbols:tu}=ut(),{seen:ft}=tu,{toString:ru}=Object.prototype;function ct(e){if(!Hr(e))return e;e[ft]=void 0;let t=Object.create(eu);t.type=ru.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=Zo(e),t.stack=Qo(e),Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>ct(r)));for(let r in e)if(t[r]===void 0){let n=e[r];Hr(n)?r!=="cause"&&!Object.prototype.hasOwnProperty.call(n,ft)&&(t[r]=ct(n)):t[r]=n}return delete e[ft],t.raw=e,t}});var Zr=v((pg,Xr)=>{"use strict";Xr.exports=_e;var{isErrorLike:lt}=ot(),{pinoErrProto:nu,pinoErrorSymbols:iu}=ut(),{seen:Oe}=iu,{toString:su}=Object.prototype;function _e(e){if(!lt(e))return e;e[Oe]=void 0;let t=Object.create(nu);t.type=su.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack,Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>_e(r))),lt(e.cause)&&!Object.prototype.hasOwnProperty.call(e.cause,Oe)&&(t.cause=_e(e.cause));for(let r in e)if(t[r]===void 0){let n=e[r];lt(n)?Object.prototype.hasOwnProperty.call(n,Oe)||(t[r]=_e(n)):t[r]=n}return delete e[Oe],t.raw=e,t}});var rn=v((mg,tn)=>{"use strict";tn.exports={mapHttpRequest:ou,reqSerializer:en};var at=Symbol("pino-raw-req-ref"),Qr=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[at]},set:function(e){this[at]=e}}});Object.defineProperty(Qr,at,{writable:!0,value:{}});function en(e){let t=e.info||e.socket,r=Object.create(Qr);if(r.id=typeof e.id=="function"?e.id():e.id||(e.info?e.info.id:void 0),r.method=e.method,e.originalUrl)r.url=e.originalUrl;else{let n=e.path;r.url=typeof n=="string"?n:e.url?e.url.path||e.url:void 0}return e.query&&(r.query=e.query),e.params&&(r.params=e.params),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function ou(e){return{req:en(e)}}});var un=v((bg,on)=>{"use strict";on.exports={mapHttpResponse:uu,resSerializer:sn};var dt=Symbol("pino-raw-res-ref"),nn=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[dt]},set:function(e){this[dt]=e}}});Object.defineProperty(nn,dt,{writable:!0,value:{}});function sn(e){let t=Object.create(nn);return t.statusCode=e.headersSent?e.statusCode:null,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function uu(e){return{res:sn(e)}}});var yt=v((wg,fn)=>{"use strict";var ht=Yr(),fu=Zr(),Le=rn(),xe=un();fn.exports={err:ht,errWithCause:fu,mapHttpRequest:Le.mapHttpRequest,mapHttpResponse:xe.mapHttpResponse,req:Le.reqSerializer,res:xe.resSerializer,wrapErrorSerializer:function(t){return t===ht?t:function(n){return t(ht(n))}},wrapRequestSerializer:function(t){return t===Le.reqSerializer?t:function(n){return t(Le.reqSerializer(n))}},wrapResponseSerializer:function(t){return t===xe.resSerializer?t:function(n){return t(xe.resSerializer(n))}}}});var gt=v((Sg,cn)=>{"use strict";function cu(e,t){return t}cn.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=cu;let r=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(r))return;let n=r.slice(2),i=[];for(let s of n)s&&i.push(s.getFileName());return i}});var gn=v((Eg,yn)=>{"use strict";function pt(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){let t=[];for(let r=0;r<e.length;r++)t[r]=pt(e[r]);return t}if(typeof e=="object"){let t=Object.create(Object.getPrototypeOf(e));for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=pt(e[r]));return t}return e}function ln(e){let t=[],r="",n=!1,i=!1,s="";for(let o=0;o<e.length;o++){let u=e[o];!n&&u==="."?r&&(t.push(r),r=""):u==="["?(r&&(t.push(r),r=""),n=!0):u==="]"&&n?(t.push(r),r="",n=!1,i=!1):(u==='"'||u==="'")&&n?i?u===s?(i=!1,s=""):r+=u:(i=!0,s=u):r+=u}return r&&t.push(r),t}function an(e,t,r){let n=e;for(let s=0;s<t.length-1;s++){let o=t[s];if(typeof n!="object"||n===null||!(o in n)||typeof n[o]!="object"||n[o]===null)return!1;n=n[o]}let i=t[t.length-1];if(i==="*"){if(Array.isArray(n))for(let s=0;s<n.length;s++)n[s]=r;else if(typeof n=="object"&&n!==null)for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&(n[s]=r)}else typeof n=="object"&&n!==null&&i in n&&Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=r);return!0}function dn(e,t){let r=e;for(let i=0;i<t.length-1;i++){let s=t[i];if(typeof r!="object"||r===null||!(s in r)||typeof r[s]!="object"||r[s]===null)return!1;r=r[s]}let n=t[t.length-1];if(n==="*"){if(Array.isArray(r))for(let i=0;i<r.length;i++)r[i]=void 0;else if(typeof r=="object"&&r!==null)for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&delete r[i]}else typeof r=="object"&&r!==null&&n in r&&Object.prototype.hasOwnProperty.call(r,n)&&delete r[n];return!0}var Ce=Symbol("PATH_NOT_FOUND");function lu(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object"||r===null||!(n in r))return Ce;r=r[n]}return r}function au(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object"||r===null)return;r=r[n]}return r}function du(e,t,r,n=!1){for(let i of t){let s=ln(i);if(s.includes("*"))hn(e,s,r,i,n);else if(n)dn(e,s);else{let o=lu(e,s);if(o===Ce)continue;let u=typeof r=="function"?r(o,s):r;an(e,s,u)}}}function hn(e,t,r,n,i=!1){let s=t.indexOf("*");if(s===t.length-1){let o=t.slice(0,-1),u=e;for(let f of o){if(u==null||typeof u!="object"||u===null)return;u=u[f]}if(Array.isArray(u))if(i)for(let f=0;f<u.length;f++)u[f]=void 0;else for(let f=0;f<u.length;f++){let c=[...o,f.toString()],d=typeof r=="function"?r(u[f],c):r;u[f]=d}else if(typeof u=="object"&&u!==null)if(i){let f=[];for(let c in u)Object.prototype.hasOwnProperty.call(u,c)&&f.push(c);for(let c of f)delete u[c]}else for(let f in u){let c=[...o,f],d=typeof r=="function"?r(u[f],c):r;u[f]=d}}else hu(e,t,r,s,n,i)}function hu(e,t,r,n,i,s=!1){let o=t.slice(0,n),u=t.slice(n+1),f=[];function c(d,l){if(l===o.length){if(Array.isArray(d))for(let y=0;y<d.length;y++)f[l]=y.toString(),c(d[y],l+1);else if(typeof d=="object"&&d!==null)for(let y in d)f[l]=y,c(d[y],l+1)}else if(l<o.length){let y=o[l];d&&typeof d=="object"&&d!==null&&y in d&&(f[l]=y,c(d[y],l+1))}else if(u.includes("*"))hn(d,u,typeof r=="function"?(h,a)=>{let m=[...f.slice(0,l),...a];return r(h,m)}:r,i,s);else if(s)dn(d,u);else{let y=typeof r=="function"?r(au(d,u),[...f.slice(0,l),...u]):r;an(d,u,y)}}if(o.length===0)c(e,0);else{let d=e;for(let l=0;l<o.length;l++){let y=o[l];if(d==null||typeof d!="object"||d===null)return;d=d[y],f[l]=y}d!=null&&c(d,o.length)}}function yu(e){if(e.length===0)return null;let t=new Map;for(let r of e){let n=ln(r),i=t;for(let s=0;s<n.length;s++){let o=n[s];i.has(o)||i.set(o,new Map),i=i.get(o)}}return t}function gu(e,t){if(!t)return e;function r(n,i,s=0){if(!i||i.size===0||n===null||typeof n!="object")return n;if(n instanceof Date)return new Date(n.getTime());if(Array.isArray(n)){let u=[];for(let f=0;f<n.length;f++){let c=f.toString();i.has(c)||i.has("*")?u[f]=r(n[f],i.get(c)||i.get("*")):u[f]=n[f]}return u}let o=Object.create(Object.getPrototypeOf(n));for(let u in n)Object.prototype.hasOwnProperty.call(n,u)&&(i.has(u)||i.has("*")?o[u]=r(n[u],i.get(u)||i.get("*")):o[u]=n[u]);return o}return r(e,t)}function pu(e){if(typeof e!="string")throw new Error("Paths must be (non-empty) strings");if(e==="")throw new Error("Invalid redaction path ()");if(e.includes(".."))throw new Error(`Invalid redaction path (${e})`);if(e.includes(","))throw new Error(`Invalid redaction path (${e})`);let t=0,r=!1,n="";for(let i=0;i<e.length;i++){let s=e[i];if((s==='"'||s==="'")&&t>0)r?s===n&&(r=!1,n=""):(r=!0,n=s);else if(s==="["&&!r)t++;else if(s==="]"&&!r&&(t--,t<0))throw new Error(`Invalid redaction path (${e})`)}if(t!==0)throw new Error(`Invalid redaction path (${e})`)}function mu(e){if(!Array.isArray(e))throw new TypeError("paths must be an array");for(let t of e)pu(t)}function bu(e={}){let{paths:t=[],censor:r="[REDACTED]",serialize:n=JSON.stringify,strict:i=!0,remove:s=!1}=e;mu(t);let o=yu(t);return function(f){if(i&&(f===null||typeof f!="object")&&(f==null||typeof f!="object"))return n?n(f):f;let c=gu(f,o),d=f,l=r;return typeof r=="function"&&(l=r),du(c,t,l,s),n===!1?(c.restore=function(){return pt(d)},c):typeof n=="function"?n(c):JSON.stringify(c)}}yn.exports=bu});var ie=v((vg,pn)=>{"use strict";var wu=Symbol("pino.setLevel"),Su=Symbol("pino.getLevel"),Eu=Symbol("pino.levelVal"),vu=Symbol("pino.levelComp"),Ou=Symbol("pino.useLevelLabels"),_u=Symbol("pino.useOnlyCustomLevels"),Lu=Symbol("pino.mixin"),xu=Symbol("pino.lsCache"),Cu=Symbol("pino.chindings"),Tu=Symbol("pino.asJson"),Au=Symbol("pino.write"),ju=Symbol("pino.redactFmt"),Pu=Symbol("pino.time"),Bu=Symbol("pino.timeSliceIndex"),Du=Symbol("pino.stream"),Nu=Symbol("pino.stringify"),Mu=Symbol("pino.stringifySafe"),qu=Symbol("pino.stringifiers"),$u=Symbol("pino.end"),Ru=Symbol("pino.formatOpts"),Iu=Symbol("pino.messageKey"),ku=Symbol("pino.errorKey"),Fu=Symbol("pino.nestedKey"),Wu=Symbol("pino.nestedKeyStr"),Ku=Symbol("pino.mixinMergeStrategy"),zu=Symbol("pino.msgPrefix"),Vu=Symbol("pino.wildcardFirst"),Uu=Symbol.for("pino.serializers"),Gu=Symbol.for("pino.formatters"),Hu=Symbol.for("pino.hooks"),Ju=Symbol.for("pino.metadata");pn.exports={setLevelSym:wu,getLevelSym:Su,levelValSym:Eu,levelCompSym:vu,useLevelLabelsSym:Ou,mixinSym:Lu,lsCacheSym:xu,chindingsSym:Cu,asJsonSym:Tu,writeSym:Au,serializersSym:Uu,redactFmtSym:ju,timeSym:Pu,timeSliceIndexSym:Bu,streamSym:Du,stringifySym:Nu,stringifySafeSym:Mu,stringifiersSym:qu,endSym:$u,formatOptsSym:Ru,messageKeySym:Iu,errorKeySym:ku,nestedKeySym:Fu,wildcardFirstSym:Vu,needsMetadataGsym:Ju,useOnlyCustomLevelsSym:_u,formattersSym:Gu,hooksSym:Hu,nestedKeyStrSym:Wu,mixinMergeStrategySym:Ku,msgPrefixSym:zu}});var bt=v((Og,Sn)=>{"use strict";var mn=gn(),{redactFmtSym:Yu,wildcardFirstSym:Te}=ie(),mt=/[^.[\]]+|\[([^[\]]*?)\]/g,bn="[Redacted]",wn=!1;function Xu(e,t){let{paths:r,censor:n,remove:i}=Zu(e),s=r.reduce((f,c)=>{mt.lastIndex=0;let d=mt.exec(c),l=mt.exec(c),y=d[1]!==void 0?d[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):d[0];if(y==="*"&&(y=Te),l===null)return f[y]=null,f;if(f[y]===null)return f;let{index:h}=l,a=`${c.substr(h,c.length-1)}`;return f[y]=f[y]||[],y!==Te&&f[y].length===0&&f[y].push(...f[Te]||[]),y===Te&&Object.keys(f).forEach(function(m){f[m]&&f[m].push(a)}),f[y].push(a),f},{}),o={[Yu]:mn({paths:r,censor:n,serialize:t,strict:wn,remove:i})},u=(...f)=>t(typeof n=="function"?n(...f):n);return[...Object.keys(s),...Object.getOwnPropertySymbols(s)].reduce((f,c)=>{if(s[c]===null)f[c]=d=>u(d,[c]);else{let d=typeof n=="function"?(l,y)=>n(l,[c,...y]):n;f[c]=mn({paths:s[c],censor:d,serialize:t,strict:wn,remove:i})}return f},o)}function Zu(e){if(Array.isArray(e))return e={paths:e,censor:bn},e;let{paths:t,censor:r=bn,remove:n}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return n===!0&&(r=void 0),{paths:t,censor:r,remove:n}}Sn.exports=Xu});var On=v((_g,vn)=>{"use strict";var Qu=()=>"",ef=()=>`,"time":${Date.now()}`,tf=()=>`,"time":${Math.round(Date.now()/1e3)}`,rf=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,nf=1000000n,En=1000000000n,sf=BigInt(Date.now())*nf,of=process.hrtime.bigint(),uf=()=>{let e=process.hrtime.bigint()-of,t=sf+e,r=t/En,n=t%En,i=Number(r*1000n+n/1000000n),s=new Date(i),o=s.getUTCFullYear(),u=(s.getUTCMonth()+1).toString().padStart(2,"0"),f=s.getUTCDate().toString().padStart(2,"0"),c=s.getUTCHours().toString().padStart(2,"0"),d=s.getUTCMinutes().toString().padStart(2,"0"),l=s.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${o}-${u}-${f}T${c}:${d}:${l}.${n.toString().padStart(9,"0")}Z"`};vn.exports={nullTime:Qu,epochTime:ef,unixTime:tf,isoTime:rf,isoTimeNano:uf}});var Ln=v((Lg,_n)=>{"use strict";function ff(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}_n.exports=cf;function cf(e,t,r){var n=r&&r.stringify||ff,i=1;if(typeof e=="object"&&e!==null){var s=t.length+i;if(s===1)return e;var o=new Array(s);o[0]=n(e);for(var u=1;u<s;u++)o[u]=n(t[u]);return o.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var c="",d=1-i,l=-1,y=e&&e.length||0,h=0;h<y;){if(e.charCodeAt(h)===37&&h+1<y){switch(l=l>-1?l:0,e.charCodeAt(h+1)){case 100:case 102:if(d>=f||t[d]==null)break;l<h&&(c+=e.slice(l,h)),c+=Number(t[d]),l=h+2,h++;break;case 105:if(d>=f||t[d]==null)break;l<h&&(c+=e.slice(l,h)),c+=Math.floor(Number(t[d])),l=h+2,h++;break;case 79:case 111:case 106:if(d>=f||t[d]===void 0)break;l<h&&(c+=e.slice(l,h));var a=typeof t[d];if(a==="string"){c+="'"+t[d]+"'",l=h+2,h++;break}if(a==="function"){c+=t[d].name||"<anonymous>",l=h+2,h++;break}c+=n(t[d]),l=h+2,h++;break;case 115:if(d>=f)break;l<h&&(c+=e.slice(l,h)),c+=String(t[d]),l=h+2,h++;break;case 37:l<h&&(c+=e.slice(l,h)),c+="%",l=h+2,h++,d--;break}++d}++h}return l===-1?e:(l<y&&(c+=e.slice(l)),c)}});var St=v((xg,wt)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(e,0,0,Number(r))},e=new Int32Array(new SharedArrayBuffer(4));wt.exports=t}else{let e=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let n=Date.now()+Number(t);for(;n>Date.now(););};wt.exports=e}});var Ot=v((Cg,Bn)=>{"use strict";var M=D("fs"),lf=D("events"),af=D("util").inherits,xn=D("path"),vt=St(),df=D("assert"),Ae=100,je=Buffer.allocUnsafe(0),hf=16*1024,Cn="buffer",Tn="utf8",[yf,gf]=(process.versions.node||"0.0").split(".").map(Number),pf=yf>=22&&gf>=7;function An(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(s,o){if(s){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",s)}):t.emit("error",s);return}let u=t._reopening;t.fd=o,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t.destroyed&&(!t._writing&&t._len>t.minLength||t._flushPending?t._actualWrite():u&&process.nextTick(()=>t.emit("drain")))}let n=t.append?"a":"w",i=t.mode;if(t.sync)try{t.mkdir&&M.mkdirSync(xn.dirname(e),{recursive:!0});let s=M.openSync(e,n,i);r(null,s)}catch(s){throw r(s),s}else t.mkdir?M.mkdir(xn.dirname(e),{recursive:!0},s=>{if(s)return r(s);M.open(e,n,i,r)}):M.open(e,n,i,r)}function k(e){if(!(this instanceof k))return new k(e);let{fd:t,dest:r,minLength:n,maxLength:i,maxWrite:s,periodicFlush:o,sync:u,append:f=!0,mkdir:c,retryEAGAIN:d,fsync:l,contentMode:y,mode:h}=e||{};t=t||r,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(n||0,16387),this.file=null,this.destroyed=!1,this.minLength=n||0,this.maxLength=i||0,this.maxWrite=s||hf,this._periodicFlush=o||0,this._periodicFlushTimer=void 0,this.sync=u||!1,this.writable=!0,this._fsync=l||!1,this.append=f||!1,this.mode=h,this.retryEAGAIN=d||(()=>!0),this.mkdir=c||!1;let a,m;if(y===Cn)this._writingBuf=je,this.write=wf,this.flush=Ef,this.flushSync=Of,this._actualWrite=Lf,a=()=>M.writeSync(this.fd,this._writingBuf),m=()=>M.write(this.fd,this._writingBuf,this.release);else if(y===void 0||y===Tn)this._writingBuf="",this.write=bf,this.flush=Sf,this.flushSync=vf,this._actualWrite=_f,a=()=>M.writeSync(this.fd,this._writingBuf,"utf8"),m=()=>M.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${Tn}" and "${Cn}", but passed ${y}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")An(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(p,b)=>{if(p){if((p.code==="EAGAIN"||p.code==="EBUSY")&&this.retryEAGAIN(p,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{vt(Ae),this.release(void 0,0)}catch(O){this.release(O)}else setTimeout(m,Ae);else this._writing=!1,this.emit("error",p);return}this.emit("write",b);let w=Et(this._writingBuf,this._len,b);if(this._len=w.len,this._writingBuf=w.writingBuf,this._writingBuf.length){if(!this.sync){m();return}try{do{let O=a(),x=Et(this._writingBuf,this._len,O);this._len=x.len,this._writingBuf=x.writingBuf}while(this._writingBuf.length)}catch(O){this.release(O);return}}this._fsync&&M.fsyncSync(this.fd);let S=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):S>this.minLength?this._actualWrite():this._ending?S>0?this._actualWrite():(this._writing=!1,Pe(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(mf,this)):this.emit("drain"))},this.on("newListener",function(p){p==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function Et(e,t,r){return typeof e=="string"&&Buffer.byteLength(e)!==r&&(r=Buffer.from(e).subarray(0,r).toString().length),t=Math.max(t-r,0),e=e.slice(r),{writingBuf:e,len:t}}function mf(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}af(k,lf);function jn(e,t){return e.length===0?je:e.length===1?e[0]:Buffer.concat(e,t)}function bf(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||r[r.length-1].length+e.length>this.maxWrite?r.push(""+e):r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function wf(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs,n=this._lens;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||n[n.length-1]+e.length>this.maxWrite?(r.push([e]),n.push(e.length)):(r[r.length-1].push(e),n[n.length-1]+=e.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function Pn(e){this._flushPending=!0;let t=()=>{if(this._fsync)this._flushPending=!1,e();else try{M.fsync(this.fd,n=>{this._flushPending=!1,e(n)})}catch(n){e(n)}this.off("error",r)},r=n=>{this._flushPending=!1,e(n),this.off("drain",t)};this.once("drain",t),this.once("error",r)}function Sf(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Pn.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function Ef(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Pn.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}k.prototype.reopen=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(e)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(e&&(this.file=e),this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&M.close(t,r=>{if(r)return this.emit("error",r)})}),An(this.file,this)};k.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():Pe(this)))};function vf(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let e="";for(;this._bufs.length||e;){e.length<=0&&(e=this._bufs[0]);try{let t=M.writeSync(this.fd,e,"utf8"),r=Et(e,this._len,t);e=r.writingBuf,this._len=r.len,e.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;vt(Ae)}}try{M.fsyncSync(this.fd)}catch{}}function Of(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=je);let e=je;for(;this._bufs.length||e.length;){e.length<=0&&(e=jn(this._bufs[0],this._lens[0]));try{let t=M.writeSync(this.fd,e);e=e.subarray(t),this._len=Math.max(this._len-t,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;vt(Ae)}}}k.prototype.destroy=function(){this.destroyed||Pe(this)};function _f(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf||this._bufs.shift()||"",this.sync)try{let t=M.writeSync(this.fd,this._writingBuf,"utf8");e(null,t)}catch(t){e(t)}else M.write(this.fd,this._writingBuf,"utf8",e)}function Lf(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:jn(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=M.writeSync(this.fd,this._writingBuf);e(null,t)}catch(t){e(t)}else pf&&(this._writingBuf=Buffer.from(this._writingBuf)),M.write(this.fd,this._writingBuf,e)}function Pe(e){if(e.fd===-1){e.once("ready",Pe.bind(null,e));return}e._periodicFlushTimer!==void 0&&clearInterval(e._periodicFlushTimer),e.destroyed=!0,e._bufs=[],e._lens=[],df(typeof e.fd=="number",`sonic.fd must be a number, got ${typeof e.fd}`);try{M.fsync(e.fd,t)}catch{}function t(){e.fd!==1&&e.fd!==2?M.close(e.fd,r):r()}function r(n){if(n){e.emit("error",n);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}k.SonicBoom=k;k.default=k;Bn.exports=k});var Be=v((Tg,$n)=>{"use strict";var F={exit:[],beforeExit:[]},Dn={exit:Tf,beforeExit:Af},se;function xf(){se===void 0&&(se=new FinalizationRegistry(jf))}function Cf(e){F[e].length>0||process.on(e,Dn[e])}function Nn(e){F[e].length>0||(process.removeListener(e,Dn[e]),F.exit.length===0&&F.beforeExit.length===0&&(se=void 0))}function Tf(){Mn("exit")}function Af(){Mn("beforeExit")}function Mn(e){for(let t of F[e]){let r=t.deref(),n=t.fn;r!==void 0&&n(r,e)}F[e]=[]}function jf(e){for(let t of["exit","beforeExit"]){let r=F[t].indexOf(e);F[t].splice(r,r+1),Nn(t)}}function qn(e,t,r){if(t===void 0)throw new Error("the object can't be undefined");Cf(e);let n=new WeakRef(t);n.fn=r,xf(),se.register(t,n),F[e].push(n)}function Pf(e,t){qn("exit",e,t)}function Bf(e,t){qn("beforeExit",e,t)}function Df(e){if(se!==void 0){se.unregister(e);for(let t of["exit","beforeExit"])F[t]=F[t].filter(r=>{let n=r.deref();return n&&n!==e}),Nn(t)}}$n.exports={register:Pf,registerBeforeExit:Bf,unregister:Df}});var Rn=v((Ag,Nf)=>{Nf.exports={name:"thread-stream",version:"3.1.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5",desm:"^1.3.0",fastbench:"^1.0.1",husky:"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1",standard:"^17.0.0",tap:"^16.2.0","ts-node":"^10.8.0",typescript:"^5.3.2","why-is-node-running":"^2.2.2"},scripts:{build:"tsc --noEmit",test:'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts',"test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"',"test:ci:ts":'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',"test:yarn":'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},standard:{ignore:["test/ts/**/*","test/syntax-error.mjs"]},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina <hello@matteocollina.com>",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var kn=v((jg,In)=>{"use strict";function Mf(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o===r){i(null,"ok");return}let u=o,f=c=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{u=o,o=Atomics.load(e,t),o===u?f(c>=1e3?1e3:c*2):o===r?i(null,"ok"):i(null,"not-equal")},c)};f(1)}function qf(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o!==r){i(null,"ok");return}let u=f=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{o=Atomics.load(e,t),o!==r?i(null,"ok"):u(f>=1e3?1e3:f*2)},f)};u(1)}In.exports={wait:Mf,waitDiff:qf}});var Wn=v((Pg,Fn)=>{"use strict";Fn.exports={WRITE_INDEX:4,READ_INDEX:8}});var Gn=v((Bg,Un)=>{"use strict";var{version:$f}=Rn(),{EventEmitter:Rf}=D("events"),{Worker:If}=D("worker_threads"),{join:kf}=D("path"),{pathToFileURL:Ff}=D("url"),{wait:Wf}=kn(),{WRITE_INDEX:$,READ_INDEX:W}=Wn(),Kf=D("buffer"),zf=D("assert"),g=Symbol("kImpl"),Vf=Kf.constants.MAX_STRING_LENGTH,he=class{constructor(t){this._value=t}deref(){return this._value}},Ne=class{register(){}unregister(){}},Uf=process.env.NODE_V8_COVERAGE?Ne:global.FinalizationRegistry||Ne,Gf=process.env.NODE_V8_COVERAGE?he:global.WeakRef||he,Kn=new Uf(e=>{e.exited||e.terminate()});function Hf(e,t){let{filename:r,workerData:n}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||kf(__dirname,"lib","worker.js"),o=new If(s,{...t.workerOpts,trackUnmanagedFds:!1,workerData:{filename:r.indexOf("file://")===0?r:Ff(r).href,dataBuf:e[g].dataBuf,stateBuf:e[g].stateBuf,workerData:{$context:{threadStreamVersion:$f},...n}}});return o.stream=new he(e),o.on("message",Jf),o.on("exit",Vn),Kn.register(e,o),o}function zn(e){zf(!e[g].sync),e[g].needDrain&&(e[g].needDrain=!1,e.emit("drain"))}function De(e){let t=Atomics.load(e[g].state,$),r=e[g].data.length-t;if(r>0){if(e[g].buf.length===0){e[g].flushing=!1,e[g].ending?Tt(e):e[g].needDrain&&process.nextTick(zn,e);return}let n=e[g].buf.slice(0,r),i=Buffer.byteLength(n);i<=r?(e[g].buf=e[g].buf.slice(r),Me(e,n,De.bind(null,e))):e.flush(()=>{if(!e.destroyed){for(Atomics.store(e[g].state,W,0),Atomics.store(e[g].state,$,0);i>e[g].data.length;)r=r/2,n=e[g].buf.slice(0,r),i=Buffer.byteLength(n);e[g].buf=e[g].buf.slice(r),Me(e,n,De.bind(null,e))}})}else if(r===0){if(t===0&&e[g].buf.length===0)return;e.flush(()=>{Atomics.store(e[g].state,W,0),Atomics.store(e[g].state,$,0),De(e)})}else K(e,new Error("overwritten"))}function Jf(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}switch(e.code){case"READY":this.stream=new Gf(t),t.flush(()=>{t[g].ready=!0,t.emit("ready")});break;case"ERROR":K(t,e.err);break;case"EVENT":Array.isArray(e.args)?t.emit(e.name,...e.args):t.emit(e.name,e.args);break;case"WARNING":process.emitWarning(e.err);break;default:K(t,new Error("this should not happen: "+e.code))}}function Vn(e){let t=this.stream.deref();t!==void 0&&(Kn.unregister(t),t.worker.exited=!0,t.worker.off("exit",Vn),K(t,e!==0?new Error("the worker thread exited"):null))}var Lt=class extends Rf{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[g]={},this[g].stateBuf=new SharedArrayBuffer(128),this[g].state=new Int32Array(this[g].stateBuf),this[g].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[g].data=Buffer.from(this[g].dataBuf),this[g].sync=t.sync||!1,this[g].ending=!1,this[g].ended=!1,this[g].needDrain=!1,this[g].destroyed=!1,this[g].flushing=!1,this[g].ready=!1,this[g].finished=!1,this[g].errored=null,this[g].closed=!1,this[g].buf="",this.worker=Hf(this,t),this.on("message",(r,n)=>{this.worker.postMessage(r,n)})}write(t){if(this[g].destroyed)return xt(this,new Error("the worker has exited")),!1;if(this[g].ending)return xt(this,new Error("the worker is ending")),!1;if(this[g].flushing&&this[g].buf.length+t.length>=Vf)try{_t(this),this[g].flushing=!0}catch(r){return K(this,r),!1}if(this[g].buf+=t,this[g].sync)try{return _t(this),!0}catch(r){return K(this,r),!1}return this[g].flushing||(this[g].flushing=!0,setImmediate(De,this)),this[g].needDrain=this[g].data.length-this[g].buf.length-Atomics.load(this[g].state,$)<=0,!this[g].needDrain}end(){this[g].destroyed||(this[g].ending=!0,Tt(this))}flush(t){if(this[g].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let r=Atomics.load(this[g].state,$);Wf(this[g].state,W,r,1/0,(n,i)=>{if(n){K(this,n),process.nextTick(t,n);return}if(i==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[g].destroyed||(_t(this),Ct(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[g].ready}get destroyed(){return this[g].destroyed}get closed(){return this[g].closed}get writable(){return!this[g].destroyed&&!this[g].ending}get writableEnded(){return this[g].ending}get writableFinished(){return this[g].finished}get writableNeedDrain(){return this[g].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[g].errored}};function xt(e,t){setImmediate(()=>{e.emit("error",t)})}function K(e,t){e[g].destroyed||(e[g].destroyed=!0,t&&(e[g].errored=t,xt(e,t)),e.worker.exited?setImmediate(()=>{e[g].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[g].closed=!0,e.emit("close")}))}function Me(e,t,r){let n=Atomics.load(e[g].state,$),i=Buffer.byteLength(t);return e[g].data.write(t,n),Atomics.store(e[g].state,$,n+i),Atomics.notify(e[g].state,$),r(),!0}function Tt(e){if(!(e[g].ended||!e[g].ending||e[g].flushing)){e[g].ended=!0;try{e.flushSync();let t=Atomics.load(e[g].state,W);Atomics.store(e[g].state,$,-1),Atomics.notify(e[g].state,$);let r=0;for(;t!==-1;){if(Atomics.wait(e[g].state,W,t,1e3),t=Atomics.load(e[g].state,W),t===-2){K(e,new Error("end() failed"));return}if(++r===10){K(e,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{e[g].finished=!0,e.emit("finish")})}catch(t){K(e,t)}}}function _t(e){let t=()=>{e[g].ending?Tt(e):e[g].needDrain&&process.nextTick(zn,e)};for(e[g].flushing=!1;e[g].buf.length!==0;){let r=Atomics.load(e[g].state,$),n=e[g].data.length-r;if(n===0){Ct(e),Atomics.store(e[g].state,W,0),Atomics.store(e[g].state,$,0);continue}else if(n<0)throw new Error("overwritten");let i=e[g].buf.slice(0,n),s=Buffer.byteLength(i);if(s<=n)e[g].buf=e[g].buf.slice(n),Me(e,i,t);else{for(Ct(e),Atomics.store(e[g].state,W,0),Atomics.store(e[g].state,$,0);s>e[g].buf.length;)n=n/2,i=e[g].buf.slice(0,n),s=Buffer.byteLength(i);e[g].buf=e[g].buf.slice(n),Me(e,i,t)}}}function Ct(e){if(e[g].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[g].state,$),r=0;for(;;){let n=Atomics.load(e[g].state,W);if(n===-2)throw Error("_flushSync failed");if(n!==t)Atomics.wait(e[g].state,W,n,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}Un.exports=Lt});var Pt=v((Dg,Hn)=>{"use strict";var{createRequire:Yf}=D("module"),Xf=gt(),{join:At,isAbsolute:Zf,sep:Qf}=D("node:path"),ec=St(),jt=Be(),tc=Gn();function rc(e){jt.register(e,ic),jt.registerBeforeExit(e,sc),e.on("close",function(){jt.unregister(e)})}function nc(e,t,r,n){let i=new tc({filename:e,workerData:t,workerOpts:r,sync:n});i.on("ready",s),i.on("close",function(){process.removeListener("exit",o)}),process.on("exit",o);function s(){process.removeListener("exit",o),i.unref(),r.autoEnd!==!1&&rc(i)}function o(){i.closed||(i.flushSync(),ec(100),i.end())}return i}function ic(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function sc(e){e.flushSync()}function oc(e){let{pipeline:t,targets:r,levels:n,dedupe:i,worker:s={},caller:o=Xf(),sync:u=!1}=e,f={...e.options},c=typeof o=="string"?[o]:o,d="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},l=e.target;if(l&&r)throw new Error("only one of target or targets can be specified");return r?(l=d["pino-worker"]||At(__dirname,"worker.js"),f.targets=r.filter(h=>h.target).map(h=>({...h,target:y(h.target)})),f.pipelines=r.filter(h=>h.pipeline).map(h=>h.pipeline.map(a=>({...a,level:h.level,target:y(a.target)})))):t&&(l=d["pino-worker"]||At(__dirname,"worker.js"),f.pipelines=[t.map(h=>({...h,target:y(h.target)}))]),n&&(f.levels=n),i&&(f.dedupe=i),f.pinoWillSendConfig=!0,nc(y(l),f,s,u);function y(h){if(h=d[h]||h,Zf(h)||h.indexOf("file://")===0)return h;if(h==="pino/file")return At(__dirname,"..","file.js");let a;for(let m of c)try{let p=m==="node:repl"?process.cwd()+Qf:m;a=Yf(p).resolve(h);break}catch{continue}if(!a)throw new Error(`unable to determine transport target for "${h}"`);return a}}Hn.exports=oc});var Re=v((Ng,ui)=>{"use strict";var uc=D("node:diagnostics_channel"),Jn=Ln(),{mapHttpRequest:fc,mapHttpResponse:cc}=yt(),Dt=Ot(),Yn=Be(),{lsCacheSym:lc,chindingsSym:ti,writeSym:Xn,serializersSym:ri,formatOptsSym:Zn,endSym:ac,stringifiersSym:ni,stringifySym:ii,stringifySafeSym:Nt,wildcardFirstSym:si,nestedKeySym:dc,formattersSym:oi,messageKeySym:hc,errorKeySym:yc,nestedKeyStrSym:gc,msgPrefixSym:qe}=ie(),{isMainThread:pc}=D("worker_threads"),mc=Pt(),Qn=uc.tracingChannel("pino_asJson");function oe(){}function bc(e,t){if(!t)return r;return function(...i){t.call(this,i,r,e)};function r(n,...i){if(typeof n=="object"){let s=n;n!==null&&(n.method&&n.headers&&n.socket?n=fc(n):typeof n.setHeader=="function"&&(n=cc(n)));let o;s===null&&i.length===0?o=[null]:(s=i.shift(),o=i),typeof this[qe]=="string"&&s!==void 0&&s!==null&&(s=this[qe]+s),this[Xn](n,Jn(s,o,this[Zn]),e)}else{let s=n===void 0?i.shift():n;typeof this[qe]=="string"&&s!==void 0&&s!==null&&(s=this[qe]+s),this[Xn](null,Jn(s,i,this[Zn]),e)}}}function Bt(e){let t="",r=0,n=!1,i=255,s=e.length;if(s>100)return JSON.stringify(e);for(var o=0;o<s&&i>=32;o++)i=e.charCodeAt(o),(i===34||i===92)&&(t+=e.slice(r,o)+"\\",r=o,n=!0);return n?t+=e.slice(r):t=e,i<32?JSON.stringify(e):'"'+t+'"'}function wc(e,t,r,n){if(Qn.hasSubscribers===!1)return ei.call(this,e,t,r,n);let i={instance:this,arguments};return Qn.traceSync(ei,i,this,e,t,r,n)}function ei(e,t,r,n){let i=this[ii],s=this[Nt],o=this[ni],u=this[ac],f=this[ti],c=this[ri],d=this[oi],l=this[hc],y=this[yc],h=this[lc][r]+n;h=h+f;let a;d.log&&(e=d.log(e));let m=o[si],p="";for(let w in e)if(a=e[w],Object.prototype.hasOwnProperty.call(e,w)&&a!==void 0){c[w]?a=c[w](a):w===y&&c.err&&(a=c.err(a));let S=o[w]||m;switch(typeof a){case"undefined":case"function":continue;case"number":Number.isFinite(a)===!1&&(a=null);case"boolean":S&&(a=S(a));break;case"string":a=(S||Bt)(a);break;default:a=(S||i)(a,s)}if(a===void 0)continue;let O=Bt(w);p+=","+O+":"+a}let b="";if(t!==void 0){a=c[l]?c[l](t):t;let w=o[l]||m;switch(typeof a){case"function":break;case"number":Number.isFinite(a)===!1&&(a=null);case"boolean":w&&(a=w(a)),b=',"'+l+'":'+a;break;case"string":a=(w||Bt)(a),b=',"'+l+'":'+a;break;default:a=(w||i)(a,s),b=',"'+l+'":'+a}}return this[dc]&&p?h+this[gc]+p.slice(1)+"}"+b+u:h+p+b+u}function Sc(e,t){let r,n=e[ti],i=e[ii],s=e[Nt],o=e[ni],u=o[si],f=e[ri],c=e[oi].bindings;t=c(t);for(let d in t)if(r=t[d],((d.length<5||d!=="level"&&d!=="serializers"&&d!=="formatters"&&d!=="customLevels")&&t.hasOwnProperty(d)&&r!==void 0)===!0){if(r=f[d]?f[d](r):r,r=(o[d]||u||i)(r,s),r===void 0)continue;n+=',"'+d+'":'+r}return n}function Ec(e){return e.write!==e.constructor.prototype.write}function $e(e){let t=new Dt(e);return t.on("error",r),!e.sync&&pc&&(Yn.register(t,vc),t.on("close",function(){Yn.unregister(t)})),t;function r(n){if(n.code==="EPIPE"){t.write=oe,t.end=oe,t.flushSync=oe,t.destroy=oe;return}t.removeListener("error",r),t.emit("error",n)}}function vc(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function Oc(e){return function(r,n,i={},s){if(typeof i=="string")s=$e({dest:i}),i={};else if(typeof s=="string"){if(i&&i.transport)throw Error("only one of option.transport or stream can be specified");s=$e({dest:s})}else if(i instanceof Dt||i.writable||i._writableState)s=i,i={};else if(i.transport){if(i.transport instanceof Dt||i.transport.writable||i.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(i.transport.targets&&i.transport.targets.length&&i.formatters&&typeof i.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let f;i.customLevels&&(f=i.useOnlyCustomLevels?i.customLevels:Object.assign({},i.levels,i.customLevels)),s=mc({caller:n,...i.transport,levels:f})}if(i=Object.assign({},e,i),i.serializers=Object.assign({},e.serializers,i.serializers),i.formatters=Object.assign({},e.formatters,i.formatters),i.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:o,onChild:u}=i;return o===!1&&(i.level="silent"),u||(i.onChild=oe),s||(Ec(process.stdout)?s=process.stdout:s=$e({fd:process.stdout.fd||1})),{opts:i,stream:s}}}function _c(e,t){try{return JSON.stringify(e)}catch{try{return(t||this[Nt])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function Lc(e,t,r){return{level:e,bindings:t,log:r}}function xc(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e===void 0?1:e}ui.exports={noop:oe,buildSafeSonicBoom:$e,asChindings:Sc,asJson:wc,genLog:bc,createArgsNormalizer:Oc,stringify:_c,buildFormatters:Lc,normalizeDestFileDescriptor:xc}});var Ie=v((Mg,fi)=>{var Cc={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Tc={ASC:"ASC",DESC:"DESC"};fi.exports={DEFAULT_LEVELS:Cc,SORTING_ORDER:Tc}});var $t=v((qg,di)=>{"use strict";var{lsCacheSym:Ac,levelValSym:Mt,useOnlyCustomLevelsSym:jc,streamSym:Pc,formattersSym:Bc,hooksSym:Dc,levelCompSym:ci}=ie(),{noop:Nc,genLog:Z}=Re(),{DEFAULT_LEVELS:z,SORTING_ORDER:li}=Ie(),ai={fatal:e=>{let t=Z(z.fatal,e);return function(...r){let n=this[Pc];if(t.call(this,...r),typeof n.flushSync=="function")try{n.flushSync()}catch{}}},error:e=>Z(z.error,e),warn:e=>Z(z.warn,e),info:e=>Z(z.info,e),debug:e=>Z(z.debug,e),trace:e=>Z(z.trace,e)},qt=Object.keys(z).reduce((e,t)=>(e[z[t]]=t,e),{}),Mc=Object.keys(qt).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function qc(e){let t=e[Bc].level,{labels:r}=e.levels,n={};for(let i in r){let s=t(r[i],Number(i));n[i]=JSON.stringify(s).slice(0,-1)}return e[Ac]=n,e}function $c(e,t){if(t)return!1;switch(e){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function Rc(e){let{labels:t,values:r}=this.levels;if(typeof e=="number"){if(t[e]===void 0)throw Error("unknown level value"+e);e=t[e]}if(r[e]===void 0)throw Error("unknown level "+e);let n=this[Mt],i=this[Mt]=r[e],s=this[jc],o=this[ci],u=this[Dc].logMethod;for(let f in r){if(o(r[f],i)===!1){this[f]=Nc;continue}this[f]=$c(f,s)?ai[f](u):Z(r[f],u)}this.emit("level-change",e,i,t[n],n,this)}function Ic(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function kc(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&this[ci](r,this[Mt])}function Fc(e,t,r){return e===li.DESC?t<=r:t>=r}function Wc(e){return typeof e=="string"?Fc.bind(null,e):e}function Kc(e=null,t=!1){let r=e?Object.keys(e).reduce((s,o)=>(s[e[o]]=o,s),{}):null,n=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:qt,r),i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:z,e);return{labels:n,values:i}}function zc(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),r?[]:Object.keys(qt).map(s=>+s),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:z,t);if(!(e in n))throw Error(`default level:${e} must be included in custom levels`)}function Vc(e,t){let{labels:r,values:n}=e;for(let i in t){if(i in n)throw Error("levels cannot be overridden");if(t[i]in r)throw Error("pre-existing level values cannot be used for new levels")}}function Uc(e){if(typeof e!="function"&&!(typeof e=="string"&&Object.values(li).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}di.exports={initialLsCache:Mc,genLsCache:qc,levelMethods:ai,getLevel:Ic,setLevel:Rc,isLevelEnabled:kc,mappings:Kc,assertNoLevelCollisions:Vc,assertDefaultLevelFound:zc,genLevelComparison:Wc,assertLevelComparison:Uc}});var Rt=v(($g,hi)=>{"use strict";hi.exports={version:"10.1.0"}});var Ei=v((Ig,Si)=>{"use strict";var{EventEmitter:Gc}=D("node:events"),{lsCacheSym:Hc,levelValSym:Jc,setLevelSym:kt,getLevelSym:yi,chindingsSym:Fe,mixinSym:Yc,asJsonSym:pi,writeSym:Xc,mixinMergeStrategySym:Zc,timeSym:Qc,timeSliceIndexSym:el,streamSym:mi,serializersSym:Q,formattersSym:ye,errorKeySym:tl,messageKeySym:rl,useOnlyCustomLevelsSym:nl,needsMetadataGsym:il,redactFmtSym:sl,stringifySym:ol,formatOptsSym:ul,stringifiersSym:fl,msgPrefixSym:Ft,hooksSym:cl}=ie(),{getLevel:ll,setLevel:al,isLevelEnabled:dl,mappings:hl,initialLsCache:yl,genLsCache:gl,assertNoLevelCollisions:pl}=$t(),{asChindings:Wt,asJson:ml,buildFormatters:It,stringify:gi,noop:bi}=Re(),{version:bl}=Rt(),wl=bt(),Sl=class{},wi={constructor:Sl,child:El,bindings:vl,setBindings:Ol,flush:xl,isLevelEnabled:dl,version:bl,get level(){return this[yi]()},set level(e){this[kt](e)},get levelVal(){return this[Jc]},set levelVal(e){throw Error("levelVal is read-only")},get msgPrefix(){return this[Ft]},get[Symbol.toStringTag](){return"Pino"},[Hc]:yl,[Xc]:Ll,[pi]:ml,[yi]:ll,[kt]:al};Object.setPrototypeOf(wi,Gc.prototype);Si.exports=function(){return Object.create(wi)};var ke=e=>e;function El(e,t){if(!e)throw Error("missing bindings for child Pino");let r=this[Q],n=this[ye],i=Object.create(this);if(t==null)return i[ye].bindings!==ke&&(i[ye]=It(n.level,ke,n.log)),i[Fe]=Wt(i,e),this.onChild!==bi&&this.onChild(i),i;if(t.hasOwnProperty("serializers")===!0){i[Q]=Object.create(null);for(let c in r)i[Q][c]=r[c];let u=Object.getOwnPropertySymbols(r);for(var s=0;s<u.length;s++){let c=u[s];i[Q][c]=r[c]}for(let c in t.serializers)i[Q][c]=t.serializers[c];let f=Object.getOwnPropertySymbols(t.serializers);for(var o=0;o<f.length;o++){let c=f[o];i[Q][c]=t.serializers[c]}}else i[Q]=r;if(t.hasOwnProperty("formatters")){let{level:u,bindings:f,log:c}=t.formatters;i[ye]=It(u||n.level,f||ke,c||n.log)}else i[ye]=It(n.level,ke,n.log);if(t.hasOwnProperty("customLevels")===!0&&(pl(this.levels,t.customLevels),i.levels=hl(t.customLevels,i[nl]),gl(i)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){i.redact=t.redact;let u=wl(i.redact,gi),f={stringify:u[sl]};i[ol]=gi,i[fl]=u,i[ul]=f}if(typeof t.msgPrefix=="string"&&(i[Ft]=(this[Ft]||"")+t.msgPrefix),i[Fe]=Wt(i,e),t.level!==void 0&&t.level!==this.level||t.hasOwnProperty("customLevels")){let u=t.level||this.level;i[kt](u)}return this.onChild(i),i}function vl(){let t=`{${this[Fe].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function Ol(e){let t=Wt(this,e);this[Fe]=t}function _l(e,t){return Object.assign(t,e)}function Ll(e,t,r){let n=this[Qc](),i=this[Yc],s=this[tl],o=this[rl],u=this[Zc]||_l,f,c=this[cl].streamWrite;e==null?f={}:e instanceof Error?(f={[s]:e},t===void 0&&(t=e.message)):(f=e,t===void 0&&e[o]===void 0&&e[s]&&(t=e[s].message)),i&&(f=u(f,i(f,r,this)));let d=this[pi](f,t,r,n),l=this[mi];l[il]===!0&&(l.lastLevel=r,l.lastObj=f,l.lastMsg=t,l.lastTime=n.slice(this[el]),l.lastLogger=this),l.write(c?c(d):d)}function xl(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let t=this[mi];typeof t.flush=="function"?t.flush(e||bi):e&&e()}});var Li=v((Ut,_i)=>{"use strict";var{hasOwnProperty:ge}=Object.prototype,te=Vt();te.configure=Vt;te.stringify=te;te.default=te;Ut.stringify=te;Ut.configure=Vt;_i.exports=te;var Cl=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function G(e){return e.length<5e3&&!Cl.test(e)?`"${e}"`:JSON.stringify(e)}function Kt(e,t){if(e.length>200||t)return e.sort(t);for(let r=1;r<e.length;r++){let n=e[r],i=r;for(;i!==0&&e[i-1]>n;)e[i]=e[i-1],i--;e[i]=n}return e}var Tl=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function zt(e){return Tl.call(e)!==void 0&&e.length!==0}function vi(e,t,r){e.length<r&&(r=e.length);let n=t===","?"":" ",i=`"0":${n}${e[0]}`;for(let s=1;s<r;s++)i+=`${t}"${s}":${n}${e[s]}`;return i}function Al(e){if(ge.call(e,"circularValue")){let t=e.circularValue;if(typeof t=="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function jl(e){let t;if(ge.call(e,"deterministic")&&(t=e.deterministic,typeof t!="boolean"&&typeof t!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return t===void 0?!0:t}function Pl(e,t){let r;if(ge.call(e,t)&&(r=e[t],typeof r!="boolean"))throw new TypeError(`The "${t}" argument must be of type boolean`);return r===void 0?!0:r}function Oi(e,t){let r;if(ge.call(e,t)){if(r=e[t],typeof r!="number")throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}function ee(e){return e===1?"1 item":`${e} items`}function Bl(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function Dl(e){if(ge.call(e,"strict")){let t=e.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return r=>{let n=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(n+=` (${r.toString()})`),new Error(n)}}}function Vt(e){e={...e};let t=Dl(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Al(e),n=Pl(e,"bigint"),i=jl(e),s=typeof i=="function"?i:void 0,o=Oi(e,"maximumDepth"),u=Oi(e,"maximumBreadth");function f(h,a,m,p,b,w){let S=a[h];switch(typeof S=="object"&&S!==null&&typeof S.toJSON=="function"&&(S=S.toJSON(h)),S=p.call(a,h,S),typeof S){case"string":return G(S);case"object":{if(S===null)return"null";if(m.indexOf(S)!==-1)return r;let O="",x=",",P=w;if(Array.isArray(S)){if(S.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(S),b!==""&&(w+=b,O+=`
5
5
  ${w}`,x=`,
6
6
  ${w}`);let A=Math.min(S.length,u),E=0;for(;E<A-1;E++){let R=f(String(E),S,m,p,b,w);O+=R!==void 0?R:"null",O+=x}let q=f(String(E),S,m,p,b,w);if(O+=q!==void 0?q:"null",S.length-1>u){let R=S.length-u-1;O+=`${x}"... ${ee(R)} not stringified"`}return b!==""&&(O+=`
7
- ${P}`),m.pop(),`[${O}]`}let T=Object.keys(S),j=T.length;if(j===0)return"{}";if(o<m.length+1)return'"[Object]"';let _="",N="";b!==""&&(w+=b,x=`,
8
- ${w}`,_=" ");let D=Math.min(j,u);i&&!zt(S)&&(T=Kt(T,s)),m.push(S);for(let A=0;A<D;A++){let E=T[A],q=f(E,S,m,p,b,w);q!==void 0&&(O+=`${N}${G(E)}:${_}${q}`,N=x)}if(j>u){let A=j-u;O+=`${N}"...":${_}"${ee(A)} not stringified"`,N=x}return b!==""&&N.length>1&&(O=`
7
+ ${P}`),m.pop(),`[${O}]`}let T=Object.keys(S),j=T.length;if(j===0)return"{}";if(o<m.length+1)return'"[Object]"';let _="",B="";b!==""&&(w+=b,x=`,
8
+ ${w}`,_=" ");let N=Math.min(j,u);i&&!zt(S)&&(T=Kt(T,s)),m.push(S);for(let A=0;A<N;A++){let E=T[A],q=f(E,S,m,p,b,w);q!==void 0&&(O+=`${B}${G(E)}:${_}${q}`,B=x)}if(j>u){let A=j-u;O+=`${B}"...":${_}"${ee(A)} not stringified"`,B=x}return b!==""&&B.length>1&&(O=`
9
9
  ${w}${O}
10
10
  ${P}`),m.pop(),`{${O}}`}case"number":return isFinite(S)?String(S):t?t(S):"null";case"boolean":return S===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(S);default:return t?t(S):void 0}}function c(h,a,m,p,b,w){switch(typeof a=="object"&&a!==null&&typeof a.toJSON=="function"&&(a=a.toJSON(h)),typeof a){case"string":return G(a);case"object":{if(a===null)return"null";if(m.indexOf(a)!==-1)return r;let S=w,O="",x=",";if(Array.isArray(a)){if(a.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(a),b!==""&&(w+=b,O+=`
11
11
  ${w}`,x=`,
12
- ${w}`);let j=Math.min(a.length,u),_=0;for(;_<j-1;_++){let D=c(String(_),a[_],m,p,b,w);O+=D!==void 0?D:"null",O+=x}let N=c(String(_),a[_],m,p,b,w);if(O+=N!==void 0?N:"null",a.length-1>u){let D=a.length-u-1;O+=`${x}"... ${ee(D)} not stringified"`}return b!==""&&(O+=`
12
+ ${w}`);let j=Math.min(a.length,u),_=0;for(;_<j-1;_++){let N=c(String(_),a[_],m,p,b,w);O+=N!==void 0?N:"null",O+=x}let B=c(String(_),a[_],m,p,b,w);if(O+=B!==void 0?B:"null",a.length-1>u){let N=a.length-u-1;O+=`${x}"... ${ee(N)} not stringified"`}return b!==""&&(O+=`
13
13
  ${S}`),m.pop(),`[${O}]`}m.push(a);let P="";b!==""&&(w+=b,x=`,
14
14
  ${w}`,P=" ");let T="";for(let j of p){let _=c(j,a[j],m,p,b,w);_!==void 0&&(O+=`${T}${G(j)}:${P}${_}`,T=x)}return b!==""&&T.length>1&&(O=`
15
15
  ${w}${O}
16
16
  ${S}`),m.pop(),`{${O}}`}case"number":return isFinite(a)?String(a):t?t(a):"null";case"boolean":return a===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(a);default:return t?t(a):void 0}}function d(h,a,m,p,b){switch(typeof a){case"string":return G(a);case"object":{if(a===null)return"null";if(typeof a.toJSON=="function"){if(a=a.toJSON(h),typeof a!="object")return d(h,a,m,p,b);if(a===null)return"null"}if(m.indexOf(a)!==-1)return r;let w=b;if(Array.isArray(a)){if(a.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(a),b+=p;let _=`
17
- ${b}`,N=`,
18
- ${b}`,D=Math.min(a.length,u),A=0;for(;A<D-1;A++){let q=d(String(A),a[A],m,p,b);_+=q!==void 0?q:"null",_+=N}let E=d(String(A),a[A],m,p,b);if(_+=E!==void 0?E:"null",a.length-1>u){let q=a.length-u-1;_+=`${N}"... ${ee(q)} not stringified"`}return _+=`
17
+ ${b}`,B=`,
18
+ ${b}`,N=Math.min(a.length,u),A=0;for(;A<N-1;A++){let q=d(String(A),a[A],m,p,b);_+=q!==void 0?q:"null",_+=B}let E=d(String(A),a[A],m,p,b);if(_+=E!==void 0?E:"null",a.length-1>u){let q=a.length-u-1;_+=`${B}"... ${ee(q)} not stringified"`}return _+=`
19
19
  ${w}`,m.pop(),`[${_}]`}let S=Object.keys(a),O=S.length;if(O===0)return"{}";if(o<m.length+1)return'"[Object]"';b+=p;let x=`,
20
- ${b}`,P="",T="",j=Math.min(O,u);zt(a)&&(P+=Oi(a,x,u),S=S.slice(a.length),j-=a.length,T=x),i&&(S=Kt(S,s)),m.push(a);for(let _=0;_<j;_++){let N=S[_],D=d(N,a[N],m,p,b);D!==void 0&&(P+=`${T}${G(N)}: ${D}`,T=x)}if(O>u){let _=O-u;P+=`${T}"...": "${ee(_)} not stringified"`,T=x}return T!==""&&(P=`
20
+ ${b}`,P="",T="",j=Math.min(O,u);zt(a)&&(P+=vi(a,x,u),S=S.slice(a.length),j-=a.length,T=x),i&&(S=Kt(S,s)),m.push(a);for(let _=0;_<j;_++){let B=S[_],N=d(B,a[B],m,p,b);N!==void 0&&(P+=`${T}${G(B)}: ${N}`,T=x)}if(O>u){let _=O-u;P+=`${T}"...": "${ee(_)} not stringified"`,T=x}return T!==""&&(P=`
21
21
  ${b}${P}
22
- ${w}`),m.pop(),`{${P}}`}case"number":return isFinite(a)?String(a):t?t(a):"null";case"boolean":return a===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(a);default:return t?t(a):void 0}}function l(h,a,m){switch(typeof a){case"string":return G(a);case"object":{if(a===null)return"null";if(typeof a.toJSON=="function"){if(a=a.toJSON(h),typeof a!="object")return l(h,a,m);if(a===null)return"null"}if(m.indexOf(a)!==-1)return r;let p="",b=a.length!==void 0;if(b&&Array.isArray(a)){if(a.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(a);let P=Math.min(a.length,u),T=0;for(;T<P-1;T++){let _=l(String(T),a[T],m);p+=_!==void 0?_:"null",p+=","}let j=l(String(T),a[T],m);if(p+=j!==void 0?j:"null",a.length-1>u){let _=a.length-u-1;p+=`,"... ${ee(_)} not stringified"`}return m.pop(),`[${p}]`}let w=Object.keys(a),S=w.length;if(S===0)return"{}";if(o<m.length+1)return'"[Object]"';let O="",x=Math.min(S,u);b&&zt(a)&&(p+=Oi(a,",",u),w=w.slice(a.length),x-=a.length,O=","),i&&(w=Kt(w,s)),m.push(a);for(let P=0;P<x;P++){let T=w[P],j=l(T,a[T],m);j!==void 0&&(p+=`${O}${G(T)}:${j}`,O=",")}if(S>u){let P=S-u;p+=`${O}"...":"${ee(P)} not stringified"`}return m.pop(),`{${p}}`}case"number":return isFinite(a)?String(a):t?t(a):"null";case"boolean":return a===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(a);default:return t?t(a):void 0}}function y(h,a,m){if(arguments.length>1){let p="";if(typeof m=="number"?p=" ".repeat(Math.min(m,10)):typeof m=="string"&&(p=m.slice(0,10)),a!=null){if(typeof a=="function")return f("",{"":h},[],a,p,"");if(Array.isArray(a))return c("",h,[],Ml(a),p,"")}if(p.length!==0)return d("",h,[],p,"")}return l("",h,[])}return y}});var ji=v((Kg,Ai)=>{"use strict";var Gt=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:Ti}=Ie(),$l=Ti.info;function Rl(e,t){e=e||[],t=t||{dedupe:!1};let r=Object.create(Ti);r.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(l=>{r[l]=t.levels[l]});let n={write:i,add:u,remove:f,emit:s,flushSync:o,end:c,minLevel:0,lastId:0,streams:[],clone:d,[Gt]:!0,streamLevels:r};return Array.isArray(e)?e.forEach(u,n):u.call(n,e),e=null,n;function i(l){let y,h=this.lastLevel,{streams:a}=this,m=0,p;for(let b=Il(a.length,t.dedupe);Fl(b,a.length,t.dedupe);b=kl(b,t.dedupe))if(y=a[b],y.level<=h){if(m!==0&&m!==y.level)break;if(p=y.stream,p[Gt]){let{lastTime:w,lastMsg:S,lastObj:O,lastLogger:x}=this;p.lastLevel=h,p.lastTime=w,p.lastMsg=S,p.lastObj=O,p.lastLogger=x}p.write(l),t.dedupe&&(m=y.level)}else if(!t.dedupe)break}function s(...l){for(let{stream:y}of this.streams)typeof y.emit=="function"&&y.emit(...l)}function o(){for(let{stream:l}of this.streams)typeof l.flushSync=="function"&&l.flushSync()}function u(l){if(!l)return n;let y=typeof l.write=="function"||l.stream,h=l.write?l:l.stream;if(!y)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:a,streamLevels:m}=this,p;typeof l.levelVal=="number"?p=l.levelVal:typeof l.level=="string"?p=m[l.level]:typeof l.level=="number"?p=l.level:p=$l;let b={stream:h,level:p,levelVal:void 0,id:++n.lastId};return a.unshift(b),a.sort(Ci),this.minLevel=a[0].level,n}function f(l){let{streams:y}=this,h=y.findIndex(a=>a.id===l);return h>=0&&(y.splice(h,1),y.sort(Ci),this.minLevel=y.length>0?y[0].level:-1),n}function c(){for(let{stream:l}of this.streams)typeof l.flushSync=="function"&&l.flushSync(),l.end()}function d(l){let y=new Array(this.streams.length);for(let h=0;h<y.length;h++)y[h]={level:l,stream:this.streams[h].stream};return{write:i,add:u,remove:f,minLevel:l,streams:y,clone:d,emit:s,flushSync:o,[Gt]:!0}}}function Ci(e,t){return e.level-t.level}function Il(e,t){return t?e-1:0}function kl(e,t){return t?e-1:e+1}function Fl(e,t,r){return r?e>=0:e<t}Ai.exports=Rl});var zi=v((zg,I)=>{"use strict";var Wl=B("node:os"),Ri=yt(),Kl=gt(),zl=bt(),Ii=_n(),Vl=vi(),ki=ie(),{configure:Ul}=xi(),{assertDefaultLevelFound:Gl,mappings:Fi,genLsCache:Hl,genLevelComparison:Jl,assertLevelComparison:Yl}=$t(),{DEFAULT_LEVELS:Wi,SORTING_ORDER:Xl}=Ie(),{createArgsNormalizer:Zl,asChindings:Ql,buildSafeSonicBoom:Pi,buildFormatters:ea,stringify:Ht,normalizeDestFileDescriptor:Ni,noop:ta}=Re(),{version:ra}=Rt(),{chindingsSym:Bi,redactFmtSym:na,serializersSym:Di,timeSym:ia,timeSliceIndexSym:sa,streamSym:oa,stringifySym:Mi,stringifySafeSym:Jt,stringifiersSym:qi,setLevelSym:ua,endSym:fa,formatOptsSym:ca,messageKeySym:la,errorKeySym:aa,nestedKeySym:da,mixinSym:ha,levelCompSym:ya,useOnlyCustomLevelsSym:ga,formattersSym:$i,hooksSym:pa,nestedKeyStrSym:ma,mixinMergeStrategySym:ba,msgPrefixSym:wa}=ki,{epochTime:Ki,nullTime:Sa}=Ii,{pid:Ea}=process,va=Wl.hostname(),Oa=Ri.err,_a={level:"info",levelComparison:Xl.ASC,levels:Wi,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Ea,hostname:va},serializers:Object.assign(Object.create(null),{err:Oa}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:Ki,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},La=Zl(_a),xa=Object.assign(Object.create(null),Ri);function Yt(...e){let t={},{opts:r,stream:n}=La(t,Kl(),...e);r.level&&typeof r.level=="string"&&Wi[r.level.toLowerCase()]!==void 0&&(r.level=r.level.toLowerCase());let{redact:i,crlf:s,serializers:o,timestamp:u,messageKey:f,errorKey:c,nestedKey:d,base:l,name:y,level:h,customLevels:a,levelComparison:m,mixin:p,mixinMergeStrategy:b,useOnlyCustomLevels:w,formatters:S,hooks:O,depthLimit:x,edgeLimit:P,onChild:T,msgPrefix:j}=r,_=Ul({maximumDepth:x,maximumBreadth:P}),N=ea(S.level,S.bindings,S.log),D=Ht.bind({[Jt]:_}),A=i?zl(i,D):{},E=i?{stringify:A[na]}:{stringify:D},q="}"+(s?`\r
22
+ ${w}`),m.pop(),`{${P}}`}case"number":return isFinite(a)?String(a):t?t(a):"null";case"boolean":return a===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(a);default:return t?t(a):void 0}}function l(h,a,m){switch(typeof a){case"string":return G(a);case"object":{if(a===null)return"null";if(typeof a.toJSON=="function"){if(a=a.toJSON(h),typeof a!="object")return l(h,a,m);if(a===null)return"null"}if(m.indexOf(a)!==-1)return r;let p="",b=a.length!==void 0;if(b&&Array.isArray(a)){if(a.length===0)return"[]";if(o<m.length+1)return'"[Array]"';m.push(a);let P=Math.min(a.length,u),T=0;for(;T<P-1;T++){let _=l(String(T),a[T],m);p+=_!==void 0?_:"null",p+=","}let j=l(String(T),a[T],m);if(p+=j!==void 0?j:"null",a.length-1>u){let _=a.length-u-1;p+=`,"... ${ee(_)} not stringified"`}return m.pop(),`[${p}]`}let w=Object.keys(a),S=w.length;if(S===0)return"{}";if(o<m.length+1)return'"[Object]"';let O="",x=Math.min(S,u);b&&zt(a)&&(p+=vi(a,",",u),w=w.slice(a.length),x-=a.length,O=","),i&&(w=Kt(w,s)),m.push(a);for(let P=0;P<x;P++){let T=w[P],j=l(T,a[T],m);j!==void 0&&(p+=`${O}${G(T)}:${j}`,O=",")}if(S>u){let P=S-u;p+=`${O}"...":"${ee(P)} not stringified"`}return m.pop(),`{${p}}`}case"number":return isFinite(a)?String(a):t?t(a):"null";case"boolean":return a===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(a);default:return t?t(a):void 0}}function y(h,a,m){if(arguments.length>1){let p="";if(typeof m=="number"?p=" ".repeat(Math.min(m,10)):typeof m=="string"&&(p=m.slice(0,10)),a!=null){if(typeof a=="function")return f("",{"":h},[],a,p,"");if(Array.isArray(a))return c("",h,[],Bl(a),p,"")}if(p.length!==0)return d("",h,[],p,"")}return l("",h,[])}return y}});var Ai=v((kg,Ti)=>{"use strict";var Gt=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:Ci}=Ie(),Nl=Ci.info;function Ml(e,t){e=e||[],t=t||{dedupe:!1};let r=Object.create(Ci);r.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(l=>{r[l]=t.levels[l]});let n={write:i,add:u,remove:f,emit:s,flushSync:o,end:c,minLevel:0,lastId:0,streams:[],clone:d,[Gt]:!0,streamLevels:r};return Array.isArray(e)?e.forEach(u,n):u.call(n,e),e=null,n;function i(l){let y,h=this.lastLevel,{streams:a}=this,m=0,p;for(let b=ql(a.length,t.dedupe);Rl(b,a.length,t.dedupe);b=$l(b,t.dedupe))if(y=a[b],y.level<=h){if(m!==0&&m!==y.level)break;if(p=y.stream,p[Gt]){let{lastTime:w,lastMsg:S,lastObj:O,lastLogger:x}=this;p.lastLevel=h,p.lastTime=w,p.lastMsg=S,p.lastObj=O,p.lastLogger=x}p.write(l),t.dedupe&&(m=y.level)}else if(!t.dedupe)break}function s(...l){for(let{stream:y}of this.streams)typeof y.emit=="function"&&y.emit(...l)}function o(){for(let{stream:l}of this.streams)typeof l.flushSync=="function"&&l.flushSync()}function u(l){if(!l)return n;let y=typeof l.write=="function"||l.stream,h=l.write?l:l.stream;if(!y)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:a,streamLevels:m}=this,p;typeof l.levelVal=="number"?p=l.levelVal:typeof l.level=="string"?p=m[l.level]:typeof l.level=="number"?p=l.level:p=Nl;let b={stream:h,level:p,levelVal:void 0,id:++n.lastId};return a.unshift(b),a.sort(xi),this.minLevel=a[0].level,n}function f(l){let{streams:y}=this,h=y.findIndex(a=>a.id===l);return h>=0&&(y.splice(h,1),y.sort(xi),this.minLevel=y.length>0?y[0].level:-1),n}function c(){for(let{stream:l}of this.streams)typeof l.flushSync=="function"&&l.flushSync(),l.end()}function d(l){let y=new Array(this.streams.length);for(let h=0;h<y.length;h++)y[h]={level:l,stream:this.streams[h].stream};return{write:i,add:u,remove:f,minLevel:l,streams:y,clone:d,emit:s,flushSync:o,[Gt]:!0}}}function xi(e,t){return e.level-t.level}function ql(e,t){return t?e-1:0}function $l(e,t){return t?e-1:e+1}function Rl(e,t,r){return r?e>=0:e<t}Ti.exports=Ml});var Ki=v((Fg,I)=>{"use strict";var Il=D("node:os"),$i=yt(),kl=gt(),Fl=bt(),Ri=On(),Wl=Ei(),Ii=ie(),{configure:Kl}=Li(),{assertDefaultLevelFound:zl,mappings:ki,genLsCache:Vl,genLevelComparison:Ul,assertLevelComparison:Gl}=$t(),{DEFAULT_LEVELS:Fi,SORTING_ORDER:Hl}=Ie(),{createArgsNormalizer:Jl,asChindings:Yl,buildSafeSonicBoom:ji,buildFormatters:Xl,stringify:Ht,normalizeDestFileDescriptor:Pi,noop:Zl}=Re(),{version:Ql}=Rt(),{chindingsSym:Bi,redactFmtSym:ea,serializersSym:Di,timeSym:ta,timeSliceIndexSym:ra,streamSym:na,stringifySym:Ni,stringifySafeSym:Jt,stringifiersSym:Mi,setLevelSym:ia,endSym:sa,formatOptsSym:oa,messageKeySym:ua,errorKeySym:fa,nestedKeySym:ca,mixinSym:la,levelCompSym:aa,useOnlyCustomLevelsSym:da,formattersSym:qi,hooksSym:ha,nestedKeyStrSym:ya,mixinMergeStrategySym:ga,msgPrefixSym:pa}=Ii,{epochTime:Wi,nullTime:ma}=Ri,{pid:ba}=process,wa=Il.hostname(),Sa=$i.err,Ea={level:"info",levelComparison:Hl.ASC,levels:Fi,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:ba,hostname:wa},serializers:Object.assign(Object.create(null),{err:Sa}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:Wi,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},va=Jl(Ea),Oa=Object.assign(Object.create(null),$i);function Yt(...e){let t={},{opts:r,stream:n}=va(t,kl(),...e);r.level&&typeof r.level=="string"&&Fi[r.level.toLowerCase()]!==void 0&&(r.level=r.level.toLowerCase());let{redact:i,crlf:s,serializers:o,timestamp:u,messageKey:f,errorKey:c,nestedKey:d,base:l,name:y,level:h,customLevels:a,levelComparison:m,mixin:p,mixinMergeStrategy:b,useOnlyCustomLevels:w,formatters:S,hooks:O,depthLimit:x,edgeLimit:P,onChild:T,msgPrefix:j}=r,_=Kl({maximumDepth:x,maximumBreadth:P}),B=Xl(S.level,S.bindings,S.log),N=Ht.bind({[Jt]:_}),A=i?Fl(i,N):{},E=i?{stringify:A[ea]}:{stringify:N},q="}"+(s?`\r
23
23
  `:`
24
- `),R=Ql.bind(null,{[Bi]:"",[Di]:o,[qi]:A,[Mi]:Ht,[Jt]:_,[$i]:N}),X="";l!==null&&(y===void 0?X=R(l):X=R(Object.assign({},l,{name:y})));let Dr=u instanceof Function?u:u?Ki:Sa,Bo=Dr().indexOf(":")+1;if(w&&!a)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(p&&typeof p!="function")throw Error(`Unknown mixin type "${typeof p}" - expected "function"`);if(j&&typeof j!="string")throw Error(`Unknown msgPrefix type "${typeof j}" - expected "string"`);Gl(h,a,w);let Mr=Fi(a,w);typeof n.emit=="function"&&n.emit("message",{code:"PINO_CONFIG",config:{levels:Mr,messageKey:f,errorKey:c}}),Yl(m);let Do=Jl(m);return Object.assign(t,{levels:Mr,[ya]:Do,[ga]:w,[oa]:n,[ia]:Dr,[sa]:Bo,[Mi]:Ht,[Jt]:_,[qi]:A,[fa]:q,[ca]:E,[la]:f,[aa]:c,[da]:d,[ma]:d?`,${JSON.stringify(d)}:{`:"",[Di]:o,[ha]:p,[ba]:b,[Bi]:X,[$i]:N,[pa]:O,silent:ta,onChild:T,[wa]:j}),Object.setPrototypeOf(t,Vl()),Hl(t),t[ua](h),t}I.exports=Yt;I.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=Ni(e.dest||process.stdout.fd),Pi(e)):Pi({dest:Ni(e),minLength:0});I.exports.transport=Pt();I.exports.multistream=ji();I.exports.levels=Fi();I.exports.stdSerializers=xa;I.exports.stdTimeFunctions=Object.assign({},Ii);I.exports.symbols=ki;I.exports.version=ra;I.exports.default=Yt;I.exports.pino=Yt});var Zt=v(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});var Ca=B("tty");function Ta(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if(r!=="default"){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var Xt=Ta(Ca),{env:H={},argv:Ui=[],platform:Aa=""}=typeof process>"u"?{}:process,ja="NO_COLOR"in H||Ui.includes("--no-color"),Pa="FORCE_COLOR"in H||Ui.includes("--color"),Na=Aa==="win32",Gi=H.TERM==="dumb",Ba=Xt&&Xt.isatty&&Xt.isatty(1)&&H.TERM&&!Gi,Da="CI"in H&&("GITHUB_ACTIONS"in H||"GITLAB_CI"in H||"CIRCLECI"in H),Hi=!ja&&(Pa||Na&&!Gi||Ba||Da),Ji=(e,t,r,n,i=t.substring(0,e)+n,s=t.substring(e+r.length),o=s.indexOf(r))=>i+(o<0?s:Ji(o,s,r,n)),Ma=(e,t,r,n,i)=>e<0?r+t+n:r+Ji(e,t,n,i)+n,qa=(e,t,r=e,n=e.length+1)=>i=>i||!(i===""||i===void 0)?Ma((""+i).indexOf(t,n),i,e,t,r):"",C=(e,t,r)=>qa(`\x1B[${e}m`,`\x1B[${t}m`,r),Vi={reset:C(0,0),bold:C(1,22,"\x1B[22m\x1B[1m"),dim:C(2,22,"\x1B[22m\x1B[2m"),italic:C(3,23),underline:C(4,24),inverse:C(7,27),hidden:C(8,28),strikethrough:C(9,29),black:C(30,39),red:C(31,39),green:C(32,39),yellow:C(33,39),blue:C(34,39),magenta:C(35,39),cyan:C(36,39),white:C(37,39),gray:C(90,39),bgBlack:C(40,49),bgRed:C(41,49),bgGreen:C(42,49),bgYellow:C(43,49),bgBlue:C(44,49),bgMagenta:C(45,49),bgCyan:C(46,49),bgWhite:C(47,49),blackBright:C(90,39),redBright:C(91,39),greenBright:C(92,39),yellowBright:C(93,39),blueBright:C(94,39),magentaBright:C(95,39),cyanBright:C(96,39),whiteBright:C(97,39),bgBlackBright:C(100,49),bgRedBright:C(101,49),bgGreenBright:C(102,49),bgYellowBright:C(103,49),bgBlueBright:C(104,49),bgMagentaBright:C(105,49),bgCyanBright:C(106,49),bgWhiteBright:C(107,49)},Yi=({useColor:e=Hi}={})=>e?Vi:Object.keys(Vi).reduce((t,r)=>({...t,[r]:String}),{}),{reset:$a,bold:Ra,dim:Ia,italic:ka,underline:Fa,inverse:Wa,hidden:Ka,strikethrough:za,black:Va,red:Ua,green:Ga,yellow:Ha,blue:Ja,magenta:Ya,cyan:Xa,white:Za,gray:Qa,bgBlack:ed,bgRed:td,bgGreen:rd,bgYellow:nd,bgBlue:id,bgMagenta:sd,bgCyan:od,bgWhite:ud,blackBright:fd,redBright:cd,greenBright:ld,yellowBright:ad,blueBright:dd,magentaBright:hd,cyanBright:yd,whiteBright:gd,bgBlackBright:pd,bgRedBright:md,bgGreenBright:bd,bgYellowBright:wd,bgBlueBright:Sd,bgMagentaBright:Ed,bgCyanBright:vd,bgWhiteBright:Od}=Yi();L.bgBlack=ed;L.bgBlackBright=pd;L.bgBlue=id;L.bgBlueBright=Sd;L.bgCyan=od;L.bgCyanBright=vd;L.bgGreen=rd;L.bgGreenBright=bd;L.bgMagenta=sd;L.bgMagentaBright=Ed;L.bgRed=td;L.bgRedBright=md;L.bgWhite=ud;L.bgWhiteBright=Od;L.bgYellow=nd;L.bgYellowBright=wd;L.black=Va;L.blackBright=fd;L.blue=Ja;L.blueBright=dd;L.bold=Ra;L.createColors=Yi;L.cyan=Xa;L.cyanBright=yd;L.dim=Ia;L.gray=Qa;L.green=Ga;L.greenBright=ld;L.hidden=Ka;L.inverse=Wa;L.isColorSupported=Hi;L.italic=ka;L.magenta=Ya;L.magentaBright=hd;L.red=Ua;L.redBright=cd;L.reset=$a;L.strikethrough=za;L.underline=Fa;L.white=Za;L.whiteBright=gd;L.yellow=Ha;L.yellowBright=ad});var Qi=v((Ug,Zi)=>{Zi.exports=Xi;function Xi(e,t){if(e&&t)return Xi(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){r[n]=e[n]}),r;function r(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var s=e.apply(this,n),o=n[n.length-1];return typeof s=="function"&&s!==o&&Object.keys(o).forEach(function(u){s[u]=o[u]}),s}}});var er=v((Gg,Qt)=>{var es=Qi();Qt.exports=es(We);Qt.exports.strict=es(ts);We.proto=We(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return We(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return ts(this)},configurable:!0})});function We(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function ts(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}});var is=v((Hg,ns)=>{var _d=er(),Ld=function(){},xd=global.Bare?queueMicrotask:process.nextTick.bind(process),Cd=function(e){return e.setHeader&&typeof e.abort=="function"},Td=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},rs=function(e,t,r){if(typeof t=="function")return rs(e,null,t);t||(t={}),r=_d(r||Ld);var n=e._writableState,i=e._readableState,s=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,u=!1,f=function(){e.writable||c()},c=function(){o=!1,s||r.call(e)},d=function(){s=!1,o||r.call(e)},l=function(p){r.call(e,p?new Error("exited with error code: "+p):null)},y=function(p){r.call(e,p)},h=function(){xd(a)},a=function(){if(!u){if(s&&!(i&&i.ended&&!i.destroyed))return r.call(e,new Error("premature close"));if(o&&!(n&&n.ended&&!n.destroyed))return r.call(e,new Error("premature close"))}},m=function(){e.req.on("finish",c)};return Cd(e)?(e.on("complete",c),e.on("abort",h),e.req?m():e.on("request",m)):o&&!n&&(e.on("end",f),e.on("close",f)),Td(e)&&e.on("exit",l),e.on("end",d),e.on("finish",c),t.error!==!1&&e.on("error",y),e.on("close",h),function(){u=!0,e.removeListener("complete",c),e.removeListener("abort",h),e.removeListener("request",m),e.req&&e.req.removeListener("finish",c),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",c),e.removeListener("exit",l),e.removeListener("end",d),e.removeListener("error",y),e.removeListener("close",h)}};ns.exports=rs});var us=v((Jg,os)=>{var Ad=er(),jd=is(),Ke;try{Ke=B("fs")}catch{}var pe=function(){},Pd=typeof process>"u"?!1:/^v?\.0/.test(process.version),ze=function(e){return typeof e=="function"},Nd=function(e){return!Pd||!Ke?!1:(e instanceof(Ke.ReadStream||pe)||e instanceof(Ke.WriteStream||pe))&&ze(e.close)},Bd=function(e){return e.setHeader&&ze(e.abort)},Dd=function(e,t,r,n){n=Ad(n);var i=!1;e.on("close",function(){i=!0}),jd(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var s=!1;return function(o){if(!i&&!s){if(s=!0,Nd(e))return e.close(pe);if(Bd(e))return e.abort();if(ze(e.destroy))return e.destroy();n(o||new Error("stream was destroyed"))}}},ss=function(e){e()},Md=function(e,t){return e.pipe(t)},qd=function(){var e=Array.prototype.slice.call(arguments),t=ze(e[e.length-1]||pe)&&e.pop()||pe;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,n=e.map(function(i,s){var o=s<e.length-1,u=s>0;return Dd(i,o,u,function(f){r||(r=f),f&&n.forEach(ss),!o&&(n.forEach(ss),t(r))})});return e.reduce(Md)};os.exports=qd});var as=v((Yg,ls)=>{"use strict";var{Transform:$d}=B("stream"),{StringDecoder:Rd}=B("string_decoder"),J=Symbol("last"),Ve=Symbol("decoder");function Id(e,t,r){let n;if(this.overflow){if(n=this[Ve].write(e).split(this.matcher),n.length===1)return r();n.shift(),this.overflow=!1}else this[J]+=this[Ve].write(e),n=this[J].split(this.matcher);this[J]=n.pop();for(let i=0;i<n.length;i++)try{cs(this,this.mapper(n[i]))}catch(s){return r(s)}if(this.overflow=this[J].length>this.maxLength,this.overflow&&!this.skipOverflow){r(new Error("maximum buffer reached"));return}r()}function kd(e){if(this[J]+=this[Ve].end(),this[J])try{cs(this,this.mapper(this[J]))}catch(t){return e(t)}e()}function cs(e,t){t!==void 0&&e.push(t)}function fs(e){return e}function Fd(e,t,r){switch(e=e||/\r?\n/,t=t||fs,r=r||{},arguments.length){case 1:typeof e=="function"?(t=e,e=/\r?\n/):typeof e=="object"&&!(e instanceof RegExp)&&!e[Symbol.split]&&(r=e,e=/\r?\n/);break;case 2:typeof e=="function"?(r=t,t=e,e=/\r?\n/):typeof t=="object"&&(r=t,t=fs)}r=Object.assign({},r),r.autoDestroy=!0,r.transform=Id,r.flush=kd,r.readableObjectMode=!0;let n=new $d(r);return n[J]="",n[Ve]=new Rd("utf8"),n.matcher=e,n.mapper=t,n.maxLength=r.maxLength,n.skipOverflow=r.skipOverflow||!1,n.overflow=!1,n._destroy=function(i,s){this._writableState.errorEmitted=!1,s(i)},n}ls.exports=Fd});var ps=v((Xg,gs)=>{"use strict";var ds=Symbol.for("pino.metadata"),Wd=as(),{Duplex:Kd}=B("stream"),{parentPort:hs,workerData:ys}=B("worker_threads");function zd(){let e,t,r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r}gs.exports=function(t,r={}){let n=r.expectPinoConfig===!0&&ys?.workerData?.pinoWillSendConfig===!0,i=r.parse==="lines",s=typeof r.parseLine=="function"?r.parseLine:JSON.parse,o=r.close||Vd,u=Wd(function(c){let d;try{d=s(c)}catch(l){this.emit("unknown",c,l);return}if(d===null){this.emit("unknown",c,"Null value ignored");return}return typeof d!="object"&&(d={data:d,time:Date.now()}),u[ds]&&(u.lastTime=d.time,u.lastLevel=d.level,u.lastObj=d),i?c:d},{autoDestroy:!0});if(u._destroy=function(c,d){let l=o(c,d);l&&typeof l.then=="function"&&l.then(d,d)},r.expectPinoConfig===!0&&ys?.workerData?.pinoWillSendConfig!==!0&&setImmediate(()=>{u.emit("error",new Error("This transport is not compatible with the current version of pino. Please upgrade pino to the latest version."))}),r.metadata!==!1&&(u[ds]=!0,u.lastTime=0,u.lastLevel=0,u.lastObj=null),n){let c={},d=zd();return hs.on("message",function l(y){y.code==="PINO_CONFIG"&&(c=y.config,d.resolve(),hs.off("message",l))}),Object.defineProperties(u,{levels:{get(){return c.levels}},messageKey:{get(){return c.messageKey}},errorKey:{get(){return c.errorKey}}}),d.then(f)}return f();function f(){let c=t(u);if(c&&typeof c.catch=="function")c.catch(d=>{u.destroy(d)}),c=null;else if(r.enablePipelining&&c)return Kd.from({writable:u,readable:c});return u}};function Vd(e,t){process.nextTick(t,e)}});var U=v((Zg,ms)=>{"use strict";ms.exports={DATE_FORMAT:"yyyy-mm-dd HH:MM:ss.l o",DATE_FORMAT_SIMPLE:"HH:MM:ss.l",ERROR_LIKE_KEYS:["err","error"],MESSAGE_KEY:"msg",LEVEL_KEY:"level",LEVEL_LABEL:"levelLabel",TIMESTAMP_KEY:"time",LEVELS:{default:"USERLVL",60:"FATAL",50:"ERROR",40:"WARN",30:"INFO",20:"DEBUG",10:"TRACE"},LEVEL_NAMES:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},LOGGER_KEYS:["pid","hostname","name","level","time","timestamp","caller"]}});var Ue=v((Qg,Ss)=>{"use strict";Ss.exports=Ud;var{LEVELS:bs,LEVEL_NAMES:ws}=U();function Ud(e,t,r){let n=e?t||bs:Object.assign({},bs,t),i=e?r||ws:Object.assign({},ws,r);return function(s){let o="default";return Number.isInteger(+s)?o=Object.prototype.hasOwnProperty.call(n,s)?s:o:o=Object.prototype.hasOwnProperty.call(i,s.toLowerCase())?i[s.toLowerCase()]:o,[n[o],o]}}});var ir=v((ep,_s)=>{"use strict";var V=e=>e,Ge={default:V,60:V,50:V,40:V,30:V,20:V,10:V,message:V,greyMessage:V,property:V},{createColors:Es}=Zt(),Gd=Ue(),be=Es({useColor:!0}),{white:tr,bgRed:Hd,red:Jd,yellow:Yd,green:Xd,blue:Zd,gray:rr,cyan:vs,magenta:Os}=be,me={default:tr,60:Hd,50:Jd,40:Yd,30:Xd,20:Zd,10:rr,message:vs,greyMessage:rr,property:Os};function Qd(e){return e.reduce(function(t,[r,n]){return t[r]=typeof be[n]=="function"?be[n]:tr,t},{default:tr,message:vs,greyMessage:rr,property:Os})}function nr(e){return function(t,r,{customLevels:n,customLevelNames:i}={}){let[s,o]=Gd(e,n,i)(t);return Object.prototype.hasOwnProperty.call(r,o)?r[o](s):r.default(s)}}function eh(e){let t=nr(e),r=function(n,i){return t(n,Ge,i)};return r.message=Ge.message,r.greyMessage=Ge.greyMessage,r.property=Ge.property,r.colors=Es({useColor:!1}),r}function th(e){let t=nr(e),r=function(n,i){return t(n,me,i)};return r.message=me.message,r.property=me.property,r.greyMessage=me.greyMessage,r.colors=be,r}function rh(e,t){let r=Qd(e),n=t?r:Object.assign({},me,r),i=nr(t),s=function(o,u){return i(o,n,u)};return s.colors=be,s.message=s.message||n.message,s.property=s.property||n.property,s.greyMessage=s.greyMessage||n.greyMessage,s}_s.exports=function(t=!1,r,n){return t&&r!==void 0?rh(r,n):t?th(n):eh(n)}});var sr=v((tp,Ls)=>{"use strict";Ls.exports=function(){}});var Cs=v((rp,xs)=>{"use strict";xs.exports=sh;var{isMainThread:nh}=B("node:worker_threads"),ih=Ot(),He=sr();function sh(e){let t=new ih(e);return t.on("error",r),!e.sync&&nh&&oh(t),t;function r(n){if(n.code==="EPIPE"){t.write=He,t.end=He,t.flushSync=He,t.destroy=He;return}t.removeListener("error",r)}}function oh(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=Ne();t.register(e,uh),e.on("close",function(){t.unregister(e)})}}function uh(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}});var Je=v((np,Ts)=>{"use strict";Ts.exports=fh;function fh(e){return e instanceof Date&&!Number.isNaN(e.getTime())}});var or=v((ip,As)=>{"use strict";As.exports=lh;var ch=Je();function lh(e){let t=new Date(e);return ch(t)||(t=new Date(+e)),t}});var Ye=v((sp,js)=>{"use strict";js.exports=ah;function ah(e){let t=[],r=!1,n="";for(let i=0;i<e.length;i++){let s=e.charAt(i);if(s==="\\"){r=!0;continue}if(r){r=!1,n+=s;continue}if(s==="."){t.push(n),n="";continue}n+=s}return n.length&&t.push(n),t}});var ue=v((op,Ps)=>{"use strict";Ps.exports=hh;var dh=Ye();function hh(e,t){let r=Array.isArray(t)?t:dh(t);for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))return;e=e[n]}return e}});var ur=v((up,Ns)=>{"use strict";Ns.exports=ph;var yh=ue(),gh=Ye();function ph(e,t){let r=gh(t),n=r.pop();e=yh(e,r),e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}});var Ks=v(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});var mh=Function.prototype.toString,fr=Object.create,bh=Object.prototype.toString,wh=(function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(t){return!!~this._keys.indexOf(t)},e.prototype.get=function(t){return this._values[this._keys.indexOf(t)]},e.prototype.set=function(t,r){this._keys.push(t),this._values.push(r)},e})();function Sh(){return new wh}function Eh(){return new WeakMap}var vh=typeof WeakMap<"u"?Eh:Sh;function lr(e){if(!e)return fr(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:fr(e);if(t&&~mh.call(t).indexOf("[native code]"))try{return new t}catch{}return fr(e)}function Oh(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}function _h(e){return e.flags}var Lh=/test/g.flags==="g"?_h:Oh;function Bs(e){var t=bh.call(e);return t.substring(8,t.length-1)}function xh(e){return e[Symbol.toStringTag]||Bs(e)}var Ch=typeof Symbol<"u"?xh:Bs,Th=Object.defineProperty,Ah=Object.getOwnPropertyDescriptor,Ds=Object.getOwnPropertyNames,ar=Object.getOwnPropertySymbols,Ms=Object.prototype,qs=Ms.hasOwnProperty,jh=Ms.propertyIsEnumerable,$s=typeof ar=="function";function Ph(e){return Ds(e).concat(ar(e))}var Nh=$s?Ph:Ds;function Ze(e,t,r){for(var n=Nh(e),i=0,s=n.length,o=void 0,u=void 0;i<s;++i)if(o=n[i],!(o==="callee"||o==="caller")){if(u=Ah(e,o),!u){t[o]=r.copier(e[o],r);continue}!u.get&&!u.set&&(u.value=r.copier(u.value,r));try{Th(t,o,u)}catch{t[o]=u.value}}return t}function Bh(e,t){var r=new t.Constructor;t.cache.set(e,r);for(var n=0,i=e.length;n<i;++n)r[n]=t.copier(e[n],t);return r}function Dh(e,t){var r=new t.Constructor;return t.cache.set(e,r),Ze(e,r,t)}function Rs(e,t){return e.slice(0)}function Mh(e,t){return e.slice(0,e.size,e.type)}function qh(e,t){return new t.Constructor(Rs(e.buffer))}function $h(e,t){return new t.Constructor(e.getTime())}function Is(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n,i){r.set(i,t.copier(n,t))}),r}function Rh(e,t){return Ze(e,Is(e,t),t)}function Ih(e,t){var r=lr(t.prototype);t.cache.set(e,r);for(var n in e)qs.call(e,n)&&(r[n]=t.copier(e[n],t));return r}function kh(e,t){var r=lr(t.prototype);t.cache.set(e,r);for(var n in e)qs.call(e,n)&&(r[n]=t.copier(e[n],t));for(var i=ar(e),s=0,o=i.length,u=void 0;s<o;++s)u=i[s],jh.call(e,u)&&(r[u]=t.copier(e[u],t));return r}var Fh=$s?kh:Ih;function Wh(e,t){var r=lr(t.prototype);return t.cache.set(e,r),Ze(e,r,t)}function cr(e,t){return new t.Constructor(e.valueOf())}function Kh(e,t){var r=new t.Constructor(e.source,Lh(e));return r.lastIndex=e.lastIndex,r}function Xe(e,t){return e}function ks(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n){r.add(t.copier(n,t))}),r}function zh(e,t){return Ze(e,ks(e,t),t)}var Vh=Array.isArray,dr=Object.assign,Uh=Object.getPrototypeOf||(function(e){return e.__proto__}),Fs={array:Bh,arrayBuffer:Rs,blob:Mh,dataView:qh,date:$h,error:Xe,map:Is,object:Fh,regExp:Kh,set:ks},Gh=dr({},Fs,{array:Dh,map:Rh,object:Wh,set:zh});function Hh(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:cr,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:cr,Object:e.object,Promise:Xe,RegExp:e.regExp,Set:e.set,String:cr,WeakMap:Xe,WeakSet:Xe,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}function hr(e){var t=dr({},Fs,e),r=Hh(t),n=r.Array,i=r.Object;function s(o,u){if(u.prototype=u.Constructor=void 0,!o||typeof o!="object")return o;if(u.cache.has(o))return u.cache.get(o);if(u.prototype=Uh(o),u.Constructor=u.prototype&&u.prototype.constructor,!u.Constructor||u.Constructor===Object)return i(o,u);if(Vh(o))return n(o,u);var f=r[Ch(o)];return f?f(o,u):typeof o.then=="function"?o:i(o,u)}return function(u){return s(u,{Constructor:void 0,cache:vh(),copier:s,prototype:void 0})}}function Ws(e){return hr(dr({},Gh,e))}var Jh=Ws({}),Yh=hr({});fe.copyStrict=Jh;fe.createCopier=hr;fe.createStrictCopier=Ws;fe.default=Yh});var yr=v((cp,zs)=>{"use strict";zs.exports=ey;var{createCopier:Xh}=Ks(),Zh=Xh({}),Qh=ur();function ey({log:e,context:t}){let{ignoreKeys:r,includeKeys:n}=t,i=Zh(e);if(n){let s={};return n.forEach(o=>{s[o]=i[o]}),s}return r.forEach(s=>{Qh(i,s)}),i}});var Us=v((gr,Vs)=>{"use strict";function ce(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ce=function(r){return typeof r}:ce=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ce(e)}(function(e){var t=arguments,r=(function(){var f=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,c=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g;return function(l,y,h,a){if(t.length===1&&u(l)==="string"&&!/\d/.test(l)&&(y=l,l=void 0),l=l||l===0?l:new Date,l instanceof Date||(l=new Date(l)),isNaN(l))throw TypeError("Invalid date");y=String(r.masks[y]||y||r.masks.default);var m=y.slice(0,4);(m==="UTC:"||m==="GMT:")&&(y=y.slice(4),h=!0,m==="GMT:"&&(a=!0));var p=function(){return h?"getUTC":"get"},b=function(){return l[p()+"Date"]()},w=function(){return l[p()+"Day"]()},S=function(){return l[p()+"Month"]()},O=function(){return l[p()+"FullYear"]()},x=function(){return l[p()+"Hours"]()},P=function(){return l[p()+"Minutes"]()},T=function(){return l[p()+"Seconds"]()},j=function(){return l[p()+"Milliseconds"]()},_=function(){return h?0:l.getTimezoneOffset()},N=function(){return s(l)},D=function(){return o(l)},A={d:function(){return b()},dd:function(){return n(b())},ddd:function(){return r.i18n.dayNames[w()]},DDD:function(){return i({y:O(),m:S(),d:b(),_:p(),dayName:r.i18n.dayNames[w()],short:!0})},dddd:function(){return r.i18n.dayNames[w()+7]},DDDD:function(){return i({y:O(),m:S(),d:b(),_:p(),dayName:r.i18n.dayNames[w()+7]})},m:function(){return S()+1},mm:function(){return n(S()+1)},mmm:function(){return r.i18n.monthNames[S()]},mmmm:function(){return r.i18n.monthNames[S()+12]},yy:function(){return String(O()).slice(2)},yyyy:function(){return n(O(),4)},h:function(){return x()%12||12},hh:function(){return n(x()%12||12)},H:function(){return x()},HH:function(){return n(x())},M:function(){return P()},MM:function(){return n(P())},s:function(){return T()},ss:function(){return n(T())},l:function(){return n(j(),3)},L:function(){return n(Math.floor(j()/10))},t:function(){return x()<12?r.i18n.timeNames[0]:r.i18n.timeNames[1]},tt:function(){return x()<12?r.i18n.timeNames[2]:r.i18n.timeNames[3]},T:function(){return x()<12?r.i18n.timeNames[4]:r.i18n.timeNames[5]},TT:function(){return x()<12?r.i18n.timeNames[6]:r.i18n.timeNames[7]},Z:function(){return a?"GMT":h?"UTC":(String(l).match(c)||[""]).pop().replace(d,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(_()>0?"-":"+")+n(Math.floor(Math.abs(_())/60)*100+Math.abs(_())%60,4)},p:function(){return(_()>0?"-":"+")+n(Math.floor(Math.abs(_())/60),2)+":"+n(Math.floor(Math.abs(_())%60),2)},S:function(){return["th","st","nd","rd"][b()%10>3?0:(b()%100-b()%10!=10)*b()%10]},W:function(){return N()},WW:function(){return n(N())},N:function(){return D()}};return y.replace(f,function(E){return E in A?A[E]():E.slice(1,E.length-1)})}})();r.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},r.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]};var n=function(c,d){for(c=String(c),d=d||2;c.length<d;)c="0"+c;return c},i=function(c){var d=c.y,l=c.m,y=c.d,h=c._,a=c.dayName,m=c.short,p=m===void 0?!1:m,b=new Date,w=new Date;w.setDate(w[h+"Date"]()-1);var S=new Date;S.setDate(S[h+"Date"]()+1);var O=function(){return b[h+"Date"]()},x=function(){return b[h+"Month"]()},P=function(){return b[h+"FullYear"]()},T=function(){return w[h+"Date"]()},j=function(){return w[h+"Month"]()},_=function(){return w[h+"FullYear"]()},N=function(){return S[h+"Date"]()},D=function(){return S[h+"Month"]()},A=function(){return S[h+"FullYear"]()};return P()===d&&x()===l&&O()===y?p?"Tdy":"Today":_()===d&&j()===l&&T()===y?p?"Ysd":"Yesterday":A()===d&&D()===l&&N()===y?p?"Tmw":"Tomorrow":a},s=function(c){var d=new Date(c.getFullYear(),c.getMonth(),c.getDate());d.setDate(d.getDate()-(d.getDay()+6)%7+3);var l=new Date(d.getFullYear(),0,4);l.setDate(l.getDate()-(l.getDay()+6)%7+3);var y=d.getTimezoneOffset()-l.getTimezoneOffset();d.setHours(d.getHours()-y);var h=(d-l)/(864e5*7);return 1+Math.floor(h)},o=function(c){var d=c.getDay();return d===0&&(d=7),d},u=function(c){return c===null?"null":c===void 0?"undefined":ce(c)!=="object"?ce(c):Array.isArray(c)?"array":{}.toString.call(c).slice(8,-1).toLowerCase()};typeof define=="function"&&define.amd?define(function(){return r}):(typeof gr>"u"?"undefined":ce(gr))==="object"?Vs.exports=r:e.dateFormat=r})(void 0)});var pr=v((lp,Gs)=>{"use strict";Gs.exports=sy;var{DATE_FORMAT:ty,DATE_FORMAT_SIMPLE:ry}=U(),we=Us(),ny=or(),iy=Je();function sy(e,t=!1){if(t===!1)return e;let r=ny(e);if(!iy(r))return e;if(t===!0)return we(r,ry);let n=t.toUpperCase();if(n==="SYS:STANDARD")return we(r,ty);let i=n.substr(0,4);return i==="SYS:"||i==="UTC:"?i==="UTC:"?we(r,t):we(r,t.slice(4)):we(r,`UTC:${t}`)}});var mr=v((ap,Hs)=>{"use strict";Hs.exports=oy;function oy(e){return e?typeof e=="string"?e.split(",").reduce((t,r,n)=>{let[i,s=n]=r.split(":");return t[i.toLowerCase()]=s,t},{}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{}):{}:{}}});var br=v((dp,Js)=>{"use strict";Js.exports=uy;function uy(e){return e?typeof e=="string"?e.split(",").reduce((t,r,n)=>{let[i,s=n]=r.split(":");return t[s]=i.toUpperCase(),t},{default:"USERLVL"}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((t,r)=>(t[e[r]]=r.toUpperCase(),t),{default:"USERLVL"}):{}:{}}});var wr=v((hp,Ys)=>{"use strict";Ys.exports=cy;var fy=ue();function cy(e,t){return e=e.replace(/{if (.*?)}(.*?){end}/g,r),e=e.replace(/{if (.*?)}/g,""),e=e.replace(/{end}/g,""),e.replace(/\s+/g," ").trim();function r(n,i,s){let o=fy(t,i);return o&&s.includes(i)?s.replace(new RegExp("{"+i+"}","g"),o):""}}});var Qe=v((yp,Xs)=>{"use strict";Xs.exports=ly;function ly(e){return Object.prototype.toString.apply(e)==="[object Object]"}});var Se=v((gp,Zs)=>{"use strict";Zs.exports=ay;function ay({input:e,ident:t=" ",eol:r=`
25
- `}){let n=e.split(/\r?\n/);for(let i=1;i<n.length;i+=1)n[i]=t+n[i];return n.join(r)}});var ro=v((pp,to)=>{"use strict";to.exports=gy;var{LEVEL_NAMES:Qs}=U(),eo=ir(),dy=br(),hy=mr(),yy=Ue();function gy(e){let t=e.crlf?`\r
24
+ `),R=Yl.bind(null,{[Bi]:"",[Di]:o,[Mi]:A,[Ni]:Ht,[Jt]:_,[qi]:B}),X="";l!==null&&(y===void 0?X=R(l):X=R(Object.assign({},l,{name:y})));let Nr=u instanceof Function?u:u?Wi:ma,Bo=Nr().indexOf(":")+1;if(w&&!a)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(p&&typeof p!="function")throw Error(`Unknown mixin type "${typeof p}" - expected "function"`);if(j&&typeof j!="string")throw Error(`Unknown msgPrefix type "${typeof j}" - expected "string"`);zl(h,a,w);let Mr=ki(a,w);typeof n.emit=="function"&&n.emit("message",{code:"PINO_CONFIG",config:{levels:Mr,messageKey:f,errorKey:c}}),Gl(m);let Do=Ul(m);return Object.assign(t,{levels:Mr,[aa]:Do,[da]:w,[na]:n,[ta]:Nr,[ra]:Bo,[Ni]:Ht,[Jt]:_,[Mi]:A,[sa]:q,[oa]:E,[ua]:f,[fa]:c,[ca]:d,[ya]:d?`,${JSON.stringify(d)}:{`:"",[Di]:o,[la]:p,[ga]:b,[Bi]:X,[qi]:B,[ha]:O,silent:Zl,onChild:T,[pa]:j}),Object.setPrototypeOf(t,Wl()),Vl(t),t[ia](h),t}I.exports=Yt;I.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=Pi(e.dest||process.stdout.fd),ji(e)):ji({dest:Pi(e),minLength:0});I.exports.transport=Pt();I.exports.multistream=Ai();I.exports.levels=ki();I.exports.stdSerializers=Oa;I.exports.stdTimeFunctions=Object.assign({},Ri);I.exports.symbols=Ii;I.exports.version=Ql;I.exports.default=Yt;I.exports.pino=Yt});var Zt=v(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});var _a=D("tty");function La(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if(r!=="default"){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var Xt=La(_a),{env:H={},argv:Vi=[],platform:xa=""}=typeof process>"u"?{}:process,Ca="NO_COLOR"in H||Vi.includes("--no-color"),Ta="FORCE_COLOR"in H||Vi.includes("--color"),Aa=xa==="win32",Ui=H.TERM==="dumb",ja=Xt&&Xt.isatty&&Xt.isatty(1)&&H.TERM&&!Ui,Pa="CI"in H&&("GITHUB_ACTIONS"in H||"GITLAB_CI"in H||"CIRCLECI"in H),Gi=!Ca&&(Ta||Aa&&!Ui||ja||Pa),Hi=(e,t,r,n,i=t.substring(0,e)+n,s=t.substring(e+r.length),o=s.indexOf(r))=>i+(o<0?s:Hi(o,s,r,n)),Ba=(e,t,r,n,i)=>e<0?r+t+n:r+Hi(e,t,n,i)+n,Da=(e,t,r=e,n=e.length+1)=>i=>i||!(i===""||i===void 0)?Ba((""+i).indexOf(t,n),i,e,t,r):"",C=(e,t,r)=>Da(`\x1B[${e}m`,`\x1B[${t}m`,r),zi={reset:C(0,0),bold:C(1,22,"\x1B[22m\x1B[1m"),dim:C(2,22,"\x1B[22m\x1B[2m"),italic:C(3,23),underline:C(4,24),inverse:C(7,27),hidden:C(8,28),strikethrough:C(9,29),black:C(30,39),red:C(31,39),green:C(32,39),yellow:C(33,39),blue:C(34,39),magenta:C(35,39),cyan:C(36,39),white:C(37,39),gray:C(90,39),bgBlack:C(40,49),bgRed:C(41,49),bgGreen:C(42,49),bgYellow:C(43,49),bgBlue:C(44,49),bgMagenta:C(45,49),bgCyan:C(46,49),bgWhite:C(47,49),blackBright:C(90,39),redBright:C(91,39),greenBright:C(92,39),yellowBright:C(93,39),blueBright:C(94,39),magentaBright:C(95,39),cyanBright:C(96,39),whiteBright:C(97,39),bgBlackBright:C(100,49),bgRedBright:C(101,49),bgGreenBright:C(102,49),bgYellowBright:C(103,49),bgBlueBright:C(104,49),bgMagentaBright:C(105,49),bgCyanBright:C(106,49),bgWhiteBright:C(107,49)},Ji=({useColor:e=Gi}={})=>e?zi:Object.keys(zi).reduce((t,r)=>({...t,[r]:String}),{}),{reset:Na,bold:Ma,dim:qa,italic:$a,underline:Ra,inverse:Ia,hidden:ka,strikethrough:Fa,black:Wa,red:Ka,green:za,yellow:Va,blue:Ua,magenta:Ga,cyan:Ha,white:Ja,gray:Ya,bgBlack:Xa,bgRed:Za,bgGreen:Qa,bgYellow:ed,bgBlue:td,bgMagenta:rd,bgCyan:nd,bgWhite:id,blackBright:sd,redBright:od,greenBright:ud,yellowBright:fd,blueBright:cd,magentaBright:ld,cyanBright:ad,whiteBright:dd,bgBlackBright:hd,bgRedBright:yd,bgGreenBright:gd,bgYellowBright:pd,bgBlueBright:md,bgMagentaBright:bd,bgCyanBright:wd,bgWhiteBright:Sd}=Ji();L.bgBlack=Xa;L.bgBlackBright=hd;L.bgBlue=td;L.bgBlueBright=md;L.bgCyan=nd;L.bgCyanBright=wd;L.bgGreen=Qa;L.bgGreenBright=gd;L.bgMagenta=rd;L.bgMagentaBright=bd;L.bgRed=Za;L.bgRedBright=yd;L.bgWhite=id;L.bgWhiteBright=Sd;L.bgYellow=ed;L.bgYellowBright=pd;L.black=Wa;L.blackBright=sd;L.blue=Ua;L.blueBright=cd;L.bold=Ma;L.createColors=Ji;L.cyan=Ha;L.cyanBright=ad;L.dim=qa;L.gray=Ya;L.green=za;L.greenBright=ud;L.hidden=ka;L.inverse=Ia;L.isColorSupported=Gi;L.italic=$a;L.magenta=Ga;L.magentaBright=ld;L.red=Ka;L.redBright=od;L.reset=Na;L.strikethrough=Fa;L.underline=Ra;L.white=Ja;L.whiteBright=dd;L.yellow=Va;L.yellowBright=fd});var Zi=v((Kg,Xi)=>{Xi.exports=Yi;function Yi(e,t){if(e&&t)return Yi(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){r[n]=e[n]}),r;function r(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var s=e.apply(this,n),o=n[n.length-1];return typeof s=="function"&&s!==o&&Object.keys(o).forEach(function(u){s[u]=o[u]}),s}}});var er=v((zg,Qt)=>{var Qi=Zi();Qt.exports=Qi(We);Qt.exports.strict=Qi(es);We.proto=We(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return We(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return es(this)},configurable:!0})});function We(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function es(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}});var ns=v((Vg,rs)=>{var Ed=er(),vd=function(){},Od=global.Bare?queueMicrotask:process.nextTick.bind(process),_d=function(e){return e.setHeader&&typeof e.abort=="function"},Ld=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},ts=function(e,t,r){if(typeof t=="function")return ts(e,null,t);t||(t={}),r=Ed(r||vd);var n=e._writableState,i=e._readableState,s=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,u=!1,f=function(){e.writable||c()},c=function(){o=!1,s||r.call(e)},d=function(){s=!1,o||r.call(e)},l=function(p){r.call(e,p?new Error("exited with error code: "+p):null)},y=function(p){r.call(e,p)},h=function(){Od(a)},a=function(){if(!u){if(s&&!(i&&i.ended&&!i.destroyed))return r.call(e,new Error("premature close"));if(o&&!(n&&n.ended&&!n.destroyed))return r.call(e,new Error("premature close"))}},m=function(){e.req.on("finish",c)};return _d(e)?(e.on("complete",c),e.on("abort",h),e.req?m():e.on("request",m)):o&&!n&&(e.on("end",f),e.on("close",f)),Ld(e)&&e.on("exit",l),e.on("end",d),e.on("finish",c),t.error!==!1&&e.on("error",y),e.on("close",h),function(){u=!0,e.removeListener("complete",c),e.removeListener("abort",h),e.removeListener("request",m),e.req&&e.req.removeListener("finish",c),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",c),e.removeListener("exit",l),e.removeListener("end",d),e.removeListener("error",y),e.removeListener("close",h)}};rs.exports=ts});var os=v((Ug,ss)=>{var xd=er(),Cd=ns(),Ke;try{Ke=D("fs")}catch{}var pe=function(){},Td=typeof process>"u"?!1:/^v?\.0/.test(process.version),ze=function(e){return typeof e=="function"},Ad=function(e){return!Td||!Ke?!1:(e instanceof(Ke.ReadStream||pe)||e instanceof(Ke.WriteStream||pe))&&ze(e.close)},jd=function(e){return e.setHeader&&ze(e.abort)},Pd=function(e,t,r,n){n=xd(n);var i=!1;e.on("close",function(){i=!0}),Cd(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var s=!1;return function(o){if(!i&&!s){if(s=!0,Ad(e))return e.close(pe);if(jd(e))return e.abort();if(ze(e.destroy))return e.destroy();n(o||new Error("stream was destroyed"))}}},is=function(e){e()},Bd=function(e,t){return e.pipe(t)},Dd=function(){var e=Array.prototype.slice.call(arguments),t=ze(e[e.length-1]||pe)&&e.pop()||pe;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,n=e.map(function(i,s){var o=s<e.length-1,u=s>0;return Pd(i,o,u,function(f){r||(r=f),f&&n.forEach(is),!o&&(n.forEach(is),t(r))})});return e.reduce(Bd)};ss.exports=Dd});var ls=v((Gg,cs)=>{"use strict";var{Transform:Nd}=D("stream"),{StringDecoder:Md}=D("string_decoder"),J=Symbol("last"),Ve=Symbol("decoder");function qd(e,t,r){let n;if(this.overflow){if(n=this[Ve].write(e).split(this.matcher),n.length===1)return r();n.shift(),this.overflow=!1}else this[J]+=this[Ve].write(e),n=this[J].split(this.matcher);this[J]=n.pop();for(let i=0;i<n.length;i++)try{fs(this,this.mapper(n[i]))}catch(s){return r(s)}if(this.overflow=this[J].length>this.maxLength,this.overflow&&!this.skipOverflow){r(new Error("maximum buffer reached"));return}r()}function $d(e){if(this[J]+=this[Ve].end(),this[J])try{fs(this,this.mapper(this[J]))}catch(t){return e(t)}e()}function fs(e,t){t!==void 0&&e.push(t)}function us(e){return e}function Rd(e,t,r){switch(e=e||/\r?\n/,t=t||us,r=r||{},arguments.length){case 1:typeof e=="function"?(t=e,e=/\r?\n/):typeof e=="object"&&!(e instanceof RegExp)&&!e[Symbol.split]&&(r=e,e=/\r?\n/);break;case 2:typeof e=="function"?(r=t,t=e,e=/\r?\n/):typeof t=="object"&&(r=t,t=us)}r=Object.assign({},r),r.autoDestroy=!0,r.transform=qd,r.flush=$d,r.readableObjectMode=!0;let n=new Nd(r);return n[J]="",n[Ve]=new Md("utf8"),n.matcher=e,n.mapper=t,n.maxLength=r.maxLength,n.skipOverflow=r.skipOverflow||!1,n.overflow=!1,n._destroy=function(i,s){this._writableState.errorEmitted=!1,s(i)},n}cs.exports=Rd});var gs=v((Hg,ys)=>{"use strict";var as=Symbol.for("pino.metadata"),Id=ls(),{Duplex:kd}=D("stream"),{parentPort:ds,workerData:hs}=D("worker_threads");function Fd(){let e,t,r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r}ys.exports=function(t,r={}){let n=r.expectPinoConfig===!0&&hs?.workerData?.pinoWillSendConfig===!0,i=r.parse==="lines",s=typeof r.parseLine=="function"?r.parseLine:JSON.parse,o=r.close||Wd,u=Id(function(c){let d;try{d=s(c)}catch(l){this.emit("unknown",c,l);return}if(d===null){this.emit("unknown",c,"Null value ignored");return}return typeof d!="object"&&(d={data:d,time:Date.now()}),u[as]&&(u.lastTime=d.time,u.lastLevel=d.level,u.lastObj=d),i?c:d},{autoDestroy:!0});if(u._destroy=function(c,d){let l=o(c,d);l&&typeof l.then=="function"&&l.then(d,d)},r.expectPinoConfig===!0&&hs?.workerData?.pinoWillSendConfig!==!0&&setImmediate(()=>{u.emit("error",new Error("This transport is not compatible with the current version of pino. Please upgrade pino to the latest version."))}),r.metadata!==!1&&(u[as]=!0,u.lastTime=0,u.lastLevel=0,u.lastObj=null),n){let c={},d=Fd();return ds.on("message",function l(y){y.code==="PINO_CONFIG"&&(c=y.config,d.resolve(),ds.off("message",l))}),Object.defineProperties(u,{levels:{get(){return c.levels}},messageKey:{get(){return c.messageKey}},errorKey:{get(){return c.errorKey}}}),d.then(f)}return f();function f(){let c=t(u);if(c&&typeof c.catch=="function")c.catch(d=>{u.destroy(d)}),c=null;else if(r.enablePipelining&&c)return kd.from({writable:u,readable:c});return u}};function Wd(e,t){process.nextTick(t,e)}});var U=v((Jg,ps)=>{"use strict";ps.exports={DATE_FORMAT:"yyyy-mm-dd HH:MM:ss.l o",DATE_FORMAT_SIMPLE:"HH:MM:ss.l",ERROR_LIKE_KEYS:["err","error"],MESSAGE_KEY:"msg",LEVEL_KEY:"level",LEVEL_LABEL:"levelLabel",TIMESTAMP_KEY:"time",LEVELS:{default:"USERLVL",60:"FATAL",50:"ERROR",40:"WARN",30:"INFO",20:"DEBUG",10:"TRACE"},LEVEL_NAMES:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},LOGGER_KEYS:["pid","hostname","name","level","time","timestamp","caller"]}});var Ue=v((Yg,ws)=>{"use strict";ws.exports=Kd;var{LEVELS:ms,LEVEL_NAMES:bs}=U();function Kd(e,t,r){let n=e?t||ms:Object.assign({},ms,t),i=e?r||bs:Object.assign({},bs,r);return function(s){let o="default";return Number.isInteger(+s)?o=Object.prototype.hasOwnProperty.call(n,s)?s:o:o=Object.prototype.hasOwnProperty.call(i,s.toLowerCase())?i[s.toLowerCase()]:o,[n[o],o]}}});var ir=v((Xg,Os)=>{"use strict";var V=e=>e,Ge={default:V,60:V,50:V,40:V,30:V,20:V,10:V,message:V,greyMessage:V,property:V},{createColors:Ss}=Zt(),zd=Ue(),be=Ss({useColor:!0}),{white:tr,bgRed:Vd,red:Ud,yellow:Gd,green:Hd,blue:Jd,gray:rr,cyan:Es,magenta:vs}=be,me={default:tr,60:Vd,50:Ud,40:Gd,30:Hd,20:Jd,10:rr,message:Es,greyMessage:rr,property:vs};function Yd(e){return e.reduce(function(t,[r,n]){return t[r]=typeof be[n]=="function"?be[n]:tr,t},{default:tr,message:Es,greyMessage:rr,property:vs})}function nr(e){return function(t,r,{customLevels:n,customLevelNames:i}={}){let[s,o]=zd(e,n,i)(t);return Object.prototype.hasOwnProperty.call(r,o)?r[o](s):r.default(s)}}function Xd(e){let t=nr(e),r=function(n,i){return t(n,Ge,i)};return r.message=Ge.message,r.greyMessage=Ge.greyMessage,r.property=Ge.property,r.colors=Ss({useColor:!1}),r}function Zd(e){let t=nr(e),r=function(n,i){return t(n,me,i)};return r.message=me.message,r.property=me.property,r.greyMessage=me.greyMessage,r.colors=be,r}function Qd(e,t){let r=Yd(e),n=t?r:Object.assign({},me,r),i=nr(t),s=function(o,u){return i(o,n,u)};return s.colors=be,s.message=s.message||n.message,s.property=s.property||n.property,s.greyMessage=s.greyMessage||n.greyMessage,s}Os.exports=function(t=!1,r,n){return t&&r!==void 0?Qd(r,n):t?Zd(n):Xd(n)}});var sr=v((Zg,_s)=>{"use strict";_s.exports=function(){}});var xs=v((Qg,Ls)=>{"use strict";Ls.exports=rh;var{isMainThread:eh}=D("node:worker_threads"),th=Ot(),He=sr();function rh(e){let t=new th(e);return t.on("error",r),!e.sync&&eh&&nh(t),t;function r(n){if(n.code==="EPIPE"){t.write=He,t.end=He,t.flushSync=He,t.destroy=He;return}t.removeListener("error",r)}}function nh(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=Be();t.register(e,ih),e.on("close",function(){t.unregister(e)})}}function ih(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}});var Je=v((ep,Cs)=>{"use strict";Cs.exports=sh;function sh(e){return e instanceof Date&&!Number.isNaN(e.getTime())}});var or=v((tp,Ts)=>{"use strict";Ts.exports=uh;var oh=Je();function uh(e){let t=new Date(e);return oh(t)||(t=new Date(+e)),t}});var Ye=v((rp,As)=>{"use strict";As.exports=fh;function fh(e){let t=[],r=!1,n="";for(let i=0;i<e.length;i++){let s=e.charAt(i);if(s==="\\"){r=!0;continue}if(r){r=!1,n+=s;continue}if(s==="."){t.push(n),n="";continue}n+=s}return n.length&&t.push(n),t}});var ue=v((np,js)=>{"use strict";js.exports=lh;var ch=Ye();function lh(e,t){let r=Array.isArray(t)?t:ch(t);for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))return;e=e[n]}return e}});var ur=v((ip,Ps)=>{"use strict";Ps.exports=hh;var ah=ue(),dh=Ye();function hh(e,t){let r=dh(t),n=r.pop();e=ah(e,r),e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}});var Ws=v(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});var yh=Function.prototype.toString,fr=Object.create,gh=Object.prototype.toString,ph=(function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(t){return!!~this._keys.indexOf(t)},e.prototype.get=function(t){return this._values[this._keys.indexOf(t)]},e.prototype.set=function(t,r){this._keys.push(t),this._values.push(r)},e})();function mh(){return new ph}function bh(){return new WeakMap}var wh=typeof WeakMap<"u"?bh:mh;function lr(e){if(!e)return fr(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:fr(e);if(t&&~yh.call(t).indexOf("[native code]"))try{return new t}catch{}return fr(e)}function Sh(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}function Eh(e){return e.flags}var vh=/test/g.flags==="g"?Eh:Sh;function Bs(e){var t=gh.call(e);return t.substring(8,t.length-1)}function Oh(e){return e[Symbol.toStringTag]||Bs(e)}var _h=typeof Symbol<"u"?Oh:Bs,Lh=Object.defineProperty,xh=Object.getOwnPropertyDescriptor,Ds=Object.getOwnPropertyNames,ar=Object.getOwnPropertySymbols,Ns=Object.prototype,Ms=Ns.hasOwnProperty,Ch=Ns.propertyIsEnumerable,qs=typeof ar=="function";function Th(e){return Ds(e).concat(ar(e))}var Ah=qs?Th:Ds;function Ze(e,t,r){for(var n=Ah(e),i=0,s=n.length,o=void 0,u=void 0;i<s;++i)if(o=n[i],!(o==="callee"||o==="caller")){if(u=xh(e,o),!u){t[o]=r.copier(e[o],r);continue}!u.get&&!u.set&&(u.value=r.copier(u.value,r));try{Lh(t,o,u)}catch{t[o]=u.value}}return t}function jh(e,t){var r=new t.Constructor;t.cache.set(e,r);for(var n=0,i=e.length;n<i;++n)r[n]=t.copier(e[n],t);return r}function Ph(e,t){var r=new t.Constructor;return t.cache.set(e,r),Ze(e,r,t)}function $s(e,t){return e.slice(0)}function Bh(e,t){return e.slice(0,e.size,e.type)}function Dh(e,t){return new t.Constructor($s(e.buffer))}function Nh(e,t){return new t.Constructor(e.getTime())}function Rs(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n,i){r.set(i,t.copier(n,t))}),r}function Mh(e,t){return Ze(e,Rs(e,t),t)}function qh(e,t){var r=lr(t.prototype);t.cache.set(e,r);for(var n in e)Ms.call(e,n)&&(r[n]=t.copier(e[n],t));return r}function $h(e,t){var r=lr(t.prototype);t.cache.set(e,r);for(var n in e)Ms.call(e,n)&&(r[n]=t.copier(e[n],t));for(var i=ar(e),s=0,o=i.length,u=void 0;s<o;++s)u=i[s],Ch.call(e,u)&&(r[u]=t.copier(e[u],t));return r}var Rh=qs?$h:qh;function Ih(e,t){var r=lr(t.prototype);return t.cache.set(e,r),Ze(e,r,t)}function cr(e,t){return new t.Constructor(e.valueOf())}function kh(e,t){var r=new t.Constructor(e.source,vh(e));return r.lastIndex=e.lastIndex,r}function Xe(e,t){return e}function Is(e,t){var r=new t.Constructor;return t.cache.set(e,r),e.forEach(function(n){r.add(t.copier(n,t))}),r}function Fh(e,t){return Ze(e,Is(e,t),t)}var Wh=Array.isArray,dr=Object.assign,Kh=Object.getPrototypeOf||(function(e){return e.__proto__}),ks={array:jh,arrayBuffer:$s,blob:Bh,dataView:Dh,date:Nh,error:Xe,map:Rs,object:Rh,regExp:kh,set:Is},zh=dr({},ks,{array:Ph,map:Mh,object:Ih,set:Fh});function Vh(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:cr,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:cr,Object:e.object,Promise:Xe,RegExp:e.regExp,Set:e.set,String:cr,WeakMap:Xe,WeakSet:Xe,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}function hr(e){var t=dr({},ks,e),r=Vh(t),n=r.Array,i=r.Object;function s(o,u){if(u.prototype=u.Constructor=void 0,!o||typeof o!="object")return o;if(u.cache.has(o))return u.cache.get(o);if(u.prototype=Kh(o),u.Constructor=u.prototype&&u.prototype.constructor,!u.Constructor||u.Constructor===Object)return i(o,u);if(Wh(o))return n(o,u);var f=r[_h(o)];return f?f(o,u):typeof o.then=="function"?o:i(o,u)}return function(u){return s(u,{Constructor:void 0,cache:wh(),copier:s,prototype:void 0})}}function Fs(e){return hr(dr({},zh,e))}var Uh=Fs({}),Gh=hr({});fe.copyStrict=Uh;fe.createCopier=hr;fe.createStrictCopier=Fs;fe.default=Gh});var yr=v((op,Ks)=>{"use strict";Ks.exports=Xh;var{createCopier:Hh}=Ws(),Jh=Hh({}),Yh=ur();function Xh({log:e,context:t}){let{ignoreKeys:r,includeKeys:n}=t,i=Jh(e);if(n){let s={};return n.forEach(o=>{s[o]=i[o]}),s}return r.forEach(s=>{Yh(i,s)}),i}});var Vs=v((gr,zs)=>{"use strict";function ce(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ce=function(r){return typeof r}:ce=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ce(e)}(function(e){var t=arguments,r=(function(){var f=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,c=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g;return function(l,y,h,a){if(t.length===1&&u(l)==="string"&&!/\d/.test(l)&&(y=l,l=void 0),l=l||l===0?l:new Date,l instanceof Date||(l=new Date(l)),isNaN(l))throw TypeError("Invalid date");y=String(r.masks[y]||y||r.masks.default);var m=y.slice(0,4);(m==="UTC:"||m==="GMT:")&&(y=y.slice(4),h=!0,m==="GMT:"&&(a=!0));var p=function(){return h?"getUTC":"get"},b=function(){return l[p()+"Date"]()},w=function(){return l[p()+"Day"]()},S=function(){return l[p()+"Month"]()},O=function(){return l[p()+"FullYear"]()},x=function(){return l[p()+"Hours"]()},P=function(){return l[p()+"Minutes"]()},T=function(){return l[p()+"Seconds"]()},j=function(){return l[p()+"Milliseconds"]()},_=function(){return h?0:l.getTimezoneOffset()},B=function(){return s(l)},N=function(){return o(l)},A={d:function(){return b()},dd:function(){return n(b())},ddd:function(){return r.i18n.dayNames[w()]},DDD:function(){return i({y:O(),m:S(),d:b(),_:p(),dayName:r.i18n.dayNames[w()],short:!0})},dddd:function(){return r.i18n.dayNames[w()+7]},DDDD:function(){return i({y:O(),m:S(),d:b(),_:p(),dayName:r.i18n.dayNames[w()+7]})},m:function(){return S()+1},mm:function(){return n(S()+1)},mmm:function(){return r.i18n.monthNames[S()]},mmmm:function(){return r.i18n.monthNames[S()+12]},yy:function(){return String(O()).slice(2)},yyyy:function(){return n(O(),4)},h:function(){return x()%12||12},hh:function(){return n(x()%12||12)},H:function(){return x()},HH:function(){return n(x())},M:function(){return P()},MM:function(){return n(P())},s:function(){return T()},ss:function(){return n(T())},l:function(){return n(j(),3)},L:function(){return n(Math.floor(j()/10))},t:function(){return x()<12?r.i18n.timeNames[0]:r.i18n.timeNames[1]},tt:function(){return x()<12?r.i18n.timeNames[2]:r.i18n.timeNames[3]},T:function(){return x()<12?r.i18n.timeNames[4]:r.i18n.timeNames[5]},TT:function(){return x()<12?r.i18n.timeNames[6]:r.i18n.timeNames[7]},Z:function(){return a?"GMT":h?"UTC":(String(l).match(c)||[""]).pop().replace(d,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(_()>0?"-":"+")+n(Math.floor(Math.abs(_())/60)*100+Math.abs(_())%60,4)},p:function(){return(_()>0?"-":"+")+n(Math.floor(Math.abs(_())/60),2)+":"+n(Math.floor(Math.abs(_())%60),2)},S:function(){return["th","st","nd","rd"][b()%10>3?0:(b()%100-b()%10!=10)*b()%10]},W:function(){return B()},WW:function(){return n(B())},N:function(){return N()}};return y.replace(f,function(E){return E in A?A[E]():E.slice(1,E.length-1)})}})();r.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},r.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]};var n=function(c,d){for(c=String(c),d=d||2;c.length<d;)c="0"+c;return c},i=function(c){var d=c.y,l=c.m,y=c.d,h=c._,a=c.dayName,m=c.short,p=m===void 0?!1:m,b=new Date,w=new Date;w.setDate(w[h+"Date"]()-1);var S=new Date;S.setDate(S[h+"Date"]()+1);var O=function(){return b[h+"Date"]()},x=function(){return b[h+"Month"]()},P=function(){return b[h+"FullYear"]()},T=function(){return w[h+"Date"]()},j=function(){return w[h+"Month"]()},_=function(){return w[h+"FullYear"]()},B=function(){return S[h+"Date"]()},N=function(){return S[h+"Month"]()},A=function(){return S[h+"FullYear"]()};return P()===d&&x()===l&&O()===y?p?"Tdy":"Today":_()===d&&j()===l&&T()===y?p?"Ysd":"Yesterday":A()===d&&N()===l&&B()===y?p?"Tmw":"Tomorrow":a},s=function(c){var d=new Date(c.getFullYear(),c.getMonth(),c.getDate());d.setDate(d.getDate()-(d.getDay()+6)%7+3);var l=new Date(d.getFullYear(),0,4);l.setDate(l.getDate()-(l.getDay()+6)%7+3);var y=d.getTimezoneOffset()-l.getTimezoneOffset();d.setHours(d.getHours()-y);var h=(d-l)/(864e5*7);return 1+Math.floor(h)},o=function(c){var d=c.getDay();return d===0&&(d=7),d},u=function(c){return c===null?"null":c===void 0?"undefined":ce(c)!=="object"?ce(c):Array.isArray(c)?"array":{}.toString.call(c).slice(8,-1).toLowerCase()};typeof define=="function"&&define.amd?define(function(){return r}):(typeof gr>"u"?"undefined":ce(gr))==="object"?zs.exports=r:e.dateFormat=r})(void 0)});var pr=v((up,Us)=>{"use strict";Us.exports=ry;var{DATE_FORMAT:Zh,DATE_FORMAT_SIMPLE:Qh}=U(),we=Vs(),ey=or(),ty=Je();function ry(e,t=!1){if(t===!1)return e;let r=ey(e);if(!ty(r))return e;if(t===!0)return we(r,Qh);let n=t.toUpperCase();if(n==="SYS:STANDARD")return we(r,Zh);let i=n.substr(0,4);return i==="SYS:"||i==="UTC:"?i==="UTC:"?we(r,t):we(r,t.slice(4)):we(r,`UTC:${t}`)}});var mr=v((fp,Gs)=>{"use strict";Gs.exports=ny;function ny(e){return e?typeof e=="string"?e.split(",").reduce((t,r,n)=>{let[i,s=n]=r.split(":");return t[i.toLowerCase()]=s,t},{}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{}):{}:{}}});var br=v((cp,Hs)=>{"use strict";Hs.exports=iy;function iy(e){return e?typeof e=="string"?e.split(",").reduce((t,r,n)=>{let[i,s=n]=r.split(":");return t[s]=i.toUpperCase(),t},{default:"USERLVL"}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((t,r)=>(t[e[r]]=r.toUpperCase(),t),{default:"USERLVL"}):{}:{}}});var wr=v((lp,Js)=>{"use strict";Js.exports=oy;var sy=ue();function oy(e,t){return e=e.replace(/{if (.*?)}(.*?){end}/g,r),e=e.replace(/{if (.*?)}/g,""),e=e.replace(/{end}/g,""),e.replace(/\s+/g," ").trim();function r(n,i,s){let o=sy(t,i);return o&&s.includes(i)?s.replace(new RegExp("{"+i+"}","g"),o):""}}});var Qe=v((ap,Ys)=>{"use strict";Ys.exports=uy;function uy(e){return Object.prototype.toString.apply(e)==="[object Object]"}});var Se=v((dp,Xs)=>{"use strict";Xs.exports=fy;function fy({input:e,ident:t=" ",eol:r=`
25
+ `}){let n=e.split(/\r?\n/);for(let i=1;i<n.length;i+=1)n[i]=t+n[i];return n.join(r)}});var to=v((hp,eo)=>{"use strict";eo.exports=dy;var{LEVEL_NAMES:Zs}=U(),Qs=ir(),cy=br(),ly=mr(),ay=Ue();function dy(e){let t=e.crlf?`\r
26
26
  `:`
27
- `,r=" ",{customPrettifiers:n,errorLikeObjectKeys:i,hideObject:s,levelFirst:o,levelKey:u,levelLabel:f,messageFormat:c,messageKey:d,minimumLevel:l,singleLine:y,timestampKey:h,translateTime:a}=e,m=e.errorProps.split(","),p=typeof e.useOnlyCustomProps=="boolean"?e.useOnlyCustomProps:e.useOnlyCustomProps==="true",b=dy(e.customLevels),w=hy(e.customLevels),S=yy(p,b,w),O;if(e.customColors)if(typeof e.customColors=="string")O=e.customColors.split(",").reduce((N,D)=>{let[A,E]=D.split(":"),R=(p?e.customLevels:w[A]!==void 0)?w[A]:Qs[A],X=R!==void 0?R:A;return N.push([X,E]),N},[]);else if(typeof e.customColors=="object")O=Object.keys(e.customColors).reduce((N,D)=>{let[A,E]=[D,e.customColors[D]],R=(p?e.customLevels:w[A]!==void 0)?w[A]:Qs[A],X=R!==void 0?R:A;return N.push([X,E]),N},[]);else throw new Error("options.customColors must be of type string or object.");let x={customLevels:b,customLevelNames:w};p===!0&&!e.customLevels&&(x.customLevels=void 0,x.customLevelNames=void 0);let P=e.include!==void 0?new Set(e.include.split(",")):void 0,T=!P&&e.ignore?new Set(e.ignore.split(",")):void 0,j=eo(e.colorize,O,p),_=e.colorizeObjects?j:eo(!1,[],!1);return{EOL:t,IDENT:r,colorizer:j,customColors:O,customLevelNames:w,customLevels:b,customPrettifiers:n,customProperties:x,errorLikeObjectKeys:i,errorProps:m,getLevelLabelData:S,hideObject:s,ignoreKeys:T,includeKeys:P,levelFirst:o,levelKey:u,levelLabel:f,messageFormat:c,messageKey:d,minimumLevel:l,objectColorizer:_,singleLine:y,timestampKey:h,translateTime:a,useOnlyCustomProps:p}}});var fo=v((mp,uo)=>{uo.exports=Ee;Ee.default=Ee;Ee.stable=so;Ee.stableStringify=so;var et="[...]",no="[Circular]",ne=[],re=[];function io(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Ee(e,t,r,n){typeof n>"u"&&(n=io()),Sr(e,"",0,[],void 0,0,n);var i;try{re.length===0?i=JSON.stringify(e,t,r):i=JSON.stringify(e,oo(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;ne.length!==0;){var s=ne.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function le(e,t,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:e}),ne.push([n,r,t,i])):re.push([t,r,e]):(n[r]=e,ne.push([n,r,t]))}function Sr(e,t,r,n,i,s,o){s+=1;var u;if(typeof e=="object"&&e!==null){for(u=0;u<n.length;u++)if(n[u]===e){le(no,e,t,i);return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){le(et,e,t,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){le(et,e,t,i);return}if(n.push(e),Array.isArray(e))for(u=0;u<e.length;u++)Sr(e[u],u,u,n,e,s,o);else{var f=Object.keys(e);for(u=0;u<f.length;u++){var c=f[u];Sr(e[c],c,u,n,e,s,o)}}n.pop()}}function py(e,t){return e<t?-1:e>t?1:0}function so(e,t,r,n){typeof n>"u"&&(n=io());var i=Er(e,"",0,[],void 0,0,n)||e,s;try{re.length===0?s=JSON.stringify(i,t,r):s=JSON.stringify(i,oo(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;ne.length!==0;){var o=ne.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function Er(e,t,r,n,i,s,o){s+=1;var u;if(typeof e=="object"&&e!==null){for(u=0;u<n.length;u++)if(n[u]===e){le(no,e,t,i);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){le(et,e,t,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){le(et,e,t,i);return}if(n.push(e),Array.isArray(e))for(u=0;u<e.length;u++)Er(e[u],u,u,n,e,s,o);else{var f={},c=Object.keys(e).sort(py);for(u=0;u<c.length;u++){var d=c[u];Er(e[d],d,u,n,e,s,o),f[d]=e[d]}if(typeof i<"u")ne.push([i,t,e]),i[t]=f;else return f}n.pop()}}function oo(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(re.length>0)for(var n=0;n<re.length;n++){var i=re[n];if(i[1]===t&&i[0]===r){r=i[2],re.splice(n,1);break}}return e.call(this,t,r)}}});var vr=v((bp,co)=>{"use strict";co.exports=by;var my=Se();function by({keyName:e,lines:t,eol:r,ident:n}){let i="",s=my({input:t,ident:n,eol:r}),o=`${n}${e}: ${s}${r}`.split(r);for(let u=0;u<o.length;u+=1){u!==0&&(i+=r);let f=o[u];if(/^\s*"stack"/.test(f)){let c=/^(\s*"stack":)\s*(".*"),?$/.exec(f);if(c&&c.length===3){let d=/^\s*/.exec(f)[0].length+4,l=" ".repeat(d),y=c[2];i+=c[1]+r+l+JSON.parse(y).replace(/\n/g,r+l)}else i+=f}else i+=f}return i}});var tt=v((wp,lo)=>{"use strict";lo.exports=vy;var{LOGGER_KEYS:wy}=U(),Or=fo(),Sy=Se(),Ey=vr();function vy({log:e,excludeLoggerKeys:t=!0,skipKeys:r=[],context:n}){let{EOL:i,IDENT:s,customPrettifiers:o,errorLikeObjectKeys:u,objectColorizer:f,singleLine:c,colorizer:d}=n,l=[].concat(r);t===!0&&Array.prototype.push.apply(l,wy);let y="",{plain:h,errors:a}=Object.entries(e).reduce(({plain:m,errors:p},[b,w])=>{if(l.includes(b)===!1){let S=typeof o[b]=="function"?o[b](w,b,e,{colors:d.colors}):w;u.includes(b)?p[b]=S:m[b]=S}return{plain:m,errors:p}},{plain:{},errors:{}});return c?(Object.keys(h).length>0&&(y+=f.greyMessage(Or(h))),y+=i,y=y.replace(/\\\\/gi,"\\")):Object.entries(h).forEach(([m,p])=>{let b=typeof o[m]=="function"?p:Or(p,null,2);if(b===void 0)return;b=b.replace(/\\\\/gi,"\\");let w=Sy({input:b,ident:s,eol:i});y+=`${s}${f.property(m)}:${w.startsWith(i)?"":" "}${w}${i}`}),Object.entries(a).forEach(([m,p])=>{let b=typeof o[m]=="function"?p:Or(p,null,2);b!==void 0&&(y+=Ey({keyName:m,lines:b,eol:i,ident:s}))}),y}});var _r=v((Sp,ao)=>{"use strict";ao.exports=Cy;var{LOGGER_KEYS:Oy}=U(),_y=Qe(),Ly=Se(),xy=tt();function Cy({log:e,context:t}){let{EOL:r,IDENT:n,errorProps:i,messageKey:s}=t,o=e.stack,u=Ly({input:o,ident:n,eol:r}),f=`${n}${u}${r}`;if(i.length>0){let c=Oy.concat(s,"type","stack"),d;i[0]==="*"?d=Object.keys(e).filter(l=>c.includes(l)===!1):d=i.filter(l=>c.includes(l)===!1);for(let l=0;l<d.length;l+=1){let y=d[l];if(y in e){if(_y(e[y])){let h=xy({log:e[y],excludeLoggerKeys:!1,context:{...t,IDENT:n+n}});f=`${f}${n}${y}: {${r}${h}${n}}${r}`;continue}f=`${f}${n}${y}: ${e[y]}${r}`}}}return f}});var Lr=v((Ep,ho)=>{"use strict";ho.exports=Ay;var Ty=ue();function Ay({log:e,context:t}){let{colorizer:r,customLevels:n,customLevelNames:i,levelKey:s,getLevelLabelData:o}=t,u=t.customPrettifiers?.level,f=Ty(e,s);if(f===void 0)return;let c=r(f,{customLevels:n,customLevelNames:i});if(u){let[d]=o(f);return u(f,s,e,{label:d,labelColorized:c,colors:r.colors})}return c}});var xr=v((vp,go)=>{"use strict";go.exports=Ny;var{LEVELS:jy}=U(),yo=ue(),Py=wr();function Ny({log:e,context:t}){let{colorizer:r,customLevels:n,levelKey:i,levelLabel:s,messageFormat:o,messageKey:u,useOnlyCustomProps:f}=t;if(o&&typeof o=="string"){let c=Py(o,e),d=String(c).replace(/{([^{}]+)}/g,function(l,y){let h;return y===s&&(h=yo(e,i))!==void 0?(f?n===void 0:n[h]===void 0)?jy[h]:n[h]:yo(e,y)||""});return r.message(d)}if(o&&typeof o=="function"){let c=o(e,u,s,{colors:r.colors});return r.message(c)}if(u in e&&!(typeof e[u]!="string"&&typeof e[u]!="number"&&typeof e[u]!="boolean"))return r.message(e[u])}});var Cr=v((Op,po)=>{"use strict";po.exports=By;function By({log:e,context:t}){let{customPrettifiers:r,colorizer:n}=t,i="";if(e.name||e.pid||e.hostname){if(i+="(",e.name&&(i+=r.name?r.name(e.name,"name",e,{colors:n.colors}):e.name),e.pid){let s=r.pid?r.pid(e.pid,"pid",e,{colors:n.colors}):e.pid;e.name&&e.pid?i+="/"+s:i+=s}if(e.hostname){let s=r.hostname?r.hostname(e.hostname,"hostname",e,{colors:n.colors}):e.hostname;i+=`${i==="("?"on":" on"} ${s}`}i+=")"}if(e.caller){let s=r.caller?r.caller(e.caller,"caller",e,{colors:n.colors}):e.caller;i+=`${i===""?"":" "}<${s}>`}if(i!=="")return i}});var Tr=v((_p,mo)=>{"use strict";mo.exports=My;var Dy=pr();function My({log:e,context:t}){let{timestampKey:r,translateTime:n}=t,i=t.customPrettifiers?.time,s=null;if(r in e?s=e[r]:"timestamp"in e&&(s=e.timestamp),s===null)return;let o=n?Dy(s,n):s;return i?i(o):`[${o}]`}});var wo=v((Lp,bo)=>{"use strict";bo.exports={buildSafeSonicBoom:Cs(),createDate:or(),deleteLogProperty:ur(),filterLog:yr(),formatTime:pr(),getPropertyValue:ue(),handleCustomLevelsNamesOpts:mr(),handleCustomLevelsOpts:br(),interpretConditionals:wr(),isObject:Qe(),isValidDate:Je(),joinLinesWithIndentation:Se(),noop:sr(),parseFactoryOptions:ro(),prettifyErrorLog:_r(),prettifyError:vr(),prettifyLevel:Lr(),prettifyMessage:xr(),prettifyMetadata:Cr(),prettifyObject:tt(),prettifyTime:Tr(),splitPropertyKey:Ye(),getLevelLabelData:Ue()}});var _o=v((xp,ae)=>{"use strict";var qy=typeof Buffer<"u",So=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Eo=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function vo(e,t,r){r==null&&t!==null&&typeof t=="object"&&(r=t,t=void 0),qy&&Buffer.isBuffer(e)&&(e=e.toString()),e&&e.charCodeAt(0)===65279&&(e=e.slice(1));let n=JSON.parse(e,t);if(n===null||typeof n!="object")return n;let i=r&&r.protoAction||"error",s=r&&r.constructorAction||"error";if(i==="ignore"&&s==="ignore")return n;if(i!=="ignore"&&s!=="ignore"){if(So.test(e)===!1&&Eo.test(e)===!1)return n}else if(i!=="ignore"&&s==="ignore"){if(So.test(e)===!1)return n}else if(Eo.test(e)===!1)return n;return Oo(n,{protoAction:i,constructorAction:s,safe:r&&r.safe})}function Oo(e,{protoAction:t="error",constructorAction:r="error",safe:n}={}){let i=[e];for(;i.length;){let s=i;i=[];for(let o of s){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"__proto__")){if(n===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.__proto__}if(r!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"constructor")&&o.constructor!==null&&typeof o.constructor=="object"&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype")){if(n===!0)return null;if(r==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.constructor}for(let u in o){let f=o[u];f&&typeof f=="object"&&i.push(f)}}}return e}function Ar(e,t,r){let{stackTraceLimit:n}=Error;Error.stackTraceLimit=0;try{return vo(e,t,r)}finally{Error.stackTraceLimit=n}}function $y(e,t){let{stackTraceLimit:r}=Error;Error.stackTraceLimit=0;try{return vo(e,t,{safe:!0})}catch{return}finally{Error.stackTraceLimit=r}}ae.exports=Ar;ae.exports.default=Ar;ae.exports.parse=Ar;ae.exports.safeParse=$y;ae.exports.scan=Oo});var Co=v((Cp,xo)=>{"use strict";xo.exports=Jy;var Ry=_o(),Lo=Qe(),Iy=_r(),ky=Lr(),Fy=xr(),Wy=Cr(),Ky=tt(),zy=Tr(),Vy=yr(),{LEVELS:Uy,LEVEL_KEY:Gy,LEVEL_NAMES:jr}=U(),Hy=e=>{try{return{value:Ry.parse(e,{protoAction:"remove"})}}catch(t){return{err:t}}};function Jy(e){let t;if(Lo(e))t=e;else{let u=Hy(e);if(u.err||!Lo(u.value))return e+this.EOL;t=u.value}if(this.minimumLevel){let u;this.useOnlyCustomProps?u=this.customLevels:u=this.customLevelNames[this.minimumLevel]!==void 0;let f;if(u?f=this.customLevelNames[this.minimumLevel]:f=jr[this.minimumLevel],f||(f=typeof this.minimumLevel=="string"?jr[this.minimumLevel]:jr[Uy[this.minimumLevel].toLowerCase()]),t[this.levelKey===void 0?Gy:this.levelKey]<f)return}let r=Fy({log:t,context:this.context});(this.ignoreKeys||this.includeKeys)&&(t=Vy({log:t,context:this.context}));let n=ky({log:t,context:{...this.context,...this.context.customProperties}}),i=Wy({log:t,context:this.context}),s=zy({log:t,context:this.context}),o="";if(this.levelFirst&&n&&(o=`${n}`),s&&o===""?o=`${s}`:s&&(o=`${o} ${s}`),!this.levelFirst&&n&&(o.length>0?o=`${o} ${n}`:o=n),i&&(o.length>0?o=`${o} ${i}:`:o=i),o.endsWith(":")===!1&&o!==""&&(o+=":"),r!==void 0&&(o.length>0?o=`${o} ${r}`:o=r),o.length>0&&!this.singleLine&&(o+=this.EOL),t.type==="Error"&&typeof t.stack=="string"){let u=Iy({log:t,context:this.context});this.singleLine&&(o+=this.EOL),o+=u}else if(this.hideObject===!1){let u=[this.messageKey,this.levelKey,this.timestampKey].map(c=>c.replaceAll(/\\/g,"")).filter(c=>typeof t[c]=="string"||typeof t[c]=="number"||typeof t[c]=="boolean"),f=Ky({log:t,skipKeys:u,context:this.context});this.singleLine&&!/^\s$/.test(f)&&(o+=" "),o+=f}return o}});var jo=v((Tp,Y)=>{"use strict";var{isColorSupported:To}=Zt(),Yy=us(),{Transform:Xy}=B("node:stream"),Zy=ps(),Qy=ir(),{ERROR_LIKE_KEYS:Ao,LEVEL_KEY:eg,LEVEL_LABEL:tg,MESSAGE_KEY:rg,TIMESTAMP_KEY:ng}=U(),{buildSafeSonicBoom:ig,parseFactoryOptions:sg}=wo(),og=Co(),ug={colorize:To,colorizeObjects:!0,crlf:!1,customColors:null,customLevels:null,customPrettifiers:{},errorLikeObjectKeys:Ao,errorProps:"",hideObject:!1,ignore:"hostname",include:void 0,levelFirst:!1,levelKey:eg,levelLabel:tg,messageFormat:null,messageKey:rg,minimumLevel:void 0,outputStream:process.stdout,singleLine:!1,timestampKey:ng,translateTime:!0,useOnlyCustomProps:!0};function Pr(e){let t=sg(Object.assign({},ug,e));return og.bind({...t,context:t})}function rt(e={}){let t=Pr(e),r;return Zy(function(n){n.on("message",function s(o){!o||o.code!=="PINO_CONFIG"||(Object.assign(e,{messageKey:o.config.messageKey,errorLikeObjectKeys:Array.from(new Set([...e.errorLikeObjectKeys||Ao,o.config.errorKey])),customLevels:o.config.levels.values}),t=Pr(e),n.off("message",s))});let i=new Xy({objectMode:!0,autoDestroy:!0,transform(s,o,u){let f=t(s);u(null,f)}});return typeof e.destination=="object"&&typeof e.destination.write=="function"?r=e.destination:r=ig({dest:e.destination||1,append:e.append,mkdir:e.mkdir,sync:e.sync}),n.on("unknown",function(s){r.write(s+`
28
- `)}),Yy(n,i,r),i},{parse:"lines",close(n,i){r.on("close",()=>{i(n)})}})}Y.exports=rt;Y.exports.build=rt;Y.exports.PinoPretty=rt;Y.exports.prettyFactory=Pr;Y.exports.colorizerFactory=Qy;Y.exports.isColorSupported=To;Y.exports.default=rt});var Fo=Object.defineProperty,Wo=(e,t,r)=>t in e?Fo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ir=(e,t,r)=>Wo(e,typeof t!="symbol"?t+"":t,r),Ko=/([\p{Ll}\d])(\p{Lu})/gu,zo=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,Vo=/(\d)\p{Ll}|(\p{L})\d/u,Uo=/[^\p{L}\d]+/giu,Rr="$1\0$2";function kr(e){let t=e.trim();t=t.replace(Ko,Rr).replace(zo,Rr),t=t.replace(Uo,"\0");let r=0,n=t.length;for(;t.charAt(r)==="\0";)r++;if(r===n)return[];for(;t.charAt(n-1)==="\0";)n--;return t.slice(r,n).split(/\0/g)}function Go(e){let t=kr(e);for(let r=0;r<t.length;r++){let n=t[r],i=Vo.exec(n);if(i){let s=i.index+(i[1]??i[2]).length;t.splice(r,1,n.slice(0,s),n.slice(s))}}return t}function Ho(e,t){let[r,n,i]=Yo(e,t);return r+n.map(Jo(t?.locale)).join(t?.delimiter??"_")+i}function Jo(e){return e===!1?t=>t.toUpperCase():t=>t.toLocaleUpperCase(e)}function Yo(e,t={}){let r=t.split??(t.separateNumbers?Go:kr),n=t.prefixCharacters??"",i=t.suffixCharacters??"",s=0,o=e.length;for(;s<e.length;){let u=e.charAt(s);if(!n.includes(u))break;s++}for(;o>s;){let u=o-1,f=e.charAt(u);if(!i.includes(f))break;o=u}return[e.slice(0,s),r(e.slice(s,o)),e.slice(o)]}var Xo=class it{constructor(t){Ir(this,"serviceName"),this.serviceName=Ho(t)}log(t,...r){let{color:n,reset:i}=it.getColor(t),s=[it.getSymbols(t)+"{ENV}",n+`[${this.serviceName}]:`+i,...r];t==="success"?console.log(...s):console[t](...s)}static getColor(t){let r="\x1B[34m";return t==="success"&&(r="\x1B[32m"),t==="warn"&&(r="\x1B[33m"),t==="error"&&(r="\x1B[31m"),{color:r,reset:"\x1B[0m"}}static getSymbols(t){let{color:r,reset:n}=this.getColor(t);return t==="success"?r+" \u2714 "+n:t==="warn"?r+" \u25B2 "+n:t==="error"?r+" \u2717 "+n:r+" \uFFEE "+n}};function Fr(...e){return e.reduce((t,r)=>({...t,...r}),{})}var Wr=class extends Xo{constructor(e,t){super(e),this.variables=t,Ir(this,"env",new Map),this.validate(),this.load()}validate(){let e=Object.keys(this.variables);for(let t of e){let r=this.variables[t],n=process.env[t];if(n==null){r.default?this.log("warn",`'${t}' not exists and default:`,r.default):this.log("error",`'${t}' not exists and not have defaults`);continue}if(r.type==="number"&&isNaN(Number(n))){this.log("warn",`is '${typeof n}', but must 'number'`);continue}if(r.type==="boolean"&&n!=="true"&&n!=="false"){this.log("warn",`'${t}' should be boolean ('true' or 'false')`);continue}this.log("success",`'${t}' successfully loaded`)}}load(){let e=Object.keys(this.variables);for(let t of e)this.$(t,!1);this.env.set("SERVICE_NAME",this.serviceName)}$(e,t=!0){if(t&&this.env.has(String(e)))return this.env.get(String(e));let r=this.variables[e],n=process.env[e]||r.default;return r.type==="number"&&(n=Number(n)),r.type==="boolean"&&(n=n==="true"),r.type==="string"&&(n=String(n)),this.env.set(String(e),n),n}};var Kr={NODE_ENV:{type:"string",default:"development"},LOG_LEVEL:{type:"string",default:"info"},SERVICE_NAME:{type:"string",default:"UNKNOWN"}};var Nr=$r(zi(),1),Br=$r(jo(),1);var Po=(e,t)=>{if("timing"in e){let r=e.timing;return{...e,timing:{...Object.fromEntries(Object.entries(r).map(([n,i])=>[n,i.toFixed(2)+"ms"])),total:Object.values(r).reduce((n,i)=>n+i,0).toFixed(2)+"ms"}}}return{...e,duration:t}};async function fg(e,t){let r=performance.now(),n=e.type==="render"?"Rendering":"Getting data",i={route:e.route,...e.type==="get-data"&&e.functionName?{functionName:e.functionName}:{}};nt.debug(i,`${n} start`);let s=o=>{let u=performance.now()-r;r=performance.now(),i.timing??(i.timing={}),i.timing[String(o)]=u};try{let o=await Promise.resolve(t(s)),u=performance.now()-r;return nt.debug(Po(i,`${u.toFixed(2)}ms`),`${n} completed`),o}catch(o){let u=performance.now()-r;throw nt.error(Po(i,`${u.toFixed(2)}ms`),`${n} failed`,o),o}}var No=new Wr("logger",Fr(Kr)),cg=No.$("SERVICE_NAME"),lg=(0,Br.default)({colorize:Br.default.isColorSupported,ignore:"pid,hostname"}),ag=(0,Nr.default)({name:cg,level:No.$("LOG_LEVEL"),timestamp:Nr.default.stdTimeFunctions.isoTime,formatters:{level(e){return{level:e.toUpperCase()}}},base:{pid:process.pid},redact:{paths:["req.headers.authorization","req.headers.cookie","user.password","user.secret"],censor:"[REDACTED]"}},lg),nt=ag;export{nt as default,fg as withLogger};
27
+ `,r=" ",{customPrettifiers:n,errorLikeObjectKeys:i,hideObject:s,levelFirst:o,levelKey:u,levelLabel:f,messageFormat:c,messageKey:d,minimumLevel:l,singleLine:y,timestampKey:h,translateTime:a}=e,m=e.errorProps.split(","),p=typeof e.useOnlyCustomProps=="boolean"?e.useOnlyCustomProps:e.useOnlyCustomProps==="true",b=cy(e.customLevels),w=ly(e.customLevels),S=ay(p,b,w),O;if(e.customColors)if(typeof e.customColors=="string")O=e.customColors.split(",").reduce((B,N)=>{let[A,E]=N.split(":"),R=(p?e.customLevels:w[A]!==void 0)?w[A]:Zs[A],X=R!==void 0?R:A;return B.push([X,E]),B},[]);else if(typeof e.customColors=="object")O=Object.keys(e.customColors).reduce((B,N)=>{let[A,E]=[N,e.customColors[N]],R=(p?e.customLevels:w[A]!==void 0)?w[A]:Zs[A],X=R!==void 0?R:A;return B.push([X,E]),B},[]);else throw new Error("options.customColors must be of type string or object.");let x={customLevels:b,customLevelNames:w};p===!0&&!e.customLevels&&(x.customLevels=void 0,x.customLevelNames=void 0);let P=e.include!==void 0?new Set(e.include.split(",")):void 0,T=!P&&e.ignore?new Set(e.ignore.split(",")):void 0,j=Qs(e.colorize,O,p),_=e.colorizeObjects?j:Qs(!1,[],!1);return{EOL:t,IDENT:r,colorizer:j,customColors:O,customLevelNames:w,customLevels:b,customPrettifiers:n,customProperties:x,errorLikeObjectKeys:i,errorProps:m,getLevelLabelData:S,hideObject:s,ignoreKeys:T,includeKeys:P,levelFirst:o,levelKey:u,levelLabel:f,messageFormat:c,messageKey:d,minimumLevel:l,objectColorizer:_,singleLine:y,timestampKey:h,translateTime:a,useOnlyCustomProps:p}}});var uo=v((yp,oo)=>{oo.exports=Ee;Ee.default=Ee;Ee.stable=io;Ee.stableStringify=io;var et="[...]",ro="[Circular]",ne=[],re=[];function no(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Ee(e,t,r,n){typeof n>"u"&&(n=no()),Sr(e,"",0,[],void 0,0,n);var i;try{re.length===0?i=JSON.stringify(e,t,r):i=JSON.stringify(e,so(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;ne.length!==0;){var s=ne.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function le(e,t,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:e}),ne.push([n,r,t,i])):re.push([t,r,e]):(n[r]=e,ne.push([n,r,t]))}function Sr(e,t,r,n,i,s,o){s+=1;var u;if(typeof e=="object"&&e!==null){for(u=0;u<n.length;u++)if(n[u]===e){le(ro,e,t,i);return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){le(et,e,t,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){le(et,e,t,i);return}if(n.push(e),Array.isArray(e))for(u=0;u<e.length;u++)Sr(e[u],u,u,n,e,s,o);else{var f=Object.keys(e);for(u=0;u<f.length;u++){var c=f[u];Sr(e[c],c,u,n,e,s,o)}}n.pop()}}function hy(e,t){return e<t?-1:e>t?1:0}function io(e,t,r,n){typeof n>"u"&&(n=no());var i=Er(e,"",0,[],void 0,0,n)||e,s;try{re.length===0?s=JSON.stringify(i,t,r):s=JSON.stringify(i,so(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;ne.length!==0;){var o=ne.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function Er(e,t,r,n,i,s,o){s+=1;var u;if(typeof e=="object"&&e!==null){for(u=0;u<n.length;u++)if(n[u]===e){le(ro,e,t,i);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){le(et,e,t,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){le(et,e,t,i);return}if(n.push(e),Array.isArray(e))for(u=0;u<e.length;u++)Er(e[u],u,u,n,e,s,o);else{var f={},c=Object.keys(e).sort(hy);for(u=0;u<c.length;u++){var d=c[u];Er(e[d],d,u,n,e,s,o),f[d]=e[d]}if(typeof i<"u")ne.push([i,t,e]),i[t]=f;else return f}n.pop()}}function so(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(re.length>0)for(var n=0;n<re.length;n++){var i=re[n];if(i[1]===t&&i[0]===r){r=i[2],re.splice(n,1);break}}return e.call(this,t,r)}}});var vr=v((gp,fo)=>{"use strict";fo.exports=gy;var yy=Se();function gy({keyName:e,lines:t,eol:r,ident:n}){let i="",s=yy({input:t,ident:n,eol:r}),o=`${n}${e}: ${s}${r}`.split(r);for(let u=0;u<o.length;u+=1){u!==0&&(i+=r);let f=o[u];if(/^\s*"stack"/.test(f)){let c=/^(\s*"stack":)\s*(".*"),?$/.exec(f);if(c&&c.length===3){let d=/^\s*/.exec(f)[0].length+4,l=" ".repeat(d),y=c[2];i+=c[1]+r+l+JSON.parse(y).replace(/\n/g,r+l)}else i+=f}else i+=f}return i}});var tt=v((pp,co)=>{"use strict";co.exports=wy;var{LOGGER_KEYS:py}=U(),Or=uo(),my=Se(),by=vr();function wy({log:e,excludeLoggerKeys:t=!0,skipKeys:r=[],context:n}){let{EOL:i,IDENT:s,customPrettifiers:o,errorLikeObjectKeys:u,objectColorizer:f,singleLine:c,colorizer:d}=n,l=[].concat(r);t===!0&&Array.prototype.push.apply(l,py);let y="",{plain:h,errors:a}=Object.entries(e).reduce(({plain:m,errors:p},[b,w])=>{if(l.includes(b)===!1){let S=typeof o[b]=="function"?o[b](w,b,e,{colors:d.colors}):w;u.includes(b)?p[b]=S:m[b]=S}return{plain:m,errors:p}},{plain:{},errors:{}});return c?(Object.keys(h).length>0&&(y+=f.greyMessage(Or(h))),y+=i,y=y.replace(/\\\\/gi,"\\")):Object.entries(h).forEach(([m,p])=>{let b=typeof o[m]=="function"?p:Or(p,null,2);if(b===void 0)return;b=b.replace(/\\\\/gi,"\\");let w=my({input:b,ident:s,eol:i});y+=`${s}${f.property(m)}:${w.startsWith(i)?"":" "}${w}${i}`}),Object.entries(a).forEach(([m,p])=>{let b=typeof o[m]=="function"?p:Or(p,null,2);b!==void 0&&(y+=by({keyName:m,lines:b,eol:i,ident:s}))}),y}});var _r=v((mp,lo)=>{"use strict";lo.exports=_y;var{LOGGER_KEYS:Sy}=U(),Ey=Qe(),vy=Se(),Oy=tt();function _y({log:e,context:t}){let{EOL:r,IDENT:n,errorProps:i,messageKey:s}=t,o=e.stack,u=vy({input:o,ident:n,eol:r}),f=`${n}${u}${r}`;if(i.length>0){let c=Sy.concat(s,"type","stack"),d;i[0]==="*"?d=Object.keys(e).filter(l=>c.includes(l)===!1):d=i.filter(l=>c.includes(l)===!1);for(let l=0;l<d.length;l+=1){let y=d[l];if(y in e){if(Ey(e[y])){let h=Oy({log:e[y],excludeLoggerKeys:!1,context:{...t,IDENT:n+n}});f=`${f}${n}${y}: {${r}${h}${n}}${r}`;continue}f=`${f}${n}${y}: ${e[y]}${r}`}}}return f}});var Lr=v((bp,ao)=>{"use strict";ao.exports=xy;var Ly=ue();function xy({log:e,context:t}){let{colorizer:r,customLevels:n,customLevelNames:i,levelKey:s,getLevelLabelData:o}=t,u=t.customPrettifiers?.level,f=Ly(e,s);if(f===void 0)return;let c=r(f,{customLevels:n,customLevelNames:i});if(u){let[d]=o(f);return u(f,s,e,{label:d,labelColorized:c,colors:r.colors})}return c}});var xr=v((wp,yo)=>{"use strict";yo.exports=Ay;var{LEVELS:Cy}=U(),ho=ue(),Ty=wr();function Ay({log:e,context:t}){let{colorizer:r,customLevels:n,levelKey:i,levelLabel:s,messageFormat:o,messageKey:u,useOnlyCustomProps:f}=t;if(o&&typeof o=="string"){let c=Ty(o,e),d=String(c).replace(/{([^{}]+)}/g,function(l,y){let h;return y===s&&(h=ho(e,i))!==void 0?(f?n===void 0:n[h]===void 0)?Cy[h]:n[h]:ho(e,y)||""});return r.message(d)}if(o&&typeof o=="function"){let c=o(e,u,s,{colors:r.colors});return r.message(c)}if(u in e&&!(typeof e[u]!="string"&&typeof e[u]!="number"&&typeof e[u]!="boolean"))return r.message(e[u])}});var Cr=v((Sp,go)=>{"use strict";go.exports=jy;function jy({log:e,context:t}){let{customPrettifiers:r,colorizer:n}=t,i="";if(e.name||e.pid||e.hostname){if(i+="(",e.name&&(i+=r.name?r.name(e.name,"name",e,{colors:n.colors}):e.name),e.pid){let s=r.pid?r.pid(e.pid,"pid",e,{colors:n.colors}):e.pid;e.name&&e.pid?i+="/"+s:i+=s}if(e.hostname){let s=r.hostname?r.hostname(e.hostname,"hostname",e,{colors:n.colors}):e.hostname;i+=`${i==="("?"on":" on"} ${s}`}i+=")"}if(e.caller){let s=r.caller?r.caller(e.caller,"caller",e,{colors:n.colors}):e.caller;i+=`${i===""?"":" "}<${s}>`}if(i!=="")return i}});var Tr=v((Ep,po)=>{"use strict";po.exports=By;var Py=pr();function By({log:e,context:t}){let{timestampKey:r,translateTime:n}=t,i=t.customPrettifiers?.time,s=null;if(r in e?s=e[r]:"timestamp"in e&&(s=e.timestamp),s===null)return;let o=n?Py(s,n):s;return i?i(o):`[${o}]`}});var bo=v((vp,mo)=>{"use strict";mo.exports={buildSafeSonicBoom:xs(),createDate:or(),deleteLogProperty:ur(),filterLog:yr(),formatTime:pr(),getPropertyValue:ue(),handleCustomLevelsNamesOpts:mr(),handleCustomLevelsOpts:br(),interpretConditionals:wr(),isObject:Qe(),isValidDate:Je(),joinLinesWithIndentation:Se(),noop:sr(),parseFactoryOptions:to(),prettifyErrorLog:_r(),prettifyError:vr(),prettifyLevel:Lr(),prettifyMessage:xr(),prettifyMetadata:Cr(),prettifyObject:tt(),prettifyTime:Tr(),splitPropertyKey:Ye(),getLevelLabelData:Ue()}});var Oo=v((Op,ae)=>{"use strict";var Dy=typeof Buffer<"u",wo=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,So=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Eo(e,t,r){r==null&&t!==null&&typeof t=="object"&&(r=t,t=void 0),Dy&&Buffer.isBuffer(e)&&(e=e.toString()),e&&e.charCodeAt(0)===65279&&(e=e.slice(1));let n=JSON.parse(e,t);if(n===null||typeof n!="object")return n;let i=r&&r.protoAction||"error",s=r&&r.constructorAction||"error";if(i==="ignore"&&s==="ignore")return n;if(i!=="ignore"&&s!=="ignore"){if(wo.test(e)===!1&&So.test(e)===!1)return n}else if(i!=="ignore"&&s==="ignore"){if(wo.test(e)===!1)return n}else if(So.test(e)===!1)return n;return vo(n,{protoAction:i,constructorAction:s,safe:r&&r.safe})}function vo(e,{protoAction:t="error",constructorAction:r="error",safe:n}={}){let i=[e];for(;i.length;){let s=i;i=[];for(let o of s){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"__proto__")){if(n===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.__proto__}if(r!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"constructor")&&o.constructor!==null&&typeof o.constructor=="object"&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype")){if(n===!0)return null;if(r==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.constructor}for(let u in o){let f=o[u];f&&typeof f=="object"&&i.push(f)}}}return e}function Ar(e,t,r){let{stackTraceLimit:n}=Error;Error.stackTraceLimit=0;try{return Eo(e,t,r)}finally{Error.stackTraceLimit=n}}function Ny(e,t){let{stackTraceLimit:r}=Error;Error.stackTraceLimit=0;try{return Eo(e,t,{safe:!0})}catch{return}finally{Error.stackTraceLimit=r}}ae.exports=Ar;ae.exports.default=Ar;ae.exports.parse=Ar;ae.exports.safeParse=Ny;ae.exports.scan=vo});var xo=v((_p,Lo)=>{"use strict";Lo.exports=Uy;var My=Oo(),_o=Qe(),qy=_r(),$y=Lr(),Ry=xr(),Iy=Cr(),ky=tt(),Fy=Tr(),Wy=yr(),{LEVELS:Ky,LEVEL_KEY:zy,LEVEL_NAMES:jr}=U(),Vy=e=>{try{return{value:My.parse(e,{protoAction:"remove"})}}catch(t){return{err:t}}};function Uy(e){let t;if(_o(e))t=e;else{let u=Vy(e);if(u.err||!_o(u.value))return e+this.EOL;t=u.value}if(this.minimumLevel){let u;this.useOnlyCustomProps?u=this.customLevels:u=this.customLevelNames[this.minimumLevel]!==void 0;let f;if(u?f=this.customLevelNames[this.minimumLevel]:f=jr[this.minimumLevel],f||(f=typeof this.minimumLevel=="string"?jr[this.minimumLevel]:jr[Ky[this.minimumLevel].toLowerCase()]),t[this.levelKey===void 0?zy:this.levelKey]<f)return}let r=Ry({log:t,context:this.context});(this.ignoreKeys||this.includeKeys)&&(t=Wy({log:t,context:this.context}));let n=$y({log:t,context:{...this.context,...this.context.customProperties}}),i=Iy({log:t,context:this.context}),s=Fy({log:t,context:this.context}),o="";if(this.levelFirst&&n&&(o=`${n}`),s&&o===""?o=`${s}`:s&&(o=`${o} ${s}`),!this.levelFirst&&n&&(o.length>0?o=`${o} ${n}`:o=n),i&&(o.length>0?o=`${o} ${i}:`:o=i),o.endsWith(":")===!1&&o!==""&&(o+=":"),r!==void 0&&(o.length>0?o=`${o} ${r}`:o=r),o.length>0&&!this.singleLine&&(o+=this.EOL),t.type==="Error"&&typeof t.stack=="string"){let u=qy({log:t,context:this.context});this.singleLine&&(o+=this.EOL),o+=u}else if(this.hideObject===!1){let u=[this.messageKey,this.levelKey,this.timestampKey].map(c=>c.replaceAll(/\\/g,"")).filter(c=>typeof t[c]=="string"||typeof t[c]=="number"||typeof t[c]=="boolean"),f=ky({log:t,skipKeys:u,context:this.context});this.singleLine&&!/^\s$/.test(f)&&(o+=" "),o+=f}return o}});var Ao=v((Lp,Y)=>{"use strict";var{isColorSupported:Co}=Zt(),Gy=os(),{Transform:Hy}=D("node:stream"),Jy=gs(),Yy=ir(),{ERROR_LIKE_KEYS:To,LEVEL_KEY:Xy,LEVEL_LABEL:Zy,MESSAGE_KEY:Qy,TIMESTAMP_KEY:eg}=U(),{buildSafeSonicBoom:tg,parseFactoryOptions:rg}=bo(),ng=xo(),ig={colorize:Co,colorizeObjects:!0,crlf:!1,customColors:null,customLevels:null,customPrettifiers:{},errorLikeObjectKeys:To,errorProps:"",hideObject:!1,ignore:"hostname",include:void 0,levelFirst:!1,levelKey:Xy,levelLabel:Zy,messageFormat:null,messageKey:Qy,minimumLevel:void 0,outputStream:process.stdout,singleLine:!1,timestampKey:eg,translateTime:!0,useOnlyCustomProps:!0};function Pr(e){let t=rg(Object.assign({},ig,e));return ng.bind({...t,context:t})}function rt(e={}){let t=Pr(e),r;return Jy(function(n){n.on("message",function s(o){!o||o.code!=="PINO_CONFIG"||(Object.assign(e,{messageKey:o.config.messageKey,errorLikeObjectKeys:Array.from(new Set([...e.errorLikeObjectKeys||To,o.config.errorKey])),customLevels:o.config.levels.values}),t=Pr(e),n.off("message",s))});let i=new Hy({objectMode:!0,autoDestroy:!0,transform(s,o,u){let f=t(s);u(null,f)}});return typeof e.destination=="object"&&typeof e.destination.write=="function"?r=e.destination:r=tg({dest:e.destination||1,append:e.append,mkdir:e.mkdir,sync:e.sync}),n.on("unknown",function(s){r.write(s+`
28
+ `)}),Gy(n,i,r),i},{parse:"lines",close(n,i){r.on("close",()=>{i(n)})}})}Y.exports=rt;Y.exports.build=rt;Y.exports.PinoPretty=rt;Y.exports.prettyFactory=Pr;Y.exports.colorizerFactory=Yy;Y.exports.isColorSupported=Co;Y.exports.default=rt});var ko=/([\p{Ll}\d])(\p{Lu})/gu,Fo=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,Wo=/(\d)\p{Ll}|(\p{L})\d/u,Ko=/[^\p{L}\d]+/giu,Rr="$1\0$2";function Ir(e){let t=e.trim();t=t.replace(ko,Rr).replace(Fo,Rr),t=t.replace(Ko,"\0");let r=0,n=t.length;for(;t.charAt(r)==="\0";)r++;if(r===n)return[];for(;t.charAt(n-1)==="\0";)n--;return t.slice(r,n).split(/\0/g)}function zo(e){let t=Ir(e);for(let r=0;r<t.length;r++){let n=t[r],i=Wo.exec(n);if(i){let s=i.index+(i[1]??i[2]).length;t.splice(r,1,n.slice(0,s),n.slice(s))}}return t}function Vo(e,t){let[r,n,i]=Go(e,t);return r+n.map(Uo(t?.locale)).join(t?.delimiter??"_")+i}function Uo(e){return e===!1?t=>t.toUpperCase():t=>t.toLocaleUpperCase(e)}function Go(e,t={}){let r=t.split??(t.separateNumbers?zo:Ir),n=t.prefixCharacters??"",i=t.suffixCharacters??"",s=0,o=e.length;for(;s<e.length;){let u=e.charAt(s);if(!n.includes(u))break;s++}for(;o>s;){let u=o-1,f=e.charAt(u);if(!i.includes(f))break;o=u}return[e.slice(0,s),r(e.slice(s,o)),e.slice(o)]}var Ho=class it{constructor(t){this.serviceName=Vo(t)}log(t,...r){let{color:n,reset:i}=it.getColor(t),s=[it.getSymbols(t)+"{ENV}",n+`[${this.serviceName}]:`+i,...r];t==="success"?console.log(...s):console[t](...s)}static getColor(t){let r="\x1B[34m";return t==="success"&&(r="\x1B[32m"),t==="warn"&&(r="\x1B[33m"),t==="error"&&(r="\x1B[31m"),{color:r,reset:"\x1B[0m"}}static getSymbols(t){let{color:r,reset:n}=this.getColor(t);return t==="success"?r+" \u2714 "+n:t==="warn"?r+" \u25B2 "+n:t==="error"?r+" \u2717 "+n:r+" \uFFEE "+n}};function kr(...e){return e.reduce((t,r)=>({...t,...r}),{})}var Fr=class extends Ho{constructor(e,t){super(e),this.variables=t,this.env=new Map,this.validate(),this.load()}validate(){let e=Object.keys(this.variables);for(let t of e){let r=this.variables[t],n=process.env[t];if(n==null){r.default?this.log("warn",`'${t}' not exists and default:`,r.default):this.log("error",`'${t}' not exists and not have defaults`);continue}if(r.type==="number"&&isNaN(Number(n))){this.log("warn",`is '${typeof n}', but must 'number'`);continue}if(r.type==="boolean"&&n!=="true"&&n!=="false"){this.log("warn",`'${t}' should be boolean ('true' or 'false')`);continue}this.log("success",`'${t}' successfully loaded`)}}load(){let e=Object.keys(this.variables);for(let t of e)this.$(t,!1);this.env.set("SERVICE_NAME",this.serviceName)}$(e,t=!0){if(t&&this.env.has(String(e)))return this.env.get(String(e));let r=this.variables[e],n=process.env[e]||r.default;return r.type==="number"&&(n=Number(n)),r.type==="boolean"&&(n=n==="true"),r.type==="string"&&(n=String(n)),this.env.set(String(e),n),n}};var Wr={NODE_ENV:{type:"string",default:"development"},LOG_LEVEL:{type:"string",default:"info"},SERVICE_NAME:{type:"string",default:"UNKNOWN"}};var Br=$r(Ki(),1),Dr=$r(Ao(),1);var jo=(e,t)=>{if("timing"in e){let r=e.timing;return{...e,timing:{...Object.fromEntries(Object.entries(r).map(([n,i])=>[n,i.toFixed(2)+"ms"])),total:Object.values(r).reduce((n,i)=>n+i,0).toFixed(2)+"ms"}}}return{...e,duration:t}};async function sg(e,t){let r=performance.now(),n=e.type==="render"?"Rendering":"Getting data",i={route:e.route,...e.type==="get-data"&&e.functionName?{functionName:e.functionName}:{}};nt.debug(i,`${n} start`);let s=o=>{let u=performance.now()-r;r=performance.now(),i.timing??(i.timing={}),i.timing[String(o)]=u};try{let o=await Promise.resolve(t(s)),u=performance.now()-r;return nt.debug(jo(i,`${u.toFixed(2)}ms`),`${n} completed`),o}catch(o){let u=performance.now()-r;throw nt.error(jo(i,`${u.toFixed(2)}ms`),`${n} failed`,o),o}}var Po=new Fr("logger",kr(Wr)),og=Po.$("SERVICE_NAME"),ug=(0,Dr.default)({colorize:Dr.default.isColorSupported,ignore:"pid,hostname"}),fg=(0,Br.default)({name:og,level:Po.$("LOG_LEVEL"),timestamp:Br.default.stdTimeFunctions.isoTime,formatters:{level(e){return{level:e.toUpperCase()}}},base:{pid:process.pid},redact:{paths:["req.headers.authorization","req.headers.cookie","user.password","user.secret"],censor:"[REDACTED]"}},ug),nt=fg;export{nt as default,sg as withLogger};
29
29
  //# sourceMappingURL=index.mjs.map