From bc1e1595d7bd15092fb0eb7696c85dd00c33b479 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 02:35:04 +0000 Subject: [PATCH] build(precompiled): make a bundle with the dependencies --- precompiled/app.js | 35 ++++++++++++++++--------------- precompiled/app.js.LICENSE.txt | 1 + precompiled/bridge.js | 13 ++++++------ precompiled/bridge.js.LICENSE.txt | 1 + 4 files changed, 27 insertions(+), 23 deletions(-) create mode 100644 precompiled/app.js.LICENSE.txt create mode 100644 precompiled/bridge.js.LICENSE.txt diff --git a/precompiled/app.js b/precompiled/app.js index dfb3692170..121d8284e0 100644 --- a/precompiled/app.js +++ b/precompiled/app.js @@ -1,13 +1,14 @@ #!/usr/bin/env node -(()=>{var e={755(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(4356),r(2460),r(3302),r(4255),r(7922),r(3248),r(7492),r(9594),r(1612),r(6414),r(9673),r(1299),r(4569),r(6636),r(9845),r(518),r(908),r(7338),r(2105),r(8202),r(6857),r(2846),r(4512),r(9822),r(2742),r(5516),r(7004),r(9817),r(3364),r(5354),r(7357),r(5949),r(4275),r(2163),r(9285),r(8957),r(4843),r(2550),r(3832);let{EventEmitter:i}=r(4434),{logScope:o}=r(9309),s=o("cache"),a={CLEANUP:"cs@cleanup"};class c extends i{id="Default Cache Storage";cacheMap=new Map;aliveDuration=18e5;constructor(e){super(),e&&(this.id=e),this.on(a.CLEANUP,async()=>this.removeExpiredCache())}get WillExpireAt(){return Date.now()+this.aliveDuration}getLoggerContext(e={}){return{...e,cacheStorageId:this.id}}removeExpiredCache(){s.debug(this.getLoggerContext(),"Cleaning up the expired caches..."),this.cacheMap.forEach((e,t)=>{e.expireAt<=Date.now()&&this.cacheMap.delete(t)})}async cache(e,t,r){if("true"===process.env.NO_CACHE)return t();this.emit(a.CLEANUP);let i=this.cacheMap.get(e),o="object"==typeof e?"Something":e,c=this.getLoggerContext({logKey:o});if(i)return s.debug(c,`${o} hit!`),i.data;s.debug(c,`${o} did not hit. Storing the execution result...`);let u=await t();return this.cacheMap.set(e,{data:u,expireAt:new Date(r||this.WillExpireAt)}),u}}class u{static instance=void 0;cacheStorages=new Set;static getInstance(){return u.instance||(u.instance=new u),u.instance}cleanup(){this.cacheStorages.forEach(e=>e.removeExpiredCache())}}let l=u.getInstance();e.exports={CacheStorage:c,CacheStorageEvents:a,CacheStorageGroup:u,getManagedCacheStorage:function(e){let t=new c(e);return l.cacheStorages.add(t),t}}},6867(e,t,r){"use strict";let i=r(4434),o="cancel";e.exports={CancelRequest:class extends i{cancelled=!1;cancel(){this.cancelled=!0,this.emit(o)}},ON_CANCEL:o}},5335(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8831),r(9845),r(1699),r(5459),r(518),r(4906),r(6791);let i={width:80,_program:{},_options:[],program:(e={})=>(i._program=e,i),option:(e,t={})=>(e=Array.isArray(e)?e:[e],t.dest=t.dest||e.slice(-1)[0].toLowerCase().replace(/^-+/,"").replace(/-[a-z]/g,e=>e.slice(1).toUpperCase()),t.help=t.help||({help:"output usage information",version:"output the version number"})[t.action],i._options.push(Object.assign(t,{flags:e,positional:!e[0].startsWith("-")})),i),parse:e=>{let t=i._options.map((e,t)=>e.positional?t:null).filter(e=>null!==e),o={};i._options.forEach((e,t)=>e.positional?null:e.flags.forEach(e=>o[e]=t)),i._program.name=i._program.name||r(6928).parse(e[1]).base;let s=e.slice(2).reduce((e,t)=>/^-[^-]/.test(t)?e.concat(t.slice(1).split("").map(e=>"-"+e)):e.concat(t),[]),l=0;for(;le in o),a=-1===t?s.length:l+t;0===(e=s.slice(l,a)).length&&(i._options[f].positional?u(`the following arguments are required: ${r}`):"+"===i._options[f].nargs?u(`argument ${r}: expected at least one argument`):u(`argument ${r}: expected one argument`)),"+"!==i._options[f].nargs?(e=e[0],l+=1):l=a}i[i._options[f].dest]=e}return t.length&&u(`the following arguments are required: ${t.map(e=>i._options[e].flags[0]).join(", ")}`),i}},o=e=>Array(e+1).join(" "),s=()=>{let e=i._options.map(e=>{let t=e.flags.sort((e,t)=>e.length-t.length)[0],r=e.metavar||e.dest;if(e.positional)if("+"===e.nargs)return`${r} [${r} ...]`;else return`${r}`;return["store_true","store_false","help","version"].includes(e.action)?`[${t}]`:"+"===e.nargs?`[${t} ${r} [${r} ...]]`:`[${t} ${r}]`}),t=i.width,r=`usage: ${i._program.name}`,s=[r];e.map(e=>" "+e).forEach(e=>{s[s.length-1].length+e.length{var e={755(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(7407),r(2997),r(7615),r(5720),r(7729),r(8679),r(1559),r(9109),r(1475),r(8625),r(7480),r(2296),r(158),r(6911),r(9014),r(6815),r(8521),r(4503),r(3965),r(7015),r(3888),r(6615),r(4827),r(8399),r(6373),r(6131),r(937),r(1286),r(751),r(9529),r(9610),r(169),r(3848),r(5760),r(80),r(3854),r(3116),r(5481),r(3685);let{EventEmitter:i}=r(4434),{logScope:o}=r(9309),s=o("cache"),a={CLEANUP:"cs@cleanup"};class c extends i{id="Default Cache Storage";cacheMap=new Map;aliveDuration=18e5;constructor(e){super(),e&&(this.id=e),this.on(a.CLEANUP,async()=>this.removeExpiredCache())}get WillExpireAt(){return Date.now()+this.aliveDuration}getLoggerContext(e={}){return{...e,cacheStorageId:this.id}}removeExpiredCache(){s.debug(this.getLoggerContext(),"Cleaning up the expired caches..."),this.cacheMap.forEach((e,t)=>{e.expireAt<=Date.now()&&this.cacheMap.delete(t)})}async cache(e,t,r){if("true"===process.env.NO_CACHE)return t();this.emit(a.CLEANUP);let i=this.cacheMap.get(e),o="object"==typeof e?"Something":e,c=this.getLoggerContext({logKey:o});if(i)return s.debug(c,`${o} hit!`),i.data;s.debug(c,`${o} did not hit. Storing the execution result...`);let u=await t();return this.cacheMap.set(e,{data:u,expireAt:new Date(r||this.WillExpireAt)}),u}}class u{static instance=void 0;cacheStorages=new Set;static getInstance(){return u.instance||(u.instance=new u),u.instance}cleanup(){this.cacheStorages.forEach(e=>e.removeExpiredCache())}}let l=u.getInstance();e.exports={CacheStorage:c,CacheStorageEvents:a,CacheStorageGroup:u,getManagedCacheStorage:function(e){let t=new c(e);return l.cacheStorages.add(t),t}}},6867(e,t,r){"use strict";let i=r(4434),o="cancel";e.exports={CancelRequest:class extends i{cancelled=!1;cancel(){this.cancelled=!0,this.emit(o)}},ON_CANCEL:o}},5335(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(7924),r(9014),r(8308),r(8074),r(6815),r(8769),r(594);let i={width:80,_program:{},_options:[],program:(e={})=>(i._program=e,i),option:(e,t={})=>(e=Array.isArray(e)?e:[e],t.dest=t.dest||e.slice(-1)[0].toLowerCase().replace(/^-+/,"").replace(/-[a-z]/g,e=>e.slice(1).toUpperCase()),t.help=t.help||({help:"output usage information",version:"output the version number"})[t.action],i._options.push(Object.assign(t,{flags:e,positional:!e[0].startsWith("-")})),i),parse:e=>{let t=i._options.map((e,t)=>e.positional?t:null).filter(e=>null!==e),o={};i._options.forEach((e,t)=>e.positional?null:e.flags.forEach(e=>o[e]=t)),i._program.name=i._program.name||r(6928).parse(e[1]).base;let s=e.slice(2).reduce((e,t)=>/^-[^-]/.test(t)?e.concat(t.slice(1).split("").map(e=>"-"+e)):e.concat(t),[]),l=0;for(;le in o),a=-1===t?s.length:l+t;0===(e=s.slice(l,a)).length&&(i._options[f].positional?u(`the following arguments are required: ${r}`):"+"===i._options[f].nargs?u(`argument ${r}: expected at least one argument`):u(`argument ${r}: expected one argument`)),"+"!==i._options[f].nargs?(e=e[0],l+=1):l=a}i[i._options[f].dest]=e}return t.length&&u(`the following arguments are required: ${t.map(e=>i._options[e].flags[0]).join(", ")}`),i}},o=e=>Array(e+1).join(" "),s=()=>{let e=i._options.map(e=>{let t=e.flags.sort((e,t)=>e.length-t.length)[0],r=e.metavar||e.dest;if(e.positional)if("+"===e.nargs)return`${r} [${r} ...]`;else return`${r}`;return["store_true","store_false","help","version"].includes(e.action)?`[${t}]`:"+"===e.nargs?`[${t} ${r} [${r} ...]]`:`[${t} ${r}]`}),t=i.width,r=`usage: ${i._program.name}`,s=[r];e.map(e=>" "+e).forEach(e=>{s[s.length-1].length+e.length{s();let e=i._options.filter(e=>e.positional).map(e=>[e.metavar||e.dest,e.help]),t=i._options.filter(e=>!e.positional).map(e=>{let{flags:t}=e,r=e.metavar||e.dest;return[["store_true","store_false","help","version"].includes(e.action)?t.map(e=>`${e}`).join(", "):"+"===e.nargs?t.map(e=>`${e} ${r} [${r} ...]`).join(", "):t.map(e=>`${e} ${r}`).join(", "),e.help]}),r=Math.max.apply(null,e.concat(t).map(e=>e[0].length));r=r>30?30:r;let a=i.width-r-4,c=e=>{let t=e=>Array.from(Array(Math.ceil(e.length/a)).keys()).map(t=>e.slice(t*a,(t+1)*a)).join(` `+o(r+4));e[0].length{console.log(i._program.version),process.exit()},u=e=>{s(),console.log(i._program.name+":","error:",e),process.exit(1)};e.exports=i},2413(e,t,r){"use strict";e.exports={DEFAULT_SOURCE:["kugou","bodian","migu","ytdlp"],PROVIDERS:{qq:r(8469),kugou:r(434),kuwo:r(4449),bodian:r(2148),migu:r(1573),joox:r(3183),youtube:r(5918),youtubedl:r(6863),ytdlp:r(6819),bilibili:r(3371),bilivideo:r(8754),pyncmd:r(4482)}}},7312(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(6791),r(1699);let i=r(6982),o=r(7016).parse,s=r(3480).stringify,a="e82ckenh8dichen8",c="rFgB&h#%2?^eDg:Q",u=(e,t)=>{let r=i.createDecipheriv("aes-128-ecb",t,null);return Buffer.concat([r.update(e),r.final()])},l=(e,t)=>{let r=i.createCipheriv("aes-128-ecb",t,null);return Buffer.concat([r.update(e),r.final()])};e.exports={eapi:{encrypt:e=>l(e,a),decrypt:e=>u(e,a),encryptRequest:(t,r)=>{t=o(t);let a=JSON.stringify(r),c=`nobody${t.path}use${a}md5forencrypt`,u=i.createHash("md5").update(c).digest("hex"),l=`${t.path}-36cd479b6b5-${a}-36cd479b6b5-${u}`;return{url:t.href.replace(/\w*api/,"eapi"),body:s({params:e.exports.eapi.encrypt(Buffer.from(l)).toString("hex").toUpperCase()})}}},api:{encryptRequest:(e,t)=>({url:(e=o(e)).href.replace(/\w*api/,"api"),body:s(t)})},linuxapi:{encrypt:e=>l(e,c),decrypt:e=>u(e,c),encryptRequest:(t,r)=>{let i=JSON.stringify({method:"POST",url:(t=o(t)).href,params:r});return{url:t.resolve("/api/linux/forward"),body:s({eparams:e.exports.linuxapi.encrypt(Buffer.from(i)).toString("hex").toUpperCase()})}}},miguapi:{encryptBody:e=>{var t;let r,o,a=JSON.stringify(e),c=Buffer.from(i.randomBytes(32).toString("hex")),u=i.randomBytes(8),l=`-----BEGIN PUBLIC KEY----- +optional arguments:`),t.forEach(c),process.exit()},c=()=>{console.log(i._program.version),process.exit()},u=e=>{s(),console.log(i._program.name+":","error:",e),process.exit(1)};e.exports=i},2413(e,t,r){"use strict";e.exports={DEFAULT_SOURCE:["kugou","bodian","migu","ytdlp"],PROVIDERS:{qq:r(8469),kugou:r(434),kuwo:r(4449),bodian:r(2148),migu:r(1573),joox:r(5564),youtube:r(5918),youtubedl:r(6863),ytdlp:r(6819),bilibili:r(3371),bilivideo:r(8754),pyncmd:r(4482)}}},7312(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(594),r(8308);let i=r(6982),o=r(7016).parse,s=r(3480).stringify,a="e82ckenh8dichen8",c="rFgB&h#%2?^eDg:Q",u=(e,t)=>{let r=i.createDecipheriv("aes-128-ecb",t,null);return Buffer.concat([r.update(e),r.final()])},l=(e,t)=>{let r=i.createCipheriv("aes-128-ecb",t,null);return Buffer.concat([r.update(e),r.final()])};e.exports={eapi:{encrypt:e=>l(e,a),decrypt:e=>u(e,a),encryptRequest:(t,r)=>{t=o(t);let a=JSON.stringify(r),c=`nobody${t.path}use${a}md5forencrypt`,u=i.createHash("md5").update(c).digest("hex"),l=`${t.path}-36cd479b6b5-${a}-36cd479b6b5-${u}`;return{url:t.href.replace(/\w*api/,"eapi"),body:s({params:e.exports.eapi.encrypt(Buffer.from(l)).toString("hex").toUpperCase()})}}},api:{encryptRequest:(e,t)=>({url:(e=o(e)).href.replace(/\w*api/,"api"),body:s(t)})},linuxapi:{encrypt:e=>l(e,c),decrypt:e=>u(e,c),encryptRequest:(t,r)=>{let i=JSON.stringify({method:"POST",url:(t=o(t)).href,params:r});return{url:t.resolve("/api/linux/forward"),body:s({eparams:e.exports.linuxapi.encrypt(Buffer.from(i)).toString("hex").toUpperCase()})}}},miguapi:{encryptBody:e=>{var t;let r,o,a=JSON.stringify(e),c=Buffer.from(i.randomBytes(32).toString("hex")),u=i.randomBytes(8),l=`-----BEGIN PUBLIC KEY----- MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8asrfSaoOb4je+DSmKdriQJKWVJ2oDZrs3wi5W67m3LwTB9QVR+cE3XWU21Nx+YBxS0yun8wDcjgQvYt625ZCcgin2ro/eOkNyUOTBIbuj9CvMnhUYiR61lC1f1IGbrSYYimqBVSjpifVufxtx/I3exReZosTByYp4Xwpb1+WAQIDAQAB ------END PUBLIC KEY-----`,f=(t=(t=u)||Buffer.alloc(0),r=Math.ceil(5),{key:(o=Buffer.concat(Array(r).fill(null).reduce(e=>e.concat(i.createHash("md5").update(Buffer.concat([e.slice(-1)[0],c,t])).digest()),[Buffer.alloc(0)]))).slice(0,32),iv:o.slice(32,48)}),p=i.createCipheriv("aes-256-cbc",f.key,f.iv);return s({data:Buffer.concat([Buffer.from("Salted__"),u,p.update(Buffer.from(a)),p.final()]).toString("base64"),secKey:i.publicEncrypt({key:l,padding:i.constants.RSA_PKCS1_PADDING},c).toString("base64")})}},base64:{encode:(e,t)=>Buffer.from(e,t).toString("base64").replace(/\+/g,"-").replace(/\//g,"_"),decode:(e,t)=>Buffer.from(e.replace(/-/g,"+").replace(/_/g,"/"),"base64").toString(t)},uri:{retrieve:e=>{e=e.toString().trim();let t="3go8&$8*3*3h0k(2)2",r=Array.from(Array(e.length).keys()).map(r=>String.fromCharCode(e.charCodeAt(r)^t.charCodeAt(r%t.length))).join(""),o=i.createHash("md5").update(r).digest("base64").replace(/\//g,"_").replace(/\+/g,"-");return`http://p1.music.126.net/${o}/${e}`}},md5:{digest:e=>i.createHash("md5").update(e).digest("hex"),pipe:e=>new Promise((t,r)=>{let o=i.createHash("md5").setEncoding("hex");e.pipe(o).on("error",e=>r(e)).once("finish",()=>t(o.read()))})},sha1:{digest:e=>i.createHash("sha1").update(e).digest("hex")},random:{hex:e=>i.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e),uuid:()=>i.randomUUID()}};try{e.exports.kuwoapi=r(6239)}catch(e){}},7798(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1811),e.exports=class extends Error{constructor(e){super(`The audio data is incomplete: ${e}`),this.name="IncompleteAudioData"}}},3989(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1811),e.exports=class extends Error{constructor(e,t){super(`${e} exited with ${t}, which is not zero.`),this.process=e,this.exitCode=t,this.name="ProcessExitNotSuccessfully"}}},1658(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1811),e.exports=class extends Error{constructor(e){super(`This request URL has been cancelled: ${e}`),this.name="RequestCancelled"}}},988(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1811),e.exports=class extends Error{constructor(e,t){super(`Failed to get the response. Status code: ${t}`),this.url=e,this.code=t,this.name="RequestFailed"}}},3947(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1811),e.exports=class extends Error{constructor(e,t="?"){super(`This song "${t}" is not available in ${e}`),this.name="SongNotAvailable"}}},7821(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1811),e.exports=class extends Error{constructor(e){super("The response of youtube-dl is malformed."),this.name="YoutubeDlInvalidResponse",this.response=e}}},876(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1811),e.exports=class extends Error{constructor(){super('You must install "youtube-dl" before using the "youtubedl" source.'),this.name="YoutubeDlNotInstalled"}}},5(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1811),e.exports=class extends Error{constructor(e){super("The response of yt-dlp is malformed."),this.name="YtDlpInvalidResponse",this.response=e}}},1578(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1811),e.exports=class extends Error{constructor(){super('You must install "yt-dlp" before using the "ytdlp" source.'),this.name="YtDlpNotInstalled"}}},8978(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699),r(5459),r(908),r(7338),r(2105),r(8202),r(6857),r(2846),r(4512),r(9822),r(2742),r(5516),r(7004),r(9817),r(3364),r(5354),r(7357),r(5949),r(4275),r(2163),r(9285),r(8957),r(4843),r(2550),r(3832),r(7589),r(518),r(4370),r(1811),r(6791);let i=r(7016).parse,o=r(7312),s=r(9904),a=r(9102),c=r(3480),{isHost:u,cookieToMap:l,mapToCookie:f}=r(8010),{getManagedCacheStorage:p}=r(755),{logScope:h}=r(9309),d=h("hook"),g=p("hook");g.aliveDuration=6048e5;let y=["true","cvip","svip"].includes((process.env.ENABLE_LOCAL_VIP||"").toLowerCase()),m="true"===(process.env.BLOCK_ADS||"").toLowerCase(),b="true"===(process.env.DISABLE_UPGRADE_CHECK||"").toLowerCase(),v="svip"===(process.env.ENABLE_LOCAL_VIP||"").toLowerCase(),w=(process.env.LOCAL_VIP_UID||"").split(",").map(e=>parseInt(e)).filter(e=>!Number.isNaN(e)),_={request:{before:()=>{},after:()=>{}},connect:{before:()=>{}},negotiate:{before:()=>{}},target:{host:new Set,path:new Set}};_.target.host=new Set(["music.163.com","interface.music.163.com","interface3.music.163.com","interfacepc.music.163.com","apm.music.163.com","apm3.music.163.com","interface.music.163.com.163jiasu.com","interface3.music.163.com.163jiasu.com"]),_.target.path=new Set(["/api/v3/playlist/detail","/api/v3/song/detail","/api/v6/playlist/detail","/api/album/play","/api/artist/privilege","/api/album/privilege","/api/v1/artist","/api/v1/artist/songs","/api/v2/artist/songs","/api/artist/top/song","/api/v1/album","/api/album/v3/detail","/api/playlist/privilege","/api/song/enhance/player/url","/api/song/enhance/player/url/v1","/api/song/enhance/download/url","/api/song/enhance/download/url/v1","/api/song/enhance/privilege","/api/ad","/batch","/api/batch","/api/listen/together/privilege/get","/api/playmode/intelligence/list","/api/v1/search/get","/api/v1/search/song/get","/api/search/complex/get","/api/search/complex/page","/api/search/pc/complex/get","/api/search/pc/complex/page","/api/search/song/list/page","/api/search/song/page","/api/cloudsearch/pc","/api/v1/playlist/manipulate/tracks","/api/song/like","/api/v1/play/record","/api/playlist/v4/detail","/api/v1/radio/get","/api/v1/discovery/recommend/songs","/api/usertool/sound/mobile/promote","/api/usertool/sound/mobile/theme","/api/usertool/sound/mobile/animationList","/api/usertool/sound/mobile/all","/api/usertool/sound/mobile/detail","/api/vipauth/app/auth/query","/api/music-vip-membership/client/vip/info"]);let S=["music.163.com","music.126.net","iplay.163.com","look.163.com","y.163.com","interface.music.163.com","interface3.music.163.com"];_.request.before=e=>{let{req:t}=e;t.url=(t.url.startsWith("http://")?"":(t.socket.encrypted?"https:":"http:")+"//"+(S.some(e=>(t.headers.host||"").includes(e))?t.headers.host:null))+t.url;let r=i(t.url);if([r.hostname,t.headers.host].some(e=>u(e,"music.163.com"))&&(e.decision="proxy"),process.env.NETEASE_COOKIE&&r.path.includes("url")){var a=l(t.headers.cookie);Object.entries(l(process.env.NETEASE_COOKIE)).forEach(([e,t])=>{a[e]=t}),t.headers.cookie=f(a),d.debug("Replace netease cookie")}if([r.hostname,t.headers.host].some(e=>_.target.host.has(e))&&"POST"===t.method&&(r.path.startsWith("/eapi/")||r.path.startsWith("/api/linux/forward")))return s.read(t).then(e=>t.body=e).then(s=>{if("x-napm-retry"in t.headers&&delete t.headers["x-napm-retry"],t.headers["X-Real-IP"]="118.88.88.88","x-aeapi"in t.headers&&(t.headers["x-aeapi"]="false"),!(t.url.includes("stream")||t.url.includes("/eapi/cloud/upload/check"))&&(t.headers["Accept-Encoding"]&&(t.headers["Accept-Encoding"]="gzip, deflate"),s)){let t,a={};switch(a.pad=(s.match(/%0+$/)||[""])[0],"/api/linux/forward"===r.path?a.crypto="linuxapi":r.path.startsWith("/eapi/")?a.crypto="eapi":r.path.startsWith("/api/")&&(a.crypto="api"),a.crypto){case"linuxapi":t=JSON.parse(o.linuxapi.decrypt(Buffer.from(s.slice(8,s.length-a.pad.length),"hex")).toString()),a.path=i(t.url).path,a.param=t.params;break;case"eapi":t=o.eapi.decrypt(Buffer.from(s.slice(7,s.length-a.pad.length),"hex")).toString().split("-36cd479b6b5-"),a.path=t[0],a.param=JSON.parse(t[1]),a.param.hasOwnProperty("e_r")&&("true"==a.param.e_r||!0==a.param.e_r)?a.e_r=!0:a.e_r=!1;break;case"api":t={},decodeURIComponent(s).split("&").forEach(e=>{let[r,i]=e.split("=");t[r]=i}),a.path=r.path,a.param=t}if(a.path=a.path.replace(/\/\d*$/,""),e.netease=a,"/api/song/enhance/download/url"===a.path)return x(e);if("/api/song/enhance/download/url/v1"===a.path)return E(e);m&&a.path.startsWith("/api/ad")&&(e.error=Error("ADs blocked."),e.decision="close"),b&&a.path.match(/^\/api(\/v1)?\/(android|ios|osx|pc)\/(upgrade|version)/)&&(e.error=Error("Upgrade check blocked."),e.decision="close")}}).catch(e=>e&&d.error(e,`A error occurred in hook.request.before when hooking ${t.url}.`));if(_.target.host.has(r.hostname)&&(r.path.startsWith("/weapi/")||r.path.startsWith("/api/")))t.headers["X-Real-IP"]="118.88.88.88",e.netease={web:!0,path:r.path.replace(/^\/weapi\//,"/api/").split("?").shift().replace(/\/\d*$/,"")};else if(t.url.includes("package"))try{let r=t.url.split("package/").pop().split("/"),s=i(o.base64.decode(r[0])),a=r[1].replace(/\.\w+/,"");t.url=s.href,t.headers.host=s.hostname,t.headers.cookie=null,e.package={id:a},e.decision="proxy"}catch(t){e.error=t,e.decision="close"}},_.request.after=e=>{let{req:t,proxyRes:r,netease:a,package:c}=e;if("tyst.migu.cn"===t.headers.host&&r.headers["content-range"]&&200===r.statusCode&&(r.statusCode=206),a&&_.target.path.has(a.path)&&200===r.statusCode)return s.read(r,!0).then(e=>e.length?r.body=e:Promise.reject()).then(t=>{if(a.e_r?a.jsonBody=JSON.parse(o.eapi.decrypt(t).toString().replace(/([^\\]"\s*:\s*)(\d{16,})(\s*[}|,])/g,'$1"$2L"$3')):a.jsonBody=JSON.parse(t.toString().replace(/([^\\]"\s*:\s*)(\d{16,})(\s*[}|,])/g,'$1"$2L"$3')),y){let e="/api/music-vip-membership/client/vip/info";if("/batch"===a.path||"/api/batch"===a.path||a.path===e){let t=a.path===e?a.jsonBody:a.jsonBody[e],r={iconUrl:null,dynamicIconUrl:null,isSign:!1,isSignIap:!1,isSignDeduct:!1,isSignIapDeduct:!1};if(t&&(0===w.length||w.includes(t.data.userId)))try{let i=(t.data.now||new Date().getTime())+316224e5;t.data.redVipLevel=7,t.data.redVipAnnualCount=1,t.data.musicPackage={...r,...t.data.musicPackage,vipCode:230,vipLevel:7,expireTime:i},t.data.associator={...r,...t.data.associator,vipCode:100,vipLevel:7,expireTime:i},v&&(t.data.redplus={...r,...t.data.redplus,vipCode:300,vipLevel:7,expireTime:i},t.data.albumVip={...r,...t.data.albumVip,vipCode:400,vipLevel:0,expireTime:i}),a.path===e?a.jsonBody=t:a.jsonBody[e]=t}catch(e){d.debug({err:e},"Unable to apply the local VIP.")}}}if(new Set([401,512]).has(a.jsonBody.code)&&!a.web){if(a.path.includes("manipulate"))return O(e);else if("/api/song/like"===a.path)return k(e)}else if(a.path.includes("url"))return j(e);else if(a.path.includes("/usertool/sound/"))return T(a.jsonBody);else if(a.path.includes("batch"))for(let e in a.jsonBody)e.includes("/usertool/sound/")&&T(a.jsonBody[e]);else if(a.path.includes("/vipauth/app/auth/query"))return R(a.jsonBody)}).then(()=>{["transfer-encoding","content-encoding","content-length"].filter(e=>e in r.headers).forEach(e=>delete r.headers[e]);let e=JSON.stringify(a.jsonBody,(e,t)=>("object"==typeof t&&null!=t&&("cp"in t&&(t.cp=1),"fee"in t&&(t.fee=0),"downloadMaxbr"in t&&0===t.downloadMaxbr&&(t.downloadMaxbr=32e4),"dl"in t&&"downloadMaxbr"in t&&t.dle&&d.error(e,`A error occurred in hook.request.after when hooking ${t.url}.`));if(c)if(new Set([201,301,302,303,307,308]).has(r.statusCode))return s(t.method,i(t.url).resolve(r.headers.location),t.headers).then(t=>e.proxyRes=t);else/p\d+c*\.music\.126\.net/.test(t.url)&&(r.headers["content-type"]="audio/*")},_.connect.before=e=>{let{req:t}=e,r=i("https://"+t.url);[r.hostname,t.headers.host].some(e=>_.target.host.has(e))?80===parseInt(r.port)?(t.url=`${global.address||"localhost"}:${global.port[0]}`,t.local=!0):global.port[1]?(t.url=`${global.address||"localhost"}:${global.port[1]}`,t.local=!0):e.decision="blank":r.href.includes(global.endpoint)&&(e.decision="proxy")},_.negotiate.before=e=>{let{req:t,socket:r,decision:o}=e,s=i("https://"+t.url),a=_.target.host;t.local||o||a.has(r.sni)&&!a.has(s.hostname)&&(a.add(s.hostname),e.decision="blank")};let x=e=>{let t,{req:r,netease:i}=e,s="http://music.163.com/api/song/enhance/player/url",{id:a,br:c,e_r:u,header:l}=i.param;switch(i.crypto){case"linuxapi":i.param={ids:`["${a}"]`,br:c},t=o.linuxapi.encryptRequest(s,i.param);break;case"eapi":case"api":i.param={ids:`["${a}"]`,br:c,e_r:u,header:l},"eapi"==i.crypto?t=o.eapi.encryptRequest(s,i.param):"api"==i.crypto&&(t=o.api.encryptRequest(s,i.param))}r.url=t.url,r.body=t.body+i.pad},E=e=>{let t,{req:r,netease:i}=e,s="http://music.163.com/api/song/enhance/player/url/v1",{id:a,level:c,immerseType:u,e_r:l,header:f}=i.param;switch(i.crypto){case"linuxapi":i.param={ids:`["${a}"]`,level:c,encodeType:"flac",immerseType:u},t=o.linuxapi.encryptRequest(s,i.param);break;case"eapi":case"api":i.param={ids:`["${a}"]`,level:c,encodeType:"flac",immerseType:u,e_r:l,header:f},"eapi"==i.crypto?t=o.eapi.encryptRequest(s,i.param):"api"==i.crypto&&(t=o.api.encryptRequest(s,i.param))}r.url=t.url,r.body=t.body+i.pad},O=e=>{let{req:t,netease:r}=e,{trackIds:i,pid:o,op:a}=r.param,c=(Array.isArray(i)?i:JSON.parse(i))[0];return s("POST","http://music.163.com/api/playlist/manipulate/tracks",t.headers,`trackIds=[${c},${c}]&pid=${o}&op=${a}`).then(e=>e.json()).then(e=>{r.jsonBody=e}).catch(e=>e&&d.error(e))},k=e=>{let{req:t,netease:r}=e,{trackId:i}=r.param,o=0,a=0;return s("GET","http://music.163.com/api/v1/user/info",t.headers).then(e=>e.json()).then(e=>(a=e.userPoint.userId,s("GET",`http://music.163.com/api/user/playlist?uid=${a}&limit=1`,t.headers).then(e=>e.json()))).then(e=>(o=e.playlist[0].id,s("POST","http://music.163.com/api/playlist/manipulate/tracks",t.headers,`trackIds=[${i},${i}]&pid=${o}&op=add`).then(e=>e.json()))).then(e=>{new Set([200,502]).has(e.code)&&(r.jsonBody={code:200,playlistId:o})}).catch(e=>e&&d.error(e))},j=e=>{let t,{req:r,netease:i}=e,{jsonBody:u}=i,l=Number(process.env.MIN_BR)||0,f=0,p=e=>{if(e.flag=0,(200!==e.code||e.freeTrialInfo||e.br{let s="";try{let{header:e}=i.param;e="string"==typeof e?JSON.parse(e):e;let t=c.parse(r.headers.cookie.replace(/\s/g,""),";");s=e.os||t.os}catch(e){}return e.type=999e3===t.br?"flac":"mp3","pc"===s||"uwp"===s?e.url=global.endpoint?`${global.endpoint.replace("https://","http://")}/package/${o.base64.encode(t.url)}/${e.id}.${e.type}`:t.url:e.url=global.endpoint?`${global.endpoint}/package/${o.base64.encode(t.url)}/${e.id}.${e.type}`:t.url,e.md5=t.md5||o.md5.digest(t.url),e.br=t.br||128e3,e.size=t.size,e.code=200,e.freeTrialInfo=null,t}).then(t=>{if(!i.path.includes("download")||t.md5)return;let a={android:"0.0.0",osx:"0.0.0"},u={key:t.url.replace(/\?.*$/,"").replace(/(?<=kugou\.com\/)\w+\/\w+\//,"").replace(/(?<=kuwo\.cn\/)\w+\/\w+\/resource\//,""),url:t.url};try{var l;let t,{header:f}=i.param;f="string"==typeof f?JSON.parse(f):f;let p=c.parse(r.headers.cookie.replace(/\s/g,""),";"),h=f.os||p.os,d=f.appver||p.appver;if(h in a&&(l=a[h],!(t=Array.from([l,d]).map(e=>e.split(".").slice(0,3).map(e=>parseInt(e)||0)).reduce((e,t)=>e.length?e.map((e,r)=>e.concat(t[r])):t.map(e=>[e]),[]).filter(e=>e[0]!==e[1])[0])||t[0]<=t[1]))return g.cache(u,()=>s("GET",u.url).then(e=>o.md5.pipe(e))).then(t=>e.md5=t)}catch(e){}}).catch(e=>e&&d.error(e));200===e.code&&i.web&&(e.url=e.url.replace(/(m\d+?)(?!c)\.music\.126\.net/,"$1c.music.126.net"))};return Array.isArray(u.data)?i.path.includes("download")?(u.data=u.data[0],t=[p(u.data)]):(f=i.web?0:parseInt(((Array.isArray(i.param.ids)?i.param.ids:JSON.parse(i.param.ids))[0]||0).toString().replace("_0","")),t=u.data.map(e=>p(e))):t=[p(u.data)],Promise.all(t).catch(e=>e&&d.error(e))},T=e=>{d.debug("unblockSoundEffects() has been triggered.");let{data:t,code:r}=e;200===r&&(Array.isArray(t)?t.map(e=>{e.type&&(e.type=1)}):t.type&&(t.type=1))},R=e=>{d.debug("unblockLyricsEffects() has been triggered.");let{data:t,code:r}=e;200===r&&Array.isArray(t)&&t.forEach(e=>{"canUse"in e&&(e.canUse=!0),"canNotUseReasonCode"in e&&(e.canNotUseReasonCode=200)})};e.exports=_},6239(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(6791),r(1699),r(518);let i=e=>{let t=BigInt(e);return{low:Number(t),valueOf:()=>t.valueOf(),toString:()=>t.toString(),not:()=>i(~t),isNegative:()=>t<0,or:e=>i(t|BigInt(e)),and:e=>i(t&BigInt(e)),xor:e=>i(t^BigInt(e)),equals:e=>t===BigInt(e),multiply:e=>i(t*BigInt(e)),shiftLeft:e=>i(t<i(t>>BigInt(e))}},o=e=>Array.from(Array(e).keys()),s=(...e)=>e.map(e=>-1===e?i(-1,-1):i(e)),a=s(31,0,1,2,3,4,-1,-1,3,4,5,6,7,8,-1,-1,7,8,9,10,11,12,-1,-1,11,12,13,14,15,16,-1,-1,15,16,17,18,19,20,-1,-1,19,20,21,22,23,24,-1,-1,23,24,25,26,27,28,-1,-1,27,28,29,30,31,30,-1,-1),c=s(57,49,41,33,25,17,9,1,59,51,43,35,27,19,11,3,61,53,45,37,29,21,13,5,63,55,47,39,31,23,15,7,56,48,40,32,24,16,8,0,58,50,42,34,26,18,10,2,60,52,44,36,28,20,12,4,62,54,46,38,30,22,14,6),u=s(39,7,47,15,55,23,63,31,38,6,46,14,54,22,62,30,37,5,45,13,53,21,61,29,36,4,44,12,52,20,60,28,35,3,43,11,51,19,59,27,34,2,42,10,50,18,58,26,33,1,41,9,49,17,57,25,32,0,40,8,48,16,56,24),l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1],f=s(0,1048577,3145731),p=o(64).map(e=>Array(e).fill(null).reduce(e=>e.multiply(2),i(1)));p[p.length-1]=p[p.length-1].multiply(-1);let h=s(15,6,19,20,28,11,27,16,0,14,22,25,4,17,30,9,1,7,23,13,31,26,2,8,18,12,29,5,21,10,3,24),d=s(56,48,40,32,24,16,8,0,57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,60,52,44,36,28,20,12,4,27,19,11,3),g=s(13,16,10,23,0,4,-1,-1,2,27,14,5,20,9,-1,-1,22,18,11,3,25,7,-1,-1,15,6,26,19,12,1,-1,-1,40,51,30,36,46,54,-1,-1,29,39,50,44,32,47,-1,-1,43,48,38,55,33,52,-1,-1,45,41,49,35,28,31,-1,-1),y=[[14,4,3,15,2,13,5,3,13,14,6,9,11,2,0,5,4,1,10,12,15,6,9,10,1,8,12,7,8,11,7,0,0,15,10,5,14,4,9,10,7,8,12,3,13,1,3,6,15,12,6,11,2,9,5,0,4,2,11,14,1,7,8,13],[15,0,9,5,6,10,12,9,8,7,2,12,3,13,5,2,1,14,7,8,11,4,0,3,14,11,13,6,4,1,10,15,3,13,12,11,15,3,6,0,4,10,1,7,8,4,11,14,13,8,0,6,2,15,9,5,7,1,10,12,14,2,5,9],[10,13,1,11,6,8,11,5,9,4,12,2,15,3,2,14,0,6,13,1,3,15,4,10,14,9,7,12,5,0,8,7,13,1,2,4,3,6,12,11,0,13,5,14,6,8,15,2,7,10,8,15,4,9,11,5,9,0,14,3,10,7,1,12],[7,10,1,15,0,12,11,5,14,9,8,3,9,7,4,8,13,6,2,1,6,11,12,2,3,0,5,14,10,13,15,4,13,3,4,9,6,10,1,12,11,0,2,5,0,13,14,2,8,15,7,4,15,1,10,7,5,6,12,11,3,8,9,14],[2,4,8,15,7,10,13,6,4,1,3,12,11,7,14,0,12,2,5,9,10,13,0,3,1,11,15,5,6,8,9,14,14,11,5,6,4,1,3,10,2,12,15,0,13,2,8,5,11,8,0,15,7,14,9,4,12,7,10,9,1,13,6,3],[12,9,0,7,9,2,14,1,10,15,3,4,6,12,5,11,1,14,13,0,2,8,7,13,15,5,4,10,8,3,11,6,10,4,6,11,7,9,0,6,4,2,13,1,9,15,3,8,15,3,1,14,12,5,11,0,2,12,14,7,5,10,8,13],[4,1,3,10,15,12,5,0,2,11,9,6,8,7,6,9,11,4,12,15,0,3,10,5,14,13,7,8,13,14,1,2,13,6,14,9,4,1,2,14,11,13,5,0,1,10,8,3,0,11,3,5,9,4,15,2,7,8,12,15,10,7,6,12],[13,7,10,0,6,9,5,15,8,4,3,10,11,14,12,5,2,11,9,6,15,12,0,3,4,1,14,13,1,2,7,8,1,2,12,15,10,4,0,3,13,14,6,9,7,8,9,6,15,1,5,12,3,10,14,5,8,7,11,0,4,13,2,11]],m=(e,t,r)=>{let s=i(0);return o(t).forEach(t=>{e[t].isNegative()||r.and(p[e[t].low]).equals(0)||(s=s.or(p[t]))}),s},b=(e,t)=>{let r=o(8).map(()=>i(0)),s=[i(0),i(0)],l=i(0),f=i(0),p=m(c,64,t);return s[0]=p.and(0xffffffff),s[1]=p.and(-0x100000000).shiftRight(32),o(16).forEach(t=>{let c=i(0);f=(f=m(a,64,f=i(s[1]))).xor(e[t]),o(8).forEach(e=>{r[e]=f.shiftRight(8*e).and(255)}),o(8).reverse().forEach(e=>{c=c.shiftLeft(4).or(y[e][r[e]])}),f=m(h,32,c),l=i(s[0]),s[0]=i(s[1]),s[1]=l.xor(f)}),s.reverse(),p=m(u,64,p=s[1].shiftLeft(32).and(-0x100000000).or(s[0].and(0xffffffff)))},v=(e,t,r)=>{let s,a=i(0);o(8).forEach(e=>{a=i(t[e]).shiftLeft(8*e).or(a)});let c=Math.floor(e.length/8),u=o(16).map(()=>i(0));s=m(d,56,a),o(16).forEach(e=>{s=s.and(f[l[e]]).shiftLeft(28-l[e]).or(s.and(f[l[e]].not()).shiftRight(l[e])),u[e]=m(g,64,s)}),1===r&&o(8).forEach(e=>{[u[e],u[15-e]]=[u[15-e],u[e]]});let p=o(c).map(()=>i(0));o(c).forEach(t=>{o(8).forEach(r=>{p[t]=i(e[r+8*t]).shiftLeft(8*r).or(p[t])})});let h=o(Math.floor((1+8*(c+1))/8)).map(()=>i(0));o(c).forEach(e=>{h[e]=b(u,p[e])});let y=e.slice(8*c),v=i(0);o(e.length%8).forEach(e=>{v=i(y[e]).shiftLeft(8*e).or(v)}),(y.length||0===r)&&(h[c]=b(u,v));let w=o(8*h.length).map(()=>0),_=0;return h.forEach(e=>{o(8).forEach(t=>{w[_]=e.shiftRight(8*t).and(255).low,_+=1})}),Buffer.from(w)},w=Buffer.from("ylzsxkwm"),_=e=>v(e,w,0);e.exports={encrypt:_,decrypt:e=>v(e,w,1),encryptQuery:e=>_(Buffer.from(e)).toString("base64")}},9309(e,t,r){"use strict";var i;let o=r(2306),s=process.env.LOG_FILE,a=process.stdout.isTTY,c=o({level:null!=(i=process.env.LOG_LEVEL)?i:"info",prettyPrint:"true"!==process.env.JSON_LOG&&{colorize:a,messageFormat:a?"\x1b[1m\x1b[32m({scope})\x1b[0m\x1b[36m {msg}":"({scope}) {msg}",ignore:"time,pid,hostname,scope",errorProps:"*"}},s&&o.destination(s));e.exports={logger:c,logScope:function(e){return c.child({scope:e})}}},3371(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699);let{cacheStorage:i,CacheStorageGroup:o,getManagedCacheStorage:s}=r(755),a=r(4473),c=r(9147),u=r(9904),l=e=>({id:e.id,name:e.title,artists:{id:e.mid,name:e.author}}),f=e=>u("GET","https://www.bilibili.com/audio/music-service-c/web/url?rivilege=2&quality=2&sid="+e).then(e=>e.json()).then(e=>0===e.code?e.data.cdns[0].replace("https","http"):Promise.reject()).catch(()=>a().bilibili.track(e)),p=s("provider/bilibili");e.exports={check:e=>p.cache(e,()=>u("GET",`https://api.bilibili.com/audio/music-service-c/s?search_type=music&page=1&pagesize=30&keyword=${encodeURIComponent(e.keyword)}`).then(e=>e.json()).then(t=>{let r=c(t.data.result.map(l),e);return r?r.id:Promise.reject()})).then(f),track:f}},8754(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699);let{cacheStorage:i,CacheStorageGroup:o,getManagedCacheStorage:s}=r(755),a=r(4473),c=r(9147),u=r(9904),l=r(7312),{logScope:f}=r(9309);f("provider/bilivideo");let p=s("provider/bilivideo"),h=[46,47,18,2,53,8,23,32,15,50,10,31,58,3,45,35,27,43,5,49,33,9,42,19,29,28,14,39,12,38,41,13,37,48,7,16,24,55,40,61,26,17,0,1,60,51,30,4,22,25,54,21,56,59,6,63,57,62,11,36,20,34,44,52];async function d(){let e=await u("GET","https://api.bilibili.com/x/web-interface/nav",{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3",Referer:"https://www.bilibili.com/"}),{data:{wbi_img:{img_url:t,sub_url:r}}}=await e.json();return{img_key:t.slice(t.lastIndexOf("/")+1,t.lastIndexOf(".")),sub_key:r.slice(r.lastIndexOf("/")+1,r.lastIndexOf("."))}}let g=async e=>{let t,r,i,o,s,a,{img_key:c,sub_key:u}=await p.cache("wbikey",async()=>await d());return t=c+u,r=h.map(e=>t[e]).join("").slice(0,32),i=Math.round(Date.now()/1e3),o=/[!'()*]/g,Object.assign(e,{wts:i}),s=Object.keys(e).sort().map(t=>{let r=e[t].toString().replace(o,"");return`${encodeURIComponent(t)}=${encodeURIComponent(r)}`}).join("&"),a=l.md5.digest(s+r),s+"&w_rid="+a},y=e=>({id:e.bvid,name:e.title,artists:{id:e.typeid,name:e.typename}}),m=async()=>p.cache("bilicookie",()=>u("GET","https://www.bilibili.com").then(e=>e.headers["set-cookie"].map(e=>e.split(";")[0]).join("; "))),b=e=>g({bvid:e}).then(t=>u("GET","https://api.bilibili.com/x/web-interface/wbi/view?"+t).then(e=>e.json()).then(t=>0===t.code?g({bvid:e,cid:t.data.cid,fnval:16,platform:"pc"}).then(t=>u("GET","https://api.bilibili.com/x/player/wbi/playurl?"+t).then(e=>e.json()).then(e=>0!==e.code?Promise.reject():null!=e.data.dash.audio?e.data.dash.audio[0].base_url:Promise.reject()).catch(()=>a().bilibili.track(e))):Promise.reject()).catch(()=>a().bilibili.track(e)));e.exports={check:e=>p.cache(e,()=>m().then(t=>g({search_type:"video",keyword:e.keyword}).then(r=>u("GET","https://api.bilibili.com/x/web-interface/wbi/search/type?"+r,{cookie:t,referer:"https://search.bilibili.com"}).then(e=>e.json()).then(t=>{let r=c(t.data.result.map(y),e);return r?r.id:Promise.reject()})))).then(b),track:b}},2148(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699),r(9444),r(3435),r(9313);let i=r(4473),o=r(9147),s=r(7312),a=r(9904),{getManagedCacheStorage:c}=r(755),{logScope:u}=r(9309),l=u("provider/bodian"),f=(Math.floor(Math.random()*(1e11+1))+0).toString(),p=e=>({id:e.MUSICRID.split("_").pop(),name:e.SONGNAME,duration:1e3*e.DURATION,album:{id:e.ALBUMID,name:e.ALBUM},artists:e.ARTIST.split("&").map((t,r)=>({id:r?null:e.ARTISTID,name:t}))}),h=e=>{var t;let r,c,u,p,h,d={"user-agent":"Dart/2.19 (dart:io)",plat:"ar",channel:"aliopen",devid:f,ver:"3.9.0",host:"bd-api.kuwo.cn","X-Forwarded-For":"1.0.1.114"},g=`http://bd-api.kuwo.cn/api/play/music/v2/audioUrl?&br=${o.ENABLE_FLAC?"2000kflac":"320kmp3"}&musicId=${e}`;return r=new URL(t=g),c=Date.now(),u=(t+=`×tamp=${c}`).substring(t.indexOf("?")+1).replace(/[^a-zA-Z0-9]/g,"").split("").sort(),p=`kuwotest${u.join("")}${r.pathname}`,h=s.md5.digest(p),g=`${t}&sign=${h}`,a("POST","http://bd-api.kuwo.cn/api/service/advert/watch?uid=-1&token=×tamp=1724306124436&sign=15a676d66285117ad714e8c8371691da",{"user-agent":"Dart/2.19 (dart:io)",plat:"ar",channel:"aliopen",devid:f,ver:"3.9.0",host:"bd-api.kuwo.cn",qimei36:"1e9970cbcdc20a031dee9f37100017e1840e","content-type":"application/json; charset=utf-8"},JSON.stringify({type:5,subType:5,musicId:0,adToken:""})).then(e=>e.body()).then(e=>l.debug(`bodian ad free response: ${e}`)).then(()=>a("GET",g,d).then(e=>e.json()).then(e=>e&&200===e.code&&"object"==typeof e.data&&e.data.audioUrl||Promise.reject()).catch(()=>i().bodian.track(e)))},d=c("provider/bodian");e.exports={check:e=>d.cache(e,()=>a("GET","http://search.kuwo.cn/r.s?&correct=1&vipver=1&stype=comprehensive&encoding=utf8&rformat=json&mobi=1&show_copyright_off=1&searchapi=6&all="+encodeURIComponent(e.keyword.replace(" - "," "))).then(e=>e.json()).then(t=>{if(!t||t.content.length<2||!t.content[1].musicpage||t.content[1].musicpage.abslist.length<1)return Promise.reject();let r=o(t.content[1].musicpage.abslist.map(p),e);return r?r.id:Promise.reject()})).then(h),track:h}},6980(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(6791),r(7589),r(8831),r(1699);let i=r(9904),{getManagedCacheStorage:o}=r(755),s=(e,t)=>Object.keys(e).reduce((r,i)=>Object.assign(r,t.includes(i)&&{[i]:e[i]}),{}),a=e=>{try{var t,r;let i,o=s(e,["id","name","alias","duration"]);if(o.name=(o.name||"").replace(/(\s*cover[::\s][^)]+)/i,"").replace(/\(\s*cover[::\s][^)]+\)/i,"").replace(/(\s*翻自[::\s][^)]+)/,"").replace(/\(\s*翻自[::\s][^)]+\)/,""),o.album=s(e.album,["id","name"]),o.artists=e.artists.map(e=>s(e,["id","name"])),o.keyword=o.name+" - "+(i=[(t=o.artists.map(e=>e.name))[0]],t.slice(1).some(e=>i.reduce((e,t)=>e+t.length,0)>15||(i.push(e),!1)),i).join(" / "),"true"===process.env.SEARCH_ALBUM){let e=null==(r=o.album)?void 0:r.name;e&&e!==o.name&&(o.keyword+=` ${e}`)}return o}catch(e){return console.log("getFormatData err: ",e),{}}},c=(e,t)=>{if(!t)return i("GET","https://music.163.com/api/song/detail?ids=["+e+"]").then(e=>e.json()).then(e=>{if(e&&e.songs&&e.songs.length){let t=a(e.songs[0]);return t.name?t:Promise.reject()}return Promise.reject()});{let e=a(t);return e.name?Promise.resolve(e):Promise.reject()}},u=o("provider/find");e.exports=(e,t)=>t?c(e,t):u.cache(e,()=>c(e))},4473(e,t,r){"use strict";let i=r(9904);e.exports=()=>{let t=global.cnrelay,r=new Proxy(()=>{},{get:(e,t)=>(e.route=(e.route||[]).concat(t),r),apply:(r,o,s)=>{if(e.exports.disable||!t)return Promise.reject();let a=r.route.join("/"),c="object"==typeof s[0]?JSON.stringify(s[0]):s[0];return i("GET",`${t}/${a}?${encodeURIComponent(c)}`).then(e=>e.body())}});return r}},3183(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699),r(4370);let i=r(4473),o=r(9147),s=r(7312),a=r(9904),{getManagedCacheStorage:c}=r(755),u={origin:"http://www.joox.com",referer:"http://www.joox.com",cookie:process.env.JOOX_COOKIE||null},l=e=>{let{decode:t}=s.base64;return{id:e.songid,name:t(e.info1||""),duration:1e3*e.playtime,album:{id:e.albummid,name:t(e.info3||"")},artists:e.singer_list.map(({id:e,name:r})=>({id:e,name:t(r||"")}))}},f=e=>a("GET","http://api.joox.com/web-fcgi-bin/web_get_songinfo?songid="+e+"&country=hk&lang=zh_cn&from_type=-1&channel_id=-1&_="+new Date().getTime(),u).then(e=>e.jsonp()).then(e=>{let t=(e.r320Url||e.r192Url||e.mp3Url||e.m4aUrl).replace(/M\d00([\w]+).mp3/,"M800$1.mp3");return t||Promise.reject()}).catch(()=>i().joox.track(e)),p=c("provider/joox");e.exports={check:e=>p.cache(e,()=>a("GET","http://api-jooxtt.sanook.com/web-fcgi-bin/web_search?country=hk&lang=zh_TW&search_input="+encodeURIComponent(/[\u0800-\u4e00]/.test(e.name)?e.name:e.keyword)+"&sin=0&ein=30",u).then(e=>e.body()).then(t=>{let r=o(JSON.parse(t.replace(/'/g,'"')).itemlist.map(l),e);return r?r.id:Promise.reject()})).then(f),track:f}},434(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699),r(6142);let i=r(4473),o=r(9147),s=r(7312),a=r(9904),{getManagedCacheStorage:c}=r(755),u=e=>({id:e.hash,id_hq:e["320hash"],id_sq:e.sqhash,name:e.songname,duration:1e3*e.duration,album:{id:e.album_id,name:e.album_name}}),l=e=>a("GET","http://mobilecdn.kugou.com/api/v3/search/song?keyword="+encodeURIComponent(e.keyword)+"&page=1&pagesize=10").then(e=>e.json()).then(t=>o(t.data.info.map(u),e)||Promise.reject()).catch(()=>i().kugou.search(e)),f=e=>Promise.all(["sqhash","hqhash","hash"].slice(+!o.ENABLE_FLAC).map(t=>{let r;return(r=()=>{switch(t){case"hash":return e.id;case"hqhash":return e.id_hq;case"sqhash":return e.id_sq}return""},a("GET","http://trackercdn.kugou.com/i/v2/?key="+s.md5.digest(`${r()}kgcloudv2`)+"&hash="+r()+"&appid=1005&pid=2&cmd=25&behavior=play&album_id="+e.album.id).then(e=>e.json()).then(e=>e.url[0]||Promise.reject())).catch(()=>null)})).then(e=>e.find(e=>e)||Promise.reject()).catch(()=>i().kugou.track(e)),p=c("provider/kugou");e.exports={check:e=>p.cache(e,()=>l(e)).then(f),search:l}},4449(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699);let i=r(4473),o=r(9147),s=r(7312),a=r(9904),{getManagedCacheStorage:c}=r(755),u=e=>({id:e.MUSICRID.split("_").pop(),name:e.SONGNAME,duration:1e3*e.DURATION,album:{id:e.ALBUMID,name:e.ALBUM},artists:e.ARTIST.split("&").map((t,r)=>({id:r?null:e.ARTISTID,name:t}))}),l=e=>a("GET",s.kuwoapi?"http://mobi.kuwo.cn/mobi.s?f=kuwo&q="+s.kuwoapi.encryptQuery("user=0&corp=kuwo&source=kwplayer_ar_5.1.0.0_B_jiakong_vh.apk&p2p=1&type=convert_url2&sig=0&format="+["flac","mp3"].slice(+!o.ENABLE_FLAC).join("|")+"&rid="+e):"http://antiserver.kuwo.cn/anti.s?type=convert_url&format=mp3&response=url&rid=MUSIC_"+e,{"user-agent":"okhttp/3.10.0"}).then(e=>e.body()).then(e=>(e.match(/http[^\s$"]+/)||[])[0]||Promise.reject()).catch(()=>i().kuwo.track(e)),f=c("provider/kuwo");e.exports={check:e=>f.cache(e,()=>a("GET","http://search.kuwo.cn/r.s?&correct=1&vipver=1&stype=comprehensive&encoding=utf8&rformat=json&mobi=1&show_copyright_off=1&searchapi=6&all="+encodeURIComponent(e.keyword.replace(" - "," "))).then(e=>e.json()).then(t=>{if(!t||t.content.length<2||!t.content[1].musicpage||t.content[1].musicpage.abslist.length<1)return Promise.reject();let r=o(t.content[1].musicpage.abslist.map(u),e);return r?r.id:Promise.reject()})).then(l),track:l}},9102(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(4356),r(2460),r(3302),r(4255),r(7922),r(3248),r(7492),r(9594),r(1612),r(6414),r(9673),r(1299),r(4569),r(6636),r(9845),r(5459),r(1408),r(1699),r(6791),r(6488),r(2386),r(518);let i=r(6980),o=r(9904),{PROVIDERS:s,DEFAULT_SOURCE:a}=r(2413),{isHostWrapper:c}=r(8010),u=r(3947),l=r(988),f=r(7798),{logScope:p}=r(9309),h=r(1658),d=p("provider/match"),g=new Map([["bilivideo.com","https://www.bilibili.com/"],["upos-hz-mirrorakam.akamaized.net","https://www.bilibili.com/"]]);async function y(e,t){d.debug({source:e,info:t},"Getting the audio...");let r=await s[e].check(t);if(!r)throw new u(e);let i=await m(r);if(d.debug(i,"The matched song is:"),!i||"string"!=typeof i.url)throw new f("song is undefined, or song.url is not a string.");return d.debug({source:e,info:t},"The audio matched!"),{...i,source:e}}async function m(e){let t,r=c(e),i={size:0,br:null,url:null,md5:null},s={range:"bytes=0-8191","accept-encoding":"identity"};g.forEach((e,t)=>{r(t)&&(s.referer=e)});let a=await o("GET",e,s),{headers:u}=a;if(!((t=a.statusCode)>=200&&t<=299))throw new l(e,a.statusCode);i.url=a.url.href;let f=await a.body(!0);try{let e=function(e){let t={3:{3:["free",32,64,96,128,160,192,224,256,288,320,352,384,416,448,"bad"],2:["free",32,48,56,64,80,96,112,128,160,192,224,256,320,384,"bad"],1:["free",32,40,48,56,64,80,96,112,128,160,192,224,256,320,"bad"]},2:{3:["free",32,48,56,64,80,96,112,128,144,160,176,192,224,256,"bad"],2:["free",8,16,24,32,40,48,56,64,80,96,112,128,144,160,"bad"]}};t[2][1]=t[2][2],t[0]=t[2];let r=0;if("fLaC"===e.slice(0,4).toString())return 999;"ID3"===e.slice(0,3).toString()&&(r=6,r=10+e.slice(r,r+4).reduce((e,t,r)=>e+(127&t)<<7*(3-r),0));let i=e.slice(r,r+4);if(4===i.length&&255===i[0]&&(i[1]>>5&7)==7&&(i[1]>>1&3)!=0&&(i[2]>>4&15)!=15&&(i[2]>>2&3)!=3){let e=i[1]>>3&3,r=i[1]>>1&3,o=i[2]>>4;return t[e][r][o]}}(f);i.br=e&&!isNaN(e)?1e3*e:null}catch(e){d.debug(e,"Failed to decode and extract the bitrate")}if(!i.br){if(r("qq.com")&&i.url.includes(".m4a")&&(i.br=96e3),r("bilivideo.com")&&i.url.includes(".m4a")){let e=parseInt(i.url.match(/-(\d+)k\.m4a/));isNaN(e)||e<96||e>999?e=192e3:e*=1e3,i.br=e}r("googlevideo.com")&&(i.br=128e3)}return u&&(r("126.net")&&(i.md5=i.url.split("/").slice(-1)[0].replace(/\..*/g,"")),r("qq.com")&&(i.md5=u["server-md5"]),i.size=parseInt((u["content-range"]||"").split("/").pop()||u["content-length"])||0,"8192"!==u["content-length"])?Promise.reject():i}e.exports=async function e(e,t,r){let o=(t||global.source||a).filter(e=>e in s),c=await i(e,r),l=null;if(process.env.SELECT_MAX_BR){let e=await Promise.allSettled(o.map(async e=>y(e,c).catch(e=>{throw e&&(e instanceof h?d.debug(e):d.error(e)),e})));if(0===(e=e.filter(e=>"fulfilled"===e.status)).length)throw new u("any source");l=(e=e.map(e=>e.value)).reduce((e,t)=>e.br>=t.br?e:t)}else if(process.env.FOLLOW_SOURCE_ORDER){for(let e=0;ey(e,c).catch(e=>{throw e&&(e instanceof h?d.debug(e):d.error(e)),e})));let{id:f,name:p}=c,{url:g}=l;return d.debug({audioInfo:c,audioData:l},"The data to replace:"),d.info({audioId:f,songName:p,url:g},`Replaced: [${f}] ${p}`),l}},1573(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699),r(6142);let i=r(4473),o=r(9147),s=r(9904),{getManagedCacheStorage:a}=r(755),c={origin:"http://music.migu.cn/",referer:"http://m.music.migu.cn/v3/",aversionid:process.env.MIGU_COOKIE||null,channel:"0146921"},u=e=>{let t=e.singerId.split(/\s*,\s*/),r=e.singerName.split(/\s*,\s*/);return{id:e.id,name:e.title,album:{id:e.albumId,name:e.albumName},artists:t.map((e,t)=>({id:e,name:r[t]}))}},l=e=>Promise.all(["ZQ24","SQ","HQ","PQ"].slice(2*!o.ENABLE_FLAC).map(t=>{let r;return s("GET",r="https://app.c.nf.migu.cn/MIGUM2.0/strategy/listen-url/v2.4?netType=01&resourceType=2&songId="+e.toString()+"&toneFlag="+t,c).then(e=>e.json()).then(e=>{let{audioFormatType:i}=e.data;return i!==t?Promise.reject():r?e.data.url:Promise.reject()}).catch(()=>null)})).then(e=>e.find(e=>e)||Promise.reject()).catch(()=>i().migu.track(e)),f=a("provider/migu");e.exports={check:e=>f.cache(e,()=>s("GET","https://m.music.migu.cn/migu/remoting/scr_search_tag?keyword="+encodeURIComponent(e.keyword)+"&type=2&rows=20&pgc=1",c).then(e=>e.json()).then(t=>{let r=o(((t||{}).musics||[]).map(u),e);return r?r.id:Promise.reject()})).then(l),track:l}},4482(e,t,r){"use strict";let i=r(9147),o=r(9904),{getManagedCacheStorage:s}=r(755),a=s("provider/pyncmd");e.exports={check:e=>a.cache(e,()=>o("GET","https://music-api.gdstudio.xyz/api.php?types=url&source=netease&id="+e.id+"&br="+["999","320"].slice(+!i.ENABLE_FLAC,i.ENABLE_FLAC?1:2)).then(e=>e.json()).then(e=>e&&"object"==typeof e&&!1 in e?Promise.reject():e.br>0?e.url:Promise.reject()))}},8469(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699),r(6142);let i=r(4473),o=r(9147),s=r(9904),{getManagedCacheStorage:a}=r(755),c=process.env.NEW_QQ_COOKIE||process.env.QQ_COOKIE,u={origin:"http://y.qq.com/",referer:"http://y.qq.com/",cookie:c||null},l=e=>({id:{song:e.mid,file:e.mid},name:e.name,duration:1e3*e.interval,album:{id:e.album.mid,name:e.album.name},artists:e.singer.map(({mid:e,name:t})=>({id:e,name:t}))}),f=e=>(e.key=e.file,Promise.all([["F000",".flac"],["M800",".mp3"],["M500",".mp3"],[null,null]].slice(u.cookie||"u">typeof window?+!o.ENABLE_FLAC:2).map(t=>{let r;return(r=((u.cookie||"").match(/uin=(\d+)/)||[])[1]||"0",s("GET","https://u.y.qq.com/cgi-bin/musicu.fcg?data="+encodeURIComponent(JSON.stringify({req_0:{module:"vkey.GetVkeyServer",method:"CgiGetVkey",param:{guid:(1e7*Math.random()).toFixed(0),loginflag:1,filename:t[0]?[t.join(e.file)]:null,songmid:[e.song],songtype:[0],uin:r,platform:"20"}}})),u).then(e=>e.json()).then(e=>{let{sip:t,midurlinfo:r}=e.req_0.data;if(!r[0].purl)return Promise.reject();let i=t[0]+r[0].purl;return s("GET",i,{range:"bytes=0-8191","accept-encoding":"identity"}).then(e=>e.statusCode<200||e.statusCode>299?Promise.reject():i)})).catch(()=>null)})).then(e=>e.find(e=>e)||Promise.reject()).catch(()=>i().qq.track(e))),p=a("provider/qq");e.exports={check:e=>{let t,r,i,a=Math.floor(Date.now()/1e3),h=((c||"").match(/musickey_createtime=(\d+)/)||[])[1]||"",d=parseInt(h,10)+259200;return h&&d-a<600&&(t=(c.match(/qqrefresh_token=([^;]*)/)||[])[1]||"",r=(c.match(/qqmusic_key=([^;]*)/)||[])[1]||"",i=parseInt((c.match(/uin=(\d+)/)||[])[1]||0,10),s("POST","https://u.y.qq.com/cgi-bin/musicu.fcg",{Cookie:c,"Content-Type":"application/json"},JSON.stringify({req:{module:"music.login.LoginServer",method:"Login",param:{refresh_token:t,musickey:r,musicid:i}}})).then(e=>e.json()).then(e=>{var t;let r=(null==(t=e.req)?void 0:t.data)||{},i=r.musickey,o=r.musickeyCreateTime;if(!i||!o)return;let s=c;s=s.replace(/(qqmusic_key=)[^;]*/,`$1${i}`).replace(/(qm_keyst=)[^;]*/,`$1${i}`).replace(/(psrf_musickey_createtime=)[^;]*/,`$1${o}`),process.env.NEW_QQ_COOKIE=s,u.cookie=s,c=s})),p.cache(e,()=>s("GET","https://u.y.qq.com/cgi-bin/musicu.fcg?data="+encodeURIComponent(JSON.stringify({search:{method:"DoSearchForQQMusicDesktop",module:"music.search.SearchCgiService",param:{num_per_page:5,page_num:1,query:e.keyword,search_type:0}}})),u).then(e=>e.json()).then(t=>{let r=o(t.search.data.body.song.list.map(l),e);return r?r.id:Promise.reject()})).then(f)},track:f}},9147(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(6142),e.exports=(e,t)=>{let{duration:r}=t,i=e.slice(0,5).find(e=>e.duration&&5e3>Math.abs(e.duration-r));return i||e[0]},e.exports.ENABLE_FLAC="true"===(process.env.ENABLE_FLAC||"").toLowerCase()},6863(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(4370);let{getManagedCacheStorage:i}=r(755),{logScope:o}=r(9309),s=r(7821),a=r(876),{spawnStdout:c}=r(6630),u=o("provider/youtube-dl");async function l(e){try{let{stdout:t}=await c("youtube-dl",e),r=JSON.parse(t.toString());if("object"==typeof r&&"string"==typeof r.id&&"string"==typeof r.url)return r;throw new s(r)}catch(e){if(e&&"ENOENT"===e.code)throw new a;throw e}}let f=async e=>{let t,{url:r}=await l((t=e.keyword,["-f","140","--dump-json",`ytsearch1:${t}`]));return r},p=i("youtube-dl");e.exports={check:e=>p.cache(e,()=>f(e)).catch(e=>{throw e&&u.error(e),e})}},5918(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(6791),r(1699),r(4370),r(6142);let i=r(9904),{getManagedCacheStorage:o}=r(755),s=o("provider/youtube"),a,c=process.env.YOUTUBE_KEY||null,u=e=>i("GET",`https://www.youtube.com/watch?v=${e}`,{},null,a).then(e=>e.body()).then(e=>JSON.parse(e.match(/ytInitialPlayerResponse\s*=\s*{[^]+};\s*var\s*meta/)[0].replace(/;var meta/,"").replace(/ytInitialPlayerResponse = /,"")).streamingData).then(e=>{let t=e.formats.concat(e.adaptiveFormats).find(e=>140===e.itag),r=(t.signatureCipher||"").split("&").reduce((e,t)=>{let r=t.split("=").map(decodeURIComponent);return Object.assign({},e,{[r[0]]:r[1]})},{});return t.url||(r.sp.includes("sig")?s.cache("YOUTUBE_SIGNATURE",()=>((e="-tKVN2mAKRI")=>i("GET",`https://www.youtube.com/watch?v=${e}`,{},null,a).then(e=>e.body()).then(e=>{let t=/"WEB_PLAYER_CONTEXT_CONFIG_ID_KEVLAR_VERTICAL_LANDING_PAGE_PROMO":{[^}]+}/.exec(e)[0];return i("GET","https://youtube.com"+(t=JSON.parse(`{${t}}}`).WEB_PLAYER_CONTEXT_CONFIG_ID_KEVLAR_VERTICAL_LANDING_PAGE_PROMO).jsUrl,{},null,a).then(e=>e.body())}).then(e=>{let[,t,r]=/function\((\w+)\)\s*{([^}]+split\(""\)[^}]+join\(""\))};/.exec(e),i=/;(.+?)\..+?\(/.exec(r)[1];return Function([t],RegExp(`var ${i}={[\\s\\S]+?};`).exec(e)[0]+` -`+r)}))(),Date.now()+864e5).then(e=>r.url+"&sig="+e(r.s)):r.url)});e.exports={check:e=>s.cache(e,()=>c?i("GET",`https://www.googleapis.com/youtube/v3/search?part=snippet&q=${encodeURIComponent(e.keyword)}&type=video&key=${c}`,{accept:"application/json"},null,a).then(e=>e.json()).then(e=>{let t=e.items[0];return t?t.id.videoId:Promise.reject()}):i("GET",`https://www.youtube.com/results?search_query=${encodeURIComponent(e.keyword)}`,{},null,a).then(e=>e.body()).then(e=>{let t=JSON.parse(e.match(/ytInitialData\s*=\s*([^;]+);/)[1]).contents.twoColumnSearchResultsRenderer.primaryContents.sectionListRenderer.contents[0].itemSectionRenderer.contents[1];return t?t.videoRenderer.videoId:Promise.reject()})).then(u),track:u}},6819(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(4370);let{getManagedCacheStorage:i}=r(755),{logScope:o}=r(9309),{spawnStdout:s}=r(6630),a=r(5),c=r(1578),u=o("provider/yt-dlp");async function l(e){try{let{stdout:t}=await s("yt-dlp",e),r=JSON.parse(t.toString());if("object"==typeof r&&"string"==typeof r.id&&"string"==typeof r.url)return r;throw new a(r)}catch(e){if(e&&"ENOENT"===e.code)throw new c;throw e}}let f=async e=>{let t,{url:r}=await l((t=e.keyword,["-f","140","--dump-json",`ytsearch1:${t}`]));return r},p=i("yt-dlp");e.exports={check:e=>p.cache(e,()=>f(e)).catch(e=>{throw e&&u.error(e),e})}},9904(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(6791),r(8831),r(4370);let i=r(3106),o=r(8611),s=r(5692),a=r(6867),c=r(1658),{logScope:u}=r(9309),l=r(7016).parse,f=r(7016).format,p=u("request"),h=e=>(global.hosts||{})[e]||e,d=(e,t)=>("https:"===((void 0===t?global.proxy:t)||e).protocol?s:o).request,g=(e,t,r,i)=>{r=r||{},i=void 0===i?global.proxy:i,"content-length"in r&&delete r["content-length"];let o={};return o._headers=r,i&&"https:"===t.protocol?(o.method="CONNECT",o.headers=Object.keys(r).reduce((e,t)=>Object.assign(e,["host","user-agent"].includes(t)&&{[t]:r[t]}),{})):(o.method=e,o.headers=r),i?(o.hostname=h(i.hostname),o.port=i.port||("https:"===i.protocol?443:80),o.path="https:"===t.protocol?h(t.hostname)+":"+(t.port||443):"http://"+h(t.hostname)+t.path):(o.hostname=h(t.hostname),o.port=t.port||("https:"===t.protocol?443:80),o.path=t.path),o},y=(e,t,r,i,o,u)=>{let h=l(t),w=r||{},_=g(e,h,{host:h.hostname,accept:"application/json, text/plain, */*","accept-encoding":"gzip, deflate","accept-language":"zh-CN,zh;q=0.9","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36",...w},o);return new Promise((r,l)=>{var g;p.debug(`Start requesting ${t}`);let y=d(h,o)(_),m=function(){y.destroy(new c(f(h)))};null==u||u.on(a,m),null!=(g=null==u?void 0:u.cancelled)&&g&&m(),y.setTimeout(1e4,()=>{p.warn({url:f(h)},"The request timed out, or the requester didn't handle the response."),m()}).on("response",e=>r(e)).on("connect",(t,o)=>{p.debug("received CONNECT, continuing with https.request()..."),s.request({method:e,path:h.path,headers:_._headers,socket:o,agent:!1}).on("response",e=>r(e)).on("error",e=>l(e)).end(i)}).on("error",e=>l(e)).end("CONNECT"===_.method.toUpperCase()?void 0:i)}).then(t=>{var r;if(null!=(r=null==u?void 0:u.cancelled)&&r)return Promise.reject(new c(f(h)));if([201,301,302,303,307,308].includes(t.statusCode)){let r=h.resolve(t.headers.location||h.href);return p.debug(`Redirect to ${r}`),delete w.host,y(e,r,w,i,o)}return Object.assign(t,{url:h,body:e=>m(t,e),json:()=>b(t),jsonp:()=>v(t)})})},m=(e,t)=>new Promise((t,r)=>{let i=[];e.on("data",e=>i.push(e)).on("end",()=>t(Buffer.concat(i))).on("error",e=>r(e))}).then(r=>{if(r.length)switch(e.headers["content-encoding"]){case"deflate":case"gzip":r=i.unzipSync(r);break;case"br":r=i.brotliDecompressSync(r)}return t?r:r.toString()}),b=e=>m(e,!1).then(e=>JSON.parse(e)),v=e=>m(e,!1).then(e=>JSON.parse(e.slice(e.indexOf("(")+1,-1)));y.read=m,y.create=d,y.translate=h,y.configure=g,e.exports=y},9914(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699),r(5459),r(7589);let i=r(9896),o=r(9278),s=r(6928),a=r(7016).parse,{logScope:c}=r(9309),u=c("server"),l=r(5249),f=r(8978),p=r(9904),{isHost:h}=r(8010),d={core:{mitm:(e,t)=>{if("/proxy.pac"===e.url){let r=a("http://"+e.headers.host);t.writeHead(200,{"Content-Type":"application/x-ns-proxy-autoconfig"}),t.end(` +-----END PUBLIC KEY-----`,f=(t=(t=u)||Buffer.alloc(0),r=Math.ceil(5),{key:(o=Buffer.concat(Array(r).fill(null).reduce(e=>e.concat(i.createHash("md5").update(Buffer.concat([e.slice(-1)[0],c,t])).digest()),[Buffer.alloc(0)]))).slice(0,32),iv:o.slice(32,48)}),p=i.createCipheriv("aes-256-cbc",f.key,f.iv);return s({data:Buffer.concat([Buffer.from("Salted__"),u,p.update(Buffer.from(a)),p.final()]).toString("base64"),secKey:i.publicEncrypt({key:l,padding:i.constants.RSA_PKCS1_PADDING},c).toString("base64")})}},base64:{encode:(e,t)=>Buffer.from(e,t).toString("base64").replace(/\+/g,"-").replace(/\//g,"_"),decode:(e,t)=>Buffer.from(e.replace(/-/g,"+").replace(/_/g,"/"),"base64").toString(t)},uri:{retrieve:e=>{e=e.toString().trim();let t="3go8&$8*3*3h0k(2)2",r=Array.from(Array(e.length).keys()).map(r=>String.fromCharCode(e.charCodeAt(r)^t.charCodeAt(r%t.length))).join(""),o=i.createHash("md5").update(r).digest("base64").replace(/\//g,"_").replace(/\+/g,"-");return`http://p1.music.126.net/${o}/${e}`}},md5:{digest:e=>i.createHash("md5").update(e).digest("hex"),pipe:e=>new Promise((t,r)=>{let o=i.createHash("md5").setEncoding("hex");e.pipe(o).on("error",e=>r(e)).once("finish",()=>t(o.read()))})},sha1:{digest:e=>i.createHash("sha1").update(e).digest("hex")},random:{hex:e=>i.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e),uuid:()=>i.randomUUID()}};try{e.exports.kuwoapi=r(6239)}catch(e){}},7798(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8562),e.exports=class extends Error{constructor(e){super(`The audio data is incomplete: ${e}`),this.name="IncompleteAudioData"}}},6370(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8562),e.exports=class extends Error{constructor(e,t){super(`${e} exited with ${t}, which is not zero.`),this.process=e,this.exitCode=t,this.name="ProcessExitNotSuccessfully"}}},1658(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8562),e.exports=class extends Error{constructor(e){super(`This request URL has been cancelled: ${e}`),this.name="RequestCancelled"}}},988(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8562),e.exports=class extends Error{constructor(e,t){super(`Failed to get the response. Status code: ${t}`),this.url=e,this.code=t,this.name="RequestFailed"}}},3947(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8562),e.exports=class extends Error{constructor(e,t="?"){super(`This song "${t}" is not available in ${e}`),this.name="SongNotAvailable"}}},7821(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8562),e.exports=class extends Error{constructor(e){super("The response of youtube-dl is malformed."),this.name="YoutubeDlInvalidResponse",this.response=e}}},876(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8562),e.exports=class extends Error{constructor(){super('You must install "youtube-dl" before using the "youtubedl" source.'),this.name="YoutubeDlNotInstalled"}}},5(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8562),e.exports=class extends Error{constructor(e){super("The response of yt-dlp is malformed."),this.name="YtDlpInvalidResponse",this.response=e}}},1578(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8562),e.exports=class extends Error{constructor(){super('You must install "yt-dlp" before using the "ytdlp" source.'),this.name="YtDlpNotInstalled"}}},8978(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308),r(8074),r(8521),r(4503),r(3965),r(7015),r(3888),r(6615),r(4827),r(8399),r(6373),r(6131),r(937),r(1286),r(751),r(9529),r(9610),r(169),r(3848),r(5760),r(80),r(3854),r(3116),r(5481),r(3685),r(4472),r(6815),r(4825),r(8562),r(594);let i=r(7016).parse,o=r(7312),s=r(9904),a=r(9102),c=r(3480),{isHost:u,cookieToMap:l,mapToCookie:f}=r(8010),{getManagedCacheStorage:p}=r(755),{logScope:h}=r(9309),d=h("hook"),y=p("hook");y.aliveDuration=6048e5;let g=["true","cvip","svip"].includes((process.env.ENABLE_LOCAL_VIP||"").toLowerCase()),m="true"===(process.env.BLOCK_ADS||"").toLowerCase(),b="true"===(process.env.DISABLE_UPGRADE_CHECK||"").toLowerCase(),v="svip"===(process.env.ENABLE_LOCAL_VIP||"").toLowerCase(),w=(process.env.LOCAL_VIP_UID||"").split(",").map(e=>parseInt(e)).filter(e=>!Number.isNaN(e)),_={request:{before:()=>{},after:()=>{}},connect:{before:()=>{}},negotiate:{before:()=>{}},target:{host:new Set,path:new Set}};_.target.host=new Set(["music.163.com","interface.music.163.com","interface3.music.163.com","interfacepc.music.163.com","apm.music.163.com","apm3.music.163.com","interface.music.163.com.163jiasu.com","interface3.music.163.com.163jiasu.com"]),_.target.path=new Set(["/api/v3/playlist/detail","/api/v3/song/detail","/api/v6/playlist/detail","/api/album/play","/api/artist/privilege","/api/album/privilege","/api/v1/artist","/api/v1/artist/songs","/api/v2/artist/songs","/api/artist/top/song","/api/v1/album","/api/album/v3/detail","/api/playlist/privilege","/api/song/enhance/player/url","/api/song/enhance/player/url/v1","/api/song/enhance/download/url","/api/song/enhance/download/url/v1","/api/song/enhance/privilege","/api/ad","/batch","/api/batch","/api/listen/together/privilege/get","/api/playmode/intelligence/list","/api/v1/search/get","/api/v1/search/song/get","/api/search/complex/get","/api/search/complex/page","/api/search/pc/complex/get","/api/search/pc/complex/page","/api/search/song/list/page","/api/search/song/page","/api/cloudsearch/pc","/api/v1/playlist/manipulate/tracks","/api/song/like","/api/v1/play/record","/api/playlist/v4/detail","/api/v1/radio/get","/api/v1/discovery/recommend/songs","/api/usertool/sound/mobile/promote","/api/usertool/sound/mobile/theme","/api/usertool/sound/mobile/animationList","/api/usertool/sound/mobile/all","/api/usertool/sound/mobile/detail","/api/vipauth/app/auth/query","/api/music-vip-membership/client/vip/info"]);let S=["music.163.com","music.126.net","iplay.163.com","look.163.com","y.163.com","interface.music.163.com","interface3.music.163.com"];_.request.before=e=>{let{req:t}=e;t.url=(t.url.startsWith("http://")?"":(t.socket.encrypted?"https:":"http:")+"//"+(S.some(e=>(t.headers.host||"").includes(e))?t.headers.host:null))+t.url;let r=i(t.url);if([r.hostname,t.headers.host].some(e=>u(e,"music.163.com"))&&(e.decision="proxy"),process.env.NETEASE_COOKIE&&r.path.includes("url")){var a=l(t.headers.cookie);Object.entries(l(process.env.NETEASE_COOKIE)).forEach(([e,t])=>{a[e]=t}),t.headers.cookie=f(a),d.debug("Replace netease cookie")}if([r.hostname,t.headers.host].some(e=>_.target.host.has(e))&&"POST"===t.method&&(r.path.startsWith("/eapi/")||r.path.startsWith("/api/linux/forward")))return s.read(t).then(e=>t.body=e).then(s=>{if("x-napm-retry"in t.headers&&delete t.headers["x-napm-retry"],t.headers["X-Real-IP"]="118.88.88.88","x-aeapi"in t.headers&&(t.headers["x-aeapi"]="false"),!(t.url.includes("stream")||t.url.includes("/eapi/cloud/upload/check"))&&(t.headers["Accept-Encoding"]&&(t.headers["Accept-Encoding"]="gzip, deflate"),s)){let t,a={};switch(a.pad=(s.match(/%0+$/)||[""])[0],"/api/linux/forward"===r.path?a.crypto="linuxapi":r.path.startsWith("/eapi/")?a.crypto="eapi":r.path.startsWith("/api/")&&(a.crypto="api"),a.crypto){case"linuxapi":t=JSON.parse(o.linuxapi.decrypt(Buffer.from(s.slice(8,s.length-a.pad.length),"hex")).toString()),a.path=i(t.url).path,a.param=t.params;break;case"eapi":t=o.eapi.decrypt(Buffer.from(s.slice(7,s.length-a.pad.length),"hex")).toString().split("-36cd479b6b5-"),a.path=t[0],a.param=JSON.parse(t[1]),a.param.hasOwnProperty("e_r")&&("true"==a.param.e_r||!0==a.param.e_r)?a.e_r=!0:a.e_r=!1;break;case"api":t={},decodeURIComponent(s).split("&").forEach(e=>{let[r,i]=e.split("=");t[r]=i}),a.path=r.path,a.param=t}if(a.path=a.path.replace(/\/\d*$/,""),e.netease=a,"/api/song/enhance/download/url"===a.path)return x(e);if("/api/song/enhance/download/url/v1"===a.path)return E(e);m&&a.path.startsWith("/api/ad")&&(e.error=Error("ADs blocked."),e.decision="close"),b&&a.path.match(/^\/api(\/v1)?\/(android|ios|osx|pc)\/(upgrade|version)/)&&(e.error=Error("Upgrade check blocked."),e.decision="close")}}).catch(e=>e&&d.error(e,`A error occurred in hook.request.before when hooking ${t.url}.`));if(_.target.host.has(r.hostname)&&(r.path.startsWith("/weapi/")||r.path.startsWith("/api/")))t.headers["X-Real-IP"]="118.88.88.88",e.netease={web:!0,path:r.path.replace(/^\/weapi\//,"/api/").split("?").shift().replace(/\/\d*$/,"")};else if(t.url.includes("package"))try{let r=t.url.split("package/").pop().split("/"),s=i(o.base64.decode(r[0])),a=r[1].replace(/\.\w+/,"");t.url=s.href,t.headers.host=s.hostname,t.headers.cookie=null,e.package={id:a},e.decision="proxy"}catch(t){e.error=t,e.decision="close"}},_.request.after=e=>{let{req:t,proxyRes:r,netease:a,package:c}=e;if("tyst.migu.cn"===t.headers.host&&r.headers["content-range"]&&200===r.statusCode&&(r.statusCode=206),a&&_.target.path.has(a.path)&&200===r.statusCode)return s.read(r,!0).then(e=>e.length?r.body=e:Promise.reject()).then(t=>{if(a.e_r?a.jsonBody=JSON.parse(o.eapi.decrypt(t).toString().replace(/([^\\]"\s*:\s*)(\d{16,})(\s*[}|,])/g,'$1"$2L"$3')):a.jsonBody=JSON.parse(t.toString().replace(/([^\\]"\s*:\s*)(\d{16,})(\s*[}|,])/g,'$1"$2L"$3')),g){let e="/api/music-vip-membership/client/vip/info";if("/batch"===a.path||"/api/batch"===a.path||a.path===e){let t=a.path===e?a.jsonBody:a.jsonBody[e],r={iconUrl:null,dynamicIconUrl:null,isSign:!1,isSignIap:!1,isSignDeduct:!1,isSignIapDeduct:!1};if(t&&(0===w.length||w.includes(t.data.userId)))try{let i=(t.data.now||new Date().getTime())+316224e5;t.data.redVipLevel=7,t.data.redVipAnnualCount=1,t.data.musicPackage={...r,...t.data.musicPackage,vipCode:230,vipLevel:7,expireTime:i},t.data.associator={...r,...t.data.associator,vipCode:100,vipLevel:7,expireTime:i},v&&(t.data.redplus={...r,...t.data.redplus,vipCode:300,vipLevel:7,expireTime:i},t.data.albumVip={...r,...t.data.albumVip,vipCode:400,vipLevel:0,expireTime:i}),a.path===e?a.jsonBody=t:a.jsonBody[e]=t}catch(e){d.debug({err:e},"Unable to apply the local VIP.")}}}if(new Set([401,512]).has(a.jsonBody.code)&&!a.web){if(a.path.includes("manipulate"))return O(e);else if("/api/song/like"===a.path)return k(e)}else if(a.path.includes("url"))return j(e);else if(a.path.includes("/usertool/sound/"))return T(a.jsonBody);else if(a.path.includes("batch"))for(let e in a.jsonBody)e.includes("/usertool/sound/")&&T(a.jsonBody[e]);else if(a.path.includes("/vipauth/app/auth/query"))return R(a.jsonBody)}).then(()=>{["transfer-encoding","content-encoding","content-length"].filter(e=>e in r.headers).forEach(e=>delete r.headers[e]);let e=JSON.stringify(a.jsonBody,(e,t)=>("object"==typeof t&&null!=t&&("cp"in t&&(t.cp=1),"fee"in t&&(t.fee=0),"downloadMaxbr"in t&&0===t.downloadMaxbr&&(t.downloadMaxbr=32e4),"dl"in t&&"downloadMaxbr"in t&&t.dle&&d.error(e,`A error occurred in hook.request.after when hooking ${t.url}.`));if(c)if(new Set([201,301,302,303,307,308]).has(r.statusCode))return s(t.method,i(t.url).resolve(r.headers.location),t.headers).then(t=>e.proxyRes=t);else/p\d+c*\.music\.126\.net/.test(t.url)&&(r.headers["content-type"]="audio/*")},_.connect.before=e=>{let{req:t}=e,r=i("https://"+t.url);[r.hostname,t.headers.host].some(e=>_.target.host.has(e))?80===parseInt(r.port)?(t.url=`${global.address||"localhost"}:${global.port[0]}`,t.local=!0):global.port[1]?(t.url=`${global.address||"localhost"}:${global.port[1]}`,t.local=!0):e.decision="blank":r.href.includes(global.endpoint)&&(e.decision="proxy")},_.negotiate.before=e=>{let{req:t,socket:r,decision:o}=e,s=i("https://"+t.url),a=_.target.host;t.local||o||a.has(r.sni)&&!a.has(s.hostname)&&(a.add(s.hostname),e.decision="blank")};let x=e=>{let t,{req:r,netease:i}=e,s="http://music.163.com/api/song/enhance/player/url",{id:a,br:c,e_r:u,header:l}=i.param;switch(i.crypto){case"linuxapi":i.param={ids:`["${a}"]`,br:c},t=o.linuxapi.encryptRequest(s,i.param);break;case"eapi":case"api":i.param={ids:`["${a}"]`,br:c,e_r:u,header:l},"eapi"==i.crypto?t=o.eapi.encryptRequest(s,i.param):"api"==i.crypto&&(t=o.api.encryptRequest(s,i.param))}r.url=t.url,r.body=t.body+i.pad},E=e=>{let t,{req:r,netease:i}=e,s="http://music.163.com/api/song/enhance/player/url/v1",{id:a,level:c,immerseType:u,e_r:l,header:f}=i.param;switch(i.crypto){case"linuxapi":i.param={ids:`["${a}"]`,level:c,encodeType:"flac",immerseType:u},t=o.linuxapi.encryptRequest(s,i.param);break;case"eapi":case"api":i.param={ids:`["${a}"]`,level:c,encodeType:"flac",immerseType:u,e_r:l,header:f},"eapi"==i.crypto?t=o.eapi.encryptRequest(s,i.param):"api"==i.crypto&&(t=o.api.encryptRequest(s,i.param))}r.url=t.url,r.body=t.body+i.pad},O=e=>{let{req:t,netease:r}=e,{trackIds:i,pid:o,op:a}=r.param,c=(Array.isArray(i)?i:JSON.parse(i))[0];return s("POST","http://music.163.com/api/playlist/manipulate/tracks",t.headers,`trackIds=[${c},${c}]&pid=${o}&op=${a}`).then(e=>e.json()).then(e=>{r.jsonBody=e}).catch(e=>e&&d.error(e))},k=e=>{let{req:t,netease:r}=e,{trackId:i}=r.param,o=0,a=0;return s("GET","http://music.163.com/api/v1/user/info",t.headers).then(e=>e.json()).then(e=>(a=e.userPoint.userId,s("GET",`http://music.163.com/api/user/playlist?uid=${a}&limit=1`,t.headers).then(e=>e.json()))).then(e=>(o=e.playlist[0].id,s("POST","http://music.163.com/api/playlist/manipulate/tracks",t.headers,`trackIds=[${i},${i}]&pid=${o}&op=add`).then(e=>e.json()))).then(e=>{new Set([200,502]).has(e.code)&&(r.jsonBody={code:200,playlistId:o})}).catch(e=>e&&d.error(e))},j=e=>{let t,{req:r,netease:i}=e,{jsonBody:u}=i,l=Number(process.env.MIN_BR)||0,f=0,p=e=>{if(e.flag=0,(200!==e.code||e.freeTrialInfo||e.br{let s="";try{let{header:e}=i.param;e="string"==typeof e?JSON.parse(e):e;let t=c.parse(r.headers.cookie.replace(/\s/g,""),";");s=e.os||t.os}catch(e){}return e.type=999e3===t.br?"flac":"mp3","pc"===s||"uwp"===s?e.url=global.endpoint?`${global.endpoint.replace("https://","http://")}/package/${o.base64.encode(t.url)}/${e.id}.${e.type}`:t.url:e.url=global.endpoint?`${global.endpoint}/package/${o.base64.encode(t.url)}/${e.id}.${e.type}`:t.url,e.md5=t.md5||o.md5.digest(t.url),e.br=t.br||128e3,e.size=t.size,e.code=200,e.freeTrialInfo=null,t}).then(t=>{if(!i.path.includes("download")||t.md5)return;let a={android:"0.0.0",osx:"0.0.0"},u={key:t.url.replace(/\?.*$/,"").replace(/(?<=kugou\.com\/)\w+\/\w+\//,"").replace(/(?<=kuwo\.cn\/)\w+\/\w+\/resource\//,""),url:t.url};try{var l;let t,{header:f}=i.param;f="string"==typeof f?JSON.parse(f):f;let p=c.parse(r.headers.cookie.replace(/\s/g,""),";"),h=f.os||p.os,d=f.appver||p.appver;if(h in a&&(l=a[h],!(t=Array.from([l,d]).map(e=>e.split(".").slice(0,3).map(e=>parseInt(e)||0)).reduce((e,t)=>e.length?e.map((e,r)=>e.concat(t[r])):t.map(e=>[e]),[]).filter(e=>e[0]!==e[1])[0])||t[0]<=t[1]))return y.cache(u,()=>s("GET",u.url).then(e=>o.md5.pipe(e))).then(t=>e.md5=t)}catch(e){}}).catch(e=>e&&d.error(e));200===e.code&&i.web&&(e.url=e.url.replace(/(m\d+?)(?!c)\.music\.126\.net/,"$1c.music.126.net"))};return Array.isArray(u.data)?i.path.includes("download")?(u.data=u.data[0],t=[p(u.data)]):(f=i.web?0:parseInt(((Array.isArray(i.param.ids)?i.param.ids:JSON.parse(i.param.ids))[0]||0).toString().replace("_0","")),t=u.data.map(e=>p(e))):t=[p(u.data)],Promise.all(t).catch(e=>e&&d.error(e))},T=e=>{d.debug("unblockSoundEffects() has been triggered.");let{data:t,code:r}=e;200===r&&(Array.isArray(t)?t.map(e=>{e.type&&(e.type=1)}):t.type&&(t.type=1))},R=e=>{d.debug("unblockLyricsEffects() has been triggered.");let{data:t,code:r}=e;200===r&&Array.isArray(t)&&t.forEach(e=>{"canUse"in e&&(e.canUse=!0),"canNotUseReasonCode"in e&&(e.canNotUseReasonCode=200)})};e.exports=_},6239(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(594),r(8308),r(6815);let i=e=>{let t=BigInt(e);return{low:Number(t),valueOf:()=>t.valueOf(),toString:()=>t.toString(),not:()=>i(~t),isNegative:()=>t<0,or:e=>i(t|BigInt(e)),and:e=>i(t&BigInt(e)),xor:e=>i(t^BigInt(e)),equals:e=>t===BigInt(e),multiply:e=>i(t*BigInt(e)),shiftLeft:e=>i(t<i(t>>BigInt(e))}},o=e=>Array.from(Array(e).keys()),s=(...e)=>e.map(e=>-1===e?i(-1):i(e)),a=s(31,0,1,2,3,4,-1,-1,3,4,5,6,7,8,-1,-1,7,8,9,10,11,12,-1,-1,11,12,13,14,15,16,-1,-1,15,16,17,18,19,20,-1,-1,19,20,21,22,23,24,-1,-1,23,24,25,26,27,28,-1,-1,27,28,29,30,31,30,-1,-1),c=s(57,49,41,33,25,17,9,1,59,51,43,35,27,19,11,3,61,53,45,37,29,21,13,5,63,55,47,39,31,23,15,7,56,48,40,32,24,16,8,0,58,50,42,34,26,18,10,2,60,52,44,36,28,20,12,4,62,54,46,38,30,22,14,6),u=s(39,7,47,15,55,23,63,31,38,6,46,14,54,22,62,30,37,5,45,13,53,21,61,29,36,4,44,12,52,20,60,28,35,3,43,11,51,19,59,27,34,2,42,10,50,18,58,26,33,1,41,9,49,17,57,25,32,0,40,8,48,16,56,24),l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1],f=s(0,1048577,3145731),p=o(64).map(e=>Array(e).fill(null).reduce(e=>e.multiply(2),i(1)));p[p.length-1]=p[p.length-1].multiply(-1);let h=s(15,6,19,20,28,11,27,16,0,14,22,25,4,17,30,9,1,7,23,13,31,26,2,8,18,12,29,5,21,10,3,24),d=s(56,48,40,32,24,16,8,0,57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,60,52,44,36,28,20,12,4,27,19,11,3),y=s(13,16,10,23,0,4,-1,-1,2,27,14,5,20,9,-1,-1,22,18,11,3,25,7,-1,-1,15,6,26,19,12,1,-1,-1,40,51,30,36,46,54,-1,-1,29,39,50,44,32,47,-1,-1,43,48,38,55,33,52,-1,-1,45,41,49,35,28,31,-1,-1),g=[[14,4,3,15,2,13,5,3,13,14,6,9,11,2,0,5,4,1,10,12,15,6,9,10,1,8,12,7,8,11,7,0,0,15,10,5,14,4,9,10,7,8,12,3,13,1,3,6,15,12,6,11,2,9,5,0,4,2,11,14,1,7,8,13],[15,0,9,5,6,10,12,9,8,7,2,12,3,13,5,2,1,14,7,8,11,4,0,3,14,11,13,6,4,1,10,15,3,13,12,11,15,3,6,0,4,10,1,7,8,4,11,14,13,8,0,6,2,15,9,5,7,1,10,12,14,2,5,9],[10,13,1,11,6,8,11,5,9,4,12,2,15,3,2,14,0,6,13,1,3,15,4,10,14,9,7,12,5,0,8,7,13,1,2,4,3,6,12,11,0,13,5,14,6,8,15,2,7,10,8,15,4,9,11,5,9,0,14,3,10,7,1,12],[7,10,1,15,0,12,11,5,14,9,8,3,9,7,4,8,13,6,2,1,6,11,12,2,3,0,5,14,10,13,15,4,13,3,4,9,6,10,1,12,11,0,2,5,0,13,14,2,8,15,7,4,15,1,10,7,5,6,12,11,3,8,9,14],[2,4,8,15,7,10,13,6,4,1,3,12,11,7,14,0,12,2,5,9,10,13,0,3,1,11,15,5,6,8,9,14,14,11,5,6,4,1,3,10,2,12,15,0,13,2,8,5,11,8,0,15,7,14,9,4,12,7,10,9,1,13,6,3],[12,9,0,7,9,2,14,1,10,15,3,4,6,12,5,11,1,14,13,0,2,8,7,13,15,5,4,10,8,3,11,6,10,4,6,11,7,9,0,6,4,2,13,1,9,15,3,8,15,3,1,14,12,5,11,0,2,12,14,7,5,10,8,13],[4,1,3,10,15,12,5,0,2,11,9,6,8,7,6,9,11,4,12,15,0,3,10,5,14,13,7,8,13,14,1,2,13,6,14,9,4,1,2,14,11,13,5,0,1,10,8,3,0,11,3,5,9,4,15,2,7,8,12,15,10,7,6,12],[13,7,10,0,6,9,5,15,8,4,3,10,11,14,12,5,2,11,9,6,15,12,0,3,4,1,14,13,1,2,7,8,1,2,12,15,10,4,0,3,13,14,6,9,7,8,9,6,15,1,5,12,3,10,14,5,8,7,11,0,4,13,2,11]],m=(e,t,r)=>{let s=i(0);return o(t).forEach(t=>{e[t].isNegative()||r.and(p[e[t].low]).equals(0)||(s=s.or(p[t]))}),s},b=(e,t)=>{let r=o(8).map(()=>i(0)),s=[i(0),i(0)],l=i(0),f=i(0),p=m(c,64,t);return s[0]=p.and(0xffffffff),s[1]=p.and(-0x100000000).shiftRight(32),o(16).forEach(t=>{let c=i(0);f=(f=m(a,64,f=i(s[1]))).xor(e[t]),o(8).forEach(e=>{r[e]=f.shiftRight(8*e).and(255)}),o(8).reverse().forEach(e=>{c=c.shiftLeft(4).or(g[e][r[e]])}),f=m(h,32,c),l=i(s[0]),s[0]=i(s[1]),s[1]=l.xor(f)}),s.reverse(),p=m(u,64,p=s[1].shiftLeft(32).and(-0x100000000).or(s[0].and(0xffffffff)))},v=(e,t,r)=>{let s,a=i(0);o(8).forEach(e=>{a=i(t[e]).shiftLeft(8*e).or(a)});let c=Math.floor(e.length/8),u=o(16).map(()=>i(0));s=m(d,56,a),o(16).forEach(e=>{s=s.and(f[l[e]]).shiftLeft(28-l[e]).or(s.and(f[l[e]].not()).shiftRight(l[e])),u[e]=m(y,64,s)}),1===r&&o(8).forEach(e=>{[u[e],u[15-e]]=[u[15-e],u[e]]});let p=o(c).map(()=>i(0));o(c).forEach(t=>{o(8).forEach(r=>{p[t]=i(e[r+8*t]).shiftLeft(8*r).or(p[t])})});let h=o(Math.floor((1+8*(c+1))/8)).map(()=>i(0));o(c).forEach(e=>{h[e]=b(u,p[e])});let g=e.slice(8*c),v=i(0);o(e.length%8).forEach(e=>{v=i(g[e]).shiftLeft(8*e).or(v)}),(g.length||0===r)&&(h[c]=b(u,v));let w=o(8*h.length).map(()=>0),_=0;return h.forEach(e=>{o(8).forEach(t=>{w[_]=e.shiftRight(8*t).and(255).low,_+=1})}),Buffer.from(w)},w=Buffer.from("ylzsxkwm"),_=e=>v(e,w,0);e.exports={encrypt:_,decrypt:e=>v(e,w,1),encryptQuery:e=>_(Buffer.from(e)).toString("base64")}},9309(e,t,r){"use strict";var i;let o=r(2306),s=process.env.LOG_FILE,a=process.stdout.isTTY,c=o({level:null!=(i=process.env.LOG_LEVEL)?i:"info",prettyPrint:"true"!==process.env.JSON_LOG&&{colorize:a,messageFormat:a?"\x1b[1m\x1b[32m({scope})\x1b[0m\x1b[36m {msg}":"({scope}) {msg}",ignore:"time,pid,hostname,scope",errorProps:"*"}},s&&o.destination(s));e.exports={logger:c,logScope:function(e){return c.child({scope:e})}}},3371(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308);let{cacheStorage:i,CacheStorageGroup:o,getManagedCacheStorage:s}=r(755),a=r(4473),c=r(9147),u=r(9904),l=e=>({id:e.id,name:e.title,artists:{id:e.mid,name:e.author}}),f=e=>u("GET","https://www.bilibili.com/audio/music-service-c/web/url?rivilege=2&quality=2&sid="+e).then(e=>e.json()).then(e=>0===e.code?e.data.cdns[0].replace("https","http"):Promise.reject()).catch(()=>a().bilibili.track(e)),p=s("provider/bilibili");e.exports={check:e=>p.cache(e,()=>u("GET",`https://api.bilibili.com/audio/music-service-c/s?search_type=music&page=1&pagesize=30&keyword=${encodeURIComponent(e.keyword)}`).then(e=>e.json()).then(t=>{let r=c(t.data.result.map(l),e);return r?r.id:Promise.reject()})).then(f),track:f}},8754(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308);let{cacheStorage:i,CacheStorageGroup:o,getManagedCacheStorage:s}=r(755),a=r(4473),c=r(9147),u=r(9904),l=r(7312),{logScope:f}=r(9309);f("provider/bilivideo");let p=s("provider/bilivideo"),h=[46,47,18,2,53,8,23,32,15,50,10,31,58,3,45,35,27,43,5,49,33,9,42,19,29,28,14,39,12,38,41,13,37,48,7,16,24,55,40,61,26,17,0,1,60,51,30,4,22,25,54,21,56,59,6,63,57,62,11,36,20,34,44,52];async function d(){let e=await u("GET","https://api.bilibili.com/x/web-interface/nav",{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3",Referer:"https://www.bilibili.com/"}),{data:{wbi_img:{img_url:t,sub_url:r}}}=await e.json();return{img_key:t.slice(t.lastIndexOf("/")+1,t.lastIndexOf(".")),sub_key:r.slice(r.lastIndexOf("/")+1,r.lastIndexOf("."))}}let y=async e=>{let t,r,i,o,s,a,{img_key:c,sub_key:u}=await p.cache("wbikey",async()=>await d());return t=c+u,r=h.map(e=>t[e]).join("").slice(0,32),i=Math.round(Date.now()/1e3),o=/[!'()*]/g,Object.assign(e,{wts:i}),s=Object.keys(e).sort().map(t=>{let r=e[t].toString().replace(o,"");return`${encodeURIComponent(t)}=${encodeURIComponent(r)}`}).join("&"),a=l.md5.digest(s+r),s+"&w_rid="+a},g=e=>({id:e.bvid,name:e.title,artists:{id:e.typeid,name:e.typename}}),m=async()=>p.cache("bilicookie",()=>u("GET","https://www.bilibili.com").then(e=>e.headers["set-cookie"].map(e=>e.split(";")[0]).join("; "))),b=e=>y({bvid:e}).then(t=>u("GET","https://api.bilibili.com/x/web-interface/wbi/view?"+t).then(e=>e.json()).then(t=>0===t.code?y({bvid:e,cid:t.data.cid,fnval:16,platform:"pc"}).then(t=>u("GET","https://api.bilibili.com/x/player/wbi/playurl?"+t).then(e=>e.json()).then(e=>0!==e.code?Promise.reject():null!=e.data.dash.audio?e.data.dash.audio[0].base_url:Promise.reject()).catch(()=>a().bilibili.track(e))):Promise.reject()).catch(()=>a().bilibili.track(e)));e.exports={check:e=>p.cache(e,()=>m().then(t=>y({search_type:"video",keyword:e.keyword}).then(r=>u("GET","https://api.bilibili.com/x/web-interface/wbi/search/type?"+r,{cookie:t,referer:"https://search.bilibili.com"}).then(e=>e.json()).then(t=>{let r=c(t.data.result.map(g),e);return r?r.id:Promise.reject()})))).then(b),track:b}},2148(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308),r(3409),r(2972),r(6567);let i=r(4473),o=r(9147),s=r(7312),a=r(9904),{getManagedCacheStorage:c}=r(755),{logScope:u}=r(9309),l=u("provider/bodian"),f=(Math.floor(Math.random()*(1e11+1))+0).toString(),p=e=>({id:e.MUSICRID.split("_").pop(),name:e.SONGNAME,duration:1e3*e.DURATION,album:{id:e.ALBUMID,name:e.ALBUM},artists:e.ARTIST.split("&").map((t,r)=>({id:r?null:e.ARTISTID,name:t}))}),h=e=>{var t;let r,c,u,p,h,d={"user-agent":"Dart/2.19 (dart:io)",plat:"ar",channel:"aliopen",devid:f,ver:"3.9.0",host:"bd-api.kuwo.cn","X-Forwarded-For":"1.0.1.114"},y=`http://bd-api.kuwo.cn/api/play/music/v2/audioUrl?&br=${o.ENABLE_FLAC?"2000kflac":"320kmp3"}&musicId=${e}`;return r=new URL(t=y),c=Date.now(),u=(t+=`×tamp=${c}`).substring(t.indexOf("?")+1).replace(/[^a-zA-Z0-9]/g,"").split("").sort(),p=`kuwotest${u.join("")}${r.pathname}`,h=s.md5.digest(p),y=`${t}&sign=${h}`,a("POST","http://bd-api.kuwo.cn/api/service/advert/watch?uid=-1&token=×tamp=1724306124436&sign=15a676d66285117ad714e8c8371691da",{"user-agent":"Dart/2.19 (dart:io)",plat:"ar",channel:"aliopen",devid:f,ver:"3.9.0",host:"bd-api.kuwo.cn",qimei36:"1e9970cbcdc20a031dee9f37100017e1840e","content-type":"application/json; charset=utf-8"},JSON.stringify({type:5,subType:5,musicId:0,adToken:""})).then(e=>e.body()).then(e=>l.debug(`bodian ad free response: ${e}`)).then(()=>a("GET",y,d).then(e=>e.json()).then(e=>e&&200===e.code&&"object"==typeof e.data&&e.data.audioUrl||Promise.reject()).catch(()=>i().bodian.track(e)))},d=c("provider/bodian");e.exports={check:e=>d.cache(e,()=>a("GET","http://search.kuwo.cn/r.s?&correct=1&vipver=1&stype=comprehensive&encoding=utf8&rformat=json&mobi=1&show_copyright_off=1&searchapi=6&all="+encodeURIComponent(e.keyword.replace(" - "," "))).then(e=>e.json()).then(t=>{if(!t||t.content.length<2||!t.content[1].musicpage||t.content[1].musicpage.abslist.length<1)return Promise.reject();let r=o(t.content[1].musicpage.abslist.map(p),e);return r?r.id:Promise.reject()})).then(h),track:h}},6980(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(594),r(4472),r(7924),r(8308);let i=r(9904),{getManagedCacheStorage:o}=r(755),s=(e,t)=>Object.keys(e).reduce((r,i)=>Object.assign(r,t.includes(i)&&{[i]:e[i]}),{}),a=e=>{try{var t,r;let i,o=s(e,["id","name","alias","duration"]);if(o.name=(o.name||"").replace(/(\s*cover[::\s][^)]+)/i,"").replace(/\(\s*cover[::\s][^)]+\)/i,"").replace(/(\s*翻自[::\s][^)]+)/,"").replace(/\(\s*翻自[::\s][^)]+\)/,""),o.album=s(e.album,["id","name"]),o.artists=e.artists.map(e=>s(e,["id","name"])),o.keyword=o.name+" - "+(i=[(t=o.artists.map(e=>e.name))[0]],t.slice(1).some(e=>i.reduce((e,t)=>e+t.length,0)>15||(i.push(e),!1)),i).join(" / "),"true"===process.env.SEARCH_ALBUM){let e=null==(r=o.album)?void 0:r.name;e&&e!==o.name&&(o.keyword+=` ${e}`)}return o}catch(e){return console.log("getFormatData err: ",e),{}}},c=(e,t)=>{if(!t)return i("GET","https://music.163.com/api/song/detail?ids=["+e+"]").then(e=>e.json()).then(e=>{if(e&&e.songs&&e.songs.length){let t=a(e.songs[0]);return t.name?t:Promise.reject()}return Promise.reject()});{let e=a(t);return e.name?Promise.resolve(e):Promise.reject()}},u=o("provider/find");e.exports=(e,t)=>t?c(e,t):u.cache(e,()=>c(e))},4473(e,t,r){"use strict";let i=r(9904);e.exports=()=>{let t=global.cnrelay,r=new Proxy(()=>{},{get:(e,t)=>(e.route=(e.route||[]).concat(t),r),apply:(r,o,s)=>{if(e.exports.disable||!t)return Promise.reject();let a=r.route.join("/"),c="object"==typeof s[0]?JSON.stringify(s[0]):s[0];return i("GET",`${t}/${a}?${encodeURIComponent(c)}`).then(e=>e.body())}});return r}},5564(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308),r(4825),r(8074),r(9451);let i=r(4473),o=r(9147),s=r(9904),{getManagedCacheStorage:a}=r(755),c={origin:"http://www.joox.com",referer:"http://www.joox.com",cookie:process.env.JOOX_COOKIE||"wmid=142420656; user_type=1; country=hk; session_key=2a5d97d05dc8fe238150184eaf3519ad; uid=142420656; backendCountry=hk"},u=e=>({id:e.id,name:e.name||"",duration:1e3*(parseInt(e.playtime)||0),album:{id:e.album_id,name:e.album_name||""},artists:(e.artist_list||[]).map(({id:e,name:t})=>({id:e,name:t||""}))}),l=e=>s("GET","https://api.joox.com/web-fcgi-bin/web_get_songinfo?songid="+e+"&country=hk&lang=zh_TW&from_type=-1&channel_id=-1&_="+new Date().getTime(),c).then(e=>e.body()).then(e=>{let t=JSON.parse(e.replace(/^MusicInfoCallback\(/,"").replace(/\);?$/,"")),r=["master_tapeUrl","master_tapeURL","master_tape_url","hiresUrl","hiresURL","hires_url","flacUrl","flacURL","flac_url","r320Url","r192Url","mp3Url","m4aUrl"].map(e=>t[e]).find(e=>e&&String(e).startsWith("http"));return r||Promise.reject()}).catch(()=>i().joox.track(e)),f=a("provider/joox");e.exports={check:e=>f.cache(e,()=>s("GET","https://cache.api.joox.com/openjoox/v2/search_type?country=hk&lang=zh_TW&key="+encodeURIComponent(/[\u0800-\u4e00]/.test(e.name)?e.name:e.keyword)+"&type=0",c).then(e=>e.body()).then(t=>{let r=o((JSON.parse(t).tracks||[]).map(e=>Array.isArray(e)?e[0]:e).filter(Boolean).map(u),e);return r?r.id:Promise.reject()})).then(l),track:l}},434(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308),r(9451);let i=r(4473),o=r(9147),s=r(7312),a=r(9904),{getManagedCacheStorage:c}=r(755),u=e=>({id:e.hash,id_hq:e["320hash"],id_sq:e.sqhash,name:e.songname,duration:1e3*e.duration,album:{id:e.album_id,name:e.album_name}}),l=e=>a("GET","http://mobilecdn.kugou.com/api/v3/search/song?keyword="+encodeURIComponent(e.keyword)+"&page=1&pagesize=10").then(e=>e.json()).then(t=>o(t.data.info.map(u),e)||Promise.reject()).catch(()=>i().kugou.search(e)),f=e=>Promise.all(["sqhash","hqhash","hash"].slice(+!o.ENABLE_FLAC).map(t=>{let r;return(r=()=>{switch(t){case"hash":return e.id;case"hqhash":return e.id_hq;case"sqhash":return e.id_sq}return""},a("GET","http://trackercdn.kugou.com/i/v2/?key="+s.md5.digest(`${r()}kgcloudv2`)+"&hash="+r()+"&appid=1005&pid=2&cmd=25&behavior=play&album_id="+e.album.id).then(e=>e.json()).then(e=>e.url[0]||Promise.reject())).catch(()=>null)})).then(e=>e.find(e=>e)||Promise.reject()).catch(()=>i().kugou.track(e)),p=c("provider/kugou");e.exports={check:e=>p.cache(e,()=>l(e)).then(f),search:l}},4449(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308);let i=r(4473),o=r(9147),s=r(7312),a=r(9904),{getManagedCacheStorage:c}=r(755),u=e=>({id:e.MUSICRID.split("_").pop(),name:e.SONGNAME,duration:1e3*e.DURATION,album:{id:e.ALBUMID,name:e.ALBUM},artists:e.ARTIST.split("&").map((t,r)=>({id:r?null:e.ARTISTID,name:t}))}),l=e=>a("GET",s.kuwoapi?"http://mobi.kuwo.cn/mobi.s?f=kuwo&q="+s.kuwoapi.encryptQuery("user=0&corp=kuwo&source=kwplayer_ar_5.1.0.0_B_jiakong_vh.apk&p2p=1&type=convert_url2&sig=0&format="+["flac","mp3"].slice(+!o.ENABLE_FLAC).join("|")+"&rid="+e):"http://antiserver.kuwo.cn/anti.s?type=convert_url&format=mp3&response=url&rid=MUSIC_"+e,{"user-agent":"okhttp/3.10.0"}).then(e=>e.body()).then(e=>(e.match(/http[^\s$"]+/)||[])[0]||Promise.reject()).catch(()=>i().kuwo.track(e)),f=c("provider/kuwo");e.exports={check:e=>f.cache(e,()=>a("GET","http://search.kuwo.cn/r.s?&correct=1&vipver=1&stype=comprehensive&encoding=utf8&rformat=json&mobi=1&show_copyright_off=1&searchapi=6&all="+encodeURIComponent(e.keyword.replace(" - "," "))).then(e=>e.json()).then(t=>{if(!t||t.content.length<2||!t.content[1].musicpage||t.content[1].musicpage.abslist.length<1)return Promise.reject();let r=o(t.content[1].musicpage.abslist.map(u),e);return r?r.id:Promise.reject()})).then(l),track:l}},9102(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(7407),r(2997),r(7615),r(5720),r(7729),r(8679),r(1559),r(9109),r(1475),r(8625),r(7480),r(2296),r(158),r(6911),r(9014),r(8074),r(3761),r(8308),r(594),r(4161),r(3568),r(6815);let i=r(6980),o=r(9904),{PROVIDERS:s,DEFAULT_SOURCE:a}=r(2413),{isHostWrapper:c}=r(8010),u=r(3947),l=r(988),f=r(7798),{logScope:p}=r(9309),h=r(1658),d=p("provider/match"),y=new Map([["bilivideo.com","https://www.bilibili.com/"],["upos-hz-mirrorakam.akamaized.net","https://www.bilibili.com/"]]);async function g(e,t){d.debug({source:e,info:t},"Getting the audio...");let r=await s[e].check(t);if(!r)throw new u(e);let i=await m(r);if(d.debug(i,"The matched song is:"),!i||"string"!=typeof i.url)throw new f("song is undefined, or song.url is not a string.");return d.debug({source:e,info:t},"The audio matched!"),{...i,source:e}}async function m(e){let t,r=c(e),i={size:0,br:null,url:null,md5:null},s={range:"bytes=0-8191","accept-encoding":"identity"};y.forEach((e,t)=>{r(t)&&(s.referer=e)});let a=await o("GET",e,s),{headers:u}=a;if(!((t=a.statusCode)>=200&&t<=299))throw new l(e,a.statusCode);i.url=a.url.href;let f=await a.body(!0);try{let e=function(e){let t={3:{3:["free",32,64,96,128,160,192,224,256,288,320,352,384,416,448,"bad"],2:["free",32,48,56,64,80,96,112,128,160,192,224,256,320,384,"bad"],1:["free",32,40,48,56,64,80,96,112,128,160,192,224,256,320,"bad"]},2:{3:["free",32,48,56,64,80,96,112,128,144,160,176,192,224,256,"bad"],2:["free",8,16,24,32,40,48,56,64,80,96,112,128,144,160,"bad"]}};t[2][1]=t[2][2],t[0]=t[2];let r=0;if("fLaC"===e.slice(0,4).toString())return 999;"ID3"===e.slice(0,3).toString()&&(r=6,r=10+e.slice(r,r+4).reduce((e,t,r)=>e+(127&t)<<7*(3-r),0));let i=e.slice(r,r+4);if(4===i.length&&255===i[0]&&(i[1]>>5&7)==7&&(i[1]>>1&3)!=0&&(i[2]>>4&15)!=15&&(i[2]>>2&3)!=3){let e=i[1]>>3&3,r=i[1]>>1&3,o=i[2]>>4;return t[e][r][o]}}(f);i.br=e&&!isNaN(e)?1e3*e:null}catch(e){d.debug(e,"Failed to decode and extract the bitrate")}if(!i.br){if(r("qq.com")&&i.url.includes(".m4a")&&(i.br=96e3),r("bilivideo.com")&&i.url.includes(".m4a")){let e=parseInt(i.url.match(/-(\d+)k\.m4a/));isNaN(e)||e<96||e>999?e=192e3:e*=1e3,i.br=e}r("googlevideo.com")&&(i.br=128e3)}return u&&(r("126.net")&&(i.md5=i.url.split("/").slice(-1)[0].replace(/\..*/g,"")),r("qq.com")&&(i.md5=u["server-md5"]),i.size=parseInt((u["content-range"]||"").split("/").pop()||u["content-length"])||0,"8192"!==u["content-length"])?Promise.reject():i}e.exports=async function e(e,t,r){let o=(t||global.source||a).filter(e=>e in s),c=await i(e,r),l=null;if(process.env.SELECT_MAX_BR){let e=await Promise.allSettled(o.map(async e=>g(e,c).catch(e=>{throw e&&(e instanceof h?d.debug(e):d.error(e)),e})));if(0===(e=e.filter(e=>"fulfilled"===e.status)).length)throw new u("any source");l=(e=e.map(e=>e.value)).reduce((e,t)=>e.br>=t.br?e:t)}else if(process.env.FOLLOW_SOURCE_ORDER){for(let e=0;eg(e,c).catch(e=>{throw e&&(e instanceof h?d.debug(e):d.error(e)),e})));let{id:f,name:p}=c,{url:y}=l;return d.debug({audioInfo:c,audioData:l},"The data to replace:"),d.info({audioId:f,songName:p,url:y},`Replaced: [${f}] ${p}`),l}},1573(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308),r(9451);let i=r(4473),o=r(9147),s=r(9904),{getManagedCacheStorage:a}=r(755),c={origin:"http://music.migu.cn/",referer:"http://m.music.migu.cn/v3/",aversionid:process.env.MIGU_COOKIE||null,channel:"0146921"},u=e=>{let t=e.singerId.split(/\s*,\s*/),r=e.singerName.split(/\s*,\s*/);return{id:e.id,name:e.title,album:{id:e.albumId,name:e.albumName},artists:t.map((e,t)=>({id:e,name:r[t]}))}},l=e=>Promise.all(["ZQ24","SQ","HQ","PQ"].slice(2*!o.ENABLE_FLAC).map(t=>{let r;return s("GET",r="https://app.c.nf.migu.cn/MIGUM2.0/strategy/listen-url/v2.4?netType=01&resourceType=2&songId="+e.toString()+"&toneFlag="+t,c).then(e=>e.json()).then(e=>{let{audioFormatType:i}=e.data;return i!==t?Promise.reject():r?e.data.url:Promise.reject()}).catch(()=>null)})).then(e=>e.find(e=>e)||Promise.reject()).catch(()=>i().migu.track(e)),f=a("provider/migu");e.exports={check:e=>f.cache(e,()=>s("GET","https://m.music.migu.cn/migu/remoting/scr_search_tag?keyword="+encodeURIComponent(e.keyword)+"&type=2&rows=20&pgc=1",c).then(e=>e.json()).then(t=>{let r=o(((t||{}).musics||[]).map(u),e);return r?r.id:Promise.reject()})).then(l),track:l}},4482(e,t,r){"use strict";let i=r(9147),o=r(9904),{getManagedCacheStorage:s}=r(755),a=s("provider/pyncmd");e.exports={check:e=>a.cache(e,()=>o("GET","https://music-api.gdstudio.xyz/api.php?types=url&source=netease&id="+e.id+"&br="+["999","320"].slice(+!i.ENABLE_FLAC,i.ENABLE_FLAC?1:2)).then(e=>e.json()).then(e=>e&&"object"==typeof e&&!1 in e?Promise.reject():e.br>0?e.url:Promise.reject()))}},8469(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308),r(9451);let i=r(4473),o=r(9147),s=r(9904),{getManagedCacheStorage:a}=r(755),c=process.env.NEW_QQ_COOKIE||process.env.QQ_COOKIE,u={origin:"http://y.qq.com/",referer:"http://y.qq.com/",cookie:c||null},l=e=>({id:{song:e.mid,file:e.mid},name:e.name,duration:1e3*e.interval,album:{id:e.album.mid,name:e.album.name},artists:e.singer.map(({mid:e,name:t})=>({id:e,name:t}))}),f=e=>(e.key=e.file,Promise.all([["F000",".flac"],["M800",".mp3"],["M500",".mp3"],[null,null]].slice(u.cookie||"u">typeof window?+!o.ENABLE_FLAC:2).map(t=>{let r;return(r=((u.cookie||"").match(/uin=(\d+)/)||[])[1]||"0",s("GET","https://u.y.qq.com/cgi-bin/musicu.fcg?data="+encodeURIComponent(JSON.stringify({req_0:{module:"vkey.GetVkeyServer",method:"CgiGetVkey",param:{guid:(1e7*Math.random()).toFixed(0),loginflag:1,filename:t[0]?[t.join(e.file)]:null,songmid:[e.song],songtype:[0],uin:r,platform:"20"}}})),u).then(e=>e.json()).then(e=>{let{sip:t,midurlinfo:r}=e.req_0.data;if(!r[0].purl)return Promise.reject();let i=t[0]+r[0].purl;return s("GET",i,{range:"bytes=0-8191","accept-encoding":"identity"}).then(e=>e.statusCode<200||e.statusCode>299?Promise.reject():i)})).catch(()=>null)})).then(e=>e.find(e=>e)||Promise.reject()).catch(()=>i().qq.track(e))),p=a("provider/qq");e.exports={check:e=>{let t,r,i,a=Math.floor(Date.now()/1e3),h=((c||"").match(/musickey_createtime=(\d+)/)||[])[1]||"",d=parseInt(h,10)+259200;return h&&d-a<600&&(t=(c.match(/qqrefresh_token=([^;]*)/)||[])[1]||"",r=(c.match(/qqmusic_key=([^;]*)/)||[])[1]||"",i=parseInt((c.match(/uin=(\d+)/)||[])[1]||0,10),s("POST","https://u.y.qq.com/cgi-bin/musicu.fcg",{Cookie:c,"Content-Type":"application/json"},JSON.stringify({req:{module:"music.login.LoginServer",method:"Login",param:{refresh_token:t,musickey:r,musicid:i}}})).then(e=>e.json()).then(e=>{var t;let r=(null==(t=e.req)?void 0:t.data)||{},i=r.musickey,o=r.musickeyCreateTime;if(!i||!o)return;let s=c;s=s.replace(/(qqmusic_key=)[^;]*/,`$1${i}`).replace(/(qm_keyst=)[^;]*/,`$1${i}`).replace(/(psrf_musickey_createtime=)[^;]*/,`$1${o}`),process.env.NEW_QQ_COOKIE=s,u.cookie=s,c=s})),p.cache(e,()=>s("GET","https://u.y.qq.com/cgi-bin/musicu.fcg?data="+encodeURIComponent(JSON.stringify({search:{method:"DoSearchForQQMusicDesktop",module:"music.search.SearchCgiService",param:{num_per_page:5,page_num:1,query:e.keyword,search_type:0}}})),u).then(e=>e.json()).then(t=>{let r=o(t.search.data.body.song.list.map(l),e);return r?r.id:Promise.reject()})).then(f)},track:f}},9147(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(9451),e.exports=(e,t)=>{let{duration:r}=t,i=e.slice(0,5).find(e=>e.duration&&5e3>Math.abs(e.duration-r));return i||e[0]},e.exports.ENABLE_FLAC="true"===(process.env.ENABLE_FLAC||"").toLowerCase()},6863(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(4825);let{getManagedCacheStorage:i}=r(755),{logScope:o}=r(9309),s=r(7821),a=r(876),{spawnStdout:c}=r(6630),u=o("provider/youtube-dl");async function l(e){try{let{stdout:t}=await c("youtube-dl",e),r=JSON.parse(t.toString());if("object"==typeof r&&"string"==typeof r.id&&"string"==typeof r.url)return r;throw new s(r)}catch(e){if(e&&"ENOENT"===e.code)throw new a;throw e}}let f=async e=>{let t,{url:r}=await l((t=e.keyword,["-f","140","--dump-json",`ytsearch1:${t}`]));return r},p=i("youtube-dl");e.exports={check:e=>p.cache(e,()=>f(e)).catch(e=>{throw e&&u.error(e),e})}},5918(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(594),r(8308),r(4825),r(9451);let i=r(9904),{getManagedCacheStorage:o}=r(755),s=o("provider/youtube"),a,c=process.env.YOUTUBE_KEY||null,u=e=>i("GET",`https://www.youtube.com/watch?v=${e}`,{},null,a).then(e=>e.body()).then(e=>JSON.parse(e.match(/ytInitialPlayerResponse\s*=\s*{[^]+};\s*var\s*meta/)[0].replace(/;var meta/,"").replace(/ytInitialPlayerResponse = /,"")).streamingData).then(e=>{let t=e.formats.concat(e.adaptiveFormats).find(e=>140===e.itag),r=(t.signatureCipher||"").split("&").reduce((e,t)=>{let r=t.split("=").map(decodeURIComponent);return Object.assign({},e,{[r[0]]:r[1]})},{});return t.url||(r.sp.includes("sig")?s.cache("YOUTUBE_SIGNATURE",()=>((e="-tKVN2mAKRI")=>i("GET",`https://www.youtube.com/watch?v=${e}`,{},null,a).then(e=>e.body()).then(e=>{let t=/"WEB_PLAYER_CONTEXT_CONFIG_ID_KEVLAR_VERTICAL_LANDING_PAGE_PROMO":{[^}]+}/.exec(e)[0];return i("GET","https://youtube.com"+(t=JSON.parse(`{${t}}}`).WEB_PLAYER_CONTEXT_CONFIG_ID_KEVLAR_VERTICAL_LANDING_PAGE_PROMO).jsUrl,{},null,a).then(e=>e.body())}).then(e=>{let[,t,r]=/function\((\w+)\)\s*{([^}]+split\(""\)[^}]+join\(""\))};/.exec(e),i=/;(.+?)\..+?\(/.exec(r)[1];return Function([t],RegExp(`var ${i}={[\\s\\S]+?};`).exec(e)[0]+` +`+r)}))(),Date.now()+864e5).then(e=>r.url+"&sig="+e(r.s)):r.url)});e.exports={check:e=>s.cache(e,()=>c?i("GET",`https://www.googleapis.com/youtube/v3/search?part=snippet&q=${encodeURIComponent(e.keyword)}&type=video&key=${c}`,{accept:"application/json"},null,a).then(e=>e.json()).then(e=>{let t=e.items[0];return t?t.id.videoId:Promise.reject()}):i("GET",`https://www.youtube.com/results?search_query=${encodeURIComponent(e.keyword)}`,{},null,a).then(e=>e.body()).then(e=>{let t=JSON.parse(e.match(/ytInitialData\s*=\s*([^;]+);/)[1]).contents.twoColumnSearchResultsRenderer.primaryContents.sectionListRenderer.contents[0].itemSectionRenderer.contents[1];return t?t.videoRenderer.videoId:Promise.reject()})).then(u),track:u}},6819(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(4825);let{getManagedCacheStorage:i}=r(755),{logScope:o}=r(9309),{spawnStdout:s}=r(6630),a=r(5),c=r(1578),u=o("provider/yt-dlp");async function l(e){try{let{stdout:t}=await s("yt-dlp",e),r=JSON.parse(t.toString());if("object"==typeof r&&"string"==typeof r.id&&"string"==typeof r.url)return r;throw new a(r)}catch(e){if(e&&"ENOENT"===e.code)throw new c;throw e}}let f=async e=>{let t,{url:r}=await l((t=e.keyword,["-f","140","--dump-json",`ytsearch1:${t}`]));return r},p=i("yt-dlp");e.exports={check:e=>p.cache(e,()=>f(e)).catch(e=>{throw e&&u.error(e),e})}},9904(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(594),r(7924),r(4825);let i=r(3106),o=r(8611),s=r(5692),a=r(6867),c=r(1658),{logScope:u}=r(9309),l=r(7016).parse,f=r(7016).format,p=u("request"),h=e=>(global.hosts||{})[e]||e,d=(e,t)=>("https:"===((void 0===t?global.proxy:t)||e).protocol?s:o).request,y=(e,t,r,i)=>{r=r||{},i=void 0===i?global.proxy:i,"content-length"in r&&delete r["content-length"];let o={};return o._headers=r,i&&"https:"===t.protocol?(o.method="CONNECT",o.headers=Object.keys(r).reduce((e,t)=>Object.assign(e,["host","user-agent"].includes(t)&&{[t]:r[t]}),{})):(o.method=e,o.headers=r),i?(o.hostname=h(i.hostname),o.port=i.port||("https:"===i.protocol?443:80),o.path="https:"===t.protocol?h(t.hostname)+":"+(t.port||443):"http://"+h(t.hostname)+t.path):(o.hostname=h(t.hostname),o.port=t.port||("https:"===t.protocol?443:80),o.path=t.path),o},g=(e,t,r,i,o,u)=>{let h=l(t),w=r||{},_=y(e,h,{host:h.hostname,accept:"application/json, text/plain, */*","accept-encoding":"gzip, deflate","accept-language":"zh-CN,zh;q=0.9","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36",...w},o);return new Promise((r,l)=>{var y;p.debug(`Start requesting ${t}`);let g=d(h,o)(_),m=function(){g.destroy(new c(f(h)))};null==u||u.on(a,m),null!=(y=null==u?void 0:u.cancelled)&&y&&m(),g.setTimeout(1e4,()=>{p.warn({url:f(h)},"The request timed out, or the requester didn't handle the response."),m()}).on("response",e=>r(e)).on("connect",(t,o)=>{p.debug("received CONNECT, continuing with https.request()..."),s.request({method:e,path:h.path,headers:_._headers,socket:o,agent:!1}).on("response",e=>r(e)).on("error",e=>l(e)).end(i)}).on("error",e=>l(e)).end("CONNECT"===_.method.toUpperCase()?void 0:i)}).then(t=>{var r;if(null!=(r=null==u?void 0:u.cancelled)&&r)return Promise.reject(new c(f(h)));if([201,301,302,303,307,308].includes(t.statusCode)){let r=h.resolve(t.headers.location||h.href);return p.debug(`Redirect to ${r}`),delete w.host,g(e,r,w,i,o)}return Object.assign(t,{url:h,body:e=>m(t,e),json:()=>b(t),jsonp:()=>v(t)})})},m=(e,t)=>new Promise((t,r)=>{let i=[];e.on("data",e=>i.push(e)).on("end",()=>t(Buffer.concat(i))).on("error",e=>r(e))}).then(r=>{if(r.length)switch(e.headers["content-encoding"]){case"deflate":case"gzip":r=i.unzipSync(r);break;case"br":r=i.brotliDecompressSync(r)}return t?r:r.toString()}),b=e=>m(e,!1).then(e=>JSON.parse(e)),v=e=>m(e,!1).then(e=>JSON.parse(e.slice(e.indexOf("(")+1,-1)));g.read=m,g.create=d,g.translate=h,g.configure=y,e.exports=g},9914(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308),r(8074),r(4472);let i=r(9896),o=r(9278),s=r(6928),a=r(7016).parse,{logScope:c}=r(9309),u=c("server"),l=r(5249),f=r(8978),p=r(9904),{isHost:h}=r(8010),d={core:{mitm:(e,t)=>{if("/proxy.pac"===e.url){let r=a("http://"+e.headers.host);t.writeHead(200,{"Content-Type":"application/x-ns-proxy-autoconfig"}),t.end(` function FindProxyForURL(url, host) { if (${Array.from(f.target.host).map(e=>`host == '${e}'`).join(" || ")}) { return 'PROXY ${r.hostname}:${r.port||80}' @@ -19,7 +20,7 @@ Proxy-Authenticate: Basic realm="realm"\r \r `):r.writeHead(407,{"proxy-authenticate":'Basic realm="realm"'}),Promise.reject(e.error="authenticate")},filter:e=>{if(e.decision||e.req.local)return;let t=a((e.socket?"https://":"")+e.req.url),r=e=>-1!==t.href.search(RegExp(e,"g"));try{let t=b.whitelist.some(r),i=b.blacklist.some(r);if(!t&&i)return Promise.reject(e.error="filter")}catch(t){e.error=t}},mitm:{request:e=>new Promise((t,r)=>{if("close"===e.decision)return r(e.error=e.decision);let{req:i}=e;h(i.url,"bilivideo.com")&&(i.headers.referer="https://www.bilibili.com/",i.headers["user-agent"]="okhttp/3.4.1");let o=a(i.url),s=p.configure(i.method,o,i.headers);e.proxyReq=p.create(o)(s).on("response",r=>t(e.proxyRes=r)).on("error",t=>r(e.error=t)),i.readable?i.pipe(e.proxyReq):e.proxyReq.end(i.body)}),response:e=>{let{res:t,proxyRes:r}=e;r.on("error",()=>d.abort(r.socket,"proxyRes")),t.writeHead(r.statusCode,r.headers),r.readable?r.pipe(t):t.end(r.body)},close:e=>{d.abort(e.res.socket,"mitm")}},tunnel:{connect:e=>new Promise((t,r)=>{if("close"===e.decision)return r(e.error=e.decision);let{req:i}=e,s=a("https://"+i.url);if(global.proxy&&!i.local){let o=p.configure(i.method,s,i.headers);p.create(d)(o).on("connect",(r,i)=>t(e.proxySocket=i)).on("error",t=>r(e.error=t)).end()}else{let i=o.connect(s.port||443,p.translate(s.hostname)).on("connect",()=>t(e.proxySocket=i)).on("error",t=>r(e.error=t))}}),dock:e=>new Promise(t=>{let{req:r,head:i,socket:o}=e;o.once("data",r=>t(e.head=Buffer.concat([i,r]))).write(`HTTP/${r.httpVersion} 200 Connection established\r \r -`)}).then(t=>e.socket.sni=l(t)).catch(e=>e&&u.error(e)),pipe:e=>{if("blank"===e.decision)return Promise.reject(e.error=e.decision);let{head:t,socket:r,proxySocket:i}=e;i.on("error",()=>d.abort(e.proxySocket,"proxySocket")),i.write(t),r.pipe(i),i.pipe(r)},close:e=>{d.abort(e.socket,"tunnel")}}},g=process.env.SIGN_CERT||s.join(__dirname,"..","server.crt"),y=process.env.SIGN_KEY||s.join(__dirname,"..","server.key"),m={key:i.readFileSync(y),cert:i.readFileSync(g)},b={http:r(8611).createServer().on("request",d.core.mitm).on("connect",d.core.tunnel),https:r(5692).createServer(m).on("request",d.core.mitm).on("connect",d.core.tunnel)};b.whitelist=[],b.blacklist=["://127\\.\\d+\\.\\d+\\.\\d+","://localhost"],b.authentication=null,e.exports=b},5249(e){"use strict";e.exports=e=>{let t=e.length,r=43,i=(e=r)=>isNaN(e);if(r+1>t||i()||(r+=1+e[r],r+2>t||i())||(r+=2+e.readInt16BE(r),r+1>t||i())||(r+=1+e[r],r+2>t||i()))return null;let o=e.readInt16BE(r);r+=2;let s=r+o;if(s>t||i(s))return null;for(t=s;r+4<=t||i();){let o=e.readInt16BE(r),s=e.readInt16BE(r+2);if(r+=4,0!==o){r+=s;continue}if(r+2>t||i())break;let a=e.readInt16BE(r);if(r+=2,r+a>t)break;for(;r+3<=t||i();){let o=e[r],s=e.readInt16BE(r+1);if(r+=3,0!==o){r+=s;continue}if(r+s>t||i())return null;return e.toString("ascii",r,r+s)}}return null}},6630(e,t,r){"use strict";let i=r(5317),{logScope:o}=r(9309),s=r(3989),a=o("spawn");e.exports={spawnStdout:async function(e,t=[]){return new Promise((r,o)=>{let c=0,u=0,l=Buffer.alloc(5e6),f=Buffer.alloc(5e6),p=i.spawn(e,t);p.on("spawn",()=>{a.info(`running ${e} ${t.join(" ")}`)}),p.on("error",e=>o(e)),p.on("close",t=>{0!==t?o(new s(e,t)):(a.debug(`process ${e} exited successfully`),r({stdout:l.slice(0,c),stderr:f.slice(0,u)}))}),p.stdout.on("data",e=>{c+=e.copy(l,c)}),p.stderr.on("data",t=>{a.warn(`[${e}][stderr] ${t}`),u+=t.copy(f,u)})})}}},8010(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699),r(6791);let i=(e,t)=>e.includes(t);e.exports={isHost:i,isHostWrapper:e=>t=>i(e,t),cookieToMap:e=>e.split(";").map(e=>e.trim().split("=")).reduce((e,[t,r])=>({...e,[t]:r}),{}),mapToCookie:e=>Object.entries(e).map(([e,t])=>`${e}=${t}`).join("; ")}},7048(e){"use strict";if("u">typeof SharedArrayBuffer&&"u">typeof Atomics){let t=new Int32Array(new SharedArrayBuffer(4));e.exports=function(e){if(!1==(e>0&&e<1/0)){if("number"!=typeof e&&"bigint"!=typeof e)throw TypeError("sleep: ms must be a number");throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity")}Atomics.wait(t,0,0,Number(e))}}else e.exports=function(e){if(!1==(e>0&&e<1/0)){if("number"!=typeof e&&"bigint"!=typeof e)throw TypeError("sleep: ms must be a number");throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity")}let t=Date.now()+Number(e);for(;t>Date.now(););}},5402(e,t,r){"use strict";var i;function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(s){var a,c,u,l=arguments,f=(a=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,c=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,u=/[^-+\dA-Z]/g,function(e,t,r,i){if(1!==l.length||"string"!==y(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||0===e?e:new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var o=(t=String(f.masks[t]||t||f.masks.default)).slice(0,4);("UTC:"===o||"GMT:"===o)&&(t=t.slice(4),r=!0,"GMT:"===o&&(i=!0));var s=function(){return r?"getUTC":"get"},m=function(){return e[s()+"Date"]()},b=function(){return e[s()+"Day"]()},v=function(){return e[s()+"Month"]()},w=function(){return e[s()+"FullYear"]()},_=function(){return e[s()+"Hours"]()},S=function(){return e[s()+"Minutes"]()},x=function(){return e[s()+"Seconds"]()},E=function(){return e[s()+"Milliseconds"]()},O=function(){return r?0:e.getTimezoneOffset()},k=function(){return d(e)},j={d:function(){return m()},dd:function(){return p(m())},ddd:function(){return f.i18n.dayNames[b()]},DDD:function(){return h({y:w(),m:v(),d:m(),_:s(),dayName:f.i18n.dayNames[b()],short:!0})},dddd:function(){return f.i18n.dayNames[b()+7]},DDDD:function(){return h({y:w(),m:v(),d:m(),_:s(),dayName:f.i18n.dayNames[b()+7]})},m:function(){return v()+1},mm:function(){return p(v()+1)},mmm:function(){return f.i18n.monthNames[v()]},mmmm:function(){return f.i18n.monthNames[v()+12]},yy:function(){return String(w()).slice(2)},yyyy:function(){return p(w(),4)},h:function(){return _()%12||12},hh:function(){return p(_()%12||12)},H:function(){return _()},HH:function(){return p(_())},M:function(){return S()},MM:function(){return p(S())},s:function(){return x()},ss:function(){return p(x())},l:function(){return p(E(),3)},L:function(){return p(Math.floor(E()/10))},t:function(){return 12>_()?f.i18n.timeNames[0]:f.i18n.timeNames[1]},tt:function(){return 12>_()?f.i18n.timeNames[2]:f.i18n.timeNames[3]},T:function(){return 12>_()?f.i18n.timeNames[4]:f.i18n.timeNames[5]},TT:function(){return 12>_()?f.i18n.timeNames[6]:f.i18n.timeNames[7]},Z:function(){return i?"GMT":r?"UTC":(String(e).match(c)||[""]).pop().replace(u,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(O()>0?"-":"+")+p(100*Math.floor(Math.abs(O())/60)+Math.abs(O())%60,4)},p:function(){return(O()>0?"-":"+")+p(Math.floor(Math.abs(O())/60),2)+":"+p(Math.floor(Math.abs(O())%60),2)},S:function(){return["th","st","nd","rd"][m()%10>3?0:(m()%100-m()%10!=10)*m()%10]},W:function(){return k()},WW:function(){return p(k())},N:function(){return g(e)}};return t.replace(a,function(e){return e in j?j[e]():e.slice(1,e.length-1)})});f.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"},f.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 p=function(e,t){for(e=String(e),t=t||2;e.lengthe;function d(e={}){let t=Array.from(new Set(e.paths||[])),r="serialize"in e&&(!1===e.serialize||"function"==typeof e.serialize)?e.serialize:JSON.stringify,i=e.remove;if(!0===i&&r!==JSON.stringify)throw Error("fast-redact – remove option may only be set when serializer is JSON.stringify");let f=!0===i?void 0:"censor"in e?e.censor:"[REDACTED]",g="function"==typeof f,y=g&&f.length>1;if(0===t.length)return r||h;p({paths:t,serialize:r,censor:f});let{wildcards:m,wcLen:b,secret:v}=o({paths:t,censor:f}),w=a();return s({secret:v,wcLen:b,serialize:r,strict:!("strict"in e)||e.strict,isCensorFct:g,censorFctTakesPath:y},l({secret:v,censor:f,compileRestore:w,serialize:r,groupRedact:c,nestedRedact:u,wildcards:m,wcLen:b}))}h.restore=h,d.rx=f,d.validator=i,e.exports=d},1022(e){"use strict";function t(e,t){return null!=e&&("hasOwn"in Object?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t))}function r(e,t){for(var r=-1,i=t.length,o=e;null!=o&&++r0;e--)s=s[i[e]];s[i[0]]=o}}}},7023(e,t,r){"use strict";let i=r(8128);e.exports=function({paths:e}){let t=[];var r=0;let o=e.reduce(function(e,o,s){var a=o.match(i).map(e=>e.replace(/'|"|`/g,""));let c="["===o[0],u=(a=a.map(e=>"["===e[0]?e.substr(1,e.length-2):e)).indexOf("*");if(u>-1){let e=a.slice(0,u),i=e.join("."),o=a.slice(u+1,a.length),s=o.length>0;r++,t.push({before:e,beforeStr:i,after:o,nested:s})}else e[o]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(o),leadingBracket:c};return e},{});return{wildcards:t,wcLen:r,secret:o}}},7426(e,t,r){"use strict";let i=r(8128);e.exports=function({secret:e,serialize:t,wcLen:r,strict:o,isCensorFct:s,censorFctTakesPath:a},c){var u,l,f,p,h,d,g,y;let m=Function("o",` +`)}).then(t=>e.socket.sni=l(t)).catch(e=>e&&u.error(e)),pipe:e=>{if("blank"===e.decision)return Promise.reject(e.error=e.decision);let{head:t,socket:r,proxySocket:i}=e;i.on("error",()=>d.abort(e.proxySocket,"proxySocket")),i.write(t),r.pipe(i),i.pipe(r)},close:e=>{d.abort(e.socket,"tunnel")}}},y=process.env.SIGN_CERT||s.join(__dirname,"..","server.crt"),g=process.env.SIGN_KEY||s.join(__dirname,"..","server.key"),m={key:i.readFileSync(g),cert:i.readFileSync(y)},b={http:r(8611).createServer().on("request",d.core.mitm).on("connect",d.core.tunnel),https:r(5692).createServer(m).on("request",d.core.mitm).on("connect",d.core.tunnel)};b.whitelist=[],b.blacklist=["://127\\.\\d+\\.\\d+\\.\\d+","://localhost"],b.authentication=null,e.exports=b},5249(e){"use strict";e.exports=e=>{let t=e.length,r=43,i=(e=r)=>isNaN(e);if(r+1>t||i()||(r+=1+e[r],r+2>t||i())||(r+=2+e.readInt16BE(r),r+1>t||i())||(r+=1+e[r],r+2>t||i()))return null;let o=e.readInt16BE(r);r+=2;let s=r+o;if(s>t||i(s))return null;for(t=s;r+4<=t||i();){let o=e.readInt16BE(r),s=e.readInt16BE(r+2);if(r+=4,0!==o){r+=s;continue}if(r+2>t||i())break;let a=e.readInt16BE(r);if(r+=2,r+a>t)break;for(;r+3<=t||i();){let o=e[r],s=e.readInt16BE(r+1);if(r+=3,0!==o){r+=s;continue}if(r+s>t||i())return null;return e.toString("ascii",r,r+s)}}return null}},6630(e,t,r){"use strict";let i=r(5317),{logScope:o}=r(9309),s=r(6370),a=o("spawn");e.exports={spawnStdout:async function(e,t=[]){return new Promise((r,o)=>{let c=0,u=0,l=Buffer.alloc(5e6),f=Buffer.alloc(5e6),p=i.spawn(e,t);p.on("spawn",()=>{a.info(`running ${e} ${t.join(" ")}`)}),p.on("error",e=>o(e)),p.on("close",t=>{0!==t?o(new s(e,t)):(a.debug(`process ${e} exited successfully`),r({stdout:l.slice(0,c),stderr:f.slice(0,u)}))}),p.stdout.on("data",e=>{c+=e.copy(l,c)}),p.stderr.on("data",t=>{a.warn(`[${e}][stderr] ${t}`),u+=t.copy(f,u)})})}}},8010(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308),r(594);let i=(e,t)=>e.includes(t);e.exports={isHost:i,isHostWrapper:e=>t=>i(e,t),cookieToMap:e=>e.split(";").map(e=>e.trim().split("=")).reduce((e,[t,r])=>({...e,[t]:r}),{}),mapToCookie:e=>Object.entries(e).map(([e,t])=>`${e}=${t}`).join("; ")}},7048(e){"use strict";if("u">typeof SharedArrayBuffer&&"u">typeof Atomics){let t=new Int32Array(new SharedArrayBuffer(4));e.exports=function(e){if(!1==(e>0&&e<1/0)){if("number"!=typeof e&&"bigint"!=typeof e)throw TypeError("sleep: ms must be a number");throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity")}Atomics.wait(t,0,0,Number(e))}}else e.exports=function(e){if(!1==(e>0&&e<1/0)){if("number"!=typeof e&&"bigint"!=typeof e)throw TypeError("sleep: ms must be a number");throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity")}let t=Date.now()+Number(e);for(;t>Date.now(););}},5402(e,t,r){"use strict";var i;function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(s){var a,c,u,l=arguments,f=(a=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,c=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,u=/[^-+\dA-Z]/g,function(e,t,r,i){if(1!==l.length||"string"!==g(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||0===e?e:new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var o=(t=String(f.masks[t]||t||f.masks.default)).slice(0,4);("UTC:"===o||"GMT:"===o)&&(t=t.slice(4),r=!0,"GMT:"===o&&(i=!0));var s=function(){return r?"getUTC":"get"},m=function(){return e[s()+"Date"]()},b=function(){return e[s()+"Day"]()},v=function(){return e[s()+"Month"]()},w=function(){return e[s()+"FullYear"]()},_=function(){return e[s()+"Hours"]()},S=function(){return e[s()+"Minutes"]()},x=function(){return e[s()+"Seconds"]()},E=function(){return e[s()+"Milliseconds"]()},O=function(){return r?0:e.getTimezoneOffset()},k=function(){return d(e)},j={d:function(){return m()},dd:function(){return p(m())},ddd:function(){return f.i18n.dayNames[b()]},DDD:function(){return h({y:w(),m:v(),d:m(),_:s(),dayName:f.i18n.dayNames[b()],short:!0})},dddd:function(){return f.i18n.dayNames[b()+7]},DDDD:function(){return h({y:w(),m:v(),d:m(),_:s(),dayName:f.i18n.dayNames[b()+7]})},m:function(){return v()+1},mm:function(){return p(v()+1)},mmm:function(){return f.i18n.monthNames[v()]},mmmm:function(){return f.i18n.monthNames[v()+12]},yy:function(){return String(w()).slice(2)},yyyy:function(){return p(w(),4)},h:function(){return _()%12||12},hh:function(){return p(_()%12||12)},H:function(){return _()},HH:function(){return p(_())},M:function(){return S()},MM:function(){return p(S())},s:function(){return x()},ss:function(){return p(x())},l:function(){return p(E(),3)},L:function(){return p(Math.floor(E()/10))},t:function(){return 12>_()?f.i18n.timeNames[0]:f.i18n.timeNames[1]},tt:function(){return 12>_()?f.i18n.timeNames[2]:f.i18n.timeNames[3]},T:function(){return 12>_()?f.i18n.timeNames[4]:f.i18n.timeNames[5]},TT:function(){return 12>_()?f.i18n.timeNames[6]:f.i18n.timeNames[7]},Z:function(){return i?"GMT":r?"UTC":(String(e).match(c)||[""]).pop().replace(u,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(O()>0?"-":"+")+p(100*Math.floor(Math.abs(O())/60)+Math.abs(O())%60,4)},p:function(){return(O()>0?"-":"+")+p(Math.floor(Math.abs(O())/60),2)+":"+p(Math.floor(Math.abs(O())%60),2)},S:function(){return["th","st","nd","rd"][m()%10>3?0:(m()%100-m()%10!=10)*m()%10]},W:function(){return k()},WW:function(){return p(k())},N:function(){return y(e)}};return t.replace(a,function(e){return e in j?j[e]():e.slice(1,e.length-1)})});f.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"},f.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 p=function(e,t){for(e=String(e),t=t||2;e.lengthe;function d(e={}){let t=Array.from(new Set(e.paths||[])),r="serialize"in e&&(!1===e.serialize||"function"==typeof e.serialize)?e.serialize:JSON.stringify,i=e.remove;if(!0===i&&r!==JSON.stringify)throw Error("fast-redact – remove option may only be set when serializer is JSON.stringify");let f=!0===i?void 0:"censor"in e?e.censor:"[REDACTED]",y="function"==typeof f,g=y&&f.length>1;if(0===t.length)return r||h;p({paths:t,serialize:r,censor:f});let{wildcards:m,wcLen:b,secret:v}=o({paths:t,censor:f}),w=a();return s({secret:v,wcLen:b,serialize:r,strict:!("strict"in e)||e.strict,isCensorFct:y,censorFctTakesPath:g},l({secret:v,censor:f,compileRestore:w,serialize:r,groupRedact:c,nestedRedact:u,wildcards:m,wcLen:b}))}h.restore=h,d.rx=f,d.validator=i,e.exports=d},1022(e){"use strict";function t(e,t){return null!=e&&("hasOwn"in Object?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t))}function r(e,t){for(var r=-1,i=t.length,o=e;null!=o&&++r0;e--)s=s[i[e]];s[i[0]]=o}}}},7023(e,t,r){"use strict";let i=r(8128);e.exports=function({paths:e}){let t=[];var r=0;let o=e.reduce(function(e,o,s){var a=o.match(i).map(e=>e.replace(/'|"|`/g,""));let c="["===o[0],u=(a=a.map(e=>"["===e[0]?e.substr(1,e.length-2):e)).indexOf("*");if(u>-1){let e=a.slice(0,u),i=e.join("."),o=a.slice(u+1,a.length),s=o.length>0;r++,t.push({before:e,beforeStr:i,after:o,nested:s})}else e[o]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(o),leadingBracket:c};return e},{});return{wildcards:t,wcLen:r,secret:o}}},7426(e,t,r){"use strict";let i=r(8128);e.exports=function({secret:e,serialize:t,wcLen:r,strict:o,isCensorFct:s,censorFctTakesPath:a},c){var u,l,f,p,h,d,y,g;let m=Function("o",` if (typeof o !== 'object' || o == null) { ${(u=o,l=t,!0===u?"throw Error('fast-redact: primitives cannot be redacted')":!1===l?"return o":"return this.serialize(o)")} } @@ -39,29 +40,29 @@ Proxy-Authenticate: Basic realm="realm"\r `).join(` `)} } - `,g=h?`val, ${JSON.stringify(o)}`:"val";return` + `,y=h?`val, ${JSON.stringify(o)}`:"val";return` if (${l}) { const val = o${a}${e} if (val === censor) { secret[${t}].precensored = true } else { secret[${t}].val = val - o${a}${e} = ${p?`censor(${g})`:"censor"} + o${a}${e} = ${p?`censor(${y})`:"censor"} ${d} } } `}).join(` `))} this.compileRestore() - ${(d=r>0,g=s,y=a,!0===d?` + ${(d=r>0,y=s,g=a,!0===d?` { const { wildcards, wcLen, groupRedact, nestedRedact } = this for (var i = 0; i < wcLen; i++) { const { before, beforeStr, after, nested } = wildcards[i] if (nested === true) { secret[beforeStr] = secret[beforeStr] || [] - nestedRedact(secret[beforeStr], o, before, after, censor, ${g}, ${y}) - } else secret[beforeStr] = groupRedact(o, before, censor, ${g}, ${y}) + nestedRedact(secret[beforeStr], o, before, after, censor, ${y}, ${g}) + } else secret[beforeStr] = groupRedact(o, before, censor, ${y}, ${g}) } } `:"")} @@ -98,13 +99,13 @@ Proxy-Authenticate: Basic realm="realm"\r const o = new Proxy({}, { get: () => o, set: () => { throw Error() } }); const 〇 = null; o${t} - if ([o${t}].length !== 1) throw Error()`)()}catch(t){throw Error(r(e))}})}}},8183(e){e.exports=a,a.default=a,a.stable=l,a.stableStringify=l;var t="[...]",r="[Circular]",i=[],o=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(e,a,u,l){void 0===l&&(l=s()),function e(i,o,s,a,u,l,f){if(l+=1,"object"==typeof i&&null!==i){for(p=0;pf.depthLimit||void 0!==f.edgesLimit&&s+1>f.edgesLimit)return void c(t,i,o,u);if(a.push(i),Array.isArray(i))for(p=0;pt)}function l(e,a,l,p){void 0===p&&(p=s());var h,d=function e(o,s,a,l,f,p,h){if(p+=1,"object"==typeof o&&null!==o){for(d=0;dh.depthLimit||void 0!==h.edgesLimit&&a+1>h.edgesLimit)return void c(t,o,s,f);if(l.push(o),Array.isArray(o))for(d=0;d0)for(var i=0;i{l.destroy(e)}),f=null;else if(t.enablePipelining&&f)return s(l,f,{objectMode:!0});return l}},617(e,t,r){"use strict";let i=r(9271)();e.exports=i;let o="PinoWarning";i.create(o,"PINODEP004","bindings.serializers is deprecated, use options.serializers option instead"),i.create(o,"PINODEP005","bindings.formatters is deprecated, use options.formatters option instead"),i.create(o,"PINODEP006","bindings.customLevels is deprecated, use options.customLevels option instead"),i.create(o,"PINODEP007","bindings.level is deprecated, use options.level option instead")},2129(e,t,r){"use strict";let i=r(1517),{lsCacheSym:o,levelValSym:s,useOnlyCustomLevelsSym:a,streamSym:c,formattersSym:u,hooksSym:l}=r(37),{noop:f,genLog:p}=r(711),h={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},d={fatal:e=>{let t=p(h.fatal,e);return function(...e){let r=this[c];if(t.call(this,...e),"function"==typeof r.flushSync)try{r.flushSync()}catch(e){}}},error:e=>p(h.error,e),warn:e=>p(h.warn,e),info:e=>p(h.info,e),debug:e=>p(h.debug,e),trace:e=>p(h.trace,e)},g=Object.keys(h).reduce((e,t)=>(e[h[t]]=t,e),{});e.exports={initialLsCache:Object.keys(g).reduce((e,t)=>(e[t]=i('{"level":'+Number(t)),e),{}),genLsCache:function(e){let t=e[u].level,{labels:r}=e.levels,i={};for(let e in r){let o=t(r[e],Number(e));i[e]=JSON.stringify(o).slice(0,-1)}return e[o]=i,e},levelMethods:d,getLevel:function(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""},setLevel:function(e){let{labels:t,values:r}=this.levels;if("number"==typeof e){if(void 0===t[e])throw Error("unknown level value"+e);e=t[e]}if(void 0===r[e])throw Error("unknown level "+e);let i=this[s],o=this[s]=r[e],c=this[a],u=this[l].logMethod;for(let e in r){if(o>r[e]){this[e]=f;continue}this[e]=!function(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}}(e,c)?p(r[e],u):d[e](u)}this.emit("level-change",e,o,t[i],i)},isLevelEnabled:function(e){let{values:t}=this.levels,r=t[e];return void 0!==r&&r>=this[s]},mappings:function(e=null,t=!1){let r=e?Object.keys(e).reduce((t,r)=>(t[e[r]]=r,t),{}):null;return{labels:Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:g,r),values:Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:h,e)}},assertNoLevelCollisions:function(e,t){let{labels:r,values:i}=e;for(let e in t){if(e in i)throw Error("levels cannot be overridden");if(t[e]in r)throw Error("pre-existing level values cannot be used for new levels")}},assertDefaultLevelFound:function(e,t,r){if("number"==typeof e){if(![].concat(Object.keys(t||{}).map(e=>t[e]),r?[]:Object.keys(g).map(e=>+e),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}if(!(e in Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:h,t)))throw Error(`default level:${e} must be included in custom levels`)}}},6011(e,t,r){"use strict";let{version:i}=r(9571);e.exports={version:i}},5262(e,t,r){"use strict";let{EventEmitter:i}=r(4434),o=r(361),s=r(1517),a=r(617),{lsCacheSym:c,levelValSym:u,setLevelSym:l,getLevelSym:f,chindingsSym:p,parsedChindingsSym:h,mixinSym:d,asJsonSym:g,writeSym:y,mixinMergeStrategySym:m,timeSym:b,timeSliceIndexSym:v,streamSym:w,serializersSym:_,formattersSym:S,useOnlyCustomLevelsSym:x,needsMetadataGsym:E,redactFmtSym:O,stringifySym:k,formatOptsSym:j,stringifiersSym:T}=r(37),{getLevel:R,setLevel:P,isLevelEnabled:M,mappings:L,initialLsCache:A,genLsCache:N,assertNoLevelCollisions:C}=r(2129),{asChindings:I,asJson:D,buildFormatters:$,stringify:B}=r(711),{version:q}=r(6011),U=r(2205),F={constructor:class{},child:function(e,t){if(!e)throw Error("missing bindings for child Pino");t=t||{};let r=this[_],i=this[S],o=Object.create(this);if(!0===e.hasOwnProperty("serializers")&&(a.emit("PINODEP004"),t.serializers=e.serializers),!0===e.hasOwnProperty("formatters")&&(a.emit("PINODEP005"),t.formatters=e.formatters),!0===e.hasOwnProperty("customLevels")&&(a.emit("PINODEP006"),t.customLevels=e.customLevels),!0===e.hasOwnProperty("level")&&(a.emit("PINODEP007"),t.level=e.level),!0===t.hasOwnProperty("serializers")){for(let e in o[_]=Object.create(null),r)o[_][e]=r[e];let e=Object.getOwnPropertySymbols(r);for(var s=0;se;function G(e,t){return Object.assign(t,e)}},2205(e,t,r){"use strict";let i=r(6208),{redactFmtSym:o,wildcardFirstSym:s}=r(37),{rx:a,validator:c}=i,u=c({ERR_PATHS_MUST_BE_STRINGS:()=>"pino – redacted paths must be strings",ERR_INVALID_PATH:e=>`pino – redact paths array contains an invalid path (${e})`}),l="[Redacted]";e.exports=function(e,t){let{paths:r,censor:c}=function(e){if(Array.isArray(e))return u(e={paths:e,censor:l}),e;let{paths:t,censor:r=l,remove:i}=e;if(!1===Array.isArray(t))throw Error("pino – redact must contain an array of strings");return!0===i&&(r=void 0),u({paths:t,censor:r}),{paths:t,censor:r}}(e),f=r.reduce((e,t)=>{a.lastIndex=0;let r=a.exec(t),i=a.exec(t),o=void 0!==r[1]?r[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):r[0];if("*"===o&&(o=s),null===i)return e[o]=null,e;if(null===e[o])return e;let{index:c}=i,u=`${t.substr(c,t.length-1)}`;return e[o]=e[o]||[],o!==s&&0===e[o].length&&e[o].push(...e[s]||[]),o===s&&Object.keys(e).forEach(function(t){e[t]&&e[t].push(u)}),e[o].push(u),e},{}),p={[o]:i({paths:r,censor:c,serialize:t,strict:!1})};return[...Object.keys(f),...Object.getOwnPropertySymbols(f)].reduce((e,r)=>{if(null===f[r])e[r]=e=>((...e)=>"function"==typeof c?t(c(...e)):t(c))(e,[r]);else{let o="function"==typeof c?(e,t)=>c(e,[r,...t]):c;e[r]=i({paths:f[r],censor:o,serialize:t,strict:!1})}return e},p)}},37(e){"use strict";let t=Symbol("pino.setLevel"),r=Symbol("pino.getLevel"),i=Symbol("pino.levelVal"),o=Symbol("pino.useLevelLabels"),s=Symbol("pino.useOnlyCustomLevels"),a=Symbol("pino.mixin"),c=Symbol("pino.lsCache"),u=Symbol("pino.chindings"),l=Symbol("pino.parsedChindings"),f=Symbol("pino.asJson"),p=Symbol("pino.write"),h=Symbol("pino.redactFmt"),d=Symbol("pino.time"),g=Symbol("pino.timeSliceIndex"),y=Symbol("pino.stream"),m=Symbol("pino.stringify"),b=Symbol("pino.stringifiers"),v=Symbol("pino.end"),w=Symbol("pino.formatOpts"),_=Symbol("pino.messageKey"),S=Symbol("pino.nestedKey"),x=Symbol("pino.mixinMergeStrategy"),E=Symbol("pino.wildcardFirst"),O=Symbol.for("pino.serializers"),k=Symbol.for("pino.formatters"),j=Symbol.for("pino.hooks");e.exports={setLevelSym:t,getLevelSym:r,levelValSym:i,useLevelLabelsSym:o,mixinSym:a,lsCacheSym:c,chindingsSym:u,parsedChindingsSym:l,asJsonSym:f,writeSym:p,serializersSym:O,redactFmtSym:h,timeSym:d,timeSliceIndexSym:g,streamSym:y,stringifySym:m,stringifiersSym:b,endSym:v,formatOptsSym:w,messageKeySym:_,nestedKeySym:S,wildcardFirstSym:E,needsMetadataGsym:Symbol.for("pino.metadata"),useOnlyCustomLevelsSym:s,formattersSym:k,hooksSym:j,mixinMergeStrategySym:x}},6751(e){"use strict";e.exports={nullTime:()=>"",epochTime:()=>`,"time":${Date.now()}`,unixTime:()=>`,"time":${Math.round(Date.now()/1e3)}`,isoTime:()=>`,"time":"${new Date(Date.now()).toISOString()}"`}},711(e,t,r){"use strict";let i=r(1013),{mapHttpRequest:o,mapHttpResponse:s}=r(1265),a=r(361),c=r(8183),{lsCacheSym:u,chindingsSym:l,parsedChindingsSym:f,writeSym:p,serializersSym:h,formatOptsSym:d,endSym:g,stringifiersSym:y,stringifySym:m,wildcardFirstSym:b,needsMetadataGsym:v,redactFmtSym:w,streamSym:_,nestedKeySym:S,formattersSym:x,messageKeySym:E}=r(37);function O(){}function k(e,t,i,o){if(t&&"function"==typeof t)return j((t=t.bind(o))(e),i,e);try{let t=r(9640).prettyFactory||r(9640);return t.asMetaWrapper=j,j(t(e),i,e)}catch(e){if(e.message.startsWith("Cannot find module 'pino-pretty'"))throw Error("Missing `pino-pretty` module: `pino-pretty` must be installed separately");throw e}}function j(e,t,r){r=Object.assign({suppressFlushSyncWarning:!1},r);let i=!1;return{[v]:!0,lastLevel:0,lastMsg:null,lastObj:null,lastLogger:null,flushSync(){r.suppressFlushSyncWarning||i||(i=!0,R(t,this),t.write(e(Object.assign({level:40,msg:"pino.final with prettyPrint does not support flushing",time:Date.now()},this.chindings()))))},chindings(){let e=this.lastLogger,t=null;return e?(e.hasOwnProperty(f)?t=e[f]:(t=JSON.parse("{"+e[l].substr(1)+"}"),e[f]=t),t):null},write(r){let i=this.lastLogger,o=this.chindings(),s=this.lastTime;s=s.match(/^\d+/)?parseInt(s):s.slice(1,-1);let a=this.lastObj,c=this.lastMsg,u=i[x],l=u.log?u.log(a):a,f=i[E];c&&l&&!l.hasOwnProperty(f)&&(l[f]=c);let p=Object.assign({level:this.lastLevel,time:s},l,null),d=i[h],g=Object.keys(d);for(var m=0;m100)return JSON.stringify(e);for(var a=0;a=32;a++)(34===(o=e.charCodeAt(a))||92===o)&&(t+=e.slice(r,a)+"\\",r=a,i=!0);return i?t+=e.slice(r):t=e,o<32?JSON.stringify(e):'"'+t+'"'})(o);break;default:o=(e||s)(o)}if(void 0===o)continue;w+=',"'+t+'":'+o}return w+c},genLog:function(e,t){if(!t)return r;return function(...i){t.call(this,i,r,e)};function r(t,...a){if("object"==typeof t){let r,c=t;null!==t&&(t.method&&t.headers&&t.socket?t=o(t):"function"==typeof t.setHeader&&(t=s(t))),this[S]&&(t={[this[S]]:t}),null===c&&0===a.length?r=[null]:(c=a.shift(),r=a),this[p](t,i(c,r,this[d]),e)}else this[p](null,i(t,a,this[d]),e)}},createArgsNormalizer:function(e){return function(t,r={},i){var o;if("string"==typeof r?(i=T({dest:r,sync:!0}),r={}):"string"==typeof i?i=T({dest:i,sync:!0}):(r instanceof a||r.writable||r._writableState)&&(i=r,r=null),"extreme"in(r=Object.assign({},e,r)))throw Error("The extreme option has been removed, use pino.destination({ sync: false }) instead");if("onTerminated"in r)throw Error("The onTerminated option has been removed, use pino.final instead");"changeLevelName"in r&&(process.emitWarning("The changeLevelName option is deprecated and will be removed in v7. Use levelKey instead.",{code:"changeLevelName_deprecation"}),r.levelKey=r.changeLevelName,delete r.changeLevelName);let{enabled:s,prettyPrint:c,prettifier:u,messageKey:l}=r;return!1===s&&(r.level="silent"),(i=i||process.stdout)===process.stdout&&i.fd>=0&&(o=i).write===o.constructor.prototype.write&&(i=T({fd:i.fd,sync:!0})),c&&(i=k(Object.assign({messageKey:l},c),u,i,t)),{opts:r,stream:i}}},final:function(e,t){if(void 0===e||"function"!=typeof e.child)throw Error("expected a pino logger instance");let r=void 0!==t;if(r&&"function"!=typeof t)throw Error("if supplied, the handler parameter should be a function");let i=e[_];if("function"!=typeof i.flushSync)throw Error("final requires a stream that has a flushSync method, such as pino.destination");let o=new Proxy(e,{get:(e,t)=>t in e.levels.values?(...r)=>{e[t](...r),i.flushSync()}:e[t]});return r?(e=null,...r)=>{try{i.flushSync()}catch(e){}return t(e,o,...r)}:o},stringify:function(e){try{return JSON.stringify(e)}catch(t){return c(e)}},buildFormatters:function(e,t,r){return{level:e,bindings:t,log:r}}}},2306(e,t,r){"use strict";let i=r(857),o=r(1265),s=r(2205),a=r(6751),c=r(5262),u=r(37),{assertDefaultLevelFound:l,mappings:f,genLsCache:p}=r(2129),{createArgsNormalizer:h,asChindings:d,final:g,stringify:y,buildSafeSonicBoom:m,buildFormatters:b,noop:v}=r(711),{version:w}=r(6011),{mixinMergeStrategySym:_}=r(37),{chindingsSym:S,redactFmtSym:x,serializersSym:E,timeSym:O,timeSliceIndexSym:k,streamSym:j,stringifySym:T,stringifiersSym:R,setLevelSym:P,endSym:M,formatOptsSym:L,messageKeySym:A,nestedKeySym:N,mixinSym:C,useOnlyCustomLevelsSym:I,formattersSym:D,hooksSym:$}=u,{epochTime:B,nullTime:q}=a,{pid:U}=process,F=i.hostname(),W=o.err,G={level:"info",messageKey:"msg",nestedKey:null,enabled:!0,prettyPrint:!1,base:{pid:U,hostname:F},serializers:Object.assign(Object.create(null),{err:W}),formatters:Object.assign(Object.create(null),{bindings:e=>e,level:(e,t)=>({level:t})}),hooks:{logMethod:void 0},timestamp:B,name:void 0,redact:null,customLevels:null,levelKey:void 0,useOnlyCustomLevels:!1},z=h(G),H=Object.assign(Object.create(null),o);function J(...e){var t,r;let i={},{opts:o,stream:a}=z(i,...e),{redact:u,crlf:h,serializers:g,timestamp:m,messageKey:w,nestedKey:U,base:F,name:W,level:H,customLevels:V,useLevelLabels:Y,changeLevelName:Q,levelKey:X,mixin:Z,mixinMergeStrategy:ee,useOnlyCustomLevels:et,formatters:er,hooks:en}=o,ei=b(er.level,er.bindings,er.log);Y&&!(Q||X)?(process.emitWarning("useLevelLabels is deprecated, use the formatters.level option instead","Warning","PINODEP001"),ei.level=K):(Q||X)&&!Y?(process.emitWarning("changeLevelName and levelKey are deprecated, use the formatters.level option instead","Warning","PINODEP002"),t=Q||X,ei.level=function(e,r){return{[t]:r}}):(Q||X)&&Y&&(process.emitWarning("useLevelLabels is deprecated, use the formatters.level option instead","Warning","PINODEP001"),process.emitWarning("changeLevelName and levelKey are deprecated, use the formatters.level option instead","Warning","PINODEP002"),r=Q||X,ei.level=function(e,t){return{[r]:e}}),g[Symbol.for("pino.*")]&&(process.emitWarning("The pino.* serializer is deprecated, use the formatters.log options instead","Warning","PINODEP003"),ei.log=g[Symbol.for("pino.*")]),ei.bindings||(ei.bindings=G.formatters.bindings),ei.level||(ei.level=G.formatters.level);let eo=u?s(u,y):{},es=u?{stringify:eo[x]}:{stringify:y},ea="}"+(h?`\r + if ([o${t}].length !== 1) throw Error()`)()}catch(t){throw Error(r(e))}})}}},8183(e){e.exports=a,a.default=a,a.stable=l,a.stableStringify=l;var t="[...]",r="[Circular]",i=[],o=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(e,a,u,l){void 0===l&&(l=s()),function e(i,o,s,a,u,l,f){if(l+=1,"object"==typeof i&&null!==i){for(p=0;pf.depthLimit||void 0!==f.edgesLimit&&s+1>f.edgesLimit)return void c(t,i,o,u);if(a.push(i),Array.isArray(i))for(p=0;pt)}function l(e,a,l,p){void 0===p&&(p=s());var h,d=function e(o,s,a,l,f,p,h){if(p+=1,"object"==typeof o&&null!==o){for(d=0;dh.depthLimit||void 0!==h.edgesLimit&&a+1>h.edgesLimit)return void c(t,o,s,f);if(l.push(o),Array.isArray(o))for(d=0;d0)for(var i=0;i{l.destroy(e)}),f=null;else if(t.enablePipelining&&f)return s(l,f,{objectMode:!0});return l}},617(e,t,r){"use strict";let i=r(9271)();e.exports=i;let o="PinoWarning";i.create(o,"PINODEP004","bindings.serializers is deprecated, use options.serializers option instead"),i.create(o,"PINODEP005","bindings.formatters is deprecated, use options.formatters option instead"),i.create(o,"PINODEP006","bindings.customLevels is deprecated, use options.customLevels option instead"),i.create(o,"PINODEP007","bindings.level is deprecated, use options.level option instead")},2129(e,t,r){"use strict";let i=r(1517),{lsCacheSym:o,levelValSym:s,useOnlyCustomLevelsSym:a,streamSym:c,formattersSym:u,hooksSym:l}=r(37),{noop:f,genLog:p}=r(711),h={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},d={fatal:e=>{let t=p(h.fatal,e);return function(...e){let r=this[c];if(t.call(this,...e),"function"==typeof r.flushSync)try{r.flushSync()}catch(e){}}},error:e=>p(h.error,e),warn:e=>p(h.warn,e),info:e=>p(h.info,e),debug:e=>p(h.debug,e),trace:e=>p(h.trace,e)},y=Object.keys(h).reduce((e,t)=>(e[h[t]]=t,e),{});e.exports={initialLsCache:Object.keys(y).reduce((e,t)=>(e[t]=i('{"level":'+Number(t)),e),{}),genLsCache:function(e){let t=e[u].level,{labels:r}=e.levels,i={};for(let e in r){let o=t(r[e],Number(e));i[e]=JSON.stringify(o).slice(0,-1)}return e[o]=i,e},levelMethods:d,getLevel:function(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""},setLevel:function(e){let{labels:t,values:r}=this.levels;if("number"==typeof e){if(void 0===t[e])throw Error("unknown level value"+e);e=t[e]}if(void 0===r[e])throw Error("unknown level "+e);let i=this[s],o=this[s]=r[e],c=this[a],u=this[l].logMethod;for(let e in r){if(o>r[e]){this[e]=f;continue}this[e]=!function(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}}(e,c)?p(r[e],u):d[e](u)}this.emit("level-change",e,o,t[i],i)},isLevelEnabled:function(e){let{values:t}=this.levels,r=t[e];return void 0!==r&&r>=this[s]},mappings:function(e=null,t=!1){let r=e?Object.keys(e).reduce((t,r)=>(t[e[r]]=r,t),{}):null;return{labels:Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:y,r),values:Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:h,e)}},assertNoLevelCollisions:function(e,t){let{labels:r,values:i}=e;for(let e in t){if(e in i)throw Error("levels cannot be overridden");if(t[e]in r)throw Error("pre-existing level values cannot be used for new levels")}},assertDefaultLevelFound:function(e,t,r){if("number"==typeof e){if(![].concat(Object.keys(t||{}).map(e=>t[e]),r?[]:Object.keys(y).map(e=>+e),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}if(!(e in Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:h,t)))throw Error(`default level:${e} must be included in custom levels`)}}},6011(e,t,r){"use strict";let{version:i}=r(9571);e.exports={version:i}},5262(e,t,r){"use strict";let{EventEmitter:i}=r(4434),o=r(361),s=r(1517),a=r(617),{lsCacheSym:c,levelValSym:u,setLevelSym:l,getLevelSym:f,chindingsSym:p,parsedChindingsSym:h,mixinSym:d,asJsonSym:y,writeSym:g,mixinMergeStrategySym:m,timeSym:b,timeSliceIndexSym:v,streamSym:w,serializersSym:_,formattersSym:S,useOnlyCustomLevelsSym:x,needsMetadataGsym:E,redactFmtSym:O,stringifySym:k,formatOptsSym:j,stringifiersSym:T}=r(37),{getLevel:R,setLevel:P,isLevelEnabled:M,mappings:L,initialLsCache:A,genLsCache:N,assertNoLevelCollisions:C}=r(2129),{asChindings:I,asJson:D,buildFormatters:$,stringify:B}=r(711),{version:U}=r(6011),q=r(2205),F={constructor:class{},child:function(e,t){if(!e)throw Error("missing bindings for child Pino");t=t||{};let r=this[_],i=this[S],o=Object.create(this);if(!0===e.hasOwnProperty("serializers")&&(a.emit("PINODEP004"),t.serializers=e.serializers),!0===e.hasOwnProperty("formatters")&&(a.emit("PINODEP005"),t.formatters=e.formatters),!0===e.hasOwnProperty("customLevels")&&(a.emit("PINODEP006"),t.customLevels=e.customLevels),!0===e.hasOwnProperty("level")&&(a.emit("PINODEP007"),t.level=e.level),!0===t.hasOwnProperty("serializers")){for(let e in o[_]=Object.create(null),r)o[_][e]=r[e];let e=Object.getOwnPropertySymbols(r);for(var s=0;se;function z(e,t){return Object.assign(t,e)}},2205(e,t,r){"use strict";let i=r(6208),{redactFmtSym:o,wildcardFirstSym:s}=r(37),{rx:a,validator:c}=i,u=c({ERR_PATHS_MUST_BE_STRINGS:()=>"pino – redacted paths must be strings",ERR_INVALID_PATH:e=>`pino – redact paths array contains an invalid path (${e})`}),l="[Redacted]";e.exports=function(e,t){let{paths:r,censor:c}=function(e){if(Array.isArray(e))return u(e={paths:e,censor:l}),e;let{paths:t,censor:r=l,remove:i}=e;if(!1===Array.isArray(t))throw Error("pino – redact must contain an array of strings");return!0===i&&(r=void 0),u({paths:t,censor:r}),{paths:t,censor:r}}(e),f=r.reduce((e,t)=>{a.lastIndex=0;let r=a.exec(t),i=a.exec(t),o=void 0!==r[1]?r[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):r[0];if("*"===o&&(o=s),null===i)return e[o]=null,e;if(null===e[o])return e;let{index:c}=i,u=`${t.substr(c,t.length-1)}`;return e[o]=e[o]||[],o!==s&&0===e[o].length&&e[o].push(...e[s]||[]),o===s&&Object.keys(e).forEach(function(t){e[t]&&e[t].push(u)}),e[o].push(u),e},{}),p={[o]:i({paths:r,censor:c,serialize:t,strict:!1})};return[...Object.keys(f),...Object.getOwnPropertySymbols(f)].reduce((e,r)=>{if(null===f[r])e[r]=e=>((...e)=>"function"==typeof c?t(c(...e)):t(c))(e,[r]);else{let o="function"==typeof c?(e,t)=>c(e,[r,...t]):c;e[r]=i({paths:f[r],censor:o,serialize:t,strict:!1})}return e},p)}},37(e){"use strict";let t=Symbol("pino.setLevel"),r=Symbol("pino.getLevel"),i=Symbol("pino.levelVal"),o=Symbol("pino.useLevelLabels"),s=Symbol("pino.useOnlyCustomLevels"),a=Symbol("pino.mixin"),c=Symbol("pino.lsCache"),u=Symbol("pino.chindings"),l=Symbol("pino.parsedChindings"),f=Symbol("pino.asJson"),p=Symbol("pino.write"),h=Symbol("pino.redactFmt"),d=Symbol("pino.time"),y=Symbol("pino.timeSliceIndex"),g=Symbol("pino.stream"),m=Symbol("pino.stringify"),b=Symbol("pino.stringifiers"),v=Symbol("pino.end"),w=Symbol("pino.formatOpts"),_=Symbol("pino.messageKey"),S=Symbol("pino.nestedKey"),x=Symbol("pino.mixinMergeStrategy"),E=Symbol("pino.wildcardFirst"),O=Symbol.for("pino.serializers"),k=Symbol.for("pino.formatters"),j=Symbol.for("pino.hooks");e.exports={setLevelSym:t,getLevelSym:r,levelValSym:i,useLevelLabelsSym:o,mixinSym:a,lsCacheSym:c,chindingsSym:u,parsedChindingsSym:l,asJsonSym:f,writeSym:p,serializersSym:O,redactFmtSym:h,timeSym:d,timeSliceIndexSym:y,streamSym:g,stringifySym:m,stringifiersSym:b,endSym:v,formatOptsSym:w,messageKeySym:_,nestedKeySym:S,wildcardFirstSym:E,needsMetadataGsym:Symbol.for("pino.metadata"),useOnlyCustomLevelsSym:s,formattersSym:k,hooksSym:j,mixinMergeStrategySym:x}},6751(e){"use strict";e.exports={nullTime:()=>"",epochTime:()=>`,"time":${Date.now()}`,unixTime:()=>`,"time":${Math.round(Date.now()/1e3)}`,isoTime:()=>`,"time":"${new Date(Date.now()).toISOString()}"`}},711(e,t,r){"use strict";let i=r(1013),{mapHttpRequest:o,mapHttpResponse:s}=r(1265),a=r(361),c=r(8183),{lsCacheSym:u,chindingsSym:l,parsedChindingsSym:f,writeSym:p,serializersSym:h,formatOptsSym:d,endSym:y,stringifiersSym:g,stringifySym:m,wildcardFirstSym:b,needsMetadataGsym:v,redactFmtSym:w,streamSym:_,nestedKeySym:S,formattersSym:x,messageKeySym:E}=r(37);function O(){}function k(e,t,i,o){if(t&&"function"==typeof t)return j((t=t.bind(o))(e),i,e);try{let t=r(9640).prettyFactory||r(9640);return t.asMetaWrapper=j,j(t(e),i,e)}catch(e){if(e.message.startsWith("Cannot find module 'pino-pretty'"))throw Error("Missing `pino-pretty` module: `pino-pretty` must be installed separately");throw e}}function j(e,t,r){r=Object.assign({suppressFlushSyncWarning:!1},r);let i=!1;return{[v]:!0,lastLevel:0,lastMsg:null,lastObj:null,lastLogger:null,flushSync(){r.suppressFlushSyncWarning||i||(i=!0,R(t,this),t.write(e(Object.assign({level:40,msg:"pino.final with prettyPrint does not support flushing",time:Date.now()},this.chindings()))))},chindings(){let e=this.lastLogger,t=null;return e?(e.hasOwnProperty(f)?t=e[f]:(t=JSON.parse("{"+e[l].substr(1)+"}"),e[f]=t),t):null},write(r){let i=this.lastLogger,o=this.chindings(),s=this.lastTime;s=s.match(/^\d+/)?parseInt(s):s.slice(1,-1);let a=this.lastObj,c=this.lastMsg,u=i[x],l=u.log?u.log(a):a,f=i[E];c&&l&&!l.hasOwnProperty(f)&&(l[f]=c);let p=Object.assign({level:this.lastLevel,time:s},l,null),d=i[h],y=Object.keys(d);for(var m=0;m100)return JSON.stringify(e);for(var a=0;a=32;a++)(34===(o=e.charCodeAt(a))||92===o)&&(t+=e.slice(r,a)+"\\",r=a,i=!0);return i?t+=e.slice(r):t=e,o<32?JSON.stringify(e):'"'+t+'"'})(o);break;default:o=(e||s)(o)}if(void 0===o)continue;w+=',"'+t+'":'+o}return w+c},genLog:function(e,t){if(!t)return r;return function(...i){t.call(this,i,r,e)};function r(t,...a){if("object"==typeof t){let r,c=t;null!==t&&(t.method&&t.headers&&t.socket?t=o(t):"function"==typeof t.setHeader&&(t=s(t))),this[S]&&(t={[this[S]]:t}),null===c&&0===a.length?r=[null]:(c=a.shift(),r=a),this[p](t,i(c,r,this[d]),e)}else this[p](null,i(t,a,this[d]),e)}},createArgsNormalizer:function(e){return function(t,r={},i){var o;if("string"==typeof r?(i=T({dest:r,sync:!0}),r={}):"string"==typeof i?i=T({dest:i,sync:!0}):(r instanceof a||r.writable||r._writableState)&&(i=r,r=null),"extreme"in(r=Object.assign({},e,r)))throw Error("The extreme option has been removed, use pino.destination({ sync: false }) instead");if("onTerminated"in r)throw Error("The onTerminated option has been removed, use pino.final instead");"changeLevelName"in r&&(process.emitWarning("The changeLevelName option is deprecated and will be removed in v7. Use levelKey instead.",{code:"changeLevelName_deprecation"}),r.levelKey=r.changeLevelName,delete r.changeLevelName);let{enabled:s,prettyPrint:c,prettifier:u,messageKey:l}=r;return!1===s&&(r.level="silent"),(i=i||process.stdout)===process.stdout&&i.fd>=0&&(o=i).write===o.constructor.prototype.write&&(i=T({fd:i.fd,sync:!0})),c&&(i=k(Object.assign({messageKey:l},c),u,i,t)),{opts:r,stream:i}}},final:function(e,t){if(void 0===e||"function"!=typeof e.child)throw Error("expected a pino logger instance");let r=void 0!==t;if(r&&"function"!=typeof t)throw Error("if supplied, the handler parameter should be a function");let i=e[_];if("function"!=typeof i.flushSync)throw Error("final requires a stream that has a flushSync method, such as pino.destination");let o=new Proxy(e,{get:(e,t)=>t in e.levels.values?(...r)=>{e[t](...r),i.flushSync()}:e[t]});return r?(e=null,...r)=>{try{i.flushSync()}catch(e){}return t(e,o,...r)}:o},stringify:function(e){try{return JSON.stringify(e)}catch(t){return c(e)}},buildFormatters:function(e,t,r){return{level:e,bindings:t,log:r}}}},2306(e,t,r){"use strict";let i=r(857),o=r(1265),s=r(2205),a=r(6751),c=r(5262),u=r(37),{assertDefaultLevelFound:l,mappings:f,genLsCache:p}=r(2129),{createArgsNormalizer:h,asChindings:d,final:y,stringify:g,buildSafeSonicBoom:m,buildFormatters:b,noop:v}=r(711),{version:w}=r(6011),{mixinMergeStrategySym:_}=r(37),{chindingsSym:S,redactFmtSym:x,serializersSym:E,timeSym:O,timeSliceIndexSym:k,streamSym:j,stringifySym:T,stringifiersSym:R,setLevelSym:P,endSym:M,formatOptsSym:L,messageKeySym:A,nestedKeySym:N,mixinSym:C,useOnlyCustomLevelsSym:I,formattersSym:D,hooksSym:$}=u,{epochTime:B,nullTime:U}=a,{pid:q}=process,F=i.hostname(),W=o.err,z={level:"info",messageKey:"msg",nestedKey:null,enabled:!0,prettyPrint:!1,base:{pid:q,hostname:F},serializers:Object.assign(Object.create(null),{err:W}),formatters:Object.assign(Object.create(null),{bindings:e=>e,level:(e,t)=>({level:t})}),hooks:{logMethod:void 0},timestamp:B,name:void 0,redact:null,customLevels:null,levelKey:void 0,useOnlyCustomLevels:!1},G=h(z),H=Object.assign(Object.create(null),o);function J(...e){var t,r;let i={},{opts:o,stream:a}=G(i,...e),{redact:u,crlf:h,serializers:y,timestamp:m,messageKey:w,nestedKey:q,base:F,name:W,level:H,customLevels:V,useLevelLabels:Y,changeLevelName:Q,levelKey:X,mixin:Z,mixinMergeStrategy:ee,useOnlyCustomLevels:et,formatters:er,hooks:en}=o,ei=b(er.level,er.bindings,er.log);Y&&!(Q||X)?(process.emitWarning("useLevelLabels is deprecated, use the formatters.level option instead","Warning","PINODEP001"),ei.level=K):(Q||X)&&!Y?(process.emitWarning("changeLevelName and levelKey are deprecated, use the formatters.level option instead","Warning","PINODEP002"),t=Q||X,ei.level=function(e,r){return{[t]:r}}):(Q||X)&&Y&&(process.emitWarning("useLevelLabels is deprecated, use the formatters.level option instead","Warning","PINODEP001"),process.emitWarning("changeLevelName and levelKey are deprecated, use the formatters.level option instead","Warning","PINODEP002"),r=Q||X,ei.level=function(e,t){return{[r]:e}}),y[Symbol.for("pino.*")]&&(process.emitWarning("The pino.* serializer is deprecated, use the formatters.log options instead","Warning","PINODEP003"),ei.log=y[Symbol.for("pino.*")]),ei.bindings||(ei.bindings=z.formatters.bindings),ei.level||(ei.level=z.formatters.level);let eo=u?s(u,g):{},es=u?{stringify:eo[x]}:{stringify:g},ea="}"+(h?`\r `:` -`),ec=d.bind(null,{[S]:"",[E]:g,[R]:eo,[T]:y,[D]:ei}),eu="";null!==F&&(eu=ec(void 0===W?F:Object.assign({},F,{name:W})));let el=m instanceof Function?m:m?B:q,ef=el().indexOf(":")+1;if(et&&!V)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(Z&&"function"!=typeof Z)throw Error(`Unknown mixin type "${typeof Z}" - expected "function"`);return l(H,V,et),Object.assign(i,{levels:f(V,et),[I]:et,[j]:a,[O]:el,[k]:ef,[T]:y,[R]:eo,[M]:ea,[L]:es,[A]:w,[N]:U,[E]:g,[C]:Z,[_]:ee,[S]:eu,[D]:ei,[$]:en,silent:v}),Object.setPrototypeOf(i,c()),p(i),i[P](H),i}function K(e,t){return{level:e}}e.exports=J,e.exports.extreme=(e=process.stdout.fd)=>(process.emitWarning("The pino.extreme() option is deprecated and will be removed in v7. Use pino.destination({ sync: false }) instead.",{code:"extreme_deprecation"}),m({dest:e,minLength:4096,sync:!1})),e.exports.destination=(e=process.stdout.fd)=>"object"==typeof e?(e.dest=e.dest||process.stdout.fd,m(e)):m({dest:e,minLength:0,sync:!0}),e.exports.final=g,e.exports.levels=f(),e.exports.stdSerializers=H,e.exports.stdTimeFunctions=Object.assign({},a),e.exports.symbols=u,e.exports.version=w,e.exports.default=J,e.exports.pino=J},1265(e,t,r){"use strict";let i=r(9950),o=r(6565),s=r(1075);e.exports={err:i,mapHttpRequest:o.mapHttpRequest,mapHttpResponse:s.mapHttpResponse,req:o.reqSerializer,res:s.resSerializer,wrapErrorSerializer:function(e){return e===i?e:function(t){return e(i(t))}},wrapRequestSerializer:function(e){return e===o.reqSerializer?e:function(t){return e(o.reqSerializer(t))}},wrapResponseSerializer:function(e){return e===s.resSerializer?e:function(t){return e(s.resSerializer(t))}}}},9950(e){"use strict";e.exports=function e(i){if(!(i instanceof Error))return i;i[r]=void 0;let s=Object.create(o);for(let o in s.type="[object Function]"===t.call(i.constructor)?i.constructor.name:i.name,s.message=i.message,s.stack=i.stack,i)if(void 0===s[o]){let t=i[o];t instanceof Error?t.hasOwnProperty(r)||(s[o]=e(t)):s[o]=t}return delete i[r],s.raw=i,s};let{toString:t}=Object.prototype,r=Symbol("circular-ref-tag"),i=Symbol("pino-raw-err-ref"),o=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[i]},set:function(e){this[i]=e}}});Object.defineProperty(o,i,{writable:!0,value:{}})},6565(e){"use strict";e.exports={mapHttpRequest:function(e){return{req:i(e)}},reqSerializer:i};let t=Symbol("pino-raw-req-ref"),r=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[t]},set:function(e){this[t]=e}}});function i(e){let t=e.info||e.socket,i=Object.create(r);return i.id="function"==typeof e.id?e.id():e.id||(e.info?e.info.id:void 0),i.method=e.method,e.originalUrl?(i.url=e.originalUrl,i.query=e.query,i.params=e.params):i.url=e.path||(e.url?e.url.path||e.url:void 0),i.headers=e.headers,i.remoteAddress=t&&t.remoteAddress,i.remotePort=t&&t.remotePort,i.raw=e.raw||e,i}Object.defineProperty(r,t,{writable:!0,value:{}})},1075(e){"use strict";e.exports={mapHttpResponse:function(e){return{res:i(e)}},resSerializer:i};let t=Symbol("pino-raw-res-ref"),r=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[t]},set:function(e){this[t]=e}}});function i(e){let t=Object.create(r);return t.statusCode=e.statusCode,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}Object.defineProperty(r,t,{writable:!0,value:{}})},9271(e,t,r){"use strict";let{format:i}=r(9023);e.exports=function(){let e={},t=new Map;return{create:function(r,o,s){if(!r)throw Error("Warning name must not be empty");if(!o)throw Error("Warning code must not be empty");if(!s)throw Error("Warning message must not be empty");if(void 0!==e[o=o.toUpperCase()])throw Error(`The code '${o}' already exist`);return t.set(o,!1),e[o]=function(e,t,a){let c;return c=e&&t&&a?i(s,e,t,a):e&&t?i(s,e,t):e?i(s,e):s,{code:o,name:r,message:c}},e[o]},emit:function(r,i,o,s){if(void 0===e[r])throw Error(`The code '${r}' does not exist`);if(!0===t.get(r))return;t.set(r,!0);let a=e[r](i,o,s);process.emitWarning(a.message,a.name,a.code)},emitted:t}}},6586(e,t,r){var i=r(5645),o=r(5486),s=r(9896),a=function(){},c=/^v?\.0/.test(process.version),u=function(e){return"function"==typeof e},l=function(e,t,r,l){l=i(l);var f=!1;e.on("close",function(){f=!0}),o(e,{readable:t,writable:r},function(e){if(e)return l(e);f=!0,l()});var p=!1;return function(t){if(!f&&!p){if(p=!0,c&&s&&(e instanceof(s.ReadStream||a)||e instanceof(s.WriteStream||a))&&u(e.close))return e.close(a);if(e.setHeader&&u(e.abort))return e.abort();if(u(e.destroy))return e.destroy();l(t||Error("stream was destroyed"))}}},f=function(e){e()},p=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=u(t[t.length-1]||a)&&t.pop()||a;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw Error("pump requires two streams per minimum");var i=t.map(function(o,s){var a=s0,function(t){e||(e=t),t&&i.forEach(f),a||(i.forEach(f),r(e))})});return t.reduce(p)}},1013(e){"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,r,i){var o=i&&i.stringify||t;if("object"==typeof e&&null!==e){var s=r.length+1;if(1===s)return e;var a=Array(s);a[0]=o(e);for(var c=1;c-1?p:0,e.charCodeAt(d+1)){case 100:case 102:if(f>=u||null==r[f])break;p=u||null==r[f])break;p=u||void 0===r[f])break;p",p=d+2,d++;break}l+=o(r[f]),p=d+2,d++;break;case 115:if(f>=u)break;pString(e)),r>2)?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){var o,s,a,c;let u,l;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(u="must not be",t=t.replace(/^not /,"")):u="must be",s=" argument",(void 0===a||a>e.length)&&(a=e.length),e.substring(a-s.length,a)===s)l=`The ${e} ${u} ${i(t,"type")}`;else{let r=("number"!=typeof c&&(c=0),c+1>e.length||-1===e.indexOf(".",c))?"argument":"property";l=`The "${e}" ${r} ${u} ${i(t,"type")}`}return l+`. Received type ${typeof r}`},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},5535(e,t,r){"use strict";var i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=r(605),s=r(3581);r(3081)(l,o);for(var a=i(s.prototype),c=0;c0)if("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===f.prototype||(a=t,t=f.from(a)),i)u.endEmitted?S(e,new _):j(e,u,t,!0);else if(u.ended)S(e,new v);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(t=u.decoder.write(t),u.objectMode||0!==t.length?j(e,u,t,!1):M(e,u)):j(e,u,t,!1)}else i||(u.reading=!1,M(e,u));return!u.ended&&(u.lengtht.highWaterMark&&((r=e)>=0x40000000?r=0x40000000:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),t.highWaterMark=r),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function R(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(P,e))}function P(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,I(e)}function M(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(L,e,t))}function L(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){o("readable nexttick read 0"),e.read(0)}function C(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function $(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(B,t,e))}function B(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function q(e,t){for(var r=0,i=e.length;r=r.highWaterMark:r.length>0)||r.ended))return o("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?$(this):R(this),null;if(0===(e=T(e,r))&&r.ended)return 0===r.length&&$(this),null;var s=r.needReadable;return o("need readable",s),(0===r.length||r.length-e0?D(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),i!==e&&r.ended&&$(this)),null!==t&&this.emit("data",t),t},O.prototype._read=function(e){S(this,new w("_read()"))},O.prototype.pipe=function(e,t){var r,i=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,o("pipe count=%d opts=%j",s.pipesCount,t);var a=t&&!1===t.end||e===process.stdout||e===process.stderr?y:c;function c(){o("onend"),e.end()}s.endEmitted?process.nextTick(a):i.once("end",a),e.on("unpipe",function t(r,a){o("onunpipe"),r===i&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",d),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",t),i.removeListener("end",c),i.removeListener("end",y),i.removeListener("data",p),f=!0,s.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l())});var l=(r=i,function(){var e=r._readableState;o("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&u(r,"data")&&(e.flowing=!0,I(r))});e.on("drain",l);var f=!1;function p(t){o("ondata");var r=e.write(t);o("dest.write",r),!1===r&&((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==q(s.pipes,e))&&!f&&(o("false write response, pause",s.awaitDrain),s.awaitDrain++),i.pause())}function h(t){o("onerror",t),y(),e.removeListener("error",h),0===u(e,"error")&&S(e,t)}function d(){e.removeListener("finish",g),y()}function g(){o("onfinish"),e.removeListener("close",d),y()}function y(){o("unpipe"),i.unpipe(e)}return i.on("data",p),!function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",d),e.once("finish",g),e.emit("pipe",i),s.flowing||(o("pipe resume"),i.resume()),e},O.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s0,!1!==i.flowing&&this.resume()):"readable"!==e||i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,o("on readable",i.length,i.reading),i.length?R(this):i.reading||process.nextTick(N,this)),r},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function(e,t){var r=l.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(A,this),r},O.prototype.removeAllListeners=function(e){var t=l.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&process.nextTick(A,this),t},O.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(o("resume"),r.flowing=!r.readableListening,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,process.nextTick(C,e,t))),r.paused=!1,this},O.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},O.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var s in e.on("end",function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(s){o("wrapped data"),r.decoder&&(s=r.decoder.write(s)),r.objectMode&&null==s||(r.objectMode||s&&s.length)&&(t.push(s)||(i=!0,e.pause()))}),e)void 0===this[s]&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var a=0;a-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),O.prototype._write=function(e,t,r){r(new g("_write()"))},O.prototype._writev=null,O.prototype.end=function(e,t,r){var i,o,s,a=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),a.corked&&(a.corked=1,this.uncork()),a.ending||(i=this,o=a,s=r,o.ending=!0,M(i,o),s&&(o.finished?process.nextTick(s):i.once("finish",s)),o.ended=!0,i.writable=!1),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),O.prototype.destroy=f.destroy,O.prototype._undestroy=f.undestroy,O.prototype._destroy=function(e,t){t(e)}},916(e,t,r){"use strict";function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o,s=r(9919),a=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),l=Symbol("ended"),f=Symbol("lastPromise"),p=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t}}function g(e){var t=e[a];if(null!==t){var r=e[h].read();null!==r&&(e[f]=null,e[a]=null,e[c]=null,t(d(r,!1)))}}function y(e){process.nextTick(g,e)}var m=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((i(o={get stream(){return this[h]},next:function(){var e,t,r=this,i=this[u];if(null!==i)return Promise.reject(i);if(this[l])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise(function(e,t){process.nextTick(function(){r[u]?t(r[u]):e(d(void 0,!0))})});var o=this[f];if(o)t=new Promise((e=this,function(t,r){o.then(function(){e[l]?t(d(void 0,!0)):e[p](t,r)},r)}));else{var s=this[h].read();if(null!==s)return Promise.resolve(d(s,!1));t=new Promise(this[p])}return this[f]=t,t}},Symbol.asyncIterator,function(){return this}),i(o,"return",function(){var e=this;return new Promise(function(t,r){e[h].destroy(null,function(e){e?r(e):t(d(void 0,!0))})})}),o),m);e.exports=function(e){var t,r=Object.create(b,(i(t={},h,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,l,{value:e._readableState.endEmitted,writable:!0}),i(t,p,{value:function(e,t){var i=r[h].read();i?(r[f]=null,r[a]=null,r[c]=null,e(d(i,!1))):(r[a]=e,r[c]=t)},writable:!0}),t));return r[f]=null,s(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[c];null!==t&&(r[f]=null,r[a]=null,r[c]=null,t(e)),r[u]=e;return}var i=r[a];null!==i&&(r[f]=null,r[a]=null,r[c]=null,i(d(void 0,!0))),r[l]=!0}),e.on("readable",y.bind(null,r)),r}},408(e,t,r){"use strict";function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}var o=r(181).Buffer,s=r(9023).inspect,a=s&&s.custom||"inspect";e.exports=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.head=null,this.tail=null,this.length=0}return e=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,r,i=o.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=a,o.prototype.copy.call(t,i,r),a+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var r;return eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0==(e-=s)){s===o.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(s));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var s=r.data,a=e>s.length?s.length:e;if(s.copy(t,t.length-e,0,a),0==(e-=a)){a===s.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=s.slice(a));break}++i}return this.length-=i,t}},{key:a,value:function(e,t){return s(this,function(e){for(var t=1;t0,l=c=function(e){t||(t=e),e&&d.forEach(u),m||(d.forEach(u),h(t))},p=!1,c=function(){p||(p=!0,l.apply(void 0,arguments))},g=!1,e.on("close",function(){g=!0}),void 0===i&&(i=r(9919)),i(e,{readable:m,writable:s},function(e){if(e)return c(e);g=!0,c()}),y=!1,function(t){if(!g&&!y){if(y=!0,e.setHeader&&"function"==typeof e.abort)return e.abort();if("function"==typeof e.destroy)return e.destroy();c(t||new a("pipe"))}}});return f.reduce(l)}},6906(e,t,r){"use strict";var i=r(8396).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,o){var s=null!=t.highWaterMark?t.highWaterMark:o?t[r]:null;if(null!=s){if(!(isFinite(s)&&Math.floor(s)===s)||s<0)throw new i(o?r:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},5251(e,t,r){e.exports=r(2203)},9491(e,t,r){var i=r(2203);"disable"===process.env.READABLE_STREAM&&i?(e.exports=i.Readable,Object.assign(e.exports,i),e.exports.Stream=i):((t=e.exports=r(605)).Stream=i||t,t.Readable=t,t.Writable=r(3581),t.Duplex=r(5535),t.Transform=r(9585),t.PassThrough=r(419),t.finished=r(9919),t.pipeline=r(5629))},9460(e){"use strict";function t(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){if((e=e||{}).circles){var r=e,i=[],o=[];return r.proto?function e(r){if("object"!=typeof r||null===r)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return s(r,e);if(r instanceof Map)return new Map(s(Array.from(r),e));if(r instanceof Set)return new Set(s(Array.from(r),e));var a={};for(var c in i.push(r),o.push(a),r){var u=r[c];if("object"!=typeof u||null===u)a[c]=u;else if(u instanceof Date)a[c]=new Date(u);else if(u instanceof Map)a[c]=new Map(s(Array.from(u),e));else if(u instanceof Set)a[c]=new Set(s(Array.from(u),e));else if(ArrayBuffer.isView(u))a[c]=t(u);else{var l=i.indexOf(u);-1!==l?a[c]=o[l]:a[c]=e(u)}}return i.pop(),o.pop(),a}:function e(r){if("object"!=typeof r||null===r)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return s(r,e);if(r instanceof Map)return new Map(s(Array.from(r),e));if(r instanceof Set)return new Set(s(Array.from(r),e));var a={};for(var c in i.push(r),o.push(a),r)if(!1!==Object.hasOwnProperty.call(r,c)){var u=r[c];if("object"!=typeof u||null===u)a[c]=u;else if(u instanceof Date)a[c]=new Date(u);else if(u instanceof Map)a[c]=new Map(s(Array.from(u),e));else if(u instanceof Set)a[c]=new Set(s(Array.from(u),e));else if(ArrayBuffer.isView(u))a[c]=t(u);else{var l=i.indexOf(u);-1!==l?a[c]=o[l]:a[c]=e(u)}}return i.pop(),o.pop(),a};function s(e,r){for(var s=Object.keys(e),a=Array(s.length),c=0;ctypeof Buffer,r=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,i=/"(?: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 o(e,o,a){null==a&&(null!==o&&"object"==typeof o?(a=o,o=void 0):a={});let c=a.protoAction||"error",u=a.constructorAction||"error";t&&Buffer.isBuffer(e)&&(e=e.toString()),e&&65279===e.charCodeAt(0)&&(e=e.slice(1));let l=JSON.parse(e,o);if("ignore"===c&&"ignore"===u||null===l||"object"!=typeof l)return l;if("ignore"!==c&&"ignore"!==u){if(!1===r.test(e)&&!1===i.test(e))return l}else if("ignore"!==c&&"ignore"===u){if(!1===r.test(e))return l}else if(!1===i.test(e))return l;return s(l,{protoAction:c,constructorAction:u}),l}function s(e,{protoAction:t="error",constructorAction:r="error"}={}){let i=[e];for(;i.length;){let e=i;for(let o of(i=[],e)){if("ignore"!==t&&Object.prototype.hasOwnProperty.call(o,"__proto__")){if("error"===t)throw SyntaxError("Object contains forbidden prototype property");delete o.__proto__}if("ignore"!==r&&Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype")){if("error"===r)throw SyntaxError("Object contains forbidden prototype property");delete o.constructor}for(let e in o){let t=o[e];t&&"object"==typeof t&&i.push(o[e])}}}}e.exports={parse:o,scan:s,safeParse:function(e,t){try{return o(e,t)}catch(e){return null}}}},361(e,t,r){"use strict";let i=r(9896),o=r(4434),s=r(1517),a=r(9023).inherits,c=r(7048);function u(e,t){function r(r,i){if(r){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",r)}):t.emit("error",r);return}if(t.fd=i,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),t._reopening)return;let o=t._buf.length;o>0&&o>t.minLength&&!t.destroyed&&p(t)}if(t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1,t.sync)try{let t=i.openSync(e,"a");r(null,t)}catch(e){throw r(e),e}else i.open(e,"a",r)}function l(e){if(!(this instanceof l))return new l(e);let{fd:t,dest:r,minLength:o,sync:s}=e||{};if(t=t||r,this._buf="",this.fd=-1,this._writing=!1,this._writingBuf="",this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this.file=null,this.destroyed=!1,this.sync=s||!1,this.minLength=o||0,"number"==typeof t)this.fd=t,process.nextTick(()=>this.emit("ready"));else if("string"==typeof t)u(t,this);else throw Error("SonicBoom supports only file descriptors and files");this.release=(e,t)=>{if(e){if("EAGAIN"===e.code)if(this.sync)try{c(100),this.release(void 0,0)}catch(e){this.release(e)}else setTimeout(()=>{i.write(this.fd,this._writingBuf,"utf8",this.release)},100);else this._buf=this._writingBuf+this._buf,this._writingBuf="",this._writing=!1,this.emit("error",e);return}if(this._writingBuf.length!==t){if(this._writingBuf=this._writingBuf.slice(t),!this.sync)return void i.write(this.fd,this._writingBuf,"utf8",this.release);try{do t=i.writeSync(this.fd,this._writingBuf,"utf8"),this._writingBuf=this._writingBuf.slice(t);while(0!==this._writingBuf.length)}catch(e){this.release(e);return}}if(this._writingBuf="",this.destroyed)return;let r=this._buf.length;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):r>0&&r>this.minLength?p(this):this._ending?r>0?p(this):(this._writing=!1,h(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(f,this)):this.emit("drain"))},this.on("newListener",function(e){"drain"===e&&(this._asyncDrainScheduled=!1)})}function f(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}function p(e){e._writing=!0;let t=e._buf,r=e.release;if(t.length>0x1000000?(t=t.slice(0,0x1000000),e._buf=e._buf.slice(0x1000000)):e._buf="",s(t),e._writingBuf=t,e.sync)try{let o=i.writeSync(e.fd,t,"utf8");r(null,o)}catch(e){r(e)}else i.write(e.fd,t,"utf8",r)}function h(e){-1===e.fd?e.once("ready",h.bind(null,e)):(i.close(e.fd,t=>{t?e.emit("error",t):(e._ending&&!e._writing&&e.emit("finish"),e.emit("close"))}),e.destroyed=!0,e._buf="")}a(l,o),l.prototype.write=function(e){if(this.destroyed)throw Error("SonicBoom destroyed");this._buf+=e;let t=this._buf.length;return!this._writing&&t>this.minLength&&p(this),t<16384},l.prototype.flush=function(){if(this.destroyed)throw Error("SonicBoom destroyed");this._writing||this.minLength<=0||p(this)},l.prototype.reopen=function(e){if(this.destroyed)throw Error("SonicBoom destroyed");if(this._opening)return void this.once("ready",()=>{this.reopen(e)});if(this._ending)return;if(!this.file)throw Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&i.close(t,e=>{if(e)return this.emit("error",e)})}),u(e||this.file,this)},l.prototype.end=function(){if(this.destroyed)throw Error("SonicBoom destroyed");this._opening?this.once("ready",()=>{this.end()}):this._ending||((this._ending=!0,!this._writing&&this._buf.length>0&&this.fd>=0)?p(this):this._writing||h(this))},l.prototype.flushSync=function(){if(this.destroyed)throw Error("SonicBoom destroyed");if(this.fd<0)throw Error("sonic boom is not ready yet");for(;this._buf.length>0;)try{i.writeSync(this.fd,this._buf,"utf8"),this._buf=""}catch(e){if("EAGAIN"!==e.code)throw e;c(100)}},l.prototype.destroy=function(){this.destroyed||h(this)},e.exports=l},202(e,t,r){"use strict";let{Transform:i}=r(2203),{StringDecoder:o}=r(3193),s=Symbol("last"),a=Symbol("decoder");function c(e,t,r){let i;if(this.overflow){if(1===(i=this[a].write(e).split(this.matcher)).length)return r();i.shift(),this.overflow=!1}else this[s]+=this[a].write(e),i=this[s].split(this.matcher);this[s]=i.pop();for(let e=0;ethis.maxLength,this.overflow&&!this.skipOverflow)?r(Error("maximum buffer reached")):r()}function u(e){if(this[s]+=this[a].end(),this[s])try{l(this,this.mapper(this[s]))}catch(t){return e(t)}e()}function l(e,t){void 0!==t&&e.push(t)}function f(e){return e}e.exports=function(e,t,r){switch(e=e||/\r?\n/,t=t||f,r=r||{},arguments.length){case 1:"function"==typeof e?(t=e,e=/\r?\n/):"object"!=typeof e||e instanceof RegExp||(r=e,e=/\r?\n/);break;case 2:"function"==typeof e?(r=t,t=e,e=/\r?\n/):"object"==typeof t&&(r=t,t=f)}(r=Object.assign({},r)).autoDestroy=!0,r.transform=c,r.flush=u,r.readableObjectMode=!0;let l=new i(r);return l[s]="",l[a]=new o("utf8"),l.matcher=e,l.mapper=t,l.maxLength=r.maxLength,l.skipOverflow=r.skipOverflow||!1,l.overflow=!1,l._destroy=function(e,t){this._writableState.errorEmitted=!1,t(e)},l}},3049(e){e.exports=function(e){var t,r=e._readableState;return r?r.objectMode||"number"==typeof e._duplexState?e.read():e.read((t=r).buffer.length?t.buffer.head?t.buffer.head.data.length:t.buffer[0].length:t.length):null}},7549(e,t,r){"use strict";var i=r(1144).Buffer,o=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===o||!o(e)))throw Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=c,t=4;break;case"base64":this.text=f,this.end=p,t=3;break;default:this.write=h,this.end=d;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function c(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.I=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(o>0&&(e.lastNeed=o-1),o):--i=0?(o>0&&(e.lastNeed=o-2),o):--i=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},2664(e,t,r){e.exports=r(9023).deprecate},4037(e){e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw TypeError("need wrapper function");return Object.keys(t).forEach(function(e){i[e]=t[e]}),i;function i(){for(var e=Array(arguments.length),r=0;ro+(a<0?s:h(a,s,r,i)),d=(e,t,r)=>((e,t,r=e,i=e.length+1)=>o=>{let s;return o||""!==o&&void 0!==o?(s=(""+o).indexOf(t,i),s<0?e+o+t:e+h(s,o,t,r)+t):""})(`\x1b[${e}m`,`\x1b[${t}m`,r),g={reset:d(0,0),bold:d(1,22,"\x1b[22m\x1b[1m"),dim:d(2,22,"\x1b[22m\x1b[2m"),italic:d(3,23),underline:d(4,24),inverse:d(7,27),hidden:d(8,28),strikethrough:d(9,29),black:d(30,39),red:d(31,39),green:d(32,39),yellow:d(33,39),blue:d(34,39),magenta:d(35,39),cyan:d(36,39),white:d(37,39),gray:d(90,39),bgBlack:d(40,49),bgRed:d(41,49),bgGreen:d(42,49),bgYellow:d(43,49),bgBlue:d(44,49),bgMagenta:d(45,49),bgCyan:d(46,49),bgWhite:d(47,49),blackBright:d(90,39),redBright:d(91,39),greenBright:d(92,39),yellowBright:d(93,39),blueBright:d(94,39),magentaBright:d(95,39),cyanBright:d(96,39),whiteBright:d(97,39),bgBlackBright:d(100,49),bgRedBright:d(101,49),bgGreenBright:d(102,49),bgYellowBright:d(103,49),bgBlueBright:d(104,49),bgMagentaBright:d(105,49),bgCyanBright:d(106,49),bgWhiteBright:d(107,49)},y=e=>e,m=({useColor:e=p}={})=>e?g:Object.keys(g).reduce((e,t)=>({...e,[t]:y}),{}),{reset:b,bold:v,dim:w,italic:_,underline:S,inverse:x,hidden:E,strikethrough:O,black:k,red:j,green:T,yellow:R,blue:P,magenta:M,cyan:L,white:A,gray:N,bgBlack:C,bgRed:I,bgGreen:D,bgYellow:$,bgBlue:B,bgMagenta:q,bgCyan:U,bgWhite:F,blackBright:W,redBright:G,greenBright:z,yellowBright:H,blueBright:J,magentaBright:K,cyanBright:V,whiteBright:Y,bgBlackBright:Q,bgRedBright:X,bgGreenBright:Z,bgYellowBright:ee,bgBlueBright:et,bgMagentaBright:er,bgCyanBright:en,bgWhiteBright:ei}=m();t.bgBlack=C,t.bgBlackBright=Q,t.bgBlue=B,t.bgBlueBright=et,t.bgCyan=U,t.bgCyanBright=en,t.bgGreen=D,t.bgGreenBright=Z,t.bgMagenta=q,t.bgMagentaBright=er,t.bgRed=I,t.bgRedBright=X,t.bgWhite=F,t.bgWhiteBright=ei,t.bgYellow=$,t.bgYellowBright=ee,t.black=k,t.blackBright=W,t.blue=P,t.blueBright=J,t.bold=v,t.createColors=m,t.cyan=L,t.cyanBright=V,t.dim=w,t.gray=N,t.green=T,t.greenBright=z,t.hidden=E,t.inverse=x,t.isColorSupported=p,t.italic=_,t.magenta=M,t.magentaBright=K,t.red=j,t.redBright=G,t.reset=b,t.strikethrough=O,t.underline=S,t.white=A,t.whiteBright=Y,t.yellow=R,t.yellowBright=H},9640(e,t,r){"use strict";let{isColorSupported:i}=r(6666),o=r(6586),{Transform:s}=r(9491),a=r(3710),c=r(4045),u=r(5550),{ERROR_LIKE_KEYS:l,MESSAGE_KEY:f,TIMESTAMP_KEY:p,LEVEL_KEY:h,LEVEL_NAMES:d}=r(4249),{isObject:g,prettifyErrorLog:y,prettifyLevel:m,prettifyMessage:b,prettifyMetadata:v,prettifyObject:w,prettifyTime:_,buildSafeSonicBoom:S,filterLog:x}=r(2349),E={colorize:i,crlf:!1,errorLikeObjectKeys:l,errorProps:"",customLevels:null,customColors:null,useOnlyCustomProps:!0,levelFirst:!1,messageKey:f,messageFormat:!1,timestampKey:p,translateTime:!1,useMetadata:!1,outputStream:process.stdout,customPrettifiers:{},hideObject:!1,singleLine:!1};function O(e){let t=Object.assign({},E,e),r=t.crlf?`\r +`),ec=d.bind(null,{[S]:"",[E]:y,[R]:eo,[T]:g,[D]:ei}),eu="";null!==F&&(eu=ec(void 0===W?F:Object.assign({},F,{name:W})));let el=m instanceof Function?m:m?B:U,ef=el().indexOf(":")+1;if(et&&!V)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(Z&&"function"!=typeof Z)throw Error(`Unknown mixin type "${typeof Z}" - expected "function"`);return l(H,V,et),Object.assign(i,{levels:f(V,et),[I]:et,[j]:a,[O]:el,[k]:ef,[T]:g,[R]:eo,[M]:ea,[L]:es,[A]:w,[N]:q,[E]:y,[C]:Z,[_]:ee,[S]:eu,[D]:ei,[$]:en,silent:v}),Object.setPrototypeOf(i,c()),p(i),i[P](H),i}function K(e,t){return{level:e}}e.exports=J,e.exports.extreme=(e=process.stdout.fd)=>(process.emitWarning("The pino.extreme() option is deprecated and will be removed in v7. Use pino.destination({ sync: false }) instead.",{code:"extreme_deprecation"}),m({dest:e,minLength:4096,sync:!1})),e.exports.destination=(e=process.stdout.fd)=>"object"==typeof e?(e.dest=e.dest||process.stdout.fd,m(e)):m({dest:e,minLength:0,sync:!0}),e.exports.final=y,e.exports.levels=f(),e.exports.stdSerializers=H,e.exports.stdTimeFunctions=Object.assign({},a),e.exports.symbols=u,e.exports.version=w,e.exports.default=J,e.exports.pino=J},1265(e,t,r){"use strict";let i=r(9950),o=r(6565),s=r(1075);e.exports={err:i,mapHttpRequest:o.mapHttpRequest,mapHttpResponse:s.mapHttpResponse,req:o.reqSerializer,res:s.resSerializer,wrapErrorSerializer:function(e){return e===i?e:function(t){return e(i(t))}},wrapRequestSerializer:function(e){return e===o.reqSerializer?e:function(t){return e(o.reqSerializer(t))}},wrapResponseSerializer:function(e){return e===s.resSerializer?e:function(t){return e(s.resSerializer(t))}}}},9950(e){"use strict";e.exports=function e(i){if(!(i instanceof Error))return i;i[r]=void 0;let s=Object.create(o);for(let o in s.type="[object Function]"===t.call(i.constructor)?i.constructor.name:i.name,s.message=i.message,s.stack=i.stack,i)if(void 0===s[o]){let t=i[o];t instanceof Error?t.hasOwnProperty(r)||(s[o]=e(t)):s[o]=t}return delete i[r],s.raw=i,s};let{toString:t}=Object.prototype,r=Symbol("circular-ref-tag"),i=Symbol("pino-raw-err-ref"),o=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[i]},set:function(e){this[i]=e}}});Object.defineProperty(o,i,{writable:!0,value:{}})},6565(e){"use strict";e.exports={mapHttpRequest:function(e){return{req:i(e)}},reqSerializer:i};let t=Symbol("pino-raw-req-ref"),r=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[t]},set:function(e){this[t]=e}}});function i(e){let t=e.info||e.socket,i=Object.create(r);return i.id="function"==typeof e.id?e.id():e.id||(e.info?e.info.id:void 0),i.method=e.method,e.originalUrl?(i.url=e.originalUrl,i.query=e.query,i.params=e.params):i.url=e.path||(e.url?e.url.path||e.url:void 0),i.headers=e.headers,i.remoteAddress=t&&t.remoteAddress,i.remotePort=t&&t.remotePort,i.raw=e.raw||e,i}Object.defineProperty(r,t,{writable:!0,value:{}})},1075(e){"use strict";e.exports={mapHttpResponse:function(e){return{res:i(e)}},resSerializer:i};let t=Symbol("pino-raw-res-ref"),r=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[t]},set:function(e){this[t]=e}}});function i(e){let t=Object.create(r);return t.statusCode=e.statusCode,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}Object.defineProperty(r,t,{writable:!0,value:{}})},9271(e,t,r){"use strict";let{format:i}=r(9023);e.exports=function(){let e={},t=new Map;return{create:function(r,o,s){if(!r)throw Error("Warning name must not be empty");if(!o)throw Error("Warning code must not be empty");if(!s)throw Error("Warning message must not be empty");if(void 0!==e[o=o.toUpperCase()])throw Error(`The code '${o}' already exist`);return t.set(o,!1),e[o]=function(e,t,a){let c;return c=e&&t&&a?i(s,e,t,a):e&&t?i(s,e,t):e?i(s,e):s,{code:o,name:r,message:c}},e[o]},emit:function(r,i,o,s){if(void 0===e[r])throw Error(`The code '${r}' does not exist`);if(!0===t.get(r))return;t.set(r,!0);let a=e[r](i,o,s);process.emitWarning(a.message,a.name,a.code)},emitted:t}}},6586(e,t,r){var i=r(5645),o=r(5486),s=r(9896),a=function(){},c=/^v?\.0/.test(process.version),u=function(e){return"function"==typeof e},l=function(e,t,r,l){l=i(l);var f=!1;e.on("close",function(){f=!0}),o(e,{readable:t,writable:r},function(e){if(e)return l(e);f=!0,l()});var p=!1;return function(t){if(!f&&!p){if(p=!0,c&&s&&(e instanceof(s.ReadStream||a)||e instanceof(s.WriteStream||a))&&u(e.close))return e.close(a);if(e.setHeader&&u(e.abort))return e.abort();if(u(e.destroy))return e.destroy();l(t||Error("stream was destroyed"))}}},f=function(e){e()},p=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=u(t[t.length-1]||a)&&t.pop()||a;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw Error("pump requires two streams per minimum");var i=t.map(function(o,s){var a=s0,function(t){e||(e=t),t&&i.forEach(f),a||(i.forEach(f),r(e))})});return t.reduce(p)}},1013(e){"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,r,i){var o=i&&i.stringify||t;if("object"==typeof e&&null!==e){var s=r.length+1;if(1===s)return e;var a=Array(s);a[0]=o(e);for(var c=1;c-1?p:0,e.charCodeAt(d+1)){case 100:case 102:if(f>=u||null==r[f])break;p=u||null==r[f])break;p=u||void 0===r[f])break;p",p=d+2,d++;break}l+=o(r[f]),p=d+2,d++;break;case 115:if(f>=u)break;pString(e)),r>2)?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){var o,s,a,c;let u,l;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(u="must not be",t=t.replace(/^not /,"")):u="must be",s=" argument",(void 0===a||a>e.length)&&(a=e.length),e.substring(a-s.length,a)===s)l=`The ${e} ${u} ${i(t,"type")}`;else{let r=("number"!=typeof c&&(c=0),c+1>e.length||-1===e.indexOf(".",c))?"argument":"property";l=`The "${e}" ${r} ${u} ${i(t,"type")}`}return l+`. Received type ${typeof r}`},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},5535(e,t,r){"use strict";var i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=r(605),s=r(3581);r(3081)(l,o);for(var a=i(s.prototype),c=0;c0)if("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===f.prototype||(a=t,t=f.from(a)),i)u.endEmitted?S(e,new _):j(e,u,t,!0);else if(u.ended)S(e,new v);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(t=u.decoder.write(t),u.objectMode||0!==t.length?j(e,u,t,!1):M(e,u)):j(e,u,t,!1)}else i||(u.reading=!1,M(e,u));return!u.ended&&(u.lengtht.highWaterMark&&((r=e)>=0x40000000?r=0x40000000:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),t.highWaterMark=r),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function R(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(P,e))}function P(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,I(e)}function M(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(L,e,t))}function L(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){o("readable nexttick read 0"),e.read(0)}function C(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function $(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(B,t,e))}function B(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,i=e.length;r=r.highWaterMark:r.length>0)||r.ended))return o("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?$(this):R(this),null;if(0===(e=T(e,r))&&r.ended)return 0===r.length&&$(this),null;var s=r.needReadable;return o("need readable",s),(0===r.length||r.length-e0?D(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),i!==e&&r.ended&&$(this)),null!==t&&this.emit("data",t),t},O.prototype._read=function(e){S(this,new w("_read()"))},O.prototype.pipe=function(e,t){var r,i=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,o("pipe count=%d opts=%j",s.pipesCount,t);var a=t&&!1===t.end||e===process.stdout||e===process.stderr?g:c;function c(){o("onend"),e.end()}s.endEmitted?process.nextTick(a):i.once("end",a),e.on("unpipe",function t(r,a){o("onunpipe"),r===i&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",d),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",t),i.removeListener("end",c),i.removeListener("end",g),i.removeListener("data",p),f=!0,s.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l())});var l=(r=i,function(){var e=r._readableState;o("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&u(r,"data")&&(e.flowing=!0,I(r))});e.on("drain",l);var f=!1;function p(t){o("ondata");var r=e.write(t);o("dest.write",r),!1===r&&((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==U(s.pipes,e))&&!f&&(o("false write response, pause",s.awaitDrain),s.awaitDrain++),i.pause())}function h(t){o("onerror",t),g(),e.removeListener("error",h),0===u(e,"error")&&S(e,t)}function d(){e.removeListener("finish",y),g()}function y(){o("onfinish"),e.removeListener("close",d),g()}function g(){o("unpipe"),i.unpipe(e)}return i.on("data",p),!function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",d),e.once("finish",y),e.emit("pipe",i),s.flowing||(o("pipe resume"),i.resume()),e},O.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s0,!1!==i.flowing&&this.resume()):"readable"!==e||i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,o("on readable",i.length,i.reading),i.length?R(this):i.reading||process.nextTick(N,this)),r},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function(e,t){var r=l.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(A,this),r},O.prototype.removeAllListeners=function(e){var t=l.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&process.nextTick(A,this),t},O.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(o("resume"),r.flowing=!r.readableListening,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,process.nextTick(C,e,t))),r.paused=!1,this},O.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},O.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var s in e.on("end",function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(s){o("wrapped data"),r.decoder&&(s=r.decoder.write(s)),r.objectMode&&null==s||(r.objectMode||s&&s.length)&&(t.push(s)||(i=!0,e.pause()))}),e)void 0===this[s]&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var a=0;a-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),O.prototype._write=function(e,t,r){r(new y("_write()"))},O.prototype._writev=null,O.prototype.end=function(e,t,r){var i,o,s,a=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),a.corked&&(a.corked=1,this.uncork()),a.ending||(i=this,o=a,s=r,o.ending=!0,M(i,o),s&&(o.finished?process.nextTick(s):i.once("finish",s)),o.ended=!0,i.writable=!1),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),O.prototype.destroy=f.destroy,O.prototype._undestroy=f.undestroy,O.prototype._destroy=function(e,t){t(e)}},916(e,t,r){"use strict";function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o,s=r(9919),a=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),l=Symbol("ended"),f=Symbol("lastPromise"),p=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t}}function y(e){var t=e[a];if(null!==t){var r=e[h].read();null!==r&&(e[f]=null,e[a]=null,e[c]=null,t(d(r,!1)))}}function g(e){process.nextTick(y,e)}var m=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((i(o={get stream(){return this[h]},next:function(){var e,t,r=this,i=this[u];if(null!==i)return Promise.reject(i);if(this[l])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise(function(e,t){process.nextTick(function(){r[u]?t(r[u]):e(d(void 0,!0))})});var o=this[f];if(o)t=new Promise((e=this,function(t,r){o.then(function(){e[l]?t(d(void 0,!0)):e[p](t,r)},r)}));else{var s=this[h].read();if(null!==s)return Promise.resolve(d(s,!1));t=new Promise(this[p])}return this[f]=t,t}},Symbol.asyncIterator,function(){return this}),i(o,"return",function(){var e=this;return new Promise(function(t,r){e[h].destroy(null,function(e){e?r(e):t(d(void 0,!0))})})}),o),m);e.exports=function(e){var t,r=Object.create(b,(i(t={},h,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,l,{value:e._readableState.endEmitted,writable:!0}),i(t,p,{value:function(e,t){var i=r[h].read();i?(r[f]=null,r[a]=null,r[c]=null,e(d(i,!1))):(r[a]=e,r[c]=t)},writable:!0}),t));return r[f]=null,s(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[c];null!==t&&(r[f]=null,r[a]=null,r[c]=null,t(e)),r[u]=e;return}var i=r[a];null!==i&&(r[f]=null,r[a]=null,r[c]=null,i(d(void 0,!0))),r[l]=!0}),e.on("readable",g.bind(null,r)),r}},408(e,t,r){"use strict";function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}var o=r(181).Buffer,s=r(9023).inspect,a=s&&s.custom||"inspect";e.exports=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.head=null,this.tail=null,this.length=0}return e=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,r,i=o.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=a,o.prototype.copy.call(t,i,r),a+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var r;return eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0==(e-=s)){s===o.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(s));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var s=r.data,a=e>s.length?s.length:e;if(s.copy(t,t.length-e,0,a),0==(e-=a)){a===s.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=s.slice(a));break}++i}return this.length-=i,t}},{key:a,value:function(e,t){return s(this,function(e){for(var t=1;t0,l=c=function(e){t||(t=e),e&&d.forEach(u),m||(d.forEach(u),h(t))},p=!1,c=function(){p||(p=!0,l.apply(void 0,arguments))},y=!1,e.on("close",function(){y=!0}),void 0===i&&(i=r(9919)),i(e,{readable:m,writable:s},function(e){if(e)return c(e);y=!0,c()}),g=!1,function(t){if(!y&&!g){if(g=!0,e.setHeader&&"function"==typeof e.abort)return e.abort();if("function"==typeof e.destroy)return e.destroy();c(t||new a("pipe"))}}});return f.reduce(l)}},6906(e,t,r){"use strict";var i=r(8396).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,o){var s=null!=t.highWaterMark?t.highWaterMark:o?t[r]:null;if(null!=s){if(!(isFinite(s)&&Math.floor(s)===s)||s<0)throw new i(o?r:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},5251(e,t,r){e.exports=r(2203)},9491(e,t,r){var i=r(2203);"disable"===process.env.READABLE_STREAM&&i?(e.exports=i.Readable,Object.assign(e.exports,i),e.exports.Stream=i):((t=e.exports=r(605)).Stream=i||t,t.Readable=t,t.Writable=r(3581),t.Duplex=r(5535),t.Transform=r(9585),t.PassThrough=r(419),t.finished=r(9919),t.pipeline=r(5629))},9460(e){"use strict";function t(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){if((e=e||{}).circles){var r=e,i=[],o=[];return r.proto?function e(r){if("object"!=typeof r||null===r)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return s(r,e);if(r instanceof Map)return new Map(s(Array.from(r),e));if(r instanceof Set)return new Set(s(Array.from(r),e));var a={};for(var c in i.push(r),o.push(a),r){var u=r[c];if("object"!=typeof u||null===u)a[c]=u;else if(u instanceof Date)a[c]=new Date(u);else if(u instanceof Map)a[c]=new Map(s(Array.from(u),e));else if(u instanceof Set)a[c]=new Set(s(Array.from(u),e));else if(ArrayBuffer.isView(u))a[c]=t(u);else{var l=i.indexOf(u);-1!==l?a[c]=o[l]:a[c]=e(u)}}return i.pop(),o.pop(),a}:function e(r){if("object"!=typeof r||null===r)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return s(r,e);if(r instanceof Map)return new Map(s(Array.from(r),e));if(r instanceof Set)return new Set(s(Array.from(r),e));var a={};for(var c in i.push(r),o.push(a),r)if(!1!==Object.hasOwnProperty.call(r,c)){var u=r[c];if("object"!=typeof u||null===u)a[c]=u;else if(u instanceof Date)a[c]=new Date(u);else if(u instanceof Map)a[c]=new Map(s(Array.from(u),e));else if(u instanceof Set)a[c]=new Set(s(Array.from(u),e));else if(ArrayBuffer.isView(u))a[c]=t(u);else{var l=i.indexOf(u);-1!==l?a[c]=o[l]:a[c]=e(u)}}return i.pop(),o.pop(),a};function s(e,r){for(var s=Object.keys(e),a=Array(s.length),c=0;ctypeof Buffer,r=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,i=/"(?: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 o(e,o,a){null==a&&(null!==o&&"object"==typeof o?(a=o,o=void 0):a={});let c=a.protoAction||"error",u=a.constructorAction||"error";t&&Buffer.isBuffer(e)&&(e=e.toString()),e&&65279===e.charCodeAt(0)&&(e=e.slice(1));let l=JSON.parse(e,o);if("ignore"===c&&"ignore"===u||null===l||"object"!=typeof l)return l;if("ignore"!==c&&"ignore"!==u){if(!1===r.test(e)&&!1===i.test(e))return l}else if("ignore"!==c&&"ignore"===u){if(!1===r.test(e))return l}else if(!1===i.test(e))return l;return s(l,{protoAction:c,constructorAction:u}),l}function s(e,{protoAction:t="error",constructorAction:r="error"}={}){let i=[e];for(;i.length;){let e=i;for(let o of(i=[],e)){if("ignore"!==t&&Object.prototype.hasOwnProperty.call(o,"__proto__")){if("error"===t)throw SyntaxError("Object contains forbidden prototype property");delete o.__proto__}if("ignore"!==r&&Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype")){if("error"===r)throw SyntaxError("Object contains forbidden prototype property");delete o.constructor}for(let e in o){let t=o[e];t&&"object"==typeof t&&i.push(o[e])}}}}e.exports={parse:o,scan:s,safeParse:function(e,t){try{return o(e,t)}catch(e){return null}}}},361(e,t,r){"use strict";let i=r(9896),o=r(4434),s=r(1517),a=r(9023).inherits,c=r(7048);function u(e,t){function r(r,i){if(r){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",r)}):t.emit("error",r);return}if(t.fd=i,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),t._reopening)return;let o=t._buf.length;o>0&&o>t.minLength&&!t.destroyed&&p(t)}if(t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1,t.sync)try{let t=i.openSync(e,"a");r(null,t)}catch(e){throw r(e),e}else i.open(e,"a",r)}function l(e){if(!(this instanceof l))return new l(e);let{fd:t,dest:r,minLength:o,sync:s}=e||{};if(t=t||r,this._buf="",this.fd=-1,this._writing=!1,this._writingBuf="",this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this.file=null,this.destroyed=!1,this.sync=s||!1,this.minLength=o||0,"number"==typeof t)this.fd=t,process.nextTick(()=>this.emit("ready"));else if("string"==typeof t)u(t,this);else throw Error("SonicBoom supports only file descriptors and files");this.release=(e,t)=>{if(e){if("EAGAIN"===e.code)if(this.sync)try{c(100),this.release(void 0,0)}catch(e){this.release(e)}else setTimeout(()=>{i.write(this.fd,this._writingBuf,"utf8",this.release)},100);else this._buf=this._writingBuf+this._buf,this._writingBuf="",this._writing=!1,this.emit("error",e);return}if(this._writingBuf.length!==t){if(this._writingBuf=this._writingBuf.slice(t),!this.sync)return void i.write(this.fd,this._writingBuf,"utf8",this.release);try{do t=i.writeSync(this.fd,this._writingBuf,"utf8"),this._writingBuf=this._writingBuf.slice(t);while(0!==this._writingBuf.length)}catch(e){this.release(e);return}}if(this._writingBuf="",this.destroyed)return;let r=this._buf.length;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):r>0&&r>this.minLength?p(this):this._ending?r>0?p(this):(this._writing=!1,h(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(f,this)):this.emit("drain"))},this.on("newListener",function(e){"drain"===e&&(this._asyncDrainScheduled=!1)})}function f(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}function p(e){e._writing=!0;let t=e._buf,r=e.release;if(t.length>0x1000000?(t=t.slice(0,0x1000000),e._buf=e._buf.slice(0x1000000)):e._buf="",s(t),e._writingBuf=t,e.sync)try{let o=i.writeSync(e.fd,t,"utf8");r(null,o)}catch(e){r(e)}else i.write(e.fd,t,"utf8",r)}function h(e){-1===e.fd?e.once("ready",h.bind(null,e)):(i.close(e.fd,t=>{t?e.emit("error",t):(e._ending&&!e._writing&&e.emit("finish"),e.emit("close"))}),e.destroyed=!0,e._buf="")}a(l,o),l.prototype.write=function(e){if(this.destroyed)throw Error("SonicBoom destroyed");this._buf+=e;let t=this._buf.length;return!this._writing&&t>this.minLength&&p(this),t<16384},l.prototype.flush=function(){if(this.destroyed)throw Error("SonicBoom destroyed");this._writing||this.minLength<=0||p(this)},l.prototype.reopen=function(e){if(this.destroyed)throw Error("SonicBoom destroyed");if(this._opening)return void this.once("ready",()=>{this.reopen(e)});if(this._ending)return;if(!this.file)throw Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&i.close(t,e=>{if(e)return this.emit("error",e)})}),u(e||this.file,this)},l.prototype.end=function(){if(this.destroyed)throw Error("SonicBoom destroyed");this._opening?this.once("ready",()=>{this.end()}):this._ending||((this._ending=!0,!this._writing&&this._buf.length>0&&this.fd>=0)?p(this):this._writing||h(this))},l.prototype.flushSync=function(){if(this.destroyed)throw Error("SonicBoom destroyed");if(this.fd<0)throw Error("sonic boom is not ready yet");for(;this._buf.length>0;)try{i.writeSync(this.fd,this._buf,"utf8"),this._buf=""}catch(e){if("EAGAIN"!==e.code)throw e;c(100)}},l.prototype.destroy=function(){this.destroyed||h(this)},e.exports=l},202(e,t,r){"use strict";let{Transform:i}=r(2203),{StringDecoder:o}=r(3193),s=Symbol("last"),a=Symbol("decoder");function c(e,t,r){let i;if(this.overflow){if(1===(i=this[a].write(e).split(this.matcher)).length)return r();i.shift(),this.overflow=!1}else this[s]+=this[a].write(e),i=this[s].split(this.matcher);this[s]=i.pop();for(let e=0;ethis.maxLength,this.overflow&&!this.skipOverflow)?r(Error("maximum buffer reached")):r()}function u(e){if(this[s]+=this[a].end(),this[s])try{l(this,this.mapper(this[s]))}catch(t){return e(t)}e()}function l(e,t){void 0!==t&&e.push(t)}function f(e){return e}e.exports=function(e,t,r){switch(e=e||/\r?\n/,t=t||f,r=r||{},arguments.length){case 1:"function"==typeof e?(t=e,e=/\r?\n/):"object"!=typeof e||e instanceof RegExp||(r=e,e=/\r?\n/);break;case 2:"function"==typeof e?(r=t,t=e,e=/\r?\n/):"object"==typeof t&&(r=t,t=f)}(r=Object.assign({},r)).autoDestroy=!0,r.transform=c,r.flush=u,r.readableObjectMode=!0;let l=new i(r);return l[s]="",l[a]=new o("utf8"),l.matcher=e,l.mapper=t,l.maxLength=r.maxLength,l.skipOverflow=r.skipOverflow||!1,l.overflow=!1,l._destroy=function(e,t){this._writableState.errorEmitted=!1,t(e)},l}},3049(e){e.exports=function(e){var t,r=e._readableState;return r?r.objectMode||"number"==typeof e._duplexState?e.read():e.read((t=r).buffer.length?t.buffer.head?t.buffer.head.data.length:t.buffer[0].length:t.length):null}},7549(e,t,r){"use strict";var i=r(1144).Buffer,o=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===o||!o(e)))throw Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=c,t=4;break;case"base64":this.text=f,this.end=p,t=3;break;default:this.write=h,this.end=d;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function c(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.I=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(o>0&&(e.lastNeed=o-1),o):--i=0?(o>0&&(e.lastNeed=o-2),o):--i=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},2664(e,t,r){e.exports=r(9023).deprecate},4037(e){e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw TypeError("need wrapper function");return Object.keys(t).forEach(function(e){i[e]=t[e]}),i;function i(){for(var e=Array(arguments.length),r=0;ro+(a<0?s:h(a,s,r,i)),d=(e,t,r)=>((e,t,r=e,i=e.length+1)=>o=>{let s;return o||""!==o&&void 0!==o?(s=(""+o).indexOf(t,i),s<0?e+o+t:e+h(s,o,t,r)+t):""})(`\x1b[${e}m`,`\x1b[${t}m`,r),y={reset:d(0,0),bold:d(1,22,"\x1b[22m\x1b[1m"),dim:d(2,22,"\x1b[22m\x1b[2m"),italic:d(3,23),underline:d(4,24),inverse:d(7,27),hidden:d(8,28),strikethrough:d(9,29),black:d(30,39),red:d(31,39),green:d(32,39),yellow:d(33,39),blue:d(34,39),magenta:d(35,39),cyan:d(36,39),white:d(37,39),gray:d(90,39),bgBlack:d(40,49),bgRed:d(41,49),bgGreen:d(42,49),bgYellow:d(43,49),bgBlue:d(44,49),bgMagenta:d(45,49),bgCyan:d(46,49),bgWhite:d(47,49),blackBright:d(90,39),redBright:d(91,39),greenBright:d(92,39),yellowBright:d(93,39),blueBright:d(94,39),magentaBright:d(95,39),cyanBright:d(96,39),whiteBright:d(97,39),bgBlackBright:d(100,49),bgRedBright:d(101,49),bgGreenBright:d(102,49),bgYellowBright:d(103,49),bgBlueBright:d(104,49),bgMagentaBright:d(105,49),bgCyanBright:d(106,49),bgWhiteBright:d(107,49)},g=e=>e,m=({useColor:e=p}={})=>e?y:Object.keys(y).reduce((e,t)=>({...e,[t]:g}),{}),{reset:b,bold:v,dim:w,italic:_,underline:S,inverse:x,hidden:E,strikethrough:O,black:k,red:j,green:T,yellow:R,blue:P,magenta:M,cyan:L,white:A,gray:N,bgBlack:C,bgRed:I,bgGreen:D,bgYellow:$,bgBlue:B,bgMagenta:U,bgCyan:q,bgWhite:F,blackBright:W,redBright:z,greenBright:G,yellowBright:H,blueBright:J,magentaBright:K,cyanBright:V,whiteBright:Y,bgBlackBright:Q,bgRedBright:X,bgGreenBright:Z,bgYellowBright:ee,bgBlueBright:et,bgMagentaBright:er,bgCyanBright:en,bgWhiteBright:ei}=m();t.createColors=m,t.isColorSupported=p},9640(e,t,r){"use strict";let{isColorSupported:i}=r(6666),o=r(6586),{Transform:s}=r(9491),a=r(3710),c=r(4045),u=r(5550),{ERROR_LIKE_KEYS:l,MESSAGE_KEY:f,TIMESTAMP_KEY:p,LEVEL_KEY:h,LEVEL_NAMES:d}=r(4249),{isObject:y,prettifyErrorLog:g,prettifyLevel:m,prettifyMessage:b,prettifyMetadata:v,prettifyObject:w,prettifyTime:_,buildSafeSonicBoom:S,filterLog:x}=r(2349),E={colorize:i,crlf:!1,errorLikeObjectKeys:l,errorProps:"",customLevels:null,customColors:null,useOnlyCustomProps:!0,levelFirst:!1,messageKey:f,messageFormat:!1,timestampKey:p,translateTime:!1,useMetadata:!1,outputStream:process.stdout,customPrettifiers:{},hideObject:!1,singleLine:!1};function O(e){let t=Object.assign({},E,e),r=t.crlf?`\r `:` -`,i=" ",o=t.messageKey,s=t.levelKey,a=t.levelLabel,l=t.minimumLevel,f=t.messageFormat,p=t.timestampKey,S=t.errorLikeObjectKeys,O=t.errorProps.split(","),k="boolean"==typeof t.useOnlyCustomProps?t.useOnlyCustomProps:"true"===t.useOnlyCustomProps,j=t.customLevels?t.customLevels.split(",").reduce((e,t,r)=>{let[i,o=r]=t.split(":");return e[o]=i.toUpperCase(),e},{default:"USERLVL"}):{},T=t.customLevels?t.customLevels.split(",").reduce((e,t,r)=>{let[i,o=r]=t.split(":");return e[i.toLowerCase()]=o,e},{}):{},R=t.customColors?t.customColors.split(",").reduce((e,r)=>{let[i,o]=r.split(":"),s=(k?t.customLevels:void 0!==T[i])?T[i]:d[i];return e.push([void 0!==s?s:i,o]),e},[]):void 0,P={customLevels:j,customLevelNames:T};k&&!t.customLevels&&(P.customLevels=void 0,P.customLevelNames=void 0);let M=t.customPrettifiers,L=t.ignore?new Set(t.ignore.split(",")):void 0,A=t.hideObject,N=t.singleLine,C=u(t.colorize,R,k);return function(e){let u;if(g(e))u=e;else{let t=(e=>{try{return{value:c.parse(e,{protoAction:"remove"})}}catch(e){return{err:e}}})(e);if(t.err||!g(t.value))return e+r;u=t.value}if(l){let e=((k?t.customLevels:void 0!==T[l])?T[l]:d[l])||Number(l);if(u[void 0===s?h:s]0?`${D} ${j}`:j),R&&(D=D.length>0?`${D} ${R}:`:R),!1===D.endsWith(":")&&""!==D&&(D+=":"),E&&(D=D.length>0?`${D} ${E}`:E),D.length>0&&!N&&(D+=r),"Error"===u.type&&u.stack){let e=y({log:u,errorLikeKeys:S,errorProperties:O,ident:i,eol:r});N&&(D+=r),D+=e}else if(!A){let e=[o,s,p].filter(e=>"string"==typeof u[e]||"number"==typeof u[e]),t=w({input:u,skipKeys:e,customPrettifiers:M,errorLikeKeys:S,eol:r,ident:i,singleLine:N,colorizer:C});N&&!/^\s$/.test(t)&&(D+=" "),D+=t}return D}}function k(e={}){let t=O(e);return a(function(r){let i,a=new s({objectMode:!0,autoDestroy:!0,transform(e,r,i){i(null,t(e))}});return i="object"==typeof e.destination&&"function"==typeof e.destination.write?e.destination:S({dest:e.destination||1,append:e.append,mkdir:e.mkdir,sync:e.sync}),r.on("unknown",function(e){i.write(e+` -`)}),o(r,a,i),a},{parse:"lines"})}e.exports=k,e.exports.prettyFactory=O,e.exports.colorizerFactory=u,e.exports.default=k},5550(e,t,r){"use strict";let{LEVELS:i,LEVEL_NAMES:o}=r(4249),s=e=>e,a={default:s,60:s,50:s,40:s,30:s,20:s,10:s,message:s,greyMessage:s},{createColors:c}=r(6666),u=c({useColor:!0}),{white:l,bgRed:f,red:p,yellow:h,green:d,blue:g,gray:y,cyan:m}=u,b={default:l,60:f,50:p,40:h,30:d,20:g,10:y,message:m,greyMessage:y};function v(e){return function(t,r,{customLevels:s,customLevelNames:a}={}){let c=e?s||i:Object.assign({},i,s),u=e?a||o:Object.assign({},o,a),l="default";l=Number.isInteger(+t)?Object.prototype.hasOwnProperty.call(c,t)?t:l:Object.prototype.hasOwnProperty.call(u,t.toLowerCase())?u[t.toLowerCase()]:l;let f=c[l];return Object.prototype.hasOwnProperty.call(r,l)?r[l](f):r.default(f)}}e.exports=function(e=!1,t,r){let i,o;if(e&&void 0!==t){let e=t.reduce(function(e,[t,r]){return e[t]="function"==typeof u[r]?u[r]:l,e},{default:l,message:m,greyMessage:y}),i=r?e:Object.assign({},b,e),o=v(r),s=function(e,t){return o(e,i,t)};return s.message=s.message||i.message,s.greyMessage=s.greyMessage||i.greyMessage,s}if(e){let e,t;return e=v(r),(t=function(t,r){return e(t,b,r)}).message=b.message,t.greyMessage=b.greyMessage,t}return i=v(r),(o=function(e,t){return i(e,a,t)}).message=a.message,o.greyMessage=a.greyMessage,o}},4249(e){"use strict";e.exports={DATE_FORMAT:"yyyy-mm-dd HH:MM:ss.l o",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"]}},2349(e,t,r){"use strict";let i=r(9460)({circles:!0}),o=r(5402),s=r(2985),a=r(8183),{isMainThread:c}=r(8167),u=r(5550)(),{DATE_FORMAT:l,ERROR_LIKE_KEYS:f,MESSAGE_KEY:p,LEVEL_KEY:h,LEVEL_LABEL:d,TIMESTAMP_KEY:g,LOGGER_KEYS:y,LEVELS:m}=r(4249);function b(e,t=!1){if(!1===t)return e;let r=v(e);if(!w(r))return e;if(!0===t)return o(r,"UTC:"+l);let i=t.toUpperCase();if("SYS:STANDARD"===i)return o(r,l);let s=i.substr(0,4);return"SYS:"===s||"UTC:"===s?"UTC:"===s?o(r,t):o(r,t.slice(4)):o(r,`UTC:${t}`)}function v(e){let t=new Date(e);return w(t)?t:t=new Date(+e)}function w(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function _(e){return"[object Object]"===Object.prototype.toString.apply(e)}function S({input:e,ident:t=" ",eol:r=` +`,i=" ",o=t.messageKey,s=t.levelKey,a=t.levelLabel,l=t.minimumLevel,f=t.messageFormat,p=t.timestampKey,S=t.errorLikeObjectKeys,O=t.errorProps.split(","),k="boolean"==typeof t.useOnlyCustomProps?t.useOnlyCustomProps:"true"===t.useOnlyCustomProps,j=t.customLevels?t.customLevels.split(",").reduce((e,t,r)=>{let[i,o=r]=t.split(":");return e[o]=i.toUpperCase(),e},{default:"USERLVL"}):{},T=t.customLevels?t.customLevels.split(",").reduce((e,t,r)=>{let[i,o=r]=t.split(":");return e[i.toLowerCase()]=o,e},{}):{},R=t.customColors?t.customColors.split(",").reduce((e,r)=>{let[i,o]=r.split(":"),s=(k?t.customLevels:void 0!==T[i])?T[i]:d[i];return e.push([void 0!==s?s:i,o]),e},[]):void 0,P={customLevels:j,customLevelNames:T};k&&!t.customLevels&&(P.customLevels=void 0,P.customLevelNames=void 0);let M=t.customPrettifiers,L=t.ignore?new Set(t.ignore.split(",")):void 0,A=t.hideObject,N=t.singleLine,C=u(t.colorize,R,k);return function(e){let u;if(y(e))u=e;else{let t=(e=>{try{return{value:c.parse(e,{protoAction:"remove"})}}catch(e){return{err:e}}})(e);if(t.err||!y(t.value))return e+r;u=t.value}if(l){let e=((k?t.customLevels:void 0!==T[l])?T[l]:d[l])||Number(l);if(u[void 0===s?h:s]0?`${D} ${j}`:j),R&&(D=D.length>0?`${D} ${R}:`:R),!1===D.endsWith(":")&&""!==D&&(D+=":"),E&&(D=D.length>0?`${D} ${E}`:E),D.length>0&&!N&&(D+=r),"Error"===u.type&&u.stack){let e=g({log:u,errorLikeKeys:S,errorProperties:O,ident:i,eol:r});N&&(D+=r),D+=e}else if(!A){let e=[o,s,p].filter(e=>"string"==typeof u[e]||"number"==typeof u[e]),t=w({input:u,skipKeys:e,customPrettifiers:M,errorLikeKeys:S,eol:r,ident:i,singleLine:N,colorizer:C});N&&!/^\s$/.test(t)&&(D+=" "),D+=t}return D}}function k(e={}){let t=O(e);return a(function(r){let i,a=new s({objectMode:!0,autoDestroy:!0,transform(e,r,i){i(null,t(e))}});return i="object"==typeof e.destination&&"function"==typeof e.destination.write?e.destination:S({dest:e.destination||1,append:e.append,mkdir:e.mkdir,sync:e.sync}),r.on("unknown",function(e){i.write(e+` +`)}),o(r,a,i),a},{parse:"lines"})}e.exports=k,e.exports.prettyFactory=O,e.exports.colorizerFactory=u,e.exports.default=k},5550(e,t,r){"use strict";let{LEVELS:i,LEVEL_NAMES:o}=r(4249),s=e=>e,a={default:s,60:s,50:s,40:s,30:s,20:s,10:s,message:s,greyMessage:s},{createColors:c}=r(6666),u=c({useColor:!0}),{white:l,bgRed:f,red:p,yellow:h,green:d,blue:y,gray:g,cyan:m}=u,b={default:l,60:f,50:p,40:h,30:d,20:y,10:g,message:m,greyMessage:g};function v(e){return function(t,r,{customLevels:s,customLevelNames:a}={}){let c=e?s||i:Object.assign({},i,s),u=e?a||o:Object.assign({},o,a),l="default";l=Number.isInteger(+t)?Object.prototype.hasOwnProperty.call(c,t)?t:l:Object.prototype.hasOwnProperty.call(u,t.toLowerCase())?u[t.toLowerCase()]:l;let f=c[l];return Object.prototype.hasOwnProperty.call(r,l)?r[l](f):r.default(f)}}e.exports=function(e=!1,t,r){let i,o;if(e&&void 0!==t){let e=t.reduce(function(e,[t,r]){return e[t]="function"==typeof u[r]?u[r]:l,e},{default:l,message:m,greyMessage:g}),i=r?e:Object.assign({},b,e),o=v(r),s=function(e,t){return o(e,i,t)};return s.message=s.message||i.message,s.greyMessage=s.greyMessage||i.greyMessage,s}if(e){let e,t;return e=v(r),(t=function(t,r){return e(t,b,r)}).message=b.message,t.greyMessage=b.greyMessage,t}return i=v(r),(o=function(e,t){return i(e,a,t)}).message=a.message,o.greyMessage=a.greyMessage,o}},4249(e){"use strict";e.exports={DATE_FORMAT:"yyyy-mm-dd HH:MM:ss.l o",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"]}},2349(e,t,r){"use strict";let i=r(9460)({circles:!0}),o=r(5402),s=r(2985),a=r(8183),{isMainThread:c}=r(8167),u=r(5550)(),{DATE_FORMAT:l,ERROR_LIKE_KEYS:f,MESSAGE_KEY:p,LEVEL_KEY:h,LEVEL_LABEL:d,TIMESTAMP_KEY:y,LOGGER_KEYS:g,LEVELS:m}=r(4249);function b(e,t=!1){if(!1===t)return e;let r=v(e);if(!w(r))return e;if(!0===t)return o(r,"UTC:"+l);let i=t.toUpperCase();if("SYS:STANDARD"===i)return o(r,l);let s=i.substr(0,4);return"SYS:"===s||"UTC:"===s?"UTC:"===s?o(r,t):o(r,t.slice(4)):o(r,`UTC:${t}`)}function v(e){let t=new Date(e);return w(t)?t:t=new Date(+e)}function w(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function _(e){return"[object Object]"===Object.prototype.toString.apply(e)}function S({input:e,ident:t=" ",eol:r=` `}){let i=e.split(/\r?\n/);for(let e=1;e{if(!1===h.includes(i)){let c="function"==typeof o[i]?o[i](a,i,e):a;s.includes(i)?r[i]=c:t[i]=c}return{plain:t,errors:r}},{plain:{},errors:{}});return l?(Object.keys(g).length>0&&(d+=p.greyMessage(a(g))),d+=r):Object.entries(g).forEach(([e,i])=>{let s="function"==typeof o[e]?i:a(i,null,2);if(void 0===s)return;let c=S({input:s,ident:t,eol:r});d+=`${t}${e}:${c.startsWith(r)?"":" "}${c}${r}`}),Object.entries(m).forEach(([e,i])=>{let s="function"==typeof o[e]?i:a(i,null,2);void 0!==s&&(d+=E({keyName:e,lines:s,eol:r,ident:t}))}),d}function E({keyName:e,lines:t,eol:r,ident:i}){let o="",s=S({input:t,ident:i,eol:r}),a=`${i}${e}: ${s}${r}`.split(r);for(let e=0;e{Object.prototype.hasOwnProperty.call(e,t)&&(e=e[t])}),delete e[i]}function j(){}function T(e,t){e.destroyed||("beforeExit"===t?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}e.exports={isObject:_,prettifyErrorLog:function({log:e,messageKey:t=p,ident:r=" ",eol:i=` -`,errorLikeKeys:o=f,errorProperties:s=[]}){let a=S({input:e.stack,ident:r,eol:i}),c=`${r}${a}${i}`;if(s.length>0){let a,u=y.concat(t,"type","stack");a="*"===s[0]?Object.keys(e).filter(e=>!1===u.includes(e)):s.filter(e=>!1===u.includes(e));for(let t=0;t`),""!==r)return r},prettifyObject:x,prettifyTime:function({log:e,timestampKey:t=g,translateFormat:r,prettifier:i}){let o=null;if(t in e?o=e[t]:"timestamp"in e&&(o=e.timestamp),null===o)return;let s=r?b(o,r):o;return i?i(s):`[${s}]`},buildSafeSonicBoom:function(e){let t=new s(e);return t.on("error",function e(r){if("EPIPE"===r.code){t.write=j,t.end=j,t.flushSync=j,t.destroy=j;return}t.removeListener("error",e)}),!e.sync&&c&&function(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=r(5463);t.register(e,T),e.on("close",function(){t.unregister(e)})}}(t),t},filterLog:function(e,t){let r=i(e);return t.forEach(e=>{k(r,e)}),r}},e.exports.internals={formatTime:b,joinLinesWithIndentation:S,prettifyError:E,deleteLogProperty:k,splitIgnoreKey:O,createDate:v,isValidDate:w}},2985(e,t,r){"use strict";let i=r(9896),o=r(4434),s=r(9023).inherits,a=r(6928),c=r(7048);function u(e,t){function r(r,i){if(r){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",r)}):t.emit("error",r);return}t.fd=i,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t._reopening&&(t._writing||!(t._len>t.minLength)||t.destroyed||p(t))}t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;let o=t.append?"a":"w";if(t.sync)try{t.mkdir&&i.mkdirSync(a.dirname(e),{recursive:!0});let s=i.openSync(e,o);r(null,s)}catch(e){throw r(e),e}else t.mkdir?i.mkdir(a.dirname(e),{recursive:!0},t=>{if(t)return r(t);i.open(e,o,r)}):i.open(e,o,r)}function l(e){if(!(this instanceof l))return new l(e);let{fd:t,dest:r,minLength:o,sync:s,append:a=!0,mkdir:d,retryEAGAIN:g}=e||{};if(t=t||r,this._bufs=[],this._len=0,this.fd=-1,this._writing=!1,this._writingBuf="",this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._hwm=Math.max(o||0,16387),this.file=null,this.destroyed=!1,this.minLength=o||0,this.sync=s||!1,this.append=a||!1,this.retryEAGAIN=g||(()=>!0),this.mkdir=d||!1,"number"==typeof t)this.fd=t,process.nextTick(()=>this.emit("ready"));else if("string"==typeof t)u(t,this);else throw Error("SonicBoom supports only file descriptors and files");if(this.minLength>=0x1000000)throw Error("minLength should be smaller than MAX_WRITE (16777216)");this.release=(e,t)=>{if(e){if("EAGAIN"===e.code&&this.retryEAGAIN(e,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{c(100),this.release(void 0,0)}catch(e){this.release(e)}else setTimeout(()=>{i.write(this.fd,this._writingBuf,"utf8",this.release)},100);else this._writing=!1,this.emit("error",e);return}if(this._len-=t,this._writingBuf=this._writingBuf.slice(t),this._writingBuf.length){if(!this.sync)return void i.write(this.fd,this._writingBuf,"utf8",this.release);try{do{let e=i.writeSync(this.fd,this._writingBuf,"utf8");this._len-=e,this._writingBuf=this._writingBuf.slice(e)}while(this._writingBuf)}catch(e){this.release(e);return}}let r=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):r>this.minLength?p(this):this._ending?r>0?p(this):(this._writing=!1,h(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(f,this)):this.emit("drain"))},this.on("newListener",function(e){"drain"===e&&(this._asyncDrainScheduled=!1)})}function f(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}function p(e){let t=e.release;if(e._writing=!0,e._writingBuf=e._writingBuf||e._bufs.shift(),e.sync)try{let r=i.writeSync(e.fd,e._writingBuf,"utf8");t(null,r)}catch(e){t(e)}else i.write(e.fd,e._writingBuf,"utf8",t)}function h(e){-1===e.fd?e.once("ready",h.bind(null,e)):(i.close(e.fd,t=>{t?e.emit("error",t):(e._ending&&!e._writing&&e.emit("finish"),e.emit("close"))}),e.destroyed=!0,e._bufs=[])}s(l,o),l.prototype.write=function(e){if(this.destroyed)throw Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return!this._writing&&t>0x1000000?r.push(e):0===r.length?r[0]=""+e:r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&p(this),this._len{this.reopen(e)});if(this._ending)return;if(!this.file)throw Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&i.close(t,e=>{if(e)return this.emit("error",e)})}),u(e||this.file,this)},l.prototype.end=function(){if(this.destroyed)throw Error("SonicBoom destroyed");this._opening?this.once("ready",()=>{this.end()}):this._ending||(this._ending=!0,this._writing||(this._len>0&&this.fd>=0?p(this):h(this)))},l.prototype.flushSync=function(){if(this.destroyed)throw Error("SonicBoom destroyed");if(this.fd<0)throw Error("sonic boom is not ready yet");for(!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");this._bufs.length;){let e=this._bufs[0];try{this._len-=i.writeSync(this.fd,e,"utf8"),this._bufs.shift()}catch(t){if("EAGAIN"!==t.code||!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;c(100)}}},l.prototype.destroy=function(){this.destroyed||h(this)},l.SonicBoom=l,l.default=l,e.exports=l},6705(e,t,r){"use strict";var i=r(2588),o=r(4038),s=TypeError;e.exports=function(e){if(i(e))return e;throw new s(o(e)+" is not a function")}},839(e,t,r){"use strict";var i=r(3565).has;e.exports=function(e){return i(e),e}},7961(e,t,r){"use strict";var i=r(6472),o=String,s=TypeError;e.exports=function(e){if(i(e))return e;throw new s("Can't set "+o(e)+" as a prototype")}},9721(e,t,r){"use strict";var i=r(6123).has;e.exports=function(e){return i(e),e}},1150(e,t,r){"use strict";var i=r(4898),o=TypeError;e.exports=function(e,t){if(i(t,e))return e;throw new o("Incorrect invocation")}},650(e,t,r){"use strict";var i=r(5759),o=String,s=TypeError;e.exports=function(e){if(i(e))return e;throw new s(o(e)+" is not an object")}},2498(e,t,r){"use strict";var i=r(7404),o=r(675),s=r(7373),a=function(e){return function(t,r,a){var c,u=i(t),l=s(u);if(0===l)return!e&&-1;var f=o(a,l);if(e&&r!=r){for(;l>f;)if((c=u[f++])!=c)return!0}else for(;l>f;f++)if((e||f in u)&&u[f]===r)return e||f||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},8896(e,t,r){"use strict";var i=r(1437),o=r(2367),s=TypeError,a=Object.getOwnPropertyDescriptor;e.exports=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(o(e)&&!a(e,"length").writable)throw new s("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},6556(e,t,r){"use strict";var i=r(650),o=r(5220);e.exports=function(e,t,r,s){try{return s?t(i(r)[0],r[1]):t(r)}catch(t){o(e,"throw",t)}}},3171(e,t,r){"use strict";var i=r(4058)("iterator"),o=!1;try{var s=0,a={next:function(){return{done:!!s++}},return:function(){o=!0}};a[i]=function(){return this},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){try{if(!t&&!o)return!1}catch(e){return!1}var r=!1;try{var s={};s[i]=function(){return{next:function(){return{done:r=!0}}}},e(s)}catch(e){}return r}},8097(e,t,r){"use strict";var i=r(9713),o=i({}.toString),s=i("".slice);e.exports=function(e){return s(o(e),8,-1)}},8974(e,t,r){"use strict";var i=r(8577),o=r(2588),s=r(8097),a=r(4058)("toStringTag"),c=Object,u="Arguments"===s(function(){return arguments}()),l=function(e,t){try{return e[t]}catch(e){}};e.exports=i?s:function(e){var t,r,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=l(t=c(e),a))?r:u?s(t):"Object"===(i=s(t))&&o(t.callee)?"Arguments":i}},2625(e,t,r){"use strict";var i=r(7826),o=r(9392),s=r(1160),a=r(8018);e.exports=function(e,t,r){for(var c=o(t),u=a.f,l=s.f,f=0;f0x1fffffffffffff)throw t("Maximum allowed index exceeded");return e}},9738(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6748(e,t,r){"use strict";var i=r(7741).navigator,o=i&&i.userAgent;e.exports=o?String(o):""},5584(e,t,r){"use strict";var i,o,s=r(7741),a=r(6748),c=s.process,u=s.Deno,l=c&&c.versions||u&&u.version,f=l&&l.v8;f&&(o=(i=f.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!o&&a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(o=+i[1]),e.exports=o},4390(e,t,r){"use strict";var i=r(7741),o=r(6748),s=r(8097),a=function(e){return o.slice(0,e.length)===e};e.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":i.Bun&&"string"==typeof Bun.version?"BUN":i.Deno&&"object"==typeof Deno.version?"DENO":"process"===s(i.process)?"NODE":i.window&&i.document?"BROWSER":"REST"},6172(e,t,r){"use strict";var i=r(9713),o=Error,s=i("".replace),a=String(new o("zxcasd").stack),c=/\n\s*at [^:]*:[^\n]*/,u=c.test(a);e.exports=function(e,t){if(u&&"string"==typeof e&&!o.prepareStackTrace)for(;t--;)e=s(e,c,"");return e}},374(e,t,r){"use strict";var i=r(4632),o=r(6172),s=r(6710),a=Error.captureStackTrace;e.exports=function(e,t,r,c){s&&(a?a(e,t):i(e,"stack",o(r,c)))}},6710(e,t,r){"use strict";var i=r(6786),o=r(6435);e.exports=!i(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",o(1,7)),7!==e.stack)})},9645(e,t,r){"use strict";var i=r(7741),o=r(1160).f,s=r(4632),a=r(3077),c=r(7630),u=r(2625),l=r(2617);e.exports=function(e,t){var r,f,p,h,d,g=e.target,y=e.global,m=e.stat;if(r=y?i:m?i[g]||c(g,{}):i[g]&&i[g].prototype)for(f in t){if(h=t[f],p=e.dontCallGetSet?(d=o(r,f))&&d.value:r[f],!l(y?f:g+(m?".":"#")+f,e.forced)&&void 0!==p){if(typeof h==typeof p)continue;u(h,p)}(e.sham||p&&p.sham)&&s(h,"sham",!0),a(r,f,h,e)}}},6786(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},9830(e,t,r){"use strict";var i=r(7007),o=Function.prototype,s=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(i?a.bind(s):function(){return a.apply(s,arguments)})},1869(e,t,r){"use strict";var i=r(8907),o=r(6705),s=r(7007),a=i(i.bind);e.exports=function(e,t){return o(e),void 0===t?e:s?a(e,t):function(){return e.apply(t,arguments)}}},7007(e,t,r){"use strict";e.exports=!r(6786)(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},1608(e,t,r){"use strict";var i=r(7007),o=Function.prototype.call;e.exports=i?o.bind(o):function(){return o.apply(o,arguments)}},2175(e,t,r){"use strict";var i=r(1437),o=r(7826),s=Function.prototype,a=i&&Object.getOwnPropertyDescriptor,c=o(s,"name"),u=c&&(!i||i&&a(s,"name").configurable);e.exports={EXISTS:c,PROPER:c&&"something"===(function(){}).name,CONFIGURABLE:u}},1857(e,t,r){"use strict";var i=r(9713),o=r(6705);e.exports=function(e,t,r){try{return i(o(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},8907(e,t,r){"use strict";var i=r(8097),o=r(9713);e.exports=function(e){if("Function"===i(e))return o(e)}},9713(e,t,r){"use strict";var i=r(7007),o=Function.prototype,s=o.call,a=i&&o.bind.bind(s,s);e.exports=i?a:function(e){return function(){return s.apply(e,arguments)}}},8148(e,t,r){"use strict";var i=r(7741),o=r(2588);e.exports=function(e,t){var r;return arguments.length<2?o(r=i[e])?r:void 0:i[e]&&i[e][t]}},754(e){"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},2786(e,t,r){"use strict";var i=r(8974),o=r(3953),s=r(8030),a=r(2476),c=r(4058)("iterator");e.exports=function(e){if(!s(e))return o(e,c)||o(e,"@@iterator")||a[i(e)]}},9678(e,t,r){"use strict";var i=r(1608),o=r(6705),s=r(650),a=r(4038),c=r(2786),u=TypeError;e.exports=function(e,t){var r=arguments.length<2?c(e):t;if(o(r))return s(i(r,e));throw new u(a(e)+" is not iterable")}},3953(e,t,r){"use strict";var i=r(6705),o=r(8030);e.exports=function(e,t){var r=e[t];return o(r)?void 0:i(r)}},4345(e,t,r){"use strict";var i=r(6705),o=r(650),s=r(1608),a=r(6904),c=r(754),u="Invalid size",l=RangeError,f=TypeError,p=Math.max,h=function(e,t){this.set=e,this.size=p(t,0),this.has=i(e.has),this.keys=i(e.keys)};h.prototype={getIterator:function(){return c(o(s(this.keys,this.set)))},includes:function(e){return s(this.has,this.set,e)}},e.exports=function(e){o(e);var t=+e.size;if(t!=t)throw new f(u);var r=a(t);if(r<0)throw new l(u);return new h(e,r)}},7741(e){"use strict";var t=function(e){return e&&e.Math===Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||t("object"==typeof this&&this)||function(){return this}()||Function("return this")()},7826(e,t,r){"use strict";var i=r(9713),o=r(9212),s=i({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return s(o(e),t)}},8372(e){"use strict";e.exports={}},3442(e,t,r){"use strict";e.exports=r(8148)("document","documentElement")},5622(e,t,r){"use strict";var i=r(1437),o=r(6786),s=r(7526);e.exports=!i&&!o(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},5632(e,t,r){"use strict";var i=r(9713),o=r(6786),s=r(8097),a=Object,c=i("".split);e.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?c(e,""):a(e)}:a},5862(e,t,r){"use strict";var i=r(2588),o=r(5759),s=r(4510);e.exports=function(e,t,r){var a,c;return s&&i(a=t.constructor)&&a!==r&&o(c=a.prototype)&&c!==r.prototype&&s(e,c),e}},7957(e,t,r){"use strict";var i=r(9713),o=r(2588),s=r(3414),a=i(Function.toString);o(s.inspectSource)||(s.inspectSource=function(e){return a(e)}),e.exports=s.inspectSource},1713(e,t,r){"use strict";var i=r(5759),o=r(4632);e.exports=function(e,t){i(t)&&"cause"in t&&o(e,"cause",t.cause)}},1694(e,t,r){"use strict";var i,o,s,a=r(4825),c=r(7741),u=r(5759),l=r(4632),f=r(7826),p=r(3414),h=r(8264),d=r(8372),g="Object already initialized",y=c.TypeError,m=c.WeakMap;if(a||p.state){var b=p.state||(p.state=new m);b.get=b.get,b.has=b.has,b.set=b.set,i=function(e,t){if(b.has(e))throw new y(g);return t.facade=e,b.set(e,t),t},o=function(e){return b.get(e)||{}},s=function(e){return b.has(e)}}else{var v=h("state");d[v]=!0,i=function(e,t){if(f(e,v))throw new y(g);return t.facade=e,l(e,v,t),t},o=function(e){return f(e,v)?e[v]:{}},s=function(e){return f(e,v)}}e.exports={set:i,get:o,has:s,enforce:function(e){return s(e)?o(e):i(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=o(t)).type!==e)throw new y("Incompatible receiver, "+e+" required");return r}}}},1938(e,t,r){"use strict";var i=r(4058),o=r(2476),s=i("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[s]===e)}},2367(e,t,r){"use strict";var i=r(8097);e.exports=Array.isArray||function(e){return"Array"===i(e)}},2588(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},2617(e,t,r){"use strict";var i=r(6786),o=r(2588),s=/#|\.prototype\./,a=function(e,t){var r=u[c(e)];return r===f||r!==l&&(o(t)?i(t):!!t)},c=a.normalize=function(e){return String(e).replace(s,".").toLowerCase()},u=a.data={},l=a.NATIVE="N",f=a.POLYFILL="P";e.exports=a},3090(e,t,r){"use strict";var i=r(8974),o=r(7826),s=r(8030),a=r(4058),c=r(2476),u=a("iterator"),l=Object;e.exports=function(e){if(s(e))return!1;var t=l(e);return void 0!==t[u]||"@@iterator"in t||o(c,i(t))}},8030(e){"use strict";e.exports=function(e){return null==e}},5759(e,t,r){"use strict";var i=r(2588);e.exports=function(e){return"object"==typeof e?null!==e:i(e)}},6472(e,t,r){"use strict";var i=r(5759);e.exports=function(e){return i(e)||null===e}},6726(e){"use strict";e.exports=!1},80(e,t,r){"use strict";var i=r(8148),o=r(2588),s=r(4898),a=r(577),c=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=i("Symbol");return o(t)&&s(t.prototype,c(e))}},1224(e,t,r){"use strict";var i=r(1608);e.exports=function(e,t,r){for(var o,s,a=r?e:e.iterator,c=e.next;!(o=i(c,a)).done;)if(void 0!==(s=t(o.value)))return s}},5705(e,t,r){"use strict";var i=r(1869),o=r(1608),s=r(650),a=r(4038),c=r(1938),u=r(7373),l=r(4898),f=r(9678),p=r(2786),h=r(5220),d=TypeError,g=function(e,t){this.stopped=e,this.result=t},y=g.prototype;e.exports=function(e,t,r){var m,b,v,w,_,S,x,E=r&&r.that,O=!!(r&&r.AS_ENTRIES),k=!!(r&&r.IS_RECORD),j=!!(r&&r.IS_ITERATOR),T=!!(r&&r.INTERRUPTED),R=i(t,E),P=function(e){return m&&h(m,"normal"),new g(!0,e)},M=function(e){return O?(s(e),T?R(e[0],e[1],P):R(e[0],e[1])):T?R(e,P):R(e)};if(k)m=e.iterator;else if(j)m=e;else{if(!(b=p(e)))throw new d(a(e)+" is not iterable");if(c(b)){for(v=0,w=u(e);w>v;v++)if((_=M(e[v]))&&l(y,_))return _;return new g(!1)}m=f(e,b)}for(S=k?e.next:m.next;!(x=o(S,m)).done;){try{_=M(x.value)}catch(e){h(m,"throw",e)}if("object"==typeof _&&_&&l(y,_))return _}return new g(!1)}},6150(e,t,r){"use strict";var i=r(5220);e.exports=function(e,t,r){for(var o=e.length-1;o>=0;o--)if(void 0!==e[o])try{r=i(e[o].iterator,t,r)}catch(e){t="throw",r=e}if("throw"===t)throw r;return r}},5220(e,t,r){"use strict";var i=r(1608),o=r(650),s=r(3953);e.exports=function(e,t,r){var a,c;o(e);try{if(!(a=s(e,"return"))){if("throw"===t)throw r;return r}a=i(a,e)}catch(e){c=!0,a=e}if("throw"===t)throw r;if(c)throw a;return o(a),r}},4635(e,t,r){"use strict";var i=r(1608),o=r(5449),s=r(4632),a=r(1280),c=r(4058),u=r(1694),l=r(3953),f=r(6114).IteratorPrototype,p=r(9248),h=r(5220),d=r(6150),g=c("toStringTag"),y="IteratorHelper",m="WrapForValidIterator",b="normal",v="throw",w=u.set,_=function(e){var t=u.getterFor(e?m:y);return a(o(f),{next:function(){var r=t(this);if(e)return r.nextHandler();if(r.done)return p(void 0,!0);try{var i=r.nextHandler();return r.returnHandlerResult?i:p(i,r.done)}catch(e){throw r.done=!0,e}},return:function(){var r=t(this),o=r.iterator;if(r.done=!0,e){var s=l(o,"return");return s?i(s,o):p(void 0,!0)}if(r.inner)try{h(r.inner.iterator,b)}catch(e){return h(o,v,e)}if(r.openIters)try{d(r.openIters,b)}catch(e){return h(o,v,e)}return o&&h(o,b),p(void 0,!0)}})},S=_(!0),x=_(!1);s(x,g,"Iterator Helper"),e.exports=function(e,t,r){var i=function(i,o){o?(o.iterator=i.iterator,o.next=i.next):o=i,o.type=t?m:y,o.returnHandlerResult=!!r,o.nextHandler=e,o.counter=0,o.done=!1,w(this,o)};return i.prototype=t?S:x,i}},2755(e){"use strict";e.exports=function(e,t){var r="function"==typeof Iterator&&Iterator.prototype[e];if(r)try{r.call({next:null},t).next()}catch(e){return!0}}},5906(e,t,r){"use strict";var i=r(7741);e.exports=function(e,t){var r=i.Iterator,o=r&&r.prototype,s=o&&o[e],a=!1;if(s)try{s.call({next:function(){return{done:!0}},return:function(){a=!0}},-1)}catch(e){e instanceof t||(a=!1)}if(!a)return s}},6114(e,t,r){"use strict";var i,o,s,a=r(6786),c=r(2588),u=r(5759),l=r(5449),f=r(3306),p=r(3077),h=r(4058),d=r(6726),g=h("iterator"),y=!1;[].keys&&("next"in(s=[].keys())?(o=f(f(s)))!==Object.prototype&&(i=o):y=!0),!u(i)||a(function(){var e={};return i[g].call(e)!==e})?i={}:d&&(i=l(i)),c(i[g])||p(i,g,function(){return this}),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:y}},2476(e){"use strict";e.exports={}},7373(e,t,r){"use strict";var i=r(3019);e.exports=function(e){return i(e.length)}},2466(e,t,r){"use strict";var i=r(9713),o=r(6786),s=r(2588),a=r(7826),c=r(1437),u=r(2175).CONFIGURABLE,l=r(7957),f=r(1694),p=f.enforce,h=f.get,d=String,g=Object.defineProperty,y=i("".slice),m=i("".replace),b=i([].join),v=c&&!o(function(){return 8!==g(function(){},"length",{value:8}).length}),w=String(String).split("String"),_=e.exports=function(e,t,r){"Symbol("===y(d(t),0,7)&&(t="["+m(d(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!a(e,"name")||u&&e.name!==t)&&(c?g(e,"name",{value:t,configurable:!0}):e.name=t),v&&r&&a(r,"arity")&&e.length!==r.arity&&g(e,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?c&&g(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var i=p(e);return a(i,"source")||(i.source=b(w,"string"==typeof t?t:"")),e};Function.prototype.toString=_(function(){return s(this)&&h(this).source||l(this)},"toString")},3565(e,t,r){"use strict";var i=r(9713),o=Map.prototype;e.exports={Map:Map,set:i(o.set),get:i(o.get),has:i(o.has),remove:i(o.delete),proto:o}},8542(e,t,r){"use strict";var i=r(9713),o=r(1224),s=r(3565),a=s.Map,c=s.proto,u=i(c.forEach),l=i(c.entries),f=l(new a).next;e.exports=function(e,t,r){return r?o({iterator:l(e),next:f},function(e){return t(e[1],e[0])}):u(e,t)}},2190(e){"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var i=+e;return(i>0?r:t)(i)}},340(e,t,r){"use strict";var i=r(6705),o=TypeError,s=function(e){var t,r;this.promise=new e(function(e,i){if(void 0!==t||void 0!==r)throw new o("Bad Promise constructor");t=e,r=i}),this.resolve=i(t),this.reject=i(r)};e.exports.f=function(e){return new s(e)}},6394(e,t,r){"use strict";var i=r(5770);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:i(e)}},5449(e,t,r){"use strict";var i,o=r(650),s=r(6910),a=r(9738),c=r(8372),u=r(3442),l=r(7526),f=r(8264),p="prototype",h="script",d=f("IE_PROTO"),g=function(){},y=function(e){return"<"+h+">"+e+""},m=function(e){e.write(y("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){var e,t=l("iframe");return t.style.display="none",u.appendChild(t),t.src=String("java"+h+":"),(e=t.contentWindow.document).open(),e.write(y("document.F=Object")),e.close(),e.F},v=function(){try{i=new ActiveXObject("htmlfile")}catch(e){}v="u">typeof document?document.domain&&i?m(i):b():m(i);for(var e=a.length;e--;)delete v[p][a[e]];return v()};c[d]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(g[p]=o(e),r=new g,g[p]=null,r[d]=e):r=v(),void 0===t?r:s.f(r,t)}},6910(e,t,r){"use strict";var i=r(1437),o=r(8195),s=r(8018),a=r(650),c=r(7404),u=r(7873);t.f=i&&!o?Object.defineProperties:function(e,t){a(e);for(var r,i=c(t),o=u(t),l=o.length,f=0;l>f;)s.f(e,r=o[f++],i[r]);return e}},8018(e,t,r){"use strict";var i=r(1437),o=r(5622),s=r(8195),a=r(650),c=r(3192),u=TypeError,l=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p="enumerable",h="configurable",d="writable";t.f=i?s?function(e,t,r){if(a(e),t=c(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&d in r&&!r[d]){var i=f(e,t);i&&i[d]&&(e[t]=r.value,r={configurable:h in r?r[h]:i[h],enumerable:p in r?r[p]:i[p],writable:!1})}return l(e,t,r)}:l:function(e,t,r){if(a(e),t=c(t),a(r),o)try{return l(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new u("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},1160(e,t,r){"use strict";var i=r(1437),o=r(1608),s=r(5728),a=r(6435),c=r(7404),u=r(3192),l=r(7826),f=r(5622),p=Object.getOwnPropertyDescriptor;t.f=i?p:function(e,t){if(e=c(e),t=u(t),f)try{return p(e,t)}catch(e){}if(l(e,t))return a(!o(s.f,e,t),e[t])}},6557(e,t,r){"use strict";var i=r(7427),o=r(9738).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,o)}},4156(e,t){"use strict";t.f=Object.getOwnPropertySymbols},3306(e,t,r){"use strict";var i=r(7826),o=r(2588),s=r(9212),a=r(8264),c=r(7768),u=a("IE_PROTO"),l=Object,f=l.prototype;e.exports=c?l.getPrototypeOf:function(e){var t=s(e);if(i(t,u))return t[u];var r=t.constructor;return o(r)&&t instanceof r?r.prototype:t instanceof l?f:null}},4898(e,t,r){"use strict";e.exports=r(9713)({}.isPrototypeOf)},7427(e,t,r){"use strict";var i=r(9713),o=r(7826),s=r(7404),a=r(2498).indexOf,c=r(8372),u=i([].push);e.exports=function(e,t){var r,i=s(e),l=0,f=[];for(r in i)!o(c,r)&&o(i,r)&&u(f,r);for(;t.length>l;)o(i,r=t[l++])&&(~a(f,r)||u(f,r));return f}},7873(e,t,r){"use strict";var i=r(7427),o=r(9738);e.exports=Object.keys||function(e){return i(e,o)}},5728(e,t){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor;t.f=i&&!r.call({1:2},1)?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},4510(e,t,r){"use strict";var i=r(1857),o=r(5759),s=r(3829),a=r(7961);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=i(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,i){return s(r),a(i),o(r)&&(t?e(r,i):r.__proto__=i),r}}():void 0)},2943(e,t,r){"use strict";var i=r(1608),o=r(2588),s=r(5759),a=TypeError;e.exports=function(e,t){var r,c;if("string"===t&&o(r=e.toString)&&!s(c=i(r,e))||o(r=e.valueOf)&&!s(c=i(r,e))||"string"!==t&&o(r=e.toString)&&!s(c=i(r,e)))return c;throw new a("Can't convert object to primitive value")}},9392(e,t,r){"use strict";var i=r(8148),o=r(9713),s=r(6557),a=r(4156),c=r(650),u=o([].concat);e.exports=i("Reflect","ownKeys")||function(e){var t=s.f(c(e)),r=a.f;return r?u(t,r(e)):t}},1841(e,t,r){"use strict";var i=r(9713),o=r(7826),s=SyntaxError,a=parseInt,c=String.fromCharCode,u=i("".charAt),l=i("".slice),f=i(/./.exec),p={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":` -`,"\\r":`\r`,"\\t":" "},h=/^[\da-f]{4}$/i,d=/^[\u0000-\u001F]$/;e.exports=function(e,t){for(var r=!0,i="";tr.size?u(r.getIterator(),function(e){p(t,e)&&f(o,e)}):c(t,function(e){r.includes(e)&&f(o,e)}),o}},282(e,t,r){"use strict";var i=r(9721),o=r(6123).has,s=r(5221),a=r(4345),c=r(3160),u=r(1224),l=r(5220);e.exports=function(e){var t=i(this),r=a(e);if(s(t)<=r.size)return!1!==c(t,function(e){if(r.includes(e))return!1},!0);var f=r.getIterator();return!1!==u(f,function(e){if(o(t,e))return l(f,"normal",!1)})}},3673(e,t,r){"use strict";var i=r(9721),o=r(5221),s=r(3160),a=r(4345);e.exports=function(e){var t=i(this),r=a(e);return!(o(t)>r.size)&&!1!==s(t,function(e){if(!r.includes(e))return!1},!0)}},9320(e,t,r){"use strict";var i=r(9721),o=r(6123).has,s=r(5221),a=r(4345),c=r(1224),u=r(5220);e.exports=function(e){var t=i(this),r=a(e);if(s(t)0?o(t,0x1fffffffffffff):0}},9212(e,t,r){"use strict";var i=r(3829),o=Object;e.exports=function(e){return o(i(e))}},9538(e,t,r){"use strict";var i=r(1608),o=r(5759),s=r(80),a=r(3953),c=r(2943),u=r(4058),l=TypeError,f=u("toPrimitive");e.exports=function(e,t){if(!o(e)||s(e))return e;var r,u=a(e,f);if(u){if(void 0===t&&(t="default"),!o(r=i(u,e,t))||s(r))return r;throw new l("Can't convert object to primitive value")}return void 0===t&&(t="number"),c(e,t)}},3192(e,t,r){"use strict";var i=r(9538),o=r(80);e.exports=function(e){var t=i(e,"string");return o(t)?t:t+""}},7779(e,t,r){"use strict";var i=r(8148),o=r(2588),s=r(3090),a=r(5759),c=i("Set");e.exports=function(e){return a(e)&&"number"==typeof e.size&&o(e.has)&&o(e.keys)?e:s(e)?new c(e):e}},8577(e,t,r){"use strict";var i=r(4058)("toStringTag"),o={};o[i]="z",e.exports="[object z]"===String(o)},5770(e,t,r){"use strict";var i=r(8974),o=String;e.exports=function(e){if("Symbol"===i(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},4038(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},4513(e,t,r){"use strict";var i=r(9713),o=0,s=Math.random(),a=i(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+s,36)}},577(e,t,r){"use strict";e.exports=r(432)&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8195(e,t,r){"use strict";var i=r(1437),o=r(6786);e.exports=i&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},5605(e){"use strict";var t=TypeError;e.exports=function(e,r){if(ev&&h(i,arguments[v]),i});if(O.prototype=x,"Error"!==_?c?c(O,E):u(O,E,{name:!0}):g&&b in S&&(l(O,S,b),l(O,S,"prepareStackTrace")),u(O,S),!y)try{x.name!==_&&s(x,"name",_),x.constructor=O}catch(e){}return O}}},3798(e,t,r){"use strict";var i=r(9645),o=r(4898),s=r(3306),a=r(4510),c=r(2625),u=r(5449),l=r(4632),f=r(6435),p=r(1713),h=r(374),d=r(5705),g=r(6394),y=r(4058)("toStringTag"),m=Error,b=[].push,v=function(e,t){var r,i=o(w,this);a?r=a(new m,i?s(this):w):l(r=i?this:u(w),y,"Error"),void 0!==t&&l(r,"message",g(t)),h(r,v,r.stack,1),arguments.length>2&&p(r,arguments[2]);var c=[];return d(e,b,{that:c}),l(r,"errors",c),r};a?a(v,m):c(v,m,{name:!0});var w=v.prototype=u(m.prototype,{constructor:f(1,v),message:f(1,""),name:f(1,"AggregateError")});i({global:!0,constructor:!0,arity:2},{AggregateError:v})},6488(e,t,r){"use strict";r(3798)},8831(e,t,r){"use strict";var i=r(9645),o=r(9212),s=r(7373),a=r(8896),c=r(3525);i({target:"Array",proto:!0,arity:1,forced:r(6786)(function(){return 0x100000001!==[].push.call({length:0x100000000},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=o(this),r=s(t),i=arguments.length;c(r+i);for(var u=0;u1;return e.has(1)&&e.clear(),{done:r,value:2}}}}}).size})},{difference:o})},1975(e,t,r){"use strict";var i=r(9645),o=r(6786),s=r(2537);i({target:"Set",proto:!0,real:!0,forced:!r(4487)("intersection",function(e){return 2===e.size&&e.has(1)&&e.has(2)})||o(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:s})},2970(e,t,r){"use strict";var i=r(9645),o=r(282);i({target:"Set",proto:!0,real:!0,forced:!r(4487)("isDisjointFrom",function(e){return!e})},{isDisjointFrom:o})},2567(e,t,r){"use strict";var i=r(9645),o=r(3673);i({target:"Set",proto:!0,real:!0,forced:!r(4487)("isSubsetOf",function(e){return e})},{isSubsetOf:o})},4576(e,t,r){"use strict";var i=r(9645),o=r(9320);i({target:"Set",proto:!0,real:!0,forced:!r(4487)("isSupersetOf",function(e){return!e})},{isSupersetOf:o})},423(e,t,r){"use strict";var i=r(9645),o=r(9705),s=r(3036);i({target:"Set",proto:!0,real:!0,forced:!r(4487)("symmetricDifference")||!s("symmetricDifference")},{symmetricDifference:o})},8107(e,t,r){"use strict";var i=r(9645),o=r(453),s=r(3036);i({target:"Set",proto:!0,real:!0,forced:!r(4487)("union")||!s("union")},{union:o})},9845(e,t,r){"use strict";r(5046)},5459(e,t,r){"use strict";r(2698)},6142(e,t,r){"use strict";r(7899)},518(e,t,r){"use strict";r(9807)},1699(e,t,r){"use strict";r(7092)},6791(e,t,r){"use strict";r(9186)},7589(e,t,r){"use strict";r(3016)},4370(e,t,r){"use strict";r(537)},4356(e,t,r){"use strict";var i=r(9645),o=r(839),s=r(3565).remove;i({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=o(this),r=!0,i=0,a=arguments.length;i1?arguments[1]:void 0);return!1!==a(t,function(e,i){if(!r(e,i,t))return!1},!0)}})},4255(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(839),a=r(3565),c=r(8542),u=a.Map,l=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new u;return c(t,function(e,o){r(e,o,t)&&l(i,o,e)}),i}})},3248(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(839),a=r(8542);i({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=a(t,function(e,i){if(r(e,i,t))return{key:i}},!0);return i&&i.key}})},7922(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(839),a=r(8542);i({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=a(t,function(e,i){if(r(e,i,t))return{value:e}},!0);return i&&i.value}})},7492(e,t,r){"use strict";var i=r(9645),o=r(9496),s=r(839),a=r(8542);i({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===a(s(this),function(t){if(o(t,e))return!0},!0)}})},9594(e,t,r){"use strict";var i=r(9645),o=r(839),s=r(8542);i({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=s(o(this),function(t,r){if(t===e)return{key:r}},!0);return t&&t.key}})},1612(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(839),a=r(3565),c=r(8542),u=a.Map,l=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new u;return c(t,function(e,o){l(i,r(e,o,t),e)}),i}})},6414(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(839),a=r(3565),c=r(8542),u=a.Map,l=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new u;return c(t,function(e,o){l(i,o,r(e,o,t))}),i}})},9673(e,t,r){"use strict";var i=r(9645),o=r(839),s=r(5705),a=r(3565).set;i({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=o(this),r=arguments.length,i=0;i1?arguments[1]:void 0);return!0===a(t,function(e,i){if(r(e,i,t))return!0},!0)}})},6636(e,t,r){"use strict";var i=r(9645),o=r(6705),s=r(839),a=r(3565),c=TypeError,u=a.get,l=a.has,f=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=s(this),i=arguments.length;o(t);var a=l(r,e);if(!a&&i<3)throw new c("Updating absent value");var p=a?u(r,e):o(i>2?arguments[2]:void 0)(e,r);return f(r,e,t(p,e,r)),r}})},9822(e,t,r){"use strict";var i=r(9645),o=r(9721),s=r(6123).add;i({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var e=o(this),t=0,r=arguments.length;t1?arguments[1]:void 0);return!1!==a(t,function(e){if(!r(e,e,t))return!1},!0)}})},9817(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(9721),a=r(6123),c=r(3160),u=a.Set,l=a.add;i({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new u;return c(t,function(e){r(e,e,t)&&l(i,e)}),i}})},3364(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(9721),a=r(3160);i({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=a(t,function(e){if(r(e,e,t))return{value:e}},!0);return i&&i.value}})},5354(e,t,r){"use strict";var i=r(9645),o=r(1608),s=r(7779),a=r(2537);i({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return o(a,this,s(e))}})},7338(e,t,r){"use strict";r(1975)},7357(e,t,r){"use strict";var i=r(9645),o=r(1608),s=r(7779),a=r(282);i({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return o(a,this,s(e))}})},2105(e,t,r){"use strict";r(2970)},5949(e,t,r){"use strict";var i=r(9645),o=r(1608),s=r(7779),a=r(3673);i({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return o(a,this,s(e))}})},8202(e,t,r){"use strict";r(2567)},4275(e,t,r){"use strict";var i=r(9645),o=r(1608),s=r(7779),a=r(9320);i({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return o(a,this,s(e))}})},6857(e,t,r){"use strict";r(4576)},2163(e,t,r){"use strict";var i=r(9645),o=r(9713),s=r(9721),a=r(3160),c=r(5770),u=o([].join),l=o([].push);i({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=s(this),r=void 0===e?",":c(e),i=[];return a(t,function(e){l(i,e)}),u(i,r)}})},9285(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(9721),a=r(6123),c=r(3160),u=a.Set,l=a.add;i({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new u;return c(t,function(e){l(i,r(e,e,t))}),i}})},8957(e,t,r){"use strict";var i=r(9645),o=r(6705),s=r(9721),a=r(3160),c=TypeError;i({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=s(this),r=arguments.length<2,i=r?void 0:arguments[1];if(o(e),a(t,function(o){r?(r=!1,i=o):i=e(i,o,o,t)}),r)throw new c("Reduce of empty set with no initial value");return i}})},4843(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(9721),a=r(3160);i({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0);return!0===a(t,function(e){if(r(e,e,t))return!0},!0)}})},2550(e,t,r){"use strict";var i=r(9645),o=r(1608),s=r(7779),a=r(9705);i({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return o(a,this,s(e))}})},2846(e,t,r){"use strict";r(423)},3832(e,t,r){"use strict";var i=r(9645),o=r(1608),s=r(7779),a=r(453);i({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return o(a,this,s(e))}})},4512(e,t,r){"use strict";r(8107)},9444(e,t,r){"use strict";var i=r(3077),o=r(9713),s=r(5770),a=r(5605),c=URLSearchParams,u=c.prototype,l=o(u.append),f=o(u.delete),p=o(u.forEach),h=o([].push),d=new c("a=1&a=2&b=3");d.delete("a",1),d.delete("b",void 0),d+""!="a=2"&&i(u,"delete",function(e){var t,r=arguments.length,i=r<2?void 0:arguments[1];if(r&&void 0===i)return f(this,e);var o=[];p(this,function(e,t){h(o,{key:t,value:e})}),a(r,1);for(var c=s(e),u=s(i),d=0,g=0,y=!1,m=o.length;d docs/benchmarks.md"},"bin":{"pino":"./bin.js"},"precommit":"test","repository":{"type":"git","url":"git+https://github.com/pinojs/pino.git"},"keywords":["fast","logger","stream","json"],"author":"Matteo Collina ","contributors":["David Mark Clements ","James Sumners ","Thomas Watson Steen (https://twitter.com/wa7son)"],"license":"MIT","bugs":{"url":"https://github.com/pinojs/pino/issues"},"homepage":"http://getpino.io","devDependencies":{"airtap":"4.0.3","benchmark":"^2.1.4","bole":"^4.0.0","bunyan":"^1.8.14","docsify-cli":"^4.4.1","eslint":"^7.17.0","eslint-config-standard":"^16.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","execa":"^5.0.0","fastbench":"^1.0.1","flush-write-stream":"^2.0.0","import-fresh":"^3.2.1","log":"^6.0.0","loglevel":"^1.6.7","pino-pretty":"^5.0.0","pre-commit":"^1.2.2","proxyquire":"^2.1.3","pump":"^3.0.0","semver":"^7.0.0","split2":"^3.1.1","steed":"^1.1.3","strip-ansi":"^6.0.0","tap":"^15.0.1","tape":"^5.0.0","through2":"^4.0.0","winston":"^3.3.3"},"dependencies":{"fast-redact":"^3.0.0","fast-safe-stringify":"^2.0.8","process-warning":"^1.0.0","flatstr":"^1.0.12","pino-std-serializers":"^3.1.0","quick-format-unescaped":"^4.0.3","sonic-boom":"^1.0.2"}}')},8330(e){"use strict";e.exports=JSON.parse('{"name":"@unblockneteasemusic/server","version":"0.28.0","description":"Revive unavailable songs for Netease Cloud Music","main":"src/provider/match.js","bin":{"unblockneteasemusic":"./precompiled/app.js"},"engines":{"node":">= 12"},"scripts":{"start:dev":"cross-env LOG_LEVEL=debug node src/app.js -e https://music.163.com","start":"cross-env node src/app.js -e https://music.163.com","build":"webpack","pkg":"pkg . --out-path=dist/","test":"jest"},"pkg":{"assets":["server.key","server.crt"],"targets":["node18-linux-arm64","node18-win-arm64","node18-linux-x64","node18-win-x64"],"outputPath":"dist"},"repository":{"type":"git","url":"https://github.com/UnblockNeteaseMusic/server.git"},"author":"nondanee, 1715173329, pan93412","license":"LGPL-3.0-only","dependencies":{"node-windows":"^1.0.0-beta.8","pino":"6.14.0","pino-pretty":"^7.6.1"},"devDependencies":{"@swc/core":"^1.15.11","@types/node":"^25.2.2","@types/pino":"7.0.5","@yarnpkg/sdks":"^3.2.3","browserslist":"^4.28.1","core-js":"^3.48.0","cross-env":"^10.1.0","jest":"^30.2.0","pkg":"^5.8.1","prettier":"^3.8.1","swc-loader":"^0.2.7","terser-webpack-plugin":"^5.3.16","typescript":"^5.9.3","webpack":"^5.105.0","webpack-cli":"^6.0.1"},"resolutions":{"cacheable-request":"^10.2.9","minimatch":"^3.0.8","minimist":"^1.2.8","semver":"^7.5.4"},"publishConfig":{"access":"public"},"packageManager":"yarn@3.8.7"}')}},t={};function r(i){var o=t[i];if(void 0!==o)return o.exports;var s=t[i]={exports:{}};return e[i].call(s.exports,s,s.exports,r),s.exports}(()=>{"use strict";r(9845),r(1699),r(7589),r(6791),r(8831),r(518);let e=r(8330),t=r(5335).program({name:e.name.replace(/@.+\//,""),version:e.version}).option(["-v","--version"],{action:"version"}).option(["-p","--port"],{metavar:"http[:https]",help:"specify server port"}).option(["-a","--address"],{metavar:"address",help:"specify server host"}).option(["-u","--proxy-url"],{metavar:"url",help:"request through upstream proxy"}).option(["-f","--force-host"],{metavar:"host",help:"force the netease server ip"}).option(["-o","--match-order"],{metavar:"source",nargs:"+",help:"set priority of sources"}).option(["-t","--token"],{metavar:"token",help:"set up proxy authentication"}).option(["-e","--endpoint"],{metavar:"url",help:"replace virtual endpoint with public host"}).option(["-s","--strict"],{action:"store_true",help:"enable proxy limitation"}).option(["-c","--cnrelay"],{metavar:"cnrelay",help:"Mainland China relay to get music url"}).option(["-h","--help"],{action:"help"}).parse(process.argv);if(global.address=t.address,t.port=(t.port||"8080:8081").split(":").map(e=>parseInt(e)),t.port.some(e=>isNaN(e)||e<1||e>65535)&&(console.log("Port must be a number higher than 0 and lower than 65535."),process.exit(1)),t.proxyUrl&&!/http(s?):\/\/.+:\d+/.test(t.proxyUrl)&&(console.log("Please check the proxy url."),process.exit(1)),t.endpoint?"-"===t.endpoint?t.endpoint="":/http(s?):\/\/.+/.test(t.endpoint)||(console.log("Please check the endpoint host."),process.exit(1)):t.endpoint="https://music.163.com",t.forceHost&&0===r(9278).isIP(t.forceHost)&&(console.log("Please check the server host."),process.exit(1)),t.matchOrder){let e=Object.keys(r(2413).PROVIDERS),i=t.matchOrder;i.some((e,t)=>t!=i.indexOf(e))?(console.log("Please check the duplication in match order."),process.exit(1)):i.some(t=>!e.includes(t))&&(console.log("Please check the availability of match sources."),process.exit(1)),global.source=i}t.token&&!/\S+:\S+/.test(t.token)&&(console.log("Please check the authentication token."),process.exit(1));let{logScope:i}=r(9309),o=r(7016).parse,s=r(8978),a=r(9914),{CacheStorageGroup:c}=r(755),u=i("app"),l=Array.from(s.target.host);global.port=t.port,global.proxy=t.proxyUrl?o(t.proxyUrl):null,global.hosts=l.reduce((e,r)=>Object.assign(e,{[r]:t.forceHost}),{}),a.whitelist=["://[\\w.]*music\\.126\\.net","://[\\w.]*vod\\.126\\.net","://acstatic-dun.126.net","://[\\w.]*\\.netease.com","://[\\w.]*\\.163yun.com"],global.cnrelay=t.cnrelay,t.strict&&a.blacklist.push(".*"),a.authentication=t.token||null,global.endpoint=t.endpoint,t.endpoint&&a.whitelist.push(escape(t.endpoint));let f="true"===process.env.ENABLE_HTTPDNS?[e=>r(9904)("POST","http://music.httpdns.c.163.com/d",{},e).then(e=>e.json()).then(e=>e.dns.reduce((e,t)=>e.concat(t.ips),[])),e=>r(9904)("GET","http://httpdns.n.netease.com/httpdns/v2/d?domain="+e).then(e=>e.json()).then(e=>Object.keys(e.data).map(t=>e.data[t]).reduce((e,t)=>e.concat(t.ip||[]),[]))]:[],p=c.getInstance();setInterval(()=>{p.cleanup()},9e5),Promise.all(f.map(e=>e(l.join(","))).concat(l.map(e=>new Promise((t,i)=>r(2250).lookup(e,{all:!0},(e,r)=>e?i(e):t(r.map(e=>e.address))))))).then(e=>{let{host:t}=s.target;e.forEach(e=>e.forEach(t.add,t)),a.whitelist=a.whitelist.concat(Array.from(t).map(escape));let r=e=>u.info(`${["HTTP","HTTPS"][e]} Server running @ http://${address||"0.0.0.0"}:${port[e]}`);port[0]&&a.http.listen(port[0],address).once("listening",()=>r(0)),port[1]&&a.https.listen(port[1],address).once("listening",()=>r(1)),cnrelay&&u.info(`CNRelay: ${cnrelay}`)}).catch(e=>{console.log(e),process.exit(1)})})()})(); \ No newline at end of file +`,skipKeys:i=[],customPrettifiers:o={},errorLikeKeys:s=f,excludeLoggerKeys:c=!0,singleLine:l=!1,colorizer:p=u}){let h=[].concat(i);!0===c&&Array.prototype.push.apply(h,g);let d="",{plain:y,errors:m}=Object.entries(e).reduce(({plain:t,errors:r},[i,a])=>{if(!1===h.includes(i)){let c="function"==typeof o[i]?o[i](a,i,e):a;s.includes(i)?r[i]=c:t[i]=c}return{plain:t,errors:r}},{plain:{},errors:{}});return l?(Object.keys(y).length>0&&(d+=p.greyMessage(a(y))),d+=r):Object.entries(y).forEach(([e,i])=>{let s="function"==typeof o[e]?i:a(i,null,2);if(void 0===s)return;let c=S({input:s,ident:t,eol:r});d+=`${t}${e}:${c.startsWith(r)?"":" "}${c}${r}`}),Object.entries(m).forEach(([e,i])=>{let s="function"==typeof o[e]?i:a(i,null,2);void 0!==s&&(d+=E({keyName:e,lines:s,eol:r,ident:t}))}),d}function E({keyName:e,lines:t,eol:r,ident:i}){let o="",s=S({input:t,ident:i,eol:r}),a=`${i}${e}: ${s}${r}`.split(r);for(let e=0;e{Object.prototype.hasOwnProperty.call(e,t)&&(e=e[t])}),delete e[i]}function j(){}function T(e,t){e.destroyed||("beforeExit"===t?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}e.exports={isObject:_,prettifyErrorLog:function({log:e,messageKey:t=p,ident:r=" ",eol:i=` +`,errorLikeKeys:o=f,errorProperties:s=[]}){let a=S({input:e.stack,ident:r,eol:i}),c=`${r}${a}${i}`;if(s.length>0){let a,u=g.concat(t,"type","stack");a="*"===s[0]?Object.keys(e).filter(e=>!1===u.includes(e)):s.filter(e=>!1===u.includes(e));for(let t=0;t`),""!==r)return r},prettifyObject:x,prettifyTime:function({log:e,timestampKey:t=y,translateFormat:r,prettifier:i}){let o=null;if(t in e?o=e[t]:"timestamp"in e&&(o=e.timestamp),null===o)return;let s=r?b(o,r):o;return i?i(s):`[${s}]`},buildSafeSonicBoom:function(e){let t=new s(e);return t.on("error",function e(r){if("EPIPE"===r.code){t.write=j,t.end=j,t.flushSync=j,t.destroy=j;return}t.removeListener("error",e)}),!e.sync&&c&&function(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=r(5463);t.register(e,T),e.on("close",function(){t.unregister(e)})}}(t),t},filterLog:function(e,t){let r=i(e);return t.forEach(e=>{k(r,e)}),r}},e.exports.internals={formatTime:b,joinLinesWithIndentation:S,prettifyError:E,deleteLogProperty:k,splitIgnoreKey:O,createDate:v,isValidDate:w}},2985(e,t,r){"use strict";let i=r(9896),o=r(4434),s=r(9023).inherits,a=r(6928),c=r(7048);function u(e,t){function r(r,i){if(r){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",r)}):t.emit("error",r);return}t.fd=i,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t._reopening&&(t._writing||!(t._len>t.minLength)||t.destroyed||p(t))}t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;let o=t.append?"a":"w";if(t.sync)try{t.mkdir&&i.mkdirSync(a.dirname(e),{recursive:!0});let s=i.openSync(e,o);r(null,s)}catch(e){throw r(e),e}else t.mkdir?i.mkdir(a.dirname(e),{recursive:!0},t=>{if(t)return r(t);i.open(e,o,r)}):i.open(e,o,r)}function l(e){if(!(this instanceof l))return new l(e);let{fd:t,dest:r,minLength:o,sync:s,append:a=!0,mkdir:d,retryEAGAIN:y}=e||{};if(t=t||r,this._bufs=[],this._len=0,this.fd=-1,this._writing=!1,this._writingBuf="",this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._hwm=Math.max(o||0,16387),this.file=null,this.destroyed=!1,this.minLength=o||0,this.sync=s||!1,this.append=a||!1,this.retryEAGAIN=y||(()=>!0),this.mkdir=d||!1,"number"==typeof t)this.fd=t,process.nextTick(()=>this.emit("ready"));else if("string"==typeof t)u(t,this);else throw Error("SonicBoom supports only file descriptors and files");if(this.minLength>=0x1000000)throw Error("minLength should be smaller than MAX_WRITE (16777216)");this.release=(e,t)=>{if(e){if("EAGAIN"===e.code&&this.retryEAGAIN(e,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{c(100),this.release(void 0,0)}catch(e){this.release(e)}else setTimeout(()=>{i.write(this.fd,this._writingBuf,"utf8",this.release)},100);else this._writing=!1,this.emit("error",e);return}if(this._len-=t,this._writingBuf=this._writingBuf.slice(t),this._writingBuf.length){if(!this.sync)return void i.write(this.fd,this._writingBuf,"utf8",this.release);try{do{let e=i.writeSync(this.fd,this._writingBuf,"utf8");this._len-=e,this._writingBuf=this._writingBuf.slice(e)}while(this._writingBuf)}catch(e){this.release(e);return}}let r=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):r>this.minLength?p(this):this._ending?r>0?p(this):(this._writing=!1,h(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(f,this)):this.emit("drain"))},this.on("newListener",function(e){"drain"===e&&(this._asyncDrainScheduled=!1)})}function f(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}function p(e){let t=e.release;if(e._writing=!0,e._writingBuf=e._writingBuf||e._bufs.shift(),e.sync)try{let r=i.writeSync(e.fd,e._writingBuf,"utf8");t(null,r)}catch(e){t(e)}else i.write(e.fd,e._writingBuf,"utf8",t)}function h(e){-1===e.fd?e.once("ready",h.bind(null,e)):(i.close(e.fd,t=>{t?e.emit("error",t):(e._ending&&!e._writing&&e.emit("finish"),e.emit("close"))}),e.destroyed=!0,e._bufs=[])}s(l,o),l.prototype.write=function(e){if(this.destroyed)throw Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return!this._writing&&t>0x1000000?r.push(e):0===r.length?r[0]=""+e:r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&p(this),this._len{this.reopen(e)});if(this._ending)return;if(!this.file)throw Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&i.close(t,e=>{if(e)return this.emit("error",e)})}),u(e||this.file,this)},l.prototype.end=function(){if(this.destroyed)throw Error("SonicBoom destroyed");this._opening?this.once("ready",()=>{this.end()}):this._ending||(this._ending=!0,this._writing||(this._len>0&&this.fd>=0?p(this):h(this)))},l.prototype.flushSync=function(){if(this.destroyed)throw Error("SonicBoom destroyed");if(this.fd<0)throw Error("sonic boom is not ready yet");for(!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");this._bufs.length;){let e=this._bufs[0];try{this._len-=i.writeSync(this.fd,e,"utf8"),this._bufs.shift()}catch(t){if("EAGAIN"!==t.code||!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;c(100)}}},l.prototype.destroy=function(){this.destroyed||h(this)},l.SonicBoom=l,l.default=l,e.exports=l},3648(e,t,r){"use strict";var i=r(1987),o=r(8753),s=TypeError;e.exports=function(e){if(i(e))return e;throw new s(o(e)+" is not a function")}},9164(e,t,r){"use strict";var i=r(5045).has;e.exports=function(e){return i(e),e}},6308(e,t,r){"use strict";var i=r(6855),o=String,s=TypeError;e.exports=function(e){if(i(e))return e;throw new s("Can't set "+o(e)+" as a prototype")}},8654(e,t,r){"use strict";var i=r(3016).has;e.exports=function(e){return i(e),e}},6317(e,t,r){"use strict";var i=r(1095),o=TypeError;e.exports=function(e,t){if(i(t,e))return e;throw new o("Incorrect invocation")}},5661(e,t,r){"use strict";var i=r(6512),o=String,s=TypeError;e.exports=function(e){if(i(e))return e;throw new s(o(e)+" is not an object")}},3139(e,t,r){"use strict";var i=r(9303),o=r(3243),s=r(5160),a=function(e){return function(t,r,a){var c,u=i(t),l=s(u);if(0===l)return!e&&-1;var f=o(a,l);if(e&&r!=r){for(;l>f;)if((c=u[f++])!=c)return!0}else for(;l>f;f++)if((e||f in u)&&u[f]===r)return e||f||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},7809(e,t,r){"use strict";var i=r(4550),o=r(6346),s=TypeError,a=Object.getOwnPropertyDescriptor;e.exports=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(o(e)&&!a(e,"length").writable)throw new s("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},7293(e,t,r){"use strict";var i=r(5661),o=r(7577);e.exports=function(e,t,r,s){try{return s?t(i(r)[0],r[1]):t(r)}catch(t){o(e,"throw",t)}}},314(e,t,r){"use strict";var i=r(6409)("iterator"),o=!1;try{var s=0,a={next:function(){return{done:!!s++}},return:function(){o=!0}};a[i]=function(){return this},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){try{if(!t&&!o)return!1}catch(e){return!1}var r=!1;try{var s={};s[i]=function(){return{next:function(){return{done:r=!0}}}},e(s)}catch(e){}return r}},3702(e,t,r){"use strict";var i=r(9090),o=i({}.toString),s=i("".slice);e.exports=function(e){return s(o(e),8,-1)}},2969(e,t,r){"use strict";var i=r(4490),o=r(1987),s=r(3702),a=r(6409)("toStringTag"),c=Object,u="Arguments"===s(function(){return arguments}()),l=function(e,t){try{return e[t]}catch(e){}};e.exports=i?s:function(e){var t,r,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=l(t=c(e),a))?r:u?s(t):"Object"===(i=s(t))&&o(t.callee)?"Arguments":i}},2593(e,t,r){"use strict";var i=r(6115),o=r(9262),s=r(4937),a=r(4403);e.exports=function(e,t,r){for(var c=o(t),u=a.f,l=s.f,f=0;f0x1fffffffffffff)throw new t("Maximum allowed index exceeded");return e}},5165(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3117(e,t,r){"use strict";var i=r(2450).navigator,o=i&&i.userAgent;e.exports=o?String(o):""},2949(e,t,r){"use strict";var i,o,s=r(2450),a=r(3117),c=s.process,u=s.Deno,l=c&&c.versions||u&&u.version,f=l&&l.v8;f&&(o=(i=f.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!o&&a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(o=+i[1]),e.exports=o},6993(e,t,r){"use strict";var i=r(2450),o=r(3117),s=r(3702),a=function(e){return o.slice(0,e.length)===e};e.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":i.Bun&&"string"==typeof Bun.version?"BUN":i.Deno&&"object"==typeof Deno.version?"DENO":"process"===s(i.process)?"NODE":i.window&&i.document?"BROWSER":"REST"},1479(e,t,r){"use strict";var i=r(9090),o=Error,s=i("".replace),a=String(new o("zxcasd").stack),c=/\n\s*at [^:]*:[^\n]*/,u=c.test(a);e.exports=function(e,t){if(u&&"string"==typeof e&&!o.prepareStackTrace)for(;t--;)e=s(e,c,"");return e}},4537(e,t,r){"use strict";var i=r(5733),o=r(1479),s=r(373),a=Error.captureStackTrace;e.exports=function(e,t,r,c){s&&(a?a(e,t):i(e,"stack",o(r,c)))}},373(e,t,r){"use strict";var i=r(6881),o=r(9762);e.exports=!i(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",o(1,7)),7!==e.stack)})},8476(e,t,r){"use strict";var i=r(2450),o=r(4937).f,s=r(5733),a=r(9842),c=r(1687),u=r(2593),l=r(6610);e.exports=function(e,t){var r,f,p,h,d,y=e.target,g=e.global,m=e.stat;if(r=g?i:m?i[y]||c(y,{}):i[y]&&i[y].prototype)for(f in t){if(h=t[f],p=e.dontCallGetSet?(d=o(r,f))&&d.value:r[f],!l(g?f:y+(m?".":"#")+f,e.forced)&&void 0!==p){if(typeof h==typeof p)continue;u(h,p)}(e.sham||p&&p.sham)&&s(h,"sham",!0),a(r,f,h,e)}}},6881(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},195(e,t,r){"use strict";var i=r(9098),o=Function.prototype,s=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(i?a.bind(s):function(){return a.apply(s,arguments)})},7594(e,t,r){"use strict";var i=r(8146),o=r(3648),s=r(9098),a=i(i.bind);e.exports=function(e,t){return o(e),void 0===t?e:s?a(e,t):function(){return e.apply(t,arguments)}}},9098(e,t,r){"use strict";e.exports=!r(6881)(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},7207(e,t,r){"use strict";var i=r(9098),o=Function.prototype.call;e.exports=i?o.bind(o):function(){return o.apply(o,arguments)}},6232(e,t,r){"use strict";var i=r(4550),o=r(6115),s=Function.prototype,a=i&&Object.getOwnPropertyDescriptor,c=o(s,"name"),u=c&&(!i||i&&a(s,"name").configurable);e.exports={EXISTS:c,PROPER:c&&"something"===(function(){}).name,CONFIGURABLE:u}},6480(e,t,r){"use strict";var i=r(9090),o=r(3648);e.exports=function(e,t,r){try{return i(o(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},8146(e,t,r){"use strict";var i=r(3702),o=r(9090);e.exports=function(e){if("Function"===i(e))return o(e)}},9090(e,t,r){"use strict";var i=r(9098),o=Function.prototype,s=o.call,a=i&&o.bind.bind(s,s);e.exports=i?a:function(e){return function(){return s.apply(e,arguments)}}},3449(e,t,r){"use strict";var i=r(2450),o=r(1987);e.exports=function(e,t){var r;return arguments.length<2?o(r=i[e])?r:void 0:i[e]&&i[e][t]}},9905(e){"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},3233(e,t,r){"use strict";var i=r(2969),o=r(5036),s=r(3271),a=r(9263),c=r(6409)("iterator");e.exports=function(e){if(!s(e))return o(e,c)||o(e,"@@iterator")||a[i(e)]}},543(e,t,r){"use strict";var i=r(7207),o=r(3648),s=r(5661),a=r(8753),c=r(3233),u=TypeError;e.exports=function(e,t){var r=arguments.length<2?c(e):t;if(o(r))return s(i(r,e));throw new u(a(e)+" is not iterable")}},5036(e,t,r){"use strict";var i=r(3648),o=r(3271);e.exports=function(e,t){var r=e[t];return o(r)?void 0:i(r)}},3027(e,t,r){"use strict";var i=r(3648),o=r(5661),s=r(7207),a=r(1173),c=r(9905),u="Invalid size",l=RangeError,f=TypeError,p=Math.max,h=function(e,t){this.set=e,this.size=p(t,0),this.has=i(e.has),this.keys=i(e.keys)};h.prototype={getIterator:function(){return c(o(s(this.keys,this.set)))},includes:function(e){return s(this.has,this.set,e)}},e.exports=function(e){o(e);var t=+e.size;if(t!=t)throw new f(u);var r=a(t);if(r<0)throw new l(u);return new h(e,r)}},2450(e){"use strict";var t=function(e){return e&&e.Math===Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||t("object"==typeof this&&this)||function(){return this}()||Function("return this")()},6115(e,t,r){"use strict";var i=r(9090),o=r(5715),s=i({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return s(o(e),t)}},5435(e){"use strict";e.exports={}},8227(e,t,r){"use strict";e.exports=r(3449)("document","documentElement")},5151(e,t,r){"use strict";var i=r(4550),o=r(6881),s=r(2049);e.exports=!i&&!o(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},6385(e,t,r){"use strict";var i=r(9090),o=r(6881),s=r(3702),a=Object,c=i("".split);e.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?c(e,""):a(e)}:a},6165(e,t,r){"use strict";var i=r(1987),o=r(6512),s=r(6009);e.exports=function(e,t,r){var a,c;return s&&i(a=t.constructor)&&a!==r&&o(c=a.prototype)&&c!==r.prototype&&s(e,c),e}},9420(e,t,r){"use strict";var i=r(9090),o=r(1987),s=r(3183),a=i(Function.toString);o(s.inspectSource)||(s.inspectSource=function(e){return a(e)}),e.exports=s.inspectSource},3978(e,t,r){"use strict";var i=r(6512),o=r(5733);e.exports=function(e,t){i(t)&&"cause"in t&&o(e,"cause",t.cause)}},4347(e,t,r){"use strict";var i,o,s,a=r(492),c=r(2450),u=r(6512),l=r(5733),f=r(6115),p=r(3183),h=r(2745),d=r(5435),y="Object already initialized",g=c.TypeError,m=c.WeakMap;if(a||p.state){var b=p.state||(p.state=new m);b.get=b.get,b.has=b.has,b.set=b.set,i=function(e,t){if(b.has(e))throw new g(y);return t.facade=e,b.set(e,t),t},o=function(e){return b.get(e)||{}},s=function(e){return b.has(e)}}else{var v=h("state");d[v]=!0,i=function(e,t){if(f(e,v))throw new g(y);return t.facade=e,l(e,v,t),t},o=function(e){return f(e,v)?e[v]:{}},s=function(e){return f(e,v)}}e.exports={set:i,get:o,has:s,enforce:function(e){return s(e)?o(e):i(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=o(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return r}}}},5243(e,t,r){"use strict";var i=r(6409),o=r(9263),s=i("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[s]===e)}},6346(e,t,r){"use strict";var i=r(3702);e.exports=Array.isArray||function(e){return"Array"===i(e)}},1987(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},6610(e,t,r){"use strict";var i=r(6881),o=r(1987),s=/#|\.prototype\./,a=function(e,t){var r=u[c(e)];return r===f||r!==l&&(o(t)?i(t):!!t)},c=a.normalize=function(e){return String(e).replace(s,".").toLowerCase()},u=a.data={},l=a.NATIVE="N",f=a.POLYFILL="P";e.exports=a},1041(e,t,r){"use strict";var i=r(2969),o=r(6115),s=r(3271),a=r(6409),c=r(9263),u=a("iterator"),l=Object;e.exports=function(e){if(s(e))return!1;var t=l(e);return void 0!==t[u]||"@@iterator"in t||o(c,i(t))}},3271(e){"use strict";e.exports=function(e){return null==e}},6512(e,t,r){"use strict";var i=r(1987);e.exports=function(e){return"object"==typeof e?null!==e:i(e)}},6855(e,t,r){"use strict";var i=r(6512);e.exports=function(e){return i(e)||null===e}},5181(e){"use strict";e.exports=!1},343(e,t,r){"use strict";var i=r(3449),o=r(1987),s=r(1095),a=r(9126),c=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=i("Symbol");return o(t)&&s(t.prototype,c(e))}},3753(e,t,r){"use strict";var i=r(7207);e.exports=function(e,t,r){for(var o,s,a=r?e:e.iterator,c=e.next;!(o=i(c,a)).done;)if(void 0!==(s=t(o.value)))return s}},6490(e,t,r){"use strict";var i=r(7594),o=r(7207),s=r(5661),a=r(8753),c=r(5243),u=r(5160),l=r(1095),f=r(543),p=r(3233),h=r(7577),d=TypeError,y=function(e,t){this.stopped=e,this.result=t},g=y.prototype;e.exports=function(e,t,r){var m,b,v,w,_,S,x,E=r&&r.that,O=!!(r&&r.AS_ENTRIES),k=!!(r&&r.IS_RECORD),j=!!(r&&r.IS_ITERATOR),T=!!(r&&r.INTERRUPTED),R=i(t,E),P=function(e){var t=m;return m=void 0,t&&h(t,"normal"),new y(!0,e)},M=function(e){return O?(s(e),T?R(e[0],e[1],P):R(e[0],e[1])):T?R(e,P):R(e)};if(k)m=e.iterator;else if(j)m=e;else{if(!(b=p(e)))throw new d(a(e)+" is not iterable");if(c(b)){for(v=0,w=u(e);w>v;v++)if((_=M(e[v]))&&l(g,_))return _;return new y(!1)}m=f(e,b)}for(S=k?e.next:m.next;!(x=o(S,m)).done;){var L=x.value;try{_=M(L)}catch(e){if(m)h(m,"throw",e);else throw e}if("object"==typeof _&&_&&l(g,_))return _}return new y(!1)}},8583(e,t,r){"use strict";var i=r(7577);e.exports=function(e,t,r){for(var o=e.length-1;o>=0;o--)if(void 0!==e[o])try{r=i(e[o].iterator,t,r)}catch(e){t="throw",r=e}if("throw"===t)throw r;return r}},7577(e,t,r){"use strict";var i=r(7207),o=r(5661),s=r(5036);e.exports=function(e,t,r){var a,c;o(e);try{if(!(a=s(e,"return"))){if("throw"===t)throw r;return r}a=i(a,e)}catch(e){c=!0,a=e}if("throw"===t)throw r;if(c)throw a;return o(a),r}},8700(e,t,r){"use strict";var i=r(7207),o=r(34),s=r(5733),a=r(961),c=r(6409),u=r(4347),l=r(5036),f=r(6563).IteratorPrototype,p=r(5063),h=r(7577),d=r(8583),y=c("toStringTag"),g="IteratorHelper",m="WrapForValidIterator",b="normal",v="throw",w=u.set,_=function(e){var t=u.getterFor(e?m:g);return a(o(f),{next:function(){var r=t(this);if(e)return r.nextHandler();if(r.done)return p(void 0,!0);try{var i=r.nextHandler();return r.returnHandlerResult?i:p(i,r.done)}catch(e){throw r.done=!0,e}},return:function(){var r=t(this),o=r.iterator,s=r.done;if(r.done=!0,e){var a=l(o,"return");return a?i(a,o):p(void 0,!0)}if(s)return p(void 0,!0);if(r.inner)try{h(r.inner.iterator,b)}catch(e){return h(o,v,e)}if(r.openIters)try{d(r.openIters,b)}catch(e){if(o)return h(o,v,e);throw e}return o&&h(o,b),p(void 0,!0)}})},S=_(!0),x=_(!1);s(x,y,"Iterator Helper"),e.exports=function(e,t,r){var i=function(i,o){o?(o.iterator=i.iterator,o.next=i.next):o=i,o.type=t?m:g,o.returnHandlerResult=!!r,o.nextHandler=e,o.counter=0,o.done=!1,w(this,o)};return i.prototype=t?S:x,i}},7110(e){"use strict";e.exports=function(e,t){var r="function"==typeof Iterator&&Iterator.prototype[e];if(r)try{r.call({next:null},t).next()}catch(e){return!0}}},4635(e,t,r){"use strict";var i=r(2450);e.exports=function(e,t){var r=i.Iterator,o=r&&r.prototype,s=o&&o[e],a=!1;if(s)try{s.call({next:function(){return{done:!0}},return:function(){a=!0}},-1)}catch(e){e instanceof t||(a=!1)}if(!a)return s}},6563(e,t,r){"use strict";var i,o,s,a=r(6881),c=r(1987),u=r(6512),l=r(34),f=r(9925),p=r(9842),h=r(6409),d=r(5181),y=h("iterator"),g=!1;[].keys&&("next"in(s=[].keys())?(o=f(f(s)))!==Object.prototype&&(i=o):g=!0),!u(i)||a(function(){var e={};return i[y].call(e)!==e})?i={}:d&&(i=l(i)),c(i[y])||p(i,y,function(){return this}),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:g}},9263(e){"use strict";e.exports={}},5160(e,t,r){"use strict";var i=r(9132);e.exports=function(e){return i(e.length)}},5713(e,t,r){"use strict";var i=r(9090),o=r(6881),s=r(1987),a=r(6115),c=r(4550),u=r(6232).CONFIGURABLE,l=r(9420),f=r(4347),p=f.enforce,h=f.get,d=String,y=Object.defineProperty,g=i("".slice),m=i("".replace),b=i([].join),v=c&&!o(function(){return 8!==y(function(){},"length",{value:8}).length}),w=String(String).split("String"),_=e.exports=function(e,t,r){"Symbol("===g(d(t),0,7)&&(t="["+m(d(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!a(e,"name")||u&&e.name!==t)&&(c?y(e,"name",{value:t,configurable:!0}):e.name=t),v&&r&&a(r,"arity")&&e.length!==r.arity&&y(e,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?c&&y(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var i=p(e);return a(i,"source")||(i.source=b(w,"string"==typeof t?t:"")),e};Function.prototype.toString=_(function(){return s(this)&&h(this).source||l(this)},"toString")},5045(e,t,r){"use strict";var i=r(9090),o=Map.prototype;e.exports={Map:Map,set:i(o.set),get:i(o.get),has:i(o.has),remove:i(o.delete),proto:o}},3941(e,t,r){"use strict";var i=r(9090),o=r(3753),s=r(5045),a=s.Map,c=s.proto,u=i(c.forEach),l=i(c.entries),f=l(new a).next;e.exports=function(e,t,r){return r?o({iterator:l(e),next:f},function(e){return t(e[1],e[0])}):u(e,t)}},4447(e){"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var i=+e;return(i>0?r:t)(i)}},1645(e,t,r){"use strict";var i=r(3648),o=TypeError,s=function(e){var t,r;this.promise=new e(function(e,i){if(void 0!==t||void 0!==r)throw new o("Bad Promise constructor");t=e,r=i}),this.resolve=i(t),this.reject=i(r)};e.exports.f=function(e){return new s(e)}},4681(e,t,r){"use strict";var i=r(7901);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:i(e)}},34(e,t,r){"use strict";var i,o=r(5661),s=r(2911),a=r(5165),c=r(5435),u=r(8227),l=r(2049),f=r(2745),p="prototype",h="script",d=f("IE_PROTO"),y=function(){},g=function(e){return"<"+h+">"+e+""},m=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){var e,t=l("iframe");return t.style.display="none",u.appendChild(t),t.src=String("java"+h+":"),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F},v=function(){try{i=new ActiveXObject("htmlfile")}catch(e){}v="u">typeof document?document.domain&&i?m(i):b():m(i);for(var e=a.length;e--;)delete v[p][a[e]];return v()};c[d]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(y[p]=o(e),r=new y,y[p]=null,r[d]=e):r=v(),void 0===t?r:s.f(r,t)}},2911(e,t,r){"use strict";var i=r(4550),o=r(3952),s=r(4403),a=r(5661),c=r(9303),u=r(4690);t.f=i&&!o?Object.defineProperties:function(e,t){a(e);for(var r,i=c(t),o=u(t),l=o.length,f=0;l>f;)s.f(e,r=o[f++],i[r]);return e}},4403(e,t,r){"use strict";var i=r(4550),o=r(5151),s=r(3952),a=r(5661),c=r(4671),u=TypeError,l=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p="enumerable",h="configurable",d="writable";t.f=i?s?function(e,t,r){if(a(e),t=c(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&d in r&&!r[d]){var i=f(e,t);i&&i[d]&&(e[t]=r.value,r={configurable:h in r?r[h]:i[h],enumerable:p in r?r[p]:i[p],writable:!1})}return l(e,t,r)}:l:function(e,t,r){if(a(e),t=c(t),a(r),o)try{return l(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new u("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},4937(e,t,r){"use strict";var i=r(4550),o=r(7207),s=r(7027),a=r(9762),c=r(9303),u=r(4671),l=r(6115),f=r(5151),p=Object.getOwnPropertyDescriptor;t.f=i?p:function(e,t){if(e=c(e),t=u(t),f)try{return p(e,t)}catch(e){}if(l(e,t))return a(!o(s.f,e,t),e[t])}},7822(e,t,r){"use strict";var i=r(7774),o=r(5165).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,o)}},6259(e,t){"use strict";t.f=Object.getOwnPropertySymbols},9925(e,t,r){"use strict";var i=r(6115),o=r(1987),s=r(5715),a=r(2745),c=r(7897),u=a("IE_PROTO"),l=Object,f=l.prototype;e.exports=c?l.getPrototypeOf:function(e){var t=s(e);if(i(t,u))return t[u];var r=t.constructor;return o(r)&&t instanceof r?r.prototype:t instanceof l?f:null}},1095(e,t,r){"use strict";e.exports=r(9090)({}.isPrototypeOf)},7774(e,t,r){"use strict";var i=r(9090),o=r(6115),s=r(9303),a=r(3139).indexOf,c=r(5435),u=i([].push);e.exports=function(e,t){var r,i=s(e),l=0,f=[];for(r in i)!o(c,r)&&o(i,r)&&u(f,r);for(;t.length>l;)o(i,r=t[l++])&&(~a(f,r)||u(f,r));return f}},4690(e,t,r){"use strict";var i=r(7774),o=r(5165);e.exports=Object.keys||function(e){return i(e,o)}},7027(e,t){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor;t.f=i&&!r.call({1:2},1)?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},6009(e,t,r){"use strict";var i=r(6480),o=r(6512),s=r(5624),a=r(6308);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=i(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,i){return s(r),a(i),o(r)&&(t?e(r,i):r.__proto__=i),r}}():void 0)},5236(e,t,r){"use strict";var i=r(7207),o=r(1987),s=r(6512),a=TypeError;e.exports=function(e,t){var r,c;if("string"===t&&o(r=e.toString)&&!s(c=i(r,e))||o(r=e.valueOf)&&!s(c=i(r,e))||"string"!==t&&o(r=e.toString)&&!s(c=i(r,e)))return c;throw new a("Can't convert object to primitive value")}},9262(e,t,r){"use strict";var i=r(3449),o=r(9090),s=r(7822),a=r(6259),c=r(5661),u=o([].concat);e.exports=i("Reflect","ownKeys")||function(e){var t=s.f(c(e)),r=a.f;return r?u(t,r(e)):t}},2090(e,t,r){"use strict";var i=r(9090),o=r(6115),s=SyntaxError,a=parseInt,c=String.fromCharCode,u=i("".charAt),l=i("".slice),f=i(/./.exec),p={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":` +`,"\\r":`\r`,"\\t":" "},h=/^[\da-f]{4}$/i,d=/^[\u0000-\u001F]$/;e.exports=function(e,t){for(var r=!0,i="";tr.size?u(r.getIterator(),function(e){p(t,e)&&f(o,e)}):c(t,function(e){r.includes(e)&&f(o,e)}),o}},5027(e,t,r){"use strict";var i=r(8654),o=r(3016).has,s=r(8172),a=r(3027),c=r(7791),u=r(3753),l=r(7577);e.exports=function(e){var t=i(this),r=a(e);if(s(t)<=r.size)return!1!==c(t,function(e){if(r.includes(e))return!1},!0);var f=r.getIterator();return!1!==u(f,function(e){if(o(t,e))return l(f.iterator,"normal",!1)})}},504(e,t,r){"use strict";var i=r(8654),o=r(8172),s=r(7791),a=r(3027);e.exports=function(e){var t=i(this),r=a(e);return!(o(t)>r.size)&&!1!==s(t,function(e){if(!r.includes(e))return!1},!0)}},5809(e,t,r){"use strict";var i=r(8654),o=r(3016).has,s=r(8172),a=r(3027),c=r(3753),u=r(7577);e.exports=function(e){var t=i(this),r=a(e);if(s(t)0?o(t,0x1fffffffffffff):0}},5715(e,t,r){"use strict";var i=r(5624),o=Object;e.exports=function(e){return o(i(e))}},7931(e,t,r){"use strict";var i=r(7207),o=r(6512),s=r(343),a=r(5036),c=r(5236),u=r(6409),l=TypeError,f=u("toPrimitive");e.exports=function(e,t){if(!o(e)||s(e))return e;var r,u=a(e,f);if(u){if(void 0===t&&(t="default"),!o(r=i(u,e,t))||s(r))return r;throw new l("Can't convert object to primitive value")}return void 0===t&&(t="number"),c(e,t)}},4671(e,t,r){"use strict";var i=r(7931),o=r(343);e.exports=function(e){var t=i(e,"string");return o(t)?t:t+""}},4752(e,t,r){"use strict";var i=r(3449),o=r(1987),s=r(1041),a=r(6512),c=i("Set");e.exports=function(e){return a(e)&&"number"==typeof e.size&&o(e.has)&&o(e.keys)?e:s(e)?new c(e):e}},4490(e,t,r){"use strict";var i=r(6409)("toStringTag"),o={};o[i]="z",e.exports="[object z]"===String(o)},7901(e,t,r){"use strict";var i=r(2969),o=String;e.exports=function(e){if("Symbol"===i(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},8753(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},4658(e,t,r){"use strict";var i=r(9090),o=0,s=Math.random(),a=i(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+s,36)}},9126(e,t,r){"use strict";e.exports=r(5717)&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3952(e,t,r){"use strict";var i=r(4550),o=r(6881);e.exports=i&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},4090(e){"use strict";var t=TypeError;e.exports=function(e,r){if(ev&&h(i,arguments[v]),i});if(O.prototype=x,"Error"!==_?c?c(O,E):u(O,E,{name:!0}):y&&b in S&&(l(O,S,b),l(O,S,"prepareStackTrace")),u(O,S),!g)try{x.name!==_&&s(x,"name",_),x.constructor=O}catch(e){}return O}}},3595(e,t,r){"use strict";var i=r(8476),o=r(1095),s=r(9925),a=r(6009),c=r(2593),u=r(34),l=r(5733),f=r(9762),p=r(3978),h=r(4537),d=r(6490),y=r(4681),g=r(6409)("toStringTag"),m=Error,b=[].push,v=function(e,t){var r,i=o(w,this);a?r=a(new m,i?s(this):w):l(r=i?this:u(w),g,"Error"),void 0!==t&&l(r,"message",y(t)),h(r,v,r.stack,1),arguments.length>2&&p(r,arguments[2]);var c=[];return d(e,b,{that:c}),l(r,"errors",c),r};a?a(v,m):c(v,m,{name:!0});var w=v.prototype=u(m.prototype,{constructor:f(1,v),message:f(1,""),name:f(1,"AggregateError")});i({global:!0,constructor:!0,arity:2},{AggregateError:v})},4161(e,t,r){"use strict";r(3595)},7924(e,t,r){"use strict";var i=r(8476),o=r(5715),s=r(5160),a=r(7809),c=r(4651);i({target:"Array",proto:!0,arity:1,forced:r(6881)(function(){return 0x100000001!==[].push.call({length:0x100000000},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=o(this),r=s(t),i=arguments.length;c(r+i);for(var u=0;u1;return e.has(1)&&e.clear(),{done:r,value:2}}}}}).size})},{difference:o})},1214(e,t,r){"use strict";var i=r(8476),o=r(6881),s=r(2568);i({target:"Set",proto:!0,real:!0,forced:!r(6914)("intersection",function(e){return 2===e.size&&e.has(1)&&e.has(2)})||o(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:s})},1079(e,t,r){"use strict";var i=r(8476),o=r(5027);i({target:"Set",proto:!0,real:!0,forced:!r(6914)("isDisjointFrom",function(e){return!e})},{isDisjointFrom:o})},2862(e,t,r){"use strict";var i=r(8476),o=r(504);i({target:"Set",proto:!0,real:!0,forced:!r(6914)("isSubsetOf",function(e){return e})},{isSubsetOf:o})},5941(e,t,r){"use strict";var i=r(8476),o=r(5809);i({target:"Set",proto:!0,real:!0,forced:!r(6914)("isSupersetOf",function(e){return!e})},{isSupersetOf:o})},8506(e,t,r){"use strict";var i=r(8476),o=r(2724),s=r(9877);i({target:"Set",proto:!0,real:!0,forced:!r(6914)("symmetricDifference")||!s("symmetricDifference")},{symmetricDifference:o})},2292(e,t,r){"use strict";var i=r(8476),o=r(7574),s=r(9877);i({target:"Set",proto:!0,real:!0,forced:!r(6914)("union")||!s("union")},{union:o})},9014(e,t,r){"use strict";r(9833)},8074(e,t,r){"use strict";r(8111)},9451(e,t,r){"use strict";r(1634)},6815(e,t,r){"use strict";r(2674)},8308(e,t,r){"use strict";r(4111)},594(e,t,r){"use strict";r(6979)},4472(e,t,r){"use strict";r(4361)},4825(e,t,r){"use strict";r(8046)},7407(e,t,r){"use strict";var i=r(8476),o=r(9164),s=r(5045).remove;i({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=o(this),r=!0,i=0,a=arguments.length;i1?arguments[1]:void 0);return!1!==a(t,function(e,i){if(!r(e,i,t))return!1},!0)}})},5720(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(9164),a=r(5045),c=r(3941),u=a.Map,l=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new u;return c(t,function(e,o){r(e,o,t)&&l(i,o,e)}),i}})},8679(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(9164),a=r(3941);i({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=a(t,function(e,i){if(r(e,i,t))return{key:i}},!0);return i&&i.key}})},7729(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(9164),a=r(3941);i({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=a(t,function(e,i){if(r(e,i,t))return{value:e}},!0);return i&&i.value}})},1559(e,t,r){"use strict";var i=r(8476),o=r(2915),s=r(9164),a=r(3941);i({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===a(s(this),function(t){if(o(t,e))return!0},!0)}})},9109(e,t,r){"use strict";var i=r(8476),o=r(9164),s=r(3941);i({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=s(o(this),function(t,r){if(t===e)return{key:r}},!0);return t&&t.key}})},1475(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(9164),a=r(5045),c=r(3941),u=a.Map,l=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new u;return c(t,function(e,o){l(i,r(e,o,t),e)}),i}})},8625(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(9164),a=r(5045),c=r(3941),u=a.Map,l=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new u;return c(t,function(e,o){l(i,o,r(e,o,t))}),i}})},7480(e,t,r){"use strict";var i=r(8476),o=r(9164),s=r(6490),a=r(5045).set;i({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=o(this),r=arguments.length,i=0;i1?arguments[1]:void 0);return!0===a(t,function(e,i){if(r(e,i,t))return!0},!0)}})},6911(e,t,r){"use strict";var i=r(8476),o=r(3648),s=r(9164),a=r(5045),c=TypeError,u=a.get,l=a.has,f=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=s(this),i=arguments.length;o(t);var a=l(r,e);if(!a&&i<3)throw new c("Updating absent value");var p=a?u(r,e):o(i>2?arguments[2]:void 0)(e,r);return f(r,e,t(p,e,r)),r}})},8399(e,t,r){"use strict";var i=r(8476),o=r(8654),s=r(3016).add;i({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var e=o(this),t=0,r=arguments.length;t1?arguments[1]:void 0);return!1!==a(t,function(e){if(!r(e,e,t))return!1},!0)}})},1286(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(8654),a=r(3016),c=r(7791),u=a.Set,l=a.add;i({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new u;return c(t,function(e){r(e,e,t)&&l(i,e)}),i}})},751(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(8654),a=r(7791);i({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=a(t,function(e){if(r(e,e,t))return{value:e}},!0);return i&&i.value}})},9529(e,t,r){"use strict";var i=r(8476),o=r(7207),s=r(4752),a=r(2568);i({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return o(a,this,s(e))}})},4503(e,t,r){"use strict";r(1214)},9610(e,t,r){"use strict";var i=r(8476),o=r(7207),s=r(4752),a=r(5027);i({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return o(a,this,s(e))}})},3965(e,t,r){"use strict";r(1079)},169(e,t,r){"use strict";var i=r(8476),o=r(7207),s=r(4752),a=r(504);i({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return o(a,this,s(e))}})},7015(e,t,r){"use strict";r(2862)},3848(e,t,r){"use strict";var i=r(8476),o=r(7207),s=r(4752),a=r(5809);i({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return o(a,this,s(e))}})},3888(e,t,r){"use strict";r(5941)},5760(e,t,r){"use strict";var i=r(8476),o=r(9090),s=r(8654),a=r(7791),c=r(7901),u=o([].join),l=o([].push);i({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=s(this),r=void 0===e?",":c(e),i=[];return a(t,function(e){l(i,e)}),u(i,r)}})},80(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(8654),a=r(3016),c=r(7791),u=a.Set,l=a.add;i({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new u;return c(t,function(e){l(i,r(e,e,t))}),i}})},3854(e,t,r){"use strict";var i=r(8476),o=r(3648),s=r(8654),a=r(7791),c=TypeError;i({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=s(this),r=arguments.length<2,i=r?void 0:arguments[1];if(o(e),a(t,function(o){r?(r=!1,i=o):i=e(i,o,o,t)}),r)throw new c("Reduce of empty set with no initial value");return i}})},3116(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(8654),a=r(7791);i({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0);return!0===a(t,function(e){if(r(e,e,t))return!0},!0)}})},5481(e,t,r){"use strict";var i=r(8476),o=r(7207),s=r(4752),a=r(2724);i({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return o(a,this,s(e))}})},6615(e,t,r){"use strict";r(8506)},3685(e,t,r){"use strict";var i=r(8476),o=r(7207),s=r(4752),a=r(7574);i({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return o(a,this,s(e))}})},4827(e,t,r){"use strict";r(2292)},3409(e,t,r){"use strict";var i=r(9842),o=r(9090),s=r(7901),a=r(4090),c=URLSearchParams,u=c.prototype,l=o(u.append),f=o(u.delete),p=o(u.forEach),h=o([].push),d=new c("a=1&a=2&b=3");d.delete("a",1),d.delete("b",void 0),d+""!="a=2"&&i(u,"delete",function(e){var t,r=arguments.length,i=r<2?void 0:arguments[1];if(r&&void 0===i)return f(this,e);var o=[];p(this,function(e,t){h(o,{key:t,value:e})}),a(r,1);for(var c=s(e),u=s(i),d=0,y=o.length;d{"use strict";r(9014),r(8308),r(4472),r(594),r(7924),r(6815);let e=r(8330),t=r(5335).program({name:e.name.replace(/@.+\//,""),version:e.version}).option(["-v","--version"],{action:"version"}).option(["-p","--port"],{metavar:"http[:https]",help:"specify server port"}).option(["-a","--address"],{metavar:"address",help:"specify server host"}).option(["-u","--proxy-url"],{metavar:"url",help:"request through upstream proxy"}).option(["-f","--force-host"],{metavar:"host",help:"force the netease server ip"}).option(["-o","--match-order"],{metavar:"source",nargs:"+",help:"set priority of sources"}).option(["-t","--token"],{metavar:"token",help:"set up proxy authentication"}).option(["-e","--endpoint"],{metavar:"url",help:"replace virtual endpoint with public host"}).option(["-s","--strict"],{action:"store_true",help:"enable proxy limitation"}).option(["-c","--cnrelay"],{metavar:"cnrelay",help:"Mainland China relay to get music url"}).option(["-h","--help"],{action:"help"}).parse(process.argv);if(global.address=t.address,t.port=(t.port||"8080:8081").split(":").map(e=>parseInt(e)),t.port.some(e=>isNaN(e)||e<1||e>65535)&&(console.log("Port must be a number higher than 0 and lower than 65535."),process.exit(1)),t.proxyUrl&&!/http(s?):\/\/.+:\d+/.test(t.proxyUrl)&&(console.log("Please check the proxy url."),process.exit(1)),t.endpoint?"-"===t.endpoint?t.endpoint="":/http(s?):\/\/.+/.test(t.endpoint)||(console.log("Please check the endpoint host."),process.exit(1)):t.endpoint="https://music.163.com",t.forceHost&&0===r(9278).isIP(t.forceHost)&&(console.log("Please check the server host."),process.exit(1)),t.matchOrder){let e=Object.keys(r(2413).PROVIDERS),i=t.matchOrder;i.some((e,t)=>t!=i.indexOf(e))?(console.log("Please check the duplication in match order."),process.exit(1)):i.some(t=>!e.includes(t))&&(console.log("Please check the availability of match sources."),process.exit(1)),global.source=i}t.token&&!/\S+:\S+/.test(t.token)&&(console.log("Please check the authentication token."),process.exit(1));let{logScope:i}=r(9309),o=r(7016).parse,s=r(8978),a=r(9914),{CacheStorageGroup:c}=r(755),u=i("app"),l=Array.from(s.target.host);global.port=t.port,global.proxy=t.proxyUrl?o(t.proxyUrl):null,global.hosts=l.reduce((e,r)=>Object.assign(e,{[r]:t.forceHost}),{}),a.whitelist=["://[\\w.]*music\\.126\\.net","://[\\w.]*vod\\.126\\.net","://acstatic-dun.126.net","://[\\w.]*\\.netease.com","://[\\w.]*\\.163yun.com"],global.cnrelay=t.cnrelay,t.strict&&a.blacklist.push(".*"),a.authentication=t.token||null,global.endpoint=t.endpoint,t.endpoint&&a.whitelist.push(escape(t.endpoint));let f="true"===process.env.ENABLE_HTTPDNS?[e=>r(9904)("POST","http://music.httpdns.c.163.com/d",{},e).then(e=>e.json()).then(e=>e.dns.reduce((e,t)=>e.concat(t.ips),[])),e=>r(9904)("GET","http://httpdns.n.netease.com/httpdns/v2/d?domain="+e).then(e=>e.json()).then(e=>Object.keys(e.data).map(t=>e.data[t]).reduce((e,t)=>e.concat(t.ip||[]),[]))]:[],p=c.getInstance();setInterval(()=>{p.cleanup()},9e5),Promise.all(f.map(e=>e(l.join(","))).concat(l.map(e=>new Promise((t,i)=>r(2250).lookup(e,{all:!0},(e,r)=>e?i(e):t(r.map(e=>e.address))))))).then(e=>{let{host:t}=s.target;e.forEach(e=>e.forEach(t.add,t)),a.whitelist=a.whitelist.concat(Array.from(t).map(escape));let r=e=>u.info(`${["HTTP","HTTPS"][e]} Server running @ http://${address||"0.0.0.0"}:${port[e]}`);port[0]&&a.http.listen(port[0],address).once("listening",()=>r(0)),port[1]&&a.https.listen(port[1],address).once("listening",()=>r(1)),cnrelay&&u.info(`CNRelay: ${cnrelay}`)}).catch(e=>{console.log(e),process.exit(1)})})()})(); \ No newline at end of file diff --git a/precompiled/app.js.LICENSE.txt b/precompiled/app.js.LICENSE.txt new file mode 100644 index 0000000000..21d6cb0887 --- /dev/null +++ b/precompiled/app.js.LICENSE.txt @@ -0,0 +1 @@ +/*! safe-buffer. MIT License. Feross Aboukhadijeh */ diff --git a/precompiled/bridge.js b/precompiled/bridge.js index dee7f5996f..575a28a3e8 100644 --- a/precompiled/bridge.js +++ b/precompiled/bridge.js @@ -1,8 +1,9 @@ #!/usr/bin/env node -(()=>{var e={755(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(4356),r(2460),r(3302),r(4255),r(7922),r(3248),r(7492),r(9594),r(1612),r(6414),r(9673),r(1299),r(4569),r(6636),r(9845),r(518),r(908),r(7338),r(2105),r(8202),r(6857),r(2846),r(4512),r(9822),r(2742),r(5516),r(7004),r(9817),r(3364),r(5354),r(7357),r(5949),r(4275),r(2163),r(9285),r(8957),r(4843),r(2550),r(3832);let{EventEmitter:i}=r(4434),{logScope:o}=r(9309),s=o("cache"),a={CLEANUP:"cs@cleanup"};class u extends i{id="Default Cache Storage";cacheMap=new Map;aliveDuration=18e5;constructor(e){super(),e&&(this.id=e),this.on(a.CLEANUP,async()=>this.removeExpiredCache())}get WillExpireAt(){return Date.now()+this.aliveDuration}getLoggerContext(e={}){return{...e,cacheStorageId:this.id}}removeExpiredCache(){s.debug(this.getLoggerContext(),"Cleaning up the expired caches..."),this.cacheMap.forEach((e,t)=>{e.expireAt<=Date.now()&&this.cacheMap.delete(t)})}async cache(e,t,r){if("true"===process.env.NO_CACHE)return t();this.emit(a.CLEANUP);let i=this.cacheMap.get(e),o="object"==typeof e?"Something":e,u=this.getLoggerContext({logKey:o});if(i)return s.debug(u,`${o} hit!`),i.data;s.debug(u,`${o} did not hit. Storing the execution result...`);let c=await t();return this.cacheMap.set(e,{data:c,expireAt:new Date(r||this.WillExpireAt)}),c}}class c{static instance=void 0;cacheStorages=new Set;static getInstance(){return c.instance||(c.instance=new c),c.instance}cleanup(){this.cacheStorages.forEach(e=>e.removeExpiredCache())}}let l=c.getInstance();e.exports={CacheStorage:u,CacheStorageEvents:a,CacheStorageGroup:c,getManagedCacheStorage:function(e){let t=new u(e);return l.cacheStorages.add(t),t}}},6867(e,t,r){"use strict";let i=r(4434),o="cancel";e.exports={CancelRequest:class extends i{cancelled=!1;cancel(){this.cancelled=!0,this.emit(o)}},ON_CANCEL:o}},2413(e,t,r){"use strict";e.exports={DEFAULT_SOURCE:["kugou","bodian","migu","ytdlp"],PROVIDERS:{qq:r(8469),kugou:r(434),kuwo:r(4449),bodian:r(2148),migu:r(1573),joox:r(3183),youtube:r(5918),youtubedl:r(6863),ytdlp:r(6819),bilibili:r(3371),bilivideo:r(8754),pyncmd:r(4482)}}},7312(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(6791),r(1699);let i=r(6982),o=r(7016).parse,s=r(3480).stringify,a="e82ckenh8dichen8",u="rFgB&h#%2?^eDg:Q",c=(e,t)=>{let r=i.createDecipheriv("aes-128-ecb",t,null);return Buffer.concat([r.update(e),r.final()])},l=(e,t)=>{let r=i.createCipheriv("aes-128-ecb",t,null);return Buffer.concat([r.update(e),r.final()])};e.exports={eapi:{encrypt:e=>l(e,a),decrypt:e=>c(e,a),encryptRequest:(t,r)=>{t=o(t);let a=JSON.stringify(r),u=`nobody${t.path}use${a}md5forencrypt`,c=i.createHash("md5").update(u).digest("hex"),l=`${t.path}-36cd479b6b5-${a}-36cd479b6b5-${c}`;return{url:t.href.replace(/\w*api/,"eapi"),body:s({params:e.exports.eapi.encrypt(Buffer.from(l)).toString("hex").toUpperCase()})}}},api:{encryptRequest:(e,t)=>({url:(e=o(e)).href.replace(/\w*api/,"api"),body:s(t)})},linuxapi:{encrypt:e=>l(e,u),decrypt:e=>c(e,u),encryptRequest:(t,r)=>{let i=JSON.stringify({method:"POST",url:(t=o(t)).href,params:r});return{url:t.resolve("/api/linux/forward"),body:s({eparams:e.exports.linuxapi.encrypt(Buffer.from(i)).toString("hex").toUpperCase()})}}},miguapi:{encryptBody:e=>{var t;let r,o,a=JSON.stringify(e),u=Buffer.from(i.randomBytes(32).toString("hex")),c=i.randomBytes(8),l=`-----BEGIN PUBLIC KEY----- +/*! For license information please see bridge.js.LICENSE.txt */ +(()=>{var e={755(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(7407),r(2997),r(7615),r(5720),r(7729),r(8679),r(1559),r(9109),r(1475),r(8625),r(7480),r(2296),r(158),r(6911),r(9014),r(6815),r(8521),r(4503),r(3965),r(7015),r(3888),r(6615),r(4827),r(8399),r(6373),r(6131),r(937),r(1286),r(751),r(9529),r(9610),r(169),r(3848),r(5760),r(80),r(3854),r(3116),r(5481),r(3685);let{EventEmitter:i}=r(4434),{logScope:o}=r(9309),s=o("cache"),a={CLEANUP:"cs@cleanup"};class u extends i{id="Default Cache Storage";cacheMap=new Map;aliveDuration=18e5;constructor(e){super(),e&&(this.id=e),this.on(a.CLEANUP,async()=>this.removeExpiredCache())}get WillExpireAt(){return Date.now()+this.aliveDuration}getLoggerContext(e={}){return{...e,cacheStorageId:this.id}}removeExpiredCache(){s.debug(this.getLoggerContext(),"Cleaning up the expired caches..."),this.cacheMap.forEach((e,t)=>{e.expireAt<=Date.now()&&this.cacheMap.delete(t)})}async cache(e,t,r){if("true"===process.env.NO_CACHE)return t();this.emit(a.CLEANUP);let i=this.cacheMap.get(e),o="object"==typeof e?"Something":e,u=this.getLoggerContext({logKey:o});if(i)return s.debug(u,`${o} hit!`),i.data;s.debug(u,`${o} did not hit. Storing the execution result...`);let c=await t();return this.cacheMap.set(e,{data:c,expireAt:new Date(r||this.WillExpireAt)}),c}}class c{static instance=void 0;cacheStorages=new Set;static getInstance(){return c.instance||(c.instance=new c),c.instance}cleanup(){this.cacheStorages.forEach(e=>e.removeExpiredCache())}}let l=c.getInstance();e.exports={CacheStorage:u,CacheStorageEvents:a,CacheStorageGroup:c,getManagedCacheStorage:function(e){let t=new u(e);return l.cacheStorages.add(t),t}}},6867(e,t,r){"use strict";let i=r(4434),o="cancel";e.exports={CancelRequest:class extends i{cancelled=!1;cancel(){this.cancelled=!0,this.emit(o)}},ON_CANCEL:o}},2413(e,t,r){"use strict";e.exports={DEFAULT_SOURCE:["kugou","bodian","migu","ytdlp"],PROVIDERS:{qq:r(8469),kugou:r(434),kuwo:r(4449),bodian:r(2148),migu:r(1573),joox:r(5564),youtube:r(5918),youtubedl:r(6863),ytdlp:r(6819),bilibili:r(3371),bilivideo:r(8754),pyncmd:r(4482)}}},7312(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(594),r(8308);let i=r(6982),o=r(7016).parse,s=r(3480).stringify,a="e82ckenh8dichen8",u="rFgB&h#%2?^eDg:Q",c=(e,t)=>{let r=i.createDecipheriv("aes-128-ecb",t,null);return Buffer.concat([r.update(e),r.final()])},l=(e,t)=>{let r=i.createCipheriv("aes-128-ecb",t,null);return Buffer.concat([r.update(e),r.final()])};e.exports={eapi:{encrypt:e=>l(e,a),decrypt:e=>c(e,a),encryptRequest:(t,r)=>{t=o(t);let a=JSON.stringify(r),u=`nobody${t.path}use${a}md5forencrypt`,c=i.createHash("md5").update(u).digest("hex"),l=`${t.path}-36cd479b6b5-${a}-36cd479b6b5-${c}`;return{url:t.href.replace(/\w*api/,"eapi"),body:s({params:e.exports.eapi.encrypt(Buffer.from(l)).toString("hex").toUpperCase()})}}},api:{encryptRequest:(e,t)=>({url:(e=o(e)).href.replace(/\w*api/,"api"),body:s(t)})},linuxapi:{encrypt:e=>l(e,u),decrypt:e=>c(e,u),encryptRequest:(t,r)=>{let i=JSON.stringify({method:"POST",url:(t=o(t)).href,params:r});return{url:t.resolve("/api/linux/forward"),body:s({eparams:e.exports.linuxapi.encrypt(Buffer.from(i)).toString("hex").toUpperCase()})}}},miguapi:{encryptBody:e=>{var t;let r,o,a=JSON.stringify(e),u=Buffer.from(i.randomBytes(32).toString("hex")),c=i.randomBytes(8),l=`-----BEGIN PUBLIC KEY----- MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8asrfSaoOb4je+DSmKdriQJKWVJ2oDZrs3wi5W67m3LwTB9QVR+cE3XWU21Nx+YBxS0yun8wDcjgQvYt625ZCcgin2ro/eOkNyUOTBIbuj9CvMnhUYiR61lC1f1IGbrSYYimqBVSjpifVufxtx/I3exReZosTByYp4Xwpb1+WAQIDAQAB ------END PUBLIC KEY-----`,f=(t=(t=c)||Buffer.alloc(0),r=Math.ceil(5),{key:(o=Buffer.concat(Array(r).fill(null).reduce(e=>e.concat(i.createHash("md5").update(Buffer.concat([e.slice(-1)[0],u,t])).digest()),[Buffer.alloc(0)]))).slice(0,32),iv:o.slice(32,48)}),h=i.createCipheriv("aes-256-cbc",f.key,f.iv);return s({data:Buffer.concat([Buffer.from("Salted__"),c,h.update(Buffer.from(a)),h.final()]).toString("base64"),secKey:i.publicEncrypt({key:l,padding:i.constants.RSA_PKCS1_PADDING},u).toString("base64")})}},base64:{encode:(e,t)=>Buffer.from(e,t).toString("base64").replace(/\+/g,"-").replace(/\//g,"_"),decode:(e,t)=>Buffer.from(e.replace(/-/g,"+").replace(/_/g,"/"),"base64").toString(t)},uri:{retrieve:e=>{e=e.toString().trim();let t="3go8&$8*3*3h0k(2)2",r=Array.from(Array(e.length).keys()).map(r=>String.fromCharCode(e.charCodeAt(r)^t.charCodeAt(r%t.length))).join(""),o=i.createHash("md5").update(r).digest("base64").replace(/\//g,"_").replace(/\+/g,"-");return`http://p1.music.126.net/${o}/${e}`}},md5:{digest:e=>i.createHash("md5").update(e).digest("hex"),pipe:e=>new Promise((t,r)=>{let o=i.createHash("md5").setEncoding("hex");e.pipe(o).on("error",e=>r(e)).once("finish",()=>t(o.read()))})},sha1:{digest:e=>i.createHash("sha1").update(e).digest("hex")},random:{hex:e=>i.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e),uuid:()=>i.randomUUID()}};try{e.exports.kuwoapi=r(6239)}catch(e){}},3989(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1811),e.exports=class extends Error{constructor(e,t){super(`${e} exited with ${t}, which is not zero.`),this.process=e,this.exitCode=t,this.name="ProcessExitNotSuccessfully"}}},1658(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1811),e.exports=class extends Error{constructor(e){super(`This request URL has been cancelled: ${e}`),this.name="RequestCancelled"}}},7821(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1811),e.exports=class extends Error{constructor(e){super("The response of youtube-dl is malformed."),this.name="YoutubeDlInvalidResponse",this.response=e}}},876(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1811),e.exports=class extends Error{constructor(){super('You must install "youtube-dl" before using the "youtubedl" source.'),this.name="YoutubeDlNotInstalled"}}},5(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1811),e.exports=class extends Error{constructor(e){super("The response of yt-dlp is malformed."),this.name="YtDlpInvalidResponse",this.response=e}}},1578(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1811),e.exports=class extends Error{constructor(){super('You must install "yt-dlp" before using the "ytdlp" source.'),this.name="YtDlpNotInstalled"}}},6239(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(6791),r(1699),r(518);let i=e=>{let t=BigInt(e);return{low:Number(t),valueOf:()=>t.valueOf(),toString:()=>t.toString(),not:()=>i(~t),isNegative:()=>t<0,or:e=>i(t|BigInt(e)),and:e=>i(t&BigInt(e)),xor:e=>i(t^BigInt(e)),equals:e=>t===BigInt(e),multiply:e=>i(t*BigInt(e)),shiftLeft:e=>i(t<i(t>>BigInt(e))}},o=e=>Array.from(Array(e).keys()),s=(...e)=>e.map(e=>-1===e?i(-1,-1):i(e)),a=s(31,0,1,2,3,4,-1,-1,3,4,5,6,7,8,-1,-1,7,8,9,10,11,12,-1,-1,11,12,13,14,15,16,-1,-1,15,16,17,18,19,20,-1,-1,19,20,21,22,23,24,-1,-1,23,24,25,26,27,28,-1,-1,27,28,29,30,31,30,-1,-1),u=s(57,49,41,33,25,17,9,1,59,51,43,35,27,19,11,3,61,53,45,37,29,21,13,5,63,55,47,39,31,23,15,7,56,48,40,32,24,16,8,0,58,50,42,34,26,18,10,2,60,52,44,36,28,20,12,4,62,54,46,38,30,22,14,6),c=s(39,7,47,15,55,23,63,31,38,6,46,14,54,22,62,30,37,5,45,13,53,21,61,29,36,4,44,12,52,20,60,28,35,3,43,11,51,19,59,27,34,2,42,10,50,18,58,26,33,1,41,9,49,17,57,25,32,0,40,8,48,16,56,24),l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1],f=s(0,1048577,3145731),h=o(64).map(e=>Array(e).fill(null).reduce(e=>e.multiply(2),i(1)));h[h.length-1]=h[h.length-1].multiply(-1);let d=s(15,6,19,20,28,11,27,16,0,14,22,25,4,17,30,9,1,7,23,13,31,26,2,8,18,12,29,5,21,10,3,24),p=s(56,48,40,32,24,16,8,0,57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,60,52,44,36,28,20,12,4,27,19,11,3),y=s(13,16,10,23,0,4,-1,-1,2,27,14,5,20,9,-1,-1,22,18,11,3,25,7,-1,-1,15,6,26,19,12,1,-1,-1,40,51,30,36,46,54,-1,-1,29,39,50,44,32,47,-1,-1,43,48,38,55,33,52,-1,-1,45,41,49,35,28,31,-1,-1),g=[[14,4,3,15,2,13,5,3,13,14,6,9,11,2,0,5,4,1,10,12,15,6,9,10,1,8,12,7,8,11,7,0,0,15,10,5,14,4,9,10,7,8,12,3,13,1,3,6,15,12,6,11,2,9,5,0,4,2,11,14,1,7,8,13],[15,0,9,5,6,10,12,9,8,7,2,12,3,13,5,2,1,14,7,8,11,4,0,3,14,11,13,6,4,1,10,15,3,13,12,11,15,3,6,0,4,10,1,7,8,4,11,14,13,8,0,6,2,15,9,5,7,1,10,12,14,2,5,9],[10,13,1,11,6,8,11,5,9,4,12,2,15,3,2,14,0,6,13,1,3,15,4,10,14,9,7,12,5,0,8,7,13,1,2,4,3,6,12,11,0,13,5,14,6,8,15,2,7,10,8,15,4,9,11,5,9,0,14,3,10,7,1,12],[7,10,1,15,0,12,11,5,14,9,8,3,9,7,4,8,13,6,2,1,6,11,12,2,3,0,5,14,10,13,15,4,13,3,4,9,6,10,1,12,11,0,2,5,0,13,14,2,8,15,7,4,15,1,10,7,5,6,12,11,3,8,9,14],[2,4,8,15,7,10,13,6,4,1,3,12,11,7,14,0,12,2,5,9,10,13,0,3,1,11,15,5,6,8,9,14,14,11,5,6,4,1,3,10,2,12,15,0,13,2,8,5,11,8,0,15,7,14,9,4,12,7,10,9,1,13,6,3],[12,9,0,7,9,2,14,1,10,15,3,4,6,12,5,11,1,14,13,0,2,8,7,13,15,5,4,10,8,3,11,6,10,4,6,11,7,9,0,6,4,2,13,1,9,15,3,8,15,3,1,14,12,5,11,0,2,12,14,7,5,10,8,13],[4,1,3,10,15,12,5,0,2,11,9,6,8,7,6,9,11,4,12,15,0,3,10,5,14,13,7,8,13,14,1,2,13,6,14,9,4,1,2,14,11,13,5,0,1,10,8,3,0,11,3,5,9,4,15,2,7,8,12,15,10,7,6,12],[13,7,10,0,6,9,5,15,8,4,3,10,11,14,12,5,2,11,9,6,15,12,0,3,4,1,14,13,1,2,7,8,1,2,12,15,10,4,0,3,13,14,6,9,7,8,9,6,15,1,5,12,3,10,14,5,8,7,11,0,4,13,2,11]],m=(e,t,r)=>{let s=i(0);return o(t).forEach(t=>{e[t].isNegative()||r.and(h[e[t].low]).equals(0)||(s=s.or(h[t]))}),s},b=(e,t)=>{let r=o(8).map(()=>i(0)),s=[i(0),i(0)],l=i(0),f=i(0),h=m(u,64,t);return s[0]=h.and(0xffffffff),s[1]=h.and(-0x100000000).shiftRight(32),o(16).forEach(t=>{let u=i(0);f=(f=m(a,64,f=i(s[1]))).xor(e[t]),o(8).forEach(e=>{r[e]=f.shiftRight(8*e).and(255)}),o(8).reverse().forEach(e=>{u=u.shiftLeft(4).or(g[e][r[e]])}),f=m(d,32,u),l=i(s[0]),s[0]=i(s[1]),s[1]=l.xor(f)}),s.reverse(),h=m(c,64,h=s[1].shiftLeft(32).and(-0x100000000).or(s[0].and(0xffffffff)))},v=(e,t,r)=>{let s,a=i(0);o(8).forEach(e=>{a=i(t[e]).shiftLeft(8*e).or(a)});let u=Math.floor(e.length/8),c=o(16).map(()=>i(0));s=m(p,56,a),o(16).forEach(e=>{s=s.and(f[l[e]]).shiftLeft(28-l[e]).or(s.and(f[l[e]].not()).shiftRight(l[e])),c[e]=m(y,64,s)}),1===r&&o(8).forEach(e=>{[c[e],c[15-e]]=[c[15-e],c[e]]});let h=o(u).map(()=>i(0));o(u).forEach(t=>{o(8).forEach(r=>{h[t]=i(e[r+8*t]).shiftLeft(8*r).or(h[t])})});let d=o(Math.floor((1+8*(u+1))/8)).map(()=>i(0));o(u).forEach(e=>{d[e]=b(c,h[e])});let g=e.slice(8*u),v=i(0);o(e.length%8).forEach(e=>{v=i(g[e]).shiftLeft(8*e).or(v)}),(g.length||0===r)&&(d[u]=b(c,v));let w=o(8*d.length).map(()=>0),_=0;return d.forEach(e=>{o(8).forEach(t=>{w[_]=e.shiftRight(8*t).and(255).low,_+=1})}),Buffer.from(w)},w=Buffer.from("ylzsxkwm"),_=e=>v(e,w,0);e.exports={encrypt:_,decrypt:e=>v(e,w,1),encryptQuery:e=>_(Buffer.from(e)).toString("base64")}},9309(e,t,r){"use strict";var i;let o=r(2306),s=process.env.LOG_FILE,a=process.stdout.isTTY,u=o({level:null!=(i=process.env.LOG_LEVEL)?i:"info",prettyPrint:"true"!==process.env.JSON_LOG&&{colorize:a,messageFormat:a?"\x1b[1m\x1b[32m({scope})\x1b[0m\x1b[36m {msg}":"({scope}) {msg}",ignore:"time,pid,hostname,scope",errorProps:"*"}},s&&o.destination(s));e.exports={logger:u,logScope:function(e){return u.child({scope:e})}}},3371(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699);let{cacheStorage:i,CacheStorageGroup:o,getManagedCacheStorage:s}=r(755),a=r(4473),u=r(9147),c=r(9904),l=e=>({id:e.id,name:e.title,artists:{id:e.mid,name:e.author}}),f=e=>c("GET","https://www.bilibili.com/audio/music-service-c/web/url?rivilege=2&quality=2&sid="+e).then(e=>e.json()).then(e=>0===e.code?e.data.cdns[0].replace("https","http"):Promise.reject()).catch(()=>a().bilibili.track(e)),h=s("provider/bilibili");e.exports={check:e=>h.cache(e,()=>c("GET",`https://api.bilibili.com/audio/music-service-c/s?search_type=music&page=1&pagesize=30&keyword=${encodeURIComponent(e.keyword)}`).then(e=>e.json()).then(t=>{let r=u(t.data.result.map(l),e);return r?r.id:Promise.reject()})).then(f),track:f}},8754(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699);let{cacheStorage:i,CacheStorageGroup:o,getManagedCacheStorage:s}=r(755),a=r(4473),u=r(9147),c=r(9904),l=r(7312),{logScope:f}=r(9309);f("provider/bilivideo");let h=s("provider/bilivideo"),d=[46,47,18,2,53,8,23,32,15,50,10,31,58,3,45,35,27,43,5,49,33,9,42,19,29,28,14,39,12,38,41,13,37,48,7,16,24,55,40,61,26,17,0,1,60,51,30,4,22,25,54,21,56,59,6,63,57,62,11,36,20,34,44,52];async function p(){let e=await c("GET","https://api.bilibili.com/x/web-interface/nav",{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3",Referer:"https://www.bilibili.com/"}),{data:{wbi_img:{img_url:t,sub_url:r}}}=await e.json();return{img_key:t.slice(t.lastIndexOf("/")+1,t.lastIndexOf(".")),sub_key:r.slice(r.lastIndexOf("/")+1,r.lastIndexOf("."))}}let y=async e=>{let t,r,i,o,s,a,{img_key:u,sub_key:c}=await h.cache("wbikey",async()=>await p());return t=u+c,r=d.map(e=>t[e]).join("").slice(0,32),i=Math.round(Date.now()/1e3),o=/[!'()*]/g,Object.assign(e,{wts:i}),s=Object.keys(e).sort().map(t=>{let r=e[t].toString().replace(o,"");return`${encodeURIComponent(t)}=${encodeURIComponent(r)}`}).join("&"),a=l.md5.digest(s+r),s+"&w_rid="+a},g=e=>({id:e.bvid,name:e.title,artists:{id:e.typeid,name:e.typename}}),m=async()=>h.cache("bilicookie",()=>c("GET","https://www.bilibili.com").then(e=>e.headers["set-cookie"].map(e=>e.split(";")[0]).join("; "))),b=e=>y({bvid:e}).then(t=>c("GET","https://api.bilibili.com/x/web-interface/wbi/view?"+t).then(e=>e.json()).then(t=>0===t.code?y({bvid:e,cid:t.data.cid,fnval:16,platform:"pc"}).then(t=>c("GET","https://api.bilibili.com/x/player/wbi/playurl?"+t).then(e=>e.json()).then(e=>0!==e.code?Promise.reject():null!=e.data.dash.audio?e.data.dash.audio[0].base_url:Promise.reject()).catch(()=>a().bilibili.track(e))):Promise.reject()).catch(()=>a().bilibili.track(e)));e.exports={check:e=>h.cache(e,()=>m().then(t=>y({search_type:"video",keyword:e.keyword}).then(r=>c("GET","https://api.bilibili.com/x/web-interface/wbi/search/type?"+r,{cookie:t,referer:"https://search.bilibili.com"}).then(e=>e.json()).then(t=>{let r=u(t.data.result.map(g),e);return r?r.id:Promise.reject()})))).then(b),track:b}},2148(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699),r(9444),r(3435),r(9313);let i=r(4473),o=r(9147),s=r(7312),a=r(9904),{getManagedCacheStorage:u}=r(755),{logScope:c}=r(9309),l=c("provider/bodian"),f=(Math.floor(Math.random()*(1e11+1))+0).toString(),h=e=>({id:e.MUSICRID.split("_").pop(),name:e.SONGNAME,duration:1e3*e.DURATION,album:{id:e.ALBUMID,name:e.ALBUM},artists:e.ARTIST.split("&").map((t,r)=>({id:r?null:e.ARTISTID,name:t}))}),d=e=>{var t;let r,u,c,h,d,p={"user-agent":"Dart/2.19 (dart:io)",plat:"ar",channel:"aliopen",devid:f,ver:"3.9.0",host:"bd-api.kuwo.cn","X-Forwarded-For":"1.0.1.114"},y=`http://bd-api.kuwo.cn/api/play/music/v2/audioUrl?&br=${o.ENABLE_FLAC?"2000kflac":"320kmp3"}&musicId=${e}`;return r=new URL(t=y),u=Date.now(),c=(t+=`×tamp=${u}`).substring(t.indexOf("?")+1).replace(/[^a-zA-Z0-9]/g,"").split("").sort(),h=`kuwotest${c.join("")}${r.pathname}`,d=s.md5.digest(h),y=`${t}&sign=${d}`,a("POST","http://bd-api.kuwo.cn/api/service/advert/watch?uid=-1&token=×tamp=1724306124436&sign=15a676d66285117ad714e8c8371691da",{"user-agent":"Dart/2.19 (dart:io)",plat:"ar",channel:"aliopen",devid:f,ver:"3.9.0",host:"bd-api.kuwo.cn",qimei36:"1e9970cbcdc20a031dee9f37100017e1840e","content-type":"application/json; charset=utf-8"},JSON.stringify({type:5,subType:5,musicId:0,adToken:""})).then(e=>e.body()).then(e=>l.debug(`bodian ad free response: ${e}`)).then(()=>a("GET",y,p).then(e=>e.json()).then(e=>e&&200===e.code&&"object"==typeof e.data&&e.data.audioUrl||Promise.reject()).catch(()=>i().bodian.track(e)))},p=u("provider/bodian");e.exports={check:e=>p.cache(e,()=>a("GET","http://search.kuwo.cn/r.s?&correct=1&vipver=1&stype=comprehensive&encoding=utf8&rformat=json&mobi=1&show_copyright_off=1&searchapi=6&all="+encodeURIComponent(e.keyword.replace(" - "," "))).then(e=>e.json()).then(t=>{if(!t||t.content.length<2||!t.content[1].musicpage||t.content[1].musicpage.abslist.length<1)return Promise.reject();let r=o(t.content[1].musicpage.abslist.map(h),e);return r?r.id:Promise.reject()})).then(d),track:d}},4473(e,t,r){"use strict";let i=r(9904);e.exports=()=>{let t=global.cnrelay,r=new Proxy(()=>{},{get:(e,t)=>(e.route=(e.route||[]).concat(t),r),apply:(r,o,s)=>{if(e.exports.disable||!t)return Promise.reject();let a=r.route.join("/"),u="object"==typeof s[0]?JSON.stringify(s[0]):s[0];return i("GET",`${t}/${a}?${encodeURIComponent(u)}`).then(e=>e.body())}});return r}},3183(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699),r(4370);let i=r(4473),o=r(9147),s=r(7312),a=r(9904),{getManagedCacheStorage:u}=r(755),c={origin:"http://www.joox.com",referer:"http://www.joox.com",cookie:process.env.JOOX_COOKIE||null},l=e=>{let{decode:t}=s.base64;return{id:e.songid,name:t(e.info1||""),duration:1e3*e.playtime,album:{id:e.albummid,name:t(e.info3||"")},artists:e.singer_list.map(({id:e,name:r})=>({id:e,name:t(r||"")}))}},f=e=>a("GET","http://api.joox.com/web-fcgi-bin/web_get_songinfo?songid="+e+"&country=hk&lang=zh_cn&from_type=-1&channel_id=-1&_="+new Date().getTime(),c).then(e=>e.jsonp()).then(e=>{let t=(e.r320Url||e.r192Url||e.mp3Url||e.m4aUrl).replace(/M\d00([\w]+).mp3/,"M800$1.mp3");return t||Promise.reject()}).catch(()=>i().joox.track(e)),h=u("provider/joox");e.exports={check:e=>h.cache(e,()=>a("GET","http://api-jooxtt.sanook.com/web-fcgi-bin/web_search?country=hk&lang=zh_TW&search_input="+encodeURIComponent(/[\u0800-\u4e00]/.test(e.name)?e.name:e.keyword)+"&sin=0&ein=30",c).then(e=>e.body()).then(t=>{let r=o(JSON.parse(t.replace(/'/g,'"')).itemlist.map(l),e);return r?r.id:Promise.reject()})).then(f),track:f}},434(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699),r(6142);let i=r(4473),o=r(9147),s=r(7312),a=r(9904),{getManagedCacheStorage:u}=r(755),c=e=>({id:e.hash,id_hq:e["320hash"],id_sq:e.sqhash,name:e.songname,duration:1e3*e.duration,album:{id:e.album_id,name:e.album_name}}),l=e=>a("GET","http://mobilecdn.kugou.com/api/v3/search/song?keyword="+encodeURIComponent(e.keyword)+"&page=1&pagesize=10").then(e=>e.json()).then(t=>o(t.data.info.map(c),e)||Promise.reject()).catch(()=>i().kugou.search(e)),f=e=>Promise.all(["sqhash","hqhash","hash"].slice(+!o.ENABLE_FLAC).map(t=>{let r;return(r=()=>{switch(t){case"hash":return e.id;case"hqhash":return e.id_hq;case"sqhash":return e.id_sq}return""},a("GET","http://trackercdn.kugou.com/i/v2/?key="+s.md5.digest(`${r()}kgcloudv2`)+"&hash="+r()+"&appid=1005&pid=2&cmd=25&behavior=play&album_id="+e.album.id).then(e=>e.json()).then(e=>e.url[0]||Promise.reject())).catch(()=>null)})).then(e=>e.find(e=>e)||Promise.reject()).catch(()=>i().kugou.track(e)),h=u("provider/kugou");e.exports={check:e=>h.cache(e,()=>l(e)).then(f),search:l}},4449(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699);let i=r(4473),o=r(9147),s=r(7312),a=r(9904),{getManagedCacheStorage:u}=r(755),c=e=>({id:e.MUSICRID.split("_").pop(),name:e.SONGNAME,duration:1e3*e.DURATION,album:{id:e.ALBUMID,name:e.ALBUM},artists:e.ARTIST.split("&").map((t,r)=>({id:r?null:e.ARTISTID,name:t}))}),l=e=>a("GET",s.kuwoapi?"http://mobi.kuwo.cn/mobi.s?f=kuwo&q="+s.kuwoapi.encryptQuery("user=0&corp=kuwo&source=kwplayer_ar_5.1.0.0_B_jiakong_vh.apk&p2p=1&type=convert_url2&sig=0&format="+["flac","mp3"].slice(+!o.ENABLE_FLAC).join("|")+"&rid="+e):"http://antiserver.kuwo.cn/anti.s?type=convert_url&format=mp3&response=url&rid=MUSIC_"+e,{"user-agent":"okhttp/3.10.0"}).then(e=>e.body()).then(e=>(e.match(/http[^\s$"]+/)||[])[0]||Promise.reject()).catch(()=>i().kuwo.track(e)),f=u("provider/kuwo");e.exports={check:e=>f.cache(e,()=>a("GET","http://search.kuwo.cn/r.s?&correct=1&vipver=1&stype=comprehensive&encoding=utf8&rformat=json&mobi=1&show_copyright_off=1&searchapi=6&all="+encodeURIComponent(e.keyword.replace(" - "," "))).then(e=>e.json()).then(t=>{if(!t||t.content.length<2||!t.content[1].musicpage||t.content[1].musicpage.abslist.length<1)return Promise.reject();let r=o(t.content[1].musicpage.abslist.map(c),e);return r?r.id:Promise.reject()})).then(l),track:l}},1573(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699),r(6142);let i=r(4473),o=r(9147),s=r(9904),{getManagedCacheStorage:a}=r(755),u={origin:"http://music.migu.cn/",referer:"http://m.music.migu.cn/v3/",aversionid:process.env.MIGU_COOKIE||null,channel:"0146921"},c=e=>{let t=e.singerId.split(/\s*,\s*/),r=e.singerName.split(/\s*,\s*/);return{id:e.id,name:e.title,album:{id:e.albumId,name:e.albumName},artists:t.map((e,t)=>({id:e,name:r[t]}))}},l=e=>Promise.all(["ZQ24","SQ","HQ","PQ"].slice(2*!o.ENABLE_FLAC).map(t=>{let r;return s("GET",r="https://app.c.nf.migu.cn/MIGUM2.0/strategy/listen-url/v2.4?netType=01&resourceType=2&songId="+e.toString()+"&toneFlag="+t,u).then(e=>e.json()).then(e=>{let{audioFormatType:i}=e.data;return i!==t?Promise.reject():r?e.data.url:Promise.reject()}).catch(()=>null)})).then(e=>e.find(e=>e)||Promise.reject()).catch(()=>i().migu.track(e)),f=a("provider/migu");e.exports={check:e=>f.cache(e,()=>s("GET","https://m.music.migu.cn/migu/remoting/scr_search_tag?keyword="+encodeURIComponent(e.keyword)+"&type=2&rows=20&pgc=1",u).then(e=>e.json()).then(t=>{let r=o(((t||{}).musics||[]).map(c),e);return r?r.id:Promise.reject()})).then(l),track:l}},4482(e,t,r){"use strict";let i=r(9147),o=r(9904),{getManagedCacheStorage:s}=r(755),a=s("provider/pyncmd");e.exports={check:e=>a.cache(e,()=>o("GET","https://music-api.gdstudio.xyz/api.php?types=url&source=netease&id="+e.id+"&br="+["999","320"].slice(+!i.ENABLE_FLAC,i.ENABLE_FLAC?1:2)).then(e=>e.json()).then(e=>e&&"object"==typeof e&&!1 in e?Promise.reject():e.br>0?e.url:Promise.reject()))}},8469(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(1699),r(6142);let i=r(4473),o=r(9147),s=r(9904),{getManagedCacheStorage:a}=r(755),u=process.env.NEW_QQ_COOKIE||process.env.QQ_COOKIE,c={origin:"http://y.qq.com/",referer:"http://y.qq.com/",cookie:u||null},l=e=>({id:{song:e.mid,file:e.mid},name:e.name,duration:1e3*e.interval,album:{id:e.album.mid,name:e.album.name},artists:e.singer.map(({mid:e,name:t})=>({id:e,name:t}))}),f=e=>(e.key=e.file,Promise.all([["F000",".flac"],["M800",".mp3"],["M500",".mp3"],[null,null]].slice(c.cookie||"u">typeof window?+!o.ENABLE_FLAC:2).map(t=>{let r;return(r=((c.cookie||"").match(/uin=(\d+)/)||[])[1]||"0",s("GET","https://u.y.qq.com/cgi-bin/musicu.fcg?data="+encodeURIComponent(JSON.stringify({req_0:{module:"vkey.GetVkeyServer",method:"CgiGetVkey",param:{guid:(1e7*Math.random()).toFixed(0),loginflag:1,filename:t[0]?[t.join(e.file)]:null,songmid:[e.song],songtype:[0],uin:r,platform:"20"}}})),c).then(e=>e.json()).then(e=>{let{sip:t,midurlinfo:r}=e.req_0.data;if(!r[0].purl)return Promise.reject();let i=t[0]+r[0].purl;return s("GET",i,{range:"bytes=0-8191","accept-encoding":"identity"}).then(e=>e.statusCode<200||e.statusCode>299?Promise.reject():i)})).catch(()=>null)})).then(e=>e.find(e=>e)||Promise.reject()).catch(()=>i().qq.track(e))),h=a("provider/qq");e.exports={check:e=>{let t,r,i,a=Math.floor(Date.now()/1e3),d=((u||"").match(/musickey_createtime=(\d+)/)||[])[1]||"",p=parseInt(d,10)+259200;return d&&p-a<600&&(t=(u.match(/qqrefresh_token=([^;]*)/)||[])[1]||"",r=(u.match(/qqmusic_key=([^;]*)/)||[])[1]||"",i=parseInt((u.match(/uin=(\d+)/)||[])[1]||0,10),s("POST","https://u.y.qq.com/cgi-bin/musicu.fcg",{Cookie:u,"Content-Type":"application/json"},JSON.stringify({req:{module:"music.login.LoginServer",method:"Login",param:{refresh_token:t,musickey:r,musicid:i}}})).then(e=>e.json()).then(e=>{var t;let r=(null==(t=e.req)?void 0:t.data)||{},i=r.musickey,o=r.musickeyCreateTime;if(!i||!o)return;let s=u;s=s.replace(/(qqmusic_key=)[^;]*/,`$1${i}`).replace(/(qm_keyst=)[^;]*/,`$1${i}`).replace(/(psrf_musickey_createtime=)[^;]*/,`$1${o}`),process.env.NEW_QQ_COOKIE=s,c.cookie=s,u=s})),h.cache(e,()=>s("GET","https://u.y.qq.com/cgi-bin/musicu.fcg?data="+encodeURIComponent(JSON.stringify({search:{method:"DoSearchForQQMusicDesktop",module:"music.search.SearchCgiService",param:{num_per_page:5,page_num:1,query:e.keyword,search_type:0}}})),c).then(e=>e.json()).then(t=>{let r=o(t.search.data.body.song.list.map(l),e);return r?r.id:Promise.reject()})).then(f)},track:f}},9147(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(6142),e.exports=(e,t)=>{let{duration:r}=t,i=e.slice(0,5).find(e=>e.duration&&5e3>Math.abs(e.duration-r));return i||e[0]},e.exports.ENABLE_FLAC="true"===(process.env.ENABLE_FLAC||"").toLowerCase()},6863(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(4370);let{getManagedCacheStorage:i}=r(755),{logScope:o}=r(9309),s=r(7821),a=r(876),{spawnStdout:u}=r(6630),c=o("provider/youtube-dl");async function l(e){try{let{stdout:t}=await u("youtube-dl",e),r=JSON.parse(t.toString());if("object"==typeof r&&"string"==typeof r.id&&"string"==typeof r.url)return r;throw new s(r)}catch(e){if(e&&"ENOENT"===e.code)throw new a;throw e}}let f=async e=>{let t,{url:r}=await l((t=e.keyword,["-f","140","--dump-json",`ytsearch1:${t}`]));return r},h=i("youtube-dl");e.exports={check:e=>h.cache(e,()=>f(e)).catch(e=>{throw e&&c.error(e),e})}},5918(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(6791),r(1699),r(4370),r(6142);let i=r(9904),{getManagedCacheStorage:o}=r(755),s=o("provider/youtube"),a,u=process.env.YOUTUBE_KEY||null,c=e=>i("GET",`https://www.youtube.com/watch?v=${e}`,{},null,a).then(e=>e.body()).then(e=>JSON.parse(e.match(/ytInitialPlayerResponse\s*=\s*{[^]+};\s*var\s*meta/)[0].replace(/;var meta/,"").replace(/ytInitialPlayerResponse = /,"")).streamingData).then(e=>{let t=e.formats.concat(e.adaptiveFormats).find(e=>140===e.itag),r=(t.signatureCipher||"").split("&").reduce((e,t)=>{let r=t.split("=").map(decodeURIComponent);return Object.assign({},e,{[r[0]]:r[1]})},{});return t.url||(r.sp.includes("sig")?s.cache("YOUTUBE_SIGNATURE",()=>((e="-tKVN2mAKRI")=>i("GET",`https://www.youtube.com/watch?v=${e}`,{},null,a).then(e=>e.body()).then(e=>{let t=/"WEB_PLAYER_CONTEXT_CONFIG_ID_KEVLAR_VERTICAL_LANDING_PAGE_PROMO":{[^}]+}/.exec(e)[0];return i("GET","https://youtube.com"+(t=JSON.parse(`{${t}}}`).WEB_PLAYER_CONTEXT_CONFIG_ID_KEVLAR_VERTICAL_LANDING_PAGE_PROMO).jsUrl,{},null,a).then(e=>e.body())}).then(e=>{let[,t,r]=/function\((\w+)\)\s*{([^}]+split\(""\)[^}]+join\(""\))};/.exec(e),i=/;(.+?)\..+?\(/.exec(r)[1];return Function([t],RegExp(`var ${i}={[\\s\\S]+?};`).exec(e)[0]+` -`+r)}))(),Date.now()+864e5).then(e=>r.url+"&sig="+e(r.s)):r.url)});e.exports={check:e=>s.cache(e,()=>u?i("GET",`https://www.googleapis.com/youtube/v3/search?part=snippet&q=${encodeURIComponent(e.keyword)}&type=video&key=${u}`,{accept:"application/json"},null,a).then(e=>e.json()).then(e=>{let t=e.items[0];return t?t.id.videoId:Promise.reject()}):i("GET",`https://www.youtube.com/results?search_query=${encodeURIComponent(e.keyword)}`,{},null,a).then(e=>e.body()).then(e=>{let t=JSON.parse(e.match(/ytInitialData\s*=\s*([^;]+);/)[1]).contents.twoColumnSearchResultsRenderer.primaryContents.sectionListRenderer.contents[0].itemSectionRenderer.contents[1];return t?t.videoRenderer.videoId:Promise.reject()})).then(c),track:c}},6819(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(4370);let{getManagedCacheStorage:i}=r(755),{logScope:o}=r(9309),{spawnStdout:s}=r(6630),a=r(5),u=r(1578),c=o("provider/yt-dlp");async function l(e){try{let{stdout:t}=await s("yt-dlp",e),r=JSON.parse(t.toString());if("object"==typeof r&&"string"==typeof r.id&&"string"==typeof r.url)return r;throw new a(r)}catch(e){if(e&&"ENOENT"===e.code)throw new u;throw e}}let f=async e=>{let t,{url:r}=await l((t=e.keyword,["-f","140","--dump-json",`ytsearch1:${t}`]));return r},h=i("yt-dlp");e.exports={check:e=>h.cache(e,()=>f(e)).catch(e=>{throw e&&c.error(e),e})}},9904(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9845),r(6791),r(8831),r(4370);let i=r(3106),o=r(8611),s=r(5692),a=r(6867),u=r(1658),{logScope:c}=r(9309),l=r(7016).parse,f=r(7016).format,h=c("request"),d=e=>(global.hosts||{})[e]||e,p=(e,t)=>("https:"===((void 0===t?global.proxy:t)||e).protocol?s:o).request,y=(e,t,r,i)=>{r=r||{},i=void 0===i?global.proxy:i,"content-length"in r&&delete r["content-length"];let o={};return o._headers=r,i&&"https:"===t.protocol?(o.method="CONNECT",o.headers=Object.keys(r).reduce((e,t)=>Object.assign(e,["host","user-agent"].includes(t)&&{[t]:r[t]}),{})):(o.method=e,o.headers=r),i?(o.hostname=d(i.hostname),o.port=i.port||("https:"===i.protocol?443:80),o.path="https:"===t.protocol?d(t.hostname)+":"+(t.port||443):"http://"+d(t.hostname)+t.path):(o.hostname=d(t.hostname),o.port=t.port||("https:"===t.protocol?443:80),o.path=t.path),o},g=(e,t,r,i,o,c)=>{let d=l(t),w=r||{},_=y(e,d,{host:d.hostname,accept:"application/json, text/plain, */*","accept-encoding":"gzip, deflate","accept-language":"zh-CN,zh;q=0.9","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36",...w},o);return new Promise((r,l)=>{var y;h.debug(`Start requesting ${t}`);let g=p(d,o)(_),m=function(){g.destroy(new u(f(d)))};null==c||c.on(a,m),null!=(y=null==c?void 0:c.cancelled)&&y&&m(),g.setTimeout(1e4,()=>{h.warn({url:f(d)},"The request timed out, or the requester didn't handle the response."),m()}).on("response",e=>r(e)).on("connect",(t,o)=>{h.debug("received CONNECT, continuing with https.request()..."),s.request({method:e,path:d.path,headers:_._headers,socket:o,agent:!1}).on("response",e=>r(e)).on("error",e=>l(e)).end(i)}).on("error",e=>l(e)).end("CONNECT"===_.method.toUpperCase()?void 0:i)}).then(t=>{var r;if(null!=(r=null==c?void 0:c.cancelled)&&r)return Promise.reject(new u(f(d)));if([201,301,302,303,307,308].includes(t.statusCode)){let r=d.resolve(t.headers.location||d.href);return h.debug(`Redirect to ${r}`),delete w.host,g(e,r,w,i,o)}return Object.assign(t,{url:d,body:e=>m(t,e),json:()=>b(t),jsonp:()=>v(t)})})},m=(e,t)=>new Promise((t,r)=>{let i=[];e.on("data",e=>i.push(e)).on("end",()=>t(Buffer.concat(i))).on("error",e=>r(e))}).then(r=>{if(r.length)switch(e.headers["content-encoding"]){case"deflate":case"gzip":r=i.unzipSync(r);break;case"br":r=i.brotliDecompressSync(r)}return t?r:r.toString()}),b=e=>m(e,!1).then(e=>JSON.parse(e)),v=e=>m(e,!1).then(e=>JSON.parse(e.slice(e.indexOf("(")+1,-1)));g.read=m,g.create=p,g.translate=d,g.configure=y,e.exports=g},6630(e,t,r){"use strict";let i=r(5317),{logScope:o}=r(9309),s=r(3989),a=o("spawn");e.exports={spawnStdout:async function(e,t=[]){return new Promise((r,o)=>{let u=0,c=0,l=Buffer.alloc(5e6),f=Buffer.alloc(5e6),h=i.spawn(e,t);h.on("spawn",()=>{a.info(`running ${e} ${t.join(" ")}`)}),h.on("error",e=>o(e)),h.on("close",t=>{0!==t?o(new s(e,t)):(a.debug(`process ${e} exited successfully`),r({stdout:l.slice(0,u),stderr:f.slice(0,c)}))}),h.stdout.on("data",e=>{u+=e.copy(l,u)}),h.stderr.on("data",t=>{a.warn(`[${e}][stderr] ${t}`),c+=t.copy(f,c)})})}}},7048(e){"use strict";if("u">typeof SharedArrayBuffer&&"u">typeof Atomics){let t=new Int32Array(new SharedArrayBuffer(4));e.exports=function(e){if(!1==(e>0&&e<1/0)){if("number"!=typeof e&&"bigint"!=typeof e)throw TypeError("sleep: ms must be a number");throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity")}Atomics.wait(t,0,0,Number(e))}}else e.exports=function(e){if(!1==(e>0&&e<1/0)){if("number"!=typeof e&&"bigint"!=typeof e)throw TypeError("sleep: ms must be a number");throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity")}let t=Date.now()+Number(e);for(;t>Date.now(););}},5402(e,t,r){"use strict";var i;function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(s){var a,u,c,l=arguments,f=(a=/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,c=/[^-+\dA-Z]/g,function(e,t,r,i){if(1!==l.length||"string"!==g(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||0===e?e:new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var o=(t=String(f.masks[t]||t||f.masks.default)).slice(0,4);("UTC:"===o||"GMT:"===o)&&(t=t.slice(4),r=!0,"GMT:"===o&&(i=!0));var s=function(){return r?"getUTC":"get"},m=function(){return e[s()+"Date"]()},b=function(){return e[s()+"Day"]()},v=function(){return e[s()+"Month"]()},w=function(){return e[s()+"FullYear"]()},_=function(){return e[s()+"Hours"]()},S=function(){return e[s()+"Minutes"]()},x=function(){return e[s()+"Seconds"]()},E=function(){return e[s()+"Milliseconds"]()},O=function(){return r?0:e.getTimezoneOffset()},j=function(){return p(e)},k={d:function(){return m()},dd:function(){return h(m())},ddd:function(){return f.i18n.dayNames[b()]},DDD:function(){return d({y:w(),m:v(),d:m(),_:s(),dayName:f.i18n.dayNames[b()],short:!0})},dddd:function(){return f.i18n.dayNames[b()+7]},DDDD:function(){return d({y:w(),m:v(),d:m(),_:s(),dayName:f.i18n.dayNames[b()+7]})},m:function(){return v()+1},mm:function(){return h(v()+1)},mmm:function(){return f.i18n.monthNames[v()]},mmmm:function(){return f.i18n.monthNames[v()+12]},yy:function(){return String(w()).slice(2)},yyyy:function(){return h(w(),4)},h:function(){return _()%12||12},hh:function(){return h(_()%12||12)},H:function(){return _()},HH:function(){return h(_())},M:function(){return S()},MM:function(){return h(S())},s:function(){return x()},ss:function(){return h(x())},l:function(){return h(E(),3)},L:function(){return h(Math.floor(E()/10))},t:function(){return 12>_()?f.i18n.timeNames[0]:f.i18n.timeNames[1]},tt:function(){return 12>_()?f.i18n.timeNames[2]:f.i18n.timeNames[3]},T:function(){return 12>_()?f.i18n.timeNames[4]:f.i18n.timeNames[5]},TT:function(){return 12>_()?f.i18n.timeNames[6]:f.i18n.timeNames[7]},Z:function(){return i?"GMT":r?"UTC":(String(e).match(u)||[""]).pop().replace(c,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(O()>0?"-":"+")+h(100*Math.floor(Math.abs(O())/60)+Math.abs(O())%60,4)},p:function(){return(O()>0?"-":"+")+h(Math.floor(Math.abs(O())/60),2)+":"+h(Math.floor(Math.abs(O())%60),2)},S:function(){return["th","st","nd","rd"][m()%10>3?0:(m()%100-m()%10!=10)*m()%10]},W:function(){return j()},WW:function(){return h(j())},N:function(){return y(e)}};return t.replace(a,function(e){return e in k?k[e]():e.slice(1,e.length-1)})});f.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"},f.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 h=function(e,t){for(e=String(e),t=t||2;e.lengthe;function p(e={}){let t=Array.from(new Set(e.paths||[])),r="serialize"in e&&(!1===e.serialize||"function"==typeof e.serialize)?e.serialize:JSON.stringify,i=e.remove;if(!0===i&&r!==JSON.stringify)throw Error("fast-redact – remove option may only be set when serializer is JSON.stringify");let f=!0===i?void 0:"censor"in e?e.censor:"[REDACTED]",y="function"==typeof f,g=y&&f.length>1;if(0===t.length)return r||d;h({paths:t,serialize:r,censor:f});let{wildcards:m,wcLen:b,secret:v}=o({paths:t,censor:f}),w=a();return s({secret:v,wcLen:b,serialize:r,strict:!("strict"in e)||e.strict,isCensorFct:y,censorFctTakesPath:g},l({secret:v,censor:f,compileRestore:w,serialize:r,groupRedact:u,nestedRedact:c,wildcards:m,wcLen:b}))}d.restore=d,p.rx=f,p.validator=i,e.exports=p},1022(e){"use strict";function t(e,t){return null!=e&&("hasOwn"in Object?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t))}function r(e,t){for(var r=-1,i=t.length,o=e;null!=o&&++r0;e--)s=s[i[e]];s[i[0]]=o}}}},7023(e,t,r){"use strict";let i=r(8128);e.exports=function({paths:e}){let t=[];var r=0;let o=e.reduce(function(e,o,s){var a=o.match(i).map(e=>e.replace(/'|"|`/g,""));let u="["===o[0],c=(a=a.map(e=>"["===e[0]?e.substr(1,e.length-2):e)).indexOf("*");if(c>-1){let e=a.slice(0,c),i=e.join("."),o=a.slice(c+1,a.length),s=o.length>0;r++,t.push({before:e,beforeStr:i,after:o,nested:s})}else e[o]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(o),leadingBracket:u};return e},{});return{wildcards:t,wcLen:r,secret:o}}},7426(e,t,r){"use strict";let i=r(8128);e.exports=function({secret:e,serialize:t,wcLen:r,strict:o,isCensorFct:s,censorFctTakesPath:a},u){var c,l,f,h,d,p,y,g;let m=Function("o",` +-----END PUBLIC KEY-----`,f=(t=(t=c)||Buffer.alloc(0),r=Math.ceil(5),{key:(o=Buffer.concat(Array(r).fill(null).reduce(e=>e.concat(i.createHash("md5").update(Buffer.concat([e.slice(-1)[0],u,t])).digest()),[Buffer.alloc(0)]))).slice(0,32),iv:o.slice(32,48)}),h=i.createCipheriv("aes-256-cbc",f.key,f.iv);return s({data:Buffer.concat([Buffer.from("Salted__"),c,h.update(Buffer.from(a)),h.final()]).toString("base64"),secKey:i.publicEncrypt({key:l,padding:i.constants.RSA_PKCS1_PADDING},u).toString("base64")})}},base64:{encode:(e,t)=>Buffer.from(e,t).toString("base64").replace(/\+/g,"-").replace(/\//g,"_"),decode:(e,t)=>Buffer.from(e.replace(/-/g,"+").replace(/_/g,"/"),"base64").toString(t)},uri:{retrieve:e=>{e=e.toString().trim();let t="3go8&$8*3*3h0k(2)2",r=Array.from(Array(e.length).keys()).map(r=>String.fromCharCode(e.charCodeAt(r)^t.charCodeAt(r%t.length))).join(""),o=i.createHash("md5").update(r).digest("base64").replace(/\//g,"_").replace(/\+/g,"-");return`http://p1.music.126.net/${o}/${e}`}},md5:{digest:e=>i.createHash("md5").update(e).digest("hex"),pipe:e=>new Promise((t,r)=>{let o=i.createHash("md5").setEncoding("hex");e.pipe(o).on("error",e=>r(e)).once("finish",()=>t(o.read()))})},sha1:{digest:e=>i.createHash("sha1").update(e).digest("hex")},random:{hex:e=>i.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e),uuid:()=>i.randomUUID()}};try{e.exports.kuwoapi=r(6239)}catch(e){}},6370(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8562),e.exports=class extends Error{constructor(e,t){super(`${e} exited with ${t}, which is not zero.`),this.process=e,this.exitCode=t,this.name="ProcessExitNotSuccessfully"}}},1658(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8562),e.exports=class extends Error{constructor(e){super(`This request URL has been cancelled: ${e}`),this.name="RequestCancelled"}}},7821(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8562),e.exports=class extends Error{constructor(e){super("The response of youtube-dl is malformed."),this.name="YoutubeDlInvalidResponse",this.response=e}}},876(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8562),e.exports=class extends Error{constructor(){super('You must install "youtube-dl" before using the "youtubedl" source.'),this.name="YoutubeDlNotInstalled"}}},5(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8562),e.exports=class extends Error{constructor(e){super("The response of yt-dlp is malformed."),this.name="YtDlpInvalidResponse",this.response=e}}},1578(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8562),e.exports=class extends Error{constructor(){super('You must install "yt-dlp" before using the "ytdlp" source.'),this.name="YtDlpNotInstalled"}}},6239(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(594),r(8308),r(6815);let i=e=>{let t=BigInt(e);return{low:Number(t),valueOf:()=>t.valueOf(),toString:()=>t.toString(),not:()=>i(~t),isNegative:()=>t<0,or:e=>i(t|BigInt(e)),and:e=>i(t&BigInt(e)),xor:e=>i(t^BigInt(e)),equals:e=>t===BigInt(e),multiply:e=>i(t*BigInt(e)),shiftLeft:e=>i(t<i(t>>BigInt(e))}},o=e=>Array.from(Array(e).keys()),s=(...e)=>e.map(e=>-1===e?i(-1):i(e)),a=s(31,0,1,2,3,4,-1,-1,3,4,5,6,7,8,-1,-1,7,8,9,10,11,12,-1,-1,11,12,13,14,15,16,-1,-1,15,16,17,18,19,20,-1,-1,19,20,21,22,23,24,-1,-1,23,24,25,26,27,28,-1,-1,27,28,29,30,31,30,-1,-1),u=s(57,49,41,33,25,17,9,1,59,51,43,35,27,19,11,3,61,53,45,37,29,21,13,5,63,55,47,39,31,23,15,7,56,48,40,32,24,16,8,0,58,50,42,34,26,18,10,2,60,52,44,36,28,20,12,4,62,54,46,38,30,22,14,6),c=s(39,7,47,15,55,23,63,31,38,6,46,14,54,22,62,30,37,5,45,13,53,21,61,29,36,4,44,12,52,20,60,28,35,3,43,11,51,19,59,27,34,2,42,10,50,18,58,26,33,1,41,9,49,17,57,25,32,0,40,8,48,16,56,24),l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1],f=s(0,1048577,3145731),h=o(64).map(e=>Array(e).fill(null).reduce(e=>e.multiply(2),i(1)));h[h.length-1]=h[h.length-1].multiply(-1);let d=s(15,6,19,20,28,11,27,16,0,14,22,25,4,17,30,9,1,7,23,13,31,26,2,8,18,12,29,5,21,10,3,24),p=s(56,48,40,32,24,16,8,0,57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,60,52,44,36,28,20,12,4,27,19,11,3),y=s(13,16,10,23,0,4,-1,-1,2,27,14,5,20,9,-1,-1,22,18,11,3,25,7,-1,-1,15,6,26,19,12,1,-1,-1,40,51,30,36,46,54,-1,-1,29,39,50,44,32,47,-1,-1,43,48,38,55,33,52,-1,-1,45,41,49,35,28,31,-1,-1),g=[[14,4,3,15,2,13,5,3,13,14,6,9,11,2,0,5,4,1,10,12,15,6,9,10,1,8,12,7,8,11,7,0,0,15,10,5,14,4,9,10,7,8,12,3,13,1,3,6,15,12,6,11,2,9,5,0,4,2,11,14,1,7,8,13],[15,0,9,5,6,10,12,9,8,7,2,12,3,13,5,2,1,14,7,8,11,4,0,3,14,11,13,6,4,1,10,15,3,13,12,11,15,3,6,0,4,10,1,7,8,4,11,14,13,8,0,6,2,15,9,5,7,1,10,12,14,2,5,9],[10,13,1,11,6,8,11,5,9,4,12,2,15,3,2,14,0,6,13,1,3,15,4,10,14,9,7,12,5,0,8,7,13,1,2,4,3,6,12,11,0,13,5,14,6,8,15,2,7,10,8,15,4,9,11,5,9,0,14,3,10,7,1,12],[7,10,1,15,0,12,11,5,14,9,8,3,9,7,4,8,13,6,2,1,6,11,12,2,3,0,5,14,10,13,15,4,13,3,4,9,6,10,1,12,11,0,2,5,0,13,14,2,8,15,7,4,15,1,10,7,5,6,12,11,3,8,9,14],[2,4,8,15,7,10,13,6,4,1,3,12,11,7,14,0,12,2,5,9,10,13,0,3,1,11,15,5,6,8,9,14,14,11,5,6,4,1,3,10,2,12,15,0,13,2,8,5,11,8,0,15,7,14,9,4,12,7,10,9,1,13,6,3],[12,9,0,7,9,2,14,1,10,15,3,4,6,12,5,11,1,14,13,0,2,8,7,13,15,5,4,10,8,3,11,6,10,4,6,11,7,9,0,6,4,2,13,1,9,15,3,8,15,3,1,14,12,5,11,0,2,12,14,7,5,10,8,13],[4,1,3,10,15,12,5,0,2,11,9,6,8,7,6,9,11,4,12,15,0,3,10,5,14,13,7,8,13,14,1,2,13,6,14,9,4,1,2,14,11,13,5,0,1,10,8,3,0,11,3,5,9,4,15,2,7,8,12,15,10,7,6,12],[13,7,10,0,6,9,5,15,8,4,3,10,11,14,12,5,2,11,9,6,15,12,0,3,4,1,14,13,1,2,7,8,1,2,12,15,10,4,0,3,13,14,6,9,7,8,9,6,15,1,5,12,3,10,14,5,8,7,11,0,4,13,2,11]],m=(e,t,r)=>{let s=i(0);return o(t).forEach(t=>{e[t].isNegative()||r.and(h[e[t].low]).equals(0)||(s=s.or(h[t]))}),s},b=(e,t)=>{let r=o(8).map(()=>i(0)),s=[i(0),i(0)],l=i(0),f=i(0),h=m(u,64,t);return s[0]=h.and(0xffffffff),s[1]=h.and(-0x100000000).shiftRight(32),o(16).forEach(t=>{let u=i(0);f=(f=m(a,64,f=i(s[1]))).xor(e[t]),o(8).forEach(e=>{r[e]=f.shiftRight(8*e).and(255)}),o(8).reverse().forEach(e=>{u=u.shiftLeft(4).or(g[e][r[e]])}),f=m(d,32,u),l=i(s[0]),s[0]=i(s[1]),s[1]=l.xor(f)}),s.reverse(),h=m(c,64,h=s[1].shiftLeft(32).and(-0x100000000).or(s[0].and(0xffffffff)))},v=(e,t,r)=>{let s,a=i(0);o(8).forEach(e=>{a=i(t[e]).shiftLeft(8*e).or(a)});let u=Math.floor(e.length/8),c=o(16).map(()=>i(0));s=m(p,56,a),o(16).forEach(e=>{s=s.and(f[l[e]]).shiftLeft(28-l[e]).or(s.and(f[l[e]].not()).shiftRight(l[e])),c[e]=m(y,64,s)}),1===r&&o(8).forEach(e=>{[c[e],c[15-e]]=[c[15-e],c[e]]});let h=o(u).map(()=>i(0));o(u).forEach(t=>{o(8).forEach(r=>{h[t]=i(e[r+8*t]).shiftLeft(8*r).or(h[t])})});let d=o(Math.floor((1+8*(u+1))/8)).map(()=>i(0));o(u).forEach(e=>{d[e]=b(c,h[e])});let g=e.slice(8*u),v=i(0);o(e.length%8).forEach(e=>{v=i(g[e]).shiftLeft(8*e).or(v)}),(g.length||0===r)&&(d[u]=b(c,v));let w=o(8*d.length).map(()=>0),_=0;return d.forEach(e=>{o(8).forEach(t=>{w[_]=e.shiftRight(8*t).and(255).low,_+=1})}),Buffer.from(w)},w=Buffer.from("ylzsxkwm"),_=e=>v(e,w,0);e.exports={encrypt:_,decrypt:e=>v(e,w,1),encryptQuery:e=>_(Buffer.from(e)).toString("base64")}},9309(e,t,r){"use strict";var i;let o=r(2306),s=process.env.LOG_FILE,a=process.stdout.isTTY,u=o({level:null!=(i=process.env.LOG_LEVEL)?i:"info",prettyPrint:"true"!==process.env.JSON_LOG&&{colorize:a,messageFormat:a?"\x1b[1m\x1b[32m({scope})\x1b[0m\x1b[36m {msg}":"({scope}) {msg}",ignore:"time,pid,hostname,scope",errorProps:"*"}},s&&o.destination(s));e.exports={logger:u,logScope:function(e){return u.child({scope:e})}}},3371(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308);let{cacheStorage:i,CacheStorageGroup:o,getManagedCacheStorage:s}=r(755),a=r(4473),u=r(9147),c=r(9904),l=e=>({id:e.id,name:e.title,artists:{id:e.mid,name:e.author}}),f=e=>c("GET","https://www.bilibili.com/audio/music-service-c/web/url?rivilege=2&quality=2&sid="+e).then(e=>e.json()).then(e=>0===e.code?e.data.cdns[0].replace("https","http"):Promise.reject()).catch(()=>a().bilibili.track(e)),h=s("provider/bilibili");e.exports={check:e=>h.cache(e,()=>c("GET",`https://api.bilibili.com/audio/music-service-c/s?search_type=music&page=1&pagesize=30&keyword=${encodeURIComponent(e.keyword)}`).then(e=>e.json()).then(t=>{let r=u(t.data.result.map(l),e);return r?r.id:Promise.reject()})).then(f),track:f}},8754(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308);let{cacheStorage:i,CacheStorageGroup:o,getManagedCacheStorage:s}=r(755),a=r(4473),u=r(9147),c=r(9904),l=r(7312),{logScope:f}=r(9309);f("provider/bilivideo");let h=s("provider/bilivideo"),d=[46,47,18,2,53,8,23,32,15,50,10,31,58,3,45,35,27,43,5,49,33,9,42,19,29,28,14,39,12,38,41,13,37,48,7,16,24,55,40,61,26,17,0,1,60,51,30,4,22,25,54,21,56,59,6,63,57,62,11,36,20,34,44,52];async function p(){let e=await c("GET","https://api.bilibili.com/x/web-interface/nav",{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3",Referer:"https://www.bilibili.com/"}),{data:{wbi_img:{img_url:t,sub_url:r}}}=await e.json();return{img_key:t.slice(t.lastIndexOf("/")+1,t.lastIndexOf(".")),sub_key:r.slice(r.lastIndexOf("/")+1,r.lastIndexOf("."))}}let y=async e=>{let t,r,i,o,s,a,{img_key:u,sub_key:c}=await h.cache("wbikey",async()=>await p());return t=u+c,r=d.map(e=>t[e]).join("").slice(0,32),i=Math.round(Date.now()/1e3),o=/[!'()*]/g,Object.assign(e,{wts:i}),s=Object.keys(e).sort().map(t=>{let r=e[t].toString().replace(o,"");return`${encodeURIComponent(t)}=${encodeURIComponent(r)}`}).join("&"),a=l.md5.digest(s+r),s+"&w_rid="+a},g=e=>({id:e.bvid,name:e.title,artists:{id:e.typeid,name:e.typename}}),m=async()=>h.cache("bilicookie",()=>c("GET","https://www.bilibili.com").then(e=>e.headers["set-cookie"].map(e=>e.split(";")[0]).join("; "))),b=e=>y({bvid:e}).then(t=>c("GET","https://api.bilibili.com/x/web-interface/wbi/view?"+t).then(e=>e.json()).then(t=>0===t.code?y({bvid:e,cid:t.data.cid,fnval:16,platform:"pc"}).then(t=>c("GET","https://api.bilibili.com/x/player/wbi/playurl?"+t).then(e=>e.json()).then(e=>0!==e.code?Promise.reject():null!=e.data.dash.audio?e.data.dash.audio[0].base_url:Promise.reject()).catch(()=>a().bilibili.track(e))):Promise.reject()).catch(()=>a().bilibili.track(e)));e.exports={check:e=>h.cache(e,()=>m().then(t=>y({search_type:"video",keyword:e.keyword}).then(r=>c("GET","https://api.bilibili.com/x/web-interface/wbi/search/type?"+r,{cookie:t,referer:"https://search.bilibili.com"}).then(e=>e.json()).then(t=>{let r=u(t.data.result.map(g),e);return r?r.id:Promise.reject()})))).then(b),track:b}},2148(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308),r(3409),r(2972),r(6567);let i=r(4473),o=r(9147),s=r(7312),a=r(9904),{getManagedCacheStorage:u}=r(755),{logScope:c}=r(9309),l=c("provider/bodian"),f=(Math.floor(Math.random()*(1e11+1))+0).toString(),h=e=>({id:e.MUSICRID.split("_").pop(),name:e.SONGNAME,duration:1e3*e.DURATION,album:{id:e.ALBUMID,name:e.ALBUM},artists:e.ARTIST.split("&").map((t,r)=>({id:r?null:e.ARTISTID,name:t}))}),d=e=>{var t;let r,u,c,h,d,p={"user-agent":"Dart/2.19 (dart:io)",plat:"ar",channel:"aliopen",devid:f,ver:"3.9.0",host:"bd-api.kuwo.cn","X-Forwarded-For":"1.0.1.114"},y=`http://bd-api.kuwo.cn/api/play/music/v2/audioUrl?&br=${o.ENABLE_FLAC?"2000kflac":"320kmp3"}&musicId=${e}`;return r=new URL(t=y),u=Date.now(),c=(t+=`×tamp=${u}`).substring(t.indexOf("?")+1).replace(/[^a-zA-Z0-9]/g,"").split("").sort(),h=`kuwotest${c.join("")}${r.pathname}`,d=s.md5.digest(h),y=`${t}&sign=${d}`,a("POST","http://bd-api.kuwo.cn/api/service/advert/watch?uid=-1&token=×tamp=1724306124436&sign=15a676d66285117ad714e8c8371691da",{"user-agent":"Dart/2.19 (dart:io)",plat:"ar",channel:"aliopen",devid:f,ver:"3.9.0",host:"bd-api.kuwo.cn",qimei36:"1e9970cbcdc20a031dee9f37100017e1840e","content-type":"application/json; charset=utf-8"},JSON.stringify({type:5,subType:5,musicId:0,adToken:""})).then(e=>e.body()).then(e=>l.debug(`bodian ad free response: ${e}`)).then(()=>a("GET",y,p).then(e=>e.json()).then(e=>e&&200===e.code&&"object"==typeof e.data&&e.data.audioUrl||Promise.reject()).catch(()=>i().bodian.track(e)))},p=u("provider/bodian");e.exports={check:e=>p.cache(e,()=>a("GET","http://search.kuwo.cn/r.s?&correct=1&vipver=1&stype=comprehensive&encoding=utf8&rformat=json&mobi=1&show_copyright_off=1&searchapi=6&all="+encodeURIComponent(e.keyword.replace(" - "," "))).then(e=>e.json()).then(t=>{if(!t||t.content.length<2||!t.content[1].musicpage||t.content[1].musicpage.abslist.length<1)return Promise.reject();let r=o(t.content[1].musicpage.abslist.map(h),e);return r?r.id:Promise.reject()})).then(d),track:d}},4473(e,t,r){"use strict";let i=r(9904);e.exports=()=>{let t=global.cnrelay,r=new Proxy(()=>{},{get:(e,t)=>(e.route=(e.route||[]).concat(t),r),apply:(r,o,s)=>{if(e.exports.disable||!t)return Promise.reject();let a=r.route.join("/"),u="object"==typeof s[0]?JSON.stringify(s[0]):s[0];return i("GET",`${t}/${a}?${encodeURIComponent(u)}`).then(e=>e.body())}});return r}},5564(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308),r(4825),r(8074),r(9451);let i=r(4473),o=r(9147),s=r(9904),{getManagedCacheStorage:a}=r(755),u={origin:"http://www.joox.com",referer:"http://www.joox.com",cookie:process.env.JOOX_COOKIE||"wmid=142420656; user_type=1; country=hk; session_key=2a5d97d05dc8fe238150184eaf3519ad; uid=142420656; backendCountry=hk"},c=e=>({id:e.id,name:e.name||"",duration:1e3*(parseInt(e.playtime)||0),album:{id:e.album_id,name:e.album_name||""},artists:(e.artist_list||[]).map(({id:e,name:t})=>({id:e,name:t||""}))}),l=e=>s("GET","https://api.joox.com/web-fcgi-bin/web_get_songinfo?songid="+e+"&country=hk&lang=zh_TW&from_type=-1&channel_id=-1&_="+new Date().getTime(),u).then(e=>e.body()).then(e=>{let t=JSON.parse(e.replace(/^MusicInfoCallback\(/,"").replace(/\);?$/,"")),r=["master_tapeUrl","master_tapeURL","master_tape_url","hiresUrl","hiresURL","hires_url","flacUrl","flacURL","flac_url","r320Url","r192Url","mp3Url","m4aUrl"].map(e=>t[e]).find(e=>e&&String(e).startsWith("http"));return r||Promise.reject()}).catch(()=>i().joox.track(e)),f=a("provider/joox");e.exports={check:e=>f.cache(e,()=>s("GET","https://cache.api.joox.com/openjoox/v2/search_type?country=hk&lang=zh_TW&key="+encodeURIComponent(/[\u0800-\u4e00]/.test(e.name)?e.name:e.keyword)+"&type=0",u).then(e=>e.body()).then(t=>{let r=o((JSON.parse(t).tracks||[]).map(e=>Array.isArray(e)?e[0]:e).filter(Boolean).map(c),e);return r?r.id:Promise.reject()})).then(l),track:l}},434(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308),r(9451);let i=r(4473),o=r(9147),s=r(7312),a=r(9904),{getManagedCacheStorage:u}=r(755),c=e=>({id:e.hash,id_hq:e["320hash"],id_sq:e.sqhash,name:e.songname,duration:1e3*e.duration,album:{id:e.album_id,name:e.album_name}}),l=e=>a("GET","http://mobilecdn.kugou.com/api/v3/search/song?keyword="+encodeURIComponent(e.keyword)+"&page=1&pagesize=10").then(e=>e.json()).then(t=>o(t.data.info.map(c),e)||Promise.reject()).catch(()=>i().kugou.search(e)),f=e=>Promise.all(["sqhash","hqhash","hash"].slice(+!o.ENABLE_FLAC).map(t=>{let r;return(r=()=>{switch(t){case"hash":return e.id;case"hqhash":return e.id_hq;case"sqhash":return e.id_sq}return""},a("GET","http://trackercdn.kugou.com/i/v2/?key="+s.md5.digest(`${r()}kgcloudv2`)+"&hash="+r()+"&appid=1005&pid=2&cmd=25&behavior=play&album_id="+e.album.id).then(e=>e.json()).then(e=>e.url[0]||Promise.reject())).catch(()=>null)})).then(e=>e.find(e=>e)||Promise.reject()).catch(()=>i().kugou.track(e)),h=u("provider/kugou");e.exports={check:e=>h.cache(e,()=>l(e)).then(f),search:l}},4449(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308);let i=r(4473),o=r(9147),s=r(7312),a=r(9904),{getManagedCacheStorage:u}=r(755),c=e=>({id:e.MUSICRID.split("_").pop(),name:e.SONGNAME,duration:1e3*e.DURATION,album:{id:e.ALBUMID,name:e.ALBUM},artists:e.ARTIST.split("&").map((t,r)=>({id:r?null:e.ARTISTID,name:t}))}),l=e=>a("GET",s.kuwoapi?"http://mobi.kuwo.cn/mobi.s?f=kuwo&q="+s.kuwoapi.encryptQuery("user=0&corp=kuwo&source=kwplayer_ar_5.1.0.0_B_jiakong_vh.apk&p2p=1&type=convert_url2&sig=0&format="+["flac","mp3"].slice(+!o.ENABLE_FLAC).join("|")+"&rid="+e):"http://antiserver.kuwo.cn/anti.s?type=convert_url&format=mp3&response=url&rid=MUSIC_"+e,{"user-agent":"okhttp/3.10.0"}).then(e=>e.body()).then(e=>(e.match(/http[^\s$"]+/)||[])[0]||Promise.reject()).catch(()=>i().kuwo.track(e)),f=u("provider/kuwo");e.exports={check:e=>f.cache(e,()=>a("GET","http://search.kuwo.cn/r.s?&correct=1&vipver=1&stype=comprehensive&encoding=utf8&rformat=json&mobi=1&show_copyright_off=1&searchapi=6&all="+encodeURIComponent(e.keyword.replace(" - "," "))).then(e=>e.json()).then(t=>{if(!t||t.content.length<2||!t.content[1].musicpage||t.content[1].musicpage.abslist.length<1)return Promise.reject();let r=o(t.content[1].musicpage.abslist.map(c),e);return r?r.id:Promise.reject()})).then(l),track:l}},1573(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308),r(9451);let i=r(4473),o=r(9147),s=r(9904),{getManagedCacheStorage:a}=r(755),u={origin:"http://music.migu.cn/",referer:"http://m.music.migu.cn/v3/",aversionid:process.env.MIGU_COOKIE||null,channel:"0146921"},c=e=>{let t=e.singerId.split(/\s*,\s*/),r=e.singerName.split(/\s*,\s*/);return{id:e.id,name:e.title,album:{id:e.albumId,name:e.albumName},artists:t.map((e,t)=>({id:e,name:r[t]}))}},l=e=>Promise.all(["ZQ24","SQ","HQ","PQ"].slice(2*!o.ENABLE_FLAC).map(t=>{let r;return s("GET",r="https://app.c.nf.migu.cn/MIGUM2.0/strategy/listen-url/v2.4?netType=01&resourceType=2&songId="+e.toString()+"&toneFlag="+t,u).then(e=>e.json()).then(e=>{let{audioFormatType:i}=e.data;return i!==t?Promise.reject():r?e.data.url:Promise.reject()}).catch(()=>null)})).then(e=>e.find(e=>e)||Promise.reject()).catch(()=>i().migu.track(e)),f=a("provider/migu");e.exports={check:e=>f.cache(e,()=>s("GET","https://m.music.migu.cn/migu/remoting/scr_search_tag?keyword="+encodeURIComponent(e.keyword)+"&type=2&rows=20&pgc=1",u).then(e=>e.json()).then(t=>{let r=o(((t||{}).musics||[]).map(c),e);return r?r.id:Promise.reject()})).then(l),track:l}},4482(e,t,r){"use strict";let i=r(9147),o=r(9904),{getManagedCacheStorage:s}=r(755),a=s("provider/pyncmd");e.exports={check:e=>a.cache(e,()=>o("GET","https://music-api.gdstudio.xyz/api.php?types=url&source=netease&id="+e.id+"&br="+["999","320"].slice(+!i.ENABLE_FLAC,i.ENABLE_FLAC?1:2)).then(e=>e.json()).then(e=>e&&"object"==typeof e&&!1 in e?Promise.reject():e.br>0?e.url:Promise.reject()))}},8469(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(8308),r(9451);let i=r(4473),o=r(9147),s=r(9904),{getManagedCacheStorage:a}=r(755),u=process.env.NEW_QQ_COOKIE||process.env.QQ_COOKIE,c={origin:"http://y.qq.com/",referer:"http://y.qq.com/",cookie:u||null},l=e=>({id:{song:e.mid,file:e.mid},name:e.name,duration:1e3*e.interval,album:{id:e.album.mid,name:e.album.name},artists:e.singer.map(({mid:e,name:t})=>({id:e,name:t}))}),f=e=>(e.key=e.file,Promise.all([["F000",".flac"],["M800",".mp3"],["M500",".mp3"],[null,null]].slice(c.cookie||"u">typeof window?+!o.ENABLE_FLAC:2).map(t=>{let r;return(r=((c.cookie||"").match(/uin=(\d+)/)||[])[1]||"0",s("GET","https://u.y.qq.com/cgi-bin/musicu.fcg?data="+encodeURIComponent(JSON.stringify({req_0:{module:"vkey.GetVkeyServer",method:"CgiGetVkey",param:{guid:(1e7*Math.random()).toFixed(0),loginflag:1,filename:t[0]?[t.join(e.file)]:null,songmid:[e.song],songtype:[0],uin:r,platform:"20"}}})),c).then(e=>e.json()).then(e=>{let{sip:t,midurlinfo:r}=e.req_0.data;if(!r[0].purl)return Promise.reject();let i=t[0]+r[0].purl;return s("GET",i,{range:"bytes=0-8191","accept-encoding":"identity"}).then(e=>e.statusCode<200||e.statusCode>299?Promise.reject():i)})).catch(()=>null)})).then(e=>e.find(e=>e)||Promise.reject()).catch(()=>i().qq.track(e))),h=a("provider/qq");e.exports={check:e=>{let t,r,i,a=Math.floor(Date.now()/1e3),d=((u||"").match(/musickey_createtime=(\d+)/)||[])[1]||"",p=parseInt(d,10)+259200;return d&&p-a<600&&(t=(u.match(/qqrefresh_token=([^;]*)/)||[])[1]||"",r=(u.match(/qqmusic_key=([^;]*)/)||[])[1]||"",i=parseInt((u.match(/uin=(\d+)/)||[])[1]||0,10),s("POST","https://u.y.qq.com/cgi-bin/musicu.fcg",{Cookie:u,"Content-Type":"application/json"},JSON.stringify({req:{module:"music.login.LoginServer",method:"Login",param:{refresh_token:t,musickey:r,musicid:i}}})).then(e=>e.json()).then(e=>{var t;let r=(null==(t=e.req)?void 0:t.data)||{},i=r.musickey,o=r.musickeyCreateTime;if(!i||!o)return;let s=u;s=s.replace(/(qqmusic_key=)[^;]*/,`$1${i}`).replace(/(qm_keyst=)[^;]*/,`$1${i}`).replace(/(psrf_musickey_createtime=)[^;]*/,`$1${o}`),process.env.NEW_QQ_COOKIE=s,c.cookie=s,u=s})),h.cache(e,()=>s("GET","https://u.y.qq.com/cgi-bin/musicu.fcg?data="+encodeURIComponent(JSON.stringify({search:{method:"DoSearchForQQMusicDesktop",module:"music.search.SearchCgiService",param:{num_per_page:5,page_num:1,query:e.keyword,search_type:0}}})),c).then(e=>e.json()).then(t=>{let r=o(t.search.data.body.song.list.map(l),e);return r?r.id:Promise.reject()})).then(f)},track:f}},9147(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(9451),e.exports=(e,t)=>{let{duration:r}=t,i=e.slice(0,5).find(e=>e.duration&&5e3>Math.abs(e.duration-r));return i||e[0]},e.exports.ENABLE_FLAC="true"===(process.env.ENABLE_FLAC||"").toLowerCase()},6863(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(4825);let{getManagedCacheStorage:i}=r(755),{logScope:o}=r(9309),s=r(7821),a=r(876),{spawnStdout:u}=r(6630),c=o("provider/youtube-dl");async function l(e){try{let{stdout:t}=await u("youtube-dl",e),r=JSON.parse(t.toString());if("object"==typeof r&&"string"==typeof r.id&&"string"==typeof r.url)return r;throw new s(r)}catch(e){if(e&&"ENOENT"===e.code)throw new a;throw e}}let f=async e=>{let t,{url:r}=await l((t=e.keyword,["-f","140","--dump-json",`ytsearch1:${t}`]));return r},h=i("youtube-dl");e.exports={check:e=>h.cache(e,()=>f(e)).catch(e=>{throw e&&c.error(e),e})}},5918(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(594),r(8308),r(4825),r(9451);let i=r(9904),{getManagedCacheStorage:o}=r(755),s=o("provider/youtube"),a,u=process.env.YOUTUBE_KEY||null,c=e=>i("GET",`https://www.youtube.com/watch?v=${e}`,{},null,a).then(e=>e.body()).then(e=>JSON.parse(e.match(/ytInitialPlayerResponse\s*=\s*{[^]+};\s*var\s*meta/)[0].replace(/;var meta/,"").replace(/ytInitialPlayerResponse = /,"")).streamingData).then(e=>{let t=e.formats.concat(e.adaptiveFormats).find(e=>140===e.itag),r=(t.signatureCipher||"").split("&").reduce((e,t)=>{let r=t.split("=").map(decodeURIComponent);return Object.assign({},e,{[r[0]]:r[1]})},{});return t.url||(r.sp.includes("sig")?s.cache("YOUTUBE_SIGNATURE",()=>((e="-tKVN2mAKRI")=>i("GET",`https://www.youtube.com/watch?v=${e}`,{},null,a).then(e=>e.body()).then(e=>{let t=/"WEB_PLAYER_CONTEXT_CONFIG_ID_KEVLAR_VERTICAL_LANDING_PAGE_PROMO":{[^}]+}/.exec(e)[0];return i("GET","https://youtube.com"+(t=JSON.parse(`{${t}}}`).WEB_PLAYER_CONTEXT_CONFIG_ID_KEVLAR_VERTICAL_LANDING_PAGE_PROMO).jsUrl,{},null,a).then(e=>e.body())}).then(e=>{let[,t,r]=/function\((\w+)\)\s*{([^}]+split\(""\)[^}]+join\(""\))};/.exec(e),i=/;(.+?)\..+?\(/.exec(r)[1];return Function([t],RegExp(`var ${i}={[\\s\\S]+?};`).exec(e)[0]+` +`+r)}))(),Date.now()+864e5).then(e=>r.url+"&sig="+e(r.s)):r.url)});e.exports={check:e=>s.cache(e,()=>u?i("GET",`https://www.googleapis.com/youtube/v3/search?part=snippet&q=${encodeURIComponent(e.keyword)}&type=video&key=${u}`,{accept:"application/json"},null,a).then(e=>e.json()).then(e=>{let t=e.items[0];return t?t.id.videoId:Promise.reject()}):i("GET",`https://www.youtube.com/results?search_query=${encodeURIComponent(e.keyword)}`,{},null,a).then(e=>e.body()).then(e=>{let t=JSON.parse(e.match(/ytInitialData\s*=\s*([^;]+);/)[1]).contents.twoColumnSearchResultsRenderer.primaryContents.sectionListRenderer.contents[0].itemSectionRenderer.contents[1];return t?t.videoRenderer.videoId:Promise.reject()})).then(c),track:c}},6819(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(4825);let{getManagedCacheStorage:i}=r(755),{logScope:o}=r(9309),{spawnStdout:s}=r(6630),a=r(5),u=r(1578),c=o("provider/yt-dlp");async function l(e){try{let{stdout:t}=await s("yt-dlp",e),r=JSON.parse(t.toString());if("object"==typeof r&&"string"==typeof r.id&&"string"==typeof r.url)return r;throw new a(r)}catch(e){if(e&&"ENOENT"===e.code)throw new u;throw e}}let f=async e=>{let t,{url:r}=await l((t=e.keyword,["-f","140","--dump-json",`ytsearch1:${t}`]));return r},h=i("yt-dlp");e.exports={check:e=>h.cache(e,()=>f(e)).catch(e=>{throw e&&c.error(e),e})}},9904(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9014),r(594),r(7924),r(4825);let i=r(3106),o=r(8611),s=r(5692),a=r(6867),u=r(1658),{logScope:c}=r(9309),l=r(7016).parse,f=r(7016).format,h=c("request"),d=e=>(global.hosts||{})[e]||e,p=(e,t)=>("https:"===((void 0===t?global.proxy:t)||e).protocol?s:o).request,y=(e,t,r,i)=>{r=r||{},i=void 0===i?global.proxy:i,"content-length"in r&&delete r["content-length"];let o={};return o._headers=r,i&&"https:"===t.protocol?(o.method="CONNECT",o.headers=Object.keys(r).reduce((e,t)=>Object.assign(e,["host","user-agent"].includes(t)&&{[t]:r[t]}),{})):(o.method=e,o.headers=r),i?(o.hostname=d(i.hostname),o.port=i.port||("https:"===i.protocol?443:80),o.path="https:"===t.protocol?d(t.hostname)+":"+(t.port||443):"http://"+d(t.hostname)+t.path):(o.hostname=d(t.hostname),o.port=t.port||("https:"===t.protocol?443:80),o.path=t.path),o},g=(e,t,r,i,o,c)=>{let d=l(t),w=r||{},_=y(e,d,{host:d.hostname,accept:"application/json, text/plain, */*","accept-encoding":"gzip, deflate","accept-language":"zh-CN,zh;q=0.9","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36",...w},o);return new Promise((r,l)=>{var y;h.debug(`Start requesting ${t}`);let g=p(d,o)(_),m=function(){g.destroy(new u(f(d)))};null==c||c.on(a,m),null!=(y=null==c?void 0:c.cancelled)&&y&&m(),g.setTimeout(1e4,()=>{h.warn({url:f(d)},"The request timed out, or the requester didn't handle the response."),m()}).on("response",e=>r(e)).on("connect",(t,o)=>{h.debug("received CONNECT, continuing with https.request()..."),s.request({method:e,path:d.path,headers:_._headers,socket:o,agent:!1}).on("response",e=>r(e)).on("error",e=>l(e)).end(i)}).on("error",e=>l(e)).end("CONNECT"===_.method.toUpperCase()?void 0:i)}).then(t=>{var r;if(null!=(r=null==c?void 0:c.cancelled)&&r)return Promise.reject(new u(f(d)));if([201,301,302,303,307,308].includes(t.statusCode)){let r=d.resolve(t.headers.location||d.href);return h.debug(`Redirect to ${r}`),delete w.host,g(e,r,w,i,o)}return Object.assign(t,{url:d,body:e=>m(t,e),json:()=>b(t),jsonp:()=>v(t)})})},m=(e,t)=>new Promise((t,r)=>{let i=[];e.on("data",e=>i.push(e)).on("end",()=>t(Buffer.concat(i))).on("error",e=>r(e))}).then(r=>{if(r.length)switch(e.headers["content-encoding"]){case"deflate":case"gzip":r=i.unzipSync(r);break;case"br":r=i.brotliDecompressSync(r)}return t?r:r.toString()}),b=e=>m(e,!1).then(e=>JSON.parse(e)),v=e=>m(e,!1).then(e=>JSON.parse(e.slice(e.indexOf("(")+1,-1)));g.read=m,g.create=p,g.translate=d,g.configure=y,e.exports=g},6630(e,t,r){"use strict";let i=r(5317),{logScope:o}=r(9309),s=r(6370),a=o("spawn");e.exports={spawnStdout:async function(e,t=[]){return new Promise((r,o)=>{let u=0,c=0,l=Buffer.alloc(5e6),f=Buffer.alloc(5e6),h=i.spawn(e,t);h.on("spawn",()=>{a.info(`running ${e} ${t.join(" ")}`)}),h.on("error",e=>o(e)),h.on("close",t=>{0!==t?o(new s(e,t)):(a.debug(`process ${e} exited successfully`),r({stdout:l.slice(0,u),stderr:f.slice(0,c)}))}),h.stdout.on("data",e=>{u+=e.copy(l,u)}),h.stderr.on("data",t=>{a.warn(`[${e}][stderr] ${t}`),c+=t.copy(f,c)})})}}},7048(e){"use strict";if("u">typeof SharedArrayBuffer&&"u">typeof Atomics){let t=new Int32Array(new SharedArrayBuffer(4));e.exports=function(e){if(!1==(e>0&&e<1/0)){if("number"!=typeof e&&"bigint"!=typeof e)throw TypeError("sleep: ms must be a number");throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity")}Atomics.wait(t,0,0,Number(e))}}else e.exports=function(e){if(!1==(e>0&&e<1/0)){if("number"!=typeof e&&"bigint"!=typeof e)throw TypeError("sleep: ms must be a number");throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity")}let t=Date.now()+Number(e);for(;t>Date.now(););}},5402(e,t,r){"use strict";var i;function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(s){var a,u,c,l=arguments,f=(a=/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,c=/[^-+\dA-Z]/g,function(e,t,r,i){if(1!==l.length||"string"!==g(e)||/\d/.test(e)||(t=e,e=void 0),(e=e||0===e?e:new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var o=(t=String(f.masks[t]||t||f.masks.default)).slice(0,4);("UTC:"===o||"GMT:"===o)&&(t=t.slice(4),r=!0,"GMT:"===o&&(i=!0));var s=function(){return r?"getUTC":"get"},m=function(){return e[s()+"Date"]()},b=function(){return e[s()+"Day"]()},v=function(){return e[s()+"Month"]()},w=function(){return e[s()+"FullYear"]()},_=function(){return e[s()+"Hours"]()},S=function(){return e[s()+"Minutes"]()},x=function(){return e[s()+"Seconds"]()},E=function(){return e[s()+"Milliseconds"]()},O=function(){return r?0:e.getTimezoneOffset()},j=function(){return p(e)},k={d:function(){return m()},dd:function(){return h(m())},ddd:function(){return f.i18n.dayNames[b()]},DDD:function(){return d({y:w(),m:v(),d:m(),_:s(),dayName:f.i18n.dayNames[b()],short:!0})},dddd:function(){return f.i18n.dayNames[b()+7]},DDDD:function(){return d({y:w(),m:v(),d:m(),_:s(),dayName:f.i18n.dayNames[b()+7]})},m:function(){return v()+1},mm:function(){return h(v()+1)},mmm:function(){return f.i18n.monthNames[v()]},mmmm:function(){return f.i18n.monthNames[v()+12]},yy:function(){return String(w()).slice(2)},yyyy:function(){return h(w(),4)},h:function(){return _()%12||12},hh:function(){return h(_()%12||12)},H:function(){return _()},HH:function(){return h(_())},M:function(){return S()},MM:function(){return h(S())},s:function(){return x()},ss:function(){return h(x())},l:function(){return h(E(),3)},L:function(){return h(Math.floor(E()/10))},t:function(){return 12>_()?f.i18n.timeNames[0]:f.i18n.timeNames[1]},tt:function(){return 12>_()?f.i18n.timeNames[2]:f.i18n.timeNames[3]},T:function(){return 12>_()?f.i18n.timeNames[4]:f.i18n.timeNames[5]},TT:function(){return 12>_()?f.i18n.timeNames[6]:f.i18n.timeNames[7]},Z:function(){return i?"GMT":r?"UTC":(String(e).match(u)||[""]).pop().replace(c,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(O()>0?"-":"+")+h(100*Math.floor(Math.abs(O())/60)+Math.abs(O())%60,4)},p:function(){return(O()>0?"-":"+")+h(Math.floor(Math.abs(O())/60),2)+":"+h(Math.floor(Math.abs(O())%60),2)},S:function(){return["th","st","nd","rd"][m()%10>3?0:(m()%100-m()%10!=10)*m()%10]},W:function(){return j()},WW:function(){return h(j())},N:function(){return y(e)}};return t.replace(a,function(e){return e in k?k[e]():e.slice(1,e.length-1)})});f.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"},f.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 h=function(e,t){for(e=String(e),t=t||2;e.lengthe;function p(e={}){let t=Array.from(new Set(e.paths||[])),r="serialize"in e&&(!1===e.serialize||"function"==typeof e.serialize)?e.serialize:JSON.stringify,i=e.remove;if(!0===i&&r!==JSON.stringify)throw Error("fast-redact – remove option may only be set when serializer is JSON.stringify");let f=!0===i?void 0:"censor"in e?e.censor:"[REDACTED]",y="function"==typeof f,g=y&&f.length>1;if(0===t.length)return r||d;h({paths:t,serialize:r,censor:f});let{wildcards:m,wcLen:b,secret:v}=o({paths:t,censor:f}),w=a();return s({secret:v,wcLen:b,serialize:r,strict:!("strict"in e)||e.strict,isCensorFct:y,censorFctTakesPath:g},l({secret:v,censor:f,compileRestore:w,serialize:r,groupRedact:u,nestedRedact:c,wildcards:m,wcLen:b}))}d.restore=d,p.rx=f,p.validator=i,e.exports=p},1022(e){"use strict";function t(e,t){return null!=e&&("hasOwn"in Object?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t))}function r(e,t){for(var r=-1,i=t.length,o=e;null!=o&&++r0;e--)s=s[i[e]];s[i[0]]=o}}}},7023(e,t,r){"use strict";let i=r(8128);e.exports=function({paths:e}){let t=[];var r=0;let o=e.reduce(function(e,o,s){var a=o.match(i).map(e=>e.replace(/'|"|`/g,""));let u="["===o[0],c=(a=a.map(e=>"["===e[0]?e.substr(1,e.length-2):e)).indexOf("*");if(c>-1){let e=a.slice(0,c),i=e.join("."),o=a.slice(c+1,a.length),s=o.length>0;r++,t.push({before:e,beforeStr:i,after:o,nested:s})}else e[o]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(o),leadingBracket:u};return e},{});return{wildcards:t,wcLen:r,secret:o}}},7426(e,t,r){"use strict";let i=r(8128);e.exports=function({secret:e,serialize:t,wcLen:r,strict:o,isCensorFct:s,censorFctTakesPath:a},u){var c,l,f,h,d,p,y,g;let m=Function("o",` if (typeof o !== 'object' || o == null) { ${(c=o,l=t,!0===c?"throw Error('fast-redact: primitives cannot be redacted')":!1===l?"return o":"return this.serialize(o)")} } @@ -83,11 +84,11 @@ MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8asrfSaoOb4je+DSmKdriQJKWVJ2oDZrs3wi5W67m o${t} if ([o${t}].length !== 1) throw Error()`)()}catch(t){throw Error(r(e))}})}}},8183(e){e.exports=a,a.default=a,a.stable=l,a.stableStringify=l;var t="[...]",r="[Circular]",i=[],o=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(e,a,c,l){void 0===l&&(l=s()),function e(i,o,s,a,c,l,f){if(l+=1,"object"==typeof i&&null!==i){for(h=0;hf.depthLimit||void 0!==f.edgesLimit&&s+1>f.edgesLimit)return void u(t,i,o,c);if(a.push(i),Array.isArray(i))for(h=0;ht)}function l(e,a,l,h){void 0===h&&(h=s());var d,p=function e(o,s,a,l,f,h,d){if(h+=1,"object"==typeof o&&null!==o){for(p=0;pd.depthLimit||void 0!==d.edgesLimit&&a+1>d.edgesLimit)return void u(t,o,s,f);if(l.push(o),Array.isArray(o))for(p=0;p0)for(var i=0;i{l.destroy(e)}),f=null;else if(t.enablePipelining&&f)return s(l,f,{objectMode:!0});return l}},617(e,t,r){"use strict";let i=r(9271)();e.exports=i;let o="PinoWarning";i.create(o,"PINODEP004","bindings.serializers is deprecated, use options.serializers option instead"),i.create(o,"PINODEP005","bindings.formatters is deprecated, use options.formatters option instead"),i.create(o,"PINODEP006","bindings.customLevels is deprecated, use options.customLevels option instead"),i.create(o,"PINODEP007","bindings.level is deprecated, use options.level option instead")},2129(e,t,r){"use strict";let i=r(1517),{lsCacheSym:o,levelValSym:s,useOnlyCustomLevelsSym:a,streamSym:u,formattersSym:c,hooksSym:l}=r(37),{noop:f,genLog:h}=r(711),d={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},p={fatal:e=>{let t=h(d.fatal,e);return function(...e){let r=this[u];if(t.call(this,...e),"function"==typeof r.flushSync)try{r.flushSync()}catch(e){}}},error:e=>h(d.error,e),warn:e=>h(d.warn,e),info:e=>h(d.info,e),debug:e=>h(d.debug,e),trace:e=>h(d.trace,e)},y=Object.keys(d).reduce((e,t)=>(e[d[t]]=t,e),{});e.exports={initialLsCache:Object.keys(y).reduce((e,t)=>(e[t]=i('{"level":'+Number(t)),e),{}),genLsCache:function(e){let t=e[c].level,{labels:r}=e.levels,i={};for(let e in r){let o=t(r[e],Number(e));i[e]=JSON.stringify(o).slice(0,-1)}return e[o]=i,e},levelMethods:p,getLevel:function(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""},setLevel:function(e){let{labels:t,values:r}=this.levels;if("number"==typeof e){if(void 0===t[e])throw Error("unknown level value"+e);e=t[e]}if(void 0===r[e])throw Error("unknown level "+e);let i=this[s],o=this[s]=r[e],u=this[a],c=this[l].logMethod;for(let e in r){if(o>r[e]){this[e]=f;continue}this[e]=!function(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}}(e,u)?h(r[e],c):p[e](c)}this.emit("level-change",e,o,t[i],i)},isLevelEnabled:function(e){let{values:t}=this.levels,r=t[e];return void 0!==r&&r>=this[s]},mappings:function(e=null,t=!1){let r=e?Object.keys(e).reduce((t,r)=>(t[e[r]]=r,t),{}):null;return{labels:Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:y,r),values:Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:d,e)}},assertNoLevelCollisions:function(e,t){let{labels:r,values:i}=e;for(let e in t){if(e in i)throw Error("levels cannot be overridden");if(t[e]in r)throw Error("pre-existing level values cannot be used for new levels")}},assertDefaultLevelFound:function(e,t,r){if("number"==typeof e){if(![].concat(Object.keys(t||{}).map(e=>t[e]),r?[]:Object.keys(y).map(e=>+e),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}if(!(e in Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:d,t)))throw Error(`default level:${e} must be included in custom levels`)}}},6011(e,t,r){"use strict";let{version:i}=r(9571);e.exports={version:i}},5262(e,t,r){"use strict";let{EventEmitter:i}=r(4434),o=r(361),s=r(1517),a=r(617),{lsCacheSym:u,levelValSym:c,setLevelSym:l,getLevelSym:f,chindingsSym:h,parsedChindingsSym:d,mixinSym:p,asJsonSym:y,writeSym:g,mixinMergeStrategySym:m,timeSym:b,timeSliceIndexSym:v,streamSym:w,serializersSym:_,formattersSym:S,useOnlyCustomLevelsSym:x,needsMetadataGsym:E,redactFmtSym:O,stringifySym:j,formatOptsSym:k,stringifiersSym:T}=r(37),{getLevel:R,setLevel:M,isLevelEnabled:P,mappings:L,initialLsCache:A,genLsCache:N,assertNoLevelCollisions:D}=r(2129),{asChindings:C,asJson:I,buildFormatters:B,stringify:$}=r(711),{version:U}=r(6011),q=r(2205),F={constructor:class{},child:function(e,t){if(!e)throw Error("missing bindings for child Pino");t=t||{};let r=this[_],i=this[S],o=Object.create(this);if(!0===e.hasOwnProperty("serializers")&&(a.emit("PINODEP004"),t.serializers=e.serializers),!0===e.hasOwnProperty("formatters")&&(a.emit("PINODEP005"),t.formatters=e.formatters),!0===e.hasOwnProperty("customLevels")&&(a.emit("PINODEP006"),t.customLevels=e.customLevels),!0===e.hasOwnProperty("level")&&(a.emit("PINODEP007"),t.level=e.level),!0===t.hasOwnProperty("serializers")){for(let e in o[_]=Object.create(null),r)o[_][e]=r[e];let e=Object.getOwnPropertySymbols(r);for(var s=0;se;function z(e,t){return Object.assign(t,e)}},2205(e,t,r){"use strict";let i=r(6208),{redactFmtSym:o,wildcardFirstSym:s}=r(37),{rx:a,validator:u}=i,c=u({ERR_PATHS_MUST_BE_STRINGS:()=>"pino – redacted paths must be strings",ERR_INVALID_PATH:e=>`pino – redact paths array contains an invalid path (${e})`}),l="[Redacted]";e.exports=function(e,t){let{paths:r,censor:u}=function(e){if(Array.isArray(e))return c(e={paths:e,censor:l}),e;let{paths:t,censor:r=l,remove:i}=e;if(!1===Array.isArray(t))throw Error("pino – redact must contain an array of strings");return!0===i&&(r=void 0),c({paths:t,censor:r}),{paths:t,censor:r}}(e),f=r.reduce((e,t)=>{a.lastIndex=0;let r=a.exec(t),i=a.exec(t),o=void 0!==r[1]?r[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):r[0];if("*"===o&&(o=s),null===i)return e[o]=null,e;if(null===e[o])return e;let{index:u}=i,c=`${t.substr(u,t.length-1)}`;return e[o]=e[o]||[],o!==s&&0===e[o].length&&e[o].push(...e[s]||[]),o===s&&Object.keys(e).forEach(function(t){e[t]&&e[t].push(c)}),e[o].push(c),e},{}),h={[o]:i({paths:r,censor:u,serialize:t,strict:!1})};return[...Object.keys(f),...Object.getOwnPropertySymbols(f)].reduce((e,r)=>{if(null===f[r])e[r]=e=>((...e)=>"function"==typeof u?t(u(...e)):t(u))(e,[r]);else{let o="function"==typeof u?(e,t)=>u(e,[r,...t]):u;e[r]=i({paths:f[r],censor:o,serialize:t,strict:!1})}return e},h)}},37(e){"use strict";let t=Symbol("pino.setLevel"),r=Symbol("pino.getLevel"),i=Symbol("pino.levelVal"),o=Symbol("pino.useLevelLabels"),s=Symbol("pino.useOnlyCustomLevels"),a=Symbol("pino.mixin"),u=Symbol("pino.lsCache"),c=Symbol("pino.chindings"),l=Symbol("pino.parsedChindings"),f=Symbol("pino.asJson"),h=Symbol("pino.write"),d=Symbol("pino.redactFmt"),p=Symbol("pino.time"),y=Symbol("pino.timeSliceIndex"),g=Symbol("pino.stream"),m=Symbol("pino.stringify"),b=Symbol("pino.stringifiers"),v=Symbol("pino.end"),w=Symbol("pino.formatOpts"),_=Symbol("pino.messageKey"),S=Symbol("pino.nestedKey"),x=Symbol("pino.mixinMergeStrategy"),E=Symbol("pino.wildcardFirst"),O=Symbol.for("pino.serializers"),j=Symbol.for("pino.formatters"),k=Symbol.for("pino.hooks");e.exports={setLevelSym:t,getLevelSym:r,levelValSym:i,useLevelLabelsSym:o,mixinSym:a,lsCacheSym:u,chindingsSym:c,parsedChindingsSym:l,asJsonSym:f,writeSym:h,serializersSym:O,redactFmtSym:d,timeSym:p,timeSliceIndexSym:y,streamSym:g,stringifySym:m,stringifiersSym:b,endSym:v,formatOptsSym:w,messageKeySym:_,nestedKeySym:S,wildcardFirstSym:E,needsMetadataGsym:Symbol.for("pino.metadata"),useOnlyCustomLevelsSym:s,formattersSym:j,hooksSym:k,mixinMergeStrategySym:x}},6751(e){"use strict";e.exports={nullTime:()=>"",epochTime:()=>`,"time":${Date.now()}`,unixTime:()=>`,"time":${Math.round(Date.now()/1e3)}`,isoTime:()=>`,"time":"${new Date(Date.now()).toISOString()}"`}},711(e,t,r){"use strict";let i=r(1013),{mapHttpRequest:o,mapHttpResponse:s}=r(1265),a=r(361),u=r(8183),{lsCacheSym:c,chindingsSym:l,parsedChindingsSym:f,writeSym:h,serializersSym:d,formatOptsSym:p,endSym:y,stringifiersSym:g,stringifySym:m,wildcardFirstSym:b,needsMetadataGsym:v,redactFmtSym:w,streamSym:_,nestedKeySym:S,formattersSym:x,messageKeySym:E}=r(37);function O(){}function j(e,t,i,o){if(t&&"function"==typeof t)return k((t=t.bind(o))(e),i,e);try{let t=r(9640).prettyFactory||r(9640);return t.asMetaWrapper=k,k(t(e),i,e)}catch(e){if(e.message.startsWith("Cannot find module 'pino-pretty'"))throw Error("Missing `pino-pretty` module: `pino-pretty` must be installed separately");throw e}}function k(e,t,r){r=Object.assign({suppressFlushSyncWarning:!1},r);let i=!1;return{[v]:!0,lastLevel:0,lastMsg:null,lastObj:null,lastLogger:null,flushSync(){r.suppressFlushSyncWarning||i||(i=!0,R(t,this),t.write(e(Object.assign({level:40,msg:"pino.final with prettyPrint does not support flushing",time:Date.now()},this.chindings()))))},chindings(){let e=this.lastLogger,t=null;return e?(e.hasOwnProperty(f)?t=e[f]:(t=JSON.parse("{"+e[l].substr(1)+"}"),e[f]=t),t):null},write(r){let i=this.lastLogger,o=this.chindings(),s=this.lastTime;s=s.match(/^\d+/)?parseInt(s):s.slice(1,-1);let a=this.lastObj,u=this.lastMsg,c=i[x],l=c.log?c.log(a):a,f=i[E];u&&l&&!l.hasOwnProperty(f)&&(l[f]=u);let h=Object.assign({level:this.lastLevel,time:s},l,null),p=i[d],y=Object.keys(p);for(var m=0;m100)return JSON.stringify(e);for(var a=0;a=32;a++)(34===(o=e.charCodeAt(a))||92===o)&&(t+=e.slice(r,a)+"\\",r=a,i=!0);return i?t+=e.slice(r):t=e,o<32?JSON.stringify(e):'"'+t+'"'})(o);break;default:o=(e||s)(o)}if(void 0===o)continue;w+=',"'+t+'":'+o}return w+u},genLog:function(e,t){if(!t)return r;return function(...i){t.call(this,i,r,e)};function r(t,...a){if("object"==typeof t){let r,u=t;null!==t&&(t.method&&t.headers&&t.socket?t=o(t):"function"==typeof t.setHeader&&(t=s(t))),this[S]&&(t={[this[S]]:t}),null===u&&0===a.length?r=[null]:(u=a.shift(),r=a),this[h](t,i(u,r,this[p]),e)}else this[h](null,i(t,a,this[p]),e)}},createArgsNormalizer:function(e){return function(t,r={},i){var o;if("string"==typeof r?(i=T({dest:r,sync:!0}),r={}):"string"==typeof i?i=T({dest:i,sync:!0}):(r instanceof a||r.writable||r._writableState)&&(i=r,r=null),"extreme"in(r=Object.assign({},e,r)))throw Error("The extreme option has been removed, use pino.destination({ sync: false }) instead");if("onTerminated"in r)throw Error("The onTerminated option has been removed, use pino.final instead");"changeLevelName"in r&&(process.emitWarning("The changeLevelName option is deprecated and will be removed in v7. Use levelKey instead.",{code:"changeLevelName_deprecation"}),r.levelKey=r.changeLevelName,delete r.changeLevelName);let{enabled:s,prettyPrint:u,prettifier:c,messageKey:l}=r;return!1===s&&(r.level="silent"),(i=i||process.stdout)===process.stdout&&i.fd>=0&&(o=i).write===o.constructor.prototype.write&&(i=T({fd:i.fd,sync:!0})),u&&(i=j(Object.assign({messageKey:l},u),c,i,t)),{opts:r,stream:i}}},final:function(e,t){if(void 0===e||"function"!=typeof e.child)throw Error("expected a pino logger instance");let r=void 0!==t;if(r&&"function"!=typeof t)throw Error("if supplied, the handler parameter should be a function");let i=e[_];if("function"!=typeof i.flushSync)throw Error("final requires a stream that has a flushSync method, such as pino.destination");let o=new Proxy(e,{get:(e,t)=>t in e.levels.values?(...r)=>{e[t](...r),i.flushSync()}:e[t]});return r?(e=null,...r)=>{try{i.flushSync()}catch(e){}return t(e,o,...r)}:o},stringify:function(e){try{return JSON.stringify(e)}catch(t){return u(e)}},buildFormatters:function(e,t,r){return{level:e,bindings:t,log:r}}}},2306(e,t,r){"use strict";let i=r(857),o=r(1265),s=r(2205),a=r(6751),u=r(5262),c=r(37),{assertDefaultLevelFound:l,mappings:f,genLsCache:h}=r(2129),{createArgsNormalizer:d,asChindings:p,final:y,stringify:g,buildSafeSonicBoom:m,buildFormatters:b,noop:v}=r(711),{version:w}=r(6011),{mixinMergeStrategySym:_}=r(37),{chindingsSym:S,redactFmtSym:x,serializersSym:E,timeSym:O,timeSliceIndexSym:j,streamSym:k,stringifySym:T,stringifiersSym:R,setLevelSym:M,endSym:P,formatOptsSym:L,messageKeySym:A,nestedKeySym:N,mixinSym:D,useOnlyCustomLevelsSym:C,formattersSym:I,hooksSym:B}=c,{epochTime:$,nullTime:U}=a,{pid:q}=process,F=i.hostname(),W=o.err,z={level:"info",messageKey:"msg",nestedKey:null,enabled:!0,prettyPrint:!1,base:{pid:q,hostname:F},serializers:Object.assign(Object.create(null),{err:W}),formatters:Object.assign(Object.create(null),{bindings:e=>e,level:(e,t)=>({level:t})}),hooks:{logMethod:void 0},timestamp:$,name:void 0,redact:null,customLevels:null,levelKey:void 0,useOnlyCustomLevels:!1},G=d(z),H=Object.assign(Object.create(null),o);function K(...e){var t,r;let i={},{opts:o,stream:a}=G(i,...e),{redact:c,crlf:d,serializers:y,timestamp:m,messageKey:w,nestedKey:q,base:F,name:W,level:H,customLevels:Y,useLevelLabels:V,changeLevelName:Q,levelKey:X,mixin:Z,mixinMergeStrategy:ee,useOnlyCustomLevels:et,formatters:er,hooks:en}=o,ei=b(er.level,er.bindings,er.log);V&&!(Q||X)?(process.emitWarning("useLevelLabels is deprecated, use the formatters.level option instead","Warning","PINODEP001"),ei.level=J):(Q||X)&&!V?(process.emitWarning("changeLevelName and levelKey are deprecated, use the formatters.level option instead","Warning","PINODEP002"),t=Q||X,ei.level=function(e,r){return{[t]:r}}):(Q||X)&&V&&(process.emitWarning("useLevelLabels is deprecated, use the formatters.level option instead","Warning","PINODEP001"),process.emitWarning("changeLevelName and levelKey are deprecated, use the formatters.level option instead","Warning","PINODEP002"),r=Q||X,ei.level=function(e,t){return{[r]:e}}),y[Symbol.for("pino.*")]&&(process.emitWarning("The pino.* serializer is deprecated, use the formatters.log options instead","Warning","PINODEP003"),ei.log=y[Symbol.for("pino.*")]),ei.bindings||(ei.bindings=z.formatters.bindings),ei.level||(ei.level=z.formatters.level);let eo=c?s(c,g):{},es=c?{stringify:eo[x]}:{stringify:g},ea="}"+(d?`\r `:` -`),eu=p.bind(null,{[S]:"",[E]:y,[R]:eo,[T]:g,[I]:ei}),ec="";null!==F&&(ec=eu(void 0===W?F:Object.assign({},F,{name:W})));let el=m instanceof Function?m:m?$:U,ef=el().indexOf(":")+1;if(et&&!Y)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(Z&&"function"!=typeof Z)throw Error(`Unknown mixin type "${typeof Z}" - expected "function"`);return l(H,Y,et),Object.assign(i,{levels:f(Y,et),[C]:et,[k]:a,[O]:el,[j]:ef,[T]:g,[R]:eo,[P]:ea,[L]:es,[A]:w,[N]:q,[E]:y,[D]:Z,[_]:ee,[S]:ec,[I]:ei,[B]:en,silent:v}),Object.setPrototypeOf(i,u()),h(i),i[M](H),i}function J(e,t){return{level:e}}e.exports=K,e.exports.extreme=(e=process.stdout.fd)=>(process.emitWarning("The pino.extreme() option is deprecated and will be removed in v7. Use pino.destination({ sync: false }) instead.",{code:"extreme_deprecation"}),m({dest:e,minLength:4096,sync:!1})),e.exports.destination=(e=process.stdout.fd)=>"object"==typeof e?(e.dest=e.dest||process.stdout.fd,m(e)):m({dest:e,minLength:0,sync:!0}),e.exports.final=y,e.exports.levels=f(),e.exports.stdSerializers=H,e.exports.stdTimeFunctions=Object.assign({},a),e.exports.symbols=c,e.exports.version=w,e.exports.default=K,e.exports.pino=K},1265(e,t,r){"use strict";let i=r(9950),o=r(6565),s=r(1075);e.exports={err:i,mapHttpRequest:o.mapHttpRequest,mapHttpResponse:s.mapHttpResponse,req:o.reqSerializer,res:s.resSerializer,wrapErrorSerializer:function(e){return e===i?e:function(t){return e(i(t))}},wrapRequestSerializer:function(e){return e===o.reqSerializer?e:function(t){return e(o.reqSerializer(t))}},wrapResponseSerializer:function(e){return e===s.resSerializer?e:function(t){return e(s.resSerializer(t))}}}},9950(e){"use strict";e.exports=function e(i){if(!(i instanceof Error))return i;i[r]=void 0;let s=Object.create(o);for(let o in s.type="[object Function]"===t.call(i.constructor)?i.constructor.name:i.name,s.message=i.message,s.stack=i.stack,i)if(void 0===s[o]){let t=i[o];t instanceof Error?t.hasOwnProperty(r)||(s[o]=e(t)):s[o]=t}return delete i[r],s.raw=i,s};let{toString:t}=Object.prototype,r=Symbol("circular-ref-tag"),i=Symbol("pino-raw-err-ref"),o=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[i]},set:function(e){this[i]=e}}});Object.defineProperty(o,i,{writable:!0,value:{}})},6565(e){"use strict";e.exports={mapHttpRequest:function(e){return{req:i(e)}},reqSerializer:i};let t=Symbol("pino-raw-req-ref"),r=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[t]},set:function(e){this[t]=e}}});function i(e){let t=e.info||e.socket,i=Object.create(r);return i.id="function"==typeof e.id?e.id():e.id||(e.info?e.info.id:void 0),i.method=e.method,e.originalUrl?(i.url=e.originalUrl,i.query=e.query,i.params=e.params):i.url=e.path||(e.url?e.url.path||e.url:void 0),i.headers=e.headers,i.remoteAddress=t&&t.remoteAddress,i.remotePort=t&&t.remotePort,i.raw=e.raw||e,i}Object.defineProperty(r,t,{writable:!0,value:{}})},1075(e){"use strict";e.exports={mapHttpResponse:function(e){return{res:i(e)}},resSerializer:i};let t=Symbol("pino-raw-res-ref"),r=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[t]},set:function(e){this[t]=e}}});function i(e){let t=Object.create(r);return t.statusCode=e.statusCode,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}Object.defineProperty(r,t,{writable:!0,value:{}})},9271(e,t,r){"use strict";let{format:i}=r(9023);e.exports=function(){let e={},t=new Map;return{create:function(r,o,s){if(!r)throw Error("Warning name must not be empty");if(!o)throw Error("Warning code must not be empty");if(!s)throw Error("Warning message must not be empty");if(void 0!==e[o=o.toUpperCase()])throw Error(`The code '${o}' already exist`);return t.set(o,!1),e[o]=function(e,t,a){let u;return u=e&&t&&a?i(s,e,t,a):e&&t?i(s,e,t):e?i(s,e):s,{code:o,name:r,message:u}},e[o]},emit:function(r,i,o,s){if(void 0===e[r])throw Error(`The code '${r}' does not exist`);if(!0===t.get(r))return;t.set(r,!0);let a=e[r](i,o,s);process.emitWarning(a.message,a.name,a.code)},emitted:t}}},6586(e,t,r){var i=r(5645),o=r(5486),s=r(9896),a=function(){},u=/^v?\.0/.test(process.version),c=function(e){return"function"==typeof e},l=function(e,t,r,l){l=i(l);var f=!1;e.on("close",function(){f=!0}),o(e,{readable:t,writable:r},function(e){if(e)return l(e);f=!0,l()});var h=!1;return function(t){if(!f&&!h){if(h=!0,u&&s&&(e instanceof(s.ReadStream||a)||e instanceof(s.WriteStream||a))&&c(e.close))return e.close(a);if(e.setHeader&&c(e.abort))return e.abort();if(c(e.destroy))return e.destroy();l(t||Error("stream was destroyed"))}}},f=function(e){e()},h=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=c(t[t.length-1]||a)&&t.pop()||a;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw Error("pump requires two streams per minimum");var i=t.map(function(o,s){var a=s0,function(t){e||(e=t),t&&i.forEach(f),a||(i.forEach(f),r(e))})});return t.reduce(h)}},1013(e){"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,r,i){var o=i&&i.stringify||t;if("object"==typeof e&&null!==e){var s=r.length+1;if(1===s)return e;var a=Array(s);a[0]=o(e);for(var u=1;u-1?h:0,e.charCodeAt(p+1)){case 100:case 102:if(f>=c||null==r[f])break;h=c||null==r[f])break;h=c||void 0===r[f])break;h",h=p+2,p++;break}l+=o(r[f]),h=p+2,p++;break;case 115:if(f>=c)break;hString(e)),r>2)?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){var o,s,a,u;let c,l;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(c="must not be",t=t.replace(/^not /,"")):c="must be",s=" argument",(void 0===a||a>e.length)&&(a=e.length),e.substring(a-s.length,a)===s)l=`The ${e} ${c} ${i(t,"type")}`;else{let r=("number"!=typeof u&&(u=0),u+1>e.length||-1===e.indexOf(".",u))?"argument":"property";l=`The "${e}" ${r} ${c} ${i(t,"type")}`}return l+`. Received type ${typeof r}`},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},5535(e,t,r){"use strict";var i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=r(605),s=r(3581);r(3081)(l,o);for(var a=i(s.prototype),u=0;u0)if("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===f.prototype||(a=t,t=f.from(a)),i)c.endEmitted?S(e,new _):k(e,c,t,!0);else if(c.ended)S(e,new v);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(t=c.decoder.write(t),c.objectMode||0!==t.length?k(e,c,t,!1):P(e,c)):k(e,c,t,!1)}else i||(c.reading=!1,P(e,c));return!c.ended&&(c.lengtht.highWaterMark&&((r=e)>=0x40000000?r=0x40000000:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),t.highWaterMark=r),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function R(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(M,e))}function M(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,C(e)}function P(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(L,e,t))}function L(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){o("readable nexttick read 0"),e.read(0)}function D(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),C(e),t.flowing&&!t.reading&&e.read(0)}function C(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function I(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function B(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick($,t,e))}function $(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,i=e.length;r=r.highWaterMark:r.length>0)||r.ended))return o("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?B(this):R(this),null;if(0===(e=T(e,r))&&r.ended)return 0===r.length&&B(this),null;var s=r.needReadable;return o("need readable",s),(0===r.length||r.length-e0?I(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),i!==e&&r.ended&&B(this)),null!==t&&this.emit("data",t),t},O.prototype._read=function(e){S(this,new w("_read()"))},O.prototype.pipe=function(e,t){var r,i=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,o("pipe count=%d opts=%j",s.pipesCount,t);var a=t&&!1===t.end||e===process.stdout||e===process.stderr?g:u;function u(){o("onend"),e.end()}s.endEmitted?process.nextTick(a):i.once("end",a),e.on("unpipe",function t(r,a){o("onunpipe"),r===i&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",p),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",d),e.removeListener("unpipe",t),i.removeListener("end",u),i.removeListener("end",g),i.removeListener("data",h),f=!0,s.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l())});var l=(r=i,function(){var e=r._readableState;o("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&c(r,"data")&&(e.flowing=!0,C(r))});e.on("drain",l);var f=!1;function h(t){o("ondata");var r=e.write(t);o("dest.write",r),!1===r&&((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==U(s.pipes,e))&&!f&&(o("false write response, pause",s.awaitDrain),s.awaitDrain++),i.pause())}function d(t){o("onerror",t),g(),e.removeListener("error",d),0===c(e,"error")&&S(e,t)}function p(){e.removeListener("finish",y),g()}function y(){o("onfinish"),e.removeListener("close",p),g()}function g(){o("unpipe"),i.unpipe(e)}return i.on("data",h),!function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",p),e.once("finish",y),e.emit("pipe",i),s.flowing||(o("pipe resume"),i.resume()),e},O.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s0,!1!==i.flowing&&this.resume()):"readable"!==e||i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,o("on readable",i.length,i.reading),i.length?R(this):i.reading||process.nextTick(N,this)),r},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function(e,t){var r=l.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(A,this),r},O.prototype.removeAllListeners=function(e){var t=l.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&process.nextTick(A,this),t},O.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(o("resume"),r.flowing=!r.readableListening,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,process.nextTick(D,e,t))),r.paused=!1,this},O.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},O.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var s in e.on("end",function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(s){o("wrapped data"),r.decoder&&(s=r.decoder.write(s)),r.objectMode&&null==s||(r.objectMode||s&&s.length)&&(t.push(s)||(i=!0,e.pause()))}),e)void 0===this[s]&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var a=0;a-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),O.prototype._write=function(e,t,r){r(new y("_write()"))},O.prototype._writev=null,O.prototype.end=function(e,t,r){var i,o,s,a=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),a.corked&&(a.corked=1,this.uncork()),a.ending||(i=this,o=a,s=r,o.ending=!0,P(i,o),s&&(o.finished?process.nextTick(s):i.once("finish",s)),o.ended=!0,i.writable=!1),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),O.prototype.destroy=f.destroy,O.prototype._undestroy=f.undestroy,O.prototype._destroy=function(e,t){t(e)}},916(e,t,r){"use strict";function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o,s=r(9919),a=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),f=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function y(e){var t=e[a];if(null!==t){var r=e[d].read();null!==r&&(e[f]=null,e[a]=null,e[u]=null,t(p(r,!1)))}}function g(e){process.nextTick(y,e)}var m=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((i(o={get stream(){return this[d]},next:function(){var e,t,r=this,i=this[c];if(null!==i)return Promise.reject(i);if(this[l])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise(function(e,t){process.nextTick(function(){r[c]?t(r[c]):e(p(void 0,!0))})});var o=this[f];if(o)t=new Promise((e=this,function(t,r){o.then(function(){e[l]?t(p(void 0,!0)):e[h](t,r)},r)}));else{var s=this[d].read();if(null!==s)return Promise.resolve(p(s,!1));t=new Promise(this[h])}return this[f]=t,t}},Symbol.asyncIterator,function(){return this}),i(o,"return",function(){var e=this;return new Promise(function(t,r){e[d].destroy(null,function(e){e?r(e):t(p(void 0,!0))})})}),o),m);e.exports=function(e){var t,r=Object.create(b,(i(t={},d,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,l,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var i=r[d].read();i?(r[f]=null,r[a]=null,r[u]=null,e(p(i,!1))):(r[a]=e,r[u]=t)},writable:!0}),t));return r[f]=null,s(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];null!==t&&(r[f]=null,r[a]=null,r[u]=null,t(e)),r[c]=e;return}var i=r[a];null!==i&&(r[f]=null,r[a]=null,r[u]=null,i(p(void 0,!0))),r[l]=!0}),e.on("readable",g.bind(null,r)),r}},408(e,t,r){"use strict";function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}var o=r(181).Buffer,s=r(9023).inspect,a=s&&s.custom||"inspect";e.exports=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.head=null,this.tail=null,this.length=0}return e=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,r,i=o.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=a,o.prototype.copy.call(t,i,r),a+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var r;return eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0==(e-=s)){s===o.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(s));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var s=r.data,a=e>s.length?s.length:e;if(s.copy(t,t.length-e,0,a),0==(e-=a)){a===s.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=s.slice(a));break}++i}return this.length-=i,t}},{key:a,value:function(e,t){return s(this,function(e){for(var t=1;t0,l=u=function(e){t||(t=e),e&&p.forEach(c),m||(p.forEach(c),d(t))},h=!1,u=function(){h||(h=!0,l.apply(void 0,arguments))},y=!1,e.on("close",function(){y=!0}),void 0===i&&(i=r(9919)),i(e,{readable:m,writable:s},function(e){if(e)return u(e);y=!0,u()}),g=!1,function(t){if(!y&&!g){if(g=!0,e.setHeader&&"function"==typeof e.abort)return e.abort();if("function"==typeof e.destroy)return e.destroy();u(t||new a("pipe"))}}});return f.reduce(l)}},6906(e,t,r){"use strict";var i=r(8396).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,o){var s=null!=t.highWaterMark?t.highWaterMark:o?t[r]:null;if(null!=s){if(!(isFinite(s)&&Math.floor(s)===s)||s<0)throw new i(o?r:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},5251(e,t,r){e.exports=r(2203)},9491(e,t,r){var i=r(2203);"disable"===process.env.READABLE_STREAM&&i?(e.exports=i.Readable,Object.assign(e.exports,i),e.exports.Stream=i):((t=e.exports=r(605)).Stream=i||t,t.Readable=t,t.Writable=r(3581),t.Duplex=r(5535),t.Transform=r(9585),t.PassThrough=r(419),t.finished=r(9919),t.pipeline=r(5629))},9460(e){"use strict";function t(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){if((e=e||{}).circles){var r=e,i=[],o=[];return r.proto?function e(r){if("object"!=typeof r||null===r)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return s(r,e);if(r instanceof Map)return new Map(s(Array.from(r),e));if(r instanceof Set)return new Set(s(Array.from(r),e));var a={};for(var u in i.push(r),o.push(a),r){var c=r[u];if("object"!=typeof c||null===c)a[u]=c;else if(c instanceof Date)a[u]=new Date(c);else if(c instanceof Map)a[u]=new Map(s(Array.from(c),e));else if(c instanceof Set)a[u]=new Set(s(Array.from(c),e));else if(ArrayBuffer.isView(c))a[u]=t(c);else{var l=i.indexOf(c);-1!==l?a[u]=o[l]:a[u]=e(c)}}return i.pop(),o.pop(),a}:function e(r){if("object"!=typeof r||null===r)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return s(r,e);if(r instanceof Map)return new Map(s(Array.from(r),e));if(r instanceof Set)return new Set(s(Array.from(r),e));var a={};for(var u in i.push(r),o.push(a),r)if(!1!==Object.hasOwnProperty.call(r,u)){var c=r[u];if("object"!=typeof c||null===c)a[u]=c;else if(c instanceof Date)a[u]=new Date(c);else if(c instanceof Map)a[u]=new Map(s(Array.from(c),e));else if(c instanceof Set)a[u]=new Set(s(Array.from(c),e));else if(ArrayBuffer.isView(c))a[u]=t(c);else{var l=i.indexOf(c);-1!==l?a[u]=o[l]:a[u]=e(c)}}return i.pop(),o.pop(),a};function s(e,r){for(var s=Object.keys(e),a=Array(s.length),u=0;utypeof Buffer,r=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,i=/"(?: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 o(e,o,a){null==a&&(null!==o&&"object"==typeof o?(a=o,o=void 0):a={});let u=a.protoAction||"error",c=a.constructorAction||"error";t&&Buffer.isBuffer(e)&&(e=e.toString()),e&&65279===e.charCodeAt(0)&&(e=e.slice(1));let l=JSON.parse(e,o);if("ignore"===u&&"ignore"===c||null===l||"object"!=typeof l)return l;if("ignore"!==u&&"ignore"!==c){if(!1===r.test(e)&&!1===i.test(e))return l}else if("ignore"!==u&&"ignore"===c){if(!1===r.test(e))return l}else if(!1===i.test(e))return l;return s(l,{protoAction:u,constructorAction:c}),l}function s(e,{protoAction:t="error",constructorAction:r="error"}={}){let i=[e];for(;i.length;){let e=i;for(let o of(i=[],e)){if("ignore"!==t&&Object.prototype.hasOwnProperty.call(o,"__proto__")){if("error"===t)throw SyntaxError("Object contains forbidden prototype property");delete o.__proto__}if("ignore"!==r&&Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype")){if("error"===r)throw SyntaxError("Object contains forbidden prototype property");delete o.constructor}for(let e in o){let t=o[e];t&&"object"==typeof t&&i.push(o[e])}}}}e.exports={parse:o,scan:s,safeParse:function(e,t){try{return o(e,t)}catch(e){return null}}}},361(e,t,r){"use strict";let i=r(9896),o=r(4434),s=r(1517),a=r(9023).inherits,u=r(7048);function c(e,t){function r(r,i){if(r){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",r)}):t.emit("error",r);return}if(t.fd=i,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),t._reopening)return;let o=t._buf.length;o>0&&o>t.minLength&&!t.destroyed&&h(t)}if(t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1,t.sync)try{let t=i.openSync(e,"a");r(null,t)}catch(e){throw r(e),e}else i.open(e,"a",r)}function l(e){if(!(this instanceof l))return new l(e);let{fd:t,dest:r,minLength:o,sync:s}=e||{};if(t=t||r,this._buf="",this.fd=-1,this._writing=!1,this._writingBuf="",this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this.file=null,this.destroyed=!1,this.sync=s||!1,this.minLength=o||0,"number"==typeof t)this.fd=t,process.nextTick(()=>this.emit("ready"));else if("string"==typeof t)c(t,this);else throw Error("SonicBoom supports only file descriptors and files");this.release=(e,t)=>{if(e){if("EAGAIN"===e.code)if(this.sync)try{u(100),this.release(void 0,0)}catch(e){this.release(e)}else setTimeout(()=>{i.write(this.fd,this._writingBuf,"utf8",this.release)},100);else this._buf=this._writingBuf+this._buf,this._writingBuf="",this._writing=!1,this.emit("error",e);return}if(this._writingBuf.length!==t){if(this._writingBuf=this._writingBuf.slice(t),!this.sync)return void i.write(this.fd,this._writingBuf,"utf8",this.release);try{do t=i.writeSync(this.fd,this._writingBuf,"utf8"),this._writingBuf=this._writingBuf.slice(t);while(0!==this._writingBuf.length)}catch(e){this.release(e);return}}if(this._writingBuf="",this.destroyed)return;let r=this._buf.length;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):r>0&&r>this.minLength?h(this):this._ending?r>0?h(this):(this._writing=!1,d(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(f,this)):this.emit("drain"))},this.on("newListener",function(e){"drain"===e&&(this._asyncDrainScheduled=!1)})}function f(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}function h(e){e._writing=!0;let t=e._buf,r=e.release;if(t.length>0x1000000?(t=t.slice(0,0x1000000),e._buf=e._buf.slice(0x1000000)):e._buf="",s(t),e._writingBuf=t,e.sync)try{let o=i.writeSync(e.fd,t,"utf8");r(null,o)}catch(e){r(e)}else i.write(e.fd,t,"utf8",r)}function d(e){-1===e.fd?e.once("ready",d.bind(null,e)):(i.close(e.fd,t=>{t?e.emit("error",t):(e._ending&&!e._writing&&e.emit("finish"),e.emit("close"))}),e.destroyed=!0,e._buf="")}a(l,o),l.prototype.write=function(e){if(this.destroyed)throw Error("SonicBoom destroyed");this._buf+=e;let t=this._buf.length;return!this._writing&&t>this.minLength&&h(this),t<16384},l.prototype.flush=function(){if(this.destroyed)throw Error("SonicBoom destroyed");this._writing||this.minLength<=0||h(this)},l.prototype.reopen=function(e){if(this.destroyed)throw Error("SonicBoom destroyed");if(this._opening)return void this.once("ready",()=>{this.reopen(e)});if(this._ending)return;if(!this.file)throw Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&i.close(t,e=>{if(e)return this.emit("error",e)})}),c(e||this.file,this)},l.prototype.end=function(){if(this.destroyed)throw Error("SonicBoom destroyed");this._opening?this.once("ready",()=>{this.end()}):this._ending||((this._ending=!0,!this._writing&&this._buf.length>0&&this.fd>=0)?h(this):this._writing||d(this))},l.prototype.flushSync=function(){if(this.destroyed)throw Error("SonicBoom destroyed");if(this.fd<0)throw Error("sonic boom is not ready yet");for(;this._buf.length>0;)try{i.writeSync(this.fd,this._buf,"utf8"),this._buf=""}catch(e){if("EAGAIN"!==e.code)throw e;u(100)}},l.prototype.destroy=function(){this.destroyed||d(this)},e.exports=l},202(e,t,r){"use strict";let{Transform:i}=r(2203),{StringDecoder:o}=r(3193),s=Symbol("last"),a=Symbol("decoder");function u(e,t,r){let i;if(this.overflow){if(1===(i=this[a].write(e).split(this.matcher)).length)return r();i.shift(),this.overflow=!1}else this[s]+=this[a].write(e),i=this[s].split(this.matcher);this[s]=i.pop();for(let e=0;ethis.maxLength,this.overflow&&!this.skipOverflow)?r(Error("maximum buffer reached")):r()}function c(e){if(this[s]+=this[a].end(),this[s])try{l(this,this.mapper(this[s]))}catch(t){return e(t)}e()}function l(e,t){void 0!==t&&e.push(t)}function f(e){return e}e.exports=function(e,t,r){switch(e=e||/\r?\n/,t=t||f,r=r||{},arguments.length){case 1:"function"==typeof e?(t=e,e=/\r?\n/):"object"!=typeof e||e instanceof RegExp||(r=e,e=/\r?\n/);break;case 2:"function"==typeof e?(r=t,t=e,e=/\r?\n/):"object"==typeof t&&(r=t,t=f)}(r=Object.assign({},r)).autoDestroy=!0,r.transform=u,r.flush=c,r.readableObjectMode=!0;let l=new i(r);return l[s]="",l[a]=new o("utf8"),l.matcher=e,l.mapper=t,l.maxLength=r.maxLength,l.skipOverflow=r.skipOverflow||!1,l.overflow=!1,l._destroy=function(e,t){this._writableState.errorEmitted=!1,t(e)},l}},3049(e){e.exports=function(e){var t,r=e._readableState;return r?r.objectMode||"number"==typeof e._duplexState?e.read():e.read((t=r).buffer.length?t.buffer.head?t.buffer.head.data.length:t.buffer[0].length:t.length):null}},7549(e,t,r){"use strict";var i=r(1144).Buffer,o=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===o||!o(e)))throw Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=f,this.end=h,t=3;break;default:this.write=d,this.end=p;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.I=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(o>0&&(e.lastNeed=o-1),o):--i=0?(o>0&&(e.lastNeed=o-2),o):--i=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},2664(e,t,r){e.exports=r(9023).deprecate},4037(e){e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw TypeError("need wrapper function");return Object.keys(t).forEach(function(e){i[e]=t[e]}),i;function i(){for(var e=Array(arguments.length),r=0;ro+(a<0?s:d(a,s,r,i)),p=(e,t,r)=>((e,t,r=e,i=e.length+1)=>o=>{let s;return o||""!==o&&void 0!==o?(s=(""+o).indexOf(t,i),s<0?e+o+t:e+d(s,o,t,r)+t):""})(`\x1b[${e}m`,`\x1b[${t}m`,r),y={reset:p(0,0),bold:p(1,22,"\x1b[22m\x1b[1m"),dim:p(2,22,"\x1b[22m\x1b[2m"),italic:p(3,23),underline:p(4,24),inverse:p(7,27),hidden:p(8,28),strikethrough:p(9,29),black:p(30,39),red:p(31,39),green:p(32,39),yellow:p(33,39),blue:p(34,39),magenta:p(35,39),cyan:p(36,39),white:p(37,39),gray:p(90,39),bgBlack:p(40,49),bgRed:p(41,49),bgGreen:p(42,49),bgYellow:p(43,49),bgBlue:p(44,49),bgMagenta:p(45,49),bgCyan:p(46,49),bgWhite:p(47,49),blackBright:p(90,39),redBright:p(91,39),greenBright:p(92,39),yellowBright:p(93,39),blueBright:p(94,39),magentaBright:p(95,39),cyanBright:p(96,39),whiteBright:p(97,39),bgBlackBright:p(100,49),bgRedBright:p(101,49),bgGreenBright:p(102,49),bgYellowBright:p(103,49),bgBlueBright:p(104,49),bgMagentaBright:p(105,49),bgCyanBright:p(106,49),bgWhiteBright:p(107,49)},g=e=>e,m=({useColor:e=h}={})=>e?y:Object.keys(y).reduce((e,t)=>({...e,[t]:g}),{}),{reset:b,bold:v,dim:w,italic:_,underline:S,inverse:x,hidden:E,strikethrough:O,black:j,red:k,green:T,yellow:R,blue:M,magenta:P,cyan:L,white:A,gray:N,bgBlack:D,bgRed:C,bgGreen:I,bgYellow:B,bgBlue:$,bgMagenta:U,bgCyan:q,bgWhite:F,blackBright:W,redBright:z,greenBright:G,yellowBright:H,blueBright:K,magentaBright:J,cyanBright:Y,whiteBright:V,bgBlackBright:Q,bgRedBright:X,bgGreenBright:Z,bgYellowBright:ee,bgBlueBright:et,bgMagentaBright:er,bgCyanBright:en,bgWhiteBright:ei}=m();t.bgBlack=D,t.bgBlackBright=Q,t.bgBlue=$,t.bgBlueBright=et,t.bgCyan=q,t.bgCyanBright=en,t.bgGreen=I,t.bgGreenBright=Z,t.bgMagenta=U,t.bgMagentaBright=er,t.bgRed=C,t.bgRedBright=X,t.bgWhite=F,t.bgWhiteBright=ei,t.bgYellow=B,t.bgYellowBright=ee,t.black=j,t.blackBright=W,t.blue=M,t.blueBright=K,t.bold=v,t.createColors=m,t.cyan=L,t.cyanBright=Y,t.dim=w,t.gray=N,t.green=T,t.greenBright=G,t.hidden=E,t.inverse=x,t.isColorSupported=h,t.italic=_,t.magenta=P,t.magentaBright=J,t.red=k,t.redBright=z,t.reset=b,t.strikethrough=O,t.underline=S,t.white=A,t.whiteBright=V,t.yellow=R,t.yellowBright=H},9640(e,t,r){"use strict";let{isColorSupported:i}=r(6666),o=r(6586),{Transform:s}=r(9491),a=r(3710),u=r(4045),c=r(5550),{ERROR_LIKE_KEYS:l,MESSAGE_KEY:f,TIMESTAMP_KEY:h,LEVEL_KEY:d,LEVEL_NAMES:p}=r(4249),{isObject:y,prettifyErrorLog:g,prettifyLevel:m,prettifyMessage:b,prettifyMetadata:v,prettifyObject:w,prettifyTime:_,buildSafeSonicBoom:S,filterLog:x}=r(2349),E={colorize:i,crlf:!1,errorLikeObjectKeys:l,errorProps:"",customLevels:null,customColors:null,useOnlyCustomProps:!0,levelFirst:!1,messageKey:f,messageFormat:!1,timestampKey:h,translateTime:!1,useMetadata:!1,outputStream:process.stdout,customPrettifiers:{},hideObject:!1,singleLine:!1};function O(e){let t=Object.assign({},E,e),r=t.crlf?`\r +`),eu=p.bind(null,{[S]:"",[E]:y,[R]:eo,[T]:g,[I]:ei}),ec="";null!==F&&(ec=eu(void 0===W?F:Object.assign({},F,{name:W})));let el=m instanceof Function?m:m?$:U,ef=el().indexOf(":")+1;if(et&&!Y)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(Z&&"function"!=typeof Z)throw Error(`Unknown mixin type "${typeof Z}" - expected "function"`);return l(H,Y,et),Object.assign(i,{levels:f(Y,et),[C]:et,[k]:a,[O]:el,[j]:ef,[T]:g,[R]:eo,[P]:ea,[L]:es,[A]:w,[N]:q,[E]:y,[D]:Z,[_]:ee,[S]:ec,[I]:ei,[B]:en,silent:v}),Object.setPrototypeOf(i,u()),h(i),i[M](H),i}function J(e,t){return{level:e}}e.exports=K,e.exports.extreme=(e=process.stdout.fd)=>(process.emitWarning("The pino.extreme() option is deprecated and will be removed in v7. Use pino.destination({ sync: false }) instead.",{code:"extreme_deprecation"}),m({dest:e,minLength:4096,sync:!1})),e.exports.destination=(e=process.stdout.fd)=>"object"==typeof e?(e.dest=e.dest||process.stdout.fd,m(e)):m({dest:e,minLength:0,sync:!0}),e.exports.final=y,e.exports.levels=f(),e.exports.stdSerializers=H,e.exports.stdTimeFunctions=Object.assign({},a),e.exports.symbols=c,e.exports.version=w,e.exports.default=K,e.exports.pino=K},1265(e,t,r){"use strict";let i=r(9950),o=r(6565),s=r(1075);e.exports={err:i,mapHttpRequest:o.mapHttpRequest,mapHttpResponse:s.mapHttpResponse,req:o.reqSerializer,res:s.resSerializer,wrapErrorSerializer:function(e){return e===i?e:function(t){return e(i(t))}},wrapRequestSerializer:function(e){return e===o.reqSerializer?e:function(t){return e(o.reqSerializer(t))}},wrapResponseSerializer:function(e){return e===s.resSerializer?e:function(t){return e(s.resSerializer(t))}}}},9950(e){"use strict";e.exports=function e(i){if(!(i instanceof Error))return i;i[r]=void 0;let s=Object.create(o);for(let o in s.type="[object Function]"===t.call(i.constructor)?i.constructor.name:i.name,s.message=i.message,s.stack=i.stack,i)if(void 0===s[o]){let t=i[o];t instanceof Error?t.hasOwnProperty(r)||(s[o]=e(t)):s[o]=t}return delete i[r],s.raw=i,s};let{toString:t}=Object.prototype,r=Symbol("circular-ref-tag"),i=Symbol("pino-raw-err-ref"),o=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[i]},set:function(e){this[i]=e}}});Object.defineProperty(o,i,{writable:!0,value:{}})},6565(e){"use strict";e.exports={mapHttpRequest:function(e){return{req:i(e)}},reqSerializer:i};let t=Symbol("pino-raw-req-ref"),r=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[t]},set:function(e){this[t]=e}}});function i(e){let t=e.info||e.socket,i=Object.create(r);return i.id="function"==typeof e.id?e.id():e.id||(e.info?e.info.id:void 0),i.method=e.method,e.originalUrl?(i.url=e.originalUrl,i.query=e.query,i.params=e.params):i.url=e.path||(e.url?e.url.path||e.url:void 0),i.headers=e.headers,i.remoteAddress=t&&t.remoteAddress,i.remotePort=t&&t.remotePort,i.raw=e.raw||e,i}Object.defineProperty(r,t,{writable:!0,value:{}})},1075(e){"use strict";e.exports={mapHttpResponse:function(e){return{res:i(e)}},resSerializer:i};let t=Symbol("pino-raw-res-ref"),r=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[t]},set:function(e){this[t]=e}}});function i(e){let t=Object.create(r);return t.statusCode=e.statusCode,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}Object.defineProperty(r,t,{writable:!0,value:{}})},9271(e,t,r){"use strict";let{format:i}=r(9023);e.exports=function(){let e={},t=new Map;return{create:function(r,o,s){if(!r)throw Error("Warning name must not be empty");if(!o)throw Error("Warning code must not be empty");if(!s)throw Error("Warning message must not be empty");if(void 0!==e[o=o.toUpperCase()])throw Error(`The code '${o}' already exist`);return t.set(o,!1),e[o]=function(e,t,a){let u;return u=e&&t&&a?i(s,e,t,a):e&&t?i(s,e,t):e?i(s,e):s,{code:o,name:r,message:u}},e[o]},emit:function(r,i,o,s){if(void 0===e[r])throw Error(`The code '${r}' does not exist`);if(!0===t.get(r))return;t.set(r,!0);let a=e[r](i,o,s);process.emitWarning(a.message,a.name,a.code)},emitted:t}}},6586(e,t,r){var i=r(5645),o=r(5486),s=r(9896),a=function(){},u=/^v?\.0/.test(process.version),c=function(e){return"function"==typeof e},l=function(e,t,r,l){l=i(l);var f=!1;e.on("close",function(){f=!0}),o(e,{readable:t,writable:r},function(e){if(e)return l(e);f=!0,l()});var h=!1;return function(t){if(!f&&!h){if(h=!0,u&&s&&(e instanceof(s.ReadStream||a)||e instanceof(s.WriteStream||a))&&c(e.close))return e.close(a);if(e.setHeader&&c(e.abort))return e.abort();if(c(e.destroy))return e.destroy();l(t||Error("stream was destroyed"))}}},f=function(e){e()},h=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=c(t[t.length-1]||a)&&t.pop()||a;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw Error("pump requires two streams per minimum");var i=t.map(function(o,s){var a=s0,function(t){e||(e=t),t&&i.forEach(f),a||(i.forEach(f),r(e))})});return t.reduce(h)}},1013(e){"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,r,i){var o=i&&i.stringify||t;if("object"==typeof e&&null!==e){var s=r.length+1;if(1===s)return e;var a=Array(s);a[0]=o(e);for(var u=1;u-1?h:0,e.charCodeAt(p+1)){case 100:case 102:if(f>=c||null==r[f])break;h=c||null==r[f])break;h=c||void 0===r[f])break;h",h=p+2,p++;break}l+=o(r[f]),h=p+2,p++;break;case 115:if(f>=c)break;hString(e)),r>2)?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){var o,s,a,u;let c,l;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(c="must not be",t=t.replace(/^not /,"")):c="must be",s=" argument",(void 0===a||a>e.length)&&(a=e.length),e.substring(a-s.length,a)===s)l=`The ${e} ${c} ${i(t,"type")}`;else{let r=("number"!=typeof u&&(u=0),u+1>e.length||-1===e.indexOf(".",u))?"argument":"property";l=`The "${e}" ${r} ${c} ${i(t,"type")}`}return l+`. Received type ${typeof r}`},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},5535(e,t,r){"use strict";var i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=r(605),s=r(3581);r(3081)(l,o);for(var a=i(s.prototype),u=0;u0)if("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===f.prototype||(a=t,t=f.from(a)),i)c.endEmitted?S(e,new _):k(e,c,t,!0);else if(c.ended)S(e,new v);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(t=c.decoder.write(t),c.objectMode||0!==t.length?k(e,c,t,!1):P(e,c)):k(e,c,t,!1)}else i||(c.reading=!1,P(e,c));return!c.ended&&(c.lengtht.highWaterMark&&((r=e)>=0x40000000?r=0x40000000:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),t.highWaterMark=r),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function R(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(M,e))}function M(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,C(e)}function P(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(L,e,t))}function L(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){o("readable nexttick read 0"),e.read(0)}function D(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),C(e),t.flowing&&!t.reading&&e.read(0)}function C(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function I(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function B(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick($,t,e))}function $(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,i=e.length;r=r.highWaterMark:r.length>0)||r.ended))return o("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?B(this):R(this),null;if(0===(e=T(e,r))&&r.ended)return 0===r.length&&B(this),null;var s=r.needReadable;return o("need readable",s),(0===r.length||r.length-e0?I(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),i!==e&&r.ended&&B(this)),null!==t&&this.emit("data",t),t},O.prototype._read=function(e){S(this,new w("_read()"))},O.prototype.pipe=function(e,t){var r,i=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,o("pipe count=%d opts=%j",s.pipesCount,t);var a=t&&!1===t.end||e===process.stdout||e===process.stderr?g:u;function u(){o("onend"),e.end()}s.endEmitted?process.nextTick(a):i.once("end",a),e.on("unpipe",function t(r,a){o("onunpipe"),r===i&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",p),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",d),e.removeListener("unpipe",t),i.removeListener("end",u),i.removeListener("end",g),i.removeListener("data",h),f=!0,s.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l())});var l=(r=i,function(){var e=r._readableState;o("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&c(r,"data")&&(e.flowing=!0,C(r))});e.on("drain",l);var f=!1;function h(t){o("ondata");var r=e.write(t);o("dest.write",r),!1===r&&((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==U(s.pipes,e))&&!f&&(o("false write response, pause",s.awaitDrain),s.awaitDrain++),i.pause())}function d(t){o("onerror",t),g(),e.removeListener("error",d),0===c(e,"error")&&S(e,t)}function p(){e.removeListener("finish",y),g()}function y(){o("onfinish"),e.removeListener("close",p),g()}function g(){o("unpipe"),i.unpipe(e)}return i.on("data",h),!function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",p),e.once("finish",y),e.emit("pipe",i),s.flowing||(o("pipe resume"),i.resume()),e},O.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s0,!1!==i.flowing&&this.resume()):"readable"!==e||i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,o("on readable",i.length,i.reading),i.length?R(this):i.reading||process.nextTick(N,this)),r},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function(e,t){var r=l.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(A,this),r},O.prototype.removeAllListeners=function(e){var t=l.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&process.nextTick(A,this),t},O.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(o("resume"),r.flowing=!r.readableListening,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,process.nextTick(D,e,t))),r.paused=!1,this},O.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},O.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var s in e.on("end",function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(s){o("wrapped data"),r.decoder&&(s=r.decoder.write(s)),r.objectMode&&null==s||(r.objectMode||s&&s.length)&&(t.push(s)||(i=!0,e.pause()))}),e)void 0===this[s]&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var a=0;a-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),O.prototype._write=function(e,t,r){r(new y("_write()"))},O.prototype._writev=null,O.prototype.end=function(e,t,r){var i,o,s,a=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),a.corked&&(a.corked=1,this.uncork()),a.ending||(i=this,o=a,s=r,o.ending=!0,P(i,o),s&&(o.finished?process.nextTick(s):i.once("finish",s)),o.ended=!0,i.writable=!1),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),O.prototype.destroy=f.destroy,O.prototype._undestroy=f.undestroy,O.prototype._destroy=function(e,t){t(e)}},916(e,t,r){"use strict";function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o,s=r(9919),a=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),f=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function y(e){var t=e[a];if(null!==t){var r=e[d].read();null!==r&&(e[f]=null,e[a]=null,e[u]=null,t(p(r,!1)))}}function g(e){process.nextTick(y,e)}var m=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((i(o={get stream(){return this[d]},next:function(){var e,t,r=this,i=this[c];if(null!==i)return Promise.reject(i);if(this[l])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise(function(e,t){process.nextTick(function(){r[c]?t(r[c]):e(p(void 0,!0))})});var o=this[f];if(o)t=new Promise((e=this,function(t,r){o.then(function(){e[l]?t(p(void 0,!0)):e[h](t,r)},r)}));else{var s=this[d].read();if(null!==s)return Promise.resolve(p(s,!1));t=new Promise(this[h])}return this[f]=t,t}},Symbol.asyncIterator,function(){return this}),i(o,"return",function(){var e=this;return new Promise(function(t,r){e[d].destroy(null,function(e){e?r(e):t(p(void 0,!0))})})}),o),m);e.exports=function(e){var t,r=Object.create(b,(i(t={},d,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,l,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var i=r[d].read();i?(r[f]=null,r[a]=null,r[u]=null,e(p(i,!1))):(r[a]=e,r[u]=t)},writable:!0}),t));return r[f]=null,s(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];null!==t&&(r[f]=null,r[a]=null,r[u]=null,t(e)),r[c]=e;return}var i=r[a];null!==i&&(r[f]=null,r[a]=null,r[u]=null,i(p(void 0,!0))),r[l]=!0}),e.on("readable",g.bind(null,r)),r}},408(e,t,r){"use strict";function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}var o=r(181).Buffer,s=r(9023).inspect,a=s&&s.custom||"inspect";e.exports=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.head=null,this.tail=null,this.length=0}return e=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,r,i=o.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=a,o.prototype.copy.call(t,i,r),a+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var r;return eo.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0==(e-=s)){s===o.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(s));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var s=r.data,a=e>s.length?s.length:e;if(s.copy(t,t.length-e,0,a),0==(e-=a)){a===s.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=s.slice(a));break}++i}return this.length-=i,t}},{key:a,value:function(e,t){return s(this,function(e){for(var t=1;t0,l=u=function(e){t||(t=e),e&&p.forEach(c),m||(p.forEach(c),d(t))},h=!1,u=function(){h||(h=!0,l.apply(void 0,arguments))},y=!1,e.on("close",function(){y=!0}),void 0===i&&(i=r(9919)),i(e,{readable:m,writable:s},function(e){if(e)return u(e);y=!0,u()}),g=!1,function(t){if(!y&&!g){if(g=!0,e.setHeader&&"function"==typeof e.abort)return e.abort();if("function"==typeof e.destroy)return e.destroy();u(t||new a("pipe"))}}});return f.reduce(l)}},6906(e,t,r){"use strict";var i=r(8396).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,o){var s=null!=t.highWaterMark?t.highWaterMark:o?t[r]:null;if(null!=s){if(!(isFinite(s)&&Math.floor(s)===s)||s<0)throw new i(o?r:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},5251(e,t,r){e.exports=r(2203)},9491(e,t,r){var i=r(2203);"disable"===process.env.READABLE_STREAM&&i?(e.exports=i.Readable,Object.assign(e.exports,i),e.exports.Stream=i):((t=e.exports=r(605)).Stream=i||t,t.Readable=t,t.Writable=r(3581),t.Duplex=r(5535),t.Transform=r(9585),t.PassThrough=r(419),t.finished=r(9919),t.pipeline=r(5629))},9460(e){"use strict";function t(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){if((e=e||{}).circles){var r=e,i=[],o=[];return r.proto?function e(r){if("object"!=typeof r||null===r)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return s(r,e);if(r instanceof Map)return new Map(s(Array.from(r),e));if(r instanceof Set)return new Set(s(Array.from(r),e));var a={};for(var u in i.push(r),o.push(a),r){var c=r[u];if("object"!=typeof c||null===c)a[u]=c;else if(c instanceof Date)a[u]=new Date(c);else if(c instanceof Map)a[u]=new Map(s(Array.from(c),e));else if(c instanceof Set)a[u]=new Set(s(Array.from(c),e));else if(ArrayBuffer.isView(c))a[u]=t(c);else{var l=i.indexOf(c);-1!==l?a[u]=o[l]:a[u]=e(c)}}return i.pop(),o.pop(),a}:function e(r){if("object"!=typeof r||null===r)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return s(r,e);if(r instanceof Map)return new Map(s(Array.from(r),e));if(r instanceof Set)return new Set(s(Array.from(r),e));var a={};for(var u in i.push(r),o.push(a),r)if(!1!==Object.hasOwnProperty.call(r,u)){var c=r[u];if("object"!=typeof c||null===c)a[u]=c;else if(c instanceof Date)a[u]=new Date(c);else if(c instanceof Map)a[u]=new Map(s(Array.from(c),e));else if(c instanceof Set)a[u]=new Set(s(Array.from(c),e));else if(ArrayBuffer.isView(c))a[u]=t(c);else{var l=i.indexOf(c);-1!==l?a[u]=o[l]:a[u]=e(c)}}return i.pop(),o.pop(),a};function s(e,r){for(var s=Object.keys(e),a=Array(s.length),u=0;utypeof Buffer,r=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,i=/"(?: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 o(e,o,a){null==a&&(null!==o&&"object"==typeof o?(a=o,o=void 0):a={});let u=a.protoAction||"error",c=a.constructorAction||"error";t&&Buffer.isBuffer(e)&&(e=e.toString()),e&&65279===e.charCodeAt(0)&&(e=e.slice(1));let l=JSON.parse(e,o);if("ignore"===u&&"ignore"===c||null===l||"object"!=typeof l)return l;if("ignore"!==u&&"ignore"!==c){if(!1===r.test(e)&&!1===i.test(e))return l}else if("ignore"!==u&&"ignore"===c){if(!1===r.test(e))return l}else if(!1===i.test(e))return l;return s(l,{protoAction:u,constructorAction:c}),l}function s(e,{protoAction:t="error",constructorAction:r="error"}={}){let i=[e];for(;i.length;){let e=i;for(let o of(i=[],e)){if("ignore"!==t&&Object.prototype.hasOwnProperty.call(o,"__proto__")){if("error"===t)throw SyntaxError("Object contains forbidden prototype property");delete o.__proto__}if("ignore"!==r&&Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype")){if("error"===r)throw SyntaxError("Object contains forbidden prototype property");delete o.constructor}for(let e in o){let t=o[e];t&&"object"==typeof t&&i.push(o[e])}}}}e.exports={parse:o,scan:s,safeParse:function(e,t){try{return o(e,t)}catch(e){return null}}}},361(e,t,r){"use strict";let i=r(9896),o=r(4434),s=r(1517),a=r(9023).inherits,u=r(7048);function c(e,t){function r(r,i){if(r){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",r)}):t.emit("error",r);return}if(t.fd=i,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),t._reopening)return;let o=t._buf.length;o>0&&o>t.minLength&&!t.destroyed&&h(t)}if(t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1,t.sync)try{let t=i.openSync(e,"a");r(null,t)}catch(e){throw r(e),e}else i.open(e,"a",r)}function l(e){if(!(this instanceof l))return new l(e);let{fd:t,dest:r,minLength:o,sync:s}=e||{};if(t=t||r,this._buf="",this.fd=-1,this._writing=!1,this._writingBuf="",this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this.file=null,this.destroyed=!1,this.sync=s||!1,this.minLength=o||0,"number"==typeof t)this.fd=t,process.nextTick(()=>this.emit("ready"));else if("string"==typeof t)c(t,this);else throw Error("SonicBoom supports only file descriptors and files");this.release=(e,t)=>{if(e){if("EAGAIN"===e.code)if(this.sync)try{u(100),this.release(void 0,0)}catch(e){this.release(e)}else setTimeout(()=>{i.write(this.fd,this._writingBuf,"utf8",this.release)},100);else this._buf=this._writingBuf+this._buf,this._writingBuf="",this._writing=!1,this.emit("error",e);return}if(this._writingBuf.length!==t){if(this._writingBuf=this._writingBuf.slice(t),!this.sync)return void i.write(this.fd,this._writingBuf,"utf8",this.release);try{do t=i.writeSync(this.fd,this._writingBuf,"utf8"),this._writingBuf=this._writingBuf.slice(t);while(0!==this._writingBuf.length)}catch(e){this.release(e);return}}if(this._writingBuf="",this.destroyed)return;let r=this._buf.length;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):r>0&&r>this.minLength?h(this):this._ending?r>0?h(this):(this._writing=!1,d(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(f,this)):this.emit("drain"))},this.on("newListener",function(e){"drain"===e&&(this._asyncDrainScheduled=!1)})}function f(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}function h(e){e._writing=!0;let t=e._buf,r=e.release;if(t.length>0x1000000?(t=t.slice(0,0x1000000),e._buf=e._buf.slice(0x1000000)):e._buf="",s(t),e._writingBuf=t,e.sync)try{let o=i.writeSync(e.fd,t,"utf8");r(null,o)}catch(e){r(e)}else i.write(e.fd,t,"utf8",r)}function d(e){-1===e.fd?e.once("ready",d.bind(null,e)):(i.close(e.fd,t=>{t?e.emit("error",t):(e._ending&&!e._writing&&e.emit("finish"),e.emit("close"))}),e.destroyed=!0,e._buf="")}a(l,o),l.prototype.write=function(e){if(this.destroyed)throw Error("SonicBoom destroyed");this._buf+=e;let t=this._buf.length;return!this._writing&&t>this.minLength&&h(this),t<16384},l.prototype.flush=function(){if(this.destroyed)throw Error("SonicBoom destroyed");this._writing||this.minLength<=0||h(this)},l.prototype.reopen=function(e){if(this.destroyed)throw Error("SonicBoom destroyed");if(this._opening)return void this.once("ready",()=>{this.reopen(e)});if(this._ending)return;if(!this.file)throw Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&i.close(t,e=>{if(e)return this.emit("error",e)})}),c(e||this.file,this)},l.prototype.end=function(){if(this.destroyed)throw Error("SonicBoom destroyed");this._opening?this.once("ready",()=>{this.end()}):this._ending||((this._ending=!0,!this._writing&&this._buf.length>0&&this.fd>=0)?h(this):this._writing||d(this))},l.prototype.flushSync=function(){if(this.destroyed)throw Error("SonicBoom destroyed");if(this.fd<0)throw Error("sonic boom is not ready yet");for(;this._buf.length>0;)try{i.writeSync(this.fd,this._buf,"utf8"),this._buf=""}catch(e){if("EAGAIN"!==e.code)throw e;u(100)}},l.prototype.destroy=function(){this.destroyed||d(this)},e.exports=l},202(e,t,r){"use strict";let{Transform:i}=r(2203),{StringDecoder:o}=r(3193),s=Symbol("last"),a=Symbol("decoder");function u(e,t,r){let i;if(this.overflow){if(1===(i=this[a].write(e).split(this.matcher)).length)return r();i.shift(),this.overflow=!1}else this[s]+=this[a].write(e),i=this[s].split(this.matcher);this[s]=i.pop();for(let e=0;ethis.maxLength,this.overflow&&!this.skipOverflow)?r(Error("maximum buffer reached")):r()}function c(e){if(this[s]+=this[a].end(),this[s])try{l(this,this.mapper(this[s]))}catch(t){return e(t)}e()}function l(e,t){void 0!==t&&e.push(t)}function f(e){return e}e.exports=function(e,t,r){switch(e=e||/\r?\n/,t=t||f,r=r||{},arguments.length){case 1:"function"==typeof e?(t=e,e=/\r?\n/):"object"!=typeof e||e instanceof RegExp||(r=e,e=/\r?\n/);break;case 2:"function"==typeof e?(r=t,t=e,e=/\r?\n/):"object"==typeof t&&(r=t,t=f)}(r=Object.assign({},r)).autoDestroy=!0,r.transform=u,r.flush=c,r.readableObjectMode=!0;let l=new i(r);return l[s]="",l[a]=new o("utf8"),l.matcher=e,l.mapper=t,l.maxLength=r.maxLength,l.skipOverflow=r.skipOverflow||!1,l.overflow=!1,l._destroy=function(e,t){this._writableState.errorEmitted=!1,t(e)},l}},3049(e){e.exports=function(e){var t,r=e._readableState;return r?r.objectMode||"number"==typeof e._duplexState?e.read():e.read((t=r).buffer.length?t.buffer.head?t.buffer.head.data.length:t.buffer[0].length:t.length):null}},7549(e,t,r){"use strict";var i=r(1144).Buffer,o=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===o||!o(e)))throw Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=f,this.end=h,t=3;break;default:this.write=d,this.end=p;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.I=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(o>0&&(e.lastNeed=o-1),o):--i=0?(o>0&&(e.lastNeed=o-2),o):--i=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},2664(e,t,r){e.exports=r(9023).deprecate},4037(e){e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw TypeError("need wrapper function");return Object.keys(t).forEach(function(e){i[e]=t[e]}),i;function i(){for(var e=Array(arguments.length),r=0;ro+(a<0?s:d(a,s,r,i)),p=(e,t,r)=>((e,t,r=e,i=e.length+1)=>o=>{let s;return o||""!==o&&void 0!==o?(s=(""+o).indexOf(t,i),s<0?e+o+t:e+d(s,o,t,r)+t):""})(`\x1b[${e}m`,`\x1b[${t}m`,r),y={reset:p(0,0),bold:p(1,22,"\x1b[22m\x1b[1m"),dim:p(2,22,"\x1b[22m\x1b[2m"),italic:p(3,23),underline:p(4,24),inverse:p(7,27),hidden:p(8,28),strikethrough:p(9,29),black:p(30,39),red:p(31,39),green:p(32,39),yellow:p(33,39),blue:p(34,39),magenta:p(35,39),cyan:p(36,39),white:p(37,39),gray:p(90,39),bgBlack:p(40,49),bgRed:p(41,49),bgGreen:p(42,49),bgYellow:p(43,49),bgBlue:p(44,49),bgMagenta:p(45,49),bgCyan:p(46,49),bgWhite:p(47,49),blackBright:p(90,39),redBright:p(91,39),greenBright:p(92,39),yellowBright:p(93,39),blueBright:p(94,39),magentaBright:p(95,39),cyanBright:p(96,39),whiteBright:p(97,39),bgBlackBright:p(100,49),bgRedBright:p(101,49),bgGreenBright:p(102,49),bgYellowBright:p(103,49),bgBlueBright:p(104,49),bgMagentaBright:p(105,49),bgCyanBright:p(106,49),bgWhiteBright:p(107,49)},g=e=>e,m=({useColor:e=h}={})=>e?y:Object.keys(y).reduce((e,t)=>({...e,[t]:g}),{}),{reset:b,bold:v,dim:w,italic:_,underline:S,inverse:x,hidden:E,strikethrough:O,black:j,red:k,green:T,yellow:R,blue:M,magenta:P,cyan:L,white:A,gray:N,bgBlack:D,bgRed:C,bgGreen:I,bgYellow:B,bgBlue:$,bgMagenta:U,bgCyan:q,bgWhite:F,blackBright:W,redBright:z,greenBright:G,yellowBright:H,blueBright:K,magentaBright:J,cyanBright:Y,whiteBright:V,bgBlackBright:Q,bgRedBright:X,bgGreenBright:Z,bgYellowBright:ee,bgBlueBright:et,bgMagentaBright:er,bgCyanBright:en,bgWhiteBright:ei}=m();t.createColors=m,t.isColorSupported=h},9640(e,t,r){"use strict";let{isColorSupported:i}=r(6666),o=r(6586),{Transform:s}=r(9491),a=r(3710),u=r(4045),c=r(5550),{ERROR_LIKE_KEYS:l,MESSAGE_KEY:f,TIMESTAMP_KEY:h,LEVEL_KEY:d,LEVEL_NAMES:p}=r(4249),{isObject:y,prettifyErrorLog:g,prettifyLevel:m,prettifyMessage:b,prettifyMetadata:v,prettifyObject:w,prettifyTime:_,buildSafeSonicBoom:S,filterLog:x}=r(2349),E={colorize:i,crlf:!1,errorLikeObjectKeys:l,errorProps:"",customLevels:null,customColors:null,useOnlyCustomProps:!0,levelFirst:!1,messageKey:f,messageFormat:!1,timestampKey:h,translateTime:!1,useMetadata:!1,outputStream:process.stdout,customPrettifiers:{},hideObject:!1,singleLine:!1};function O(e){let t=Object.assign({},E,e),r=t.crlf?`\r `:` `,i=" ",o=t.messageKey,s=t.levelKey,a=t.levelLabel,l=t.minimumLevel,f=t.messageFormat,h=t.timestampKey,S=t.errorLikeObjectKeys,O=t.errorProps.split(","),j="boolean"==typeof t.useOnlyCustomProps?t.useOnlyCustomProps:"true"===t.useOnlyCustomProps,k=t.customLevels?t.customLevels.split(",").reduce((e,t,r)=>{let[i,o=r]=t.split(":");return e[o]=i.toUpperCase(),e},{default:"USERLVL"}):{},T=t.customLevels?t.customLevels.split(",").reduce((e,t,r)=>{let[i,o=r]=t.split(":");return e[i.toLowerCase()]=o,e},{}):{},R=t.customColors?t.customColors.split(",").reduce((e,r)=>{let[i,o]=r.split(":"),s=(j?t.customLevels:void 0!==T[i])?T[i]:p[i];return e.push([void 0!==s?s:i,o]),e},[]):void 0,M={customLevels:k,customLevelNames:T};j&&!t.customLevels&&(M.customLevels=void 0,M.customLevelNames=void 0);let P=t.customPrettifiers,L=t.ignore?new Set(t.ignore.split(",")):void 0,A=t.hideObject,N=t.singleLine,D=c(t.colorize,R,j);return function(e){let c;if(y(e))c=e;else{let t=(e=>{try{return{value:u.parse(e,{protoAction:"remove"})}}catch(e){return{err:e}}})(e);if(t.err||!y(t.value))return e+r;c=t.value}if(l){let e=((j?t.customLevels:void 0!==T[l])?T[l]:p[l])||Number(l);if(c[void 0===s?d:s]0?`${I} ${k}`:k),R&&(I=I.length>0?`${I} ${R}:`:R),!1===I.endsWith(":")&&""!==I&&(I+=":"),E&&(I=I.length>0?`${I} ${E}`:E),I.length>0&&!N&&(I+=r),"Error"===c.type&&c.stack){let e=g({log:c,errorLikeKeys:S,errorProperties:O,ident:i,eol:r});N&&(I+=r),I+=e}else if(!A){let e=[o,s,h].filter(e=>"string"==typeof c[e]||"number"==typeof c[e]),t=w({input:c,skipKeys:e,customPrettifiers:P,errorLikeKeys:S,eol:r,ident:i,singleLine:N,colorizer:D});N&&!/^\s$/.test(t)&&(I+=" "),I+=t}return I}}function j(e={}){let t=O(e);return a(function(r){let i,a=new s({objectMode:!0,autoDestroy:!0,transform(e,r,i){i(null,t(e))}});return i="object"==typeof e.destination&&"function"==typeof e.destination.write?e.destination:S({dest:e.destination||1,append:e.append,mkdir:e.mkdir,sync:e.sync}),r.on("unknown",function(e){i.write(e+` `)}),o(r,a,i),a},{parse:"lines"})}e.exports=j,e.exports.prettyFactory=O,e.exports.colorizerFactory=c,e.exports.default=j},5550(e,t,r){"use strict";let{LEVELS:i,LEVEL_NAMES:o}=r(4249),s=e=>e,a={default:s,60:s,50:s,40:s,30:s,20:s,10:s,message:s,greyMessage:s},{createColors:u}=r(6666),c=u({useColor:!0}),{white:l,bgRed:f,red:h,yellow:d,green:p,blue:y,gray:g,cyan:m}=c,b={default:l,60:f,50:h,40:d,30:p,20:y,10:g,message:m,greyMessage:g};function v(e){return function(t,r,{customLevels:s,customLevelNames:a}={}){let u=e?s||i:Object.assign({},i,s),c=e?a||o:Object.assign({},o,a),l="default";l=Number.isInteger(+t)?Object.prototype.hasOwnProperty.call(u,t)?t:l:Object.prototype.hasOwnProperty.call(c,t.toLowerCase())?c[t.toLowerCase()]:l;let f=u[l];return Object.prototype.hasOwnProperty.call(r,l)?r[l](f):r.default(f)}}e.exports=function(e=!1,t,r){let i,o;if(e&&void 0!==t){let e=t.reduce(function(e,[t,r]){return e[t]="function"==typeof c[r]?c[r]:l,e},{default:l,message:m,greyMessage:g}),i=r?e:Object.assign({},b,e),o=v(r),s=function(e,t){return o(e,i,t)};return s.message=s.message||i.message,s.greyMessage=s.greyMessage||i.greyMessage,s}if(e){let e,t;return e=v(r),(t=function(t,r){return e(t,b,r)}).message=b.message,t.greyMessage=b.greyMessage,t}return i=v(r),(o=function(e,t){return i(e,a,t)}).message=a.message,o.greyMessage=a.greyMessage,o}},4249(e){"use strict";e.exports={DATE_FORMAT:"yyyy-mm-dd HH:MM:ss.l o",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"]}},2349(e,t,r){"use strict";let i=r(9460)({circles:!0}),o=r(5402),s=r(2985),a=r(8183),{isMainThread:u}=r(8167),c=r(5550)(),{DATE_FORMAT:l,ERROR_LIKE_KEYS:f,MESSAGE_KEY:h,LEVEL_KEY:d,LEVEL_LABEL:p,TIMESTAMP_KEY:y,LOGGER_KEYS:g,LEVELS:m}=r(4249);function b(e,t=!1){if(!1===t)return e;let r=v(e);if(!w(r))return e;if(!0===t)return o(r,"UTC:"+l);let i=t.toUpperCase();if("SYS:STANDARD"===i)return o(r,l);let s=i.substr(0,4);return"SYS:"===s||"UTC:"===s?"UTC:"===s?o(r,t):o(r,t.slice(4)):o(r,`UTC:${t}`)}function v(e){let t=new Date(e);return w(t)?t:t=new Date(+e)}function w(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function _(e){return"[object Object]"===Object.prototype.toString.apply(e)}function S({input:e,ident:t=" ",eol:r=` `}){let i=e.split(/\r?\n/);for(let e=1;e{if(!1===d.includes(i)){let u="function"==typeof o[i]?o[i](a,i,e):a;s.includes(i)?r[i]=u:t[i]=u}return{plain:t,errors:r}},{plain:{},errors:{}});return l?(Object.keys(y).length>0&&(p+=h.greyMessage(a(y))),p+=r):Object.entries(y).forEach(([e,i])=>{let s="function"==typeof o[e]?i:a(i,null,2);if(void 0===s)return;let u=S({input:s,ident:t,eol:r});p+=`${t}${e}:${u.startsWith(r)?"":" "}${u}${r}`}),Object.entries(m).forEach(([e,i])=>{let s="function"==typeof o[e]?i:a(i,null,2);void 0!==s&&(p+=E({keyName:e,lines:s,eol:r,ident:t}))}),p}function E({keyName:e,lines:t,eol:r,ident:i}){let o="",s=S({input:t,ident:i,eol:r}),a=`${i}${e}: ${s}${r}`.split(r);for(let e=0;e{Object.prototype.hasOwnProperty.call(e,t)&&(e=e[t])}),delete e[i]}function k(){}function T(e,t){e.destroyed||("beforeExit"===t?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}e.exports={isObject:_,prettifyErrorLog:function({log:e,messageKey:t=h,ident:r=" ",eol:i=` -`,errorLikeKeys:o=f,errorProperties:s=[]}){let a=S({input:e.stack,ident:r,eol:i}),u=`${r}${a}${i}`;if(s.length>0){let a,c=g.concat(t,"type","stack");a="*"===s[0]?Object.keys(e).filter(e=>!1===c.includes(e)):s.filter(e=>!1===c.includes(e));for(let t=0;t`),""!==r)return r},prettifyObject:x,prettifyTime:function({log:e,timestampKey:t=y,translateFormat:r,prettifier:i}){let o=null;if(t in e?o=e[t]:"timestamp"in e&&(o=e.timestamp),null===o)return;let s=r?b(o,r):o;return i?i(s):`[${s}]`},buildSafeSonicBoom:function(e){let t=new s(e);return t.on("error",function e(r){if("EPIPE"===r.code){t.write=k,t.end=k,t.flushSync=k,t.destroy=k;return}t.removeListener("error",e)}),!e.sync&&u&&function(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=r(5463);t.register(e,T),e.on("close",function(){t.unregister(e)})}}(t),t},filterLog:function(e,t){let r=i(e);return t.forEach(e=>{j(r,e)}),r}},e.exports.internals={formatTime:b,joinLinesWithIndentation:S,prettifyError:E,deleteLogProperty:j,splitIgnoreKey:O,createDate:v,isValidDate:w}},2985(e,t,r){"use strict";let i=r(9896),o=r(4434),s=r(9023).inherits,a=r(6928),u=r(7048);function c(e,t){function r(r,i){if(r){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",r)}):t.emit("error",r);return}t.fd=i,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t._reopening&&(t._writing||!(t._len>t.minLength)||t.destroyed||h(t))}t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;let o=t.append?"a":"w";if(t.sync)try{t.mkdir&&i.mkdirSync(a.dirname(e),{recursive:!0});let s=i.openSync(e,o);r(null,s)}catch(e){throw r(e),e}else t.mkdir?i.mkdir(a.dirname(e),{recursive:!0},t=>{if(t)return r(t);i.open(e,o,r)}):i.open(e,o,r)}function l(e){if(!(this instanceof l))return new l(e);let{fd:t,dest:r,minLength:o,sync:s,append:a=!0,mkdir:p,retryEAGAIN:y}=e||{};if(t=t||r,this._bufs=[],this._len=0,this.fd=-1,this._writing=!1,this._writingBuf="",this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._hwm=Math.max(o||0,16387),this.file=null,this.destroyed=!1,this.minLength=o||0,this.sync=s||!1,this.append=a||!1,this.retryEAGAIN=y||(()=>!0),this.mkdir=p||!1,"number"==typeof t)this.fd=t,process.nextTick(()=>this.emit("ready"));else if("string"==typeof t)c(t,this);else throw Error("SonicBoom supports only file descriptors and files");if(this.minLength>=0x1000000)throw Error("minLength should be smaller than MAX_WRITE (16777216)");this.release=(e,t)=>{if(e){if("EAGAIN"===e.code&&this.retryEAGAIN(e,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{u(100),this.release(void 0,0)}catch(e){this.release(e)}else setTimeout(()=>{i.write(this.fd,this._writingBuf,"utf8",this.release)},100);else this._writing=!1,this.emit("error",e);return}if(this._len-=t,this._writingBuf=this._writingBuf.slice(t),this._writingBuf.length){if(!this.sync)return void i.write(this.fd,this._writingBuf,"utf8",this.release);try{do{let e=i.writeSync(this.fd,this._writingBuf,"utf8");this._len-=e,this._writingBuf=this._writingBuf.slice(e)}while(this._writingBuf)}catch(e){this.release(e);return}}let r=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):r>this.minLength?h(this):this._ending?r>0?h(this):(this._writing=!1,d(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(f,this)):this.emit("drain"))},this.on("newListener",function(e){"drain"===e&&(this._asyncDrainScheduled=!1)})}function f(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}function h(e){let t=e.release;if(e._writing=!0,e._writingBuf=e._writingBuf||e._bufs.shift(),e.sync)try{let r=i.writeSync(e.fd,e._writingBuf,"utf8");t(null,r)}catch(e){t(e)}else i.write(e.fd,e._writingBuf,"utf8",t)}function d(e){-1===e.fd?e.once("ready",d.bind(null,e)):(i.close(e.fd,t=>{t?e.emit("error",t):(e._ending&&!e._writing&&e.emit("finish"),e.emit("close"))}),e.destroyed=!0,e._bufs=[])}s(l,o),l.prototype.write=function(e){if(this.destroyed)throw Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return!this._writing&&t>0x1000000?r.push(e):0===r.length?r[0]=""+e:r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&h(this),this._len{this.reopen(e)});if(this._ending)return;if(!this.file)throw Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&i.close(t,e=>{if(e)return this.emit("error",e)})}),c(e||this.file,this)},l.prototype.end=function(){if(this.destroyed)throw Error("SonicBoom destroyed");this._opening?this.once("ready",()=>{this.end()}):this._ending||(this._ending=!0,this._writing||(this._len>0&&this.fd>=0?h(this):d(this)))},l.prototype.flushSync=function(){if(this.destroyed)throw Error("SonicBoom destroyed");if(this.fd<0)throw Error("sonic boom is not ready yet");for(!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");this._bufs.length;){let e=this._bufs[0];try{this._len-=i.writeSync(this.fd,e,"utf8"),this._bufs.shift()}catch(t){if("EAGAIN"!==t.code||!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;u(100)}}},l.prototype.destroy=function(){this.destroyed||d(this)},l.SonicBoom=l,l.default=l,e.exports=l},6705(e,t,r){"use strict";var i=r(2588),o=r(4038),s=TypeError;e.exports=function(e){if(i(e))return e;throw new s(o(e)+" is not a function")}},839(e,t,r){"use strict";var i=r(3565).has;e.exports=function(e){return i(e),e}},7961(e,t,r){"use strict";var i=r(6472),o=String,s=TypeError;e.exports=function(e){if(i(e))return e;throw new s("Can't set "+o(e)+" as a prototype")}},9721(e,t,r){"use strict";var i=r(6123).has;e.exports=function(e){return i(e),e}},1150(e,t,r){"use strict";var i=r(4898),o=TypeError;e.exports=function(e,t){if(i(t,e))return e;throw new o("Incorrect invocation")}},650(e,t,r){"use strict";var i=r(5759),o=String,s=TypeError;e.exports=function(e){if(i(e))return e;throw new s(o(e)+" is not an object")}},2498(e,t,r){"use strict";var i=r(7404),o=r(675),s=r(7373),a=function(e){return function(t,r,a){var u,c=i(t),l=s(c);if(0===l)return!e&&-1;var f=o(a,l);if(e&&r!=r){for(;l>f;)if((u=c[f++])!=u)return!0}else for(;l>f;f++)if((e||f in c)&&c[f]===r)return e||f||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},8896(e,t,r){"use strict";var i=r(1437),o=r(2367),s=TypeError,a=Object.getOwnPropertyDescriptor;e.exports=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(o(e)&&!a(e,"length").writable)throw new s("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},6556(e,t,r){"use strict";var i=r(650),o=r(5220);e.exports=function(e,t,r,s){try{return s?t(i(r)[0],r[1]):t(r)}catch(t){o(e,"throw",t)}}},8097(e,t,r){"use strict";var i=r(9713),o=i({}.toString),s=i("".slice);e.exports=function(e){return s(o(e),8,-1)}},8974(e,t,r){"use strict";var i=r(8577),o=r(2588),s=r(8097),a=r(4058)("toStringTag"),u=Object,c="Arguments"===s(function(){return arguments}()),l=function(e,t){try{return e[t]}catch(e){}};e.exports=i?s:function(e){var t,r,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=l(t=u(e),a))?r:c?s(t):"Object"===(i=s(t))&&o(t.callee)?"Arguments":i}},2625(e,t,r){"use strict";var i=r(7826),o=r(9392),s=r(1160),a=r(8018);e.exports=function(e,t,r){for(var u=o(t),c=a.f,l=s.f,f=0;f0x1fffffffffffff)throw t("Maximum allowed index exceeded");return e}},9738(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6748(e,t,r){"use strict";var i=r(7741).navigator,o=i&&i.userAgent;e.exports=o?String(o):""},5584(e,t,r){"use strict";var i,o,s=r(7741),a=r(6748),u=s.process,c=s.Deno,l=u&&u.versions||c&&c.version,f=l&&l.v8;f&&(o=(i=f.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!o&&a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(o=+i[1]),e.exports=o},6172(e,t,r){"use strict";var i=r(9713),o=Error,s=i("".replace),a=String(new o("zxcasd").stack),u=/\n\s*at [^:]*:[^\n]*/,c=u.test(a);e.exports=function(e,t){if(c&&"string"==typeof e&&!o.prepareStackTrace)for(;t--;)e=s(e,u,"");return e}},374(e,t,r){"use strict";var i=r(4632),o=r(6172),s=r(6710),a=Error.captureStackTrace;e.exports=function(e,t,r,u){s&&(a?a(e,t):i(e,"stack",o(r,u)))}},6710(e,t,r){"use strict";var i=r(6786),o=r(6435);e.exports=!i(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",o(1,7)),7!==e.stack)})},9645(e,t,r){"use strict";var i=r(7741),o=r(1160).f,s=r(4632),a=r(3077),u=r(7630),c=r(2625),l=r(2617);e.exports=function(e,t){var r,f,h,d,p,y=e.target,g=e.global,m=e.stat;if(r=g?i:m?i[y]||u(y,{}):i[y]&&i[y].prototype)for(f in t){if(d=t[f],h=e.dontCallGetSet?(p=o(r,f))&&p.value:r[f],!l(g?f:y+(m?".":"#")+f,e.forced)&&void 0!==h){if(typeof d==typeof h)continue;c(d,h)}(e.sham||h&&h.sham)&&s(d,"sham",!0),a(r,f,d,e)}}},6786(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},9830(e,t,r){"use strict";var i=r(7007),o=Function.prototype,s=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(i?a.bind(s):function(){return a.apply(s,arguments)})},1869(e,t,r){"use strict";var i=r(8907),o=r(6705),s=r(7007),a=i(i.bind);e.exports=function(e,t){return o(e),void 0===t?e:s?a(e,t):function(){return e.apply(t,arguments)}}},7007(e,t,r){"use strict";e.exports=!r(6786)(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},1608(e,t,r){"use strict";var i=r(7007),o=Function.prototype.call;e.exports=i?o.bind(o):function(){return o.apply(o,arguments)}},2175(e,t,r){"use strict";var i=r(1437),o=r(7826),s=Function.prototype,a=i&&Object.getOwnPropertyDescriptor,u=o(s,"name"),c=u&&(!i||i&&a(s,"name").configurable);e.exports={EXISTS:u,PROPER:u&&"something"===(function(){}).name,CONFIGURABLE:c}},1857(e,t,r){"use strict";var i=r(9713),o=r(6705);e.exports=function(e,t,r){try{return i(o(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},8907(e,t,r){"use strict";var i=r(8097),o=r(9713);e.exports=function(e){if("Function"===i(e))return o(e)}},9713(e,t,r){"use strict";var i=r(7007),o=Function.prototype,s=o.call,a=i&&o.bind.bind(s,s);e.exports=i?a:function(e){return function(){return s.apply(e,arguments)}}},8148(e,t,r){"use strict";var i=r(7741),o=r(2588);e.exports=function(e,t){var r;return arguments.length<2?o(r=i[e])?r:void 0:i[e]&&i[e][t]}},754(e){"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},2786(e,t,r){"use strict";var i=r(8974),o=r(3953),s=r(8030),a=r(2476),u=r(4058)("iterator");e.exports=function(e){if(!s(e))return o(e,u)||o(e,"@@iterator")||a[i(e)]}},9678(e,t,r){"use strict";var i=r(1608),o=r(6705),s=r(650),a=r(4038),u=r(2786),c=TypeError;e.exports=function(e,t){var r=arguments.length<2?u(e):t;if(o(r))return s(i(r,e));throw new c(a(e)+" is not iterable")}},3953(e,t,r){"use strict";var i=r(6705),o=r(8030);e.exports=function(e,t){var r=e[t];return o(r)?void 0:i(r)}},4345(e,t,r){"use strict";var i=r(6705),o=r(650),s=r(1608),a=r(6904),u=r(754),c="Invalid size",l=RangeError,f=TypeError,h=Math.max,d=function(e,t){this.set=e,this.size=h(t,0),this.has=i(e.has),this.keys=i(e.keys)};d.prototype={getIterator:function(){return u(o(s(this.keys,this.set)))},includes:function(e){return s(this.has,this.set,e)}},e.exports=function(e){o(e);var t=+e.size;if(t!=t)throw new f(c);var r=a(t);if(r<0)throw new l(c);return new d(e,r)}},7741(e){"use strict";var t=function(e){return e&&e.Math===Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||t("object"==typeof this&&this)||function(){return this}()||Function("return this")()},7826(e,t,r){"use strict";var i=r(9713),o=r(9212),s=i({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return s(o(e),t)}},8372(e){"use strict";e.exports={}},3442(e,t,r){"use strict";e.exports=r(8148)("document","documentElement")},5622(e,t,r){"use strict";var i=r(1437),o=r(6786),s=r(7526);e.exports=!i&&!o(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},5632(e,t,r){"use strict";var i=r(9713),o=r(6786),s=r(8097),a=Object,u=i("".split);e.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?u(e,""):a(e)}:a},5862(e,t,r){"use strict";var i=r(2588),o=r(5759),s=r(4510);e.exports=function(e,t,r){var a,u;return s&&i(a=t.constructor)&&a!==r&&o(u=a.prototype)&&u!==r.prototype&&s(e,u),e}},7957(e,t,r){"use strict";var i=r(9713),o=r(2588),s=r(3414),a=i(Function.toString);o(s.inspectSource)||(s.inspectSource=function(e){return a(e)}),e.exports=s.inspectSource},1713(e,t,r){"use strict";var i=r(5759),o=r(4632);e.exports=function(e,t){i(t)&&"cause"in t&&o(e,"cause",t.cause)}},1694(e,t,r){"use strict";var i,o,s,a=r(4825),u=r(7741),c=r(5759),l=r(4632),f=r(7826),h=r(3414),d=r(8264),p=r(8372),y="Object already initialized",g=u.TypeError,m=u.WeakMap;if(a||h.state){var b=h.state||(h.state=new m);b.get=b.get,b.has=b.has,b.set=b.set,i=function(e,t){if(b.has(e))throw new g(y);return t.facade=e,b.set(e,t),t},o=function(e){return b.get(e)||{}},s=function(e){return b.has(e)}}else{var v=d("state");p[v]=!0,i=function(e,t){if(f(e,v))throw new g(y);return t.facade=e,l(e,v,t),t},o=function(e){return f(e,v)?e[v]:{}},s=function(e){return f(e,v)}}e.exports={set:i,get:o,has:s,enforce:function(e){return s(e)?o(e):i(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=o(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return r}}}},1938(e,t,r){"use strict";var i=r(4058),o=r(2476),s=i("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[s]===e)}},2367(e,t,r){"use strict";var i=r(8097);e.exports=Array.isArray||function(e){return"Array"===i(e)}},2588(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},2617(e,t,r){"use strict";var i=r(6786),o=r(2588),s=/#|\.prototype\./,a=function(e,t){var r=c[u(e)];return r===f||r!==l&&(o(t)?i(t):!!t)},u=a.normalize=function(e){return String(e).replace(s,".").toLowerCase()},c=a.data={},l=a.NATIVE="N",f=a.POLYFILL="P";e.exports=a},3090(e,t,r){"use strict";var i=r(8974),o=r(7826),s=r(8030),a=r(4058),u=r(2476),c=a("iterator"),l=Object;e.exports=function(e){if(s(e))return!1;var t=l(e);return void 0!==t[c]||"@@iterator"in t||o(u,i(t))}},8030(e){"use strict";e.exports=function(e){return null==e}},5759(e,t,r){"use strict";var i=r(2588);e.exports=function(e){return"object"==typeof e?null!==e:i(e)}},6472(e,t,r){"use strict";var i=r(5759);e.exports=function(e){return i(e)||null===e}},6726(e){"use strict";e.exports=!1},80(e,t,r){"use strict";var i=r(8148),o=r(2588),s=r(4898),a=r(577),u=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=i("Symbol");return o(t)&&s(t.prototype,u(e))}},1224(e,t,r){"use strict";var i=r(1608);e.exports=function(e,t,r){for(var o,s,a=r?e:e.iterator,u=e.next;!(o=i(u,a)).done;)if(void 0!==(s=t(o.value)))return s}},5705(e,t,r){"use strict";var i=r(1869),o=r(1608),s=r(650),a=r(4038),u=r(1938),c=r(7373),l=r(4898),f=r(9678),h=r(2786),d=r(5220),p=TypeError,y=function(e,t){this.stopped=e,this.result=t},g=y.prototype;e.exports=function(e,t,r){var m,b,v,w,_,S,x,E=r&&r.that,O=!!(r&&r.AS_ENTRIES),j=!!(r&&r.IS_RECORD),k=!!(r&&r.IS_ITERATOR),T=!!(r&&r.INTERRUPTED),R=i(t,E),M=function(e){return m&&d(m,"normal"),new y(!0,e)},P=function(e){return O?(s(e),T?R(e[0],e[1],M):R(e[0],e[1])):T?R(e,M):R(e)};if(j)m=e.iterator;else if(k)m=e;else{if(!(b=h(e)))throw new p(a(e)+" is not iterable");if(u(b)){for(v=0,w=c(e);w>v;v++)if((_=P(e[v]))&&l(g,_))return _;return new y(!1)}m=f(e,b)}for(S=j?e.next:m.next;!(x=o(S,m)).done;){try{_=P(x.value)}catch(e){d(m,"throw",e)}if("object"==typeof _&&_&&l(g,_))return _}return new y(!1)}},6150(e,t,r){"use strict";var i=r(5220);e.exports=function(e,t,r){for(var o=e.length-1;o>=0;o--)if(void 0!==e[o])try{r=i(e[o].iterator,t,r)}catch(e){t="throw",r=e}if("throw"===t)throw r;return r}},5220(e,t,r){"use strict";var i=r(1608),o=r(650),s=r(3953);e.exports=function(e,t,r){var a,u;o(e);try{if(!(a=s(e,"return"))){if("throw"===t)throw r;return r}a=i(a,e)}catch(e){u=!0,a=e}if("throw"===t)throw r;if(u)throw a;return o(a),r}},4635(e,t,r){"use strict";var i=r(1608),o=r(5449),s=r(4632),a=r(1280),u=r(4058),c=r(1694),l=r(3953),f=r(6114).IteratorPrototype,h=r(9248),d=r(5220),p=r(6150),y=u("toStringTag"),g="IteratorHelper",m="WrapForValidIterator",b="normal",v="throw",w=c.set,_=function(e){var t=c.getterFor(e?m:g);return a(o(f),{next:function(){var r=t(this);if(e)return r.nextHandler();if(r.done)return h(void 0,!0);try{var i=r.nextHandler();return r.returnHandlerResult?i:h(i,r.done)}catch(e){throw r.done=!0,e}},return:function(){var r=t(this),o=r.iterator;if(r.done=!0,e){var s=l(o,"return");return s?i(s,o):h(void 0,!0)}if(r.inner)try{d(r.inner.iterator,b)}catch(e){return d(o,v,e)}if(r.openIters)try{p(r.openIters,b)}catch(e){return d(o,v,e)}return o&&d(o,b),h(void 0,!0)}})},S=_(!0),x=_(!1);s(x,y,"Iterator Helper"),e.exports=function(e,t,r){var i=function(i,o){o?(o.iterator=i.iterator,o.next=i.next):o=i,o.type=t?m:g,o.returnHandlerResult=!!r,o.nextHandler=e,o.counter=0,o.done=!1,w(this,o)};return i.prototype=t?S:x,i}},2755(e){"use strict";e.exports=function(e,t){var r="function"==typeof Iterator&&Iterator.prototype[e];if(r)try{r.call({next:null},t).next()}catch(e){return!0}}},5906(e,t,r){"use strict";var i=r(7741);e.exports=function(e,t){var r=i.Iterator,o=r&&r.prototype,s=o&&o[e],a=!1;if(s)try{s.call({next:function(){return{done:!0}},return:function(){a=!0}},-1)}catch(e){e instanceof t||(a=!1)}if(!a)return s}},6114(e,t,r){"use strict";var i,o,s,a=r(6786),u=r(2588),c=r(5759),l=r(5449),f=r(3306),h=r(3077),d=r(4058),p=r(6726),y=d("iterator"),g=!1;[].keys&&("next"in(s=[].keys())?(o=f(f(s)))!==Object.prototype&&(i=o):g=!0),!c(i)||a(function(){var e={};return i[y].call(e)!==e})?i={}:p&&(i=l(i)),u(i[y])||h(i,y,function(){return this}),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:g}},2476(e){"use strict";e.exports={}},7373(e,t,r){"use strict";var i=r(3019);e.exports=function(e){return i(e.length)}},2466(e,t,r){"use strict";var i=r(9713),o=r(6786),s=r(2588),a=r(7826),u=r(1437),c=r(2175).CONFIGURABLE,l=r(7957),f=r(1694),h=f.enforce,d=f.get,p=String,y=Object.defineProperty,g=i("".slice),m=i("".replace),b=i([].join),v=u&&!o(function(){return 8!==y(function(){},"length",{value:8}).length}),w=String(String).split("String"),_=e.exports=function(e,t,r){"Symbol("===g(p(t),0,7)&&(t="["+m(p(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!a(e,"name")||c&&e.name!==t)&&(u?y(e,"name",{value:t,configurable:!0}):e.name=t),v&&r&&a(r,"arity")&&e.length!==r.arity&&y(e,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?u&&y(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var i=h(e);return a(i,"source")||(i.source=b(w,"string"==typeof t?t:"")),e};Function.prototype.toString=_(function(){return s(this)&&d(this).source||l(this)},"toString")},3565(e,t,r){"use strict";var i=r(9713),o=Map.prototype;e.exports={Map:Map,set:i(o.set),get:i(o.get),has:i(o.has),remove:i(o.delete),proto:o}},8542(e,t,r){"use strict";var i=r(9713),o=r(1224),s=r(3565),a=s.Map,u=s.proto,c=i(u.forEach),l=i(u.entries),f=l(new a).next;e.exports=function(e,t,r){return r?o({iterator:l(e),next:f},function(e){return t(e[1],e[0])}):c(e,t)}},2190(e){"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var i=+e;return(i>0?r:t)(i)}},6394(e,t,r){"use strict";var i=r(5770);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:i(e)}},5449(e,t,r){"use strict";var i,o=r(650),s=r(6910),a=r(9738),u=r(8372),c=r(3442),l=r(7526),f=r(8264),h="prototype",d="script",p=f("IE_PROTO"),y=function(){},g=function(e){return"<"+d+">"+e+""},m=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){var e,t=l("iframe");return t.style.display="none",c.appendChild(t),t.src=String("java"+d+":"),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F},v=function(){try{i=new ActiveXObject("htmlfile")}catch(e){}v="u">typeof document?document.domain&&i?m(i):b():m(i);for(var e=a.length;e--;)delete v[h][a[e]];return v()};u[p]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(y[h]=o(e),r=new y,y[h]=null,r[p]=e):r=v(),void 0===t?r:s.f(r,t)}},6910(e,t,r){"use strict";var i=r(1437),o=r(8195),s=r(8018),a=r(650),u=r(7404),c=r(7873);t.f=i&&!o?Object.defineProperties:function(e,t){a(e);for(var r,i=u(t),o=c(t),l=o.length,f=0;l>f;)s.f(e,r=o[f++],i[r]);return e}},8018(e,t,r){"use strict";var i=r(1437),o=r(5622),s=r(8195),a=r(650),u=r(3192),c=TypeError,l=Object.defineProperty,f=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",p="writable";t.f=i?s?function(e,t,r){if(a(e),t=u(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&p in r&&!r[p]){var i=f(e,t);i&&i[p]&&(e[t]=r.value,r={configurable:d in r?r[d]:i[d],enumerable:h in r?r[h]:i[h],writable:!1})}return l(e,t,r)}:l:function(e,t,r){if(a(e),t=u(t),a(r),o)try{return l(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new c("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},1160(e,t,r){"use strict";var i=r(1437),o=r(1608),s=r(5728),a=r(6435),u=r(7404),c=r(3192),l=r(7826),f=r(5622),h=Object.getOwnPropertyDescriptor;t.f=i?h:function(e,t){if(e=u(e),t=c(t),f)try{return h(e,t)}catch(e){}if(l(e,t))return a(!o(s.f,e,t),e[t])}},6557(e,t,r){"use strict";var i=r(7427),o=r(9738).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,o)}},4156(e,t){"use strict";t.f=Object.getOwnPropertySymbols},3306(e,t,r){"use strict";var i=r(7826),o=r(2588),s=r(9212),a=r(8264),u=r(7768),c=a("IE_PROTO"),l=Object,f=l.prototype;e.exports=u?l.getPrototypeOf:function(e){var t=s(e);if(i(t,c))return t[c];var r=t.constructor;return o(r)&&t instanceof r?r.prototype:t instanceof l?f:null}},4898(e,t,r){"use strict";e.exports=r(9713)({}.isPrototypeOf)},7427(e,t,r){"use strict";var i=r(9713),o=r(7826),s=r(7404),a=r(2498).indexOf,u=r(8372),c=i([].push);e.exports=function(e,t){var r,i=s(e),l=0,f=[];for(r in i)!o(u,r)&&o(i,r)&&c(f,r);for(;t.length>l;)o(i,r=t[l++])&&(~a(f,r)||c(f,r));return f}},7873(e,t,r){"use strict";var i=r(7427),o=r(9738);e.exports=Object.keys||function(e){return i(e,o)}},5728(e,t){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor;t.f=i&&!r.call({1:2},1)?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},4510(e,t,r){"use strict";var i=r(1857),o=r(5759),s=r(3829),a=r(7961);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=i(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,i){return s(r),a(i),o(r)&&(t?e(r,i):r.__proto__=i),r}}():void 0)},2943(e,t,r){"use strict";var i=r(1608),o=r(2588),s=r(5759),a=TypeError;e.exports=function(e,t){var r,u;if("string"===t&&o(r=e.toString)&&!s(u=i(r,e))||o(r=e.valueOf)&&!s(u=i(r,e))||"string"!==t&&o(r=e.toString)&&!s(u=i(r,e)))return u;throw new a("Can't convert object to primitive value")}},9392(e,t,r){"use strict";var i=r(8148),o=r(9713),s=r(6557),a=r(4156),u=r(650),c=o([].concat);e.exports=i("Reflect","ownKeys")||function(e){var t=s.f(u(e)),r=a.f;return r?c(t,r(e)):t}},1841(e,t,r){"use strict";var i=r(9713),o=r(7826),s=SyntaxError,a=parseInt,u=String.fromCharCode,c=i("".charAt),l=i("".slice),f=i(/./.exec),h={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":` -`,"\\r":`\r`,"\\t":" "},d=/^[\da-f]{4}$/i,p=/^[\u0000-\u001F]$/;e.exports=function(e,t){for(var r=!0,i="";tr.size?c(r.getIterator(),function(e){h(t,e)&&f(o,e)}):u(t,function(e){r.includes(e)&&f(o,e)}),o}},282(e,t,r){"use strict";var i=r(9721),o=r(6123).has,s=r(5221),a=r(4345),u=r(3160),c=r(1224),l=r(5220);e.exports=function(e){var t=i(this),r=a(e);if(s(t)<=r.size)return!1!==u(t,function(e){if(r.includes(e))return!1},!0);var f=r.getIterator();return!1!==c(f,function(e){if(o(t,e))return l(f,"normal",!1)})}},3673(e,t,r){"use strict";var i=r(9721),o=r(5221),s=r(3160),a=r(4345);e.exports=function(e){var t=i(this),r=a(e);return!(o(t)>r.size)&&!1!==s(t,function(e){if(!r.includes(e))return!1},!0)}},9320(e,t,r){"use strict";var i=r(9721),o=r(6123).has,s=r(5221),a=r(4345),u=r(1224),c=r(5220);e.exports=function(e){var t=i(this),r=a(e);if(s(t)0?o(t,0x1fffffffffffff):0}},9212(e,t,r){"use strict";var i=r(3829),o=Object;e.exports=function(e){return o(i(e))}},9538(e,t,r){"use strict";var i=r(1608),o=r(5759),s=r(80),a=r(3953),u=r(2943),c=r(4058),l=TypeError,f=c("toPrimitive");e.exports=function(e,t){if(!o(e)||s(e))return e;var r,c=a(e,f);if(c){if(void 0===t&&(t="default"),!o(r=i(c,e,t))||s(r))return r;throw new l("Can't convert object to primitive value")}return void 0===t&&(t="number"),u(e,t)}},3192(e,t,r){"use strict";var i=r(9538),o=r(80);e.exports=function(e){var t=i(e,"string");return o(t)?t:t+""}},7779(e,t,r){"use strict";var i=r(8148),o=r(2588),s=r(3090),a=r(5759),u=i("Set");e.exports=function(e){return a(e)&&"number"==typeof e.size&&o(e.has)&&o(e.keys)?e:s(e)?new u(e):e}},8577(e,t,r){"use strict";var i=r(4058)("toStringTag"),o={};o[i]="z",e.exports="[object z]"===String(o)},5770(e,t,r){"use strict";var i=r(8974),o=String;e.exports=function(e){if("Symbol"===i(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},4038(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},4513(e,t,r){"use strict";var i=r(9713),o=0,s=Math.random(),a=i(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+s,36)}},577(e,t,r){"use strict";e.exports=r(432)&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8195(e,t,r){"use strict";var i=r(1437),o=r(6786);e.exports=i&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},5605(e){"use strict";var t=TypeError;e.exports=function(e,r){if(ev&&d(i,arguments[v]),i});if(O.prototype=x,"Error"!==_?u?u(O,E):c(O,E,{name:!0}):y&&b in S&&(l(O,S,b),l(O,S,"prepareStackTrace")),c(O,S),!g)try{x.name!==_&&s(x,"name",_),x.constructor=O}catch(e){}return O}}},8831(e,t,r){"use strict";var i=r(9645),o=r(9212),s=r(7373),a=r(8896),u=r(3525);i({target:"Array",proto:!0,arity:1,forced:r(6786)(function(){return 0x100000001!==[].push.call({length:0x100000000},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=o(this),r=s(t),i=arguments.length;u(r+i);for(var c=0;c1;return e.has(1)&&e.clear(),{done:r,value:2}}}}}).size})},{difference:o})},1975(e,t,r){"use strict";var i=r(9645),o=r(6786),s=r(2537);i({target:"Set",proto:!0,real:!0,forced:!r(4487)("intersection",function(e){return 2===e.size&&e.has(1)&&e.has(2)})||o(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:s})},2970(e,t,r){"use strict";var i=r(9645),o=r(282);i({target:"Set",proto:!0,real:!0,forced:!r(4487)("isDisjointFrom",function(e){return!e})},{isDisjointFrom:o})},2567(e,t,r){"use strict";var i=r(9645),o=r(3673);i({target:"Set",proto:!0,real:!0,forced:!r(4487)("isSubsetOf",function(e){return e})},{isSubsetOf:o})},4576(e,t,r){"use strict";var i=r(9645),o=r(9320);i({target:"Set",proto:!0,real:!0,forced:!r(4487)("isSupersetOf",function(e){return!e})},{isSupersetOf:o})},423(e,t,r){"use strict";var i=r(9645),o=r(9705),s=r(3036);i({target:"Set",proto:!0,real:!0,forced:!r(4487)("symmetricDifference")||!s("symmetricDifference")},{symmetricDifference:o})},8107(e,t,r){"use strict";var i=r(9645),o=r(453),s=r(3036);i({target:"Set",proto:!0,real:!0,forced:!r(4487)("union")||!s("union")},{union:o})},9845(e,t,r){"use strict";r(5046)},6142(e,t,r){"use strict";r(7899)},518(e,t,r){"use strict";r(9807)},1699(e,t,r){"use strict";r(7092)},6791(e,t,r){"use strict";r(9186)},7589(e,t,r){"use strict";r(3016)},4370(e,t,r){"use strict";r(537)},4356(e,t,r){"use strict";var i=r(9645),o=r(839),s=r(3565).remove;i({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=o(this),r=!0,i=0,a=arguments.length;i1?arguments[1]:void 0);return!1!==a(t,function(e,i){if(!r(e,i,t))return!1},!0)}})},4255(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(839),a=r(3565),u=r(8542),c=a.Map,l=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new c;return u(t,function(e,o){r(e,o,t)&&l(i,o,e)}),i}})},3248(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(839),a=r(8542);i({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=a(t,function(e,i){if(r(e,i,t))return{key:i}},!0);return i&&i.key}})},7922(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(839),a=r(8542);i({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=a(t,function(e,i){if(r(e,i,t))return{value:e}},!0);return i&&i.value}})},7492(e,t,r){"use strict";var i=r(9645),o=r(9496),s=r(839),a=r(8542);i({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===a(s(this),function(t){if(o(t,e))return!0},!0)}})},9594(e,t,r){"use strict";var i=r(9645),o=r(839),s=r(8542);i({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=s(o(this),function(t,r){if(t===e)return{key:r}},!0);return t&&t.key}})},1612(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(839),a=r(3565),u=r(8542),c=a.Map,l=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new c;return u(t,function(e,o){l(i,r(e,o,t),e)}),i}})},6414(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(839),a=r(3565),u=r(8542),c=a.Map,l=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new c;return u(t,function(e,o){l(i,o,r(e,o,t))}),i}})},9673(e,t,r){"use strict";var i=r(9645),o=r(839),s=r(5705),a=r(3565).set;i({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=o(this),r=arguments.length,i=0;i1?arguments[1]:void 0);return!0===a(t,function(e,i){if(r(e,i,t))return!0},!0)}})},6636(e,t,r){"use strict";var i=r(9645),o=r(6705),s=r(839),a=r(3565),u=TypeError,c=a.get,l=a.has,f=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=s(this),i=arguments.length;o(t);var a=l(r,e);if(!a&&i<3)throw new u("Updating absent value");var h=a?c(r,e):o(i>2?arguments[2]:void 0)(e,r);return f(r,e,t(h,e,r)),r}})},9822(e,t,r){"use strict";var i=r(9645),o=r(9721),s=r(6123).add;i({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var e=o(this),t=0,r=arguments.length;t1?arguments[1]:void 0);return!1!==a(t,function(e){if(!r(e,e,t))return!1},!0)}})},9817(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(9721),a=r(6123),u=r(3160),c=a.Set,l=a.add;i({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new c;return u(t,function(e){r(e,e,t)&&l(i,e)}),i}})},3364(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(9721),a=r(3160);i({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=a(t,function(e){if(r(e,e,t))return{value:e}},!0);return i&&i.value}})},5354(e,t,r){"use strict";var i=r(9645),o=r(1608),s=r(7779),a=r(2537);i({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return o(a,this,s(e))}})},7338(e,t,r){"use strict";r(1975)},7357(e,t,r){"use strict";var i=r(9645),o=r(1608),s=r(7779),a=r(282);i({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return o(a,this,s(e))}})},2105(e,t,r){"use strict";r(2970)},5949(e,t,r){"use strict";var i=r(9645),o=r(1608),s=r(7779),a=r(3673);i({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return o(a,this,s(e))}})},8202(e,t,r){"use strict";r(2567)},4275(e,t,r){"use strict";var i=r(9645),o=r(1608),s=r(7779),a=r(9320);i({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return o(a,this,s(e))}})},6857(e,t,r){"use strict";r(4576)},2163(e,t,r){"use strict";var i=r(9645),o=r(9713),s=r(9721),a=r(3160),u=r(5770),c=o([].join),l=o([].push);i({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=s(this),r=void 0===e?",":u(e),i=[];return a(t,function(e){l(i,e)}),c(i,r)}})},9285(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(9721),a=r(6123),u=r(3160),c=a.Set,l=a.add;i({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new c;return u(t,function(e){l(i,r(e,e,t))}),i}})},8957(e,t,r){"use strict";var i=r(9645),o=r(6705),s=r(9721),a=r(3160),u=TypeError;i({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=s(this),r=arguments.length<2,i=r?void 0:arguments[1];if(o(e),a(t,function(o){r?(r=!1,i=o):i=e(i,o,o,t)}),r)throw new u("Reduce of empty set with no initial value");return i}})},4843(e,t,r){"use strict";var i=r(9645),o=r(1869),s=r(9721),a=r(3160);i({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0);return!0===a(t,function(e){if(r(e,e,t))return!0},!0)}})},2550(e,t,r){"use strict";var i=r(9645),o=r(1608),s=r(7779),a=r(9705);i({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return o(a,this,s(e))}})},2846(e,t,r){"use strict";r(423)},3832(e,t,r){"use strict";var i=r(9645),o=r(1608),s=r(7779),a=r(453);i({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return o(a,this,s(e))}})},4512(e,t,r){"use strict";r(8107)},9444(e,t,r){"use strict";var i=r(3077),o=r(9713),s=r(5770),a=r(5605),u=URLSearchParams,c=u.prototype,l=o(c.append),f=o(c.delete),h=o(c.forEach),d=o([].push),p=new u("a=1&a=2&b=3");p.delete("a",1),p.delete("b",void 0),p+""!="a=2"&&i(c,"delete",function(e){var t,r=arguments.length,i=r<2?void 0:arguments[1];if(r&&void 0===i)return f(this,e);var o=[];h(this,function(e,t){d(o,{key:t,value:e})}),a(r,1);for(var u=s(e),c=s(i),p=0,y=0,g=!1,m=o.length;p docs/benchmarks.md"},"bin":{"pino":"./bin.js"},"precommit":"test","repository":{"type":"git","url":"git+https://github.com/pinojs/pino.git"},"keywords":["fast","logger","stream","json"],"author":"Matteo Collina ","contributors":["David Mark Clements ","James Sumners ","Thomas Watson Steen (https://twitter.com/wa7son)"],"license":"MIT","bugs":{"url":"https://github.com/pinojs/pino/issues"},"homepage":"http://getpino.io","devDependencies":{"airtap":"4.0.3","benchmark":"^2.1.4","bole":"^4.0.0","bunyan":"^1.8.14","docsify-cli":"^4.4.1","eslint":"^7.17.0","eslint-config-standard":"^16.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","execa":"^5.0.0","fastbench":"^1.0.1","flush-write-stream":"^2.0.0","import-fresh":"^3.2.1","log":"^6.0.0","loglevel":"^1.6.7","pino-pretty":"^5.0.0","pre-commit":"^1.2.2","proxyquire":"^2.1.3","pump":"^3.0.0","semver":"^7.0.0","split2":"^3.1.1","steed":"^1.1.3","strip-ansi":"^6.0.0","tap":"^15.0.1","tape":"^5.0.0","through2":"^4.0.0","winston":"^3.3.3"},"dependencies":{"fast-redact":"^3.0.0","fast-safe-stringify":"^2.0.8","process-warning":"^1.0.0","flatstr":"^1.0.12","pino-std-serializers":"^3.1.0","quick-format-unescaped":"^4.0.3","sonic-boom":"^1.0.2"}}')}},t={};function r(i){var o=t[i];if(void 0!==o)return o.exports;var s=t[i]={exports:{}};return e[i].call(s.exports,s,s.exports,r),s.exports}(()=>{"use strict";r(9845),r(1699),r(4370),r(7589);let{getManagedCacheStorage:e,CacheStorageGroup:t}=r(755),i=r(7016).parse;r(4473).disable=!0;let o=r(2413).PROVIDERS,s=e("bridge");s.aliveDuration=9e5;let a=t.getInstance();setInterval(()=>{a.cleanup()},9e5),r(8611).createServer().listen(parseInt(process.argv[2])||9e3).on("request",(e,t)=>{let r;return(r=i(e.url),Promise.resolve().then(()=>{let e=r.pathname.slice(1).split("/").map(e=>decodeURIComponent(e)),t=o,i=decodeURIComponent(r.query);try{i=JSON.parse(i)}catch(e){}return e.some(e=>{if(!(e in t))return!0;t=t[e]})||"function"!=typeof t?Promise.reject():s.cache(i,()=>t(i))})).then(e=>t.write(e)).catch(()=>t.writeHead(404)).then(()=>t.end())})})()})(); \ No newline at end of file +`,errorLikeKeys:o=f,errorProperties:s=[]}){let a=S({input:e.stack,ident:r,eol:i}),u=`${r}${a}${i}`;if(s.length>0){let a,c=g.concat(t,"type","stack");a="*"===s[0]?Object.keys(e).filter(e=>!1===c.includes(e)):s.filter(e=>!1===c.includes(e));for(let t=0;t`),""!==r)return r},prettifyObject:x,prettifyTime:function({log:e,timestampKey:t=y,translateFormat:r,prettifier:i}){let o=null;if(t in e?o=e[t]:"timestamp"in e&&(o=e.timestamp),null===o)return;let s=r?b(o,r):o;return i?i(s):`[${s}]`},buildSafeSonicBoom:function(e){let t=new s(e);return t.on("error",function e(r){if("EPIPE"===r.code){t.write=k,t.end=k,t.flushSync=k,t.destroy=k;return}t.removeListener("error",e)}),!e.sync&&u&&function(e){if(global.WeakRef&&global.WeakMap&&global.FinalizationRegistry){let t=r(5463);t.register(e,T),e.on("close",function(){t.unregister(e)})}}(t),t},filterLog:function(e,t){let r=i(e);return t.forEach(e=>{j(r,e)}),r}},e.exports.internals={formatTime:b,joinLinesWithIndentation:S,prettifyError:E,deleteLogProperty:j,splitIgnoreKey:O,createDate:v,isValidDate:w}},2985(e,t,r){"use strict";let i=r(9896),o=r(4434),s=r(9023).inherits,a=r(6928),u=r(7048);function c(e,t){function r(r,i){if(r){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",r)}):t.emit("error",r);return}t.fd=i,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t._reopening&&(t._writing||!(t._len>t.minLength)||t.destroyed||h(t))}t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;let o=t.append?"a":"w";if(t.sync)try{t.mkdir&&i.mkdirSync(a.dirname(e),{recursive:!0});let s=i.openSync(e,o);r(null,s)}catch(e){throw r(e),e}else t.mkdir?i.mkdir(a.dirname(e),{recursive:!0},t=>{if(t)return r(t);i.open(e,o,r)}):i.open(e,o,r)}function l(e){if(!(this instanceof l))return new l(e);let{fd:t,dest:r,minLength:o,sync:s,append:a=!0,mkdir:p,retryEAGAIN:y}=e||{};if(t=t||r,this._bufs=[],this._len=0,this.fd=-1,this._writing=!1,this._writingBuf="",this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._hwm=Math.max(o||0,16387),this.file=null,this.destroyed=!1,this.minLength=o||0,this.sync=s||!1,this.append=a||!1,this.retryEAGAIN=y||(()=>!0),this.mkdir=p||!1,"number"==typeof t)this.fd=t,process.nextTick(()=>this.emit("ready"));else if("string"==typeof t)c(t,this);else throw Error("SonicBoom supports only file descriptors and files");if(this.minLength>=0x1000000)throw Error("minLength should be smaller than MAX_WRITE (16777216)");this.release=(e,t)=>{if(e){if("EAGAIN"===e.code&&this.retryEAGAIN(e,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{u(100),this.release(void 0,0)}catch(e){this.release(e)}else setTimeout(()=>{i.write(this.fd,this._writingBuf,"utf8",this.release)},100);else this._writing=!1,this.emit("error",e);return}if(this._len-=t,this._writingBuf=this._writingBuf.slice(t),this._writingBuf.length){if(!this.sync)return void i.write(this.fd,this._writingBuf,"utf8",this.release);try{do{let e=i.writeSync(this.fd,this._writingBuf,"utf8");this._len-=e,this._writingBuf=this._writingBuf.slice(e)}while(this._writingBuf)}catch(e){this.release(e);return}}let r=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):r>this.minLength?h(this):this._ending?r>0?h(this):(this._writing=!1,d(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(f,this)):this.emit("drain"))},this.on("newListener",function(e){"drain"===e&&(this._asyncDrainScheduled=!1)})}function f(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}function h(e){let t=e.release;if(e._writing=!0,e._writingBuf=e._writingBuf||e._bufs.shift(),e.sync)try{let r=i.writeSync(e.fd,e._writingBuf,"utf8");t(null,r)}catch(e){t(e)}else i.write(e.fd,e._writingBuf,"utf8",t)}function d(e){-1===e.fd?e.once("ready",d.bind(null,e)):(i.close(e.fd,t=>{t?e.emit("error",t):(e._ending&&!e._writing&&e.emit("finish"),e.emit("close"))}),e.destroyed=!0,e._bufs=[])}s(l,o),l.prototype.write=function(e){if(this.destroyed)throw Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return!this._writing&&t>0x1000000?r.push(e):0===r.length?r[0]=""+e:r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&h(this),this._len{this.reopen(e)});if(this._ending)return;if(!this.file)throw Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&i.close(t,e=>{if(e)return this.emit("error",e)})}),c(e||this.file,this)},l.prototype.end=function(){if(this.destroyed)throw Error("SonicBoom destroyed");this._opening?this.once("ready",()=>{this.end()}):this._ending||(this._ending=!0,this._writing||(this._len>0&&this.fd>=0?h(this):d(this)))},l.prototype.flushSync=function(){if(this.destroyed)throw Error("SonicBoom destroyed");if(this.fd<0)throw Error("sonic boom is not ready yet");for(!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");this._bufs.length;){let e=this._bufs[0];try{this._len-=i.writeSync(this.fd,e,"utf8"),this._bufs.shift()}catch(t){if("EAGAIN"!==t.code||!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;u(100)}}},l.prototype.destroy=function(){this.destroyed||d(this)},l.SonicBoom=l,l.default=l,e.exports=l},3648(e,t,r){"use strict";var i=r(1987),o=r(8753),s=TypeError;e.exports=function(e){if(i(e))return e;throw new s(o(e)+" is not a function")}},9164(e,t,r){"use strict";var i=r(5045).has;e.exports=function(e){return i(e),e}},6308(e,t,r){"use strict";var i=r(6855),o=String,s=TypeError;e.exports=function(e){if(i(e))return e;throw new s("Can't set "+o(e)+" as a prototype")}},8654(e,t,r){"use strict";var i=r(3016).has;e.exports=function(e){return i(e),e}},6317(e,t,r){"use strict";var i=r(1095),o=TypeError;e.exports=function(e,t){if(i(t,e))return e;throw new o("Incorrect invocation")}},5661(e,t,r){"use strict";var i=r(6512),o=String,s=TypeError;e.exports=function(e){if(i(e))return e;throw new s(o(e)+" is not an object")}},3139(e,t,r){"use strict";var i=r(9303),o=r(3243),s=r(5160),a=function(e){return function(t,r,a){var u,c=i(t),l=s(c);if(0===l)return!e&&-1;var f=o(a,l);if(e&&r!=r){for(;l>f;)if((u=c[f++])!=u)return!0}else for(;l>f;f++)if((e||f in c)&&c[f]===r)return e||f||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},7809(e,t,r){"use strict";var i=r(4550),o=r(6346),s=TypeError,a=Object.getOwnPropertyDescriptor;e.exports=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(o(e)&&!a(e,"length").writable)throw new s("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},7293(e,t,r){"use strict";var i=r(5661),o=r(7577);e.exports=function(e,t,r,s){try{return s?t(i(r)[0],r[1]):t(r)}catch(t){o(e,"throw",t)}}},3702(e,t,r){"use strict";var i=r(9090),o=i({}.toString),s=i("".slice);e.exports=function(e){return s(o(e),8,-1)}},2969(e,t,r){"use strict";var i=r(4490),o=r(1987),s=r(3702),a=r(6409)("toStringTag"),u=Object,c="Arguments"===s(function(){return arguments}()),l=function(e,t){try{return e[t]}catch(e){}};e.exports=i?s:function(e){var t,r,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=l(t=u(e),a))?r:c?s(t):"Object"===(i=s(t))&&o(t.callee)?"Arguments":i}},2593(e,t,r){"use strict";var i=r(6115),o=r(9262),s=r(4937),a=r(4403);e.exports=function(e,t,r){for(var u=o(t),c=a.f,l=s.f,f=0;f0x1fffffffffffff)throw new t("Maximum allowed index exceeded");return e}},5165(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3117(e,t,r){"use strict";var i=r(2450).navigator,o=i&&i.userAgent;e.exports=o?String(o):""},2949(e,t,r){"use strict";var i,o,s=r(2450),a=r(3117),u=s.process,c=s.Deno,l=u&&u.versions||c&&c.version,f=l&&l.v8;f&&(o=(i=f.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!o&&a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(o=+i[1]),e.exports=o},1479(e,t,r){"use strict";var i=r(9090),o=Error,s=i("".replace),a=String(new o("zxcasd").stack),u=/\n\s*at [^:]*:[^\n]*/,c=u.test(a);e.exports=function(e,t){if(c&&"string"==typeof e&&!o.prepareStackTrace)for(;t--;)e=s(e,u,"");return e}},4537(e,t,r){"use strict";var i=r(5733),o=r(1479),s=r(373),a=Error.captureStackTrace;e.exports=function(e,t,r,u){s&&(a?a(e,t):i(e,"stack",o(r,u)))}},373(e,t,r){"use strict";var i=r(6881),o=r(9762);e.exports=!i(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",o(1,7)),7!==e.stack)})},8476(e,t,r){"use strict";var i=r(2450),o=r(4937).f,s=r(5733),a=r(9842),u=r(1687),c=r(2593),l=r(6610);e.exports=function(e,t){var r,f,h,d,p,y=e.target,g=e.global,m=e.stat;if(r=g?i:m?i[y]||u(y,{}):i[y]&&i[y].prototype)for(f in t){if(d=t[f],h=e.dontCallGetSet?(p=o(r,f))&&p.value:r[f],!l(g?f:y+(m?".":"#")+f,e.forced)&&void 0!==h){if(typeof d==typeof h)continue;c(d,h)}(e.sham||h&&h.sham)&&s(d,"sham",!0),a(r,f,d,e)}}},6881(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},195(e,t,r){"use strict";var i=r(9098),o=Function.prototype,s=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(i?a.bind(s):function(){return a.apply(s,arguments)})},7594(e,t,r){"use strict";var i=r(8146),o=r(3648),s=r(9098),a=i(i.bind);e.exports=function(e,t){return o(e),void 0===t?e:s?a(e,t):function(){return e.apply(t,arguments)}}},9098(e,t,r){"use strict";e.exports=!r(6881)(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},7207(e,t,r){"use strict";var i=r(9098),o=Function.prototype.call;e.exports=i?o.bind(o):function(){return o.apply(o,arguments)}},6232(e,t,r){"use strict";var i=r(4550),o=r(6115),s=Function.prototype,a=i&&Object.getOwnPropertyDescriptor,u=o(s,"name"),c=u&&(!i||i&&a(s,"name").configurable);e.exports={EXISTS:u,PROPER:u&&"something"===(function(){}).name,CONFIGURABLE:c}},6480(e,t,r){"use strict";var i=r(9090),o=r(3648);e.exports=function(e,t,r){try{return i(o(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},8146(e,t,r){"use strict";var i=r(3702),o=r(9090);e.exports=function(e){if("Function"===i(e))return o(e)}},9090(e,t,r){"use strict";var i=r(9098),o=Function.prototype,s=o.call,a=i&&o.bind.bind(s,s);e.exports=i?a:function(e){return function(){return s.apply(e,arguments)}}},3449(e,t,r){"use strict";var i=r(2450),o=r(1987);e.exports=function(e,t){var r;return arguments.length<2?o(r=i[e])?r:void 0:i[e]&&i[e][t]}},9905(e){"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},3233(e,t,r){"use strict";var i=r(2969),o=r(5036),s=r(3271),a=r(9263),u=r(6409)("iterator");e.exports=function(e){if(!s(e))return o(e,u)||o(e,"@@iterator")||a[i(e)]}},543(e,t,r){"use strict";var i=r(7207),o=r(3648),s=r(5661),a=r(8753),u=r(3233),c=TypeError;e.exports=function(e,t){var r=arguments.length<2?u(e):t;if(o(r))return s(i(r,e));throw new c(a(e)+" is not iterable")}},5036(e,t,r){"use strict";var i=r(3648),o=r(3271);e.exports=function(e,t){var r=e[t];return o(r)?void 0:i(r)}},3027(e,t,r){"use strict";var i=r(3648),o=r(5661),s=r(7207),a=r(1173),u=r(9905),c="Invalid size",l=RangeError,f=TypeError,h=Math.max,d=function(e,t){this.set=e,this.size=h(t,0),this.has=i(e.has),this.keys=i(e.keys)};d.prototype={getIterator:function(){return u(o(s(this.keys,this.set)))},includes:function(e){return s(this.has,this.set,e)}},e.exports=function(e){o(e);var t=+e.size;if(t!=t)throw new f(c);var r=a(t);if(r<0)throw new l(c);return new d(e,r)}},2450(e){"use strict";var t=function(e){return e&&e.Math===Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||t("object"==typeof this&&this)||function(){return this}()||Function("return this")()},6115(e,t,r){"use strict";var i=r(9090),o=r(5715),s=i({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return s(o(e),t)}},5435(e){"use strict";e.exports={}},8227(e,t,r){"use strict";e.exports=r(3449)("document","documentElement")},5151(e,t,r){"use strict";var i=r(4550),o=r(6881),s=r(2049);e.exports=!i&&!o(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},6385(e,t,r){"use strict";var i=r(9090),o=r(6881),s=r(3702),a=Object,u=i("".split);e.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?u(e,""):a(e)}:a},6165(e,t,r){"use strict";var i=r(1987),o=r(6512),s=r(6009);e.exports=function(e,t,r){var a,u;return s&&i(a=t.constructor)&&a!==r&&o(u=a.prototype)&&u!==r.prototype&&s(e,u),e}},9420(e,t,r){"use strict";var i=r(9090),o=r(1987),s=r(3183),a=i(Function.toString);o(s.inspectSource)||(s.inspectSource=function(e){return a(e)}),e.exports=s.inspectSource},3978(e,t,r){"use strict";var i=r(6512),o=r(5733);e.exports=function(e,t){i(t)&&"cause"in t&&o(e,"cause",t.cause)}},4347(e,t,r){"use strict";var i,o,s,a=r(492),u=r(2450),c=r(6512),l=r(5733),f=r(6115),h=r(3183),d=r(2745),p=r(5435),y="Object already initialized",g=u.TypeError,m=u.WeakMap;if(a||h.state){var b=h.state||(h.state=new m);b.get=b.get,b.has=b.has,b.set=b.set,i=function(e,t){if(b.has(e))throw new g(y);return t.facade=e,b.set(e,t),t},o=function(e){return b.get(e)||{}},s=function(e){return b.has(e)}}else{var v=d("state");p[v]=!0,i=function(e,t){if(f(e,v))throw new g(y);return t.facade=e,l(e,v,t),t},o=function(e){return f(e,v)?e[v]:{}},s=function(e){return f(e,v)}}e.exports={set:i,get:o,has:s,enforce:function(e){return s(e)?o(e):i(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=o(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return r}}}},5243(e,t,r){"use strict";var i=r(6409),o=r(9263),s=i("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[s]===e)}},6346(e,t,r){"use strict";var i=r(3702);e.exports=Array.isArray||function(e){return"Array"===i(e)}},1987(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},6610(e,t,r){"use strict";var i=r(6881),o=r(1987),s=/#|\.prototype\./,a=function(e,t){var r=c[u(e)];return r===f||r!==l&&(o(t)?i(t):!!t)},u=a.normalize=function(e){return String(e).replace(s,".").toLowerCase()},c=a.data={},l=a.NATIVE="N",f=a.POLYFILL="P";e.exports=a},1041(e,t,r){"use strict";var i=r(2969),o=r(6115),s=r(3271),a=r(6409),u=r(9263),c=a("iterator"),l=Object;e.exports=function(e){if(s(e))return!1;var t=l(e);return void 0!==t[c]||"@@iterator"in t||o(u,i(t))}},3271(e){"use strict";e.exports=function(e){return null==e}},6512(e,t,r){"use strict";var i=r(1987);e.exports=function(e){return"object"==typeof e?null!==e:i(e)}},6855(e,t,r){"use strict";var i=r(6512);e.exports=function(e){return i(e)||null===e}},5181(e){"use strict";e.exports=!1},343(e,t,r){"use strict";var i=r(3449),o=r(1987),s=r(1095),a=r(9126),u=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=i("Symbol");return o(t)&&s(t.prototype,u(e))}},3753(e,t,r){"use strict";var i=r(7207);e.exports=function(e,t,r){for(var o,s,a=r?e:e.iterator,u=e.next;!(o=i(u,a)).done;)if(void 0!==(s=t(o.value)))return s}},6490(e,t,r){"use strict";var i=r(7594),o=r(7207),s=r(5661),a=r(8753),u=r(5243),c=r(5160),l=r(1095),f=r(543),h=r(3233),d=r(7577),p=TypeError,y=function(e,t){this.stopped=e,this.result=t},g=y.prototype;e.exports=function(e,t,r){var m,b,v,w,_,S,x,E=r&&r.that,O=!!(r&&r.AS_ENTRIES),j=!!(r&&r.IS_RECORD),k=!!(r&&r.IS_ITERATOR),T=!!(r&&r.INTERRUPTED),R=i(t,E),M=function(e){var t=m;return m=void 0,t&&d(t,"normal"),new y(!0,e)},P=function(e){return O?(s(e),T?R(e[0],e[1],M):R(e[0],e[1])):T?R(e,M):R(e)};if(j)m=e.iterator;else if(k)m=e;else{if(!(b=h(e)))throw new p(a(e)+" is not iterable");if(u(b)){for(v=0,w=c(e);w>v;v++)if((_=P(e[v]))&&l(g,_))return _;return new y(!1)}m=f(e,b)}for(S=j?e.next:m.next;!(x=o(S,m)).done;){var L=x.value;try{_=P(L)}catch(e){if(m)d(m,"throw",e);else throw e}if("object"==typeof _&&_&&l(g,_))return _}return new y(!1)}},8583(e,t,r){"use strict";var i=r(7577);e.exports=function(e,t,r){for(var o=e.length-1;o>=0;o--)if(void 0!==e[o])try{r=i(e[o].iterator,t,r)}catch(e){t="throw",r=e}if("throw"===t)throw r;return r}},7577(e,t,r){"use strict";var i=r(7207),o=r(5661),s=r(5036);e.exports=function(e,t,r){var a,u;o(e);try{if(!(a=s(e,"return"))){if("throw"===t)throw r;return r}a=i(a,e)}catch(e){u=!0,a=e}if("throw"===t)throw r;if(u)throw a;return o(a),r}},8700(e,t,r){"use strict";var i=r(7207),o=r(34),s=r(5733),a=r(961),u=r(6409),c=r(4347),l=r(5036),f=r(6563).IteratorPrototype,h=r(5063),d=r(7577),p=r(8583),y=u("toStringTag"),g="IteratorHelper",m="WrapForValidIterator",b="normal",v="throw",w=c.set,_=function(e){var t=c.getterFor(e?m:g);return a(o(f),{next:function(){var r=t(this);if(e)return r.nextHandler();if(r.done)return h(void 0,!0);try{var i=r.nextHandler();return r.returnHandlerResult?i:h(i,r.done)}catch(e){throw r.done=!0,e}},return:function(){var r=t(this),o=r.iterator,s=r.done;if(r.done=!0,e){var a=l(o,"return");return a?i(a,o):h(void 0,!0)}if(s)return h(void 0,!0);if(r.inner)try{d(r.inner.iterator,b)}catch(e){return d(o,v,e)}if(r.openIters)try{p(r.openIters,b)}catch(e){if(o)return d(o,v,e);throw e}return o&&d(o,b),h(void 0,!0)}})},S=_(!0),x=_(!1);s(x,y,"Iterator Helper"),e.exports=function(e,t,r){var i=function(i,o){o?(o.iterator=i.iterator,o.next=i.next):o=i,o.type=t?m:g,o.returnHandlerResult=!!r,o.nextHandler=e,o.counter=0,o.done=!1,w(this,o)};return i.prototype=t?S:x,i}},7110(e){"use strict";e.exports=function(e,t){var r="function"==typeof Iterator&&Iterator.prototype[e];if(r)try{r.call({next:null},t).next()}catch(e){return!0}}},4635(e,t,r){"use strict";var i=r(2450);e.exports=function(e,t){var r=i.Iterator,o=r&&r.prototype,s=o&&o[e],a=!1;if(s)try{s.call({next:function(){return{done:!0}},return:function(){a=!0}},-1)}catch(e){e instanceof t||(a=!1)}if(!a)return s}},6563(e,t,r){"use strict";var i,o,s,a=r(6881),u=r(1987),c=r(6512),l=r(34),f=r(9925),h=r(9842),d=r(6409),p=r(5181),y=d("iterator"),g=!1;[].keys&&("next"in(s=[].keys())?(o=f(f(s)))!==Object.prototype&&(i=o):g=!0),!c(i)||a(function(){var e={};return i[y].call(e)!==e})?i={}:p&&(i=l(i)),u(i[y])||h(i,y,function(){return this}),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:g}},9263(e){"use strict";e.exports={}},5160(e,t,r){"use strict";var i=r(9132);e.exports=function(e){return i(e.length)}},5713(e,t,r){"use strict";var i=r(9090),o=r(6881),s=r(1987),a=r(6115),u=r(4550),c=r(6232).CONFIGURABLE,l=r(9420),f=r(4347),h=f.enforce,d=f.get,p=String,y=Object.defineProperty,g=i("".slice),m=i("".replace),b=i([].join),v=u&&!o(function(){return 8!==y(function(){},"length",{value:8}).length}),w=String(String).split("String"),_=e.exports=function(e,t,r){"Symbol("===g(p(t),0,7)&&(t="["+m(p(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!a(e,"name")||c&&e.name!==t)&&(u?y(e,"name",{value:t,configurable:!0}):e.name=t),v&&r&&a(r,"arity")&&e.length!==r.arity&&y(e,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?u&&y(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var i=h(e);return a(i,"source")||(i.source=b(w,"string"==typeof t?t:"")),e};Function.prototype.toString=_(function(){return s(this)&&d(this).source||l(this)},"toString")},5045(e,t,r){"use strict";var i=r(9090),o=Map.prototype;e.exports={Map:Map,set:i(o.set),get:i(o.get),has:i(o.has),remove:i(o.delete),proto:o}},3941(e,t,r){"use strict";var i=r(9090),o=r(3753),s=r(5045),a=s.Map,u=s.proto,c=i(u.forEach),l=i(u.entries),f=l(new a).next;e.exports=function(e,t,r){return r?o({iterator:l(e),next:f},function(e){return t(e[1],e[0])}):c(e,t)}},4447(e){"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var i=+e;return(i>0?r:t)(i)}},4681(e,t,r){"use strict";var i=r(7901);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:i(e)}},34(e,t,r){"use strict";var i,o=r(5661),s=r(2911),a=r(5165),u=r(5435),c=r(8227),l=r(2049),f=r(2745),h="prototype",d="script",p=f("IE_PROTO"),y=function(){},g=function(e){return"<"+d+">"+e+""},m=function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){var e,t=l("iframe");return t.style.display="none",c.appendChild(t),t.src=String("java"+d+":"),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F},v=function(){try{i=new ActiveXObject("htmlfile")}catch(e){}v="u">typeof document?document.domain&&i?m(i):b():m(i);for(var e=a.length;e--;)delete v[h][a[e]];return v()};u[p]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(y[h]=o(e),r=new y,y[h]=null,r[p]=e):r=v(),void 0===t?r:s.f(r,t)}},2911(e,t,r){"use strict";var i=r(4550),o=r(3952),s=r(4403),a=r(5661),u=r(9303),c=r(4690);t.f=i&&!o?Object.defineProperties:function(e,t){a(e);for(var r,i=u(t),o=c(t),l=o.length,f=0;l>f;)s.f(e,r=o[f++],i[r]);return e}},4403(e,t,r){"use strict";var i=r(4550),o=r(5151),s=r(3952),a=r(5661),u=r(4671),c=TypeError,l=Object.defineProperty,f=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",p="writable";t.f=i?s?function(e,t,r){if(a(e),t=u(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&p in r&&!r[p]){var i=f(e,t);i&&i[p]&&(e[t]=r.value,r={configurable:d in r?r[d]:i[d],enumerable:h in r?r[h]:i[h],writable:!1})}return l(e,t,r)}:l:function(e,t,r){if(a(e),t=u(t),a(r),o)try{return l(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new c("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},4937(e,t,r){"use strict";var i=r(4550),o=r(7207),s=r(7027),a=r(9762),u=r(9303),c=r(4671),l=r(6115),f=r(5151),h=Object.getOwnPropertyDescriptor;t.f=i?h:function(e,t){if(e=u(e),t=c(t),f)try{return h(e,t)}catch(e){}if(l(e,t))return a(!o(s.f,e,t),e[t])}},7822(e,t,r){"use strict";var i=r(7774),o=r(5165).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,o)}},6259(e,t){"use strict";t.f=Object.getOwnPropertySymbols},9925(e,t,r){"use strict";var i=r(6115),o=r(1987),s=r(5715),a=r(2745),u=r(7897),c=a("IE_PROTO"),l=Object,f=l.prototype;e.exports=u?l.getPrototypeOf:function(e){var t=s(e);if(i(t,c))return t[c];var r=t.constructor;return o(r)&&t instanceof r?r.prototype:t instanceof l?f:null}},1095(e,t,r){"use strict";e.exports=r(9090)({}.isPrototypeOf)},7774(e,t,r){"use strict";var i=r(9090),o=r(6115),s=r(9303),a=r(3139).indexOf,u=r(5435),c=i([].push);e.exports=function(e,t){var r,i=s(e),l=0,f=[];for(r in i)!o(u,r)&&o(i,r)&&c(f,r);for(;t.length>l;)o(i,r=t[l++])&&(~a(f,r)||c(f,r));return f}},4690(e,t,r){"use strict";var i=r(7774),o=r(5165);e.exports=Object.keys||function(e){return i(e,o)}},7027(e,t){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor;t.f=i&&!r.call({1:2},1)?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},6009(e,t,r){"use strict";var i=r(6480),o=r(6512),s=r(5624),a=r(6308);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=i(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,i){return s(r),a(i),o(r)&&(t?e(r,i):r.__proto__=i),r}}():void 0)},5236(e,t,r){"use strict";var i=r(7207),o=r(1987),s=r(6512),a=TypeError;e.exports=function(e,t){var r,u;if("string"===t&&o(r=e.toString)&&!s(u=i(r,e))||o(r=e.valueOf)&&!s(u=i(r,e))||"string"!==t&&o(r=e.toString)&&!s(u=i(r,e)))return u;throw new a("Can't convert object to primitive value")}},9262(e,t,r){"use strict";var i=r(3449),o=r(9090),s=r(7822),a=r(6259),u=r(5661),c=o([].concat);e.exports=i("Reflect","ownKeys")||function(e){var t=s.f(u(e)),r=a.f;return r?c(t,r(e)):t}},2090(e,t,r){"use strict";var i=r(9090),o=r(6115),s=SyntaxError,a=parseInt,u=String.fromCharCode,c=i("".charAt),l=i("".slice),f=i(/./.exec),h={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":` +`,"\\r":`\r`,"\\t":" "},d=/^[\da-f]{4}$/i,p=/^[\u0000-\u001F]$/;e.exports=function(e,t){for(var r=!0,i="";tr.size?c(r.getIterator(),function(e){h(t,e)&&f(o,e)}):u(t,function(e){r.includes(e)&&f(o,e)}),o}},5027(e,t,r){"use strict";var i=r(8654),o=r(3016).has,s=r(8172),a=r(3027),u=r(7791),c=r(3753),l=r(7577);e.exports=function(e){var t=i(this),r=a(e);if(s(t)<=r.size)return!1!==u(t,function(e){if(r.includes(e))return!1},!0);var f=r.getIterator();return!1!==c(f,function(e){if(o(t,e))return l(f.iterator,"normal",!1)})}},504(e,t,r){"use strict";var i=r(8654),o=r(8172),s=r(7791),a=r(3027);e.exports=function(e){var t=i(this),r=a(e);return!(o(t)>r.size)&&!1!==s(t,function(e){if(!r.includes(e))return!1},!0)}},5809(e,t,r){"use strict";var i=r(8654),o=r(3016).has,s=r(8172),a=r(3027),u=r(3753),c=r(7577);e.exports=function(e){var t=i(this),r=a(e);if(s(t)0?o(t,0x1fffffffffffff):0}},5715(e,t,r){"use strict";var i=r(5624),o=Object;e.exports=function(e){return o(i(e))}},7931(e,t,r){"use strict";var i=r(7207),o=r(6512),s=r(343),a=r(5036),u=r(5236),c=r(6409),l=TypeError,f=c("toPrimitive");e.exports=function(e,t){if(!o(e)||s(e))return e;var r,c=a(e,f);if(c){if(void 0===t&&(t="default"),!o(r=i(c,e,t))||s(r))return r;throw new l("Can't convert object to primitive value")}return void 0===t&&(t="number"),u(e,t)}},4671(e,t,r){"use strict";var i=r(7931),o=r(343);e.exports=function(e){var t=i(e,"string");return o(t)?t:t+""}},4752(e,t,r){"use strict";var i=r(3449),o=r(1987),s=r(1041),a=r(6512),u=i("Set");e.exports=function(e){return a(e)&&"number"==typeof e.size&&o(e.has)&&o(e.keys)?e:s(e)?new u(e):e}},4490(e,t,r){"use strict";var i=r(6409)("toStringTag"),o={};o[i]="z",e.exports="[object z]"===String(o)},7901(e,t,r){"use strict";var i=r(2969),o=String;e.exports=function(e){if("Symbol"===i(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},8753(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},4658(e,t,r){"use strict";var i=r(9090),o=0,s=Math.random(),a=i(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+s,36)}},9126(e,t,r){"use strict";e.exports=r(5717)&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3952(e,t,r){"use strict";var i=r(4550),o=r(6881);e.exports=i&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},4090(e){"use strict";var t=TypeError;e.exports=function(e,r){if(ev&&d(i,arguments[v]),i});if(O.prototype=x,"Error"!==_?u?u(O,E):c(O,E,{name:!0}):y&&b in S&&(l(O,S,b),l(O,S,"prepareStackTrace")),c(O,S),!g)try{x.name!==_&&s(x,"name",_),x.constructor=O}catch(e){}return O}}},7924(e,t,r){"use strict";var i=r(8476),o=r(5715),s=r(5160),a=r(7809),u=r(4651);i({target:"Array",proto:!0,arity:1,forced:r(6881)(function(){return 0x100000001!==[].push.call({length:0x100000000},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=o(this),r=s(t),i=arguments.length;u(r+i);for(var c=0;c1;return e.has(1)&&e.clear(),{done:r,value:2}}}}}).size})},{difference:o})},1214(e,t,r){"use strict";var i=r(8476),o=r(6881),s=r(2568);i({target:"Set",proto:!0,real:!0,forced:!r(6914)("intersection",function(e){return 2===e.size&&e.has(1)&&e.has(2)})||o(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:s})},1079(e,t,r){"use strict";var i=r(8476),o=r(5027);i({target:"Set",proto:!0,real:!0,forced:!r(6914)("isDisjointFrom",function(e){return!e})},{isDisjointFrom:o})},2862(e,t,r){"use strict";var i=r(8476),o=r(504);i({target:"Set",proto:!0,real:!0,forced:!r(6914)("isSubsetOf",function(e){return e})},{isSubsetOf:o})},5941(e,t,r){"use strict";var i=r(8476),o=r(5809);i({target:"Set",proto:!0,real:!0,forced:!r(6914)("isSupersetOf",function(e){return!e})},{isSupersetOf:o})},8506(e,t,r){"use strict";var i=r(8476),o=r(2724),s=r(9877);i({target:"Set",proto:!0,real:!0,forced:!r(6914)("symmetricDifference")||!s("symmetricDifference")},{symmetricDifference:o})},2292(e,t,r){"use strict";var i=r(8476),o=r(7574),s=r(9877);i({target:"Set",proto:!0,real:!0,forced:!r(6914)("union")||!s("union")},{union:o})},9014(e,t,r){"use strict";r(9833)},8074(e,t,r){"use strict";r(8111)},9451(e,t,r){"use strict";r(1634)},6815(e,t,r){"use strict";r(2674)},8308(e,t,r){"use strict";r(4111)},594(e,t,r){"use strict";r(6979)},4472(e,t,r){"use strict";r(4361)},4825(e,t,r){"use strict";r(8046)},7407(e,t,r){"use strict";var i=r(8476),o=r(9164),s=r(5045).remove;i({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=o(this),r=!0,i=0,a=arguments.length;i1?arguments[1]:void 0);return!1!==a(t,function(e,i){if(!r(e,i,t))return!1},!0)}})},5720(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(9164),a=r(5045),u=r(3941),c=a.Map,l=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new c;return u(t,function(e,o){r(e,o,t)&&l(i,o,e)}),i}})},8679(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(9164),a=r(3941);i({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=a(t,function(e,i){if(r(e,i,t))return{key:i}},!0);return i&&i.key}})},7729(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(9164),a=r(3941);i({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=a(t,function(e,i){if(r(e,i,t))return{value:e}},!0);return i&&i.value}})},1559(e,t,r){"use strict";var i=r(8476),o=r(2915),s=r(9164),a=r(3941);i({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===a(s(this),function(t){if(o(t,e))return!0},!0)}})},9109(e,t,r){"use strict";var i=r(8476),o=r(9164),s=r(3941);i({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=s(o(this),function(t,r){if(t===e)return{key:r}},!0);return t&&t.key}})},1475(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(9164),a=r(5045),u=r(3941),c=a.Map,l=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new c;return u(t,function(e,o){l(i,r(e,o,t),e)}),i}})},8625(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(9164),a=r(5045),u=r(3941),c=a.Map,l=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new c;return u(t,function(e,o){l(i,o,r(e,o,t))}),i}})},7480(e,t,r){"use strict";var i=r(8476),o=r(9164),s=r(6490),a=r(5045).set;i({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=o(this),r=arguments.length,i=0;i1?arguments[1]:void 0);return!0===a(t,function(e,i){if(r(e,i,t))return!0},!0)}})},6911(e,t,r){"use strict";var i=r(8476),o=r(3648),s=r(9164),a=r(5045),u=TypeError,c=a.get,l=a.has,f=a.set;i({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=s(this),i=arguments.length;o(t);var a=l(r,e);if(!a&&i<3)throw new u("Updating absent value");var h=a?c(r,e):o(i>2?arguments[2]:void 0)(e,r);return f(r,e,t(h,e,r)),r}})},8399(e,t,r){"use strict";var i=r(8476),o=r(8654),s=r(3016).add;i({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var e=o(this),t=0,r=arguments.length;t1?arguments[1]:void 0);return!1!==a(t,function(e){if(!r(e,e,t))return!1},!0)}})},1286(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(8654),a=r(3016),u=r(7791),c=a.Set,l=a.add;i({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new c;return u(t,function(e){r(e,e,t)&&l(i,e)}),i}})},751(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(8654),a=r(7791);i({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=a(t,function(e){if(r(e,e,t))return{value:e}},!0);return i&&i.value}})},9529(e,t,r){"use strict";var i=r(8476),o=r(7207),s=r(4752),a=r(2568);i({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return o(a,this,s(e))}})},4503(e,t,r){"use strict";r(1214)},9610(e,t,r){"use strict";var i=r(8476),o=r(7207),s=r(4752),a=r(5027);i({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return o(a,this,s(e))}})},3965(e,t,r){"use strict";r(1079)},169(e,t,r){"use strict";var i=r(8476),o=r(7207),s=r(4752),a=r(504);i({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return o(a,this,s(e))}})},7015(e,t,r){"use strict";r(2862)},3848(e,t,r){"use strict";var i=r(8476),o=r(7207),s=r(4752),a=r(5809);i({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return o(a,this,s(e))}})},3888(e,t,r){"use strict";r(5941)},5760(e,t,r){"use strict";var i=r(8476),o=r(9090),s=r(8654),a=r(7791),u=r(7901),c=o([].join),l=o([].push);i({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=s(this),r=void 0===e?",":u(e),i=[];return a(t,function(e){l(i,e)}),c(i,r)}})},80(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(8654),a=r(3016),u=r(7791),c=a.Set,l=a.add;i({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0),i=new c;return u(t,function(e){l(i,r(e,e,t))}),i}})},3854(e,t,r){"use strict";var i=r(8476),o=r(3648),s=r(8654),a=r(7791),u=TypeError;i({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=s(this),r=arguments.length<2,i=r?void 0:arguments[1];if(o(e),a(t,function(o){r?(r=!1,i=o):i=e(i,o,o,t)}),r)throw new u("Reduce of empty set with no initial value");return i}})},3116(e,t,r){"use strict";var i=r(8476),o=r(7594),s=r(8654),a=r(7791);i({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=s(this),r=o(e,arguments.length>1?arguments[1]:void 0);return!0===a(t,function(e){if(r(e,e,t))return!0},!0)}})},5481(e,t,r){"use strict";var i=r(8476),o=r(7207),s=r(4752),a=r(2724);i({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return o(a,this,s(e))}})},6615(e,t,r){"use strict";r(8506)},3685(e,t,r){"use strict";var i=r(8476),o=r(7207),s=r(4752),a=r(7574);i({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return o(a,this,s(e))}})},4827(e,t,r){"use strict";r(2292)},3409(e,t,r){"use strict";var i=r(9842),o=r(9090),s=r(7901),a=r(4090),u=URLSearchParams,c=u.prototype,l=o(c.append),f=o(c.delete),h=o(c.forEach),d=o([].push),p=new u("a=1&a=2&b=3");p.delete("a",1),p.delete("b",void 0),p+""!="a=2"&&i(c,"delete",function(e){var t,r=arguments.length,i=r<2?void 0:arguments[1];if(r&&void 0===i)return f(this,e);var o=[];h(this,function(e,t){d(o,{key:t,value:e})}),a(r,1);for(var u=s(e),c=s(i),p=0,y=o.length;p{"use strict";r(9014),r(8308),r(4825),r(4472);let{getManagedCacheStorage:e,CacheStorageGroup:t}=r(755),i=r(7016).parse;r(4473).disable=!0;let o=r(2413).PROVIDERS,s=e("bridge");s.aliveDuration=9e5;let a=t.getInstance();setInterval(()=>{a.cleanup()},9e5),r(8611).createServer().listen(parseInt(process.argv[2])||9e3).on("request",(e,t)=>{let r;return(r=i(e.url),Promise.resolve().then(()=>{let e=r.pathname.slice(1).split("/").map(e=>decodeURIComponent(e)),t=o,i=decodeURIComponent(r.query);try{i=JSON.parse(i)}catch(e){}return e.some(e=>{if(!(e in t))return!0;t=t[e]})||"function"!=typeof t?Promise.reject():s.cache(i,()=>t(i))})).then(e=>t.write(e)).catch(()=>t.writeHead(404)).then(()=>t.end())})})()})(); \ No newline at end of file diff --git a/precompiled/bridge.js.LICENSE.txt b/precompiled/bridge.js.LICENSE.txt new file mode 100644 index 0000000000..21d6cb0887 --- /dev/null +++ b/precompiled/bridge.js.LICENSE.txt @@ -0,0 +1 @@ +/*! safe-buffer. MIT License. Feross Aboukhadijeh */