@ckirg/corelib-cloud 0.1.22 → 0.2.0
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/aws/RequestUnlimited-CXTEHPLC.mjs +2 -0
- package/dist/aws/bun-THMEYPJD.mjs +2 -0
- package/dist/aws/chunk-6G4LF4KV.mjs +2 -0
- package/dist/aws/{chunk-F2KTMAO3.mjs → chunk-BIWQVQOH.mjs} +1 -1
- package/dist/aws/{chunk-Y7RZHZ53.mjs → chunk-QDX5GFCD.mjs} +1 -1
- package/dist/aws/chunk-QE5QGPOG.mjs +24 -0
- package/dist/aws/{chunk-V3XZ4XYN.mjs → chunk-XFLNYUID.mjs} +1 -1
- package/dist/aws/chunk-Z5QO7O62.mjs +8 -0
- package/dist/aws/chunk-ZGHY5A62.mjs +2 -0
- package/dist/aws/cloudflare-QTQSRNP7.mjs +2 -0
- package/dist/aws/deno-BKEQIY74.mjs +2 -0
- package/dist/{cloudrun/gcp-W76U73T6.js → aws/gcp-VNE5WPOL.mjs} +1 -1
- package/dist/aws/handler.mjs +3 -3
- package/dist/aws/lambda-4S67INQI.mjs +3 -0
- package/dist/aws/node-RQLZ4GQE.mjs +2 -0
- package/dist/aws/utils-5YBC32TV.mjs +2 -0
- package/dist/cloudflare/RequestUnlimited-OE7GCYBY.js +1 -0
- package/dist/cloudflare/bun-B6T46QQU.js +1 -0
- package/dist/cloudflare/{chunk-QPTGW2LL.js → chunk-BHGBRQZV.js} +1 -1
- package/dist/cloudflare/{chunk-EQSCULS7.js → chunk-GY2JCE4G.js} +2 -2
- package/dist/cloudflare/chunk-QPM32MRA.js +1 -0
- package/dist/cloudflare/chunk-VBA2ACKG.js +1 -0
- package/dist/cloudflare/{chunk-DGDAVQYC.js → chunk-ZMQIBLAC.js} +1 -1
- package/dist/cloudflare/cloudflare-CTNLQDS4.js +1 -0
- package/dist/cloudflare/deno-2KIX5TV5.js +1 -0
- package/dist/cloudflare/gcp-GBGWAZSX.js +1 -0
- package/dist/cloudflare/lambda-6HQKP6G3.js +1 -0
- package/dist/cloudflare/node-BRA7RBP5.js +1 -0
- package/dist/cloudflare/utils-3L6PYJAG.js +1 -0
- package/dist/cloudflare/worker.js +3 -3
- package/dist/cloudrun/RequestUnlimited-DEASSJEC.js +2 -0
- package/dist/cloudrun/bun-MBTNJC4U.js +2 -0
- package/dist/cloudrun/{chunk-JUVTJQ7I.js → chunk-6DRVUVNZ.js} +1 -1
- package/dist/cloudrun/chunk-EV26JQYW.js +2 -0
- package/dist/cloudrun/chunk-GSIUCMVK.js +8 -0
- package/dist/cloudrun/{chunk-FYZPEVAA.js → chunk-JBN5SOGD.js} +1 -1
- package/dist/cloudrun/chunk-MHUQ3MGN.js +24 -0
- package/dist/cloudrun/{chunk-GB4XIPDS.js → chunk-R26GKMTH.js} +1 -1
- package/dist/cloudrun/chunk-XO3TAODL.js +2 -0
- package/dist/cloudrun/cloudflare-5WFHLALX.js +2 -0
- package/dist/cloudrun/deno-7HS4QY7G.js +2 -0
- package/dist/{aws/gcp-ZEEIATV7.mjs → cloudrun/gcp-ODIRVFFY.js} +1 -1
- package/dist/cloudrun/lambda-HR2JPPGG.js +3 -0
- package/dist/cloudrun/node-YIKCMSEO.js +2 -0
- package/dist/cloudrun/server.js +4 -4
- package/dist/cloudrun/utils-TJZDD75X.js +2 -0
- package/package.json +3 -3
- package/dist/aws/RequestUnlimited-EKXQGSQT.mjs +0 -2
- package/dist/aws/bun-GK5CEVAU.mjs +0 -2
- package/dist/aws/chunk-QCE23AKJ.mjs +0 -8
- package/dist/aws/chunk-STPKE4A5.mjs +0 -24
- package/dist/aws/cloudflare-BDB3FS4Y.mjs +0 -2
- package/dist/aws/deno-AIUOFIXG.mjs +0 -2
- package/dist/aws/lambda-S3DVSSBV.mjs +0 -3
- package/dist/aws/node-A7ZN443L.mjs +0 -2
- package/dist/aws/utils-KMHFLZAJ.mjs +0 -2
- package/dist/cloudflare/RequestUnlimited-QCOTVU4G.js +0 -1
- package/dist/cloudflare/bun-O4EJPGLH.js +0 -1
- package/dist/cloudflare/chunk-O3XYZ4KS.js +0 -1
- package/dist/cloudflare/cloudflare-I5A4OJEG.js +0 -1
- package/dist/cloudflare/deno-KE6IVNNU.js +0 -1
- package/dist/cloudflare/gcp-MNKOPDML.js +0 -1
- package/dist/cloudflare/lambda-PLZQW4BF.js +0 -1
- package/dist/cloudflare/node-DRV76TUB.js +0 -1
- package/dist/cloudflare/utils-7K7MHQMD.js +0 -1
- package/dist/cloudrun/RequestUnlimited-YQAPYTOH.js +0 -2
- package/dist/cloudrun/bun-BONNABBU.js +0 -2
- package/dist/cloudrun/chunk-5B5BV7SP.js +0 -8
- package/dist/cloudrun/chunk-CFQMQATE.js +0 -24
- package/dist/cloudrun/cloudflare-Q3ZW7CDF.js +0 -2
- package/dist/cloudrun/deno-CPTVGH3A.js +0 -2
- package/dist/cloudrun/lambda-NKM4QA4M.js +0 -3
- package/dist/cloudrun/node-SKMPZMFE.js +0 -2
- package/dist/cloudrun/utils-SDRX3ZUT.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i}from"./chunk-Z5QO7O62.mjs";import"./chunk-6G4LF4KV.mjs";import"./chunk-QDX5GFCD.mjs";import"./chunk-XFLNYUID.mjs";import"./chunk-VULBPPPP.mjs";export{g as DEFAULT_REQUEST_OPTIONS,d as MAX_BACKOFF_LIMIT_MS,a as MAX_RETRY_LIMIT,c as MAX_TIMEOUT_MS,b as MIN_TIMEOUT_MS,e as clampNumber,h as endPoint,i as endPoints,f as fullJitterDelay};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as g}from"./chunk-BIWQVQOH.mjs";import"./chunk-27GDSGEE.mjs";import{c as p,d as i}from"./chunk-QE5QGPOG.mjs";import"./chunk-ZGHY5A62.mjs";import"./chunk-6G4LF4KV.mjs";import"./chunk-XFLNYUID.mjs";import{e as s,h as n}from"./chunk-VULBPPPP.mjs";n();var o=s(p(),1),a=s(g(),1);import{Writable as d}from"stream";var f=process.env.LOG_PRETTY==="true"||process.env.NODE_ENV!=="production"&&process.env.LOG_PRETTY!=="false",e=process.env.LOG_LEVEL||"info",m=new d({write(t,v,c){let r=globalThis.__wsLogWrite;r&&r(typeof t=="string"?t:t.toString("utf8")),c()}}),l=o.default.multistream([{level:e,stream:f?(0,a.default)({colorize:!0,translateTime:"SYS:standard",ignore:"pid,hostname"}):process.stdout},{level:e,stream:m}]),u=(0,o.default)({level:e,redact:["password","secret","token","authorization","apiKey"]},l),L=new i(u),S=L;export{S as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{h as a}from"./chunk-VULBPPPP.mjs";a();a();var m=Symbol("isNonError");function p(r,e,t){Object.defineProperty(r,e,{value:t,writable:!1,enumerable:!1,configurable:!1})}function j(r){if(r===void 0)return"undefined";if(r===null)return"null";if(typeof r=="string")return r;if(typeof r=="number"||typeof r=="boolean")return String(r);if(typeof r=="bigint")return`${r}n`;if(typeof r=="symbol")return r.toString();if(typeof r=="function")return`[Function${r.name?` ${r.name}`:" (anonymous)"}]`;if(r instanceof Error)try{return String(r)}catch{return"<Unserializable error>"}try{return JSON.stringify(r)}catch{try{return String(r)}catch{return"<Unserializable value>"}}}var u=class r extends Error{constructor(e,{superclass:t=Error}={}){if(r.isNonError(e))return e;if(e instanceof Error)throw new TypeError("Do not pass Error instances to NonError. Throw the error directly instead.");super(`Non-error value: ${j(e)}`),t!==Error&&Object.setPrototypeOf(this,t.prototype),p(this,"name","NonError"),p(this,m,!0),p(this,"isNonError",!0),p(this,"value",e)}static isNonError(e){return e?.[m]===!0}static#r(e,t){try{let o=e(...t);return o&&typeof o.then=="function"?(async()=>{try{return await o}catch(c){throw c instanceof Error?c:new r(c)}})():o}catch(o){throw o instanceof Error?o:new r(o)}}static try(e){return r.#r(e,[])}static wrap(e){return(...t)=>r.#r(e,t)}static[Symbol.hasInstance](e){return r.isNonError(e)}};a();var O=[Error,EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,AggregateError,globalThis.DOMException,globalThis.AssertionError,globalThis.SystemError].filter(Boolean).map(r=>[r.name,r]),N=new Map(O),S=new Map;var x=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0},{property:"cause",enumerable:!1},{property:"errors",enumerable:!1}],y=new WeakSet,T=r=>{y.add(r);let e=r.toJSON();return y.delete(r),e},C=r=>{if(r==="NonError")return new u;let e=S.get(r);if(e)return e();let t=N.get(r)??Error;return t===AggregateError?new t([]):new t},l=({from:r,seen:e,to:t,forceEnumerable:o,maxDepth:c,depth:E,useToJSON:b,serialize:s})=>{if(t||(Array.isArray(r)?t=[]:!s&&I(r)?t=C(r.name):t={}),e.add(r),E>=c)return e.delete(r),t;if(b&&typeof r.toJSON=="function"&&!y.has(r))return e.delete(r),T(r);let h=i=>l({from:i,seen:e,forceEnumerable:o,maxDepth:c,depth:E+1,useToJSON:b,serialize:s});for(let i of Object.keys(r)){let n=r[i];if(n&&n instanceof Uint8Array&&n.constructor.name==="Buffer"){t[i]=s?"[object Buffer]":n;continue}if(n!==null&&typeof n=="object"&&typeof n.pipe=="function"){t[i]=s?"[object Stream]":n;continue}if(typeof n=="function"){s||(t[i]=n);continue}if(s&&typeof n=="bigint"){t[i]=`${n}n`;continue}if(!n||typeof n!="object"){try{t[i]=n}catch{}continue}if(!e.has(n)){t[i]=h(n);continue}t[i]="[Circular]"}if(s||t instanceof Error)for(let{property:i,enumerable:n}of x){let f=r[i];if(f==null||Object.getOwnPropertyDescriptor(t,i)?.configurable===!1)continue;let w=f;typeof f=="object"&&(w=e.has(f)?"[Circular]":h(f)),Object.defineProperty(t,i,{value:w,enumerable:o||n,configurable:!0,writable:!0})}return e.delete(r),t};function J(r,e={}){let{maxDepth:t=Number.POSITIVE_INFINITY,useToJSON:o=!0}=e;return typeof r=="object"&&r!==null?l({from:r,seen:new Set,forceEnumerable:!0,maxDepth:t,depth:0,useToJSON:o,serialize:!0}):(typeof r=="function"&&(r="<Function>"),l({from:new u(r),seen:new Set,forceEnumerable:!0,maxDepth:t,depth:0,useToJSON:o,serialize:!0}))}function I(r){return!!r&&typeof r=="object"&&typeof r.name=="string"&&typeof r.message=="string"&&typeof r.stack=="string"}export{J as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as pr}from"./chunk-27GDSGEE.mjs";import{a as yr,b as dr}from"./chunk-STPKE4A5.mjs";import{a as I,c as h,h as f}from"./chunk-VULBPPPP.mjs";var me=h(p=>{"use strict";f();Object.defineProperty(p,"__esModule",{value:!0});var mr=I("tty");function gr(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach(function(t){if(t!=="default"){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}}),r.default=e,Object.freeze(r)}var pe=gr(mr),{env:q={},argv:Ge=[],platform:hr=""}=typeof process>"u"?{}:process,br="NO_COLOR"in q||Ge.includes("--no-color"),Or="FORCE_COLOR"in q||Ge.includes("--color"),Lr=hr==="win32",ke=q.TERM==="dumb",Er=pe&&pe.isatty&&pe.isatty(1)&&q.TERM&&!ke,Cr="CI"in q&&("GITHUB_ACTIONS"in q||"GITLAB_CI"in q||"CIRCLECI"in q),Ve=!br&&(Or||Lr&&!ke||Er||Cr),He=(e,r,t,n,i=r.substring(0,e)+n,o=r.substring(e+t.length),s=o.indexOf(t))=>i+(s<0?o:He(s,o,t,n)),wr=(e,r,t,n,i)=>e<0?t+r+n:t+He(e,r,n,i)+n,Sr=(e,r,t=e,n=e.length+1)=>i=>i||!(i===""||i===void 0)?wr((""+i).indexOf(r,n),i,e,r,t):"",m=(e,r,t)=>Sr(`\x1B[${e}m`,`\x1B[${r}m`,t),ze={reset:m(0,0),bold:m(1,22,"\x1B[22m\x1B[1m"),dim:m(2,22,"\x1B[22m\x1B[2m"),italic:m(3,23),underline:m(4,24),inverse:m(7,27),hidden:m(8,28),strikethrough:m(9,29),black:m(30,39),red:m(31,39),green:m(32,39),yellow:m(33,39),blue:m(34,39),magenta:m(35,39),cyan:m(36,39),white:m(37,39),gray:m(90,39),bgBlack:m(40,49),bgRed:m(41,49),bgGreen:m(42,49),bgYellow:m(43,49),bgBlue:m(44,49),bgMagenta:m(45,49),bgCyan:m(46,49),bgWhite:m(47,49),blackBright:m(90,39),redBright:m(91,39),greenBright:m(92,39),yellowBright:m(93,39),blueBright:m(94,39),magentaBright:m(95,39),cyanBright:m(96,39),whiteBright:m(97,39),bgBlackBright:m(100,49),bgRedBright:m(101,49),bgGreenBright:m(102,49),bgYellowBright:m(103,49),bgBlueBright:m(104,49),bgMagentaBright:m(105,49),bgCyanBright:m(106,49),bgWhiteBright:m(107,49)},Ye=({useColor:e=Ve}={})=>e?ze:Object.keys(ze).reduce((r,t)=>({...r,[t]:String}),{}),{reset:Mr,bold:jr,dim:Dr,italic:Tr,underline:_r,inverse:vr,hidden:Br,strikethrough:xr,black:Pr,red:Nr,green:qr,yellow:Ar,blue:Kr,magenta:Fr,cyan:Rr,white:Ir,gray:$r,bgBlack:Wr,bgRed:zr,bgGreen:Gr,bgYellow:kr,bgBlue:Vr,bgMagenta:Hr,bgCyan:Yr,bgWhite:Ur,blackBright:Jr,redBright:Zr,greenBright:Xr,yellowBright:Qr,blueBright:en,magentaBright:tn,cyanBright:rn,whiteBright:nn,bgBlackBright:on,bgRedBright:sn,bgGreenBright:cn,bgYellowBright:un,bgBlueBright:fn,bgMagentaBright:ln,bgCyanBright:an,bgWhiteBright:yn}=Ye();p.bgBlack=Wr;p.bgBlackBright=on;p.bgBlue=Vr;p.bgBlueBright=fn;p.bgCyan=Yr;p.bgCyanBright=an;p.bgGreen=Gr;p.bgGreenBright=cn;p.bgMagenta=Hr;p.bgMagentaBright=ln;p.bgRed=zr;p.bgRedBright=sn;p.bgWhite=Ur;p.bgWhiteBright=yn;p.bgYellow=kr;p.bgYellowBright=un;p.black=Pr;p.blackBright=Jr;p.blue=Kr;p.blueBright=en;p.bold=jr;p.createColors=Ye;p.cyan=Rr;p.cyanBright=rn;p.dim=Dr;p.gray=$r;p.green=qr;p.greenBright=Xr;p.hidden=Br;p.inverse=vr;p.isColorSupported=Ve;p.italic=Tr;p.magenta=Fr;p.magentaBright=tn;p.red=Nr;p.redBright=Zr;p.reset=Mr;p.strikethrough=xr;p.underline=_r;p.white=Ir;p.whiteBright=nn;p.yellow=Ar;p.yellowBright=Qr});var Xe=h((To,Ze)=>{"use strict";f();var{Transform:dn}=I("stream"),{StringDecoder:pn}=I("string_decoder"),A=Symbol("last"),te=Symbol("decoder");function mn(e,r,t){let n;if(this.overflow){if(n=this[te].write(e).split(this.matcher),n.length===1)return t();n.shift(),this.overflow=!1}else this[A]+=this[te].write(e),n=this[A].split(this.matcher);this[A]=n.pop();for(let i=0;i<n.length;i++)try{Je(this,this.mapper(n[i]))}catch(o){return t(o)}if(this.overflow=this[A].length>this.maxLength,this.overflow&&!this.skipOverflow){t(new Error("maximum buffer reached"));return}t()}function gn(e){if(this[A]+=this[te].end(),this[A])try{Je(this,this.mapper(this[A]))}catch(r){return e(r)}e()}function Je(e,r){r!==void 0&&e.push(r)}function Ue(e){return e}function hn(e,r,t){switch(e=e||/\r?\n/,r=r||Ue,t=t||{},arguments.length){case 1:typeof e=="function"?(r=e,e=/\r?\n/):typeof e=="object"&&!(e instanceof RegExp)&&!e[Symbol.split]&&(t=e,e=/\r?\n/);break;case 2:typeof e=="function"?(t=r,r=e,e=/\r?\n/):typeof r=="object"&&(t=r,r=Ue)}t=Object.assign({},t),t.autoDestroy=!0,t.transform=mn,t.flush=gn,t.readableObjectMode=!0;let n=new dn(t);return n[A]="",n[te]=new pn("utf8"),n.matcher=e,n.mapper=r,n.maxLength=t.maxLength,n.skipOverflow=t.skipOverflow||!1,n.overflow=!1,n._destroy=function(i,o){this._writableState.errorEmitted=!1,o(i)},n}Ze.exports=hn});var nt=h((vo,rt)=>{"use strict";f();var Qe=Symbol.for("pino.metadata"),bn=Xe(),{Duplex:On}=I("stream"),{parentPort:et,workerData:tt}=I("worker_threads");function Ln(){let e,r,t=new Promise((n,i)=>{e=n,r=i});return t.resolve=e,t.reject=r,t}rt.exports=function(r,t={}){let n=t.expectPinoConfig===!0&&tt?.workerData?.pinoWillSendConfig===!0,i=t.parse==="lines",o=typeof t.parseLine=="function"?t.parseLine:JSON.parse,s=t.close||En,c=bn(function(u){let a;try{a=o(u)}catch(y){this.emit("unknown",u,y);return}if(a===null){this.emit("unknown",u,"Null value ignored");return}return typeof a!="object"&&(a={data:a,time:Date.now()}),c[Qe]&&(c.lastTime=a.time,c.lastLevel=a.level,c.lastObj=a),i?u:a},{autoDestroy:!0});if(c._destroy=function(u,a){let y=s(u,a);y&&typeof y.then=="function"&&y.then(a,a)},t.expectPinoConfig===!0&&tt?.workerData?.pinoWillSendConfig!==!0&&setImmediate(()=>{c.emit("error",new Error("This transport is not compatible with the current version of pino. Please upgrade pino to the latest version."))}),t.metadata!==!1&&(c[Qe]=!0,c.lastTime=0,c.lastLevel=0,c.lastObj=null),n){let u={},a=Ln();return et.on("message",function y(g){g.code==="PINO_CONFIG"&&(u=g.config,a.resolve(),et.off("message",y))}),Object.defineProperties(c,{levels:{get(){return u.levels}},messageKey:{get(){return u.messageKey}},errorKey:{get(){return u.errorKey}}}),a.then(d)}return d();function d(){let u=r(c);if(u&&typeof u.catch=="function")u.catch(a=>{c.destroy(a)}),u=null;else if(t.enablePipelining&&u)return On.from({writable:c,readable:u});return c}};function En(e,r){process.nextTick(r,e)}});var P=h((xo,it)=>{"use strict";f();it.exports={DATE_FORMAT:"yyyy-mm-dd HH:MM:ss.l o",DATE_FORMAT_SIMPLE:"HH:MM:ss.l",ERROR_LIKE_KEYS:["err","error"],MESSAGE_KEY:"msg",LEVEL_KEY:"level",LEVEL_LABEL:"levelLabel",TIMESTAMP_KEY:"time",LEVELS:{default:"USERLVL",60:"FATAL",50:"ERROR",40:"WARN",30:"INFO",20:"DEBUG",10:"TRACE"},LEVEL_NAMES:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},LOGGER_KEYS:["pid","hostname","name","level","time","timestamp","caller"]}});var re=h((No,ct)=>{"use strict";f();ct.exports=Cn;var{LEVELS:ot,LEVEL_NAMES:st}=P();function Cn(e,r,t){let n=e?r||ot:Object.assign({},ot,r),i=e?t||st:Object.assign({},st,t);return function(o){let s="default";return Number.isInteger(+o)?s=Object.prototype.hasOwnProperty.call(n,o)?o:s:s=Object.prototype.hasOwnProperty.call(i,o.toLowerCase())?i[o.toLowerCase()]:s,[n[s],s]}}});var Oe=h((Ao,at)=>{"use strict";f();var x=e=>e,ne={default:x,60:x,50:x,40:x,30:x,20:x,10:x,message:x,greyMessage:x,property:x},{createColors:ut}=me(),wn=re(),Z=ut({useColor:!0}),{white:ge,bgRed:Sn,red:Mn,yellow:jn,green:Dn,blue:Tn,gray:he,cyan:ft,magenta:lt}=Z,J={default:ge,60:Sn,50:Mn,40:jn,30:Dn,20:Tn,10:he,message:ft,greyMessage:he,property:lt};function _n(e){return e.reduce(function(r,[t,n]){return r[t]=typeof Z[n]=="function"?Z[n]:ge,r},{default:ge,message:ft,greyMessage:he,property:lt})}function be(e){return function(r,t,{customLevels:n,customLevelNames:i}={}){let[o,s]=wn(e,n,i)(r);return Object.prototype.hasOwnProperty.call(t,s)?t[s](o):t.default(o)}}function vn(e){let r=be(e),t=function(n,i){return r(n,ne,i)};return t.message=ne.message,t.greyMessage=ne.greyMessage,t.property=ne.property,t.colors=ut({useColor:!1}),t}function Bn(e){let r=be(e),t=function(n,i){return r(n,J,i)};return t.message=J.message,t.property=J.property,t.greyMessage=J.greyMessage,t.colors=Z,t}function xn(e,r){let t=_n(e),n=r?t:Object.assign({},J,t),i=be(r),o=function(s,c){return i(s,n,c)};return o.colors=Z,o.message=o.message||n.message,o.property=o.property||n.property,o.greyMessage=o.greyMessage||n.greyMessage,o}at.exports=function(r=!1,t,n){return r&&t!==void 0?xn(t,n):r?Bn(n):vn(n)}});var Le=h((Fo,yt)=>{"use strict";f();yt.exports=function(){}});var pt=h((Io,dt)=>{"use strict";f();dt.exports=qn;var{isMainThread:Pn}=I("worker_threads"),Nn=yr(),ie=Le();function qn(e){let r=new Nn(e);return r.on("error",t),!e.sync&&Pn&&An(r),r;function t(n){if(n.code==="EPIPE"){r.write=ie,r.end=ie,r.flushSync=ie,r.destroy=ie;return}r.removeListener("error",t)}}function An(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let r=dr();r.register(e,Kn),e.on("close",function(){r.unregister(e)})}}function Kn(e,r){e.destroyed||(r==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}});var oe=h((Wo,mt)=>{"use strict";f();mt.exports=Fn;function Fn(e){return e instanceof Date&&!Number.isNaN(e.getTime())}});var Ee=h((Go,gt)=>{"use strict";f();gt.exports=In;var Rn=oe();function In(e){let r=new Date(e);return Rn(r)||(r=new Date(+e)),r}});var se=h((Vo,ht)=>{"use strict";f();ht.exports=$n;function $n(e){let r=[],t=!1,n="";for(let i=0;i<e.length;i++){let o=e.charAt(i);if(o==="\\"){t=!0;continue}if(t){t=!1,n+=o;continue}if(o==="."){r.push(n),n="";continue}n+=o}return n.length&&r.push(n),r}});var G=h((Yo,bt)=>{"use strict";f();bt.exports=zn;var Wn=se();function zn(e,r){let t=Array.isArray(r)?r:Wn(r);for(let n of t){if(!Object.prototype.hasOwnProperty.call(e,n))return;e=e[n]}return e}});var Ce=h((Jo,Ot)=>{"use strict";f();Ot.exports=Vn;var Gn=G(),kn=se();function Vn(e,r){let t=kn(r),n=t.pop();e=Gn(e,t),e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}});var Mt=h(ue=>{"use strict";f();var Hn=Function.prototype.toString,Yn=Object.prototype.toString;function Et(e){if(!e)return Object.create(null);let r=e.constructor;if(r===Object)return e===Object.prototype?{}:Object.create(e);if(r&&~Hn.call(r).indexOf("[native code]"))try{return new r}catch{}return Object.create(e)}function Un(e){let r=e[Symbol.toStringTag];if(r)return r;let t=Yn.call(e);return t.substring(8,t.length-1)}var{hasOwnProperty:Jn,propertyIsEnumerable:Zn}=Object.prototype;function Lt(e,r,t,n){let i=Object.getOwnPropertyDescriptor(e,t)||{configurable:!0,enumerable:!0,value:e[t],writable:!0},o=i.get||i.set?i:{configurable:i.configurable,enumerable:i.enumerable,value:n.copier(i.value,n),writable:i.writable};try{Object.defineProperty(r,t,o)}catch{r[t]=o.get?o.get():o.value}}function ce(e,r,t){let n=Object.getOwnPropertyNames(e);for(let o=0;o<n.length;++o)Lt(e,r,n[o],t);let i=Object.getOwnPropertySymbols(e);for(let o=0;o<i.length;++o)Lt(e,r,i[o],t);return r}function Xn(e,r){let t=new r.Constructor;r.cache.set(e,t);for(let n=0;n<e.length;++n)t[n]=r.copier(e[n],r);return t}function Qn(e,r){let t=new r.Constructor;return r.cache.set(e,t),ce(e,t,r)}function Ct(e,r){return e.slice(0)}function ei(e,r){return e.slice(0,e.size,e.type)}function ti(e,r){return new r.Constructor(Ct(e.buffer))}function ri(e,r){return new r.Constructor(e.getTime())}function wt(e,r){let t=new r.Constructor;return r.cache.set(e,t),e.forEach((n,i)=>{t.set(i,r.copier(n,r))}),t}function ni(e,r){return ce(e,wt(e,r),r)}function ii(e,r){let t=Et(r.prototype);r.cache.set(e,t);for(let i in e)Jn.call(e,i)&&(t[i]=r.copier(e[i],r));let n=Object.getOwnPropertySymbols(e);for(let i=0;i<n.length;++i){let o=n[i];Zn.call(e,o)&&(t[o]=r.copier(e[o],r))}return t}function oi(e,r){let t=Et(r.prototype);return r.cache.set(e,t),ce(e,t,r)}function we(e,r){return new r.Constructor(e.valueOf())}function si(e,r){let t=new r.Constructor(e.source,e.flags);return t.lastIndex=e.lastIndex,t}function k(e,r){return e}function St(e,r){let t=new r.Constructor;return r.cache.set(e,t),e.forEach(n=>{t.add(r.copier(n,r))}),t}function ci(e,r){return ce(e,St(e,r),r)}function ui(){return new WeakMap}function fi({createCache:e,methods:r,strict:t}){let n={array:t?Qn:Xn,arrayBuffer:Ct,asyncGenerator:k,blob:ei,dataView:ti,date:ri,error:k,generator:k,map:t?ni:wt,object:t?oi:ii,regExp:si,set:t?ci:St},i=r?Object.assign(n,r):n,o=li(i),s=e||ui;if(!o.Object||!o.Array)throw new Error("An object and array copier must be provided.");return{createCache:s,copiers:o,methods:i,strict:!!t}}function li(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,AsyncGenerator:e.asyncGenerator,BigInt64Array:e.arrayBuffer,BigUint64Array:e.arrayBuffer,Blob:e.blob,Boolean:we,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Generator:e.generator,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:we,Object:e.object,Promise:k,RegExp:e.regExp,Set:e.set,String:we,WeakMap:k,WeakSet:k,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer}}function Se(e={}){let{createCache:r,copiers:t}=fi(e),{Array:n,Object:i}=t;function o(s,c){if(c.prototype=c.Constructor=void 0,!s||typeof s!="object")return s;if(c.cache.has(s))return c.cache.get(s);if(c.prototype=Object.getPrototypeOf(s),c.Constructor=c.prototype&&c.prototype.constructor,!c.Constructor||c.Constructor===Object)return i(s,c);if(Array.isArray(s))return n(s,c);let d=t[Un(s)];return d?d(s,c):typeof s.then=="function"?s:i(s,c)}return function(c){return o(c,{Constructor:void 0,cache:r(),copier:o,prototype:void 0})}}var ai=Se({strict:!0}),yi=Se();ue.copy=yi;ue.copyStrict=ai;ue.createCopier=Se});var Me=h((es,jt)=>{"use strict";f();jt.exports=gi;var{createCopier:di}=Mt(),pi=di({}),mi=Ce();function gi({log:e,context:r}){let{ignoreKeys:t,includeKeys:n}=r,i=pi(e);if(n){let o={};return n.forEach(s=>{o[s]=i[s]}),o}return t.forEach(o=>{mi(i,o)}),i}});var Tt=h((je,Dt)=>{"use strict";f();function V(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V=function(t){return typeof t}:V=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},V(e)}(function(e){var r=arguments,t=(function(){var d=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,u=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,a=/[^-+\dA-Z]/g;return function(y,g,E,T){if(r.length===1&&c(y)==="string"&&!/\d/.test(y)&&(g=y,y=void 0),y=y||y===0?y:new Date,y instanceof Date||(y=new Date(y)),isNaN(y))throw TypeError("Invalid date");g=String(t.masks[g]||g||t.masks.default);var S=g.slice(0,4);(S==="UTC:"||S==="GMT:")&&(g=g.slice(4),E=!0,S==="GMT:"&&(T=!0));var C=function(){return E?"getUTC":"get"},L=function(){return y[C()+"Date"]()},w=function(){return y[C()+"Day"]()},M=function(){return y[C()+"Month"]()},_=function(){return y[C()+"FullYear"]()},j=function(){return y[C()+"Hours"]()},F=function(){return y[C()+"Minutes"]()},z=function(){return y[C()+"Seconds"]()},R=function(){return y[C()+"Milliseconds"]()},v=function(){return E?0:y.getTimezoneOffset()},B=function(){return o(y)},N=function(){return s(y)},D={d:function(){return L()},dd:function(){return n(L())},ddd:function(){return t.i18n.dayNames[w()]},DDD:function(){return i({y:_(),m:M(),d:L(),_:C(),dayName:t.i18n.dayNames[w()],short:!0})},dddd:function(){return t.i18n.dayNames[w()+7]},DDDD:function(){return i({y:_(),m:M(),d:L(),_:C(),dayName:t.i18n.dayNames[w()+7]})},m:function(){return M()+1},mm:function(){return n(M()+1)},mmm:function(){return t.i18n.monthNames[M()]},mmmm:function(){return t.i18n.monthNames[M()+12]},yy:function(){return String(_()).slice(2)},yyyy:function(){return n(_(),4)},h:function(){return j()%12||12},hh:function(){return n(j()%12||12)},H:function(){return j()},HH:function(){return n(j())},M:function(){return F()},MM:function(){return n(F())},s:function(){return z()},ss:function(){return n(z())},l:function(){return n(R(),3)},L:function(){return n(Math.floor(R()/10))},t:function(){return j()<12?t.i18n.timeNames[0]:t.i18n.timeNames[1]},tt:function(){return j()<12?t.i18n.timeNames[2]:t.i18n.timeNames[3]},T:function(){return j()<12?t.i18n.timeNames[4]:t.i18n.timeNames[5]},TT:function(){return j()<12?t.i18n.timeNames[6]:t.i18n.timeNames[7]},Z:function(){return T?"GMT":E?"UTC":(String(y).match(u)||[""]).pop().replace(a,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(v()>0?"-":"+")+n(Math.floor(Math.abs(v())/60)*100+Math.abs(v())%60,4)},p:function(){return(v()>0?"-":"+")+n(Math.floor(Math.abs(v())/60),2)+":"+n(Math.floor(Math.abs(v())%60),2)},S:function(){return["th","st","nd","rd"][L()%10>3?0:(L()%100-L()%10!=10)*L()%10]},W:function(){return B()},WW:function(){return n(B())},N:function(){return N()}};return g.replace(d,function(l){return l in D?D[l]():l.slice(1,l.length-1)})}})();t.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},t.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]};var n=function(u,a){for(u=String(u),a=a||2;u.length<a;)u="0"+u;return u},i=function(u){var a=u.y,y=u.m,g=u.d,E=u._,T=u.dayName,S=u.short,C=S===void 0?!1:S,L=new Date,w=new Date;w.setDate(w[E+"Date"]()-1);var M=new Date;M.setDate(M[E+"Date"]()+1);var _=function(){return L[E+"Date"]()},j=function(){return L[E+"Month"]()},F=function(){return L[E+"FullYear"]()},z=function(){return w[E+"Date"]()},R=function(){return w[E+"Month"]()},v=function(){return w[E+"FullYear"]()},B=function(){return M[E+"Date"]()},N=function(){return M[E+"Month"]()},D=function(){return M[E+"FullYear"]()};return F()===a&&j()===y&&_()===g?C?"Tdy":"Today":v()===a&&R()===y&&z()===g?C?"Ysd":"Yesterday":D()===a&&N()===y&&B()===g?C?"Tmw":"Tomorrow":T},o=function(u){var a=new Date(u.getFullYear(),u.getMonth(),u.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);var y=new Date(a.getFullYear(),0,4);y.setDate(y.getDate()-(y.getDay()+6)%7+3);var g=a.getTimezoneOffset()-y.getTimezoneOffset();a.setHours(a.getHours()-g);var E=(a-y)/(864e5*7);return 1+Math.floor(E)},s=function(u){var a=u.getDay();return a===0&&(a=7),a},c=function(u){return u===null?"null":u===void 0?"undefined":V(u)!=="object"?V(u):Array.isArray(u)?"array":{}.toString.call(u).slice(8,-1).toLowerCase()};typeof define=="function"&&define.amd?define(function(){return t}):(typeof je>"u"?"undefined":V(je))==="object"?Dt.exports=t:e.dateFormat=t})(void 0)});var De=h((ns,_t)=>{"use strict";f();_t.exports=Ei;var{DATE_FORMAT:hi,DATE_FORMAT_SIMPLE:bi}=P(),X=Tt(),Oi=Ee(),Li=oe();function Ei(e,r=!1){if(r===!1)return e;let t=Oi(e);if(!Li(t))return e;if(r===!0)return X(t,bi);let n=r.toUpperCase();if(n==="SYS:STANDARD")return X(t,hi);let i=n.substr(0,4);return i==="SYS:"||i==="UTC:"?i==="UTC:"?X(t,r):X(t,r.slice(4)):X(t,`UTC:${r}`)}});var Te=h((os,vt)=>{"use strict";f();vt.exports=Ci;function Ci(e){return e?typeof e=="string"?e.split(",").reduce((r,t,n)=>{let[i,o=n]=t.split(":");return r[i.toLowerCase()]=o,r},{}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((r,t)=>(r[t.toLowerCase()]=e[t],r),{}):{}:{}}});var _e=h((cs,Bt)=>{"use strict";f();Bt.exports=wi;function wi(e){return e?typeof e=="string"?e.split(",").reduce((r,t,n)=>{let[i,o=n]=t.split(":");return r[o]=i.toUpperCase(),r},{default:"USERLVL"}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((r,t)=>(r[e[t]]=t.toUpperCase(),r),{default:"USERLVL"}):{}:{}}});var ve=h((fs,xt)=>{"use strict";f();xt.exports=Mi;var Si=G();function Mi(e,r){return e=e.replace(/{if (.*?)}(.*?){end}/g,t),e=e.replace(/{if (.*?)}/g,""),e=e.replace(/{end}/g,""),e.replace(/\s+/g," ").trim();function t(n,i,o){let s=Si(r,i);return s&&o.includes(i)?o.replace(new RegExp("{"+i+"}","g"),s):""}}});var fe=h((as,Pt)=>{"use strict";f();Pt.exports=ji;function ji(e){return Object.prototype.toString.apply(e)==="[object Object]"}});var Q=h((ds,Nt)=>{"use strict";f();Nt.exports=Di;function Di({input:e,ident:r=" ",eol:t=`
|
|
2
|
+
import{b as pr}from"./chunk-27GDSGEE.mjs";import{a as yr,b as dr}from"./chunk-QE5QGPOG.mjs";import{a as I,c as h,h as f}from"./chunk-VULBPPPP.mjs";var me=h(p=>{"use strict";f();Object.defineProperty(p,"__esModule",{value:!0});var mr=I("tty");function gr(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach(function(t){if(t!=="default"){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}}),r.default=e,Object.freeze(r)}var pe=gr(mr),{env:q={},argv:Ge=[],platform:hr=""}=typeof process>"u"?{}:process,br="NO_COLOR"in q||Ge.includes("--no-color"),Or="FORCE_COLOR"in q||Ge.includes("--color"),Lr=hr==="win32",ke=q.TERM==="dumb",Er=pe&&pe.isatty&&pe.isatty(1)&&q.TERM&&!ke,Cr="CI"in q&&("GITHUB_ACTIONS"in q||"GITLAB_CI"in q||"CIRCLECI"in q),Ve=!br&&(Or||Lr&&!ke||Er||Cr),He=(e,r,t,n,i=r.substring(0,e)+n,o=r.substring(e+t.length),s=o.indexOf(t))=>i+(s<0?o:He(s,o,t,n)),wr=(e,r,t,n,i)=>e<0?t+r+n:t+He(e,r,n,i)+n,Sr=(e,r,t=e,n=e.length+1)=>i=>i||!(i===""||i===void 0)?wr((""+i).indexOf(r,n),i,e,r,t):"",m=(e,r,t)=>Sr(`\x1B[${e}m`,`\x1B[${r}m`,t),ze={reset:m(0,0),bold:m(1,22,"\x1B[22m\x1B[1m"),dim:m(2,22,"\x1B[22m\x1B[2m"),italic:m(3,23),underline:m(4,24),inverse:m(7,27),hidden:m(8,28),strikethrough:m(9,29),black:m(30,39),red:m(31,39),green:m(32,39),yellow:m(33,39),blue:m(34,39),magenta:m(35,39),cyan:m(36,39),white:m(37,39),gray:m(90,39),bgBlack:m(40,49),bgRed:m(41,49),bgGreen:m(42,49),bgYellow:m(43,49),bgBlue:m(44,49),bgMagenta:m(45,49),bgCyan:m(46,49),bgWhite:m(47,49),blackBright:m(90,39),redBright:m(91,39),greenBright:m(92,39),yellowBright:m(93,39),blueBright:m(94,39),magentaBright:m(95,39),cyanBright:m(96,39),whiteBright:m(97,39),bgBlackBright:m(100,49),bgRedBright:m(101,49),bgGreenBright:m(102,49),bgYellowBright:m(103,49),bgBlueBright:m(104,49),bgMagentaBright:m(105,49),bgCyanBright:m(106,49),bgWhiteBright:m(107,49)},Ye=({useColor:e=Ve}={})=>e?ze:Object.keys(ze).reduce((r,t)=>({...r,[t]:String}),{}),{reset:Mr,bold:jr,dim:Dr,italic:Tr,underline:_r,inverse:vr,hidden:Br,strikethrough:xr,black:Pr,red:Nr,green:qr,yellow:Ar,blue:Kr,magenta:Fr,cyan:Rr,white:Ir,gray:$r,bgBlack:Wr,bgRed:zr,bgGreen:Gr,bgYellow:kr,bgBlue:Vr,bgMagenta:Hr,bgCyan:Yr,bgWhite:Ur,blackBright:Jr,redBright:Zr,greenBright:Xr,yellowBright:Qr,blueBright:en,magentaBright:tn,cyanBright:rn,whiteBright:nn,bgBlackBright:on,bgRedBright:sn,bgGreenBright:cn,bgYellowBright:un,bgBlueBright:fn,bgMagentaBright:ln,bgCyanBright:an,bgWhiteBright:yn}=Ye();p.bgBlack=Wr;p.bgBlackBright=on;p.bgBlue=Vr;p.bgBlueBright=fn;p.bgCyan=Yr;p.bgCyanBright=an;p.bgGreen=Gr;p.bgGreenBright=cn;p.bgMagenta=Hr;p.bgMagentaBright=ln;p.bgRed=zr;p.bgRedBright=sn;p.bgWhite=Ur;p.bgWhiteBright=yn;p.bgYellow=kr;p.bgYellowBright=un;p.black=Pr;p.blackBright=Jr;p.blue=Kr;p.blueBright=en;p.bold=jr;p.createColors=Ye;p.cyan=Rr;p.cyanBright=rn;p.dim=Dr;p.gray=$r;p.green=qr;p.greenBright=Xr;p.hidden=Br;p.inverse=vr;p.isColorSupported=Ve;p.italic=Tr;p.magenta=Fr;p.magentaBright=tn;p.red=Nr;p.redBright=Zr;p.reset=Mr;p.strikethrough=xr;p.underline=_r;p.white=Ir;p.whiteBright=nn;p.yellow=Ar;p.yellowBright=Qr});var Xe=h((To,Ze)=>{"use strict";f();var{Transform:dn}=I("stream"),{StringDecoder:pn}=I("string_decoder"),A=Symbol("last"),te=Symbol("decoder");function mn(e,r,t){let n;if(this.overflow){if(n=this[te].write(e).split(this.matcher),n.length===1)return t();n.shift(),this.overflow=!1}else this[A]+=this[te].write(e),n=this[A].split(this.matcher);this[A]=n.pop();for(let i=0;i<n.length;i++)try{Je(this,this.mapper(n[i]))}catch(o){return t(o)}if(this.overflow=this[A].length>this.maxLength,this.overflow&&!this.skipOverflow){t(new Error("maximum buffer reached"));return}t()}function gn(e){if(this[A]+=this[te].end(),this[A])try{Je(this,this.mapper(this[A]))}catch(r){return e(r)}e()}function Je(e,r){r!==void 0&&e.push(r)}function Ue(e){return e}function hn(e,r,t){switch(e=e||/\r?\n/,r=r||Ue,t=t||{},arguments.length){case 1:typeof e=="function"?(r=e,e=/\r?\n/):typeof e=="object"&&!(e instanceof RegExp)&&!e[Symbol.split]&&(t=e,e=/\r?\n/);break;case 2:typeof e=="function"?(t=r,r=e,e=/\r?\n/):typeof r=="object"&&(t=r,r=Ue)}t=Object.assign({},t),t.autoDestroy=!0,t.transform=mn,t.flush=gn,t.readableObjectMode=!0;let n=new dn(t);return n[A]="",n[te]=new pn("utf8"),n.matcher=e,n.mapper=r,n.maxLength=t.maxLength,n.skipOverflow=t.skipOverflow||!1,n.overflow=!1,n._destroy=function(i,o){this._writableState.errorEmitted=!1,o(i)},n}Ze.exports=hn});var nt=h((vo,rt)=>{"use strict";f();var Qe=Symbol.for("pino.metadata"),bn=Xe(),{Duplex:On}=I("stream"),{parentPort:et,workerData:tt}=I("worker_threads");function Ln(){let e,r,t=new Promise((n,i)=>{e=n,r=i});return t.resolve=e,t.reject=r,t}rt.exports=function(r,t={}){let n=t.expectPinoConfig===!0&&tt?.workerData?.pinoWillSendConfig===!0,i=t.parse==="lines",o=typeof t.parseLine=="function"?t.parseLine:JSON.parse,s=t.close||En,c=bn(function(u){let a;try{a=o(u)}catch(y){this.emit("unknown",u,y);return}if(a===null){this.emit("unknown",u,"Null value ignored");return}return typeof a!="object"&&(a={data:a,time:Date.now()}),c[Qe]&&(c.lastTime=a.time,c.lastLevel=a.level,c.lastObj=a),i?u:a},{autoDestroy:!0});if(c._destroy=function(u,a){let y=s(u,a);y&&typeof y.then=="function"&&y.then(a,a)},t.expectPinoConfig===!0&&tt?.workerData?.pinoWillSendConfig!==!0&&setImmediate(()=>{c.emit("error",new Error("This transport is not compatible with the current version of pino. Please upgrade pino to the latest version."))}),t.metadata!==!1&&(c[Qe]=!0,c.lastTime=0,c.lastLevel=0,c.lastObj=null),n){let u={},a=Ln();return et.on("message",function y(g){g.code==="PINO_CONFIG"&&(u=g.config,a.resolve(),et.off("message",y))}),Object.defineProperties(c,{levels:{get(){return u.levels}},messageKey:{get(){return u.messageKey}},errorKey:{get(){return u.errorKey}}}),a.then(d)}return d();function d(){let u=r(c);if(u&&typeof u.catch=="function")u.catch(a=>{c.destroy(a)}),u=null;else if(t.enablePipelining&&u)return On.from({writable:c,readable:u});return c}};function En(e,r){process.nextTick(r,e)}});var P=h((xo,it)=>{"use strict";f();it.exports={DATE_FORMAT:"yyyy-mm-dd HH:MM:ss.l o",DATE_FORMAT_SIMPLE:"HH:MM:ss.l",ERROR_LIKE_KEYS:["err","error"],MESSAGE_KEY:"msg",LEVEL_KEY:"level",LEVEL_LABEL:"levelLabel",TIMESTAMP_KEY:"time",LEVELS:{default:"USERLVL",60:"FATAL",50:"ERROR",40:"WARN",30:"INFO",20:"DEBUG",10:"TRACE"},LEVEL_NAMES:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},LOGGER_KEYS:["pid","hostname","name","level","time","timestamp","caller"]}});var re=h((No,ct)=>{"use strict";f();ct.exports=Cn;var{LEVELS:ot,LEVEL_NAMES:st}=P();function Cn(e,r,t){let n=e?r||ot:Object.assign({},ot,r),i=e?t||st:Object.assign({},st,t);return function(o){let s="default";return Number.isInteger(+o)?s=Object.prototype.hasOwnProperty.call(n,o)?o:s:s=Object.prototype.hasOwnProperty.call(i,o.toLowerCase())?i[o.toLowerCase()]:s,[n[s],s]}}});var Oe=h((Ao,at)=>{"use strict";f();var x=e=>e,ne={default:x,60:x,50:x,40:x,30:x,20:x,10:x,message:x,greyMessage:x,property:x},{createColors:ut}=me(),wn=re(),Z=ut({useColor:!0}),{white:ge,bgRed:Sn,red:Mn,yellow:jn,green:Dn,blue:Tn,gray:he,cyan:ft,magenta:lt}=Z,J={default:ge,60:Sn,50:Mn,40:jn,30:Dn,20:Tn,10:he,message:ft,greyMessage:he,property:lt};function _n(e){return e.reduce(function(r,[t,n]){return r[t]=typeof Z[n]=="function"?Z[n]:ge,r},{default:ge,message:ft,greyMessage:he,property:lt})}function be(e){return function(r,t,{customLevels:n,customLevelNames:i}={}){let[o,s]=wn(e,n,i)(r);return Object.prototype.hasOwnProperty.call(t,s)?t[s](o):t.default(o)}}function vn(e){let r=be(e),t=function(n,i){return r(n,ne,i)};return t.message=ne.message,t.greyMessage=ne.greyMessage,t.property=ne.property,t.colors=ut({useColor:!1}),t}function Bn(e){let r=be(e),t=function(n,i){return r(n,J,i)};return t.message=J.message,t.property=J.property,t.greyMessage=J.greyMessage,t.colors=Z,t}function xn(e,r){let t=_n(e),n=r?t:Object.assign({},J,t),i=be(r),o=function(s,c){return i(s,n,c)};return o.colors=Z,o.message=o.message||n.message,o.property=o.property||n.property,o.greyMessage=o.greyMessage||n.greyMessage,o}at.exports=function(r=!1,t,n){return r&&t!==void 0?xn(t,n):r?Bn(n):vn(n)}});var Le=h((Fo,yt)=>{"use strict";f();yt.exports=function(){}});var pt=h((Io,dt)=>{"use strict";f();dt.exports=qn;var{isMainThread:Pn}=I("worker_threads"),Nn=yr(),ie=Le();function qn(e){let r=new Nn(e);return r.on("error",t),!e.sync&&Pn&&An(r),r;function t(n){if(n.code==="EPIPE"){r.write=ie,r.end=ie,r.flushSync=ie,r.destroy=ie;return}r.removeListener("error",t)}}function An(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let r=dr();r.register(e,Kn),e.on("close",function(){r.unregister(e)})}}function Kn(e,r){e.destroyed||(r==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}});var oe=h((Wo,mt)=>{"use strict";f();mt.exports=Fn;function Fn(e){return e instanceof Date&&!Number.isNaN(e.getTime())}});var Ee=h((Go,gt)=>{"use strict";f();gt.exports=In;var Rn=oe();function In(e){let r=new Date(e);return Rn(r)||(r=new Date(+e)),r}});var se=h((Vo,ht)=>{"use strict";f();ht.exports=$n;function $n(e){let r=[],t=!1,n="";for(let i=0;i<e.length;i++){let o=e.charAt(i);if(o==="\\"){t=!0;continue}if(t){t=!1,n+=o;continue}if(o==="."){r.push(n),n="";continue}n+=o}return n.length&&r.push(n),r}});var G=h((Yo,bt)=>{"use strict";f();bt.exports=zn;var Wn=se();function zn(e,r){let t=Array.isArray(r)?r:Wn(r);for(let n of t){if(!Object.prototype.hasOwnProperty.call(e,n))return;e=e[n]}return e}});var Ce=h((Jo,Ot)=>{"use strict";f();Ot.exports=Vn;var Gn=G(),kn=se();function Vn(e,r){let t=kn(r),n=t.pop();e=Gn(e,t),e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}});var Mt=h(ue=>{"use strict";f();var Hn=Function.prototype.toString,Yn=Object.prototype.toString;function Et(e){if(!e)return Object.create(null);let r=e.constructor;if(r===Object)return e===Object.prototype?{}:Object.create(e);if(r&&~Hn.call(r).indexOf("[native code]"))try{return new r}catch{}return Object.create(e)}function Un(e){let r=e[Symbol.toStringTag];if(r)return r;let t=Yn.call(e);return t.substring(8,t.length-1)}var{hasOwnProperty:Jn,propertyIsEnumerable:Zn}=Object.prototype;function Lt(e,r,t,n){let i=Object.getOwnPropertyDescriptor(e,t)||{configurable:!0,enumerable:!0,value:e[t],writable:!0},o=i.get||i.set?i:{configurable:i.configurable,enumerable:i.enumerable,value:n.copier(i.value,n),writable:i.writable};try{Object.defineProperty(r,t,o)}catch{r[t]=o.get?o.get():o.value}}function ce(e,r,t){let n=Object.getOwnPropertyNames(e);for(let o=0;o<n.length;++o)Lt(e,r,n[o],t);let i=Object.getOwnPropertySymbols(e);for(let o=0;o<i.length;++o)Lt(e,r,i[o],t);return r}function Xn(e,r){let t=new r.Constructor;r.cache.set(e,t);for(let n=0;n<e.length;++n)t[n]=r.copier(e[n],r);return t}function Qn(e,r){let t=new r.Constructor;return r.cache.set(e,t),ce(e,t,r)}function Ct(e,r){return e.slice(0)}function ei(e,r){return e.slice(0,e.size,e.type)}function ti(e,r){return new r.Constructor(Ct(e.buffer))}function ri(e,r){return new r.Constructor(e.getTime())}function wt(e,r){let t=new r.Constructor;return r.cache.set(e,t),e.forEach((n,i)=>{t.set(i,r.copier(n,r))}),t}function ni(e,r){return ce(e,wt(e,r),r)}function ii(e,r){let t=Et(r.prototype);r.cache.set(e,t);for(let i in e)Jn.call(e,i)&&(t[i]=r.copier(e[i],r));let n=Object.getOwnPropertySymbols(e);for(let i=0;i<n.length;++i){let o=n[i];Zn.call(e,o)&&(t[o]=r.copier(e[o],r))}return t}function oi(e,r){let t=Et(r.prototype);return r.cache.set(e,t),ce(e,t,r)}function we(e,r){return new r.Constructor(e.valueOf())}function si(e,r){let t=new r.Constructor(e.source,e.flags);return t.lastIndex=e.lastIndex,t}function k(e,r){return e}function St(e,r){let t=new r.Constructor;return r.cache.set(e,t),e.forEach(n=>{t.add(r.copier(n,r))}),t}function ci(e,r){return ce(e,St(e,r),r)}function ui(){return new WeakMap}function fi({createCache:e,methods:r,strict:t}){let n={array:t?Qn:Xn,arrayBuffer:Ct,asyncGenerator:k,blob:ei,dataView:ti,date:ri,error:k,generator:k,map:t?ni:wt,object:t?oi:ii,regExp:si,set:t?ci:St},i=r?Object.assign(n,r):n,o=li(i),s=e||ui;if(!o.Object||!o.Array)throw new Error("An object and array copier must be provided.");return{createCache:s,copiers:o,methods:i,strict:!!t}}function li(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,AsyncGenerator:e.asyncGenerator,BigInt64Array:e.arrayBuffer,BigUint64Array:e.arrayBuffer,Blob:e.blob,Boolean:we,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Generator:e.generator,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:we,Object:e.object,Promise:k,RegExp:e.regExp,Set:e.set,String:we,WeakMap:k,WeakSet:k,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer}}function Se(e={}){let{createCache:r,copiers:t}=fi(e),{Array:n,Object:i}=t;function o(s,c){if(c.prototype=c.Constructor=void 0,!s||typeof s!="object")return s;if(c.cache.has(s))return c.cache.get(s);if(c.prototype=Object.getPrototypeOf(s),c.Constructor=c.prototype&&c.prototype.constructor,!c.Constructor||c.Constructor===Object)return i(s,c);if(Array.isArray(s))return n(s,c);let d=t[Un(s)];return d?d(s,c):typeof s.then=="function"?s:i(s,c)}return function(c){return o(c,{Constructor:void 0,cache:r(),copier:o,prototype:void 0})}}var ai=Se({strict:!0}),yi=Se();ue.copy=yi;ue.copyStrict=ai;ue.createCopier=Se});var Me=h((es,jt)=>{"use strict";f();jt.exports=gi;var{createCopier:di}=Mt(),pi=di({}),mi=Ce();function gi({log:e,context:r}){let{ignoreKeys:t,includeKeys:n}=r,i=pi(e);if(n){let o={};return n.forEach(s=>{o[s]=i[s]}),o}return t.forEach(o=>{mi(i,o)}),i}});var Tt=h((je,Dt)=>{"use strict";f();function V(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V=function(t){return typeof t}:V=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},V(e)}(function(e){var r=arguments,t=(function(){var d=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,u=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,a=/[^-+\dA-Z]/g;return function(y,g,E,T){if(r.length===1&&c(y)==="string"&&!/\d/.test(y)&&(g=y,y=void 0),y=y||y===0?y:new Date,y instanceof Date||(y=new Date(y)),isNaN(y))throw TypeError("Invalid date");g=String(t.masks[g]||g||t.masks.default);var S=g.slice(0,4);(S==="UTC:"||S==="GMT:")&&(g=g.slice(4),E=!0,S==="GMT:"&&(T=!0));var C=function(){return E?"getUTC":"get"},L=function(){return y[C()+"Date"]()},w=function(){return y[C()+"Day"]()},M=function(){return y[C()+"Month"]()},_=function(){return y[C()+"FullYear"]()},j=function(){return y[C()+"Hours"]()},F=function(){return y[C()+"Minutes"]()},z=function(){return y[C()+"Seconds"]()},R=function(){return y[C()+"Milliseconds"]()},v=function(){return E?0:y.getTimezoneOffset()},B=function(){return o(y)},N=function(){return s(y)},D={d:function(){return L()},dd:function(){return n(L())},ddd:function(){return t.i18n.dayNames[w()]},DDD:function(){return i({y:_(),m:M(),d:L(),_:C(),dayName:t.i18n.dayNames[w()],short:!0})},dddd:function(){return t.i18n.dayNames[w()+7]},DDDD:function(){return i({y:_(),m:M(),d:L(),_:C(),dayName:t.i18n.dayNames[w()+7]})},m:function(){return M()+1},mm:function(){return n(M()+1)},mmm:function(){return t.i18n.monthNames[M()]},mmmm:function(){return t.i18n.monthNames[M()+12]},yy:function(){return String(_()).slice(2)},yyyy:function(){return n(_(),4)},h:function(){return j()%12||12},hh:function(){return n(j()%12||12)},H:function(){return j()},HH:function(){return n(j())},M:function(){return F()},MM:function(){return n(F())},s:function(){return z()},ss:function(){return n(z())},l:function(){return n(R(),3)},L:function(){return n(Math.floor(R()/10))},t:function(){return j()<12?t.i18n.timeNames[0]:t.i18n.timeNames[1]},tt:function(){return j()<12?t.i18n.timeNames[2]:t.i18n.timeNames[3]},T:function(){return j()<12?t.i18n.timeNames[4]:t.i18n.timeNames[5]},TT:function(){return j()<12?t.i18n.timeNames[6]:t.i18n.timeNames[7]},Z:function(){return T?"GMT":E?"UTC":(String(y).match(u)||[""]).pop().replace(a,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(v()>0?"-":"+")+n(Math.floor(Math.abs(v())/60)*100+Math.abs(v())%60,4)},p:function(){return(v()>0?"-":"+")+n(Math.floor(Math.abs(v())/60),2)+":"+n(Math.floor(Math.abs(v())%60),2)},S:function(){return["th","st","nd","rd"][L()%10>3?0:(L()%100-L()%10!=10)*L()%10]},W:function(){return B()},WW:function(){return n(B())},N:function(){return N()}};return g.replace(d,function(l){return l in D?D[l]():l.slice(1,l.length-1)})}})();t.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},t.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]};var n=function(u,a){for(u=String(u),a=a||2;u.length<a;)u="0"+u;return u},i=function(u){var a=u.y,y=u.m,g=u.d,E=u._,T=u.dayName,S=u.short,C=S===void 0?!1:S,L=new Date,w=new Date;w.setDate(w[E+"Date"]()-1);var M=new Date;M.setDate(M[E+"Date"]()+1);var _=function(){return L[E+"Date"]()},j=function(){return L[E+"Month"]()},F=function(){return L[E+"FullYear"]()},z=function(){return w[E+"Date"]()},R=function(){return w[E+"Month"]()},v=function(){return w[E+"FullYear"]()},B=function(){return M[E+"Date"]()},N=function(){return M[E+"Month"]()},D=function(){return M[E+"FullYear"]()};return F()===a&&j()===y&&_()===g?C?"Tdy":"Today":v()===a&&R()===y&&z()===g?C?"Ysd":"Yesterday":D()===a&&N()===y&&B()===g?C?"Tmw":"Tomorrow":T},o=function(u){var a=new Date(u.getFullYear(),u.getMonth(),u.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);var y=new Date(a.getFullYear(),0,4);y.setDate(y.getDate()-(y.getDay()+6)%7+3);var g=a.getTimezoneOffset()-y.getTimezoneOffset();a.setHours(a.getHours()-g);var E=(a-y)/(864e5*7);return 1+Math.floor(E)},s=function(u){var a=u.getDay();return a===0&&(a=7),a},c=function(u){return u===null?"null":u===void 0?"undefined":V(u)!=="object"?V(u):Array.isArray(u)?"array":{}.toString.call(u).slice(8,-1).toLowerCase()};typeof define=="function"&&define.amd?define(function(){return t}):(typeof je>"u"?"undefined":V(je))==="object"?Dt.exports=t:e.dateFormat=t})(void 0)});var De=h((ns,_t)=>{"use strict";f();_t.exports=Ei;var{DATE_FORMAT:hi,DATE_FORMAT_SIMPLE:bi}=P(),X=Tt(),Oi=Ee(),Li=oe();function Ei(e,r=!1){if(r===!1)return e;let t=Oi(e);if(!Li(t))return e;if(r===!0)return X(t,bi);let n=r.toUpperCase();if(n==="SYS:STANDARD")return X(t,hi);let i=n.substr(0,4);return i==="SYS:"||i==="UTC:"?i==="UTC:"?X(t,r):X(t,r.slice(4)):X(t,`UTC:${r}`)}});var Te=h((os,vt)=>{"use strict";f();vt.exports=Ci;function Ci(e){return e?typeof e=="string"?e.split(",").reduce((r,t,n)=>{let[i,o=n]=t.split(":");return r[i.toLowerCase()]=o,r},{}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((r,t)=>(r[t.toLowerCase()]=e[t],r),{}):{}:{}}});var _e=h((cs,Bt)=>{"use strict";f();Bt.exports=wi;function wi(e){return e?typeof e=="string"?e.split(",").reduce((r,t,n)=>{let[i,o=n]=t.split(":");return r[o]=i.toUpperCase(),r},{default:"USERLVL"}):Object.prototype.toString.call(e)==="[object Object]"?Object.keys(e).reduce((r,t)=>(r[e[t]]=t.toUpperCase(),r),{default:"USERLVL"}):{}:{}}});var ve=h((fs,xt)=>{"use strict";f();xt.exports=Mi;var Si=G();function Mi(e,r){return e=e.replace(/{if (.*?)}(.*?){end}/g,t),e=e.replace(/{if (.*?)}/g,""),e=e.replace(/{end}/g,""),e.replace(/\s+/g," ").trim();function t(n,i,o){let s=Si(r,i);return s&&o.includes(i)?o.replace(new RegExp("{"+i+"}","g"),s):""}}});var fe=h((as,Pt)=>{"use strict";f();Pt.exports=ji;function ji(e){return Object.prototype.toString.apply(e)==="[object Object]"}});var Q=h((ds,Nt)=>{"use strict";f();Nt.exports=Di;function Di({input:e,ident:r=" ",eol:t=`
|
|
3
3
|
`}){let n=e.split(/\r?\n/);for(let i=1;i<n.length;i+=1)n[i]=r+n[i];return n.join(t)}});var Ft=h((ms,Kt)=>{"use strict";f();Kt.exports=Bi;var{LEVEL_NAMES:qt}=P(),At=Oe(),Ti=_e(),_i=Te(),vi=re();function Bi(e){let r=e.crlf?`\r
|
|
4
4
|
`:`
|
|
5
5
|
`,t=" ",{customPrettifiers:n,errorLikeObjectKeys:i,hideObject:o,levelFirst:s,levelKey:c,levelLabel:d,messageFormat:u,messageKey:a,minimumLevel:y,singleLine:g,timestampKey:E,translateTime:T}=e,S=e.errorProps.split(","),C=typeof e.useOnlyCustomProps=="boolean"?e.useOnlyCustomProps:e.useOnlyCustomProps==="true",L=Ti(e.customLevels),w=_i(e.customLevels),M=vi(C,L,w),_;if(e.customColors)if(typeof e.customColors=="string")_=e.customColors.split(",").reduce((B,N)=>{let[D,l]=N.split(":"),U=(C?e.customLevels:w[D]!==void 0)?w[D]:qt[D],de=U!==void 0?U:D;return B.push([de,l]),B},[]);else if(typeof e.customColors=="object")_=Object.keys(e.customColors).reduce((B,N)=>{let[D,l]=[N,e.customColors[N]],U=(C?e.customLevels:w[D]!==void 0)?w[D]:qt[D],de=U!==void 0?U:D;return B.push([de,l]),B},[]);else throw new Error("options.customColors must be of type string or object.");let j={customLevels:L,customLevelNames:w};C===!0&&!e.customLevels&&(j.customLevels=void 0,j.customLevelNames=void 0);let F=e.include!==void 0?new Set(e.include.split(",")):void 0,z=!F&&e.ignore?new Set(e.ignore.split(",")):void 0,R=At(e.colorize,_,C),v=e.colorizeObjects?R:At(!1,[],!1);return{EOL:r,IDENT:t,colorizer:R,customColors:_,customLevelNames:w,customLevels:L,customPrettifiers:n,customProperties:j,errorLikeObjectKeys:i,errorProps:S,getLevelLabelData:M,hideObject:o,ignoreKeys:z,includeKeys:F,levelFirst:s,levelKey:c,levelLabel:d,messageFormat:u,messageKey:a,minimumLevel:y,objectColorizer:v,singleLine:g,timestampKey:E,translateTime:T,useOnlyCustomProps:C}}});var Gt=h((hs,zt)=>{"use strict";f();zt.exports=ee;ee.default=ee;ee.stable=$t;ee.stableStringify=$t;var le="[...]",Rt="[Circular]",W=[],$=[];function It(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function ee(e,r,t,n){typeof n>"u"&&(n=It()),Be(e,"",0,[],void 0,0,n);var i;try{$.length===0?i=JSON.stringify(e,r,t):i=JSON.stringify(e,Wt(r),t)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;W.length!==0;){var o=W.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return i}function H(e,r,t,n){var i=Object.getOwnPropertyDescriptor(n,t);i.get!==void 0?i.configurable?(Object.defineProperty(n,t,{value:e}),W.push([n,t,r,i])):$.push([r,t,e]):(n[t]=e,W.push([n,t,r]))}function Be(e,r,t,n,i,o,s){o+=1;var c;if(typeof e=="object"&&e!==null){for(c=0;c<n.length;c++)if(n[c]===e){H(Rt,e,r,i);return}if(typeof s.depthLimit<"u"&&o>s.depthLimit){H(le,e,r,i);return}if(typeof s.edgesLimit<"u"&&t+1>s.edgesLimit){H(le,e,r,i);return}if(n.push(e),Array.isArray(e))for(c=0;c<e.length;c++)Be(e[c],c,c,n,e,o,s);else{var d=Object.keys(e);for(c=0;c<d.length;c++){var u=d[c];Be(e[u],u,c,n,e,o,s)}}n.pop()}}function xi(e,r){return e<r?-1:e>r?1:0}function $t(e,r,t,n){typeof n>"u"&&(n=It());var i=xe(e,"",0,[],void 0,0,n)||e,o;try{$.length===0?o=JSON.stringify(i,r,t):o=JSON.stringify(i,Wt(r),t)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;W.length!==0;){var s=W.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return o}function xe(e,r,t,n,i,o,s){o+=1;var c;if(typeof e=="object"&&e!==null){for(c=0;c<n.length;c++)if(n[c]===e){H(Rt,e,r,i);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof s.depthLimit<"u"&&o>s.depthLimit){H(le,e,r,i);return}if(typeof s.edgesLimit<"u"&&t+1>s.edgesLimit){H(le,e,r,i);return}if(n.push(e),Array.isArray(e))for(c=0;c<e.length;c++)xe(e[c],c,c,n,e,o,s);else{var d={},u=Object.keys(e).sort(xi);for(c=0;c<u.length;c++){var a=u[c];xe(e[a],a,c,n,e,o,s),d[a]=e[a]}if(typeof i<"u")W.push([i,r,e]),i[r]=d;else return d}n.pop()}}function Wt(e){return e=typeof e<"u"?e:function(r,t){return t},function(r,t){if($.length>0)for(var n=0;n<$.length;n++){var i=$[n];if(i[1]===r&&i[0]===t){t=i[2],$.splice(n,1);break}}return e.call(this,r,t)}}});var Pe=h((Os,kt)=>{"use strict";f();kt.exports=Ni;var Pi=Q();function Ni({keyName:e,lines:r,eol:t,ident:n}){let i="",o=Pi({input:r,ident:n,eol:t}),s=`${n}${e}: ${o}${t}`.split(t);for(let c=0;c<s.length;c+=1){c!==0&&(i+=t);let d=s[c];if(/^\s*"stack"/.test(d)){let u=/^(\s*"stack":)\s*(".*"),?$/.exec(d);if(u&&u.length===3){let a=/^\s*/.exec(d)[0].length+4,y=" ".repeat(a),g=u[2];i+=u[1]+t+y+JSON.parse(g).replace(/\n/g,t+y)}else i+=d}else i+=d}return i}});var ae=h((Es,Vt)=>{"use strict";f();Vt.exports=Fi;var{LOGGER_KEYS:qi}=P(),Ne=Gt(),Ai=Q(),Ki=Pe();function Fi({log:e,excludeLoggerKeys:r=!0,skipKeys:t=[],context:n}){let{EOL:i,IDENT:o,customPrettifiers:s,errorLikeObjectKeys:c,objectColorizer:d,singleLine:u,colorizer:a}=n,y=[].concat(t);r===!0&&Array.prototype.push.apply(y,qi);let g="",{plain:E,errors:T}=Object.entries(e).reduce(({plain:S,errors:C},[L,w])=>{if(y.includes(L)===!1){let M=typeof s[L]=="function"?s[L](w,L,e,{colors:a.colors}):w;c.includes(L)?C[L]=M:S[L]=M}return{plain:S,errors:C}},{plain:{},errors:{}});return u?(Object.keys(E).length>0&&(g+=d.greyMessage(Ne(E))),g+=i,g=g.replace(/\\\\/gi,"\\")):Object.entries(E).forEach(([S,C])=>{let L=typeof s[S]=="function"?C:Ne(C,null,2);if(L===void 0)return;L=L.replace(/\\\\/gi,"\\");let w=Ai({input:L,ident:o,eol:i});g+=`${o}${d.property(S)}:${w.startsWith(i)?"":" "}${w}${i}`}),Object.entries(T).forEach(([S,C])=>{let L=typeof s[S]=="function"?C:Ne(C,null,2);L!==void 0&&(g+=Ki({keyName:S,lines:L,eol:i,ident:o}))}),g}});var qe=h((ws,Ht)=>{"use strict";f();Ht.exports=zi;var{LOGGER_KEYS:Ri}=P(),Ii=fe(),$i=Q(),Wi=ae();function zi({log:e,context:r}){let{EOL:t,IDENT:n,errorProps:i,messageKey:o}=r,s=e.stack,c=$i({input:s,ident:n,eol:t}),d=`${n}${c}${t}`;if(i.length>0){let u=Ri.concat(o,"type","stack"),a;i[0]==="*"?a=Object.keys(e).filter(y=>u.includes(y)===!1):a=i.filter(y=>u.includes(y)===!1);for(let y=0;y<a.length;y+=1){let g=a[y];if(g in e){if(Ii(e[g])){let E=Wi({log:e[g],excludeLoggerKeys:!1,context:{...r,IDENT:n+n}});d=`${d}${n}${g}: {${t}${E}${n}}${t}`;continue}d=`${d}${n}${g}: ${e[g]}${t}`}}}return d}});var Ae=h((Ms,Yt)=>{"use strict";f();Yt.exports=ki;var Gi=G();function ki({log:e,context:r}){let{colorizer:t,customLevels:n,customLevelNames:i,levelKey:o,getLevelLabelData:s}=r,c=r.customPrettifiers?.level,d=Gi(e,o);if(d===void 0)return;let u=t(d,{customLevels:n,customLevelNames:i});if(c){let[a]=s(d);return c(d,o,e,{label:a,labelColorized:u,colors:t.colors})}return u}});var Ke=h((Ds,Jt)=>{"use strict";f();Jt.exports=Yi;var{LEVELS:Vi}=P(),Ut=G(),Hi=ve();function Yi({log:e,context:r}){let{colorizer:t,customLevels:n,levelKey:i,levelLabel:o,messageFormat:s,messageKey:c,useOnlyCustomProps:d}=r;if(s&&typeof s=="string"){let u=Hi(s,e),a=String(u).replace(/{([^{}]+)}/g,function(y,g){let E;if(g===o&&(E=Ut(e,i))!==void 0)return(d?n===void 0:n[E]===void 0)?Vi[E]:n[E];let T=Ut(e,g);return T!==void 0?T:""});return t.message(a)}if(s&&typeof s=="function"){let u=s(e,c,o,{colors:t.colors});return t.message(u)}if(c in e&&!(typeof e[c]!="string"&&typeof e[c]!="number"&&typeof e[c]!="boolean"))return t.message(e[c])}});var Fe=h((_s,Zt)=>{"use strict";f();Zt.exports=Ui;function Ui({log:e,context:r}){let{customPrettifiers:t,colorizer:n}=r,i="";if(e.name||e.pid||e.hostname){if(i+="(",e.name&&(i+=t.name?t.name(e.name,"name",e,{colors:n.colors}):e.name),e.pid){let o=t.pid?t.pid(e.pid,"pid",e,{colors:n.colors}):e.pid;e.name&&e.pid?i+="/"+o:i+=o}if(e.hostname){let o=t.hostname?t.hostname(e.hostname,"hostname",e,{colors:n.colors}):e.hostname;i+=`${i==="("?"on":" on"} ${o}`}i+=")"}if(e.caller){let o=t.caller?t.caller(e.caller,"caller",e,{colors:n.colors}):e.caller;i+=`${i===""?"":" "}<${o}>`}if(i!=="")return i}});var Re=h((Bs,Xt)=>{"use strict";f();Xt.exports=Zi;var Ji=De();function Zi({log:e,context:r}){let{timestampKey:t,translateTime:n}=r,i=r.customPrettifiers?.time,o=null;if(t in e?o=e[t]:"timestamp"in e&&(o=e.timestamp),o===null)return;let s=n?Ji(o,n):o;return i?i(s):`[${s}]`}});var er=h((Ps,Qt)=>{"use strict";f();Qt.exports={buildSafeSonicBoom:pt(),createDate:Ee(),deleteLogProperty:Ce(),filterLog:Me(),formatTime:De(),getPropertyValue:G(),handleCustomLevelsNamesOpts:Te(),handleCustomLevelsOpts:_e(),interpretConditionals:ve(),isObject:fe(),isValidDate:oe(),joinLinesWithIndentation:Q(),noop:Le(),parseFactoryOptions:Ft(),prettifyErrorLog:qe(),prettifyError:Pe(),prettifyLevel:Ae(),prettifyMessage:Ke(),prettifyMetadata:Fe(),prettifyObject:ae(),prettifyTime:Re(),splitPropertyKey:se(),getLevelLabelData:re()}});var or=h((qs,Y)=>{"use strict";f();var Xi=typeof Buffer<"u",tr=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,rr=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function nr(e,r,t){t==null&&r!==null&&typeof r=="object"&&(t=r,r=void 0),Xi&&Buffer.isBuffer(e)&&(e=e.toString()),e&&e.charCodeAt(0)===65279&&(e=e.slice(1));let n=JSON.parse(e,r);if(n===null||typeof n!="object")return n;let i=t&&t.protoAction||"error",o=t&&t.constructorAction||"error";if(i==="ignore"&&o==="ignore")return n;if(i!=="ignore"&&o!=="ignore"){if(tr.test(e)===!1&&rr.test(e)===!1)return n}else if(i!=="ignore"&&o==="ignore"){if(tr.test(e)===!1)return n}else if(rr.test(e)===!1)return n;return ir(n,{protoAction:i,constructorAction:o,safe:t&&t.safe})}function ir(e,{protoAction:r="error",constructorAction:t="error",safe:n}={}){let i=[e];for(;i.length;){let o=i;i=[];for(let s of o){if(r!=="ignore"&&Object.prototype.hasOwnProperty.call(s,"__proto__")){if(n===!0)return null;if(r==="error")throw new SyntaxError("Object contains forbidden prototype property");delete s.__proto__}if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(s,"constructor")&&s.constructor!==null&&typeof s.constructor=="object"&&Object.prototype.hasOwnProperty.call(s.constructor,"prototype")){if(n===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete s.constructor}for(let c in s){let d=s[c];d&&typeof d=="object"&&i.push(d)}}}return e}function Ie(e,r,t){let{stackTraceLimit:n}=Error;Error.stackTraceLimit=0;try{return nr(e,r,t)}finally{Error.stackTraceLimit=n}}function Qi(e,r){let{stackTraceLimit:t}=Error;Error.stackTraceLimit=0;try{return nr(e,r,{safe:!0})}catch{return}finally{Error.stackTraceLimit=t}}Y.exports=Ie;Y.exports.default=Ie;Y.exports.parse=Ie;Y.exports.safeParse=Qi;Y.exports.scan=ir});var ur=h((Ks,cr)=>{"use strict";f();cr.exports=ao;var eo=or(),sr=fe(),to=qe(),ro=Ae(),no=Ke(),io=Fe(),oo=ae(),so=Re(),co=Me(),{LEVELS:uo,LEVEL_KEY:fo,LEVEL_NAMES:$e}=P(),lo=e=>{try{return{value:eo.parse(e,{protoAction:"remove"})}}catch(r){return{err:r}}};function ao(e){let r;if(sr(e))r=e;else{let c=lo(e);if(c.err||!sr(c.value))return e+this.EOL;r=c.value}if(this.minimumLevel){let c;this.useOnlyCustomProps?c=this.customLevels:c=this.customLevelNames[this.minimumLevel]!==void 0;let d;if(c?d=this.customLevelNames[this.minimumLevel]:d=$e[this.minimumLevel],d||(d=typeof this.minimumLevel=="string"?$e[this.minimumLevel]:$e[uo[this.minimumLevel].toLowerCase()]),r[this.levelKey===void 0?fo:this.levelKey]<d)return}let t=no({log:r,context:this.context});(this.ignoreKeys||this.includeKeys)&&(r=co({log:r,context:this.context}));let n=ro({log:r,context:{...this.context,...this.context.customProperties}}),i=io({log:r,context:this.context}),o=so({log:r,context:this.context}),s="";if(this.levelFirst&&n&&(s=`${n}`),o&&s===""?s=`${o}`:o&&(s=`${s} ${o}`),!this.levelFirst&&n&&(s.length>0?s=`${s} ${n}`:s=n),i&&(s.length>0?s=`${s} ${i}:`:s=i),s.endsWith(":")===!1&&s!==""&&(s+=":"),t!==void 0&&(s.length>0?s=`${s} ${t}`:s=t),s.length>0&&!this.singleLine&&(s+=this.EOL),r.type==="Error"&&typeof r.stack=="string"){let c=to({log:r,context:this.context});this.singleLine&&(s+=this.EOL),s+=c}else if(this.hideObject===!1){let c=[this.messageKey,this.levelKey,this.timestampKey].map(u=>u.replaceAll(/\\/g,"")).filter(u=>typeof r[u]=="string"||typeof r[u]=="number"||typeof r[u]=="boolean"),d=oo({log:r,skipKeys:c,context:this.context});this.singleLine&&!/^\s$/.test(d)&&(s+=" "),s+=d}return s}});var Mo=h((Rs,K)=>{"use strict";f();var{isColorSupported:fr}=me(),yo=pr(),{Transform:po}=I("stream"),mo=nt(),go=Oe(),{ERROR_LIKE_KEYS:lr,LEVEL_KEY:ho,LEVEL_LABEL:bo,MESSAGE_KEY:Oo,TIMESTAMP_KEY:Lo}=P(),{buildSafeSonicBoom:Eo,parseFactoryOptions:Co}=er(),wo=ur(),So={colorize:fr,colorizeObjects:!0,crlf:!1,customColors:null,customLevels:null,customPrettifiers:{},errorLikeObjectKeys:lr,errorProps:"",hideObject:!1,ignore:"hostname",include:void 0,levelFirst:!1,levelKey:ho,levelLabel:bo,messageFormat:null,messageKey:Oo,minimumLevel:void 0,outputStream:process.stdout,singleLine:!1,timestampKey:Lo,translateTime:!0,useOnlyCustomProps:!0};function We(e){let r=Co(Object.assign({},So,e));return wo.bind({...r,context:r})}function ye(e={}){let r=We(e),t;return mo(function(n){n.on("message",function o(s){!s||s.code!=="PINO_CONFIG"||(Object.assign(e,{messageKey:s.config.messageKey,errorLikeObjectKeys:Array.from(new Set([...e.errorLikeObjectKeys||lr,s.config.errorKey])),customLevels:s.config.levels.values}),r=We(e),n.off("message",o))});let i=new po({objectMode:!0,autoDestroy:!0,transform(o,s,c){let d=r(o);c(null,d)}});return typeof e.destination=="object"&&typeof e.destination.write=="function"?t=e.destination:t=Eo({dest:e.destination||1,append:e.append,mkdir:e.mkdir,sync:e.sync}),n.on("unknown",function(o){t.write(o+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as m}from"./chunk-V3XZ4XYN.mjs";import{h as g}from"./chunk-VULBPPPP.mjs";g();g();var L=m();async function F(){let t;switch(L){case"cloudflare":t=await import("./cloudflare-BDB3FS4Y.mjs");break;case"aws-lambda":t=await import("./lambda-S3DVSSBV.mjs");break;case"gcp-cloudrun":t=await import("./gcp-ZEEIATV7.mjs");break;case"bun":t=await import("./bun-GK5CEVAU.mjs");break;case"deno":t=await import("./deno-AIUOFIXG.mjs");break;default:t=await import("./node-A7ZN443L.mjs");break}let e=t.default,r=typeof e=="function"?e():e;return globalThis.logger=r,r}var M=await F();g();g();function T(t){return Date.UTC(t.y,t.m-1,t.d,t.h,t.i,t.s)}function N(t,e){return t.y===e.y&&t.m===e.m&&t.d===e.d&&t.h===e.h&&t.i===e.i&&t.s===e.s}function $(t,e){let r=new Date(Date.parse(t));if(isNaN(r))throw new Error("Invalid ISO8601 passed to timezone parser.");let i=t.substring(9);return i.includes("Z")||i.includes("+")||i.includes("-")?R(r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),"Etc/UTC"):R(r.getFullYear(),r.getMonth()+1,r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),e)}function U(t,e,r){return S($(t,e),r)}function S(t,e){let r=new Date(T(t)),i=v(r,t.tz),n=T(t),s=T(i),o=n-s,a=new Date(r.getTime()+o),h=v(a,t.tz);if(N(h,t)){let u=new Date(a.getTime()-36e5),f=v(u,t.tz);return N(f,t)?u:a}let l=new Date(a.getTime()+T(t)-T(h)),p=v(l,t.tz);if(N(p,t))return l;if(e)throw new Error("Invalid date passed to fromTZ()");return a.getTime()>l.getTime()?a:l}function v(t,e){let r,i;try{r=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}),i=r.formatToParts(t)}catch(s){let o=s instanceof Error?s.message:String(s);throw new RangeError(`toTZ: Invalid timezone '${e}' or date. Please provide a valid IANA timezone (e.g., 'America/New_York', 'Europe/Stockholm'). Original error: ${o}`)}let n={year:0,month:0,day:0,hour:0,minute:0,second:0};for(let s of i)(s.type==="year"||s.type==="month"||s.type==="day"||s.type==="hour"||s.type==="minute"||s.type==="second")&&(n[s.type]=parseInt(s.value,10));if(isNaN(n.year)||isNaN(n.month)||isNaN(n.day)||isNaN(n.hour)||isNaN(n.minute)||isNaN(n.second))throw new Error(`toTZ: Failed to parse all date components from timezone '${e}'. This may indicate an invalid date or timezone configuration. Parsed components: ${JSON.stringify(n)}`);return n.hour===24&&(n.hour=0),{y:n.year,m:n.month,d:n.day,h:n.hour,i:n.minute,s:n.second,tz:e}}function R(t,e,r,i,n,s,o){return{y:t,m:e,d:r,h:i,i:n,s,tz:o}}var z=[1,2,4,8,16],P=class{pattern;timezone;mode;alternativeWeekdays;sloppyRanges;second;minute;hour;day;month;dayOfWeek;year;lastDayOfMonth;lastWeekday;nearestWeekdays;starDOM;starDOW;starYear;useAndLogic;constructor(t,e,r){this.pattern=t,this.timezone=e,this.mode=r?.mode??"auto",this.alternativeWeekdays=r?.alternativeWeekdays??!1,this.sloppyRanges=r?.sloppyRanges??!1,this.second=Array(60).fill(0),this.minute=Array(60).fill(0),this.hour=Array(24).fill(0),this.day=Array(31).fill(0),this.month=Array(12).fill(0),this.dayOfWeek=Array(7).fill(0),this.year=Array(1e4).fill(0),this.lastDayOfMonth=!1,this.lastWeekday=!1,this.nearestWeekdays=Array(31).fill(0),this.starDOM=!1,this.starDOW=!1,this.starYear=!1,this.useAndLogic=!1,this.parse()}parse(){if(!(typeof this.pattern=="string"||this.pattern instanceof String))throw new TypeError("CronPattern: Pattern has to be of type string.");this.pattern.indexOf("@")>=0&&(this.pattern=this.handleNicknames(this.pattern).trim());let t=this.pattern.match(/\S+/g)||[""],e=t.length;if(t.length<5||t.length>7)throw new TypeError("CronPattern: invalid configuration format ('"+this.pattern+"'), exactly five, six, or seven space separated parts are required.");if(this.mode!=="auto"){let i;switch(this.mode){case"5-part":i=5;break;case"6-part":i=6;break;case"7-part":i=7;break;case"5-or-6-parts":i=[5,6];break;case"6-or-7-parts":i=[6,7];break;default:i=0}if(!(Array.isArray(i)?i.includes(e):e===i)){let n=Array.isArray(i)?i.join(" or "):i.toString();throw new TypeError(`CronPattern: mode '${this.mode}' requires exactly ${n} parts, but pattern '${this.pattern}' has ${e} parts.`)}}if(t.length===5&&t.unshift("0"),t.length===6&&t.push("*"),t[3].toUpperCase()==="LW"?(this.lastWeekday=!0,t[3]=""):t[3].toUpperCase().indexOf("L")>=0&&(t[3]=t[3].replace(/L/gi,""),this.lastDayOfMonth=!0),t[3]=="*"&&(this.starDOM=!0),t[6]=="*"&&(this.starYear=!0),t[4].length>=3&&(t[4]=this.replaceAlphaMonths(t[4])),t[5].length>=3&&(t[5]=this.alternativeWeekdays?this.replaceAlphaDaysQuartz(t[5]):this.replaceAlphaDays(t[5])),t[5].startsWith("+")&&(this.useAndLogic=!0,t[5]=t[5].substring(1),t[5]===""))throw new TypeError("CronPattern: Day-of-week field cannot be empty after '+' modifier.");switch(t[5]=="*"&&(this.starDOW=!0),this.pattern.indexOf("?")>=0&&(t[0]=t[0].replace(/\?/g,"*"),t[1]=t[1].replace(/\?/g,"*"),t[2]=t[2].replace(/\?/g,"*"),t[3]=t[3].replace(/\?/g,"*"),t[4]=t[4].replace(/\?/g,"*"),t[5]=t[5].replace(/\?/g,"*"),t[6]&&(t[6]=t[6].replace(/\?/g,"*"))),this.mode){case"5-part":t[0]="0",t[6]="*";break;case"6-part":t[6]="*";break;case"5-or-6-parts":t[6]="*";break;case"6-or-7-parts":break;case"7-part":case"auto":break}this.throwAtIllegalCharacters(t),this.partToArray("second",t[0],0,1),this.partToArray("minute",t[1],0,1),this.partToArray("hour",t[2],0,1),this.partToArray("day",t[3],-1,1),this.partToArray("month",t[4],-1,1);let r=this.alternativeWeekdays?-1:0;this.partToArray("dayOfWeek",t[5],r,63),this.partToArray("year",t[6],0,1),!this.alternativeWeekdays&&this.dayOfWeek[7]&&(this.dayOfWeek[0]=this.dayOfWeek[7])}partToArray(t,e,r,i){let n=this[t],s=t==="day"&&this.lastDayOfMonth,o=t==="day"&&this.lastWeekday;if(e===""&&!s&&!o)throw new TypeError("CronPattern: configuration entry "+t+" ("+e+") is empty, check for trailing spaces.");if(e==="*")return n.fill(i);let a=e.split(",");if(a.length>1)for(let h=0;h<a.length;h++)this.partToArray(t,a[h],r,i);else e.indexOf("-")!==-1&&e.indexOf("/")!==-1?this.handleRangeWithStepping(e,t,r,i):e.indexOf("-")!==-1?this.handleRange(e,t,r,i):e.indexOf("/")!==-1?this.handleStepping(e,t,r,i):e!==""&&this.handleNumber(e,t,r,i)}throwAtIllegalCharacters(t){for(let e=0;e<t.length;e++)if((e===3?/[^/*0-9,\-WwLl]+/:e===5?/[^/*0-9,\-#Ll]+/:/[^/*0-9,\-]+/).test(t[e]))throw new TypeError("CronPattern: configuration entry "+e+" ("+t[e]+") contains illegal characters.")}handleNumber(t,e,r,i){let n=this.extractNth(t,e),s=t.toUpperCase().includes("W");if(e!=="day"&&s)throw new TypeError("CronPattern: Nearest weekday modifier (W) only allowed in day-of-month.");s&&(e="nearestWeekdays");let o=parseInt(n[0],10)+r;if(isNaN(o))throw new TypeError("CronPattern: "+e+" is not a number: '"+t+"'");this.setPart(e,o,n[1]||i)}setPart(t,e,r){if(!Object.prototype.hasOwnProperty.call(this,t))throw new TypeError("CronPattern: Invalid part specified: "+t);if(t==="dayOfWeek"){if(e===7&&(e=0),e<0||e>6)throw new RangeError("CronPattern: Invalid value for dayOfWeek: "+e);this.setNthWeekdayOfMonth(e,r);return}if(t==="second"||t==="minute"){if(e<0||e>=60)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="hour"){if(e<0||e>=24)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="day"||t==="nearestWeekdays"){if(e<0||e>=31)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="month"){if(e<0||e>=12)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="year"&&(e<1||e>=1e4))throw new RangeError("CronPattern: Invalid value for "+t+": "+e+" (supported range: 1-9999)");this[t][e]=r}validateNotNaN(t,e){if(isNaN(t))throw new TypeError(e)}validateRange(t,e,r,i,n){if(t>e)throw new TypeError("CronPattern: From value is larger than to value: '"+n+"'");if(r!==void 0){if(r===0)throw new TypeError("CronPattern: Syntax error, illegal stepping: 0");if(r>this[i].length)throw new TypeError("CronPattern: Syntax error, steps cannot be greater than maximum value of part ("+this[i].length+")")}}handleRangeWithStepping(t,e,r,i){if(t.toUpperCase().includes("W"))throw new TypeError("CronPattern: Syntax error, W is not allowed in ranges with stepping.");let n=this.extractNth(t,e),s=n[0].match(/^(\d+)-(\d+)\/(\d+)$/);if(s===null)throw new TypeError("CronPattern: Syntax error, illegal range with stepping: '"+t+"'");let[,o,a,h]=s,l=parseInt(o,10)+r,p=parseInt(a,10)+r,u=parseInt(h,10);this.validateNotNaN(l,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(p,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateNotNaN(u,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(l,p,u,e,t);for(let f=l;f<=p;f+=u)this.setPart(e,f,n[1]||i)}extractNth(t,e){let r=t,i;if(r.includes("#")){if(e!=="dayOfWeek")throw new Error("CronPattern: nth (#) only allowed in day-of-week field");i=r.split("#")[1],r=r.split("#")[0]}else if(r.toUpperCase().endsWith("L")){if(e!=="dayOfWeek")throw new Error("CronPattern: L modifier only allowed in day-of-week field (use L alone for day-of-month)");i="L",r=r.slice(0,-1)}return[r,i]}handleRange(t,e,r,i){if(t.toUpperCase().includes("W"))throw new TypeError("CronPattern: Syntax error, W is not allowed in a range.");let n=this.extractNth(t,e),s=n[0].split("-");if(s.length!==2)throw new TypeError("CronPattern: Syntax error, illegal range: '"+t+"'");let o=parseInt(s[0],10)+r,a=parseInt(s[1],10)+r;this.validateNotNaN(o,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(a,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateRange(o,a,void 0,e,t);for(let h=o;h<=a;h++)this.setPart(e,h,n[1]||i)}handleStepping(t,e,r,i){if(t.toUpperCase().includes("W"))throw new TypeError("CronPattern: Syntax error, W is not allowed in parts with stepping.");let n=this.extractNth(t,e),s=n[0].split("/");if(s.length!==2)throw new TypeError("CronPattern: Syntax error, illegal stepping: '"+t+"'");if(this.sloppyRanges)s[0]===""&&(s[0]="*");else{if(s[0]==="")throw new TypeError("CronPattern: Syntax error, stepping with missing prefix ('"+t+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.");if(s[0]!=="*")throw new TypeError("CronPattern: Syntax error, stepping with numeric prefix ('"+t+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.")}let o=0;s[0]!=="*"&&(o=parseInt(s[0],10)+r);let a=parseInt(s[1],10);this.validateNotNaN(a,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(0,this[e].length-1,a,e,t);for(let h=o;h<this[e].length;h+=a)this.setPart(e,h,n[1]||i)}replaceAlphaDays(t){return t.replace(/-sun/gi,"-7").replace(/sun/gi,"0").replace(/mon/gi,"1").replace(/tue/gi,"2").replace(/wed/gi,"3").replace(/thu/gi,"4").replace(/fri/gi,"5").replace(/sat/gi,"6")}replaceAlphaDaysQuartz(t){return t.replace(/sun/gi,"1").replace(/mon/gi,"2").replace(/tue/gi,"3").replace(/wed/gi,"4").replace(/thu/gi,"5").replace(/fri/gi,"6").replace(/sat/gi,"7")}replaceAlphaMonths(t){return t.replace(/jan/gi,"1").replace(/feb/gi,"2").replace(/mar/gi,"3").replace(/apr/gi,"4").replace(/may/gi,"5").replace(/jun/gi,"6").replace(/jul/gi,"7").replace(/aug/gi,"8").replace(/sep/gi,"9").replace(/oct/gi,"10").replace(/nov/gi,"11").replace(/dec/gi,"12")}handleNicknames(t){let e=t.trim().toLowerCase();if(e==="@yearly"||e==="@annually")return"0 0 1 1 *";if(e==="@monthly")return"0 0 1 * *";if(e==="@weekly")return"0 0 * * 0";if(e==="@daily"||e==="@midnight")return"0 0 * * *";if(e==="@hourly")return"0 * * * *";if(e==="@reboot")throw new TypeError("CronPattern: @reboot is not supported in this environment. This is an event-based trigger that requires system startup detection.");return t}setNthWeekdayOfMonth(t,e){if(typeof e!="number"&&e.toUpperCase()==="L")this.dayOfWeek[t]=this.dayOfWeek[t]|32;else if(e===63)this.dayOfWeek[t]=63;else if(e<6&&e>0)this.dayOfWeek[t]=this.dayOfWeek[t]|z[e-1];else throw new TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${e}, Type: ${typeof e}`)}},b=[31,28,31,30,31,30,31,31,30,31,30,31],d=[["month","year",0],["day","month",-1],["hour","day",0],["minute","hour",0],["second","minute",0]],y=class I{tz;ms;second;minute;hour;day;month;year;constructor(e,r){if(this.tz=r,e&&e instanceof Date)if(!isNaN(e))this.fromDate(e);else throw new TypeError("CronDate: Invalid date passed to CronDate constructor");else if(e==null)this.fromDate(new Date);else if(e&&typeof e=="string")this.fromString(e);else if(e instanceof I)this.fromCronDate(e);else throw new TypeError("CronDate: Invalid type ("+typeof e+") passed to CronDate constructor")}getLastDayOfMonth(e,r){return r!==1?b[r]:new Date(Date.UTC(e,r+1,0)).getUTCDate()}getLastWeekday(e,r){let i=this.getLastDayOfMonth(e,r),n=new Date(Date.UTC(e,r,i)).getUTCDay();return n===0?i-2:n===6?i-1:i}getNearestWeekday(e,r,i){let n=this.getLastDayOfMonth(e,r);if(i>n)return-1;let s=new Date(Date.UTC(e,r,i)).getUTCDay();return s===0?i===n?i-2:i+1:s===6?i===1?i+2:i-1:i}isNthWeekdayOfMonth(e,r,i,n){let s=new Date(Date.UTC(e,r,i)).getUTCDay(),o=0;for(let a=1;a<=i;a++)new Date(Date.UTC(e,r,a)).getUTCDay()===s&&o++;if(n&63&&z[o-1]&n)return!0;if(n&32){let a=this.getLastDayOfMonth(e,r);for(let h=i+1;h<=a;h++)if(new Date(Date.UTC(e,r,h)).getUTCDay()===s)return!1;return!0}return!1}fromDate(e){if(this.tz!==void 0)if(typeof this.tz=="number")this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes()+this.tz,this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),this.apply();else try{let r=v(e,this.tz);this.ms=e.getMilliseconds(),this.second=r.s,this.minute=r.i,this.hour=r.h,this.day=r.d,this.month=r.m-1,this.year=r.y}catch(r){let i=r instanceof Error?r.message:String(r);throw new TypeError(`CronDate: Failed to convert date to timezone '${this.tz}'. This may happen with invalid timezone names or dates. Original error: ${i}`)}else this.ms=e.getMilliseconds(),this.second=e.getSeconds(),this.minute=e.getMinutes(),this.hour=e.getHours(),this.day=e.getDate(),this.month=e.getMonth(),this.year=e.getFullYear()}fromCronDate(e){this.tz=e.tz,this.year=e.year,this.month=e.month,this.day=e.day,this.hour=e.hour,this.minute=e.minute,this.second=e.second,this.ms=e.ms}apply(){if(this.month>11||this.month<0||this.day>b[this.month]||this.day<1||this.hour>59||this.minute>59||this.second>59||this.hour<0||this.minute<0||this.second<0){let e=new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms));return this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes(),this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),!0}else return!1}fromString(e){if(typeof this.tz=="number"){let r=U(e);this.ms=r.getUTCMilliseconds(),this.second=r.getUTCSeconds(),this.minute=r.getUTCMinutes(),this.hour=r.getUTCHours(),this.day=r.getUTCDate(),this.month=r.getUTCMonth(),this.year=r.getUTCFullYear(),this.apply()}else return this.fromDate(U(e,this.tz))}findNext(e,r,i,n){return this._findMatch(e,r,i,n,1)}_findMatch(e,r,i,n,s){let o=this[r],a;i.lastDayOfMonth&&(a=this.getLastDayOfMonth(this.year,this.month));let h=!i.starDOW&&r=="day"?new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay():void 0,l=this[r]+n,p=s===1?u=>u<i[r].length:u=>u>=0;for(let u=l;p(u);u+=s){let f=i[r][u];if(r==="day"&&!f){for(let c=0;c<i.nearestWeekdays.length;c++)if(i.nearestWeekdays[c]){let E=this.getNearestWeekday(this.year,this.month,c-n);if(E===-1)continue;if(E===u-n){f=1;break}}}if(r==="day"&&i.lastWeekday){let c=this.getLastWeekday(this.year,this.month);u-n===c&&(f=1)}if(r==="day"&&i.lastDayOfMonth&&u-n==a&&(f=1),r==="day"&&!i.starDOW){let c=i.dayOfWeek[(h+(u-n-1))%7];if(c&&c&63)c=this.isNthWeekdayOfMonth(this.year,this.month,u-n,c)?1:0;else if(c)throw new Error(`CronDate: Invalid value for dayOfWeek encountered. ${c}`);i.useAndLogic?f=f&&c:!e.domAndDow&&!i.starDOM?f=f||c:f=f&&c}if(f)return this[r]=u-n,o!==this[r]?2:1}return 3}recurse(e,r,i){if(i===0&&!e.starYear){if(this.year>=0&&this.year<e.year.length&&e.year[this.year]===0){let s=-1;for(let o=this.year+1;o<e.year.length&&o<1e4;o++)if(e.year[o]===1){s=o;break}if(s===-1)return null;this.year=s,this.month=0,this.day=1,this.hour=0,this.minute=0,this.second=0,this.ms=0}if(this.year>=1e4)return null}let n=this.findNext(r,d[i][0],e,d[i][2]);if(n>1){let s=i+1;for(;s<d.length;)this[d[s][0]]=-d[s][2],s++;if(n===3){if(this[d[i][1]]++,this[d[i][0]]=-d[i][2],this.apply(),i===0&&!e.starYear){for(;this.year>=0&&this.year<e.year.length&&e.year[this.year]===0&&this.year<1e4;)this.year++;if(this.year>=1e4||this.year>=e.year.length)return null}return this.recurse(e,r,0)}else if(this.apply())return this.recurse(e,r,i-1)}return i+=1,i>=d.length?this:(e.starYear?this.year>=3e3:this.year>=1e4)?null:this.recurse(e,r,i)}increment(e,r,i){return this.second+=r.interval!==void 0&&r.interval>1&&i?r.interval:1,this.ms=0,this.apply(),this.recurse(e,r,0)}decrement(e,r){return this.second-=r.interval!==void 0&&r.interval>1?r.interval:1,this.ms=0,this.apply(),this.recurseBackward(e,r,0,0)}recurseBackward(e,r,i,n=0){if(n>1e4)return null;if(i===0&&!e.starYear){if(this.year>=0&&this.year<e.year.length&&e.year[this.year]===0){let o=-1;for(let a=this.year-1;a>=0;a--)if(e.year[a]===1){o=a;break}if(o===-1)return null;this.year=o,this.month=11,this.day=31,this.hour=23,this.minute=59,this.second=59,this.ms=0}if(this.year<0)return null}let s=this.findPrevious(r,d[i][0],e,d[i][2]);if(s>1){let o=i+1;for(;o<d.length;){let a=d[o][0],h=d[o][2],l=this.getMaxPatternValue(a,e,h);this[a]=l,o++}if(s===3){if(this[d[i][1]]--,i===0){let p=this.getLastDayOfMonth(this.year,this.month);this.day>p&&(this.day=p)}if(i===1)if(this.day<=0)this.day=1;else{let p=this.year,u=this.month;for(;u<0;)u+=12,p--;for(;u>11;)u-=12,p++;let f=u!==1?b[u]:new Date(Date.UTC(p,u+1,0)).getUTCDate();this.day>f&&(this.day=f)}this.apply();let a=d[i][0],h=d[i][2],l=this.getMaxPatternValue(a,e,h);if(a==="day"){let p=this.getLastDayOfMonth(this.year,this.month);this[a]=Math.min(l,p)}else this[a]=l;if(this.apply(),i===0){let p=d[1][2],u=this.getMaxPatternValue("day",e,p),f=this.getLastDayOfMonth(this.year,this.month),c=Math.min(u,f);c!==this.day&&(this.day=c,this.hour=this.getMaxPatternValue("hour",e,d[2][2]),this.minute=this.getMaxPatternValue("minute",e,d[3][2]),this.second=this.getMaxPatternValue("second",e,d[4][2]))}if(i===0&&!e.starYear){for(;this.year>=0&&this.year<e.year.length&&e.year[this.year]===0;)this.year--;if(this.year<0)return null}return this.recurseBackward(e,r,0,n+1)}else if(this.apply())return this.recurseBackward(e,r,i-1,n+1)}return i+=1,i>=d.length?this:this.year<0?null:this.recurseBackward(e,r,i,n+1)}getMaxPatternValue(e,r,i){if(e==="day"&&r.lastDayOfMonth)return this.getLastDayOfMonth(this.year,this.month);if(e==="day"&&!r.starDOW)return this.getLastDayOfMonth(this.year,this.month);for(let n=r[e].length-1;n>=0;n--)if(r[e][n])return n-i;return r[e].length-1-i}findPrevious(e,r,i,n){return this._findMatch(e,r,i,n,-1)}getDate(e){return e||this.tz===void 0?new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms):typeof this.tz=="number"?new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute-this.tz,this.second,this.ms)):S(R(this.year,this.month+1,this.day,this.hour,this.minute,this.second,this.tz),!1)}getTime(){return this.getDate(!1).getTime()}match(e,r){if(!e.starYear&&(this.year<0||this.year>=e.year.length||e.year[this.year]===0))return!1;for(let i=0;i<d.length;i++){let n=d[i][0],s=d[i][2],o=this[n];if(o+s<0||o+s>=e[n].length)return!1;let a=e[n][o+s];if(n==="day"){if(!a){for(let h=0;h<e.nearestWeekdays.length;h++)if(e.nearestWeekdays[h]){let l=this.getNearestWeekday(this.year,this.month,h-s);if(l!==-1&&l===o){a=1;break}}}if(e.lastWeekday){let h=this.getLastWeekday(this.year,this.month);o===h&&(a=1)}if(e.lastDayOfMonth){let h=this.getLastDayOfMonth(this.year,this.month);o===h&&(a=1)}if(!e.starDOW){let h=new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay(),l=e.dayOfWeek[(h+(o-1))%7];l&&l&63&&(l=this.isNthWeekdayOfMonth(this.year,this.month,o,l)?1:0),e.useAndLogic?a=a&&l:!r.domAndDow&&!e.starDOM?a=a||l:a=a&&l}}if(!a)return!1}return!0}};function Y(t){if(t===void 0&&(t={}),delete t.name,t.legacyMode!==void 0&&t.domAndDow===void 0?t.domAndDow=!t.legacyMode:t.domAndDow===void 0&&(t.domAndDow=!1),t.legacyMode=!t.domAndDow,t.paused=t.paused===void 0?!1:t.paused,t.maxRuns=t.maxRuns===void 0?1/0:t.maxRuns,t.catch=t.catch===void 0?!1:t.catch,t.interval=t.interval===void 0?0:parseInt(t.interval.toString(),10),t.utcOffset=t.utcOffset===void 0?void 0:parseInt(t.utcOffset.toString(),10),t.dayOffset=t.dayOffset===void 0?0:parseInt(t.dayOffset.toString(),10),t.unref=t.unref===void 0?!1:t.unref,t.mode=t.mode===void 0?"auto":t.mode,t.alternativeWeekdays=t.alternativeWeekdays===void 0?!1:t.alternativeWeekdays,t.sloppyRanges=t.sloppyRanges===void 0?!1:t.sloppyRanges,!["auto","5-part","6-part","7-part","5-or-6-parts","6-or-7-parts"].includes(t.mode))throw new Error("CronOptions: mode must be one of 'auto', '5-part', '6-part', '7-part', '5-or-6-parts', or '6-or-7-parts'.");if(t.startAt&&(t.startAt=new y(t.startAt,t.timezone)),t.stopAt&&(t.stopAt=new y(t.stopAt,t.timezone)),t.interval!==null){if(isNaN(t.interval))throw new Error("CronOptions: Supplied value for interval is not a number");if(t.interval<0)throw new Error("CronOptions: Supplied value for interval can not be negative")}if(t.utcOffset!==void 0){if(isNaN(t.utcOffset))throw new Error("CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.");if(t.utcOffset<-870||t.utcOffset>870)throw new Error("CronOptions: utcOffset out of bounds.");if(t.utcOffset!==void 0&&t.timezone)throw new Error("CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.")}if(t.unref!==!0&&t.unref!==!1)throw new Error("CronOptions: Unref should be either true, false or undefined(false).");if(t.dayOffset!==void 0&&t.dayOffset!==0&&isNaN(t.dayOffset))throw new Error("CronOptions: Invalid value passed for dayOffset, should be a number representing days to offset.");return t}function D(t){return Object.prototype.toString.call(t)==="[object Function]"||typeof t=="function"||t instanceof Function}function j(t){return D(t)}function q(t){typeof Deno<"u"&&typeof Deno.unrefTimer<"u"?Deno.unrefTimer(t):t&&typeof t.unref<"u"&&t.unref()}var A=30*1e3,O=[],_=class{name;options;_states;fn;getTz(){return this.options.timezone||this.options.utcOffset}applyDayOffset(t){if(this.options.dayOffset!==void 0&&this.options.dayOffset!==0){let e=this.options.dayOffset*24*60*60*1e3;return new Date(t.getTime()+e)}return t}constructor(t,e,r){let i,n;if(D(e))n=e;else if(typeof e=="object")i=e;else if(e!==void 0)throw new Error("Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).");if(D(r))n=r;else if(typeof r=="object")i=r;else if(r!==void 0)throw new Error("Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).");if(this.name=i?.name,this.options=Y(i),this._states={kill:!1,blocking:!1,previousRun:void 0,currentRun:void 0,once:void 0,currentTimeout:void 0,maxRuns:i?i.maxRuns:void 0,paused:i?i.paused:!1,pattern:new P("* * * * *",void 0,{mode:"auto"})},t&&(t instanceof Date||typeof t=="string"&&t.indexOf(":")>0)?this._states.once=new y(t,this.getTz()):this._states.pattern=new P(t,this.options.timezone,{mode:this.options.mode,alternativeWeekdays:this.options.alternativeWeekdays,sloppyRanges:this.options.sloppyRanges}),this.name){if(O.find(s=>s.name===this.name))throw new Error("Cron: Tried to initialize new named job '"+this.name+"', but name already taken.");O.push(this)}return n!==void 0&&j(n)&&(this.fn=n,this.schedule()),this}nextRun(t){let e=this._next(t);return e?this.applyDayOffset(e.getDate(!1)):null}nextRuns(t,e){this._states.maxRuns!==void 0&&t>this._states.maxRuns&&(t=this._states.maxRuns);let r=e||this._states.currentRun||void 0;return this._enumerateRuns(t,r,"next")}previousRuns(t,e){return this._enumerateRuns(t,e||void 0,"previous")}_enumerateRuns(t,e,r){let i=[],n=e?new y(e,this.getTz()):null,s=r==="next"?this._next:this._previous;for(;t--;){let o=s.call(this,n);if(!o)break;let a=o.getDate(!1);i.push(this.applyDayOffset(a)),n=o}return i}match(t){if(this._states.once){let r=new y(t,this.getTz());r.ms=0;let i=new y(this._states.once,this.getTz());return i.ms=0,r.getTime()===i.getTime()}let e=new y(t,this.getTz());return e.ms=0,e.match(this._states.pattern,this.options)}getPattern(){if(!this._states.once)return this._states.pattern?this._states.pattern.pattern:void 0}getOnce(){return this._states.once?this._states.once.getDate():null}isRunning(){let t=this.nextRun(this._states.currentRun),e=!this._states.paused,r=this.fn!==void 0,i=!this._states.kill;return e&&r&&i&&t!==null}isStopped(){return this._states.kill}isBusy(){return this._states.blocking}currentRun(){return this._states.currentRun?this._states.currentRun.getDate():null}previousRun(){return this._states.previousRun?this._states.previousRun.getDate():null}msToNext(t){let e=this._next(t);return e?t instanceof y||t instanceof Date?e.getTime()-t.getTime():e.getTime()-new y(t).getTime():null}stop(){this._states.kill=!0,this._states.currentTimeout&&clearTimeout(this._states.currentTimeout);let t=O.indexOf(this);t>=0&&O.splice(t,1)}pause(){return this._states.paused=!0,!this._states.kill}resume(){return this._states.paused=!1,!this._states.kill}schedule(t){if(t&&this.fn)throw new Error("Cron: It is not allowed to schedule two functions using the same Croner instance.");t&&(this.fn=t);let e=this.msToNext(),r=this.nextRun(this._states.currentRun);return e==null||isNaN(e)||r===null?this:(e>A&&(e=A),this._states.currentTimeout=setTimeout(()=>this._checkTrigger(r),e),this._states.currentTimeout&&this.options.unref&&q(this._states.currentTimeout),this)}async _trigger(t){this._states.blocking=!0,this._states.currentRun=new y(void 0,this.getTz());try{if(this.options.catch)try{this.fn!==void 0&&await this.fn(this,this.options.context)}catch(e){if(D(this.options.catch))try{this.options.catch(e,this)}catch{}}else this.fn!==void 0&&await this.fn(this,this.options.context)}finally{this._states.previousRun=new y(t,this.getTz()),this._states.blocking=!1}}async trigger(){await this._trigger()}runsLeft(){return this._states.maxRuns}_checkTrigger(t){let e=new Date,r=!this._states.paused&&e.getTime()>=t.getTime(),i=this._states.blocking&&this.options.protect;r&&!i?(this._states.maxRuns!==void 0&&this._states.maxRuns--,this._trigger()):r&&i&&D(this.options.protect)&&setTimeout(()=>this.options.protect(this),0),this.schedule()}_next(t){let e=!!(t||this._states.currentRun),r=!1;!t&&this.options.startAt&&this.options.interval&&([t,e]=this._calculatePreviousRun(t,e),r=!t),t=new y(t,this.getTz()),this.options.startAt&&t&&t.getTime()<this.options.startAt.getTime()&&(t=this.options.startAt);let i=this._states.once||new y(t,this.getTz());return!r&&i!==this._states.once&&(i=i.increment(this._states.pattern,this.options,e)),this._states.once&&this._states.once.getTime()<=t.getTime()||i===null||this._states.maxRuns!==void 0&&this._states.maxRuns<=0||this._states.kill||this.options.stopAt&&i.getTime()>=this.options.stopAt.getTime()?null:i}_previous(t){let e=new y(t,this.getTz());this.options.stopAt&&e.getTime()>this.options.stopAt.getTime()&&(e=this.options.stopAt);let r=new y(e,this.getTz());return this._states.once?this._states.once.getTime()<e.getTime()?this._states.once:null:(r=r.decrement(this._states.pattern,this.options),r===null||this.options.startAt&&r.getTime()<this.options.startAt.getTime()?null:r)}_calculatePreviousRun(t,e){let r=new y(void 0,this.getTz()),i=t;if(this.options.startAt.getTime()<=r.getTime()){i=this.options.startAt;let n=i.getTime()+this.options.interval*1e3;for(;n<=r.getTime();)i=new y(i,this.getTz()).increment(this._states.pattern,this.options,!0),n=i.getTime()+this.options.interval*1e3;e=!0}return i===null&&(i=void 0),[i,e]}};function V(t,e,r,i){let n=i?{timezone:i}:{};return new _("* * * * * *",()=>{let o=new Date;if(!t.some(l=>new _(l,n).nextRun(o)===null))return;e.some(l=>new _(l,n).nextRun(o)===null)||r()})}g();var B=0;function H(){return++B}var W;(typeof __EDGE_RUNTIME__>"u"||!__EDGE_RUNTIME__)&&(W=(await import("module")).createRequire);var Z=M.child({section:"Utils"}),w,C=()=>{if(!w){let t=m();if(W&&typeof import.meta<"u"&&import.meta.url)try{w=W(import.meta.url)}catch{}!w&&typeof globalThis.require=="function"&&(w=globalThis.require),w||(w=e=>{throw new Error(`require("${e}") is not available in this runtime (${t}).`)})}return w},pt={run:()=>Z.info(`Running on ${m()}`)},G=t=>{try{if(typeof Deno<"u"&&Deno.env)return Deno.env.get(t)}catch{}try{if(typeof process<"u"&&process.env)return process.env[t]}catch{}},ct=()=>{try{if(typeof Deno<"u"&&Deno.env)return Deno.env.toObject()}catch{}try{if(typeof process<"u"&&process.env)return{...process.env}}catch{}return{}},yt=t=>{if(typeof Deno<"u"&&Deno.readTextFileSync)return Deno.readTextFileSync(t);let{readFileSync:e}=C()("node:fs");return e(t,"utf8")},gt=t=>{if(typeof Deno<"u"&&Deno.statSync)try{return Deno.statSync(t),!0}catch{return!1}let{existsSync:e}=C()("node:fs");return e(t)},mt=()=>typeof Deno<"u"&&Deno.cwd?Deno.cwd():typeof process<"u"&&process.cwd?process.cwd():"/",wt=()=>{if(m()==="deno")return new URL(".",import.meta.url).pathname;if(typeof import.meta<"u"&&import.meta.url){let e=new URL(import.meta.url);if(e.protocol==="file:"){let{dirname:i}=C()("node:path"),{fileURLToPath:n}=C()("node:url");return i(n(import.meta.url))}let r=e.pathname;return r.substring(0,r.lastIndexOf("/"))}return""},Tt=()=>{let t=m(),e;return t==="deno"?e=Deno.build.os:e=process.platform,e==="win32"||e==="windows"?"windows":"linux"},vt=()=>G("NODE_ENV")?.toLowerCase()==="production"?"production":"development",Dt=()=>m()==="deno"?Deno.env.get("TMPDIR")||Deno.env.get("TEMP")||"/tmp":C()("node:os").tmpdir(),Ct=t=>new Promise(e=>setTimeout(e,t));export{M as a,V as b,H as c,C as d,pt as e,G as f,ct as g,yt as h,gt as i,mt as j,wt as k,Tt as l,vt as m,Dt as n,Ct as o};
|
|
2
|
+
import{a as m}from"./chunk-XFLNYUID.mjs";import{h as g}from"./chunk-VULBPPPP.mjs";g();g();var L=m();async function F(){let t;switch(L){case"cloudflare":t=await import("./cloudflare-QTQSRNP7.mjs");break;case"aws-lambda":t=await import("./lambda-4S67INQI.mjs");break;case"gcp-cloudrun":t=await import("./gcp-VNE5WPOL.mjs");break;case"bun":t=await import("./bun-THMEYPJD.mjs");break;case"deno":t=await import("./deno-BKEQIY74.mjs");break;default:t=await import("./node-RQLZ4GQE.mjs");break}let e=t.default,r=typeof e=="function"?e():e;return globalThis.logger=r,r}var M=await F();g();g();function T(t){return Date.UTC(t.y,t.m-1,t.d,t.h,t.i,t.s)}function N(t,e){return t.y===e.y&&t.m===e.m&&t.d===e.d&&t.h===e.h&&t.i===e.i&&t.s===e.s}function $(t,e){let r=new Date(Date.parse(t));if(isNaN(r))throw new Error("Invalid ISO8601 passed to timezone parser.");let i=t.substring(9);return i.includes("Z")||i.includes("+")||i.includes("-")?R(r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),"Etc/UTC"):R(r.getFullYear(),r.getMonth()+1,r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),e)}function U(t,e,r){return S($(t,e),r)}function S(t,e){let r=new Date(T(t)),i=v(r,t.tz),n=T(t),s=T(i),o=n-s,a=new Date(r.getTime()+o),h=v(a,t.tz);if(N(h,t)){let u=new Date(a.getTime()-36e5),f=v(u,t.tz);return N(f,t)?u:a}let l=new Date(a.getTime()+T(t)-T(h)),p=v(l,t.tz);if(N(p,t))return l;if(e)throw new Error("Invalid date passed to fromTZ()");return a.getTime()>l.getTime()?a:l}function v(t,e){let r,i;try{r=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}),i=r.formatToParts(t)}catch(s){let o=s instanceof Error?s.message:String(s);throw new RangeError(`toTZ: Invalid timezone '${e}' or date. Please provide a valid IANA timezone (e.g., 'America/New_York', 'Europe/Stockholm'). Original error: ${o}`)}let n={year:0,month:0,day:0,hour:0,minute:0,second:0};for(let s of i)(s.type==="year"||s.type==="month"||s.type==="day"||s.type==="hour"||s.type==="minute"||s.type==="second")&&(n[s.type]=parseInt(s.value,10));if(isNaN(n.year)||isNaN(n.month)||isNaN(n.day)||isNaN(n.hour)||isNaN(n.minute)||isNaN(n.second))throw new Error(`toTZ: Failed to parse all date components from timezone '${e}'. This may indicate an invalid date or timezone configuration. Parsed components: ${JSON.stringify(n)}`);return n.hour===24&&(n.hour=0),{y:n.year,m:n.month,d:n.day,h:n.hour,i:n.minute,s:n.second,tz:e}}function R(t,e,r,i,n,s,o){return{y:t,m:e,d:r,h:i,i:n,s,tz:o}}var z=[1,2,4,8,16],P=class{pattern;timezone;mode;alternativeWeekdays;sloppyRanges;second;minute;hour;day;month;dayOfWeek;year;lastDayOfMonth;lastWeekday;nearestWeekdays;starDOM;starDOW;starYear;useAndLogic;constructor(t,e,r){this.pattern=t,this.timezone=e,this.mode=r?.mode??"auto",this.alternativeWeekdays=r?.alternativeWeekdays??!1,this.sloppyRanges=r?.sloppyRanges??!1,this.second=Array(60).fill(0),this.minute=Array(60).fill(0),this.hour=Array(24).fill(0),this.day=Array(31).fill(0),this.month=Array(12).fill(0),this.dayOfWeek=Array(7).fill(0),this.year=Array(1e4).fill(0),this.lastDayOfMonth=!1,this.lastWeekday=!1,this.nearestWeekdays=Array(31).fill(0),this.starDOM=!1,this.starDOW=!1,this.starYear=!1,this.useAndLogic=!1,this.parse()}parse(){if(!(typeof this.pattern=="string"||this.pattern instanceof String))throw new TypeError("CronPattern: Pattern has to be of type string.");this.pattern.indexOf("@")>=0&&(this.pattern=this.handleNicknames(this.pattern).trim());let t=this.pattern.match(/\S+/g)||[""],e=t.length;if(t.length<5||t.length>7)throw new TypeError("CronPattern: invalid configuration format ('"+this.pattern+"'), exactly five, six, or seven space separated parts are required.");if(this.mode!=="auto"){let i;switch(this.mode){case"5-part":i=5;break;case"6-part":i=6;break;case"7-part":i=7;break;case"5-or-6-parts":i=[5,6];break;case"6-or-7-parts":i=[6,7];break;default:i=0}if(!(Array.isArray(i)?i.includes(e):e===i)){let n=Array.isArray(i)?i.join(" or "):i.toString();throw new TypeError(`CronPattern: mode '${this.mode}' requires exactly ${n} parts, but pattern '${this.pattern}' has ${e} parts.`)}}if(t.length===5&&t.unshift("0"),t.length===6&&t.push("*"),t[3].toUpperCase()==="LW"?(this.lastWeekday=!0,t[3]=""):t[3].toUpperCase().indexOf("L")>=0&&(t[3]=t[3].replace(/L/gi,""),this.lastDayOfMonth=!0),t[3]=="*"&&(this.starDOM=!0),t[6]=="*"&&(this.starYear=!0),t[4].length>=3&&(t[4]=this.replaceAlphaMonths(t[4])),t[5].length>=3&&(t[5]=this.alternativeWeekdays?this.replaceAlphaDaysQuartz(t[5]):this.replaceAlphaDays(t[5])),t[5].startsWith("+")&&(this.useAndLogic=!0,t[5]=t[5].substring(1),t[5]===""))throw new TypeError("CronPattern: Day-of-week field cannot be empty after '+' modifier.");switch(t[5]=="*"&&(this.starDOW=!0),this.pattern.indexOf("?")>=0&&(t[0]=t[0].replace(/\?/g,"*"),t[1]=t[1].replace(/\?/g,"*"),t[2]=t[2].replace(/\?/g,"*"),t[3]=t[3].replace(/\?/g,"*"),t[4]=t[4].replace(/\?/g,"*"),t[5]=t[5].replace(/\?/g,"*"),t[6]&&(t[6]=t[6].replace(/\?/g,"*"))),this.mode){case"5-part":t[0]="0",t[6]="*";break;case"6-part":t[6]="*";break;case"5-or-6-parts":t[6]="*";break;case"6-or-7-parts":break;case"7-part":case"auto":break}this.throwAtIllegalCharacters(t),this.partToArray("second",t[0],0,1),this.partToArray("minute",t[1],0,1),this.partToArray("hour",t[2],0,1),this.partToArray("day",t[3],-1,1),this.partToArray("month",t[4],-1,1);let r=this.alternativeWeekdays?-1:0;this.partToArray("dayOfWeek",t[5],r,63),this.partToArray("year",t[6],0,1),!this.alternativeWeekdays&&this.dayOfWeek[7]&&(this.dayOfWeek[0]=this.dayOfWeek[7])}partToArray(t,e,r,i){let n=this[t],s=t==="day"&&this.lastDayOfMonth,o=t==="day"&&this.lastWeekday;if(e===""&&!s&&!o)throw new TypeError("CronPattern: configuration entry "+t+" ("+e+") is empty, check for trailing spaces.");if(e==="*")return n.fill(i);let a=e.split(",");if(a.length>1)for(let h=0;h<a.length;h++)this.partToArray(t,a[h],r,i);else e.indexOf("-")!==-1&&e.indexOf("/")!==-1?this.handleRangeWithStepping(e,t,r,i):e.indexOf("-")!==-1?this.handleRange(e,t,r,i):e.indexOf("/")!==-1?this.handleStepping(e,t,r,i):e!==""&&this.handleNumber(e,t,r,i)}throwAtIllegalCharacters(t){for(let e=0;e<t.length;e++)if((e===3?/[^/*0-9,\-WwLl]+/:e===5?/[^/*0-9,\-#Ll]+/:/[^/*0-9,\-]+/).test(t[e]))throw new TypeError("CronPattern: configuration entry "+e+" ("+t[e]+") contains illegal characters.")}handleNumber(t,e,r,i){let n=this.extractNth(t,e),s=t.toUpperCase().includes("W");if(e!=="day"&&s)throw new TypeError("CronPattern: Nearest weekday modifier (W) only allowed in day-of-month.");s&&(e="nearestWeekdays");let o=parseInt(n[0],10)+r;if(isNaN(o))throw new TypeError("CronPattern: "+e+" is not a number: '"+t+"'");this.setPart(e,o,n[1]||i)}setPart(t,e,r){if(!Object.prototype.hasOwnProperty.call(this,t))throw new TypeError("CronPattern: Invalid part specified: "+t);if(t==="dayOfWeek"){if(e===7&&(e=0),e<0||e>6)throw new RangeError("CronPattern: Invalid value for dayOfWeek: "+e);this.setNthWeekdayOfMonth(e,r);return}if(t==="second"||t==="minute"){if(e<0||e>=60)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="hour"){if(e<0||e>=24)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="day"||t==="nearestWeekdays"){if(e<0||e>=31)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="month"){if(e<0||e>=12)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="year"&&(e<1||e>=1e4))throw new RangeError("CronPattern: Invalid value for "+t+": "+e+" (supported range: 1-9999)");this[t][e]=r}validateNotNaN(t,e){if(isNaN(t))throw new TypeError(e)}validateRange(t,e,r,i,n){if(t>e)throw new TypeError("CronPattern: From value is larger than to value: '"+n+"'");if(r!==void 0){if(r===0)throw new TypeError("CronPattern: Syntax error, illegal stepping: 0");if(r>this[i].length)throw new TypeError("CronPattern: Syntax error, steps cannot be greater than maximum value of part ("+this[i].length+")")}}handleRangeWithStepping(t,e,r,i){if(t.toUpperCase().includes("W"))throw new TypeError("CronPattern: Syntax error, W is not allowed in ranges with stepping.");let n=this.extractNth(t,e),s=n[0].match(/^(\d+)-(\d+)\/(\d+)$/);if(s===null)throw new TypeError("CronPattern: Syntax error, illegal range with stepping: '"+t+"'");let[,o,a,h]=s,l=parseInt(o,10)+r,p=parseInt(a,10)+r,u=parseInt(h,10);this.validateNotNaN(l,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(p,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateNotNaN(u,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(l,p,u,e,t);for(let f=l;f<=p;f+=u)this.setPart(e,f,n[1]||i)}extractNth(t,e){let r=t,i;if(r.includes("#")){if(e!=="dayOfWeek")throw new Error("CronPattern: nth (#) only allowed in day-of-week field");i=r.split("#")[1],r=r.split("#")[0]}else if(r.toUpperCase().endsWith("L")){if(e!=="dayOfWeek")throw new Error("CronPattern: L modifier only allowed in day-of-week field (use L alone for day-of-month)");i="L",r=r.slice(0,-1)}return[r,i]}handleRange(t,e,r,i){if(t.toUpperCase().includes("W"))throw new TypeError("CronPattern: Syntax error, W is not allowed in a range.");let n=this.extractNth(t,e),s=n[0].split("-");if(s.length!==2)throw new TypeError("CronPattern: Syntax error, illegal range: '"+t+"'");let o=parseInt(s[0],10)+r,a=parseInt(s[1],10)+r;this.validateNotNaN(o,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(a,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateRange(o,a,void 0,e,t);for(let h=o;h<=a;h++)this.setPart(e,h,n[1]||i)}handleStepping(t,e,r,i){if(t.toUpperCase().includes("W"))throw new TypeError("CronPattern: Syntax error, W is not allowed in parts with stepping.");let n=this.extractNth(t,e),s=n[0].split("/");if(s.length!==2)throw new TypeError("CronPattern: Syntax error, illegal stepping: '"+t+"'");if(this.sloppyRanges)s[0]===""&&(s[0]="*");else{if(s[0]==="")throw new TypeError("CronPattern: Syntax error, stepping with missing prefix ('"+t+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.");if(s[0]!=="*")throw new TypeError("CronPattern: Syntax error, stepping with numeric prefix ('"+t+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.")}let o=0;s[0]!=="*"&&(o=parseInt(s[0],10)+r);let a=parseInt(s[1],10);this.validateNotNaN(a,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(0,this[e].length-1,a,e,t);for(let h=o;h<this[e].length;h+=a)this.setPart(e,h,n[1]||i)}replaceAlphaDays(t){return t.replace(/-sun/gi,"-7").replace(/sun/gi,"0").replace(/mon/gi,"1").replace(/tue/gi,"2").replace(/wed/gi,"3").replace(/thu/gi,"4").replace(/fri/gi,"5").replace(/sat/gi,"6")}replaceAlphaDaysQuartz(t){return t.replace(/sun/gi,"1").replace(/mon/gi,"2").replace(/tue/gi,"3").replace(/wed/gi,"4").replace(/thu/gi,"5").replace(/fri/gi,"6").replace(/sat/gi,"7")}replaceAlphaMonths(t){return t.replace(/jan/gi,"1").replace(/feb/gi,"2").replace(/mar/gi,"3").replace(/apr/gi,"4").replace(/may/gi,"5").replace(/jun/gi,"6").replace(/jul/gi,"7").replace(/aug/gi,"8").replace(/sep/gi,"9").replace(/oct/gi,"10").replace(/nov/gi,"11").replace(/dec/gi,"12")}handleNicknames(t){let e=t.trim().toLowerCase();if(e==="@yearly"||e==="@annually")return"0 0 1 1 *";if(e==="@monthly")return"0 0 1 * *";if(e==="@weekly")return"0 0 * * 0";if(e==="@daily"||e==="@midnight")return"0 0 * * *";if(e==="@hourly")return"0 * * * *";if(e==="@reboot")throw new TypeError("CronPattern: @reboot is not supported in this environment. This is an event-based trigger that requires system startup detection.");return t}setNthWeekdayOfMonth(t,e){if(typeof e!="number"&&e.toUpperCase()==="L")this.dayOfWeek[t]=this.dayOfWeek[t]|32;else if(e===63)this.dayOfWeek[t]=63;else if(e<6&&e>0)this.dayOfWeek[t]=this.dayOfWeek[t]|z[e-1];else throw new TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${e}, Type: ${typeof e}`)}},b=[31,28,31,30,31,30,31,31,30,31,30,31],d=[["month","year",0],["day","month",-1],["hour","day",0],["minute","hour",0],["second","minute",0]],y=class I{tz;ms;second;minute;hour;day;month;year;constructor(e,r){if(this.tz=r,e&&e instanceof Date)if(!isNaN(e))this.fromDate(e);else throw new TypeError("CronDate: Invalid date passed to CronDate constructor");else if(e==null)this.fromDate(new Date);else if(e&&typeof e=="string")this.fromString(e);else if(e instanceof I)this.fromCronDate(e);else throw new TypeError("CronDate: Invalid type ("+typeof e+") passed to CronDate constructor")}getLastDayOfMonth(e,r){return r!==1?b[r]:new Date(Date.UTC(e,r+1,0)).getUTCDate()}getLastWeekday(e,r){let i=this.getLastDayOfMonth(e,r),n=new Date(Date.UTC(e,r,i)).getUTCDay();return n===0?i-2:n===6?i-1:i}getNearestWeekday(e,r,i){let n=this.getLastDayOfMonth(e,r);if(i>n)return-1;let s=new Date(Date.UTC(e,r,i)).getUTCDay();return s===0?i===n?i-2:i+1:s===6?i===1?i+2:i-1:i}isNthWeekdayOfMonth(e,r,i,n){let s=new Date(Date.UTC(e,r,i)).getUTCDay(),o=0;for(let a=1;a<=i;a++)new Date(Date.UTC(e,r,a)).getUTCDay()===s&&o++;if(n&63&&z[o-1]&n)return!0;if(n&32){let a=this.getLastDayOfMonth(e,r);for(let h=i+1;h<=a;h++)if(new Date(Date.UTC(e,r,h)).getUTCDay()===s)return!1;return!0}return!1}fromDate(e){if(this.tz!==void 0)if(typeof this.tz=="number")this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes()+this.tz,this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),this.apply();else try{let r=v(e,this.tz);this.ms=e.getMilliseconds(),this.second=r.s,this.minute=r.i,this.hour=r.h,this.day=r.d,this.month=r.m-1,this.year=r.y}catch(r){let i=r instanceof Error?r.message:String(r);throw new TypeError(`CronDate: Failed to convert date to timezone '${this.tz}'. This may happen with invalid timezone names or dates. Original error: ${i}`)}else this.ms=e.getMilliseconds(),this.second=e.getSeconds(),this.minute=e.getMinutes(),this.hour=e.getHours(),this.day=e.getDate(),this.month=e.getMonth(),this.year=e.getFullYear()}fromCronDate(e){this.tz=e.tz,this.year=e.year,this.month=e.month,this.day=e.day,this.hour=e.hour,this.minute=e.minute,this.second=e.second,this.ms=e.ms}apply(){if(this.month>11||this.month<0||this.day>b[this.month]||this.day<1||this.hour>59||this.minute>59||this.second>59||this.hour<0||this.minute<0||this.second<0){let e=new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms));return this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes(),this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),!0}else return!1}fromString(e){if(typeof this.tz=="number"){let r=U(e);this.ms=r.getUTCMilliseconds(),this.second=r.getUTCSeconds(),this.minute=r.getUTCMinutes(),this.hour=r.getUTCHours(),this.day=r.getUTCDate(),this.month=r.getUTCMonth(),this.year=r.getUTCFullYear(),this.apply()}else return this.fromDate(U(e,this.tz))}findNext(e,r,i,n){return this._findMatch(e,r,i,n,1)}_findMatch(e,r,i,n,s){let o=this[r],a;i.lastDayOfMonth&&(a=this.getLastDayOfMonth(this.year,this.month));let h=!i.starDOW&&r=="day"?new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay():void 0,l=this[r]+n,p=s===1?u=>u<i[r].length:u=>u>=0;for(let u=l;p(u);u+=s){let f=i[r][u];if(r==="day"&&!f){for(let c=0;c<i.nearestWeekdays.length;c++)if(i.nearestWeekdays[c]){let E=this.getNearestWeekday(this.year,this.month,c-n);if(E===-1)continue;if(E===u-n){f=1;break}}}if(r==="day"&&i.lastWeekday){let c=this.getLastWeekday(this.year,this.month);u-n===c&&(f=1)}if(r==="day"&&i.lastDayOfMonth&&u-n==a&&(f=1),r==="day"&&!i.starDOW){let c=i.dayOfWeek[(h+(u-n-1))%7];if(c&&c&63)c=this.isNthWeekdayOfMonth(this.year,this.month,u-n,c)?1:0;else if(c)throw new Error(`CronDate: Invalid value for dayOfWeek encountered. ${c}`);i.useAndLogic?f=f&&c:!e.domAndDow&&!i.starDOM?f=f||c:f=f&&c}if(f)return this[r]=u-n,o!==this[r]?2:1}return 3}recurse(e,r,i){if(i===0&&!e.starYear){if(this.year>=0&&this.year<e.year.length&&e.year[this.year]===0){let s=-1;for(let o=this.year+1;o<e.year.length&&o<1e4;o++)if(e.year[o]===1){s=o;break}if(s===-1)return null;this.year=s,this.month=0,this.day=1,this.hour=0,this.minute=0,this.second=0,this.ms=0}if(this.year>=1e4)return null}let n=this.findNext(r,d[i][0],e,d[i][2]);if(n>1){let s=i+1;for(;s<d.length;)this[d[s][0]]=-d[s][2],s++;if(n===3){if(this[d[i][1]]++,this[d[i][0]]=-d[i][2],this.apply(),i===0&&!e.starYear){for(;this.year>=0&&this.year<e.year.length&&e.year[this.year]===0&&this.year<1e4;)this.year++;if(this.year>=1e4||this.year>=e.year.length)return null}return this.recurse(e,r,0)}else if(this.apply())return this.recurse(e,r,i-1)}return i+=1,i>=d.length?this:(e.starYear?this.year>=3e3:this.year>=1e4)?null:this.recurse(e,r,i)}increment(e,r,i){return this.second+=r.interval!==void 0&&r.interval>1&&i?r.interval:1,this.ms=0,this.apply(),this.recurse(e,r,0)}decrement(e,r){return this.second-=r.interval!==void 0&&r.interval>1?r.interval:1,this.ms=0,this.apply(),this.recurseBackward(e,r,0,0)}recurseBackward(e,r,i,n=0){if(n>1e4)return null;if(i===0&&!e.starYear){if(this.year>=0&&this.year<e.year.length&&e.year[this.year]===0){let o=-1;for(let a=this.year-1;a>=0;a--)if(e.year[a]===1){o=a;break}if(o===-1)return null;this.year=o,this.month=11,this.day=31,this.hour=23,this.minute=59,this.second=59,this.ms=0}if(this.year<0)return null}let s=this.findPrevious(r,d[i][0],e,d[i][2]);if(s>1){let o=i+1;for(;o<d.length;){let a=d[o][0],h=d[o][2],l=this.getMaxPatternValue(a,e,h);this[a]=l,o++}if(s===3){if(this[d[i][1]]--,i===0){let p=this.getLastDayOfMonth(this.year,this.month);this.day>p&&(this.day=p)}if(i===1)if(this.day<=0)this.day=1;else{let p=this.year,u=this.month;for(;u<0;)u+=12,p--;for(;u>11;)u-=12,p++;let f=u!==1?b[u]:new Date(Date.UTC(p,u+1,0)).getUTCDate();this.day>f&&(this.day=f)}this.apply();let a=d[i][0],h=d[i][2],l=this.getMaxPatternValue(a,e,h);if(a==="day"){let p=this.getLastDayOfMonth(this.year,this.month);this[a]=Math.min(l,p)}else this[a]=l;if(this.apply(),i===0){let p=d[1][2],u=this.getMaxPatternValue("day",e,p),f=this.getLastDayOfMonth(this.year,this.month),c=Math.min(u,f);c!==this.day&&(this.day=c,this.hour=this.getMaxPatternValue("hour",e,d[2][2]),this.minute=this.getMaxPatternValue("minute",e,d[3][2]),this.second=this.getMaxPatternValue("second",e,d[4][2]))}if(i===0&&!e.starYear){for(;this.year>=0&&this.year<e.year.length&&e.year[this.year]===0;)this.year--;if(this.year<0)return null}return this.recurseBackward(e,r,0,n+1)}else if(this.apply())return this.recurseBackward(e,r,i-1,n+1)}return i+=1,i>=d.length?this:this.year<0?null:this.recurseBackward(e,r,i,n+1)}getMaxPatternValue(e,r,i){if(e==="day"&&r.lastDayOfMonth)return this.getLastDayOfMonth(this.year,this.month);if(e==="day"&&!r.starDOW)return this.getLastDayOfMonth(this.year,this.month);for(let n=r[e].length-1;n>=0;n--)if(r[e][n])return n-i;return r[e].length-1-i}findPrevious(e,r,i,n){return this._findMatch(e,r,i,n,-1)}getDate(e){return e||this.tz===void 0?new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms):typeof this.tz=="number"?new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute-this.tz,this.second,this.ms)):S(R(this.year,this.month+1,this.day,this.hour,this.minute,this.second,this.tz),!1)}getTime(){return this.getDate(!1).getTime()}match(e,r){if(!e.starYear&&(this.year<0||this.year>=e.year.length||e.year[this.year]===0))return!1;for(let i=0;i<d.length;i++){let n=d[i][0],s=d[i][2],o=this[n];if(o+s<0||o+s>=e[n].length)return!1;let a=e[n][o+s];if(n==="day"){if(!a){for(let h=0;h<e.nearestWeekdays.length;h++)if(e.nearestWeekdays[h]){let l=this.getNearestWeekday(this.year,this.month,h-s);if(l!==-1&&l===o){a=1;break}}}if(e.lastWeekday){let h=this.getLastWeekday(this.year,this.month);o===h&&(a=1)}if(e.lastDayOfMonth){let h=this.getLastDayOfMonth(this.year,this.month);o===h&&(a=1)}if(!e.starDOW){let h=new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay(),l=e.dayOfWeek[(h+(o-1))%7];l&&l&63&&(l=this.isNthWeekdayOfMonth(this.year,this.month,o,l)?1:0),e.useAndLogic?a=a&&l:!r.domAndDow&&!e.starDOM?a=a||l:a=a&&l}}if(!a)return!1}return!0}};function Y(t){if(t===void 0&&(t={}),delete t.name,t.legacyMode!==void 0&&t.domAndDow===void 0?t.domAndDow=!t.legacyMode:t.domAndDow===void 0&&(t.domAndDow=!1),t.legacyMode=!t.domAndDow,t.paused=t.paused===void 0?!1:t.paused,t.maxRuns=t.maxRuns===void 0?1/0:t.maxRuns,t.catch=t.catch===void 0?!1:t.catch,t.interval=t.interval===void 0?0:parseInt(t.interval.toString(),10),t.utcOffset=t.utcOffset===void 0?void 0:parseInt(t.utcOffset.toString(),10),t.dayOffset=t.dayOffset===void 0?0:parseInt(t.dayOffset.toString(),10),t.unref=t.unref===void 0?!1:t.unref,t.mode=t.mode===void 0?"auto":t.mode,t.alternativeWeekdays=t.alternativeWeekdays===void 0?!1:t.alternativeWeekdays,t.sloppyRanges=t.sloppyRanges===void 0?!1:t.sloppyRanges,!["auto","5-part","6-part","7-part","5-or-6-parts","6-or-7-parts"].includes(t.mode))throw new Error("CronOptions: mode must be one of 'auto', '5-part', '6-part', '7-part', '5-or-6-parts', or '6-or-7-parts'.");if(t.startAt&&(t.startAt=new y(t.startAt,t.timezone)),t.stopAt&&(t.stopAt=new y(t.stopAt,t.timezone)),t.interval!==null){if(isNaN(t.interval))throw new Error("CronOptions: Supplied value for interval is not a number");if(t.interval<0)throw new Error("CronOptions: Supplied value for interval can not be negative")}if(t.utcOffset!==void 0){if(isNaN(t.utcOffset))throw new Error("CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.");if(t.utcOffset<-870||t.utcOffset>870)throw new Error("CronOptions: utcOffset out of bounds.");if(t.utcOffset!==void 0&&t.timezone)throw new Error("CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.")}if(t.unref!==!0&&t.unref!==!1)throw new Error("CronOptions: Unref should be either true, false or undefined(false).");if(t.dayOffset!==void 0&&t.dayOffset!==0&&isNaN(t.dayOffset))throw new Error("CronOptions: Invalid value passed for dayOffset, should be a number representing days to offset.");return t}function D(t){return Object.prototype.toString.call(t)==="[object Function]"||typeof t=="function"||t instanceof Function}function j(t){return D(t)}function q(t){typeof Deno<"u"&&typeof Deno.unrefTimer<"u"?Deno.unrefTimer(t):t&&typeof t.unref<"u"&&t.unref()}var A=30*1e3,O=[],_=class{name;options;_states;fn;getTz(){return this.options.timezone||this.options.utcOffset}applyDayOffset(t){if(this.options.dayOffset!==void 0&&this.options.dayOffset!==0){let e=this.options.dayOffset*24*60*60*1e3;return new Date(t.getTime()+e)}return t}constructor(t,e,r){let i,n;if(D(e))n=e;else if(typeof e=="object")i=e;else if(e!==void 0)throw new Error("Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).");if(D(r))n=r;else if(typeof r=="object")i=r;else if(r!==void 0)throw new Error("Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).");if(this.name=i?.name,this.options=Y(i),this._states={kill:!1,blocking:!1,previousRun:void 0,currentRun:void 0,once:void 0,currentTimeout:void 0,maxRuns:i?i.maxRuns:void 0,paused:i?i.paused:!1,pattern:new P("* * * * *",void 0,{mode:"auto"})},t&&(t instanceof Date||typeof t=="string"&&t.indexOf(":")>0)?this._states.once=new y(t,this.getTz()):this._states.pattern=new P(t,this.options.timezone,{mode:this.options.mode,alternativeWeekdays:this.options.alternativeWeekdays,sloppyRanges:this.options.sloppyRanges}),this.name){if(O.find(s=>s.name===this.name))throw new Error("Cron: Tried to initialize new named job '"+this.name+"', but name already taken.");O.push(this)}return n!==void 0&&j(n)&&(this.fn=n,this.schedule()),this}nextRun(t){let e=this._next(t);return e?this.applyDayOffset(e.getDate(!1)):null}nextRuns(t,e){this._states.maxRuns!==void 0&&t>this._states.maxRuns&&(t=this._states.maxRuns);let r=e||this._states.currentRun||void 0;return this._enumerateRuns(t,r,"next")}previousRuns(t,e){return this._enumerateRuns(t,e||void 0,"previous")}_enumerateRuns(t,e,r){let i=[],n=e?new y(e,this.getTz()):null,s=r==="next"?this._next:this._previous;for(;t--;){let o=s.call(this,n);if(!o)break;let a=o.getDate(!1);i.push(this.applyDayOffset(a)),n=o}return i}match(t){if(this._states.once){let r=new y(t,this.getTz());r.ms=0;let i=new y(this._states.once,this.getTz());return i.ms=0,r.getTime()===i.getTime()}let e=new y(t,this.getTz());return e.ms=0,e.match(this._states.pattern,this.options)}getPattern(){if(!this._states.once)return this._states.pattern?this._states.pattern.pattern:void 0}getOnce(){return this._states.once?this._states.once.getDate():null}isRunning(){let t=this.nextRun(this._states.currentRun),e=!this._states.paused,r=this.fn!==void 0,i=!this._states.kill;return e&&r&&i&&t!==null}isStopped(){return this._states.kill}isBusy(){return this._states.blocking}currentRun(){return this._states.currentRun?this._states.currentRun.getDate():null}previousRun(){return this._states.previousRun?this._states.previousRun.getDate():null}msToNext(t){let e=this._next(t);return e?t instanceof y||t instanceof Date?e.getTime()-t.getTime():e.getTime()-new y(t).getTime():null}stop(){this._states.kill=!0,this._states.currentTimeout&&clearTimeout(this._states.currentTimeout);let t=O.indexOf(this);t>=0&&O.splice(t,1)}pause(){return this._states.paused=!0,!this._states.kill}resume(){return this._states.paused=!1,!this._states.kill}schedule(t){if(t&&this.fn)throw new Error("Cron: It is not allowed to schedule two functions using the same Croner instance.");t&&(this.fn=t);let e=this.msToNext(),r=this.nextRun(this._states.currentRun);return e==null||isNaN(e)||r===null?this:(e>A&&(e=A),this._states.currentTimeout=setTimeout(()=>this._checkTrigger(r),e),this._states.currentTimeout&&this.options.unref&&q(this._states.currentTimeout),this)}async _trigger(t){this._states.blocking=!0,this._states.currentRun=new y(void 0,this.getTz());try{if(this.options.catch)try{this.fn!==void 0&&await this.fn(this,this.options.context)}catch(e){if(D(this.options.catch))try{this.options.catch(e,this)}catch{}}else this.fn!==void 0&&await this.fn(this,this.options.context)}finally{this._states.previousRun=new y(t,this.getTz()),this._states.blocking=!1}}async trigger(){await this._trigger()}runsLeft(){return this._states.maxRuns}_checkTrigger(t){let e=new Date,r=!this._states.paused&&e.getTime()>=t.getTime(),i=this._states.blocking&&this.options.protect;r&&!i?(this._states.maxRuns!==void 0&&this._states.maxRuns--,this._trigger()):r&&i&&D(this.options.protect)&&setTimeout(()=>this.options.protect(this),0),this.schedule()}_next(t){let e=!!(t||this._states.currentRun),r=!1;!t&&this.options.startAt&&this.options.interval&&([t,e]=this._calculatePreviousRun(t,e),r=!t),t=new y(t,this.getTz()),this.options.startAt&&t&&t.getTime()<this.options.startAt.getTime()&&(t=this.options.startAt);let i=this._states.once||new y(t,this.getTz());return!r&&i!==this._states.once&&(i=i.increment(this._states.pattern,this.options,e)),this._states.once&&this._states.once.getTime()<=t.getTime()||i===null||this._states.maxRuns!==void 0&&this._states.maxRuns<=0||this._states.kill||this.options.stopAt&&i.getTime()>=this.options.stopAt.getTime()?null:i}_previous(t){let e=new y(t,this.getTz());this.options.stopAt&&e.getTime()>this.options.stopAt.getTime()&&(e=this.options.stopAt);let r=new y(e,this.getTz());return this._states.once?this._states.once.getTime()<e.getTime()?this._states.once:null:(r=r.decrement(this._states.pattern,this.options),r===null||this.options.startAt&&r.getTime()<this.options.startAt.getTime()?null:r)}_calculatePreviousRun(t,e){let r=new y(void 0,this.getTz()),i=t;if(this.options.startAt.getTime()<=r.getTime()){i=this.options.startAt;let n=i.getTime()+this.options.interval*1e3;for(;n<=r.getTime();)i=new y(i,this.getTz()).increment(this._states.pattern,this.options,!0),n=i.getTime()+this.options.interval*1e3;e=!0}return i===null&&(i=void 0),[i,e]}};function V(t,e,r,i){let n=i?{timezone:i}:{};return new _("* * * * * *",()=>{let o=new Date;if(!t.some(l=>new _(l,n).nextRun(o)===null))return;e.some(l=>new _(l,n).nextRun(o)===null)||r()})}g();var B=0;function H(){return++B}var W;(typeof __EDGE_RUNTIME__>"u"||!__EDGE_RUNTIME__)&&(W=(await import("module")).createRequire);var Z=M.child({section:"Utils"}),w,C=()=>{if(!w){let t=m();if(W&&typeof import.meta<"u"&&import.meta.url)try{w=W(import.meta.url)}catch{}!w&&typeof globalThis.require=="function"&&(w=globalThis.require),w||(w=e=>{throw new Error(`require("${e}") is not available in this runtime (${t}).`)})}return w},ft={run:()=>Z.info(`Running on ${m()}`)},G=t=>{try{if(typeof Deno<"u"&&Deno.env)return Deno.env.get(t)}catch{}try{if(typeof process<"u"&&process.env)return process.env[t]}catch{}},pt=()=>{try{if(typeof Deno<"u"&&Deno.env)return Deno.env.toObject()}catch{}try{if(typeof process<"u"&&process.env)return{...process.env}}catch{}return{}},ct=t=>{if(typeof Deno<"u"&&Deno.readTextFileSync)return Deno.readTextFileSync(t);let{readFileSync:e}=C()("node:fs");return e(t,"utf8")},yt=t=>{if(typeof Deno<"u"&&Deno.statSync)try{return Deno.statSync(t),!0}catch{return!1}let{existsSync:e}=C()("node:fs");return e(t)},gt=()=>typeof Deno<"u"&&Deno.cwd?Deno.cwd():typeof process<"u"&&process.cwd?process.cwd():"/",mt=()=>{if(m()==="deno")return new URL(".",import.meta.url).pathname;if(typeof import.meta<"u"&&import.meta.url){let e=new URL(import.meta.url);if(e.protocol==="file:"){let{dirname:i}=C()("node:path"),{fileURLToPath:n}=C()("node:url");return i(n(import.meta.url))}let r=e.pathname;return r.substring(0,r.lastIndexOf("/"))}return""},wt=()=>{let t=m(),e;return t==="deno"?e=Deno.build.os:e=process.platform,e==="win32"||e==="windows"?"windows":"linux"},Tt=()=>G("NODE_ENV")?.toLowerCase()==="production"?"production":"development",vt=()=>m()==="deno"?Deno.env.get("TMPDIR")||Deno.env.get("TEMP")||"/tmp":C()("node:os").tmpdir(),Dt=t=>new Promise(e=>setTimeout(e,t));export{M as a,V as b,H as c,C as d,ft as e,G as f,pt as g,ct as h,yt as i,gt as j,mt as k,wt as l,Tt as m,vt as n,Dt as o};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as U}from"./chunk-ZGHY5A62.mjs";import{b as wt}from"./chunk-XFLNYUID.mjs";import{a as B,c as v,g as x,h as w}from"./chunk-VULBPPPP.mjs";var Ae=v((cl,Et)=>{"use strict";w();var te=e=>e&&typeof e.message=="string",ve=e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let n=e.cause();return te(n)?n:void 0}else return te(t)?t:void 0},St=(e,t)=>{if(!te(e))return"";let n=e.stack||"";if(t.has(e))return n+`
|
|
3
|
+
causes have become circular...`;let r=ve(e);return r?(t.add(e),n+`
|
|
4
|
+
caused by: `+St(r,t)):n},Ar=e=>St(e,new Set),_t=(e,t,n)=>{if(!te(e))return"";let r=n?"":e.message||"";if(t.has(e))return r+": ...";let i=ve(e);if(i){t.add(e);let s=typeof e.cause=="function";return r+(s?"":": ")+_t(i,t,s)}else return r},Lr=e=>_t(e,new Set);Et.exports={isErrorLike:te,getErrorCause:ve,stackWithCauses:Ar,messageWithCauses:Lr}});var Le=v((hl,xt)=>{"use strict";w();var Tr=Symbol("circular-ref-tag"),se=Symbol("pino-raw-err-ref"),Ot=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[se]},set:function(e){this[se]=e}}});Object.defineProperty(Ot,se,{writable:!0,value:{}});xt.exports={pinoErrProto:Ot,pinoErrorSymbols:{seen:Tr,rawSymbol:se}}});var Lt=v((yl,At)=>{"use strict";w();At.exports=ke;var{messageWithCauses:kr,stackWithCauses:Ir,isErrorLike:vt}=Ae(),{pinoErrProto:Cr,pinoErrorSymbols:Br}=Le(),{seen:Te}=Br,{toString:jr}=Object.prototype;function ke(e){if(!vt(e))return e;e[Te]=void 0;let t=Object.create(Cr);t.type=jr.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=kr(e),t.stack=Ir(e),Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(n=>ke(n)));for(let n in e)if(t[n]===void 0){let r=e[n];vt(r)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(r,Te)&&(t[n]=ke(r)):t[n]=r}return delete e[Te],t.raw=e,t}});var kt=v((ml,Tt)=>{"use strict";w();Tt.exports=fe;var{isErrorLike:Ie}=Ae(),{pinoErrProto:Pr,pinoErrorSymbols:$r}=Le(),{seen:oe}=$r,{toString:Nr}=Object.prototype;function fe(e){if(!Ie(e))return e;e[oe]=void 0;let t=Object.create(Pr);t.type=Nr.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack,Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(n=>fe(n))),Ie(e.cause)&&!Object.prototype.hasOwnProperty.call(e.cause,oe)&&(t.cause=fe(e.cause));for(let n in e)if(t[n]===void 0){let r=e[n];Ie(r)?Object.prototype.hasOwnProperty.call(r,oe)||(t[n]=fe(r)):t[n]=r}return delete e[oe],t.raw=e,t}});var jt=v((bl,Bt)=>{"use strict";w();Bt.exports={mapHttpRequest:Dr,reqSerializer:Ct};var Ce=Symbol("pino-raw-req-ref"),It=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[Ce]},set:function(e){this[Ce]=e}}});Object.defineProperty(It,Ce,{writable:!0,value:{}});function Ct(e){let t=e.info||e.socket,n=Object.create(It);if(n.id=typeof e.id=="function"?e.id():e.id||(e.info?e.info.id:void 0),n.method=e.method,e.originalUrl)n.url=e.originalUrl;else{let r=e.path;n.url=typeof r=="string"?r:e.url?e.url.path||e.url:void 0}return e.query&&(n.query=e.query),e.params&&(n.params=e.params),n.headers=e.headers,n.remoteAddress=t&&t.remoteAddress,n.remotePort=t&&t.remotePort,n.raw=e.raw||e,n}function Dr(e){return{req:Ct(e)}}});var Dt=v((Sl,Nt)=>{"use strict";w();Nt.exports={mapHttpResponse:Rr,resSerializer:$t};var Be=Symbol("pino-raw-res-ref"),Pt=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[Be]},set:function(e){this[Be]=e}}});Object.defineProperty(Pt,Be,{writable:!0,value:{}});function $t(e){let t=Object.create(Pt);return t.statusCode=e.headersSent?e.statusCode:null,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function Rr(e){return{res:$t(e)}}});var Pe=v((El,Rt)=>{"use strict";w();var je=Lt(),qr=kt(),le=jt(),ue=Dt();Rt.exports={err:je,errWithCause:qr,mapHttpRequest:le.mapHttpRequest,mapHttpResponse:ue.mapHttpResponse,req:le.reqSerializer,res:ue.resSerializer,wrapErrorSerializer:function(t){return t===je?t:function(r){return t(je(r))}},wrapRequestSerializer:function(t){return t===le.reqSerializer?t:function(r){return t(le.reqSerializer(r))}},wrapResponseSerializer:function(t){return t===ue.resSerializer?t:function(r){return t(ue.resSerializer(r))}}}});var $e=v((xl,qt)=>{"use strict";w();function Wr(e,t){return t}qt.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=Wr;let n=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(n))return;let r=n.slice(2),i=[];for(let s of r)s&&i.push(s.getFileName());return i}});var Kt=v((Al,Vt)=>{"use strict";w();function Ne(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){let t=[];for(let n=0;n<e.length;n++)t[n]=Ne(e[n]);return t}if(typeof e=="object"){let t=Object.create(Object.getPrototypeOf(e));for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=Ne(e[n]));return t}return e}function Wt(e){let t=[],n="",r=!1,i=!1,s="";for(let u=0;u<e.length;u++){let l=e[u];!r&&l==="."?n&&(t.push(n),n=""):l==="["?(n&&(t.push(n),n=""),r=!0):l==="]"&&r?(t.push(n),n="",r=!1,i=!1):(l==='"'||l==="'")&&r?i?l===s?(i=!1,s=""):n+=l:(i=!0,s=l):n+=l}return n&&t.push(n),t}function Ft(e,t,n){let r=e;for(let s=0;s<t.length-1;s++){let u=t[s];if(typeof r!="object"||r===null||!(u in r)||typeof r[u]!="object"||r[u]===null)return!1;r=r[u]}let i=t[t.length-1];if(i==="*"){if(Array.isArray(r))for(let s=0;s<r.length;s++)r[s]=n;else if(typeof r=="object"&&r!==null)for(let s in r)Object.prototype.hasOwnProperty.call(r,s)&&(r[s]=n)}else typeof r=="object"&&r!==null&&i in r&&Object.prototype.hasOwnProperty.call(r,i)&&(r[i]=n);return!0}function Mt(e,t){let n=e;for(let i=0;i<t.length-1;i++){let s=t[i];if(typeof n!="object"||n===null||!(s in n)||typeof n[s]!="object"||n[s]===null)return!1;n=n[s]}let r=t[t.length-1];if(r==="*"){if(Array.isArray(n))for(let i=0;i<n.length;i++)n[i]=void 0;else if(typeof n=="object"&&n!==null)for(let i in n)Object.prototype.hasOwnProperty.call(n,i)&&delete n[i]}else typeof n=="object"&&n!==null&&r in n&&Object.prototype.hasOwnProperty.call(n,r)&&delete n[r];return!0}var ce=Symbol("PATH_NOT_FOUND");function Fr(e,t){let n=e;for(let r of t){if(n==null||typeof n!="object"||n===null||!(r in n))return ce;n=n[r]}return n}function Mr(e,t){let n=e;for(let r of t){if(n==null||typeof n!="object"||n===null)return;n=n[r]}return n}function zr(e,t,n,r=!1){for(let i of t){let s=Wt(i);if(s.includes("*"))zt(e,s,n,i,r);else if(r)Mt(e,s);else{let u=Fr(e,s);if(u===ce)continue;let l=typeof n=="function"?n(u,s):n;Ft(e,s,l)}}}function zt(e,t,n,r,i=!1){let s=t.indexOf("*");if(s===t.length-1){let u=t.slice(0,-1),l=e;for(let f of u){if(l==null||typeof l!="object"||l===null)return;l=l[f]}if(Array.isArray(l))if(i)for(let f=0;f<l.length;f++)l[f]=void 0;else for(let f=0;f<l.length;f++){let h=[...u,f.toString()],d=typeof n=="function"?n(l[f],h):n;l[f]=d}else if(typeof l=="object"&&l!==null)if(i){let f=[];for(let h in l)Object.prototype.hasOwnProperty.call(l,h)&&f.push(h);for(let h of f)delete l[h]}else for(let f in l){let h=[...u,f],d=typeof n=="function"?n(l[f],h):n;l[f]=d}}else Vr(e,t,n,s,r,i)}function Vr(e,t,n,r,i,s=!1){let u=t.slice(0,r),l=t.slice(r+1),f=[];function h(d,c){if(c===u.length){if(Array.isArray(d))for(let m=0;m<d.length;m++)f[c]=m.toString(),h(d[m],c+1);else if(typeof d=="object"&&d!==null)for(let m in d)f[c]=m,h(d[m],c+1)}else if(c<u.length){let m=u[c];d&&typeof d=="object"&&d!==null&&m in d&&(f[c]=m,h(d[m],c+1))}else if(l.includes("*"))zt(d,l,typeof n=="function"?(y,o)=>{let g=[...f.slice(0,c),...o];return n(y,g)}:n,i,s);else if(s)Mt(d,l);else{let m=typeof n=="function"?n(Mr(d,l),[...f.slice(0,c),...l]):n;Ft(d,l,m)}}if(u.length===0)h(e,0);else{let d=e;for(let c=0;c<u.length;c++){let m=u[c];if(d==null||typeof d!="object"||d===null)return;d=d[m],f[c]=m}d!=null&&h(d,u.length)}}function Kr(e){if(e.length===0)return null;let t=new Map;for(let n of e){let r=Wt(n),i=t;for(let s=0;s<r.length;s++){let u=r[s];i.has(u)||i.set(u,new Map),i=i.get(u)}}return t}function Jr(e,t){if(!t)return e;function n(r,i,s=0){if(!i||i.size===0||r===null||typeof r!="object")return r;if(r instanceof Date)return new Date(r.getTime());if(Array.isArray(r)){let l=[];for(let f=0;f<r.length;f++){let h=f.toString();i.has(h)||i.has("*")?l[f]=n(r[f],i.get(h)||i.get("*")):l[f]=r[f]}return l}let u=Object.create(Object.getPrototypeOf(r));for(let l in r)Object.prototype.hasOwnProperty.call(r,l)&&(i.has(l)||i.has("*")?u[l]=n(r[l],i.get(l)||i.get("*")):u[l]=r[l]);return u}return n(e,t)}function Ur(e){if(typeof e!="string")throw new Error("Paths must be (non-empty) strings");if(e==="")throw new Error("Invalid redaction path ()");if(e.includes(".."))throw new Error(`Invalid redaction path (${e})`);if(e.includes(","))throw new Error(`Invalid redaction path (${e})`);let t=0,n=!1,r="";for(let i=0;i<e.length;i++){let s=e[i];if((s==='"'||s==="'")&&t>0)n?s===r&&(n=!1,r=""):(n=!0,r=s);else if(s==="["&&!n)t++;else if(s==="]"&&!n&&(t--,t<0))throw new Error(`Invalid redaction path (${e})`)}if(t!==0)throw new Error(`Invalid redaction path (${e})`)}function Gr(e){if(!Array.isArray(e))throw new TypeError("paths must be an array");for(let t of e)Ur(t)}function Hr(e={}){let{paths:t=[],censor:n="[REDACTED]",serialize:r=JSON.stringify,strict:i=!0,remove:s=!1}=e;Gr(t);let u=Kr(t);return function(f){if(i&&(f===null||typeof f!="object")&&(f==null||typeof f!="object"))return r?r(f):f;let h=Jr(f,u),d=f,c=n;return typeof n=="function"&&(c=n),zr(h,t,c,s),r===!1?(h.restore=function(){return Ne(d)},h):typeof r=="function"?r(h):JSON.stringify(h)}}Vt.exports=Hr});var Q=v((Tl,Jt)=>{"use strict";w();var Xr=Symbol("pino.setLevel"),Yr=Symbol("pino.getLevel"),Qr=Symbol("pino.levelVal"),Zr=Symbol("pino.levelComp"),ei=Symbol("pino.useLevelLabels"),ti=Symbol("pino.useOnlyCustomLevels"),ni=Symbol("pino.mixin"),ri=Symbol("pino.lsCache"),ii=Symbol("pino.chindings"),si=Symbol("pino.asJson"),oi=Symbol("pino.write"),fi=Symbol("pino.redactFmt"),li=Symbol("pino.time"),ui=Symbol("pino.timeSliceIndex"),ci=Symbol("pino.stream"),ai=Symbol("pino.stringify"),hi=Symbol("pino.stringifySafe"),di=Symbol("pino.stringifiers"),yi=Symbol("pino.end"),gi=Symbol("pino.formatOpts"),mi=Symbol("pino.messageKey"),pi=Symbol("pino.errorKey"),bi=Symbol("pino.nestedKey"),wi=Symbol("pino.nestedKeyStr"),Si=Symbol("pino.mixinMergeStrategy"),_i=Symbol("pino.msgPrefix"),Ei=Symbol("pino.wildcardFirst"),Oi=Symbol.for("pino.serializers"),xi=Symbol.for("pino.formatters"),vi=Symbol.for("pino.hooks"),Ai=Symbol.for("pino.metadata");Jt.exports={setLevelSym:Xr,getLevelSym:Yr,levelValSym:Qr,levelCompSym:Zr,useLevelLabelsSym:ei,mixinSym:ni,lsCacheSym:ri,chindingsSym:ii,asJsonSym:si,writeSym:oi,serializersSym:Oi,redactFmtSym:fi,timeSym:li,timeSliceIndexSym:ui,streamSym:ci,stringifySym:ai,stringifySafeSym:hi,stringifiersSym:di,endSym:yi,formatOptsSym:gi,messageKeySym:mi,errorKeySym:pi,nestedKeySym:bi,wildcardFirstSym:Ei,needsMetadataGsym:Ai,useOnlyCustomLevelsSym:ti,formattersSym:xi,hooksSym:vi,nestedKeyStrSym:wi,mixinMergeStrategySym:Si,msgPrefixSym:_i}});var Re=v((Il,Xt)=>{"use strict";w();var Ut=Kt(),{redactFmtSym:Li,wildcardFirstSym:ae}=Q(),De=/[^.[\]]+|\[([^[\]]*?)\]/g,Gt="[Redacted]",Ht=!1;function Ti(e,t){let{paths:n,censor:r,remove:i}=ki(e),s=n.reduce((f,h)=>{De.lastIndex=0;let d=De.exec(h),c=De.exec(h),m=d[1]!==void 0?d[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):d[0];if(m==="*"&&(m=ae),c===null)return f[m]=null,f;if(f[m]===null)return f;let{index:y}=c,o=`${h.substr(y,h.length-1)}`;return f[m]=f[m]||[],m!==ae&&f[m].length===0&&f[m].push(...f[ae]||[]),m===ae&&Object.keys(f).forEach(function(g){f[g]&&f[g].push(o)}),f[m].push(o),f},{}),u={[Li]:Ut({paths:n,censor:r,serialize:t,strict:Ht,remove:i})},l=(...f)=>t(typeof r=="function"?r(...f):r);return[...Object.keys(s),...Object.getOwnPropertySymbols(s)].reduce((f,h)=>{if(s[h]===null)f[h]=d=>l(d,[h]);else{let d=typeof r=="function"?(c,m)=>r(c,[h,...m]):r;f[h]=Ut({paths:s[h],censor:d,serialize:t,strict:Ht,remove:i})}return f},u)}function ki(e){if(Array.isArray(e))return e={paths:e,censor:Gt},e;let{paths:t,censor:n=Gt,remove:r}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return r===!0&&(n=void 0),{paths:t,censor:n,remove:r}}Xt.exports=Ti});var Zt=v((Bl,Qt)=>{"use strict";w();var Ii=()=>"",Ci=()=>`,"time":${Date.now()}`,Bi=()=>`,"time":${Math.round(Date.now()/1e3)}`,ji=()=>`,"time":"${new Date(Date.now()).toISOString()}"`,Pi=1000000n,Yt=1000000000n,$i=BigInt(Date.now())*Pi,Ni=process.hrtime.bigint(),Di=()=>{let e=process.hrtime.bigint()-Ni,t=$i+e,n=t/Yt,r=t%Yt,i=Number(n*1000n+r/1000000n),s=new Date(i),u=s.getUTCFullYear(),l=(s.getUTCMonth()+1).toString().padStart(2,"0"),f=s.getUTCDate().toString().padStart(2,"0"),h=s.getUTCHours().toString().padStart(2,"0"),d=s.getUTCMinutes().toString().padStart(2,"0"),c=s.getUTCSeconds().toString().padStart(2,"0");return`,"time":"${u}-${l}-${f}T${h}:${d}:${c}.${r.toString().padStart(9,"0")}Z"`};Qt.exports={nullTime:Ii,epochTime:Ci,unixTime:Bi,isoTime:ji,isoTimeNano:Di}});var tn=v((Pl,en)=>{"use strict";w();function Ri(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}en.exports=qi;function qi(e,t,n){var r=n&&n.stringify||Ri,i=1;if(typeof e=="object"&&e!==null){var s=t.length+i;if(s===1)return e;var u=new Array(s);u[0]=r(e);for(var l=1;l<s;l++)u[l]=r(t[l]);return u.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var h="",d=1-i,c=-1,m=e&&e.length||0,y=0;y<m;){if(e.charCodeAt(y)===37&&y+1<m){switch(c=c>-1?c:0,e.charCodeAt(y+1)){case 100:case 102:if(d>=f||t[d]==null)break;c<y&&(h+=e.slice(c,y)),h+=Number(t[d]),c=y+2,y++;break;case 105:if(d>=f||t[d]==null)break;c<y&&(h+=e.slice(c,y)),h+=Math.floor(Number(t[d])),c=y+2,y++;break;case 79:case 111:case 106:if(d>=f||t[d]===void 0)break;c<y&&(h+=e.slice(c,y));var o=typeof t[d];if(o==="string"){h+="'"+t[d]+"'",c=y+2,y++;break}if(o==="function"){h+=t[d].name||"<anonymous>",c=y+2,y++;break}h+=r(t[d]),c=y+2,y++;break;case 115:if(d>=f)break;c<y&&(h+=e.slice(c,y)),h+=String(t[d]),c=y+2,y++;break;case 37:c<y&&(h+=e.slice(c,y)),h+="%",c=y+2,y++,d--;break}++d}++y}return c===-1?e:(c<m&&(h+=e.slice(c)),h)}});var We=v((Nl,qe)=>{"use strict";w();if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(n){if((n>0&&n<1/0)===!1)throw typeof n!="number"&&typeof n!="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(n))},e=new Int32Array(new SharedArrayBuffer(4));qe.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 r=Date.now()+Number(t);for(;r>Date.now(););};qe.exports=e}});var cn=v((Rl,un)=>{"use strict";w();var k=B("fs"),Wi=B("events"),Fi=B("util").inherits,nn=B("path"),Me=We(),Mi=B("assert"),he=100,de=Buffer.allocUnsafe(0),zi=16*1024,rn="buffer",sn="utf8",[Vi,Ki]=(process.versions.node||"0.0").split(".").map(Number),Ji=Vi>=22&&Ki>=7;function on(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function n(s,u){if(s){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",s)}):t.emit("error",s);return}let l=t._reopening;t.fd=u,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t.destroyed&&(!t._writing&&t._len>t.minLength||t._flushPending?t._actualWrite():l&&process.nextTick(()=>t.emit("drain")))}let r=t.append?"a":"w",i=t.mode;if(t.sync)try{t.mkdir&&k.mkdirSync(nn.dirname(e),{recursive:!0});let s=k.openSync(e,r,i);n(null,s)}catch(s){throw n(s),s}else t.mkdir?k.mkdir(nn.dirname(e),{recursive:!0},s=>{if(s)return n(s);k.open(e,r,i,n)}):k.open(e,r,i,n)}function F(e){if(!(this instanceof F))return new F(e);let{fd:t,dest:n,minLength:r,maxLength:i,maxWrite:s,periodicFlush:u,sync:l,append:f=!0,mkdir:h,retryEAGAIN:d,fsync:c,contentMode:m,mode:y}=e||{};t=t||n,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(r||0,16387),this.file=null,this.destroyed=!1,this.minLength=r||0,this.maxLength=i||0,this.maxWrite=s||zi,this._periodicFlush=u||0,this._periodicFlushTimer=void 0,this.sync=l||!1,this.writable=!0,this._fsync=c||!1,this.append=f||!1,this.mode=y,this.retryEAGAIN=d||(()=>!0),this.mkdir=h||!1;let o,g;if(m===rn)this._writingBuf=de,this.write=Hi,this.flush=Yi,this.flushSync=Zi,this._actualWrite=ts,o=()=>k.writeSync(this.fd,this._writingBuf),g=()=>k.write(this.fd,this._writingBuf,this.release);else if(m===void 0||m===sn)this._writingBuf="",this.write=Gi,this.flush=Xi,this.flushSync=Qi,this._actualWrite=es,o=()=>Buffer.isBuffer(this._writingBuf)?k.writeSync(this.fd,this._writingBuf):k.writeSync(this.fd,this._writingBuf,"utf8"),g=()=>Buffer.isBuffer(this._writingBuf)?k.write(this.fd,this._writingBuf,this.release):k.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${sn}" and "${rn}", but passed ${m}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")on(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(p,S)=>{if(p){if((p.code==="EAGAIN"||p.code==="EBUSY")&&this.retryEAGAIN(p,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{Me(he),this.release(void 0,0)}catch(E){this.release(E)}else setTimeout(g,he);else this._writing=!1,this.emit("error",p);return}this.emit("write",S);let _=Fe(this._writingBuf,this._len,S);if(this._len=_.len,this._writingBuf=_.writingBuf,this._writingBuf.length){if(!this.sync){g();return}try{do{let E=o(),T=Fe(this._writingBuf,this._len,E);this._len=T.len,this._writingBuf=T.writingBuf}while(this._writingBuf.length)}catch(E){this.release(E);return}}this._fsync&&k.fsyncSync(this.fd);let b=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):b>this.minLength?this._actualWrite():this._ending?b>0?this._actualWrite():(this._writing=!1,ye(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(Ui,this)):this.emit("drain"))},this.on("newListener",function(p){p==="drain"&&(this._asyncDrainScheduled=!1)}),this._periodicFlush!==0&&(this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref())}function Fe(e,t,n){return typeof e=="string"&&(e=Buffer.from(e)),t=Math.max(t-n,0),e=e.subarray(n),{writingBuf:e,len:t}}function Ui(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}Fi(F,Wi);function fn(e,t){return e.length===0?de:e.length===1?e[0]:Buffer.concat(e,t)}function Gi(e){if(this.destroyed)throw new Error("SonicBoom destroyed");e=""+e;let t=Buffer.byteLength(e),n=this._len+t,r=this._bufs;return this.maxLength&&n>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||Buffer.byteLength(r[r.length-1])+t>this.maxWrite?r.push(e):r[r.length-1]+=e,this._len=n,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function Hi(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,n=this._bufs,r=this._lens;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(n.length===0||r[r.length-1]+e.length>this.maxWrite?(n.push([e]),r.push(e.length)):(n[n.length-1].push(e),r[r.length-1]+=e.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function ln(e){this._flushPending=!0;let t=()=>{if(this._fsync)this._flushPending=!1,e();else try{k.fsync(this.fd,r=>{this._flushPending=!1,e(r)})}catch(r){e(r)}this.off("error",n)},n=r=>{this._flushPending=!1,e(r),this.off("drain",t)};this.once("drain",t),this.once("error",n)}function Xi(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&ln.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function Yi(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&ln.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}F.prototype.reopen=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(e)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(e&&(this.file=e),this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&k.close(t,n=>{if(n)return this.emit("error",n)})}),on(this.file,this)};F.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():ye(this)))};function Qi(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let e="";for(;this._bufs.length||e.length;){e.length<=0&&(e=this._bufs[0]);try{let t=Buffer.isBuffer(e)?k.writeSync(this.fd,e):k.writeSync(this.fd,e,"utf8"),n=Fe(e,this._len,t);e=n.writingBuf,this._len=n.len,e.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;Me(he)}}try{k.fsyncSync(this.fd)}catch{}}function Zi(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=de);let e=de;for(;this._bufs.length||e.length;){e.length<=0&&(e=fn(this._bufs[0],this._lens[0]));try{let t=k.writeSync(this.fd,e);e=e.subarray(t),this._len=Math.max(this._len-t,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;Me(he)}}}F.prototype.destroy=function(){this.destroyed||ye(this)};function es(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:this._bufs.shift()||"",this.sync)try{let t=Buffer.isBuffer(this._writingBuf)?k.writeSync(this.fd,this._writingBuf):k.writeSync(this.fd,this._writingBuf,"utf8");e(null,t)}catch(t){e(t)}else k.write(this.fd,this._writingBuf,e)}function ts(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:fn(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=k.writeSync(this.fd,this._writingBuf);e(null,t)}catch(t){e(t)}else Ji&&(this._writingBuf=Buffer.from(this._writingBuf)),k.write(this.fd,this._writingBuf,e)}function ye(e){if(e.fd===-1){e.once("ready",ye.bind(null,e));return}e._periodicFlushTimer!==void 0&&clearInterval(e._periodicFlushTimer),e.destroyed=!0,e._bufs=[],e._lens=[],Mi(typeof e.fd=="number",`sonic.fd must be a number, got ${typeof e.fd}`);try{k.fsync(e.fd,t)}catch{}function t(){e.fd!==1&&e.fd!==2?k.close(e.fd,n):n()}function n(r){if(r){e.emit("error",r);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}F.SonicBoom=F;F.default=F;un.exports=F});var ze=v((Wl,gn)=>{"use strict";w();var M={exit:[],beforeExit:[]},an={exit:is,beforeExit:ss},Z;function ns(){Z===void 0&&(Z=new FinalizationRegistry(os))}function rs(e){M[e].length>0||process.on(e,an[e])}function hn(e){M[e].length>0||(process.removeListener(e,an[e]),M.exit.length===0&&M.beforeExit.length===0&&(Z=void 0))}function is(){dn("exit")}function ss(){dn("beforeExit")}function dn(e){for(let t of M[e]){let n=t.deref(),r=t.fn;n!==void 0&&r(n,e)}M[e]=[]}function os(e){for(let t of["exit","beforeExit"]){let n=M[t].indexOf(e);M[t].splice(n,n+1),hn(t)}}function yn(e,t,n){if(t===void 0)throw new Error("the object can't be undefined");rs(e);let r=new WeakRef(t);r.fn=n,ns(),Z.register(t,r),M[e].push(r)}function fs(e,t){yn("exit",e,t)}function ls(e,t){yn("beforeExit",e,t)}function us(e){if(Z!==void 0){Z.unregister(e);for(let t of["exit","beforeExit"])M[t]=M[t].filter(n=>{let r=n.deref();return r&&r!==e}),hn(t)}}gn.exports={register:fs,registerBeforeExit:ls,unregister:us}});var mn=v((Ml,cs)=>{cs.exports={name:"thread-stream",version:"4.0.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",engines:{node:">=20"},dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^22.0.0","@yao-pkg/pkg":"^6.0.0",borp:"^0.21.0",desm:"^1.3.0",eslint:"^9.39.1",fastbench:"^1.0.1",husky:"^9.0.6",neostandard:"^0.12.2","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1","ts-node":"^10.8.0",typescript:"~5.7.3"},scripts:{build:"tsc --noEmit",lint:"eslint",test:"npm run lint && npm run build && npm run transpile && borp --pattern 'test/*.test.{js,mjs}'","test:ci":"npm run lint && npm run transpile && borp --pattern 'test/*.test.{js,mjs}'","test:yarn":"npm run transpile && borp --pattern 'test/*.test.js'",transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina <hello@matteocollina.com>",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var bn=v((zl,pn)=>{"use strict";w();function as(e,t,n,r,i){let s=r===1/0?1/0:Date.now()+r,u=()=>{let l=Atomics.load(e,t);if(l===n){i(null,"ok");return}if(s!==1/0&&Date.now()>s){i(null,"timed-out");return}let f=s===1/0?1e4:Math.min(1e4,Math.max(1,s-Date.now())),h=Atomics.waitAsync(e,t,l,f);h.async?h.value.then(u):setImmediate(u)};u()}function hs(e,t,n,r,i){let s=r===1/0?1/0:Date.now()+r,u=()=>{if(Atomics.load(e,t)!==n){i(null,"ok");return}if(s!==1/0&&Date.now()>s){i(null,"timed-out");return}let f=s===1/0?1e4:Math.min(1e4,Math.max(1,s-Date.now())),h=Atomics.waitAsync(e,t,n,f);h.async?h.value.then(u):setImmediate(u)};u()}pn.exports={wait:as,waitDiff:hs}});var Sn=v((Kl,wn)=>{"use strict";w();wn.exports={WRITE_INDEX:4,READ_INDEX:8}});var vn=v((Ul,xn)=>{"use strict";w();var{version:ds}=mn(),{EventEmitter:ys}=B("events"),{Worker:gs}=B("worker_threads"),{join:ms}=B("path"),{pathToFileURL:ps}=B("url"),{wait:bs}=bn(),{WRITE_INDEX:D,READ_INDEX:N}=Sn(),ws=B("buffer"),Ss=B("assert"),a=Symbol("kImpl"),_s=ws.constants.MAX_STRING_LENGTH,ne=class{constructor(t){this._value=t}deref(){return this._value}},me=class{register(){}unregister(){}},Es=process.env.NODE_V8_COVERAGE?me:global.FinalizationRegistry||me,Os=process.env.NODE_V8_COVERAGE?ne:global.WeakRef||ne,_n=new Es(e=>{e.exited||e.terminate()});function xs(e,t){let{filename:n,workerData:r}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||ms(x,"lib","worker.js"),u=new gs(s,{...t.workerOpts,trackUnmanagedFds:!1,workerData:{filename:n.indexOf("file://")===0?n:ps(n).href,dataBuf:e[a].dataBuf,stateBuf:e[a].stateBuf,workerData:{$context:{threadStreamVersion:ds},...r}}});return u.stream=new ne(e),u.on("message",vs),u.on("exit",On),_n.register(e,u),u}function En(e){Ss(!e[a].sync),e[a].needDrain&&(e[a].needDrain=!1,e.emit("drain"))}function ge(e){let t=Atomics.load(e[a].state,D),n=e[a].data.length-t;if(n>0){if(e[a].buf.length===0){e[a].flushing=!1,e[a].ending?Ge(e):e[a].needDrain&&process.nextTick(En,e);return}let r=e[a].buf.slice(0,n),i=Buffer.byteLength(r);i<=n?(e[a].buf=e[a].buf.slice(n),pe(e,r,ge.bind(null,e))):e.flush(()=>{if(!e.destroyed){for(Atomics.store(e[a].state,N,0),Atomics.store(e[a].state,D,0),Atomics.notify(e[a].state,N);i>e[a].data.length;)n=n/2,r=e[a].buf.slice(0,n),i=Buffer.byteLength(r);e[a].buf=e[a].buf.slice(n),pe(e,r,ge.bind(null,e))}})}else if(n===0){if(t===0&&e[a].buf.length===0)return;e.flush(()=>{Atomics.store(e[a].state,N,0),Atomics.store(e[a].state,D,0),Atomics.notify(e[a].state,N),ge(e)})}else z(e,new Error("overwritten"))}function vs(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}switch(e.code){case"READY":this.stream=new Os(t),t.flush(()=>{t[a].ready=!0,t.emit("ready")});break;case"ERROR":z(t,e.err);break;case"EVENT":Array.isArray(e.args)?t.emit(e.name,...e.args):t.emit(e.name,e.args);break;case"WARNING":process.emitWarning(e.err);break;default:z(t,new Error("this should not happen: "+e.code))}}function On(e){let t=this.stream.deref();t!==void 0&&(_n.unregister(t),t.worker.exited=!0,t.worker.off("exit",On),z(t,e!==0?new Error("the worker thread exited"):null))}var Ke=class extends ys{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[a]={},this[a].stateBuf=new SharedArrayBuffer(128),this[a].state=new Int32Array(this[a].stateBuf),this[a].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[a].data=Buffer.from(this[a].dataBuf),this[a].sync=t.sync||!1,this[a].ending=!1,this[a].ended=!1,this[a].needDrain=!1,this[a].destroyed=!1,this[a].flushing=!1,this[a].ready=!1,this[a].finished=!1,this[a].errored=null,this[a].closed=!1,this[a].buf="",this.worker=xs(this,t),this.on("message",(n,r)=>{this.worker.postMessage(n,r)})}write(t){if(this[a].destroyed)return Je(this,new Error("the worker has exited")),!1;if(this[a].ending)return Je(this,new Error("the worker is ending")),!1;if(this[a].flushing&&this[a].buf.length+t.length>=_s)try{Ve(this),this[a].flushing=!0}catch(n){return z(this,n),!1}if(this[a].buf+=t,this[a].sync)try{return Ve(this),!0}catch(n){return z(this,n),!1}return this[a].flushing||(this[a].flushing=!0,setImmediate(ge,this)),this[a].needDrain=this[a].data.length-this[a].buf.length-Atomics.load(this[a].state,D)<=0,!this[a].needDrain}end(){this[a].destroyed||(this[a].ending=!0,Ge(this))}flush(t){if(this[a].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let n=Atomics.load(this[a].state,D);bs(this[a].state,N,n,1/0,(r,i)=>{if(r){z(this,r),process.nextTick(t,r);return}if(i==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[a].destroyed||(Ve(this),Ue(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[a].ready}get destroyed(){return this[a].destroyed}get closed(){return this[a].closed}get writable(){return!this[a].destroyed&&!this[a].ending}get writableEnded(){return this[a].ending}get writableFinished(){return this[a].finished}get writableNeedDrain(){return this[a].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[a].errored}};function Je(e,t){setImmediate(()=>{e.emit("error",t)})}function z(e,t){e[a].destroyed||(e[a].destroyed=!0,t&&(e[a].errored=t,Je(e,t)),e.worker.exited?setImmediate(()=>{e[a].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[a].closed=!0,e.emit("close")}))}function pe(e,t,n){let r=Atomics.load(e[a].state,D),i=Buffer.byteLength(t);return e[a].data.write(t,r),Atomics.store(e[a].state,D,r+i),Atomics.notify(e[a].state,D),n(),!0}function Ge(e){if(!(e[a].ended||!e[a].ending||e[a].flushing)){e[a].ended=!0;try{e.flushSync();let t=Atomics.load(e[a].state,N);Atomics.store(e[a].state,D,-1),Atomics.notify(e[a].state,D);let n=0;for(;t!==-1;){if(Atomics.wait(e[a].state,N,t,1e3),t=Atomics.load(e[a].state,N),t===-2){z(e,new Error("end() failed"));return}if(++n===10){z(e,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{e[a].finished=!0,e.emit("finish")})}catch(t){z(e,t)}}}function Ve(e){let t=()=>{e[a].ending?Ge(e):e[a].needDrain&&process.nextTick(En,e)};for(e[a].flushing=!1;e[a].buf.length!==0;){let n=Atomics.load(e[a].state,D),r=e[a].data.length-n;if(r===0){Ue(e),Atomics.store(e[a].state,N,0),Atomics.store(e[a].state,D,0),Atomics.notify(e[a].state,N);continue}else if(r<0)throw new Error("overwritten");let i=e[a].buf.slice(0,r),s=Buffer.byteLength(i);if(s<=r)e[a].buf=e[a].buf.slice(r),pe(e,i,t);else{for(Ue(e),Atomics.store(e[a].state,N,0),Atomics.store(e[a].state,D,0),Atomics.notify(e[a].state,N);s>e[a].buf.length;)r=r/2,i=e[a].buf.slice(0,r),s=Buffer.byteLength(i);e[a].buf=e[a].buf.slice(r),pe(e,i,t)}}}function Ue(e){if(e[a].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[a].state,D),n=0;for(;;){let r=Atomics.load(e[a].state,N);if(r===-2)throw Error("_flushSync failed");if(r!==t)Atomics.wait(e[a].state,N,r,1e3);else break;if(++n===10)throw new Error("_flushSync took too long (10s)")}}xn.exports=Ke});var Ye=v((Hl,Tn)=>{"use strict";w();var{createRequire:As}=B("module"),{existsSync:Ls}=B("fs"),Ts=$e(),{join:He,isAbsolute:Ln,sep:ks}=B("path"),{fileURLToPath:Is}=B("url"),Cs=We(),Xe=ze(),Bs=vn();function js(e){Xe.register(e,Rs),Xe.registerBeforeExit(e,qs),e.on("close",function(){Xe.unregister(e)})}function Ps(){let e=process.execArgv;for(let t=0;t<e.length;t++){let n=e[t];if(n==="--import"||n==="--require"||n==="-r"||n.startsWith("--import=")||n.startsWith("--require=")||n.startsWith("-r="))return!0}return!1}function $s(e){let t=e.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g);if(!t)return e;let n=[],r=!1;for(let i=0;i<t.length;i++){let s=t[i];if(s==="--require"||s==="-r"||s==="--import"){let u=t[i+1];if(u&&An(u)){r=!0,i++;continue}n.push(s),u&&(n.push(u),i++);continue}if(s.startsWith("--require=")||s.startsWith("-r=")||s.startsWith("--import=")){let u=s.slice(s.indexOf("=")+1);if(An(u)){r=!0;continue}}n.push(s)}return r?n.join(" "):e}function An(e){let t=Ns(e);if(!t)return!1;let n=t;if(n.startsWith("file://"))try{n=Is(n)}catch{return!1}return Ln(n)&&!Ls(n)}function Ns(e){let t=e[0],n=e[e.length-1];return t==='"'&&n==='"'||t==="'"&&n==="'"?e.slice(1,-1):e}function Ds(e,t,n,r,i){if(!n.execArgv&&Ps()&&B.main===void 0&&(n={...n,execArgv:[]}),!n.env&&process.env.NODE_OPTIONS){let f=$s(process.env.NODE_OPTIONS);f!==process.env.NODE_OPTIONS&&(n={...n,env:{...process.env,NODE_OPTIONS:f}})}n={...n,name:i};let s=new Bs({filename:e,workerData:t,workerOpts:n,sync:r});s.on("ready",u),s.on("close",function(){process.removeListener("exit",l)}),process.on("exit",l);function u(){process.removeListener("exit",l),s.unref(),n.autoEnd!==!1&&js(s)}function l(){s.closed||(s.flushSync(),Cs(100),s.end())}return s}function Rs(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function qs(e){e.flushSync()}function Ws(e){let{pipeline:t,targets:n,levels:r,dedupe:i,worker:s={},caller:u=Ts(),sync:l=!1}=e,f={...e.options},h=typeof u=="string"?[u]:u,d=typeof globalThis=="object"&&Object.prototype.hasOwnProperty.call(globalThis,"__bundlerPathsOverrides")&&globalThis.__bundlerPathsOverrides&&typeof globalThis.__bundlerPathsOverrides=="object"?globalThis.__bundlerPathsOverrides:Object.create(null),c=e.target;if(c&&n)throw new Error("only one of target or targets can be specified");n?(c=d["pino-worker"]||He(x,"worker.js"),f.targets=n.filter(o=>o.target).map(o=>({...o,target:y(o.target)})),f.pipelines=n.filter(o=>o.pipeline).map(o=>o.pipeline.map(g=>({...g,level:o.level,target:y(g.target)})))):t&&(c=d["pino-worker"]||He(x,"worker.js"),f.pipelines=[t.map(o=>({...o,target:y(o.target)}))]),r&&(f.levels=r),i&&(f.dedupe=i),f.pinoWillSendConfig=!0;let m=n||t?"pino.transport":c;return Ds(y(c),f,s,l,m);function y(o){if(o=d[o]||o,Ln(o)||o.indexOf("file://")===0)return o;if(o==="pino/file")return He(x,"..","file.js");let g;for(let p of h)try{let S=p==="node:repl"?process.cwd()+ks:p;g=As(S).resolve(o);break}catch{continue}if(!g)throw new Error(`unable to determine transport target for "${o}"`);return g}}Tn.exports=Ws});var Se=v((Ql,Fn)=>{"use strict";w();var Fs=B("diagnostics_channel"),kn=tn(),{mapHttpRequest:Ms,mapHttpResponse:zs}=Pe(),Ze=cn(),In=ze(),{lsCacheSym:Vs,chindingsSym:$n,writeSym:Cn,serializersSym:Nn,formatOptsSym:Bn,endSym:Ks,stringifiersSym:Dn,stringifySym:Rn,stringifySafeSym:et,wildcardFirstSym:qn,nestedKeySym:Js,formattersSym:Wn,messageKeySym:Us,errorKeySym:Gs,nestedKeyStrSym:Hs,msgPrefixSym:be}=Q(),{isMainThread:Xs}=B("worker_threads"),Ys=Ye(),[Qs]=process.versions.node.split(".").map(e=>Number(e)),jn=Fs.tracingChannel("pino_asJson"),Qe=Qs>=25?e=>JSON.stringify(e):eo;function ee(){}function Zs(e,t){if(!t)return n;return function(...i){t.call(this,i,n,e)};function n(r,...i){if(typeof r=="object"){let s=r;r!==null&&(r.method&&r.headers&&r.socket?r=Ms(r):typeof r.setHeader=="function"&&(r=zs(r)));let u;s===null&&i.length===0?u=[null]:(s=i.shift(),u=i),typeof this[be]=="string"&&s!==void 0&&s!==null&&(s=this[be]+s),this[Cn](r,kn(s,u,this[Bn]),e)}else{let s=r===void 0?i.shift():r;typeof this[be]=="string"&&s!==void 0&&s!==null&&(s=this[be]+s),this[Cn](null,kn(s,i,this[Bn]),e)}}}function eo(e){let t="",n=0,r=!1,i=255,s=e.length;if(s>100)return JSON.stringify(e);for(var u=0;u<s&&i>=32;u++)i=e.charCodeAt(u),(i===34||i===92)&&(t+=e.slice(n,u)+"\\",n=u,r=!0);return r?t+=e.slice(n):t=e,i<32?JSON.stringify(e):'"'+t+'"'}function to(e,t,n,r){if(jn.hasSubscribers===!1)return Pn.call(this,e,t,n,r);let i={instance:this,arguments};return jn.traceSync(Pn,i,this,e,t,n,r)}function Pn(e,t,n,r){let i=this[Rn],s=this[et],u=this[Dn],l=this[Ks],f=this[$n],h=this[Nn],d=this[Wn],c=this[Us],m=this[Gs],y=this[Vs][n]+r;y=y+f;let o;d.log&&(e=d.log(e));let g=u[qn],p="";for(let _ in e)if(o=e[_],Object.prototype.hasOwnProperty.call(e,_)&&o!==void 0){h[_]?o=h[_](o):_===m&&h.err&&(o=h.err(o));let b=u[_]||g;switch(typeof o){case"undefined":case"function":continue;case"number":Number.isFinite(o)===!1&&(o=null);case"boolean":b&&(o=b(o));break;case"string":o=(b||Qe)(o);break;default:o=(b||i)(o,s)}if(o===void 0)continue;let E=Qe(_);p+=","+E+":"+o}let S="";if(t!==void 0){o=h[c]?h[c](t):t;let _=u[c]||g;switch(typeof o){case"function":break;case"number":Number.isFinite(o)===!1&&(o=null);case"boolean":_&&(o=_(o)),S=',"'+c+'":'+o;break;case"string":o=(_||Qe)(o),S=',"'+c+'":'+o;break;default:o=(_||i)(o,s),S=',"'+c+'":'+o}}return this[Js]&&p?y+this[Hs]+p.slice(1)+"}"+S+l:y+p+S+l}function no(e,t){let n,r=e[$n],i=e[Rn],s=e[et],u=e[Dn],l=u[qn],f=e[Nn],h=e[Wn].bindings;t=h(t);for(let d in t)if(n=t[d],((d.length<5||d!=="level"&&d!=="serializers"&&d!=="formatters"&&d!=="customLevels")&&t.hasOwnProperty(d)&&n!==void 0)===!0){if(n=f[d]?f[d](n):n,n=(u[d]||l||i)(n,s),n===void 0)continue;r+=',"'+d+'":'+n}return r}function ro(e){return e.write!==e.constructor.prototype.write}function we(e){let t=new Ze(e);return t.on("error",n),!e.sync&&Xs&&(In.register(t,io),t.on("close",function(){In.unregister(t)})),t;function n(r){if(r.code==="EPIPE"){t.write=ee,t.end=ee,t.flushSync=ee,t.destroy=ee;return}t.removeListener("error",n),t.emit("error",r)}}function io(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function so(e){return function(n,r,i={},s){if(typeof i=="string")s=we({dest:i}),i={};else if(typeof s=="string"){if(i&&i.transport)throw Error("only one of option.transport or stream can be specified");s=we({dest:s})}else if(i instanceof Ze||i.writable||i._writableState)s=i,i={};else if(i.transport){if(i.transport instanceof Ze||i.transport.writable||i.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(i.transport.targets&&i.transport.targets.length&&i.formatters&&typeof i.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let f;i.customLevels&&(f=i.useOnlyCustomLevels?i.customLevels:Object.assign({},i.levels,i.customLevels)),s=Ys({caller:r,...i.transport,levels:f})}if(i=Object.assign({},e,i),i.serializers=Object.assign({},e.serializers,i.serializers),i.formatters=Object.assign({},e.formatters,i.formatters),i.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:u,onChild:l}=i;return u===!1&&(i.level="silent"),l||(i.onChild=ee),s||(ro(process.stdout)?s=process.stdout:s=we({fd:process.stdout.fd||1})),{opts:i,stream:s}}}function oo(e,t){try{return JSON.stringify(e)}catch{try{return(t||this[et])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function fo(e,t,n){return{level:e,bindings:t,log:n}}function lo(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e===void 0?1:e}Fn.exports={noop:ee,buildSafeSonicBoom:we,asChindings:no,asJson:to,genLog:Zs,createArgsNormalizer:so,stringify:oo,buildFormatters:fo,normalizeDestFileDescriptor:lo}});var _e=v((eu,Mn)=>{"use strict";w();var uo={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},co={ASC:"ASC",DESC:"DESC"};Mn.exports={DEFAULT_LEVELS:uo,SORTING_ORDER:co}});var rt=v((nu,Jn)=>{"use strict";w();var{lsCacheSym:ao,levelValSym:tt,useOnlyCustomLevelsSym:ho,streamSym:yo,formattersSym:go,hooksSym:mo,levelCompSym:zn}=Q(),{noop:po,genLog:G}=Se(),{DEFAULT_LEVELS:V,SORTING_ORDER:Vn}=_e(),Kn={fatal:e=>{let t=G(V.fatal,e);return function(...n){let r=this[yo];if(t.call(this,...n),typeof r.flushSync=="function")try{r.flushSync()}catch{}}},error:e=>G(V.error,e),warn:e=>G(V.warn,e),info:e=>G(V.info,e),debug:e=>G(V.debug,e),trace:e=>G(V.trace,e)},nt=Object.keys(V).reduce((e,t)=>(e[V[t]]=t,e),{}),bo=Object.keys(nt).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function wo(e){let t=e[go].level,{labels:n}=e.levels,r={};for(let i in n){let s=t(n[i],Number(i));r[i]=JSON.stringify(s).slice(0,-1)}return e[ao]=r,e}function So(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 _o(e){let{labels:t,values:n}=this.levels;if(typeof e=="number"){if(t[e]===void 0)throw Error("unknown level value"+e);e=t[e]}if(n[e]===void 0)throw Error("unknown level "+e);let r=this[tt],i=this[tt]=n[e],s=this[ho],u=this[zn],l=this[mo].logMethod;for(let f in n){if(u(n[f],i)===!1){this[f]=po;continue}this[f]=So(f,s)?Kn[f](l):G(n[f],l)}this.emit("level-change",e,i,t[r],r,this)}function Eo(e){let{levels:t,levelVal:n}=this;return t&&t.labels?t.labels[n]:""}function Oo(e){let{values:t}=this.levels,n=t[e];return n!==void 0&&this[zn](n,this[tt])}function xo(e,t,n){return e===Vn.DESC?t<=n:t>=n}function vo(e){return typeof e=="string"?xo.bind(null,e):e}function Ao(e=null,t=!1){let n=e?Object.keys(e).reduce((s,u)=>(s[e[u]]=u,s),{}):null,r=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:nt,n),i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:V,e);return{labels:r,values:i}}function Lo(e,t,n){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),n?[]:Object.keys(nt).map(s=>+s),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let r=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),n?null:V,t);if(!(e in r))throw Error(`default level:${e} must be included in custom levels`)}function To(e,t){let{labels:n,values:r}=e;for(let i in t){if(i in r)throw Error("levels cannot be overridden");if(t[i]in n)throw Error("pre-existing level values cannot be used for new levels")}}function ko(e){if(typeof e!="function"&&!(typeof e=="string"&&Object.values(Vn).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}Jn.exports={initialLsCache:bo,genLsCache:wo,levelMethods:Kn,getLevel:Eo,setLevel:_o,isLevelEnabled:Oo,mappings:Ao,assertNoLevelCollisions:To,assertDefaultLevelFound:Lo,genLevelComparison:vo,assertLevelComparison:ko}});var it=v((iu,Un)=>{"use strict";w();Un.exports={version:"10.3.1"}});var tr=v((fu,er)=>{"use strict";w();var{EventEmitter:Io}=B("events"),{lsCacheSym:Co,levelValSym:Bo,setLevelSym:ot,getLevelSym:Gn,chindingsSym:Oe,mixinSym:jo,asJsonSym:Xn,writeSym:Po,mixinMergeStrategySym:$o,timeSym:No,timeSliceIndexSym:Do,streamSym:Yn,serializersSym:H,formattersSym:re,errorKeySym:Ro,messageKeySym:qo,useOnlyCustomLevelsSym:Wo,needsMetadataGsym:Fo,redactFmtSym:Mo,stringifySym:zo,formatOptsSym:Vo,stringifiersSym:Ko,msgPrefixSym:ft,hooksSym:Jo}=Q(),{getLevel:Uo,setLevel:Go,isLevelEnabled:Ho,mappings:Xo,initialLsCache:Yo,genLsCache:Qo,assertNoLevelCollisions:Zo}=rt(),{asChindings:lt,asJson:ef,buildFormatters:st,stringify:Hn,noop:Qn}=Se(),{version:tf}=it(),nf=Re(),rf=class{},Zn={constructor:rf,child:sf,bindings:of,setBindings:ff,flush:cf,isLevelEnabled:Ho,version:tf,get level(){return this[Gn]()},set level(e){this[ot](e)},get levelVal(){return this[Bo]},set levelVal(e){throw Error("levelVal is read-only")},get msgPrefix(){return this[ft]},get[Symbol.toStringTag](){return"Pino"},[Co]:Yo,[Po]:uf,[Xn]:ef,[Gn]:Uo,[ot]:Go};Object.setPrototypeOf(Zn,Io.prototype);er.exports=function(){return Object.create(Zn)};var Ee=e=>e;function sf(e,t){if(!e)throw Error("missing bindings for child Pino");let n=this[H],r=this[re],i=Object.create(this);if(t==null)return i[re].bindings!==Ee&&(i[re]=st(r.level,Ee,r.log)),i[Oe]=lt(i,e),this.onChild!==Qn&&this.onChild(i),i;if(t.hasOwnProperty("serializers")===!0){i[H]=Object.create(null);for(let h in n)i[H][h]=n[h];let l=Object.getOwnPropertySymbols(n);for(var s=0;s<l.length;s++){let h=l[s];i[H][h]=n[h]}for(let h in t.serializers)i[H][h]=t.serializers[h];let f=Object.getOwnPropertySymbols(t.serializers);for(var u=0;u<f.length;u++){let h=f[u];i[H][h]=t.serializers[h]}}else i[H]=n;if(t.hasOwnProperty("formatters")){let{level:l,bindings:f,log:h}=t.formatters;i[re]=st(l||r.level,f||Ee,h||r.log)}else i[re]=st(r.level,Ee,r.log);if(t.hasOwnProperty("customLevels")===!0&&(Zo(this.levels,t.customLevels),i.levels=Xo(t.customLevels,i[Wo]),Qo(i)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){i.redact=t.redact;let l=nf(i.redact,Hn),f={stringify:l[Mo]};i[zo]=Hn,i[Ko]=l,i[Vo]=f}if(typeof t.msgPrefix=="string"&&(i[ft]=(this[ft]||"")+t.msgPrefix),i[Oe]=lt(i,e),t.level!==void 0&&t.level!==this.level||t.hasOwnProperty("customLevels")){let l=t.level||this.level;i[ot](l)}return this.onChild(i),i}function of(){let t=`{${this[Oe].substr(1)}}`,n=JSON.parse(t);return delete n.pid,delete n.hostname,n}function ff(e){let t=lt(this,e);this[Oe]=t}function lf(e,t){return Object.assign(t,e)}function uf(e,t,n){let r=this[No](),i=this[jo],s=this[Ro],u=this[qo],l=this[$o]||lf,f,h=this[Jo].streamWrite;e==null?f={}:e instanceof Error?(f={[s]:e},t===void 0&&(t=e.message)):(f=e,t===void 0&&e[u]===void 0&&e[s]&&(t=e[s].message)),i&&(f=l(f,i(f,n,this)));let d=this[Xn](f,t,n,r),c=this[Yn];c[Fo]===!0&&(c.lastLevel=n,c.lastObj=f,c.lastMsg=t,c.lastTime=r.slice(this[Do]),c.lastLogger=this),c.write(h?h(d):d)}function cf(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let t=this[Yn];typeof t.flush=="function"?t.flush(e||Qn):e&&e()}});var sr=v((ht,ir)=>{"use strict";w();var{hasOwnProperty:ie}=Object.prototype,Y=at();Y.configure=at;Y.stringify=Y;Y.default=Y;ht.stringify=Y;ht.configure=at;ir.exports=Y;var af=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function K(e){return e.length<5e3&&!af.test(e)?`"${e}"`:JSON.stringify(e)}function ut(e,t){if(e.length>200||t)return e.sort(t);for(let n=1;n<e.length;n++){let r=e[n],i=n;for(;i!==0&&e[i-1]>r;)e[i]=e[i-1],i--;e[i]=r}return e}var hf=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function ct(e){return hf.call(e)!==void 0&&e.length!==0}function nr(e,t,n){e.length<n&&(n=e.length);let r=t===","?"":" ",i=`"0":${r}${e[0]}`;for(let s=1;s<n;s++)i+=`${t}"${s}":${r}${e[s]}`;return i}function df(e){if(ie.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 yf(e){let t;if(ie.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 gf(e,t){let n;if(ie.call(e,t)&&(n=e[t],typeof n!="boolean"))throw new TypeError(`The "${t}" argument must be of type boolean`);return n===void 0?!0:n}function rr(e,t){let n;if(ie.call(e,t)){if(n=e[t],typeof n!="number")throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(n))throw new TypeError(`The "${t}" argument must be an integer`);if(n<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return n===void 0?1/0:n}function X(e){return e===1?"1 item":`${e} items`}function mf(e){let t=new Set;for(let n of e)(typeof n=="string"||typeof n=="number")&&t.add(String(n));return t}function pf(e){if(ie.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 n=>{let r=`Object can not safely be stringified. Received type ${typeof n}`;throw typeof n!="function"&&(r+=` (${n.toString()})`),new Error(r)}}}function at(e){e={...e};let t=pf(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let n=df(e),r=gf(e,"bigint"),i=yf(e),s=typeof i=="function"?i:void 0,u=rr(e,"maximumDepth"),l=rr(e,"maximumBreadth");function f(y,o,g,p,S,_){let b=o[y];switch(typeof b=="object"&&b!==null&&typeof b.toJSON=="function"&&(b=b.toJSON(y)),b=p.call(o,y,b),typeof b){case"string":return K(b);case"object":{if(b===null)return"null";if(g.indexOf(b)!==-1)return n;let E="",T=",",C=_;if(Array.isArray(b)){if(b.length===0)return"[]";if(u<g.length+1)return'"[Array]"';g.push(b),S!==""&&(_+=S,E+=`
|
|
5
|
+
${_}`,T=`,
|
|
6
|
+
${_}`);let P=Math.min(b.length,l),R=0;for(;R<P-1;R++){let J=f(String(R),b,g,p,S,_);E+=J!==void 0?J:"null",E+=T}let q=f(String(R),b,g,p,S,_);if(E+=q!==void 0?q:"null",b.length-1>l){let J=b.length-l-1;E+=`${T}"... ${X(J)} not stringified"`}return S!==""&&(E+=`
|
|
7
|
+
${C}`),g.pop(),`[${E}]`}let A=Object.keys(b),I=A.length;if(I===0)return"{}";if(u<g.length+1)return'"[Object]"';let O="",j="";S!==""&&(_+=S,T=`,
|
|
8
|
+
${_}`,O=" ");let $=Math.min(I,l);i&&!ct(b)&&(A=ut(A,s)),g.push(b);for(let P=0;P<$;P++){let R=A[P],q=f(R,b,g,p,S,_);q!==void 0&&(E+=`${j}${K(R)}:${O}${q}`,j=T)}if(I>l){let P=I-l;E+=`${j}"...":${O}"${X(P)} not stringified"`,j=T}return S!==""&&j.length>1&&(E=`
|
|
9
|
+
${_}${E}
|
|
10
|
+
${C}`),g.pop(),`{${E}}`}case"number":return isFinite(b)?String(b):t?t(b):"null";case"boolean":return b===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(b);default:return t?t(b):void 0}}function h(y,o,g,p,S,_){switch(typeof o=="object"&&o!==null&&typeof o.toJSON=="function"&&(o=o.toJSON(y)),typeof o){case"string":return K(o);case"object":{if(o===null)return"null";if(g.indexOf(o)!==-1)return n;let b=_,E="",T=",";if(Array.isArray(o)){if(o.length===0)return"[]";if(u<g.length+1)return'"[Array]"';g.push(o),S!==""&&(_+=S,E+=`
|
|
11
|
+
${_}`,T=`,
|
|
12
|
+
${_}`);let I=Math.min(o.length,l),O=0;for(;O<I-1;O++){let $=h(String(O),o[O],g,p,S,_);E+=$!==void 0?$:"null",E+=T}let j=h(String(O),o[O],g,p,S,_);if(E+=j!==void 0?j:"null",o.length-1>l){let $=o.length-l-1;E+=`${T}"... ${X($)} not stringified"`}return S!==""&&(E+=`
|
|
13
|
+
${b}`),g.pop(),`[${E}]`}g.push(o);let C="";S!==""&&(_+=S,T=`,
|
|
14
|
+
${_}`,C=" ");let A="";for(let I of p){let O=h(I,o[I],g,p,S,_);O!==void 0&&(E+=`${A}${K(I)}:${C}${O}`,A=T)}return S!==""&&A.length>1&&(E=`
|
|
15
|
+
${_}${E}
|
|
16
|
+
${b}`),g.pop(),`{${E}}`}case"number":return isFinite(o)?String(o):t?t(o):"null";case"boolean":return o===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(o);default:return t?t(o):void 0}}function d(y,o,g,p,S){switch(typeof o){case"string":return K(o);case"object":{if(o===null)return"null";if(typeof o.toJSON=="function"){if(o=o.toJSON(y),typeof o!="object")return d(y,o,g,p,S);if(o===null)return"null"}if(g.indexOf(o)!==-1)return n;let _=S;if(Array.isArray(o)){if(o.length===0)return"[]";if(u<g.length+1)return'"[Array]"';g.push(o),S+=p;let O=`
|
|
17
|
+
${S}`,j=`,
|
|
18
|
+
${S}`,$=Math.min(o.length,l),P=0;for(;P<$-1;P++){let q=d(String(P),o[P],g,p,S);O+=q!==void 0?q:"null",O+=j}let R=d(String(P),o[P],g,p,S);if(O+=R!==void 0?R:"null",o.length-1>l){let q=o.length-l-1;O+=`${j}"... ${X(q)} not stringified"`}return O+=`
|
|
19
|
+
${_}`,g.pop(),`[${O}]`}let b=Object.keys(o),E=b.length;if(E===0)return"{}";if(u<g.length+1)return'"[Object]"';S+=p;let T=`,
|
|
20
|
+
${S}`,C="",A="",I=Math.min(E,l);ct(o)&&(C+=nr(o,T,l),b=b.slice(o.length),I-=o.length,A=T),i&&(b=ut(b,s)),g.push(o);for(let O=0;O<I;O++){let j=b[O],$=d(j,o[j],g,p,S);$!==void 0&&(C+=`${A}${K(j)}: ${$}`,A=T)}if(E>l){let O=E-l;C+=`${A}"...": "${X(O)} not stringified"`,A=T}return A!==""&&(C=`
|
|
21
|
+
${S}${C}
|
|
22
|
+
${_}`),g.pop(),`{${C}}`}case"number":return isFinite(o)?String(o):t?t(o):"null";case"boolean":return o===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(o);default:return t?t(o):void 0}}function c(y,o,g){switch(typeof o){case"string":return K(o);case"object":{if(o===null)return"null";if(typeof o.toJSON=="function"){if(o=o.toJSON(y),typeof o!="object")return c(y,o,g);if(o===null)return"null"}if(g.indexOf(o)!==-1)return n;let p="",S=o.length!==void 0;if(S&&Array.isArray(o)){if(o.length===0)return"[]";if(u<g.length+1)return'"[Array]"';g.push(o);let C=Math.min(o.length,l),A=0;for(;A<C-1;A++){let O=c(String(A),o[A],g);p+=O!==void 0?O:"null",p+=","}let I=c(String(A),o[A],g);if(p+=I!==void 0?I:"null",o.length-1>l){let O=o.length-l-1;p+=`,"... ${X(O)} not stringified"`}return g.pop(),`[${p}]`}let _=Object.keys(o),b=_.length;if(b===0)return"{}";if(u<g.length+1)return'"[Object]"';let E="",T=Math.min(b,l);S&&ct(o)&&(p+=nr(o,",",l),_=_.slice(o.length),T-=o.length,E=","),i&&(_=ut(_,s)),g.push(o);for(let C=0;C<T;C++){let A=_[C],I=c(A,o[A],g);I!==void 0&&(p+=`${E}${K(A)}:${I}`,E=",")}if(b>l){let C=b-l;p+=`${E}"...":"${X(C)} not stringified"`}return g.pop(),`{${p}}`}case"number":return isFinite(o)?String(o):t?t(o):"null";case"boolean":return o===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(o);default:return t?t(o):void 0}}function m(y,o,g){if(arguments.length>1){let p="";if(typeof g=="number"?p=" ".repeat(Math.min(g,10)):typeof g=="string"&&(p=g.slice(0,10)),o!=null){if(typeof o=="function")return f("",{"":y},[],o,p,"");if(Array.isArray(o))return h("",y,[],mf(o),p,"")}if(p.length!==0)return d("",y,[],p,"")}return c("",y,[])}return m}});var ur=v((cu,lr)=>{"use strict";w();var dt=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:fr}=_e(),bf=fr.info;function wf(e,t){e=e||[],t=t||{dedupe:!1};let n=Object.create(fr);n.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(c=>{n[c]=t.levels[c]});let r={write:i,add:l,remove:f,emit:s,flushSync:u,end:h,minLevel:0,lastId:0,streams:[],clone:d,[dt]:!0,streamLevels:n};return Array.isArray(e)?e.forEach(l,r):l.call(r,e),e=null,r;function i(c){let m,y=this.lastLevel,{streams:o}=this,g=0,p;for(let S=Sf(o.length,t.dedupe);Ef(S,o.length,t.dedupe);S=_f(S,t.dedupe))if(m=o[S],m.level<=y){if(g!==0&&g!==m.level)break;if(p=m.stream,p[dt]){let{lastTime:_,lastMsg:b,lastObj:E,lastLogger:T}=this;p.lastLevel=y,p.lastTime=_,p.lastMsg=b,p.lastObj=E,p.lastLogger=T}p.write(c),t.dedupe&&(g=m.level)}else if(!t.dedupe)break}function s(...c){for(let{stream:m}of this.streams)typeof m.emit=="function"&&m.emit(...c)}function u(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync()}function l(c){if(!c)return r;let m=typeof c.write=="function"||c.stream,y=c.write?c:c.stream;if(!m)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:o,streamLevels:g}=this,p;typeof c.levelVal=="number"?p=c.levelVal:typeof c.level=="string"?p=g[c.level]:typeof c.level=="number"?p=c.level:p=bf;let S={stream:y,level:p,levelVal:void 0,id:++r.lastId};return o.unshift(S),o.sort(or),this.minLevel=o[0].level,r}function f(c){let{streams:m}=this,y=m.findIndex(o=>o.id===c);return y>=0&&(m.splice(y,1),m.sort(or),this.minLevel=m.length>0?m[0].level:-1),r}function h(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync(),c.end()}function d(c){let m=new Array(this.streams.length);for(let y=0;y<m.length;y++)m[y]={level:c,stream:this.streams[y].stream};return{write:i,add:l,remove:f,minLevel:c,streams:m,clone:d,emit:s,flushSync:u,[dt]:!0}}}function or(e,t){return e.level-t.level}function Sf(e,t){return t?e-1:0}function _f(e,t){return t?e-1:e+1}function Ef(e,t,n){return n?e>=0:e<t}lr.exports=wf});var ll=v((hu,W)=>{"use strict";w();var Of=B("os"),pr=Pe(),xf=$e(),vf=Re(),br=Zt(),Af=tr(),wr=Q(),{configure:Lf}=sr(),{assertDefaultLevelFound:Tf,mappings:Sr,genLsCache:kf,genLevelComparison:If,assertLevelComparison:Cf}=rt(),{DEFAULT_LEVELS:_r,SORTING_ORDER:Bf}=_e(),{createArgsNormalizer:jf,asChindings:Pf,buildSafeSonicBoom:cr,buildFormatters:$f,stringify:yt,normalizeDestFileDescriptor:ar,noop:Nf}=Se(),{version:Df}=it(),{chindingsSym:hr,redactFmtSym:Rf,serializersSym:dr,timeSym:qf,timeSliceIndexSym:Wf,streamSym:Ff,stringifySym:yr,stringifySafeSym:gt,stringifiersSym:gr,setLevelSym:Mf,endSym:zf,formatOptsSym:Vf,messageKeySym:Kf,errorKeySym:Jf,nestedKeySym:Uf,mixinSym:Gf,levelCompSym:Hf,useOnlyCustomLevelsSym:Xf,formattersSym:mr,hooksSym:Yf,nestedKeyStrSym:Qf,mixinMergeStrategySym:Zf,msgPrefixSym:el}=wr,{epochTime:Er,nullTime:tl}=br,{pid:nl}=process,rl=Of.hostname(),il=pr.err,sl={level:"info",levelComparison:Bf.ASC,levels:_r,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:nl,hostname:rl},serializers:Object.assign(Object.create(null),{err:il}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0,streamWrite:void 0},timestamp:Er,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},ol=jf(sl),fl=Object.assign(Object.create(null),pr);function mt(...e){let t={},{opts:n,stream:r}=ol(t,xf(),...e);n.level&&typeof n.level=="string"&&_r[n.level.toLowerCase()]!==void 0&&(n.level=n.level.toLowerCase());let{redact:i,crlf:s,serializers:u,timestamp:l,messageKey:f,errorKey:h,nestedKey:d,base:c,name:m,level:y,customLevels:o,levelComparison:g,mixin:p,mixinMergeStrategy:S,useOnlyCustomLevels:_,formatters:b,hooks:E,depthLimit:T,edgeLimit:C,onChild:A,msgPrefix:I}=n,O=Lf({maximumDepth:T,maximumBreadth:C}),j=$f(b.level,b.bindings,b.log),$=yt.bind({[gt]:O}),P=i?vf(i,$):{},R=i?{stringify:P[Rf]}:{stringify:$},q="}"+(s?`\r
|
|
23
|
+
`:`
|
|
24
|
+
`),J=Pf.bind(null,{[hr]:"",[dr]:u,[gr]:P,[yr]:yt,[gt]:O,[mr]:j}),xe="";c!==null&&(m===void 0?xe=J(c):xe=J(Object.assign({},c,{name:m})));let pt=l instanceof Function?l:l?Er:tl,xr=pt().indexOf(":")+1;if(_&&!o)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(p&&typeof p!="function")throw Error(`Unknown mixin type "${typeof p}" - expected "function"`);if(I&&typeof I!="string")throw Error(`Unknown msgPrefix type "${typeof I}" - expected "string"`);Tf(y,o,_);let bt=Sr(o,_);typeof r.emit=="function"&&r.emit("message",{code:"PINO_CONFIG",config:{levels:bt,messageKey:f,errorKey:h}}),Cf(g);let vr=If(g);return Object.assign(t,{levels:bt,[Hf]:vr,[Xf]:_,[Ff]:r,[qf]:pt,[Wf]:xr,[yr]:yt,[gt]:O,[gr]:P,[zf]:q,[Vf]:R,[Kf]:f,[Jf]:h,[Uf]:d,[Qf]:d?`,${JSON.stringify(d)}:{`:"",[dr]:u,[Gf]:p,[Zf]:S,[hr]:xe,[mr]:j,[Yf]:E,silent:Nf,onChild:A,[el]:I}),Object.setPrototypeOf(t,Af()),kf(t),t[Mf](y),t}W.exports=mt;W.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=ar(e.dest||process.stdout.fd),cr(e)):cr({dest:ar(e),minLength:0});W.exports.transport=Ye();W.exports.multistream=ur();W.exports.levels=Sr();W.exports.stdSerializers=fl;W.exports.stdTimeFunctions=Object.assign({},br);W.exports.symbols=wr;W.exports.version=Df;W.exports.default=mt;W.exports.pino=mt});w();var ul=5e3,Or=class e{pinoInstance;state;context;telemetryCache=null;constructor(t,n={telemetryEnabled:!1},r={}){this.pinoInstance=t,this.state=n,this.context=r}getTelemetry(){if(!this.state.telemetryEnabled)return;let t=Date.now();return(!this.telemetryCache||t>=this.telemetryCache.expiresAt)&&(this.telemetryCache={value:wt(),expiresAt:t+ul}),this.telemetryCache.value}validate(t,n){if(typeof t!="string")throw new Error("Logger requires string message first, optional object second");if(n!==void 0&&(typeof n!="object"||n===null||Array.isArray(n)))throw new Error("Logger requires string message first, optional object second")}trace(t,n){this.validate(t,n),this.pinoInstance.trace({...this.context,...U(n),telemetry:this.getTelemetry()},t)}debug(t,n){this.validate(t,n),this.pinoInstance.debug({...this.context,...U(n),telemetry:this.getTelemetry()},t)}info(t,n){this.validate(t,n),this.pinoInstance.info({...this.context,...U(n),telemetry:this.getTelemetry()},t)}warn(t,n){this.validate(t,n),this.pinoInstance.warn({...this.context,...U(n),telemetry:this.getTelemetry()},t)}error(t,n){this.validate(t,n),this.pinoInstance.error({...this.context,...U(n),telemetry:this.getTelemetry()},t)}fatal(t,n){this.validate(t,n),this.pinoInstance.fatal({...this.context,...U(n),telemetry:this.getTelemetry()},t)}child(t){return new e(this.pinoInstance,this.state,{...this.context,...t})}setTelemetry(t){if(t!=="on"&&t!=="off")throw new Error("setTelemetry accepts only 'on' or 'off'");this.state.telemetryEnabled=t==="on"}get level(){return this.pinoInstance.level}set level(t){this.pinoInstance.level=t}get levelVal(){return this.pinoInstance.levelVal}bindings(){return{...this.context}}silent(){this.pinoInstance.level="silent"}flush(t){typeof this.pinoInstance.flush=="function"?this.pinoInstance.flush(t):t?.()}};export{cn as a,ze as b,ll as c,Or as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{h as t}from"./chunk-VULBPPPP.mjs";t();var s;function R(){try{if(typeof process<"u"&&process.env&&process.env.RUNTIME){let e=process.env.RUNTIME.toLowerCase();if(["node","bun","deno","cloudflare","aws-lambda","gcp-cloudrun"].includes(e))return e}}catch{}try{if(typeof globalThis<"u"&&(globalThis.cloudflare||globalThis.caches||globalThis.WebSocketPair||globalThis.__CFW__)||typeof process<"u"&&process.env&&process.env.PLATFORM==="cloudflare")return"cloudflare"}catch{}try{if(typeof process<"u"&&process.env&&process.env.AWS_LAMBDA_FUNCTION_NAME)return"aws-lambda"}catch{}try{if(typeof process<"u"&&process.env&&(process.env.K_SERVICE||process.env.K_REVISION||process.env.GOOGLE_CLOUD_PROJECT))return"gcp-cloudrun"}catch{}return typeof Bun<"u"?"bun":typeof Deno<"u"&&Deno.version&&Deno.version.deno?"deno":"node"}function u(){return s!==void 0||(s=R()),s}t();t();var i;(typeof __EDGE_RUNTIME__>"u"||!__EDGE_RUNTIME__)&&(i=(await import("module")).createRequire);var o,g=()=>{if(!o){let e=u();if(i&&typeof import.meta<"u"&&import.meta.url)try{o=i(import.meta.url)}catch{}!o&&typeof globalThis.require=="function"&&(o=globalThis.require),o||(o=n=>{throw new Error(`require("${n}") is not available in this runtime (${e}).`)})}return o};function p(e){let n={},r=["KEY","SECRET","PASSWORD","TOKEN","AUTH","CREDENTIAL","APIKEY","PRIVATE","CERT","KEYSTORE"];for(let[c,a]of Object.entries(e)){if(a===void 0)continue;let f=c.toUpperCase(),m=r.some(y=>f.includes(y));n[c]=m?"[REDACTED]":a}return n}function E(e){let n=g()("node:os"),r=typeof process.memoryUsage=="function"?process.memoryUsage():{};return{runtime:e,os:process.platform,arch:process.arch,pid:process.pid,ppid:process.ppid??null,cwd:process.cwd(),uptime:process.uptime(),osVersion:n.release?.()??null,loadAvg:n.loadavg?.()??[0,0,0],memory:{rss:r.rss??null,heapTotal:r.heapTotal??null,heapUsed:r.heapUsed??null,external:r.external??null},env:p({...process.env})}}function _(){let e=typeof Deno<"u"?Deno:null,n=e&&typeof e.systemMemoryInfo=="function"?e.systemMemoryInfo():{};return{runtime:"deno",os:e?.build?.os??"unknown",arch:e?.build?.arch??"unknown",pid:e?.pid??null,ppid:e?.ppid??null,cwd:e?.cwd?.()??"",uptime:typeof performance<"u"?performance.now()/1e3:0,osVersion:e?.osRelease?.()??null,loadAvg:e?.loadavg?.()??[0,0,0],memory:{rss:n.total??null,heapTotal:null,heapUsed:null,external:null},env:p(e?.env?.toObject()??{})}}function h(){return{runtime:"unknown",os:"unknown",arch:"unknown",pid:null,ppid:null,cwd:"",uptime:0,osVersion:null,loadAvg:[0,0,0],memory:{rss:null,heapTotal:null,heapUsed:null,external:null},env:{}}}function
|
|
2
|
+
import{h as t}from"./chunk-VULBPPPP.mjs";t();var s;function R(){try{if(typeof process<"u"&&process.env&&process.env.RUNTIME){let e=process.env.RUNTIME.toLowerCase();if(["node","bun","deno","cloudflare","aws-lambda","gcp-cloudrun"].includes(e))return e}}catch{}try{if(typeof globalThis<"u"&&(globalThis.cloudflare||globalThis.caches||globalThis.WebSocketPair||globalThis.__CFW__)||typeof process<"u"&&process.env&&process.env.PLATFORM==="cloudflare")return"cloudflare"}catch{}try{if(typeof process<"u"&&process.env&&process.env.AWS_LAMBDA_FUNCTION_NAME)return"aws-lambda"}catch{}try{if(typeof process<"u"&&process.env&&(process.env.K_SERVICE||process.env.K_REVISION||process.env.GOOGLE_CLOUD_PROJECT))return"gcp-cloudrun"}catch{}return typeof Bun<"u"?"bun":typeof Deno<"u"&&Deno.version&&Deno.version.deno?"deno":"node"}function u(){return s!==void 0||(s=R()),s}t();t();var i;(typeof __EDGE_RUNTIME__>"u"||!__EDGE_RUNTIME__)&&(i=(await import("module")).createRequire);var o,g=()=>{if(!o){let e=u();if(i&&typeof import.meta<"u"&&import.meta.url)try{o=i(import.meta.url)}catch{}!o&&typeof globalThis.require=="function"&&(o=globalThis.require),o||(o=n=>{throw new Error(`require("${n}") is not available in this runtime (${e}).`)})}return o};function p(e){let n={},r=["KEY","SECRET","PASSWORD","TOKEN","AUTH","CREDENTIAL","APIKEY","PRIVATE","CERT","KEYSTORE"];for(let[c,a]of Object.entries(e)){if(a===void 0)continue;let f=c.toUpperCase(),m=r.some(y=>f.includes(y));n[c]=m?"[REDACTED]":a}return n}function E(e){let n=g()("node:os"),r=typeof process.memoryUsage=="function"?process.memoryUsage():{};return{runtime:e,os:process.platform,arch:process.arch,pid:process.pid,ppid:process.ppid??null,cwd:process.cwd(),uptime:process.uptime(),osVersion:n.release?.()??null,loadAvg:n.loadavg?.()??[0,0,0],memory:{rss:r.rss??null,heapTotal:r.heapTotal??null,heapUsed:r.heapUsed??null,external:r.external??null},env:p({...process.env})}}function _(){let e=typeof Deno<"u"?Deno:null,n=e&&typeof e.systemMemoryInfo=="function"?e.systemMemoryInfo():{};return{runtime:"deno",os:e?.build?.os??"unknown",arch:e?.build?.arch??"unknown",pid:e?.pid??null,ppid:e?.ppid??null,cwd:e?.cwd?.()??"",uptime:typeof performance<"u"?performance.now()/1e3:0,osVersion:e?.osRelease?.()??null,loadAvg:e?.loadavg?.()??[0,0,0],memory:{rss:n.total??null,heapTotal:null,heapUsed:null,external:null},env:p(e?.env?.toObject()??{})}}function h(){return{runtime:"unknown",os:"unknown",arch:"unknown",pid:null,ppid:null,cwd:"",uptime:0,osVersion:null,loadAvg:[0,0,0],memory:{rss:null,heapTotal:null,heapUsed:null,external:null},env:{}}}function U(){let e=u();switch(e){case"node":case"bun":return E(e);case"deno":return _();default:return h()}}export{u as a,U as b};
|