@mservices-tech/scripts 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +153 -0
- package/LICENSE +7 -0
- package/README.md +56 -0
- package/add_sandbox_upstream/add_sandbox_upstream.sh +32 -0
- package/buildUsingEsbuild/buildUsingEsbuild.js +54 -0
- package/bump_version/.versionrc.js +20 -0
- package/bump_version/bump_version.sh +93 -0
- package/clean/clean.sh +61 -0
- package/copy_package_build_to_project/copy_package_build_to_project.sh +46 -0
- package/delete_and_fetch_git_tags/delete_and_fetch_git_tags.sh +35 -0
- package/docker/docker.sh +68 -0
- package/docker/docker_utils.sh +143 -0
- package/download_design_system_package/download_design_system_package.sh +41 -0
- package/enrich_changelog_with_dependency_changes/enrich_changelog_with_dependency_changes.sh +289 -0
- package/find_all_javascript_files/find_all_javascript_files.sh +76 -0
- package/find_and_parse_environmental_variable_files/find_and_parse_environmental_variable_files.sh +180 -0
- package/find_references/find_references.sh +50 -0
- package/generateIndexFilesFromTemplate/generateIndexFilesFromTemplate.js +419 -0
- package/get_package_info/get_package_info.sh +103 -0
- package/git_user_stats/git_user_stats.sh +95 -0
- package/index.js +1 -0
- package/is_branch_rebased/is_branch_rebased.sh +44 -0
- package/last_release_commits/last_release_commits.sh +101 -0
- package/list_all_installed_dependencies/list_all_installed_dependencies.sh +40 -0
- package/package.json +14 -0
- package/prepare_obligatory_package_files/prepare_obligatory_package_files.sh +61 -0
- package/publish/publish.sh +89 -0
- package/removeGitHashesFromMarkdownFile/removeGitHashesFromMarkdownFile.js +50 -0
- package/remove_all_node_modules/remove_all_node_modules.sh +26 -0
- package/remove_all_scripts_in_single_workspace/remove_all_scripts_in_single_workspace.sh +62 -0
- package/reverse_proxy/README.md +102 -0
- package/reverse_proxy/clean.sh +8 -0
- package/reverse_proxy/configuration.sh +5 -0
- package/reverse_proxy/generate_certificates.sh +140 -0
- package/reverse_proxy/localhost.ext.template +12 -0
- package/reverse_proxy/nginx_domain_ssl_reverse_proxy.conf.template +89 -0
- package/reverse_proxy/openssl.conf +21 -0
- package/reverse_proxy/reverse_proxy.sh +48 -0
- package/runShellScript/runShellScript.js +49 -0
- package/source_environment_variables/source_environment_variables.sh +38 -0
- package/sync_sandbox_with_upstream/sync_sandbox_with_upstream.sh +53 -0
- package/testIncorrectValues/testIncorrectValues.js +51 -0
- package/typescript_usage_statistics/typescript_usage_statistics.sh +35 -0
- package/utils.sh +337 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";var dc=Object.create;var ps=Object.defineProperty;var pc=Object.getOwnPropertyDescriptor;var gc=Object.getOwnPropertyNames;var mc=Object.getPrototypeOf,vc=Object.prototype.hasOwnProperty;var c=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var yc=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of gc(e))!vc.call(t,i)&&i!==r&&ps(t,i,{get:()=>e[i],enumerable:!(n=pc(e,i))||n.enumerable});return t};var Se=(t,e,r)=>(r=t!=null?dc(mc(t)):{},yc(e||!t||!t.__esModule?ps(r,"default",{value:t,enumerable:!0}):r,t));var ee=c((Jv,Rs)=>{"use strict";var bn=class t extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)
|
|
3
|
+
Found: ${e.toString().split(`
|
|
4
|
+
`)[0]}
|
|
5
|
+
`),Error.captureStackTrace(this,t)}};Rs.exports=t=>{if(t.length>2)throw new bn(t);function e(n={}){this.options=n}e.prototype.transform=t;function r(n){return new e(n)}return r.Format=e,r}});var Ps=c((Zv,qs)=>{var As={};qs.exports=As;var Ts={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(Ts).forEach(function(t){var e=Ts[t],r=As[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m"})});var js=c((Qv,Cs)=>{"use strict";Cs.exports=function(t,e){e=e||process.argv||[];var r=e.indexOf("--"),n=/^-{1,2}/.test(t)?"":"--",i=e.indexOf(n+t);return i!==-1&&(r===-1?!0:i<r)}});var Ns=c((Xv,Ls)=>{"use strict";var Pc=require("os"),he=js(),Q=process.env,Xe=void 0;he("no-color")||he("no-colors")||he("color=false")?Xe=!1:(he("color")||he("colors")||he("color=true")||he("color=always"))&&(Xe=!0);"FORCE_COLOR"in Q&&(Xe=Q.FORCE_COLOR.length===0||parseInt(Q.FORCE_COLOR,10)!==0);function Cc(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function jc(t){if(Xe===!1)return 0;if(he("color=16m")||he("color=full")||he("color=truecolor"))return 3;if(he("color=256"))return 2;if(t&&!t.isTTY&&Xe!==!0)return 0;var e=Xe?1:0;if(process.platform==="win32"){var r=Pc.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Q)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(i){return i in Q})||Q.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in Q)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Q.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in Q){var n=parseInt((Q.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Q.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Q.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(Q.TERM)||"COLORTERM"in Q?1:(Q.TERM==="dumb",e)}function wn(t){var e=jc(t);return Cc(e)}Ls.exports={supportsColor:wn,stdout:wn(process.stdout),stderr:wn(process.stderr)}});var Ds=c((e1,Fs)=>{Fs.exports=function(e,r){var n="";e=e||"Run the trap, drop the bass",e=e.split("");var i={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return e.forEach(function(s){s=s.toLowerCase();var a=i[s]||[" "],o=Math.floor(Math.random()*a.length);typeof i[s]<"u"?n+=i[s][o]:n+=s}),n}});var ks=c((t1,$s)=>{$s.exports=function(e,r){e=e||" he is here ";var n={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},i=[].concat(n.up,n.down,n.mid);function s(u){var l=Math.floor(Math.random()*u);return l}function a(u){var l=!1;return i.filter(function(h){l=h===u}),l}function o(u,l){var h="",d,g;l=l||{},l.up=typeof l.up<"u"?l.up:!0,l.mid=typeof l.mid<"u"?l.mid:!0,l.down=typeof l.down<"u"?l.down:!0,l.size=typeof l.size<"u"?l.size:"maxi",u=u.split("");for(g in u)if(!a(g)){switch(h=h+u[g],d={up:0,down:0,mid:0},l.size){case"mini":d.up=s(8),d.mid=s(2),d.down=s(8);break;case"maxi":d.up=s(16)+3,d.mid=s(4)+1,d.down=s(64)+3;break;default:d.up=s(8)+1,d.mid=s(6)/2,d.down=s(8)+1;break}var v=["up","mid","down"];for(var f in v)for(var m=v[f],E=0;E<=d[m];E++)l[m]&&(h=h+n[m][s(n[m].length)])}return h}return o(e,r)}});var Bs=c((r1,Is)=>{Is.exports=function(t){return function(e,r,n){if(e===" ")return e;switch(r%3){case 0:return t.red(e);case 1:return t.white(e);case 2:return t.blue(e)}}}});var Ws=c((n1,Gs)=>{Gs.exports=function(t){return function(e,r,n){return r%2===0?e:t.inverse(e)}}});var Us=c((i1,Hs)=>{Hs.exports=function(t){var e=["red","yellow","green","blue","magenta"];return function(r,n,i){return r===" "?r:t[e[n++%e.length]](r)}}});var Ys=c((s1,zs)=>{zs.exports=function(t){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(r,n,i){return r===" "?r:t[e[Math.round(Math.random()*(e.length-2))]](r)}}});var Xs=c((o1,Qs)=>{var A={};Qs.exports=A;A.themes={};var Lc=require("util"),Ne=A.styles=Ps(),Ks=Object.defineProperties,Nc=new RegExp(/[\r\n]+/g);A.supportsColor=Ns().supportsColor;typeof A.enabled>"u"&&(A.enabled=A.supportsColor()!==!1);A.enable=function(){A.enabled=!0};A.disable=function(){A.enabled=!1};A.stripColors=A.strip=function(t){return(""+t).replace(/\x1B\[\d+m/g,"")};var a1=A.stylize=function(e,r){if(!A.enabled)return e+"";var n=Ne[r];return!n&&r in A?A[r](e):n.open+e+n.close},Fc=/[|\\{}()[\]^$+*?.]/g,Dc=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(Fc,"\\$&")};function Js(t){var e=function r(){return kc.apply(r,arguments)};return e._styles=t,e.__proto__=$c,e}var Zs=function(){var t={};return Ne.grey=Ne.gray,Object.keys(Ne).forEach(function(e){Ne[e].closeRe=new RegExp(Dc(Ne[e].close),"g"),t[e]={get:function(){return Js(this._styles.concat(e))}}}),t}(),$c=Ks(function(){},Zs);function kc(){var t=Array.prototype.slice.call(arguments),e=t.map(function(a){return a!=null&&a.constructor===String?a:Lc.inspect(a)}).join(" ");if(!A.enabled||!e)return e;for(var r=e.indexOf(`
|
|
6
|
+
`)!=-1,n=this._styles,i=n.length;i--;){var s=Ne[n[i]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(Nc,function(a){return s.close+a+s.open}))}return e}A.setTheme=function(t){if(typeof t=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in t)(function(r){A[r]=function(n){if(typeof t[r]=="object"){var i=n;for(var s in t[r])i=A[t[r][s]](i);return i}return A[t[r]](n)}})(e)};function Ic(){var t={};return Object.keys(Zs).forEach(function(e){t[e]={get:function(){return Js([e])}}}),t}var Bc=function(e,r){var n=r.split("");return n=n.map(e),n.join("")};A.trap=Ds();A.zalgo=ks();A.maps={};A.maps.america=Bs()(A);A.maps.zebra=Ws()(A);A.maps.rainbow=Us()(A);A.maps.random=Ys()(A);for(Vs in A.maps)(function(t){A[t]=function(e){return Bc(A.maps[t],e)}})(Vs);var Vs;Ks(A,Ic())});var _n=c((u1,ea)=>{var Gc=Xs();ea.exports=Gc});var ta=c(En=>{"use strict";En.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};En.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var ra=c(Sn=>{"use strict";Sn.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};Sn.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var na=c(xn=>{"use strict";xn.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};xn.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var ia=c(rr=>{"use strict";Object.defineProperty(rr,"cli",{value:ta()});Object.defineProperty(rr,"npm",{value:ra()});Object.defineProperty(rr,"syslog",{value:na()})});var W=c(yt=>{"use strict";Object.defineProperty(yt,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(yt,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(yt,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(yt,"configs",{value:ia()})});var sr=c((p1,ir)=>{"use strict";var Rn=_n(),{LEVEL:On,MESSAGE:Mn}=W();Rn.enabled=!0;var sa=/\s+/,nr=class t{constructor(e={}){e.colors&&this.addColors(e.colors),this.options=e}static addColors(e){let r=Object.keys(e).reduce((n,i)=>(n[i]=sa.test(e[i])?e[i].split(sa):e[i],n),{});return t.allColors=Object.assign({},t.allColors||{},r),t.allColors}addColors(e){return t.addColors(e)}colorize(e,r,n){if(typeof n>"u"&&(n=r),!Array.isArray(t.allColors[e]))return Rn[t.allColors[e]](n);for(let i=0,s=t.allColors[e].length;i<s;i++)n=Rn[t.allColors[e][i]](n);return n}transform(e,r){return r.all&&typeof e[Mn]=="string"&&(e[Mn]=this.colorize(e[On],e.level,e[Mn])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[On],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[On],e.level,e.message)),e}};ir.exports=t=>new nr(t);ir.exports.Colorizer=ir.exports.Format=nr});var oa=c((g1,aa)=>{"use strict";var{Colorizer:Wc}=sr();aa.exports=t=>(Wc.addColors(t.colors||t),t)});var la=c((m1,ua)=>{"use strict";var Hc=ee();ua.exports=Hc(t=>(t.message=` ${t.message}`,t))});var ha=c((v1,ca)=>{"use strict";var Uc=ee(),{LEVEL:fa,MESSAGE:Tn}=W();ca.exports=Uc((t,{stack:e,cause:r})=>{if(t instanceof Error){let i=Object.assign({},t,{level:t.level,[fa]:t[fa]||t.level,message:t.message,[Tn]:t[Tn]||t.message});return e&&(i.stack=t.stack),r&&(i.cause=t.cause),i}if(!(t.message instanceof Error))return t;let n=t.message;return Object.assign(t,n),t.message=n.message,t[Tn]=n.message,e&&(t.stack=n.stack),r&&(t.cause=n.cause),t})});var qn=c((y1,or)=>{"use strict";var{configs:zc,LEVEL:da,MESSAGE:An}=W(),ar=class t{constructor(e={levels:zc.npm.levels}){this.paddings=t.paddingForLevels(e.levels,e.filler),this.options=e}static getLongestLevel(e){let r=Object.keys(e).map(n=>n.length);return Math.max(...r)}static paddingForLevel(e,r,n){let i=n+1-e.length,s=Math.floor(i/r.length);return`${r}${r.repeat(s)}`.slice(0,i)}static paddingForLevels(e,r=" "){let n=t.getLongestLevel(e);return Object.keys(e).reduce((i,s)=>(i[s]=t.paddingForLevel(s,r,n),i),{})}transform(e,r){return e.message=`${this.paddings[e[da]]}${e.message}`,e[An]&&(e[An]=`${this.paddings[e[da]]}${e[An]}`),e}};or.exports=t=>new ar(t);or.exports.Padder=or.exports.Format=ar});var pa=c((b1,Pn)=>{"use strict";var{Colorizer:Yc}=sr(),{Padder:Vc}=qn(),{configs:Kc,MESSAGE:Jc}=W(),ur=class{constructor(e={}){e.levels||(e.levels=Kc.cli.levels),this.colorizer=new Yc(e),this.padder=new Vc(e),this.options=e}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[Jc]=`${e.level}:${e.message}`,e}};Pn.exports=t=>new ur(t);Pn.exports.Format=ur});var ma=c((w1,Cn)=>{"use strict";var Zc=ee();function ga(t){if(t.every(Qc))return e=>{let r=e;for(let n=0;n<t.length;n++)if(r=t[n].transform(r,t[n].options),!r)return!1;return r}}function Qc(t){if(typeof t.transform!="function")throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
|
|
7
|
+
`));return!0}Cn.exports=(...t)=>{let e=Zc(ga(t)),r=e();return r.Format=e.Format,r};Cn.exports.cascade=ga});var wt=c((Fn,ba)=>{"use strict";var{hasOwnProperty:bt}=Object.prototype,De=Nn();De.configure=Nn;De.stringify=De;De.default=De;Fn.stringify=De;Fn.configure=Nn;ba.exports=De;var Xc=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function Me(t){return t.length<5e3&&!Xc.test(t)?`"${t}"`:JSON.stringify(t)}function jn(t,e){if(t.length>200||e)return t.sort(e);for(let r=1;r<t.length;r++){let n=t[r],i=r;for(;i!==0&&t[i-1]>n;)t[i]=t[i-1],i--;t[i]=n}return t}var eh=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Ln(t){return eh.call(t)!==void 0&&t.length!==0}function va(t,e,r){t.length<r&&(r=t.length);let n=e===","?"":" ",i=`"0":${n}${t[0]}`;for(let s=1;s<r;s++)i+=`${e}"${s}":${n}${t[s]}`;return i}function th(t){if(bt.call(t,"circularValue")){let e=t.circularValue;if(typeof e=="string")return`"${e}"`;if(e==null)return e;if(e===Error||e===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function rh(t){let e;if(bt.call(t,"deterministic")&&(e=t.deterministic,typeof e!="boolean"&&typeof e!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return e===void 0?!0:e}function nh(t,e){let r;if(bt.call(t,e)&&(r=t[e],typeof r!="boolean"))throw new TypeError(`The "${e}" argument must be of type boolean`);return r===void 0?!0:r}function ya(t,e){let r;if(bt.call(t,e)){if(r=t[e],typeof r!="number")throw new TypeError(`The "${e}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${e}" argument must be an integer`);if(r<1)throw new RangeError(`The "${e}" argument must be >= 1`)}return r===void 0?1/0:r}function Fe(t){return t===1?"1 item":`${t} items`}function ih(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function sh(t){if(bt.call(t,"strict")){let e=t.strict;if(typeof e!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(e)return r=>{let n=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(n+=` (${r.toString()})`),new Error(n)}}}function Nn(t){t={...t};let e=sh(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let r=th(t),n=nh(t,"bigint"),i=rh(t),s=typeof i=="function"?i:void 0,a=ya(t,"maximumDepth"),o=ya(t,"maximumBreadth");function u(v,f,m,E,y,_){let b=f[v];switch(typeof b=="object"&&b!==null&&typeof b.toJSON=="function"&&(b=b.toJSON(v)),b=E.call(f,v,b),typeof b){case"string":return Me(b);case"object":{if(b===null)return"null";if(m.indexOf(b)!==-1)return r;let w="",q=",",j=_;if(Array.isArray(b)){if(b.length===0)return"[]";if(a<m.length+1)return'"[Array]"';m.push(b),y!==""&&(_+=y,w+=`
|
|
8
|
+
${_}`,q=`,
|
|
9
|
+
${_}`);let G=Math.min(b.length,o),U=0;for(;U<G-1;U++){let me=u(String(U),b,m,E,y,_);w+=me!==void 0?me:"null",w+=q}let Z=u(String(U),b,m,E,y,_);if(w+=Z!==void 0?Z:"null",b.length-1>o){let me=b.length-o-1;w+=`${q}"... ${Fe(me)} not stringified"`}return y!==""&&(w+=`
|
|
10
|
+
${j}`),m.pop(),`[${w}]`}let R=Object.keys(b),P=R.length;if(P===0)return"{}";if(a<m.length+1)return'"[Object]"';let M="",$="";y!==""&&(_+=y,q=`,
|
|
11
|
+
${_}`,M=" ");let B=Math.min(P,o);i&&!Ln(b)&&(R=jn(R,s)),m.push(b);for(let G=0;G<B;G++){let U=R[G],Z=u(U,b,m,E,y,_);Z!==void 0&&(w+=`${$}${Me(U)}:${M}${Z}`,$=q)}if(P>o){let G=P-o;w+=`${$}"...":${M}"${Fe(G)} not stringified"`,$=q}return y!==""&&$.length>1&&(w=`
|
|
12
|
+
${_}${w}
|
|
13
|
+
${j}`),m.pop(),`{${w}}`}case"number":return isFinite(b)?String(b):e?e(b):"null";case"boolean":return b===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(b);default:return e?e(b):void 0}}function l(v,f,m,E,y,_){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(v)),typeof f){case"string":return Me(f);case"object":{if(f===null)return"null";if(m.indexOf(f)!==-1)return r;let b=_,w="",q=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(a<m.length+1)return'"[Array]"';m.push(f),y!==""&&(_+=y,w+=`
|
|
14
|
+
${_}`,q=`,
|
|
15
|
+
${_}`);let P=Math.min(f.length,o),M=0;for(;M<P-1;M++){let B=l(String(M),f[M],m,E,y,_);w+=B!==void 0?B:"null",w+=q}let $=l(String(M),f[M],m,E,y,_);if(w+=$!==void 0?$:"null",f.length-1>o){let B=f.length-o-1;w+=`${q}"... ${Fe(B)} not stringified"`}return y!==""&&(w+=`
|
|
16
|
+
${b}`),m.pop(),`[${w}]`}m.push(f);let j="";y!==""&&(_+=y,q=`,
|
|
17
|
+
${_}`,j=" ");let R="";for(let P of E){let M=l(P,f[P],m,E,y,_);M!==void 0&&(w+=`${R}${Me(P)}:${j}${M}`,R=q)}return y!==""&&R.length>1&&(w=`
|
|
18
|
+
${_}${w}
|
|
19
|
+
${b}`),m.pop(),`{${w}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return e?e(f):void 0}}function h(v,f,m,E,y){switch(typeof f){case"string":return Me(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(v),typeof f!="object")return h(v,f,m,E,y);if(f===null)return"null"}if(m.indexOf(f)!==-1)return r;let _=y;if(Array.isArray(f)){if(f.length===0)return"[]";if(a<m.length+1)return'"[Array]"';m.push(f),y+=E;let M=`
|
|
20
|
+
${y}`,$=`,
|
|
21
|
+
${y}`,B=Math.min(f.length,o),G=0;for(;G<B-1;G++){let Z=h(String(G),f[G],m,E,y);M+=Z!==void 0?Z:"null",M+=$}let U=h(String(G),f[G],m,E,y);if(M+=U!==void 0?U:"null",f.length-1>o){let Z=f.length-o-1;M+=`${$}"... ${Fe(Z)} not stringified"`}return M+=`
|
|
22
|
+
${_}`,m.pop(),`[${M}]`}let b=Object.keys(f),w=b.length;if(w===0)return"{}";if(a<m.length+1)return'"[Object]"';y+=E;let q=`,
|
|
23
|
+
${y}`,j="",R="",P=Math.min(w,o);Ln(f)&&(j+=va(f,q,o),b=b.slice(f.length),P-=f.length,R=q),i&&(b=jn(b,s)),m.push(f);for(let M=0;M<P;M++){let $=b[M],B=h($,f[$],m,E,y);B!==void 0&&(j+=`${R}${Me($)}: ${B}`,R=q)}if(w>o){let M=w-o;j+=`${R}"...": "${Fe(M)} not stringified"`,R=q}return R!==""&&(j=`
|
|
24
|
+
${y}${j}
|
|
25
|
+
${_}`),m.pop(),`{${j}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return e?e(f):void 0}}function d(v,f,m){switch(typeof f){case"string":return Me(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(v),typeof f!="object")return d(v,f,m);if(f===null)return"null"}if(m.indexOf(f)!==-1)return r;let E="",y=f.length!==void 0;if(y&&Array.isArray(f)){if(f.length===0)return"[]";if(a<m.length+1)return'"[Array]"';m.push(f);let j=Math.min(f.length,o),R=0;for(;R<j-1;R++){let M=d(String(R),f[R],m);E+=M!==void 0?M:"null",E+=","}let P=d(String(R),f[R],m);if(E+=P!==void 0?P:"null",f.length-1>o){let M=f.length-o-1;E+=`,"... ${Fe(M)} not stringified"`}return m.pop(),`[${E}]`}let _=Object.keys(f),b=_.length;if(b===0)return"{}";if(a<m.length+1)return'"[Object]"';let w="",q=Math.min(b,o);y&&Ln(f)&&(E+=va(f,",",o),_=_.slice(f.length),q-=f.length,w=","),i&&(_=jn(_,s)),m.push(f);for(let j=0;j<q;j++){let R=_[j],P=d(R,f[R],m);P!==void 0&&(E+=`${w}${Me(R)}:${P}`,w=",")}if(b>o){let j=b-o;E+=`${w}"...":"${Fe(j)} not stringified"`}return m.pop(),`{${E}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(f);default:return e?e(f):void 0}}function g(v,f,m){if(arguments.length>1){let E="";if(typeof m=="number"?E=" ".repeat(Math.min(m,10)):typeof m=="string"&&(E=m.slice(0,10)),f!=null){if(typeof f=="function")return u("",{"":v},[],f,E,"");if(Array.isArray(f))return l("",v,[],ih(f),E,"")}if(E.length!==0)return h("",v,[],E,"")}return d("",v,[])}return g}});var Dn=c((_1,wa)=>{"use strict";var ah=ee(),{MESSAGE:oh}=W(),uh=wt();function lh(t,e){return typeof e=="bigint"?e.toString():e}wa.exports=ah((t,e)=>{let r=uh.configure(e);return t[oh]=r(t,e.replacer||lh,e.space),t})});var Ea=c((E1,_a)=>{"use strict";var fh=ee();_a.exports=fh((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var xa=c((S1,Sa)=>{"use strict";var ch=ee(),{MESSAGE:hh}=W(),dh=wt();Sa.exports=ch(t=>{let e={};return t.message&&(e["@message"]=t.message,delete t.message),t.timestamp&&(e["@timestamp"]=t.timestamp,delete t.timestamp),e["@fields"]=t,t[hh]=dh(e),t})});var Ma=c((x1,Oa)=>{"use strict";var ph=ee();function gh(t,e,r){let n=e.reduce((s,a)=>(s[a]=t[a],delete t[a],s),{}),i=Object.keys(t).reduce((s,a)=>(s[a]=t[a],delete t[a],s),{});return Object.assign(t,n,{[r]:i}),t}function mh(t,e,r){return t[r]=e.reduce((n,i)=>(n[i]=t[i],delete t[i],n),{}),t}Oa.exports=ph((t,e={})=>{let r="metadata";e.key&&(r=e.key);let n=[];return!e.fillExcept&&!e.fillWith&&(n.push("level"),n.push("message")),e.fillExcept&&(n=e.fillExcept),n.length>0?gh(t,n,r):e.fillWith?mh(t,e.fillWith,r):t})});var Ta=c((O1,Ra)=>{var et=1e3,tt=et*60,rt=tt*60,$e=rt*24,vh=$e*7,yh=$e*365.25;Ra.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return bh(t);if(r==="number"&&isFinite(t))return e.long?_h(t):wh(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function bh(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*yh;case"weeks":case"week":case"w":return r*vh;case"days":case"day":case"d":return r*$e;case"hours":case"hour":case"hrs":case"hr":case"h":return r*rt;case"minutes":case"minute":case"mins":case"min":case"m":return r*tt;case"seconds":case"second":case"secs":case"sec":case"s":return r*et;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function wh(t){var e=Math.abs(t);return e>=$e?Math.round(t/$e)+"d":e>=rt?Math.round(t/rt)+"h":e>=tt?Math.round(t/tt)+"m":e>=et?Math.round(t/et)+"s":t+"ms"}function _h(t){var e=Math.abs(t);return e>=$e?lr(t,e,$e,"day"):e>=rt?lr(t,e,rt,"hour"):e>=tt?lr(t,e,tt,"minute"):e>=et?lr(t,e,et,"second"):t+" ms"}function lr(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var qa=c((_t,Aa)=>{"use strict";var Eh=ee(),Sh=Ta();Aa.exports=Eh(t=>{let e=+new Date;return _t.diff=e-(_t.prevTime||e),_t.prevTime=e,t.ms=`+${Sh(_t.diff)}`,t})});var ja=c((M1,Ca)=>{"use strict";var xh=require("util").inspect,Oh=ee(),{LEVEL:Mh,MESSAGE:Pa,SPLAT:Rh}=W();Ca.exports=Oh((t,e={})=>{let r=Object.assign({},t);return delete r[Mh],delete r[Pa],delete r[Rh],t[Pa]=xh(r,!1,e.depth||null,e.colorize),t})});var La=c((R1,cr)=>{"use strict";var{MESSAGE:Th}=W(),fr=class{constructor(e){this.template=e}transform(e){return e[Th]=this.template(e),e}};cr.exports=t=>new fr(t);cr.exports.Printf=cr.exports.Format=fr});var Da=c((T1,Fa)=>{"use strict";var Ah=ee(),{MESSAGE:Na}=W(),qh=wt();Fa.exports=Ah(t=>{let e=qh(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[Na]=`${t.level}:${r} ${t.message} ${e}`:t[Na]=`${t.level}:${r} ${t.message}`,t})});var Ia=c((A1,ka)=>{"use strict";var Ph=require("util"),{SPLAT:$a}=W(),Ch=/%[scdjifoO%]/g,jh=/%%/g,$n=class{constructor(e){this.options=e}_splat(e,r){let n=e.message,i=e[$a]||e.splat||[],s=n.match(jh),a=s&&s.length||0,u=r.length-a-i.length,l=u<0?i.splice(u,-1*u):[],h=l.length;if(h)for(let d=0;d<h;d++)Object.assign(e,l[d]);return e.message=Ph.format(n,...i),e}transform(e){let r=e.message,n=e[$a]||e.splat;if(!n||!n.length)return e;let i=r&&r.match&&r.match(Ch);if(!i&&(n||n.length)){let s=n.length>1?n.splice(0):n,a=s.length;if(a)for(let o=0;o<a;o++)Object.assign(e,s[o]);return e}return i?this._splat(e,i):e}};ka.exports=t=>new $n(t)});var Ga=c((hr,Ba)=>{(function(t,e){typeof hr=="object"&&typeof Ba<"u"?e(hr):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})(hr,function(t){"use strict";var e=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,r="\\d\\d?",n="\\d\\d",i="\\d{3}",s="\\d{4}",a="[^\\s]+",o=/\[([^]*?)\]/gm;function u(p,S){for(var L=[],Y=0,O=p.length;Y<O;Y++)L.push(p[Y].substr(0,S));return L}var l=function(p){return function(S,L){var Y=L[p].map(function(re){return re.toLowerCase()}),O=Y.indexOf(S.toLowerCase());return O>-1?O:null}};function h(p){for(var S=[],L=1;L<arguments.length;L++)S[L-1]=arguments[L];for(var Y=0,O=S;Y<O.length;Y++){var re=O[Y];for(var le in re)p[le]=re[le]}return p}var d=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],g=["January","February","March","April","May","June","July","August","September","October","November","December"],v=u(g,3),f=u(d,3),m={dayNamesShort:f,dayNames:d,monthNamesShort:v,monthNames:g,amPm:["am","pm"],DoFn:function(p){return p+["th","st","nd","rd"][p%10>3?0:(p-p%10!==10?1:0)*p%10]}},E=h({},m),y=function(p){return E=h(E,p)},_=function(p){return p.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},b=function(p,S){for(S===void 0&&(S=2),p=String(p);p.length<S;)p="0"+p;return p},w={D:function(p){return String(p.getDate())},DD:function(p){return b(p.getDate())},Do:function(p,S){return S.DoFn(p.getDate())},d:function(p){return String(p.getDay())},dd:function(p){return b(p.getDay())},ddd:function(p,S){return S.dayNamesShort[p.getDay()]},dddd:function(p,S){return S.dayNames[p.getDay()]},M:function(p){return String(p.getMonth()+1)},MM:function(p){return b(p.getMonth()+1)},MMM:function(p,S){return S.monthNamesShort[p.getMonth()]},MMMM:function(p,S){return S.monthNames[p.getMonth()]},YY:function(p){return b(String(p.getFullYear()),4).substr(2)},YYYY:function(p){return b(p.getFullYear(),4)},h:function(p){return String(p.getHours()%12||12)},hh:function(p){return b(p.getHours()%12||12)},H:function(p){return String(p.getHours())},HH:function(p){return b(p.getHours())},m:function(p){return String(p.getMinutes())},mm:function(p){return b(p.getMinutes())},s:function(p){return String(p.getSeconds())},ss:function(p){return b(p.getSeconds())},S:function(p){return String(Math.round(p.getMilliseconds()/100))},SS:function(p){return b(Math.round(p.getMilliseconds()/10),2)},SSS:function(p){return b(p.getMilliseconds(),3)},a:function(p,S){return p.getHours()<12?S.amPm[0]:S.amPm[1]},A:function(p,S){return p.getHours()<12?S.amPm[0].toUpperCase():S.amPm[1].toUpperCase()},ZZ:function(p){var S=p.getTimezoneOffset();return(S>0?"-":"+")+b(Math.floor(Math.abs(S)/60)*100+Math.abs(S)%60,4)},Z:function(p){var S=p.getTimezoneOffset();return(S>0?"-":"+")+b(Math.floor(Math.abs(S)/60),2)+":"+b(Math.abs(S)%60,2)}},q=function(p){return+p-1},j=[null,r],R=[null,a],P=["isPm",a,function(p,S){var L=p.toLowerCase();return L===S.amPm[0]?0:L===S.amPm[1]?1:null}],M=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(p){var S=(p+"").match(/([+-]|\d\d)/gi);if(S){var L=+S[1]*60+parseInt(S[2],10);return S[0]==="+"?L:-L}return 0}],$={D:["day",r],DD:["day",n],Do:["day",r+a,function(p){return parseInt(p,10)}],M:["month",r,q],MM:["month",n,q],YY:["year",n,function(p){var S=new Date,L=+(""+S.getFullYear()).substr(0,2);return+(""+(+p>68?L-1:L)+p)}],h:["hour",r,void 0,"isPm"],hh:["hour",n,void 0,"isPm"],H:["hour",r],HH:["hour",n],m:["minute",r],mm:["minute",n],s:["second",r],ss:["second",n],YYYY:["year",s],S:["millisecond","\\d",function(p){return+p*100}],SS:["millisecond",n,function(p){return+p*10}],SSS:["millisecond",i],d:j,dd:j,ddd:R,dddd:R,MMM:["month",a,l("monthNamesShort")],MMMM:["month",a,l("monthNames")],a:P,A:P,ZZ:M,Z:M},B={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},G=function(p){return h(B,p)},U=function(p,S,L){if(S===void 0&&(S=B.default),L===void 0&&(L={}),typeof p=="number"&&(p=new Date(p)),Object.prototype.toString.call(p)!=="[object Date]"||isNaN(p.getTime()))throw new Error("Invalid Date pass to format");S=B[S]||S;var Y=[];S=S.replace(o,function(re,le){return Y.push(le),"@@@"});var O=h(h({},E),L);return S=S.replace(e,function(re){return w[re](p,O)}),S.replace(/@@@/g,function(){return Y.shift()})};function Z(p,S,L){if(L===void 0&&(L={}),typeof S!="string")throw new Error("Invalid format in fecha parse");if(S=B[S]||S,p.length>1e3)return null;var Y=new Date,O={year:Y.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},re=[],le=[],pt=S.replace(o,function(gt,Je){return le.push(_(Je)),"@@@"}),Vt={},ls={};pt=_(pt).replace(e,function(gt){var Je=$[gt],pn=Je[0],hc=Je[1],ds=Je[3];if(Vt[pn])throw new Error("Invalid format. "+pn+" specified twice in format");return Vt[pn]=!0,ds&&(ls[ds]=!0),re.push(Je),"("+hc+")"}),Object.keys(ls).forEach(function(gt){if(!Vt[gt])throw new Error("Invalid format. "+gt+" is required in specified format")}),pt=pt.replace(/@@@/g,function(){return le.shift()});var Kt=p.match(new RegExp(pt,"i"));if(!Kt)return null;for(var lc=h(h({},E),L),fe=1;fe<Kt.length;fe++){var fs=re[fe-1],fc=fs[0],cs=fs[2],hs=cs?cs(Kt[fe],lc):+Kt[fe];if(hs==null)return null;O[fc]=hs}O.isPm===1&&O.hour!=null&&+O.hour!=12?O.hour=+O.hour+12:O.isPm===0&&+O.hour==12&&(O.hour=0);var Jt;if(O.timezoneOffset==null){Jt=new Date(O.year,O.month,O.day,O.hour,O.minute,O.second,O.millisecond);for(var Zt=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],fe=0,cc=Zt.length;fe<cc;fe++)if(Vt[Zt[fe][0]]&&O[Zt[fe][0]]!==Jt[Zt[fe][1]]())return null}else if(Jt=new Date(Date.UTC(O.year,O.month,O.day,O.hour,O.minute-O.timezoneOffset,O.second,O.millisecond)),O.month>11||O.month<0||O.day>31||O.day<1||O.hour>23||O.hour<0||O.minute>59||O.minute<0||O.second>59||O.second<0)return null;return Jt}var me={format:U,parse:Z,defaultI18n:m,setGlobalDateI18n:y,setGlobalDateMasks:G};t.assign=h,t.default=me,t.format=U,t.parse=Z,t.defaultI18n=m,t.setGlobalDateI18n=y,t.setGlobalDateMasks=G,Object.defineProperty(t,"__esModule",{value:!0})})});var Ha=c((q1,Wa)=>{"use strict";var Lh=Ga(),Nh=ee();Wa.exports=Nh((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():Lh.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var za=c((P1,Ua)=>{"use strict";var kn=_n(),Fh=ee(),{MESSAGE:In}=W();Ua.exports=Fh((t,e)=>(e.level!==!1&&(t.level=kn.strip(t.level)),e.message!==!1&&(t.message=kn.strip(String(t.message))),e.raw!==!1&&t[In]&&(t[In]=kn.strip(String(t[In]))),t))});var Gn=c(Bn=>{"use strict";var Dh=Bn.format=ee();Bn.levels=oa();function K(t,e){Object.defineProperty(Dh,t,{get(){return e()},configurable:!0})}K("align",function(){return la()});K("errors",function(){return ha()});K("cli",function(){return pa()});K("combine",function(){return ma()});K("colorize",function(){return sr()});K("json",function(){return Dn()});K("label",function(){return Ea()});K("logstash",function(){return xa()});K("metadata",function(){return Ma()});K("ms",function(){return qa()});K("padLevels",function(){return qn()});K("prettyPrint",function(){return ja()});K("printf",function(){return La()});K("simple",function(){return Da()});K("splat",function(){return Ia()});K("timestamp",function(){return Ha()});K("uncolorize",function(){return za()})});var Wn=c(dr=>{"use strict";var{format:Ya}=require("util");dr.warn={deprecated(t){return()=>{throw new Error(Ya("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([Ya("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
|
|
26
|
+
`))}},forFunctions(t,e,r){r.forEach(n=>{t[n]=dr.warn[e](n)})},forProperties(t,e,r){r.forEach(n=>{let i=dr.warn[e](n);Object.defineProperty(t,n,{get:i,set:i})})}}});var Va=c((L1,$h)=>{$h.exports={name:"winston",description:"A logger for just about everything.",version:"3.12.0",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.2","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.4.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.7.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^5.0.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",mocha:"^10.3.0",nyc:"^15.1.0",rimraf:"^5.0.5",split2:"^4.1.0","std-mocks":"^2.0.0",through2:"^4.0.2","winston-compat":"^0.1.5"},main:"./lib/winston.js",browser:"./dist/winston",types:"./index.d.ts",scripts:{lint:"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",test:"rimraf test/fixtures/logs/* && mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration",build:"rimraf dist && babel lib -d dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var Ja=c((N1,Ka)=>{Ka.exports=require("util").deprecate});var Hn=c((F1,Za)=>{Za.exports=require("stream")});var zn=c((D1,Xa)=>{"use strict";function kh(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Un,this,t)):process.nextTick(Un,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(pr,r):(r._writableState.errorEmitted=!0,process.nextTick(Qa,r,s)):process.nextTick(Qa,r,s):e?(process.nextTick(pr,r),e(s)):process.nextTick(pr,r)}),this)}function Qa(t,e){Un(t,e),pr(t)}function pr(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Ih(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Un(t,e){t.emit("error",e)}function Bh(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}Xa.exports={destroy:kh,undestroy:Ih,errorOrDestroy:Bh}});var Re=c(($1,ro)=>{"use strict";var to={};function oe(t,e,r){r||(r=Error);function n(s,a,o){return typeof e=="string"?e:e(s,a,o)}class i extends r{constructor(a,o,u){super(n(a,o,u))}}i.prototype.name=r.name,i.prototype.code=t,to[t]=i}function eo(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(n=>String(n)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function Gh(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Wh(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Hh(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}oe("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);oe("ERR_INVALID_ARG_TYPE",function(t,e,r){let n;typeof e=="string"&&Gh(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";let i;if(Wh(t," argument"))i=`The ${t} ${n} ${eo(e,"type")}`;else{let s=Hh(t,".")?"property":"argument";i=`The "${t}" ${s} ${n} ${eo(e,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);oe("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");oe("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});oe("ERR_STREAM_PREMATURE_CLOSE","Premature close");oe("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});oe("ERR_MULTIPLE_CALLBACK","Callback called multiple times");oe("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");oe("ERR_STREAM_WRITE_AFTER_END","write after end");oe("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);oe("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);oe("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");ro.exports.codes=to});var Yn=c((k1,no)=>{"use strict";var Uh=Re().codes.ERR_INVALID_OPT_VALUE;function zh(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Yh(t,e,r,n){var i=zh(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?r:"highWaterMark";throw new Uh(s,i)}return Math.floor(i)}return t.objectMode?16:16*1024}no.exports={getHighWaterMark:Yh}});var io=c((I1,Vn)=>{typeof Object.create=="function"?Vn.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Vn.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var nt=c((B1,Jn)=>{try{if(Kn=require("util"),typeof Kn.inherits!="function")throw"";Jn.exports=Kn.inherits}catch{Jn.exports=io()}var Kn});var fo=c((G1,lo)=>{"use strict";function so(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ao(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?so(Object(r),!0).forEach(function(n){Vh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):so(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Vh(t,e,r){return e=uo(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Kh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function oo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uo(n.key),n)}}function Jh(t,e,r){return e&&oo(t.prototype,e),r&&oo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function uo(t){var e=Zh(t,"string");return typeof e=="symbol"?e:String(e)}function Zh(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Qh=require("buffer"),gr=Qh.Buffer,Xh=require("util"),Zn=Xh.inspect,ed=Zn&&Zn.custom||"inspect";function td(t,e,r){gr.prototype.copy.call(t,e,r)}lo.exports=function(){function t(){Kh(this,t),this.head=null,this.tail=null,this.length=0}return Jh(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return gr.alloc(0);for(var n=gr.allocUnsafe(r>>>0),i=this.head,s=0;i;)td(i.data,n,s),s+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,s=n.data;for(r-=s.length;n=n.next;){var a=n.data,o=r>a.length?a.length:r;if(o===a.length?s+=a:s+=a.slice(0,r),r-=o,r===0){o===a.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++i}return this.length-=i,s}},{key:"_getBuffer",value:function(r){var n=gr.allocUnsafe(r),i=this.head,s=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(a.copy(n,n.length-r,0,o),r-=o,r===0){o===a.length?(++s,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++s}return this.length-=s,n}},{key:ed,value:function(r,n){return Zn(this,ao(ao({},n),{},{depth:0,customInspect:!1}))}}]),t}()});var po=c((Qn,ho)=>{var mr=require("buffer"),ve=mr.Buffer;function co(t,e){for(var r in t)e[r]=t[r]}ve.from&&ve.alloc&&ve.allocUnsafe&&ve.allocUnsafeSlow?ho.exports=mr:(co(mr,Qn),Qn.Buffer=ke);function ke(t,e,r){return ve(t,e,r)}ke.prototype=Object.create(ve.prototype);co(ve,ke);ke.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return ve(t,e,r)};ke.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=ve(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};ke.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return ve(t)};ke.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return mr.SlowBuffer(t)}});var ti=c(mo=>{"use strict";var ei=po().Buffer,go=ei.isEncoding||function(t){switch(t=""+t,t&&t.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 rd(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function nd(t){var e=rd(t);if(typeof e!="string"&&(ei.isEncoding===go||!go(t)))throw new Error("Unknown encoding: "+t);return e||t}mo.StringDecoder=Et;function Et(t){this.encoding=nd(t);var e;switch(this.encoding){case"utf16le":this.text=ld,this.end=fd,e=4;break;case"utf8":this.fillLast=ad,e=4;break;case"base64":this.text=cd,this.end=hd,e=3;break;default:this.write=dd,this.end=pd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=ei.allocUnsafe(e)}Et.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Et.prototype.end=ud;Et.prototype.text=od;Et.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function Xn(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function id(t,e,r){var n=e.length-1;if(n<r)return 0;var i=Xn(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=Xn(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=Xn(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function sd(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function ad(t){var e=this.lastTotal-this.lastNeed,r=sd(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function od(t,e){var r=id(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function ud(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function ld(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function fd(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function cd(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function hd(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function dd(t){return t.toString(this.encoding)}function pd(t){return t&&t.length?this.write(t):""}});var vr=c((H1,bo)=>{"use strict";var vo=Re().codes.ERR_STREAM_PREMATURE_CLOSE;function gd(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function md(){}function vd(t){return t.setHeader&&typeof t.abort=="function"}function yo(t,e,r){if(typeof e=="function")return yo(t,null,e);e||(e={}),r=gd(r||md);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||o()},a=t._writableState&&t._writableState.finished,o=function(){i=!1,a=!0,n||r.call(t)},u=t._readableState&&t._readableState.endEmitted,l=function(){n=!1,u=!0,i||r.call(t)},h=function(f){r.call(t,f)},d=function(){var f;if(n&&!u)return(!t._readableState||!t._readableState.ended)&&(f=new vo),r.call(t,f);if(i&&!a)return(!t._writableState||!t._writableState.ended)&&(f=new vo),r.call(t,f)},g=function(){t.req.on("finish",o)};return vd(t)?(t.on("complete",o),t.on("abort",d),t.req?g():t.on("request",g)):i&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",l),t.on("finish",o),e.error!==!1&&t.on("error",h),t.on("close",d),function(){t.removeListener("complete",o),t.removeListener("abort",d),t.removeListener("request",g),t.req&&t.req.removeListener("finish",o),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",o),t.removeListener("end",l),t.removeListener("error",h),t.removeListener("close",d)}}bo.exports=yo});var _o=c((U1,wo)=>{"use strict";var yr;function Te(t,e,r){return e=yd(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yd(t){var e=bd(t,"string");return typeof e=="symbol"?e:String(e)}function bd(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var wd=vr(),Ae=Symbol("lastResolve"),Ie=Symbol("lastReject"),St=Symbol("error"),br=Symbol("ended"),Be=Symbol("lastPromise"),ri=Symbol("handlePromise"),Ge=Symbol("stream");function qe(t,e){return{value:t,done:e}}function _d(t){var e=t[Ae];if(e!==null){var r=t[Ge].read();r!==null&&(t[Be]=null,t[Ae]=null,t[Ie]=null,e(qe(r,!1)))}}function Ed(t){process.nextTick(_d,t)}function Sd(t,e){return function(r,n){t.then(function(){if(e[br]){r(qe(void 0,!0));return}e[ri](r,n)},n)}}var xd=Object.getPrototypeOf(function(){}),Od=Object.setPrototypeOf((yr={get stream(){return this[Ge]},next:function(){var e=this,r=this[St];if(r!==null)return Promise.reject(r);if(this[br])return Promise.resolve(qe(void 0,!0));if(this[Ge].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[St]?o(e[St]):a(qe(void 0,!0))})});var n=this[Be],i;if(n)i=new Promise(Sd(n,this));else{var s=this[Ge].read();if(s!==null)return Promise.resolve(qe(s,!1));i=new Promise(this[ri])}return this[Be]=i,i}},Te(yr,Symbol.asyncIterator,function(){return this}),Te(yr,"return",function(){var e=this;return new Promise(function(r,n){e[Ge].destroy(null,function(i){if(i){n(i);return}r(qe(void 0,!0))})})}),yr),xd),Md=function(e){var r,n=Object.create(Od,(r={},Te(r,Ge,{value:e,writable:!0}),Te(r,Ae,{value:null,writable:!0}),Te(r,Ie,{value:null,writable:!0}),Te(r,St,{value:null,writable:!0}),Te(r,br,{value:e._readableState.endEmitted,writable:!0}),Te(r,ri,{value:function(s,a){var o=n[Ge].read();o?(n[Be]=null,n[Ae]=null,n[Ie]=null,s(qe(o,!1))):(n[Ae]=s,n[Ie]=a)},writable:!0}),r));return n[Be]=null,wd(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=n[Ie];s!==null&&(n[Be]=null,n[Ae]=null,n[Ie]=null,s(i)),n[St]=i;return}var a=n[Ae];a!==null&&(n[Be]=null,n[Ae]=null,n[Ie]=null,a(qe(void 0,!0))),n[br]=!0}),e.on("readable",Ed.bind(null,n)),n};wo.exports=Md});var Oo=c((z1,xo)=>{"use strict";function Eo(t,e,r,n,i,s,a){try{var o=t[s](a),u=o.value}catch(l){r(l);return}o.done?e(u):Promise.resolve(u).then(n,i)}function Rd(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function a(u){Eo(s,n,i,a,o,"next",u)}function o(u){Eo(s,n,i,a,o,"throw",u)}a(void 0)})}}function So(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Td(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?So(Object(r),!0).forEach(function(n){Ad(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):So(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ad(t,e,r){return e=qd(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qd(t){var e=Pd(t,"string");return typeof e=="symbol"?e:String(e)}function Pd(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Cd=Re().codes.ERR_INVALID_ARG_TYPE;function jd(t,e,r){var n;if(e&&typeof e.next=="function")n=e;else if(e&&e[Symbol.asyncIterator])n=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])n=e[Symbol.iterator]();else throw new Cd("iterable",["Iterable"],e);var i=new t(Td({objectMode:!0},r)),s=!1;i._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=Rd(function*(){try{var u=yield n.next(),l=u.value,h=u.done;h?i.push(null):i.push(yield l)?a():s=!1}catch(d){i.destroy(d)}}),o.apply(this,arguments)}return i}xo.exports=jd});var hi=c((V1,No)=>{"use strict";No.exports=C;var it;C.ReadableState=Ao;var Y1=require("events").EventEmitter,To=function(e,r){return e.listeners(r).length},Ot=Hn(),wr=require("buffer").Buffer,Ld=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Nd(t){return wr.from(t)}function Fd(t){return wr.isBuffer(t)||t instanceof Ld}var ni=require("util"),T;ni&&ni.debuglog?T=ni.debuglog("stream"):T=function(){};var Dd=fo(),fi=zn(),$d=Yn(),kd=$d.getHighWaterMark,_r=Re().codes,Id=_r.ERR_INVALID_ARG_TYPE,Bd=_r.ERR_STREAM_PUSH_AFTER_EOF,Gd=_r.ERR_METHOD_NOT_IMPLEMENTED,Wd=_r.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,st,ii,si;nt()(C,Ot);var xt=fi.errorOrDestroy,ai=["error","close","destroy","pause","resume"];function Hd(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Ao(t,e,r){it=it||We(),t=t||{},typeof r!="boolean"&&(r=e instanceof it),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=kd(this,t,"readableHighWaterMark",r),this.buffer=new Dd,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(st||(st=ti().StringDecoder),this.decoder=new st(t.encoding),this.encoding=t.encoding)}function C(t){if(it=it||We(),!(this instanceof C))return new C(t);var e=this instanceof it;this._readableState=new Ao(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Ot.call(this)}Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});C.prototype.destroy=fi.destroy;C.prototype._undestroy=fi.undestroy;C.prototype._destroy=function(t,e){e(t)};C.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=wr.from(t,e),e=""),n=!0),qo(this,t,e,!1,n)};C.prototype.unshift=function(t){return qo(this,t,null,!0,!1)};function qo(t,e,r,n,i){T("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Yd(t,s);else{var a;if(i||(a=Ud(s,e)),a)xt(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==wr.prototype&&(e=Nd(e)),n)s.endEmitted?xt(t,new Wd):oi(t,s,e,!0);else if(s.ended)xt(t,new Bd);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?oi(t,s,e,!1):li(t,s)):oi(t,s,e,!1)}else n||(s.reading=!1,li(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function oi(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Er(t)),li(t,e)}function Ud(t,e){var r;return!Fd(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new Id("chunk",["string","Buffer","Uint8Array"],e)),r}C.prototype.isPaused=function(){return this._readableState.flowing===!1};C.prototype.setEncoding=function(t){st||(st=ti().StringDecoder);var e=new st(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var Mo=1073741824;function zd(t){return t>=Mo?t=Mo:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Ro(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=zd(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}C.prototype.read=function(t){T("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return T("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?ui(this):Er(this),null;if(t=Ro(t,e),t===0&&e.ended)return e.length===0&&ui(this),null;var n=e.needReadable;T("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,T("length less than watermark",n)),e.ended||e.reading?(n=!1,T("reading or ended",n)):n&&(T("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Ro(r,e)));var i;return t>0?i=jo(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&ui(this)),i!==null&&this.emit("data",i),i};function Yd(t,e){if(T("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Er(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Po(t)))}}function Er(t){var e=t._readableState;T("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(T("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Po,t))}function Po(t){var e=t._readableState;T("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,ci(t)}function li(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Vd,t,e))}function Vd(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(T("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}C.prototype._read=function(t){xt(this,new Gd("_read()"))};C.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,T("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=i?o:m;n.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(E,y){T("onunpipe"),E===r&&y&&y.hasUnpiped===!1&&(y.hasUnpiped=!0,h())}function o(){T("onend"),t.end()}var u=Kd(r);t.on("drain",u);var l=!1;function h(){T("cleanup"),t.removeListener("close",v),t.removeListener("finish",f),t.removeListener("drain",u),t.removeListener("error",g),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",m),r.removeListener("data",d),l=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}r.on("data",d);function d(E){T("ondata");var y=t.write(E);T("dest.write",y),y===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&Lo(n.pipes,t)!==-1)&&!l&&(T("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function g(E){T("onerror",E),m(),t.removeListener("error",g),To(t,"error")===0&&xt(t,E)}Hd(t,"error",g);function v(){t.removeListener("finish",f),m()}t.once("close",v);function f(){T("onfinish"),t.removeListener("close",v),m()}t.once("finish",f);function m(){T("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(T("pipe resume"),r.resume()),t};function Kd(t){return function(){var r=t._readableState;T("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&To(t,"data")&&(r.flowing=!0,ci(t))}}C.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=Lo(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};C.prototype.on=function(t,e){var r=Ot.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,T("on readable",n.length,n.reading),n.length?Er(this):n.reading||process.nextTick(Jd,this)),r};C.prototype.addListener=C.prototype.on;C.prototype.removeListener=function(t,e){var r=Ot.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Co,this),r};C.prototype.removeAllListeners=function(t){var e=Ot.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Co,this),e};function Co(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function Jd(t){T("readable nexttick read 0"),t.read(0)}C.prototype.resume=function(){var t=this._readableState;return t.flowing||(T("resume"),t.flowing=!t.readableListening,Zd(this,t)),t.paused=!1,this};function Zd(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Qd,t,e))}function Qd(t,e){T("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),ci(t),e.flowing&&!e.reading&&t.read(0)}C.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function ci(t){var e=t._readableState;for(T("flow",e.flowing);e.flowing&&t.read()!==null;);}C.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(T("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(T("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=function(o){return function(){return t[o].apply(t,arguments)}}(i));for(var s=0;s<ai.length;s++)t.on(ai[s],this.emit.bind(this,ai[s]));return this._read=function(a){T("wrapped _read",a),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(C.prototype[Symbol.asyncIterator]=function(){return ii===void 0&&(ii=_o()),ii(this)});Object.defineProperty(C.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(C.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(C.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});C._fromList=jo;Object.defineProperty(C.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function jo(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function ui(t){var e=t._readableState;T("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Xd,e,t))}function Xd(t,e){if(T("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(C.from=function(t,e){return si===void 0&&(si=Oo()),si(C,t,e)});function Lo(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var We=c((K1,Do)=>{"use strict";var ep=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Do.exports=ye;var Fo=hi(),pi=Or();nt()(ye,Fo);for(di=ep(pi.prototype),Sr=0;Sr<di.length;Sr++)xr=di[Sr],ye.prototype[xr]||(ye.prototype[xr]=pi.prototype[xr]);var di,xr,Sr;function ye(t){if(!(this instanceof ye))return new ye(t);Fo.call(this,t),pi.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",tp)))}Object.defineProperty(ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(ye.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(ye.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function tp(){this._writableState.ended||process.nextTick(rp,this)}function rp(t){t.end()}Object.defineProperty(ye.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Or=c((J1,Wo)=>{"use strict";Wo.exports=k;function ko(t){var e=this;this.next=null,this.entry=null,this.finish=function(){Ap(e,t)}}var at;k.WritableState=Rt;var np={deprecate:Ja()},Io=Hn(),Rr=require("buffer").Buffer,ip=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function sp(t){return Rr.from(t)}function ap(t){return Rr.isBuffer(t)||t instanceof ip}var mi=zn(),op=Yn(),up=op.getHighWaterMark,Pe=Re().codes,lp=Pe.ERR_INVALID_ARG_TYPE,fp=Pe.ERR_METHOD_NOT_IMPLEMENTED,cp=Pe.ERR_MULTIPLE_CALLBACK,hp=Pe.ERR_STREAM_CANNOT_PIPE,dp=Pe.ERR_STREAM_DESTROYED,pp=Pe.ERR_STREAM_NULL_VALUES,gp=Pe.ERR_STREAM_WRITE_AFTER_END,mp=Pe.ERR_UNKNOWN_ENCODING,ot=mi.errorOrDestroy;nt()(k,Io);function vp(){}function Rt(t,e,r){at=at||We(),t=t||{},typeof r!="boolean"&&(r=e instanceof at),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=up(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){xp(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new ko(this)}Rt.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Rt.prototype,"buffer",{get:np.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Mr;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Mr=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return Mr.call(this,e)?!0:this!==k?!1:e&&e._writableState instanceof Rt}})):Mr=function(e){return e instanceof this};function k(t){at=at||We();var e=this instanceof at;if(!e&&!Mr.call(k,this))return new k(t);this._writableState=new Rt(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Io.call(this)}k.prototype.pipe=function(){ot(this,new hp)};function yp(t,e){var r=new gp;ot(t,r),process.nextTick(e,r)}function bp(t,e,r,n){var i;return r===null?i=new pp:typeof r!="string"&&!e.objectMode&&(i=new lp("chunk",["string","Buffer"],r)),i?(ot(t,i),process.nextTick(n,i),!1):!0}k.prototype.write=function(t,e,r){var n=this._writableState,i=!1,s=!n.objectMode&&ap(t);return s&&!Rr.isBuffer(t)&&(t=sp(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=vp),n.ending?yp(this,r):(s||bp(this,n,t,r))&&(n.pendingcb++,i=_p(this,n,s,t,e,r)),i};k.prototype.cork=function(){this._writableState.corked++};k.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Bo(this,t))};k.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new mp(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function wp(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Rr.from(e,r)),e}Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function _p(t,e,r,n,i,s){if(!r){var a=wp(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var o=e.objectMode?1:n.length;e.length+=o;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else gi(t,e,!1,o,n,i,s);return u}function gi(t,e,r,n,i,s,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new dp("write")):r?t._writev(i,e.onwrite):t._write(i,s,e.onwrite),e.sync=!1}function Ep(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(Mt,t,e),t._writableState.errorEmitted=!0,ot(t,n)):(i(n),t._writableState.errorEmitted=!0,ot(t,n),Mt(t,e))}function Sp(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function xp(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new cp;if(Sp(r),e)Ep(t,r,n,e,i);else{var s=Go(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Bo(t,r),n?process.nextTick($o,t,r,s,i):$o(t,r,s,i)}}function $o(t,e,r,n){r||Op(t,e),e.pendingcb--,n(),Mt(t,e)}function Op(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Bo(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)i[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;i.allBuffers=o,gi(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new ko(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,h=r.callback,d=e.objectMode?1:u.length;if(gi(t,e,!1,d,u,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}k.prototype._write=function(t,e,r){r(new fp("_write()"))};k.prototype._writev=null;k.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||Tp(this,n,r),this};Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Go(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function Mp(t,e){t._final(function(r){e.pendingcb--,r&&ot(t,r),e.prefinished=!0,t.emit("prefinish"),Mt(t,e)})}function Rp(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(Mp,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Mt(t,e){var r=Go(e);if(r&&(Rp(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function Tp(t,e,r){e.ending=!0,Mt(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function Ap(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});k.prototype.destroy=mi.destroy;k.prototype._undestroy=mi.undestroy;k.prototype._destroy=function(t,e){e(t)}});var vi=c((Z1,zo)=>{"use strict";var qp=require("util"),Ho=Or(),{LEVEL:Uo}=W(),Tt=zo.exports=function(e={}){Ho.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",r=>{this.levels=r.levels,this.parent=r}),this.once("unpipe",r=>{r===this.parent&&(this.parent=null,this.close&&this.close())})};qp.inherits(Tt,Ho);Tt.prototype._write=function(e,r,n){if(this.silent||e.exception===!0&&!this.handleExceptions)return n(null);let i=this.level||this.parent&&this.parent.level;if(!i||this.levels[i]>=this.levels[e[Uo]]){if(e&&!this.format)return this.log(e,n);let s,a;try{a=this.format.transform(Object.assign({},e),this.format.options)}catch(o){s=o}if(s||!a){if(n(),s)throw s;return}return this.log(a,n)}return this._writableState.sync=!1,n(null)};Tt.prototype._writev=function(e,r){if(this.logv){let n=e.filter(this._accept,this);return n.length?this.logv(n,r):r(null)}for(let n=0;n<e.length;n++){if(!this._accept(e[n]))continue;if(e[n].chunk&&!this.format){this.log(e[n].chunk,e[n].callback);continue}let i,s;try{s=this.format.transform(Object.assign({},e[n].chunk),this.format.options)}catch(a){i=a}if(i||!s){if(e[n].callback(),i)throw r(null),i}else this.log(s,e[n].callback)}return r(null)};Tt.prototype._accept=function(e){let r=e.chunk;if(this.silent)return!1;let n=this.level||this.parent&&this.parent.level;return!!((r.exception===!0||!n||this.levels[n]>=this.levels[r[Uo]])&&(this.handleExceptions||r.exception!==!0))};Tt.prototype._nop=function(){}});var bi=c((Q1,Vo)=>{"use strict";var Pp=require("util"),{LEVEL:yi}=W(),Yo=vi(),At=Vo.exports=function(e={}){if(Yo.call(this,e),!e.transport||typeof e.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated();function r(n){this.emit("error",n,this.transport)}this.transport.__winstonError||(this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError))};Pp.inherits(At,Yo);At.prototype._write=function(e,r,n){if(this.silent||e.exception===!0&&!this.handleExceptions)return n(null);(!this.level||this.levels[this.level]>=this.levels[e[yi]])&&this.transport.log(e[yi],e.message,e,this._nop),n(null)};At.prototype._writev=function(e,r){for(let n=0;n<e.length;n++)this._accept(e[n])&&(this.transport.log(e[n].chunk[yi],e[n].chunk.message,e[n].chunk,this._nop),e[n].callback());return r(null)};At.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
27
|
+
`))};At.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var ut=c((X1,wi)=>{"use strict";wi.exports=vi();wi.exports.LegacyTransportStream=bi()});var Zo=c((ty,Jo)=>{"use strict";var Cp=require("os"),{LEVEL:Ko,MESSAGE:lt}=W(),jp=ut();Jo.exports=class extends jp{constructor(e={}){super(e),this.name=e.name||"console",this.stderrLevels=this._stringArrayToSet(e.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(e.consoleWarnLevels),this.eol=typeof e.eol=="string"?e.eol:Cp.EOL,this.setMaxListeners(30)}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.stderrLevels[e[Ko]]){console._stderr?console._stderr.write(`${e[lt]}${this.eol}`):console.error(e[lt]),r&&r();return}else if(this.consoleWarnLevels[e[Ko]]){console._stderr?console._stderr.write(`${e[lt]}${this.eol}`):console.warn(e[lt]),r&&r();return}console._stdout?console._stdout.write(`${e[lt]}${this.eol}`):console.log(e[lt]),r&&r()}_stringArrayToSet(e,r){if(!e)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(r);return e.reduce((n,i)=>{if(typeof i!="string")throw new Error(r);return n[i]=!0,n},{})}}});var Ar=c((Tr,Qo)=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.default=Lp;function Lp(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}Qo.exports=Tr.default});var eu=c((qr,Xo)=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};Xo.exports=qr.default});var nu=c(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.fallback=tu;Ce.wrap=ru;var Np=Ce.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,Fp=Ce.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,Dp=Ce.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function tu(t){setTimeout(t,0)}function ru(t){return(e,...r)=>t(()=>e(...r))}var qt;Np?qt=queueMicrotask:Fp?qt=setImmediate:Dp?qt=process.nextTick:qt=tu;Ce.default=ru(qt)});var uu=c((Pr,ou)=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.default=Wp;var $p=eu(),kp=au($p),Ip=nu(),Bp=au(Ip),Gp=He();function au(t){return t&&t.__esModule?t:{default:t}}function Wp(t){return(0,Gp.isAsync)(t)?function(...e){let r=e.pop(),n=t.apply(this,e);return iu(n,r)}:(0,kp.default)(function(e,r){var n;try{n=t.apply(this,e)}catch(i){return r(i)}if(n&&typeof n.then=="function")return iu(n,r);r(null,n)})}function iu(t,e){return t.then(r=>{su(e,null,r)},r=>{su(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function su(t,e,r){try{t(e,r)}catch(n){(0,Bp.default)(i=>{throw i},n)}}ou.exports=Pr.default});var He=c(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.isAsyncIterable=xe.isAsyncGenerator=xe.isAsync=void 0;var Hp=uu(),Up=zp(Hp);function zp(t){return t&&t.__esModule?t:{default:t}}function lu(t){return t[Symbol.toStringTag]==="AsyncFunction"}function Yp(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function Vp(t){return typeof t[Symbol.asyncIterator]=="function"}function Kp(t){if(typeof t!="function")throw new Error("expected a function");return lu(t)?(0,Up.default)(t):t}xe.default=Kp;xe.isAsync=lu;xe.isAsyncGenerator=Yp;xe.isAsyncIterable=Vp});var ft=c((Cr,fu)=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.default=Jp;function Jp(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...n){return typeof n[e-1]=="function"?t.apply(this,n):new Promise((i,s)=>{n[e-1]=(a,...o)=>{if(a)return s(a);i(o.length>1?o:o[0])},t.apply(this,n)})}return r}fu.exports=Cr.default});var hu=c((jr,cu)=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});var Zp=Ar(),Qp=_i(Zp),Xp=He(),eg=_i(Xp),tg=ft(),rg=_i(tg);function _i(t){return t&&t.__esModule?t:{default:t}}jr.default=(0,rg.default)((t,e,r)=>{var n=(0,Qp.default)(e)?[]:{};t(e,(i,s,a)=>{(0,eg.default)(i)((o,...u)=>{u.length<2&&([u]=u),n[s]=u,a(o)})},i=>r(i,n))},3);cu.exports=jr.default});var Ei=c((Lr,du)=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.default=ng;function ng(t){function e(...r){if(t!==null){var n=t;t=null,n.apply(this,r)}}return Object.assign(e,t),e}du.exports=Lr.default});var gu=c((Nr,pu)=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};pu.exports=Nr.default});var yu=c((Fr,vu)=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.default=cg;var ig=Ar(),sg=mu(ig),ag=gu(),og=mu(ag);function mu(t){return t&&t.__esModule?t:{default:t}}function ug(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function lg(t){var e=-1;return function(){var n=t.next();return n.done?null:(e++,{value:n.value,key:e})}}function fg(t){var e=t?Object.keys(t):[],r=-1,n=e.length;return function i(){var s=e[++r];return s==="__proto__"?i():r<n?{value:t[s],key:s}:null}}function cg(t){if((0,sg.default)(t))return ug(t);var e=(0,og.default)(t);return e?lg(e):fg(t)}vu.exports=Fr.default});var Si=c((Dr,bu)=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.default=hg;function hg(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}bu.exports=Dr.default});var kr=c(($r,wu)=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});var dg={};$r.default=dg;wu.exports=$r.default});var Eu=c((Ir,_u)=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.default=vg;var pg=kr(),gg=mg(pg);function mg(t){return t&&t.__esModule?t:{default:t}}function vg(t,e,r,n){let i=!1,s=!1,a=!1,o=0,u=0;function l(){o>=e||a||i||(a=!0,t.next().then(({value:g,done:v})=>{if(!(s||i)){if(a=!1,v){i=!0,o<=0&&n(null);return}o++,r(g,u,h),u++,l()}}).catch(d))}function h(g,v){if(o-=1,!s){if(g)return d(g);if(g===!1){i=!0,s=!0;return}if(v===gg.default||i&&o<=0)return i=!0,n(null);l()}}function d(g){s||(a=!1,i=!0,n(g))}l()}_u.exports=Ir.default});var Mu=c((Br,Ou)=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});var yg=Ei(),bg=Pt(yg),wg=yu(),_g=Pt(wg),Eg=Si(),Sg=Pt(Eg),Su=He(),xg=Eu(),xu=Pt(xg),Og=kr(),Mg=Pt(Og);function Pt(t){return t&&t.__esModule?t:{default:t}}Br.default=t=>(e,r,n)=>{if(n=(0,bg.default)(n),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return n(null);if((0,Su.isAsyncGenerator)(e))return(0,xu.default)(e,t,r,n);if((0,Su.isAsyncIterable)(e))return(0,xu.default)(e[Symbol.asyncIterator](),t,r,n);var i=(0,_g.default)(e),s=!1,a=!1,o=0,u=!1;function l(d,g){if(!a)if(o-=1,d)s=!0,n(d);else if(d===!1)s=!0,a=!0;else{if(g===Mg.default||s&&o<=0)return s=!0,n(null);u||h()}}function h(){for(u=!0;o<t&&!s;){var d=i();if(d===null){s=!0,o<=0&&n(null);return}o+=1,r(d.value,d.key,(0,Sg.default)(l))}u=!1}h()};Ou.exports=Br.default});var Oi=c((Gr,Ru)=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});var Rg=Mu(),Tg=xi(Rg),Ag=He(),qg=xi(Ag),Pg=ft(),Cg=xi(Pg);function xi(t){return t&&t.__esModule?t:{default:t}}function jg(t,e,r,n){return(0,Tg.default)(e)(t,(0,qg.default)(r),n)}Gr.default=(0,Cg.default)(jg,4);Ru.exports=Gr.default});var qu=c((Wr,Au)=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});var Lg=Oi(),Ng=Tu(Lg),Fg=ft(),Dg=Tu(Fg);function Tu(t){return t&&t.__esModule?t:{default:t}}function $g(t,e,r){return(0,Ng.default)(t,1,e,r)}Wr.default=(0,Dg.default)($g,3);Au.exports=Wr.default});var ju=c((Hr,Cu)=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.default=Wg;var kg=hu(),Ig=Pu(kg),Bg=qu(),Gg=Pu(Bg);function Pu(t){return t&&t.__esModule?t:{default:t}}function Wg(t,e){return(0,Ig.default)(Gg.default,t,e)}Cu.exports=Hr.default});var Mi=c((iy,Nu)=>{"use strict";Nu.exports=Oe;var Ur=Re().codes,Hg=Ur.ERR_METHOD_NOT_IMPLEMENTED,Ug=Ur.ERR_MULTIPLE_CALLBACK,zg=Ur.ERR_TRANSFORM_ALREADY_TRANSFORMING,Yg=Ur.ERR_TRANSFORM_WITH_LENGTH_0,zr=We();nt()(Oe,zr);function Vg(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new Ug);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Oe(t){if(!(this instanceof Oe))return new Oe(t);zr.call(this,t),this._transformState={afterTransform:Vg.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Kg)}function Kg(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Lu(t,e,r)}):Lu(this,null,null)}Oe.prototype.push=function(t,e){return this._transformState.needTransform=!1,zr.prototype.push.call(this,t,e)};Oe.prototype._transform=function(t,e,r){r(new Hg("_transform()"))};Oe.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Oe.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Oe.prototype._destroy=function(t,e){zr.prototype._destroy.call(this,t,function(r){e(r)})};function Lu(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Yg;if(t._transformState.transforming)throw new zg;return t.push(null)}});var $u=c((sy,Du)=>{"use strict";Du.exports=Ct;var Fu=Mi();nt()(Ct,Fu);function Ct(t){if(!(this instanceof Ct))return new Ct(t);Fu.call(this,t)}Ct.prototype._transform=function(t,e,r){r(null,t)}});var Wu=c((ay,Gu)=>{"use strict";var Ri;function Jg(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Bu=Re().codes,Zg=Bu.ERR_MISSING_ARGS,Qg=Bu.ERR_STREAM_DESTROYED;function ku(t){if(t)throw t}function Xg(t){return t.setHeader&&typeof t.abort=="function"}function em(t,e,r,n){n=Jg(n);var i=!1;t.on("close",function(){i=!0}),Ri===void 0&&(Ri=vr()),Ri(t,{readable:e,writable:r},function(a){if(a)return n(a);i=!0,n()});var s=!1;return function(a){if(!i&&!s){if(s=!0,Xg(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(a||new Qg("pipe"))}}}function Iu(t){t()}function tm(t,e){return t.pipe(e)}function rm(t){return!t.length||typeof t[t.length-1]!="function"?ku:t.pop()}function nm(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=rm(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Zg("streams");var i,s=e.map(function(a,o){var u=o<e.length-1,l=o>0;return em(a,u,l,function(h){i||(i=h),h&&s.forEach(Iu),!u&&(s.forEach(Iu),n(i))})});return e.reduce(tm)}Gu.exports=nm});var Ue=c((ue,Lt)=>{var jt=require("stream");process.env.READABLE_STREAM==="disable"&&jt?(Lt.exports=jt.Readable,Object.assign(Lt.exports,jt),Lt.exports.Stream=jt):(ue=Lt.exports=hi(),ue.Stream=jt||ue,ue.Readable=ue,ue.Writable=Or(),ue.Duplex=We(),ue.Transform=Mi(),ue.PassThrough=$u(),ue.finished=vr(),ue.pipeline=Wu())});var Li=c((oy,Uu)=>{var ct=[],Nt=[],Ti=function(){};function qi(t){return~ct.indexOf(t)?!1:(ct.push(t),!0)}function Pi(t){Ti=t}function im(t){for(var e=[],r=0;r<ct.length;r++){if(ct[r].async){e.push(ct[r]);continue}if(ct[r](t))return!0}return e.length?new Promise(function(i){Promise.all(e.map(function(a){return a(t)})).then(function(a){i(a.some(Boolean))})}):!1}function Ci(t){return~Nt.indexOf(t)?!1:(Nt.push(t),!0)}function Ai(){Ti.apply(Ti,arguments)}function Hu(t){for(var e=0;e<Nt.length;e++)t=Nt[e].apply(Nt[e],arguments);return t}function ji(t,e){var r=Object.prototype.hasOwnProperty;for(var n in e)r.call(e,n)&&(t[n]=e[n]);return t}function sm(t){return t.enabled=!1,t.modify=Ci,t.set=Pi,t.use=qi,ji(function(){return!1},t)}function am(t){function e(){var r=Array.prototype.slice.call(arguments,0);return Ai.call(Ai,t,Hu(r,t)),!0}return t.enabled=!0,t.modify=Ci,t.set=Pi,t.use=qi,ji(e,t)}Uu.exports=function(e){return e.introduce=ji,e.enabled=im,e.process=Hu,e.modify=Ci,e.write=Ai,e.nope=sm,e.yep=am,e.set=Pi,e.use=qi,e}});var Yu=c((uy,zu)=>{var om=Li(),um=om(function t(e,r){return r=r||{},r.namespace=e,r.prod=!0,r.dev=!1,r.force||t.force?t.yep(r):t.nope(r)});zu.exports=um});var Ku=c((ly,Vu)=>{"use strict";Vu.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Zu=c((fy,Ju)=>{Ju.exports=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}});var el=c((cy,Xu)=>{"use strict";var lm=Zu(),fm=Array.prototype.concat,cm=Array.prototype.slice,Qu=Xu.exports=function(e){for(var r=[],n=0,i=e.length;n<i;n++){var s=e[n];lm(s)?r=fm.call(r,cm.call(s)):r.push(s)}return r};Qu.wrap=function(t){return function(){return t(Qu(arguments))}}});var il=c((hy,nl)=>{var Ft=Ku(),Dt=el(),tl=Object.hasOwnProperty,rl=Object.create(null);for(Yr in Ft)tl.call(Ft,Yr)&&(rl[Ft[Yr]]=Yr);var Yr,ne=nl.exports={to:{},get:{}};ne.get=function(t){var e=t.substring(0,3).toLowerCase(),r,n;switch(e){case"hsl":r=ne.get.hsl(t),n="hsl";break;case"hwb":r=ne.get.hwb(t),n="hwb";break;default:r=ne.get.rgb(t),n="rgb";break}return r?{model:n,value:r}:null};ne.get.rgb=function(t){if(!t)return null;var e=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,n=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,i=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,a=[0,0,0,1],o,u,l;if(o=t.match(r)){for(l=o[2],o=o[1],u=0;u<3;u++){var h=u*2;a[u]=parseInt(o.slice(h,h+2),16)}l&&(a[3]=parseInt(l,16)/255)}else if(o=t.match(e)){for(o=o[1],l=o[3],u=0;u<3;u++)a[u]=parseInt(o[u]+o[u],16);l&&(a[3]=parseInt(l+l,16)/255)}else if(o=t.match(n)){for(u=0;u<3;u++)a[u]=parseInt(o[u+1],0);o[4]&&(o[5]?a[3]=parseFloat(o[4])*.01:a[3]=parseFloat(o[4]))}else if(o=t.match(i)){for(u=0;u<3;u++)a[u]=Math.round(parseFloat(o[u+1])*2.55);o[4]&&(o[5]?a[3]=parseFloat(o[4])*.01:a[3]=parseFloat(o[4]))}else return(o=t.match(s))?o[1]==="transparent"?[0,0,0,0]:tl.call(Ft,o[1])?(a=Ft[o[1]],a[3]=1,a):null:null;for(u=0;u<3;u++)a[u]=je(a[u],0,255);return a[3]=je(a[3],0,1),a};ne.get.hsl=function(t){if(!t)return null;var e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){var n=parseFloat(r[4]),i=(parseFloat(r[1])%360+360)%360,s=je(parseFloat(r[2]),0,100),a=je(parseFloat(r[3]),0,100),o=je(isNaN(n)?1:n,0,1);return[i,s,a,o]}return null};ne.get.hwb=function(t){if(!t)return null;var e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){var n=parseFloat(r[4]),i=(parseFloat(r[1])%360+360)%360,s=je(parseFloat(r[2]),0,100),a=je(parseFloat(r[3]),0,100),o=je(isNaN(n)?1:n,0,1);return[i,s,a,o]}return null};ne.to.hex=function(){var t=Dt(arguments);return"#"+Vr(t[0])+Vr(t[1])+Vr(t[2])+(t[3]<1?Vr(Math.round(t[3]*255)):"")};ne.to.rgb=function(){var t=Dt(arguments);return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};ne.to.rgb.percent=function(){var t=Dt(arguments),e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),n=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+n+"%)":"rgba("+e+"%, "+r+"%, "+n+"%, "+t[3]+")"};ne.to.hsl=function(){var t=Dt(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};ne.to.hwb=function(){var t=Dt(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};ne.to.keyword=function(t){return rl[t.slice(0,3)]};function je(t,e,r){return Math.min(Math.max(e,t),r)}function Vr(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var al=c((dy,sl)=>{"use strict";sl.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Ni=c((py,fl)=>{var ze=al(),ll={};for(Kr in ze)ze.hasOwnProperty(Kr)&&(ll[ze[Kr]]=Kr);var Kr,x=fl.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(X in x)if(x.hasOwnProperty(X)){if(!("channels"in x[X]))throw new Error("missing channels property: "+X);if(!("labels"in x[X]))throw new Error("missing channel labels property: "+X);if(x[X].labels.length!==x[X].channels)throw new Error("channel and label counts mismatch: "+X);ol=x[X].channels,ul=x[X].labels,delete x[X].channels,delete x[X].labels,Object.defineProperty(x[X],"channels",{value:ol}),Object.defineProperty(x[X],"labels",{value:ul})}var ol,ul,X;x.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),s=Math.max(e,r,n),a=s-i,o,u,l;return s===i?o=0:e===s?o=(r-n)/a:r===s?o=2+(n-e)/a:n===s&&(o=4+(e-r)/a),o=Math.min(o*60,360),o<0&&(o+=360),l=(i+s)/2,s===i?u=0:l<=.5?u=a/(s+i):u=a/(2-s-i),[o,u*100,l*100]};x.rgb.hsv=function(t){var e,r,n,i,s,a=t[0]/255,o=t[1]/255,u=t[2]/255,l=Math.max(a,o,u),h=l-Math.min(a,o,u),d=function(g){return(l-g)/6/h+1/2};return h===0?i=s=0:(s=h/l,e=d(a),r=d(o),n=d(u),a===l?i=n-r:o===l?i=1/3+e-n:u===l&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,l*100]};x.rgb.hwb=function(t){var e=t[0],r=t[1],n=t[2],i=x.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,s*100,n*100]};x.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i,s,a,o;return o=Math.min(1-e,1-r,1-n),i=(1-e-o)/(1-o)||0,s=(1-r-o)/(1-o)||0,a=(1-n-o)/(1-o)||0,[i*100,s*100,a*100,o*100]};function hm(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}x.rgb.keyword=function(t){var e=ll[t];if(e)return e;var r=1/0,n;for(var i in ze)if(ze.hasOwnProperty(i)){var s=ze[i],a=hm(t,s);a<r&&(r=a,n=i)}return n};x.keyword.rgb=function(t){return ze[t]};x.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var i=e*.4124+r*.3576+n*.1805,s=e*.2126+r*.7152+n*.0722,a=e*.0193+r*.1192+n*.9505;return[i*100,s*100,a*100]};x.rgb.lab=function(t){var e=x.rgb.xyz(t),r=e[0],n=e[1],i=e[2],s,a,o;return r/=95.047,n/=100,i/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,s=116*n-16,a=500*(r-n),o=200*(n-i),[s,a,o]};x.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i,s,a,o,u;if(r===0)return u=n*255,[u,u,u];n<.5?s=n*(1+r):s=n+r-n*r,i=2*n-s,o=[0,0,0];for(var l=0;l<3;l++)a=e+1/3*-(l-1),a<0&&a++,a>1&&a--,6*a<1?u=i+(s-i)*6*a:2*a<1?u=s:3*a<2?u=i+(s-i)*(2/3-a)*6:u=i,o[l]=u*255;return o};x.hsl.hsv=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=r,s=Math.max(n,.01),a,o;return n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s,o=(n+r)/2,a=n===0?2*i/(s+i):2*r/(n+r),[e,a*100,o*100]};x.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),a=255*n*(1-r),o=255*n*(1-r*s),u=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,u,a];case 1:return[o,n,a];case 2:return[a,n,u];case 3:return[a,o,n];case 4:return[u,a,n];case 5:return[n,a,o]}};x.hsv.hsl=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),s,a,o;return o=(2-r)*n,s=(2-r)*i,a=r*i,a/=s<=1?s:2-s,a=a||0,o/=2,[e,a*100,o*100]};x.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,s,a,o,u;i>1&&(r/=i,n/=i),s=Math.floor(6*e),a=1-n,o=6*e-s,s&1&&(o=1-o),u=r+o*(a-r);var l,h,d;switch(s){default:case 6:case 0:l=a,h=u,d=r;break;case 1:l=u,h=a,d=r;break;case 2:l=r,h=a,d=u;break;case 3:l=r,h=u,d=a;break;case 4:l=u,h=r,d=a;break;case 5:l=a,h=r,d=u;break}return[l*255,h*255,d*255]};x.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,s,a,o;return s=1-Math.min(1,e*(1-i)+i),a=1-Math.min(1,r*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),[s*255,a*255,o*255]};x.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i,s,a;return i=e*3.2406+r*-1.5372+n*-.4986,s=e*-.9689+r*1.8758+n*.0415,a=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[i*255,s*255,a*255]};x.xyz.lab=function(t){var e=t[0],r=t[1],n=t[2],i,s,a;return e/=95.047,r/=100,n/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=116*r-16,s=500*(e-r),a=200*(r-n),[i,s,a]};x.lab.xyz=function(t){var e=t[0],r=t[1],n=t[2],i,s,a;s=(e+16)/116,i=r/500+s,a=s-n/200;var o=Math.pow(s,3),u=Math.pow(i,3),l=Math.pow(a,3);return s=o>.008856?o:(s-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,a=l>.008856?l:(a-16/116)/7.787,i*=95.047,s*=100,a*=108.883,[i,s,a]};x.lab.lch=function(t){var e=t[0],r=t[1],n=t[2],i,s,a;return i=Math.atan2(n,r),s=i*360/2/Math.PI,s<0&&(s+=360),a=Math.sqrt(r*r+n*n),[e,a,s]};x.lch.lab=function(t){var e=t[0],r=t[1],n=t[2],i,s,a;return a=n/360*2*Math.PI,i=r*Math.cos(a),s=r*Math.sin(a),[e,i,s]};x.rgb.ansi16=function(t){var e=t[0],r=t[1],n=t[2],i=1 in arguments?arguments[1]:x.rgb.hsv(t)[2];if(i=Math.round(i/50),i===0)return 30;var s=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return i===2&&(s+=60),s};x.hsv.ansi16=function(t){return x.rgb.ansi16(x.hsv.rgb(t),t[2])};x.rgb.ansi256=function(t){var e=t[0],r=t[1],n=t[2];if(e===r&&r===n)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var i=16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5);return i};x.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var r=(~~(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[n,i,s]};x.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var r,n=Math.floor(t/36)/5*255,i=Math.floor((r=t%36)/6)/5*255,s=r%6/5*255;return[n,i,s]};x.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),r=e.toString(16).toUpperCase();return"000000".substring(r.length)+r};x.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];e[0].length===3&&(r=r.split("").map(function(o){return o+o}).join(""));var n=parseInt(r,16),i=n>>16&255,s=n>>8&255,a=n&255;return[i,s,a]};x.rgb.hcg=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),s=Math.min(Math.min(e,r),n),a=i-s,o,u;return a<1?o=s/(1-a):o=0,a<=0?u=0:i===e?u=(r-n)/a%6:i===r?u=2+(n-e)/a:u=4+(e-r)/a+4,u/=6,u%=1,[u*360,a*100,o*100]};x.hsl.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1,i=0;return r<.5?n=2*e*r:n=2*e*(1-r),n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]};x.hsv.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]};x.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];var i=[0,0,0],s=e%1*6,a=s%1,o=1-a,u=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=o,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=o,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=o}return u=(1-r)*n,[(r*i[0]+u)*255,(r*i[1]+u)*255,(r*i[2]+u)*255]};x.hcg.hsv=function(t){var e=t[1]/100,r=t[2]/100,n=e+r*(1-e),i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]};x.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100,n=r*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]};x.hcg.hwb=function(t){var e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]};x.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1-r,i=n-e,s=0;return i<1&&(s=(n-i)/(1-i)),[t[0],i*100,s*100]};x.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};x.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};x.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};x.gray.hsl=x.gray.hsv=function(t){return[0,0,t[0]]};x.gray.hwb=function(t){return[0,100,t[0]]};x.gray.cmyk=function(t){return[0,0,0,t[0]]};x.gray.lab=function(t){return[t[0],0,0]};x.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,r=(e<<16)+(e<<8)+e,n=r.toString(16).toUpperCase();return"000000".substring(n.length)+n};x.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var hl=c((gy,cl)=>{var Jr=Ni();function dm(){for(var t={},e=Object.keys(Jr),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function pm(t){var e=dm(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),i=Object.keys(Jr[n]),s=i.length,a=0;a<s;a++){var o=i[a],u=e[o];u.distance===-1&&(u.distance=e[n].distance+1,u.parent=n,r.unshift(o))}return e}function gm(t,e){return function(r){return e(t(r))}}function mm(t,e){for(var r=[e[t].parent,t],n=Jr[e[t].parent][t],i=e[t].parent;e[i].parent;)r.unshift(e[i].parent),n=gm(Jr[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}cl.exports=function(t){for(var e=pm(t),r={},n=Object.keys(e),i=n.length,s=0;s<i;s++){var a=n[s],o=e[a];o.parent!==null&&(r[a]=mm(a,e))}return r}});var pl=c((my,dl)=>{var Fi=Ni(),vm=hl(),ht={},ym=Object.keys(Fi);function bm(t){var e=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function wm(t){var e=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var n=t(r);if(typeof n=="object")for(var i=n.length,s=0;s<i;s++)n[s]=Math.round(n[s]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}ym.forEach(function(t){ht[t]={},Object.defineProperty(ht[t],"channels",{value:Fi[t].channels}),Object.defineProperty(ht[t],"labels",{value:Fi[t].labels});var e=vm(t),r=Object.keys(e);r.forEach(function(n){var i=e[n];ht[t][n]=wm(i),ht[t][n].raw=bm(i)})});dl.exports=ht});var vl=c((vy,ml)=>{"use strict";var $t=il(),ie=pl(),ki=[].slice,gl=["keyword","gray","hex"],Di={};Object.keys(ie).forEach(function(t){Di[ki.call(ie[t].labels).sort().join("")]=t});var Zr={};function J(t,e){if(!(this instanceof J))return new J(t,e);if(e&&e in gl&&(e=null),e&&!(e in ie))throw new Error("Unknown model: "+e);var r,n;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof J)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if(typeof t=="string"){var i=$t.get(t);if(i===null)throw new Error("Unable to parse color from string: "+t);this.model=i.model,n=ie[this.model].channels,this.color=i.value.slice(0,n),this.valpha=typeof i.value[n]=="number"?i.value[n]:1}else if(t.length){this.model=e||"rgb",n=ie[this.model].channels;var s=ki.call(t,0,n);this.color=$i(s,n),this.valpha=typeof t[n]=="number"?t[n]:1}else if(typeof t=="number")t&=16777215,this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;var a=Object.keys(t);"alpha"in t&&(a.splice(a.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);var o=a.sort().join("");if(!(o in Di))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=Di[o];var u=ie[this.model].labels,l=[];for(r=0;r<u.length;r++)l.push(t[u[r]]);this.color=$i(l)}if(Zr[this.model])for(n=ie[this.model].channels,r=0;r<n;r++){var h=Zr[this.model][r];h&&(this.color[r]=h(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}J.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in $t.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);var r=e.valpha===1?e.color:e.color.concat(this.valpha);return $t.to[e.model](r)},percentString:function(t){var e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:e.color.concat(this.valpha);return $t.to.rgb.percent(r)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var t={},e=ie[this.model].channels,r=ie[this.model].labels,n=0;n<e;n++)t[r[n]]=this.color[n];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray:function(){var t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject:function(){var t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round:function(t){return t=Math.max(t||0,0),new J(this.color.map(Em(t)).concat(this.valpha),this.model)},alpha:function(t){return arguments.length?new J(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:I("rgb",0,z(255)),green:I("rgb",1,z(255)),blue:I("rgb",2,z(255)),hue:I(["hsl","hsv","hsl","hwb","hcg"],0,function(t){return(t%360+360)%360}),saturationl:I("hsl",1,z(100)),lightness:I("hsl",2,z(100)),saturationv:I("hsv",1,z(100)),value:I("hsv",2,z(100)),chroma:I("hcg",1,z(100)),gray:I("hcg",2,z(100)),white:I("hwb",1,z(100)),wblack:I("hwb",2,z(100)),cyan:I("cmyk",0,z(100)),magenta:I("cmyk",1,z(100)),yellow:I("cmyk",2,z(100)),black:I("cmyk",3,z(100)),x:I("xyz",0,z(100)),y:I("xyz",1,z(100)),z:I("xyz",2,z(100)),l:I("lab",0,z(100)),a:I("lab",1),b:I("lab",2),keyword:function(t){return arguments.length?new J(t):ie[this.model].keyword(this.color)},hex:function(t){return arguments.length?new J(t):$t.to.hex(this.rgb().round().color)},rgbNumber:function(){var t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity:function(){for(var t=this.rgb().color,e=[],r=0;r<t.length;r++){var n=t[r]/255;e[r]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},isDark:function(){var t=this.rgb().color,e=(t[0]*299+t[1]*587+t[2]*114)/1e3;return e<128},isLight:function(){return!this.isDark()},negate:function(){for(var t=this.rgb(),e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten:function(t){var e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken:function(t){var e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate:function(t){var e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate:function(t){var e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten:function(t){var e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken:function(t){var e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale:function(){var t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return J.rgb(e,e,e)},fade:function(t){return this.alpha(this.valpha-this.valpha*t)},opaquer:function(t){return this.alpha(this.valpha+this.valpha*t)},rotate:function(t){var e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix:function(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);var r=t.rgb(),n=this.rgb(),i=e===void 0?.5:e,s=2*i-1,a=r.alpha()-n.alpha(),o=((s*a===-1?s:(s+a)/(1+s*a))+1)/2,u=1-o;return J.rgb(o*r.red()+u*n.red(),o*r.green()+u*n.green(),o*r.blue()+u*n.blue(),r.alpha()*i+n.alpha()*(1-i))}};Object.keys(ie).forEach(function(t){if(gl.indexOf(t)===-1){var e=ie[t].channels;J.prototype[t]=function(){if(this.model===t)return new J(this);if(arguments.length)return new J(arguments,t);var r=typeof arguments[e]=="number"?e:this.valpha;return new J(Sm(ie[this.model][t].raw(this.color)).concat(r),t)},J[t]=function(r){return typeof r=="number"&&(r=$i(ki.call(arguments),e)),new J(r,t)}}});function _m(t,e){return Number(t.toFixed(e))}function Em(t){return function(e){return _m(e,t)}}function I(t,e,r){return t=Array.isArray(t)?t:[t],t.forEach(function(n){(Zr[n]||(Zr[n]=[]))[e]=r}),t=t[0],function(n){var i;return arguments.length?(r&&(n=r(n)),i=this[t](),i.color[e]=n,i):(i=this[t]().color[e],r&&(i=r(i)),i)}}function z(t){return function(e){return Math.max(0,Math.min(t,e))}}function Sm(t){return Array.isArray(t)?t:[t]}function $i(t,e){for(var r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}ml.exports=J});var bl=c((yy,yl)=>{"use strict";yl.exports=function(e){for(var r=0,n=0;r<e.length;n=e.charCodeAt(r++)+((n<<5)-n));var i=Math.floor(Math.abs(Math.sin(n)*1e4%1*16777216)).toString(16);return"#"+Array(6-i.length+1).join("0")+i}});var Sl=c((by,El)=>{"use strict";var wl=vl(),_l=bl();El.exports=function(e,r){var n=e.split(r||":"),i=_l(n[0]);if(!n.length)return i;for(var s=0,a=n.length-1;s<a;s++)i=wl(i).mix(wl(_l(n[s+1]))).saturate(1).hex();return i}});var Ol=c((wy,xl)=>{"use strict";function de(t,e){if(e)return new de(t).style(e);if(!(this instanceof de))return new de(t);this.text=t}de.prototype.prefix="\x1B[";de.prototype.suffix="m";de.prototype.hex=function(e){e=e[0]==="#"?e.substring(1):e,e.length===3&&(e=e.split(""),e[5]=e[2],e[4]=e[2],e[3]=e[1],e[2]=e[1],e[1]=e[0],e=e.join(""));var r=e.substring(0,2),n=e.substring(2,4),i=e.substring(4,6);return[parseInt(r,16),parseInt(n,16),parseInt(i,16)]};de.prototype.rgb=function(e,r,n){var i=e/255*5,s=r/255*5,a=n/255*5;return this.ansi(i,s,a)};de.prototype.ansi=function(e,r,n){var i=Math.round(e),s=Math.round(r),a=Math.round(n);return 16+i*36+s*6+a};de.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};de.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};xl.exports=de});var Rl=c((_y,Ml)=>{var xm=Sl(),Om=Ol();Ml.exports=function(e,r){var n=r.namespace,i=r.colors!==!1?Om(n+":",xm(n)):n+":";return e[0]=i+" "+e[0],e}});var Al=c((Ey,Tl)=>{"use strict";Tl.exports=function(e,r){if(!r)return!1;for(var n=r.split(/[\s,]+/),i=0;i<n.length;i++){if(r=n[i].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(e))return!1;continue}if(new RegExp("^"+r+"$").test(e))return!0}return!1}});var Pl=c((Sy,ql)=>{var Mm=Al();ql.exports=function(e){return function(n){try{return Mm(n,e())}catch{}return!1}}});var jl=c((xy,Cl)=>{var Rm=Pl();Cl.exports=Rm(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var Nl=c((Oy,Ll)=>{Ll.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var Dl=c((My,Fl)=>{var Tm=Li(),Am=require("tty").isatty(1),Qr=Tm(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:Am,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});Qr.modify(Rl());Qr.use(jl());Qr.set(Nl());Fl.exports=Qr});var kt=c((Ry,Ii)=>{process.env.NODE_ENV==="production"?Ii.exports=Yu():Ii.exports=Dl()});var kl=c((Ty,$l)=>{"use strict";var Bi=require("fs"),{StringDecoder:qm}=require("string_decoder"),{Stream:Pm}=Ue();function Cm(){}$l.exports=(t,e)=>{let r=Buffer.alloc(65536),n=new qm("utf8"),i=new Pm,s="",a=0,o=0;return t.start===-1&&delete t.start,i.readable=!0,i.destroy=()=>{i.destroyed=!0,i.emit("end"),i.emit("close")},Bi.open(t.file,"a+","0644",(u,l)=>{if(u){e?e(u):i.emit("error",u),i.destroy();return}(function h(){if(i.destroyed){Bi.close(l,Cm);return}return Bi.read(l,r,0,r.length,a,(d,g)=>{if(d){e?e(d):i.emit("error",d),i.destroy();return}if(!g)return s&&((t.start==null||o>t.start)&&(e?e(null,s):i.emit("line",s)),o++,s=""),setTimeout(h,1e3);let v=n.write(r.slice(0,g));e||i.emit("data",v),v=(s+v).split(/\n+/);let f=v.length-1,m=0;for(;m<f;m++)(t.start==null||o>t.start)&&(e?e(null,v[m]):i.emit("line",v[m])),o++;return s=v[f],a+=g,h()})})()}),e?i.destroy:i}});var Wl=c((qy,Gl)=>{"use strict";var te=require("fs"),V=require("path"),Il=ju(),jm=require("zlib"),{MESSAGE:Lm}=W(),{Stream:Nm,PassThrough:Bl}=Ue(),Fm=ut(),pe=kt()("winston:file"),Dm=require("os"),$m=kl();Gl.exports=class extends Fm{constructor(e={}){super(e),this.name=e.name||"file";function r(n,...i){i.slice(1).forEach(s=>{if(e[s])throw new Error(`Cannot set ${s} and ${n} together`)})}if(this._stream=new Bl,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),e.filename||e.dirname)r("filename or dirname","stream"),this._basename=this.filename=e.filename?V.basename(e.filename):"winston.log",this.dirname=e.dirname||V.dirname(e.filename),this.options=e.options||{flags:"a"};else if(e.stream)console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),r("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(e.stream)),this.dirname=V.dirname(this._dest.path);else throw new Error("Cannot log to file without filename or stream.");this.maxsize=e.maxsize||null,this.rotationFormat=e.rotationFormat||!1,this.zippedArchive=e.zippedArchive||!1,this.maxFiles=e.maxFiles||null,this.eol=typeof e.eol=="string"?e.eol:Dm.EOL,this.tailable=e.tailable||!1,this.lazy=e.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname&&this._createLogDirIfNotExist(this.dirname),this.lazy||this.open()}finishIfEnding(){this._ending&&(this._opening?this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}):(this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())))}log(e,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(e,r)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(e,r)});return}if(this.lazy){if(!this._fileExist){this._opening||this.open(),this.once("open",()=>{this._fileExist=!0,this.log(e,r)});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{this._opening||this.open(),this.once("open",()=>{this.log(e,r)})});return}}let n=`${e[Lm]}${this.eol}`,i=Buffer.byteLength(n);function s(){if(this._size+=i,this._pendingSize-=i,pe("logged %s %s",this._size,n),this.emit("logged",e),!this._rotate&&!this._opening&&this._needsNewFile()){if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}}this._pendingSize+=i,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);let a=this._stream.write(n,s.bind(this));return a?r():(this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()})),pe("written",a,this._drain),this.finishIfEnding(),a}query(e,r){typeof e=="function"&&(r=e,e={}),e=d(e);let n=V.join(this.dirname,this.filename),i="",s=[],a=0,o=te.createReadStream(n,{encoding:"utf8"});o.on("error",g=>{if(o.readable&&o.destroy(),!!r)return g.code!=="ENOENT"?r(g):r(null,s)}),o.on("data",g=>{g=(i+g).split(/\n+/);let v=g.length-1,f=0;for(;f<v;f++)(!e.start||a>=e.start)&&u(g[f]),a++;i=g[v]}),o.on("close",()=>{i&&u(i,!0),e.order==="desc"&&(s=s.reverse()),r&&r(null,s)});function u(g,v){try{let f=JSON.parse(g);h(f)&&l(f)}catch(f){v||o.emit("error",f)}}function l(g){if(e.rows&&s.length>=e.rows&&e.order!=="desc"){o.readable&&o.destroy();return}e.fields&&(g=e.fields.reduce((v,f)=>(v[f]=g[f],v),{})),e.order==="desc"&&s.length>=e.rows&&s.shift(),s.push(g)}function h(g){if(!g||typeof g!="object")return;let v=new Date(g.timestamp);if(!(e.from&&v<e.from||e.until&&v>e.until||e.level&&e.level!==g.level))return!0}function d(g){return g=g||{},g.rows=g.rows||g.limit||10,g.start=g.start||0,g.until=g.until||new Date,typeof g.until!="object"&&(g.until=new Date(g.until)),g.from=g.from||g.until-24*60*60*1e3,typeof g.from!="object"&&(g.from=new Date(g.from)),g.order=g.order||"desc",g}}stream(e={}){let r=V.join(this.dirname,this.filename),n=new Nm,i={file:r,start:e.start};return n.destroy=$m(i,(s,a)=>{if(s)return n.emit("error",s);try{n.emit("data",a),a=JSON.parse(a),n.emit("log",a)}catch(o){n.emit("error",o)}}),n}open(){this.filename&&(this._opening||(this._opening=!0,this.stat((e,r)=>{if(e)return this.emit("error",e);pe("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{this._stream.eventNames().includes("rotate")?this._stream.emit("rotate"):this._rotate=!1})})))}stat(e){let r=this._getFile(),n=V.join(this.dirname,r);te.stat(n,(i,s)=>{if(i&&i.code==="ENOENT")return pe("ENOENT\xA0ok",n),this.filename=r,e(null,0);if(i)return pe(`err ${i.code} ${n}`),e(i);if(!s||this._needsNewFile(s.size))return this._incFile(()=>this.stat(e));this.filename=r,e(null,s.size)})}close(e){this._stream&&this._stream.end(()=>{e&&e(),this.emit("flush"),this.emit("closed")})}_needsNewFile(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e)}_setupStream(e){return e.on("error",this._onError),e}_cleanupStream(e){return e.removeListener("error",this._onError),e.destroy(),e}_rotateFile(){this._incFile(()=>this.open())}_endStream(e=()=>{}){this._dest?(this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),e()})):e()}_createStream(e){let r=V.join(this.dirname,this.filename);pe("create stream start",r,this.options);let n=te.createWriteStream(r,this.options).on("error",i=>pe(i)).on("close",()=>pe("close",n.path,n.bytesWritten)).on("open",()=>{pe("file open ok",r),this.emit("open",r),e.pipe(n),this.rotatedWhileOpening&&(this._stream=new Bl,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(n),e.end())});return pe("create stream ok",r),n}_incFile(e){pe("_incFile",this.filename);let r=V.extname(this._basename),n=V.basename(this._basename,r),i=[];this.zippedArchive&&i.push(function(s){let a=this._created>0&&!this.tailable?this._created:"";this._compressFile(V.join(this.dirname,`${n}${a}${r}`),V.join(this.dirname,`${n}${a}${r}.gz`),s)}.bind(this)),i.push(function(s){this.tailable?this._checkMaxFilesTailable(r,n,s):(this._created+=1,this._checkMaxFilesIncrementing(r,n,s))}.bind(this)),Il(i,e)}_getFile(){let e=V.extname(this._basename),r=V.basename(this._basename,e),n=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${n}${e}`:`${r}${e}`}_checkMaxFilesIncrementing(e,r,n){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(n);let i=this._created-this.maxFiles,s=i!==0?i:"",a=this.zippedArchive?".gz":"",o=`${r}${s}${e}${a}`,u=V.join(this.dirname,o);te.unlink(u,n)}_checkMaxFilesTailable(e,r,n){let i=[];if(!this.maxFiles)return;let s=this.zippedArchive?".gz":"";for(let a=this.maxFiles-1;a>1;a--)i.push(function(o,u){let l=`${r}${o-1}${e}${s}`,h=V.join(this.dirname,l);te.exists(h,d=>{if(!d)return u(null);l=`${r}${o}${e}${s}`,te.rename(h,V.join(this.dirname,l),u)})}.bind(this,a));Il(i,()=>{te.rename(V.join(this.dirname,`${r}${e}${s}`),V.join(this.dirname,`${r}1${e}${s}`),n)})}_compressFile(e,r,n){te.access(e,te.F_OK,i=>{if(i)return n();var s=jm.createGzip(),a=te.createReadStream(e),o=te.createWriteStream(r);o.on("finish",()=>{te.unlink(e,n)}),a.pipe(s).pipe(o)})}_createLogDirIfNotExist(e){te.existsSync(e)||te.mkdirSync(e,{recursive:!0})}}});var Ul=c((Cy,Hl)=>{"use strict";var km=require("http"),Im=require("https"),{Stream:Bm}=Ue(),Gm=ut(),Wm=wt();Hl.exports=class extends Gm{constructor(e={}){super(e),this.options=e,this.name=e.name||"http",this.ssl=!!e.ssl,this.host=e.host||"localhost",this.port=e.port,this.auth=e.auth,this.path=e.path||"",this.agent=e.agent,this.headers=e.headers||{},this.headers["content-type"]="application/json",this.batch=e.batch||!1,this.batchInterval=e.batchInterval||5e3,this.batchCount=e.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},this.port||(this.port=this.ssl?443:80)}log(e,r){this._request(e,null,null,(n,i)=>{i&&i.statusCode!==200&&(n=new Error(`Invalid HTTP Status Code: ${i.statusCode}`)),n?this.emit("warn",n):this.emit("logged",e)}),r&&setImmediate(r)}query(e,r){typeof e=="function"&&(r=e,e={}),e={method:"query",params:this.normalizeQuery(e)};let n=e.params.auth||null;delete e.params.auth;let i=e.params.path||null;delete e.params.path,this._request(e,n,i,(s,a,o)=>{if(a&&a.statusCode!==200&&(s=new Error(`Invalid HTTP Status Code: ${a.statusCode}`)),s)return r(s);if(typeof o=="string")try{o=JSON.parse(o)}catch(u){return r(u)}r(null,o)})}stream(e={}){let r=new Bm;e={method:"stream",params:e};let n=e.params.path||null;delete e.params.path;let i=e.params.auth||null;delete e.params.auth;let s="",a=this._request(e,i,n);return r.destroy=()=>a.destroy(),a.on("data",o=>{o=(s+o).split(/\n+/);let u=o.length-1,l=0;for(;l<u;l++)try{r.emit("log",JSON.parse(o[l]))}catch(h){r.emit("error",h)}s=o[u]}),a.on("error",o=>r.emit("error",o)),r}_request(e,r,n,i){e=e||{},r=r||this.auth,n=n||this.path||"",this.batch?this._doBatch(e,i,r,n):this._doRequest(e,i,r,n)}_doBatch(e,r,n,i){if(this.batchOptions.push(e),this.batchOptions.length===1){let s=this;this.batchCallback=r,this.batchTimeoutID=setTimeout(function(){s.batchTimeoutID=-1,s._doBatchRequest(s.batchCallback,n,i)},this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,n,i)}_doBatchRequest(e,r,n){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);let i=this.batchOptions.slice();this.batchOptions=[],this._doRequest(i,e,r,n)}_doRequest(e,r,n,i){let s=Object.assign({},this.headers);n&&n.bearer&&(s.Authorization=`Bearer ${n.bearer}`);let a=(this.ssl?Im:km).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${i.replace(/^\//,"")}`,headers:s,auth:n&&n.username&&n.password?`${n.username}:${n.password}`:"",agent:this.agent});a.on("error",r),a.on("response",o=>o.on("end",()=>r(null,o)).resume()),a.end(Buffer.from(Wm(e,this.options.replacer),"utf8"))}}});var Gi=c((jy,zl)=>{"use strict";var be=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";be.writable=t=>be(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";be.readable=t=>be(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";be.duplex=t=>be.writable(t)&&be.readable(t);be.transform=t=>be.duplex(t)&&typeof t._transform=="function";zl.exports=be});var Vl=c((Ny,Yl)=>{"use strict";var Hm=Gi(),{MESSAGE:Um}=W(),zm=require("os"),Ym=ut();Yl.exports=class extends Ym{constructor(e={}){if(super(e),!e.stream||!Hm(e.stream))throw new Error("options.stream is required.");this._stream=e.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=e.stream._writableState.objectMode,this.eol=typeof e.eol=="string"?e.eol:zm.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[Um]}${this.eol}`),r&&r()}}});var Kl=c(It=>{"use strict";Object.defineProperty(It,"Console",{configurable:!0,enumerable:!0,get(){return Zo()}});Object.defineProperty(It,"File",{configurable:!0,enumerable:!0,get(){return Wl()}});Object.defineProperty(It,"Http",{configurable:!0,enumerable:!0,get(){return Ul()}});Object.defineProperty(It,"Stream",{configurable:!0,enumerable:!0,get(){return Vl()}})});var en=c(Bt=>{"use strict";var Xr=Gn(),{configs:Wi}=W();Bt.cli=Xr.levels(Wi.cli);Bt.npm=Xr.levels(Wi.npm);Bt.syslog=Xr.levels(Wi.syslog);Bt.addColors=Xr.levels});var Zl=c((tn,Jl)=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});var Vm=Ar(),Km=Ye(Vm),Jm=kr(),Zm=Ye(Jm),Qm=Oi(),Xm=Ye(Qm),e0=Ei(),t0=Ye(e0),r0=Si(),n0=Ye(r0),i0=He(),s0=Ye(i0),a0=ft(),o0=Ye(a0);function Ye(t){return t&&t.__esModule?t:{default:t}}function u0(t,e,r){r=(0,t0.default)(r);var n=0,i=0,{length:s}=t,a=!1;s===0&&r(null);function o(u,l){u===!1&&(a=!0),a!==!0&&(u?r(u):(++i===s||l===Zm.default)&&r(null))}for(;n<s;n++)e(t[n],n,(0,n0.default)(o))}function l0(t,e,r){return(0,Xm.default)(t,1/0,e,r)}function f0(t,e,r){var n=(0,Km.default)(t)?u0:l0;return n(t,(0,s0.default)(e),r)}tn.default=(0,o0.default)(f0,3);Jl.exports=tn.default});var Xl=c((rn,Ql)=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.default=c0;function c0(t){return(e,r,n)=>t(e,n)}Ql.exports=rn.default});var an=c((sn,ef)=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});var h0=Zl(),d0=nn(h0),p0=Xl(),g0=nn(p0),m0=He(),v0=nn(m0),y0=ft(),b0=nn(y0);function nn(t){return t&&t.__esModule?t:{default:t}}function w0(t,e,r){return(0,d0.default)(t,(0,g0.default)((0,v0.default)(e)),r)}sn.default=(0,b0.default)(w0,3);ef.exports=sn.default});var rf=c(($y,tf)=>{"use strict";var _0=Object.prototype.toString;tf.exports=function(e){if(typeof e.displayName=="string"&&e.constructor.name)return e.displayName;if(typeof e.name=="string"&&e.name)return e.name;if(typeof e=="object"&&e.constructor&&typeof e.constructor.name=="string")return e.constructor.name;var r=e.toString(),n=_0.call(e).slice(8,-1);return n==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=n,r||"anonymous"}});var Hi=c((ky,nf)=>{"use strict";var E0=rf();nf.exports=function(e){var r=0,n;function i(){return r||(r=1,n=e.apply(this,arguments),e=null),n}return i.displayName=E0(e),i}});var Ui=c(Wt=>{Wt.get=function(t){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},n=Error.prepareStackTrace;Error.prepareStackTrace=function(s,a){return a},Error.captureStackTrace(r,t||Wt.get);var i=r.stack;return Error.prepareStackTrace=n,Error.stackTraceLimit=e,i};Wt.parse=function(t){if(!t.stack)return[];var e=this,r=t.stack.split(`
|
|
28
|
+
`).slice(1);return r.map(function(n){if(n.match(/^\s*[-]{4,}$/))return e._createParsedCallSite({fileName:n,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var i=n.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(i){var s=null,a=null,o=null,u=null,l=null,h=i[5]==="native";if(i[1]){o=i[1];var d=o.lastIndexOf(".");if(o[d-1]=="."&&d--,d>0){s=o.substr(0,d),a=o.substr(d+1);var g=s.indexOf(".Module");g>0&&(o=o.substr(g+1),s=s.substr(0,g))}u=null}a&&(u=s,l=a),a==="<anonymous>"&&(l=null,o=null);var v={fileName:i[2]||null,lineNumber:parseInt(i[3],10)||null,functionName:o,typeName:u,methodName:l,columnNumber:parseInt(i[4],10)||null,native:h};return e._createParsedCallSite(v)}}).filter(function(n){return!!n})};function Gt(t){for(var e in t)this[e]=t[e]}var S0=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],x0=["topLevel","eval","native","constructor"];S0.forEach(function(t){Gt.prototype[t]=null,Gt.prototype["get"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});x0.forEach(function(t){Gt.prototype[t]=!1,Gt.prototype["is"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});Wt._createParsedCallSite=function(t){return new Gt(t)}});var af=c((Gy,sf)=>{"use strict";var{Writable:O0}=Ue();sf.exports=class extends O0{constructor(e){if(super({objectMode:!0}),!e)throw new Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=e}_write(e,r,n){return e.exception?this.transport.log(e,n):(n(),!0)}}});var Yi=c((Hy,lf)=>{"use strict";var of=require("os"),M0=an(),zi=kt()("winston:exception"),R0=Hi(),uf=Ui(),T0=af();lf.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle exceptions");this.logger=e,this.handlers=new Map}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(n=>this._addHandler(n));this._addHandler(r)}),this.catcher||(this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher))}unhandle(){this.catcher&&(process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)))}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`uncaughtException: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
|
|
29
|
+
`),stack:e&&e.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:of.loadavg(),uptime:of.uptime()}}getTrace(e){return(e?uf.parse(e):uf.get()).map(n=>({column:n.getColumnNumber(),file:n.getFileName(),function:n.getFunctionName(),line:n.getLineNumber(),method:n.getMethodName(),native:n.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=!0;let r=new T0(e);this.handlers.set(e,r),this.logger.pipe(r)}}_uncaughtException(e){let r=this.getAllInfo(e),n=this._getExceptionHandlers(),i=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!n.length&&i&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),i=!1);function a(){zi("doExit",i),zi("process._exiting",process._exiting),i&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!n||n.length===0)return process.nextTick(a);M0(n,(o,u)=>{let l=R0(u),h=o.transport||o;function d(g){return()=>{zi(g),l()}}h._ending=!0,h.once("finish",d("finished")),h.once("error",d("error"))},()=>i&&a()),this.logger.log(r),i&&(s=setTimeout(a,3e3))}_getExceptionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleExceptions)}}});var cf=c((zy,ff)=>{"use strict";var{Writable:A0}=Ue();ff.exports=class extends A0{constructor(e){if(super({objectMode:!0}),!e)throw new Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=e}_write(e,r,n){return e.rejection?this.transport.log(e,n):(n(),!0)}}});var Ki=c((Vy,pf)=>{"use strict";var hf=require("os"),q0=an(),Vi=kt()("winston:rejection"),P0=Hi(),df=Ui(),C0=cf();pf.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle rejections");this.logger=e,this.handlers=new Map}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(n=>this._addHandler(n));this._addHandler(r)}),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher))}unhandle(){this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)))}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`unhandledRejection: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
|
|
30
|
+
`),stack:e&&e.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:hf.loadavg(),uptime:hf.uptime()}}getTrace(e){return(e?df.parse(e):df.get()).map(n=>({column:n.getColumnNumber(),file:n.getFileName(),function:n.getFunctionName(),line:n.getLineNumber(),method:n.getMethodName(),native:n.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=!0;let r=new C0(e);this.handlers.set(e,r),this.logger.pipe(r)}}_unhandledRejection(e){let r=this.getAllInfo(e),n=this._getRejectionHandlers(),i=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!n.length&&i&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),i=!1);function a(){Vi("doExit",i),Vi("process._exiting",process._exiting),i&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!n||n.length===0)return process.nextTick(a);q0(n,(o,u)=>{let l=P0(u),h=o.transport||o;function d(g){return()=>{Vi(g),l()}}h._ending=!0,h.once("finish",d("finished")),h.once("error",d("error"))},()=>i&&a()),this.logger.log(r),i&&(s=setTimeout(a,3e3))}_getRejectionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleRejections)}}});var mf=c((Ky,gf)=>{"use strict";var Ji=class{constructor(e){let r=on();if(typeof e!="object"||Array.isArray(e)||!(e instanceof r))throw new Error("Logger is required for profiling");this.logger=e,this.start=Date.now()}done(...e){typeof e[e.length-1]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),e.pop());let r=typeof e[e.length-1]=="object"?e.pop():{};return r.level=r.level||"info",r.durationMs=Date.now()-this.start,this.logger.write(r)}};gf.exports=Ji});var on=c((Jy,wf)=>{"use strict";var{Stream:j0,Transform:L0}=Ue(),vf=an(),{LEVEL:we,SPLAT:yf}=W(),bf=Gi(),N0=Yi(),F0=Ki(),D0=bi(),$0=mf(),{warn:k0}=Wn(),I0=en(),B0=/%[scdjifoO%]/g,un=class extends L0{constructor(e){super({objectMode:!0}),this.configure(e)}child(e){let r=this;return Object.create(r,{write:{value:function(n){let i=Object.assign({},e,n);n instanceof Error&&(i.stack=n.stack,i.message=n.message),r.write(i)}}})}configure({silent:e,format:r,defaultMeta:n,levels:i,level:s="info",exitOnError:a=!0,transports:o,colors:u,emitErrs:l,formatters:h,padLevels:d,rewriters:g,stripColors:v,exceptionHandlers:f,rejectionHandlers:m}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=r||this.format||Dn()(),this.defaultMeta=n||null,this.levels=i||this.levels||I0.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new N0(this),this.rejections=new F0(this),this.profilers={},this.exitOnError=a,o&&(o=Array.isArray(o)?o:[o],o.forEach(E=>this.add(E))),u||l||h||d||g||v)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
31
|
+
`));f&&this.exceptions.handle(f),m&&this.rejections.handle(m)}isLevelEnabled(e){let r=Zi(this.levels,e);if(r===null)return!1;let n=Zi(this.levels,this.level);return n===null?!1:!this.transports||this.transports.length===0?n>=r:this.transports.findIndex(s=>{let a=Zi(this.levels,s.level);return a===null&&(a=n),a>=r})!==-1}log(e,r,...n){if(arguments.length===1)return e[we]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[we]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[we]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[i]=n;if(typeof i=="object"&&i!==null&&!(r&&r.match&&r.match(B0))){let a=Object.assign({},this.defaultMeta,i,{[we]:e,[yf]:n,level:e,message:r});return i.message&&(a.message=`${a.message} ${i.message}`),i.stack&&(a.stack=i.stack),this.write(a),this}return this.write(Object.assign({},this.defaultMeta,{[we]:e,[yf]:n,level:e,message:r})),this}_transform(e,r,n){if(this.silent)return n();e[we]||(e[we]=e.level),!this.levels[e[we]]&&this.levels[e[we]]!==0&&console.error("[winston] Unknown logger level: %s",e[we]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,n()}}_final(e){let r=this.transports.slice();vf(r,(n,i)=>{if(!n||n.finished)return setImmediate(i);n.once("finish",i),n.end()},e)}add(e){let r=!bf(e)||e.log.length>2?new D0({transport:e}):e;if(!r._writableState||!r._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",r),this._onEvent("warn",r),this.pipe(r),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}remove(e){if(!e)return this;let r=e;return(!bf(e)||e.log.length>2)&&(r=this.transports.filter(n=>n.transport===e)[0]),r&&this.unpipe(r),this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){k0.deprecated("setLevels")}query(e,r){typeof e=="function"&&(r=e,e={}),e=e||{};let n={},i=Object.assign({},e.query||{});function s(o,u){e.query&&typeof o.formatQuery=="function"&&(e.query=o.formatQuery(i)),o.query(e,(l,h)=>{if(l)return u(l);typeof o.formatResults=="function"&&(h=o.formatResults(h,e.format)),u(null,h)})}function a(o,u){s(o,(l,h)=>{u&&(h=l||h,h&&(n[o.name]=h),u()),u=null})}vf(this.transports.filter(o=>!!o.query),a,()=>r(null,n))}stream(e={}){let r=new j0,n=[];return r._streams=n,r.destroy=()=>{let i=n.length;for(;i--;)n[i].destroy()},this.transports.filter(i=>!!i.stream).forEach(i=>{let s=i.stream(e);s&&(n.push(s),s.on("log",a=>{a.transport=a.transport||[],a.transport.push(i.name),r.emit("log",a)}),s.on("error",a=>{a.transport=a.transport||[],a.transport.push(i.name),r.emit("error",a)}))}),r}startTimer(){return new $0(this)}profile(e,...r){let n=Date.now();if(this.profilers[e]){let i=this.profilers[e];delete this.profilers[e],typeof r[r.length-2]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),r.pop());let s=typeof r[r.length-1]=="object"?r.pop():{};return s.level=s.level||"info",s.durationMs=n-i,s.message=s.message||e,this.write(s)}return this.profilers[e]=n,this}handleExceptions(...e){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...e)}unhandleExceptions(...e){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...e)}cli(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
32
|
+
`))}_onEvent(e,r){function n(i){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,i,r)}r["__winston"+e]||(r["__winston"+e]=n.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function Zi(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(un.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});wf.exports=un});var Qi=c((Zy,_f)=>{"use strict";var{LEVEL:G0}=W(),W0=en(),H0=on(),U0=kt()("winston:create-logger");function z0(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}_f.exports=function(t={}){t.levels=t.levels||W0.npm.levels;class e extends H0{constructor(i){super(i)}}let r=new e(t);return Object.keys(t.levels).forEach(function(n){if(U0('Define prototype method for "%s"',n),n==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[n]=function(...i){let s=this||r;if(i.length===1){let[a]=i,o=a&&a.message&&a||{message:a};return o.level=o[G0]=n,s._addDefaultMeta(o),s.write(o),this||r}return i.length===0?(s.log(n,""),s):s.log(n,...i)},e.prototype[z0(n)]=function(){return(this||r).isLevelEnabled(n)}}),r}});var Sf=c((Xy,Ef)=>{"use strict";var Y0=Qi();Ef.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let n=r.transports||this.options.transports;n?r.transports=Array.isArray(n)?n.slice():[n]:r.transports=[];let i=Y0(r);i.on("close",()=>this._delete(e)),this.loggers.set(e,i)}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,n)=>this._removeLogger(n))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var Of=c(N=>{"use strict";var xf=Gn(),{warn:Ht}=Wn();N.version=Va().version;N.transports=Kl();N.config=en();N.addColors=xf.levels;N.format=xf.format;N.createLogger=Qi();N.Logger=on();N.ExceptionHandler=Yi();N.RejectionHandler=Ki();N.Container=Sf();N.Transport=ut();N.loggers=new N.Container;var _e=N.createLogger();Object.keys(N.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>N[t]=(...e)=>_e[t](...e));Object.defineProperty(N,"level",{get(){return _e.level},set(t){_e.level=t}});Object.defineProperty(N,"exceptions",{get(){return _e.exceptions}});Object.defineProperty(N,"rejections",{get(){return _e.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(N,t,{get(){return _e[t]},set(e){_e[t]=e}})});Object.defineProperty(N,"default",{get(){return{exceptionHandlers:_e.exceptionHandlers,rejectionHandlers:_e.rejectionHandlers,transports:_e.transports}}});Ht.deprecated(N,"setLevels");Ht.forFunctions(N,"useFormat",["cli"]);Ht.forProperties(N,"useFormat",["padLevels","stripColors"]);Ht.forFunctions(N,"deprecated",["addRewriter","addFilter","clone","extend"]);Ht.forProperties(N,"deprecated",["emitErrs","levelLength"])});var qf=c((Ut,Af)=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.default=void 0;var J0={printWidth:100,tabWidth:2,semi:!0,singleQuote:!0,trailingComma:"es5",bracketSpacing:!0,bracketSameLine:!1,arrowParens:"avoid",plugins:["@trivago/prettier-plugin-sort-imports","prettier-plugin-sh","prettier-plugin-pkg","prettier-plugin-toml","prettier-plugin-nginx"],overrides:[{files:["*.toml.template"],options:{parser:"toml"}},{files:["*.nginxconf","nginx*.conf","nginx*.conf.template"],options:{parser:"nginx"}},{files:[".env",".env.*"],options:{parser:"sh"}}],importOrder:["(^react(.*)|^next(.*))$","<THIRD_PARTY_MODULES>","^[./]"],importOrderSeparation:!0,importOrderSortSpecifiers:!0,importOrderParserPlugins:["typescript","jsx","decorators-legacy"]},ob=Ut.default=J0;Af.exports=Ut.default});var Cf=c((mb,Pf)=>{Pf.exports=function(t,e){for(var r=[],n=0;n<t.length;n++){var i=e(t[n],n);tv(i)?r.push.apply(r,i):r.push(i)}return r};var tv=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"}});var Df=c((vb,Ff)=>{"use strict";Ff.exports=Lf;function Lf(t,e,r){t instanceof RegExp&&(t=jf(t,r)),e instanceof RegExp&&(e=jf(e,r));var n=Nf(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function jf(t,e){var r=e.match(t);return r?r[0]:null}Lf.range=Nf;function Nf(t,e,r){var n,i,s,a,o,u=r.indexOf(t),l=r.indexOf(e,u+1),h=u;if(u>=0&&l>0){if(t===e)return[u,l];for(n=[],s=r.length;h>=0&&!o;)h==u?(n.push(h),u=r.indexOf(t,h+1)):n.length==1?o=[n.pop(),l]:(i=n.pop(),i<s&&(s=i,a=l),l=r.indexOf(e,h+1)),h=u<l&&u>=0?u:l;n.length&&(o=[s,a])}return o}});var Uf=c((yb,Hf)=>{var rv=Cf(),$f=Df();Hf.exports=sv;var kf="\0SLASH"+Math.random()+"\0",If="\0OPEN"+Math.random()+"\0",rs="\0CLOSE"+Math.random()+"\0",Bf="\0COMMA"+Math.random()+"\0",Gf="\0PERIOD"+Math.random()+"\0";function ts(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function nv(t){return t.split("\\\\").join(kf).split("\\{").join(If).split("\\}").join(rs).split("\\,").join(Bf).split("\\.").join(Gf)}function iv(t){return t.split(kf).join("\\").split(If).join("{").split(rs).join("}").split(Bf).join(",").split(Gf).join(".")}function Wf(t){if(!t)return[""];var e=[],r=$f("{","}",t);if(!r)return t.split(",");var n=r.pre,i=r.body,s=r.post,a=n.split(",");a[a.length-1]+="{"+i+"}";var o=Wf(s);return s.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),e.push.apply(e,a),e}function sv(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),dt(nv(t),!0).map(iv)):[]}function av(t){return"{"+t+"}"}function ov(t){return/^-?0\d/.test(t)}function uv(t,e){return t<=e}function lv(t,e){return t>=e}function dt(t,e){var r=[],n=$f("{","}",t);if(!n||/\$$/.test(n.pre))return[t];var i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),a=i||s,o=n.body.indexOf(",")>=0;if(!a&&!o)return n.post.match(/,.*\}/)?(t=n.pre+"{"+n.body+rs+n.post,dt(t)):[t];var u;if(a)u=n.body.split(/\.\./);else if(u=Wf(n.body),u.length===1&&(u=dt(u[0],!1).map(av),u.length===1)){var h=n.post.length?dt(n.post,!1):[""];return h.map(function(B){return n.pre+u[0]+B})}var l=n.pre,h=n.post.length?dt(n.post,!1):[""],d;if(a){var g=ts(u[0]),v=ts(u[1]),f=Math.max(u[0].length,u[1].length),m=u.length==3?Math.abs(ts(u[2])):1,E=uv,y=v<g;y&&(m*=-1,E=lv);var _=u.some(ov);d=[];for(var b=g;E(b,v);b+=m){var w;if(s)w=String.fromCharCode(b),w==="\\"&&(w="");else if(w=String(b),_){var q=f-w.length;if(q>0){var j=new Array(q+1).join("0");b<0?w="-"+j+w.slice(1):w=j+w}}d.push(w)}}else d=rv(u,function($){return dt($,!1)});for(var R=0;R<d.length;R++)for(var P=0;P<h.length;P++){var M=l+d[R]+h[P];(!e||a||M)&&r.push(M)}return r}});var ss=c((bb,Jf)=>{Jf.exports=se;se.Minimatch=H;var zt=function(){try{return require("path")}catch{}}()||{sep:"/"};se.sep=zt.sep;var Ve=se.GLOBSTAR=H.GLOBSTAR={},fv=Uf(),zf={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},ns="[^/]",is=ns+"*?",cv="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",hv="(?:(?!(?:\\/|^)\\.).)*?",Yf=dv("().*{}+?[]^$\\!");function dv(t){return t.split("").reduce(function(e,r){return e[r]=!0,e},{})}var Vf=/\/+/;se.filter=pv;function pv(t,e){return e=e||{},function(r,n,i){return se(r,t,e)}}function Le(t,e){e=e||{};var r={};return Object.keys(t).forEach(function(n){r[n]=t[n]}),Object.keys(e).forEach(function(n){r[n]=e[n]}),r}se.defaults=function(t){if(!t||typeof t!="object"||!Object.keys(t).length)return se;var e=se,r=function(i,s,a){return e(i,s,Le(t,a))};return r.Minimatch=function(i,s){return new e.Minimatch(i,Le(t,s))},r.Minimatch.defaults=function(i){return e.defaults(Le(t,i)).Minimatch},r.filter=function(i,s){return e.filter(i,Le(t,s))},r.defaults=function(i){return e.defaults(Le(t,i))},r.makeRe=function(i,s){return e.makeRe(i,Le(t,s))},r.braceExpand=function(i,s){return e.braceExpand(i,Le(t,s))},r.match=function(n,i,s){return e.match(n,i,Le(t,s))},r};H.defaults=function(t){return se.defaults(t).Minimatch};function se(t,e,r){return cn(e),r||(r={}),!r.nocomment&&e.charAt(0)==="#"?!1:new H(e,r).match(t)}function H(t,e){if(!(this instanceof H))return new H(t,e);cn(t),e||(e={}),t=t.trim(),!e.allowWindowsEscape&&zt.sep!=="/"&&(t=t.split(zt.sep).join("/")),this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion!==void 0?e.maxGlobstarRecursion:200,this.set=[],this.pattern=t,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}H.prototype.debug=function(){};H.prototype.make=gv;function gv(){var t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate();var r=this.globSet=this.braceExpand();e.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,r),r=this.globParts=r.map(function(n){return n.split(Vf)}),this.debug(this.pattern,r),r=r.map(function(n,i,s){return n.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(n){return n.indexOf(!1)===-1}),this.debug(this.pattern,r),this.set=r}H.prototype.parseNegate=mv;function mv(){var t=this.pattern,e=!1,r=this.options,n=0;if(!r.nonegate){for(var i=0,s=t.length;i<s&&t.charAt(i)==="!";i++)e=!e,n++;n&&(this.pattern=t.substr(n)),this.negate=e}}se.braceExpand=function(t,e){return Kf(t,e)};H.prototype.braceExpand=Kf;function Kf(t,e){return e||(this instanceof H?e=this.options:e={}),t=typeof t>"u"?this.pattern:t,cn(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:fv(t)}var vv=1024*64,cn=function(t){if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>vv)throw new TypeError("pattern is too long")};H.prototype.parse=yv;var fn={};function yv(t,e){cn(t);var r=this.options;if(t==="**")if(r.noglobstar)t="*";else return Ve;if(t==="")return"";var n="",i=!!r.nocase,s=!1,a=[],o=[],u,l=!1,h=-1,d=-1,g=t.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=this;function f(){if(u){switch(u){case"*":n+=is,i=!0;break;case"?":n+=ns,i=!0;break;default:n+="\\"+u;break}v.debug("clearStateChar %j %j",u,n),u=!1}}for(var m=0,E=t.length,y;m<E&&(y=t.charAt(m));m++){if(this.debug("%s %s %s %j",t,m,n,y),s&&Yf[y]){n+="\\"+y,s=!1;continue}switch(y){case"/":return!1;case"\\":f(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",t,m,n,y),l){this.debug(" in class"),y==="!"&&m===d+1&&(y="^"),n+=y;continue}if(y==="*"&&u==="*")continue;v.debug("call clearStateChar %j",u),f(),u=y,r.noext&&f();continue;case"(":if(l){n+="(";continue}if(!u){n+="\\(";continue}a.push({type:u,start:m-1,reStart:n.length,open:zf[u].open,close:zf[u].close}),n+=u==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",u,n),u=!1;continue;case")":if(l||!a.length){n+="\\)";continue}f(),i=!0;var _=a.pop();n+=_.close,_.type==="!"&&o.push(_),_.reEnd=n.length;continue;case"|":if(l||!a.length||s){n+="\\|",s=!1;continue}f(),n+="|";continue;case"[":if(f(),l){n+="\\"+y;continue}l=!0,d=m,h=n.length,n+=y;continue;case"]":if(m===d+1||!l){n+="\\"+y,s=!1;continue}var b=t.substring(d+1,m);try{RegExp("["+b+"]")}catch{var w=this.parse(b,fn);n=n.substr(0,h)+"\\["+w[0]+"\\]",i=i||w[1],l=!1;continue}i=!0,l=!1,n+=y;continue;default:f(),s?s=!1:Yf[y]&&!(y==="^"&&l)&&(n+="\\"),n+=y}}for(l&&(b=t.substr(d+1),w=this.parse(b,fn),n=n.substr(0,h)+"\\["+w[0],i=i||w[1]),_=a.pop();_;_=a.pop()){var q=n.slice(_.reStart+_.open.length);this.debug("setting tail",n,_),q=q.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(O,re,le){return le||(le="\\"),re+re+le+"|"}),this.debug(`tail=%j
|
|
33
|
+
%s`,q,q,_,n);var j=_.type==="*"?is:_.type==="?"?ns:"\\"+_.type;i=!0,n=n.slice(0,_.reStart)+j+"\\("+q}f(),s&&(n+="\\\\");var R=!1;switch(n.charAt(0)){case"[":case".":case"(":R=!0}for(var P=o.length-1;P>-1;P--){var M=o[P],$=n.slice(0,M.reStart),B=n.slice(M.reStart,M.reEnd-8),G=n.slice(M.reEnd-8,M.reEnd),U=n.slice(M.reEnd);G+=U;var Z=$.split("(").length-1,me=U;for(m=0;m<Z;m++)me=me.replace(/\)[+*?]?/,"");U=me;var p="";U===""&&e!==fn&&(p="$");var S=$+B+U+p+G;n=S}if(n!==""&&i&&(n="(?=.)"+n),R&&(n=g+n),e===fn)return[n,i];if(!i)return wv(t);var L=r.nocase?"i":"";try{var Y=new RegExp("^"+n+"$",L)}catch{return new RegExp("$.")}return Y._glob=t,Y._src=n,Y}se.makeRe=function(t,e){return new H(t,e||{}).makeRe()};H.prototype.makeRe=bv;function bv(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?is:e.dot?cv:hv,n=e.nocase?"i":"",i=t.map(function(s){return s.map(function(a){return a===Ve?r:typeof a=="string"?_v(a):a._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch{this.regexp=!1}return this.regexp}se.match=function(t,e,r){r=r||{};var n=new H(e,r);return t=t.filter(function(i){return n.match(i)}),n.options.nonull&&!t.length&&t.push(e),t};H.prototype.match=function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var n=this.options;zt.sep!=="/"&&(e=e.split(zt.sep).join("/")),e=e.split(Vf),this.debug(this.pattern,"split",e);var i=this.set;this.debug(this.pattern,"set",i);var s,a;for(a=e.length-1;a>=0&&(s=e[a],!s);a--);for(a=0;a<i.length;a++){var o=i[a],u=e;n.matchBase&&o.length===1&&(u=[s]);var l=this.matchOne(u,o,r);if(l)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate};H.prototype.matchOne=function(t,e,r){return e.indexOf(Ve)!==-1?this._matchGlobstar(t,e,r,0,0):this._matchOne(t,e,r,0,0)};H.prototype._matchGlobstar=function(t,e,r,n,i){var s,a=-1;for(s=i;s<e.length;s++)if(e[s]===Ve){a=s;break}var o=-1;for(s=e.length-1;s>=0;s--)if(e[s]===Ve){o=s;break}var u=e.slice(i,a),l=r?e.slice(a+1):e.slice(a+1,o),h=r?[]:e.slice(o+1);if(u.length){var d=t.slice(n,n+u.length);if(!this._matchOne(d,u,r,0,0))return!1;n+=u.length}var g=0;if(h.length){if(h.length+n>t.length)return!1;var v=t.length-h.length;if(this._matchOne(t,h,r,v,0))g=h.length;else{if(t[t.length-1]!==""||n+h.length===t.length||(v--,!this._matchOne(t,h,r,v,0)))return!1;g=h.length+1}}if(!l.length){var f=!!g;for(s=n;s<t.length-g;s++){var m=String(t[s]);if(f=!0,m==="."||m===".."||!this.options.dot&&m.charAt(0)===".")return!1}return r||f}for(var E=[[[],0]],y=E[0],_=0,b=[0],w=0;w<l.length;w++){var q=l[w];q===Ve?(b.push(_),y=[[],0],E.push(y)):(y[0].push(q),_++)}for(var j=E.length-1,R=t.length-g,P=0;P<E.length;P++)E[P][1]=R-(b[j--]+E[P][0].length);return!!this._matchGlobStarBodySections(t,E,n,0,r,0,!!g)};H.prototype._matchGlobStarBodySections=function(t,e,r,n,i,s,a){var o=e[n];if(!o){for(var u=r;u<t.length;u++){a=!0;var l=t[u];if(l==="."||l===".."||!this.options.dot&&l.charAt(0)===".")return!1}return a}for(var h=o[0],d=o[1];r<=d;){var g=this._matchOne(t.slice(0,r+h.length),h,i,r,0);if(g&&s<this.maxGlobstarRecursion){var v=this._matchGlobStarBodySections(t,e,r+h.length,n+1,i,s+1,a);if(v!==!1)return v}var l=t[r];if(l==="."||l===".."||!this.options.dot&&l.charAt(0)===".")return!1;r++}return i||null};H.prototype._matchOne=function(t,e,r,n,i){var s,a,o,u;for(s=n,a=i,o=t.length,u=e.length;s<o&&a<u;s++,a++){this.debug("matchOne loop");var l=e[a],h=t[s];if(this.debug(e,l,h),l===!1||l===Ve)return!1;var d;if(typeof l=="string"?(d=h===l,this.debug("string match",l,h,d)):(d=h.match(l),this.debug("pattern match",l,h,d)),!d)return!1}if(s===o&&a===u)return!0;if(s===o)return r;if(a===u)return s===o-1&&t[s]==="";throw new Error("wtf?")};function wv(t){return t.replace(/\\(.)/g,"$1")}function _v(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var Qf=c((wb,Zf)=>{"use strict";var Ev=ss();Zf.exports=function(){function t(e){this.matchers=e.map(function(r){return typeof r=="string"?new Ev.Minimatch(r):r})}return t.prototype.match=function(e){for(var r=0;r<this.matchers.length;r++)if(this.matchers[r].match(e))return!0;return!1},t.prototype.mayContain=function(e){for(var r=e.split(/\/|\\/g).filter(Boolean),n=0;n<this.matchers.length;n++)for(var i=this.matchers[n],s=0;s<i.set.length;s++)if(i.matchOne(r,i.set[s],!0))return!0;return!1},t}()});var tc=c((_b,ec)=>{"use strict";var Xf=require("path");ec.exports=function(e){return Xf.sep!=="/"?e.split(Xf.sep).join("/"):e}});var us=c((Eb,ac)=>{"use strict";var ic=require("fs"),rc=Qf(),Sv=tc(),xv=require("path"),Ov=ss();function Yt(t,e){let r=sc(e),n;return r.includeBasePath?n=function(i){return i.basePath.split(xv.sep).join("/").replace(/\/+$/,"")+"/"+i.relativePath}:n=function(i){return i.relativePath},os(t,r,null,[]).map(n)}function Mv(t,e=ic){try{return e.statSync(t)}catch(r){if(r!==null&&typeof r=="object"&&(r.code==="ENOENT"||r.code==="ENOTDIR"||r.code==="EPERM"))return;throw r}}(function(t){function e(n,i){let s=sc(i);return os(Sv(n),s,null,[])}t.entries=e;class r{constructor(i,s,a,o,u){this.relativePath=i,this.basePath=s,this.mode=a,this.size=o,this.mtime=u}get fullPath(){return`${this.basePath}/${this.relativePath}`}isDirectory(){return(this.mode&61440)===16384}}t.Entry=r})(Yt||(Yt={}));function as(t){return typeof t<"u"}function sc(t){let e={};return Array.isArray(t)?e.globs=t:t&&(e=t),e}function nc(t,e){return t?.map(r=>typeof r=="string"?new Ov.Minimatch(r,e):r)}function Rv(t){return t==null?"":t.slice(-1)!=="/"?t+"/":t}function Tv(t,e){let r=t.relativePath,n=e.relativePath;return r===n?0:r<n?-1:1}function os(t,e,r,n){var i;let s=(i=e.fs)!==null&&i!==void 0?i:ic,a=Rv(r),o=s.realpathSync(t+"/"+a);if(n.indexOf(o)>=0)return[];n.push(o);try{let u=e.globOptions,l=as(u)?nc(e.ignore,u):e.ignore,h=as(u)?nc(e.globs,u):e.globs,d,g,v=[];if(l&&(g=new rc(l)),h&&(d=new rc(h)),d&&!d.mayContain(a))return v;let E=s.readdirSync(t+"/"+a).map(y=>{let _=a+y;if(g&&g.match(_))return;let b=t+"/"+_,w=Mv(b,s);return w&&w.isDirectory()?new Yt.Entry(_+"/",t,w.mode,w.size,w.mtime.getTime()):new Yt.Entry(_,t,w&&w.mode||0,w&&w.size||0,w&&w.mtime.getTime()||0)}).filter(as).sort(Tv);for(let y=0;y<E.length;++y){let _=E[y];_.isDirectory()?(e.directories!==!1&&(!d||d.match(_.relativePath))&&v.push(_),v=v.concat(os(t,e,_.relativePath,n))):(!d||d.match(_.relativePath))&&v.push(_)}return v}finally{n.pop()}}ac.exports=Yt});var gs=(t=0)=>e=>`\x1B[${e+t}m`,ms=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,vs=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,F={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},kv=Object.keys(F.modifier),bc=Object.keys(F.color),wc=Object.keys(F.bgColor),Iv=[...bc,...wc];function _c(){let t=new Map;for(let[e,r]of Object.entries(F)){for(let[n,i]of Object.entries(r))F[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=F[n],t.set(i[0],i[1]);Object.defineProperty(F,e,{value:r,enumerable:!1})}return Object.defineProperty(F,"codes",{value:t,enumerable:!1}),F.color.close="\x1B[39m",F.bgColor.close="\x1B[49m",F.color.ansi=gs(),F.color.ansi256=ms(),F.color.ansi16m=vs(),F.bgColor.ansi=gs(10),F.bgColor.ansi256=ms(10),F.bgColor.ansi16m=vs(10),Object.defineProperties(F,{rgbToAnsi256:{value(e,r,n){return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>F.rgbToAnsi256(...F.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,i;if(e>=232)r=((e-232)*10+8)/255,n=r,i=r;else{e-=16;let o=e%36;r=Math.floor(e/36)/5,n=Math.floor(o/6)/5,i=o%6/5}let s=Math.max(r,n,i)*2;if(s===0)return 30;let a=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>F.ansi256ToAnsi(F.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>F.ansi256ToAnsi(F.hexToAnsi256(e)),enumerable:!1}}),F}var Ec=_c(),ce=Ec;var Xt=Se(require("node:process"),1),bs=Se(require("node:os"),1),gn=Se(require("node:tty"),1);function ae(t,e=globalThis.Deno?globalThis.Deno.args:Xt.default.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}var{env:D}=Xt.default,Qt;ae("no-color")||ae("no-colors")||ae("color=false")||ae("color=never")?Qt=0:(ae("color")||ae("colors")||ae("color=true")||ae("color=always"))&&(Qt=1);function Sc(){if("FORCE_COLOR"in D)return D.FORCE_COLOR==="true"?1:D.FORCE_COLOR==="false"?0:D.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(D.FORCE_COLOR,10),3)}function xc(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Oc(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=Sc();n!==void 0&&(Qt=n);let i=r?Qt:n;if(i===0)return 0;if(r){if(ae("color=16m")||ae("color=full")||ae("color=truecolor"))return 3;if(ae("color=256"))return 2}if("TF_BUILD"in D&&"AGENT_NAME"in D)return 1;if(t&&!e&&i===void 0)return 0;let s=i||0;if(D.TERM==="dumb")return s;if(Xt.default.platform==="win32"){let a=bs.default.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in D)return"GITHUB_ACTIONS"in D||"GITEA_ACTIONS"in D?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in D)||D.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in D)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(D.TEAMCITY_VERSION)?1:0;if(D.COLORTERM==="truecolor"||D.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in D){let a=Number.parseInt((D.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(D.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(D.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(D.TERM)||"COLORTERM"in D?1:s}function ys(t,e={}){let r=Oc(t,{streamIsTTY:t&&t.isTTY,...e});return xc(r)}var Mc={stdout:ys({isTTY:gn.default.isatty(1)}),stderr:ys({isTTY:gn.default.isatty(2)})},ws=Mc;function _s(t,e,r){let n=t.indexOf(e);if(n===-1)return t;let i=e.length,s=0,a="";do a+=t.slice(s,n)+e+r,s=n+i,n=t.indexOf(e,s);while(n!==-1);return a+=t.slice(s),a}function Es(t,e,r,n){let i=0,s="";do{let a=t[n-1]==="\r";s+=t.slice(i,a?n-1:n)+e+(a?`\r
|
|
34
|
+
`:`
|
|
35
|
+
`)+r,i=n+1,n=t.indexOf(`
|
|
36
|
+
`,i)}while(n!==-1);return s+=t.slice(i),s}var{stdout:Ss,stderr:xs}=ws,mn=Symbol("GENERATOR"),Ze=Symbol("STYLER"),mt=Symbol("IS_EMPTY"),Os=["ansi","ansi","ansi256","ansi16m"],Qe=Object.create(null),Rc=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Ss?Ss.level:0;t.level=e.level===void 0?r:e.level},er=class{constructor(e){return Ms(e)}},Ms=t=>{let e=(...r)=>r.join(" ");return Rc(e,t),Object.setPrototypeOf(e,vt.prototype),e};function vt(t){return Ms(t)}Object.setPrototypeOf(vt.prototype,Function.prototype);for(let[t,e]of Object.entries(ce))Qe[t]={get(){let r=tr(this,yn(e.open,e.close,this[Ze]),this[mt]);return Object.defineProperty(this,t,{value:r}),r}};Qe.visible={get(){let t=tr(this,this[Ze],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var vn=(t,e,r,...n)=>t==="rgb"?e==="ansi16m"?ce[r].ansi16m(...n):e==="ansi256"?ce[r].ansi256(ce.rgbToAnsi256(...n)):ce[r].ansi(ce.rgbToAnsi(...n)):t==="hex"?vn("rgb",e,r,...ce.hexToRgb(...n)):ce[r][t](...n),Tc=["rgb","hex","ansi256"];for(let t of Tc){Qe[t]={get(){let{level:r}=this;return function(...n){let i=yn(vn(t,Os[r],"color",...n),ce.color.close,this[Ze]);return tr(this,i,this[mt])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);Qe[e]={get(){let{level:r}=this;return function(...n){let i=yn(vn(t,Os[r],"bgColor",...n),ce.bgColor.close,this[Ze]);return tr(this,i,this[mt])}}}}var Ac=Object.defineProperties(()=>{},{...Qe,level:{enumerable:!0,get(){return this[mn].level},set(t){this[mn].level=t}}}),yn=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},tr=(t,e,r)=>{let n=(...i)=>qc(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,Ac),n[mn]=t,n[Ze]=e,n[mt]=r,n},qc=(t,e)=>{if(t.level<=0||!e)return t[mt]?"":e;let r=t[Ze];if(r===void 0)return e;let{openAll:n,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=_s(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
|
|
37
|
+
`);return s!==-1&&(e=Es(e,i,n,s)),n+e+i};Object.defineProperties(vt.prototype,Qe);var Yv=vt(),Vv=vt({level:xs?xs.level:0});var ge=Se(Of());var Mf=["error","warn","info","debug"],ln={solidWhiteTerminal:"#ffffff",thunderbirdRedTerminal:"#d21313",funGreenTerminal:"#00801f",flushOrangeTerminal:"#ff8600"},Rf={error:ln.thunderbirdRedTerminal,warn:ln.flushOrangeTerminal,info:ln.funGreenTerminal,debug:ln.solidWhiteTerminal};var V0=2,K0=new er({level:V0}),Tf="YYYY-MM-DD HH:mm:ss",Xi=class{constructor(e){let r={},n={};for(let[u,l]of Mf.entries())n[l]={level:u,color:e?e[l]:Rf[l]},r[l]=u;let i=(u,l)=>K0.hex(n[u].color)(l),s=ge.default.format.combine(ge.default.format.errors({stack:!0}),ge.default.format.timestamp({format:Tf}),ge.default.format.printf(u=>{var l;return i(u.level,`${u.timestamp} ${u.level}: ${u.message} ${(l=u.stack)!==null&&l!==void 0?l:""}`)})),a=ge.default.format.combine(ge.default.format.errors({stack:!0}),ge.default.format.timestamp({format:Tf}),ge.default.format.printf(u=>{var l;return i(u.level,`${u.timestamp} ${u.level}: ${u.message} ${(l=u.stack)!==null&&l!==void 0?l:""}`)})),o=[new ge.default.transports.Console];this.instance=ge.default.createLogger({level:process.env.LOG_LEVEL||"info",levels:r,format:process.env.NODE_ENV==="production"?a:s,transports:o})}},Ee=new Xi().instance;var Z0=Se(qf());var Q0=require("prettier");var X0={"":!0,true:!0,yes:!0,false:!1,no:!1};function es(t){let e={};for(let r of t){let n=r.replaceAll(/=[^=]*/g,"");if(!n.startsWith("--"))continue;let i=r.replaceAll(/^--[^=]*=?/g,""),s=X0[i];s===void 0?e[n]=i:e[n]=s}return e}var Av=Se(us());var qv=Se(us());var dn=require("esbuild"),Ke=Se(require("fs")),hn=Se(require("path")),oc=new RegExp(/^(?:.*[/\\])?node_modules(?:[/\\].*)?$/),Cv=["prettier","@mservicestech/prettier-config"],jv=new RegExp(/^(?:.*[/\\])?fork-ts-checker-webpack-plugin(?:[/\\].*)?$/),Lv={name:"dirname-and-filename",setup({onLoad:t}){t({filter:/.*/},({path:e})=>{if(oc.test(e)&&jv.test(e)||!oc.test(e)){let r=Ke.default.readFileSync(e,"utf8"),n=hn.default.extname(e).slice(1),i=hn.default.dirname(e);return r=r.replaceAll("__dirname",`\`${i}\``).replaceAll("__filename",`\`${e}\``),{contents:r,loader:n}}})}};function Nv(){Ee.info(`Usage:
|
|
38
|
+
Usage:
|
|
39
|
+
${__filename} [--help] [--typescript-file-path] [--esbuild-externals-string] [--outfile-path] [--watch] [--esbuild-compiler-arguments]
|
|
40
|
+
Where:
|
|
41
|
+
help - print usage information and exit
|
|
42
|
+
typescript-file-path - path to typescript module path
|
|
43
|
+
esbuild-externals-string - esbuild external plugin
|
|
44
|
+
outfile-path - path to built file destination (e.g /build/application.js)
|
|
45
|
+
watch - toggle long-running form of build that restarts on changes
|
|
46
|
+
esbuild-compiler-arguments - arguments passed to build options in format key:value, for example: esbuild-compiler-arguments=logLevel:"info",platform:"node"
|
|
47
|
+
Description:
|
|
48
|
+
This script is used to generate an esbuild only when we need to build something using an esbuild plugin
|
|
49
|
+
`)}function Fv(t){if(!t)return{};let e=t.split(",");return Object.assign({},...e.map(n=>{let i=n.split(":");return{[i[0]]:i[1]}}))}function uc(t){return Ke.default.readdirSync(t).reduce((e,r)=>{let n=hn.default.join(t,r),i=Ke.default.statSync(n);if(i.isDirectory()){let s=uc(n);return Math.max(e,s)}else return Math.max(e,i.mtime.getTime())},0)}function Dv(t){t["--help"]&&(Nv(),process.exit(0));let e=t["--typescript-file-path"],r=t["--esbuild-externals-string"];e||(Ee.error("You need to pass TypeScript's module path using the --typescript-file-path parameter"),process.exit(1));let n=t["--outfile-path"],i=n??e.replace(".ts",".js"),s=!!n,a="src";if(Ke.default.existsSync(i)&&!t["--watch"]){let l=uc(a),h=Ke.default.statSync(i).mtime.getTime(),d=l<=h,g=s&&Ke.default.statSync(e).mtime.getTime()<=h;(d||g)&&(Ee.info(`Build of ${i} skipped (no changes detected)`),process.exit(0))}Ee.info(`Building using esbuild with custom plugins: ${e}`);let o=Fv(t["--esbuild-compiler-arguments"]),u={entryPoints:[e],bundle:!0,loader:{".js":"js",".jsx":"jsx",".ts":"ts",".tsx":"tsx",".node":"copy",".mjs":"js"},platform:"node",target:"node20.15",resolveExtensions:[".mjs",".js",".ts",".tsx"],format:"cjs",tsconfig:"tsconfig.json",logLevel:"error",outfile:i,external:Array.from(new Set(Cv.concat(r?r.split(","):[]))),plugins:[Lv],...o};t["--watch"]?(0,dn.context)(u).then(l=>{l.watch()}).catch(l=>{Ee.error(l),process.exit(1)}):(0,dn.build)(u).catch(l=>{Ee.error(l),process.exit(1)})}Dv(es(process.argv));
|
|
50
|
+
/*! Bundled license information:
|
|
51
|
+
|
|
52
|
+
safe-buffer/index.js:
|
|
53
|
+
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
54
|
+
*/
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
commitAll: true,
|
|
3
|
+
header: '',
|
|
4
|
+
infile: './CHANGELOG.md',
|
|
5
|
+
path: '.',
|
|
6
|
+
scripts: {
|
|
7
|
+
// In some cases, we need to add files other than CHANGELOG and package.json
|
|
8
|
+
// to the release commit. This prebump script, together with commitAll: true
|
|
9
|
+
// option, let's us do that
|
|
10
|
+
prebump: 'git add .',
|
|
11
|
+
postchangelog: `./node_modules/@mservicestech/scripts/removeGitHashesFromMarkdownFile/removeGitHashesFromMarkdownFile.js --markdown-file=./CHANGELOG.md${process.env.TRACK_DEPENDENCIES === 'true' ? ' && bash ./node_modules/@mservicestech/scripts/enrich_changelog_with_dependency_changes/enrich_changelog_with_dependency_changes.sh' : ''}`,
|
|
12
|
+
},
|
|
13
|
+
types: [
|
|
14
|
+
{ type: 'feat', section: 'Features' },
|
|
15
|
+
{ type: 'fix', section: 'Bug Fixes' },
|
|
16
|
+
{ type: 'test', section: 'Tests', hidden: true },
|
|
17
|
+
{ type: 'build', section: 'Build System', hidden: true },
|
|
18
|
+
{ type: 'ci', hidden: true },
|
|
19
|
+
],
|
|
20
|
+
};
|