zaileys 0.28.6-dev → 0.28.7-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.
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
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(`
1
+ var vs=Object.create;var Je=Object.defineProperty,Os=Object.defineProperties,Es=Object.getOwnPropertyDescriptor,xs=Object.getOwnPropertyDescriptors,_s=Object.getOwnPropertyNames,rr=Object.getOwnPropertySymbols,Ts=Object.getPrototypeOf,nr=Object.prototype.hasOwnProperty,Ms=Object.prototype.propertyIsEnumerable;var Ve=(e,t,r)=>t in e?Je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z=(e,t)=>{for(var r in t||(t={}))nr.call(t,r)&&Ve(e,r,t[r]);if(rr)for(var r of rr(t))Ms.call(t,r)&&Ve(e,r,t[r]);return e},Q=(e,t)=>Os(e,xs(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 _=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ks=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of _s(t))!nr.call(e,i)&&i!==r&&Je(e,i,{get:()=>t[i],enumerable:!(n=Es(t,i))||n.enumerable});return e};var be=(e,t,r)=>(r=e!=null?vs(Ts(e)):{},ks(t||!e||!e.__esModule?Je(r,"default",{value:e,enumerable:!0}):r,e));var ir=(e,t,r)=>Ve(e,typeof t!="symbol"?t+"":t,r);var re=(e,t,r)=>new Promise((n,i)=>{var s=a=>{try{c(r.next(a))}catch(u){i(u)}},o=a=>{try{c(r.throw(a))}catch(u){i(u)}},c=a=>a.done?n(a.value):Promise.resolve(a.value).then(s,o);c((r=r.apply(e,t)).next())});var He=_((tu,sr)=>{"use strict";sr.exports=class extends Error{constructor(r,n){super(r||"Unknown error");ir(this,"name","AssertError");typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,n)}}});var Ge=_((nu,or)=>{"use strict";or.exports=function(...e){try{return JSON.stringify(...e)}catch(t){return"[Cannot display object: "+t.message+"]"}}});var oe=_((iu,ar)=>{"use strict";var Rs=He(),As=Ge(),Ls=ar.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:As(n));throw new Rs(r.join(" "),Ls)}});var we=_((su,cr)=>{"use strict";var Ye=oe(),lr={};cr.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);Ye(!n||!r.separator,"Separator option is not valid for array-based chain");let i=n?t:t.split(r.separator||"."),s=e;for(let o=0;o<i.length;++o){let c=i[o],a=r.iterables&&lr.iterables(s);if(Array.isArray(s)||a==="set"){let u=Number(c);Number.isInteger(u)&&(c=u<0?s.length+u:u)}if(!s||typeof s=="function"&&r.functions===!1||!a&&s[c]===void 0){Ye(!r.strict||o+1===i.length,"Missing segment",c,"in reach path ",t),Ye(typeof s=="object"||r.functions===!0||typeof s!="function","Invalid segment",c,"in reach path ",t),s=r.default;break}a?a==="set"?s=[...s][c]:s=s.get(c):s=s[c]}return s};lr.iterables=function(e){if(e instanceof Set)return"set";if(e instanceof Map)return"map"}});var Xe=_((B,fr)=>{"use strict";var ur={};B=fr.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};ur.typeMap=new Map([["[object Error]",B.error],["[object Map]",B.map],["[object Promise]",B.promise],["[object Set]",B.set],["[object URL]",B.url],["[object WeakMap]",B.weakMap],["[object WeakSet]",B.weakSet]]);B.getInternalProto=function(e){if(Array.isArray(e))return B.array;if(Buffer&&e instanceof Buffer)return B.buffer;if(e instanceof Date)return B.date;if(e instanceof RegExp)return B.regex;if(e instanceof Error)return B.error;let t=Object.prototype.toString.call(e);return ur.typeMap.get(t)||B.generic}});var xe=_(hr=>{"use strict";hr.keys=function(e,t={}){return t.symbols!==!1?Reflect.ownKeys(e):Object.getOwnPropertyNames(e)}});var _e=_((au,dr)=>{"use strict";var js=we(),N=Xe(),qs=xe(),Z={needsProtoHack:new Set([N.set,N.map,N.weakSet,N.weakMap])};dr.exports=Z.clone=function(e,t={},r=null){if(typeof e!="object"||e===null)return e;let n=Z.clone,i=r;if(t.shallow){if(t.shallow!==!0)return Z.cloneWithShallow(e,t);n=a=>a}else if(i){let a=i.get(e);if(a)return a}else i=new Map;let s=N.getInternalProto(e);switch(s){case N.buffer:return Buffer==null?void 0:Buffer.from(e);case N.date:return new Date(e.getTime());case N.regex:case N.url:return new s.constructor(e)}let o=Z.base(e,s,t);if(o===e)return e;if(i&&i.set(e,o),s===N.set)for(let a of e)o.add(n(a,t,i));else if(s===N.map)for(let[a,u]of e)o.set(a,n(u,t,i));let c=qs.keys(e,t);for(let a of c){if(a==="__proto__")continue;if(s===N.array&&a==="length"){o.length=e.length;continue}let u=Object.getOwnPropertyDescriptor(e,a);u?u.get||u.set?Object.defineProperty(o,a,u):u.enumerable?o[a]=n(e[a],t,i):Object.defineProperty(o,a,{enumerable:!1,writable:!0,configurable:!0,value:n(e[a],t,i)}):Object.defineProperty(o,a,{enumerable:!0,writable:!0,configurable:!0,value:n(e[a],t,i)})}return o};Z.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=js(e,i);(typeof s=="object"||typeof s=="function")&&n.set(s,s)}return Z.clone(e,t,n)};Z.base=function(e,t,r){if(r.prototype===!1)return Z.needsProtoHack.has(t)?new t.constructor:t===N.array?[]:{};let n=Object.getPrototypeOf(e);if(n&&n.isImmutable)return e;if(t===N.array){let i=[];return n!==t&&Object.setPrototypeOf(i,n),i}if(Z.needsProtoHack.has(t)){let i=new n.constructor;return n!==t&&Object.setPrototypeOf(i,n),i}return Object.create(n)}});var Ze=_((lu,gr)=>{"use strict";var Qe=oe(),pr=_e(),Is=xe(),yr={};gr.exports=yr.merge=function(e,t,r){if(Qe(e&&typeof e=="object","Invalid target value: must be an object"),Qe(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)){Qe(Array.isArray(e),"Cannot merge array onto an object"),r.mergeArrays||(e.length=0);for(let i=0;i<t.length;++i)e.push(pr(t[i],{symbols:r.symbols}));return e}let n=Is.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 o=t[s];if(o&&typeof o=="object"){if(e[s]===o)continue;!e[s]||typeof e[s]!="object"||Array.isArray(e[s])!==Array.isArray(o)||o instanceof Date||Buffer&&Buffer.isBuffer(o)||o instanceof RegExp?e[s]=pr(o,{symbols:r.symbols}):yr.merge(e[s],o,r)}else(o!=null||r.nullOverride)&&(e[s]=o)}return e}});var vr=_((cu,Sr)=>{"use strict";var Te=oe(),br=_e(),wr=Ze(),mr=we(),Me={};Sr.exports=function(e,t,r={}){if(Te(e&&typeof e=="object","Invalid defaults value: must be an object"),Te(!t||t===!0||typeof t=="object","Invalid source value: must be true, falsy or an object"),Te(typeof r=="object","Invalid options: must be an object"),!t)return null;if(r.shallow)return Me.applyToDefaultsWithShallow(e,t,r);let n=br(e);if(t===!0)return n;let i=r.nullOverride!==void 0?r.nullOverride:!1;return wr(n,t,{nullOverride:i,mergeArrays:!1})};Me.applyToDefaultsWithShallow=function(e,t,r){let n=r.shallow;Te(Array.isArray(n),"Invalid keys");let i=new Map,s=t===!0?null:new Set;for(let a of n){a=Array.isArray(a)?a:a.split(".");let u=mr(e,a);u&&typeof u=="object"?i.set(u,s&&mr(t,a)||u):s&&s.add(a)}let o=br(e,{},i);if(!s)return o;for(let a of s)Me.reachCopy(o,t,a);let c=r.nullOverride!==void 0?r.nullOverride:!1;return wr(o,t,{nullOverride:c,mergeArrays:!1})};Me.reachCopy=function(e,t,r){for(let s of r){if(!(s in t))return;let o=t[s];if(typeof o!="object"||o===null)return;t=o}let n=t,i=e;for(let s=0;s<r.length-1;++s){let o=r[s];typeof i[o]!="object"&&(i[o]={}),i=i[o]}i[r[r.length-1]]=n}});var Er=_((uu,Or)=>{"use strict";var et={};Or.exports=et.Bench=class{constructor(){this.ts=0,this.reset()}reset(){this.ts=et.Bench.now()}elapsed(){return et.Bench.now()-this.ts}static now(){let e=process.hrtime();return e[0]*1e3+e[1]/1e6}}});var tt=_((hu,xr)=>{"use strict";xr.exports=function(){}});var Tr=_((du,_r)=>{"use strict";var Ps=tt();_r.exports=function(){return new Promise(Ps)}});var rt=_((pu,Mr)=>{"use strict";var H=Xe(),$={mismatched:null};Mr.exports=function(e,t,r){return r=Object.assign({prototype:!0},r),!!$.isDeepEqual(e,t,r,[])};$.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=$.getSharedType(e,t,!!r.prototype);switch(s){case H.buffer:return Buffer&&Buffer.prototype.equals.call(e,t);case H.promise:return e===t;case H.regex:case H.url:return e.toString()===t.toString();case $.mismatched:return!1}for(let o=n.length-1;o>=0;--o)if(n[o].isSame(e,t))return!0;n.push(new $.SeenEntry(e,t));try{return!!$.isDeepEqualObj(s,e,t,r,n)}finally{n.pop()}};$.getSharedType=function(e,t,r){if(r)return Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?$.mismatched:H.getInternalProto(e);let n=H.getInternalProto(e);return n!==H.getInternalProto(t)?$.mismatched:n};$.valueOf=function(e){let t=e.valueOf;if(t===void 0)return e;try{return t.call(e)}catch(r){return r}};$.hasOwnEnumerableProperty=function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)};$.isSetSimpleEqual=function(e,t){for(let r of Set.prototype.values.call(e))if(!Set.prototype.has.call(t,r))return!1;return!0};$.isDeepEqualObj=function(e,t,r,n,i){var f;let{isDeepEqual:s,valueOf:o,hasOwnEnumerableProperty:c}=$,{keys:a,getOwnPropertySymbols:u}=Object;if(e===H.array)if(n.part){for(let y of t)for(let S of r)if(s(y,S,n,i))return!0}else{if(t.length!==r.length)return!1;for(let y=0;y<t.length;++y)if(!s(t[y],r[y],n,i))return!1;return!0}else if(e===H.set){if(t.size!==r.size)return!1;if(!$.isSetSimpleEqual(t,r)){let y=new Set(Set.prototype.values.call(r));for(let S of Set.prototype.values.call(t)){if(y.delete(S))continue;let v=!1;for(let O of y)if(s(S,O,n,i)){y.delete(O),v=!0;break}if(!v)return!1}}}else if(e===H.map){if(t.size!==r.size)return!1;for(let[y,S]of Map.prototype.entries.call(t))if(S===void 0&&!Map.prototype.has.call(r,y)||!s(S,Map.prototype.get.call(r,y),n,i))return!1}else if(e===H.error&&(t.name!==r.name||t.message!==r.message))return!1;let l=o(t),h=o(r);if((t!==l||r!==h)&&!s(l,h,n,i))return!1;let p=a(t);if(!n.part&&p.length!==a(r).length&&!n.skip)return!1;let d=0;for(let y of p){if(n.skip&&n.skip.includes(y)){r[y]===void 0&&++d;continue}if(!c(r,y)||!s(t[y],r[y],n,i))return!1}if(!n.part&&p.length-d!==a(r).length)return!1;if(n.symbols!==!1){let y=u(t),S=new Set(u(r));for(let v of y){if(!((f=n.skip)!=null&&f.includes(v))){if(c(t,v)){if(!c(r,v)||!s(t[v],r[v],n,i))return!1}else if(c(r,v))return!1}S.delete(v)}for(let v of S)if(c(r,v))return!1}return!0};$.SeenEntry=class{constructor(e,t){this.obj=e,this.ref=t}isSame(e,t){return this.obj===e&&this.ref===t}}});var nt=_((gu,kr)=>{"use strict";kr.exports=function(e){return e.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}});var Ar=_((mu,Rr)=>{"use strict";var ke=oe(),Cs=rt(),Bs=nt(),$s=xe(),U={};Rr.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"?U.string(e,t,r):Array.isArray(e)?U.array(e,t,r):(ke(typeof e=="object","Reference must be string or an object"),U.object(e,t,r))};U.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 o of t)if(!r.deep||!o||typeof o!="object"){let c=i.get(o);c?++c.allowed:i.set(o,{allowed:1,hits:0})}else{n=n!=null?n:U.compare(r);let c=!1;for(let[a,u]of i.entries())if(n(a,o)){++u.allowed,c=!0;break}c||i.set(o,{allowed:1,hits:0})}let s=0;for(let o of e){let c;if(!r.deep||!o||typeof o!="object")c=i.get(o);else{n=n!=null?n:U.compare(r);for(let[a,u]of i.entries())if(n(a,o)){c=u;break}}if(c&&(++c.hits,++s,r.once&&c.hits>c.allowed))return!1}if(r.only&&s!==e.length)return!1;for(let o of i.values())if(o.hits!==o.allowed&&o.hits<o.allowed&&!r.part)return!1;return!!s};U.object=function(e,t,r){ke(r.once===void 0,"Cannot use option once with object");let n=$s.keys(e,r);if(!n.length)return!1;if(Array.isArray(t))return U.array(n,t,r);let i=Object.getOwnPropertySymbols(t).filter(a=>t.propertyIsEnumerable(a)),s=[...Object.keys(t),...i],o=U.compare(r),c=new Set(s);for(let a of n){if(!c.has(a)){if(r.only)return!1;continue}if(!o(t[a],e[a]))return!1;c.delete(a)}return c.size?r.part?c.size<s.length:!1:!0};U.string=function(e,t,r){if(e==="")return t.length===1&&t[0]===""||!r.once&&!t.some(a=>a!=="");let n=new Map,i=[];for(let a of t)if(ke(typeof a=="string","Cannot compare string reference to non-string value"),a){let u=n.get(a);u?++u.allowed:(n.set(a,{allowed:1,hits:0}),i.push(Bs(a)))}else if(r.once||r.only)return!1;if(!i.length)return!0;let s=new RegExp(`(${i.join("|")})`,"g"),o=e.replace(s,(a,u)=>(++n.get(u).hits,""));if(r.only&&o)return!1;let c=!1;for(let a of n.values())if(a.hits&&(c=!0),a.hits!==a.allowed&&(a.hits<a.allowed&&!r.part||r.once))return!1;return!!c};U.compare=function(e){if(!e.deep)return U.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)=>Cs(i,s,n)};U.shallow=function(e,t){return e===t}});var jr=_((bu,Lr)=>{"use strict";var Ds=oe();Lr.exports=function(e){return Ds(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(e),"Bad attribute value ("+e+")"),e.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}});var Ir=_((wu,qr)=>{"use strict";var ne={};qr.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 Cr=_((Su,Pr)=>{"use strict";var Re={};Pr.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 Dr=_((vu,$r)=>{"use strict";var Br={};$r.exports=Br.flatten=function(e,t){let r=t||[];for(let n of e)Array.isArray(n)?Br.flatten(n,r):r.push(n);return r}});var Fr=_((Ou,Nr)=>{"use strict";var zr={};Nr.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 o of t)if(zr.has(i,o)&&!s.has(o)){if(r.first)return o;n.push(o),s.add(o)}return r.first?null:n};zr.has=function(e,t){return typeof e.has=="function"?e.has(t):e[t]!==void 0}});var Kr=_((Eu,Wr)=>{"use strict";Wr.exports=function(e){return typeof(e==null?void 0:e.then)=="function"}});var Jr=_((xu,Vr)=>{"use strict";var Ur={wrapped:Symbol("wrapped")};Vr.exports=function(e){if(e[Ur.wrapped])return e;let t=!1,r=function(...n){t||(t=!0,e(...n))};return r[Ur.wrapped]=!0,r}});var Gr=_((_u,Hr)=>{"use strict";var zs=we();Hr.exports=function(e,t,r){return t.replace(/{([^{}]+)}/g,(n,i)=>{let s=zs(e,i,r);return s!=null?s:""})}});var Xr=_((Tu,Yr)=>{"use strict";var Ns={maxTimer:2147483647};Yr.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 o=Math.min(e,Ns.maxTimer);e-=o,i(()=>e>0?s():n(t),o)};e!==1/0&&s()})}});var Qr=_(q=>{"use strict";q.applyToDefaults=vr();q.assert=oe();q.AssertError=He();q.Bench=Er();q.block=Tr();q.clone=_e();q.contain=Ar();q.deepEqual=rt();q.escapeHeaderAttribute=jr();q.escapeHtml=Ir();q.escapeJson=Cr();q.escapeRegex=nt();q.flatten=Dr();q.ignore=tt();q.intersect=Fr();q.isPromise=Kr();q.merge=Ze();q.once=Jr();q.reach=we();q.reachTemplate=Gr();q.stringify=Ge();q.wait=Xr()});var it=_(b=>{"use strict";var ae=Qr(),F={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"]])};b.Boom=class extends Error{constructor(e,t={}){if(e instanceof Error)return b.boomify(ae.clone(e),t);let{statusCode:r=500,data:n=null,ctor:i=b.Boom}=t,s=new Error(e||void 0);Error.captureStackTrace(s,i),s.data=n;let o=F.initialize(s,r);return Object.defineProperty(o,"typeof",{value:i}),t.decorate&&Object.assign(o,t.decorate),o}static[Symbol.hasInstance](e){return this===b.Boom?b.isBoom(e):this.prototype.isPrototypeOf(e)}};b.isBoom=function(e,t){return e instanceof Error&&!!e.isBoom&&(!t||e.output.statusCode===t)};b.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:F.initialize(e,(n=t.statusCode)!=null?n:e.output.statusCode,t.message):F.initialize(e,(r=t.statusCode)!=null?r:500,t.message)};b.badRequest=function(e,t){return new b.Boom(e,{statusCode:400,data:t,ctor:b.badRequest})};b.unauthorized=function(e,t,r){let n=new b.Boom(e,{statusCode:401,ctor:b.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 c;let o=(c=r[s])!=null?c:"";return n.output.payload.attributes[s]=o,`${s}="${ae.escapeHeaderAttribute(o.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};b.paymentRequired=function(e,t){return new b.Boom(e,{statusCode:402,data:t,ctor:b.paymentRequired})};b.forbidden=function(e,t){return new b.Boom(e,{statusCode:403,data:t,ctor:b.forbidden})};b.notFound=function(e,t){return new b.Boom(e,{statusCode:404,data:t,ctor:b.notFound})};b.methodNotAllowed=function(e,t,r){let n=new b.Boom(e,{statusCode:405,data:t,ctor:b.methodNotAllowed});return typeof r=="string"&&(r=[r]),Array.isArray(r)&&(n.output.headers.Allow=r.join(", ")),n};b.notAcceptable=function(e,t){return new b.Boom(e,{statusCode:406,data:t,ctor:b.notAcceptable})};b.proxyAuthRequired=function(e,t){return new b.Boom(e,{statusCode:407,data:t,ctor:b.proxyAuthRequired})};b.clientTimeout=function(e,t){return new b.Boom(e,{statusCode:408,data:t,ctor:b.clientTimeout})};b.conflict=function(e,t){return new b.Boom(e,{statusCode:409,data:t,ctor:b.conflict})};b.resourceGone=function(e,t){return new b.Boom(e,{statusCode:410,data:t,ctor:b.resourceGone})};b.lengthRequired=function(e,t){return new b.Boom(e,{statusCode:411,data:t,ctor:b.lengthRequired})};b.preconditionFailed=function(e,t){return new b.Boom(e,{statusCode:412,data:t,ctor:b.preconditionFailed})};b.entityTooLarge=function(e,t){return new b.Boom(e,{statusCode:413,data:t,ctor:b.entityTooLarge})};b.uriTooLong=function(e,t){return new b.Boom(e,{statusCode:414,data:t,ctor:b.uriTooLong})};b.unsupportedMediaType=function(e,t){return new b.Boom(e,{statusCode:415,data:t,ctor:b.unsupportedMediaType})};b.rangeNotSatisfiable=function(e,t){return new b.Boom(e,{statusCode:416,data:t,ctor:b.rangeNotSatisfiable})};b.expectationFailed=function(e,t){return new b.Boom(e,{statusCode:417,data:t,ctor:b.expectationFailed})};b.teapot=function(e,t){return new b.Boom(e,{statusCode:418,data:t,ctor:b.teapot})};b.badData=function(e,t){return new b.Boom(e,{statusCode:422,data:t,ctor:b.badData})};b.locked=function(e,t){return new b.Boom(e,{statusCode:423,data:t,ctor:b.locked})};b.failedDependency=function(e,t){return new b.Boom(e,{statusCode:424,data:t,ctor:b.failedDependency})};b.tooEarly=function(e,t){return new b.Boom(e,{statusCode:425,data:t,ctor:b.tooEarly})};b.preconditionRequired=function(e,t){return new b.Boom(e,{statusCode:428,data:t,ctor:b.preconditionRequired})};b.tooManyRequests=function(e,t){return new b.Boom(e,{statusCode:429,data:t,ctor:b.tooManyRequests})};b.illegal=function(e,t){return new b.Boom(e,{statusCode:451,data:t,ctor:b.illegal})};b.internal=function(e,t,r=500){return F.serverError(e,t,r,b.internal)};b.notImplemented=function(e,t){return F.serverError(e,t,501,b.notImplemented)};b.badGateway=function(e,t){return F.serverError(e,t,502,b.badGateway)};b.serverUnavailable=function(e,t){return F.serverError(e,t,503,b.serverUnavailable)};b.gatewayTimeout=function(e,t){return F.serverError(e,t,504,b.gatewayTimeout)};b.badImplementation=function(e,t){let r=F.serverError(e,t,500,b.badImplementation);return r.isDeveloperError=!0,r};F.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:F.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};F.reformat=function(e=!1){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=F.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)};F.serverError=function(e,t,r,n){return t instanceof Error&&!t.isBoom?b.boomify(t,{statusCode:r,message:e}):new b.Boom(e,{statusCode:r,data:t,ctor:n})}});var tn=_((qu,Ae)=>{"use strict";var Ws=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,f){typeof h=="object"&&(p=h.depth,d=h.prototype,f=h.includeNonEnumerable,h=h.circular);var y=[],S=[],v=typeof Buffer!="undefined";typeof h=="undefined"&&(h=!0),typeof p=="undefined"&&(p=1/0);function O(w,x){if(w===null)return null;if(x===0)return w;var E,M;if(typeof w!="object")return w;if(e(w,t))E=new t;else if(e(w,r))E=new r;else if(e(w,n))E=new n(function(D,te){w.then(function(me){D(O(me,x-1))},function(me){te(O(me,x-1))})});else if(i.__isArray(w))E=[];else if(i.__isRegExp(w))E=new RegExp(w.source,u(w)),w.lastIndex&&(E.lastIndex=w.lastIndex);else if(i.__isDate(w))E=new Date(w.getTime());else{if(v&&Buffer.isBuffer(w))return Buffer.allocUnsafe?E=Buffer.allocUnsafe(w.length):E=new Buffer(w.length),w.copy(E),E;e(w,Error)?E=Object.create(w):typeof d=="undefined"?(M=Object.getPrototypeOf(w),E=Object.create(M)):(E=Object.create(d),M=d)}if(h){var R=y.indexOf(w);if(R!=-1)return S[R];y.push(w),S.push(E)}e(w,t)&&w.forEach(function(D,te){var me=O(te,x-1),Ss=O(D,x-1);E.set(me,Ss)}),e(w,r)&&w.forEach(function(D){var te=O(D,x-1);E.add(te)});for(var k in w){var T;M&&(T=Object.getOwnPropertyDescriptor(M,k)),!(T&&T.set==null)&&(E[k]=O(w[k],x-1))}if(Object.getOwnPropertySymbols)for(var L=Object.getOwnPropertySymbols(w),k=0;k<L.length;k++){var m=L[k],A=Object.getOwnPropertyDescriptor(w,m);A&&!A.enumerable&&!f||(E[m]=O(w[m],x-1),A.enumerable||Object.defineProperty(E,m,{enumerable:!1}))}if(f)for(var I=Object.getOwnPropertyNames(w),k=0;k<I.length;k++){var j=I[k],A=Object.getOwnPropertyDescriptor(w,j);A&&A.enumerable||(E[j]=O(w[j],x-1),Object.defineProperty(E,j,{enumerable:!1}))}return E}return O(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 o(l){return typeof l=="object"&&s(l)==="[object Date]"}i.__isDate=o;function c(l){return typeof l=="object"&&s(l)==="[object Array]"}i.__isArray=c;function a(l){return typeof l=="object"&&s(l)==="[object RegExp]"}i.__isRegExp=a;function u(l){var h="";return l.global&&(h+="g"),l.ignoreCase&&(h+="i"),l.multiline&&(h+="m"),h}return i.__getRegExpFlags=u,i}();typeof Ae=="object"&&Ae.exports&&(Ae.exports=Ws)});var sn=_((rn,nn)=>{"use strict";(function(){var e,t,r,n=[].splice,i=function(o,c){if(!(o instanceof c))throw new Error("Bound instance method accessed before binding")},s=[].indexOf;r=tn(),e=C("events").EventEmitter,nn.exports=t=function(){class o extends e{constructor(a={}){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=a,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(u=>{var l;l=this[u],this[u]=function(...h){var p,d,f,y;if(f=h,[...h]=f,[p]=n.call(h,-1),typeof p=="function")try{y=l(...h),p(null,y)}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(a){var u,l;if(i(this,o),(l=this._isInvalidKey(a))!=null)throw l;if(this.data[a]!=null&&this._check(a,this.data[a]))return this.stats.hits++,u=this._unwrap(this.data[a]),u;this.stats.misses++}mget(a){var u,l,h,p,d,f;if(i(this,o),!Array.isArray(a))throw u=this._error("EKEYSTYPE"),u;for(f={},h=0,d=a.length;h<d;h++){if(p=a[h],(l=this._isInvalidKey(p))!=null)throw l;this.data[p]!=null&&this._check(p,this.data[p])?(this.stats.hits++,f[p]=this._unwrap(this.data[p])):this.stats.misses++}return f}set(a,u,l){var h,p,d;if(i(this,o),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw h=this._error("ECACHEFULL"),h;if(this.options.forceString&&!1==="string"&&(u=JSON.stringify(u)),l==null&&(l=this.options.stdTTL),(p=this._isInvalidKey(a))!=null)throw p;return d=!1,this.data[a]&&(d=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[a],!1))),this.data[a]=this._wrap(u,l),this.stats.vsize+=this._getValLength(u),d||(this.stats.ksize+=this._getKeyLength(a),this.stats.keys++),this.emit("set",a,u),!0}mset(a){var u,l,h,p,d,f,y,S,v,O;if(i(this,o),this.options.maxKeys>-1&&this.stats.keys+a.length>=this.options.maxKeys)throw u=this._error("ECACHEFULL"),u;for(h=0,y=a.length;h<y;h++){if(f=a[h],{key:d,val:O,ttl:v}=f,v&&typeof v!="number")throw u=this._error("ETTLTYPE"),u;if((l=this._isInvalidKey(d))!=null)throw l}for(p=0,S=a.length;p<S;p++)f=a[p],{key:d,val:O,ttl:v}=f,this.set(d,O,v);return!0}del(a){var u,l,h,p,d,f;for(i(this,o),Array.isArray(a)||(a=[a]),u=0,h=0,d=a.length;h<d;h++){if(p=a[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--,u++,f=this.data[p],delete this.data[p],this.emit("del",p,f.v))}return u}take(a){var u;return i(this,o),u=this.get(a),u!=null&&this.del(a),u}ttl(a,u){var l;if(i(this,o),u||(u=this.options.stdTTL),!a)return!1;if((l=this._isInvalidKey(a))!=null)throw l;return this.data[a]!=null&&this._check(a,this.data[a])?(u>=0?this.data[a]=this._wrap(this.data[a].v,u,!1):this.del(a),!0):!1}getTtl(a){var u,l;if(i(this,o),!!a){if((l=this._isInvalidKey(a))!=null)throw l;if(this.data[a]!=null&&this._check(a,this.data[a]))return u=this.data[a].t,u}}keys(){var a;return i(this,o),a=Object.keys(this.data),a}has(a){var u;return i(this,o),u=this.data[a]!=null&&this._check(a,this.data[a]),u}getStats(){return i(this,o),this.stats}flushAll(a=!0){i(this,o),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this._killCheckPeriod(),this._checkData(a),this.emit("flush")}flushStats(){i(this,o),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){i(this,o),this._killCheckPeriod()}_checkData(a=!0){var u,l,h;i(this,o),l=this.data;for(u in l)h=l[u],this._check(u,h);a&&this.options.checkperiod>0&&(this.checkTimeout=setTimeout(this._checkData,this.options.checkperiod*1e3,a),this.checkTimeout!=null&&this.checkTimeout.unref!=null&&this.checkTimeout.unref())}_killCheckPeriod(){if(this.checkTimeout!=null)return clearTimeout(this.checkTimeout)}_check(a,u){var l;return i(this,o),l=!0,u.t!==0&&u.t<Date.now()&&(this.options.deleteOnExpire&&(l=!1,this.del(a)),this.emit("expired",a,this._unwrap(u))),l}_isInvalidKey(a){var u;if(i(this,o),u=typeof a,s.call(this.validKeyTypes,u)<0)return this._error("EKEYTYPE",{type:typeof a})}_wrap(a,u,l=!0){var h,p,d,f;return i(this,o),this.options.useClones||(l=!1),p=Date.now(),h=0,f=1e3,u===0?h=0:u?h=p+u*f:this.options.stdTTL===0?h=this.options.stdTTL:h=p+this.options.stdTTL*f,d={t:h,v:l?r(a):a}}_unwrap(a,u=!0){return this.options.useClones||(u=!1),a.v!=null?u?r(a.v):a.v:null}_getKeyLength(a){return a.toString().length}_getValLength(a){return i(this,o),typeof a=="string"?a.length:this.options.forceString?JSON.stringify(a).length:Array.isArray(a)?this.options.arrayValueSize*a.length:typeof a=="number"?8:typeof(a!=null?a.then:void 0)=="function"?this.options.promiseValueSize:typeof Buffer!="undefined"&&Buffer!==null&&Buffer.isBuffer(a)?a.length:a!=null&&typeof a=="object"?this.options.objectValueSize*Object.keys(a).length:typeof a=="boolean"?8:0}_error(a,u={}){var l;return i(this,o),l=new Error,l.name=a,l.errorcode=a,l.message=this.ERRORS[a]!=null?this.ERRORS[a](u):"-",l.data=u,l}_initErrors(){var a,u,l;i(this,o),this.ERRORS={},l=this._ERRORS;for(u in l)a=l[u],this.ERRORS[u]=this.createErrorMessage(a)}createErrorMessage(a){return function(u){return a.replace("__key",u.type)}}}return o.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."},o}.call(this)}).call(rn)});var st=_((on,an)=>{"use strict";(function(){var e;e=an.exports=sn(),e.version="5.1.2"}).call(on)});var fn=_((Iu,un)=>{"use strict";un.exports=cn;var{toString:Ks}=Object.prototype,ot=Symbol("circular-ref-tag"),at=Symbol("pino-raw-err-ref"),ln=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[at]},set:function(e){this[at]=e}}});Object.defineProperty(ln,at,{writable:!0,value:{}});function cn(e){if(!(e instanceof Error))return e;e[ot]=void 0;let t=Object.create(ln);t.type=Ks.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(ot)||(t[r]=cn(n)):t[r]=n}return delete e[ot],t.raw=e,t}});var yn=_((Pu,pn)=>{"use strict";pn.exports={mapHttpRequest:Us,reqSerializer:dn};var lt=Symbol("pino-raw-req-ref"),hn=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[lt]},set:function(e){this[lt]=e}}});Object.defineProperty(hn,lt,{writable:!0,value:{}});function dn(e){let t=e.info||e.socket,r=Object.create(hn);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 Us(e){return{req:dn(e)}}});var wn=_((Cu,bn)=>{"use strict";bn.exports={mapHttpResponse:Vs,resSerializer:mn};var ct=Symbol("pino-raw-res-ref"),gn=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[ct]},set:function(e){this[ct]=e}}});Object.defineProperty(gn,ct,{writable:!0,value:{}});function mn(e){let t=Object.create(gn);return t.statusCode=e.statusCode,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function Vs(e){return{res:mn(e)}}});var ft=_((Bu,Sn)=>{"use strict";var ut=fn(),Le=yn(),je=wn();Sn.exports={err:ut,mapHttpRequest:Le.mapHttpRequest,mapHttpResponse:je.mapHttpResponse,req:Le.reqSerializer,res:je.resSerializer,wrapErrorSerializer:function(t){return t===ut?t:function(n){return t(ut(n))}},wrapRequestSerializer:function(t){return t===Le.reqSerializer?t:function(n){return t(Le.reqSerializer(n))}},wrapResponseSerializer:function(t){return t===je.resSerializer?t:function(n){return t(je.resSerializer(n))}}}});var ht=_(($u,vn)=>{"use strict";function Js(e,t){return t}vn.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=Js;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 En=_((Du,On)=>{"use strict";On.exports=Hs;function Hs(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 o=(s[0]==="["?"":".")+s.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if(/\n|\r|;/.test(o)||/\/\*/.test(o))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${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",`
5
+ o${o}
6
+ if ([o${o}].length !== 1) throw Error()`)()}catch(o){throw Error(r(s))}})}}});var qe=_((zu,xn)=>{"use strict";xn.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var Tn=_((Nu,_n)=>{"use strict";var Gs=qe();_n.exports=Ys;function Ys({paths:e}){let t=[];var r=0;let n=e.reduce(function(i,s,o){var c=s.match(Gs).map(l=>l.replace(/'|"|`/g,""));let a=s[0]==="[";c=c.map(l=>l[0]==="["?l.substr(1,l.length-2):l);let u=c.indexOf("*");if(u>-1){let l=c.slice(0,u),h=l.join("."),p=c.slice(u+1,c.length),d=p.length>0;r++,t.push({before:l,beforeStr:h,after:p,nested:d})}else i[s]={path:c,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(s),leadingBracket:a};return i},{});return{wildcards:t,wcLen:r,secret:n}}});var kn=_((Fu,Mn)=>{"use strict";var Xs=qe();Mn.exports=Qs;function Qs({secret:e,serialize:t,wcLen:r,strict:n,isCensorFct:i,censorFctTakesPath:s},o){let c=Function("o",`
7
7
  if (typeof o !== 'object' || o == null) {
8
- ${Ys(n,t)}
8
+ ${ro(n,t)}
9
9
  }
10
10
  const { censor, secret } = this
11
11
  const originalSecret = {}
@@ -14,33 +14,33 @@ var gs=Object.create;var Ue=Object.defineProperty,ms=Object.defineProperties,bs=
14
14
  originalSecret[secretKeys[i]] = secret[secretKeys[i]]
15
15
  }
16
16
 
17
- ${Js(e,i,s)}
17
+ ${Zs(e,i,s)}
18
18
  this.compileRestore()
19
- ${Gs(r>0,i,s)}
19
+ ${eo(r>0,i,s)}
20
20
  this.secret = originalSecret
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=`
21
+ ${to(t)}
22
+ `).bind(o);return c.state=o,t===!1&&(c.restore=a=>o.restore(a)),c}function Zs(e,t,r){return Object.keys(e).map(n=>{let{escPath:i,leadingBracket:s,path:o}=e[n],c=s?1:0,a=s?"":".",u=[];for(var l;(l=Xs.exec(n))!==null;){let[,f]=l,{index:y,input:S}=l;y>c&&u.push(S.substring(0,y-(f?0:1)))}var h=u.map(f=>`o${a}${f}`).join(" && ");h.length===0?h+=`o${a}${n} != null`:h+=` && o${a}${n} != null`;let p=`
23
23
  switch (true) {
24
- ${c.reverse().map(u=>`
25
- case o${o}${u} === censor:
26
- secret[${i}].circle = ${JSON.stringify(u)}
24
+ ${u.reverse().map(f=>`
25
+ case o${a}${f} === censor:
26
+ secret[${i}].circle = ${JSON.stringify(f)}
27
27
  break
28
28
  `).join(`
29
29
  `)}
30
30
  }
31
- `,d=r?`val, ${JSON.stringify(a)}`:"val";return`
31
+ `,d=r?`val, ${JSON.stringify(o)}`:"val";return`
32
32
  if (${h}) {
33
- const val = o${o}${n}
33
+ const val = o${a}${n}
34
34
  if (val === censor) {
35
35
  secret[${i}].precensored = true
36
36
  } else {
37
37
  secret[${i}].val = val
38
- o${o}${n} = ${t?`censor(${d})`:"censor"}
38
+ o${a}${n} = ${t?`censor(${d})`:"censor"}
39
39
  ${p}
40
40
  }
41
41
  }
42
42
  `}).join(`
43
- `)}function Gs(e,t,r){return e===!0?`
43
+ `)}function eo(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 gs=Object.create;var Ue=Object.defineProperty,ms=Object.defineProperties,bs=
51
51
  } else secret[beforeStr] = groupRedact(o, before, censor, ${t}, ${r})
52
52
  }
53
53
  }
54
- `:""}function Xs(e){return e===!1?"return o":`
54
+ `:""}function to(e){return e===!1?"return o":`
55
55
  var s = this.serialize(o)
56
56
  this.restore(o)
57
57
  return s
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`
58
+ `}function ro(e,t){return e===!0?"throw Error('fast-redact: primitives cannot be redacted')":t===!1?"return o":"return this.serialize(o)"}});var pt=_((Wu,Ln)=>{"use strict";Ln.exports={groupRedact:io,groupRestore:no,nestedRedact:oo,nestedRestore:so};function no({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 io(e,t,r,n,i){let s=Rn(e,t);if(s==null||typeof s=="string")return{keys:null,values:null,target:s,flat:!0};let o=Object.keys(s),c=o.length,a=t.length,u=i?[...t]:void 0,l=new Array(c);for(var h=0;h<c;h++){let p=o[h];l[h]=s[p],i?(u[a]=p,s[p]=r(s[p],u)):n?s[p]=r(s[p]):s[p]=r}return{keys:o,values:l,target:s,flat:!0}}function so(e){for(let t=0;t<e.length;t++){let{target:r,path:n,value:i}=e[t],s=r;for(let o=n.length-1;o>0;o--)s=s[n[o]];s[n[0]]=i}}function oo(e,t,r,n,i,s,o){let c=Rn(t,r);if(c==null)return;let a=Object.keys(c),u=a.length;for(var l=0;l<u;l++){let h=a[l];ao(e,c,h,r,n,i,s,o)}return e}function dt(e,t){return e!=null?"hasOwn"in Object?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t):!1}function ao(e,t,r,n,i,s,o,c){let a=i.length,u=a-1,l=r;var h=-1,p,d,f,y=null,S=null,v,O,w=!1,x=0,E=0,M=lo();if(f=p=t[r],typeof p=="object"){for(;p!=null&&++h<a&&(E+=1,r=i[h],y=f,!(r!=="*"&&!S&&!(typeof p=="object"&&r in p)));)if(!(r==="*"&&(S==="*"&&(w=!0),S=r,h!==u))){if(S){let k=Object.keys(p);for(var R=0;R<k.length;R++){let T=k[R];if(O=p[T],v=r==="*",w)M=ee(M,T,E),x=h,f=An(O,x-1,r,n,i,s,o,c,l,p,d,f,v,T,h,u,M,e,t[l],E+1);else if(v||typeof O=="object"&&O!==null&&r in O){if(v?f=O:f=O[r],d=h!==u?f:o?c?s(f,[...n,l,...i]):s(f):s,v){let L=Se(ee(M,T,E),f,t[l]);e.push(L),p[T]=d}else if(O[r]!==d)if(d===void 0&&s!==void 0||dt(O,r)&&d===f)M=ee(M,T,E);else{M=ee(M,T,E);let L=Se(ee(M,r,E+1),f,t[l]);e.push(L),O[r]=d}}}S=null}else{if(f=p[r],M=ee(M,r,E),d=h!==u?f:o?c?s(f,[...n,l,...i]):s(f):s,!(dt(p,r)&&d===f||d===void 0&&s!==void 0)){let k=Se(M,f,t[l]);e.push(k),p[r]=d}p=p[r]}if(typeof p!="object")break}}}function Rn(e,t){for(var r=-1,n=t.length,i=e;i!=null&&++r<n;)i=i[t[r]];return i}function An(e,t,r,n,i,s,o,c,a,u,l,h,p,d,f,y,S,v,O,w){if(t===0&&(p||typeof e=="object"&&e!==null&&r in e)){if(p?h=e:h=e[r],l=f!==y?h:o?c?s(h,[...n,a,...i]):s(h):s,p){let x=Se(S,h,O);v.push(x),u[d]=l}else if(e[r]!==l){if(!(l===void 0&&s!==void 0||dt(e,r)&&l===h)){let x=Se(ee(S,r,w+1),h,O);v.push(x),e[r]=l}}}for(let x in e)typeof e[x]=="object"&&(S=ee(S,x,w),An(e[x],t-1,r,n,i,s,o,c,a,u,l,h,p,d,f,y,S,v,O,w+1))}function lo(){return{parent:null,key:null,children:[],depth:0}}function ee(e,t,r){if(e.depth===r)return ee(e.parent,t,r);var n={parent:e,key:t,depth:r,children:[]};return e.children.push(n),n}function Se(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 qn=_((Ku,jn)=>{"use strict";var{groupRestore:co,nestedRestore:uo}=pt();jn.exports=fo;function fo(){return function(){if(this.restore){this.restore.state.secret=this.secret;return}let{secret:t,wcLen:r}=this,n=Object.keys(t),i=ho(t,n),s=r>0,o=s?{secret:t,groupRestore:co,nestedRestore:uo}:{secret:t};this.restore=Function("o",po(i,n,s)).bind(o),this.restore.state=o}}function ho(e,t){return t.map(r=>{let{circle:n,escPath:i,leadingBracket:s}=e[r],c=n?`o.${n} = secret[${i}].val`:`o${s?"":"."}${r} = secret[${i}].val`,a=`secret[${i}].val = undefined`;return`
59
59
  if (secret[${i}].val !== undefined) {
60
- try { ${f} } catch (e) {}
61
- ${o}
60
+ try { ${c} } catch (e) {}
61
+ ${a}
62
62
  }
63
- `}).join("")}function lo(e,t,r){return`
63
+ `}).join("")}function po(e,t,r){return`
64
64
  const secret = this.secret
65
65
  ${r===!0?`
66
66
  const keys = Object.keys(secret)
@@ -77,26 +77,26 @@ var gs=Object.create;var Ue=Object.defineProperty,ms=Object.defineProperties,bs=
77
77
  `:""}
78
78
  ${e}
79
79
  return o
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
- ${v}${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
- ${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(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
80
+ `}});var Pn=_((Uu,In)=>{"use strict";In.exports=yo;function yo(e){let{secret:t,censor:r,compileRestore:n,serialize:i,groupRedact:s,nestedRedact:o,wildcards:c,wcLen:a}=e,u=[{secret:t,censor:r,compileRestore:n}];return i!==!1&&u.push({serialize:i}),a>0&&u.push({groupRedact:s,nestedRedact:o,wildcards:c,wcLen:a}),Object.assign(...u)}});var $n=_((Vu,Bn)=>{"use strict";var Cn=En(),go=Tn(),mo=kn(),bo=qn(),{groupRedact:wo,nestedRedact:So}=pt(),vo=Pn(),Oo=qe(),Eo=Cn(),yt=e=>e;yt.restore=yt;var xo="[REDACTED]";gt.rx=Oo;gt.validator=Cn;Bn.exports=gt;function gt(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:xo,s=typeof i=="function",o=s&&i.length>1;if(t.length===0)return r||yt;Eo({paths:t,serialize:r,censor:i});let{wildcards:c,wcLen:a,secret:u}=go({paths:t,censor:i}),l=bo(),h="strict"in e?e.strict:!0;return mo({secret:u,wcLen:a,serialize:r,strict:h,isCensorFct:s,censorFctTakesPath:o},vo({secret:u,censor:i,compileRestore:l,serialize:r,groupRedact:wo,nestedRedact:So,wildcards:c,wcLen:a}))}});var pe=_((Ju,Dn)=>{"use strict";var _o=Symbol("pino.setLevel"),To=Symbol("pino.getLevel"),Mo=Symbol("pino.levelVal"),ko=Symbol("pino.useLevelLabels"),Ro=Symbol("pino.useOnlyCustomLevels"),Ao=Symbol("pino.mixin"),Lo=Symbol("pino.lsCache"),jo=Symbol("pino.chindings"),qo=Symbol("pino.parsedChindings"),Io=Symbol("pino.asJson"),Po=Symbol("pino.write"),Co=Symbol("pino.redactFmt"),Bo=Symbol("pino.time"),$o=Symbol("pino.timeSliceIndex"),Do=Symbol("pino.stream"),zo=Symbol("pino.stringify"),No=Symbol("pino.stringifySafe"),Fo=Symbol("pino.stringifiers"),Wo=Symbol("pino.end"),Ko=Symbol("pino.formatOpts"),Uo=Symbol("pino.messageKey"),Vo=Symbol("pino.nestedKey"),Jo=Symbol("pino.nestedKeyStr"),Ho=Symbol("pino.mixinMergeStrategy"),Go=Symbol("pino.wildcardFirst"),Yo=Symbol.for("pino.serializers"),Xo=Symbol.for("pino.formatters"),Qo=Symbol.for("pino.hooks"),Zo=Symbol.for("pino.metadata");Dn.exports={setLevelSym:_o,getLevelSym:To,levelValSym:Mo,useLevelLabelsSym:ko,mixinSym:Ao,lsCacheSym:Lo,chindingsSym:jo,parsedChindingsSym:qo,asJsonSym:Io,writeSym:Po,serializersSym:Yo,redactFmtSym:Co,timeSym:Bo,timeSliceIndexSym:$o,streamSym:Do,stringifySym:zo,stringifySafeSym:No,stringifiersSym:Fo,endSym:Wo,formatOptsSym:Ko,messageKeySym:Uo,nestedKeySym:Vo,wildcardFirstSym:Go,needsMetadataGsym:Zo,useOnlyCustomLevelsSym:Ro,formattersSym:Xo,hooksSym:Qo,nestedKeyStrSym:Jo,mixinMergeStrategySym:Ho}});var wt=_((Hu,Wn)=>{"use strict";var bt=$n(),{redactFmtSym:ea,wildcardFirstSym:Ie}=pe(),{rx:mt,validator:ta}=bt,zn=ta({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})`}),Nn="[Redacted]",Fn=!1;function ra(e,t){let{paths:r,censor:n}=na(e),i=r.reduce((c,a)=>{mt.lastIndex=0;let u=mt.exec(a),l=mt.exec(a),h=u[1]!==void 0?u[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):u[0];if(h==="*"&&(h=Ie),l===null)return c[h]=null,c;if(c[h]===null)return c;let{index:p}=l,d=`${a.substr(p,a.length-1)}`;return c[h]=c[h]||[],h!==Ie&&c[h].length===0&&c[h].push(...c[Ie]||[]),h===Ie&&Object.keys(c).forEach(function(f){c[f]&&c[f].push(d)}),c[h].push(d),c},{}),s={[ea]:bt({paths:r,censor:n,serialize:t,strict:Fn})},o=(...c)=>t(typeof n=="function"?n(...c):n);return[...Object.keys(i),...Object.getOwnPropertySymbols(i)].reduce((c,a)=>{if(i[a]===null)c[a]=u=>o(u,[a]);else{let u=typeof n=="function"?(l,h)=>n(l,[a,...h]):n;c[a]=bt({paths:i[a],censor:u,serialize:t,strict:Fn})}return c},s)}function na(e){if(Array.isArray(e))return e={paths:e,censor:Nn},zn(e),e;let{paths:t,censor:r=Nn,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),zn({paths:t,censor:r}),{paths:t,censor:r}}Wn.exports=ra});var Un=_((Gu,Kn)=>{"use strict";var ia=()=>"",sa=()=>`,"time":${Date.now()}`,oa=()=>`,"time":${Math.round(Date.now()/1e3)}`,aa=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;Kn.exports={nullTime:ia,epochTime:sa,unixTime:oa,isoTime:aa}});var Jn=_((Yu,Vn)=>{"use strict";function la(e){try{return JSON.stringify(e)}catch(t){return'"[Circular]"'}}Vn.exports=ca;function ca(e,t,r){var n=r&&r.stringify||la,i=1;if(typeof e=="object"&&e!==null){var s=t.length+i;if(s===1)return e;var o=new Array(s);o[0]=n(e);for(var c=1;c<s;c++)o[c]=n(t[c]);return o.join(" ")}if(typeof e!="string")return e;var a=t.length;if(a===0)return e;for(var u="",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>=a||t[l]==null)break;h<d&&(u+=e.slice(h,d)),u+=Number(t[l]),h=d+2,d++;break;case 105:if(l>=a||t[l]==null)break;h<d&&(u+=e.slice(h,d)),u+=Math.floor(Number(t[l])),h=d+2,d++;break;case 79:case 111:case 106:if(l>=a||t[l]===void 0)break;h<d&&(u+=e.slice(h,d));var f=typeof t[l];if(f==="string"){u+="'"+t[l]+"'",h=d+2,d++;break}if(f==="function"){u+=t[l].name||"<anonymous>",h=d+2,d++;break}u+=n(t[l]),h=d+2,d++;break;case 115:if(l>=a)break;h<d&&(u+=e.slice(h,d)),u+=String(t[l]),h=d+2,d++;break;case 37:h<d&&(u+=e.slice(h,d)),u+="%",h=d+2,d++,l--;break}++l}++d}return h===-1?e:(h<p&&(u+=e.slice(h)),u)}});var vt=_((Xu,St)=>{"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));St.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(););};St.exports=e}});var Qn=_((Qu,Xn)=>{"use strict";var V=C("fs"),ua=C("events"),fa=C("util").inherits,Hn=C("path"),Gn=vt(),Ot=100,ha=16*1024;function Yn(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(s,o){if(s){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",s)}):t.emit("error",s);return}t.fd=o,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t._reopening&&!t._writing&&t._len>t.minLength&&!t.destroyed&&ye(t)}let n=t.append?"a":"w",i=t.mode;if(t.sync)try{t.mkdir&&V.mkdirSync(Hn.dirname(e),{recursive:!0});let s=V.openSync(e,n,i);r(null,s)}catch(s){throw r(s),s}else t.mkdir?V.mkdir(Hn.dirname(e),{recursive:!0},s=>{if(s)return r(s);V.open(e,n,i,r)}):V.open(e,n,i,r)}function W(e){if(!(this instanceof W))return new W(e);let{fd:t,dest:r,minLength:n,maxLength:i,maxWrite:s,sync:o,append:c=!0,mode:a,mkdir:u,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||ha,this.sync=o||!1,this.append=c||!1,this.mode=a,this.retryEAGAIN=l||(()=>!0),this.mkdir=u||!1,typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")Yn(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{Gn(Ot),this.release(void 0,0)}catch(f){this.release(f)}else setTimeout(()=>{V.write(this.fd,this._writingBuf,"utf8",this.release)},Ot);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){V.write(this.fd,this._writingBuf,"utf8",this.release);return}try{do{let f=V.writeSync(this.fd,this._writingBuf,"utf8");this._len-=f,this._writingBuf=this._writingBuf.slice(f)}while(this._writingBuf)}catch(f){this.release(f);return}}let d=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):d>this.minLength?ye(this):this._ending?d>0?ye(this):(this._writing=!1,Pe(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(da,this)):this.emit("drain"))},this.on("newListener",function(h){h==="drain"&&(this._asyncDrainScheduled=!1)})}function da(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}fa(W,ua);W.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&&ye(this),this._len<this._hwm)};W.prototype.flush=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");this._writing||this.minLength<=0||(this._bufs.length===0&&this._bufs.push(""),ye(this))};W.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&&V.close(t,r=>{if(r)return this.emit("error",r)})}),Yn(e||this.file,this)};W.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?ye(this):Pe(this)))};W.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-=V.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;Gn(Ot)}}};W.prototype.destroy=function(){this.destroyed||Pe(this)};function ye(e){let t=e.release;if(e._writing=!0,e._writingBuf=e._writingBuf||e._bufs.shift()||"",e.sync)try{let r=V.writeSync(e.fd,e._writingBuf,"utf8");t(null,r)}catch(r){t(r)}else V.write(e.fd,e._writingBuf,"utf8",t)}function Pe(e){if(e.fd===-1){e.once("ready",Pe.bind(null,e));return}e.destroyed=!0,e._bufs=[],e.fd!==1&&e.fd!==2?V.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")}}W.SonicBoom=W;W.default=W;Xn.exports=W});var ei=_((Zu,Zn)=>{"use strict";var{format:Et}=C("util");function pa(){let e={},t=new Map;function r(i,s,o){if(!i)throw new Error("Warning name must not be empty");if(!s)throw new Error("Warning code must not be empty");if(!o)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 c(a,u,l){let h;return a&&u&&l?h=Et(o,a,u,l):a&&u?h=Et(o,a,u):a?h=Et(o,a):h=o,{code:s,name:i,message:h}}return t.set(s,!1),e[s]=c,e[s]}function n(i,s,o,c){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 a=e[i](s,o,c);process.emitWarning(a.message,a.name,a.code)}return{create:r,emit:n,emitted:t}}Zn.exports=pa});var ni=_((ef,ri)=>{"use strict";var xt=ei()();ri.exports=xt;var ti="PinoWarning";xt.create(ti,"PINODEP008","prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives.");xt.create(ti,"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 Tt=_((tf,ai)=>{"use strict";function ii(e,t,r,n){function i(){let s=t.deref();s!==void 0&&r(s,n)}e[n]=i,process.once(n,i)}var si=new FinalizationRegistry(oi),_t=new WeakMap;function oi(e){process.removeListener("exit",e.exit),process.removeListener("beforeExit",e.beforeExit)}function ya(e,t){if(e===void 0)throw new Error("the object can't be undefined");let r=new WeakRef(e),n={};_t.set(e,n),si.register(e,n),ii(n,r,t,"exit"),ii(n,r,t,"beforeExit")}function ga(e){let t=_t.get(e);_t.delete(e),t&&oi(t),si.unregister(e)}ai.exports={register:ya,unregister:ga}});var ci=_((rf,li)=>{"use strict";function ma(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o===r){i(null,"ok");return}let c=o,a=u=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{c=o,o=Atomics.load(e,t),o===c?a(u>=1e3?1e3:u*2):o===r?i(null,"ok"):i(null,"not-equal")},u)};a(1)}function ba(e,t,r,n,i){let s=Date.now()+n,o=Atomics.load(e,t);if(o!==r){i(null,"ok");return}let c=a=>{Date.now()>s?i(null,"timed-out"):setTimeout(()=>{o=Atomics.load(e,t),o!==r?i(null,"ok"):c(a>=1e3?1e3:a*2)},a)};c(1)}li.exports={wait:ma,waitDiff:ba}});var fi=_((nf,ui)=>{"use strict";ui.exports={WRITE_INDEX:4,READ_INDEX:8}});var gi=_((of,yi)=>{"use strict";var{EventEmitter:wa}=C("events"),{Worker:Sa}=C("worker_threads"),{join:va}=C("path"),{pathToFileURL:Oa}=C("url"),{wait:Ea}=ci(),{WRITE_INDEX:K,READ_INDEX:X}=fi(),xa=C("buffer"),_a=C("assert"),g=Symbol("kImpl"),Ta=xa.constants.MAX_STRING_LENGTH,Be=class{constructor(t){this._value=t}deref(){return this._value}},Ma=global.FinalizationRegistry||class{register(){}unregister(){}},ka=global.WeakRef||Be,hi=new Ma(e=>{e.exited||e.terminate()});function Ra(e,t){let{filename:r,workerData:n}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||va(__dirname,"lib","worker.js"),o=new Sa(s,Q(z({},t.workerOpts),{workerData:{filename:r.indexOf("file://")===0?r:Oa(r).href,dataBuf:e[g].dataBuf,stateBuf:e[g].stateBuf,workerData:n}}));return o.stream=new Be(e),o.on("message",Aa),o.on("exit",pi),hi.register(e,o),o}function di(e){_a(!e[g].sync),e[g].needDrain&&(e[g].needDrain=!1,e.emit("drain"))}function Ce(e){let t=Atomics.load(e[g].state,K),r=e[g].data.length-t;if(r>0){if(e[g].buf.length===0){e[g].flushing=!1,e[g].ending?At(e):e[g].needDrain&&process.nextTick(di,e);return}let n=e[g].buf.slice(0,r),i=Buffer.byteLength(n);i<=r?(e[g].buf=e[g].buf.slice(r),$e(e,n,Ce.bind(null,e))):e.flush(()=>{if(!e.destroyed){for(Atomics.store(e[g].state,X,0),Atomics.store(e[g].state,K,0);i>e[g].data.length;)r=r/2,n=e[g].buf.slice(0,r),i=Buffer.byteLength(n);e[g].buf=e[g].buf.slice(r),$e(e,n,Ce.bind(null,e))}})}else if(r===0){if(t===0&&e[g].buf.length===0)return;e.flush(()=>{Atomics.store(e[g].state,X,0),Atomics.store(e[g].state,K,0),Ce(e)})}else throw new Error("overwritten")}function Aa(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}switch(e.code){case"READY":this.stream=new ka(t),t.flush(()=>{t[g].ready=!0,t.emit("ready")});break;case"ERROR":ge(t,e.err);break;default:throw new Error("this should not happen: "+e.code)}}function pi(e){let t=this.stream.deref();t!==void 0&&(hi.unregister(t),t.worker.exited=!0,t.worker.off("exit",pi),ge(t,e!==0?new Error("The worker thread exited"):null))}var kt=class extends wa{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[g]={},this[g].stateBuf=new SharedArrayBuffer(128),this[g].state=new Int32Array(this[g].stateBuf),this[g].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[g].data=Buffer.from(this[g].dataBuf),this[g].sync=t.sync||!1,this[g].ending=!1,this[g].ended=!1,this[g].needDrain=!1,this[g].destroyed=!1,this[g].flushing=!1,this[g].ready=!1,this[g].finished=!1,this[g].errored=null,this[g].closed=!1,this[g].buf="",this.worker=Ra(this,t)}write(t){if(this[g].destroyed)throw new Error("the worker has exited");if(this[g].ending)throw new Error("the worker is ending");if(this[g].flushing&&this[g].buf.length+t.length>=Ta)try{Mt(this),this[g].flushing=!0}catch(r){return ge(this,r),!1}if(this[g].buf+=t,this[g].sync)try{return Mt(this),!0}catch(r){return ge(this,r),!1}return this[g].flushing||(this[g].flushing=!0,setImmediate(Ce,this)),this[g].needDrain=this[g].data.length-this[g].buf.length-Atomics.load(this[g].state,K)<=0,!this[g].needDrain}end(){this[g].destroyed||(this[g].ending=!0,At(this))}flush(t){if(this[g].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let r=Atomics.load(this[g].state,K);Ea(this[g].state,X,r,1/0,(n,i)=>{if(n){ge(this,n),process.nextTick(t,n);return}if(i==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[g].destroyed||(Mt(this),Rt(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[g].ready}get destroyed(){return this[g].destroyed}get closed(){return this[g].closed}get writable(){return!this[g].destroyed&&!this[g].ending}get writableEnded(){return this[g].ending}get writableFinished(){return this[g].finished}get writableNeedDrain(){return this[g].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[g].errored}};function ge(e,t){e[g].destroyed||(e[g].destroyed=!0,t&&(e[g].errored=t,e.emit("error",t)),e.worker.exited?setImmediate(()=>{e[g].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[g].closed=!0,e.emit("close")}))}function $e(e,t,r){let n=Atomics.load(e[g].state,K),i=Buffer.byteLength(t);return e[g].data.write(t,n),Atomics.store(e[g].state,K,n+i),Atomics.notify(e[g].state,K),r(),!0}function At(e){if(!(e[g].ended||!e[g].ending||e[g].flushing)){e[g].ended=!0;try{e.flushSync();let t=Atomics.load(e[g].state,X);Atomics.store(e[g].state,K,-1),Atomics.notify(e[g].state,K);let r=0;for(;t!==-1;){if(Atomics.wait(e[g].state,X,t,1e3),t=Atomics.load(e[g].state,X),t===-2)throw new Error("end() failed");if(++r===10)throw new Error("end() took too long (10s)")}process.nextTick(()=>{e[g].finished=!0,e.emit("finish")})}catch(t){ge(e,t)}}}function Mt(e){let t=()=>{e[g].ending?At(e):e[g].needDrain&&process.nextTick(di,e)};for(e[g].flushing=!1;e[g].buf.length!==0;){let r=Atomics.load(e[g].state,K),n=e[g].data.length-r;if(n===0){Rt(e),Atomics.store(e[g].state,X,0),Atomics.store(e[g].state,K,0);continue}else if(n<0)throw new Error("overwritten");let i=e[g].buf.slice(0,n),s=Buffer.byteLength(i);if(s<=n)e[g].buf=e[g].buf.slice(n),$e(e,i,t);else{for(Rt(e),Atomics.store(e[g].state,X,0),Atomics.store(e[g].state,K,0);s>e[g].buf.length;)n=n/2,i=e[g].buf.slice(0,n),s=Buffer.byteLength(i);e[g].buf=e[g].buf.slice(n),$e(e,i,t)}}}function Rt(e){if(e[g].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[g].state,K),r=0;for(;;){let n=Atomics.load(e[g].state,X);if(n===-2)throw new Error("_flushSync failed");if(n!==t)Atomics.wait(e[g].state,X,n,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}yi.exports=kt});var jt=_((lf,bi)=>{"use strict";var{createRequire:La}=C("module"),ja=ht(),{join:Lt,isAbsolute:qa}=C("path"),Ia=vt(),De;global.WeakRef&&global.WeakMap&&global.FinalizationRegistry&&(De=Tt());var Pa=gi();function Ca(e){if(De)De.register(e,mi),e.on("close",function(){De.unregister(e)});else{let t=mi.bind(null,e);process.once("beforeExit",t),process.once("exit",t),e.on("close",function(){process.removeListener("beforeExit",t),process.removeListener("exit",t)})}}function Ba(e,t,r){let n=new Pa({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&&Ca(n)}function s(){n.closed||(n.flushSync(),Ia(100),n.end())}return n}function mi(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function $a(e){let{pipeline:t,targets:r,levels:n,options:i={},worker:s={},caller:o=ja()}=e,c=typeof o=="string"?[o]:o,a="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},u=e.target;if(u&&r)throw new Error("only one of target or targets can be specified");return r?(u=a["pino-worker"]||Lt(__dirname,"worker.js"),i.targets=r.map(h=>Q(z({},h),{target:l(h.target)}))):t&&(u=a["pino-pipeline-worker"]||Lt(__dirname,"worker-pipeline.js"),i.targets=t.map(h=>Q(z({},h),{target:l(h.target)}))),n&&(i.levels=n),Ba(l(u),i,s);function l(h){if(h=a[h]||h,qa(h)||h.indexOf("file://")===0)return h;if(h==="pino/file")return Lt(__dirname,"..","file.js");let p;for(let d of c)try{p=La(d).resolve(h);break}catch(f){continue}if(!p)throw new Error(`unable to determine transport target for "${h}"`);return p}}bi.exports=$a});var Ne=_((uf,Ai)=>{"use strict";var wi=Jn(),{mapHttpRequest:Da,mapHttpResponse:za}=ft(),Pt=Qn(),xi=ni(),{lsCacheSym:Na,chindingsSym:Ct,parsedChindingsSym:qt,writeSym:Si,serializersSym:Bt,formatOptsSym:vi,endSym:Fa,stringifiersSym:$t,stringifySym:_i,stringifySafeSym:Dt,wildcardFirstSym:Ti,needsMetadataGsym:Mi,redactFmtSym:Wa,streamSym:Ka,nestedKeySym:Ua,formattersSym:zt,messageKeySym:ki,nestedKeyStrSym:Va}=pe(),{isMainThread:Ja}=C("worker_threads"),Ha=jt();function ve(){}function Ga(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=Da(n):typeof n.setHeader=="function"&&(n=za(n)));let o;s===null&&i.length===0?o=[null]:(s=i.shift(),o=i),this[Si](n,wi(s,o,this[vi]),e)}else this[Si](null,wi(n,i,this[vi]),e)}}function Oi(e){let t="",r=0,n=!1,i=255,s=e.length;if(s>100)return JSON.stringify(e);for(var o=0;o<s&&i>=32;o++)i=e.charCodeAt(o),(i===34||i===92)&&(t+=e.slice(r,o)+"\\",r=o,n=!0);return n?t+=e.slice(r):t=e,i<32?JSON.stringify(e):'"'+t+'"'}function Ya(e,t,r,n){let i=this[_i],s=this[Dt],o=this[$t],c=this[Fa],a=this[Ct],u=this[Bt],l=this[zt],h=this[ki],p=this[Na][r]+n;p=p+a;let d;l.log&&(e=l.log(e));let f=o[Ti],y="";for(let v in e)if(d=e[v],Object.prototype.hasOwnProperty.call(e,v)&&d!==void 0){d=u[v]?u[v](d):d;let O=o[v]||f;switch(typeof d){case"undefined":case"function":continue;case"number":Number.isFinite(d)===!1&&(d=null);case"boolean":O&&(d=O(d));break;case"string":d=(O||Oi)(d);break;default:d=(O||i)(d,s)}if(d===void 0)continue;y+=',"'+v+'":'+d}let S="";if(t!==void 0){d=u[h]?u[h](t):t;let v=o[h]||f;switch(typeof d){case"function":break;case"number":Number.isFinite(d)===!1&&(d=null);case"boolean":v&&(d=v(d)),S=',"'+h+'":'+d;break;case"string":d=(v||Oi)(d),S=',"'+h+'":'+d;break;default:d=(v||i)(d,s),S=',"'+h+'":'+d}}return this[Ua]&&y?p+this[Va]+y.slice(1)+"}"+S+c:p+y+S+c}function Xa(e,t){let r,n=e[Ct],i=e[_i],s=e[Dt],o=e[$t],c=o[Ti],a=e[Bt],u=e[zt].bindings;t=u(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=a[l]?a[l](r):r,r=(o[l]||c||i)(r,s),r===void 0)continue;n+=',"'+l+'":'+r}return n}function Ri(e,t,r,n){if(t&&typeof t=="function")return t=t.bind(n),It(t(e),r,e);try{let i=C("pino-pretty").prettyFactory;return i.asMetaWrapper=It,It(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 It(e,t,r){r=Object.assign({suppressFlushSyncWarning:!1},r);let n=!1;return{[Mi]:!0,lastLevel:0,lastMsg:null,lastObj:null,lastLogger:null,flushSync(){r.suppressFlushSyncWarning||n||(n=!0,Ei(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(qt)?s=i[qt]:(s=JSON.parse("{"+i[Ct].substr(1)+"}"),i[qt]=s),s):null},write(i){let s=this.lastLogger,o=this.chindings(),c=this.lastTime;typeof c=="number"||(c.match(/^\d+/)?c=parseInt(c):c=c.slice(1,-1));let a=this.lastObj,u=this.lastMsg,l=null,h=s[zt],p=h.log?h.log(a):a,d=s[ki];u&&p&&!Object.prototype.hasOwnProperty.call(p,d)&&(p[d]=u);let f=Object.assign({level:this.lastLevel,time:c},p,l),y=s[Bt],S=Object.keys(y);for(var v=0;v<S.length;v++){let E=S[v];f[E]!==void 0&&(f[E]=y[E](f[E]))}for(let E in o)f.hasOwnProperty(E)||(f[E]=o[E]);let w=s[$t][Wa],x=e(typeof w=="function"?w(f):f);x!==void 0&&(Ei(t,this),t.write(x))}}}function Qa(e){return e.write!==e.constructor.prototype.write}function ze(e){let t=new Pt(e);return t.on("error",r),!e.sync&&Ja&&Za(t),t;function r(n){if(n.code==="EPIPE"){t.write=ve,t.end=ve,t.flushSync=ve,t.destroy=ve;return}t.removeListener("error",r),t.emit("error",n)}}function Za(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=Tt();t.register(e,el),e.on("close",function(){t.unregister(e)})}}function el(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function tl(e){return function(r,n,i={},s){if(typeof i=="string")s=ze({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=ze({dest:s,sync:!0})}else if(i instanceof Pt||i.writable||i._writableState)s=i,i={};else if(i.transport){if(i.transport instanceof Pt||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=Ha(Q(z({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:o,prettyPrint:c,prettifier:a,messageKey:u}=i;if(o===!1&&(i.level="silent"),s=s||process.stdout,s===process.stdout&&s.fd>=0&&!Qa(s)&&(s=ze({fd:s.fd,sync:!0})),c){xi.emit("PINODEP008");let l=Object.assign({messageKey:u},c);s=Ri(l,a,s,r)}return{opts:i,stream:s}}}function rl(e,t){if(Number(process.versions.node.split(".")[0])>=14&&xi.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[Ka];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:(o,c)=>c in o.levels.values?(...a)=>{o[c](...a),i.flushSync()}:o[c]});if(!n){try{i.flushSync()}catch(o){}return s}return(o=null,...c)=>{try{i.flushSync()}catch(a){}return t(o,s,...c)}}function nl(e,t){try{return JSON.stringify(e)}catch(r){try{return(t||this[Dt])(e)}catch(n){return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function il(e,t,r){return{level:e,bindings:t,log:r}}function Ei(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 sl(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e}Ai.exports={noop:ve,buildSafeSonicBoom:ze,getPrettyStream:Ri,asChindings:Xa,asJson:Ya,genLog:Ga,createArgsNormalizer:tl,final:rl,stringify:nl,buildFormatters:il,normalizeDestFileDescriptor:sl}});var Fe=_((hf,ji)=>{"use strict";var{lsCacheSym:ol,levelValSym:Nt,useOnlyCustomLevelsSym:al,streamSym:ll,formattersSym:cl,hooksSym:ul}=pe(),{noop:fl,genLog:le}=Ne(),Y={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Li={fatal:e=>{let t=le(Y.fatal,e);return function(...r){let n=this[ll];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)},Ft=Object.keys(Y).reduce((e,t)=>(e[Y[t]]=t,e),{}),hl=Object.keys(Ft).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function dl(e){let t=e[cl].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[ol]=n,e}function pl(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 yl(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[Nt],i=this[Nt]=r[e],s=this[al],o=this[ul].logMethod;for(let c in r){if(i>r[c]){this[c]=fl;continue}this[c]=pl(c,s)?Li[c](o):le(r[c],o)}this.emit("level-change",e,i,t[n],n)}function gl(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function ml(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&r>=this[Nt]}function bl(e=null,t=!1){let r=e?Object.keys(e).reduce((s,o)=>(s[e[o]]=o,s),{}):null,n=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:Ft,r),i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:Y,e);return{labels:n,values:i}}function wl(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),r?[]:Object.keys(Ft).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 Sl(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")}}ji.exports={initialLsCache:hl,genLsCache:dl,levelMethods:Li,getLevel:gl,setLevel:yl,isLevelEnabled:ml,mappings:bl,levels:Y,assertNoLevelCollisions:Sl,assertDefaultLevelFound:wl}});var qi=_((df,vl)=>{vl.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 Wt=_((pf,Ii)=>{"use strict";var{version:Ol}=qi();Ii.exports={version:Ol}});var Ki=_((gf,Wi)=>{"use strict";var{EventEmitter:El}=C("events"),{lsCacheSym:xl,levelValSym:_l,setLevelSym:Ut,getLevelSym:Pi,chindingsSym:Vt,parsedChindingsSym:Tl,mixinSym:Ml,asJsonSym:Di,writeSym:kl,mixinMergeStrategySym:Rl,timeSym:Al,timeSliceIndexSym:Ll,streamSym:zi,serializersSym:ce,formattersSym:Kt,useOnlyCustomLevelsSym:jl,needsMetadataGsym:ql,redactFmtSym:Il,stringifySym:Pl,formatOptsSym:Cl,stringifiersSym:Bl}=pe(),{getLevel:$l,setLevel:Dl,isLevelEnabled:zl,mappings:Nl,initialLsCache:Fl,genLsCache:Wl,assertNoLevelCollisions:Kl}=Fe(),{asChindings:Ni,asJson:Ul,buildFormatters:Ci,stringify:Bi}=Ne(),{version:Vl}=Wt(),Jl=wt(),Hl=class{},Fi={constructor:Hl,child:Gl,bindings:Yl,setBindings:Xl,flush:tc,isLevelEnabled:zl,version:Vl,get level(){return this[Pi]()},set level(e){this[Ut](e)},get levelVal(){return this[_l]},set levelVal(e){throw Error("levelVal is read-only")},[xl]:Fl,[kl]:Zl,[Di]:Ul,[Pi]:$l,[Ut]:Dl};Object.setPrototypeOf(Fi,El.prototype);Wi.exports=function(){return Object.create(Fi)};var $i=e=>e;function Gl(e,t){if(!e)throw Error("missing bindings for child Pino");t=t||{};let r=this[ce],n=this[Kt],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 a=Object.getOwnPropertySymbols(r);for(var s=0;s<a.length;s++){let l=a[s];i[ce][l]=r[l]}for(let l in t.serializers)i[ce][l]=t.serializers[l];let u=Object.getOwnPropertySymbols(t.serializers);for(var o=0;o<u.length;o++){let l=u[o];i[ce][l]=t.serializers[l]}}else i[ce]=r;if(t.hasOwnProperty("formatters")){let{level:a,bindings:u,log:l}=t.formatters;i[Kt]=Ci(a||n.level,u||$i,l||n.log)}else i[Kt]=Ci(n.level,$i,n.log);if(t.hasOwnProperty("customLevels")===!0&&(Kl(this.levels,t.customLevels),i.levels=Nl(t.customLevels,i[jl]),Wl(i)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){i.redact=t.redact;let a=Jl(i.redact,Bi),u={stringify:a[Il]};i[Pl]=Bi,i[Bl]=a,i[Cl]=u}i[Vt]=Ni(i,e);let c=t.level||this.level;return i[Ut](c),i}function Yl(){let t=`{${this[Vt].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function Xl(e){let t=Ni(this,e);this[Vt]=t,delete this[Tl]}function Ql(e,t){return Object.assign(t,e)}function Zl(e,t,r){let n=this[Al](),i=this[Ml],s=this[Rl]||Ql,o;e==null?o={}:e instanceof Error?(o={err:e},t===void 0&&(t=e.message)):(o=e,t===void 0&&e.err&&(t=e.err.message)),i&&(o=s(o,i(o,r)));let c=this[Di](o,t,r,n),a=this[zi];a[ql]===!0&&(a.lastLevel=r,a.lastObj=o,a.lastMsg=t,a.lastTime=n.slice(this[Ll]),a.lastLogger=this),a.write(c)}function ec(){}function tc(){let e=this[zi];"flush"in e&&e.flush(ec)}});var Hi=_((Yt,Ji)=>{"use strict";var{hasOwnProperty:Oe}=Object.prototype,fe=Gt();fe.configure=Gt;fe.stringify=fe;fe.default=fe;Yt.stringify=fe;Yt.configure=Gt;Ji.exports=fe;var rc=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function ie(e){return e.length<5e3&&!rc.test(e)?`"${e}"`:JSON.stringify(e)}function Jt(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 nc=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Ht(e){return nc.call(e)!==void 0&&e.length!==0}function Ui(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 ic(e){if(Oe.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 sc(e){let t;if(Oe.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 oc(e,t){let r;if(Oe.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 Vi(e,t){let r;if(Oe.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 ac(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function lc(e){if(Oe.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 Gt(e){e=z({},e);let t=lc(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=ic(e),n=oc(e,"bigint"),i=sc(e),s=typeof i=="function"?i:void 0,o=Vi(e,"maximumDepth"),c=Vi(e,"maximumBreadth");function a(d,f,y,S,v,O){let w=f[d];switch(typeof w=="object"&&w!==null&&typeof w.toJSON=="function"&&(w=w.toJSON(d)),w=S.call(f,d,w),typeof w){case"string":return ie(w);case"object":{if(w===null)return"null";if(y.indexOf(w)!==-1)return r;let x="",E=",",M=O;if(Array.isArray(w)){if(w.length===0)return"[]";if(o<y.length+1)return'"[Array]"';y.push(w),v!==""&&(O+=v,x+=`
81
+ ${O}`,E=`,
82
+ ${O}`);let A=Math.min(w.length,c),I=0;for(;I<A-1;I++){let D=a(String(I),w,y,S,v,O);x+=D!==void 0?D:"null",x+=E}let j=a(String(I),w,y,S,v,O);if(x+=j!==void 0?j:"null",w.length-1>c){let D=w.length-c-1;x+=`${E}"... ${ue(D)} not stringified"`}return v!==""&&(x+=`
83
+ ${M}`),y.pop(),`[${x}]`}let R=Object.keys(w),k=R.length;if(k===0)return"{}";if(o<y.length+1)return'"[Object]"';let T="",L="";v!==""&&(O+=v,E=`,
84
+ ${O}`,T=" ");let m=Math.min(k,c);i&&!Ht(w)&&(R=Jt(R,s)),y.push(w);for(let A=0;A<m;A++){let I=R[A],j=a(I,w,y,S,v,O);j!==void 0&&(x+=`${L}${ie(I)}:${T}${j}`,L=E)}if(k>c){let A=k-c;x+=`${L}"...":${T}"${ue(A)} not stringified"`,L=E}return v!==""&&L.length>1&&(x=`
85
+ ${O}${x}
86
+ ${M}`),y.pop(),`{${x}}`}case"number":return isFinite(w)?String(w):t?t(w):"null";case"boolean":return w===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(w);default:return t?t(w):void 0}}function u(d,f,y,S,v,O){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(d)),typeof f){case"string":return ie(f);case"object":{if(f===null)return"null";if(y.indexOf(f)!==-1)return r;let w=O,x="",E=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(o<y.length+1)return'"[Array]"';y.push(f),v!==""&&(O+=v,x+=`
87
+ ${O}`,E=`,
88
+ ${O}`);let k=Math.min(f.length,c),T=0;for(;T<k-1;T++){let m=u(String(T),f[T],y,S,v,O);x+=m!==void 0?m:"null",x+=E}let L=u(String(T),f[T],y,S,v,O);if(x+=L!==void 0?L:"null",f.length-1>c){let m=f.length-c-1;x+=`${E}"... ${ue(m)} not stringified"`}return v!==""&&(x+=`
89
+ ${w}`),y.pop(),`[${x}]`}y.push(f);let M="";v!==""&&(O+=v,E=`,
90
+ ${O}`,M=" ");let R="";for(let k of S){let T=u(k,f[k],y,S,v,O);T!==void 0&&(x+=`${R}${ie(k)}:${M}${T}`,R=E)}return v!==""&&R.length>1&&(x=`
91
+ ${O}${x}
92
+ ${w}`),y.pop(),`{${x}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return t?t(f):void 0}}function l(d,f,y,S,v){switch(typeof f){case"string":return ie(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(d),typeof f!="object")return l(d,f,y,S,v);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let O=v;if(Array.isArray(f)){if(f.length===0)return"[]";if(o<y.length+1)return'"[Array]"';y.push(f),v+=S;let T=`
93
+ ${v}`,L=`,
94
+ ${v}`,m=Math.min(f.length,c),A=0;for(;A<m-1;A++){let j=l(String(A),f[A],y,S,v);T+=j!==void 0?j:"null",T+=L}let I=l(String(A),f[A],y,S,v);if(T+=I!==void 0?I:"null",f.length-1>c){let j=f.length-c-1;T+=`${L}"... ${ue(j)} not stringified"`}return T+=`
95
+ ${O}`,y.pop(),`[${T}]`}let w=Object.keys(f),x=w.length;if(x===0)return"{}";if(o<y.length+1)return'"[Object]"';v+=S;let E=`,
96
+ ${v}`,M="",R="",k=Math.min(x,c);Ht(f)&&(M+=Ui(f,E,c),w=w.slice(f.length),k-=f.length,R=E),i&&(w=Jt(w,s)),y.push(f);for(let T=0;T<k;T++){let L=w[T],m=l(L,f[L],y,S,v);m!==void 0&&(M+=`${R}${ie(L)}: ${m}`,R=E)}if(x>c){let T=x-c;M+=`${R}"...": "${ue(T)} not stringified"`,R=E}return R!==""&&(M=`
97
+ ${v}${M}
98
+ ${O}`),y.pop(),`{${M}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return t?t(f):void 0}}function h(d,f,y){switch(typeof f){case"string":return ie(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(d),typeof f!="object")return h(d,f,y);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let S="",v=f.length!==void 0;if(v&&Array.isArray(f)){if(f.length===0)return"[]";if(o<y.length+1)return'"[Array]"';y.push(f);let M=Math.min(f.length,c),R=0;for(;R<M-1;R++){let T=h(String(R),f[R],y);S+=T!==void 0?T:"null",S+=","}let k=h(String(R),f[R],y);if(S+=k!==void 0?k:"null",f.length-1>c){let T=f.length-c-1;S+=`,"... ${ue(T)} not stringified"`}return y.pop(),`[${S}]`}let O=Object.keys(f),w=O.length;if(w===0)return"{}";if(o<y.length+1)return'"[Object]"';let x="",E=Math.min(w,c);v&&Ht(f)&&(S+=Ui(f,",",c),O=O.slice(f.length),E-=f.length,x=","),i&&(O=Jt(O,s)),y.push(f);for(let M=0;M<E;M++){let R=O[M],k=h(R,f[R],y);k!==void 0&&(S+=`${x}${ie(R)}:${k}`,x=",")}if(w>c){let M=w-c;S+=`${x}"...":"${ue(M)} not stringified"`}return y.pop(),`{${S}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return t?t(f):void 0}}function p(d,f,y){if(arguments.length>1){let S="";if(typeof y=="number"?S=" ".repeat(Math.min(y,10)):typeof y=="string"&&(S=y.slice(0,10)),f!=null){if(typeof f=="function")return a("",{"":d},[],f,S,"");if(Array.isArray(f))return u("",d,[],ac(f),S,"")}if(S.length!==0)return l("",d,[],S,"")}return h("",d,[])}return p}});var Qi=_((bf,Xi)=>{"use strict";var Xt=Symbol.for("pino.metadata"),{levels:Gi}=Fe(),Yi=Object.create(Gi);Yi.silent=1/0;var cc=Gi.info;function uc(e,t){let r=0;e=e||[],t=t||{dedupe:!1};let n=Yi;t.levels&&typeof t.levels=="object"&&(n=t.levels);let i={write:s,add:c,flushSync:o,end:a,minLevel:0,streams:[],clone:u,[Xt]:!0};return Array.isArray(e)?e.forEach(c,i):c.call(i,e),e=null,i;function s(l){let h,p=this.lastLevel,{streams:d}=this,f;for(let y=0;y<d.length&&(h=d[y],h.level<=p);y++){if(f=h.stream,f[Xt]){let{lastTime:S,lastMsg:v,lastObj:O,lastLogger:w}=this;f.lastLevel=p,f.lastTime=S,f.lastMsg=v,f.lastObj=O,f.lastLogger=w}(!t.dedupe||h.level===p)&&f.write(l)}}function o(){for(let{stream:l}of this.streams)typeof l.flushSync=="function"&&l.flushSync()}function c(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,f;typeof l.levelVal=="number"?f=l.levelVal:typeof l.level=="string"?f=n[l.level]:typeof l.level=="number"?f=l.level:f=cc;let y={stream:p,level:f,levelVal:void 0,id:r++};return d.unshift(y),d.sort(fc),this.minLevel=d[0].level,i}function a(){for(let{stream:l}of this.streams)typeof l.flushSync=="function"&&l.flushSync(),l.end()}function u(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:c,minLevel:l,streams:h,clone:u,flushSync:o,[Xt]:!0}}}function fc(e,t){return e.level-t.level}Xi.exports=uc});var fs=_((wf,J)=>{"use strict";var hc=C("os"),os=ft(),dc=ht(),pc=wt(),as=Un(),yc=Ki(),ls=pe(),{configure:gc}=Hi(),{assertDefaultLevelFound:mc,mappings:cs,genLsCache:bc,levels:wc}=Fe(),{createArgsNormalizer:Sc,asChindings:vc,final:Oc,buildSafeSonicBoom:Zi,buildFormatters:Ec,stringify:We,normalizeDestFileDescriptor:es,noop:xc}=Ne(),{version:_c}=Wt(),{chindingsSym:ts,redactFmtSym:Tc,serializersSym:rs,timeSym:Mc,timeSliceIndexSym:kc,streamSym:Rc,stringifySym:ns,stringifySafeSym:Qt,stringifiersSym:is,setLevelSym:Ac,endSym:Lc,formatOptsSym:jc,messageKeySym:qc,nestedKeySym:Ic,mixinSym:Pc,useOnlyCustomLevelsSym:Cc,formattersSym:ss,hooksSym:Bc,nestedKeyStrSym:$c,mixinMergeStrategySym:Dc}=ls,{epochTime:us,nullTime:zc}=as,{pid:Nc}=process,Fc=hc.hostname(),Wc=os.err,Kc={level:"info",levels:wc,messageKey:"msg",nestedKey:null,enabled:!0,prettyPrint:!1,base:{pid:Nc,hostname:Fc},serializers:Object.assign(Object.create(null),{err:Wc}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0},timestamp:us,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},Uc=Sc(Kc),Vc=Object.assign(Object.create(null),os);function Zt(...e){let t={},{opts:r,stream:n}=Uc(t,dc(),...e),{redact:i,crlf:s,serializers:o,timestamp:c,messageKey:a,nestedKey:u,base:l,name:h,level:p,customLevels:d,mixin:f,mixinMergeStrategy:y,useOnlyCustomLevels:S,formatters:v,hooks:O,depthLimit:w,edgeLimit:x}=r,E=gc({maximumDepth:w,maximumBreadth:x}),M=Ec(v.level,v.bindings,v.log),R=i?pc(i,We):{},k=We.bind({[Qt]:E}),T=i?{stringify:R[Tc]}:{stringify:k},L="}"+(s?`\r
99
99
  `:`
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};
100
+ `),m=vc.bind(null,{[ts]:"",[rs]:o,[is]:R,[ns]:We,[Qt]:E,[ss]:M}),A="";l!==null&&(h===void 0?A=m(l):A=m(Object.assign({},l,{name:h})));let I=c instanceof Function?c:c?us:zc,j=I().indexOf(":")+1;if(S&&!d)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(f&&typeof f!="function")throw Error(`Unknown mixin type "${typeof f}" - expected "function"`);mc(p,d,S);let D=cs(d,S);return Object.assign(t,{levels:D,[Cc]:S,[Rc]:n,[Mc]:I,[kc]:j,[ns]:We,[Qt]:E,[is]:R,[Lc]:L,[jc]:T,[qc]:a,[Ic]:u,[$c]:u?`,${JSON.stringify(u)}:{`:"",[rs]:o,[Pc]:f,[Dc]:y,[ts]:A,[ss]:M,[Bc]:O,silent:xc}),Object.setPrototypeOf(t,yc()),bc(t),t[Ac](p),t}J.exports=Zt;J.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=es(e.dest||process.stdout.fd),Zi(e)):Zi({dest:es(e),minLength:0,sync:!0});J.exports.transport=jt();J.exports.multistream=Qi();J.exports.final=Oc;J.exports.levels=cs();J.exports.stdSerializers=Vc;J.exports.stdTimeFunctions=Object.assign({},as);J.exports.symbols=ls;J.exports.version=_c;J.exports.default=Zt;J.exports.pino=Zt});var en=be(it());import*as G from"@whiskeysockets/baileys";import{EventEmitter as Fs}from"events";var Zr=class extends Fs{connection(t){var o;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 c=(o=new en.default.Boom(n==null?void 0:n.error))==null?void 0:o.output.statusCode;({[G.DisconnectReason.badSession]:this.restart.bind(this),[G.DisconnectReason.connectionClosed]:this.restart.bind(this),[G.DisconnectReason.connectionLost]:this.restart.bind(this),[G.DisconnectReason.connectionReplaced]:()=>{console.log("Connection Replaced, New Session Opened, Please Close Current Session First"),this.restart()},[G.DisconnectReason.loggedOut]:()=>{console.log("Device Logged Out, Please Connect Again"),this.restart()},[G.DisconnectReason.restartRequired]:this.restart.bind(this),[G.DisconnectReason.multideviceMismatch]:()=>{console.log("Multi-device Mismatch, Please Connect Again"),this.restart()}}[c]||(()=>{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=G.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=G.jidNormalizedUser(r.id);this.store&&this.store.contacts&&this.store.contacts[n]!=null&&Q(z(z({},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]=z(z({},this.store.groupMetadata[n]||{}),r))}}};var bs=be(it()),Ue=be(st()),ws=be(fs());import*as P from"@whiskeysockets/baileys";import gs from"chalk";var hs=be(st());import Jc from"beautify-console-log";import Hc from"chalk";var ds=Jc.getInstance();ds.setPadStartText({title:"",logType:"error"}).setPadStartText({title:"",logType:"info"}).setPadStartText({title:"",logType:"log"}).setPadStartText({title:"",logType:"warn"});var Ke=ds,er=console.log,Of=new hs.default,ps=(e="succeed")=>Hc[{succeed:"bgGreen",fail:"bgRed",warn:"bgYellow",info:"bgCyan"}[e]](" "),Ef=e=>new Promise(t=>setTimeout(t,e));import Gc from"cfonts";import he from"chalk";var ys={text:"text",conversation:"text",imageMessage:"image",contactMessage:"contact",locationMessage:"location",extendedTextMessage:"text",documentMessage:"document",audioMessage:"audio",videoMessage:"video",protocolMessage:"protocol",contactsArrayMessage:"contactsArray",highlyStructuredMessage:"highlyStructured",sendPaymentMessage:"sendPayment",liveLocationMessage:"liveLocation",requestPaymentMessage:"requestPayment",declinePaymentRequestMessage:"declinePaymentRequest",cancelPaymentRequestMessage:"cancelPaymentRequest",templateMessage:"template",stickerMessage:"sticker",groupInviteMessage:"groupInvite",templateButtonReplyMessage:"templateButtonReply",productMessage:"product",deviceSentMessage:"deviceSent",listMessage:"list",viewOnceMessage:"viewOnce",orderMessage:"order",listResponseMessage:"listResponse",ephemeralMessage:"ephemeral",invoiceMessage:"invoice",buttonsMessage:"buttons",buttonsResponseMessage:"buttonsResponse",paymentInviteMessage:"paymentInvite",interactiveMessage:"interactive",reactionMessage:"reaction",stickerSyncRmrMessage:"sticker",interactiveResponseMessage:"interactiveResponse",pollCreationMessage:"pollCreation",pollUpdateMessage:"pollUpdate",keepInChatMessage:"keepInChat",documentWithCaptionMessage:"document",requestPhoneNumberMessage:"requestPhoneNumber",viewOnceMessageV2:"viewOnce",encReactionMessage:"reaction",editedMessage:"text",viewOnceMessageV2Extension:"viewOnce",pollCreationMessageV2:"pollCreation",scheduledCallCreationMessage:"scheduledCallCreation",groupMentionedMessage:"groupMentioned",pinInChatMessage:"pinInChat",pollCreationMessageV3:"pollCreation",scheduledCallEditMessage:"scheduledCallEdit",ptvMessage:"ptv",botInvokeMessage:"botInvoke",callLogMesssage:"callLog",encCommentMessage:"encComment",bcallMessage:"bcall",lottieStickerMessage:"lottieSticker",eventMessage:"event",commentMessage:"comment",newsletterAdminInviteMessage:"text",extendedTextMessageWithParentKey:"text",placeholderMessage:"placeholder",encEventUpdateMessage:"encEventUpdate"};import Yc from"ora";import Xc from"dayjs";var Ee=class{constructor(){this.bannerLogo=" Zaileys ",this.copyright=`Copyright \xA9 ${new Date().getFullYear()} by zaadevofc`,this.spinner=Yc({color:"yellow",spinner:"dots3"})}banner(){Gc.say(this.bannerLogo,{font:"slick",colors:["#ffce51","blue"],letterSpacing:0}),er(" ".repeat(5),he`{yellowBright.italic.bold ${this.copyright} }`),er(`
101
+ `+he`{dim =}`.repeat(42)+`
102
+ `)}msgLogs(t){if(!t)return;let{roomType:r,msgType:n,msgBody:i,msgTimestamp:s,roomId:o,senderId:c}=t,a=o.split("@")[0],u=c.split("@")[0],l=Xc(s).format("HH:mm:ss DD/MM/YYYY"),h=he`{dim.bold.underline ${l}}\n`;h+=he`{bgBlue.underline } {yellow.bold ${r.toUpperCase()}} {cyan >>} {green.bold ${r=="group"?a:u}}\n`,h+=r=="group"?he`{bgBlue.underline } {yellow.bold SENDER} {cyan >>} {green.bold ${u}}\n`:"",h+=he`{bgBlue } {yellow.bold.italic ${n.toUpperCase()}} {cyan >>} {bold ${i}}`,console.log(h)}runSpinner(t){this.spinner.start(he`${t}`)}editSpinner(t){this.spinner&&(this.spinner.text=t)}stopSpinner(t="succeed",r){this.spinner&&this.spinner.stopAndPersist({text:r,symbol:ps(t)})}},Qc=new Ee;Qc.banner();import*as se from"@whiskeysockets/baileys";var tr=e=>/:\d+@/gi.test(e)?se.jidNormalizedUser(e):e;function de(e,t,r){var a,u,l,h,p,d,f,y,S,v,O,w,x,E,M,R,k,T,L;if(!(r!=null&&r.message)||r!=null&&r.messageStubType||((a=r==null?void 0:r.key)==null?void 0:a.remoteJid)==="status@broadcast")return;let n=m=>{if(m)return Object.keys(m).find(j=>(j==="conversation"||j.endsWith("Message")||j.endsWith("V2")||j.endsWith("V3"))&&j!=="senderKeyDistributionMessage")},i=tr((u=e.user)==null?void 0:u.id),s=()=>{var m,A,I,j,D,te;return(A=(m=r==null?void 0:r.key)==null?void 0:m.remoteJid)!=null&&A.endsWith("@g.us")?"group":(j=(I=r==null?void 0:r.key)==null?void 0:I.remoteJid)!=null&&j.endsWith("@s.whatsapp.net")?"private":(te=(D=r==null?void 0:r.key)==null?void 0:D.remoteJid)!=null&&te.endsWith("@newsletter")?"channel":"private"},o={},c=se==null?void 0:se.extractMessageContent(r==null?void 0:r.message);if(o.roomId=tr((l=r==null?void 0:r.key)==null?void 0:l.remoteJid),o.roomType=s(),o.senderId=tr((r==null?void 0:r.participant)||((h=r==null?void 0:r.key)==null?void 0:h.participant)||((p=r==null?void 0:r.key)==null?void 0:p.remoteJid)||((d=r==null?void 0:r.message)==null?void 0:d.participant)),o.senderName=r==null?void 0:r.pushName,o.isMe=!!((f=r==null?void 0:r.key)!=null&&f.fromMe)||!!i.match(o.senderId),o.isBot=!!((S=(y=r==null?void 0:r.key)==null?void 0:y.id)!=null&&S.startsWith("BAE5")),o.isMedia=!1,o.isEphemeral=!1,o.isAuthor=!!t.authors.some(m=>!!m.toString().match(o.senderId.split("@")[0])),!(t.ignoreMe&&o.isMe)){if(c){o.msgType=n(c);let m=(se==null?void 0:se.extractMessageContent(c[o==null?void 0:o.msgType]))||c[o==null?void 0:o.msgType];if(o.msgBody=(m==null?void 0:m.text)||(m==null?void 0:m.caption)||(c==null?void 0:c.conversation)||(m==null?void 0:m.selectedButtonId)||((v=m==null?void 0:m.singleSelectReply)==null?void 0:v.selectedRowId)||(m==null?void 0:m.selectedId)||(m==null?void 0:m.contentText)||(m==null?void 0:m.selectedDisplayText)||(m==null?void 0:m.title)||(m==null?void 0:m.name)||"",o.msgMentions=((O=m==null?void 0:m.contextInfo)==null?void 0:O.mentionedJid)||[],o.msgExpiration=((w=m==null?void 0:m.contextInfo)==null?void 0:w.expiration)||0,o.msgTimestamp=typeof(r==null?void 0:r.messageTimestamp)=="number"?r==null?void 0:r.messageTimestamp:(x=r==null?void 0:r.messageTimestamp)!=null&&x.low?(E=r==null?void 0:r.messageTimestamp)==null?void 0:E.low:(M=r==null?void 0:r.messageTimestamp)==null?void 0:M.high,o.isEphemeral=o.msgExpiration>0,o.isMedia=!!(m!=null&&m.mimetype)||!!(m!=null&&m.thumbnailDirectPath),o!=null&&o.isMedia&&Object.assign(o,{msgMedia:{url:m==null?void 0:m.url,mimetype:m==null?void 0:m.mimetype,size:m==null?void 0:m.fileLength,height:(m==null?void 0:m.height)||0,width:(m==null?void 0:m.width)||0,isAnimated:/webp/i.test(m==null?void 0:m.mimetype)?!!(m!=null&&m.isAnimated):!1,isAvatar:!!(m!=null&&m.isAvatar),isAiSticker:!!(m!=null&&m.isAiSticker),isLottie:!!(m!=null&&m.isLottie)}}),(R=m==null?void 0:m.contextInfo)!=null&&R.quotedMessage){let A=(L=(k=e==null?void 0:e.messages)==null?void 0:k[o.roomId])==null?void 0:L.get((T=m==null?void 0:m.contextInfo)==null?void 0:T.stanzaId);o.msgQuoted=de(e,t,A)}}return o.payload=()=>r,o.key=()=>r.key,o.msgType=ys[o==null?void 0:o.msgType],o.msgTimestamp=o.msgTimestamp*1e3,o}}var ms=class{constructor(t){var r,n,i,s,o;this.phoneNumber=t.phoneNumber,this.method=t.method,this.showLogs=(r=t.showLogs)!=null?r:!0,this.markOnline=(n=t.markOnline)!=null?n:!0,this.autoRead=(i=t.autoRead)!=null?i:!0,this.authors=(s=t.authors)!=null?s:[],this.ignoreMe=(o=t.ignoreMe)!=null?o:!0,this.pino=(0,ws.default)({enabled:!1}),this.authPath="./.zaileys/zaileys-auth/",this.credsPath=this.authPath+"creds.json",this.storePath=this.authPath+"store.json",this.logger=new Ee,this.logger.runSpinner("Initializing zaileys connection..."),this.listeners=new Map,this.initialize()}initialize(){return re(this,null,function*(){let{state:t,saveCreds:r}=yield P.useMultiFileAuthState(this.authPath),n=P.makeInMemoryStore({logger:this.pino});n.readFromFile(this.storePath),this.client=P.default({logger:this.pino,markOnlineOnConnect:this.markOnline,printQRInTerminal:this.method==="qr",browser:P.Browsers.ubuntu("Safari"),auth:t,qrTimeout:6e4,connectTimeoutMs:6e4,keepAliveIntervalMs:6e4,mobile:!1,syncFullHistory:!1,defaultQueryTimeoutMs:void 0,generateHighQualityLinkPreview:!1,userDevicesCache:new Ue.default,msgRetryCounterCache:new Ue.default,placeholderResendCache:new Ue.default}),n.bind(this.client.ev);for(let i in n)this.client[i]=n[i];this.client.ev.on("creds.update",r),yield this.pairingCode(),this.handler(),setInterval(()=>{n.writeToFile(this.storePath)},5e3)})}pairingCode(){return re(this,null,function*(){if(!this.client.authState.creds.registered&&this.method==="pairing"){let t=this.phoneNumber.toString().replace(/[^0-9]/g,"");Object.keys(P.PHONENUMBER_MCC).some(n=>t.startsWith(n))||(Ke.error("Invalid phone number, please try again"),process.exit(0)),setTimeout(()=>re(this,null,function*(){var n,i;try{let s=yield this.client.requestPairingCode(t);s=(i=(n=s==null?void 0:s.match(/.{1,4}/g))==null?void 0:n.join("-"))!=null?i:"",Ke.info(gs`{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){Ke.error(s),process.exit(0)}}),1e3)}})}handler(){var t,r,n,i;(r=(t=this.client)==null?void 0:t.ev)==null||r.on("connection.update",s=>{var l,h,p,d,f;let{lastDisconnect:o,connection:c,qr:a,receivedPendingNotifications:u}=s;if(u&&((l=this.client)==null||l.ev.flush()),c==="close"){let y=(h=new bs.Boom(o==null?void 0:o.error))==null?void 0:h.output,S=y==null?void 0:y.statusCode;S===P.DisconnectReason.badSession?(this.logger.stopSpinner("fail","Session file corrupted. Please delete session and scan again"),this.initialize()):S===P.DisconnectReason.connectionClosed?(this.logger.stopSpinner("warn","Connection closed. Reconnecting..."),this.initialize()):S===P.DisconnectReason.connectionLost?(this.logger.stopSpinner("warn","Lost connection to server. Reconnecting..."),this.initialize()):S===P.DisconnectReason.connectionReplaced?(this.logger.stopSpinner("fail","Connection replaced. Please close current session"),process.exit(0)):S===P.DisconnectReason.loggedOut?(this.logger.stopSpinner("fail","Device logged out. Please scan again"),process.exit(0)):S===P.DisconnectReason.restartRequired?(this.logger.stopSpinner("info","Restart required. Restarting..."),this.initialize()):S===P.DisconnectReason.timedOut?(this.logger.stopSpinner("warn","Connection timeout. Restarting..."),this.initialize()):S===P.DisconnectReason.multideviceMismatch?(this.logger.stopSpinner("fail","Multi-device mismatch. Please scan again"),process.exit(0)):S===1006?(this.logger.stopSpinner("fail","Error at internal system, trying to reconnect..."),this.initialize()):(this.logger.stopSpinner("warn",`Disconnected: ${y}`),this.initialize())}if(c==="connecting"&&this.logger.editSpinner("Connecting to WhatsApp..."),c==="open"){let y=((p=this.client.authState.creds.me)==null?void 0:p.name)||((d=this.client.authState.creds.me)==null?void 0:d.verifiedName)||((f=this.client.authState.creds.me)==null?void 0:f.id);this.logger.stopSpinner("succeed","Connected to WhatsApp"),this.logger.stopSpinner("info",gs`Connected as {yellowBright.bold ${y}}\n`)}}),(i=(n=this.client)==null?void 0:n.ev)==null||i.on("messages.upsert",s=>{let o=s.messages.map(c=>de(this.client,this,c));this.showLogs&&o.map(c=>this.logger.msgLogs(c)),o.map(c=>c&&this.emit("message",c))})}emit(t,r){let n=this.listeners.get(t);n&&n(r)}on(t,r){this.listeners.set(t,r)}parseMentions(t){try{return t.match(/@\d+/g).map(n=>n.slice(1)+"@s.whatsapp.net")}catch(r){return[]}}send(t,r){return re(this,null,function*(){let n=yield this.client.sendMessage(t.roomId,{text:r,mentions:this.parseMentions(r)});return de(this.client,this,n)})}reply(t,r){return re(this,null,function*(){let n=yield this.client.sendMessage(t==null?void 0:t.roomId,{text:r,mentions:this.parseMentions(r)},{quoted:t==null?void 0:t.payload()});return de(this.client,this,n)})}edit(t,r,n){return re(this,null,function*(){let i=yield this.client.sendMessage(t==null?void 0:t.roomId,{text:n,mentions:this.parseMentions(n),edit:r.key()});return de(this.client,this,i)})}reaction(t,r){return re(this,null,function*(){let n=yield this.client.sendMessage(t==null?void 0:t.roomId,{react:{text:r,key:t.key()}});return de(this.client,this,n)})}};export{Zr as Actions,ms as Client,Ee as Logger,ys as MESSAGE_TYPE,de as Serialize,Ke as bLog,er as cLog,Of as cache,tr as decodeJid,ps as logBlock,Ef as sleep};