zaileys 0.28.4-dev → 0.28.6-dev

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.
Files changed (58) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -0
  3. package/dist/index.d.mts +51 -13
  4. package/dist/index.d.ts +51 -13
  5. package/dist/index.js +40 -42
  6. package/dist/index.mjs +40 -42
  7. package/docs.css +10 -0
  8. package/package.json +12 -8
  9. package/.zaileys/zaileys-auth/app-state-sync-key-AAAAAFNh.json +0 -1
  10. package/.zaileys/zaileys-auth/app-state-sync-key-AAAAAFNi.json +0 -1
  11. package/.zaileys/zaileys-auth/app-state-sync-key-AAAAAFNj.json +0 -1
  12. package/.zaileys/zaileys-auth/app-state-sync-key-AAAAAFNk.json +0 -1
  13. package/.zaileys/zaileys-auth/app-state-sync-key-AAAAAFNl.json +0 -1
  14. package/.zaileys/zaileys-auth/app-state-sync-key-AAAAAFNm.json +0 -1
  15. package/.zaileys/zaileys-auth/app-state-sync-key-AAAAAFNn.json +0 -1
  16. package/.zaileys/zaileys-auth/app-state-sync-key-AAAAAFNo.json +0 -1
  17. package/.zaileys/zaileys-auth/app-state-sync-key-AAAAAFNp.json +0 -1
  18. package/.zaileys/zaileys-auth/app-state-sync-key-AAAAAFNq.json +0 -1
  19. package/.zaileys/zaileys-auth/app-state-sync-key-AAAAAFNr.json +0 -1
  20. package/.zaileys/zaileys-auth/app-state-sync-key-AAAAAFNs.json +0 -1
  21. package/.zaileys/zaileys-auth/app-state-sync-key-AAAAAFNt.json +0 -1
  22. package/.zaileys/zaileys-auth/app-state-sync-key-AAAAAFNu.json +0 -1
  23. package/.zaileys/zaileys-auth/app-state-sync-version-critical_block.json +0 -1
  24. package/.zaileys/zaileys-auth/app-state-sync-version-critical_unblock_low.json +0 -1
  25. package/.zaileys/zaileys-auth/app-state-sync-version-regular.json +0 -1
  26. package/.zaileys/zaileys-auth/app-state-sync-version-regular_high.json +0 -1
  27. package/.zaileys/zaileys-auth/creds.json +0 -1
  28. package/.zaileys/zaileys-auth/pre-key-1.json +0 -1
  29. package/.zaileys/zaileys-auth/pre-key-11.json +0 -1
  30. package/.zaileys/zaileys-auth/pre-key-12.json +0 -1
  31. package/.zaileys/zaileys-auth/pre-key-13.json +0 -1
  32. package/.zaileys/zaileys-auth/pre-key-14.json +0 -1
  33. package/.zaileys/zaileys-auth/pre-key-15.json +0 -1
  34. package/.zaileys/zaileys-auth/pre-key-16.json +0 -1
  35. package/.zaileys/zaileys-auth/pre-key-17.json +0 -1
  36. package/.zaileys/zaileys-auth/pre-key-18.json +0 -1
  37. package/.zaileys/zaileys-auth/pre-key-19.json +0 -1
  38. package/.zaileys/zaileys-auth/pre-key-2.json +0 -1
  39. package/.zaileys/zaileys-auth/pre-key-20.json +0 -1
  40. package/.zaileys/zaileys-auth/pre-key-21.json +0 -1
  41. package/.zaileys/zaileys-auth/pre-key-22.json +0 -1
  42. package/.zaileys/zaileys-auth/pre-key-23.json +0 -1
  43. package/.zaileys/zaileys-auth/pre-key-24.json +0 -1
  44. package/.zaileys/zaileys-auth/pre-key-25.json +0 -1
  45. package/.zaileys/zaileys-auth/pre-key-26.json +0 -1
  46. package/.zaileys/zaileys-auth/pre-key-27.json +0 -1
  47. package/.zaileys/zaileys-auth/pre-key-28.json +0 -1
  48. package/.zaileys/zaileys-auth/pre-key-29.json +0 -1
  49. package/.zaileys/zaileys-auth/pre-key-3.json +0 -1
  50. package/.zaileys/zaileys-auth/pre-key-30.json +0 -1
  51. package/.zaileys/zaileys-auth/pre-key-4.json +0 -1
  52. package/.zaileys/zaileys-auth/pre-key-5.json +0 -1
  53. package/.zaileys/zaileys-auth/pre-key-6.json +0 -1
  54. package/.zaileys/zaileys-auth/pre-key-7.json +0 -1
  55. package/.zaileys/zaileys-auth/pre-key-8.json +0 -1
  56. package/.zaileys/zaileys-auth/pre-key-9.json +0 -1
  57. package/.zaileys/zaileys-auth/session-62858788977802.0.json +0 -1
  58. package/.zaileys/zaileys-store.json +0 -1
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
- var ls=Object.create;var ze=Object.defineProperty,as=Object.defineProperties,cs=Object.getOwnPropertyDescriptor,us=Object.getOwnPropertyDescriptors,fs=Object.getOwnPropertyNames,Vt=Object.getOwnPropertySymbols,hs=Object.getPrototypeOf,Ht=Object.prototype.hasOwnProperty,ds=Object.prototype.propertyIsEnumerable;var De=(e,t,r)=>t in e?ze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,D=(e,t)=>{for(var r in t||(t={}))Ht.call(t,r)&&De(e,r,t[r]);if(Vt)for(var r of Vt(t))ds.call(t,r)&&De(e,r,t[r]);return e},Q=(e,t)=>as(e,us(t));var B=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ys=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of fs(t))!Ht.call(e,n)&&n!==r&&ze(e,n,{get:()=>t[n],enumerable:!(i=cs(t,n))||i.enumerable});return e};var Ne=(e,t,r)=>(r=e!=null?ls(hs(e)):{},ys(t||!e||!e.__esModule?ze(r,"default",{value:e,enumerable:!0}):r,e));var Jt=(e,t,r)=>De(e,typeof t!="symbol"?t+"":t,r);var J=(e,t,r)=>new Promise((i,n)=>{var s=o=>{try{f(r.next(o))}catch(c){n(c)}},l=o=>{try{f(r.throw(o))}catch(c){n(c)}},f=o=>o.done?i(o.value):Promise.resolve(o.value).then(s,l);f((r=r.apply(e,t)).next())});var Fe=E((Pc,Gt)=>{"use strict";Gt.exports=class extends Error{constructor(r,i){super(r||"Unknown error");Jt(this,"name","AssertError");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,i)}}});var We=E((zc,Xt)=>{"use strict";Xt.exports=function(...e){try{return JSON.stringify(...e)}catch(t){return"[Cannot display object: "+t.message+"]"}}});var ne=E((Nc,Yt)=>{"use strict";var ps=Fe(),gs=We(),ms=Yt.exports=function(e,...t){if(e)return;if(t.length===1&&t[0]instanceof Error)throw t[0];let r=t.filter(i=>i!=="").map(i=>typeof i=="string"?i:i instanceof Error?i.message:gs(i));throw new ps(r.join(" "),ms)}});var ye=E((Fc,Zt)=>{"use strict";var Ke=ne(),Qt={};Zt.exports=function(e,t,r){if(t===!1||t===null||t===void 0)return e;r=r||{},typeof r=="string"&&(r={separator:r});let i=Array.isArray(t);Ke(!i||!r.separator,"Separator option is not valid for array-based chain");let n=i?t:t.split(r.separator||"."),s=e;for(let l=0;l<n.length;++l){let f=n[l],o=r.iterables&&Qt.iterables(s);if(Array.isArray(s)||o==="set"){let c=Number(f);Number.isInteger(c)&&(f=c<0?s.length+c:c)}if(!s||typeof s=="function"&&r.functions===!1||!o&&s[f]===void 0){Ke(!r.strict||l+1===n.length,"Missing segment",f,"in reach path ",t),Ke(typeof s=="object"||r.functions===!0||typeof s!="function","Invalid segment",f,"in reach path ",t),s=r.default;break}o?o==="set"?s=[...s][f]:s=s.get(f):s=s[f]}return s};Qt.iterables=function(e){if(e instanceof Set)return"set";if(e instanceof Map)return"map"}});var Ue=E((I,tr)=>{"use strict";var er={};I=tr.exports={array:Array.prototype,buffer:Buffer&&Buffer.prototype,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,url:URL.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype};er.typeMap=new Map([["[object Error]",I.error],["[object Map]",I.map],["[object Promise]",I.promise],["[object Set]",I.set],["[object URL]",I.url],["[object WeakMap]",I.weakMap],["[object WeakSet]",I.weakSet]]);I.getInternalProto=function(e){if(Array.isArray(e))return I.array;if(Buffer&&e instanceof Buffer)return I.buffer;if(e instanceof Date)return I.date;if(e instanceof RegExp)return I.regex;if(e instanceof Error)return I.error;let t=Object.prototype.toString.call(e);return er.typeMap.get(t)||I.generic}});var we=E(rr=>{"use strict";rr.keys=function(e,t={}){return t.symbols!==!1?Reflect.ownKeys(e):Object.getOwnPropertyNames(e)}});var Se=E((Kc,nr)=>{"use strict";var bs=ye(),z=Ue(),ws=we(),Z={needsProtoHack:new Set([z.set,z.map,z.weakSet,z.weakMap])};nr.exports=Z.clone=function(e,t={},r=null){if(typeof e!="object"||e===null)return e;let i=Z.clone,n=r;if(t.shallow){if(t.shallow!==!0)return Z.cloneWithShallow(e,t);i=o=>o}else if(n){let o=n.get(e);if(o)return o}else n=new Map;let s=z.getInternalProto(e);switch(s){case z.buffer:return Buffer==null?void 0:Buffer.from(e);case z.date:return new Date(e.getTime());case z.regex:case z.url:return new s.constructor(e)}let l=Z.base(e,s,t);if(l===e)return e;if(n&&n.set(e,l),s===z.set)for(let o of e)l.add(i(o,t,n));else if(s===z.map)for(let[o,c]of e)l.set(o,i(c,t,n));let f=ws.keys(e,t);for(let o of f){if(o==="__proto__")continue;if(s===z.array&&o==="length"){l.length=e.length;continue}let c=Object.getOwnPropertyDescriptor(e,o);c?c.get||c.set?Object.defineProperty(l,o,c):c.enumerable?l[o]=i(e[o],t,n):Object.defineProperty(l,o,{enumerable:!1,writable:!0,configurable:!0,value:i(e[o],t,n)}):Object.defineProperty(l,o,{enumerable:!0,writable:!0,configurable:!0,value:i(e[o],t,n)})}return l};Z.cloneWithShallow=function(e,t){let r=t.shallow;t=Object.assign({},t),t.shallow=!1;let i=new Map;for(let n of r){let s=bs(e,n);(typeof s=="object"||typeof s=="function")&&i.set(s,s)}return Z.clone(e,t,i)};Z.base=function(e,t,r){if(r.prototype===!1)return Z.needsProtoHack.has(t)?new t.constructor:t===z.array?[]:{};let i=Object.getPrototypeOf(e);if(i&&i.isImmutable)return e;if(t===z.array){let n=[];return i!==t&&Object.setPrototypeOf(n,i),n}if(Z.needsProtoHack.has(t)){let n=new i.constructor;return i!==t&&Object.setPrototypeOf(n,i),n}return Object.create(i)}});var He=E((Uc,or)=>{"use strict";var Ve=ne(),ir=Se(),Ss=we(),sr={};or.exports=sr.merge=function(e,t,r){if(Ve(e&&typeof e=="object","Invalid target value: must be an object"),Ve(t==null||typeof t=="object","Invalid source value: must be null, undefined, or an object"),!t)return e;if(r=Object.assign({nullOverride:!0,mergeArrays:!0},r),Array.isArray(t)){Ve(Array.isArray(e),"Cannot merge array onto an object"),r.mergeArrays||(e.length=0);for(let n=0;n<t.length;++n)e.push(ir(t[n],{symbols:r.symbols}));return e}let i=Ss.keys(t,r);for(let n=0;n<i.length;++n){let s=i[n];if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(t,s))continue;let l=t[s];if(l&&typeof l=="object"){if(e[s]===l)continue;!e[s]||typeof e[s]!="object"||Array.isArray(e[s])!==Array.isArray(l)||l instanceof Date||Buffer&&Buffer.isBuffer(l)||l instanceof RegExp?e[s]=ir(l,{symbols:r.symbols}):sr.merge(e[s],l,r)}else(l!=null||r.nullOverride)&&(e[s]=l)}return e}});var fr=E((Vc,ur)=>{"use strict";var ve=ne(),ar=Se(),cr=He(),lr=ye(),Oe={};ur.exports=function(e,t,r={}){if(ve(e&&typeof e=="object","Invalid defaults value: must be an object"),ve(!t||t===!0||typeof t=="object","Invalid source value: must be true, falsy or an object"),ve(typeof r=="object","Invalid options: must be an object"),!t)return null;if(r.shallow)return Oe.applyToDefaultsWithShallow(e,t,r);let i=ar(e);if(t===!0)return i;let n=r.nullOverride!==void 0?r.nullOverride:!1;return cr(i,t,{nullOverride:n,mergeArrays:!1})};Oe.applyToDefaultsWithShallow=function(e,t,r){let i=r.shallow;ve(Array.isArray(i),"Invalid keys");let n=new Map,s=t===!0?null:new Set;for(let o of i){o=Array.isArray(o)?o:o.split(".");let c=lr(e,o);c&&typeof c=="object"?n.set(c,s&&lr(t,o)||c):s&&s.add(o)}let l=ar(e,{},n);if(!s)return l;for(let o of s)Oe.reachCopy(l,t,o);let f=r.nullOverride!==void 0?r.nullOverride:!1;return cr(l,t,{nullOverride:f,mergeArrays:!1})};Oe.reachCopy=function(e,t,r){for(let s of r){if(!(s in t))return;let l=t[s];if(typeof l!="object"||l===null)return;t=l}let i=t,n=e;for(let s=0;s<r.length-1;++s){let l=r[s];typeof n[l]!="object"&&(n[l]={}),n=n[l]}n[r[r.length-1]]=i}});var dr=E((Hc,hr)=>{"use strict";var Je={};hr.exports=Je.Bench=class{constructor(){this.ts=0,this.reset()}reset(){this.ts=Je.Bench.now()}elapsed(){return Je.Bench.now()-this.ts}static now(){let e=process.hrtime();return e[0]*1e3+e[1]/1e6}}});var Ge=E((Gc,yr)=>{"use strict";yr.exports=function(){}});var gr=E((Xc,pr)=>{"use strict";var vs=Ge();pr.exports=function(){return new Promise(vs)}});var Xe=E((Yc,mr)=>{"use strict";var G=Ue(),P={mismatched:null};mr.exports=function(e,t,r){return r=Object.assign({prototype:!0},r),!!P.isDeepEqual(e,t,r,[])};P.isDeepEqual=function(e,t,r,i){if(e===t)return e!==0||1/e===1/t;let n=typeof e;if(n!==typeof t||e===null||t===null)return!1;if(n==="function"){if(!r.deepFunction||e.toString()!==t.toString())return!1}else if(n!=="object")return e!==e&&t!==t;let s=P.getSharedType(e,t,!!r.prototype);switch(s){case G.buffer:return Buffer&&Buffer.prototype.equals.call(e,t);case G.promise:return e===t;case G.regex:case G.url:return e.toString()===t.toString();case P.mismatched:return!1}for(let l=i.length-1;l>=0;--l)if(i[l].isSame(e,t))return!0;i.push(new P.SeenEntry(e,t));try{return!!P.isDeepEqualObj(s,e,t,r,i)}finally{i.pop()}};P.getSharedType=function(e,t,r){if(r)return Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?P.mismatched:G.getInternalProto(e);let i=G.getInternalProto(e);return i!==G.getInternalProto(t)?P.mismatched:i};P.valueOf=function(e){let t=e.valueOf;if(t===void 0)return e;try{return t.call(e)}catch(r){return r}};P.hasOwnEnumerableProperty=function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)};P.isSetSimpleEqual=function(e,t){for(let r of Set.prototype.values.call(e))if(!Set.prototype.has.call(t,r))return!1;return!0};P.isDeepEqualObj=function(e,t,r,i,n){var u;let{isDeepEqual:s,valueOf:l,hasOwnEnumerableProperty:f}=P,{keys:o,getOwnPropertySymbols:c}=Object;if(e===G.array)if(i.part){for(let g of t)for(let S of r)if(s(g,S,i,n))return!0}else{if(t.length!==r.length)return!1;for(let g=0;g<t.length;++g)if(!s(t[g],r[g],i,n))return!1;return!0}else if(e===G.set){if(t.size!==r.size)return!1;if(!P.isSetSimpleEqual(t,r)){let g=new Set(Set.prototype.values.call(r));for(let S of Set.prototype.values.call(t)){if(g.delete(S))continue;let w=!1;for(let v of g)if(s(S,v,i,n)){g.delete(v),w=!0;break}if(!w)return!1}}}else if(e===G.map){if(t.size!==r.size)return!1;for(let[g,S]of Map.prototype.entries.call(t))if(S===void 0&&!Map.prototype.has.call(r,g)||!s(S,Map.prototype.get.call(r,g),i,n))return!1}else if(e===G.error&&(t.name!==r.name||t.message!==r.message))return!1;let a=l(t),h=l(r);if((t!==a||r!==h)&&!s(a,h,i,n))return!1;let y=o(t);if(!i.part&&y.length!==o(r).length&&!i.skip)return!1;let d=0;for(let g of y){if(i.skip&&i.skip.includes(g)){r[g]===void 0&&++d;continue}if(!f(r,g)||!s(t[g],r[g],i,n))return!1}if(!i.part&&y.length-d!==o(r).length)return!1;if(i.symbols!==!1){let g=c(t),S=new Set(c(r));for(let w of g){if(!((u=i.skip)!=null&&u.includes(w))){if(f(t,w)){if(!f(r,w)||!s(t[w],r[w],i,n))return!1}else if(f(r,w))return!1}S.delete(w)}for(let w of S)if(f(r,w))return!1}return!0};P.SeenEntry=class{constructor(e,t){this.obj=e,this.ref=t}isSame(e,t){return this.obj===e&&this.ref===t}}});var Ye=E((Zc,br)=>{"use strict";br.exports=function(e){return e.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}});var Sr=E((eu,wr)=>{"use strict";var Ee=ne(),Os=Xe(),Es=Ye(),xs=we(),K={};wr.exports=function(e,t,r={}){return typeof t!="object"&&(t=[t]),Ee(!Array.isArray(t)||t.length,"Values array cannot be empty"),typeof e=="string"?K.string(e,t,r):Array.isArray(e)?K.array(e,t,r):(Ee(typeof e=="object","Reference must be string or an object"),K.object(e,t,r))};K.array=function(e,t,r){if(Array.isArray(t)||(t=[t]),!e.length||r.only&&r.once&&e.length!==t.length)return!1;let i,n=new Map;for(let l of t)if(!r.deep||!l||typeof l!="object"){let f=n.get(l);f?++f.allowed:n.set(l,{allowed:1,hits:0})}else{i=i!=null?i:K.compare(r);let f=!1;for(let[o,c]of n.entries())if(i(o,l)){++c.allowed,f=!0;break}f||n.set(l,{allowed:1,hits:0})}let s=0;for(let l of e){let f;if(!r.deep||!l||typeof l!="object")f=n.get(l);else{i=i!=null?i:K.compare(r);for(let[o,c]of n.entries())if(i(o,l)){f=c;break}}if(f&&(++f.hits,++s,r.once&&f.hits>f.allowed))return!1}if(r.only&&s!==e.length)return!1;for(let l of n.values())if(l.hits!==l.allowed&&l.hits<l.allowed&&!r.part)return!1;return!!s};K.object=function(e,t,r){Ee(r.once===void 0,"Cannot use option once with object");let i=xs.keys(e,r);if(!i.length)return!1;if(Array.isArray(t))return K.array(i,t,r);let n=Object.getOwnPropertySymbols(t).filter(o=>t.propertyIsEnumerable(o)),s=[...Object.keys(t),...n],l=K.compare(r),f=new Set(s);for(let o of i){if(!f.has(o)){if(r.only)return!1;continue}if(!l(t[o],e[o]))return!1;f.delete(o)}return f.size?r.part?f.size<s.length:!1:!0};K.string=function(e,t,r){if(e==="")return t.length===1&&t[0]===""||!r.once&&!t.some(o=>o!=="");let i=new Map,n=[];for(let o of t)if(Ee(typeof o=="string","Cannot compare string reference to non-string value"),o){let c=i.get(o);c?++c.allowed:(i.set(o,{allowed:1,hits:0}),n.push(Es(o)))}else if(r.once||r.only)return!1;if(!n.length)return!0;let s=new RegExp(`(${n.join("|")})`,"g"),l=e.replace(s,(o,c)=>(++i.get(c).hits,""));if(r.only&&l)return!1;let f=!1;for(let o of i.values())if(o.hits&&(f=!0),o.hits!==o.allowed&&(o.hits<o.allowed&&!r.part||r.once))return!1;return!!f};K.compare=function(e){if(!e.deep)return K.shallow;let t=e.only!==void 0,r=e.part!==void 0,i={prototype:t?e.only:r?!e.part:!1,part:t?!e.only:r?e.part:!1};return(n,s)=>Os(n,s,i)};K.shallow=function(e,t){return e===t}});var Or=E((tu,vr)=>{"use strict";var _s=ne();vr.exports=function(e){return _s(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(e),"Bad attribute value ("+e+")"),e.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}});var xr=E((ru,Er)=>{"use strict";var te={};Er.exports=function(e){if(!e)return"";let t="";for(let r=0;r<e.length;++r){let i=e.charCodeAt(r);te.isSafe(i)?t+=e[r]:t+=te.escapeHtmlChar(i)}return t};te.escapeHtmlChar=function(e){let t=te.namedHtml.get(e);return t||(e>=256?"&#"+e+";":`&#x${e.toString(16).padStart(2,"0")};`)};te.isSafe=function(e){return te.safeCharCodes.has(e)};te.namedHtml=new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[34,"&quot;"],[160,"&nbsp;"],[162,"&cent;"],[163,"&pound;"],[164,"&curren;"],[169,"&copy;"],[174,"&reg;"]]);te.safeCharCodes=function(){let e=new Set;for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||t===32||t===46||t===44||t===45||t===58||t===95)&&e.add(t);return e}()});var Tr=E((nu,_r)=>{"use strict";var xe={};_r.exports=function(e){return e?e.replace(/[<>&\u2028\u2029]/g,xe.escape):""};xe.escape=function(e){return xe.replacements.get(e)};xe.replacements=new Map([["<","\\u003c"],[">","\\u003e"],["&","\\u0026"],["\u2028","\\u2028"],["\u2029","\\u2029"]])});var jr=E((iu,kr)=>{"use strict";var Ar={};kr.exports=Ar.flatten=function(e,t){let r=t||[];for(let i of e)Array.isArray(i)?Ar.flatten(i,r):r.push(i);return r}});var qr=E((su,Lr)=>{"use strict";var Rr={};Lr.exports=function(e,t,r={}){if(!e||!t)return r.first?null:[];let i=[],n=Array.isArray(e)?new Set(e):e,s=new Set;for(let l of t)if(Rr.has(n,l)&&!s.has(l)){if(r.first)return l;i.push(l),s.add(l)}return r.first?null:i};Rr.has=function(e,t){return typeof e.has=="function"?e.has(t):e[t]!==void 0}});var Br=E((ou,$r)=>{"use strict";$r.exports=function(e){return typeof(e==null?void 0:e.then)=="function"}});var Ir=E((lu,Cr)=>{"use strict";var Mr={wrapped:Symbol("wrapped")};Cr.exports=function(e){if(e[Mr.wrapped])return e;let t=!1,r=function(...i){t||(t=!0,e(...i))};return r[Mr.wrapped]=!0,r}});var Dr=E((au,Pr)=>{"use strict";var Ts=ye();Pr.exports=function(e,t,r){return t.replace(/{([^{}]+)}/g,(i,n)=>{let s=Ts(e,n,r);return s!=null?s:""})}});var Nr=E((cu,zr)=>{"use strict";var As={maxTimer:2147483647};zr.exports=function(e,t,r){if(typeof e=="bigint"&&(e=Number(e)),e>=Number.MAX_SAFE_INTEGER&&(e=1/0),typeof e!="number"&&e!==void 0)throw new TypeError("Timeout must be a number or bigint");return new Promise(i=>{let n=r?r.setTimeout:setTimeout,s=()=>{let l=Math.min(e,As.maxTimer);e-=l,n(()=>e>0?s():i(t),l)};e!==1/0&&s()})}});var Fr=E(q=>{"use strict";q.applyToDefaults=fr();q.assert=ne();q.AssertError=Fe();q.Bench=dr();q.block=gr();q.clone=Se();q.contain=Sr();q.deepEqual=Xe();q.escapeHeaderAttribute=Or();q.escapeHtml=xr();q.escapeJson=Tr();q.escapeRegex=Ye();q.flatten=jr();q.ignore=Ge();q.intersect=qr();q.isPromise=Br();q.merge=He();q.once=Ir();q.reach=ye();q.reachTemplate=Dr();q.stringify=We();q.wait=Nr()});var Wr=E(m=>{"use strict";var ie=Fr(),N={codes:new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Moved Temporarily"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary Redirect"],[400,"Bad Request"],[401,"Unauthorized"],[402,"Payment Required"],[403,"Forbidden"],[404,"Not Found"],[405,"Method Not Allowed"],[406,"Not Acceptable"],[407,"Proxy Authentication Required"],[408,"Request Time-out"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Request Entity Too Large"],[414,"Request-URI Too Large"],[415,"Unsupported Media Type"],[416,"Requested Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a teapot"],[422,"Unprocessable Entity"],[423,"Locked"],[424,"Failed Dependency"],[425,"Too Early"],[426,"Upgrade Required"],[428,"Precondition Required"],[429,"Too Many Requests"],[431,"Request Header Fields Too Large"],[451,"Unavailable For Legal Reasons"],[500,"Internal Server Error"],[501,"Not Implemented"],[502,"Bad Gateway"],[503,"Service Unavailable"],[504,"Gateway Time-out"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]])};m.Boom=class extends Error{constructor(e,t={}){if(e instanceof Error)return m.boomify(ie.clone(e),t);let{statusCode:r=500,data:i=null,ctor:n=m.Boom}=t,s=new Error(e||void 0);Error.captureStackTrace(s,n),s.data=i;let l=N.initialize(s,r);return Object.defineProperty(l,"typeof",{value:n}),t.decorate&&Object.assign(l,t.decorate),l}static[Symbol.hasInstance](e){return this===m.Boom?m.isBoom(e):this.prototype.isPrototypeOf(e)}};m.isBoom=function(e,t){return e instanceof Error&&!!e.isBoom&&(!t||e.output.statusCode===t)};m.boomify=function(e,t){var r,i;return ie.assert(e instanceof Error,"Cannot wrap non-Error object"),t=t||{},t.data!==void 0&&(e.data=t.data),t.decorate&&Object.assign(e,t.decorate),e.isBoom?t.override===!1||!t.statusCode&&!t.message?e:N.initialize(e,(i=t.statusCode)!=null?i:e.output.statusCode,t.message):N.initialize(e,(r=t.statusCode)!=null?r:500,t.message)};m.badRequest=function(e,t){return new m.Boom(e,{statusCode:400,data:t,ctor:m.badRequest})};m.unauthorized=function(e,t,r){let i=new m.Boom(e,{statusCode:401,ctor:m.unauthorized});if(!t)return i;if(typeof t!="string")return i.output.headers["WWW-Authenticate"]=t.join(", "),i;let n=`${t}`;return(r||e)&&(i.output.payload.attributes={}),r&&(typeof r=="string"?(n+=" "+ie.escapeHeaderAttribute(r),i.output.payload.attributes=r):n+=" "+Object.keys(r).map(s=>{var f;let l=(f=r[s])!=null?f:"";return i.output.payload.attributes[s]=l,`${s}="${ie.escapeHeaderAttribute(l.toString())}"`}).join(", ")),e?(r&&(n+=","),n+=` error="${ie.escapeHeaderAttribute(e)}"`,i.output.payload.attributes.error=e):i.isMissing=!0,i.output.headers["WWW-Authenticate"]=n,i};m.paymentRequired=function(e,t){return new m.Boom(e,{statusCode:402,data:t,ctor:m.paymentRequired})};m.forbidden=function(e,t){return new m.Boom(e,{statusCode:403,data:t,ctor:m.forbidden})};m.notFound=function(e,t){return new m.Boom(e,{statusCode:404,data:t,ctor:m.notFound})};m.methodNotAllowed=function(e,t,r){let i=new m.Boom(e,{statusCode:405,data:t,ctor:m.methodNotAllowed});return typeof r=="string"&&(r=[r]),Array.isArray(r)&&(i.output.headers.Allow=r.join(", ")),i};m.notAcceptable=function(e,t){return new m.Boom(e,{statusCode:406,data:t,ctor:m.notAcceptable})};m.proxyAuthRequired=function(e,t){return new m.Boom(e,{statusCode:407,data:t,ctor:m.proxyAuthRequired})};m.clientTimeout=function(e,t){return new m.Boom(e,{statusCode:408,data:t,ctor:m.clientTimeout})};m.conflict=function(e,t){return new m.Boom(e,{statusCode:409,data:t,ctor:m.conflict})};m.resourceGone=function(e,t){return new m.Boom(e,{statusCode:410,data:t,ctor:m.resourceGone})};m.lengthRequired=function(e,t){return new m.Boom(e,{statusCode:411,data:t,ctor:m.lengthRequired})};m.preconditionFailed=function(e,t){return new m.Boom(e,{statusCode:412,data:t,ctor:m.preconditionFailed})};m.entityTooLarge=function(e,t){return new m.Boom(e,{statusCode:413,data:t,ctor:m.entityTooLarge})};m.uriTooLong=function(e,t){return new m.Boom(e,{statusCode:414,data:t,ctor:m.uriTooLong})};m.unsupportedMediaType=function(e,t){return new m.Boom(e,{statusCode:415,data:t,ctor:m.unsupportedMediaType})};m.rangeNotSatisfiable=function(e,t){return new m.Boom(e,{statusCode:416,data:t,ctor:m.rangeNotSatisfiable})};m.expectationFailed=function(e,t){return new m.Boom(e,{statusCode:417,data:t,ctor:m.expectationFailed})};m.teapot=function(e,t){return new m.Boom(e,{statusCode:418,data:t,ctor:m.teapot})};m.badData=function(e,t){return new m.Boom(e,{statusCode:422,data:t,ctor:m.badData})};m.locked=function(e,t){return new m.Boom(e,{statusCode:423,data:t,ctor:m.locked})};m.failedDependency=function(e,t){return new m.Boom(e,{statusCode:424,data:t,ctor:m.failedDependency})};m.tooEarly=function(e,t){return new m.Boom(e,{statusCode:425,data:t,ctor:m.tooEarly})};m.preconditionRequired=function(e,t){return new m.Boom(e,{statusCode:428,data:t,ctor:m.preconditionRequired})};m.tooManyRequests=function(e,t){return new m.Boom(e,{statusCode:429,data:t,ctor:m.tooManyRequests})};m.illegal=function(e,t){return new m.Boom(e,{statusCode:451,data:t,ctor:m.illegal})};m.internal=function(e,t,r=500){return N.serverError(e,t,r,m.internal)};m.notImplemented=function(e,t){return N.serverError(e,t,501,m.notImplemented)};m.badGateway=function(e,t){return N.serverError(e,t,502,m.badGateway)};m.serverUnavailable=function(e,t){return N.serverError(e,t,503,m.serverUnavailable)};m.gatewayTimeout=function(e,t){return N.serverError(e,t,504,m.gatewayTimeout)};m.badImplementation=function(e,t){let r=N.serverError(e,t,500,m.badImplementation);return r.isDeveloperError=!0,r};N.initialize=function(e,t,r){let i=parseInt(t,10);if(ie.assert(!isNaN(i)&&i>=400,"First argument must be a number (400+):",t),e.isBoom=!0,e.isServer=i>=500,e.hasOwnProperty("data")||(e.data=null),e.output={statusCode:i,payload:{},headers:{}},Object.defineProperty(e,"reformat",{value:N.reformat,configurable:!0}),!r&&!e.message&&(e.reformat(),r=e.output.payload.error),r){let n=Object.getOwnPropertyDescriptor(e,"message")||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"message");ie.assert(!n||n.configurable&&!n.get,"The error is not compatible with boom"),e.message=r+(e.message?": "+e.message:""),e.output.payload.message=e.message}return e.reformat(),e};N.reformat=function(e=!1){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=N.codes.get(this.output.statusCode)||"Unknown",this.output.statusCode===500&&e!==!0?this.output.payload.message="An internal server error occurred":this.message&&(this.output.payload.message=this.message)};N.serverError=function(e,t,r,i){return t instanceof Error&&!t.isBoom?m.boomify(t,{statusCode:r,message:e}):new m.Boom(e,{statusCode:r,data:t,ctor:i})}});var Kr=E((du,_e)=>{"use strict";var ks=function(){"use strict";function e(a,h){return h!=null&&a instanceof h}var t;try{t=Map}catch(a){t=function(){}}var r;try{r=Set}catch(a){r=function(){}}var i;try{i=Promise}catch(a){i=function(){}}function n(a,h,y,d,u){typeof h=="object"&&(y=h.depth,d=h.prototype,u=h.includeNonEnumerable,h=h.circular);var g=[],S=[],w=typeof Buffer!="undefined";typeof h=="undefined"&&(h=!0),typeof y=="undefined"&&(y=1/0);function v(b,x){if(b===null)return null;if(x===0)return b;var O,T;if(typeof b!="object")return b;if(e(b,t))O=new t;else if(e(b,r))O=new r;else if(e(b,i))O=new i(function(H,he){b.then(function(de){H(v(de,x-1))},function(de){he(v(de,x-1))})});else if(n.__isArray(b))O=[];else if(n.__isRegExp(b))O=new RegExp(b.source,c(b)),b.lastIndex&&(O.lastIndex=b.lastIndex);else if(n.__isDate(b))O=new Date(b.getTime());else{if(w&&Buffer.isBuffer(b))return Buffer.allocUnsafe?O=Buffer.allocUnsafe(b.length):O=new Buffer(b.length),b.copy(O),O;e(b,Error)?O=Object.create(b):typeof d=="undefined"?(T=Object.getPrototypeOf(b),O=Object.create(T)):(O=Object.create(d),T=d)}if(h){var k=g.indexOf(b);if(k!=-1)return S[k];g.push(b),S.push(O)}e(b,t)&&b.forEach(function(H,he){var de=v(he,x-1),os=v(H,x-1);O.set(de,os)}),e(b,r)&&b.forEach(function(H){var he=v(H,x-1);O.add(he)});for(var A in b){var _;T&&(_=Object.getOwnPropertyDescriptor(T,A)),!(_&&_.set==null)&&(O[A]=v(b[A],x-1))}if(Object.getOwnPropertySymbols)for(var R=Object.getOwnPropertySymbols(b),A=0;A<R.length;A++){var $=R[A],j=Object.getOwnPropertyDescriptor(b,$);j&&!j.enumerable&&!u||(O[$]=v(b[$],x-1),j.enumerable||Object.defineProperty(O,$,{enumerable:!1}))}if(u)for(var C=Object.getOwnPropertyNames(b),A=0;A<C.length;A++){var M=C[A],j=Object.getOwnPropertyDescriptor(b,M);j&&j.enumerable||(O[M]=v(b[M],x-1),Object.defineProperty(O,M,{enumerable:!1}))}return O}return v(a,y)}n.clonePrototype=function(h){if(h===null)return null;var y=function(){};return y.prototype=h,new y};function s(a){return Object.prototype.toString.call(a)}n.__objToStr=s;function l(a){return typeof a=="object"&&s(a)==="[object Date]"}n.__isDate=l;function f(a){return typeof a=="object"&&s(a)==="[object Array]"}n.__isArray=f;function o(a){return typeof a=="object"&&s(a)==="[object RegExp]"}n.__isRegExp=o;function c(a){var h="";return a.global&&(h+="g"),a.ignoreCase&&(h+="i"),a.multiline&&(h+="m"),h}return n.__getRegExpFlags=c,n}();typeof _e=="object"&&_e.exports&&(_e.exports=ks)});var Hr=E((Ur,Vr)=>{"use strict";(function(){var e,t,r,i=[].splice,n=function(l,f){if(!(l instanceof f))throw new Error("Bound instance method accessed before binding")},s=[].indexOf;r=Kr(),e=B("events").EventEmitter,Vr.exports=t=function(){class l extends e{constructor(o={}){super(),this.get=this.get.bind(this),this.mget=this.mget.bind(this),this.set=this.set.bind(this),this.mset=this.mset.bind(this),this.del=this.del.bind(this),this.take=this.take.bind(this),this.ttl=this.ttl.bind(this),this.getTtl=this.getTtl.bind(this),this.keys=this.keys.bind(this),this.has=this.has.bind(this),this.getStats=this.getStats.bind(this),this.flushAll=this.flushAll.bind(this),this.flushStats=this.flushStats.bind(this),this.close=this.close.bind(this),this._checkData=this._checkData.bind(this),this._check=this._check.bind(this),this._isInvalidKey=this._isInvalidKey.bind(this),this._wrap=this._wrap.bind(this),this._getValLength=this._getValLength.bind(this),this._error=this._error.bind(this),this._initErrors=this._initErrors.bind(this),this.options=o,this._initErrors(),this.data={},this.options=Object.assign({forceString:!1,objectValueSize:80,promiseValueSize:80,arrayValueSize:40,stdTTL:0,checkperiod:600,useClones:!0,deleteOnExpire:!0,enableLegacyCallbacks:!1,maxKeys:-1},this.options),this.options.enableLegacyCallbacks&&(console.warn("WARNING! node-cache legacy callback support will drop in v6.x"),["get","mget","set","del","ttl","getTtl","keys","has"].forEach(c=>{var a;a=this[c],this[c]=function(...h){var y,d,u,g;if(u=h,[...h]=u,[y]=i.call(h,-1),typeof y=="function")try{g=a(...h),y(null,g)}catch(S){d=S,y(d)}else return a(...h,y)}})),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.validKeyTypes=["string","number"],this._checkData()}get(o){var c,a;if(n(this,l),(a=this._isInvalidKey(o))!=null)throw a;if(this.data[o]!=null&&this._check(o,this.data[o]))return this.stats.hits++,c=this._unwrap(this.data[o]),c;this.stats.misses++}mget(o){var c,a,h,y,d,u;if(n(this,l),!Array.isArray(o))throw c=this._error("EKEYSTYPE"),c;for(u={},h=0,d=o.length;h<d;h++){if(y=o[h],(a=this._isInvalidKey(y))!=null)throw a;this.data[y]!=null&&this._check(y,this.data[y])?(this.stats.hits++,u[y]=this._unwrap(this.data[y])):this.stats.misses++}return u}set(o,c,a){var h,y,d;if(n(this,l),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw h=this._error("ECACHEFULL"),h;if(this.options.forceString&&!1==="string"&&(c=JSON.stringify(c)),a==null&&(a=this.options.stdTTL),(y=this._isInvalidKey(o))!=null)throw y;return d=!1,this.data[o]&&(d=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[o],!1))),this.data[o]=this._wrap(c,a),this.stats.vsize+=this._getValLength(c),d||(this.stats.ksize+=this._getKeyLength(o),this.stats.keys++),this.emit("set",o,c),!0}mset(o){var c,a,h,y,d,u,g,S,w,v;if(n(this,l),this.options.maxKeys>-1&&this.stats.keys+o.length>=this.options.maxKeys)throw c=this._error("ECACHEFULL"),c;for(h=0,g=o.length;h<g;h++){if(u=o[h],{key:d,val:v,ttl:w}=u,w&&typeof w!="number")throw c=this._error("ETTLTYPE"),c;if((a=this._isInvalidKey(d))!=null)throw a}for(y=0,S=o.length;y<S;y++)u=o[y],{key:d,val:v,ttl:w}=u,this.set(d,v,w);return!0}del(o){var c,a,h,y,d,u;for(n(this,l),Array.isArray(o)||(o=[o]),c=0,h=0,d=o.length;h<d;h++){if(y=o[h],(a=this._isInvalidKey(y))!=null)throw a;this.data[y]!=null&&(this.stats.vsize-=this._getValLength(this._unwrap(this.data[y],!1)),this.stats.ksize-=this._getKeyLength(y),this.stats.keys--,c++,u=this.data[y],delete this.data[y],this.emit("del",y,u.v))}return c}take(o){var c;return n(this,l),c=this.get(o),c!=null&&this.del(o),c}ttl(o,c){var a;if(n(this,l),c||(c=this.options.stdTTL),!o)return!1;if((a=this._isInvalidKey(o))!=null)throw a;return this.data[o]!=null&&this._check(o,this.data[o])?(c>=0?this.data[o]=this._wrap(this.data[o].v,c,!1):this.del(o),!0):!1}getTtl(o){var c,a;if(n(this,l),!!o){if((a=this._isInvalidKey(o))!=null)throw a;if(this.data[o]!=null&&this._check(o,this.data[o]))return c=this.data[o].t,c}}keys(){var o;return n(this,l),o=Object.keys(this.data),o}has(o){var c;return n(this,l),c=this.data[o]!=null&&this._check(o,this.data[o]),c}getStats(){return n(this,l),this.stats}flushAll(o=!0){n(this,l),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this._killCheckPeriod(),this._checkData(o),this.emit("flush")}flushStats(){n(this,l),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){n(this,l),this._killCheckPeriod()}_checkData(o=!0){var c,a,h;n(this,l),a=this.data;for(c in a)h=a[c],this._check(c,h);o&&this.options.checkperiod>0&&(this.checkTimeout=setTimeout(this._checkData,this.options.checkperiod*1e3,o),this.checkTimeout!=null&&this.checkTimeout.unref!=null&&this.checkTimeout.unref())}_killCheckPeriod(){if(this.checkTimeout!=null)return clearTimeout(this.checkTimeout)}_check(o,c){var a;return n(this,l),a=!0,c.t!==0&&c.t<Date.now()&&(this.options.deleteOnExpire&&(a=!1,this.del(o)),this.emit("expired",o,this._unwrap(c))),a}_isInvalidKey(o){var c;if(n(this,l),c=typeof o,s.call(this.validKeyTypes,c)<0)return this._error("EKEYTYPE",{type:typeof o})}_wrap(o,c,a=!0){var h,y,d,u;return n(this,l),this.options.useClones||(a=!1),y=Date.now(),h=0,u=1e3,c===0?h=0:c?h=y+c*u:this.options.stdTTL===0?h=this.options.stdTTL:h=y+this.options.stdTTL*u,d={t:h,v:a?r(o):o}}_unwrap(o,c=!0){return this.options.useClones||(c=!1),o.v!=null?c?r(o.v):o.v:null}_getKeyLength(o){return o.toString().length}_getValLength(o){return n(this,l),typeof o=="string"?o.length:this.options.forceString?JSON.stringify(o).length:Array.isArray(o)?this.options.arrayValueSize*o.length:typeof o=="number"?8:typeof(o!=null?o.then:void 0)=="function"?this.options.promiseValueSize:typeof Buffer!="undefined"&&Buffer!==null&&Buffer.isBuffer(o)?o.length:o!=null&&typeof o=="object"?this.options.objectValueSize*Object.keys(o).length:typeof o=="boolean"?8:0}_error(o,c={}){var a;return n(this,l),a=new Error,a.name=o,a.errorcode=o,a.message=this.ERRORS[o]!=null?this.ERRORS[o](c):"-",a.data=c,a}_initErrors(){var o,c,a;n(this,l),this.ERRORS={},a=this._ERRORS;for(c in a)o=a[c],this.ERRORS[c]=this.createErrorMessage(o)}createErrorMessage(o){return function(c){return o.replace("__key",c.type)}}}return l.prototype._ERRORS={ENOTFOUND:"Key `__key` not found",ECACHEFULL:"Cache max keys amount exceeded",EKEYTYPE:"The key argument has to be of type `string` or `number`. Found: `__key`",EKEYSTYPE:"The keys argument has to be an array.",ETTLTYPE:"The ttl argument has to be a number."},l}.call(this)}).call(Ur)});var Xr=E((Jr,Gr)=>{"use strict";(function(){var e;e=Gr.exports=Hr(),e.version="5.1.2"}).call(Jr)});var en=E((yu,Zr)=>{"use strict";Zr.exports=Qr;var{toString:js}=Object.prototype,Qe=Symbol("circular-ref-tag"),Ze=Symbol("pino-raw-err-ref"),Yr=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},raw:{enumerable:!1,get:function(){return this[Ze]},set:function(e){this[Ze]=e}}});Object.defineProperty(Yr,Ze,{writable:!0,value:{}});function Qr(e){if(!(e instanceof Error))return e;e[Qe]=void 0;let t=Object.create(Yr);t.type=js.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack;for(let r in e)if(t[r]===void 0){let i=e[r];i instanceof Error?i.hasOwnProperty(Qe)||(t[r]=Qr(i)):t[r]=i}return delete e[Qe],t.raw=e,t}});var sn=E((pu,nn)=>{"use strict";nn.exports={mapHttpRequest:Rs,reqSerializer:rn};var et=Symbol("pino-raw-req-ref"),tn=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[et]},set:function(e){this[et]=e}}});Object.defineProperty(tn,et,{writable:!0,value:{}});function rn(e){let t=e.info||e.socket,r=Object.create(tn);return 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,r.query=e.query,r.params=e.params):r.url=e.path||(e.url?e.url.path||e.url:void 0),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function Rs(e){return{req:rn(e)}}});var cn=E((gu,an)=>{"use strict";an.exports={mapHttpResponse:Ls,resSerializer:ln};var tt=Symbol("pino-raw-res-ref"),on=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[tt]},set:function(e){this[tt]=e}}});Object.defineProperty(on,tt,{writable:!0,value:{}});function ln(e){let t=Object.create(on);return t.statusCode=e.statusCode,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function Ls(e){return{res:ln(e)}}});var nt=E((mu,un)=>{"use strict";var rt=en(),Te=sn(),Ae=cn();un.exports={err:rt,mapHttpRequest:Te.mapHttpRequest,mapHttpResponse:Ae.mapHttpResponse,req:Te.reqSerializer,res:Ae.resSerializer,wrapErrorSerializer:function(t){return t===rt?t:function(i){return t(rt(i))}},wrapRequestSerializer:function(t){return t===Te.reqSerializer?t:function(i){return t(Te.reqSerializer(i))}},wrapResponseSerializer:function(t){return t===Ae.resSerializer?t:function(i){return t(Ae.resSerializer(i))}}}});var it=E((bu,fn)=>{"use strict";function qs(e,t){return t}fn.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=qs;let r=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(r))return;let i=r.slice(2),n=[];for(let s of i)s&&n.push(s.getFileName());return n}});var dn=E((wu,hn)=>{"use strict";hn.exports=$s;function $s(e={}){let{ERR_PATHS_MUST_BE_STRINGS:t=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:r=i=>`fast-redact \u2013 Invalid path (${i})`}=e;return function({paths:n}){n.forEach(s=>{if(typeof s!="string")throw Error(t());try{if(/〇/.test(s))throw Error();let l=(s[0]==="["?"":".")+s.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if(/\n|\r|;/.test(l)||/\/\*/.test(l))throw Error();Function(`
1
+ var gs=Object.create;var Ue=Object.defineProperty,ms=Object.defineProperties,bs=Object.getOwnPropertyDescriptor,ws=Object.getOwnPropertyDescriptors,Ss=Object.getOwnPropertyNames,Yt=Object.getOwnPropertySymbols,vs=Object.getPrototypeOf,Qt=Object.prototype.hasOwnProperty,Es=Object.prototype.propertyIsEnumerable;var Ke=(e,t,r)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,q=(e,t)=>{for(var r in t||(t={}))Qt.call(t,r)&&Ke(e,r,t[r]);if(Yt)for(var r of Yt(t))Es.call(t,r)&&Ke(e,r,t[r]);return e},J=(e,t)=>ms(e,ws(t));var C=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var O=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Os=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ss(t))!Qt.call(e,i)&&i!==r&&Ue(e,i,{get:()=>t[i],enumerable:!(n=bs(t,i))||n.enumerable});return e};var Ve=(e,t,r)=>(r=e!=null?gs(vs(e)):{},Os(t||!e||!e.__esModule?Ue(r,"default",{value:e,enumerable:!0}):r,e));var Zt=(e,t,r)=>Ke(e,typeof t!="symbol"?t+"":t,r);var Q=(e,t,r)=>new Promise((n,i)=>{var s=o=>{try{f(r.next(o))}catch(c){i(c)}},a=o=>{try{f(r.throw(o))}catch(c){i(c)}},f=o=>o.done?n(o.value):Promise.resolve(o.value).then(s,a);f((r=r.apply(e,t)).next())});var He=O((Jc,er)=>{"use strict";er.exports=class extends Error{constructor(r,n){super(r||"Unknown error");Zt(this,"name","AssertError");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,n)}}});var Je=O((Xc,tr)=>{"use strict";tr.exports=function(...e){try{return JSON.stringify(...e)}catch(t){return"[Cannot display object: "+t.message+"]"}}});var oe=O((Yc,rr)=>{"use strict";var xs=He(),_s=Je(),ks=rr.exports=function(e,...t){if(e)return;if(t.length===1&&t[0]instanceof Error)throw t[0];let r=t.filter(n=>n!=="").map(n=>typeof n=="string"?n:n instanceof Error?n.message:_s(n));throw new xs(r.join(" "),ks)}});var be=O((Qc,ir)=>{"use strict";var Ge=oe(),nr={};ir.exports=function(e,t,r){if(t===!1||t===null||t===void 0)return e;r=r||{},typeof r=="string"&&(r={separator:r});let n=Array.isArray(t);Ge(!n||!r.separator,"Separator option is not valid for array-based chain");let i=n?t:t.split(r.separator||"."),s=e;for(let a=0;a<i.length;++a){let f=i[a],o=r.iterables&&nr.iterables(s);if(Array.isArray(s)||o==="set"){let c=Number(f);Number.isInteger(c)&&(f=c<0?s.length+c:c)}if(!s||typeof s=="function"&&r.functions===!1||!o&&s[f]===void 0){Ge(!r.strict||a+1===i.length,"Missing segment",f,"in reach path ",t),Ge(typeof s=="object"||r.functions===!0||typeof s!="function","Invalid segment",f,"in reach path ",t),s=r.default;break}o?o==="set"?s=[...s][f]:s=s.get(f):s=s[f]}return s};nr.iterables=function(e){if(e instanceof Set)return"set";if(e instanceof Map)return"map"}});var Xe=O(($,or)=>{"use strict";var sr={};$=or.exports={array:Array.prototype,buffer:Buffer&&Buffer.prototype,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,url:URL.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype};sr.typeMap=new Map([["[object Error]",$.error],["[object Map]",$.map],["[object Promise]",$.promise],["[object Set]",$.set],["[object URL]",$.url],["[object WeakMap]",$.weakMap],["[object WeakSet]",$.weakSet]]);$.getInternalProto=function(e){if(Array.isArray(e))return $.array;if(Buffer&&e instanceof Buffer)return $.buffer;if(e instanceof Date)return $.date;if(e instanceof RegExp)return $.regex;if(e instanceof Error)return $.error;let t=Object.prototype.toString.call(e);return sr.typeMap.get(t)||$.generic}});var Ee=O(ar=>{"use strict";ar.keys=function(e,t={}){return t.symbols!==!1?Reflect.ownKeys(e):Object.getOwnPropertyNames(e)}});var Oe=O((eu,lr)=>{"use strict";var Rs=be(),D=Xe(),As=Ee(),te={needsProtoHack:new Set([D.set,D.map,D.weakSet,D.weakMap])};lr.exports=te.clone=function(e,t={},r=null){if(typeof e!="object"||e===null)return e;let n=te.clone,i=r;if(t.shallow){if(t.shallow!==!0)return te.cloneWithShallow(e,t);n=o=>o}else if(i){let o=i.get(e);if(o)return o}else i=new Map;let s=D.getInternalProto(e);switch(s){case D.buffer:return Buffer==null?void 0:Buffer.from(e);case D.date:return new Date(e.getTime());case D.regex:case D.url:return new s.constructor(e)}let a=te.base(e,s,t);if(a===e)return e;if(i&&i.set(e,a),s===D.set)for(let o of e)a.add(n(o,t,i));else if(s===D.map)for(let[o,c]of e)a.set(o,n(c,t,i));let f=As.keys(e,t);for(let o of f){if(o==="__proto__")continue;if(s===D.array&&o==="length"){a.length=e.length;continue}let c=Object.getOwnPropertyDescriptor(e,o);c?c.get||c.set?Object.defineProperty(a,o,c):c.enumerable?a[o]=n(e[o],t,i):Object.defineProperty(a,o,{enumerable:!1,writable:!0,configurable:!0,value:n(e[o],t,i)}):Object.defineProperty(a,o,{enumerable:!0,writable:!0,configurable:!0,value:n(e[o],t,i)})}return a};te.cloneWithShallow=function(e,t){let r=t.shallow;t=Object.assign({},t),t.shallow=!1;let n=new Map;for(let i of r){let s=Rs(e,i);(typeof s=="object"||typeof s=="function")&&n.set(s,s)}return te.clone(e,t,n)};te.base=function(e,t,r){if(r.prototype===!1)return te.needsProtoHack.has(t)?new t.constructor:t===D.array?[]:{};let n=Object.getPrototypeOf(e);if(n&&n.isImmutable)return e;if(t===D.array){let i=[];return n!==t&&Object.setPrototypeOf(i,n),i}if(te.needsProtoHack.has(t)){let i=new n.constructor;return n!==t&&Object.setPrototypeOf(i,n),i}return Object.create(n)}});var Qe=O((tu,fr)=>{"use strict";var Ye=oe(),cr=Oe(),Ts=Ee(),ur={};fr.exports=ur.merge=function(e,t,r){if(Ye(e&&typeof e=="object","Invalid target value: must be an object"),Ye(t==null||typeof t=="object","Invalid source value: must be null, undefined, or an object"),!t)return e;if(r=Object.assign({nullOverride:!0,mergeArrays:!0},r),Array.isArray(t)){Ye(Array.isArray(e),"Cannot merge array onto an object"),r.mergeArrays||(e.length=0);for(let i=0;i<t.length;++i)e.push(cr(t[i],{symbols:r.symbols}));return e}let n=Ts.keys(t,r);for(let i=0;i<n.length;++i){let s=n[i];if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(t,s))continue;let a=t[s];if(a&&typeof a=="object"){if(e[s]===a)continue;!e[s]||typeof e[s]!="object"||Array.isArray(e[s])!==Array.isArray(a)||a instanceof Date||Buffer&&Buffer.isBuffer(a)||a instanceof RegExp?e[s]=cr(a,{symbols:r.symbols}):ur.merge(e[s],a,r)}else(a!=null||r.nullOverride)&&(e[s]=a)}return e}});var gr=O((ru,yr)=>{"use strict";var xe=oe(),dr=Oe(),pr=Qe(),hr=be(),_e={};yr.exports=function(e,t,r={}){if(xe(e&&typeof e=="object","Invalid defaults value: must be an object"),xe(!t||t===!0||typeof t=="object","Invalid source value: must be true, falsy or an object"),xe(typeof r=="object","Invalid options: must be an object"),!t)return null;if(r.shallow)return _e.applyToDefaultsWithShallow(e,t,r);let n=dr(e);if(t===!0)return n;let i=r.nullOverride!==void 0?r.nullOverride:!1;return pr(n,t,{nullOverride:i,mergeArrays:!1})};_e.applyToDefaultsWithShallow=function(e,t,r){let n=r.shallow;xe(Array.isArray(n),"Invalid keys");let i=new Map,s=t===!0?null:new Set;for(let o of n){o=Array.isArray(o)?o:o.split(".");let c=hr(e,o);c&&typeof c=="object"?i.set(c,s&&hr(t,o)||c):s&&s.add(o)}let a=dr(e,{},i);if(!s)return a;for(let o of s)_e.reachCopy(a,t,o);let f=r.nullOverride!==void 0?r.nullOverride:!1;return pr(a,t,{nullOverride:f,mergeArrays:!1})};_e.reachCopy=function(e,t,r){for(let s of r){if(!(s in t))return;let a=t[s];if(typeof a!="object"||a===null)return;t=a}let n=t,i=e;for(let s=0;s<r.length-1;++s){let a=r[s];typeof i[a]!="object"&&(i[a]={}),i=i[a]}i[r[r.length-1]]=n}});var br=O((nu,mr)=>{"use strict";var Ze={};mr.exports=Ze.Bench=class{constructor(){this.ts=0,this.reset()}reset(){this.ts=Ze.Bench.now()}elapsed(){return Ze.Bench.now()-this.ts}static now(){let e=process.hrtime();return e[0]*1e3+e[1]/1e6}}});var et=O((su,wr)=>{"use strict";wr.exports=function(){}});var vr=O((ou,Sr)=>{"use strict";var Ls=et();Sr.exports=function(){return new Promise(Ls)}});var tt=O((au,Er)=>{"use strict";var G=Xe(),I={mismatched:null};Er.exports=function(e,t,r){return r=Object.assign({prototype:!0},r),!!I.isDeepEqual(e,t,r,[])};I.isDeepEqual=function(e,t,r,n){if(e===t)return e!==0||1/e===1/t;let i=typeof e;if(i!==typeof t||e===null||t===null)return!1;if(i==="function"){if(!r.deepFunction||e.toString()!==t.toString())return!1}else if(i!=="object")return e!==e&&t!==t;let s=I.getSharedType(e,t,!!r.prototype);switch(s){case G.buffer:return Buffer&&Buffer.prototype.equals.call(e,t);case G.promise:return e===t;case G.regex:case G.url:return e.toString()===t.toString();case I.mismatched:return!1}for(let a=n.length-1;a>=0;--a)if(n[a].isSame(e,t))return!0;n.push(new I.SeenEntry(e,t));try{return!!I.isDeepEqualObj(s,e,t,r,n)}finally{n.pop()}};I.getSharedType=function(e,t,r){if(r)return Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?I.mismatched:G.getInternalProto(e);let n=G.getInternalProto(e);return n!==G.getInternalProto(t)?I.mismatched:n};I.valueOf=function(e){let t=e.valueOf;if(t===void 0)return e;try{return t.call(e)}catch(r){return r}};I.hasOwnEnumerableProperty=function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)};I.isSetSimpleEqual=function(e,t){for(let r of Set.prototype.values.call(e))if(!Set.prototype.has.call(t,r))return!1;return!0};I.isDeepEqualObj=function(e,t,r,n,i){var u;let{isDeepEqual:s,valueOf:a,hasOwnEnumerableProperty:f}=I,{keys:o,getOwnPropertySymbols:c}=Object;if(e===G.array)if(n.part){for(let g of t)for(let S of r)if(s(g,S,n,i))return!0}else{if(t.length!==r.length)return!1;for(let g=0;g<t.length;++g)if(!s(t[g],r[g],n,i))return!1;return!0}else if(e===G.set){if(t.size!==r.size)return!1;if(!I.isSetSimpleEqual(t,r)){let g=new Set(Set.prototype.values.call(r));for(let S of Set.prototype.values.call(t)){if(g.delete(S))continue;let w=!1;for(let v of g)if(s(S,v,n,i)){g.delete(v),w=!0;break}if(!w)return!1}}}else if(e===G.map){if(t.size!==r.size)return!1;for(let[g,S]of Map.prototype.entries.call(t))if(S===void 0&&!Map.prototype.has.call(r,g)||!s(S,Map.prototype.get.call(r,g),n,i))return!1}else if(e===G.error&&(t.name!==r.name||t.message!==r.message))return!1;let l=a(t),h=a(r);if((t!==l||r!==h)&&!s(l,h,n,i))return!1;let p=o(t);if(!n.part&&p.length!==o(r).length&&!n.skip)return!1;let d=0;for(let g of p){if(n.skip&&n.skip.includes(g)){r[g]===void 0&&++d;continue}if(!f(r,g)||!s(t[g],r[g],n,i))return!1}if(!n.part&&p.length-d!==o(r).length)return!1;if(n.symbols!==!1){let g=c(t),S=new Set(c(r));for(let w of g){if(!((u=n.skip)!=null&&u.includes(w))){if(f(t,w)){if(!f(r,w)||!s(t[w],r[w],n,i))return!1}else if(f(r,w))return!1}S.delete(w)}for(let w of S)if(f(r,w))return!1}return!0};I.SeenEntry=class{constructor(e,t){this.obj=e,this.ref=t}isSame(e,t){return this.obj===e&&this.ref===t}}});var rt=O((cu,Or)=>{"use strict";Or.exports=function(e){return e.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}});var _r=O((uu,xr)=>{"use strict";var ke=oe(),js=tt(),qs=rt(),Ms=Ee(),K={};xr.exports=function(e,t,r={}){return typeof t!="object"&&(t=[t]),ke(!Array.isArray(t)||t.length,"Values array cannot be empty"),typeof e=="string"?K.string(e,t,r):Array.isArray(e)?K.array(e,t,r):(ke(typeof e=="object","Reference must be string or an object"),K.object(e,t,r))};K.array=function(e,t,r){if(Array.isArray(t)||(t=[t]),!e.length||r.only&&r.once&&e.length!==t.length)return!1;let n,i=new Map;for(let a of t)if(!r.deep||!a||typeof a!="object"){let f=i.get(a);f?++f.allowed:i.set(a,{allowed:1,hits:0})}else{n=n!=null?n:K.compare(r);let f=!1;for(let[o,c]of i.entries())if(n(o,a)){++c.allowed,f=!0;break}f||i.set(a,{allowed:1,hits:0})}let s=0;for(let a of e){let f;if(!r.deep||!a||typeof a!="object")f=i.get(a);else{n=n!=null?n:K.compare(r);for(let[o,c]of i.entries())if(n(o,a)){f=c;break}}if(f&&(++f.hits,++s,r.once&&f.hits>f.allowed))return!1}if(r.only&&s!==e.length)return!1;for(let a of i.values())if(a.hits!==a.allowed&&a.hits<a.allowed&&!r.part)return!1;return!!s};K.object=function(e,t,r){ke(r.once===void 0,"Cannot use option once with object");let n=Ms.keys(e,r);if(!n.length)return!1;if(Array.isArray(t))return K.array(n,t,r);let i=Object.getOwnPropertySymbols(t).filter(o=>t.propertyIsEnumerable(o)),s=[...Object.keys(t),...i],a=K.compare(r),f=new Set(s);for(let o of n){if(!f.has(o)){if(r.only)return!1;continue}if(!a(t[o],e[o]))return!1;f.delete(o)}return f.size?r.part?f.size<s.length:!1:!0};K.string=function(e,t,r){if(e==="")return t.length===1&&t[0]===""||!r.once&&!t.some(o=>o!=="");let n=new Map,i=[];for(let o of t)if(ke(typeof o=="string","Cannot compare string reference to non-string value"),o){let c=n.get(o);c?++c.allowed:(n.set(o,{allowed:1,hits:0}),i.push(qs(o)))}else if(r.once||r.only)return!1;if(!i.length)return!0;let s=new RegExp(`(${i.join("|")})`,"g"),a=e.replace(s,(o,c)=>(++n.get(c).hits,""));if(r.only&&a)return!1;let f=!1;for(let o of n.values())if(o.hits&&(f=!0),o.hits!==o.allowed&&(o.hits<o.allowed&&!r.part||r.once))return!1;return!!f};K.compare=function(e){if(!e.deep)return K.shallow;let t=e.only!==void 0,r=e.part!==void 0,n={prototype:t?e.only:r?!e.part:!1,part:t?!e.only:r?e.part:!1};return(i,s)=>js(i,s,n)};K.shallow=function(e,t){return e===t}});var Rr=O((fu,kr)=>{"use strict";var Cs=oe();kr.exports=function(e){return Cs(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(e),"Bad attribute value ("+e+")"),e.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}});var Tr=O((hu,Ar)=>{"use strict";var ne={};Ar.exports=function(e){if(!e)return"";let t="";for(let r=0;r<e.length;++r){let n=e.charCodeAt(r);ne.isSafe(n)?t+=e[r]:t+=ne.escapeHtmlChar(n)}return t};ne.escapeHtmlChar=function(e){let t=ne.namedHtml.get(e);return t||(e>=256?"&#"+e+";":`&#x${e.toString(16).padStart(2,"0")};`)};ne.isSafe=function(e){return ne.safeCharCodes.has(e)};ne.namedHtml=new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[34,"&quot;"],[160,"&nbsp;"],[162,"&cent;"],[163,"&pound;"],[164,"&curren;"],[169,"&copy;"],[174,"&reg;"]]);ne.safeCharCodes=function(){let e=new Set;for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||t===32||t===46||t===44||t===45||t===58||t===95)&&e.add(t);return e}()});var jr=O((du,Lr)=>{"use strict";var Re={};Lr.exports=function(e){return e?e.replace(/[<>&\u2028\u2029]/g,Re.escape):""};Re.escape=function(e){return Re.replacements.get(e)};Re.replacements=new Map([["<","\\u003c"],[">","\\u003e"],["&","\\u0026"],["\u2028","\\u2028"],["\u2029","\\u2029"]])});var Cr=O((pu,Mr)=>{"use strict";var qr={};Mr.exports=qr.flatten=function(e,t){let r=t||[];for(let n of e)Array.isArray(n)?qr.flatten(n,r):r.push(n);return r}});var $r=O((yu,Br)=>{"use strict";var Pr={};Br.exports=function(e,t,r={}){if(!e||!t)return r.first?null:[];let n=[],i=Array.isArray(e)?new Set(e):e,s=new Set;for(let a of t)if(Pr.has(i,a)&&!s.has(a)){if(r.first)return a;n.push(a),s.add(a)}return r.first?null:n};Pr.has=function(e,t){return typeof e.has=="function"?e.has(t):e[t]!==void 0}});var Dr=O((gu,Ir)=>{"use strict";Ir.exports=function(e){return typeof(e==null?void 0:e.then)=="function"}});var Fr=O((mu,Nr)=>{"use strict";var zr={wrapped:Symbol("wrapped")};Nr.exports=function(e){if(e[zr.wrapped])return e;let t=!1,r=function(...n){t||(t=!0,e(...n))};return r[zr.wrapped]=!0,r}});var Kr=O((bu,Wr)=>{"use strict";var Ps=be();Wr.exports=function(e,t,r){return t.replace(/{([^{}]+)}/g,(n,i)=>{let s=Ps(e,i,r);return s!=null?s:""})}});var Vr=O((wu,Ur)=>{"use strict";var Bs={maxTimer:2147483647};Ur.exports=function(e,t,r){if(typeof e=="bigint"&&(e=Number(e)),e>=Number.MAX_SAFE_INTEGER&&(e=1/0),typeof e!="number"&&e!==void 0)throw new TypeError("Timeout must be a number or bigint");return new Promise(n=>{let i=r?r.setTimeout:setTimeout,s=()=>{let a=Math.min(e,Bs.maxTimer);e-=a,i(()=>e>0?s():n(t),a)};e!==1/0&&s()})}});var Hr=O(j=>{"use strict";j.applyToDefaults=gr();j.assert=oe();j.AssertError=He();j.Bench=br();j.block=vr();j.clone=Oe();j.contain=_r();j.deepEqual=tt();j.escapeHeaderAttribute=Rr();j.escapeHtml=Tr();j.escapeJson=jr();j.escapeRegex=rt();j.flatten=Cr();j.ignore=et();j.intersect=$r();j.isPromise=Dr();j.merge=Qe();j.once=Fr();j.reach=be();j.reachTemplate=Kr();j.stringify=Je();j.wait=Vr()});var Jr=O(m=>{"use strict";var ae=Hr(),z={codes:new Map([[100,"Continue"],[101,"Switching Protocols"],[102,"Processing"],[200,"OK"],[201,"Created"],[202,"Accepted"],[203,"Non-Authoritative Information"],[204,"No Content"],[205,"Reset Content"],[206,"Partial Content"],[207,"Multi-Status"],[300,"Multiple Choices"],[301,"Moved Permanently"],[302,"Moved Temporarily"],[303,"See Other"],[304,"Not Modified"],[305,"Use Proxy"],[307,"Temporary Redirect"],[400,"Bad Request"],[401,"Unauthorized"],[402,"Payment Required"],[403,"Forbidden"],[404,"Not Found"],[405,"Method Not Allowed"],[406,"Not Acceptable"],[407,"Proxy Authentication Required"],[408,"Request Time-out"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Request Entity Too Large"],[414,"Request-URI Too Large"],[415,"Unsupported Media Type"],[416,"Requested Range Not Satisfiable"],[417,"Expectation Failed"],[418,"I'm a teapot"],[422,"Unprocessable Entity"],[423,"Locked"],[424,"Failed Dependency"],[425,"Too Early"],[426,"Upgrade Required"],[428,"Precondition Required"],[429,"Too Many Requests"],[431,"Request Header Fields Too Large"],[451,"Unavailable For Legal Reasons"],[500,"Internal Server Error"],[501,"Not Implemented"],[502,"Bad Gateway"],[503,"Service Unavailable"],[504,"Gateway Time-out"],[505,"HTTP Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"]])};m.Boom=class extends Error{constructor(e,t={}){if(e instanceof Error)return m.boomify(ae.clone(e),t);let{statusCode:r=500,data:n=null,ctor:i=m.Boom}=t,s=new Error(e||void 0);Error.captureStackTrace(s,i),s.data=n;let a=z.initialize(s,r);return Object.defineProperty(a,"typeof",{value:i}),t.decorate&&Object.assign(a,t.decorate),a}static[Symbol.hasInstance](e){return this===m.Boom?m.isBoom(e):this.prototype.isPrototypeOf(e)}};m.isBoom=function(e,t){return e instanceof Error&&!!e.isBoom&&(!t||e.output.statusCode===t)};m.boomify=function(e,t){var r,n;return ae.assert(e instanceof Error,"Cannot wrap non-Error object"),t=t||{},t.data!==void 0&&(e.data=t.data),t.decorate&&Object.assign(e,t.decorate),e.isBoom?t.override===!1||!t.statusCode&&!t.message?e:z.initialize(e,(n=t.statusCode)!=null?n:e.output.statusCode,t.message):z.initialize(e,(r=t.statusCode)!=null?r:500,t.message)};m.badRequest=function(e,t){return new m.Boom(e,{statusCode:400,data:t,ctor:m.badRequest})};m.unauthorized=function(e,t,r){let n=new m.Boom(e,{statusCode:401,ctor:m.unauthorized});if(!t)return n;if(typeof t!="string")return n.output.headers["WWW-Authenticate"]=t.join(", "),n;let i=`${t}`;return(r||e)&&(n.output.payload.attributes={}),r&&(typeof r=="string"?(i+=" "+ae.escapeHeaderAttribute(r),n.output.payload.attributes=r):i+=" "+Object.keys(r).map(s=>{var f;let a=(f=r[s])!=null?f:"";return n.output.payload.attributes[s]=a,`${s}="${ae.escapeHeaderAttribute(a.toString())}"`}).join(", ")),e?(r&&(i+=","),i+=` error="${ae.escapeHeaderAttribute(e)}"`,n.output.payload.attributes.error=e):n.isMissing=!0,n.output.headers["WWW-Authenticate"]=i,n};m.paymentRequired=function(e,t){return new m.Boom(e,{statusCode:402,data:t,ctor:m.paymentRequired})};m.forbidden=function(e,t){return new m.Boom(e,{statusCode:403,data:t,ctor:m.forbidden})};m.notFound=function(e,t){return new m.Boom(e,{statusCode:404,data:t,ctor:m.notFound})};m.methodNotAllowed=function(e,t,r){let n=new m.Boom(e,{statusCode:405,data:t,ctor:m.methodNotAllowed});return typeof r=="string"&&(r=[r]),Array.isArray(r)&&(n.output.headers.Allow=r.join(", ")),n};m.notAcceptable=function(e,t){return new m.Boom(e,{statusCode:406,data:t,ctor:m.notAcceptable})};m.proxyAuthRequired=function(e,t){return new m.Boom(e,{statusCode:407,data:t,ctor:m.proxyAuthRequired})};m.clientTimeout=function(e,t){return new m.Boom(e,{statusCode:408,data:t,ctor:m.clientTimeout})};m.conflict=function(e,t){return new m.Boom(e,{statusCode:409,data:t,ctor:m.conflict})};m.resourceGone=function(e,t){return new m.Boom(e,{statusCode:410,data:t,ctor:m.resourceGone})};m.lengthRequired=function(e,t){return new m.Boom(e,{statusCode:411,data:t,ctor:m.lengthRequired})};m.preconditionFailed=function(e,t){return new m.Boom(e,{statusCode:412,data:t,ctor:m.preconditionFailed})};m.entityTooLarge=function(e,t){return new m.Boom(e,{statusCode:413,data:t,ctor:m.entityTooLarge})};m.uriTooLong=function(e,t){return new m.Boom(e,{statusCode:414,data:t,ctor:m.uriTooLong})};m.unsupportedMediaType=function(e,t){return new m.Boom(e,{statusCode:415,data:t,ctor:m.unsupportedMediaType})};m.rangeNotSatisfiable=function(e,t){return new m.Boom(e,{statusCode:416,data:t,ctor:m.rangeNotSatisfiable})};m.expectationFailed=function(e,t){return new m.Boom(e,{statusCode:417,data:t,ctor:m.expectationFailed})};m.teapot=function(e,t){return new m.Boom(e,{statusCode:418,data:t,ctor:m.teapot})};m.badData=function(e,t){return new m.Boom(e,{statusCode:422,data:t,ctor:m.badData})};m.locked=function(e,t){return new m.Boom(e,{statusCode:423,data:t,ctor:m.locked})};m.failedDependency=function(e,t){return new m.Boom(e,{statusCode:424,data:t,ctor:m.failedDependency})};m.tooEarly=function(e,t){return new m.Boom(e,{statusCode:425,data:t,ctor:m.tooEarly})};m.preconditionRequired=function(e,t){return new m.Boom(e,{statusCode:428,data:t,ctor:m.preconditionRequired})};m.tooManyRequests=function(e,t){return new m.Boom(e,{statusCode:429,data:t,ctor:m.tooManyRequests})};m.illegal=function(e,t){return new m.Boom(e,{statusCode:451,data:t,ctor:m.illegal})};m.internal=function(e,t,r=500){return z.serverError(e,t,r,m.internal)};m.notImplemented=function(e,t){return z.serverError(e,t,501,m.notImplemented)};m.badGateway=function(e,t){return z.serverError(e,t,502,m.badGateway)};m.serverUnavailable=function(e,t){return z.serverError(e,t,503,m.serverUnavailable)};m.gatewayTimeout=function(e,t){return z.serverError(e,t,504,m.gatewayTimeout)};m.badImplementation=function(e,t){let r=z.serverError(e,t,500,m.badImplementation);return r.isDeveloperError=!0,r};z.initialize=function(e,t,r){let n=parseInt(t,10);if(ae.assert(!isNaN(n)&&n>=400,"First argument must be a number (400+):",t),e.isBoom=!0,e.isServer=n>=500,e.hasOwnProperty("data")||(e.data=null),e.output={statusCode:n,payload:{},headers:{}},Object.defineProperty(e,"reformat",{value:z.reformat,configurable:!0}),!r&&!e.message&&(e.reformat(),r=e.output.payload.error),r){let i=Object.getOwnPropertyDescriptor(e,"message")||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"message");ae.assert(!i||i.configurable&&!i.get,"The error is not compatible with boom"),e.message=r+(e.message?": "+e.message:""),e.output.payload.message=e.message}return e.reformat(),e};z.reformat=function(e=!1){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=z.codes.get(this.output.statusCode)||"Unknown",this.output.statusCode===500&&e!==!0?this.output.payload.message="An internal server error occurred":this.message&&(this.output.payload.message=this.message)};z.serverError=function(e,t,r,n){return t instanceof Error&&!t.isBoom?m.boomify(t,{statusCode:r,message:e}):new m.Boom(e,{statusCode:r,data:t,ctor:n})}});var Yr=O((ku,Ae)=>{"use strict";var Is=function(){"use strict";function e(l,h){return h!=null&&l instanceof h}var t;try{t=Map}catch(l){t=function(){}}var r;try{r=Set}catch(l){r=function(){}}var n;try{n=Promise}catch(l){n=function(){}}function i(l,h,p,d,u){typeof h=="object"&&(p=h.depth,d=h.prototype,u=h.includeNonEnumerable,h=h.circular);var g=[],S=[],w=typeof Buffer!="undefined";typeof h=="undefined"&&(h=!0),typeof p=="undefined"&&(p=1/0);function v(b,x){if(b===null)return null;if(x===0)return b;var E,k;if(typeof b!="object")return b;if(e(b,t))E=new t;else if(e(b,r))E=new r;else if(e(b,n))E=new n(function(H,ge){b.then(function(me){H(v(me,x-1))},function(me){ge(v(me,x-1))})});else if(i.__isArray(b))E=[];else if(i.__isRegExp(b))E=new RegExp(b.source,c(b)),b.lastIndex&&(E.lastIndex=b.lastIndex);else if(i.__isDate(b))E=new Date(b.getTime());else{if(w&&Buffer.isBuffer(b))return Buffer.allocUnsafe?E=Buffer.allocUnsafe(b.length):E=new Buffer(b.length),b.copy(E),E;e(b,Error)?E=Object.create(b):typeof d=="undefined"?(k=Object.getPrototypeOf(b),E=Object.create(k)):(E=Object.create(d),k=d)}if(h){var A=g.indexOf(b);if(A!=-1)return S[A];g.push(b),S.push(E)}e(b,t)&&b.forEach(function(H,ge){var me=v(ge,x-1),ys=v(H,x-1);E.set(me,ys)}),e(b,r)&&b.forEach(function(H){var ge=v(H,x-1);E.add(ge)});for(var R in b){var _;k&&(_=Object.getOwnPropertyDescriptor(k,R)),!(_&&_.set==null)&&(E[R]=v(b[R],x-1))}if(Object.getOwnPropertySymbols)for(var L=Object.getOwnPropertySymbols(b),R=0;R<L.length;R++){var M=L[R],T=Object.getOwnPropertyDescriptor(b,M);T&&!T.enumerable&&!u||(E[M]=v(b[M],x-1),T.enumerable||Object.defineProperty(E,M,{enumerable:!1}))}if(u)for(var B=Object.getOwnPropertyNames(b),R=0;R<B.length;R++){var P=B[R],T=Object.getOwnPropertyDescriptor(b,P);T&&T.enumerable||(E[P]=v(b[P],x-1),Object.defineProperty(E,P,{enumerable:!1}))}return E}return v(l,p)}i.clonePrototype=function(h){if(h===null)return null;var p=function(){};return p.prototype=h,new p};function s(l){return Object.prototype.toString.call(l)}i.__objToStr=s;function a(l){return typeof l=="object"&&s(l)==="[object Date]"}i.__isDate=a;function f(l){return typeof l=="object"&&s(l)==="[object Array]"}i.__isArray=f;function o(l){return typeof l=="object"&&s(l)==="[object RegExp]"}i.__isRegExp=o;function c(l){var h="";return l.global&&(h+="g"),l.ignoreCase&&(h+="i"),l.multiline&&(h+="m"),h}return i.__getRegExpFlags=c,i}();typeof Ae=="object"&&Ae.exports&&(Ae.exports=Is)});var en=O((Qr,Zr)=>{"use strict";(function(){var e,t,r,n=[].splice,i=function(a,f){if(!(a instanceof f))throw new Error("Bound instance method accessed before binding")},s=[].indexOf;r=Yr(),e=C("events").EventEmitter,Zr.exports=t=function(){class a extends e{constructor(o={}){super(),this.get=this.get.bind(this),this.mget=this.mget.bind(this),this.set=this.set.bind(this),this.mset=this.mset.bind(this),this.del=this.del.bind(this),this.take=this.take.bind(this),this.ttl=this.ttl.bind(this),this.getTtl=this.getTtl.bind(this),this.keys=this.keys.bind(this),this.has=this.has.bind(this),this.getStats=this.getStats.bind(this),this.flushAll=this.flushAll.bind(this),this.flushStats=this.flushStats.bind(this),this.close=this.close.bind(this),this._checkData=this._checkData.bind(this),this._check=this._check.bind(this),this._isInvalidKey=this._isInvalidKey.bind(this),this._wrap=this._wrap.bind(this),this._getValLength=this._getValLength.bind(this),this._error=this._error.bind(this),this._initErrors=this._initErrors.bind(this),this.options=o,this._initErrors(),this.data={},this.options=Object.assign({forceString:!1,objectValueSize:80,promiseValueSize:80,arrayValueSize:40,stdTTL:0,checkperiod:600,useClones:!0,deleteOnExpire:!0,enableLegacyCallbacks:!1,maxKeys:-1},this.options),this.options.enableLegacyCallbacks&&(console.warn("WARNING! node-cache legacy callback support will drop in v6.x"),["get","mget","set","del","ttl","getTtl","keys","has"].forEach(c=>{var l;l=this[c],this[c]=function(...h){var p,d,u,g;if(u=h,[...h]=u,[p]=n.call(h,-1),typeof p=="function")try{g=l(...h),p(null,g)}catch(S){d=S,p(d)}else return l(...h,p)}})),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.validKeyTypes=["string","number"],this._checkData()}get(o){var c,l;if(i(this,a),(l=this._isInvalidKey(o))!=null)throw l;if(this.data[o]!=null&&this._check(o,this.data[o]))return this.stats.hits++,c=this._unwrap(this.data[o]),c;this.stats.misses++}mget(o){var c,l,h,p,d,u;if(i(this,a),!Array.isArray(o))throw c=this._error("EKEYSTYPE"),c;for(u={},h=0,d=o.length;h<d;h++){if(p=o[h],(l=this._isInvalidKey(p))!=null)throw l;this.data[p]!=null&&this._check(p,this.data[p])?(this.stats.hits++,u[p]=this._unwrap(this.data[p])):this.stats.misses++}return u}set(o,c,l){var h,p,d;if(i(this,a),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw h=this._error("ECACHEFULL"),h;if(this.options.forceString&&!1==="string"&&(c=JSON.stringify(c)),l==null&&(l=this.options.stdTTL),(p=this._isInvalidKey(o))!=null)throw p;return d=!1,this.data[o]&&(d=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[o],!1))),this.data[o]=this._wrap(c,l),this.stats.vsize+=this._getValLength(c),d||(this.stats.ksize+=this._getKeyLength(o),this.stats.keys++),this.emit("set",o,c),!0}mset(o){var c,l,h,p,d,u,g,S,w,v;if(i(this,a),this.options.maxKeys>-1&&this.stats.keys+o.length>=this.options.maxKeys)throw c=this._error("ECACHEFULL"),c;for(h=0,g=o.length;h<g;h++){if(u=o[h],{key:d,val:v,ttl:w}=u,w&&typeof w!="number")throw c=this._error("ETTLTYPE"),c;if((l=this._isInvalidKey(d))!=null)throw l}for(p=0,S=o.length;p<S;p++)u=o[p],{key:d,val:v,ttl:w}=u,this.set(d,v,w);return!0}del(o){var c,l,h,p,d,u;for(i(this,a),Array.isArray(o)||(o=[o]),c=0,h=0,d=o.length;h<d;h++){if(p=o[h],(l=this._isInvalidKey(p))!=null)throw l;this.data[p]!=null&&(this.stats.vsize-=this._getValLength(this._unwrap(this.data[p],!1)),this.stats.ksize-=this._getKeyLength(p),this.stats.keys--,c++,u=this.data[p],delete this.data[p],this.emit("del",p,u.v))}return c}take(o){var c;return i(this,a),c=this.get(o),c!=null&&this.del(o),c}ttl(o,c){var l;if(i(this,a),c||(c=this.options.stdTTL),!o)return!1;if((l=this._isInvalidKey(o))!=null)throw l;return this.data[o]!=null&&this._check(o,this.data[o])?(c>=0?this.data[o]=this._wrap(this.data[o].v,c,!1):this.del(o),!0):!1}getTtl(o){var c,l;if(i(this,a),!!o){if((l=this._isInvalidKey(o))!=null)throw l;if(this.data[o]!=null&&this._check(o,this.data[o]))return c=this.data[o].t,c}}keys(){var o;return i(this,a),o=Object.keys(this.data),o}has(o){var c;return i(this,a),c=this.data[o]!=null&&this._check(o,this.data[o]),c}getStats(){return i(this,a),this.stats}flushAll(o=!0){i(this,a),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this._killCheckPeriod(),this._checkData(o),this.emit("flush")}flushStats(){i(this,a),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){i(this,a),this._killCheckPeriod()}_checkData(o=!0){var c,l,h;i(this,a),l=this.data;for(c in l)h=l[c],this._check(c,h);o&&this.options.checkperiod>0&&(this.checkTimeout=setTimeout(this._checkData,this.options.checkperiod*1e3,o),this.checkTimeout!=null&&this.checkTimeout.unref!=null&&this.checkTimeout.unref())}_killCheckPeriod(){if(this.checkTimeout!=null)return clearTimeout(this.checkTimeout)}_check(o,c){var l;return i(this,a),l=!0,c.t!==0&&c.t<Date.now()&&(this.options.deleteOnExpire&&(l=!1,this.del(o)),this.emit("expired",o,this._unwrap(c))),l}_isInvalidKey(o){var c;if(i(this,a),c=typeof o,s.call(this.validKeyTypes,c)<0)return this._error("EKEYTYPE",{type:typeof o})}_wrap(o,c,l=!0){var h,p,d,u;return i(this,a),this.options.useClones||(l=!1),p=Date.now(),h=0,u=1e3,c===0?h=0:c?h=p+c*u:this.options.stdTTL===0?h=this.options.stdTTL:h=p+this.options.stdTTL*u,d={t:h,v:l?r(o):o}}_unwrap(o,c=!0){return this.options.useClones||(c=!1),o.v!=null?c?r(o.v):o.v:null}_getKeyLength(o){return o.toString().length}_getValLength(o){return i(this,a),typeof o=="string"?o.length:this.options.forceString?JSON.stringify(o).length:Array.isArray(o)?this.options.arrayValueSize*o.length:typeof o=="number"?8:typeof(o!=null?o.then:void 0)=="function"?this.options.promiseValueSize:typeof Buffer!="undefined"&&Buffer!==null&&Buffer.isBuffer(o)?o.length:o!=null&&typeof o=="object"?this.options.objectValueSize*Object.keys(o).length:typeof o=="boolean"?8:0}_error(o,c={}){var l;return i(this,a),l=new Error,l.name=o,l.errorcode=o,l.message=this.ERRORS[o]!=null?this.ERRORS[o](c):"-",l.data=c,l}_initErrors(){var o,c,l;i(this,a),this.ERRORS={},l=this._ERRORS;for(c in l)o=l[c],this.ERRORS[c]=this.createErrorMessage(o)}createErrorMessage(o){return function(c){return o.replace("__key",c.type)}}}return a.prototype._ERRORS={ENOTFOUND:"Key `__key` not found",ECACHEFULL:"Cache max keys amount exceeded",EKEYTYPE:"The key argument has to be of type `string` or `number`. Found: `__key`",EKEYSTYPE:"The keys argument has to be an array.",ETTLTYPE:"The ttl argument has to be a number."},a}.call(this)}).call(Qr)});var nn=O((tn,rn)=>{"use strict";(function(){var e;e=rn.exports=en(),e.version="5.1.2"}).call(tn)});var ln=O((Ru,an)=>{"use strict";an.exports=on;var{toString:Ds}=Object.prototype,nt=Symbol("circular-ref-tag"),it=Symbol("pino-raw-err-ref"),sn=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},raw:{enumerable:!1,get:function(){return this[it]},set:function(e){this[it]=e}}});Object.defineProperty(sn,it,{writable:!0,value:{}});function on(e){if(!(e instanceof Error))return e;e[nt]=void 0;let t=Object.create(sn);t.type=Ds.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack;for(let r in e)if(t[r]===void 0){let n=e[r];n instanceof Error?n.hasOwnProperty(nt)||(t[r]=on(n)):t[r]=n}return delete e[nt],t.raw=e,t}});var hn=O((Au,fn)=>{"use strict";fn.exports={mapHttpRequest:zs,reqSerializer:un};var st=Symbol("pino-raw-req-ref"),cn=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[st]},set:function(e){this[st]=e}}});Object.defineProperty(cn,st,{writable:!0,value:{}});function un(e){let t=e.info||e.socket,r=Object.create(cn);return 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,r.query=e.query,r.params=e.params):r.url=e.path||(e.url?e.url.path||e.url:void 0),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function zs(e){return{req:un(e)}}});var gn=O((Tu,yn)=>{"use strict";yn.exports={mapHttpResponse:Ns,resSerializer:pn};var ot=Symbol("pino-raw-res-ref"),dn=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[ot]},set:function(e){this[ot]=e}}});Object.defineProperty(dn,ot,{writable:!0,value:{}});function pn(e){let t=Object.create(dn);return t.statusCode=e.statusCode,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function Ns(e){return{res:pn(e)}}});var lt=O((Lu,mn)=>{"use strict";var at=ln(),Te=hn(),Le=gn();mn.exports={err:at,mapHttpRequest:Te.mapHttpRequest,mapHttpResponse:Le.mapHttpResponse,req:Te.reqSerializer,res:Le.resSerializer,wrapErrorSerializer:function(t){return t===at?t:function(n){return t(at(n))}},wrapRequestSerializer:function(t){return t===Te.reqSerializer?t:function(n){return t(Te.reqSerializer(n))}},wrapResponseSerializer:function(t){return t===Le.resSerializer?t:function(n){return t(Le.resSerializer(n))}}}});var ct=O((ju,bn)=>{"use strict";function Fs(e,t){return t}bn.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=Fs;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 Sn=O((qu,wn)=>{"use strict";wn.exports=Ws;function Ws(e={}){let{ERR_PATHS_MUST_BE_STRINGS:t=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:r=n=>`fast-redact \u2013 Invalid path (${n})`}=e;return function({paths:i}){i.forEach(s=>{if(typeof s!="string")throw Error(t());try{if(/〇/.test(s))throw Error();let a=(s[0]==="["?"":".")+s.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if(/\n|\r|;/.test(a)||/\/\*/.test(a))throw Error();Function(`
2
2
  'use strict'
3
3
  const o = new Proxy({}, { get: () => o, set: () => { throw Error() } });
4
4
  const \u3007 = null;
5
- o${l}
6
- if ([o${l}].length !== 1) throw Error()`)()}catch(l){throw Error(r(s))}})}}});var ke=E((Su,yn)=>{"use strict";yn.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var gn=E((vu,pn)=>{"use strict";var Bs=ke();pn.exports=Ms;function Ms({paths:e}){let t=[];var r=0;let i=e.reduce(function(n,s,l){var f=s.match(Bs).map(a=>a.replace(/'|"|`/g,""));let o=s[0]==="[";f=f.map(a=>a[0]==="["?a.substr(1,a.length-2):a);let c=f.indexOf("*");if(c>-1){let a=f.slice(0,c),h=a.join("."),y=f.slice(c+1,f.length),d=y.length>0;r++,t.push({before:a,beforeStr:h,after:y,nested:d})}else n[s]={path:f,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(s),leadingBracket:o};return n},{});return{wildcards:t,wcLen:r,secret:i}}});var bn=E((Ou,mn)=>{"use strict";var Cs=ke();mn.exports=Is;function Is({secret:e,serialize:t,wcLen:r,strict:i,isCensorFct:n,censorFctTakesPath:s},l){let f=Function("o",`
5
+ o${a}
6
+ if ([o${a}].length !== 1) throw Error()`)()}catch(a){throw Error(r(s))}})}}});var je=O((Mu,vn)=>{"use strict";vn.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var On=O((Cu,En)=>{"use strict";var Ks=je();En.exports=Us;function Us({paths:e}){let t=[];var r=0;let n=e.reduce(function(i,s,a){var f=s.match(Ks).map(l=>l.replace(/'|"|`/g,""));let o=s[0]==="[";f=f.map(l=>l[0]==="["?l.substr(1,l.length-2):l);let c=f.indexOf("*");if(c>-1){let l=f.slice(0,c),h=l.join("."),p=f.slice(c+1,f.length),d=p.length>0;r++,t.push({before:l,beforeStr:h,after:p,nested:d})}else i[s]={path:f,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(s),leadingBracket:o};return i},{});return{wildcards:t,wcLen:r,secret:n}}});var _n=O((Pu,xn)=>{"use strict";var Vs=je();xn.exports=Hs;function Hs({secret:e,serialize:t,wcLen:r,strict:n,isCensorFct:i,censorFctTakesPath:s},a){let f=Function("o",`
7
7
  if (typeof o !== 'object' || o == null) {
8
- ${Ns(i,t)}
8
+ ${Ys(n,t)}
9
9
  }
10
10
  const { censor, secret } = this
11
11
  const originalSecret = {}
@@ -14,33 +14,33 @@ var ls=Object.create;var ze=Object.defineProperty,as=Object.defineProperties,cs=
14
14
  originalSecret[secretKeys[i]] = secret[secretKeys[i]]
15
15
  }
16
16
 
17
- ${Ps(e,n,s)}
17
+ ${Js(e,i,s)}
18
18
  this.compileRestore()
19
- ${Ds(r>0,n,s)}
19
+ ${Gs(r>0,i,s)}
20
20
  this.secret = originalSecret
21
- ${zs(t)}
22
- `).bind(l);return f.state=l,t===!1&&(f.restore=o=>l.restore(o)),f}function Ps(e,t,r){return Object.keys(e).map(i=>{let{escPath:n,leadingBracket:s,path:l}=e[i],f=s?1:0,o=s?"":".",c=[];for(var a;(a=Cs.exec(i))!==null;){let[,u]=a,{index:g,input:S}=a;g>f&&c.push(S.substring(0,g-(u?0:1)))}var h=c.map(u=>`o${o}${u}`).join(" && ");h.length===0?h+=`o${o}${i} != null`:h+=` && o${o}${i} != null`;let y=`
21
+ ${Xs(t)}
22
+ `).bind(a);return f.state=a,t===!1&&(f.restore=o=>a.restore(o)),f}function Js(e,t,r){return Object.keys(e).map(n=>{let{escPath:i,leadingBracket:s,path:a}=e[n],f=s?1:0,o=s?"":".",c=[];for(var l;(l=Vs.exec(n))!==null;){let[,u]=l,{index:g,input:S}=l;g>f&&c.push(S.substring(0,g-(u?0:1)))}var h=c.map(u=>`o${o}${u}`).join(" && ");h.length===0?h+=`o${o}${n} != null`:h+=` && o${o}${n} != null`;let p=`
23
23
  switch (true) {
24
24
  ${c.reverse().map(u=>`
25
25
  case o${o}${u} === censor:
26
- secret[${n}].circle = ${JSON.stringify(u)}
26
+ secret[${i}].circle = ${JSON.stringify(u)}
27
27
  break
28
28
  `).join(`
29
29
  `)}
30
30
  }
31
- `,d=r?`val, ${JSON.stringify(l)}`:"val";return`
31
+ `,d=r?`val, ${JSON.stringify(a)}`:"val";return`
32
32
  if (${h}) {
33
- const val = o${o}${i}
33
+ const val = o${o}${n}
34
34
  if (val === censor) {
35
- secret[${n}].precensored = true
35
+ secret[${i}].precensored = true
36
36
  } else {
37
- secret[${n}].val = val
38
- o${o}${i} = ${t?`censor(${d})`:"censor"}
39
- ${y}
37
+ secret[${i}].val = val
38
+ o${o}${n} = ${t?`censor(${d})`:"censor"}
39
+ ${p}
40
40
  }
41
41
  }
42
42
  `}).join(`
43
- `)}function Ds(e,t,r){return e===!0?`
43
+ `)}function Gs(e,t,r){return e===!0?`
44
44
  {
45
45
  const { wildcards, wcLen, groupRedact, nestedRedact } = this
46
46
  for (var i = 0; i < wcLen; i++) {
@@ -51,16 +51,16 @@ var ls=Object.create;var ze=Object.defineProperty,as=Object.defineProperties,cs=
51
51
  } else secret[beforeStr] = groupRedact(o, before, censor, ${t}, ${r})
52
52
  }
53
53
  }
54
- `:""}function zs(e){return e===!1?"return o":`
54
+ `:""}function Xs(e){return e===!1?"return o":`
55
55
  var s = this.serialize(o)
56
56
  this.restore(o)
57
57
  return s
58
- `}function Ns(e,t){return e===!0?"throw Error('fast-redact: primitives cannot be redacted')":t===!1?"return o":"return this.serialize(o)"}});var ot=E((Eu,vn)=>{"use strict";vn.exports={groupRedact:Ws,groupRestore:Fs,nestedRedact:Us,nestedRestore:Ks};function Fs({keys:e,values:t,target:r}){if(r==null||typeof r=="string")return;let i=e.length;for(var n=0;n<i;n++){let s=e[n];r[s]=t[n]}}function Ws(e,t,r,i,n){let s=wn(e,t);if(s==null||typeof s=="string")return{keys:null,values:null,target:s,flat:!0};let l=Object.keys(s),f=l.length,o=t.length,c=n?[...t]:void 0,a=new Array(f);for(var h=0;h<f;h++){let y=l[h];a[h]=s[y],n?(c[o]=y,s[y]=r(s[y],c)):i?s[y]=r(s[y]):s[y]=r}return{keys:l,values:a,target:s,flat:!0}}function Ks(e){for(let t=0;t<e.length;t++){let{target:r,path:i,value:n}=e[t],s=r;for(let l=i.length-1;l>0;l--)s=s[i[l]];s[i[0]]=n}}function Us(e,t,r,i,n,s,l){let f=wn(t,r);if(f==null)return;let o=Object.keys(f),c=o.length;for(var a=0;a<c;a++){let h=o[a];Vs(e,f,h,r,i,n,s,l)}return e}function st(e,t){return e!=null?"hasOwn"in Object?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t):!1}function Vs(e,t,r,i,n,s,l,f){let o=n.length,c=o-1,a=r;var h=-1,y,d,u,g=null,S=null,w,v,b=!1,x=0,O=0,T=Hs();if(u=y=t[r],typeof y=="object"){for(;y!=null&&++h<o&&(O+=1,r=n[h],g=u,!(r!=="*"&&!S&&!(typeof y=="object"&&r in y)));)if(!(r==="*"&&(S==="*"&&(b=!0),S=r,h!==c))){if(S){let A=Object.keys(y);for(var k=0;k<A.length;k++){let _=A[k];if(v=y[_],w=r==="*",b)T=ee(T,_,O),x=h,u=Sn(v,x-1,r,i,n,s,l,f,a,y,d,u,w,_,h,c,T,e,t[a],O+1);else if(w||typeof v=="object"&&v!==null&&r in v){if(w?u=v:u=v[r],d=h!==c?u:l?f?s(u,[...i,a,...n]):s(u):s,w){let R=pe(ee(T,_,O),u,t[a]);e.push(R),y[_]=d}else if(v[r]!==d)if(d===void 0&&s!==void 0||st(v,r)&&d===u)T=ee(T,_,O);else{T=ee(T,_,O);let R=pe(ee(T,r,O+1),u,t[a]);e.push(R),v[r]=d}}}S=null}else{if(u=y[r],T=ee(T,r,O),d=h!==c?u:l?f?s(u,[...i,a,...n]):s(u):s,!(st(y,r)&&d===u||d===void 0&&s!==void 0)){let A=pe(T,u,t[a]);e.push(A),y[r]=d}y=y[r]}if(typeof y!="object")break}}}function wn(e,t){for(var r=-1,i=t.length,n=e;n!=null&&++r<i;)n=n[t[r]];return n}function Sn(e,t,r,i,n,s,l,f,o,c,a,h,y,d,u,g,S,w,v,b){if(t===0&&(y||typeof e=="object"&&e!==null&&r in e)){if(y?h=e:h=e[r],a=u!==g?h:l?f?s(h,[...i,o,...n]):s(h):s,y){let x=pe(S,h,v);w.push(x),c[d]=a}else if(e[r]!==a){if(!(a===void 0&&s!==void 0||st(e,r)&&a===h)){let x=pe(ee(S,r,b+1),h,v);w.push(x),e[r]=a}}}for(let x in e)typeof e[x]=="object"&&(S=ee(S,x,b),Sn(e[x],t-1,r,i,n,s,l,f,o,c,a,h,y,d,u,g,S,w,v,b+1))}function Hs(){return{parent:null,key:null,children:[],depth:0}}function ee(e,t,r){if(e.depth===r)return ee(e.parent,t,r);var i={parent:e,key:t,depth:r,children:[]};return e.children.push(i),i}function pe(e,t,r){let i=e,n=[];do n.push(i.key),i=i.parent;while(i.parent!=null);return{path:n,value:t,target:r}}});var En=E((xu,On)=>{"use strict";var{groupRestore:Js,nestedRestore:Gs}=ot();On.exports=Xs;function Xs(){return function(){if(this.restore){this.restore.state.secret=this.secret;return}let{secret:t,wcLen:r}=this,i=Object.keys(t),n=Ys(t,i),s=r>0,l=s?{secret:t,groupRestore:Js,nestedRestore:Gs}:{secret:t};this.restore=Function("o",Qs(n,i,s)).bind(l),this.restore.state=l}}function Ys(e,t){return t.map(r=>{let{circle:i,escPath:n,leadingBracket:s}=e[r],f=i?`o.${i} = secret[${n}].val`:`o${s?"":"."}${r} = secret[${n}].val`,o=`secret[${n}].val = undefined`;return`
59
- if (secret[${n}].val !== undefined) {
58
+ `}function Ys(e,t){return e===!0?"throw Error('fast-redact: primitives cannot be redacted')":t===!1?"return o":"return this.serialize(o)"}});var ft=O((Bu,An)=>{"use strict";An.exports={groupRedact:Zs,groupRestore:Qs,nestedRedact:to,nestedRestore:eo};function Qs({keys:e,values:t,target:r}){if(r==null||typeof r=="string")return;let n=e.length;for(var i=0;i<n;i++){let s=e[i];r[s]=t[i]}}function Zs(e,t,r,n,i){let s=kn(e,t);if(s==null||typeof s=="string")return{keys:null,values:null,target:s,flat:!0};let a=Object.keys(s),f=a.length,o=t.length,c=i?[...t]:void 0,l=new Array(f);for(var h=0;h<f;h++){let p=a[h];l[h]=s[p],i?(c[o]=p,s[p]=r(s[p],c)):n?s[p]=r(s[p]):s[p]=r}return{keys:a,values:l,target:s,flat:!0}}function eo(e){for(let t=0;t<e.length;t++){let{target:r,path:n,value:i}=e[t],s=r;for(let a=n.length-1;a>0;a--)s=s[n[a]];s[n[0]]=i}}function to(e,t,r,n,i,s,a){let f=kn(t,r);if(f==null)return;let o=Object.keys(f),c=o.length;for(var l=0;l<c;l++){let h=o[l];ro(e,f,h,r,n,i,s,a)}return e}function ut(e,t){return e!=null?"hasOwn"in Object?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t):!1}function ro(e,t,r,n,i,s,a,f){let o=i.length,c=o-1,l=r;var h=-1,p,d,u,g=null,S=null,w,v,b=!1,x=0,E=0,k=no();if(u=p=t[r],typeof p=="object"){for(;p!=null&&++h<o&&(E+=1,r=i[h],g=u,!(r!=="*"&&!S&&!(typeof p=="object"&&r in p)));)if(!(r==="*"&&(S==="*"&&(b=!0),S=r,h!==c))){if(S){let R=Object.keys(p);for(var A=0;A<R.length;A++){let _=R[A];if(v=p[_],w=r==="*",b)k=re(k,_,E),x=h,u=Rn(v,x-1,r,n,i,s,a,f,l,p,d,u,w,_,h,c,k,e,t[l],E+1);else if(w||typeof v=="object"&&v!==null&&r in v){if(w?u=v:u=v[r],d=h!==c?u:a?f?s(u,[...n,l,...i]):s(u):s,w){let L=we(re(k,_,E),u,t[l]);e.push(L),p[_]=d}else if(v[r]!==d)if(d===void 0&&s!==void 0||ut(v,r)&&d===u)k=re(k,_,E);else{k=re(k,_,E);let L=we(re(k,r,E+1),u,t[l]);e.push(L),v[r]=d}}}S=null}else{if(u=p[r],k=re(k,r,E),d=h!==c?u:a?f?s(u,[...n,l,...i]):s(u):s,!(ut(p,r)&&d===u||d===void 0&&s!==void 0)){let R=we(k,u,t[l]);e.push(R),p[r]=d}p=p[r]}if(typeof p!="object")break}}}function kn(e,t){for(var r=-1,n=t.length,i=e;i!=null&&++r<n;)i=i[t[r]];return i}function Rn(e,t,r,n,i,s,a,f,o,c,l,h,p,d,u,g,S,w,v,b){if(t===0&&(p||typeof e=="object"&&e!==null&&r in e)){if(p?h=e:h=e[r],l=u!==g?h:a?f?s(h,[...n,o,...i]):s(h):s,p){let x=we(S,h,v);w.push(x),c[d]=l}else if(e[r]!==l){if(!(l===void 0&&s!==void 0||ut(e,r)&&l===h)){let x=we(re(S,r,b+1),h,v);w.push(x),e[r]=l}}}for(let x in e)typeof e[x]=="object"&&(S=re(S,x,b),Rn(e[x],t-1,r,n,i,s,a,f,o,c,l,h,p,d,u,g,S,w,v,b+1))}function no(){return{parent:null,key:null,children:[],depth:0}}function re(e,t,r){if(e.depth===r)return re(e.parent,t,r);var n={parent:e,key:t,depth:r,children:[]};return e.children.push(n),n}function we(e,t,r){let n=e,i=[];do i.push(n.key),n=n.parent;while(n.parent!=null);return{path:i,value:t,target:r}}});var Ln=O(($u,Tn)=>{"use strict";var{groupRestore:io,nestedRestore:so}=ft();Tn.exports=oo;function oo(){return function(){if(this.restore){this.restore.state.secret=this.secret;return}let{secret:t,wcLen:r}=this,n=Object.keys(t),i=ao(t,n),s=r>0,a=s?{secret:t,groupRestore:io,nestedRestore:so}:{secret:t};this.restore=Function("o",lo(i,n,s)).bind(a),this.restore.state=a}}function ao(e,t){return t.map(r=>{let{circle:n,escPath:i,leadingBracket:s}=e[r],f=n?`o.${n} = secret[${i}].val`:`o${s?"":"."}${r} = secret[${i}].val`,o=`secret[${i}].val = undefined`;return`
59
+ if (secret[${i}].val !== undefined) {
60
60
  try { ${f} } catch (e) {}
61
61
  ${o}
62
62
  }
63
- `}).join("")}function Qs(e,t,r){return`
63
+ `}).join("")}function lo(e,t,r){return`
64
64
  const secret = this.secret
65
65
  ${r===!0?`
66
66
  const keys = Object.keys(secret)
@@ -77,28 +77,26 @@ var ls=Object.create;var ze=Object.defineProperty,as=Object.defineProperties,cs=
77
77
  `:""}
78
78
  ${e}
79
79
  return o
80
- `}});var _n=E((_u,xn)=>{"use strict";xn.exports=Zs;function Zs(e){let{secret:t,censor:r,compileRestore:i,serialize:n,groupRedact:s,nestedRedact:l,wildcards:f,wcLen:o}=e,c=[{secret:t,censor:r,compileRestore:i}];return n!==!1&&c.push({serialize:n}),o>0&&c.push({groupRedact:s,nestedRedact:l,wildcards:f,wcLen:o}),Object.assign(...c)}});var kn=E((Tu,An)=>{"use strict";var Tn=dn(),eo=gn(),to=bn(),ro=En(),{groupRedact:no,nestedRedact:io}=ot(),so=_n(),oo=ke(),lo=Tn(),lt=e=>e;lt.restore=lt;var ao="[REDACTED]";at.rx=oo;at.validator=Tn;An.exports=at;function at(e={}){let t=Array.from(new Set(e.paths||[])),r="serialize"in e&&(e.serialize===!1||typeof e.serialize=="function")?e.serialize:JSON.stringify,i=e.remove;if(i===!0&&r!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let n=i===!0?void 0:"censor"in e?e.censor:ao,s=typeof n=="function",l=s&&n.length>1;if(t.length===0)return r||lt;lo({paths:t,serialize:r,censor:n});let{wildcards:f,wcLen:o,secret:c}=eo({paths:t,censor:n}),a=ro(),h="strict"in e?e.strict:!0;return to({secret:c,wcLen:o,serialize:r,strict:h,isCensorFct:s,censorFctTakesPath:l},so({secret:c,censor:n,compileRestore:a,serialize:r,groupRedact:no,nestedRedact:io,wildcards:f,wcLen:o}))}});var ce=E((Au,jn)=>{"use strict";var co=Symbol("pino.setLevel"),uo=Symbol("pino.getLevel"),fo=Symbol("pino.levelVal"),ho=Symbol("pino.useLevelLabels"),yo=Symbol("pino.useOnlyCustomLevels"),po=Symbol("pino.mixin"),go=Symbol("pino.lsCache"),mo=Symbol("pino.chindings"),bo=Symbol("pino.parsedChindings"),wo=Symbol("pino.asJson"),So=Symbol("pino.write"),vo=Symbol("pino.redactFmt"),Oo=Symbol("pino.time"),Eo=Symbol("pino.timeSliceIndex"),xo=Symbol("pino.stream"),_o=Symbol("pino.stringify"),To=Symbol("pino.stringifySafe"),Ao=Symbol("pino.stringifiers"),ko=Symbol("pino.end"),jo=Symbol("pino.formatOpts"),Ro=Symbol("pino.messageKey"),Lo=Symbol("pino.nestedKey"),qo=Symbol("pino.nestedKeyStr"),$o=Symbol("pino.mixinMergeStrategy"),Bo=Symbol("pino.wildcardFirst"),Mo=Symbol.for("pino.serializers"),Co=Symbol.for("pino.formatters"),Io=Symbol.for("pino.hooks"),Po=Symbol.for("pino.metadata");jn.exports={setLevelSym:co,getLevelSym:uo,levelValSym:fo,useLevelLabelsSym:ho,mixinSym:po,lsCacheSym:go,chindingsSym:mo,parsedChindingsSym:bo,asJsonSym:wo,writeSym:So,serializersSym:Mo,redactFmtSym:vo,timeSym:Oo,timeSliceIndexSym:Eo,streamSym:xo,stringifySym:_o,stringifySafeSym:To,stringifiersSym:Ao,endSym:ko,formatOptsSym:jo,messageKeySym:Ro,nestedKeySym:Lo,wildcardFirstSym:Bo,needsMetadataGsym:Po,useOnlyCustomLevelsSym:yo,formattersSym:Co,hooksSym:Io,nestedKeyStrSym:qo,mixinMergeStrategySym:$o}});var ft=E((ku,$n)=>{"use strict";var ut=kn(),{redactFmtSym:Do,wildcardFirstSym:je}=ce(),{rx:ct,validator:zo}=ut,Rn=zo({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:e=>`pino \u2013 redact paths array contains an invalid path (${e})`}),Ln="[Redacted]",qn=!1;function No(e,t){let{paths:r,censor:i}=Fo(e),n=r.reduce((f,o)=>{ct.lastIndex=0;let c=ct.exec(o),a=ct.exec(o),h=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(h==="*"&&(h=je),a===null)return f[h]=null,f;if(f[h]===null)return f;let{index:y}=a,d=`${o.substr(y,o.length-1)}`;return f[h]=f[h]||[],h!==je&&f[h].length===0&&f[h].push(...f[je]||[]),h===je&&Object.keys(f).forEach(function(u){f[u]&&f[u].push(d)}),f[h].push(d),f},{}),s={[Do]:ut({paths:r,censor:i,serialize:t,strict:qn})},l=(...f)=>t(typeof i=="function"?i(...f):i);return[...Object.keys(n),...Object.getOwnPropertySymbols(n)].reduce((f,o)=>{if(n[o]===null)f[o]=c=>l(c,[o]);else{let c=typeof i=="function"?(a,h)=>i(a,[o,...h]):i;f[o]=ut({paths:n[o],censor:c,serialize:t,strict:qn})}return f},s)}function Fo(e){if(Array.isArray(e))return e={paths:e,censor:Ln},Rn(e),e;let{paths:t,censor:r=Ln,remove:i}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return i===!0&&(r=void 0),Rn({paths:t,censor:r}),{paths:t,censor:r}}$n.exports=No});var Mn=E((ju,Bn)=>{"use strict";var Wo=()=>"",Ko=()=>`,"time":${Date.now()}`,Uo=()=>`,"time":${Math.round(Date.now()/1e3)}`,Vo=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;Bn.exports={nullTime:Wo,epochTime:Ko,unixTime:Uo,isoTime:Vo}});var In=E((Ru,Cn)=>{"use strict";function Ho(e){try{return JSON.stringify(e)}catch(t){return'"[Circular]"'}}Cn.exports=Jo;function Jo(e,t,r){var i=r&&r.stringify||Ho,n=1;if(typeof e=="object"&&e!==null){var s=t.length+n;if(s===1)return e;var l=new Array(s);l[0]=i(e);for(var f=1;f<s;f++)l[f]=i(t[f]);return l.join(" ")}if(typeof e!="string")return e;var o=t.length;if(o===0)return e;for(var c="",a=1-n,h=-1,y=e&&e.length||0,d=0;d<y;){if(e.charCodeAt(d)===37&&d+1<y){switch(h=h>-1?h:0,e.charCodeAt(d+1)){case 100:case 102:if(a>=o||t[a]==null)break;h<d&&(c+=e.slice(h,d)),c+=Number(t[a]),h=d+2,d++;break;case 105:if(a>=o||t[a]==null)break;h<d&&(c+=e.slice(h,d)),c+=Math.floor(Number(t[a])),h=d+2,d++;break;case 79:case 111:case 106:if(a>=o||t[a]===void 0)break;h<d&&(c+=e.slice(h,d));var u=typeof t[a];if(u==="string"){c+="'"+t[a]+"'",h=d+2,d++;break}if(u==="function"){c+=t[a].name||"<anonymous>",h=d+2,d++;break}c+=i(t[a]),h=d+2,d++;break;case 115:if(a>=o)break;h<d&&(c+=e.slice(h,d)),c+=String(t[a]),h=d+2,d++;break;case 37:h<d&&(c+=e.slice(h,d)),c+="%",h=d+2,d++,a--;break}++a}++d}return h===-1?e:(h<y&&(c+=e.slice(h)),c)}});var dt=E((Lu,ht)=>{"use strict";if(typeof SharedArrayBuffer!="undefined"&&typeof Atomics!="undefined"){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));ht.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 i=Date.now()+Number(t);for(;i>Date.now(););};ht.exports=e}});var Fn=E((qu,Nn)=>{"use strict";var U=B("fs"),Go=B("events"),Xo=B("util").inherits,Pn=B("path"),Dn=dt(),yt=100,Yo=16*1024;function zn(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(s,l){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}t.fd=l,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t._reopening&&!t._writing&&t._len>t.minLength&&!t.destroyed&&ue(t)}let i=t.append?"a":"w",n=t.mode;if(t.sync)try{t.mkdir&&U.mkdirSync(Pn.dirname(e),{recursive:!0});let s=U.openSync(e,i,n);r(null,s)}catch(s){throw r(s),s}else t.mkdir?U.mkdir(Pn.dirname(e),{recursive:!0},s=>{if(s)return r(s);U.open(e,i,n,r)}):U.open(e,i,n,r)}function F(e){if(!(this instanceof F))return new F(e);let{fd:t,dest:r,minLength:i,maxLength:n,maxWrite:s,sync:l,append:f=!0,mode:o,mkdir:c,retryEAGAIN:a}=e||{};if(t=t||r,this._bufs=[],this._len=0,this.fd=-1,this._writing=!1,this._writingBuf="",this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._hwm=Math.max(i||0,16387),this.file=null,this.destroyed=!1,this.minLength=i||0,this.maxLength=n||0,this.maxWrite=s||Yo,this.sync=l||!1,this.append=f||!1,this.mode=o,this.retryEAGAIN=a||(()=>!0),this.mkdir=c||!1,typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")zn(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=(h,y)=>{if(h){if(h.code==="EAGAIN"&&this.retryEAGAIN(h,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{Dn(yt),this.release(void 0,0)}catch(u){this.release(u)}else setTimeout(()=>{U.write(this.fd,this._writingBuf,"utf8",this.release)},yt);else this._writing=!1,this.emit("error",h);return}if(this.emit("write",y),this._len-=y,this._writingBuf=this._writingBuf.slice(y),this._writingBuf.length){if(!this.sync){U.write(this.fd,this._writingBuf,"utf8",this.release);return}try{do{let u=U.writeSync(this.fd,this._writingBuf,"utf8");this._len-=u,this._writingBuf=this._writingBuf.slice(u)}while(this._writingBuf)}catch(u){this.release(u);return}}let d=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):d>this.minLength?ue(this):this._ending?d>0?ue(this):(this._writing=!1,Re(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(Qo,this)):this.emit("drain"))},this.on("newListener",function(h){h==="drain"&&(this._asyncDrainScheduled=!1)})}function Qo(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}Xo(F,Go);F.prototype.write=function(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&&ue(this),this._len<this._hwm)};F.prototype.flush=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");this._writing||this.minLength<=0||(this._bufs.length===0&&this._bufs.push(""),ue(this))};F.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(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&U.close(t,r=>{if(r)return this.emit("error",r)})}),zn(e||this.file,this)};F.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?ue(this):Re(this)))};F.prototype.flushSync=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");for(!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");this._bufs.length;){let e=this._bufs[0];try{this._len-=U.writeSync(this.fd,e,"utf8"),this._bufs.shift()}catch(t){if(t.code!=="EAGAIN"||!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;Dn(yt)}}};F.prototype.destroy=function(){this.destroyed||Re(this)};function ue(e){let t=e.release;if(e._writing=!0,e._writingBuf=e._writingBuf||e._bufs.shift()||"",e.sync)try{let r=U.writeSync(e.fd,e._writingBuf,"utf8");t(null,r)}catch(r){t(r)}else U.write(e.fd,e._writingBuf,"utf8",t)}function Re(e){if(e.fd===-1){e.once("ready",Re.bind(null,e));return}e.destroyed=!0,e._bufs=[],e.fd!==1&&e.fd!==2?U.close(e.fd,t):setImmediate(t);function t(r){if(r){e.emit("error",r);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}F.SonicBoom=F;F.default=F;Nn.exports=F});var Kn=E(($u,Wn)=>{"use strict";var{format:pt}=B("util");function Zo(){let e={},t=new Map;function r(n,s,l){if(!n)throw new Error("Warning name must not be empty");if(!s)throw new Error("Warning code must not be empty");if(!l)throw new Error("Warning message must not be empty");if(s=s.toUpperCase(),e[s]!==void 0)throw new Error(`The code '${s}' already exist`);function f(o,c,a){let h;return o&&c&&a?h=pt(l,o,c,a):o&&c?h=pt(l,o,c):o?h=pt(l,o):h=l,{code:s,name:n,message:h}}return t.set(s,!1),e[s]=f,e[s]}function i(n,s,l,f){if(e[n]===void 0)throw new Error(`The code '${n}' does not exist`);if(t.get(n)===!0)return;t.set(n,!0);let o=e[n](s,l,f);process.emitWarning(o.message,o.name,o.code)}return{create:r,emit:i,emitted:t}}Wn.exports=Zo});var Hn=E((Bu,Vn)=>{"use strict";var gt=Kn()();Vn.exports=gt;var Un="PinoWarning";gt.create(Un,"PINODEP008","prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives.");gt.create(Un,"PINODEP009","The use of pino.final is discouraged in Node.js v14+ and not required. It will be removed in the next major version")});var bt=E((Mu,Yn)=>{"use strict";function Jn(e,t,r,i){function n(){let s=t.deref();s!==void 0&&r(s,i)}e[i]=n,process.once(i,n)}var Gn=new FinalizationRegistry(Xn),mt=new WeakMap;function Xn(e){process.removeListener("exit",e.exit),process.removeListener("beforeExit",e.beforeExit)}function el(e,t){if(e===void 0)throw new Error("the object can't be undefined");let r=new WeakRef(e),i={};mt.set(e,i),Gn.register(e,i),Jn(i,r,t,"exit"),Jn(i,r,t,"beforeExit")}function tl(e){let t=mt.get(e);mt.delete(e),t&&Xn(t),Gn.unregister(e)}Yn.exports={register:el,unregister:tl}});var Zn=E((Cu,Qn)=>{"use strict";function rl(e,t,r,i,n){let s=Date.now()+i,l=Atomics.load(e,t);if(l===r){n(null,"ok");return}let f=l,o=c=>{Date.now()>s?n(null,"timed-out"):setTimeout(()=>{f=l,l=Atomics.load(e,t),l===f?o(c>=1e3?1e3:c*2):l===r?n(null,"ok"):n(null,"not-equal")},c)};o(1)}function nl(e,t,r,i,n){let s=Date.now()+i,l=Atomics.load(e,t);if(l!==r){n(null,"ok");return}let f=o=>{Date.now()>s?n(null,"timed-out"):setTimeout(()=>{l=Atomics.load(e,t),l!==r?n(null,"ok"):f(o>=1e3?1e3:o*2)},o)};f(1)}Qn.exports={wait:rl,waitDiff:nl}});var ti=E((Iu,ei)=>{"use strict";ei.exports={WRITE_INDEX:4,READ_INDEX:8}});var oi=E((Du,si)=>{"use strict";var{EventEmitter:il}=B("events"),{Worker:sl}=B("worker_threads"),{join:ol}=B("path"),{pathToFileURL:ll}=B("url"),{wait:al}=Zn(),{WRITE_INDEX:W,READ_INDEX:Y}=ti(),cl=B("buffer"),ul=B("assert"),p=Symbol("kImpl"),fl=cl.constants.MAX_STRING_LENGTH,qe=class{constructor(t){this._value=t}deref(){return this._value}},hl=global.FinalizationRegistry||class{register(){}unregister(){}},dl=global.WeakRef||qe,ri=new hl(e=>{e.exited||e.terminate()});function yl(e,t){let{filename:r,workerData:i}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||ol(__dirname,"lib","worker.js"),l=new sl(s,Q(D({},t.workerOpts),{workerData:{filename:r.indexOf("file://")===0?r:ll(r).href,dataBuf:e[p].dataBuf,stateBuf:e[p].stateBuf,workerData:i}}));return l.stream=new qe(e),l.on("message",pl),l.on("exit",ii),ri.register(e,l),l}function ni(e){ul(!e[p].sync),e[p].needDrain&&(e[p].needDrain=!1,e.emit("drain"))}function Le(e){let t=Atomics.load(e[p].state,W),r=e[p].data.length-t;if(r>0){if(e[p].buf.length===0){e[p].flushing=!1,e[p].ending?Ot(e):e[p].needDrain&&process.nextTick(ni,e);return}let i=e[p].buf.slice(0,r),n=Buffer.byteLength(i);n<=r?(e[p].buf=e[p].buf.slice(r),$e(e,i,Le.bind(null,e))):e.flush(()=>{if(!e.destroyed){for(Atomics.store(e[p].state,Y,0),Atomics.store(e[p].state,W,0);n>e[p].data.length;)r=r/2,i=e[p].buf.slice(0,r),n=Buffer.byteLength(i);e[p].buf=e[p].buf.slice(r),$e(e,i,Le.bind(null,e))}})}else if(r===0){if(t===0&&e[p].buf.length===0)return;e.flush(()=>{Atomics.store(e[p].state,Y,0),Atomics.store(e[p].state,W,0),Le(e)})}else throw new Error("overwritten")}function pl(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}switch(e.code){case"READY":this.stream=new dl(t),t.flush(()=>{t[p].ready=!0,t.emit("ready")});break;case"ERROR":fe(t,e.err);break;default:throw new Error("this should not happen: "+e.code)}}function ii(e){let t=this.stream.deref();t!==void 0&&(ri.unregister(t),t.worker.exited=!0,t.worker.off("exit",ii),fe(t,e!==0?new Error("The worker thread exited"):null))}var St=class extends il{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[p]={},this[p].stateBuf=new SharedArrayBuffer(128),this[p].state=new Int32Array(this[p].stateBuf),this[p].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[p].data=Buffer.from(this[p].dataBuf),this[p].sync=t.sync||!1,this[p].ending=!1,this[p].ended=!1,this[p].needDrain=!1,this[p].destroyed=!1,this[p].flushing=!1,this[p].ready=!1,this[p].finished=!1,this[p].errored=null,this[p].closed=!1,this[p].buf="",this.worker=yl(this,t)}write(t){if(this[p].destroyed)throw new Error("the worker has exited");if(this[p].ending)throw new Error("the worker is ending");if(this[p].flushing&&this[p].buf.length+t.length>=fl)try{wt(this),this[p].flushing=!0}catch(r){return fe(this,r),!1}if(this[p].buf+=t,this[p].sync)try{return wt(this),!0}catch(r){return fe(this,r),!1}return this[p].flushing||(this[p].flushing=!0,setImmediate(Le,this)),this[p].needDrain=this[p].data.length-this[p].buf.length-Atomics.load(this[p].state,W)<=0,!this[p].needDrain}end(){this[p].destroyed||(this[p].ending=!0,Ot(this))}flush(t){if(this[p].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let r=Atomics.load(this[p].state,W);al(this[p].state,Y,r,1/0,(i,n)=>{if(i){fe(this,i),process.nextTick(t,i);return}if(n==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[p].destroyed||(wt(this),vt(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[p].ready}get destroyed(){return this[p].destroyed}get closed(){return this[p].closed}get writable(){return!this[p].destroyed&&!this[p].ending}get writableEnded(){return this[p].ending}get writableFinished(){return this[p].finished}get writableNeedDrain(){return this[p].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[p].errored}};function fe(e,t){e[p].destroyed||(e[p].destroyed=!0,t&&(e[p].errored=t,e.emit("error",t)),e.worker.exited?setImmediate(()=>{e[p].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[p].closed=!0,e.emit("close")}))}function $e(e,t,r){let i=Atomics.load(e[p].state,W),n=Buffer.byteLength(t);return e[p].data.write(t,i),Atomics.store(e[p].state,W,i+n),Atomics.notify(e[p].state,W),r(),!0}function Ot(e){if(!(e[p].ended||!e[p].ending||e[p].flushing)){e[p].ended=!0;try{e.flushSync();let t=Atomics.load(e[p].state,Y);Atomics.store(e[p].state,W,-1),Atomics.notify(e[p].state,W);let r=0;for(;t!==-1;){if(Atomics.wait(e[p].state,Y,t,1e3),t=Atomics.load(e[p].state,Y),t===-2)throw new Error("end() failed");if(++r===10)throw new Error("end() took too long (10s)")}process.nextTick(()=>{e[p].finished=!0,e.emit("finish")})}catch(t){fe(e,t)}}}function wt(e){let t=()=>{e[p].ending?Ot(e):e[p].needDrain&&process.nextTick(ni,e)};for(e[p].flushing=!1;e[p].buf.length!==0;){let r=Atomics.load(e[p].state,W),i=e[p].data.length-r;if(i===0){vt(e),Atomics.store(e[p].state,Y,0),Atomics.store(e[p].state,W,0);continue}else if(i<0)throw new Error("overwritten");let n=e[p].buf.slice(0,i),s=Buffer.byteLength(n);if(s<=i)e[p].buf=e[p].buf.slice(i),$e(e,n,t);else{for(vt(e),Atomics.store(e[p].state,Y,0),Atomics.store(e[p].state,W,0);s>e[p].buf.length;)i=i/2,n=e[p].buf.slice(0,i),s=Buffer.byteLength(n);e[p].buf=e[p].buf.slice(i),$e(e,n,t)}}}function vt(e){if(e[p].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[p].state,W),r=0;for(;;){let i=Atomics.load(e[p].state,Y);if(i===-2)throw new Error("_flushSync failed");if(i!==t)Atomics.wait(e[p].state,Y,i,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}si.exports=St});var xt=E((Nu,ai)=>{"use strict";var{createRequire:gl}=B("module"),ml=it(),{join:Et,isAbsolute:bl}=B("path"),wl=dt(),Be;global.WeakRef&&global.WeakMap&&global.FinalizationRegistry&&(Be=bt());var Sl=oi();function vl(e){if(Be)Be.register(e,li),e.on("close",function(){Be.unregister(e)});else{let t=li.bind(null,e);process.once("beforeExit",t),process.once("exit",t),e.on("close",function(){process.removeListener("beforeExit",t),process.removeListener("exit",t)})}}function Ol(e,t,r){let i=new Sl({filename:e,workerData:t,workerOpts:r});i.on("ready",n),i.on("close",function(){process.removeListener("exit",s)}),process.on("exit",s);function n(){process.removeListener("exit",s),i.unref(),r.autoEnd!==!1&&vl(i)}function s(){i.closed||(i.flushSync(),wl(100),i.end())}return i}function li(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function El(e){let{pipeline:t,targets:r,levels:i,options:n={},worker:s={},caller:l=ml()}=e,f=typeof l=="string"?[l]:l,o="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},c=e.target;if(c&&r)throw new Error("only one of target or targets can be specified");return r?(c=o["pino-worker"]||Et(__dirname,"worker.js"),n.targets=r.map(h=>Q(D({},h),{target:a(h.target)}))):t&&(c=o["pino-pipeline-worker"]||Et(__dirname,"worker-pipeline.js"),n.targets=t.map(h=>Q(D({},h),{target:a(h.target)}))),i&&(n.levels=i),Ol(a(c),n,s);function a(h){if(h=o[h]||h,bl(h)||h.indexOf("file://")===0)return h;if(h==="pino/file")return Et(__dirname,"..","file.js");let y;for(let d of f)try{y=gl(d).resolve(h);break}catch(u){continue}if(!y)throw new Error(`unable to determine transport target for "${h}"`);return y}}ai.exports=El});var Ce=E((Wu,Si)=>{"use strict";var ci=In(),{mapHttpRequest:xl,mapHttpResponse:_l}=nt(),At=Fn(),yi=Hn(),{lsCacheSym:Tl,chindingsSym:kt,parsedChindingsSym:_t,writeSym:ui,serializersSym:jt,formatOptsSym:fi,endSym:Al,stringifiersSym:Rt,stringifySym:pi,stringifySafeSym:Lt,wildcardFirstSym:gi,needsMetadataGsym:mi,redactFmtSym:kl,streamSym:jl,nestedKeySym:Rl,formattersSym:qt,messageKeySym:bi,nestedKeyStrSym:Ll}=ce(),{isMainThread:ql}=B("worker_threads"),$l=xt();function ge(){}function Bl(e,t){if(!t)return r;return function(...n){t.call(this,n,r,e)};function r(i,...n){if(typeof i=="object"){let s=i;i!==null&&(i.method&&i.headers&&i.socket?i=xl(i):typeof i.setHeader=="function"&&(i=_l(i)));let l;s===null&&n.length===0?l=[null]:(s=n.shift(),l=n),this[ui](i,ci(s,l,this[fi]),e)}else this[ui](null,ci(i,n,this[fi]),e)}}function hi(e){let t="",r=0,i=!1,n=255,s=e.length;if(s>100)return JSON.stringify(e);for(var l=0;l<s&&n>=32;l++)n=e.charCodeAt(l),(n===34||n===92)&&(t+=e.slice(r,l)+"\\",r=l,i=!0);return i?t+=e.slice(r):t=e,n<32?JSON.stringify(e):'"'+t+'"'}function Ml(e,t,r,i){let n=this[pi],s=this[Lt],l=this[Rt],f=this[Al],o=this[kt],c=this[jt],a=this[qt],h=this[bi],y=this[Tl][r]+i;y=y+o;let d;a.log&&(e=a.log(e));let u=l[gi],g="";for(let w in e)if(d=e[w],Object.prototype.hasOwnProperty.call(e,w)&&d!==void 0){d=c[w]?c[w](d):d;let v=l[w]||u;switch(typeof d){case"undefined":case"function":continue;case"number":Number.isFinite(d)===!1&&(d=null);case"boolean":v&&(d=v(d));break;case"string":d=(v||hi)(d);break;default:d=(v||n)(d,s)}if(d===void 0)continue;g+=',"'+w+'":'+d}let S="";if(t!==void 0){d=c[h]?c[h](t):t;let w=l[h]||u;switch(typeof d){case"function":break;case"number":Number.isFinite(d)===!1&&(d=null);case"boolean":w&&(d=w(d)),S=',"'+h+'":'+d;break;case"string":d=(w||hi)(d),S=',"'+h+'":'+d;break;default:d=(w||n)(d,s),S=',"'+h+'":'+d}}return this[Rl]&&g?y+this[Ll]+g.slice(1)+"}"+S+f:y+g+S+f}function Cl(e,t){let r,i=e[kt],n=e[pi],s=e[Lt],l=e[Rt],f=l[gi],o=e[jt],c=e[qt].bindings;t=c(t);for(let a in t)if(r=t[a],(a!=="level"&&a!=="serializers"&&a!=="formatters"&&a!=="customLevels"&&t.hasOwnProperty(a)&&r!==void 0)===!0){if(r=o[a]?o[a](r):r,r=(l[a]||f||n)(r,s),r===void 0)continue;i+=',"'+a+'":'+r}return i}function wi(e,t,r,i){if(t&&typeof t=="function")return t=t.bind(i),Tt(t(e),r,e);try{let n=B("pino-pretty").prettyFactory;return n.asMetaWrapper=Tt,Tt(n(e),r,e)}catch(n){throw n.message.startsWith("Cannot find module 'pino-pretty'")?Error("Missing `pino-pretty` module: `pino-pretty` must be installed separately"):n}}function Tt(e,t,r){r=Object.assign({suppressFlushSyncWarning:!1},r);let i=!1;return{[mi]:!0,lastLevel:0,lastMsg:null,lastObj:null,lastLogger:null,flushSync(){r.suppressFlushSyncWarning||i||(i=!0,di(t,this),t.write(e(Object.assign({level:40,msg:"pino.final with prettyPrint does not support flushing",time:Date.now()},this.chindings()))))},chindings(){let n=this.lastLogger,s=null;return n?(n.hasOwnProperty(_t)?s=n[_t]:(s=JSON.parse("{"+n[kt].substr(1)+"}"),n[_t]=s),s):null},write(n){let s=this.lastLogger,l=this.chindings(),f=this.lastTime;typeof f=="number"||(f.match(/^\d+/)?f=parseInt(f):f=f.slice(1,-1));let o=this.lastObj,c=this.lastMsg,a=null,h=s[qt],y=h.log?h.log(o):o,d=s[bi];c&&y&&!Object.prototype.hasOwnProperty.call(y,d)&&(y[d]=c);let u=Object.assign({level:this.lastLevel,time:f},y,a),g=s[jt],S=Object.keys(g);for(var w=0;w<S.length;w++){let O=S[w];u[O]!==void 0&&(u[O]=g[O](u[O]))}for(let O in l)u.hasOwnProperty(O)||(u[O]=l[O]);let b=s[Rt][kl],x=e(typeof b=="function"?b(u):u);x!==void 0&&(di(t,this),t.write(x))}}}function Il(e){return e.write!==e.constructor.prototype.write}function Me(e){let t=new At(e);return t.on("error",r),!e.sync&&ql&&Pl(t),t;function r(i){if(i.code==="EPIPE"){t.write=ge,t.end=ge,t.flushSync=ge,t.destroy=ge;return}t.removeListener("error",r),t.emit("error",i)}}function Pl(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=bt();t.register(e,Dl),e.on("close",function(){t.unregister(e)})}}function Dl(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function zl(e){return function(r,i,n={},s){if(typeof n=="string")s=Me({dest:n,sync:!0}),n={};else if(typeof s=="string"){if(n&&n.transport)throw Error("only one of option.transport or stream can be specified");s=Me({dest:s,sync:!0})}else if(n instanceof At||n.writable||n._writableState)s=n,n={};else if(n.transport){if(n.transport instanceof At||n.transport.writable||n.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(n.transport.targets&&n.transport.targets.length&&n.formatters&&typeof n.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let a;n.customLevels&&(a=n.useOnlyCustomLevels?n.customLevels:Object.assign({},n.levels,n.customLevels)),s=$l(Q(D({caller:i},n.transport),{levels:a}))}if(n=Object.assign({},e,n),n.serializers=Object.assign({},e.serializers,n.serializers),n.formatters=Object.assign({},e.formatters,n.formatters),"onTerminated"in n)throw Error("The onTerminated option has been removed, use pino.final instead");"changeLevelName"in n&&(process.emitWarning("The changeLevelName option is deprecated and will be removed in v7. Use levelKey instead.",{code:"changeLevelName_deprecation"}),n.levelKey=n.changeLevelName,delete n.changeLevelName);let{enabled:l,prettyPrint:f,prettifier:o,messageKey:c}=n;if(l===!1&&(n.level="silent"),s=s||process.stdout,s===process.stdout&&s.fd>=0&&!Il(s)&&(s=Me({fd:s.fd,sync:!0})),f){yi.emit("PINODEP008");let a=Object.assign({messageKey:c},f);s=wi(a,o,s,r)}return{opts:n,stream:s}}}function Nl(e,t){if(Number(process.versions.node.split(".")[0])>=14&&yi.emit("PINODEP009"),typeof e=="undefined"||typeof e.child!="function")throw Error("expected a pino logger instance");let i=typeof t!="undefined";if(i&&typeof t!="function")throw Error("if supplied, the handler parameter should be a function");let n=e[jl];if(typeof n.flushSync!="function")throw Error("final requires a stream that has a flushSync method, such as pino.destination");let s=new Proxy(e,{get:(l,f)=>f in l.levels.values?(...o)=>{l[f](...o),n.flushSync()}:l[f]});if(!i){try{n.flushSync()}catch(l){}return s}return(l=null,...f)=>{try{n.flushSync()}catch(o){}return t(l,s,...f)}}function Fl(e,t){try{return JSON.stringify(e)}catch(r){try{return(t||this[Lt])(e)}catch(i){return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function Wl(e,t,r){return{level:e,bindings:t,log:r}}function di(e,t){e[mi]===!0&&(e.lastLevel=t.lastLevel,e.lastMsg=t.lastMsg,e.lastObj=t.lastObj,e.lastTime=t.lastTime,e.lastLogger=t.lastLogger)}function Kl(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e}Si.exports={noop:ge,buildSafeSonicBoom:Me,getPrettyStream:wi,asChindings:Cl,asJson:Ml,genLog:Bl,createArgsNormalizer:zl,final:Nl,stringify:Fl,buildFormatters:Wl,normalizeDestFileDescriptor:Kl}});var Ie=E((Uu,Oi)=>{"use strict";var{lsCacheSym:Ul,levelValSym:$t,useOnlyCustomLevelsSym:Vl,streamSym:Hl,formattersSym:Jl,hooksSym:Gl}=ce(),{noop:Xl,genLog:se}=Ce(),X={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},vi={fatal:e=>{let t=se(X.fatal,e);return function(...r){let i=this[Hl];if(t.call(this,...r),typeof i.flushSync=="function")try{i.flushSync()}catch(n){}}},error:e=>se(X.error,e),warn:e=>se(X.warn,e),info:e=>se(X.info,e),debug:e=>se(X.debug,e),trace:e=>se(X.trace,e)},Bt=Object.keys(X).reduce((e,t)=>(e[X[t]]=t,e),{}),Yl=Object.keys(Bt).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function Ql(e){let t=e[Jl].level,{labels:r}=e.levels,i={};for(let n in r){let s=t(r[n],Number(n));i[n]=JSON.stringify(s).slice(0,-1)}return e[Ul]=i,e}function Zl(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 ea(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 i=this[$t],n=this[$t]=r[e],s=this[Vl],l=this[Gl].logMethod;for(let f in r){if(n>r[f]){this[f]=Xl;continue}this[f]=Zl(f,s)?vi[f](l):se(r[f],l)}this.emit("level-change",e,n,t[i],i)}function ta(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function ra(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&r>=this[$t]}function na(e=null,t=!1){let r=e?Object.keys(e).reduce((s,l)=>(s[e[l]]=l,s),{}):null,i=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:Bt,r),n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:X,e);return{labels:i,values:n}}function ia(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),r?[]:Object.keys(Bt).map(s=>+s),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:X,t);if(!(e in i))throw Error(`default level:${e} must be included in custom levels`)}function sa(e,t){let{labels:r,values:i}=e;for(let n in t){if(n in i)throw Error("levels cannot be overridden");if(t[n]in r)throw Error("pre-existing level values cannot be used for new levels")}}Oi.exports={initialLsCache:Yl,genLsCache:Ql,levelMethods:vi,getLevel:ta,setLevel:ea,isLevelEnabled:ra,mappings:na,levels:X,assertNoLevelCollisions:sa,assertDefaultLevelFound:ia}});var Ei=E((Vu,oa)=>{oa.exports={name:"pino",version:"7.11.0",description:"super fast, all natural json logger",main:"pino.js",type:"commonjs",types:"pino.d.ts",browser:"./browser.js",files:["pino.js","file.js","pino.d.ts","bin.js","browser.js","pretty.js","usage.txt","test","docs","example.js","lib"],scripts:{docs:"docsify serve","browser-test":"airtap --local 8080 test/browser*test.js",lint:"eslint .",test:"npm run lint && npm run transpile && tap --ts && jest test/jest && npm run test-types","test-ci":"npm run lint && npm run transpile && tap --ts --no-check-coverage --coverage-report=lcovonly && npm run test-types","test-ci-pnpm":"pnpm run lint && npm run transpile && tap --ts --no-coverage --no-check-coverage && pnpm run test-types","test-ci-yarn-pnp":"yarn run lint && npm run transpile && tap --ts --no-check-coverage --coverage-report=lcovonly","test-types":"tsc && tsd && ts-node test/types/pino.ts",transpile:"node ./test/fixtures/ts/transpile.cjs","cov-ui":"tap --ts --coverage-report=html",bench:"node benchmarks/utils/runbench all","bench-basic":"node benchmarks/utils/runbench basic","bench-object":"node benchmarks/utils/runbench object","bench-deep-object":"node benchmarks/utils/runbench deep-object","bench-multi-arg":"node benchmarks/utils/runbench multi-arg","bench-longs-tring":"node benchmarks/utils/runbench long-string","bench-child":"node benchmarks/utils/runbench child","bench-child-child":"node benchmarks/utils/runbench child-child","bench-child-creation":"node benchmarks/utils/runbench child-creation","bench-formatters":"node benchmarks/utils/runbench formatters","update-bench-doc":"node benchmarks/utils/generate-benchmark-doc > docs/benchmarks.md"},bin:{pino:"./bin.js"},precommit:"test",repository:{type:"git",url:"git+https://github.com/pinojs/pino.git"},keywords:["fast","logger","stream","json"],author:"Matteo Collina <hello@matteocollina.com>",contributors:["David Mark Clements <huperekchuno@googlemail.com>","James Sumners <james.sumners@gmail.com>","Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)"],license:"MIT",bugs:{url:"https://github.com/pinojs/pino/issues"},homepage:"http://getpino.io",devDependencies:{"@types/flush-write-stream":"^1.0.0","@types/node":"^17.0.0","@types/tap":"^15.0.6",airtap:"4.0.4",benchmark:"^2.1.4",bole:"^4.0.0",bunyan:"^1.8.14","docsify-cli":"^4.4.1",eslint:"^7.17.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.22.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0",execa:"^5.0.0",fastbench:"^1.0.1","flush-write-stream":"^2.0.0","import-fresh":"^3.2.1",jest:"^27.3.1",log:"^6.0.0",loglevel:"^1.6.7","pino-pretty":"^v7.6.0","pre-commit":"^1.2.2",proxyquire:"^2.1.3",pump:"^3.0.0",rimraf:"^3.0.2",semver:"^7.0.0",split2:"^4.0.0",steed:"^1.1.3","strip-ansi":"^6.0.0",tap:"^16.0.0",tape:"^5.0.0",through2:"^4.0.0","ts-node":"^10.7.0",tsd:"^0.20.0",typescript:"^4.4.4",winston:"^3.3.3"},dependencies:{"atomic-sleep":"^1.0.0","fast-redact":"^3.0.0","on-exit-leak-free":"^0.2.0","pino-abstract-transport":"v0.5.0","pino-std-serializers":"^4.0.0","process-warning":"^1.0.0","quick-format-unescaped":"^4.0.3","real-require":"^0.1.0","safe-stable-stringify":"^2.1.0","sonic-boom":"^2.2.1","thread-stream":"^0.15.1"},tsd:{directory:"test/types"}}});var Mt=E((Hu,xi)=>{"use strict";var{version:la}=Ei();xi.exports={version:la}});var Bi=E((Gu,$i)=>{"use strict";var{EventEmitter:aa}=B("events"),{lsCacheSym:ca,levelValSym:ua,setLevelSym:It,getLevelSym:_i,chindingsSym:Pt,parsedChindingsSym:fa,mixinSym:ha,asJsonSym:ji,writeSym:da,mixinMergeStrategySym:ya,timeSym:pa,timeSliceIndexSym:ga,streamSym:Ri,serializersSym:oe,formattersSym:Ct,useOnlyCustomLevelsSym:ma,needsMetadataGsym:ba,redactFmtSym:wa,stringifySym:Sa,formatOptsSym:va,stringifiersSym:Oa}=ce(),{getLevel:Ea,setLevel:xa,isLevelEnabled:_a,mappings:Ta,initialLsCache:Aa,genLsCache:ka,assertNoLevelCollisions:ja}=Ie(),{asChindings:Li,asJson:Ra,buildFormatters:Ti,stringify:Ai}=Ce(),{version:La}=Mt(),qa=ft(),$a=class{},qi={constructor:$a,child:Ba,bindings:Ma,setBindings:Ca,flush:za,isLevelEnabled:_a,version:La,get level(){return this[_i]()},set level(e){this[It](e)},get levelVal(){return this[ua]},set levelVal(e){throw Error("levelVal is read-only")},[ca]:Aa,[da]:Pa,[ji]:Ra,[_i]:Ea,[It]:xa};Object.setPrototypeOf(qi,aa.prototype);$i.exports=function(){return Object.create(qi)};var ki=e=>e;function Ba(e,t){if(!e)throw Error("missing bindings for child Pino");t=t||{};let r=this[oe],i=this[Ct],n=Object.create(this);if(t.hasOwnProperty("serializers")===!0){n[oe]=Object.create(null);for(let a in r)n[oe][a]=r[a];let o=Object.getOwnPropertySymbols(r);for(var s=0;s<o.length;s++){let a=o[s];n[oe][a]=r[a]}for(let a in t.serializers)n[oe][a]=t.serializers[a];let c=Object.getOwnPropertySymbols(t.serializers);for(var l=0;l<c.length;l++){let a=c[l];n[oe][a]=t.serializers[a]}}else n[oe]=r;if(t.hasOwnProperty("formatters")){let{level:o,bindings:c,log:a}=t.formatters;n[Ct]=Ti(o||i.level,c||ki,a||i.log)}else n[Ct]=Ti(i.level,ki,i.log);if(t.hasOwnProperty("customLevels")===!0&&(ja(this.levels,t.customLevels),n.levels=Ta(t.customLevels,n[ma]),ka(n)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){n.redact=t.redact;let o=qa(n.redact,Ai),c={stringify:o[wa]};n[Sa]=Ai,n[Oa]=o,n[va]=c}n[Pt]=Li(n,e);let f=t.level||this.level;return n[It](f),n}function Ma(){let t=`{${this[Pt].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function Ca(e){let t=Li(this,e);this[Pt]=t,delete this[fa]}function Ia(e,t){return Object.assign(t,e)}function Pa(e,t,r){let i=this[pa](),n=this[ha],s=this[ya]||Ia,l;e==null?l={}:e instanceof Error?(l={err:e},t===void 0&&(t=e.message)):(l=e,t===void 0&&e.err&&(t=e.err.message)),n&&(l=s(l,n(l,r)));let f=this[ji](l,t,r,i),o=this[Ri];o[ba]===!0&&(o.lastLevel=r,o.lastObj=l,o.lastMsg=t,o.lastTime=i.slice(this[ga]),o.lastLogger=this),o.write(f)}function Da(){}function za(){let e=this[Ri];"flush"in e&&e.flush(Da)}});var Pi=E((Ft,Ii)=>{"use strict";var{hasOwnProperty:me}=Object.prototype,ae=Nt();ae.configure=Nt;ae.stringify=ae;ae.default=ae;Ft.stringify=ae;Ft.configure=Nt;Ii.exports=ae;var Na=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function re(e){return e.length<5e3&&!Na.test(e)?`"${e}"`:JSON.stringify(e)}function Dt(e,t){if(e.length>200||t)return e.sort(t);for(let r=1;r<e.length;r++){let i=e[r],n=r;for(;n!==0&&e[n-1]>i;)e[n]=e[n-1],n--;e[n]=i}return e}var Fa=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function zt(e){return Fa.call(e)!==void 0&&e.length!==0}function Mi(e,t,r){e.length<r&&(r=e.length);let i=t===","?"":" ",n=`"0":${i}${e[0]}`;for(let s=1;s<r;s++)n+=`${t}"${s}":${i}${e[s]}`;return n}function Wa(e){if(me.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 Ka(e){let t;if(me.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 Ua(e,t){let r;if(me.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 Ci(e,t){let r;if(me.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 le(e){return e===1?"1 item":`${e} items`}function Va(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function Ha(e){if(me.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 i=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(i+=` (${r.toString()})`),new Error(i)}}}function Nt(e){e=D({},e);let t=Ha(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Wa(e),i=Ua(e,"bigint"),n=Ka(e),s=typeof n=="function"?n:void 0,l=Ci(e,"maximumDepth"),f=Ci(e,"maximumBreadth");function o(d,u,g,S,w,v){let b=u[d];switch(typeof b=="object"&&b!==null&&typeof b.toJSON=="function"&&(b=b.toJSON(d)),b=S.call(u,d,b),typeof b){case"string":return re(b);case"object":{if(b===null)return"null";if(g.indexOf(b)!==-1)return r;let x="",O=",",T=v;if(Array.isArray(b)){if(b.length===0)return"[]";if(l<g.length+1)return'"[Array]"';g.push(b),w!==""&&(v+=w,x+=`
81
- ${v}`,O=`,
82
- ${v}`);let j=Math.min(b.length,f),C=0;for(;C<j-1;C++){let H=o(String(C),b,g,S,w,v);x+=H!==void 0?H:"null",x+=O}let M=o(String(C),b,g,S,w,v);if(x+=M!==void 0?M:"null",b.length-1>f){let H=b.length-f-1;x+=`${O}"... ${le(H)} not stringified"`}return w!==""&&(x+=`
83
- ${T}`),g.pop(),`[${x}]`}let k=Object.keys(b),A=k.length;if(A===0)return"{}";if(l<g.length+1)return'"[Object]"';let _="",R="";w!==""&&(v+=w,O=`,
84
- ${v}`,_=" ");let $=Math.min(A,f);n&&!zt(b)&&(k=Dt(k,s)),g.push(b);for(let j=0;j<$;j++){let C=k[j],M=o(C,b,g,S,w,v);M!==void 0&&(x+=`${R}${re(C)}:${_}${M}`,R=O)}if(A>f){let j=A-f;x+=`${R}"...":${_}"${le(j)} not stringified"`,R=O}return w!==""&&R.length>1&&(x=`
80
+ `}});var qn=O((Iu,jn)=>{"use strict";jn.exports=co;function co(e){let{secret:t,censor:r,compileRestore:n,serialize:i,groupRedact:s,nestedRedact:a,wildcards:f,wcLen:o}=e,c=[{secret:t,censor:r,compileRestore:n}];return i!==!1&&c.push({serialize:i}),o>0&&c.push({groupRedact:s,nestedRedact:a,wildcards:f,wcLen:o}),Object.assign(...c)}});var Pn=O((Du,Cn)=>{"use strict";var Mn=Sn(),uo=On(),fo=_n(),ho=Ln(),{groupRedact:po,nestedRedact:yo}=ft(),go=qn(),mo=je(),bo=Mn(),ht=e=>e;ht.restore=ht;var wo="[REDACTED]";dt.rx=mo;dt.validator=Mn;Cn.exports=dt;function dt(e={}){let t=Array.from(new Set(e.paths||[])),r="serialize"in e&&(e.serialize===!1||typeof e.serialize=="function")?e.serialize:JSON.stringify,n=e.remove;if(n===!0&&r!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let i=n===!0?void 0:"censor"in e?e.censor:wo,s=typeof i=="function",a=s&&i.length>1;if(t.length===0)return r||ht;bo({paths:t,serialize:r,censor:i});let{wildcards:f,wcLen:o,secret:c}=uo({paths:t,censor:i}),l=ho(),h="strict"in e?e.strict:!0;return fo({secret:c,wcLen:o,serialize:r,strict:h,isCensorFct:s,censorFctTakesPath:a},go({secret:c,censor:i,compileRestore:l,serialize:r,groupRedact:po,nestedRedact:yo,wildcards:f,wcLen:o}))}});var de=O((zu,Bn)=>{"use strict";var So=Symbol("pino.setLevel"),vo=Symbol("pino.getLevel"),Eo=Symbol("pino.levelVal"),Oo=Symbol("pino.useLevelLabels"),xo=Symbol("pino.useOnlyCustomLevels"),_o=Symbol("pino.mixin"),ko=Symbol("pino.lsCache"),Ro=Symbol("pino.chindings"),Ao=Symbol("pino.parsedChindings"),To=Symbol("pino.asJson"),Lo=Symbol("pino.write"),jo=Symbol("pino.redactFmt"),qo=Symbol("pino.time"),Mo=Symbol("pino.timeSliceIndex"),Co=Symbol("pino.stream"),Po=Symbol("pino.stringify"),Bo=Symbol("pino.stringifySafe"),$o=Symbol("pino.stringifiers"),Io=Symbol("pino.end"),Do=Symbol("pino.formatOpts"),zo=Symbol("pino.messageKey"),No=Symbol("pino.nestedKey"),Fo=Symbol("pino.nestedKeyStr"),Wo=Symbol("pino.mixinMergeStrategy"),Ko=Symbol("pino.wildcardFirst"),Uo=Symbol.for("pino.serializers"),Vo=Symbol.for("pino.formatters"),Ho=Symbol.for("pino.hooks"),Jo=Symbol.for("pino.metadata");Bn.exports={setLevelSym:So,getLevelSym:vo,levelValSym:Eo,useLevelLabelsSym:Oo,mixinSym:_o,lsCacheSym:ko,chindingsSym:Ro,parsedChindingsSym:Ao,asJsonSym:To,writeSym:Lo,serializersSym:Uo,redactFmtSym:jo,timeSym:qo,timeSliceIndexSym:Mo,streamSym:Co,stringifySym:Po,stringifySafeSym:Bo,stringifiersSym:$o,endSym:Io,formatOptsSym:Do,messageKeySym:zo,nestedKeySym:No,wildcardFirstSym:Ko,needsMetadataGsym:Jo,useOnlyCustomLevelsSym:xo,formattersSym:Vo,hooksSym:Ho,nestedKeyStrSym:Fo,mixinMergeStrategySym:Wo}});var gt=O((Nu,zn)=>{"use strict";var yt=Pn(),{redactFmtSym:Go,wildcardFirstSym:qe}=de(),{rx:pt,validator:Xo}=yt,$n=Xo({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:e=>`pino \u2013 redact paths array contains an invalid path (${e})`}),In="[Redacted]",Dn=!1;function Yo(e,t){let{paths:r,censor:n}=Qo(e),i=r.reduce((f,o)=>{pt.lastIndex=0;let c=pt.exec(o),l=pt.exec(o),h=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(h==="*"&&(h=qe),l===null)return f[h]=null,f;if(f[h]===null)return f;let{index:p}=l,d=`${o.substr(p,o.length-1)}`;return f[h]=f[h]||[],h!==qe&&f[h].length===0&&f[h].push(...f[qe]||[]),h===qe&&Object.keys(f).forEach(function(u){f[u]&&f[u].push(d)}),f[h].push(d),f},{}),s={[Go]:yt({paths:r,censor:n,serialize:t,strict:Dn})},a=(...f)=>t(typeof n=="function"?n(...f):n);return[...Object.keys(i),...Object.getOwnPropertySymbols(i)].reduce((f,o)=>{if(i[o]===null)f[o]=c=>a(c,[o]);else{let c=typeof n=="function"?(l,h)=>n(l,[o,...h]):n;f[o]=yt({paths:i[o],censor:c,serialize:t,strict:Dn})}return f},s)}function Qo(e){if(Array.isArray(e))return e={paths:e,censor:In},$n(e),e;let{paths:t,censor:r=In,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),$n({paths:t,censor:r}),{paths:t,censor:r}}zn.exports=Yo});var Fn=O((Fu,Nn)=>{"use strict";var Zo=()=>"",ea=()=>`,"time":${Date.now()}`,ta=()=>`,"time":${Math.round(Date.now()/1e3)}`,ra=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;Nn.exports={nullTime:Zo,epochTime:ea,unixTime:ta,isoTime:ra}});var Kn=O((Wu,Wn)=>{"use strict";function na(e){try{return JSON.stringify(e)}catch(t){return'"[Circular]"'}}Wn.exports=ia;function ia(e,t,r){var n=r&&r.stringify||na,i=1;if(typeof e=="object"&&e!==null){var s=t.length+i;if(s===1)return e;var a=new Array(s);a[0]=n(e);for(var f=1;f<s;f++)a[f]=n(t[f]);return a.join(" ")}if(typeof e!="string")return e;var o=t.length;if(o===0)return e;for(var c="",l=1-i,h=-1,p=e&&e.length||0,d=0;d<p;){if(e.charCodeAt(d)===37&&d+1<p){switch(h=h>-1?h:0,e.charCodeAt(d+1)){case 100:case 102:if(l>=o||t[l]==null)break;h<d&&(c+=e.slice(h,d)),c+=Number(t[l]),h=d+2,d++;break;case 105:if(l>=o||t[l]==null)break;h<d&&(c+=e.slice(h,d)),c+=Math.floor(Number(t[l])),h=d+2,d++;break;case 79:case 111:case 106:if(l>=o||t[l]===void 0)break;h<d&&(c+=e.slice(h,d));var u=typeof t[l];if(u==="string"){c+="'"+t[l]+"'",h=d+2,d++;break}if(u==="function"){c+=t[l].name||"<anonymous>",h=d+2,d++;break}c+=n(t[l]),h=d+2,d++;break;case 115:if(l>=o)break;h<d&&(c+=e.slice(h,d)),c+=String(t[l]),h=d+2,d++;break;case 37:h<d&&(c+=e.slice(h,d)),c+="%",h=d+2,d++,l--;break}++l}++d}return h===-1?e:(h<p&&(c+=e.slice(h)),c)}});var bt=O((Ku,mt)=>{"use strict";if(typeof SharedArrayBuffer!="undefined"&&typeof Atomics!="undefined"){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));mt.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(););};mt.exports=e}});var Gn=O((Uu,Jn)=>{"use strict";var U=C("fs"),sa=C("events"),oa=C("util").inherits,Un=C("path"),Vn=bt(),wt=100,aa=16*1024;function Hn(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(s,a){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}t.fd=a,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t._reopening&&!t._writing&&t._len>t.minLength&&!t.destroyed&&pe(t)}let n=t.append?"a":"w",i=t.mode;if(t.sync)try{t.mkdir&&U.mkdirSync(Un.dirname(e),{recursive:!0});let s=U.openSync(e,n,i);r(null,s)}catch(s){throw r(s),s}else t.mkdir?U.mkdir(Un.dirname(e),{recursive:!0},s=>{if(s)return r(s);U.open(e,n,i,r)}):U.open(e,n,i,r)}function N(e){if(!(this instanceof N))return new N(e);let{fd:t,dest:r,minLength:n,maxLength:i,maxWrite:s,sync:a,append:f=!0,mode:o,mkdir:c,retryEAGAIN:l}=e||{};if(t=t||r,this._bufs=[],this._len=0,this.fd=-1,this._writing=!1,this._writingBuf="",this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!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||aa,this.sync=a||!1,this.append=f||!1,this.mode=o,this.retryEAGAIN=l||(()=>!0),this.mkdir=c||!1,typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")Hn(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=(h,p)=>{if(h){if(h.code==="EAGAIN"&&this.retryEAGAIN(h,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{Vn(wt),this.release(void 0,0)}catch(u){this.release(u)}else setTimeout(()=>{U.write(this.fd,this._writingBuf,"utf8",this.release)},wt);else this._writing=!1,this.emit("error",h);return}if(this.emit("write",p),this._len-=p,this._writingBuf=this._writingBuf.slice(p),this._writingBuf.length){if(!this.sync){U.write(this.fd,this._writingBuf,"utf8",this.release);return}try{do{let u=U.writeSync(this.fd,this._writingBuf,"utf8");this._len-=u,this._writingBuf=this._writingBuf.slice(u)}while(this._writingBuf)}catch(u){this.release(u);return}}let d=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):d>this.minLength?pe(this):this._ending?d>0?pe(this):(this._writing=!1,Me(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(la,this)):this.emit("drain"))},this.on("newListener",function(h){h==="drain"&&(this._asyncDrainScheduled=!1)})}function la(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}oa(N,sa);N.prototype.write=function(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&&pe(this),this._len<this._hwm)};N.prototype.flush=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");this._writing||this.minLength<=0||(this._bufs.length===0&&this._bufs.push(""),pe(this))};N.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(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&U.close(t,r=>{if(r)return this.emit("error",r)})}),Hn(e||this.file,this)};N.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?pe(this):Me(this)))};N.prototype.flushSync=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");for(!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");this._bufs.length;){let e=this._bufs[0];try{this._len-=U.writeSync(this.fd,e,"utf8"),this._bufs.shift()}catch(t){if(t.code!=="EAGAIN"||!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;Vn(wt)}}};N.prototype.destroy=function(){this.destroyed||Me(this)};function pe(e){let t=e.release;if(e._writing=!0,e._writingBuf=e._writingBuf||e._bufs.shift()||"",e.sync)try{let r=U.writeSync(e.fd,e._writingBuf,"utf8");t(null,r)}catch(r){t(r)}else U.write(e.fd,e._writingBuf,"utf8",t)}function Me(e){if(e.fd===-1){e.once("ready",Me.bind(null,e));return}e.destroyed=!0,e._bufs=[],e.fd!==1&&e.fd!==2?U.close(e.fd,t):setImmediate(t);function t(r){if(r){e.emit("error",r);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}N.SonicBoom=N;N.default=N;Jn.exports=N});var Yn=O((Vu,Xn)=>{"use strict";var{format:St}=C("util");function ca(){let e={},t=new Map;function r(i,s,a){if(!i)throw new Error("Warning name must not be empty");if(!s)throw new Error("Warning code must not be empty");if(!a)throw new Error("Warning message must not be empty");if(s=s.toUpperCase(),e[s]!==void 0)throw new Error(`The code '${s}' already exist`);function f(o,c,l){let h;return o&&c&&l?h=St(a,o,c,l):o&&c?h=St(a,o,c):o?h=St(a,o):h=a,{code:s,name:i,message:h}}return t.set(s,!1),e[s]=f,e[s]}function n(i,s,a,f){if(e[i]===void 0)throw new Error(`The code '${i}' does not exist`);if(t.get(i)===!0)return;t.set(i,!0);let o=e[i](s,a,f);process.emitWarning(o.message,o.name,o.code)}return{create:r,emit:n,emitted:t}}Xn.exports=ca});var ei=O((Hu,Zn)=>{"use strict";var vt=Yn()();Zn.exports=vt;var Qn="PinoWarning";vt.create(Qn,"PINODEP008","prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives.");vt.create(Qn,"PINODEP009","The use of pino.final is discouraged in Node.js v14+ and not required. It will be removed in the next major version")});var Ot=O((Ju,ii)=>{"use strict";function ti(e,t,r,n){function i(){let s=t.deref();s!==void 0&&r(s,n)}e[n]=i,process.once(n,i)}var ri=new FinalizationRegistry(ni),Et=new WeakMap;function ni(e){process.removeListener("exit",e.exit),process.removeListener("beforeExit",e.beforeExit)}function ua(e,t){if(e===void 0)throw new Error("the object can't be undefined");let r=new WeakRef(e),n={};Et.set(e,n),ri.register(e,n),ti(n,r,t,"exit"),ti(n,r,t,"beforeExit")}function fa(e){let t=Et.get(e);Et.delete(e),t&&ni(t),ri.unregister(e)}ii.exports={register:ua,unregister:fa}});var oi=O((Gu,si)=>{"use strict";function ha(e,t,r,n,i){let s=Date.now()+n,a=Atomics.load(e,t);if(a===r){i(null,"ok");return}let f=a,o=c=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{f=a,a=Atomics.load(e,t),a===f?o(c>=1e3?1e3:c*2):a===r?i(null,"ok"):i(null,"not-equal")},c)};o(1)}function da(e,t,r,n,i){let s=Date.now()+n,a=Atomics.load(e,t);if(a!==r){i(null,"ok");return}let f=o=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{a=Atomics.load(e,t),a!==r?i(null,"ok"):f(o>=1e3?1e3:o*2)},o)};f(1)}si.exports={wait:ha,waitDiff:da}});var li=O((Xu,ai)=>{"use strict";ai.exports={WRITE_INDEX:4,READ_INDEX:8}});var di=O((Qu,hi)=>{"use strict";var{EventEmitter:pa}=C("events"),{Worker:ya}=C("worker_threads"),{join:ga}=C("path"),{pathToFileURL:ma}=C("url"),{wait:ba}=oi(),{WRITE_INDEX:F,READ_INDEX:Z}=li(),wa=C("buffer"),Sa=C("assert"),y=Symbol("kImpl"),va=wa.constants.MAX_STRING_LENGTH,Pe=class{constructor(t){this._value=t}deref(){return this._value}},Ea=global.FinalizationRegistry||class{register(){}unregister(){}},Oa=global.WeakRef||Pe,ci=new Ea(e=>{e.exited||e.terminate()});function xa(e,t){let{filename:r,workerData:n}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||ga(__dirname,"lib","worker.js"),a=new ya(s,J(q({},t.workerOpts),{workerData:{filename:r.indexOf("file://")===0?r:ma(r).href,dataBuf:e[y].dataBuf,stateBuf:e[y].stateBuf,workerData:n}}));return a.stream=new Pe(e),a.on("message",_a),a.on("exit",fi),ci.register(e,a),a}function ui(e){Sa(!e[y].sync),e[y].needDrain&&(e[y].needDrain=!1,e.emit("drain"))}function Ce(e){let t=Atomics.load(e[y].state,F),r=e[y].data.length-t;if(r>0){if(e[y].buf.length===0){e[y].flushing=!1,e[y].ending?Rt(e):e[y].needDrain&&process.nextTick(ui,e);return}let n=e[y].buf.slice(0,r),i=Buffer.byteLength(n);i<=r?(e[y].buf=e[y].buf.slice(r),Be(e,n,Ce.bind(null,e))):e.flush(()=>{if(!e.destroyed){for(Atomics.store(e[y].state,Z,0),Atomics.store(e[y].state,F,0);i>e[y].data.length;)r=r/2,n=e[y].buf.slice(0,r),i=Buffer.byteLength(n);e[y].buf=e[y].buf.slice(r),Be(e,n,Ce.bind(null,e))}})}else if(r===0){if(t===0&&e[y].buf.length===0)return;e.flush(()=>{Atomics.store(e[y].state,Z,0),Atomics.store(e[y].state,F,0),Ce(e)})}else throw new Error("overwritten")}function _a(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}switch(e.code){case"READY":this.stream=new Oa(t),t.flush(()=>{t[y].ready=!0,t.emit("ready")});break;case"ERROR":ye(t,e.err);break;default:throw new Error("this should not happen: "+e.code)}}function fi(e){let t=this.stream.deref();t!==void 0&&(ci.unregister(t),t.worker.exited=!0,t.worker.off("exit",fi),ye(t,e!==0?new Error("The worker thread exited"):null))}var _t=class extends pa{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[y]={},this[y].stateBuf=new SharedArrayBuffer(128),this[y].state=new Int32Array(this[y].stateBuf),this[y].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[y].data=Buffer.from(this[y].dataBuf),this[y].sync=t.sync||!1,this[y].ending=!1,this[y].ended=!1,this[y].needDrain=!1,this[y].destroyed=!1,this[y].flushing=!1,this[y].ready=!1,this[y].finished=!1,this[y].errored=null,this[y].closed=!1,this[y].buf="",this.worker=xa(this,t)}write(t){if(this[y].destroyed)throw new Error("the worker has exited");if(this[y].ending)throw new Error("the worker is ending");if(this[y].flushing&&this[y].buf.length+t.length>=va)try{xt(this),this[y].flushing=!0}catch(r){return ye(this,r),!1}if(this[y].buf+=t,this[y].sync)try{return xt(this),!0}catch(r){return ye(this,r),!1}return this[y].flushing||(this[y].flushing=!0,setImmediate(Ce,this)),this[y].needDrain=this[y].data.length-this[y].buf.length-Atomics.load(this[y].state,F)<=0,!this[y].needDrain}end(){this[y].destroyed||(this[y].ending=!0,Rt(this))}flush(t){if(this[y].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let r=Atomics.load(this[y].state,F);ba(this[y].state,Z,r,1/0,(n,i)=>{if(n){ye(this,n),process.nextTick(t,n);return}if(i==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[y].destroyed||(xt(this),kt(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[y].ready}get destroyed(){return this[y].destroyed}get closed(){return this[y].closed}get writable(){return!this[y].destroyed&&!this[y].ending}get writableEnded(){return this[y].ending}get writableFinished(){return this[y].finished}get writableNeedDrain(){return this[y].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[y].errored}};function ye(e,t){e[y].destroyed||(e[y].destroyed=!0,t&&(e[y].errored=t,e.emit("error",t)),e.worker.exited?setImmediate(()=>{e[y].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[y].closed=!0,e.emit("close")}))}function Be(e,t,r){let n=Atomics.load(e[y].state,F),i=Buffer.byteLength(t);return e[y].data.write(t,n),Atomics.store(e[y].state,F,n+i),Atomics.notify(e[y].state,F),r(),!0}function Rt(e){if(!(e[y].ended||!e[y].ending||e[y].flushing)){e[y].ended=!0;try{e.flushSync();let t=Atomics.load(e[y].state,Z);Atomics.store(e[y].state,F,-1),Atomics.notify(e[y].state,F);let r=0;for(;t!==-1;){if(Atomics.wait(e[y].state,Z,t,1e3),t=Atomics.load(e[y].state,Z),t===-2)throw new Error("end() failed");if(++r===10)throw new Error("end() took too long (10s)")}process.nextTick(()=>{e[y].finished=!0,e.emit("finish")})}catch(t){ye(e,t)}}}function xt(e){let t=()=>{e[y].ending?Rt(e):e[y].needDrain&&process.nextTick(ui,e)};for(e[y].flushing=!1;e[y].buf.length!==0;){let r=Atomics.load(e[y].state,F),n=e[y].data.length-r;if(n===0){kt(e),Atomics.store(e[y].state,Z,0),Atomics.store(e[y].state,F,0);continue}else if(n<0)throw new Error("overwritten");let i=e[y].buf.slice(0,n),s=Buffer.byteLength(i);if(s<=n)e[y].buf=e[y].buf.slice(n),Be(e,i,t);else{for(kt(e),Atomics.store(e[y].state,Z,0),Atomics.store(e[y].state,F,0);s>e[y].buf.length;)n=n/2,i=e[y].buf.slice(0,n),s=Buffer.byteLength(i);e[y].buf=e[y].buf.slice(n),Be(e,i,t)}}}function kt(e){if(e[y].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[y].state,F),r=0;for(;;){let n=Atomics.load(e[y].state,Z);if(n===-2)throw new Error("_flushSync failed");if(n!==t)Atomics.wait(e[y].state,Z,n,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}hi.exports=_t});var Tt=O((ef,yi)=>{"use strict";var{createRequire:ka}=C("module"),Ra=ct(),{join:At,isAbsolute:Aa}=C("path"),Ta=bt(),$e;global.WeakRef&&global.WeakMap&&global.FinalizationRegistry&&($e=Ot());var La=di();function ja(e){if($e)$e.register(e,pi),e.on("close",function(){$e.unregister(e)});else{let t=pi.bind(null,e);process.once("beforeExit",t),process.once("exit",t),e.on("close",function(){process.removeListener("beforeExit",t),process.removeListener("exit",t)})}}function qa(e,t,r){let n=new La({filename:e,workerData:t,workerOpts:r});n.on("ready",i),n.on("close",function(){process.removeListener("exit",s)}),process.on("exit",s);function i(){process.removeListener("exit",s),n.unref(),r.autoEnd!==!1&&ja(n)}function s(){n.closed||(n.flushSync(),Ta(100),n.end())}return n}function pi(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function Ma(e){let{pipeline:t,targets:r,levels:n,options:i={},worker:s={},caller:a=Ra()}=e,f=typeof a=="string"?[a]:a,o="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},c=e.target;if(c&&r)throw new Error("only one of target or targets can be specified");return r?(c=o["pino-worker"]||At(__dirname,"worker.js"),i.targets=r.map(h=>J(q({},h),{target:l(h.target)}))):t&&(c=o["pino-pipeline-worker"]||At(__dirname,"worker-pipeline.js"),i.targets=t.map(h=>J(q({},h),{target:l(h.target)}))),n&&(i.levels=n),qa(l(c),i,s);function l(h){if(h=o[h]||h,Aa(h)||h.indexOf("file://")===0)return h;if(h==="pino/file")return At(__dirname,"..","file.js");let p;for(let d of f)try{p=ka(d).resolve(h);break}catch(u){continue}if(!p)throw new Error(`unable to determine transport target for "${h}"`);return p}}yi.exports=Ma});var De=O((rf,Ri)=>{"use strict";var gi=Kn(),{mapHttpRequest:Ca,mapHttpResponse:Pa}=lt(),qt=Gn(),vi=ei(),{lsCacheSym:Ba,chindingsSym:Mt,parsedChindingsSym:Lt,writeSym:mi,serializersSym:Ct,formatOptsSym:bi,endSym:$a,stringifiersSym:Pt,stringifySym:Ei,stringifySafeSym:Bt,wildcardFirstSym:Oi,needsMetadataGsym:xi,redactFmtSym:Ia,streamSym:Da,nestedKeySym:za,formattersSym:$t,messageKeySym:_i,nestedKeyStrSym:Na}=de(),{isMainThread:Fa}=C("worker_threads"),Wa=Tt();function Se(){}function Ka(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=Ca(n):typeof n.setHeader=="function"&&(n=Pa(n)));let a;s===null&&i.length===0?a=[null]:(s=i.shift(),a=i),this[mi](n,gi(s,a,this[bi]),e)}else this[mi](null,gi(n,i,this[bi]),e)}}function wi(e){let t="",r=0,n=!1,i=255,s=e.length;if(s>100)return JSON.stringify(e);for(var a=0;a<s&&i>=32;a++)i=e.charCodeAt(a),(i===34||i===92)&&(t+=e.slice(r,a)+"\\",r=a,n=!0);return n?t+=e.slice(r):t=e,i<32?JSON.stringify(e):'"'+t+'"'}function Ua(e,t,r,n){let i=this[Ei],s=this[Bt],a=this[Pt],f=this[$a],o=this[Mt],c=this[Ct],l=this[$t],h=this[_i],p=this[Ba][r]+n;p=p+o;let d;l.log&&(e=l.log(e));let u=a[Oi],g="";for(let w in e)if(d=e[w],Object.prototype.hasOwnProperty.call(e,w)&&d!==void 0){d=c[w]?c[w](d):d;let v=a[w]||u;switch(typeof d){case"undefined":case"function":continue;case"number":Number.isFinite(d)===!1&&(d=null);case"boolean":v&&(d=v(d));break;case"string":d=(v||wi)(d);break;default:d=(v||i)(d,s)}if(d===void 0)continue;g+=',"'+w+'":'+d}let S="";if(t!==void 0){d=c[h]?c[h](t):t;let w=a[h]||u;switch(typeof d){case"function":break;case"number":Number.isFinite(d)===!1&&(d=null);case"boolean":w&&(d=w(d)),S=',"'+h+'":'+d;break;case"string":d=(w||wi)(d),S=',"'+h+'":'+d;break;default:d=(w||i)(d,s),S=',"'+h+'":'+d}}return this[za]&&g?p+this[Na]+g.slice(1)+"}"+S+f:p+g+S+f}function Va(e,t){let r,n=e[Mt],i=e[Ei],s=e[Bt],a=e[Pt],f=a[Oi],o=e[Ct],c=e[$t].bindings;t=c(t);for(let l in t)if(r=t[l],(l!=="level"&&l!=="serializers"&&l!=="formatters"&&l!=="customLevels"&&t.hasOwnProperty(l)&&r!==void 0)===!0){if(r=o[l]?o[l](r):r,r=(a[l]||f||i)(r,s),r===void 0)continue;n+=',"'+l+'":'+r}return n}function ki(e,t,r,n){if(t&&typeof t=="function")return t=t.bind(n),jt(t(e),r,e);try{let i=C("pino-pretty").prettyFactory;return i.asMetaWrapper=jt,jt(i(e),r,e)}catch(i){throw i.message.startsWith("Cannot find module 'pino-pretty'")?Error("Missing `pino-pretty` module: `pino-pretty` must be installed separately"):i}}function jt(e,t,r){r=Object.assign({suppressFlushSyncWarning:!1},r);let n=!1;return{[xi]:!0,lastLevel:0,lastMsg:null,lastObj:null,lastLogger:null,flushSync(){r.suppressFlushSyncWarning||n||(n=!0,Si(t,this),t.write(e(Object.assign({level:40,msg:"pino.final with prettyPrint does not support flushing",time:Date.now()},this.chindings()))))},chindings(){let i=this.lastLogger,s=null;return i?(i.hasOwnProperty(Lt)?s=i[Lt]:(s=JSON.parse("{"+i[Mt].substr(1)+"}"),i[Lt]=s),s):null},write(i){let s=this.lastLogger,a=this.chindings(),f=this.lastTime;typeof f=="number"||(f.match(/^\d+/)?f=parseInt(f):f=f.slice(1,-1));let o=this.lastObj,c=this.lastMsg,l=null,h=s[$t],p=h.log?h.log(o):o,d=s[_i];c&&p&&!Object.prototype.hasOwnProperty.call(p,d)&&(p[d]=c);let u=Object.assign({level:this.lastLevel,time:f},p,l),g=s[Ct],S=Object.keys(g);for(var w=0;w<S.length;w++){let E=S[w];u[E]!==void 0&&(u[E]=g[E](u[E]))}for(let E in a)u.hasOwnProperty(E)||(u[E]=a[E]);let b=s[Pt][Ia],x=e(typeof b=="function"?b(u):u);x!==void 0&&(Si(t,this),t.write(x))}}}function Ha(e){return e.write!==e.constructor.prototype.write}function Ie(e){let t=new qt(e);return t.on("error",r),!e.sync&&Fa&&Ja(t),t;function r(n){if(n.code==="EPIPE"){t.write=Se,t.end=Se,t.flushSync=Se,t.destroy=Se;return}t.removeListener("error",r),t.emit("error",n)}}function Ja(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=Ot();t.register(e,Ga),e.on("close",function(){t.unregister(e)})}}function Ga(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function Xa(e){return function(r,n,i={},s){if(typeof i=="string")s=Ie({dest:i,sync:!0}),i={};else if(typeof s=="string"){if(i&&i.transport)throw Error("only one of option.transport or stream can be specified");s=Ie({dest:s,sync:!0})}else if(i instanceof qt||i.writable||i._writableState)s=i,i={};else if(i.transport){if(i.transport instanceof qt||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 l;i.customLevels&&(l=i.useOnlyCustomLevels?i.customLevels:Object.assign({},i.levels,i.customLevels)),s=Wa(J(q({caller:n},i.transport),{levels:l}))}if(i=Object.assign({},e,i),i.serializers=Object.assign({},e.serializers,i.serializers),i.formatters=Object.assign({},e.formatters,i.formatters),"onTerminated"in i)throw Error("The onTerminated option has been removed, use pino.final instead");"changeLevelName"in i&&(process.emitWarning("The changeLevelName option is deprecated and will be removed in v7. Use levelKey instead.",{code:"changeLevelName_deprecation"}),i.levelKey=i.changeLevelName,delete i.changeLevelName);let{enabled:a,prettyPrint:f,prettifier:o,messageKey:c}=i;if(a===!1&&(i.level="silent"),s=s||process.stdout,s===process.stdout&&s.fd>=0&&!Ha(s)&&(s=Ie({fd:s.fd,sync:!0})),f){vi.emit("PINODEP008");let l=Object.assign({messageKey:c},f);s=ki(l,o,s,r)}return{opts:i,stream:s}}}function Ya(e,t){if(Number(process.versions.node.split(".")[0])>=14&&vi.emit("PINODEP009"),typeof e=="undefined"||typeof e.child!="function")throw Error("expected a pino logger instance");let n=typeof t!="undefined";if(n&&typeof t!="function")throw Error("if supplied, the handler parameter should be a function");let i=e[Da];if(typeof i.flushSync!="function")throw Error("final requires a stream that has a flushSync method, such as pino.destination");let s=new Proxy(e,{get:(a,f)=>f in a.levels.values?(...o)=>{a[f](...o),i.flushSync()}:a[f]});if(!n){try{i.flushSync()}catch(a){}return s}return(a=null,...f)=>{try{i.flushSync()}catch(o){}return t(a,s,...f)}}function Qa(e,t){try{return JSON.stringify(e)}catch(r){try{return(t||this[Bt])(e)}catch(n){return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function Za(e,t,r){return{level:e,bindings:t,log:r}}function Si(e,t){e[xi]===!0&&(e.lastLevel=t.lastLevel,e.lastMsg=t.lastMsg,e.lastObj=t.lastObj,e.lastTime=t.lastTime,e.lastLogger=t.lastLogger)}function el(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e}Ri.exports={noop:Se,buildSafeSonicBoom:Ie,getPrettyStream:ki,asChindings:Va,asJson:Ua,genLog:Ka,createArgsNormalizer:Xa,final:Ya,stringify:Qa,buildFormatters:Za,normalizeDestFileDescriptor:el}});var ze=O((sf,Ti)=>{"use strict";var{lsCacheSym:tl,levelValSym:It,useOnlyCustomLevelsSym:rl,streamSym:nl,formattersSym:il,hooksSym:sl}=de(),{noop:ol,genLog:le}=De(),Y={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Ai={fatal:e=>{let t=le(Y.fatal,e);return function(...r){let n=this[nl];if(t.call(this,...r),typeof n.flushSync=="function")try{n.flushSync()}catch(i){}}},error:e=>le(Y.error,e),warn:e=>le(Y.warn,e),info:e=>le(Y.info,e),debug:e=>le(Y.debug,e),trace:e=>le(Y.trace,e)},Dt=Object.keys(Y).reduce((e,t)=>(e[Y[t]]=t,e),{}),al=Object.keys(Dt).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function ll(e){let t=e[il].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[tl]=n,e}function cl(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 ul(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[It],i=this[It]=r[e],s=this[rl],a=this[sl].logMethod;for(let f in r){if(i>r[f]){this[f]=ol;continue}this[f]=cl(f,s)?Ai[f](a):le(r[f],a)}this.emit("level-change",e,i,t[n],n)}function fl(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function hl(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&r>=this[It]}function dl(e=null,t=!1){let r=e?Object.keys(e).reduce((s,a)=>(s[e[a]]=a,s),{}):null,n=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:Dt,r),i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:Y,e);return{labels:n,values:i}}function pl(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),r?[]:Object.keys(Dt).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:Y,t);if(!(e in n))throw Error(`default level:${e} must be included in custom levels`)}function yl(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")}}Ti.exports={initialLsCache:al,genLsCache:ll,levelMethods:Ai,getLevel:fl,setLevel:ul,isLevelEnabled:hl,mappings:dl,levels:Y,assertNoLevelCollisions:yl,assertDefaultLevelFound:pl}});var Li=O((of,gl)=>{gl.exports={name:"pino",version:"7.11.0",description:"super fast, all natural json logger",main:"pino.js",type:"commonjs",types:"pino.d.ts",browser:"./browser.js",files:["pino.js","file.js","pino.d.ts","bin.js","browser.js","pretty.js","usage.txt","test","docs","example.js","lib"],scripts:{docs:"docsify serve","browser-test":"airtap --local 8080 test/browser*test.js",lint:"eslint .",test:"npm run lint && npm run transpile && tap --ts && jest test/jest && npm run test-types","test-ci":"npm run lint && npm run transpile && tap --ts --no-check-coverage --coverage-report=lcovonly && npm run test-types","test-ci-pnpm":"pnpm run lint && npm run transpile && tap --ts --no-coverage --no-check-coverage && pnpm run test-types","test-ci-yarn-pnp":"yarn run lint && npm run transpile && tap --ts --no-check-coverage --coverage-report=lcovonly","test-types":"tsc && tsd && ts-node test/types/pino.ts",transpile:"node ./test/fixtures/ts/transpile.cjs","cov-ui":"tap --ts --coverage-report=html",bench:"node benchmarks/utils/runbench all","bench-basic":"node benchmarks/utils/runbench basic","bench-object":"node benchmarks/utils/runbench object","bench-deep-object":"node benchmarks/utils/runbench deep-object","bench-multi-arg":"node benchmarks/utils/runbench multi-arg","bench-longs-tring":"node benchmarks/utils/runbench long-string","bench-child":"node benchmarks/utils/runbench child","bench-child-child":"node benchmarks/utils/runbench child-child","bench-child-creation":"node benchmarks/utils/runbench child-creation","bench-formatters":"node benchmarks/utils/runbench formatters","update-bench-doc":"node benchmarks/utils/generate-benchmark-doc > docs/benchmarks.md"},bin:{pino:"./bin.js"},precommit:"test",repository:{type:"git",url:"git+https://github.com/pinojs/pino.git"},keywords:["fast","logger","stream","json"],author:"Matteo Collina <hello@matteocollina.com>",contributors:["David Mark Clements <huperekchuno@googlemail.com>","James Sumners <james.sumners@gmail.com>","Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)"],license:"MIT",bugs:{url:"https://github.com/pinojs/pino/issues"},homepage:"http://getpino.io",devDependencies:{"@types/flush-write-stream":"^1.0.0","@types/node":"^17.0.0","@types/tap":"^15.0.6",airtap:"4.0.4",benchmark:"^2.1.4",bole:"^4.0.0",bunyan:"^1.8.14","docsify-cli":"^4.4.1",eslint:"^7.17.0","eslint-config-standard":"^16.0.3","eslint-plugin-import":"^2.22.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0",execa:"^5.0.0",fastbench:"^1.0.1","flush-write-stream":"^2.0.0","import-fresh":"^3.2.1",jest:"^27.3.1",log:"^6.0.0",loglevel:"^1.6.7","pino-pretty":"^v7.6.0","pre-commit":"^1.2.2",proxyquire:"^2.1.3",pump:"^3.0.0",rimraf:"^3.0.2",semver:"^7.0.0",split2:"^4.0.0",steed:"^1.1.3","strip-ansi":"^6.0.0",tap:"^16.0.0",tape:"^5.0.0",through2:"^4.0.0","ts-node":"^10.7.0",tsd:"^0.20.0",typescript:"^4.4.4",winston:"^3.3.3"},dependencies:{"atomic-sleep":"^1.0.0","fast-redact":"^3.0.0","on-exit-leak-free":"^0.2.0","pino-abstract-transport":"v0.5.0","pino-std-serializers":"^4.0.0","process-warning":"^1.0.0","quick-format-unescaped":"^4.0.3","real-require":"^0.1.0","safe-stable-stringify":"^2.1.0","sonic-boom":"^2.2.1","thread-stream":"^0.15.1"},tsd:{directory:"test/types"}}});var zt=O((af,ji)=>{"use strict";var{version:ml}=Li();ji.exports={version:ml}});var Ni=O((cf,zi)=>{"use strict";var{EventEmitter:bl}=C("events"),{lsCacheSym:wl,levelValSym:Sl,setLevelSym:Ft,getLevelSym:qi,chindingsSym:Wt,parsedChindingsSym:vl,mixinSym:El,asJsonSym:Bi,writeSym:Ol,mixinMergeStrategySym:xl,timeSym:_l,timeSliceIndexSym:kl,streamSym:$i,serializersSym:ce,formattersSym:Nt,useOnlyCustomLevelsSym:Rl,needsMetadataGsym:Al,redactFmtSym:Tl,stringifySym:Ll,formatOptsSym:jl,stringifiersSym:ql}=de(),{getLevel:Ml,setLevel:Cl,isLevelEnabled:Pl,mappings:Bl,initialLsCache:$l,genLsCache:Il,assertNoLevelCollisions:Dl}=ze(),{asChindings:Ii,asJson:zl,buildFormatters:Mi,stringify:Ci}=De(),{version:Nl}=zt(),Fl=gt(),Wl=class{},Di={constructor:Wl,child:Kl,bindings:Ul,setBindings:Vl,flush:Xl,isLevelEnabled:Pl,version:Nl,get level(){return this[qi]()},set level(e){this[Ft](e)},get levelVal(){return this[Sl]},set levelVal(e){throw Error("levelVal is read-only")},[wl]:$l,[Ol]:Jl,[Bi]:zl,[qi]:Ml,[Ft]:Cl};Object.setPrototypeOf(Di,bl.prototype);zi.exports=function(){return Object.create(Di)};var Pi=e=>e;function Kl(e,t){if(!e)throw Error("missing bindings for child Pino");t=t||{};let r=this[ce],n=this[Nt],i=Object.create(this);if(t.hasOwnProperty("serializers")===!0){i[ce]=Object.create(null);for(let l in r)i[ce][l]=r[l];let o=Object.getOwnPropertySymbols(r);for(var s=0;s<o.length;s++){let l=o[s];i[ce][l]=r[l]}for(let l in t.serializers)i[ce][l]=t.serializers[l];let c=Object.getOwnPropertySymbols(t.serializers);for(var a=0;a<c.length;a++){let l=c[a];i[ce][l]=t.serializers[l]}}else i[ce]=r;if(t.hasOwnProperty("formatters")){let{level:o,bindings:c,log:l}=t.formatters;i[Nt]=Mi(o||n.level,c||Pi,l||n.log)}else i[Nt]=Mi(n.level,Pi,n.log);if(t.hasOwnProperty("customLevels")===!0&&(Dl(this.levels,t.customLevels),i.levels=Bl(t.customLevels,i[Rl]),Il(i)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){i.redact=t.redact;let o=Fl(i.redact,Ci),c={stringify:o[Tl]};i[Ll]=Ci,i[ql]=o,i[jl]=c}i[Wt]=Ii(i,e);let f=t.level||this.level;return i[Ft](f),i}function Ul(){let t=`{${this[Wt].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function Vl(e){let t=Ii(this,e);this[Wt]=t,delete this[vl]}function Hl(e,t){return Object.assign(t,e)}function Jl(e,t,r){let n=this[_l](),i=this[El],s=this[xl]||Hl,a;e==null?a={}:e instanceof Error?(a={err:e},t===void 0&&(t=e.message)):(a=e,t===void 0&&e.err&&(t=e.err.message)),i&&(a=s(a,i(a,r)));let f=this[Bi](a,t,r,n),o=this[$i];o[Al]===!0&&(o.lastLevel=r,o.lastObj=a,o.lastMsg=t,o.lastTime=n.slice(this[kl]),o.lastLogger=this),o.write(f)}function Gl(){}function Xl(){let e=this[$i];"flush"in e&&e.flush(Gl)}});var Ui=O((Ht,Ki)=>{"use strict";var{hasOwnProperty:ve}=Object.prototype,fe=Vt();fe.configure=Vt;fe.stringify=fe;fe.default=fe;Ht.stringify=fe;Ht.configure=Vt;Ki.exports=fe;var Yl=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function ie(e){return e.length<5e3&&!Yl.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 Ql=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Ut(e){return Ql.call(e)!==void 0&&e.length!==0}function Fi(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 Zl(e){if(ve.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 ec(e){let t;if(ve.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 tc(e,t){let r;if(ve.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 Wi(e,t){let r;if(ve.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 ue(e){return e===1?"1 item":`${e} items`}function rc(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function nc(e){if(ve.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=q({},e);let t=nc(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Zl(e),n=tc(e,"bigint"),i=ec(e),s=typeof i=="function"?i:void 0,a=Wi(e,"maximumDepth"),f=Wi(e,"maximumBreadth");function o(d,u,g,S,w,v){let b=u[d];switch(typeof b=="object"&&b!==null&&typeof b.toJSON=="function"&&(b=b.toJSON(d)),b=S.call(u,d,b),typeof b){case"string":return ie(b);case"object":{if(b===null)return"null";if(g.indexOf(b)!==-1)return r;let x="",E=",",k=v;if(Array.isArray(b)){if(b.length===0)return"[]";if(a<g.length+1)return'"[Array]"';g.push(b),w!==""&&(v+=w,x+=`
81
+ ${v}`,E=`,
82
+ ${v}`);let T=Math.min(b.length,f),B=0;for(;B<T-1;B++){let H=o(String(B),b,g,S,w,v);x+=H!==void 0?H:"null",x+=E}let P=o(String(B),b,g,S,w,v);if(x+=P!==void 0?P:"null",b.length-1>f){let H=b.length-f-1;x+=`${E}"... ${ue(H)} not stringified"`}return w!==""&&(x+=`
83
+ ${k}`),g.pop(),`[${x}]`}let A=Object.keys(b),R=A.length;if(R===0)return"{}";if(a<g.length+1)return'"[Object]"';let _="",L="";w!==""&&(v+=w,E=`,
84
+ ${v}`,_=" ");let M=Math.min(R,f);i&&!Ut(b)&&(A=Kt(A,s)),g.push(b);for(let T=0;T<M;T++){let B=A[T],P=o(B,b,g,S,w,v);P!==void 0&&(x+=`${L}${ie(B)}:${_}${P}`,L=E)}if(R>f){let T=R-f;x+=`${L}"...":${_}"${ue(T)} not stringified"`,L=E}return w!==""&&L.length>1&&(x=`
85
85
  ${v}${x}
86
- ${T}`),g.pop(),`{${x}}`}case"number":return isFinite(b)?String(b):t?t(b):"null";case"boolean":return b===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(b);default:return t?t(b):void 0}}function c(d,u,g,S,w,v){switch(typeof u=="object"&&u!==null&&typeof u.toJSON=="function"&&(u=u.toJSON(d)),typeof u){case"string":return re(u);case"object":{if(u===null)return"null";if(g.indexOf(u)!==-1)return r;let b=v,x="",O=",";if(Array.isArray(u)){if(u.length===0)return"[]";if(l<g.length+1)return'"[Array]"';g.push(u),w!==""&&(v+=w,x+=`
87
- ${v}`,O=`,
88
- ${v}`);let A=Math.min(u.length,f),_=0;for(;_<A-1;_++){let $=c(String(_),u[_],g,S,w,v);x+=$!==void 0?$:"null",x+=O}let R=c(String(_),u[_],g,S,w,v);if(x+=R!==void 0?R:"null",u.length-1>f){let $=u.length-f-1;x+=`${O}"... ${le($)} not stringified"`}return w!==""&&(x+=`
89
- ${b}`),g.pop(),`[${x}]`}g.push(u);let T="";w!==""&&(v+=w,O=`,
90
- ${v}`,T=" ");let k="";for(let A of S){let _=c(A,u[A],g,S,w,v);_!==void 0&&(x+=`${k}${re(A)}:${T}${_}`,k=O)}return w!==""&&k.length>1&&(x=`
86
+ ${k}`),g.pop(),`{${x}}`}case"number":return isFinite(b)?String(b):t?t(b):"null";case"boolean":return b===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(b);default:return t?t(b):void 0}}function c(d,u,g,S,w,v){switch(typeof u=="object"&&u!==null&&typeof u.toJSON=="function"&&(u=u.toJSON(d)),typeof u){case"string":return ie(u);case"object":{if(u===null)return"null";if(g.indexOf(u)!==-1)return r;let b=v,x="",E=",";if(Array.isArray(u)){if(u.length===0)return"[]";if(a<g.length+1)return'"[Array]"';g.push(u),w!==""&&(v+=w,x+=`
87
+ ${v}`,E=`,
88
+ ${v}`);let R=Math.min(u.length,f),_=0;for(;_<R-1;_++){let M=c(String(_),u[_],g,S,w,v);x+=M!==void 0?M:"null",x+=E}let L=c(String(_),u[_],g,S,w,v);if(x+=L!==void 0?L:"null",u.length-1>f){let M=u.length-f-1;x+=`${E}"... ${ue(M)} not stringified"`}return w!==""&&(x+=`
89
+ ${b}`),g.pop(),`[${x}]`}g.push(u);let k="";w!==""&&(v+=w,E=`,
90
+ ${v}`,k=" ");let A="";for(let R of S){let _=c(R,u[R],g,S,w,v);_!==void 0&&(x+=`${A}${ie(R)}:${k}${_}`,A=E)}return w!==""&&A.length>1&&(x=`
91
91
  ${v}${x}
92
- ${b}`),g.pop(),`{${x}}`}case"number":return isFinite(u)?String(u):t?t(u):"null";case"boolean":return u===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(u);default:return t?t(u):void 0}}function a(d,u,g,S,w){switch(typeof u){case"string":return re(u);case"object":{if(u===null)return"null";if(typeof u.toJSON=="function"){if(u=u.toJSON(d),typeof u!="object")return a(d,u,g,S,w);if(u===null)return"null"}if(g.indexOf(u)!==-1)return r;let v=w;if(Array.isArray(u)){if(u.length===0)return"[]";if(l<g.length+1)return'"[Array]"';g.push(u),w+=S;let _=`
93
- ${w}`,R=`,
94
- ${w}`,$=Math.min(u.length,f),j=0;for(;j<$-1;j++){let M=a(String(j),u[j],g,S,w);_+=M!==void 0?M:"null",_+=R}let C=a(String(j),u[j],g,S,w);if(_+=C!==void 0?C:"null",u.length-1>f){let M=u.length-f-1;_+=`${R}"... ${le(M)} not stringified"`}return _+=`
95
- ${v}`,g.pop(),`[${_}]`}let b=Object.keys(u),x=b.length;if(x===0)return"{}";if(l<g.length+1)return'"[Object]"';w+=S;let O=`,
96
- ${w}`,T="",k="",A=Math.min(x,f);zt(u)&&(T+=Mi(u,O,f),b=b.slice(u.length),A-=u.length,k=O),n&&(b=Dt(b,s)),g.push(u);for(let _=0;_<A;_++){let R=b[_],$=a(R,u[R],g,S,w);$!==void 0&&(T+=`${k}${re(R)}: ${$}`,k=O)}if(x>f){let _=x-f;T+=`${k}"...": "${le(_)} not stringified"`,k=O}return k!==""&&(T=`
97
- ${w}${T}
98
- ${v}`),g.pop(),`{${T}}`}case"number":return isFinite(u)?String(u):t?t(u):"null";case"boolean":return u===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(u);default:return t?t(u):void 0}}function h(d,u,g){switch(typeof u){case"string":return re(u);case"object":{if(u===null)return"null";if(typeof u.toJSON=="function"){if(u=u.toJSON(d),typeof u!="object")return h(d,u,g);if(u===null)return"null"}if(g.indexOf(u)!==-1)return r;let S="",w=u.length!==void 0;if(w&&Array.isArray(u)){if(u.length===0)return"[]";if(l<g.length+1)return'"[Array]"';g.push(u);let T=Math.min(u.length,f),k=0;for(;k<T-1;k++){let _=h(String(k),u[k],g);S+=_!==void 0?_:"null",S+=","}let A=h(String(k),u[k],g);if(S+=A!==void 0?A:"null",u.length-1>f){let _=u.length-f-1;S+=`,"... ${le(_)} not stringified"`}return g.pop(),`[${S}]`}let v=Object.keys(u),b=v.length;if(b===0)return"{}";if(l<g.length+1)return'"[Object]"';let x="",O=Math.min(b,f);w&&zt(u)&&(S+=Mi(u,",",f),v=v.slice(u.length),O-=u.length,x=","),n&&(v=Dt(v,s)),g.push(u);for(let T=0;T<O;T++){let k=v[T],A=h(k,u[k],g);A!==void 0&&(S+=`${x}${re(k)}:${A}`,x=",")}if(b>f){let T=b-f;S+=`${x}"...":"${le(T)} not stringified"`}return g.pop(),`{${S}}`}case"number":return isFinite(u)?String(u):t?t(u):"null";case"boolean":return u===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(u);default:return t?t(u):void 0}}function y(d,u,g){if(arguments.length>1){let S="";if(typeof g=="number"?S=" ".repeat(Math.min(g,10)):typeof g=="string"&&(S=g.slice(0,10)),u!=null){if(typeof u=="function")return o("",{"":d},[],u,S,"");if(Array.isArray(u))return c("",d,[],Va(u),S,"")}if(S.length!==0)return a("",d,[],S,"")}return h("",d,[])}return y}});var Fi=E((Yu,Ni)=>{"use strict";var Wt=Symbol.for("pino.metadata"),{levels:Di}=Ie(),zi=Object.create(Di);zi.silent=1/0;var Ja=Di.info;function Ga(e,t){let r=0;e=e||[],t=t||{dedupe:!1};let i=zi;t.levels&&typeof t.levels=="object"&&(i=t.levels);let n={write:s,add:f,flushSync:l,end:o,minLevel:0,streams:[],clone:c,[Wt]:!0};return Array.isArray(e)?e.forEach(f,n):f.call(n,e),e=null,n;function s(a){let h,y=this.lastLevel,{streams:d}=this,u;for(let g=0;g<d.length&&(h=d[g],h.level<=y);g++){if(u=h.stream,u[Wt]){let{lastTime:S,lastMsg:w,lastObj:v,lastLogger:b}=this;u.lastLevel=y,u.lastTime=S,u.lastMsg=w,u.lastObj=v,u.lastLogger=b}(!t.dedupe||h.level===y)&&u.write(a)}}function l(){for(let{stream:a}of this.streams)typeof a.flushSync=="function"&&a.flushSync()}function f(a){if(!a)return n;let h=typeof a.write=="function"||a.stream,y=a.write?a:a.stream;if(!h)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:d}=this,u;typeof a.levelVal=="number"?u=a.levelVal:typeof a.level=="string"?u=i[a.level]:typeof a.level=="number"?u=a.level:u=Ja;let g={stream:y,level:u,levelVal:void 0,id:r++};return d.unshift(g),d.sort(Xa),this.minLevel=d[0].level,n}function o(){for(let{stream:a}of this.streams)typeof a.flushSync=="function"&&a.flushSync(),a.end()}function c(a){let h=new Array(this.streams.length);for(let y=0;y<h.length;y++)h[y]={level:a,stream:this.streams[y].stream};return{write:s,add:f,minLevel:a,streams:h,clone:c,flushSync:l,[Wt]:!0}}}function Xa(e,t){return e.level-t.level}Ni.exports=Ga});var ts=E((Qu,V)=>{"use strict";var Ya=B("os"),Xi=nt(),Qa=it(),Za=ft(),Yi=Mn(),ec=Bi(),Qi=ce(),{configure:tc}=Pi(),{assertDefaultLevelFound:rc,mappings:Zi,genLsCache:nc,levels:ic}=Ie(),{createArgsNormalizer:sc,asChindings:oc,final:lc,buildSafeSonicBoom:Wi,buildFormatters:ac,stringify:Pe,normalizeDestFileDescriptor:Ki,noop:cc}=Ce(),{version:uc}=Mt(),{chindingsSym:Ui,redactFmtSym:fc,serializersSym:Vi,timeSym:hc,timeSliceIndexSym:dc,streamSym:yc,stringifySym:Hi,stringifySafeSym:Kt,stringifiersSym:Ji,setLevelSym:pc,endSym:gc,formatOptsSym:mc,messageKeySym:bc,nestedKeySym:wc,mixinSym:Sc,useOnlyCustomLevelsSym:vc,formattersSym:Gi,hooksSym:Oc,nestedKeyStrSym:Ec,mixinMergeStrategySym:xc}=Qi,{epochTime:es,nullTime:_c}=Yi,{pid:Tc}=process,Ac=Ya.hostname(),kc=Xi.err,jc={level:"info",levels:ic,messageKey:"msg",nestedKey:null,enabled:!0,prettyPrint:!1,base:{pid:Tc,hostname:Ac},serializers:Object.assign(Object.create(null),{err:kc}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0},timestamp:es,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},Rc=sc(jc),Lc=Object.assign(Object.create(null),Xi);function Ut(...e){let t={},{opts:r,stream:i}=Rc(t,Qa(),...e),{redact:n,crlf:s,serializers:l,timestamp:f,messageKey:o,nestedKey:c,base:a,name:h,level:y,customLevels:d,mixin:u,mixinMergeStrategy:g,useOnlyCustomLevels:S,formatters:w,hooks:v,depthLimit:b,edgeLimit:x}=r,O=tc({maximumDepth:b,maximumBreadth:x}),T=ac(w.level,w.bindings,w.log),k=n?Za(n,Pe):{},A=Pe.bind({[Kt]:O}),_=n?{stringify:k[fc]}:{stringify:A},R="}"+(s?`\r
92
+ ${b}`),g.pop(),`{${x}}`}case"number":return isFinite(u)?String(u):t?t(u):"null";case"boolean":return u===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(u);default:return t?t(u):void 0}}function l(d,u,g,S,w){switch(typeof u){case"string":return ie(u);case"object":{if(u===null)return"null";if(typeof u.toJSON=="function"){if(u=u.toJSON(d),typeof u!="object")return l(d,u,g,S,w);if(u===null)return"null"}if(g.indexOf(u)!==-1)return r;let v=w;if(Array.isArray(u)){if(u.length===0)return"[]";if(a<g.length+1)return'"[Array]"';g.push(u),w+=S;let _=`
93
+ ${w}`,L=`,
94
+ ${w}`,M=Math.min(u.length,f),T=0;for(;T<M-1;T++){let P=l(String(T),u[T],g,S,w);_+=P!==void 0?P:"null",_+=L}let B=l(String(T),u[T],g,S,w);if(_+=B!==void 0?B:"null",u.length-1>f){let P=u.length-f-1;_+=`${L}"... ${ue(P)} not stringified"`}return _+=`
95
+ ${v}`,g.pop(),`[${_}]`}let b=Object.keys(u),x=b.length;if(x===0)return"{}";if(a<g.length+1)return'"[Object]"';w+=S;let E=`,
96
+ ${w}`,k="",A="",R=Math.min(x,f);Ut(u)&&(k+=Fi(u,E,f),b=b.slice(u.length),R-=u.length,A=E),i&&(b=Kt(b,s)),g.push(u);for(let _=0;_<R;_++){let L=b[_],M=l(L,u[L],g,S,w);M!==void 0&&(k+=`${A}${ie(L)}: ${M}`,A=E)}if(x>f){let _=x-f;k+=`${A}"...": "${ue(_)} not stringified"`,A=E}return A!==""&&(k=`
97
+ ${w}${k}
98
+ ${v}`),g.pop(),`{${k}}`}case"number":return isFinite(u)?String(u):t?t(u):"null";case"boolean":return u===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(u);default:return t?t(u):void 0}}function h(d,u,g){switch(typeof u){case"string":return ie(u);case"object":{if(u===null)return"null";if(typeof u.toJSON=="function"){if(u=u.toJSON(d),typeof u!="object")return h(d,u,g);if(u===null)return"null"}if(g.indexOf(u)!==-1)return r;let S="",w=u.length!==void 0;if(w&&Array.isArray(u)){if(u.length===0)return"[]";if(a<g.length+1)return'"[Array]"';g.push(u);let k=Math.min(u.length,f),A=0;for(;A<k-1;A++){let _=h(String(A),u[A],g);S+=_!==void 0?_:"null",S+=","}let R=h(String(A),u[A],g);if(S+=R!==void 0?R:"null",u.length-1>f){let _=u.length-f-1;S+=`,"... ${ue(_)} not stringified"`}return g.pop(),`[${S}]`}let v=Object.keys(u),b=v.length;if(b===0)return"{}";if(a<g.length+1)return'"[Object]"';let x="",E=Math.min(b,f);w&&Ut(u)&&(S+=Fi(u,",",f),v=v.slice(u.length),E-=u.length,x=","),i&&(v=Kt(v,s)),g.push(u);for(let k=0;k<E;k++){let A=v[k],R=h(A,u[A],g);R!==void 0&&(S+=`${x}${ie(A)}:${R}`,x=",")}if(b>f){let k=b-f;S+=`${x}"...":"${ue(k)} not stringified"`}return g.pop(),`{${S}}`}case"number":return isFinite(u)?String(u):t?t(u):"null";case"boolean":return u===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(u);default:return t?t(u):void 0}}function p(d,u,g){if(arguments.length>1){let S="";if(typeof g=="number"?S=" ".repeat(Math.min(g,10)):typeof g=="string"&&(S=g.slice(0,10)),u!=null){if(typeof u=="function")return o("",{"":d},[],u,S,"");if(Array.isArray(u))return c("",d,[],rc(u),S,"")}if(S.length!==0)return l("",d,[],S,"")}return h("",d,[])}return p}});var Gi=O((ff,Ji)=>{"use strict";var Jt=Symbol.for("pino.metadata"),{levels:Vi}=ze(),Hi=Object.create(Vi);Hi.silent=1/0;var ic=Vi.info;function sc(e,t){let r=0;e=e||[],t=t||{dedupe:!1};let n=Hi;t.levels&&typeof t.levels=="object"&&(n=t.levels);let i={write:s,add:f,flushSync:a,end:o,minLevel:0,streams:[],clone:c,[Jt]:!0};return Array.isArray(e)?e.forEach(f,i):f.call(i,e),e=null,i;function s(l){let h,p=this.lastLevel,{streams:d}=this,u;for(let g=0;g<d.length&&(h=d[g],h.level<=p);g++){if(u=h.stream,u[Jt]){let{lastTime:S,lastMsg:w,lastObj:v,lastLogger:b}=this;u.lastLevel=p,u.lastTime=S,u.lastMsg=w,u.lastObj=v,u.lastLogger=b}(!t.dedupe||h.level===p)&&u.write(l)}}function a(){for(let{stream:l}of this.streams)typeof l.flushSync=="function"&&l.flushSync()}function f(l){if(!l)return i;let h=typeof l.write=="function"||l.stream,p=l.write?l:l.stream;if(!h)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:d}=this,u;typeof l.levelVal=="number"?u=l.levelVal:typeof l.level=="string"?u=n[l.level]:typeof l.level=="number"?u=l.level:u=ic;let g={stream:p,level:u,levelVal:void 0,id:r++};return d.unshift(g),d.sort(oc),this.minLevel=d[0].level,i}function o(){for(let{stream:l}of this.streams)typeof l.flushSync=="function"&&l.flushSync(),l.end()}function c(l){let h=new Array(this.streams.length);for(let p=0;p<h.length;p++)h[p]={level:l,stream:this.streams[p].stream};return{write:s,add:f,minLevel:l,streams:h,clone:c,flushSync:a,[Jt]:!0}}}function oc(e,t){return e.level-t.level}Ji.exports=sc});var ls=O((hf,V)=>{"use strict";var ac=C("os"),ns=lt(),lc=ct(),cc=gt(),is=Fn(),uc=Ni(),ss=de(),{configure:fc}=Ui(),{assertDefaultLevelFound:hc,mappings:os,genLsCache:dc,levels:pc}=ze(),{createArgsNormalizer:yc,asChindings:gc,final:mc,buildSafeSonicBoom:Xi,buildFormatters:bc,stringify:Ne,normalizeDestFileDescriptor:Yi,noop:wc}=De(),{version:Sc}=zt(),{chindingsSym:Qi,redactFmtSym:vc,serializersSym:Zi,timeSym:Ec,timeSliceIndexSym:Oc,streamSym:xc,stringifySym:es,stringifySafeSym:Gt,stringifiersSym:ts,setLevelSym:_c,endSym:kc,formatOptsSym:Rc,messageKeySym:Ac,nestedKeySym:Tc,mixinSym:Lc,useOnlyCustomLevelsSym:jc,formattersSym:rs,hooksSym:qc,nestedKeyStrSym:Mc,mixinMergeStrategySym:Cc}=ss,{epochTime:as,nullTime:Pc}=is,{pid:Bc}=process,$c=ac.hostname(),Ic=ns.err,Dc={level:"info",levels:pc,messageKey:"msg",nestedKey:null,enabled:!0,prettyPrint:!1,base:{pid:Bc,hostname:$c},serializers:Object.assign(Object.create(null),{err:Ic}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0},timestamp:as,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},zc=yc(Dc),Nc=Object.assign(Object.create(null),ns);function Xt(...e){let t={},{opts:r,stream:n}=zc(t,lc(),...e),{redact:i,crlf:s,serializers:a,timestamp:f,messageKey:o,nestedKey:c,base:l,name:h,level:p,customLevels:d,mixin:u,mixinMergeStrategy:g,useOnlyCustomLevels:S,formatters:w,hooks:v,depthLimit:b,edgeLimit:x}=r,E=fc({maximumDepth:b,maximumBreadth:x}),k=bc(w.level,w.bindings,w.log),A=i?cc(i,Ne):{},R=Ne.bind({[Gt]:E}),_=i?{stringify:A[vc]}:{stringify:R},L="}"+(s?`\r
99
99
  `:`
100
- `),$=oc.bind(null,{[Ui]:"",[Vi]:l,[Ji]:k,[Hi]:Pe,[Kt]:O,[Gi]:T}),j="";a!==null&&(h===void 0?j=$(a):j=$(Object.assign({},a,{name:h})));let C=f instanceof Function?f:f?es:_c,M=C().indexOf(":")+1;if(S&&!d)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(u&&typeof u!="function")throw Error(`Unknown mixin type "${typeof u}" - expected "function"`);rc(y,d,S);let H=Zi(d,S);return Object.assign(t,{levels:H,[vc]:S,[yc]:i,[hc]:C,[dc]:M,[Hi]:Pe,[Kt]:O,[Ji]:k,[gc]:R,[mc]:_,[bc]:o,[wc]:c,[Ec]:c?`,${JSON.stringify(c)}:{`:"",[Vi]:l,[Sc]:u,[xc]:g,[Ui]:j,[Gi]:T,[Oc]:v,silent:cc}),Object.setPrototypeOf(t,ec()),nc(t),t[pc](y),t}V.exports=Ut;V.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=Ki(e.dest||process.stdout.fd),Wi(e)):Wi({dest:Ki(e),minLength:0,sync:!0});V.exports.transport=xt();V.exports.multistream=Fi();V.exports.final=lc;V.exports.levels=Zi();V.exports.stdSerializers=Lc;V.exports.stdTimeFunctions=Object.assign({},Yi);V.exports.symbols=Qi;V.exports.version=uc;V.exports.default=Ut;V.exports.pino=Ut});var ns=Ne(Wr()),is=Ne(Xr()),ss=Ne(ts());import qc from"fs";import*as L from"@whiskeysockets/baileys";import be from"chalk";import{EventEmitter as $c}from"events";import Bc from"figlet";import Mc from"ora";var rs=class extends $c{constructor(){super();this.isRunning=!1;this.setMaxListeners(20),this.start()}start(){return J(this,null,function*(){if(yield this.showBanner(),!this.isRunning){this.isRunning=!0;try{yield this.setupClient()}catch(r){this.stopLoading("Error initializing client","fail"),this.startLoading("Connecting to WhatsApp..."),this.isRunning=!1,setTimeout(()=>this.start(),3e3);return}this.setupProcessHandlers()}})}restart(){return J(this,null,function*(){this.stopLoading("Restarting connection...","info"),this.isRunning=!1,yield this.start()})}handleConnection(r){var f;let{receivedPendingNotifications:i,lastDisconnect:n,connection:s,qr:l}=r;if(i&&this.conn.ev.flush(),s==="close"){let o=(f=new ns.default.Boom(n==null?void 0:n.error))==null?void 0:f.output.statusCode;({[L.DisconnectReason.badSession]:this.restart.bind(this),[L.DisconnectReason.connectionClosed]:this.restart.bind(this),[L.DisconnectReason.connectionLost]:this.restart.bind(this),[L.DisconnectReason.connectionReplaced]:()=>{console.log("Connection Replaced, New Session Opened, Please Close Current Session First"),this.restart()},[L.DisconnectReason.loggedOut]:()=>{console.log("Device Logged Out, Please Connect Again"),this.restart()},[L.DisconnectReason.restartRequired]:this.restart.bind(this),[L.DisconnectReason.multideviceMismatch]:()=>{console.log("Multi-device Mismatch, Please Connect Again"),this.restart()}}[o]||(()=>{this.restart()}))()}s==="open"&&this.stopLoading("Connected to WhatsApp","succeed")}showBanner(){return J(this,null,function*(){console.clear(),console.log(be.yellowBright.bold.italic(`
101
- ============================
102
- `)),console.log(yield new Promise(r=>Bc("Zaileys",(i,n)=>r(be.yellowBright.italic(n))))),console.log(be.yellowBright.bold.italic(`
103
- ============================
104
- `)),this.startLoading("Checking server connection...")})}setupClient(){return J(this,null,function*(){let{state:r,saveCreds:i}=yield L.useMultiFileAuthState("./.zaileys/zaileys-auth");this.logger=(0,ss.default)().child({class:"zaileys"}),this.logger.level="fatal",this.store=L.makeInMemoryStore({logger:this.logger}),this.store.readFromFile("./.zaileys/zaileys-store.json"),this.conn=L.default({logger:this.logger,printQRInTerminal:!1,auth:{creds:r.creds,keys:L.makeCacheableSignalKeyStore(r.keys,this.logger)},browser:L.Browsers.ubuntu("Safari"),markOnlineOnConnect:!0,getMessage:n=>J(this,null,function*(){var l;let s=L.jidNormalizedUser(n.remoteJid);return((l=yield this.store.loadMessage(s,n.id))==null?void 0:l.message)||""}),msgRetryCounterCache:new is.default,defaultQueryTimeoutMs:0,connectTimeoutMs:6e4,generateHighQualityLinkPreview:!0,syncFullHistory:!1}),this.store.bind(this.conn.ev),qc.existsSync("./.zaileys/zaileys-auth/creds.json")&&!this.conn.authState.creds.registered&&(this.stopLoading("Session is broken, please delete .zaileys folder & try again","fail"),process.exit(0)),yield this.setupPairingCode(),this.conn.ev.on("creds.update",i),this.conn.ev.on("connection.update",this.handleConnection.bind(this)),this.conn.ev.on("messages.upsert",this.handleMessages.bind(this)),this.conn.ev.on("contacts.update",this.handleContactsUpdate.bind(this)),this.conn.ev.on("contacts.upsert",this.handleContactsUpsert.bind(this)),this.conn.ev.on("groups.update",this.handleGroupsUpdate.bind(this)),setInterval(()=>this.store.writeToFile("./.zaileys/zaileys-store.json"),1e4)})}setupPairingCode(){return J(this,null,function*(){if(!this.conn.authState.creds.registered){let r="62858788977802",i=r.replace(/[^0-9]/g,"");Object.keys(L.PHONENUMBER_MCC).some(n=>i.startsWith(n))||(this.stopLoading("Warning: Please enter valid phone number","fail"),process.exit(0)),this.stopLoading("Connection ready to run"),this.startLoading("Waiting for requests pairing code..."),setTimeout(()=>J(this,null,function*(){var s;i=r.replace(/[^0-9]/g,"");let n=yield this.conn.requestPairingCode(i);n=((s=n==null?void 0:n.match(/.{1,4}/g))==null?void 0:s.join("-"))||n,this.stopLoading("Your Pairing Code : "+be.black(be.bgYellowBright.bold(` ${n} `)),"info")}),3e3)}})}setupProcessHandlers(){process.setMaxListeners(20),process.on("message",i=>J(this,null,function*(){var n;console.log("[ RECEIVED ] ",i),i==="reset"?yield this.restart():i==="uptime"&&((n=process.send)==null||n.call(process,process.uptime()))}));let r=i=>J(this,null,function*(){this.isRunning=!1,this.stopLoading(`Exited with code: ${i}`,"fail"),i!==0&&(yield this.start())});process.once("exit",r),["SIGINT","SIGTERM","SIGUSR2"].forEach(i=>{process.once(i,()=>{process.exit(1)})})}startLoading(r){this.spinner||(this.spinner=Mc({text:r,color:"cyan"}).start())}stopLoading(r,i="succeed"){this.spinner&&(this.spinner[i](r||"Operation failed"),this.spinner=null)}handleMessages(r){console.log("Got message"),this.emit("message",r)}handleContactsUpdate(r){for(let i of r){let n=L.jidNormalizedUser(i.id);this.store&&this.store.contacts&&(this.store.contacts[n]={id:n,name:i.notify})}}handleContactsUpsert(r){for(let i of r){let n=L.jidNormalizedUser(i.id);this.store&&this.store.contacts&&this.store.contacts[n]!=null&&Q(D(D({},this.store.contacts[n]||{}),i),{isContact:!0})}}handleGroupsUpdate(r){for(let i of r){let n=i.id;this.store.groupMetadata[n]&&(this.store.groupMetadata[n]=D(D({},this.store.groupMetadata[n]||{}),i))}}sendMessage(s,l){return J(this,arguments,function*(r,i,n={}){return this.conn.sendMessage(r,i,n)})}on(r,i){return super.on(r,i),this}};export{rs as Client};
100
+ `),M=gc.bind(null,{[Qi]:"",[Zi]:a,[ts]:A,[es]:Ne,[Gt]:E,[rs]:k}),T="";l!==null&&(h===void 0?T=M(l):T=M(Object.assign({},l,{name:h})));let B=f instanceof Function?f:f?as:Pc,P=B().indexOf(":")+1;if(S&&!d)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(u&&typeof u!="function")throw Error(`Unknown mixin type "${typeof u}" - expected "function"`);hc(p,d,S);let H=os(d,S);return Object.assign(t,{levels:H,[jc]:S,[xc]:n,[Ec]:B,[Oc]:P,[es]:Ne,[Gt]:E,[ts]:A,[kc]:L,[Rc]:_,[Ac]:o,[Tc]:c,[Mc]:c?`,${JSON.stringify(c)}:{`:"",[Zi]:a,[Lc]:u,[Cc]:g,[Qi]:T,[rs]:k,[qc]:v,silent:wc}),Object.setPrototypeOf(t,uc()),dc(t),t[_c](p),t}V.exports=Xt;V.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=Yi(e.dest||process.stdout.fd),Xi(e)):Xi({dest:Yi(e),minLength:0,sync:!0});V.exports.transport=Tt();V.exports.multistream=Gi();V.exports.final=mc;V.exports.levels=os();V.exports.stdSerializers=Nc;V.exports.stdTimeFunctions=Object.assign({},is);V.exports.symbols=ss;V.exports.version=Sc;V.exports.default=Xt;V.exports.pino=Xt});var Xr=Ve(Jr());import*as X from"@whiskeysockets/baileys";import{EventEmitter as $s}from"events";var Gr=class extends $s{connection(t){var a;let{receivedPendingNotifications:r,lastDisconnect:n,connection:i,qr:s}=t;if(this.method=="qr"&&s&&(console.log(),this.stopLoading("Scan this QR Code with your WhatsApp","info")),r&&this.client.ev.flush(),i==="close"){let f=(a=new Xr.default.Boom(n==null?void 0:n.error))==null?void 0:a.output.statusCode;({[X.DisconnectReason.badSession]:this.restart.bind(this),[X.DisconnectReason.connectionClosed]:this.restart.bind(this),[X.DisconnectReason.connectionLost]:this.restart.bind(this),[X.DisconnectReason.connectionReplaced]:()=>{console.log("Connection Replaced, New Session Opened, Please Close Current Session First"),this.restart()},[X.DisconnectReason.loggedOut]:()=>{console.log("Device Logged Out, Please Connect Again"),this.restart()},[X.DisconnectReason.restartRequired]:this.restart.bind(this),[X.DisconnectReason.multideviceMismatch]:()=>{console.log("Multi-device Mismatch, Please Connect Again"),this.restart()}}[f]||(()=>{this.restart()}))()}i==="open"&&this.stopLoading("Connected to WhatsApp","succeed")}messages(t){console.log("Halloo"),this.emit("message",t)}contactsUpdate(t){for(let r of t){let n=X.jidNormalizedUser(r.id);this.store&&this.store.contacts&&(this.store.contacts[n]={id:n,name:r.notify})}}contactsUpsert(t){for(let r of t){let n=X.jidNormalizedUser(r.id);this.store&&this.store.contacts&&this.store.contacts[n]!=null&&J(q(q({},this.store.contacts[n]||{}),r),{isContact:!0})}}groupsUpdate(t){for(let r of t){let n=r.id;this.store.groupMetadata[n]&&(this.store.groupMetadata[n]=q(q({},this.store.groupMetadata[n]||{}),r))}}};var We=Ve(nn()),ps=Ve(ls());import*as W from"@whiskeysockets/baileys";import Wc from"cfonts";import se from"chalk";import{EventEmitter as Kc}from"events";import fs from"fs/promises";import Uc from"ora";import hs from"path";import Fc from"chalk";var he=e=>new Promise(t=>setTimeout(t,e)),cs=(e="succeed")=>Fc[{succeed:"bgGreen",fail:"bgRed",warn:"bgYellow",info:"bgCyan"}[e]](" "),us=e=>{let t=e.map(r=>({ok:!0}));return e};import*as ee from"@whiskeysockets/baileys";var Fe=class{constructor(t){this.handleConnection=t=>{var s,a;let{lastDisconnect:r,connection:n,qr:i}=t;if(this.client.method==="qr"&&i&&this.client.stopLoading("Scan this QR Code with your WhatsApp","info"),n==="close"){let f=(a=(s=r==null?void 0:r.error)==null?void 0:s.output)==null?void 0:a.statusCode;this.getReconnectHandler(f)()}else n==="open"&&this.client.stopLoading("Connected to WhatsApp","succeed")};this.handleMessage=t=>{let r=us(t);this.client.emit("message",r)};this.client=t}setupEventListeners(t){let r=this.client.getClient();r.ev.on("creds.update",t),r.ev.on("connection.update",this.handleConnection),r.ev.on("messages.upsert",this.handleMessage),["contacts.update","contacts.upsert","groups.update"].forEach(n=>r.ev.on(n,this.createStoreUpdateHandler(n)))}createStoreUpdateHandler(t){return r=>{t.startsWith("contacts")?this.updateContacts(r):t==="groups.update"&&this.updateGroups(r)}}updateContacts(t){var r;for(let n of t){let i=ee.jidNormalizedUser(n.id);(r=this.client.store)!=null&&r.contacts&&(this.client.store.contacts[i]=J(q(q({},this.client.store.contacts[i]),n),{isContact:!0}))}}updateGroups(t){for(let r of t){let n=r.id;this.client.store.groupMetadata[n]&&(this.client.store.groupMetadata[n]=q(q({},this.client.store.groupMetadata[n]),r))}}getReconnectHandler(t){return{[ee.DisconnectReason.badSession]:this.client.restart.bind(this.client),[ee.DisconnectReason.connectionClosed]:this.client.restart.bind(this.client),[ee.DisconnectReason.connectionLost]:this.client.restart.bind(this.client),[ee.DisconnectReason.connectionReplaced]:()=>{console.log("Connection Replaced, New Session Opened, Please Close Current Session First"),this.client.restart()},[ee.DisconnectReason.loggedOut]:()=>{console.log("Device Logged Out, Please Connect Again"),this.client.restart()},[ee.DisconnectReason.restartRequired]:this.client.restart.bind(this.client),[ee.DisconnectReason.multideviceMismatch]:()=>{console.log("Multi-device Mismatch, Please Connect Again"),this.client.restart()}}[t]||this.client.restart.bind(this.client)}};var ds=class extends Kc{constructor(r){var n,i,s,a,f;super();this.spinner=null;this.isRunning=!1;this.handleExit=r=>{this.isRunning=!1,this.stopLoading(`Exited with code: ${r}`,"fail"),r!==0&&this.start().catch(this.handleError)};this.phoneNumber=r.phoneNumber,this.method=r.method,this.showLogs=(n=r.showLogs)!=null?n:!1,this.markOnline=(i=r.markOnline)!=null?i:!0,this.autoRead=(s=r.autoRead)!=null?s:!1,this.authors=(a=r.authors)!=null?a:[],this.ignoreMe=(f=r.ignoreMe)!=null?f:!1,this.setMaxListeners(20),this.logger=(0,ps.default)({enabled:!1,level:"silent"}),this.events=new Fe(this),this.start().catch(this.handleError)}start(){return Q(this,null,function*(){if(!this.isRunning){this.isRunning=!0;try{console.clear(),this.startLoading("Initializing client..."),yield he(1e3),yield this.showBanner(),yield he(1e3),this.updateSpinnerText("Setting up client..."),yield this.setupClient(),this.setupProcessHandlers()}catch(r){this.handleError(r)}}})}restart(){this.stopLoading("Restarting connection...","info"),this.isRunning=!1,this.start().catch(this.handleError)}showBanner(){return Q(this,null,function*(){console.clear(),Wc.say(" Zaileys ",{font:"slick",colors:["#ffce51","blue"],letterSpacing:.5}),console.log(" ".repeat(4),se.yellowBright.italic.bold(` Copyright \xA9 ${new Date().getFullYear()} by ${se.blue("zaadevofc")} `)),console.log(`
101
+ `+se.dim("^".repeat(42))+`
102
+ `)})}setupClient(){return Q(this,null,function*(){let{state:r,saveCreds:n}=yield W.useMultiFileAuthState("./.zaileys/zaileys-auth");this.store=W.makeInMemoryStore({logger:this.logger}),yield this.store.readFromFile("./.zaileys/zaileys-store.json"),this.client=W.default({logger:this.logger,markOnlineOnConnect:this.markOnline,printQRInTerminal:this.method==="qr",browser:W.Browsers.ubuntu("Safari"),auth:{creds:r.creds,keys:W.makeCacheableSignalKeyStore(r.keys,this.logger)},syncFullHistory:!1,generateHighQualityLinkPreview:!0,msgRetryCounterCache:new We.default,userDevicesCache:new We.default,placeholderResendCache:new We.default,qrTimeout:6e4,connectTimeoutMs:6e4,keepAliveIntervalMs:6e4,defaultQueryTimeoutMs:void 0,getMessage:i=>Q(this,null,function*(){var a;let s=W.jidNormalizedUser(i.remoteJid);return((a=yield this.store.loadMessage(s,i.id))==null?void 0:a.message)||""}),patchMessageBeforeSending:i=>!!(i.buttonsMessage||i.templateMessage||i.listMessage)?{viewOnceMessage:{message:q({messageContextInfo:{deviceListMetadataVersion:2,deviceListMetadata:{}}},i)}}:i}),this.store.bind(this.client.ev),yield this.checkAndRepairSession(),yield this.setupPairingCode(),this.events.setupEventListeners(n)})}checkAndRepairSession(){return Q(this,null,function*(){let r=hs.join("./.zaileys/zaileys-auth/creds.json");(yield fs.access(r).then(()=>!0).catch(()=>!1))&&!this.client.authState.creds.registered&&(yield this.stopLoading(se`{underline {red {bold Broken session!}}}\n System will delete {yellowBright .zaileys/zaileys-auth} automatically.\n`,"fail"),yield he(500),yield this.startLoading("Cleaning credentials automatically..."),yield he(500),yield this.deleteAuthFolder())})}deleteAuthFolder(){return Q(this,null,function*(){try{yield fs.rm(hs.join("./.zaileys/zaileys-auth"),{recursive:!0}),yield he(500),yield this.stopLoading(se`{underline {blueBright {bold Success Repair Session}}}\n Wait system automatically running...\n`,"info"),yield this.restart()}catch(r){yield this.stopLoading(se`{underline {red {bold Repair Error!}}}\n Failed to delete {yellowBright .zaileys/zaileys-auth} automatically. System will try again.\n`,"fail"),yield he(500),yield this.restart()}})}setupPairingCode(){return Q(this,null,function*(){if(!this.client.authState.creds.registered&&this.method==="pairing"){let r=this.phoneNumber.toString().replace(/[^0-9]/g,"");Object.keys(W.PHONENUMBER_MCC).some(n=>r.startsWith(n))||(this.stopLoading("Invalid phone number","fail"),process.exit(0)),setTimeout(()=>Q(this,null,function*(){var n,i;try{let s=yield this.client.requestPairingCode(r);s=(i=(n=s==null?void 0:s.match(/.{1,4}/g))==null?void 0:n.join("-"))!=null?i:"",this.stopLoading(se`{blueBright.bold.underline Login with Pairing}\n Generating code: {bgYellowBright.bold.black ${s} }\n {italic Code expired on ${new Date(Date.now()+160*1e3).toLocaleTimeString()}}`,"info")}catch(s){this.handleError(s)}}),1e3)}})}setupProcessHandlers(){process.setMaxListeners(20),process.on("message",r=>{var n;r==="reset"?this.restart():r==="uptime"&&((n=process.send)==null||n.call(process,process.uptime()))}),process.once("exit",this.handleExit),["SIGINT","SIGTERM","SIGUSR2"].forEach(r=>process.once(r,()=>process.exit(1)))}startLoading(r){this.spinner=Uc({text:se`${r}`,color:"yellow",spinner:"dots3"}).start()}updateSpinnerText(r){this.spinner&&(this.spinner.text=r)}stopLoading(r,n="succeed"){this.spinner&&(this.spinner.stopAndPersist({text:r,symbol:cs(n)}),this.spinner=null)}sendMessage(s,a){return Q(this,arguments,function*(r,n,i={}){return this.client.sendMessage(r,n,i)})}on(r,n){return super.on(r,n),this}getClient(){return this.client}handleError(r){this.logger.error(r),process.exit(1)}};export{Gr as Actions,ds as Client};