@mcp-com-ai/shared-utils 1.1.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +121 -121
- package/dist/logger.js +32 -32
- package/dist/workspace.d.ts +54 -0
- package/package.json +1 -1
package/dist/logger.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
2
|
+
var Yp=Object.create;var{getPrototypeOf:Fp,defineProperty:qo,getOwnPropertyNames:Cp}=Object;var Yo=Object.prototype.hasOwnProperty;function jp(e){return this[e]}var Ip,Wp,Fo=(e,t,r)=>{var i=e!=null&&typeof e==="object";if(i){var a=t?Ip??=new WeakMap:Wp??=new WeakMap,u=a.get(e);if(u)return u}r=e!=null?Yp(Fp(e)):{};let f=t||!e||!e.__esModule||!Yo.call(e,"default")?qo(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let c of Cp(e))if(!Yo.call(f,c))qo(f,c,{get:jp.bind(e,c),enumerable:!0})}if(i)a.set(e,f);return f};var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var j=import.meta.require;var Ne=b(function(GS,zo){class Zi extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)
|
|
3
3
|
Found: ${e.toString().split(`
|
|
4
4
|
`)[0]}
|
|
5
|
-
`);Error.captureStackTrace(this,
|
|
6
|
-
`)!=-1,i=this._styles,a=i.length;while(a--){var u=
|
|
7
|
-
`));return!0}
|
|
8
|
-
${W}`,
|
|
9
|
-
${W}`;let
|
|
10
|
-
${Y}`;return M.pop(),`[${N}]`}let H=Object.keys(O),I=H.length;if(I===0)return"{}";if(f<M.length+1)return'"[Object]"';let F="",
|
|
11
|
-
${W}`,F=" ";let
|
|
5
|
+
`);Error.captureStackTrace(this,Zi)}}zo.exports=(e)=>{if(e.length>2)throw new Zi(e);function t(i={}){this.options=i}t.prototype.transform=e;function r(i){return new t(i)}return r.Format=t,r}});var Ko=b(function(VS,Jo){var Zo={};Jo.exports=Zo;var Bo={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(Bo).forEach(function(e){var t=Bo[e],r=Zo[e]=[];r.open="\x1B["+t[0]+"m",r.close="\x1B["+t[1]+"m"})});var Xo=b(function(zS,Qo){Qo.exports=function(e,t){t=t||process.argv||[];var r=t.indexOf("--"),i=/^-{1,2}/.test(e)?"":"--",a=t.indexOf(i+e);return a!==-1&&(r===-1?!0:a<r)}});var tu=b(function(BS,eu){var i0=j("os"),$e=Xo(),De=process.env,ur=void 0;if($e("no-color")||$e("no-colors")||$e("color=false"))ur=!1;else if($e("color")||$e("colors")||$e("color=true")||$e("color=always"))ur=!0;if("FORCE_COLOR"in De)ur=De.FORCE_COLOR.length===0||parseInt(De.FORCE_COLOR,10)!==0;function s0(e){if(e===0)return!1;return{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function a0(e){if(ur===!1)return 0;if($e("color=16m")||$e("color=full")||$e("color=truecolor"))return 3;if($e("color=256"))return 2;if(e&&!e.isTTY&&ur!==!0)return 0;var t=ur?1:0;if(process.platform==="win32"){var r=i0.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586)return Number(r[2])>=14931?3:2;return 1}if("CI"in De){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(a){return a in De})||De.CI_NAME==="codeship")return 1;return t}if("TEAMCITY_VERSION"in De)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(De.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in De){var i=parseInt((De.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(De.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(De.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(De.TERM))return 1;if("COLORTERM"in De)return 1;if(De.TERM==="dumb")return t;return t}function Ji(e){var t=a0(e);return s0(t)}eu.exports={supportsColor:Ji,stdout:Ji(process.stdout),stderr:Ji(process.stderr)}});var nu=b(function(ZS,ru){ru.exports=function(t,r){var i="";t=t||"Run the trap, drop the bass",t=t.split("");var a={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 t.forEach(function(u){u=u.toLowerCase();var f=a[u]||[" "],c=Math.floor(Math.random()*f.length);if(typeof a[u]<"u")i+=a[u][c];else i+=u}),i}});var su=b(function(JS,iu){iu.exports=function(t,r){t=t||" he is here ";var i={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"]},a=[].concat(i.up,i.down,i.mid);function u(d){var g=Math.floor(Math.random()*d);return g}function f(d){var g=!1;return a.filter(function(v){g=v===d}),g}function c(d,g){var v="",_,w;g=g||{},g.up=typeof g.up<"u"?g.up:!0,g.mid=typeof g.mid<"u"?g.mid:!0,g.down=typeof g.down<"u"?g.down:!0,g.size=typeof g.size<"u"?g.size:"maxi",d=d.split("");for(w in d){if(f(w))continue;switch(v=v+d[w],_={up:0,down:0,mid:0},g.size){case"mini":_.up=u(8),_.mid=u(2),_.down=u(8);break;case"maxi":_.up=u(16)+3,_.mid=u(4)+1,_.down=u(64)+3;break;default:_.up=u(8)+1,_.mid=u(6)/2,_.down=u(8)+1;break}var E=["up","mid","down"];for(var p in E){var M=E[p];for(var P=0;P<=_[M];P++)if(g[M])v=v+i[M][u(i[M].length)]}}return v}return c(t,r)}});var ou=b(function(KS,au){au.exports=function(e){return function(t,r,i){if(t===" ")return t;switch(r%3){case 0:return e.red(t);case 1:return e.white(t);case 2:return e.blue(t)}}}});var lu=b(function(QS,uu){uu.exports=function(e){return function(t,r,i){return r%2===0?t:e.inverse(t)}}});var cu=b(function(XS,fu){fu.exports=function(e){var t=["red","yellow","green","blue","magenta"];return function(r,i,a){if(r===" ")return r;else return e[t[i++%t.length]](r)}}});var du=b(function(e2,hu){hu.exports=function(e){var t=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(r,i,a){return r===" "?r:e[t[Math.round(Math.random()*(t.length-2))]](r)}}});var _u=b(function(r2,yu){var V={};yu.exports=V;V.themes={};var o0=j("util"),Pt=V.styles=Ko(),mu=Object.defineProperties,u0=new RegExp(/[\r\n]+/g);V.supportsColor=tu().supportsColor;if(typeof V.enabled>"u")V.enabled=V.supportsColor()!==!1;V.enable=function(){V.enabled=!0};V.disable=function(){V.enabled=!1};V.stripColors=V.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")};var t2=V.stylize=function(t,r){if(!V.enabled)return t+"";var i=Pt[r];if(!i&&r in V)return V[r](t);return i.open+t+i.close},l0=/[|\\{}()[\]^$+*?.]/g,f0=function(e){if(typeof e!=="string")throw TypeError("Expected a string");return e.replace(l0,"\\$&")};function gu(e){var t=function r(){return h0.apply(r,arguments)};return t._styles=e,t.__proto__=c0,t}var pu=function(){var e={};return Pt.grey=Pt.gray,Object.keys(Pt).forEach(function(t){Pt[t].closeRe=new RegExp(f0(Pt[t].close),"g"),e[t]={get:function(){return gu(this._styles.concat(t))}}}),e}(),c0=mu(function(){},pu);function h0(){var e=Array.prototype.slice.call(arguments),t=e.map(function(f){if(f!=null&&f.constructor===String)return f;else return o0.inspect(f)}).join(" ");if(!V.enabled||!t)return t;var r=t.indexOf(`
|
|
6
|
+
`)!=-1,i=this._styles,a=i.length;while(a--){var u=Pt[i[a]];if(t=u.open+t.replace(u.closeRe,u.open)+u.close,r)t=t.replace(u0,function(f){return u.close+f+u.open})}return t}V.setTheme=function(e){if(typeof e==="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 t in e)(function(r){V[r]=function(i){if(typeof e[r]==="object"){var a=i;for(var u in e[r])a=V[e[r][u]](a);return a}return V[e[r]](i)}})(t)};function d0(){var e={};return Object.keys(pu).forEach(function(t){e[t]={get:function(){return gu([t])}}}),e}var m0=function(t,r){var i=r.split("");return i=i.map(t),i.join("")};V.trap=nu();V.zalgo=su();V.maps={};V.maps.america=ou()(V);V.maps.zebra=lu()(V);V.maps.rainbow=cu()(V);V.maps.random=du()(V);for(Ki in V.maps)(function(e){V[e]=function(t){return m0(V.maps[e],t)}})(Ki);var Ki;mu(V,d0())});var Qi=b(function(n2,wu){var g0=_u();wu.exports=g0});var bu=b(function(p0){p0.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};p0.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var vu=b(function(w0){w0.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};w0.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var Su=b(function(S0){S0.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};S0.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var xu=b(function(Cn){Object.defineProperty(Cn,"cli",{value:bu()});Object.defineProperty(Cn,"npm",{value:vu()});Object.defineProperty(Cn,"syslog",{value:Su()})});var le=b(function(Ir){Object.defineProperty(Ir,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Ir,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Ir,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Ir,"configs",{value:xu()})});var In=b(function(l2,jn){var ts=Qi(),{LEVEL:Xi,MESSAGE:es}=le();ts.enabled=!0;var Mu=/\s+/;class He{constructor(e={}){if(e.colors)this.addColors(e.colors);this.options=e}static addColors(e){let t=Object.keys(e).reduce((r,i)=>(r[i]=Mu.test(e[i])?e[i].split(Mu):e[i],r),{});return He.allColors=Object.assign({},He.allColors||{},t),He.allColors}addColors(e){return He.addColors(e)}colorize(e,t,r){if(typeof r>"u")r=t;if(!Array.isArray(He.allColors[e]))return ts[He.allColors[e]](r);for(let i=0,a=He.allColors[e].length;i<a;i++)r=ts[He.allColors[e][i]](r);return r}transform(e,t){if(t.all&&typeof e[es]==="string")e[es]=this.colorize(e[Xi],e.level,e[es]);if(t.level||t.all||!t.message)e.level=this.colorize(e[Xi],e.level);if(t.all||t.message)e.message=this.colorize(e[Xi],e.level,e.message);return e}}jn.exports=(e)=>new He(e);jn.exports.Colorizer=jn.exports.Format=He});var Ou=b(function(f2,Eu){var{Colorizer:E0}=In();Eu.exports=(e)=>(E0.addColors(e.colors||e),e)});var ku=b(function(c2,Du){var O0=Ne();Du.exports=O0((e)=>(e.message=` ${e.message}`,e))});var Nu=b(function(h2,Tu){var D0=Ne(),{LEVEL:Ru,MESSAGE:rs}=le();Tu.exports=D0((e,{stack:t,cause:r})=>{if(e instanceof Error){let a=Object.assign({},e,{level:e.level,[Ru]:e[Ru]||e.level,message:e.message,[rs]:e[rs]||e.message});if(t)a.stack=e.stack;if(r)a.cause=e.cause;return a}if(!(e.message instanceof Error))return e;let i=e.message;if(Object.assign(e,i),e.message=i.message,e[rs]=i.message,t)e.stack=i.stack;if(r)e.cause=i.cause;return e})});var is=b(function(d2,Wn){var{configs:k0,LEVEL:Lu,MESSAGE:ns}=le();class lr{constructor(e={levels:k0.npm.levels}){this.paddings=lr.paddingForLevels(e.levels,e.filler),this.options=e}static getLongestLevel(e){let t=Object.keys(e).map((r)=>r.length);return Math.max(...t)}static paddingForLevel(e,t,r){let i=r+1-e.length,a=Math.floor(i/t.length);return`${t}${t.repeat(a)}`.slice(0,i)}static paddingForLevels(e,t=" "){let r=lr.getLongestLevel(e);return Object.keys(e).reduce((i,a)=>(i[a]=lr.paddingForLevel(a,t,r),i),{})}transform(e,t){if(e.message=`${this.paddings[e[Lu]]}${e.message}`,e[ns])e[ns]=`${this.paddings[e[Lu]]}${e[ns]}`;return e}}Wn.exports=(e)=>new lr(e);Wn.exports.Padder=Wn.exports.Format=lr});var Pu=b(function(m2,as){var{Colorizer:R0}=In(),{Padder:T0}=is(),{configs:N0,MESSAGE:L0}=le();class ss{constructor(e={}){if(!e.levels)e.levels=N0.cli.levels;this.colorizer=new R0(e),this.padder=new T0(e),this.options=e}transform(e,t){return this.colorizer.transform(this.padder.transform(e,t),t),e[L0]=`${e.level}:${e.message}`,e}}as.exports=(e)=>new ss(e);as.exports.Format=ss});var qu=b(function(g2,os){var P0=Ne();function Au(e){if(!e.every(A0))return;return(t)=>{let r=t;for(let i=0;i<e.length;i++)if(r=e[i].transform(r,e[i].options),!r)return!1;return r}}function A0(e){if(typeof e.transform!=="function")throw Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
|
|
7
|
+
`));return!0}os.exports=(...e)=>{let t=P0(Au(e)),r=t();return r.Format=t.Format,r};os.exports.cascade=Au});var $r=b(function(p2,Cu){var{hasOwnProperty:Wr}=Object.prototype,qt=fs();qt.configure=fs;qt.stringify=qt;qt.default=qt;p2.stringify=qt;p2.configure=fs;Cu.exports=qt;var q0=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function bt(e){if(e.length<5000&&!q0.test(e))return`"${e}"`;return JSON.stringify(e)}function us(e,t){if(e.length>200||t)return e.sort(t);for(let r=1;r<e.length;r++){let i=e[r],a=r;while(a!==0&&e[a-1]>i)e[a]=e[a-1],a--;e[a]=i}return e}var Y0=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function ls(e){return Y0.call(e)!==void 0&&e.length!==0}function Yu(e,t,r){if(e.length<r)r=e.length;let i=t===","?"":" ",a=`"0":${i}${e[0]}`;for(let u=1;u<r;u++)a+=`${t}"${u}":${i}${e[u]}`;return a}function F0(e){if(Wr.call(e,"circularValue")){let t=e.circularValue;if(typeof t==="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===TypeError)return{toString(){throw TypeError("Converting circular structure to JSON")}};throw TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function C0(e){let t;if(Wr.call(e,"deterministic")){if(t=e.deterministic,typeof t!=="boolean"&&typeof t!=="function")throw TypeError('The "deterministic" argument must be of type boolean or comparator function')}return t===void 0?!0:t}function j0(e,t){let r;if(Wr.call(e,t)){if(r=e[t],typeof r!=="boolean")throw TypeError(`The "${t}" argument must be of type boolean`)}return r===void 0?!0:r}function Fu(e,t){let r;if(Wr.call(e,t)){if(r=e[t],typeof r!=="number")throw TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw TypeError(`The "${t}" argument must be an integer`);if(r<1)throw RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}function At(e){if(e===1)return"1 item";return`${e} items`}function I0(e){let t=new Set;for(let r of e)if(typeof r==="string"||typeof r==="number")t.add(String(r));return t}function W0(e){if(Wr.call(e,"strict")){let t=e.strict;if(typeof t!=="boolean")throw TypeError('The "strict" argument must be of type boolean');if(t)return(r)=>{let i=`Object can not safely be stringified. Received type ${typeof r}`;if(typeof r!=="function")i+=` (${r.toString()})`;throw Error(i)}}}function fs(e){e={...e};let t=W0(e);if(t){if(e.bigint===void 0)e.bigint=!1;if(!("circularValue"in e))e.circularValue=Error}let r=F0(e),i=j0(e,"bigint"),a=C0(e),u=typeof a==="function"?a:void 0,f=Fu(e,"maximumDepth"),c=Fu(e,"maximumBreadth");function d(E,p,M,P,A,W){let O=p[E];if(typeof O==="object"&&O!==null&&typeof O.toJSON==="function")O=O.toJSON(E);switch(O=P.call(p,E,O),typeof O){case"string":return bt(O);case"object":{if(O===null)return"null";if(M.indexOf(O)!==-1)return r;let N="",Z=",",Y=W;if(Array.isArray(O)){if(O.length===0)return"[]";if(f<M.length+1)return'"[Array]"';if(M.push(O),A!=="")W+=A,N+=`
|
|
8
|
+
${W}`,Z=`,
|
|
9
|
+
${W}`;let he=Math.min(O.length,c),be=0;for(;be<he-1;be++){let Ve=d(String(be),O,M,P,A,W);N+=Ve!==void 0?Ve:"null",N+=Z}let ve=d(String(be),O,M,P,A,W);if(N+=ve!==void 0?ve:"null",O.length-1>c){let Ve=O.length-c-1;N+=`${Z}"... ${At(Ve)} not stringified"`}if(A!=="")N+=`
|
|
10
|
+
${Y}`;return M.pop(),`[${N}]`}let H=Object.keys(O),I=H.length;if(I===0)return"{}";if(f<M.length+1)return'"[Object]"';let F="",fe="";if(A!=="")W+=A,Z=`,
|
|
11
|
+
${W}`,F=" ";let re=Math.min(I,c);if(a&&!ls(O))H=us(H,u);M.push(O);for(let he=0;he<re;he++){let be=H[he],ve=d(be,O,M,P,A,W);if(ve!==void 0)N+=`${fe}${bt(be)}:${F}${ve}`,fe=Z}if(I>c){let he=I-c;N+=`${fe}"...":${F}"${At(he)} not stringified"`,fe=Z}if(A!==""&&fe.length>1)N=`
|
|
12
12
|
${W}${N}
|
|
13
|
-
${Y}`;return M.pop(),`{${N}}`}case"number":return isFinite(O)?String(O):t?t(O):"null";case"boolean":return O===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(O);default:return t?t(O):void 0}}function g(E,p,M,P,A,W){if(typeof p==="object"&&p!==null&&typeof p.toJSON==="function")p=p.toJSON(E);switch(typeof p){case"string":return
|
|
14
|
-
${W}`,
|
|
15
|
-
${W}`;let I=Math.min(p.length,c),F=0;for(;F<I-1;F++){let
|
|
16
|
-
${O}`;return M.pop(),`[${N}]`}M.push(p);let Y="";if(A!=="")W+=A,
|
|
17
|
-
${W}`,Y=" ";let H="";for(let I of P){let F=g(I,p[I],M,P,A,W);if(F!==void 0)N+=`${H}${
|
|
13
|
+
${Y}`;return M.pop(),`{${N}}`}case"number":return isFinite(O)?String(O):t?t(O):"null";case"boolean":return O===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(O);default:return t?t(O):void 0}}function g(E,p,M,P,A,W){if(typeof p==="object"&&p!==null&&typeof p.toJSON==="function")p=p.toJSON(E);switch(typeof p){case"string":return bt(p);case"object":{if(p===null)return"null";if(M.indexOf(p)!==-1)return r;let O=W,N="",Z=",";if(Array.isArray(p)){if(p.length===0)return"[]";if(f<M.length+1)return'"[Array]"';if(M.push(p),A!=="")W+=A,N+=`
|
|
14
|
+
${W}`,Z=`,
|
|
15
|
+
${W}`;let I=Math.min(p.length,c),F=0;for(;F<I-1;F++){let re=g(String(F),p[F],M,P,A,W);N+=re!==void 0?re:"null",N+=Z}let fe=g(String(F),p[F],M,P,A,W);if(N+=fe!==void 0?fe:"null",p.length-1>c){let re=p.length-c-1;N+=`${Z}"... ${At(re)} not stringified"`}if(A!=="")N+=`
|
|
16
|
+
${O}`;return M.pop(),`[${N}]`}M.push(p);let Y="";if(A!=="")W+=A,Z=`,
|
|
17
|
+
${W}`,Y=" ";let H="";for(let I of P){let F=g(I,p[I],M,P,A,W);if(F!==void 0)N+=`${H}${bt(I)}:${Y}${F}`,H=Z}if(A!==""&&H.length>1)N=`
|
|
18
18
|
${W}${N}
|
|
19
|
-
${O}`;return M.pop(),`{${N}}`}case"number":return isFinite(p)?String(p):t?t(p):"null";case"boolean":return p===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(p);default:return t?t(p):void 0}}function v(E,p,M,P,A){switch(typeof p){case"string":return
|
|
20
|
-
${A}`,
|
|
21
|
-
${A}`,
|
|
22
|
-
${W}`,M.pop(),`[${F}]`}let O=Object.keys(p),N=O.length;if(N===0)return"{}";if(f<M.length+1)return'"[Object]"';A+=P;let
|
|
23
|
-
${A}`,Y="",H="",I=Math.min(N,c);if(
|
|
19
|
+
${O}`;return M.pop(),`{${N}}`}case"number":return isFinite(p)?String(p):t?t(p):"null";case"boolean":return p===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(p);default:return t?t(p):void 0}}function v(E,p,M,P,A){switch(typeof p){case"string":return bt(p);case"object":{if(p===null)return"null";if(typeof p.toJSON==="function"){if(p=p.toJSON(E),typeof p!=="object")return v(E,p,M,P,A);if(p===null)return"null"}if(M.indexOf(p)!==-1)return r;let W=A;if(Array.isArray(p)){if(p.length===0)return"[]";if(f<M.length+1)return'"[Array]"';M.push(p),A+=P;let F=`
|
|
20
|
+
${A}`,fe=`,
|
|
21
|
+
${A}`,re=Math.min(p.length,c),he=0;for(;he<re-1;he++){let ve=v(String(he),p[he],M,P,A);F+=ve!==void 0?ve:"null",F+=fe}let be=v(String(he),p[he],M,P,A);if(F+=be!==void 0?be:"null",p.length-1>c){let ve=p.length-c-1;F+=`${fe}"... ${At(ve)} not stringified"`}return F+=`
|
|
22
|
+
${W}`,M.pop(),`[${F}]`}let O=Object.keys(p),N=O.length;if(N===0)return"{}";if(f<M.length+1)return'"[Object]"';A+=P;let Z=`,
|
|
23
|
+
${A}`,Y="",H="",I=Math.min(N,c);if(ls(p))Y+=Yu(p,Z,c),O=O.slice(p.length),I-=p.length,H=Z;if(a)O=us(O,u);M.push(p);for(let F=0;F<I;F++){let fe=O[F],re=v(fe,p[fe],M,P,A);if(re!==void 0)Y+=`${H}${bt(fe)}: ${re}`,H=Z}if(N>c){let F=N-c;Y+=`${H}"...": "${At(F)} not stringified"`,H=Z}if(H!=="")Y=`
|
|
24
24
|
${A}${Y}
|
|
25
|
-
${W}`;return M.pop(),`{${Y}}`}case"number":return isFinite(p)?String(p):t?t(p):"null";case"boolean":return p===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(p);default:return t?t(p):void 0}}function _(E,p,M){switch(typeof p){case"string":return wt(p);case"object":{if(p===null)return"null";if(typeof p.toJSON==="function"){if(p=p.toJSON(E),typeof p!=="object")return _(E,p,M);if(p===null)return"null"}if(M.indexOf(p)!==-1)return r;let P="",A=p.length!==void 0;if(A&&Array.isArray(p)){if(p.length===0)return"[]";if(f<M.length+1)return'"[Array]"';M.push(p);let Y=Math.min(p.length,c),H=0;for(;H<Y-1;H++){let F=_(String(H),p[H],M);P+=F!==void 0?F:"null",P+=","}let I=_(String(H),p[H],M);if(P+=I!==void 0?I:"null",p.length-1>c){let F=p.length-c-1;P+=`,"... ${Lt(F)} not stringified"`}return M.pop(),`[${P}]`}let W=Object.keys(p),O=W.length;if(O===0)return"{}";if(f<M.length+1)return'"[Object]"';let N="",B=Math.min(O,c);if(A&&ts(p))P+=ku(p,",",c),W=W.slice(p.length),B-=p.length,N=",";if(a)W=es(W,u);M.push(p);for(let Y=0;Y<B;Y++){let H=W[Y],I=_(H,p[H],M);if(I!==void 0)P+=`${N}${wt(H)}:${I}`,N=","}if(O>c){let Y=O-c;P+=`${N}"...":"${Lt(Y)} not stringified"`}return M.pop(),`{${P}}`}case"number":return isFinite(p)?String(p):t?t(p):"null";case"boolean":return p===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(p);default:return t?t(p):void 0}}function w(E,p,M){if(arguments.length>1){let P="";if(typeof M==="number")P=" ".repeat(Math.min(M,10));else if(typeof M==="string")P=M.slice(0,10);if(p!=null){if(typeof p==="function")return d("",{"":E},[],p,P,"");if(Array.isArray(p))return g("",E,[],O0(p),P,"")}if(P.length!==0)return v("",E,[],P,"")}return _("",E,[])}return w}});var ns=b(function(y2,Tu){var T0=Re(),{MESSAGE:N0}=oe(),L0=jr();function P0(e,t){if(typeof t==="bigint")return t.toString();return t}Tu.exports=T0((e,t)=>{let r=L0.configure(t);return e[N0]=r(e,t.replacer||P0,t.space),e})});var Lu=b(function(_2,Nu){var A0=Re();Nu.exports=A0((e,t)=>{if(t.message)return e.message=`[${t.label}] ${e.message}`,e;return e.label=t.label,e})});var Au=b(function(w2,Pu){var q0=Re(),{MESSAGE:Y0}=oe(),F0=jr();Pu.exports=q0((e)=>{let t={};if(e.message)t["@message"]=e.message,delete e.message;if(e.timestamp)t["@timestamp"]=e.timestamp,delete e.timestamp;return t["@fields"]=e,e[Y0]=F0(t),e})});var Yu=b(function(b2,qu){var C0=Re();function j0(e,t,r){let i=t.reduce((u,f)=>(u[f]=e[f],delete e[f],u),{}),a=Object.keys(e).reduce((u,f)=>(u[f]=e[f],delete e[f],u),{});return Object.assign(e,i,{[r]:a}),e}function I0(e,t,r){return e[r]=t.reduce((i,a)=>(i[a]=e[a],delete e[a],i),{}),e}qu.exports=C0((e,t={})=>{let r="metadata";if(t.key)r=t.key;let i=[];if(!t.fillExcept&&!t.fillWith)i.push("level"),i.push("message");if(t.fillExcept)i=t.fillExcept;if(i.length>0)return j0(e,i,r);if(t.fillWith)return I0(e,t.fillWith,r);return e})});var Cu=b(function(v2,Fu){var ur=1000,lr=ur*60,fr=lr*60,At=fr*24,W0=At*7,$0=At*365.25;Fu.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return H0(e);else if(r==="number"&&isFinite(e))return t.long?z0(e):U0(e);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function H0(e){if(e=String(e),e.length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]),i=(t[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*$0;case"weeks":case"week":case"w":return r*W0;case"days":case"day":case"d":return r*At;case"hours":case"hour":case"hrs":case"hr":case"h":return r*fr;case"minutes":case"minute":case"mins":case"min":case"m":return r*lr;case"seconds":case"second":case"secs":case"sec":case"s":return r*ur;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}function U0(e){var t=Math.abs(e);if(t>=At)return Math.round(e/At)+"d";if(t>=fr)return Math.round(e/fr)+"h";if(t>=lr)return Math.round(e/lr)+"m";if(t>=ur)return Math.round(e/ur)+"s";return e+"ms"}function z0(e){var t=Math.abs(e);if(t>=At)return jn(e,t,At,"day");if(t>=fr)return jn(e,t,fr,"hour");if(t>=lr)return jn(e,t,lr,"minute");if(t>=ur)return jn(e,t,ur,"second");return e+" ms"}function jn(e,t,r,i){var a=t>=r*1.5;return Math.round(e/r)+" "+i+(a?"s":"")}});var Iu=b(function(Ir,ju){var G0=Re(),V0=Cu();ju.exports=G0((e)=>{let t=+new Date;return Ir.diff=t-(Ir.prevTime||t),Ir.prevTime=t,e.ms=`+${V0(Ir.diff)}`,e})});var Hu=b(function(S2,$u){var B0=j("util").inspect,Z0=Re(),{LEVEL:J0,MESSAGE:Wu,SPLAT:K0}=oe();$u.exports=Z0((e,t={})=>{let r=Object.assign({},e);return delete r[J0],delete r[Wu],delete r[K0],e[Wu]=B0(r,!1,t.depth||null,t.colorize),e})});var Uu=b(function(x2,In){var{MESSAGE:Q0}=oe();class is{constructor(e){this.template=e}transform(e){return e[Q0]=this.template(e),e}}In.exports=(e)=>new is(e);In.exports.Printf=In.exports.Format=is});var Vu=b(function(M2,Gu){var X0=Re(),{MESSAGE:zu}=oe(),ey=jr();Gu.exports=X0((e)=>{let t=ey(Object.assign({},e,{level:void 0,message:void 0,splat:void 0})),r=e.padding&&e.padding[e.level]||"";if(t!=="{}")e[zu]=`${e.level}:${r} ${e.message} ${t}`;else e[zu]=`${e.level}:${r} ${e.message}`;return e})});var Ku=b(function(E2,Ju){var ty=j("util"),{SPLAT:Bu}=oe(),ry=/%[scdjifoO%]/g,ny=/%%/g;class Zu{constructor(e){this.options=e}_splat(e,t){let r=e.message,i=e[Bu]||e.splat||[],a=r.match(ny),u=a&&a.length||0,c=t.length-u-i.length,d=c<0?i.splice(c,-1*c):[],g=d.length;if(g)for(let v=0;v<g;v++)Object.assign(e,d[v]);return e.message=ty.format(r,...i),e}transform(e){let t=e.message,r=e[Bu]||e.splat;if(!r||!r.length)return e;let i=t&&t.match&&t.match(ry);if(!i&&(r||r.length)){let a=r.length>1?r.splice(0):r,u=a.length;if(u)for(let f=0;f<u;f++)Object.assign(e,a[f]);return e}if(i)return this._splat(e,i);return e}}Ju.exports=(e)=>new Zu(e)});var Xu=b(function(Wn,Qu){(function(e,t){typeof Wn==="object"&&typeof Qu<"u"?t(Wn):typeof define==="function"&&define.amd?define(["exports"],t):t(e.fecha={})})(Wn,function(e){var t=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,r="\\d\\d?",i="\\d\\d",a="\\d{3}",u="\\d{4}",f="[^\\s]+",c=/\[([^]*?)\]/gm;function d(S,T){var z=[];for(var ge=0,q=S.length;ge<q;ge++)z.push(S[ge].substr(0,T));return z}var g=function(S){return function(T,z){var ge=z[S].map(function(Oe){return Oe.toLowerCase()}),q=ge.indexOf(T.toLowerCase());if(q>-1)return q;return null}};function v(S){var T=[];for(var z=1;z<arguments.length;z++)T[z-1]=arguments[z];for(var ge=0,q=T;ge<q.length;ge++){var Oe=q[ge];for(var ke in Oe)S[ke]=Oe[ke]}return S}var _=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],w=["January","February","March","April","May","June","July","August","September","October","November","December"],E=d(w,3),p=d(_,3),M={dayNamesShort:p,dayNames:_,monthNamesShort:E,monthNames:w,amPm:["am","pm"],DoFn:function(S){return S+["th","st","nd","rd"][S%10>3?0:(S-S%10!==10?1:0)*S%10]}},P=v({},M),A=function(S){return P=v(P,S)},W=function(S){return S.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},O=function(S,T){if(T===void 0)T=2;S=String(S);while(S.length<T)S="0"+S;return S},N={D:function(S){return String(S.getDate())},DD:function(S){return O(S.getDate())},Do:function(S,T){return T.DoFn(S.getDate())},d:function(S){return String(S.getDay())},dd:function(S){return O(S.getDay())},ddd:function(S,T){return T.dayNamesShort[S.getDay()]},dddd:function(S,T){return T.dayNames[S.getDay()]},M:function(S){return String(S.getMonth()+1)},MM:function(S){return O(S.getMonth()+1)},MMM:function(S,T){return T.monthNamesShort[S.getMonth()]},MMMM:function(S,T){return T.monthNames[S.getMonth()]},YY:function(S){return O(String(S.getFullYear()),4).substr(2)},YYYY:function(S){return O(S.getFullYear(),4)},h:function(S){return String(S.getHours()%12||12)},hh:function(S){return O(S.getHours()%12||12)},H:function(S){return String(S.getHours())},HH:function(S){return O(S.getHours())},m:function(S){return String(S.getMinutes())},mm:function(S){return O(S.getMinutes())},s:function(S){return String(S.getSeconds())},ss:function(S){return O(S.getSeconds())},S:function(S){return String(Math.round(S.getMilliseconds()/100))},SS:function(S){return O(Math.round(S.getMilliseconds()/10),2)},SSS:function(S){return O(S.getMilliseconds(),3)},a:function(S,T){return S.getHours()<12?T.amPm[0]:T.amPm[1]},A:function(S,T){return S.getHours()<12?T.amPm[0].toUpperCase():T.amPm[1].toUpperCase()},ZZ:function(S){var T=S.getTimezoneOffset();return(T>0?"-":"+")+O(Math.floor(Math.abs(T)/60)*100+Math.abs(T)%60,4)},Z:function(S){var T=S.getTimezoneOffset();return(T>0?"-":"+")+O(Math.floor(Math.abs(T)/60),2)+":"+O(Math.abs(T)%60,2)}},B=function(S){return+S-1},Y=[null,r],H=[null,f],I=["isPm",f,function(S,T){var z=S.toLowerCase();if(z===T.amPm[0])return 0;else if(z===T.amPm[1])return 1;return null}],F=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(S){var T=(S+"").match(/([+-]|\d\d)/gi);if(T){var z=+T[1]*60+parseInt(T[2],10);return T[0]==="+"?z:-z}return 0}],ue={D:["day",r],DD:["day",i],Do:["day",r+f,function(S){return parseInt(S,10)}],M:["month",r,B],MM:["month",i,B],YY:["year",i,function(S){var T=new Date,z=+(""+T.getFullYear()).substr(0,2);return+(""+(+S>68?z-1:z)+S)}],h:["hour",r,void 0,"isPm"],hh:["hour",i,void 0,"isPm"],H:["hour",r],HH:["hour",i],m:["minute",r],mm:["minute",i],s:["second",r],ss:["second",i],YYYY:["year",u],S:["millisecond","\\d",function(S){return+S*100}],SS:["millisecond",i,function(S){return+S*10}],SSS:["millisecond",a],d:Y,dd:Y,ddd:H,dddd:H,MMM:["month",f,g("monthNamesShort")],MMMM:["month",f,g("monthNames")],a:I,A:I,ZZ:F,Z:F},ee={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"},fe=function(S){return v(ee,S)},_e=function(S,T,z){if(T===void 0)T=ee.default;if(z===void 0)z={};if(typeof S==="number")S=new Date(S);if(Object.prototype.toString.call(S)!=="[object Date]"||isNaN(S.getTime()))throw Error("Invalid Date pass to format");T=ee[T]||T;var ge=[];T=T.replace(c,function(Oe,ke){return ge.push(ke),"@@@"});var q=v(v({},P),z);return T=T.replace(t,function(Oe){return N[Oe](S,q)}),T.replace(/@@@/g,function(){return ge.shift()})};function we(S,T,z){if(z===void 0)z={};if(typeof T!=="string")throw Error("Invalid format in fecha parse");if(T=ee[T]||T,S.length>1000)return null;var ge=new Date,q={year:ge.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},Oe=[],ke=[],L=T.replace(c,function(kt,mt){return ke.push(W(mt)),"@@@"}),Gt={},hn={};L=W(L).replace(t,function(kt){var mt=ue[kt],Zt=mt[0],De=mt[1],Jt=mt[3];if(Gt[Zt])throw Error("Invalid format. "+Zt+" specified twice in format");if(Gt[Zt]=!0,Jt)hn[Jt]=!0;return Oe.push(mt),"("+De+")"}),Object.keys(hn).forEach(function(kt){if(!Gt[kt])throw Error("Invalid format. "+kt+" is required in specified format")}),L=L.replace(/@@@/g,function(){return ke.shift()});var tt=S.match(new RegExp(L,"i"));if(!tt)return null;var dn=v(v({},P),z);for(var Ne=1;Ne<tt.length;Ne++){var mn=Oe[Ne-1],di=mn[0],gn=mn[2],pn=gn?gn(tt[Ne],dn):+tt[Ne];if(pn==null)return null;q[di]=pn}if(q.isPm===1&&q.hour!=null&&+q.hour!==12)q.hour=+q.hour+12;else if(q.isPm===0&&+q.hour===12)q.hour=0;var Vt;if(q.timezoneOffset==null){Vt=new Date(q.year,q.month,q.day,q.hour,q.minute,q.second,q.millisecond);var Bt=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]];for(var Ne=0,mi=Bt.length;Ne<mi;Ne++)if(Gt[Bt[Ne][0]]&&q[Bt[Ne][0]]!==Vt[Bt[Ne][1]]())return null}else if(Vt=new Date(Date.UTC(q.year,q.month,q.day,q.hour,q.minute-q.timezoneOffset,q.second,q.millisecond)),q.month>11||q.month<0||q.day>31||q.day<1||q.hour>23||q.hour<0||q.minute>59||q.minute<0||q.second>59||q.second<0)return null;return Vt}var Ue={format:_e,parse:we,defaultI18n:M,setGlobalDateI18n:A,setGlobalDateMasks:fe};e.assign=v,e.default=Ue,e.format=_e,e.parse=we,e.defaultI18n=M,e.setGlobalDateI18n=A,e.setGlobalDateMasks=fe,Object.defineProperty(e,"__esModule",{value:!0})})});var tl=b(function(O2,el){var iy=Xu(),sy=Re();el.exports=sy((e,t={})=>{if(t.format)e.timestamp=typeof t.format==="function"?t.format():iy.format(new Date,t.format);if(!e.timestamp)e.timestamp=new Date().toISOString();if(t.alias)e[t.alias]=e.timestamp;return e})});var nl=b(function(k2,rl){var ss=Ui(),ay=Re(),{MESSAGE:as}=oe();rl.exports=ay((e,t)=>{if(t.level!==!1)e.level=ss.strip(e.level);if(t.message!==!1)e.message=ss.strip(String(e.message));if(t.raw!==!1&&e[as])e[as]=ss.strip(String(e[as]));return e})});var os=b(function(uy){var oy=uy.format=Re();uy.levels=yu();function be(e,t){Object.defineProperty(oy,e,{get(){return t()},configurable:!0})}be("align",function(){return wu()});be("errors",function(){return Su()});be("cli",function(){return Mu()});be("combine",function(){return Ou()});be("colorize",function(){return Fn()});be("json",function(){return ns()});be("label",function(){return Lu()});be("logstash",function(){return Au()});be("metadata",function(){return Yu()});be("ms",function(){return Iu()});be("padLevels",function(){return Ji()});be("prettyPrint",function(){return Hu()});be("printf",function(){return Uu()});be("simple",function(){return Vu()});be("splat",function(){return Ku()});be("timestamp",function(){return tl()});be("uncolorize",function(){return nl()})});var ls=b(function(fy){var{format:il}=j("util");fy.warn={deprecated(e){return()=>{throw Error(il("{ %s } was removed in winston@3.0.0.",e))}},useFormat(e){return()=>{throw Error([il("{ %s } was removed in winston@3.0.0.",e),"Use a custom winston.format = winston.format(function) instead."].join(`
|
|
26
|
-
`))}},forFunctions(e,t,r){r.forEach((i)=>{e[i]=fy.warn[t](i)})},forProperties(e,t,r){r.forEach((i)=>{let a=fy.warn[t](i);Object.defineProperty(e,i,{get:a,set:a})})}}});var sl=b(function(N2,cy){cy.exports={name:"winston",description:"A logger for just about everything.",version:"3.19.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.8","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.7.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.9.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.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",jest:"^29.7.0",rimraf:"5.0.10",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:"jest","test:unit":"jest -c test/jest.config.unit.js","test:integration":"jest -c test/jest.config.integration.js","test:typescript":"npx --package typescript tsc --project test",build:"babel lib -d dist",prebuild:"rimraf dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var ol=b(function(L2,al){al.exports=j("util").deprecate});var cs=b(function(P2,ll){function hy(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;if(i||a){if(t)t(e);else if(e){if(!this._writableState)process.nextTick(fs,this,e);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(fs,this,e)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(e||null,function(u){if(!t&&u)if(!r._writableState)process.nextTick(ul,r,u);else if(!r._writableState.errorEmitted)r._writableState.errorEmitted=!0,process.nextTick(ul,r,u);else process.nextTick($n,r);else if(t)process.nextTick($n,r),t(u);else process.nextTick($n,r)}),this}function ul(e,t){fs(e,t),$n(e)}function $n(e){if(e._writableState&&!e._writableState.emitClose)return;if(e._readableState&&!e._readableState.emitClose)return;e.emit("close")}function dy(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(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 fs(e,t){e.emit("error",t)}function my(e,t){var{_readableState:r,_writableState:i}=e;if(r&&r.autoDestroy||i&&i.autoDestroy)e.destroy(t);else e.emit("error",t)}ll.exports={destroy:hy,undestroy:dy,errorOrDestroy:my}});var bt=b(function(_y,hl){var cl={};function qe(e,t,r){if(!r)r=Error;function i(u,f,c){if(typeof t==="string")return t;else return t(u,f,c)}class a extends r{constructor(u,f,c){super(i(u,f,c))}}a.prototype.name=r.name,a.prototype.code=e,cl[e]=a}function fl(e,t){if(Array.isArray(e)){let r=e.length;if(e=e.map((i)=>String(i)),r>2)return`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1];else if(r===2)return`one of ${t} ${e[0]} or ${e[1]}`;else return`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function gy(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function py(e,t,r){if(r===void 0||r>e.length)r=e.length;return e.substring(r-t.length,r)===t}function yy(e,t,r){if(typeof r!=="number")r=0;if(r+t.length>e.length)return!1;else return e.indexOf(t,r)!==-1}qe("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);qe("ERR_INVALID_ARG_TYPE",function(e,t,r){let i;if(typeof t==="string"&&gy(t,"not "))i="must not be",t=t.replace(/^not /,"");else i="must be";let a;if(py(e," argument"))a=`The ${e} ${i} ${fl(t,"type")}`;else{let u=yy(e,".")?"property":"argument";a=`The "${e}" ${u} ${i} ${fl(t,"type")}`}return a+=`. Received type ${typeof r}`,a},TypeError);qe("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");qe("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});qe("ERR_STREAM_PREMATURE_CLOSE","Premature close");qe("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});qe("ERR_MULTIPLE_CALLBACK","Callback called multiple times");qe("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");qe("ERR_STREAM_WRITE_AFTER_END","write after end");qe("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);qe("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);qe("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");_y.codes=cl});var hs=b(function(A2,dl){var by=bt().codes.ERR_INVALID_OPT_VALUE;function vy(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function Sy(e,t,r,i){var a=vy(t,i,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var u=i?r:"highWaterMark";throw new by(u,a)}return Math.floor(a)}return e.objectMode?16:16384}dl.exports={getHighWaterMark:Sy}});var ml=b(function(q2,ds){if(typeof Object.create==="function")ds.exports=function(t,r){if(r)t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})};else ds.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var cr=b(function(Y2,ms){try{if(Hn=j("util"),typeof Hn.inherits!=="function")throw"";ms.exports=Hn.inherits}catch(e){ms.exports=ml()}var Hn});var bl=b(function(F2,wl){function gl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function pl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gl(Object(r),!0).forEach(function(i){xy(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gl(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function xy(e,t,r){if(t=_l(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function My(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function yl(e,t){for(var r=0;r<t.length;r++){var i=t[r];if(i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i)i.writable=!0;Object.defineProperty(e,_l(i.key),i)}}function Ey(e,t,r){if(t)yl(e.prototype,t);if(r)yl(e,r);return Object.defineProperty(e,"prototype",{writable:!1}),e}function _l(e){var t=Oy(e,"string");return typeof t==="symbol"?t:String(t)}function Oy(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!=="object")return i;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ky=j("buffer"),Un=ky.Buffer,Dy=j("util"),gs=Dy.inspect,Ry=gs&&gs.custom||"inspect";function Ty(e,t,r){Un.prototype.copy.call(e,t,r)}wl.exports=function(){function e(){My(this,e),this.head=null,this.tail=null,this.length=0}return Ey(e,[{key:"push",value:function(r){var i={data:r,next:null};if(this.length>0)this.tail.next=i;else this.head=i;this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};if(this.length===0)this.tail=i;this.head=i,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var r=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--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"";var i=this.head,a=""+i.data;while(i=i.next)a+=r+i.data;return a}},{key:"concat",value:function(r){if(this.length===0)return Un.alloc(0);var i=Un.allocUnsafe(r>>>0),a=this.head,u=0;while(a)Ty(a.data,i,u),u+=a.data.length,a=a.next;return i}},{key:"consume",value:function(r,i){var a;if(r<this.head.data.length)a=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r);else if(r===this.head.data.length)a=this.shift();else a=i?this._getString(r):this._getBuffer(r);return a}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,a=1,u=i.data;r-=u.length;while(i=i.next){var f=i.data,c=r>f.length?f.length:r;if(c===f.length)u+=f;else u+=f.slice(0,r);if(r-=c,r===0){if(c===f.length)if(++a,i.next)this.head=i.next;else this.head=this.tail=null;else this.head=i,i.data=f.slice(c);break}++a}return this.length-=a,u}},{key:"_getBuffer",value:function(r){var i=Un.allocUnsafe(r),a=this.head,u=1;a.data.copy(i),r-=a.data.length;while(a=a.next){var f=a.data,c=r>f.length?f.length:r;if(f.copy(i,i.length-r,0,c),r-=c,r===0){if(c===f.length)if(++u,a.next)this.head=a.next;else this.head=this.tail=null;else this.head=a,a.data=f.slice(c);break}++u}return this.length-=u,i}},{key:Ry,value:function(r,i){return gs(this,pl(pl({},i),{},{depth:0,customInspect:!1}))}}]),e}()});var xl=b(function(ps,Sl){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var zn=j("buffer"),Be=zn.Buffer;function vl(e,t){for(var r in e)t[r]=e[r]}if(Be.from&&Be.alloc&&Be.allocUnsafe&&Be.allocUnsafeSlow)Sl.exports=zn;else vl(zn,ps),ps.Buffer=qt;function qt(e,t,r){return Be(e,t,r)}qt.prototype=Object.create(Be.prototype);vl(Be,qt);qt.from=function(e,t,r){if(typeof e==="number")throw TypeError("Argument must not be a number");return Be(e,t,r)};qt.alloc=function(e,t,r){if(typeof e!=="number")throw TypeError("Argument must be a number");var i=Be(e);if(t!==void 0)if(typeof r==="string")i.fill(t,r);else i.fill(t);else i.fill(0);return i};qt.allocUnsafe=function(e){if(typeof e!=="number")throw TypeError("Argument must be a number");return Be(e)};qt.allocUnsafeSlow=function(e){if(typeof e!=="number")throw TypeError("Argument must be a number");return zn.SlowBuffer(e)}});var ws=b(function(Uy){var _s=xl().Buffer,Ml=_s.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Ny(e){if(!e)return"utf8";var t;while(!0)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function Ly(e){var t=Ny(e);if(typeof t!=="string"&&(_s.isEncoding===Ml||!Ml(e)))throw Error("Unknown encoding: "+e);return t||e}Uy.StringDecoder=Wr;function Wr(e){this.encoding=Ly(e);var t;switch(this.encoding){case"utf16le":this.text=Cy,this.end=jy,t=4;break;case"utf8":this.fillLast=qy,t=4;break;case"base64":this.text=Iy,this.end=Wy,t=3;break;default:this.write=$y,this.end=Hy;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=_s.allocUnsafe(t)}Wr.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;if(r<e.length)return t?t+this.text(e,r):this.text(e,r);return t||""};Wr.prototype.end=Fy;Wr.prototype.text=Yy;Wr.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function ys(e){if(e<=127)return 0;else if(e>>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function Py(e,t,r){var i=t.length-1;if(i<r)return 0;var a=ys(t[i]);if(a>=0){if(a>0)e.lastNeed=a-1;return a}if(--i<r||a===-2)return 0;if(a=ys(t[i]),a>=0){if(a>0)e.lastNeed=a-2;return a}if(--i<r||a===-2)return 0;if(a=ys(t[i]),a>=0){if(a>0)if(a===2)a=0;else e.lastNeed=a-3;return a}return 0}function Ay(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}}function qy(e){var t=this.lastTotal-this.lastNeed,r=Ay(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function Yy(e,t){var r=Py(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function Fy(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"\uFFFD";return t}function Cy(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function jy(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function Iy(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);if(this.lastNeed=3-r,this.lastTotal=3,r===1)this.lastChar[0]=e[e.length-1];else this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1];return e.toString("base64",t,e.length-r)}function Wy(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function $y(e){return e.toString(this.encoding)}function Hy(e){return e&&e.length?this.write(e):""}});var Gn=b(function(j2,kl){var El=bt().codes.ERR_STREAM_PREMATURE_CLOSE;function Gy(e){var t=!1;return function(){if(t)return;t=!0;for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];e.apply(this,i)}}function Vy(){}function By(e){return e.setHeader&&typeof e.abort==="function"}function Ol(e,t,r){if(typeof t==="function")return Ol(e,null,t);if(!t)t={};r=Gy(r||Vy);var i=t.readable||t.readable!==!1&&e.readable,a=t.writable||t.writable!==!1&&e.writable,u=function(){if(!e.writable)c()},f=e._writableState&&e._writableState.finished,c=function(){if(a=!1,f=!0,!i)r.call(e)},d=e._readableState&&e._readableState.endEmitted,g=function(){if(i=!1,d=!0,!a)r.call(e)},v=function(p){r.call(e,p)},_=function(){var p;if(i&&!d){if(!e._readableState||!e._readableState.ended)p=new El;return r.call(e,p)}if(a&&!f){if(!e._writableState||!e._writableState.ended)p=new El;return r.call(e,p)}},w=function(){e.req.on("finish",c)};if(By(e))if(e.on("complete",c),e.on("abort",_),e.req)w();else e.on("request",w);else if(a&&!e._writableState)e.on("end",u),e.on("close",u);if(e.on("end",g),e.on("finish",c),t.error!==!1)e.on("error",v);return e.on("close",_),function(){if(e.removeListener("complete",c),e.removeListener("abort",_),e.removeListener("request",w),e.req)e.req.removeListener("finish",c);e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",c),e.removeListener("end",g),e.removeListener("error",v),e.removeListener("close",_)}}kl.exports=Ol});var Rl=b(function(I2,Dl){var Vn;function vt(e,t,r){if(t=Zy(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function Zy(e){var t=Jy(e,"string");return typeof t==="symbol"?t:String(t)}function Jy(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!=="object")return i;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ky=Gn(),St=Symbol("lastResolve"),Yt=Symbol("lastReject"),$r=Symbol("error"),Bn=Symbol("ended"),Ft=Symbol("lastPromise"),bs=Symbol("handlePromise"),Ct=Symbol("stream");function xt(e,t){return{value:e,done:t}}function Qy(e){var t=e[St];if(t!==null){var r=e[Ct].read();if(r!==null)e[Ft]=null,e[St]=null,e[Yt]=null,t(xt(r,!1))}}function Xy(e){process.nextTick(Qy,e)}function e_(e,t){return function(r,i){e.then(function(){if(t[Bn]){r(xt(void 0,!0));return}t[bs](r,i)},i)}}var t_=Object.getPrototypeOf(function(){}),r_=Object.setPrototypeOf((Vn={get stream(){return this[Ct]},next:function(){var t=this,r=this[$r];if(r!==null)return Promise.reject(r);if(this[Bn])return Promise.resolve(xt(void 0,!0));if(this[Ct].destroyed)return new Promise(function(f,c){process.nextTick(function(){if(t[$r])c(t[$r]);else f(xt(void 0,!0))})});var i=this[Ft],a;if(i)a=new Promise(e_(i,this));else{var u=this[Ct].read();if(u!==null)return Promise.resolve(xt(u,!1));a=new Promise(this[bs])}return this[Ft]=a,a}},vt(Vn,Symbol.asyncIterator,function(){return this}),vt(Vn,"return",function(){var t=this;return new Promise(function(r,i){t[Ct].destroy(null,function(a){if(a){i(a);return}r(xt(void 0,!0))})})}),Vn),t_),n_=function(t){var r,i=Object.create(r_,(r={},vt(r,Ct,{value:t,writable:!0}),vt(r,St,{value:null,writable:!0}),vt(r,Yt,{value:null,writable:!0}),vt(r,$r,{value:null,writable:!0}),vt(r,Bn,{value:t._readableState.endEmitted,writable:!0}),vt(r,bs,{value:function(u,f){var c=i[Ct].read();if(c)i[Ft]=null,i[St]=null,i[Yt]=null,u(xt(c,!1));else i[St]=u,i[Yt]=f},writable:!0}),r));return i[Ft]=null,Ky(t,function(a){if(a&&a.code!=="ERR_STREAM_PREMATURE_CLOSE"){var u=i[Yt];if(u!==null)i[Ft]=null,i[St]=null,i[Yt]=null,u(a);i[$r]=a;return}var f=i[St];if(f!==null)i[Ft]=null,i[St]=null,i[Yt]=null,f(xt(void 0,!0));i[Bn]=!0}),t.on("readable",Xy.bind(null,i)),i};Dl.exports=n_});var Pl=b(function(W2,Ll){function Tl(e,t,r,i,a,u,f){try{var c=e[u](f),d=c.value}catch(g){r(g);return}if(c.done)t(d);else Promise.resolve(d).then(i,a)}function i_(e){return function(){var t=this,r=arguments;return new Promise(function(i,a){var u=e.apply(t,r);function f(d){Tl(u,i,a,f,c,"next",d)}function c(d){Tl(u,i,a,f,c,"throw",d)}f(void 0)})}}function Nl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function s_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nl(Object(r),!0).forEach(function(i){a_(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nl(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function a_(e,t,r){if(t=o_(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function o_(e){var t=u_(e,"string");return typeof t==="symbol"?t:String(t)}function u_(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!=="object")return i;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l_=bt().codes.ERR_INVALID_ARG_TYPE;function f_(e,t,r){var i;if(t&&typeof t.next==="function")i=t;else if(t&&t[Symbol.asyncIterator])i=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])i=t[Symbol.iterator]();else throw new l_("iterable",["Iterable"],t);var a=new e(s_({objectMode:!0},r)),u=!1;a._read=function(){if(!u)u=!0,f()};function f(){return c.apply(this,arguments)}function c(){return c=i_(function*(){try{var d=yield i.next(),{value:g,done:v}=d;if(v)a.push(null);else if(a.push(yield g))f();else u=!1}catch(_){a.destroy(_)}}),c.apply(this,arguments)}return a}Ll.exports=f_});var Ts=b(function(H2,Hl){Hl.exports=K;var hr;K.ReadableState=Fl;var $2=j("events").EventEmitter,Yl=function(t,r){return t.listeners(r).length},Ur=j("stream"),Zn=j("buffer").Buffer,c_=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function h_(e){return Zn.from(e)}function d_(e){return Zn.isBuffer(e)||e instanceof c_}var vs=j("util"),U;if(vs&&vs.debuglog)U=vs.debuglog("stream");else U=function(){};var m_=bl(),Ds=cs(),g_=hs(),p_=g_.getHighWaterMark,Jn=bt().codes,{ERR_INVALID_ARG_TYPE:y_,ERR_STREAM_PUSH_AFTER_EOF:__,ERR_METHOD_NOT_IMPLEMENTED:w_,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:b_}=Jn,dr,Ss,xs;cr()(K,Ur);var Hr=Ds.errorOrDestroy,Ms=["error","close","destroy","pause","resume"];function v_(e,t,r){if(typeof e.prependListener==="function")return e.prependListener(t,r);if(!e._events||!e._events[t])e.on(t,r);else if(Array.isArray(e._events[t]))e._events[t].unshift(r);else e._events[t]=[r,e._events[t]]}function Fl(e,t,r){if(hr=hr||jt(),e=e||{},typeof r!=="boolean")r=t instanceof hr;if(this.objectMode=!!e.objectMode,r)this.objectMode=this.objectMode||!!e.readableObjectMode;if(this.highWaterMark=p_(this,e,"readableHighWaterMark",r),this.buffer=new m_,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=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding){if(!dr)dr=ws().StringDecoder;this.decoder=new dr(e.encoding),this.encoding=e.encoding}}function K(e){if(hr=hr||jt(),!(this instanceof K))return new K(e);var t=this instanceof hr;if(this._readableState=new Fl(e,this,t),this.readable=!0,e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}Ur.call(this)}Object.defineProperty(K.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(t){if(!this._readableState)return;this._readableState.destroyed=t}});K.prototype.destroy=Ds.destroy;K.prototype._undestroy=Ds.undestroy;K.prototype._destroy=function(e,t){t(e)};K.prototype.push=function(e,t){var r=this._readableState,i;if(!r.objectMode){if(typeof e==="string"){if(t=t||r.defaultEncoding,t!==r.encoding)e=Zn.from(e,t),t="";i=!0}}else i=!0;return Cl(this,e,t,!1,i)};K.prototype.unshift=function(e){return Cl(this,e,null,!0,!1)};function Cl(e,t,r,i,a){U("readableAddChunk",t);var u=e._readableState;if(t===null)u.reading=!1,M_(e,u);else{var f;if(!a)f=S_(u,t);if(f)Hr(e,f);else if(u.objectMode||t&&t.length>0){if(typeof t!=="string"&&!u.objectMode&&Object.getPrototypeOf(t)!==Zn.prototype)t=h_(t);if(i)if(u.endEmitted)Hr(e,new b_);else Es(e,u,t,!0);else if(u.ended)Hr(e,new __);else if(u.destroyed)return!1;else if(u.reading=!1,u.decoder&&!r)if(t=u.decoder.write(t),u.objectMode||t.length!==0)Es(e,u,t,!1);else ks(e,u);else Es(e,u,t,!1)}else if(!i)u.reading=!1,ks(e,u)}return!u.ended&&(u.length<u.highWaterMark||u.length===0)}function Es(e,t,r,i){if(t.flowing&&t.length===0&&!t.sync)t.awaitDrain=0,e.emit("data",r);else{if(t.length+=t.objectMode?1:r.length,i)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)Kn(e)}ks(e,t)}function S_(e,t){var r;if(!d_(t)&&typeof t!=="string"&&t!==void 0&&!e.objectMode)r=new y_("chunk",["string","Buffer","Uint8Array"],t);return r}K.prototype.isPaused=function(){return this._readableState.flowing===!1};K.prototype.setEncoding=function(e){if(!dr)dr=ws().StringDecoder;var t=new dr(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;var r=this._readableState.buffer.head,i="";while(r!==null)i+=t.write(r.data),r=r.next;if(this._readableState.buffer.clear(),i!=="")this._readableState.buffer.push(i);return this._readableState.length=i.length,this};var Al=1073741824;function x_(e){if(e>=Al)e=Al;else e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++;return e}function ql(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e)if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length;if(e>t.highWaterMark)t.highWaterMark=x_(e);if(e<=t.length)return e;if(!t.ended)return t.needReadable=!0,0;return t.length}K.prototype.read=function(e){U("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0)t.emittedReadable=!1;if(e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended)){if(U("read: emitReadable",t.length,t.ended),t.length===0&&t.ended)Os(this);else Kn(this);return null}if(e=ql(e,t),e===0&&t.ended){if(t.length===0)Os(this);return null}var i=t.needReadable;if(U("need readable",i),t.length===0||t.length-e<t.highWaterMark)i=!0,U("length less than watermark",i);if(t.ended||t.reading)i=!1,U("reading or ended",i);else if(i){if(U("do read"),t.reading=!0,t.sync=!0,t.length===0)t.needReadable=!0;if(this._read(t.highWaterMark),t.sync=!1,!t.reading)e=ql(r,t)}var a;if(e>0)a=Wl(e,t);else a=null;if(a===null)t.needReadable=t.length<=t.highWaterMark,e=0;else t.length-=e,t.awaitDrain=0;if(t.length===0){if(!t.ended)t.needReadable=!0;if(r!==e&&t.ended)Os(this)}if(a!==null)this.emit("data",a);return a};function M_(e,t){if(U("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length)t.buffer.push(r),t.length+=t.objectMode?1:r.length}if(t.ended=!0,t.sync)Kn(e);else if(t.needReadable=!1,!t.emittedReadable)t.emittedReadable=!0,jl(e)}function Kn(e){var t=e._readableState;if(U("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,!t.emittedReadable)U("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(jl,e)}function jl(e){var t=e._readableState;if(U("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended))e.emit("readable"),t.emittedReadable=!1;t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Rs(e)}function ks(e,t){if(!t.readingMore)t.readingMore=!0,process.nextTick(E_,e,t)}function E_(e,t){while(!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0)){var r=t.length;if(U("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}K.prototype._read=function(e){Hr(this,new w_("_read()"))};K.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,U("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,u=a?c:M;if(i.endEmitted)process.nextTick(u);else r.once("end",u);e.on("unpipe",f);function f(P,A){if(U("onunpipe"),P===r){if(A&&A.hasUnpiped===!1)A.hasUnpiped=!0,v()}}function c(){U("onend"),e.end()}var d=O_(r);e.on("drain",d);var g=!1;function v(){if(U("cleanup"),e.removeListener("close",E),e.removeListener("finish",p),e.removeListener("drain",d),e.removeListener("error",w),e.removeListener("unpipe",f),r.removeListener("end",c),r.removeListener("end",M),r.removeListener("data",_),g=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain))d()}r.on("data",_);function _(P){U("ondata");var A=e.write(P);if(U("dest.write",A),A===!1){if((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&$l(i.pipes,e)!==-1)&&!g)U("false write response, pause",i.awaitDrain),i.awaitDrain++;r.pause()}}function w(P){if(U("onerror",P),M(),e.removeListener("error",w),Yl(e,"error")===0)Hr(e,P)}v_(e,"error",w);function E(){e.removeListener("finish",p),M()}e.once("close",E);function p(){U("onfinish"),e.removeListener("close",E),M()}e.once("finish",p);function M(){U("unpipe"),r.unpipe(e)}if(e.emit("pipe",r),!i.flowing)U("pipe resume"),r.resume();return e};function O_(e){return function(){var r=e._readableState;if(U("pipeOnDrain",r.awaitDrain),r.awaitDrain)r.awaitDrain--;if(r.awaitDrain===0&&Yl(e,"data"))r.flowing=!0,Rs(e)}}K.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;if(t.pipes=null,t.pipesCount=0,t.flowing=!1,e)e.emit("unpipe",this,r);return this}if(!e){var{pipes:i,pipesCount:a}=t;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var u=0;u<a;u++)i[u].emit("unpipe",this,{hasUnpiped:!1});return this}var f=$l(t.pipes,e);if(f===-1)return this;if(t.pipes.splice(f,1),t.pipesCount-=1,t.pipesCount===1)t.pipes=t.pipes[0];return e.emit("unpipe",this,r),this};K.prototype.on=function(e,t){var r=Ur.prototype.on.call(this,e,t),i=this._readableState;if(e==="data"){if(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1)this.resume()}else if(e==="readable"){if(!i.endEmitted&&!i.readableListening){if(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,U("on readable",i.length,i.reading),i.length)Kn(this);else if(!i.reading)process.nextTick(k_,this)}}return r};K.prototype.addListener=K.prototype.on;K.prototype.removeListener=function(e,t){var r=Ur.prototype.removeListener.call(this,e,t);if(e==="readable")process.nextTick(Il,this);return r};K.prototype.removeAllListeners=function(e){var t=Ur.prototype.removeAllListeners.apply(this,arguments);if(e==="readable"||e===void 0)process.nextTick(Il,this);return t};function Il(e){var t=e._readableState;if(t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused)t.flowing=!0;else if(e.listenerCount("data")>0)e.resume()}function k_(e){U("readable nexttick read 0"),e.read(0)}K.prototype.resume=function(){var e=this._readableState;if(!e.flowing)U("resume"),e.flowing=!e.readableListening,D_(this,e);return e.paused=!1,this};function D_(e,t){if(!t.resumeScheduled)t.resumeScheduled=!0,process.nextTick(R_,e,t)}function R_(e,t){if(U("resume",t.reading),!t.reading)e.read(0);if(t.resumeScheduled=!1,e.emit("resume"),Rs(e),t.flowing&&!t.reading)e.read(0)}K.prototype.pause=function(){if(U("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)U("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function Rs(e){var t=e._readableState;U("flow",t.flowing);while(t.flowing&&e.read()!==null);}K.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(U("wrapped end"),r.decoder&&!r.ended){var f=r.decoder.end();if(f&&f.length)t.push(f)}t.push(null)}),e.on("data",function(f){if(U("wrapped data"),r.decoder)f=r.decoder.write(f);if(r.objectMode&&(f===null||f===void 0))return;else if(!r.objectMode&&(!f||!f.length))return;var c=t.push(f);if(!c)i=!0,e.pause()});for(var a in e)if(this[a]===void 0&&typeof e[a]==="function")this[a]=function(c){return function(){return e[c].apply(e,arguments)}}(a);for(var u=0;u<Ms.length;u++)e.on(Ms[u],this.emit.bind(this,Ms[u]));return this._read=function(f){if(U("wrapped _read",f),i)i=!1,e.resume()},this};if(typeof Symbol==="function")K.prototype[Symbol.asyncIterator]=function(){if(Ss===void 0)Ss=Rl();return Ss(this)};Object.defineProperty(K.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(K.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(K.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){if(this._readableState)this._readableState.flowing=t}});K._fromList=Wl;Object.defineProperty(K.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Wl(e,t){if(t.length===0)return null;var r;if(t.objectMode)r=t.buffer.shift();else if(!e||e>=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.first();else r=t.buffer.concat(t.length);t.buffer.clear()}else r=t.buffer.consume(e,t.decoder);return r}function Os(e){var t=e._readableState;if(U("endReadable",t.endEmitted),!t.endEmitted)t.ended=!0,process.nextTick(T_,t,e)}function T_(e,t){if(U("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0){if(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy){var r=t._writableState;if(!r||r.autoDestroy&&r.finished)t.destroy()}}}if(typeof Symbol==="function")K.from=function(e,t){if(xs===void 0)xs=Pl();return xs(K,e,t)};function $l(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var jt=b(function(U2,zl){var N_=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};zl.exports=Ze;var Ul=Ts(),Ns=Xn();cr()(Ze,Ul);{Qn=N_(Ns.prototype);for(zr=0;zr<Qn.length;zr++)if(Gr=Qn[zr],!Ze.prototype[Gr])Ze.prototype[Gr]=Ns.prototype[Gr]}var Qn,Gr,zr;function Ze(e){if(!(this instanceof Ze))return new Ze(e);if(Ul.call(this,e),Ns.call(this,e),this.allowHalfOpen=!0,e){if(e.readable===!1)this.readable=!1;if(e.writable===!1)this.writable=!1;if(e.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",L_)}}Object.defineProperty(Ze.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ze.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ze.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function L_(){if(this._writableState.ended)return;process.nextTick(P_,this)}function P_(e){e.end()}Object.defineProperty(Ze.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(t){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=t,this._writableState.destroyed=t}})});var Xn=b(function(z2,Kl){Kl.exports=ie;function Vl(e){var t=this;this.next=null,this.entry=null,this.finish=function(){a1(t,e)}}var mr;ie.WritableState=Br;var A_={deprecate:ol()},Bl=j("stream"),ti=j("buffer").Buffer,q_=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Y_(e){return ti.from(e)}function F_(e){return ti.isBuffer(e)||e instanceof q_}var Ps=cs(),C_=hs(),j_=C_.getHighWaterMark,Mt=bt().codes,{ERR_INVALID_ARG_TYPE:I_,ERR_METHOD_NOT_IMPLEMENTED:W_,ERR_MULTIPLE_CALLBACK:$_,ERR_STREAM_CANNOT_PIPE:H_,ERR_STREAM_DESTROYED:U_,ERR_STREAM_NULL_VALUES:z_,ERR_STREAM_WRITE_AFTER_END:G_,ERR_UNKNOWN_ENCODING:V_}=Mt,gr=Ps.errorOrDestroy;cr()(ie,Bl);function B_(){}function Br(e,t,r){if(mr=mr||jt(),e=e||{},typeof r!=="boolean")r=t instanceof mr;if(this.objectMode=!!e.objectMode,r)this.objectMode=this.objectMode||!!e.writableObjectMode;this.highWaterMark=j_(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){t1(t,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Vl(this)}Br.prototype.getBuffer=function(){var t=this.bufferedRequest,r=[];while(t)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Br.prototype,"buffer",{get:A_.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var ei;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")ei=Function.prototype[Symbol.hasInstance],Object.defineProperty(ie,Symbol.hasInstance,{value:function(t){if(ei.call(this,t))return!0;if(this!==ie)return!1;return t&&t._writableState instanceof Br}});else ei=function(t){return t instanceof this};function ie(e){mr=mr||jt();var t=this instanceof mr;if(!t&&!ei.call(ie,this))return new ie(e);if(this._writableState=new Br(e,this,t),this.writable=!0,e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}Bl.call(this)}ie.prototype.pipe=function(){gr(this,new H_)};function Z_(e,t){var r=new G_;gr(e,r),process.nextTick(t,r)}function J_(e,t,r,i){var a;if(r===null)a=new z_;else if(typeof r!=="string"&&!t.objectMode)a=new I_("chunk",["string","Buffer"],r);if(a)return gr(e,a),process.nextTick(i,a),!1;return!0}ie.prototype.write=function(e,t,r){var i=this._writableState,a=!1,u=!i.objectMode&&F_(e);if(u&&!ti.isBuffer(e))e=Y_(e);if(typeof t==="function")r=t,t=null;if(u)t="buffer";else if(!t)t=i.defaultEncoding;if(typeof r!=="function")r=B_;if(i.ending)Z_(this,r);else if(u||J_(this,i,e,r))i.pendingcb++,a=Q_(this,i,u,e,t,r);return a};ie.prototype.cork=function(){this._writableState.corked++};ie.prototype.uncork=function(){var e=this._writableState;if(e.corked){if(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest)Zl(this,e)}};ie.prototype.setDefaultEncoding=function(t){if(typeof t==="string")t=t.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new V_(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(ie.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function K_(e,t,r){if(!e.objectMode&&e.decodeStrings!==!1&&typeof t==="string")t=ti.from(t,r);return t}Object.defineProperty(ie.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Q_(e,t,r,i,a,u){if(!r){var f=K_(t,i,a);if(i!==f)r=!0,a="buffer",i=f}var c=t.objectMode?1:i.length;t.length+=c;var d=t.length<t.highWaterMark;if(!d)t.needDrain=!0;if(t.writing||t.corked){var g=t.lastBufferedRequest;if(t.lastBufferedRequest={chunk:i,encoding:a,isBuf:r,callback:u,next:null},g)g.next=t.lastBufferedRequest;else t.bufferedRequest=t.lastBufferedRequest;t.bufferedRequestCount+=1}else Ls(e,t,!1,c,i,a,u);return d}function Ls(e,t,r,i,a,u,f){if(t.writelen=i,t.writecb=f,t.writing=!0,t.sync=!0,t.destroyed)t.onwrite(new U_("write"));else if(r)e._writev(a,t.onwrite);else e._write(a,u,t.onwrite);t.sync=!1}function X_(e,t,r,i,a){if(--t.pendingcb,r)process.nextTick(a,i),process.nextTick(Vr,e,t),e._writableState.errorEmitted=!0,gr(e,i);else a(i),e._writableState.errorEmitted=!0,gr(e,i),Vr(e,t)}function e1(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function t1(e,t){var r=e._writableState,{sync:i,writecb:a}=r;if(typeof a!=="function")throw new $_;if(e1(r),t)X_(e,r,i,t,a);else{var u=Jl(r)||e.destroyed;if(!u&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest)Zl(e,r);if(i)process.nextTick(Gl,e,r,u,a);else Gl(e,r,u,a)}}function Gl(e,t,r,i){if(!r)r1(e,t);t.pendingcb--,i(),Vr(e,t)}function r1(e,t){if(t.length===0&&t.needDrain)t.needDrain=!1,e.emit("drain")}function Zl(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,a=Array(i),u=t.corkedRequestsFree;u.entry=r;var f=0,c=!0;while(r){if(a[f]=r,!r.isBuf)c=!1;r=r.next,f+=1}if(a.allBuffers=c,Ls(e,t,!0,t.length,a,"",u.finish),t.pendingcb++,t.lastBufferedRequest=null,u.next)t.corkedRequestsFree=u.next,u.next=null;else t.corkedRequestsFree=new Vl(t);t.bufferedRequestCount=0}else{while(r){var d=r.chunk,g=r.encoding,v=r.callback,_=t.objectMode?1:d.length;if(Ls(e,t,!1,_,d,g,v),r=r.next,t.bufferedRequestCount--,t.writing)break}if(r===null)t.lastBufferedRequest=null}t.bufferedRequest=r,t.bufferProcessing=!1}ie.prototype._write=function(e,t,r){r(new W_("_write()"))};ie.prototype._writev=null;ie.prototype.end=function(e,t,r){var i=this._writableState;if(typeof e==="function")r=e,e=null,t=null;else if(typeof t==="function")r=t,t=null;if(e!==null&&e!==void 0)this.write(e,t);if(i.corked)i.corked=1,this.uncork();if(!i.ending)s1(this,i,r);return this};Object.defineProperty(ie.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Jl(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function n1(e,t){e._final(function(r){if(t.pendingcb--,r)gr(e,r);t.prefinished=!0,e.emit("prefinish"),Vr(e,t)})}function i1(e,t){if(!t.prefinished&&!t.finalCalled)if(typeof e._final==="function"&&!t.destroyed)t.pendingcb++,t.finalCalled=!0,process.nextTick(n1,e,t);else t.prefinished=!0,e.emit("prefinish")}function Vr(e,t){var r=Jl(t);if(r){if(i1(e,t),t.pendingcb===0){if(t.finished=!0,e.emit("finish"),t.autoDestroy){var i=e._readableState;if(!i||i.autoDestroy&&i.endEmitted)e.destroy()}}}return r}function s1(e,t,r){if(t.ending=!0,Vr(e,t),r)if(t.finished)process.nextTick(r);else e.once("finish",r);t.ended=!0,e.writable=!1}function a1(e,t,r){var i=e.entry;e.entry=null;while(i){var a=i.callback;t.pendingcb--,a(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(ie.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(t){if(!this._writableState)return;this._writableState.destroyed=t}});ie.prototype.destroy=Ps.destroy;ie.prototype._undestroy=Ps.undestroy;ie.prototype._destroy=function(e,t){t(e)}});var As=b(function(G2,ef){var o1=j("util"),Ql=Xn(),{LEVEL:Xl}=oe(),Zr=ef.exports=function(t={}){if(Ql.call(this,{objectMode:!0,highWaterMark:t.highWaterMark}),this.format=t.format,this.level=t.level,this.handleExceptions=t.handleExceptions,this.handleRejections=t.handleRejections,this.silent=t.silent,t.log)this.log=t.log;if(t.logv)this.logv=t.logv;if(t.close)this.close=t.close;this.once("pipe",(r)=>{this.levels=r.levels,this.parent=r}),this.once("unpipe",(r)=>{if(r===this.parent){if(this.parent=null,this.close)this.close()}})};o1.inherits(Zr,Ql);Zr.prototype._write=function(t,r,i){if(this.silent||t.exception===!0&&!this.handleExceptions)return i(null);let a=this.level||this.parent&&this.parent.level;if(!a||this.levels[a]>=this.levels[t[Xl]]){if(t&&!this.format)return this.log(t,i);let u,f;try{f=this.format.transform(Object.assign({},t),this.format.options)}catch(c){u=c}if(u||!f){if(i(),u)throw u;return}return this.log(f,i)}return this._writableState.sync=!1,i(null)};Zr.prototype._writev=function(t,r){if(this.logv){let i=t.filter(this._accept,this);if(!i.length)return r(null);return this.logv(i,r)}for(let i=0;i<t.length;i++){if(!this._accept(t[i]))continue;if(t[i].chunk&&!this.format){this.log(t[i].chunk,t[i].callback);continue}let a,u;try{u=this.format.transform(Object.assign({},t[i].chunk),this.format.options)}catch(f){a=f}if(a||!u){if(t[i].callback(),a)throw r(null),a}else this.log(u,t[i].callback)}return r(null)};Zr.prototype._accept=function(t){let r=t.chunk;if(this.silent)return!1;let i=this.level||this.parent&&this.parent.level;if(r.exception===!0||!i||this.levels[i]>=this.levels[r[Xl]]){if(this.handleExceptions||r.exception!==!0)return!0}return!1};Zr.prototype._nop=function(){return}});var Ys=b(function(V2,rf){var u1=j("util"),{LEVEL:qs}=oe(),tf=As(),Jr=rf.exports=function(t={}){if(tf.call(this,t),!t.transport||typeof t.transport.log!=="function")throw Error("Invalid transport, must be an object with a log method.");this.transport=t.transport,this.level=this.level||t.transport.level,this.handleExceptions=this.handleExceptions||t.transport.handleExceptions,this._deprecated();function r(i){this.emit("error",i,this.transport)}if(!this.transport.__winstonError)this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError)};u1.inherits(Jr,tf);Jr.prototype._write=function(t,r,i){if(this.silent||t.exception===!0&&!this.handleExceptions)return i(null);if(!this.level||this.levels[this.level]>=this.levels[t[qs]])this.transport.log(t[qs],t.message,t,this._nop);i(null)};Jr.prototype._writev=function(t,r){for(let i=0;i<t.length;i++)if(this._accept(t[i]))this.transport.log(t[i].chunk[qs],t[i].chunk.message,t[i].chunk,this._nop),t[i].callback();return r(null)};Jr.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
|
-
`))};Jr.prototype.close=function(){if(this.transport.close)this.transport.close();if(this.transport.__winstonError)this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null}});var It=b(function(B2,Fs){Fs.exports=As();Fs.exports.LegacyTransportStream=Ys()});var af=b(function(Z2,sf){var l1=j("os"),{LEVEL:nf,MESSAGE:pr}=oe(),f1=It();sf.exports=class extends f1{constructor(t={}){super(t);this.name=t.name||"console",this.stderrLevels=this._stringArrayToSet(t.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(t.consoleWarnLevels),this.eol=typeof t.eol==="string"?t.eol:l1.EOL,this.forceConsole=t.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(t,r){if(setImmediate(()=>this.emit("logged",t)),this.stderrLevels[t[nf]]){if(console._stderr&&!this.forceConsole)console._stderr.write(`${t[pr]}${this.eol}`);else this._consoleError(t[pr]);if(r)r();return}else if(this.consoleWarnLevels[t[nf]]){if(console._stderr&&!this.forceConsole)console._stderr.write(`${t[pr]}${this.eol}`);else this._consoleWarn(t[pr]);if(r)r();return}if(console._stdout&&!this.forceConsole)console._stdout.write(`${t[pr]}${this.eol}`);else this._consoleLog(t[pr]);if(r)r()}_stringArrayToSet(t,r){if(!t)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(t))throw Error(r);return t.reduce((i,a)=>{if(typeof a!=="string")throw Error(r);return i[a]=!0,i},{})}}});var ri=b(function(Cs,of){Object.defineProperty(Cs,"__esModule",{value:!0});Cs.default=c1;function c1(e){return e&&typeof e.length==="number"&&e.length>=0&&e.length%1===0}of.exports=Cs.default});var lf=b(function(js,uf){Object.defineProperty(js,"__esModule",{value:!0});js.default=function(e){return function(...t){var r=t.pop();return e.call(this,t,r)}};uf.exports=js.default});var df=b(function(hf){Object.defineProperty(hf,"__esModule",{value:!0});hf.fallback=ff;hf.wrap=cf;var m1=hf.hasQueueMicrotask=typeof queueMicrotask==="function"&&queueMicrotask,g1=hf.hasSetImmediate=typeof setImmediate==="function"&&setImmediate,p1=hf.hasNextTick=typeof process==="object"&&typeof process.nextTick==="function";function ff(e){setTimeout(e,0)}function cf(e){return(t,...r)=>e(()=>t(...r))}var Kr;if(m1)Kr=queueMicrotask;else if(g1)Kr=setImmediate;else if(p1)Kr=process.nextTick;else Kr=ff;hf.default=cf(Kr)});var _f=b(function(Is,yf){Object.defineProperty(Is,"__esModule",{value:!0});Is.default=E1;var b1=lf(),v1=pf(b1),S1=df(),x1=pf(S1),M1=Wt();function pf(e){return e&&e.__esModule?e:{default:e}}function E1(e){if((0,M1.isAsync)(e))return function(...t){let r=t.pop(),i=e.apply(this,t);return mf(i,r)};return(0,v1.default)(function(t,r){var i;try{i=e.apply(this,t)}catch(a){return r(a)}if(i&&typeof i.then==="function")return mf(i,r);else r(null,i)})}function mf(e,t){return e.then((r)=>{gf(t,null,r)},(r)=>{gf(t,r&&(r instanceof Error||r.message)?r:Error(r))})}function gf(e,t,r){try{e(t,r)}catch(i){(0,x1.default)((a)=>{throw a},i)}}yf.exports=Is.default});var Wt=b(function(bf){Object.defineProperty(bf,"__esModule",{value:!0});bf.isAsyncIterable=bf.isAsyncGenerator=bf.isAsync=void 0;var k1=_f(),D1=R1(k1);function R1(e){return e&&e.__esModule?e:{default:e}}function wf(e){return e[Symbol.toStringTag]==="AsyncFunction"}function T1(e){return e[Symbol.toStringTag]==="AsyncGenerator"}function N1(e){return typeof e[Symbol.asyncIterator]==="function"}function L1(e){if(typeof e!=="function")throw Error("expected a function");return wf(e)?(0,D1.default)(e):e}bf.default=L1;bf.isAsync=wf;bf.isAsyncGenerator=T1;bf.isAsyncIterable=N1});var yr=b(function(Ws,Sf){Object.defineProperty(Ws,"__esModule",{value:!0});Ws.default=Y1;function Y1(e,t){if(!t)t=e.length;if(!t)throw Error("arity is undefined");function r(...i){if(typeof i[t-1]==="function")return e.apply(this,i);return new Promise((a,u)=>{i[t-1]=(f,...c)=>{if(f)return u(f);a(c.length>1?c:c[0])},e.apply(this,i)})}return r}Sf.exports=Ws.default});var Mf=b(function(Hs,xf){Object.defineProperty(Hs,"__esModule",{value:!0});var C1=ri(),j1=$s(C1),I1=Wt(),W1=$s(I1),$1=yr(),H1=$s($1);function $s(e){return e&&e.__esModule?e:{default:e}}Hs.default=(0,H1.default)((e,t,r)=>{var i=(0,j1.default)(t)?[]:{};e(t,(a,u,f)=>{(0,W1.default)(a)((c,...d)=>{if(d.length<2)[d]=d;i[u]=d,f(c)})},(a)=>r(a,i))},3);xf.exports=Hs.default});var zs=b(function(Us,Ef){Object.defineProperty(Us,"__esModule",{value:!0});Us.default=z1;function z1(e){function t(...r){if(e===null)return;var i=e;e=null,i.apply(this,r)}return Object.assign(t,e),t}Ef.exports=Us.default});var kf=b(function(Gs,Of){Object.defineProperty(Gs,"__esModule",{value:!0});Gs.default=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()};Of.exports=Gs.default});var Tf=b(function(Vs,Rf){Object.defineProperty(Vs,"__esModule",{value:!0});Vs.default=tw;var B1=ri(),Z1=Df(B1),J1=kf(),K1=Df(J1);function Df(e){return e&&e.__esModule?e:{default:e}}function Q1(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}function X1(e){var t=-1;return function(){var i=e.next();if(i.done)return null;return t++,{value:i.value,key:t}}}function ew(e){var t=e?Object.keys(e):[],r=-1,i=t.length;return function a(){var u=t[++r];if(u==="__proto__")return a();return r<i?{value:e[u],key:u}:null}}function tw(e){if((0,Z1.default)(e))return Q1(e);var t=(0,K1.default)(e);return t?X1(t):ew(e)}Rf.exports=Vs.default});var Zs=b(function(Bs,Nf){Object.defineProperty(Bs,"__esModule",{value:!0});Bs.default=nw;function nw(e){return function(...t){if(e===null)throw Error("Callback was already called.");var r=e;e=null,r.apply(this,t)}}Nf.exports=Bs.default});var ni=b(function(Js,Lf){Object.defineProperty(Js,"__esModule",{value:!0});var sw={};Js.default=sw;Lf.exports=Js.default});var Af=b(function(Ks,Pf){Object.defineProperty(Ks,"__esModule",{value:!0});Ks.default=fw;var ow=ni(),uw=lw(ow);function lw(e){return e&&e.__esModule?e:{default:e}}function fw(e,t,r,i){let a=!1,u=!1,f=!1,c=0,d=0;function g(){if(c>=t||f||a)return;f=!0,e.next().then(({value:w,done:E})=>{if(u||a)return;if(f=!1,E){if(a=!0,c<=0)i(null);return}c++,r(w,d,v),d++,g()}).catch(_)}function v(w,E){if(c-=1,u)return;if(w)return _(w);if(w===!1){a=!0,u=!0;return}if(E===uw.default||a&&c<=0)return a=!0,i(null);g()}function _(w){if(u)return;f=!1,a=!0,i(w)}g()}Pf.exports=Ks.default});var Cf=b(function(Qs,Ff){Object.defineProperty(Qs,"__esModule",{value:!0});var hw=zs(),dw=Qr(hw),mw=Tf(),gw=Qr(mw),pw=Zs(),yw=Qr(pw),qf=Wt(),_w=Af(),Yf=Qr(_w),ww=ni(),bw=Qr(ww);function Qr(e){return e&&e.__esModule?e:{default:e}}Qs.default=(e)=>(t,r,i)=>{if(i=(0,dw.default)(i),e<=0)throw RangeError("concurrency limit cannot be less than 1");if(!t)return i(null);if((0,qf.isAsyncGenerator)(t))return(0,Yf.default)(t,e,r,i);if((0,qf.isAsyncIterable)(t))return(0,Yf.default)(t[Symbol.asyncIterator](),e,r,i);var a=(0,gw.default)(t),u=!1,f=!1,c=0,d=!1;function g(_,w){if(f)return;if(c-=1,_)u=!0,i(_);else if(_===!1)u=!0,f=!0;else if(w===bw.default||u&&c<=0)return u=!0,i(null);else if(!d)v()}function v(){d=!0;while(c<e&&!u){var _=a();if(_===null){if(u=!0,c<=0)i(null);return}c+=1,r(_.value,_.key,(0,yw.default)(g))}d=!1}v()};Ff.exports=Qs.default});var ta=b(function(ea,jf){Object.defineProperty(ea,"__esModule",{value:!0});var Sw=Cf(),xw=Xs(Sw),Mw=Wt(),Ew=Xs(Mw),Ow=yr(),kw=Xs(Ow);function Xs(e){return e&&e.__esModule?e:{default:e}}function Dw(e,t,r,i){return(0,xw.default)(t)(e,(0,Ew.default)(r),i)}ea.default=(0,kw.default)(Dw,4);jf.exports=ea.default});var $f=b(function(ra,Wf){Object.defineProperty(ra,"__esModule",{value:!0});var Tw=ta(),Nw=If(Tw),Lw=yr(),Pw=If(Lw);function If(e){return e&&e.__esModule?e:{default:e}}function Aw(e,t,r){return(0,Nw.default)(e,1,t,r)}ra.default=(0,Pw.default)(Aw,3);Wf.exports=ra.default});var zf=b(function(na,Uf){Object.defineProperty(na,"__esModule",{value:!0});na.default=Iw;var Yw=Mf(),Fw=Hf(Yw),Cw=$f(),jw=Hf(Cw);function Hf(e){return e&&e.__esModule?e:{default:e}}function Iw(e,t){return(0,Fw.default)(jw.default,e,t)}Uf.exports=na.default});var ia=b(function(tx,Vf){Vf.exports=ct;var ii=bt().codes,{ERR_METHOD_NOT_IMPLEMENTED:$w,ERR_MULTIPLE_CALLBACK:Hw,ERR_TRANSFORM_ALREADY_TRANSFORMING:Uw,ERR_TRANSFORM_WITH_LENGTH_0:zw}=ii,si=jt();cr()(ct,si);function Gw(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new Hw);if(r.writechunk=null,r.writecb=null,t!=null)this.push(t);i(e);var a=this._readableState;if(a.reading=!1,a.needReadable||a.length<a.highWaterMark)this._read(a.highWaterMark)}function ct(e){if(!(this instanceof ct))return new ct(e);if(si.call(this,e),this._transformState={afterTransform:Gw.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e){if(typeof e.transform==="function")this._transform=e.transform;if(typeof e.flush==="function")this._flush=e.flush}this.on("prefinish",Vw)}function Vw(){var e=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(t,r){Gf(e,t,r)});else Gf(this,null,null)}ct.prototype.push=function(e,t){return this._transformState.needTransform=!1,si.prototype.push.call(this,e,t)};ct.prototype._transform=function(e,t,r){r(new $w("_transform()"))};ct.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var a=this._readableState;if(i.needTransform||a.needReadable||a.length<a.highWaterMark)this._read(a.highWaterMark)}};ct.prototype._read=function(e){var t=this._transformState;if(t.writechunk!==null&&!t.transforming)t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform);else t.needTransform=!0};ct.prototype._destroy=function(e,t){si.prototype._destroy.call(this,e,function(r){t(r)})};function Gf(e,t,r){if(t)return e.emit("error",t);if(r!=null)e.push(r);if(e._writableState.length)throw new zw;if(e._transformState.transforming)throw new Uw;return e.push(null)}});var Jf=b(function(rx,Zf){Zf.exports=Xr;var Bf=ia();cr()(Xr,Bf);function Xr(e){if(!(this instanceof Xr))return new Xr(e);Bf.call(this,e)}Xr.prototype._transform=function(e,t,r){r(null,e)}});var tc=b(function(nx,ec){var sa;function Bw(e){var t=!1;return function(){if(t)return;t=!0,e.apply(void 0,arguments)}}var Xf=bt().codes,{ERR_MISSING_ARGS:Zw,ERR_STREAM_DESTROYED:Jw}=Xf;function Kf(e){if(e)throw e}function Kw(e){return e.setHeader&&typeof e.abort==="function"}function Qw(e,t,r,i){i=Bw(i);var a=!1;if(e.on("close",function(){a=!0}),sa===void 0)sa=Gn();sa(e,{readable:t,writable:r},function(f){if(f)return i(f);a=!0,i()});var u=!1;return function(f){if(a)return;if(u)return;if(u=!0,Kw(e))return e.abort();if(typeof e.destroy==="function")return e.destroy();i(f||new Jw("pipe"))}}function Qf(e){e()}function Xw(e,t){return e.pipe(t)}function eb(e){if(!e.length)return Kf;if(typeof e[e.length-1]!=="function")return Kf;return e.pop()}function tb(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=eb(t);if(Array.isArray(t[0]))t=t[0];if(t.length<2)throw new Zw("streams");var a,u=t.map(function(f,c){var d=c<t.length-1,g=c>0;return Qw(f,d,g,function(v){if(!a)a=v;if(v)u.forEach(Qf);if(d)return;u.forEach(Qf),i(a)})});return t.reduce(Xw)}ec.exports=tb});var $t=b(function(Ye,tn){var en=j("stream");if(process.env.READABLE_STREAM==="disable"&&en)tn.exports=en.Readable,Object.assign(tn.exports,en),tn.exports.Stream=en;else Ye=tn.exports=Ts(),Ye.Stream=en||Ye,Ye.Readable=Ye,Ye.Writable=Xn(),Ye.Duplex=jt(),Ye.Transform=ia(),Ye.PassThrough=Jf(),Ye.finished=Gn(),Ye.pipeline=tc()});var ic=b(function(ix,nc){var _r=[],rn=[],aa=function(){};function ua(e){if(~_r.indexOf(e))return!1;return _r.push(e),!0}function la(e){aa=e}function rb(e){var t=[];for(var r=0;r<_r.length;r++){if(_r[r].async){t.push(_r[r]);continue}if(_r[r](e))return!0}if(!t.length)return!1;return new Promise(function(a){Promise.all(t.map(function(f){return f(e)})).then(function(f){a(f.some(Boolean))})})}function fa(e){if(~rn.indexOf(e))return!1;return rn.push(e),!0}function oa(){aa.apply(aa,arguments)}function rc(e){for(var t=0;t<rn.length;t++)e=rn[t].apply(rn[t],arguments);return e}function ca(e,t){var r=Object.prototype.hasOwnProperty;for(var i in t)if(r.call(t,i))e[i]=t[i];return e}function nb(e){return e.enabled=!1,e.modify=fa,e.set=la,e.use=ua,ca(function(){return!1},e)}function ib(e){function t(){var r=Array.prototype.slice.call(arguments,0);return oa.call(oa,e,rc(r,e)),!0}return e.enabled=!0,e.modify=fa,e.set=la,e.use=ua,ca(t,e)}nc.exports=function(t){return t.introduce=ca,t.enabled=rb,t.process=rc,t.modify=fa,t.write=oa,t.nope=nb,t.yep=ib,t.set=la,t.use=ua,t}});var fc=b(function(sx,lc){var Je={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]},ac=Object.create(null);for(let e in Je)if(Object.hasOwn(Je,e))ac[Je[e]]=e;var me={to:{},get:{}};me.get=function(e){let t=e.slice(0,3).toLowerCase(),r,i;switch(t){case"hsl":{r=me.get.hsl(e),i="hsl";break}case"hwb":{r=me.get.hwb(e),i="hwb";break}default:{r=me.get.rgb(e),i="rgb";break}}if(!r)return null;return{model:i,value:r}};me.get.rgb=function(e){if(!e)return null;let t=/^#([a-f\d]{3,4})$/i,r=/^#([a-f\d]{6})([a-f\d]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,a=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,u=/^(\w+)$/,f=[0,0,0,1],c,d,g;if(c=e.match(r)){g=c[2],c=c[1];for(d=0;d<3;d++){let v=d*2;f[d]=Number.parseInt(c.slice(v,v+2),16)}if(g)f[3]=Number.parseInt(g,16)/255}else if(c=e.match(t)){c=c[1],g=c[3];for(d=0;d<3;d++)f[d]=Number.parseInt(c[d]+c[d],16);if(g)f[3]=Number.parseInt(g+g,16)/255}else if(c=e.match(i)){for(d=0;d<3;d++)f[d]=Number.parseInt(c[d+1],10);if(c[4])f[3]=c[5]?Number.parseFloat(c[4])*0.01:Number.parseFloat(c[4])}else if(c=e.match(a)){for(d=0;d<3;d++)f[d]=Math.round(Number.parseFloat(c[d+1])*2.55);if(c[4])f[3]=c[5]?Number.parseFloat(c[4])*0.01:Number.parseFloat(c[4])}else if(c=e.match(u)){if(c[1]==="transparent")return[0,0,0,0];if(!Object.hasOwn(Je,c[1]))return null;return f=Je[c[1]],f[3]=1,f}else return null;for(d=0;d<3;d++)f[d]=Et(f[d],0,255);return f[3]=Et(f[3],0,1),f};me.get.hsl=function(e){if(!e)return null;let t=/^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=e.match(t);if(r){let i=Number.parseFloat(r[4]),a=(Number.parseFloat(r[1])%360+360)%360,u=Et(Number.parseFloat(r[2]),0,100),f=Et(Number.parseFloat(r[3]),0,100),c=Et(Number.isNaN(i)?1:i,0,1);return[a,u,f,c]}return null};me.get.hwb=function(e){if(!e)return null;let t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){let i=Number.parseFloat(r[4]),a=(Number.parseFloat(r[1])%360+360)%360,u=Et(Number.parseFloat(r[2]),0,100),f=Et(Number.parseFloat(r[3]),0,100),c=Et(Number.isNaN(i)?1:i,0,1);return[a,u,f,c]}return null};me.to.hex=function(...e){return"#"+ai(e[0])+ai(e[1])+ai(e[2])+(e[3]<1?ai(Math.round(e[3]*255)):"")};me.to.rgb=function(...e){return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};me.to.rgb.percent=function(...e){let t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+i+"%)":"rgba("+t+"%, "+r+"%, "+i+"%, "+e[3]+")"};me.to.hsl=function(...e){return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};me.to.hwb=function(...e){let t="";if(e.length>=4&&e[3]!==1)t=", "+e[3];return"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};me.to.keyword=function(...e){return ac[e.slice(0,3)]};function Et(e,t,r){return Math.min(Math.max(t,e),r)}function ai(e){let t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var oc={};for(let e of Object.keys(Je))oc[Je[e]]=e;var k={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"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},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"]}},ht=0.008856451679035631;function wr(e){let t=e>0.0031308?1.055*e**0.4166666666666667-0.055:e*12.92;return Math.min(Math.max(0,t),1)}function br(e){return e>0.04045?((e+0.055)/1.055)**2.4:e/12.92}for(let e of Object.keys(k)){if(!("channels"in k[e]))throw Error("missing channels property: "+e);if(!("labels"in k[e]))throw Error("missing channel labels property: "+e);if(k[e].labels.length!==k[e].channels)throw Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=k[e];delete k[e].channels,delete k[e].labels,Object.defineProperty(k[e],"channels",{value:t}),Object.defineProperty(k[e],"labels",{value:r})}k.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,i=e[2]/255,a=Math.min(t,r,i),u=Math.max(t,r,i),f=u-a,c,d;switch(u){case a:{c=0;break}case t:{c=(r-i)/f;break}case r:{c=2+(i-t)/f;break}case i:{c=4+(t-r)/f;break}}if(c=Math.min(c*60,360),c<0)c+=360;let g=(a+u)/2;if(u===a)d=0;else if(g<=0.5)d=f/(u+a);else d=f/(2-u-a);return[c,d*100,g*100]};k.rgb.hsv=function(e){let t,r,i,a,u,f=e[0]/255,c=e[1]/255,d=e[2]/255,g=Math.max(f,c,d),v=g-Math.min(f,c,d),_=function(w){return(g-w)/6/v+0.5};if(v===0)a=0,u=0;else{switch(u=v/g,t=_(f),r=_(c),i=_(d),g){case f:{a=i-r;break}case c:{a=0.3333333333333333+t-i;break}case d:{a=0.6666666666666666+r-t;break}}if(a<0)a+=1;else if(a>1)a-=1}return[a*360,u*100,g*100]};k.rgb.hwb=function(e){let t=e[0],r=e[1],i=e[2],a=k.rgb.hsl(e)[0],u=0.00392156862745098*Math.min(t,Math.min(r,i));return i=1-0.00392156862745098*Math.max(t,Math.max(r,i)),[a,u*100,i*100]};k.rgb.oklab=function(e){let t=br(e[0]/255),r=br(e[1]/255),i=br(e[2]/255),a=Math.cbrt(0.4122214708*t+0.5363325363*r+0.0514459929*i),u=Math.cbrt(0.2119034982*t+0.6806995451*r+0.1073969566*i),f=Math.cbrt(0.0883024619*t+0.2817188376*r+0.6299787005*i),c=0.2104542553*a+0.793617785*u-0.0040720468*f,d=1.9779984951*a-2.428592205*u+0.4505937099*f,g=0.0259040371*a+0.7827717662*u-0.808675766*f;return[c*100,d*100,g*100]};k.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,i=e[2]/255,a=Math.min(1-t,1-r,1-i),u=(1-t-a)/(1-a)||0,f=(1-r-a)/(1-a)||0,c=(1-i-a)/(1-a)||0;return[u*100,f*100,c*100,a*100]};function sb(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}k.rgb.keyword=function(e){let t=oc[e];if(t)return t;let r=Number.POSITIVE_INFINITY,i;for(let a of Object.keys(Je)){let u=Je[a],f=sb(e,u);if(f<r)r=f,i=a}return i};k.keyword.rgb=function(e){return Je[e]};k.rgb.xyz=function(e){let t=br(e[0]/255),r=br(e[1]/255),i=br(e[2]/255),a=t*0.4124564+r*0.3575761+i*0.1804375,u=t*0.2126729+r*0.7151522+i*0.072175,f=t*0.0193339+r*0.119192+i*0.9503041;return[a*100,u*100,f*100]};k.rgb.lab=function(e){let t=k.rgb.xyz(e),r=t[0],i=t[1],a=t[2];r/=95.047,i/=100,a/=108.883,r=r>ht?r**0.3333333333333333:7.787*r+0.13793103448275862,i=i>ht?i**0.3333333333333333:7.787*i+0.13793103448275862,a=a>ht?a**0.3333333333333333:7.787*a+0.13793103448275862;let u=116*i-16,f=500*(r-i),c=200*(i-a);return[u,f,c]};k.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,i=e[2]/100,a,u;if(r===0)return u=i*255,[u,u,u];let f=i<0.5?i*(1+r):i+r-i*r,c=2*i-f,d=[0,0,0];for(let g=0;g<3;g++){if(a=t+0.3333333333333333*-(g-1),a<0)a++;if(a>1)a--;if(6*a<1)u=c+(f-c)*6*a;else if(2*a<1)u=f;else if(3*a<2)u=c+(f-c)*(0.6666666666666666-a)*6;else u=c;d[g]=u*255}return d};k.hsl.hsv=function(e){let t=e[0],r=e[1]/100,i=e[2]/100,a=r,u=Math.max(i,0.01);i*=2,r*=i<=1?i:2-i,a*=u<=1?u:2-u;let f=(i+r)/2,c=i===0?2*a/(u+a):2*r/(i+r);return[t,c*100,f*100]};k.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,i=e[2]/100,a=Math.floor(t)%6,u=t-Math.floor(t),f=255*i*(1-r),c=255*i*(1-r*u),d=255*i*(1-r*(1-u));switch(i*=255,a){case 0:return[i,d,f];case 1:return[c,i,f];case 2:return[f,i,d];case 3:return[f,c,i];case 4:return[d,f,i];case 5:return[i,f,c]}};k.hsv.hsl=function(e){let t=e[0],r=e[1]/100,i=e[2]/100,a=Math.max(i,0.01),u,f;f=(2-r)*i;let c=(2-r)*a;return u=r*a,u/=c<=1?c:2-c,u=u||0,f/=2,[t,u*100,f*100]};k.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,i=e[2]/100,a=r+i,u;if(a>1)r/=a,i/=a;let f=Math.floor(6*t),c=1-i;if(u=6*t-f,(f&1)!==0)u=1-u;let d=r+u*(c-r),g,v,_;switch(f){default:case 6:case 0:{g=c,v=d,_=r;break}case 1:{g=d,v=c,_=r;break}case 2:{g=r,v=c,_=d;break}case 3:{g=r,v=d,_=c;break}case 4:{g=d,v=r,_=c;break}case 5:{g=c,v=r,_=d;break}}return[g*255,v*255,_*255]};k.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,i=e[2]/100,a=e[3]/100,u=1-Math.min(1,t*(1-a)+a),f=1-Math.min(1,r*(1-a)+a),c=1-Math.min(1,i*(1-a)+a);return[u*255,f*255,c*255]};k.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,i=e[2]/100,a,u,f;return a=t*3.2404542+r*-1.5371385+i*-0.4985314,u=t*-0.969266+r*1.8760108+i*0.041556,f=t*0.0556434+r*-0.2040259+i*1.0572252,a=wr(a),u=wr(u),f=wr(f),[a*255,u*255,f*255]};k.xyz.lab=function(e){let t=e[0],r=e[1],i=e[2];t/=95.047,r/=100,i/=108.883,t=t>ht?t**0.3333333333333333:7.787*t+0.13793103448275862,r=r>ht?r**0.3333333333333333:7.787*r+0.13793103448275862,i=i>ht?i**0.3333333333333333:7.787*i+0.13793103448275862;let a=116*r-16,u=500*(t-r),f=200*(r-i);return[a,u,f]};k.xyz.oklab=function(e){let t=e[0]/100,r=e[1]/100,i=e[2]/100,a=Math.cbrt(0.8189330101*t+0.3618667424*r-0.1288597137*i),u=Math.cbrt(0.0329845436*t+0.9293118715*r+0.0361456387*i),f=Math.cbrt(0.0482003018*t+0.2643662691*r+0.633851707*i),c=0.2104542553*a+0.793617785*u-0.0040720468*f,d=1.9779984951*a-2.428592205*u+0.4505937099*f,g=0.0259040371*a+0.7827717662*u-0.808675766*f;return[c*100,d*100,g*100]};k.oklab.oklch=function(e){return k.lab.lch(e)};k.oklab.xyz=function(e){let t=e[0]/100,r=e[1]/100,i=e[2]/100,a=(0.999999998*t+0.396337792*r+0.215803758*i)**3,u=(1.000000008*t-0.105561342*r-0.063854175*i)**3,f=(1.000000055*t-0.089484182*r-1.291485538*i)**3,c=1.227013851*a-0.55779998*u+0.281256149*f,d=-0.040580178*a+1.11225687*u-0.071676679*f,g=-0.076381285*a-0.421481978*u+1.58616322*f;return[c*100,d*100,g*100]};k.oklab.rgb=function(e){let t=e[0]/100,r=e[1]/100,i=e[2]/100,a=(t+0.3963377774*r+0.2158037573*i)**3,u=(t-0.1055613458*r-0.0638541728*i)**3,f=(t-0.0894841775*r-1.291485548*i)**3,c=wr(4.0767416621*a-3.3077115913*u+0.2309699292*f),d=wr(-1.2684380046*a+2.6097574011*u-0.3413193965*f),g=wr(-0.0041960863*a-0.7034186147*u+1.707614701*f);return[c*255,d*255,g*255]};k.oklch.oklab=function(e){return k.lch.lab(e)};k.lab.xyz=function(e){let t=e[0],r=e[1],i=e[2],a,u,f;u=(t+16)/116,a=r/500+u,f=u-i/200;let c=u**3,d=a**3,g=f**3;return u=c>ht?c:(u-0.13793103448275862)/7.787,a=d>ht?d:(a-0.13793103448275862)/7.787,f=g>ht?g:(f-0.13793103448275862)/7.787,a*=95.047,u*=100,f*=108.883,[a,u,f]};k.lab.lch=function(e){let t=e[0],r=e[1],i=e[2],a;if(a=Math.atan2(i,r)*360/2/Math.PI,a<0)a+=360;let f=Math.sqrt(r*r+i*i);return[t,f,a]};k.lch.lab=function(e){let t=e[0],r=e[1],a=e[2]/360*2*Math.PI,u=r*Math.cos(a),f=r*Math.sin(a);return[t,u,f]};k.rgb.ansi16=function(e,t=null){let[r,i,a]=e,u=t===null?k.rgb.hsv(e)[2]:t;if(u=Math.round(u/50),u===0)return 30;let f=30+(Math.round(a/255)<<2|Math.round(i/255)<<1|Math.round(r/255));if(u===2)f+=60;return f};k.hsv.ansi16=function(e){return k.rgb.ansi16(k.hsv.rgb(e),e[2])};k.rgb.ansi256=function(e){let t=e[0],r=e[1],i=e[2];if(t>>4===r>>4&&r>>4===i>>4){if(t<8)return 16;if(t>248)return 231;return Math.round((t-8)/247*24)+232}return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)};k.ansi16.rgb=function(e){e=e[0];let t=e%10;if(t===0||t===7){if(e>50)t+=3.5;return t=t/10.5*255,[t,t,t]}let r=(Math.trunc(e>50)+1)*0.5,i=(t&1)*r*255,a=(t>>1&1)*r*255,u=(t>>2&1)*r*255;return[i,a,u]};k.ansi256.rgb=function(e){if(e=e[0],e>=232){let u=(e-232)*10+8;return[u,u,u]}e-=16;let t,r=Math.floor(e/36)/5*255,i=Math.floor((t=e%36)/6)/5*255,a=t%6/5*255;return[r,i,a]};k.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".slice(r.length)+r};k.hex.rgb=function(e){let t=e.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let r=t[0];if(t[0].length===3)r=[...r].map((c)=>c+c).join("");let i=Number.parseInt(r,16),a=i>>16&255,u=i>>8&255,f=i&255;return[a,u,f]};k.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,i=e[2]/255,a=Math.max(Math.max(t,r),i),u=Math.min(Math.min(t,r),i),f=a-u,c,d=f<1?u/(1-f):0;if(f<=0)c=0;else if(a===t)c=(r-i)/f%6;else if(a===r)c=2+(i-t)/f;else c=4+(t-r)/f;return c/=6,c%=1,[c*360,f*100,d*100]};k.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,i=r<0.5?2*t*r:2*t*(1-r),a=0;if(i<1)a=(r-0.5*i)/(1-i);return[e[0],i*100,a*100]};k.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,i=t*r,a=0;if(i<1)a=(r-i)/(1-i);return[e[0],i*100,a*100]};k.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,i=e[2]/100;if(r===0)return[i*255,i*255,i*255];let a=[0,0,0],u=t%1*6,f=u%1,c=1-f,d=0;switch(Math.floor(u)){case 0:{a[0]=1,a[1]=f,a[2]=0;break}case 1:{a[0]=c,a[1]=1,a[2]=0;break}case 2:{a[0]=0,a[1]=1,a[2]=f;break}case 3:{a[0]=0,a[1]=c,a[2]=1;break}case 4:{a[0]=f,a[1]=0,a[2]=1;break}default:a[0]=1,a[1]=0,a[2]=c}return d=(1-r)*i,[(r*a[0]+d)*255,(r*a[1]+d)*255,(r*a[2]+d)*255]};k.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,i=t+r*(1-t),a=0;if(i>0)a=t/i;return[e[0],a*100,i*100]};k.hcg.hsl=function(e){let t=e[1]/100,i=e[2]/100*(1-t)+0.5*t,a=0;if(i>0&&i<0.5)a=t/(2*i);else if(i>=0.5&&i<1)a=t/(2*(1-i));return[e[0],a*100,i*100]};k.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,i=t+r*(1-t);return[e[0],(i-t)*100,(1-i)*100]};k.hwb.hcg=function(e){let t=e[1]/100,i=1-e[2]/100,a=i-t,u=0;if(a<1)u=(i-a)/(1-a);return[e[0],a*100,u*100]};k.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};k.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};k.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};k.gray.hsl=function(e){return[0,0,e[0]]};k.gray.hsv=k.gray.hsl;k.gray.hwb=function(e){return[0,100,e[0]]};k.gray.cmyk=function(e){return[0,0,0,e[0]]};k.gray.lab=function(e){return[e[0],0,0]};k.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,i=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(i.length)+i};k.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};function ab(){let e={},t=Object.keys(k);for(let{length:r}=t,i=0;i<r;i++)e[t[i]]={distance:-1,parent:null};return e}function ob(e){let t=ab(),r=[e];t[e].distance=0;while(r.length>0){let i=r.pop(),a=Object.keys(k[i]);for(let{length:u}=a,f=0;f<u;f++){let c=a[f],d=t[c];if(d.distance===-1)d.distance=t[i].distance+1,d.parent=i,r.unshift(c)}}return t}function ub(e,t){return function(r){return t(e(r))}}function lb(e,t){let r=[t[e].parent,e],i=k[t[e].parent][e],a=t[e].parent;while(t[a].parent)r.unshift(t[a].parent),i=ub(k[t[a].parent][a],i),a=t[a].parent;return i.conversion=r,i}function fb(e){let t=ob(e),r={},i=Object.keys(t);for(let{length:a}=i,u=0;u<a;u++){let f=i[u];if(t[f].parent===null)continue;r[f]=lb(f,t)}return r}var pe={},cb=Object.keys(k);function hb(e){let t=function(...r){let i=r[0];if(i===void 0||i===null)return i;if(i.length>1)r=i;return e(r)};if("conversion"in e)t.conversion=e.conversion;return t}function db(e){let t=function(...r){let i=r[0];if(i===void 0||i===null)return i;if(i.length>1)r=i;let a=e(r);if(typeof a==="object")for(let{length:u}=a,f=0;f<u;f++)a[f]=Math.round(a[f]);return a};if("conversion"in e)t.conversion=e.conversion;return t}for(let e of cb){pe[e]={},Object.defineProperty(pe[e],"channels",{value:k[e].channels}),Object.defineProperty(pe[e],"labels",{value:k[e].labels});let t=fb(e),r=Object.keys(t);for(let i of r){let a=t[i];pe[e][i]=db(a),pe[e][i].raw=hb(a)}}var uc=["keyword","gray","hex"],ha={};for(let e of Object.keys(pe))ha[[...pe[e].labels].sort().join("")]=e;var da={};function de(e,t){if(!(this instanceof de))return new de(e,t);if(t&&t in uc)t=null;if(t&&!(t in pe))throw Error("Unknown model: "+t);let r,i;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof de)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==="string"){let a=me.get(e);if(a===null)throw Error("Unable to parse color from string: "+e);this.model=a.model,i=pe[this.model].channels,this.color=a.value.slice(0,i),this.valpha=typeof a.value[i]==="number"?a.value[i]:1}else if(e.length>0){this.model=t||"rgb",i=pe[this.model].channels;let a=Array.prototype.slice.call(e,0,i);this.color=ma(a,i),this.valpha=typeof e[i]==="number"?e[i]:1}else if(typeof e==="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let a=Object.keys(e);if("alpha"in e)a.splice(a.indexOf("alpha"),1),this.valpha=typeof e.alpha==="number"?e.alpha:0;let u=a.sort().join("");if(!(u in ha))throw Error("Unable to parse color from object: "+JSON.stringify(e));this.model=ha[u];let{labels:f}=pe[this.model],c=[];for(r=0;r<f.length;r++)c.push(e[f[r]]);this.color=ma(c)}if(da[this.model]){i=pe[this.model].channels;for(r=0;r<i;r++){let a=da[this.model][r];if(a)this.color[r]=a(this.color[r])}}if(this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze)Object.freeze(this)}de.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in me.to?this:this.rgb();t=t.round(typeof e==="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return me.to[t.model](...r)},percentString(e){let t=this.rgb().round(typeof e==="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return me.to.rgb.percent(...r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=pe[this.model],{labels:r}=pe[this.model];for(let i=0;i<t;i++)e[r[i]]=this.color[i];if(this.valpha!==1)e.alpha=this.valpha;return e},unitArray(){let e=this.rgb().color;if(e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1)e.push(this.valpha);return e},unitObject(){let e=this.rgb().object();if(e.r/=255,e.g/=255,e.b/=255,this.valpha!==1)e.alpha=this.valpha;return e},round(e){return e=Math.max(e||0,0),new de([...this.color.map(gb(e)),this.valpha],this.model)},alpha(e){if(e!==void 0)return new de([...this.color,Math.max(0,Math.min(1,e))],this.model);return this.valpha},red:se("rgb",0,he(255)),green:se("rgb",1,he(255)),blue:se("rgb",2,he(255)),hue:se(["hsl","hsv","hsl","hwb","hcg"],0,(e)=>(e%360+360)%360),saturationl:se("hsl",1,he(100)),lightness:se("hsl",2,he(100)),saturationv:se("hsv",1,he(100)),value:se("hsv",2,he(100)),chroma:se("hcg",1,he(100)),gray:se("hcg",2,he(100)),white:se("hwb",1,he(100)),wblack:se("hwb",2,he(100)),cyan:se("cmyk",0,he(100)),magenta:se("cmyk",1,he(100)),yellow:se("cmyk",2,he(100)),black:se("cmyk",3,he(100)),x:se("xyz",0,he(95.047)),y:se("xyz",1,he(100)),z:se("xyz",2,he(108.833)),l:se("lab",0,he(100)),a:se("lab",1),b:se("lab",2),keyword(e){if(e!==void 0)return new de(e);return pe[this.model].keyword(this.color)},hex(e){if(e!==void 0)return new de(e);return me.to.hex(...this.rgb().round().color)},hexa(e){if(e!==void 0)return new de(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();if(r.length===1)r="0"+r;return me.to.hex(...t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,i]of e.entries()){let a=i/255;t[r]=a<=0.04045?a/12.92:((a+0.055)/1.055)**2.4}return 0.2126*t[0]+0.7152*t[1]+0.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();if(t>r)return(t+0.05)/(r+0.05);return(r+0.05)/(t+0.05)},level(e){let t=this.contrast(e);if(t>=7)return"AAA";return t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*0.3+e[1]*0.59+e[2]*0.11;return de.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),i=this.rgb(),a=t===void 0?0.5:t,u=2*a-1,f=r.alpha()-i.alpha(),c=((u*f===-1?u:(u+f)/(1+u*f))+1)/2,d=1-c;return de.rgb(c*r.red()+d*i.red(),c*r.green()+d*i.green(),c*r.blue()+d*i.blue(),r.alpha()*a+i.alpha()*(1-a))}};for(let e of Object.keys(pe)){if(uc.includes(e))continue;let{channels:t}=pe[e];de.prototype[e]=function(...r){if(this.model===e)return new de(this);if(r.length>0)return new de(r,e);return new de([...pb(pe[this.model][e].raw(this.color)),this.valpha],e)},de[e]=function(...r){let i=r[0];if(typeof i==="number")i=ma(r,t);return new de(i,e)}}function mb(e,t){return Number(e.toFixed(t))}function gb(e){return function(t){return mb(t,e)}}function se(e,t,r){e=Array.isArray(e)?e:[e];for(let i of e)(da[i]||=[])[t]=r;return e=e[0],function(i){let a;if(i!==void 0){if(r)i=r(i);return a=this[e](),a.color[t]=i,a}if(a=this[e]().color[t],r)a=r(a);return a}}function he(e){return function(t){return Math.max(0,Math.min(e,t))}}function pb(e){return Array.isArray(e)?e:[e]}function ma(e,t){for(let r=0;r<t;r++)if(typeof e[r]!=="number")e[r]=0;return e}function yb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _b=function(t){for(var r=0,i=0;r<t.length;i=t.charCodeAt(r++)+((i<<5)-i));var a=Math.floor(Math.abs(Math.sin(i)*1e4%1*16777216)).toString(16);return"#"+Array(6-a.length+1).join("0")+a},sc=yb(_b);function wb(e,t){let r=e.split(t||":"),i=sc(r[0]);if(!r.length)return i;for(let a=0,u=r.length-1;a<u;a++)i=de(i).mix(de(sc(r[a+1]))).saturate(1).hex();return i}lc.exports=wb});var hc=b(function(ax,cc){function $e(e,t){if(t)return new $e(e).style(t);if(!(this instanceof $e))return new $e(e);this.text=e}$e.prototype.prefix="\x1B[";$e.prototype.suffix="m";$e.prototype.hex=function(t){if(t=t[0]==="#"?t.substring(1):t,t.length===3)t=t.split(""),t[5]=t[2],t[4]=t[2],t[3]=t[1],t[2]=t[1],t[1]=t[0],t=t.join("");var r=t.substring(0,2),i=t.substring(2,4),a=t.substring(4,6);return[parseInt(r,16),parseInt(i,16),parseInt(a,16)]};$e.prototype.rgb=function(t,r,i){var a=t/255*5,u=r/255*5,f=i/255*5;return this.ansi(a,u,f)};$e.prototype.ansi=function(t,r,i){var a=Math.round(t),u=Math.round(r),f=Math.round(i);return 16+a*36+u*6+f};$e.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};$e.prototype.style=function(t){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(t))+this.suffix+this.text+this.reset()};cc.exports=$e});var mc=b(function(ox,dc){var bb=fc(),vb=hc();dc.exports=function(t,r){var i=r.namespace,a=r.colors!==!1?vb(i+":",bb(i)):i+":";return t[0]=a+" "+t[0],t}});var pc=b(function(ux,gc){gc.exports=function(t,r){if(!r)return!1;var i=r.split(/[\s,]+/),a=0;for(;a<i.length;a++){if(r=i[a].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(t))return!1;continue}if(new RegExp("^"+r+"$").test(t))return!0}return!1}});var _c=b(function(lx,yc){var Sb=pc();yc.exports=function(t){return function(i){try{return Sb(i,t())}catch(a){}return!1}}});var bc=b(function(fx,wc){var xb=_c();wc.exports=xb(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var Sc=b(function(cx,vc){vc.exports=function(e,t){try{Function.prototype.apply.call(console.log,console,t)}catch(r){}}});var nn=b(function(hx,xc){var Mb=ic(),Eb=j("tty").isatty(1),oi=Mb(function e(t,r){if(r=r||{},r.colors="colors"in r?r.colors:Eb,r.namespace=t,r.prod=!1,r.dev=!0,!e.enabled(t)&&!(r.force||e.force))return e.nope(r);return e.yep(r)});oi.modify(mc());oi.use(bc());oi.set(Sc());xc.exports=oi});var Ec=b(function(dx,Mc){var ga=j("fs"),{StringDecoder:Ob}=j("string_decoder"),{Stream:kb}=$t();function Db(){}Mc.exports=(e,t)=>{let r=Buffer.alloc(65536),i=new Ob("utf8"),a=new kb,u="",f=0,c=0;if(e.start===-1)delete e.start;if(a.readable=!0,a.destroy=()=>{a.destroyed=!0,a.emit("end"),a.emit("close")},ga.open(e.file,"a+","0644",(d,g)=>{if(d){if(!t)a.emit("error",d);else t(d);a.destroy();return}(function v(){if(a.destroyed){ga.close(g,Db);return}return ga.read(g,r,0,r.length,f,(_,w)=>{if(_){if(!t)a.emit("error",_);else t(_);a.destroy();return}if(!w){if(u){if(e.start==null||c>e.start)if(!t)a.emit("line",u);else t(null,u);c++,u=""}return setTimeout(v,1000)}let E=i.write(r.slice(0,w));if(!t)a.emit("data",E);E=(u+E).split(/\n+/);let p=E.length-1,M=0;for(;M<p;M++){if(e.start==null||c>e.start)if(!t)a.emit("line",E[M]);else t(null,E[M]);c++}return u=E[p],f+=w,v()})})()}),!t)return a;return a.destroy}});var Rc=b(function(mx,Dc){var Te=j("fs"),ye=j("path"),Oc=zf(),Rb=j("zlib"),{MESSAGE:Tb}=oe(),{Stream:Nb,PassThrough:kc}=$t(),Lb=It(),He=nn()("winston:file"),Pb=j("os"),Ab=Ec();Dc.exports=class extends Lb{constructor(t={}){super(t);this.name=t.name||"file";function r(i,...a){a.slice(1).forEach((u)=>{if(t[u])throw Error(`Cannot set ${u} and ${i} together`)})}if(this._stream=new kc,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),t.filename||t.dirname)r("filename or dirname","stream"),this._basename=this.filename=t.filename?ye.basename(t.filename):"winston.log",this.dirname=t.dirname||ye.dirname(t.filename),this.options=t.options||{flags:"a"};else if(t.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(t.stream)),this.dirname=ye.dirname(this._dest.path);else throw Error("Cannot log to file without filename or stream.");if(this.maxsize=t.maxsize||null,this.rotationFormat=t.rotationFormat||!1,this.zippedArchive=t.zippedArchive||!1,this.maxFiles=t.maxFiles||null,this.eol=typeof t.eol==="string"?t.eol:Pb.EOL,this.tailable=t.tailable||!1,this.lazy=t.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);if(!this.lazy)this.open()}finishIfEnding(){if(this._ending)if(this._opening)this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())});else this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}_final(t){if(this._opening){this.once("open",()=>this._final(t));return}if(this._stream.end(),!this._dest)return t();if(this._dest.writableFinished)return t();this._dest.once("finish",t),this._dest.once("error",t)}log(t,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(t,r)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(t,r)});return}if(this.lazy){if(!this._fileExist){if(!this._opening)this.open();this.once("open",()=>{this._fileExist=!0,this.log(t,r);return});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{if(!this._opening)this.open();this.once("open",()=>{this.log(t,r);return});return});return}}let i=`${t[Tb]}${this.eol}`,a=Buffer.byteLength(i);function u(){if(this._size+=a,this._pendingSize-=a,He("logged %s %s",this._size,i),this.emit("logged",t),this._rotate)return;if(this._opening)return;if(!this._needsNewFile())return;if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}if(this._pendingSize+=a,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize))this.rotatedWhileOpening=!0;let f=this._stream.write(i,u.bind(this));if(!f)this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()});else r();return He("written",f,this._drain),this.finishIfEnding(),f}query(t,r){if(typeof t==="function")r=t,t={};t=_(t);let i=ye.join(this.dirname,this.filename),a="",u=[],f=0,c=Te.createReadStream(i,{encoding:"utf8"});c.on("error",(w)=>{if(c.readable)c.destroy();if(!r)return;return w.code!=="ENOENT"?r(w):r(null,u)}),c.on("data",(w)=>{w=(a+w).split(/\n+/);let E=w.length-1,p=0;for(;p<E;p++){if(!t.start||f>=t.start)d(w[p]);f++}a=w[E]}),c.on("close",()=>{if(a)d(a,!0);if(t.order==="desc")u=u.reverse();if(r)r(null,u)});function d(w,E){try{let p=JSON.parse(w);if(v(p))g(p)}catch(p){if(!E)c.emit("error",p)}}function g(w){if(t.rows&&u.length>=t.rows&&t.order!=="desc"){if(c.readable)c.destroy();return}if(t.fields)w=t.fields.reduce((E,p)=>(E[p]=w[p],E),{});if(t.order==="desc"){if(u.length>=t.rows)u.shift()}u.push(w)}function v(w){if(!w)return;if(typeof w!=="object")return;let E=new Date(w.timestamp);if(t.from&&E<t.from||t.until&&E>t.until||t.level&&t.level!==w.level)return;return!0}function _(w){if(w=w||{},w.rows=w.rows||w.limit||10,w.start=w.start||0,w.until=w.until||new Date,typeof w.until!=="object")w.until=new Date(w.until);if(w.from=w.from||w.until-86400000,typeof w.from!=="object")w.from=new Date(w.from);return w.order=w.order||"desc",w}}stream(t={}){let r=ye.join(this.dirname,this.filename),i=new Nb,a={file:r,start:t.start};return i.destroy=Ab(a,(u,f)=>{if(u)return i.emit("error",u);try{i.emit("data",f),f=JSON.parse(f),i.emit("log",f)}catch(c){i.emit("error",c)}}),i}open(){if(!this.filename)return;if(this._opening)return;this._opening=!0,this.stat((t,r)=>{if(t)return this.emit("error",t);He("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{if(!this._stream.emit("rotate"))this._rotate=!1})})}stat(t){let r=this._getFile(),i=ye.join(this.dirname,r);Te.stat(i,(a,u)=>{if(a&&a.code==="ENOENT")return He("ENOENT\xA0ok",i),this.filename=r,t(null,0);if(a)return He(`err ${a.code} ${i}`),t(a);if(!u||this._needsNewFile(u.size))return this._incFile(()=>this.stat(t));this.filename=r,t(null,u.size)})}close(t){if(!this._stream)return;this._stream.end(()=>{if(t)t();this.emit("flush"),this.emit("closed")})}_needsNewFile(t){return t=t||this._size,this.maxsize&&t>=this.maxsize}_onError(t){this.emit("error",t)}_setupStream(t){return t.on("error",this._onError),t}_cleanupStream(t){return t.removeListener("error",this._onError),t.destroy(),t}_rotateFile(){this._incFile(()=>this.open())}_endStream(t=()=>{}){if(this._dest)this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),t()});else t()}_createStream(t){let r=ye.join(this.dirname,this.filename);He("create stream start",r,this.options);let i=Te.createWriteStream(r,this.options).on("error",(a)=>He(a)).on("close",()=>He("close",i.path,i.bytesWritten)).on("open",()=>{if(He("file open ok",r),this.emit("open",r),t.pipe(i),this.rotatedWhileOpening)this._stream=new kc,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),t.end()});return He("create stream ok",r),i}_incFile(t){He("_incFile",this.filename);let r=ye.extname(this._basename),i=ye.basename(this._basename,r),a=[];if(this.zippedArchive)a.push(function(u){let f=this._created>0&&!this.tailable?this._created:"";this._compressFile(ye.join(this.dirname,`${i}${f}${r}`),ye.join(this.dirname,`${i}${f}${r}.gz`),u)}.bind(this));a.push(function(u){if(!this.tailable)this._created+=1,this._checkMaxFilesIncrementing(r,i,u);else this._checkMaxFilesTailable(r,i,u)}.bind(this)),Oc(a,t)}_getFile(){let t=ye.extname(this._basename),r=ye.basename(this._basename,t),i=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${i}${t}`:`${r}${t}`}_checkMaxFilesIncrementing(t,r,i){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(i);let a=this._created-this.maxFiles,u=a!==0?a:"",f=this.zippedArchive?".gz":"",c=`${r}${u}${t}${f}`,d=ye.join(this.dirname,c);Te.unlink(d,i)}_checkMaxFilesTailable(t,r,i){let a=[];if(!this.maxFiles)return;let u=this.zippedArchive?".gz":"";for(let f=this.maxFiles-1;f>1;f--)a.push(function(c,d){let g=`${r}${c-1}${t}${u}`,v=ye.join(this.dirname,g);Te.exists(v,(_)=>{if(!_)return d(null);g=`${r}${c}${t}${u}`,Te.rename(v,ye.join(this.dirname,g),d)})}.bind(this,f));Oc(a,()=>{Te.rename(ye.join(this.dirname,`${r}${t}${u}`),ye.join(this.dirname,`${r}1${t}${u}`),i)})}_compressFile(t,r,i){Te.access(t,Te.F_OK,(a)=>{if(a)return i();var u=Rb.createGzip(),f=Te.createReadStream(t),c=Te.createWriteStream(r);c.on("finish",()=>{Te.unlink(t,i)}),f.pipe(u).pipe(c)})}_createLogDirIfNotExist(t){if(!Te.existsSync(t))Te.mkdirSync(t,{recursive:!0})}}});var Nc=b(function(gx,Tc){var qb=j("http"),Yb=j("https"),{Stream:Fb}=$t(),Cb=It(),{configure:jb}=jr();Tc.exports=class extends Cb{constructor(t={}){super(t);if(this.options=t,this.name=t.name||"http",this.ssl=!!t.ssl,this.host=t.host||"localhost",this.port=t.port,this.auth=t.auth,this.path=t.path||"",this.maximumDepth=t.maximumDepth,this.agent=t.agent,this.headers=t.headers||{},this.headers["content-type"]="application/json",this.batch=t.batch||!1,this.batchInterval=t.batchInterval||5000,this.batchCount=t.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},!this.port)this.port=this.ssl?443:80}log(t,r){if(this._request(t,null,null,(i,a)=>{if(a&&a.statusCode!==200)i=Error(`Invalid HTTP Status Code: ${a.statusCode}`);if(i)this.emit("warn",i);else this.emit("logged",t)}),r)setImmediate(r)}query(t,r){if(typeof t==="function")r=t,t={};t={method:"query",params:this.normalizeQuery(t)};let i=t.params.auth||null;delete t.params.auth;let a=t.params.path||null;delete t.params.path,this._request(t,i,a,(u,f,c)=>{if(f&&f.statusCode!==200)u=Error(`Invalid HTTP Status Code: ${f.statusCode}`);if(u)return r(u);if(typeof c==="string")try{c=JSON.parse(c)}catch(d){return r(d)}r(null,c)})}stream(t={}){let r=new Fb;t={method:"stream",params:t};let i=t.params.path||null;delete t.params.path;let a=t.params.auth||null;delete t.params.auth;let u="",f=this._request(t,a,i);return r.destroy=()=>f.destroy(),f.on("data",(c)=>{c=(u+c).split(/\n+/);let d=c.length-1,g=0;for(;g<d;g++)try{r.emit("log",JSON.parse(c[g]))}catch(v){r.emit("error",v)}u=c[d]}),f.on("error",(c)=>r.emit("error",c)),r}_request(t,r,i,a){if(t=t||{},r=r||this.auth,i=i||this.path||"",this.batch)this._doBatch(t,a,r,i);else this._doRequest(t,a,r,i)}_doBatch(t,r,i,a){if(this.batchOptions.push(t),this.batchOptions.length===1){let u=this;this.batchCallback=r,this.batchTimeoutID=setTimeout(function(){u.batchTimeoutID=-1,u._doBatchRequest(u.batchCallback,i,a)},this.batchInterval)}if(this.batchOptions.length===this.batchCount)this._doBatchRequest(this.batchCallback,i,a)}_doBatchRequest(t,r,i){if(this.batchTimeoutID>0)clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1;let a=this.batchOptions.slice();this.batchOptions=[],this._doRequest(a,t,r,i)}_doRequest(t,r,i,a){let u=Object.assign({},this.headers);if(i&&i.bearer)u.Authorization=`Bearer ${i.bearer}`;let f=(this.ssl?Yb:qb).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${a.replace(/^\//,"")}`,headers:u,auth:i&&i.username&&i.password?`${i.username}:${i.password}`:"",agent:this.agent});f.on("error",r),f.on("response",(d)=>d.on("end",()=>r(null,d)).resume());let c=jb({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});f.end(Buffer.from(c(t,this.options.replacer),"utf8"))}}});var pa=b(function(px,Lc){var Ke=(e)=>e!==null&&typeof e==="object"&&typeof e.pipe==="function";Ke.writable=(e)=>Ke(e)&&e.writable!==!1&&typeof e._write==="function"&&typeof e._writableState==="object";Ke.readable=(e)=>Ke(e)&&e.readable!==!1&&typeof e._read==="function"&&typeof e._readableState==="object";Ke.duplex=(e)=>Ke.writable(e)&&Ke.readable(e);Ke.transform=(e)=>Ke.duplex(e)&&typeof e._transform==="function";Lc.exports=Ke});var Ac=b(function(yx,Pc){var Ib=pa(),{MESSAGE:Wb}=oe(),$b=j("os"),Hb=It();Pc.exports=class extends Hb{constructor(t={}){super(t);if(!t.stream||!Ib(t.stream))throw Error("options.stream is required.");this._stream=t.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=t.stream._writableState.objectMode,this.eol=typeof t.eol==="string"?t.eol:$b.EOL}log(t,r){if(setImmediate(()=>this.emit("logged",t)),this.isObjectMode){if(this._stream.write(t),r)r();return}if(this._stream.write(`${t[Wb]}${this.eol}`),r)r();return}}});var qc=b(function(sn){Object.defineProperty(sn,"Console",{configurable:!0,enumerable:!0,get(){return af()}});Object.defineProperty(sn,"File",{configurable:!0,enumerable:!0,get(){return Rc()}});Object.defineProperty(sn,"Http",{configurable:!0,enumerable:!0,get(){return Nc()}});Object.defineProperty(sn,"Stream",{configurable:!0,enumerable:!0,get(){return Ac()}})});var li=b(function(Ub){var ui=os(),{configs:ya}=oe();Ub.cli=ui.levels(ya.cli);Ub.npm=ui.levels(ya.npm);Ub.syslog=ui.levels(ya.syslog);Ub.addColors=ui.levels});var Fc=b(function(_a,Yc){Object.defineProperty(_a,"__esModule",{value:!0});var Zb=ri(),Jb=Ht(Zb),Kb=ni(),Qb=Ht(Kb),Xb=ta(),ev=Ht(Xb),tv=zs(),rv=Ht(tv),nv=Zs(),iv=Ht(nv),sv=Wt(),av=Ht(sv),ov=yr(),uv=Ht(ov);function Ht(e){return e&&e.__esModule?e:{default:e}}function lv(e,t,r){r=(0,rv.default)(r);var i=0,a=0,{length:u}=e,f=!1;if(u===0)r(null);function c(d,g){if(d===!1)f=!0;if(f===!0)return;if(d)r(d);else if(++a===u||g===Qb.default)r(null)}for(;i<u;i++)t(e[i],i,(0,iv.default)(c))}function fv(e,t,r){return(0,ev.default)(e,1/0,t,r)}function cv(e,t,r){var i=(0,Jb.default)(e)?lv:fv;return i(e,(0,av.default)(t),r)}_a.default=(0,uv.default)(cv,3);Yc.exports=_a.default});var jc=b(function(wa,Cc){Object.defineProperty(wa,"__esModule",{value:!0});wa.default=dv;function dv(e){return(t,r,i)=>e(t,i)}Cc.exports=wa.default});var ci=b(function(ba,Ic){Object.defineProperty(ba,"__esModule",{value:!0});var gv=Fc(),pv=fi(gv),yv=jc(),_v=fi(yv),wv=Wt(),bv=fi(wv),vv=yr(),Sv=fi(vv);function fi(e){return e&&e.__esModule?e:{default:e}}function xv(e,t,r){return(0,pv.default)(e,(0,_v.default)((0,bv.default)(t)),r)}ba.default=(0,Sv.default)(xv,3);Ic.exports=ba.default});var $c=b(function(bx,Wc){var Ev=Object.prototype.toString;Wc.exports=function(t){if(typeof t.displayName==="string"&&t.constructor.name)return t.displayName;else if(typeof t.name==="string"&&t.name)return t.name;if(typeof t==="object"&&t.constructor&&typeof t.constructor.name==="string")return t.constructor.name;var r=t.toString(),i=Ev.call(t).slice(8,-1);if(i==="Function")r=r.substring(r.indexOf("(")+1,r.indexOf(")"));else r=i;return r||"anonymous"}});var va=b(function(vx,Hc){var Ov=$c();Hc.exports=function(t){var r=0,i;function a(){if(r)return i;return r=1,i=t.apply(this,arguments),t=null,i}return a.displayName=Ov(t),a}});var Sa=b(function(Rv){Rv.get=function(e){var t=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},i=Error.prepareStackTrace;Error.prepareStackTrace=function(u,f){return f},Error.captureStackTrace(r,e||Rv.get);var a=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=t,a};Rv.parse=function(e){if(!e.stack)return[];var t=this,r=e.stack.split(`
|
|
28
|
-
`).slice(1);return r.map(function(i){if(i.match(/^\s*[-]{4,}$/))return t._createParsedCallSite({fileName:i,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var a=i.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(!a)return;var u=null,f=null,c=null,d=null,g=null,v=a[5]==="native";if(a[1]){c=a[1];var _=c.lastIndexOf(".");if(c[_-1]==".")_--;if(_>0){u=c.substr(0,_),f=c.substr(_+1);var w=u.indexOf(".Module");if(w>0)c=c.substr(w+1),u=u.substr(0,w)}d=null}if(f)d=u,g=f;if(f==="<anonymous>")g=null,c=null;var E={fileName:a[2]||null,lineNumber:parseInt(a[3],10)||null,functionName:c,typeName:d,methodName:g,columnNumber:parseInt(a[4],10)||null,native:v};return t._createParsedCallSite(E)}).filter(function(i){return!!i})};function
|
|
29
|
-
`),stack:t&&t.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(t)}}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:
|
|
30
|
-
`),stack:t&&t.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(t)}}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:
|
|
31
|
-
`));if(E)this.exceptions.handle(E);if(p)this.rejections.handle(p)}getHighestLogLevel(){let e=
|
|
32
|
-
`))}_onEvent(e,t){function r(i){if(e==="error"&&!this.transports.includes(t))this.add(t);this.emit(e,i,t)}if(!t["__winston"+e])t["__winston"+e]=r.bind(this),t.on(e,t["__winston"+e])}_addDefaultMeta(e){if(this.defaultMeta)Object.assign(e,this.defaultMeta)}}function
|
|
25
|
+
${W}`;return M.pop(),`{${Y}}`}case"number":return isFinite(p)?String(p):t?t(p):"null";case"boolean":return p===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(p);default:return t?t(p):void 0}}function _(E,p,M){switch(typeof p){case"string":return bt(p);case"object":{if(p===null)return"null";if(typeof p.toJSON==="function"){if(p=p.toJSON(E),typeof p!=="object")return _(E,p,M);if(p===null)return"null"}if(M.indexOf(p)!==-1)return r;let P="",A=p.length!==void 0;if(A&&Array.isArray(p)){if(p.length===0)return"[]";if(f<M.length+1)return'"[Array]"';M.push(p);let Y=Math.min(p.length,c),H=0;for(;H<Y-1;H++){let F=_(String(H),p[H],M);P+=F!==void 0?F:"null",P+=","}let I=_(String(H),p[H],M);if(P+=I!==void 0?I:"null",p.length-1>c){let F=p.length-c-1;P+=`,"... ${At(F)} not stringified"`}return M.pop(),`[${P}]`}let W=Object.keys(p),O=W.length;if(O===0)return"{}";if(f<M.length+1)return'"[Object]"';let N="",Z=Math.min(O,c);if(A&&ls(p))P+=Yu(p,",",c),W=W.slice(p.length),Z-=p.length,N=",";if(a)W=us(W,u);M.push(p);for(let Y=0;Y<Z;Y++){let H=W[Y],I=_(H,p[H],M);if(I!==void 0)P+=`${N}${bt(H)}:${I}`,N=","}if(O>c){let Y=O-c;P+=`${N}"...":"${At(Y)} not stringified"`}return M.pop(),`{${P}}`}case"number":return isFinite(p)?String(p):t?t(p):"null";case"boolean":return p===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(p);default:return t?t(p):void 0}}function w(E,p,M){if(arguments.length>1){let P="";if(typeof M==="number")P=" ".repeat(Math.min(M,10));else if(typeof M==="string")P=M.slice(0,10);if(p!=null){if(typeof p==="function")return d("",{"":E},[],p,P,"");if(Array.isArray(p))return g("",E,[],I0(p),P,"")}if(P.length!==0)return v("",E,[],P,"")}return _("",E,[])}return w}});var cs=b(function(y2,Iu){var U0=Ne(),{MESSAGE:G0}=le(),ju=$r();function V0(e,t){if(typeof t==="bigint")return t.toString();return t}Iu.exports=U0((e,t)=>{let r=ju.configure(t);return e[G0]=r(e,t.replacer||V0,t.space),e})});var $u=b(function(_2,Wu){var z0=Ne();Wu.exports=z0((e,t)=>{if(t.message)return e.message=`[${t.label}] ${e.message}`,e;return e.label=t.label,e})});var Uu=b(function(w2,Hu){var B0=Ne(),{MESSAGE:Z0}=le(),J0=$r();Hu.exports=B0((e)=>{let t={};if(e.message)t["@message"]=e.message,delete e.message;if(e.timestamp)t["@timestamp"]=e.timestamp,delete e.timestamp;return t["@fields"]=e,e[Z0]=J0(t),e})});var Vu=b(function(b2,Gu){var K0=Ne();function Q0(e,t,r){let i=t.reduce((u,f)=>(u[f]=e[f],delete e[f],u),{}),a=Object.keys(e).reduce((u,f)=>(u[f]=e[f],delete e[f],u),{});return Object.assign(e,i,{[r]:a}),e}function X0(e,t,r){return e[r]=t.reduce((i,a)=>(i[a]=e[a],delete e[a],i),{}),e}Gu.exports=K0((e,t={})=>{let r="metadata";if(t.key)r=t.key;let i=[];if(!t.fillExcept&&!t.fillWith)i.push("level"),i.push("message");if(t.fillExcept)i=t.fillExcept;if(i.length>0)return Q0(e,i,r);if(t.fillWith)return X0(e,t.fillWith,r);return e})});var Bu=b(function(v2,zu){var fr=1000,cr=fr*60,hr=cr*60,Yt=hr*24,ey=Yt*7,ty=Yt*365.25;zu.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return ry(e);else if(r==="number"&&isFinite(e))return t.long?iy(e):ny(e);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function ry(e){if(e=String(e),e.length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]),i=(t[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*ty;case"weeks":case"week":case"w":return r*ey;case"days":case"day":case"d":return r*Yt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*hr;case"minutes":case"minute":case"mins":case"min":case"m":return r*cr;case"seconds":case"second":case"secs":case"sec":case"s":return r*fr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}function ny(e){var t=Math.abs(e);if(t>=Yt)return Math.round(e/Yt)+"d";if(t>=hr)return Math.round(e/hr)+"h";if(t>=cr)return Math.round(e/cr)+"m";if(t>=fr)return Math.round(e/fr)+"s";return e+"ms"}function iy(e){var t=Math.abs(e);if(t>=Yt)return $n(e,t,Yt,"day");if(t>=hr)return $n(e,t,hr,"hour");if(t>=cr)return $n(e,t,cr,"minute");if(t>=fr)return $n(e,t,fr,"second");return e+" ms"}function $n(e,t,r,i){var a=t>=r*1.5;return Math.round(e/r)+" "+i+(a?"s":"")}});var Ju=b(function(Hr,Zu){var sy=Ne(),ay=Bu();Zu.exports=sy((e)=>{let t=+new Date;return Hr.diff=t-(Hr.prevTime||t),Hr.prevTime=t,e.ms=`+${ay(Hr.diff)}`,e})});var Xu=b(function(S2,Qu){var oy=j("util").inspect,uy=Ne(),{LEVEL:ly,MESSAGE:Ku,SPLAT:fy}=le();Qu.exports=uy((e,t={})=>{let r=Object.assign({},e);return delete r[ly],delete r[Ku],delete r[fy],e[Ku]=oy(r,!1,t.depth||null,t.colorize),e})});var el=b(function(x2,Hn){var{MESSAGE:cy}=le();class hs{constructor(e){this.template=e}transform(e){return e[cy]=this.template(e),e}}Hn.exports=(e)=>new hs(e);Hn.exports.Printf=Hn.exports.Format=hs});var nl=b(function(M2,rl){var hy=Ne(),{MESSAGE:tl}=le(),dy=$r();rl.exports=hy((e)=>{let t=dy(Object.assign({},e,{level:void 0,message:void 0,splat:void 0})),r=e.padding&&e.padding[e.level]||"";if(t!=="{}")e[tl]=`${e.level}:${r} ${e.message} ${t}`;else e[tl]=`${e.level}:${r} ${e.message}`;return e})});var ul=b(function(E2,ol){var sl=j("util"),{SPLAT:il}=le(),my=/%[scdjifoO%]/g,gy=/%%/g;class al{constructor(e){this.options=e}_splat(e,t){let r=e.message,i=e[il]||e.splat||[],a=r.match(gy),u=a&&a.length||0,c=t.length-u-i.length,d=c<0?i.splice(c,-1*c):[],g=d.length;if(g)for(let v=0;v<g;v++)Object.assign(e,d[v]);return e.message=sl.format(r,...i),e}transform(e){let t=e.message,r=e[il]||e.splat;if(!r||!r.length)return e;let i=t&&t.match&&t.match(my);if(!i&&(r||r.length)){let a=r.length>1?r.splice(0):r,u=a.length;if(u)for(let f=0;f<u;f++)Object.assign(e,a[f]);return e}if(i)return this._splat(e,i);return e}}ol.exports=(e)=>new al(e)});var fl=b(function(Un,ll){(function(e,t){typeof Un==="object"&&typeof ll<"u"?t(Un):typeof define==="function"&&define.amd?define(["exports"],t):t(e.fecha={})})(Un,function(e){var t=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,r="\\d\\d?",i="\\d\\d",a="\\d{3}",u="\\d{4}",f="[^\\s]+",c=/\[([^]*?)\]/gm;function d(S,T){var G=[];for(var ye=0,q=S.length;ye<q;ye++)G.push(S[ye].substr(0,T));return G}var g=function(S){return function(T,G){var ye=G[S].map(function(ke){return ke.toLowerCase()}),q=ye.indexOf(T.toLowerCase());if(q>-1)return q;return null}};function v(S){var T=[];for(var G=1;G<arguments.length;G++)T[G-1]=arguments[G];for(var ye=0,q=T;ye<q.length;ye++){var ke=q[ye];for(var Re in ke)S[Re]=ke[Re]}return S}var _=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],w=["January","February","March","April","May","June","July","August","September","October","November","December"],E=d(w,3),p=d(_,3),M={dayNamesShort:p,dayNames:_,monthNamesShort:E,monthNames:w,amPm:["am","pm"],DoFn:function(S){return S+["th","st","nd","rd"][S%10>3?0:(S-S%10!==10?1:0)*S%10]}},P=v({},M),A=function(S){return P=v(P,S)},W=function(S){return S.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},O=function(S,T){if(T===void 0)T=2;S=String(S);while(S.length<T)S="0"+S;return S},N={D:function(S){return String(S.getDate())},DD:function(S){return O(S.getDate())},Do:function(S,T){return T.DoFn(S.getDate())},d:function(S){return String(S.getDay())},dd:function(S){return O(S.getDay())},ddd:function(S,T){return T.dayNamesShort[S.getDay()]},dddd:function(S,T){return T.dayNames[S.getDay()]},M:function(S){return String(S.getMonth()+1)},MM:function(S){return O(S.getMonth()+1)},MMM:function(S,T){return T.monthNamesShort[S.getMonth()]},MMMM:function(S,T){return T.monthNames[S.getMonth()]},YY:function(S){return O(String(S.getFullYear()),4).substr(2)},YYYY:function(S){return O(S.getFullYear(),4)},h:function(S){return String(S.getHours()%12||12)},hh:function(S){return O(S.getHours()%12||12)},H:function(S){return String(S.getHours())},HH:function(S){return O(S.getHours())},m:function(S){return String(S.getMinutes())},mm:function(S){return O(S.getMinutes())},s:function(S){return String(S.getSeconds())},ss:function(S){return O(S.getSeconds())},S:function(S){return String(Math.round(S.getMilliseconds()/100))},SS:function(S){return O(Math.round(S.getMilliseconds()/10),2)},SSS:function(S){return O(S.getMilliseconds(),3)},a:function(S,T){return S.getHours()<12?T.amPm[0]:T.amPm[1]},A:function(S,T){return S.getHours()<12?T.amPm[0].toUpperCase():T.amPm[1].toUpperCase()},ZZ:function(S){var T=S.getTimezoneOffset();return(T>0?"-":"+")+O(Math.floor(Math.abs(T)/60)*100+Math.abs(T)%60,4)},Z:function(S){var T=S.getTimezoneOffset();return(T>0?"-":"+")+O(Math.floor(Math.abs(T)/60),2)+":"+O(Math.abs(T)%60,2)}},Z=function(S){return+S-1},Y=[null,r],H=[null,f],I=["isPm",f,function(S,T){var G=S.toLowerCase();if(G===T.amPm[0])return 0;else if(G===T.amPm[1])return 1;return null}],F=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(S){var T=(S+"").match(/([+-]|\d\d)/gi);if(T){var G=+T[1]*60+parseInt(T[2],10);return T[0]==="+"?G:-G}return 0}],fe={D:["day",r],DD:["day",i],Do:["day",r+f,function(S){return parseInt(S,10)}],M:["month",r,Z],MM:["month",i,Z],YY:["year",i,function(S){var T=new Date,G=+(""+T.getFullYear()).substr(0,2);return+(""+(+S>68?G-1:G)+S)}],h:["hour",r,void 0,"isPm"],hh:["hour",i,void 0,"isPm"],H:["hour",r],HH:["hour",i],m:["minute",r],mm:["minute",i],s:["second",r],ss:["second",i],YYYY:["year",u],S:["millisecond","\\d",function(S){return+S*100}],SS:["millisecond",i,function(S){return+S*10}],SSS:["millisecond",a],d:Y,dd:Y,ddd:H,dddd:H,MMM:["month",f,g("monthNamesShort")],MMMM:["month",f,g("monthNames")],a:I,A:I,ZZ:F,Z:F},re={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"},he=function(S){return v(re,S)},be=function(S,T,G){if(T===void 0)T=re.default;if(G===void 0)G={};if(typeof S==="number")S=new Date(S);if(Object.prototype.toString.call(S)!=="[object Date]"||isNaN(S.getTime()))throw Error("Invalid Date pass to format");T=re[T]||T;var ye=[];T=T.replace(c,function(ke,Re){return ye.push(Re),"@@@"});var q=v(v({},P),G);return T=T.replace(t,function(ke){return N[ke](S,q)}),T.replace(/@@@/g,function(){return ye.shift()})};function ve(S,T,G){if(G===void 0)G={};if(typeof T!=="string")throw Error("Invalid format in fecha parse");if(T=re[T]||T,S.length>1000)return null;var ye=new Date,q={year:ye.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},ke=[],Re=[],L=T.replace(c,function(Rt,gt){return Re.push(W(gt)),"@@@"}),Bt={},gn={};L=W(L).replace(t,function(Rt){var gt=fe[Rt],Kt=gt[0],Te=gt[1],Qt=gt[3];if(Bt[Kt])throw Error("Invalid format. "+Kt+" specified twice in format");if(Bt[Kt]=!0,Qt)gn[Qt]=!0;return ke.push(gt),"("+Te+")"}),Object.keys(gn).forEach(function(Rt){if(!Bt[Rt])throw Error("Invalid format. "+Rt+" is required in specified format")}),L=L.replace(/@@@/g,function(){return Re.shift()});var nt=S.match(new RegExp(L,"i"));if(!nt)return null;var pn=v(v({},P),G);for(var Le=1;Le<nt.length;Le++){var yn=ke[Le-1],vi=yn[0],_n=yn[2],wn=_n?_n(nt[Le],pn):+nt[Le];if(wn==null)return null;q[vi]=wn}if(q.isPm===1&&q.hour!=null&&+q.hour!==12)q.hour=+q.hour+12;else if(q.isPm===0&&+q.hour===12)q.hour=0;var Zt;if(q.timezoneOffset==null){Zt=new Date(q.year,q.month,q.day,q.hour,q.minute,q.second,q.millisecond);var Jt=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]];for(var Le=0,Si=Jt.length;Le<Si;Le++)if(Bt[Jt[Le][0]]&&q[Jt[Le][0]]!==Zt[Jt[Le][1]]())return null}else if(Zt=new Date(Date.UTC(q.year,q.month,q.day,q.hour,q.minute-q.timezoneOffset,q.second,q.millisecond)),q.month>11||q.month<0||q.day>31||q.day<1||q.hour>23||q.hour<0||q.minute>59||q.minute<0||q.second>59||q.second<0)return null;return Zt}var Ve={format:be,parse:ve,defaultI18n:M,setGlobalDateI18n:A,setGlobalDateMasks:he};e.assign=v,e.default=Ve,e.format=be,e.parse=ve,e.defaultI18n=M,e.setGlobalDateI18n=A,e.setGlobalDateMasks=he,Object.defineProperty(e,"__esModule",{value:!0})})});var dl=b(function(O2,hl){var cl=fl(),py=Ne();hl.exports=py((e,t={})=>{if(t.format)e.timestamp=typeof t.format==="function"?t.format():cl.format(new Date,t.format);if(!e.timestamp)e.timestamp=new Date().toISOString();if(t.alias)e[t.alias]=e.timestamp;return e})});var gl=b(function(D2,ml){var dr=Qi(),yy=Ne(),{MESSAGE:ds}=le();ml.exports=yy((e,t)=>{if(t.level!==!1)e.level=dr.strip(e.level);if(t.message!==!1)e.message=dr.strip(String(e.message));if(t.raw!==!1&&e[ds])e[ds]=dr.strip(String(e[ds]));return e})});var ms=b(function(wy){var _y=wy.format=Ne();wy.levels=Ou();function Se(e,t){Object.defineProperty(_y,e,{get(){return t()},configurable:!0})}Se("align",function(){return ku()});Se("errors",function(){return Nu()});Se("cli",function(){return Pu()});Se("combine",function(){return qu()});Se("colorize",function(){return In()});Se("json",function(){return cs()});Se("label",function(){return $u()});Se("logstash",function(){return Uu()});Se("metadata",function(){return Vu()});Se("ms",function(){return Ju()});Se("padLevels",function(){return is()});Se("prettyPrint",function(){return Xu()});Se("printf",function(){return el()});Se("simple",function(){return nl()});Se("splat",function(){return ul()});Se("timestamp",function(){return dl()});Se("uncolorize",function(){return gl()})});var ps=b(function(vy){var{format:pl}=j("util");vy.warn={deprecated(e){return()=>{throw Error(pl("{ %s } was removed in winston@3.0.0.",e))}},useFormat(e){return()=>{throw Error([pl("{ %s } was removed in winston@3.0.0.",e),"Use a custom winston.format = winston.format(function) instead."].join(`
|
|
26
|
+
`))}},forFunctions(e,t,r){r.forEach((i)=>{e[i]=vy.warn[t](i)})},forProperties(e,t,r){r.forEach((i)=>{let a=vy.warn[t](i);Object.defineProperty(e,i,{get:a,set:a})})}}});var yl=b(function(N2,Sy){Sy.exports={name:"winston",description:"A logger for just about everything.",version:"3.19.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.8","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.7.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.9.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.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",jest:"^29.7.0",rimraf:"5.0.10",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:"jest","test:unit":"jest -c test/jest.config.unit.js","test:integration":"jest -c test/jest.config.integration.js","test:typescript":"npx --package typescript tsc --project test",build:"babel lib -d dist",prebuild:"rimraf dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var wl=b(function(L2,_l){_l.exports=j("util").deprecate});var _s=b(function(P2,vl){function xy(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;if(i||a){if(t)t(e);else if(e){if(!this._writableState)process.nextTick(ys,this,e);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(ys,this,e)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(e||null,function(u){if(!t&&u)if(!r._writableState)process.nextTick(bl,r,u);else if(!r._writableState.errorEmitted)r._writableState.errorEmitted=!0,process.nextTick(bl,r,u);else process.nextTick(Gn,r);else if(t)process.nextTick(Gn,r),t(u);else process.nextTick(Gn,r)}),this}function bl(e,t){ys(e,t),Gn(e)}function Gn(e){if(e._writableState&&!e._writableState.emitClose)return;if(e._readableState&&!e._readableState.emitClose)return;e.emit("close")}function My(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(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 ys(e,t){e.emit("error",t)}function Ey(e,t){var{_readableState:r,_writableState:i}=e;if(r&&r.autoDestroy||i&&i.autoDestroy)e.destroy(t);else e.emit("error",t)}vl.exports={destroy:xy,undestroy:My,errorOrDestroy:Ey}});var vt=b(function(Ry,Ml){var xl={};function Ye(e,t,r){if(!r)r=Error;function i(u,f,c){if(typeof t==="string")return t;else return t(u,f,c)}class a extends r{constructor(u,f,c){super(i(u,f,c))}}a.prototype.name=r.name,a.prototype.code=e,xl[e]=a}function Sl(e,t){if(Array.isArray(e)){let r=e.length;if(e=e.map((i)=>String(i)),r>2)return`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1];else if(r===2)return`one of ${t} ${e[0]} or ${e[1]}`;else return`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function Oy(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function Dy(e,t,r){if(r===void 0||r>e.length)r=e.length;return e.substring(r-t.length,r)===t}function ky(e,t,r){if(typeof r!=="number")r=0;if(r+t.length>e.length)return!1;else return e.indexOf(t,r)!==-1}Ye("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Ye("ERR_INVALID_ARG_TYPE",function(e,t,r){let i;if(typeof t==="string"&&Oy(t,"not "))i="must not be",t=t.replace(/^not /,"");else i="must be";let a;if(Dy(e," argument"))a=`The ${e} ${i} ${Sl(t,"type")}`;else{let u=ky(e,".")?"property":"argument";a=`The "${e}" ${u} ${i} ${Sl(t,"type")}`}return a+=`. Received type ${typeof r}`,a},TypeError);Ye("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ye("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Ye("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ye("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Ye("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ye("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ye("ERR_STREAM_WRITE_AFTER_END","write after end");Ye("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ye("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Ye("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Ry.codes=xl});var ws=b(function(A2,El){var Ny=vt().codes.ERR_INVALID_OPT_VALUE;function Ly(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function Py(e,t,r,i){var a=Ly(t,i,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var u=i?r:"highWaterMark";throw new Ny(u,a)}return Math.floor(a)}return e.objectMode?16:16384}El.exports={getHighWaterMark:Py}});var Ol=b(function(q2,bs){if(typeof Object.create==="function")bs.exports=function(t,r){if(r)t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})};else bs.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var mr=b(function(Y2,vs){try{if(Vn=j("util"),typeof Vn.inherits!=="function")throw"";vs.exports=Vn.inherits}catch(e){vs.exports=Ol()}var Vn});var Ll=b(function(F2,Nl){function Dl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function kl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dl(Object(r),!0).forEach(function(i){Ay(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dl(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Ay(e,t,r){if(t=Tl(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function qy(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function Rl(e,t){for(var r=0;r<t.length;r++){var i=t[r];if(i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i)i.writable=!0;Object.defineProperty(e,Tl(i.key),i)}}function Yy(e,t,r){if(t)Rl(e.prototype,t);if(r)Rl(e,r);return Object.defineProperty(e,"prototype",{writable:!1}),e}function Tl(e){var t=Fy(e,"string");return typeof t==="symbol"?t:String(t)}function Fy(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!=="object")return i;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cy=j("buffer"),zn=Cy.Buffer,jy=j("util"),Ss=jy.inspect,Iy=Ss&&Ss.custom||"inspect";function Wy(e,t,r){zn.prototype.copy.call(e,t,r)}Nl.exports=function(){function e(){qy(this,e),this.head=null,this.tail=null,this.length=0}return Yy(e,[{key:"push",value:function(r){var i={data:r,next:null};if(this.length>0)this.tail.next=i;else this.head=i;this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};if(this.length===0)this.tail=i;this.head=i,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var r=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--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"";var i=this.head,a=""+i.data;while(i=i.next)a+=r+i.data;return a}},{key:"concat",value:function(r){if(this.length===0)return zn.alloc(0);var i=zn.allocUnsafe(r>>>0),a=this.head,u=0;while(a)Wy(a.data,i,u),u+=a.data.length,a=a.next;return i}},{key:"consume",value:function(r,i){var a;if(r<this.head.data.length)a=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r);else if(r===this.head.data.length)a=this.shift();else a=i?this._getString(r):this._getBuffer(r);return a}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,a=1,u=i.data;r-=u.length;while(i=i.next){var f=i.data,c=r>f.length?f.length:r;if(c===f.length)u+=f;else u+=f.slice(0,r);if(r-=c,r===0){if(c===f.length)if(++a,i.next)this.head=i.next;else this.head=this.tail=null;else this.head=i,i.data=f.slice(c);break}++a}return this.length-=a,u}},{key:"_getBuffer",value:function(r){var i=zn.allocUnsafe(r),a=this.head,u=1;a.data.copy(i),r-=a.data.length;while(a=a.next){var f=a.data,c=r>f.length?f.length:r;if(f.copy(i,i.length-r,0,c),r-=c,r===0){if(c===f.length)if(++u,a.next)this.head=a.next;else this.head=this.tail=null;else this.head=a,a.data=f.slice(c);break}++u}return this.length-=u,i}},{key:Iy,value:function(r,i){return Ss(this,kl(kl({},i),{},{depth:0,customInspect:!1}))}}]),e}()});var ql=b(function(xs,Al){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Bn=j("buffer"),Je=Bn.Buffer;function Pl(e,t){for(var r in e)t[r]=e[r]}if(Je.from&&Je.alloc&&Je.allocUnsafe&&Je.allocUnsafeSlow)Al.exports=Bn;else Pl(Bn,xs),xs.Buffer=Ft;function Ft(e,t,r){return Je(e,t,r)}Ft.prototype=Object.create(Je.prototype);Pl(Je,Ft);Ft.from=function(e,t,r){if(typeof e==="number")throw TypeError("Argument must not be a number");return Je(e,t,r)};Ft.alloc=function(e,t,r){if(typeof e!=="number")throw TypeError("Argument must be a number");var i=Je(e);if(t!==void 0)if(typeof r==="string")i.fill(t,r);else i.fill(t);else i.fill(0);return i};Ft.allocUnsafe=function(e){if(typeof e!=="number")throw TypeError("Argument must be a number");return Je(e)};Ft.allocUnsafeSlow=function(e){if(typeof e!=="number")throw TypeError("Argument must be a number");return Bn.SlowBuffer(e)}});var Os=b(function(t_){var Es=ql().Buffer,Yl=Es.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function $y(e){if(!e)return"utf8";var t;while(!0)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function Hy(e){var t=$y(e);if(typeof t!=="string"&&(Es.isEncoding===Yl||!Yl(e)))throw Error("Unknown encoding: "+e);return t||e}t_.StringDecoder=Ur;function Ur(e){this.encoding=Hy(e);var t;switch(this.encoding){case"utf16le":this.text=Zy,this.end=Jy,t=4;break;case"utf8":this.fillLast=Vy,t=4;break;case"base64":this.text=Ky,this.end=Qy,t=3;break;default:this.write=Xy,this.end=e_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Es.allocUnsafe(t)}Ur.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;if(r<e.length)return t?t+this.text(e,r):this.text(e,r);return t||""};Ur.prototype.end=By;Ur.prototype.text=zy;Ur.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Ms(e){if(e<=127)return 0;else if(e>>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function Uy(e,t,r){var i=t.length-1;if(i<r)return 0;var a=Ms(t[i]);if(a>=0){if(a>0)e.lastNeed=a-1;return a}if(--i<r||a===-2)return 0;if(a=Ms(t[i]),a>=0){if(a>0)e.lastNeed=a-2;return a}if(--i<r||a===-2)return 0;if(a=Ms(t[i]),a>=0){if(a>0)if(a===2)a=0;else e.lastNeed=a-3;return a}return 0}function Gy(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}}function Vy(e){var t=this.lastTotal-this.lastNeed,r=Gy(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function zy(e,t){var r=Uy(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function By(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"\uFFFD";return t}function Zy(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function Jy(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function Ky(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);if(this.lastNeed=3-r,this.lastTotal=3,r===1)this.lastChar[0]=e[e.length-1];else this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1];return e.toString("base64",t,e.length-r)}function Qy(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function Xy(e){return e.toString(this.encoding)}function e_(e){return e&&e.length?this.write(e):""}});var Zn=b(function(j2,jl){var Fl=vt().codes.ERR_STREAM_PREMATURE_CLOSE;function n_(e){var t=!1;return function(){if(t)return;t=!0;for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];e.apply(this,i)}}function i_(){}function s_(e){return e.setHeader&&typeof e.abort==="function"}function Cl(e,t,r){if(typeof t==="function")return Cl(e,null,t);if(!t)t={};r=n_(r||i_);var i=t.readable||t.readable!==!1&&e.readable,a=t.writable||t.writable!==!1&&e.writable,u=function(){if(!e.writable)c()},f=e._writableState&&e._writableState.finished,c=function(){if(a=!1,f=!0,!i)r.call(e)},d=e._readableState&&e._readableState.endEmitted,g=function(){if(i=!1,d=!0,!a)r.call(e)},v=function(p){r.call(e,p)},_=function(){var p;if(i&&!d){if(!e._readableState||!e._readableState.ended)p=new Fl;return r.call(e,p)}if(a&&!f){if(!e._writableState||!e._writableState.ended)p=new Fl;return r.call(e,p)}},w=function(){e.req.on("finish",c)};if(s_(e))if(e.on("complete",c),e.on("abort",_),e.req)w();else e.on("request",w);else if(a&&!e._writableState)e.on("end",u),e.on("close",u);if(e.on("end",g),e.on("finish",c),t.error!==!1)e.on("error",v);return e.on("close",_),function(){if(e.removeListener("complete",c),e.removeListener("abort",_),e.removeListener("request",w),e.req)e.req.removeListener("finish",c);e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",c),e.removeListener("end",g),e.removeListener("error",v),e.removeListener("close",_)}}jl.exports=Cl});var Wl=b(function(I2,Il){var Jn;function St(e,t,r){if(t=a_(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function a_(e){var t=o_(e,"string");return typeof t==="symbol"?t:String(t)}function o_(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!=="object")return i;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var u_=Zn(),xt=Symbol("lastResolve"),Ct=Symbol("lastReject"),Gr=Symbol("error"),Kn=Symbol("ended"),jt=Symbol("lastPromise"),Ds=Symbol("handlePromise"),It=Symbol("stream");function Mt(e,t){return{value:e,done:t}}function l_(e){var t=e[xt];if(t!==null){var r=e[It].read();if(r!==null)e[jt]=null,e[xt]=null,e[Ct]=null,t(Mt(r,!1))}}function f_(e){process.nextTick(l_,e)}function c_(e,t){return function(r,i){e.then(function(){if(t[Kn]){r(Mt(void 0,!0));return}t[Ds](r,i)},i)}}var h_=Object.getPrototypeOf(function(){}),d_=Object.setPrototypeOf((Jn={get stream(){return this[It]},next:function(){var t=this,r=this[Gr];if(r!==null)return Promise.reject(r);if(this[Kn])return Promise.resolve(Mt(void 0,!0));if(this[It].destroyed)return new Promise(function(f,c){process.nextTick(function(){if(t[Gr])c(t[Gr]);else f(Mt(void 0,!0))})});var i=this[jt],a;if(i)a=new Promise(c_(i,this));else{var u=this[It].read();if(u!==null)return Promise.resolve(Mt(u,!1));a=new Promise(this[Ds])}return this[jt]=a,a}},St(Jn,Symbol.asyncIterator,function(){return this}),St(Jn,"return",function(){var t=this;return new Promise(function(r,i){t[It].destroy(null,function(a){if(a){i(a);return}r(Mt(void 0,!0))})})}),Jn),h_),m_=function(t){var r,i=Object.create(d_,(r={},St(r,It,{value:t,writable:!0}),St(r,xt,{value:null,writable:!0}),St(r,Ct,{value:null,writable:!0}),St(r,Gr,{value:null,writable:!0}),St(r,Kn,{value:t._readableState.endEmitted,writable:!0}),St(r,Ds,{value:function(u,f){var c=i[It].read();if(c)i[jt]=null,i[xt]=null,i[Ct]=null,u(Mt(c,!1));else i[xt]=u,i[Ct]=f},writable:!0}),r));return i[jt]=null,u_(t,function(a){if(a&&a.code!=="ERR_STREAM_PREMATURE_CLOSE"){var u=i[Ct];if(u!==null)i[jt]=null,i[xt]=null,i[Ct]=null,u(a);i[Gr]=a;return}var f=i[xt];if(f!==null)i[jt]=null,i[xt]=null,i[Ct]=null,f(Mt(void 0,!0));i[Kn]=!0}),t.on("readable",f_.bind(null,i)),i};Il.exports=m_});var Gl=b(function(W2,Ul){function $l(e,t,r,i,a,u,f){try{var c=e[u](f),d=c.value}catch(g){r(g);return}if(c.done)t(d);else Promise.resolve(d).then(i,a)}function g_(e){return function(){var t=this,r=arguments;return new Promise(function(i,a){var u=e.apply(t,r);function f(d){$l(u,i,a,f,c,"next",d)}function c(d){$l(u,i,a,f,c,"throw",d)}f(void 0)})}}function Hl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function p_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hl(Object(r),!0).forEach(function(i){y_(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hl(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function y_(e,t,r){if(t=__(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function __(e){var t=w_(e,"string");return typeof t==="symbol"?t:String(t)}function w_(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!=="object")return i;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var b_=vt().codes.ERR_INVALID_ARG_TYPE;function v_(e,t,r){var i;if(t&&typeof t.next==="function")i=t;else if(t&&t[Symbol.asyncIterator])i=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])i=t[Symbol.iterator]();else throw new b_("iterable",["Iterable"],t);var a=new e(p_({objectMode:!0},r)),u=!1;a._read=function(){if(!u)u=!0,f()};function f(){return c.apply(this,arguments)}function c(){return c=g_(function*(){try{var d=yield i.next(),{value:g,done:v}=d;if(v)a.push(null);else if(a.push(yield g))f();else u=!1}catch(_){a.destroy(_)}}),c.apply(this,arguments)}return a}Ul.exports=v_});var Fs=b(function(H2,tf){tf.exports=Q;var gr;Q.ReadableState=Zl;var $2=j("events").EventEmitter,Bl=function(t,r){return t.listeners(r).length},zr=j("stream"),Qn=j("buffer").Buffer,S_=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function x_(e){return Qn.from(e)}function M_(e){return Qn.isBuffer(e)||e instanceof S_}var ks=j("util"),U;if(ks&&ks.debuglog)U=ks.debuglog("stream");else U=function(){};var E_=Ll(),qs=_s(),O_=ws(),D_=O_.getHighWaterMark,Xn=vt().codes,{ERR_INVALID_ARG_TYPE:k_,ERR_STREAM_PUSH_AFTER_EOF:R_,ERR_METHOD_NOT_IMPLEMENTED:T_,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:N_}=Xn,pr,Rs,Ts;mr()(Q,zr);var Vr=qs.errorOrDestroy,Ns=["error","close","destroy","pause","resume"];function L_(e,t,r){if(typeof e.prependListener==="function")return e.prependListener(t,r);if(!e._events||!e._events[t])e.on(t,r);else if(Array.isArray(e._events[t]))e._events[t].unshift(r);else e._events[t]=[r,e._events[t]]}function Zl(e,t,r){if(gr=gr||Wt(),e=e||{},typeof r!=="boolean")r=t instanceof gr;if(this.objectMode=!!e.objectMode,r)this.objectMode=this.objectMode||!!e.readableObjectMode;if(this.highWaterMark=D_(this,e,"readableHighWaterMark",r),this.buffer=new E_,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=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding){if(!pr)pr=Os().StringDecoder;this.decoder=new pr(e.encoding),this.encoding=e.encoding}}function Q(e){if(gr=gr||Wt(),!(this instanceof Q))return new Q(e);var t=this instanceof gr;if(this._readableState=new Zl(e,this,t),this.readable=!0,e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}zr.call(this)}Object.defineProperty(Q.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(t){if(!this._readableState)return;this._readableState.destroyed=t}});Q.prototype.destroy=qs.destroy;Q.prototype._undestroy=qs.undestroy;Q.prototype._destroy=function(e,t){t(e)};Q.prototype.push=function(e,t){var r=this._readableState,i;if(!r.objectMode){if(typeof e==="string"){if(t=t||r.defaultEncoding,t!==r.encoding)e=Qn.from(e,t),t="";i=!0}}else i=!0;return Jl(this,e,t,!1,i)};Q.prototype.unshift=function(e){return Jl(this,e,null,!0,!1)};function Jl(e,t,r,i,a){U("readableAddChunk",t);var u=e._readableState;if(t===null)u.reading=!1,q_(e,u);else{var f;if(!a)f=P_(u,t);if(f)Vr(e,f);else if(u.objectMode||t&&t.length>0){if(typeof t!=="string"&&!u.objectMode&&Object.getPrototypeOf(t)!==Qn.prototype)t=x_(t);if(i)if(u.endEmitted)Vr(e,new N_);else Ls(e,u,t,!0);else if(u.ended)Vr(e,new R_);else if(u.destroyed)return!1;else if(u.reading=!1,u.decoder&&!r)if(t=u.decoder.write(t),u.objectMode||t.length!==0)Ls(e,u,t,!1);else As(e,u);else Ls(e,u,t,!1)}else if(!i)u.reading=!1,As(e,u)}return!u.ended&&(u.length<u.highWaterMark||u.length===0)}function Ls(e,t,r,i){if(t.flowing&&t.length===0&&!t.sync)t.awaitDrain=0,e.emit("data",r);else{if(t.length+=t.objectMode?1:r.length,i)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)ei(e)}As(e,t)}function P_(e,t){var r;if(!M_(t)&&typeof t!=="string"&&t!==void 0&&!e.objectMode)r=new k_("chunk",["string","Buffer","Uint8Array"],t);return r}Q.prototype.isPaused=function(){return this._readableState.flowing===!1};Q.prototype.setEncoding=function(e){if(!pr)pr=Os().StringDecoder;var t=new pr(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;var r=this._readableState.buffer.head,i="";while(r!==null)i+=t.write(r.data),r=r.next;if(this._readableState.buffer.clear(),i!=="")this._readableState.buffer.push(i);return this._readableState.length=i.length,this};var Vl=1073741824;function A_(e){if(e>=Vl)e=Vl;else e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++;return e}function zl(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e)if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length;if(e>t.highWaterMark)t.highWaterMark=A_(e);if(e<=t.length)return e;if(!t.ended)return t.needReadable=!0,0;return t.length}Q.prototype.read=function(e){U("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0)t.emittedReadable=!1;if(e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended)){if(U("read: emitReadable",t.length,t.ended),t.length===0&&t.ended)Ps(this);else ei(this);return null}if(e=zl(e,t),e===0&&t.ended){if(t.length===0)Ps(this);return null}var i=t.needReadable;if(U("need readable",i),t.length===0||t.length-e<t.highWaterMark)i=!0,U("length less than watermark",i);if(t.ended||t.reading)i=!1,U("reading or ended",i);else if(i){if(U("do read"),t.reading=!0,t.sync=!0,t.length===0)t.needReadable=!0;if(this._read(t.highWaterMark),t.sync=!1,!t.reading)e=zl(r,t)}var a;if(e>0)a=Xl(e,t);else a=null;if(a===null)t.needReadable=t.length<=t.highWaterMark,e=0;else t.length-=e,t.awaitDrain=0;if(t.length===0){if(!t.ended)t.needReadable=!0;if(r!==e&&t.ended)Ps(this)}if(a!==null)this.emit("data",a);return a};function q_(e,t){if(U("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length)t.buffer.push(r),t.length+=t.objectMode?1:r.length}if(t.ended=!0,t.sync)ei(e);else if(t.needReadable=!1,!t.emittedReadable)t.emittedReadable=!0,Kl(e)}function ei(e){var t=e._readableState;if(U("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,!t.emittedReadable)U("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(Kl,e)}function Kl(e){var t=e._readableState;if(U("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended))e.emit("readable"),t.emittedReadable=!1;t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Ys(e)}function As(e,t){if(!t.readingMore)t.readingMore=!0,process.nextTick(Y_,e,t)}function Y_(e,t){while(!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0)){var r=t.length;if(U("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}Q.prototype._read=function(e){Vr(this,new T_("_read()"))};Q.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,U("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,u=a?c:M;if(i.endEmitted)process.nextTick(u);else r.once("end",u);e.on("unpipe",f);function f(P,A){if(U("onunpipe"),P===r){if(A&&A.hasUnpiped===!1)A.hasUnpiped=!0,v()}}function c(){U("onend"),e.end()}var d=F_(r);e.on("drain",d);var g=!1;function v(){if(U("cleanup"),e.removeListener("close",E),e.removeListener("finish",p),e.removeListener("drain",d),e.removeListener("error",w),e.removeListener("unpipe",f),r.removeListener("end",c),r.removeListener("end",M),r.removeListener("data",_),g=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain))d()}r.on("data",_);function _(P){U("ondata");var A=e.write(P);if(U("dest.write",A),A===!1){if((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&ef(i.pipes,e)!==-1)&&!g)U("false write response, pause",i.awaitDrain),i.awaitDrain++;r.pause()}}function w(P){if(U("onerror",P),M(),e.removeListener("error",w),Bl(e,"error")===0)Vr(e,P)}L_(e,"error",w);function E(){e.removeListener("finish",p),M()}e.once("close",E);function p(){U("onfinish"),e.removeListener("close",E),M()}e.once("finish",p);function M(){U("unpipe"),r.unpipe(e)}if(e.emit("pipe",r),!i.flowing)U("pipe resume"),r.resume();return e};function F_(e){return function(){var r=e._readableState;if(U("pipeOnDrain",r.awaitDrain),r.awaitDrain)r.awaitDrain--;if(r.awaitDrain===0&&Bl(e,"data"))r.flowing=!0,Ys(e)}}Q.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;if(t.pipes=null,t.pipesCount=0,t.flowing=!1,e)e.emit("unpipe",this,r);return this}if(!e){var{pipes:i,pipesCount:a}=t;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var u=0;u<a;u++)i[u].emit("unpipe",this,{hasUnpiped:!1});return this}var f=ef(t.pipes,e);if(f===-1)return this;if(t.pipes.splice(f,1),t.pipesCount-=1,t.pipesCount===1)t.pipes=t.pipes[0];return e.emit("unpipe",this,r),this};Q.prototype.on=function(e,t){var r=zr.prototype.on.call(this,e,t),i=this._readableState;if(e==="data"){if(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1)this.resume()}else if(e==="readable"){if(!i.endEmitted&&!i.readableListening){if(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,U("on readable",i.length,i.reading),i.length)ei(this);else if(!i.reading)process.nextTick(C_,this)}}return r};Q.prototype.addListener=Q.prototype.on;Q.prototype.removeListener=function(e,t){var r=zr.prototype.removeListener.call(this,e,t);if(e==="readable")process.nextTick(Ql,this);return r};Q.prototype.removeAllListeners=function(e){var t=zr.prototype.removeAllListeners.apply(this,arguments);if(e==="readable"||e===void 0)process.nextTick(Ql,this);return t};function Ql(e){var t=e._readableState;if(t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused)t.flowing=!0;else if(e.listenerCount("data")>0)e.resume()}function C_(e){U("readable nexttick read 0"),e.read(0)}Q.prototype.resume=function(){var e=this._readableState;if(!e.flowing)U("resume"),e.flowing=!e.readableListening,j_(this,e);return e.paused=!1,this};function j_(e,t){if(!t.resumeScheduled)t.resumeScheduled=!0,process.nextTick(I_,e,t)}function I_(e,t){if(U("resume",t.reading),!t.reading)e.read(0);if(t.resumeScheduled=!1,e.emit("resume"),Ys(e),t.flowing&&!t.reading)e.read(0)}Q.prototype.pause=function(){if(U("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)U("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function Ys(e){var t=e._readableState;U("flow",t.flowing);while(t.flowing&&e.read()!==null);}Q.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(U("wrapped end"),r.decoder&&!r.ended){var f=r.decoder.end();if(f&&f.length)t.push(f)}t.push(null)}),e.on("data",function(f){if(U("wrapped data"),r.decoder)f=r.decoder.write(f);if(r.objectMode&&(f===null||f===void 0))return;else if(!r.objectMode&&(!f||!f.length))return;var c=t.push(f);if(!c)i=!0,e.pause()});for(var a in e)if(this[a]===void 0&&typeof e[a]==="function")this[a]=function(c){return function(){return e[c].apply(e,arguments)}}(a);for(var u=0;u<Ns.length;u++)e.on(Ns[u],this.emit.bind(this,Ns[u]));return this._read=function(f){if(U("wrapped _read",f),i)i=!1,e.resume()},this};if(typeof Symbol==="function")Q.prototype[Symbol.asyncIterator]=function(){if(Rs===void 0)Rs=Wl();return Rs(this)};Object.defineProperty(Q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Q.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Q.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){if(this._readableState)this._readableState.flowing=t}});Q._fromList=Xl;Object.defineProperty(Q.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Xl(e,t){if(t.length===0)return null;var r;if(t.objectMode)r=t.buffer.shift();else if(!e||e>=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.first();else r=t.buffer.concat(t.length);t.buffer.clear()}else r=t.buffer.consume(e,t.decoder);return r}function Ps(e){var t=e._readableState;if(U("endReadable",t.endEmitted),!t.endEmitted)t.ended=!0,process.nextTick(W_,t,e)}function W_(e,t){if(U("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0){if(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy){var r=t._writableState;if(!r||r.autoDestroy&&r.finished)t.destroy()}}}if(typeof Symbol==="function")Q.from=function(e,t){if(Ts===void 0)Ts=Gl();return Ts(Q,e,t)};function ef(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var Wt=b(function(U2,nf){var $_=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};nf.exports=Ke;var rf=Fs(),Cs=ri();mr()(Ke,rf);{ti=$_(Cs.prototype);for(Br=0;Br<ti.length;Br++)if(Zr=ti[Br],!Ke.prototype[Zr])Ke.prototype[Zr]=Cs.prototype[Zr]}var ti,Zr,Br;function Ke(e){if(!(this instanceof Ke))return new Ke(e);if(rf.call(this,e),Cs.call(this,e),this.allowHalfOpen=!0,e){if(e.readable===!1)this.readable=!1;if(e.writable===!1)this.writable=!1;if(e.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",H_)}}Object.defineProperty(Ke.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ke.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ke.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function H_(){if(this._writableState.ended)return;process.nextTick(U_,this)}function U_(e){e.end()}Object.defineProperty(Ke.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(t){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=t,this._writableState.destroyed=t}})});var ri=b(function(G2,ff){ff.exports=ae;function af(e){var t=this;this.next=null,this.entry=null,this.finish=function(){y1(t,e)}}var yr;ae.WritableState=Kr;var G_={deprecate:wl()},of=j("stream"),ii=j("buffer").Buffer,V_=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function z_(e){return ii.from(e)}function B_(e){return ii.isBuffer(e)||e instanceof V_}var Is=_s(),Z_=ws(),J_=Z_.getHighWaterMark,Et=vt().codes,{ERR_INVALID_ARG_TYPE:K_,ERR_METHOD_NOT_IMPLEMENTED:Q_,ERR_MULTIPLE_CALLBACK:X_,ERR_STREAM_CANNOT_PIPE:e1,ERR_STREAM_DESTROYED:t1,ERR_STREAM_NULL_VALUES:r1,ERR_STREAM_WRITE_AFTER_END:n1,ERR_UNKNOWN_ENCODING:i1}=Et,_r=Is.errorOrDestroy;mr()(ae,of);function s1(){}function Kr(e,t,r){if(yr=yr||Wt(),e=e||{},typeof r!=="boolean")r=t instanceof yr;if(this.objectMode=!!e.objectMode,r)this.objectMode=this.objectMode||!!e.writableObjectMode;this.highWaterMark=J_(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){h1(t,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new af(this)}Kr.prototype.getBuffer=function(){var t=this.bufferedRequest,r=[];while(t)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Kr.prototype,"buffer",{get:G_.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var ni;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")ni=Function.prototype[Symbol.hasInstance],Object.defineProperty(ae,Symbol.hasInstance,{value:function(t){if(ni.call(this,t))return!0;if(this!==ae)return!1;return t&&t._writableState instanceof Kr}});else ni=function(t){return t instanceof this};function ae(e){yr=yr||Wt();var t=this instanceof yr;if(!t&&!ni.call(ae,this))return new ae(e);if(this._writableState=new Kr(e,this,t),this.writable=!0,e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}of.call(this)}ae.prototype.pipe=function(){_r(this,new e1)};function a1(e,t){var r=new n1;_r(e,r),process.nextTick(t,r)}function o1(e,t,r,i){var a;if(r===null)a=new r1;else if(typeof r!=="string"&&!t.objectMode)a=new K_("chunk",["string","Buffer"],r);if(a)return _r(e,a),process.nextTick(i,a),!1;return!0}ae.prototype.write=function(e,t,r){var i=this._writableState,a=!1,u=!i.objectMode&&B_(e);if(u&&!ii.isBuffer(e))e=z_(e);if(typeof t==="function")r=t,t=null;if(u)t="buffer";else if(!t)t=i.defaultEncoding;if(typeof r!=="function")r=s1;if(i.ending)a1(this,r);else if(u||o1(this,i,e,r))i.pendingcb++,a=l1(this,i,u,e,t,r);return a};ae.prototype.cork=function(){this._writableState.corked++};ae.prototype.uncork=function(){var e=this._writableState;if(e.corked){if(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest)uf(this,e)}};ae.prototype.setDefaultEncoding=function(t){if(typeof t==="string")t=t.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new i1(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(ae.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function u1(e,t,r){if(!e.objectMode&&e.decodeStrings!==!1&&typeof t==="string")t=ii.from(t,r);return t}Object.defineProperty(ae.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function l1(e,t,r,i,a,u){if(!r){var f=u1(t,i,a);if(i!==f)r=!0,a="buffer",i=f}var c=t.objectMode?1:i.length;t.length+=c;var d=t.length<t.highWaterMark;if(!d)t.needDrain=!0;if(t.writing||t.corked){var g=t.lastBufferedRequest;if(t.lastBufferedRequest={chunk:i,encoding:a,isBuf:r,callback:u,next:null},g)g.next=t.lastBufferedRequest;else t.bufferedRequest=t.lastBufferedRequest;t.bufferedRequestCount+=1}else js(e,t,!1,c,i,a,u);return d}function js(e,t,r,i,a,u,f){if(t.writelen=i,t.writecb=f,t.writing=!0,t.sync=!0,t.destroyed)t.onwrite(new t1("write"));else if(r)e._writev(a,t.onwrite);else e._write(a,u,t.onwrite);t.sync=!1}function f1(e,t,r,i,a){if(--t.pendingcb,r)process.nextTick(a,i),process.nextTick(Jr,e,t),e._writableState.errorEmitted=!0,_r(e,i);else a(i),e._writableState.errorEmitted=!0,_r(e,i),Jr(e,t)}function c1(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function h1(e,t){var r=e._writableState,{sync:i,writecb:a}=r;if(typeof a!=="function")throw new X_;if(c1(r),t)f1(e,r,i,t,a);else{var u=lf(r)||e.destroyed;if(!u&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest)uf(e,r);if(i)process.nextTick(sf,e,r,u,a);else sf(e,r,u,a)}}function sf(e,t,r,i){if(!r)d1(e,t);t.pendingcb--,i(),Jr(e,t)}function d1(e,t){if(t.length===0&&t.needDrain)t.needDrain=!1,e.emit("drain")}function uf(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,a=Array(i),u=t.corkedRequestsFree;u.entry=r;var f=0,c=!0;while(r){if(a[f]=r,!r.isBuf)c=!1;r=r.next,f+=1}if(a.allBuffers=c,js(e,t,!0,t.length,a,"",u.finish),t.pendingcb++,t.lastBufferedRequest=null,u.next)t.corkedRequestsFree=u.next,u.next=null;else t.corkedRequestsFree=new af(t);t.bufferedRequestCount=0}else{while(r){var d=r.chunk,g=r.encoding,v=r.callback,_=t.objectMode?1:d.length;if(js(e,t,!1,_,d,g,v),r=r.next,t.bufferedRequestCount--,t.writing)break}if(r===null)t.lastBufferedRequest=null}t.bufferedRequest=r,t.bufferProcessing=!1}ae.prototype._write=function(e,t,r){r(new Q_("_write()"))};ae.prototype._writev=null;ae.prototype.end=function(e,t,r){var i=this._writableState;if(typeof e==="function")r=e,e=null,t=null;else if(typeof t==="function")r=t,t=null;if(e!==null&&e!==void 0)this.write(e,t);if(i.corked)i.corked=1,this.uncork();if(!i.ending)p1(this,i,r);return this};Object.defineProperty(ae.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function lf(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function m1(e,t){e._final(function(r){if(t.pendingcb--,r)_r(e,r);t.prefinished=!0,e.emit("prefinish"),Jr(e,t)})}function g1(e,t){if(!t.prefinished&&!t.finalCalled)if(typeof e._final==="function"&&!t.destroyed)t.pendingcb++,t.finalCalled=!0,process.nextTick(m1,e,t);else t.prefinished=!0,e.emit("prefinish")}function Jr(e,t){var r=lf(t);if(r){if(g1(e,t),t.pendingcb===0){if(t.finished=!0,e.emit("finish"),t.autoDestroy){var i=e._readableState;if(!i||i.autoDestroy&&i.endEmitted)e.destroy()}}}return r}function p1(e,t,r){if(t.ending=!0,Jr(e,t),r)if(t.finished)process.nextTick(r);else e.once("finish",r);t.ended=!0,e.writable=!1}function y1(e,t,r){var i=e.entry;e.entry=null;while(i){var a=i.callback;t.pendingcb--,a(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(ae.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(t){if(!this._writableState)return;this._writableState.destroyed=t}});ae.prototype.destroy=Is.destroy;ae.prototype._undestroy=Is.undestroy;ae.prototype._destroy=function(e,t){t(e)}});var $s=b(function(V2,df){var cf=j("util"),Ws=ri(),{LEVEL:hf}=le(),Qr=df.exports=function(t={}){if(Ws.call(this,{objectMode:!0,highWaterMark:t.highWaterMark}),this.format=t.format,this.level=t.level,this.handleExceptions=t.handleExceptions,this.handleRejections=t.handleRejections,this.silent=t.silent,t.log)this.log=t.log;if(t.logv)this.logv=t.logv;if(t.close)this.close=t.close;this.once("pipe",(r)=>{this.levels=r.levels,this.parent=r}),this.once("unpipe",(r)=>{if(r===this.parent){if(this.parent=null,this.close)this.close()}})};cf.inherits(Qr,Ws);Qr.prototype._write=function(t,r,i){if(this.silent||t.exception===!0&&!this.handleExceptions)return i(null);let a=this.level||this.parent&&this.parent.level;if(!a||this.levels[a]>=this.levels[t[hf]]){if(t&&!this.format)return this.log(t,i);let u,f;try{f=this.format.transform(Object.assign({},t),this.format.options)}catch(c){u=c}if(u||!f){if(i(),u)throw u;return}return this.log(f,i)}return this._writableState.sync=!1,i(null)};Qr.prototype._writev=function(t,r){if(this.logv){let i=t.filter(this._accept,this);if(!i.length)return r(null);return this.logv(i,r)}for(let i=0;i<t.length;i++){if(!this._accept(t[i]))continue;if(t[i].chunk&&!this.format){this.log(t[i].chunk,t[i].callback);continue}let a,u;try{u=this.format.transform(Object.assign({},t[i].chunk),this.format.options)}catch(f){a=f}if(a||!u){if(t[i].callback(),a)throw r(null),a}else this.log(u,t[i].callback)}return r(null)};Qr.prototype._accept=function(t){let r=t.chunk;if(this.silent)return!1;let i=this.level||this.parent&&this.parent.level;if(r.exception===!0||!i||this.levels[i]>=this.levels[r[hf]]){if(this.handleExceptions||r.exception!==!0)return!0}return!1};Qr.prototype._nop=function(){return}});var Gs=b(function(z2,gf){var mf=j("util"),{LEVEL:Hs}=le(),Us=$s(),Xr=gf.exports=function(t={}){if(Us.call(this,t),!t.transport||typeof t.transport.log!=="function")throw Error("Invalid transport, must be an object with a log method.");this.transport=t.transport,this.level=this.level||t.transport.level,this.handleExceptions=this.handleExceptions||t.transport.handleExceptions,this._deprecated();function r(i){this.emit("error",i,this.transport)}if(!this.transport.__winstonError)this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError)};mf.inherits(Xr,Us);Xr.prototype._write=function(t,r,i){if(this.silent||t.exception===!0&&!this.handleExceptions)return i(null);if(!this.level||this.levels[this.level]>=this.levels[t[Hs]])this.transport.log(t[Hs],t.message,t,this._nop);i(null)};Xr.prototype._writev=function(t,r){for(let i=0;i<t.length;i++)if(this._accept(t[i]))this.transport.log(t[i].chunk[Hs],t[i].chunk.message,t[i].chunk,this._nop),t[i].callback();return r(null)};Xr.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
|
+
`))};Xr.prototype.close=function(){if(this.transport.close)this.transport.close();if(this.transport.__winstonError)this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null}});var $t=b(function(B2,Vs){Vs.exports=$s();Vs.exports.LegacyTransportStream=Gs()});var wf=b(function(Z2,_f){var yf=j("os"),{LEVEL:pf,MESSAGE:wr}=le(),_1=$t();_f.exports=class extends _1{constructor(t={}){super(t);this.name=t.name||"console",this.stderrLevels=this._stringArrayToSet(t.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(t.consoleWarnLevels),this.eol=typeof t.eol==="string"?t.eol:yf.EOL,this.forceConsole=t.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(t,r){if(setImmediate(()=>this.emit("logged",t)),this.stderrLevels[t[pf]]){if(console._stderr&&!this.forceConsole)console._stderr.write(`${t[wr]}${this.eol}`);else this._consoleError(t[wr]);if(r)r();return}else if(this.consoleWarnLevels[t[pf]]){if(console._stderr&&!this.forceConsole)console._stderr.write(`${t[wr]}${this.eol}`);else this._consoleWarn(t[wr]);if(r)r();return}if(console._stdout&&!this.forceConsole)console._stdout.write(`${t[wr]}${this.eol}`);else this._consoleLog(t[wr]);if(r)r()}_stringArrayToSet(t,r){if(!t)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(t))throw Error(r);return t.reduce((i,a)=>{if(typeof a!=="string")throw Error(r);return i[a]=!0,i},{})}}});var si=b(function(zs,bf){Object.defineProperty(zs,"__esModule",{value:!0});zs.default=w1;function w1(e){return e&&typeof e.length==="number"&&e.length>=0&&e.length%1===0}bf.exports=zs.default});var Sf=b(function(Bs,vf){Object.defineProperty(Bs,"__esModule",{value:!0});Bs.default=function(e){return function(...t){var r=t.pop();return e.call(this,t,r)}};vf.exports=Bs.default});var Of=b(function(Ef){Object.defineProperty(Ef,"__esModule",{value:!0});Ef.fallback=xf;Ef.wrap=Mf;var S1=Ef.hasQueueMicrotask=typeof queueMicrotask==="function"&&queueMicrotask,x1=Ef.hasSetImmediate=typeof setImmediate==="function"&&setImmediate,M1=Ef.hasNextTick=typeof process==="object"&&typeof process.nextTick==="function";function xf(e){setTimeout(e,0)}function Mf(e){return(t,...r)=>e(()=>t(...r))}var en;if(S1)en=queueMicrotask;else if(x1)en=setImmediate;else if(M1)en=process.nextTick;else en=xf;Ef.default=Mf(en)});var Nf=b(function(Zs,Tf){Object.defineProperty(Zs,"__esModule",{value:!0});Zs.default=P1;var k1=Sf(),R1=Rf(k1),T1=Of(),N1=Rf(T1),L1=Ht();function Rf(e){return e&&e.__esModule?e:{default:e}}function P1(e){if((0,L1.isAsync)(e))return function(...t){let r=t.pop(),i=e.apply(this,t);return Df(i,r)};return(0,R1.default)(function(t,r){var i;try{i=e.apply(this,t)}catch(a){return r(a)}if(i&&typeof i.then==="function")return Df(i,r);else r(null,i)})}function Df(e,t){return e.then((r)=>{kf(t,null,r)},(r)=>{kf(t,r&&(r instanceof Error||r.message)?r:Error(r))})}function kf(e,t,r){try{e(t,r)}catch(i){(0,N1.default)((a)=>{throw a},i)}}Tf.exports=Zs.default});var Ht=b(function(Pf){Object.defineProperty(Pf,"__esModule",{value:!0});Pf.isAsyncIterable=Pf.isAsyncGenerator=Pf.isAsync=void 0;var q1=Nf(),Y1=F1(q1);function F1(e){return e&&e.__esModule?e:{default:e}}function Lf(e){return e[Symbol.toStringTag]==="AsyncFunction"}function C1(e){return e[Symbol.toStringTag]==="AsyncGenerator"}function j1(e){return typeof e[Symbol.asyncIterator]==="function"}function I1(e){if(typeof e!=="function")throw Error("expected a function");return Lf(e)?(0,Y1.default)(e):e}Pf.default=I1;Pf.isAsync=Lf;Pf.isAsyncGenerator=C1;Pf.isAsyncIterable=j1});var br=b(function(Js,qf){Object.defineProperty(Js,"__esModule",{value:!0});Js.default=U1;function U1(e,t){if(!t)t=e.length;if(!t)throw Error("arity is undefined");function r(...i){if(typeof i[t-1]==="function")return e.apply(this,i);return new Promise((a,u)=>{i[t-1]=(f,...c)=>{if(f)return u(f);a(c.length>1?c:c[0])},e.apply(this,i)})}return r}qf.exports=Js.default});var Ff=b(function(Qs,Yf){Object.defineProperty(Qs,"__esModule",{value:!0});var V1=si(),z1=Ks(V1),B1=Ht(),Z1=Ks(B1),J1=br(),K1=Ks(J1);function Ks(e){return e&&e.__esModule?e:{default:e}}Qs.default=(0,K1.default)((e,t,r)=>{var i=(0,z1.default)(t)?[]:{};e(t,(a,u,f)=>{(0,Z1.default)(a)((c,...d)=>{if(d.length<2)[d]=d;i[u]=d,f(c)})},(a)=>r(a,i))},3);Yf.exports=Qs.default});var ea=b(function(Xs,Cf){Object.defineProperty(Xs,"__esModule",{value:!0});Xs.default=X1;function X1(e){function t(...r){if(e===null)return;var i=e;e=null,i.apply(this,r)}return Object.assign(t,e),t}Cf.exports=Xs.default});var If=b(function(ta,jf){Object.defineProperty(ta,"__esModule",{value:!0});ta.default=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()};jf.exports=ta.default});var Hf=b(function(ra,$f){Object.defineProperty(ra,"__esModule",{value:!0});ra.default=lw;var rw=si(),nw=Wf(rw),iw=If(),sw=Wf(iw);function Wf(e){return e&&e.__esModule?e:{default:e}}function aw(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}function ow(e){var t=-1;return function(){var i=e.next();if(i.done)return null;return t++,{value:i.value,key:t}}}function uw(e){var t=e?Object.keys(e):[],r=-1,i=t.length;return function a(){var u=t[++r];if(u==="__proto__")return a();return r<i?{value:e[u],key:u}:null}}function lw(e){if((0,nw.default)(e))return aw(e);var t=(0,sw.default)(e);return t?ow(t):uw(e)}$f.exports=ra.default});var ia=b(function(na,Uf){Object.defineProperty(na,"__esModule",{value:!0});na.default=cw;function cw(e){return function(...t){if(e===null)throw Error("Callback was already called.");var r=e;e=null,r.apply(this,t)}}Uf.exports=na.default});var ai=b(function(sa,Gf){Object.defineProperty(sa,"__esModule",{value:!0});var dw={};sa.default=dw;Gf.exports=sa.default});var zf=b(function(aa,Vf){Object.defineProperty(aa,"__esModule",{value:!0});aa.default=_w;var gw=ai(),pw=yw(gw);function yw(e){return e&&e.__esModule?e:{default:e}}function _w(e,t,r,i){let a=!1,u=!1,f=!1,c=0,d=0;function g(){if(c>=t||f||a)return;f=!0,e.next().then(({value:w,done:E})=>{if(u||a)return;if(f=!1,E){if(a=!0,c<=0)i(null);return}c++,r(w,d,v),d++,g()}).catch(_)}function v(w,E){if(c-=1,u)return;if(w)return _(w);if(w===!1){a=!0,u=!0;return}if(E===pw.default||a&&c<=0)return a=!0,i(null);g()}function _(w){if(u)return;f=!1,a=!0,i(w)}g()}Vf.exports=aa.default});var Kf=b(function(oa,Jf){Object.defineProperty(oa,"__esModule",{value:!0});var bw=ea(),vw=tn(bw),Sw=Hf(),xw=tn(Sw),Mw=ia(),Ew=tn(Mw),Bf=Ht(),Ow=zf(),Zf=tn(Ow),Dw=ai(),kw=tn(Dw);function tn(e){return e&&e.__esModule?e:{default:e}}oa.default=(e)=>(t,r,i)=>{if(i=(0,vw.default)(i),e<=0)throw RangeError("concurrency limit cannot be less than 1");if(!t)return i(null);if((0,Bf.isAsyncGenerator)(t))return(0,Zf.default)(t,e,r,i);if((0,Bf.isAsyncIterable)(t))return(0,Zf.default)(t[Symbol.asyncIterator](),e,r,i);var a=(0,xw.default)(t),u=!1,f=!1,c=0,d=!1;function g(_,w){if(f)return;if(c-=1,_)u=!0,i(_);else if(_===!1)u=!0,f=!0;else if(w===kw.default||u&&c<=0)return u=!0,i(null);else if(!d)v()}function v(){d=!0;while(c<e&&!u){var _=a();if(_===null){if(u=!0,c<=0)i(null);return}c+=1,r(_.value,_.key,(0,Ew.default)(g))}d=!1}v()};Jf.exports=oa.default});var fa=b(function(la,Qf){Object.defineProperty(la,"__esModule",{value:!0});var Tw=Kf(),Nw=ua(Tw),Lw=Ht(),Pw=ua(Lw),Aw=br(),qw=ua(Aw);function ua(e){return e&&e.__esModule?e:{default:e}}function Yw(e,t,r,i){return(0,Nw.default)(t)(e,(0,Pw.default)(r),i)}la.default=(0,qw.default)(Yw,4);Qf.exports=la.default});var tc=b(function(ca,ec){Object.defineProperty(ca,"__esModule",{value:!0});var Cw=fa(),jw=Xf(Cw),Iw=br(),Ww=Xf(Iw);function Xf(e){return e&&e.__esModule?e:{default:e}}function $w(e,t,r){return(0,jw.default)(e,1,t,r)}ca.default=(0,Ww.default)($w,3);ec.exports=ca.default});var ic=b(function(ha,nc){Object.defineProperty(ha,"__esModule",{value:!0});ha.default=Bw;var Uw=Ff(),Gw=rc(Uw),Vw=tc(),zw=rc(Vw);function rc(e){return e&&e.__esModule?e:{default:e}}function Bw(e,t){return(0,Gw.default)(zw.default,e,t)}nc.exports=ha.default});var da=b(function(tx,ac){ac.exports=dt;var oi=vt().codes,{ERR_METHOD_NOT_IMPLEMENTED:Jw,ERR_MULTIPLE_CALLBACK:Kw,ERR_TRANSFORM_ALREADY_TRANSFORMING:Qw,ERR_TRANSFORM_WITH_LENGTH_0:Xw}=oi,ui=Wt();mr()(dt,ui);function eb(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new Kw);if(r.writechunk=null,r.writecb=null,t!=null)this.push(t);i(e);var a=this._readableState;if(a.reading=!1,a.needReadable||a.length<a.highWaterMark)this._read(a.highWaterMark)}function dt(e){if(!(this instanceof dt))return new dt(e);if(ui.call(this,e),this._transformState={afterTransform:eb.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e){if(typeof e.transform==="function")this._transform=e.transform;if(typeof e.flush==="function")this._flush=e.flush}this.on("prefinish",tb)}function tb(){var e=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(t,r){sc(e,t,r)});else sc(this,null,null)}dt.prototype.push=function(e,t){return this._transformState.needTransform=!1,ui.prototype.push.call(this,e,t)};dt.prototype._transform=function(e,t,r){r(new Jw("_transform()"))};dt.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var a=this._readableState;if(i.needTransform||a.needReadable||a.length<a.highWaterMark)this._read(a.highWaterMark)}};dt.prototype._read=function(e){var t=this._transformState;if(t.writechunk!==null&&!t.transforming)t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform);else t.needTransform=!0};dt.prototype._destroy=function(e,t){ui.prototype._destroy.call(this,e,function(r){t(r)})};function sc(e,t,r){if(t)return e.emit("error",t);if(r!=null)e.push(r);if(e._writableState.length)throw new Xw;if(e._transformState.transforming)throw new Qw;return e.push(null)}});var lc=b(function(rx,uc){uc.exports=rn;var oc=da();mr()(rn,oc);function rn(e){if(!(this instanceof rn))return new rn(e);oc.call(this,e)}rn.prototype._transform=function(e,t,r){r(null,e)}});var mc=b(function(nx,dc){var ma;function rb(e){var t=!1;return function(){if(t)return;t=!0,e.apply(void 0,arguments)}}var hc=vt().codes,{ERR_MISSING_ARGS:nb,ERR_STREAM_DESTROYED:ib}=hc;function fc(e){if(e)throw e}function sb(e){return e.setHeader&&typeof e.abort==="function"}function ab(e,t,r,i){i=rb(i);var a=!1;if(e.on("close",function(){a=!0}),ma===void 0)ma=Zn();ma(e,{readable:t,writable:r},function(f){if(f)return i(f);a=!0,i()});var u=!1;return function(f){if(a)return;if(u)return;if(u=!0,sb(e))return e.abort();if(typeof e.destroy==="function")return e.destroy();i(f||new ib("pipe"))}}function cc(e){e()}function ob(e,t){return e.pipe(t)}function ub(e){if(!e.length)return fc;if(typeof e[e.length-1]!=="function")return fc;return e.pop()}function lb(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=ub(t);if(Array.isArray(t[0]))t=t[0];if(t.length<2)throw new nb("streams");var a,u=t.map(function(f,c){var d=c<t.length-1,g=c>0;return ab(f,d,g,function(v){if(!a)a=v;if(v)u.forEach(cc);if(d)return;u.forEach(cc),i(a)})});return t.reduce(ob)}dc.exports=lb});var Ut=b(function(Fe,sn){var nn=j("stream");if(process.env.READABLE_STREAM==="disable"&&nn)sn.exports=nn.Readable,Object.assign(sn.exports,nn),sn.exports.Stream=nn;else Fe=sn.exports=Fs(),Fe.Stream=nn||Fe,Fe.Readable=Fe,Fe.Writable=ri(),Fe.Duplex=Wt(),Fe.Transform=da(),Fe.PassThrough=lc(),Fe.finished=Zn(),Fe.pipeline=mc()});var yc=b(function(ix,pc){var vr=[],an=[],ga=function(){};function ya(e){if(~vr.indexOf(e))return!1;return vr.push(e),!0}function _a(e){ga=e}function fb(e){var t=[];for(var r=0;r<vr.length;r++){if(vr[r].async){t.push(vr[r]);continue}if(vr[r](e))return!0}if(!t.length)return!1;return new Promise(function(a){Promise.all(t.map(function(f){return f(e)})).then(function(f){a(f.some(Boolean))})})}function wa(e){if(~an.indexOf(e))return!1;return an.push(e),!0}function pa(){ga.apply(ga,arguments)}function gc(e){for(var t=0;t<an.length;t++)e=an[t].apply(an[t],arguments);return e}function ba(e,t){var r=Object.prototype.hasOwnProperty;for(var i in t)if(r.call(t,i))e[i]=t[i];return e}function cb(e){return e.enabled=!1,e.modify=wa,e.set=_a,e.use=ya,ba(function(){return!1},e)}function hb(e){function t(){var r=Array.prototype.slice.call(arguments,0);return pa.call(pa,e,gc(r,e)),!0}return e.enabled=!0,e.modify=wa,e.set=_a,e.use=ya,ba(t,e)}pc.exports=function(t){return t.introduce=ba,t.enabled=fb,t.process=gc,t.modify=wa,t.write=pa,t.nope=cb,t.yep=hb,t.set=_a,t.use=ya,t}});var xc=b(function(sx,Sc){var Qe={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]},wc=Object.create(null);for(let e in Qe)if(Object.hasOwn(Qe,e))wc[Qe[e]]=e;var pe={to:{},get:{}};pe.get=function(e){let t=e.slice(0,3).toLowerCase(),r,i;switch(t){case"hsl":{r=pe.get.hsl(e),i="hsl";break}case"hwb":{r=pe.get.hwb(e),i="hwb";break}default:{r=pe.get.rgb(e),i="rgb";break}}if(!r)return null;return{model:i,value:r}};pe.get.rgb=function(e){if(!e)return null;let t=/^#([a-f\d]{3,4})$/i,r=/^#([a-f\d]{6})([a-f\d]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,a=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,u=/^(\w+)$/,f=[0,0,0,1],c,d,g;if(c=e.match(r)){g=c[2],c=c[1];for(d=0;d<3;d++){let v=d*2;f[d]=Number.parseInt(c.slice(v,v+2),16)}if(g)f[3]=Number.parseInt(g,16)/255}else if(c=e.match(t)){c=c[1],g=c[3];for(d=0;d<3;d++)f[d]=Number.parseInt(c[d]+c[d],16);if(g)f[3]=Number.parseInt(g+g,16)/255}else if(c=e.match(i)){for(d=0;d<3;d++)f[d]=Number.parseInt(c[d+1],10);if(c[4])f[3]=c[5]?Number.parseFloat(c[4])*0.01:Number.parseFloat(c[4])}else if(c=e.match(a)){for(d=0;d<3;d++)f[d]=Math.round(Number.parseFloat(c[d+1])*2.55);if(c[4])f[3]=c[5]?Number.parseFloat(c[4])*0.01:Number.parseFloat(c[4])}else if(c=e.match(u)){if(c[1]==="transparent")return[0,0,0,0];if(!Object.hasOwn(Qe,c[1]))return null;return f=Qe[c[1]],f[3]=1,f}else return null;for(d=0;d<3;d++)f[d]=Ot(f[d],0,255);return f[3]=Ot(f[3],0,1),f};pe.get.hsl=function(e){if(!e)return null;let t=/^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=e.match(t);if(r){let i=Number.parseFloat(r[4]),a=(Number.parseFloat(r[1])%360+360)%360,u=Ot(Number.parseFloat(r[2]),0,100),f=Ot(Number.parseFloat(r[3]),0,100),c=Ot(Number.isNaN(i)?1:i,0,1);return[a,u,f,c]}return null};pe.get.hwb=function(e){if(!e)return null;let t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){let i=Number.parseFloat(r[4]),a=(Number.parseFloat(r[1])%360+360)%360,u=Ot(Number.parseFloat(r[2]),0,100),f=Ot(Number.parseFloat(r[3]),0,100),c=Ot(Number.isNaN(i)?1:i,0,1);return[a,u,f,c]}return null};pe.to.hex=function(...e){return"#"+li(e[0])+li(e[1])+li(e[2])+(e[3]<1?li(Math.round(e[3]*255)):"")};pe.to.rgb=function(...e){return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};pe.to.rgb.percent=function(...e){let t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+i+"%)":"rgba("+t+"%, "+r+"%, "+i+"%, "+e[3]+")"};pe.to.hsl=function(...e){return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};pe.to.hwb=function(...e){let t="";if(e.length>=4&&e[3]!==1)t=", "+e[3];return"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};pe.to.keyword=function(...e){return wc[e.slice(0,3)]};function Ot(e,t,r){return Math.min(Math.max(t,e),r)}function li(e){let t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var bc={};for(let e of Object.keys(Qe))bc[Qe[e]]=e;var D={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"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},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"]}},mt=0.008856451679035631;function Sr(e){let t=e>0.0031308?1.055*e**0.4166666666666667-0.055:e*12.92;return Math.min(Math.max(0,t),1)}function xr(e){return e>0.04045?((e+0.055)/1.055)**2.4:e/12.92}for(let e of Object.keys(D)){if(!("channels"in D[e]))throw Error("missing channels property: "+e);if(!("labels"in D[e]))throw Error("missing channel labels property: "+e);if(D[e].labels.length!==D[e].channels)throw Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=D[e];delete D[e].channels,delete D[e].labels,Object.defineProperty(D[e],"channels",{value:t}),Object.defineProperty(D[e],"labels",{value:r})}D.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,i=e[2]/255,a=Math.min(t,r,i),u=Math.max(t,r,i),f=u-a,c,d;switch(u){case a:{c=0;break}case t:{c=(r-i)/f;break}case r:{c=2+(i-t)/f;break}case i:{c=4+(t-r)/f;break}}if(c=Math.min(c*60,360),c<0)c+=360;let g=(a+u)/2;if(u===a)d=0;else if(g<=0.5)d=f/(u+a);else d=f/(2-u-a);return[c,d*100,g*100]};D.rgb.hsv=function(e){let t,r,i,a,u,f=e[0]/255,c=e[1]/255,d=e[2]/255,g=Math.max(f,c,d),v=g-Math.min(f,c,d),_=function(w){return(g-w)/6/v+0.5};if(v===0)a=0,u=0;else{switch(u=v/g,t=_(f),r=_(c),i=_(d),g){case f:{a=i-r;break}case c:{a=0.3333333333333333+t-i;break}case d:{a=0.6666666666666666+r-t;break}}if(a<0)a+=1;else if(a>1)a-=1}return[a*360,u*100,g*100]};D.rgb.hwb=function(e){let t=e[0],r=e[1],i=e[2],a=D.rgb.hsl(e)[0],u=0.00392156862745098*Math.min(t,Math.min(r,i));return i=1-0.00392156862745098*Math.max(t,Math.max(r,i)),[a,u*100,i*100]};D.rgb.oklab=function(e){let t=xr(e[0]/255),r=xr(e[1]/255),i=xr(e[2]/255),a=Math.cbrt(0.4122214708*t+0.5363325363*r+0.0514459929*i),u=Math.cbrt(0.2119034982*t+0.6806995451*r+0.1073969566*i),f=Math.cbrt(0.0883024619*t+0.2817188376*r+0.6299787005*i),c=0.2104542553*a+0.793617785*u-0.0040720468*f,d=1.9779984951*a-2.428592205*u+0.4505937099*f,g=0.0259040371*a+0.7827717662*u-0.808675766*f;return[c*100,d*100,g*100]};D.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,i=e[2]/255,a=Math.min(1-t,1-r,1-i),u=(1-t-a)/(1-a)||0,f=(1-r-a)/(1-a)||0,c=(1-i-a)/(1-a)||0;return[u*100,f*100,c*100,a*100]};function db(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}D.rgb.keyword=function(e){let t=bc[e];if(t)return t;let r=Number.POSITIVE_INFINITY,i;for(let a of Object.keys(Qe)){let u=Qe[a],f=db(e,u);if(f<r)r=f,i=a}return i};D.keyword.rgb=function(e){return Qe[e]};D.rgb.xyz=function(e){let t=xr(e[0]/255),r=xr(e[1]/255),i=xr(e[2]/255),a=t*0.4124564+r*0.3575761+i*0.1804375,u=t*0.2126729+r*0.7151522+i*0.072175,f=t*0.0193339+r*0.119192+i*0.9503041;return[a*100,u*100,f*100]};D.rgb.lab=function(e){let t=D.rgb.xyz(e),r=t[0],i=t[1],a=t[2];r/=95.047,i/=100,a/=108.883,r=r>mt?r**0.3333333333333333:7.787*r+0.13793103448275862,i=i>mt?i**0.3333333333333333:7.787*i+0.13793103448275862,a=a>mt?a**0.3333333333333333:7.787*a+0.13793103448275862;let u=116*i-16,f=500*(r-i),c=200*(i-a);return[u,f,c]};D.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,i=e[2]/100,a,u;if(r===0)return u=i*255,[u,u,u];let f=i<0.5?i*(1+r):i+r-i*r,c=2*i-f,d=[0,0,0];for(let g=0;g<3;g++){if(a=t+0.3333333333333333*-(g-1),a<0)a++;if(a>1)a--;if(6*a<1)u=c+(f-c)*6*a;else if(2*a<1)u=f;else if(3*a<2)u=c+(f-c)*(0.6666666666666666-a)*6;else u=c;d[g]=u*255}return d};D.hsl.hsv=function(e){let t=e[0],r=e[1]/100,i=e[2]/100,a=r,u=Math.max(i,0.01);i*=2,r*=i<=1?i:2-i,a*=u<=1?u:2-u;let f=(i+r)/2,c=i===0?2*a/(u+a):2*r/(i+r);return[t,c*100,f*100]};D.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,i=e[2]/100,a=Math.floor(t)%6,u=t-Math.floor(t),f=255*i*(1-r),c=255*i*(1-r*u),d=255*i*(1-r*(1-u));switch(i*=255,a){case 0:return[i,d,f];case 1:return[c,i,f];case 2:return[f,i,d];case 3:return[f,c,i];case 4:return[d,f,i];case 5:return[i,f,c]}};D.hsv.hsl=function(e){let t=e[0],r=e[1]/100,i=e[2]/100,a=Math.max(i,0.01),u,f;f=(2-r)*i;let c=(2-r)*a;return u=r*a,u/=c<=1?c:2-c,u=u||0,f/=2,[t,u*100,f*100]};D.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,i=e[2]/100,a=r+i,u;if(a>1)r/=a,i/=a;let f=Math.floor(6*t),c=1-i;if(u=6*t-f,(f&1)!==0)u=1-u;let d=r+u*(c-r),g,v,_;switch(f){default:case 6:case 0:{g=c,v=d,_=r;break}case 1:{g=d,v=c,_=r;break}case 2:{g=r,v=c,_=d;break}case 3:{g=r,v=d,_=c;break}case 4:{g=d,v=r,_=c;break}case 5:{g=c,v=r,_=d;break}}return[g*255,v*255,_*255]};D.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,i=e[2]/100,a=e[3]/100,u=1-Math.min(1,t*(1-a)+a),f=1-Math.min(1,r*(1-a)+a),c=1-Math.min(1,i*(1-a)+a);return[u*255,f*255,c*255]};D.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,i=e[2]/100,a,u,f;return a=t*3.2404542+r*-1.5371385+i*-0.4985314,u=t*-0.969266+r*1.8760108+i*0.041556,f=t*0.0556434+r*-0.2040259+i*1.0572252,a=Sr(a),u=Sr(u),f=Sr(f),[a*255,u*255,f*255]};D.xyz.lab=function(e){let t=e[0],r=e[1],i=e[2];t/=95.047,r/=100,i/=108.883,t=t>mt?t**0.3333333333333333:7.787*t+0.13793103448275862,r=r>mt?r**0.3333333333333333:7.787*r+0.13793103448275862,i=i>mt?i**0.3333333333333333:7.787*i+0.13793103448275862;let a=116*r-16,u=500*(t-r),f=200*(r-i);return[a,u,f]};D.xyz.oklab=function(e){let t=e[0]/100,r=e[1]/100,i=e[2]/100,a=Math.cbrt(0.8189330101*t+0.3618667424*r-0.1288597137*i),u=Math.cbrt(0.0329845436*t+0.9293118715*r+0.0361456387*i),f=Math.cbrt(0.0482003018*t+0.2643662691*r+0.633851707*i),c=0.2104542553*a+0.793617785*u-0.0040720468*f,d=1.9779984951*a-2.428592205*u+0.4505937099*f,g=0.0259040371*a+0.7827717662*u-0.808675766*f;return[c*100,d*100,g*100]};D.oklab.oklch=function(e){return D.lab.lch(e)};D.oklab.xyz=function(e){let t=e[0]/100,r=e[1]/100,i=e[2]/100,a=(0.999999998*t+0.396337792*r+0.215803758*i)**3,u=(1.000000008*t-0.105561342*r-0.063854175*i)**3,f=(1.000000055*t-0.089484182*r-1.291485538*i)**3,c=1.227013851*a-0.55779998*u+0.281256149*f,d=-0.040580178*a+1.11225687*u-0.071676679*f,g=-0.076381285*a-0.421481978*u+1.58616322*f;return[c*100,d*100,g*100]};D.oklab.rgb=function(e){let t=e[0]/100,r=e[1]/100,i=e[2]/100,a=(t+0.3963377774*r+0.2158037573*i)**3,u=(t-0.1055613458*r-0.0638541728*i)**3,f=(t-0.0894841775*r-1.291485548*i)**3,c=Sr(4.0767416621*a-3.3077115913*u+0.2309699292*f),d=Sr(-1.2684380046*a+2.6097574011*u-0.3413193965*f),g=Sr(-0.0041960863*a-0.7034186147*u+1.707614701*f);return[c*255,d*255,g*255]};D.oklch.oklab=function(e){return D.lch.lab(e)};D.lab.xyz=function(e){let t=e[0],r=e[1],i=e[2],a,u,f;u=(t+16)/116,a=r/500+u,f=u-i/200;let c=u**3,d=a**3,g=f**3;return u=c>mt?c:(u-0.13793103448275862)/7.787,a=d>mt?d:(a-0.13793103448275862)/7.787,f=g>mt?g:(f-0.13793103448275862)/7.787,a*=95.047,u*=100,f*=108.883,[a,u,f]};D.lab.lch=function(e){let t=e[0],r=e[1],i=e[2],a;if(a=Math.atan2(i,r)*360/2/Math.PI,a<0)a+=360;let f=Math.sqrt(r*r+i*i);return[t,f,a]};D.lch.lab=function(e){let t=e[0],r=e[1],a=e[2]/360*2*Math.PI,u=r*Math.cos(a),f=r*Math.sin(a);return[t,u,f]};D.rgb.ansi16=function(e,t=null){let[r,i,a]=e,u=t===null?D.rgb.hsv(e)[2]:t;if(u=Math.round(u/50),u===0)return 30;let f=30+(Math.round(a/255)<<2|Math.round(i/255)<<1|Math.round(r/255));if(u===2)f+=60;return f};D.hsv.ansi16=function(e){return D.rgb.ansi16(D.hsv.rgb(e),e[2])};D.rgb.ansi256=function(e){let t=e[0],r=e[1],i=e[2];if(t>>4===r>>4&&r>>4===i>>4){if(t<8)return 16;if(t>248)return 231;return Math.round((t-8)/247*24)+232}return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)};D.ansi16.rgb=function(e){e=e[0];let t=e%10;if(t===0||t===7){if(e>50)t+=3.5;return t=t/10.5*255,[t,t,t]}let r=(Math.trunc(e>50)+1)*0.5,i=(t&1)*r*255,a=(t>>1&1)*r*255,u=(t>>2&1)*r*255;return[i,a,u]};D.ansi256.rgb=function(e){if(e=e[0],e>=232){let u=(e-232)*10+8;return[u,u,u]}e-=16;let t,r=Math.floor(e/36)/5*255,i=Math.floor((t=e%36)/6)/5*255,a=t%6/5*255;return[r,i,a]};D.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".slice(r.length)+r};D.hex.rgb=function(e){let t=e.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let r=t[0];if(t[0].length===3)r=[...r].map((c)=>c+c).join("");let i=Number.parseInt(r,16),a=i>>16&255,u=i>>8&255,f=i&255;return[a,u,f]};D.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,i=e[2]/255,a=Math.max(Math.max(t,r),i),u=Math.min(Math.min(t,r),i),f=a-u,c,d=f<1?u/(1-f):0;if(f<=0)c=0;else if(a===t)c=(r-i)/f%6;else if(a===r)c=2+(i-t)/f;else c=4+(t-r)/f;return c/=6,c%=1,[c*360,f*100,d*100]};D.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,i=r<0.5?2*t*r:2*t*(1-r),a=0;if(i<1)a=(r-0.5*i)/(1-i);return[e[0],i*100,a*100]};D.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,i=t*r,a=0;if(i<1)a=(r-i)/(1-i);return[e[0],i*100,a*100]};D.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,i=e[2]/100;if(r===0)return[i*255,i*255,i*255];let a=[0,0,0],u=t%1*6,f=u%1,c=1-f,d=0;switch(Math.floor(u)){case 0:{a[0]=1,a[1]=f,a[2]=0;break}case 1:{a[0]=c,a[1]=1,a[2]=0;break}case 2:{a[0]=0,a[1]=1,a[2]=f;break}case 3:{a[0]=0,a[1]=c,a[2]=1;break}case 4:{a[0]=f,a[1]=0,a[2]=1;break}default:a[0]=1,a[1]=0,a[2]=c}return d=(1-r)*i,[(r*a[0]+d)*255,(r*a[1]+d)*255,(r*a[2]+d)*255]};D.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,i=t+r*(1-t),a=0;if(i>0)a=t/i;return[e[0],a*100,i*100]};D.hcg.hsl=function(e){let t=e[1]/100,i=e[2]/100*(1-t)+0.5*t,a=0;if(i>0&&i<0.5)a=t/(2*i);else if(i>=0.5&&i<1)a=t/(2*(1-i));return[e[0],a*100,i*100]};D.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,i=t+r*(1-t);return[e[0],(i-t)*100,(1-i)*100]};D.hwb.hcg=function(e){let t=e[1]/100,i=1-e[2]/100,a=i-t,u=0;if(a<1)u=(i-a)/(1-a);return[e[0],a*100,u*100]};D.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};D.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};D.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};D.gray.hsl=function(e){return[0,0,e[0]]};D.gray.hsv=D.gray.hsl;D.gray.hwb=function(e){return[0,100,e[0]]};D.gray.cmyk=function(e){return[0,0,0,e[0]]};D.gray.lab=function(e){return[e[0],0,0]};D.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,i=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(i.length)+i};D.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};function mb(){let e={},t=Object.keys(D);for(let{length:r}=t,i=0;i<r;i++)e[t[i]]={distance:-1,parent:null};return e}function gb(e){let t=mb(),r=[e];t[e].distance=0;while(r.length>0){let i=r.pop(),a=Object.keys(D[i]);for(let{length:u}=a,f=0;f<u;f++){let c=a[f],d=t[c];if(d.distance===-1)d.distance=t[i].distance+1,d.parent=i,r.unshift(c)}}return t}function pb(e,t){return function(r){return t(e(r))}}function yb(e,t){let r=[t[e].parent,e],i=D[t[e].parent][e],a=t[e].parent;while(t[a].parent)r.unshift(t[a].parent),i=pb(D[t[a].parent][a],i),a=t[a].parent;return i.conversion=r,i}function _b(e){let t=gb(e),r={},i=Object.keys(t);for(let{length:a}=i,u=0;u<a;u++){let f=i[u];if(t[f].parent===null)continue;r[f]=yb(f,t)}return r}var _e={},wb=Object.keys(D);function bb(e){let t=function(...r){let i=r[0];if(i===void 0||i===null)return i;if(i.length>1)r=i;return e(r)};if("conversion"in e)t.conversion=e.conversion;return t}function vb(e){let t=function(...r){let i=r[0];if(i===void 0||i===null)return i;if(i.length>1)r=i;let a=e(r);if(typeof a==="object")for(let{length:u}=a,f=0;f<u;f++)a[f]=Math.round(a[f]);return a};if("conversion"in e)t.conversion=e.conversion;return t}for(let e of wb){_e[e]={},Object.defineProperty(_e[e],"channels",{value:D[e].channels}),Object.defineProperty(_e[e],"labels",{value:D[e].labels});let t=_b(e),r=Object.keys(t);for(let i of r){let a=t[i];_e[e][i]=vb(a),_e[e][i].raw=bb(a)}}var vc=["keyword","gray","hex"],va={};for(let e of Object.keys(_e))va[[..._e[e].labels].sort().join("")]=e;var Sa={};function ge(e,t){if(!(this instanceof ge))return new ge(e,t);if(t&&t in vc)t=null;if(t&&!(t in _e))throw Error("Unknown model: "+t);let r,i;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof ge)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==="string"){let a=pe.get(e);if(a===null)throw Error("Unable to parse color from string: "+e);this.model=a.model,i=_e[this.model].channels,this.color=a.value.slice(0,i),this.valpha=typeof a.value[i]==="number"?a.value[i]:1}else if(e.length>0){this.model=t||"rgb",i=_e[this.model].channels;let a=Array.prototype.slice.call(e,0,i);this.color=xa(a,i),this.valpha=typeof e[i]==="number"?e[i]:1}else if(typeof e==="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let a=Object.keys(e);if("alpha"in e)a.splice(a.indexOf("alpha"),1),this.valpha=typeof e.alpha==="number"?e.alpha:0;let u=a.sort().join("");if(!(u in va))throw Error("Unable to parse color from object: "+JSON.stringify(e));this.model=va[u];let{labels:f}=_e[this.model],c=[];for(r=0;r<f.length;r++)c.push(e[f[r]]);this.color=xa(c)}if(Sa[this.model]){i=_e[this.model].channels;for(r=0;r<i;r++){let a=Sa[this.model][r];if(a)this.color[r]=a(this.color[r])}}if(this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze)Object.freeze(this)}ge.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in pe.to?this:this.rgb();t=t.round(typeof e==="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return pe.to[t.model](...r)},percentString(e){let t=this.rgb().round(typeof e==="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return pe.to.rgb.percent(...r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=_e[this.model],{labels:r}=_e[this.model];for(let i=0;i<t;i++)e[r[i]]=this.color[i];if(this.valpha!==1)e.alpha=this.valpha;return e},unitArray(){let e=this.rgb().color;if(e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1)e.push(this.valpha);return e},unitObject(){let e=this.rgb().object();if(e.r/=255,e.g/=255,e.b/=255,this.valpha!==1)e.alpha=this.valpha;return e},round(e){return e=Math.max(e||0,0),new ge([...this.color.map(xb(e)),this.valpha],this.model)},alpha(e){if(e!==void 0)return new ge([...this.color,Math.max(0,Math.min(1,e))],this.model);return this.valpha},red:oe("rgb",0,me(255)),green:oe("rgb",1,me(255)),blue:oe("rgb",2,me(255)),hue:oe(["hsl","hsv","hsl","hwb","hcg"],0,(e)=>(e%360+360)%360),saturationl:oe("hsl",1,me(100)),lightness:oe("hsl",2,me(100)),saturationv:oe("hsv",1,me(100)),value:oe("hsv",2,me(100)),chroma:oe("hcg",1,me(100)),gray:oe("hcg",2,me(100)),white:oe("hwb",1,me(100)),wblack:oe("hwb",2,me(100)),cyan:oe("cmyk",0,me(100)),magenta:oe("cmyk",1,me(100)),yellow:oe("cmyk",2,me(100)),black:oe("cmyk",3,me(100)),x:oe("xyz",0,me(95.047)),y:oe("xyz",1,me(100)),z:oe("xyz",2,me(108.833)),l:oe("lab",0,me(100)),a:oe("lab",1),b:oe("lab",2),keyword(e){if(e!==void 0)return new ge(e);return _e[this.model].keyword(this.color)},hex(e){if(e!==void 0)return new ge(e);return pe.to.hex(...this.rgb().round().color)},hexa(e){if(e!==void 0)return new ge(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();if(r.length===1)r="0"+r;return pe.to.hex(...t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,i]of e.entries()){let a=i/255;t[r]=a<=0.04045?a/12.92:((a+0.055)/1.055)**2.4}return 0.2126*t[0]+0.7152*t[1]+0.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();if(t>r)return(t+0.05)/(r+0.05);return(r+0.05)/(t+0.05)},level(e){let t=this.contrast(e);if(t>=7)return"AAA";return t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*0.3+e[1]*0.59+e[2]*0.11;return ge.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),i=this.rgb(),a=t===void 0?0.5:t,u=2*a-1,f=r.alpha()-i.alpha(),c=((u*f===-1?u:(u+f)/(1+u*f))+1)/2,d=1-c;return ge.rgb(c*r.red()+d*i.red(),c*r.green()+d*i.green(),c*r.blue()+d*i.blue(),r.alpha()*a+i.alpha()*(1-a))}};for(let e of Object.keys(_e)){if(vc.includes(e))continue;let{channels:t}=_e[e];ge.prototype[e]=function(...r){if(this.model===e)return new ge(this);if(r.length>0)return new ge(r,e);return new ge([...Mb(_e[this.model][e].raw(this.color)),this.valpha],e)},ge[e]=function(...r){let i=r[0];if(typeof i==="number")i=xa(r,t);return new ge(i,e)}}function Sb(e,t){return Number(e.toFixed(t))}function xb(e){return function(t){return Sb(t,e)}}function oe(e,t,r){e=Array.isArray(e)?e:[e];for(let i of e)(Sa[i]||=[])[t]=r;return e=e[0],function(i){let a;if(i!==void 0){if(r)i=r(i);return a=this[e](),a.color[t]=i,a}if(a=this[e]().color[t],r)a=r(a);return a}}function me(e){return function(t){return Math.max(0,Math.min(e,t))}}function Mb(e){return Array.isArray(e)?e:[e]}function xa(e,t){for(let r=0;r<t;r++)if(typeof e[r]!=="number")e[r]=0;return e}function Eb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ob=function(t){for(var r=0,i=0;r<t.length;i=t.charCodeAt(r++)+((i<<5)-i));var a=Math.floor(Math.abs(Math.sin(i)*1e4%1*16777216)).toString(16);return"#"+Array(6-a.length+1).join("0")+a},_c=Eb(Ob);function Db(e,t){let r=e.split(t||":"),i=_c(r[0]);if(!r.length)return i;for(let a=0,u=r.length-1;a<u;a++)i=ge(i).mix(ge(_c(r[a+1]))).saturate(1).hex();return i}Sc.exports=Db});var Ec=b(function(ax,Mc){function Ue(e,t){if(t)return new Ue(e).style(t);if(!(this instanceof Ue))return new Ue(e);this.text=e}Ue.prototype.prefix="\x1B[";Ue.prototype.suffix="m";Ue.prototype.hex=function(t){if(t=t[0]==="#"?t.substring(1):t,t.length===3)t=t.split(""),t[5]=t[2],t[4]=t[2],t[3]=t[1],t[2]=t[1],t[1]=t[0],t=t.join("");var r=t.substring(0,2),i=t.substring(2,4),a=t.substring(4,6);return[parseInt(r,16),parseInt(i,16),parseInt(a,16)]};Ue.prototype.rgb=function(t,r,i){var a=t/255*5,u=r/255*5,f=i/255*5;return this.ansi(a,u,f)};Ue.prototype.ansi=function(t,r,i){var a=Math.round(t),u=Math.round(r),f=Math.round(i);return 16+a*36+u*6+f};Ue.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};Ue.prototype.style=function(t){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(t))+this.suffix+this.text+this.reset()};Mc.exports=Ue});var Dc=b(function(ox,Oc){var kb=xc(),Rb=Ec();Oc.exports=function(t,r){var i=r.namespace,a=r.colors!==!1?Rb(i+":",kb(i)):i+":";return t[0]=a+" "+t[0],t}});var Rc=b(function(ux,kc){kc.exports=function(t,r){if(!r)return!1;var i=r.split(/[\s,]+/),a=0;for(;a<i.length;a++){if(r=i[a].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(t))return!1;continue}if(new RegExp("^"+r+"$").test(t))return!0}return!1}});var Nc=b(function(lx,Tc){var Tb=Rc();Tc.exports=function(t){return function(i){try{return Tb(i,t())}catch(a){}return!1}}});var Pc=b(function(fx,Lc){var Nb=Nc();Lc.exports=Nb(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var qc=b(function(cx,Ac){Ac.exports=function(e,t){try{Function.prototype.apply.call(console.log,console,t)}catch(r){}}});var on=b(function(hx,Yc){var Lb=yc(),Pb=j("tty").isatty(1),fi=Lb(function e(t,r){if(r=r||{},r.colors="colors"in r?r.colors:Pb,r.namespace=t,r.prod=!1,r.dev=!0,!e.enabled(t)&&!(r.force||e.force))return e.nope(r);return e.yep(r)});fi.modify(Dc());fi.use(Pc());fi.set(qc());Yc.exports=fi});var Cc=b(function(dx,Fc){var Mr=j("fs"),{StringDecoder:Ab}=j("string_decoder"),{Stream:qb}=Ut();function Yb(){}Fc.exports=(e,t)=>{let r=Buffer.alloc(65536),i=new Ab("utf8"),a=new qb,u="",f=0,c=0;if(e.start===-1)delete e.start;if(a.readable=!0,a.destroy=()=>{a.destroyed=!0,a.emit("end"),a.emit("close")},Mr.open(e.file,"a+","0644",(d,g)=>{if(d){if(!t)a.emit("error",d);else t(d);a.destroy();return}(function v(){if(a.destroyed){Mr.close(g,Yb);return}return Mr.read(g,r,0,r.length,f,(_,w)=>{if(_){if(!t)a.emit("error",_);else t(_);a.destroy();return}if(!w){if(u){if(e.start==null||c>e.start)if(!t)a.emit("line",u);else t(null,u);c++,u=""}return setTimeout(v,1000)}let E=i.write(r.slice(0,w));if(!t)a.emit("data",E);E=(u+E).split(/\n+/);let p=E.length-1,M=0;for(;M<p;M++){if(e.start==null||c>e.start)if(!t)a.emit("line",E[M]);else t(null,E[M]);c++}return u=E[p],f+=w,v()})})()}),!t)return a;return a.destroy}});var Uc=b(function(mx,Hc){var te=j("fs"),B=j("path"),jc=ic(),Wc=j("zlib"),{MESSAGE:Fb}=le(),{Stream:Cb,PassThrough:Ic}=Ut(),jb=$t(),Ge=on()("winston:file"),$c=j("os"),Ib=Cc();Hc.exports=class extends jb{constructor(t={}){super(t);this.name=t.name||"file";function r(i,...a){a.slice(1).forEach((u)=>{if(t[u])throw Error(`Cannot set ${u} and ${i} together`)})}if(this._stream=new Ic,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),t.filename||t.dirname)r("filename or dirname","stream"),this._basename=this.filename=t.filename?B.basename(t.filename):"winston.log",this.dirname=t.dirname||B.dirname(t.filename),this.options=t.options||{flags:"a"};else if(t.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(t.stream)),this.dirname=B.dirname(this._dest.path);else throw Error("Cannot log to file without filename or stream.");if(this.maxsize=t.maxsize||null,this.rotationFormat=t.rotationFormat||!1,this.zippedArchive=t.zippedArchive||!1,this.maxFiles=t.maxFiles||null,this.eol=typeof t.eol==="string"?t.eol:$c.EOL,this.tailable=t.tailable||!1,this.lazy=t.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);if(!this.lazy)this.open()}finishIfEnding(){if(this._ending)if(this._opening)this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())});else this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}_final(t){if(this._opening){this.once("open",()=>this._final(t));return}if(this._stream.end(),!this._dest)return t();if(this._dest.writableFinished)return t();this._dest.once("finish",t),this._dest.once("error",t)}log(t,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(t,r)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(t,r)});return}if(this.lazy){if(!this._fileExist){if(!this._opening)this.open();this.once("open",()=>{this._fileExist=!0,this.log(t,r);return});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{if(!this._opening)this.open();this.once("open",()=>{this.log(t,r);return});return});return}}let i=`${t[Fb]}${this.eol}`,a=Buffer.byteLength(i);function u(){if(this._size+=a,this._pendingSize-=a,Ge("logged %s %s",this._size,i),this.emit("logged",t),this._rotate)return;if(this._opening)return;if(!this._needsNewFile())return;if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}if(this._pendingSize+=a,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize))this.rotatedWhileOpening=!0;let f=this._stream.write(i,u.bind(this));if(!f)this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()});else r();return Ge("written",f,this._drain),this.finishIfEnding(),f}query(t,r){if(typeof t==="function")r=t,t={};t=_(t);let i=B.join(this.dirname,this.filename),a="",u=[],f=0,c=te.createReadStream(i,{encoding:"utf8"});c.on("error",(w)=>{if(c.readable)c.destroy();if(!r)return;return w.code!=="ENOENT"?r(w):r(null,u)}),c.on("data",(w)=>{w=(a+w).split(/\n+/);let E=w.length-1,p=0;for(;p<E;p++){if(!t.start||f>=t.start)d(w[p]);f++}a=w[E]}),c.on("close",()=>{if(a)d(a,!0);if(t.order==="desc")u=u.reverse();if(r)r(null,u)});function d(w,E){try{let p=JSON.parse(w);if(v(p))g(p)}catch(p){if(!E)c.emit("error",p)}}function g(w){if(t.rows&&u.length>=t.rows&&t.order!=="desc"){if(c.readable)c.destroy();return}if(t.fields)w=t.fields.reduce((E,p)=>(E[p]=w[p],E),{});if(t.order==="desc"){if(u.length>=t.rows)u.shift()}u.push(w)}function v(w){if(!w)return;if(typeof w!=="object")return;let E=new Date(w.timestamp);if(t.from&&E<t.from||t.until&&E>t.until||t.level&&t.level!==w.level)return;return!0}function _(w){if(w=w||{},w.rows=w.rows||w.limit||10,w.start=w.start||0,w.until=w.until||new Date,typeof w.until!=="object")w.until=new Date(w.until);if(w.from=w.from||w.until-86400000,typeof w.from!=="object")w.from=new Date(w.from);return w.order=w.order||"desc",w}}stream(t={}){let r=B.join(this.dirname,this.filename),i=new Cb,a={file:r,start:t.start};return i.destroy=Ib(a,(u,f)=>{if(u)return i.emit("error",u);try{i.emit("data",f),f=JSON.parse(f),i.emit("log",f)}catch(c){i.emit("error",c)}}),i}open(){if(!this.filename)return;if(this._opening)return;this._opening=!0,this.stat((t,r)=>{if(t)return this.emit("error",t);Ge("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{if(!this._stream.emit("rotate"))this._rotate=!1})})}stat(t){let r=this._getFile(),i=B.join(this.dirname,r);te.stat(i,(a,u)=>{if(a&&a.code==="ENOENT")return Ge("ENOENT\xA0ok",i),this.filename=r,t(null,0);if(a)return Ge(`err ${a.code} ${i}`),t(a);if(!u||this._needsNewFile(u.size))return this._incFile(()=>this.stat(t));this.filename=r,t(null,u.size)})}close(t){if(!this._stream)return;this._stream.end(()=>{if(t)t();this.emit("flush"),this.emit("closed")})}_needsNewFile(t){return t=t||this._size,this.maxsize&&t>=this.maxsize}_onError(t){this.emit("error",t)}_setupStream(t){return t.on("error",this._onError),t}_cleanupStream(t){return t.removeListener("error",this._onError),t.destroy(),t}_rotateFile(){this._incFile(()=>this.open())}_endStream(t=()=>{}){if(this._dest)this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),t()});else t()}_createStream(t){let r=B.join(this.dirname,this.filename);Ge("create stream start",r,this.options);let i=te.createWriteStream(r,this.options).on("error",(a)=>Ge(a)).on("close",()=>Ge("close",i.path,i.bytesWritten)).on("open",()=>{if(Ge("file open ok",r),this.emit("open",r),t.pipe(i),this.rotatedWhileOpening)this._stream=new Ic,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),t.end()});return Ge("create stream ok",r),i}_incFile(t){Ge("_incFile",this.filename);let r=B.extname(this._basename),i=B.basename(this._basename,r),a=[];if(this.zippedArchive)a.push(function(u){let f=this._created>0&&!this.tailable?this._created:"";this._compressFile(B.join(this.dirname,`${i}${f}${r}`),B.join(this.dirname,`${i}${f}${r}.gz`),u)}.bind(this));a.push(function(u){if(!this.tailable)this._created+=1,this._checkMaxFilesIncrementing(r,i,u);else this._checkMaxFilesTailable(r,i,u)}.bind(this)),jc(a,t)}_getFile(){let t=B.extname(this._basename),r=B.basename(this._basename,t),i=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${i}${t}`:`${r}${t}`}_checkMaxFilesIncrementing(t,r,i){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(i);let a=this._created-this.maxFiles,u=a!==0?a:"",f=this.zippedArchive?".gz":"",c=`${r}${u}${t}${f}`,d=B.join(this.dirname,c);te.unlink(d,i)}_checkMaxFilesTailable(t,r,i){let a=[];if(!this.maxFiles)return;let u=this.zippedArchive?".gz":"";for(let f=this.maxFiles-1;f>1;f--)a.push(function(c,d){let g=`${r}${c-1}${t}${u}`,v=B.join(this.dirname,g);te.exists(v,(_)=>{if(!_)return d(null);g=`${r}${c}${t}${u}`,te.rename(v,B.join(this.dirname,g),d)})}.bind(this,f));jc(a,()=>{te.rename(B.join(this.dirname,`${r}${t}${u}`),B.join(this.dirname,`${r}1${t}${u}`),i)})}_compressFile(t,r,i){te.access(t,te.F_OK,(a)=>{if(a)return i();var u=Wc.createGzip(),f=te.createReadStream(t),c=te.createWriteStream(r);c.on("finish",()=>{te.unlink(t,i)}),f.pipe(u).pipe(c)})}_createLogDirIfNotExist(t){if(!te.existsSync(t))te.mkdirSync(t,{recursive:!0})}}});var Vc=b(function(gx,Gc){var Wb=j("http"),$b=j("https"),{Stream:Hb}=Ut(),Ub=$t(),{configure:Gb}=$r();Gc.exports=class extends Ub{constructor(t={}){super(t);if(this.options=t,this.name=t.name||"http",this.ssl=!!t.ssl,this.host=t.host||"localhost",this.port=t.port,this.auth=t.auth,this.path=t.path||"",this.maximumDepth=t.maximumDepth,this.agent=t.agent,this.headers=t.headers||{},this.headers["content-type"]="application/json",this.batch=t.batch||!1,this.batchInterval=t.batchInterval||5000,this.batchCount=t.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},!this.port)this.port=this.ssl?443:80}log(t,r){if(this._request(t,null,null,(i,a)=>{if(a&&a.statusCode!==200)i=Error(`Invalid HTTP Status Code: ${a.statusCode}`);if(i)this.emit("warn",i);else this.emit("logged",t)}),r)setImmediate(r)}query(t,r){if(typeof t==="function")r=t,t={};t={method:"query",params:this.normalizeQuery(t)};let i=t.params.auth||null;delete t.params.auth;let a=t.params.path||null;delete t.params.path,this._request(t,i,a,(u,f,c)=>{if(f&&f.statusCode!==200)u=Error(`Invalid HTTP Status Code: ${f.statusCode}`);if(u)return r(u);if(typeof c==="string")try{c=JSON.parse(c)}catch(d){return r(d)}r(null,c)})}stream(t={}){let r=new Hb;t={method:"stream",params:t};let i=t.params.path||null;delete t.params.path;let a=t.params.auth||null;delete t.params.auth;let u="",f=this._request(t,a,i);return r.destroy=()=>f.destroy(),f.on("data",(c)=>{c=(u+c).split(/\n+/);let d=c.length-1,g=0;for(;g<d;g++)try{r.emit("log",JSON.parse(c[g]))}catch(v){r.emit("error",v)}u=c[d]}),f.on("error",(c)=>r.emit("error",c)),r}_request(t,r,i,a){if(t=t||{},r=r||this.auth,i=i||this.path||"",this.batch)this._doBatch(t,a,r,i);else this._doRequest(t,a,r,i)}_doBatch(t,r,i,a){if(this.batchOptions.push(t),this.batchOptions.length===1){let u=this;this.batchCallback=r,this.batchTimeoutID=setTimeout(function(){u.batchTimeoutID=-1,u._doBatchRequest(u.batchCallback,i,a)},this.batchInterval)}if(this.batchOptions.length===this.batchCount)this._doBatchRequest(this.batchCallback,i,a)}_doBatchRequest(t,r,i){if(this.batchTimeoutID>0)clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1;let a=this.batchOptions.slice();this.batchOptions=[],this._doRequest(a,t,r,i)}_doRequest(t,r,i,a){let u=Object.assign({},this.headers);if(i&&i.bearer)u.Authorization=`Bearer ${i.bearer}`;let f=(this.ssl?$b:Wb).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${a.replace(/^\//,"")}`,headers:u,auth:i&&i.username&&i.password?`${i.username}:${i.password}`:"",agent:this.agent});f.on("error",r),f.on("response",(d)=>d.on("end",()=>r(null,d)).resume());let c=Gb({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});f.end(Buffer.from(c(t,this.options.replacer),"utf8"))}}});var Ma=b(function(px,zc){var Xe=(e)=>e!==null&&typeof e==="object"&&typeof e.pipe==="function";Xe.writable=(e)=>Xe(e)&&e.writable!==!1&&typeof e._write==="function"&&typeof e._writableState==="object";Xe.readable=(e)=>Xe(e)&&e.readable!==!1&&typeof e._read==="function"&&typeof e._readableState==="object";Xe.duplex=(e)=>Xe.writable(e)&&Xe.readable(e);Xe.transform=(e)=>Xe.duplex(e)&&typeof e._transform==="function";zc.exports=Xe});var Jc=b(function(yx,Zc){var Vb=Ma(),{MESSAGE:zb}=le(),Bc=j("os"),Bb=$t();Zc.exports=class extends Bb{constructor(t={}){super(t);if(!t.stream||!Vb(t.stream))throw Error("options.stream is required.");this._stream=t.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=t.stream._writableState.objectMode,this.eol=typeof t.eol==="string"?t.eol:Bc.EOL}log(t,r){if(setImmediate(()=>this.emit("logged",t)),this.isObjectMode){if(this._stream.write(t),r)r();return}if(this._stream.write(`${t[zb]}${this.eol}`),r)r();return}}});var Kc=b(function(un){Object.defineProperty(un,"Console",{configurable:!0,enumerable:!0,get(){return wf()}});Object.defineProperty(un,"File",{configurable:!0,enumerable:!0,get(){return Uc()}});Object.defineProperty(un,"Http",{configurable:!0,enumerable:!0,get(){return Vc()}});Object.defineProperty(un,"Stream",{configurable:!0,enumerable:!0,get(){return Jc()}})});var ci=b(function(Zb){var Dt=ms(),{configs:Ea}=le();Zb.cli=Dt.levels(Ea.cli);Zb.npm=Dt.levels(Ea.npm);Zb.syslog=Dt.levels(Ea.syslog);Zb.addColors=Dt.levels});var Xc=b(function(Oa,Qc){Object.defineProperty(Oa,"__esModule",{value:!0});var ev=si(),tv=Gt(ev),rv=ai(),nv=Gt(rv),iv=fa(),sv=Gt(iv),av=ea(),ov=Gt(av),uv=ia(),lv=Gt(uv),fv=Ht(),cv=Gt(fv),hv=br(),dv=Gt(hv);function Gt(e){return e&&e.__esModule?e:{default:e}}function mv(e,t,r){r=(0,ov.default)(r);var i=0,a=0,{length:u}=e,f=!1;if(u===0)r(null);function c(d,g){if(d===!1)f=!0;if(f===!0)return;if(d)r(d);else if(++a===u||g===nv.default)r(null)}for(;i<u;i++)t(e[i],i,(0,lv.default)(c))}function gv(e,t,r){return(0,sv.default)(e,1/0,t,r)}function pv(e,t,r){var i=(0,tv.default)(e)?mv:gv;return i(e,(0,cv.default)(t),r)}Oa.default=(0,dv.default)(pv,3);Qc.exports=Oa.default});var th=b(function(Da,eh){Object.defineProperty(Da,"__esModule",{value:!0});Da.default=_v;function _v(e){return(t,r,i)=>e(t,i)}eh.exports=Da.default});var di=b(function(ka,rh){Object.defineProperty(ka,"__esModule",{value:!0});var bv=Xc(),vv=hi(bv),Sv=th(),xv=hi(Sv),Mv=Ht(),Ev=hi(Mv),Ov=br(),Dv=hi(Ov);function hi(e){return e&&e.__esModule?e:{default:e}}function kv(e,t,r){return(0,vv.default)(e,(0,xv.default)((0,Ev.default)(t)),r)}ka.default=(0,Dv.default)(kv,3);rh.exports=ka.default});var ih=b(function(bx,nh){var Tv=Object.prototype.toString;nh.exports=function(t){if(typeof t.displayName==="string"&&t.constructor.name)return t.displayName;else if(typeof t.name==="string"&&t.name)return t.name;if(typeof t==="object"&&t.constructor&&typeof t.constructor.name==="string")return t.constructor.name;var r=t.toString(),i=Tv.call(t).slice(8,-1);if(i==="Function")r=r.substring(r.indexOf("(")+1,r.indexOf(")"));else r=i;return r||"anonymous"}});var Ra=b(function(vx,sh){var Nv=ih();sh.exports=function(t){var r=0,i;function a(){if(r)return i;return r=1,i=t.apply(this,arguments),t=null,i}return a.displayName=Nv(t),a}});var Ta=b(function(Av){Av.get=function(e){var t=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},i=Error.prepareStackTrace;Error.prepareStackTrace=function(u,f){return f},Error.captureStackTrace(r,e||Av.get);var a=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=t,a};Av.parse=function(e){if(!e.stack)return[];var t=this,r=e.stack.split(`
|
|
28
|
+
`).slice(1);return r.map(function(i){if(i.match(/^\s*[-]{4,}$/))return t._createParsedCallSite({fileName:i,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var a=i.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(!a)return;var u=null,f=null,c=null,d=null,g=null,v=a[5]==="native";if(a[1]){c=a[1];var _=c.lastIndexOf(".");if(c[_-1]==".")_--;if(_>0){u=c.substr(0,_),f=c.substr(_+1);var w=u.indexOf(".Module");if(w>0)c=c.substr(w+1),u=u.substr(0,w)}d=null}if(f)d=u,g=f;if(f==="<anonymous>")g=null,c=null;var E={fileName:a[2]||null,lineNumber:parseInt(a[3],10)||null,functionName:c,typeName:d,methodName:g,columnNumber:parseInt(a[4],10)||null,native:v};return t._createParsedCallSite(E)}).filter(function(i){return!!i})};function ln(e){for(var t in e)this[t]=e[t]}var Lv=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],Pv=["topLevel","eval","native","constructor"];Lv.forEach(function(e){ln.prototype[e]=null,ln.prototype["get"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}});Pv.forEach(function(e){ln.prototype[e]=!1,ln.prototype["is"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}});Av._createParsedCallSite=function(e){return new ln(e)}});var uh=b(function(xx,oh){var{Writable:Fv}=Ut();oh.exports=class extends Fv{constructor(t){super({objectMode:!0});if(!t)throw Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=t}_write(t,r,i){if(t.exception)return this.transport.log(t,i);return i(),!0}}});var La=b(function(Mx,lh){var mi=j("os"),Cv=di(),Na=on()("winston:exception"),jv=Ra(),gi=Ta(),Iv=uh();lh.exports=class{constructor(t){if(!t)throw Error("Logger is required to handle exceptions");this.logger=t,this.handlers=new Map}handle(...t){if(t.forEach((r)=>{if(Array.isArray(r))return r.forEach((i)=>this._addHandler(i));this._addHandler(r)}),!this.catcher)this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher)}unhandle(){if(this.catcher)process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((t)=>this.logger.unpipe(t))}getAllInfo(t){let r=null;if(t)r=typeof t==="string"?t:t.message;return{error:t,level:"error",message:[`uncaughtException: ${r||"(no error message)"}`,t&&t.stack||" No stack trace"].join(`
|
|
29
|
+
`),stack:t&&t.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(t)}}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:mi.loadavg(),uptime:mi.uptime()}}getTrace(t){return(t?gi.parse(t):gi.get()).map((i)=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(t){if(!this.handlers.has(t)){t.handleExceptions=!0;let r=new Iv(t);this.handlers.set(t,r),this.logger.pipe(r)}}_uncaughtException(t){let r=this.getAllInfo(t),i=this._getExceptionHandlers(),a=typeof this.logger.exitOnError==="function"?this.logger.exitOnError(t):this.logger.exitOnError,u;if(!i.length&&a)console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),a=!1;function f(){if(Na("doExit",a),Na("process._exiting",process._exiting),a&&!process._exiting){if(u)clearTimeout(u);process.exit(1)}}if(!i||i.length===0)return process.nextTick(f);if(Cv(i,(c,d)=>{let g=jv(d),v=c.transport||c;function _(w){return()=>{Na(w),g()}}v._ending=!0,v.once("finish",_("finished")),v.once("error",_("error"))},()=>a&&f()),this.logger.log(r),a)u=setTimeout(f,3000)}_getExceptionHandlers(){return this.logger.transports.filter((t)=>(t.transport||t).handleExceptions)}}});var ch=b(function(Ex,fh){var{Writable:Wv}=Ut();fh.exports=class extends Wv{constructor(t){super({objectMode:!0});if(!t)throw Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=t}_write(t,r,i){if(t.rejection)return this.transport.log(t,i);return i(),!0}}});var Aa=b(function(Ox,hh){var pi=j("os"),$v=di(),Pa=on()("winston:rejection"),Hv=Ra(),yi=Ta(),Uv=ch();hh.exports=class{constructor(t){if(!t)throw Error("Logger is required to handle rejections");this.logger=t,this.handlers=new Map}handle(...t){if(t.forEach((r)=>{if(Array.isArray(r))return r.forEach((i)=>this._addHandler(i));this._addHandler(r)}),!this.catcher)this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher)}unhandle(){if(this.catcher)process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((t)=>this.logger.unpipe(t))}getAllInfo(t){let r=null;if(t)r=typeof t==="string"?t:t.message;return{error:t,level:"error",message:[`unhandledRejection: ${r||"(no error message)"}`,t&&t.stack||" No stack trace"].join(`
|
|
30
|
+
`),stack:t&&t.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(t)}}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:pi.loadavg(),uptime:pi.uptime()}}getTrace(t){return(t?yi.parse(t):yi.get()).map((i)=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(t){if(!this.handlers.has(t)){t.handleRejections=!0;let r=new Uv(t);this.handlers.set(t,r),this.logger.pipe(r)}}_unhandledRejection(t){let r=this.getAllInfo(t),i=this._getRejectionHandlers(),a=typeof this.logger.exitOnError==="function"?this.logger.exitOnError(t):this.logger.exitOnError,u;if(!i.length&&a)console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),a=!1;function f(){if(Pa("doExit",a),Pa("process._exiting",process._exiting),a&&!process._exiting){if(u)clearTimeout(u);process.exit(1)}}if(!i||i.length===0)return process.nextTick(f);if($v(i,(c,d)=>{let g=Hv(d),v=c.transport||c;function _(w){return()=>{Pa(w),g()}}v._ending=!0,v.once("finish",_("finished")),v.once("error",_("error"))},()=>a&&f()),this.logger.log(r),a)u=setTimeout(f,3000)}_getRejectionHandlers(){return this.logger.transports.filter((t)=>(t.transport||t).handleRejections)}}});var gh=b(function(Dx,mh){class dh{constructor(e){let t=_i();if(typeof e!=="object"||Array.isArray(e)||!(e instanceof t))throw Error("Logger is required for profiling");else this.logger=e,this.start=Date.now()}done(...e){if(typeof e[e.length-1]==="function")console.warn("Callback function no longer supported as of winston@3.0.0"),e.pop();let t=typeof e[e.length-1]==="object"?e.pop():{};return t.level=t.level||"info",t.durationMs=Date.now()-this.start,this.logger.write(t)}}mh.exports=dh});var _i=b(function(kx,bh){var{Stream:Gv,Transform:Vv}=Ut(),ph=di(),{LEVEL:et,SPLAT:yh}=le(),_h=Ma(),zv=La(),Bv=Aa(),Zv=Gs(),Jv=gh(),{warn:Kv}=ps(),wh=ci(),Qv=/%[scdjifoO%]/g;class qa extends Vv{constructor(e){super({objectMode:!0});this.configure(e)}child(e){let t=this;return Object.create(t,{write:{value:function(r){let i=Object.assign({},e,r);if(r instanceof Error)i.stack=r.stack,i.message=r.message,i.cause=r.cause;t.write(i)}}})}configure({silent:e,format:t,defaultMeta:r,levels:i,level:a="info",exitOnError:u=!0,transports:f,colors:c,emitErrs:d,formatters:g,padLevels:v,rewriters:_,stripColors:w,exceptionHandlers:E,rejectionHandlers:p}={}){if(this.transports.length)this.clear();if(this.silent=e,this.format=t||this.format||cs()(),this.defaultMeta=r||null,this.levels=i||this.levels||wh.npm.levels,this.level=a,this.exceptions)this.exceptions.unhandle();if(this.rejections)this.rejections.unhandle();if(this.exceptions=new zv(this),this.rejections=new Bv(this),this.profilers={},this.exitOnError=u,f)f=Array.isArray(f)?f:[f],f.forEach((M)=>this.add(M));if(c||d||g||v||_||w)throw 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
|
+
`));if(E)this.exceptions.handle(E);if(p)this.rejections.handle(p)}getHighestLogLevel(){let e=fn(this.levels,this.level);if(!this.transports||this.transports.length===0)return e;return this.transports.reduce((t,r)=>{let i=fn(this.levels,r.level);return i!==null&&i>t?i:t},e)}isLevelEnabled(e){let t=fn(this.levels,e);if(t===null)return!1;let r=fn(this.levels,this.level);if(r===null)return!1;if(!this.transports||this.transports.length===0)return r>=t;return this.transports.findIndex((a)=>{let u=fn(this.levels,a.level);if(u===null)u=r;return u>=t})!==-1}log(e,t,...r){if(arguments.length===1)return e[et]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2){if(t&&typeof t==="object")return t[et]=t.level=e,this._addDefaultMeta(t),this.write(t),this;return t={[et]:e,level:e,message:t},this._addDefaultMeta(t),this.write(t),this}let[i]=r;if(typeof i==="object"&&i!==null){if(!(t&&t.match&&t.match(Qv))){let u=Object.assign({},this.defaultMeta,i,{[et]:e,[yh]:r,level:e,message:t});if(i.message)u.message=`${u.message} ${i.message}`;if(i.stack)u.stack=i.stack;if(i.cause)u.cause=i.cause;return this.write(u),this}}return this.write(Object.assign({},this.defaultMeta,{[et]:e,[yh]:r,level:e,message:t})),this}_transform(e,t,r){if(this.silent)return r();if(!e[et])e[et]=e.level;if(!this.levels[e[et]]&&this.levels[e[et]]!==0)console.error("[winston] Unknown logger level: %s",e[et]);if(!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,r()}}_final(e){let t=this.transports.slice();ph(t,(r,i)=>{if(!r||r.finished)return setImmediate(i);r.once("finish",i),r.end()},e)}add(e){let t=!_h(e)||e.log.length>2?new Zv({transport:e}):e;if(!t._writableState||!t._writableState.objectMode)throw Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");if(this._onEvent("error",t),this._onEvent("warn",t),this.pipe(t),e.handleExceptions)this.exceptions.handle();if(e.handleRejections)this.rejections.handle();return this}remove(e){if(!e)return this;let t=e;if(!_h(e)||e.log.length>2)t=this.transports.filter((r)=>r.transport===e)[0];if(t)this.unpipe(t);return this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){Kv.deprecated("setLevels")}query(e,t){if(typeof e==="function")t=e,e={};e=e||{};let r={},i=Object.assign({},e.query||{});function a(f,c){if(e.query&&typeof f.formatQuery==="function")e.query=f.formatQuery(i);f.query(e,(d,g)=>{if(d)return c(d);if(typeof f.formatResults==="function")g=f.formatResults(g,e.format);c(null,g)})}function u(f,c){a(f,(d,g)=>{if(c){if(g=d||g,g)r[f.name]=g;c()}c=null})}ph(this.transports.filter((f)=>!!f.query),u,()=>t(null,r))}stream(e={}){let t=new Gv,r=[];return t._streams=r,t.destroy=()=>{let i=r.length;while(i--)r[i].destroy()},this.transports.filter((i)=>!!i.stream).forEach((i)=>{let a=i.stream(e);if(!a)return;r.push(a),a.on("log",(u)=>{u.transport=u.transport||[],u.transport.push(i.name),t.emit("log",u)}),a.on("error",(u)=>{u.transport=u.transport||[],u.transport.push(i.name),t.emit("error",u)})}),t}startTimer(){return new Jv(this)}profile(e,...t){let r=Date.now();if(this.profilers[e]){let i=this.profilers[e];if(delete this.profilers[e],typeof t[t.length-2]==="function")console.warn("Callback function no longer supported as of winston@3.0.0"),t.pop();let a=typeof t[t.length-1]==="object"?t.pop():{};return a.level=a.level||"info",a.durationMs=r-i,a.message=a.message||e,this.write(a)}return this.profilers[e]=r,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 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,t){function r(i){if(e==="error"&&!this.transports.includes(t))this.add(t);this.emit(e,i,t)}if(!t["__winston"+e])t["__winston"+e]=r.bind(this),t.on(e,t["__winston"+e])}_addDefaultMeta(e){if(this.defaultMeta)Object.assign(e,this.defaultMeta)}}function fn(e,t){let r=e[t];if(!r&&r!==0)return null;return r}Object.defineProperty(qa.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:e}=this._readableState;return!Array.isArray(e)?[e].filter(Boolean):e}});bh.exports=qa});var Ya=b(function(Rx,Sh){var{LEVEL:Xv}=le(),vh=ci(),eS=_i(),tS=on()("winston:create-logger");function rS(e){return"is"+e.charAt(0).toUpperCase()+e.slice(1)+"Enabled"}Sh.exports=function(e={}){e.levels=e.levels||vh.npm.levels;class t extends eS{constructor(i){super(i)}}let r=new t(e);return Object.keys(e.levels).forEach(function(i){if(tS('Define prototype method for "%s"',i),i==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}t.prototype[i]=function(...a){let u=this||r;if(a.length===1){let[f]=a,c=f&&f.message&&f||{message:f};return c.level=c[Xv]=i,u._addDefaultMeta(c),u.write(c),this||r}if(a.length===0)return u.log(i,""),u;return u.log(i,...a)},t.prototype[rS(i)]=function(){return(this||r).isLevelEnabled(i)}}),r}});var Mh=b(function(Tx,xh){var nS=Ya();xh.exports=class{constructor(t={}){this.loggers=new Map,this.options=t}add(t,r){if(!this.loggers.has(t)){r=Object.assign({},r||this.options);let i=r.transports||this.options.transports;if(i)r.transports=Array.isArray(i)?i.slice():[i];else r.transports=[];let a=nS(r);a.on("close",()=>this._delete(t)),this.loggers.set(t,a)}return this.loggers.get(t)}get(t,r){return this.add(t,r)}has(t){return!!this.loggers.has(t)}close(t){if(t)return this._removeLogger(t);this.loggers.forEach((r,i)=>this._removeLogger(i))}_removeLogger(t){if(!this.loggers.has(t))return;this.loggers.get(t).close(),this._delete(t)}_delete(t){this.loggers.delete(t)}}});var Fa=b(function(Ae){var wi=ms(),{warn:cn}=ps();Ae.version=yl().version;Ae.transports=Kc();Ae.config=ci();Ae.addColors=wi.levels;Ae.format=wi.format;Ae.createLogger=Ya();Ae.Logger=_i();Ae.ExceptionHandler=La();Ae.RejectionHandler=Aa();Ae.Container=Mh();Ae.Transport=$t();Ae.loggers=new Ae.Container;var tt=Ae.createLogger();Object.keys(Ae.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach((e)=>Ae[e]=(...t)=>tt[e](...t));Object.defineProperty(Ae,"level",{get(){return tt.level},set(e){tt.level=e}});Object.defineProperty(Ae,"exceptions",{get(){return tt.exceptions}});Object.defineProperty(Ae,"rejections",{get(){return tt.rejections}});["exitOnError"].forEach((e)=>{Object.defineProperty(Ae,e,{get(){return tt[e]},set(t){tt[e]=t}})});Object.defineProperty(Ae,"default",{get(){return{exceptionHandlers:tt.exceptionHandlers,rejectionHandlers:tt.rejectionHandlers,transports:tt.transports}}});cn.deprecated(Ae,"setLevels");cn.forFunctions(Ae,"useFormat",["cli"]);cn.forProperties(Ae,"useFormat",["padLevels","stripColors"]);cn.forFunctions(Ae,"deprecated",["addRewriter","addFilter","clone","extend"]);cn.forProperties(Ae,"deprecated",["emitErrs","levelLength"])});var Ph=b(function(Vt,Lh){var Ca=j("crypto");Vt=Lh.exports=hn;function hn(e,t){return t=Th(e,t),dS(e,t)}Vt.sha1=function(e){return hn(e)};Vt.keys=function(e){return hn(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})};Vt.MD5=function(e){return hn(e,{algorithm:"md5",encoding:"hex"})};Vt.keysMD5=function(e){return hn(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var Er=Ca.getHashes?Ca.getHashes().slice():["sha1","md5"];Er.push("passthrough");var kh=["buffer","hex","binary","base64"];function Th(e,t){t=t||{};var r={};if(r.algorithm=t.algorithm||"sha1",r.encoding=t.encoding||"hex",r.excludeValues=t.excludeValues?!0:!1,r.algorithm=r.algorithm.toLowerCase(),r.encoding=r.encoding.toLowerCase(),r.ignoreUnknown=t.ignoreUnknown!==!0?!1:!0,r.respectType=t.respectType===!1?!1:!0,r.respectFunctionNames=t.respectFunctionNames===!1?!1:!0,r.respectFunctionProperties=t.respectFunctionProperties===!1?!1:!0,r.unorderedArrays=t.unorderedArrays!==!0?!1:!0,r.unorderedSets=t.unorderedSets===!1?!1:!0,r.unorderedObjects=t.unorderedObjects===!1?!1:!0,r.replacer=t.replacer||void 0,r.excludeKeys=t.excludeKeys||void 0,typeof e>"u")throw Error("Object argument required.");for(var i=0;i<Er.length;++i)if(Er[i].toLowerCase()===r.algorithm.toLowerCase())r.algorithm=Er[i];if(Er.indexOf(r.algorithm)===-1)throw Error('Algorithm "'+r.algorithm+'" not supported. supported values: '+Er.join(", "));if(kh.indexOf(r.encoding)===-1&&r.algorithm!=="passthrough")throw Error('Encoding "'+r.encoding+'" not supported. supported values: '+kh.join(", "));return r}function Rh(e){if(typeof e!=="function")return!1;var t=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i;return t.exec(Function.prototype.toString.call(e))!=null}function dS(e,t){var r;if(t.algorithm!=="passthrough")r=Ca.createHash(t.algorithm);else r=new Nh;if(typeof r.write>"u")r.write=r.update,r.end=r.update;var i=ja(t,r);if(i.dispatch(e),!r.update)r.end("");if(r.digest)return r.digest(t.encoding==="buffer"?void 0:t.encoding);var a=r.read();if(t.encoding==="buffer")return a;return a.toString(t.encoding)}Vt.writeToStream=function(e,t,r){if(typeof r>"u")r=t,t={};return t=Th(e,t),ja(t,r).dispatch(e)};function ja(e,t,r){r=r||[];var i=function(a){if(t.update)return t.update(a,"utf8");else return t.write(a,"utf8")};return{dispatch:function(a){if(e.replacer)a=e.replacer(a);var u=typeof a;if(a===null)u="null";return this["_"+u](a)},_object:function(a){var u=/\[object (.*)\]/i,f=Object.prototype.toString.call(a),c=u.exec(f);if(!c)c="unknown:["+f+"]";else c=c[1];c=c.toLowerCase();var d=null;if((d=r.indexOf(a))>=0)return this.dispatch("[CIRCULAR:"+d+"]");else r.push(a);if(typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(a))return i("buffer:"),i(a);if(c!=="object"&&c!=="function"&&c!=="asyncfunction")if(this["_"+c])this["_"+c](a);else if(e.ignoreUnknown)return i("["+c+"]");else throw Error('Unknown object type "'+c+'"');else{var g=Object.keys(a);if(e.unorderedObjects)g=g.sort();if(e.respectType!==!1&&!Rh(a))g.splice(0,0,"prototype","__proto__","constructor");if(e.excludeKeys)g=g.filter(function(_){return!e.excludeKeys(_)});i("object:"+g.length+":");var v=this;return g.forEach(function(_){if(v.dispatch(_),i(":"),!e.excludeValues)v.dispatch(a[_]);i(",")})}},_array:function(a,u){u=typeof u<"u"?u:e.unorderedArrays!==!1;var f=this;if(i("array:"+a.length+":"),!u||a.length<=1)return a.forEach(function(g){return f.dispatch(g)});var c=[],d=a.map(function(g){var v=new Nh,_=r.slice(),w=ja(e,v,_);return w.dispatch(g),c=c.concat(_.slice(r.length)),v.read().toString()});return r=r.concat(c),d.sort(),this._array(d,!1)},_date:function(a){return i("date:"+a.toJSON())},_symbol:function(a){return i("symbol:"+a.toString())},_error:function(a){return i("error:"+a.toString())},_boolean:function(a){return i("bool:"+a.toString())},_string:function(a){i("string:"+a.length+":"),i(a.toString())},_function:function(a){if(i("fn:"),Rh(a))this.dispatch("[native]");else this.dispatch(a.toString());if(e.respectFunctionNames!==!1)this.dispatch("function-name:"+String(a.name));if(e.respectFunctionProperties)this._object(a)},_number:function(a){return i("number:"+a.toString())},_xml:function(a){return i("xml:"+a.toString())},_null:function(){return i("Null")},_undefined:function(){return i("Undefined")},_regexp:function(a){return i("regex:"+a.toString())},_uint8array:function(a){return i("uint8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint8clampedarray:function(a){return i("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(a))},_int8array:function(a){return i("int8array:"),this.dispatch(Array.prototype.slice.call(a))},_uint16array:function(a){return i("uint16array:"),this.dispatch(Array.prototype.slice.call(a))},_int16array:function(a){return i("int16array:"),this.dispatch(Array.prototype.slice.call(a))},_uint32array:function(a){return i("uint32array:"),this.dispatch(Array.prototype.slice.call(a))},_int32array:function(a){return i("int32array:"),this.dispatch(Array.prototype.slice.call(a))},_float32array:function(a){return i("float32array:"),this.dispatch(Array.prototype.slice.call(a))},_float64array:function(a){return i("float64array:"),this.dispatch(Array.prototype.slice.call(a))},_arraybuffer:function(a){return i("arraybuffer:"),this.dispatch(new Uint8Array(a))},_url:function(a){return i("url:"+a.toString(),"utf8")},_map:function(a){i("map:");var u=Array.from(a);return this._array(u,e.unorderedSets!==!1)},_set:function(a){i("set:");var u=Array.from(a);return this._array(u,e.unorderedSets!==!1)},_file:function(a){return i("file:"),this.dispatch([a.name,a.size,a.type,a.lastModfied])},_blob:function(){if(e.ignoreUnknown)return i("[blob]");throw Error(`Hashing Blob objects is currently not supported
|
|
33
33
|
(see https://github.com/puleos/object-hash/issues/26)
|
|
34
34
|
Use "options.replacer" or "options.ignoreUnknown"
|
|
35
|
-
`)},_domwindow:function(){return i("domwindow")},_bigint:function(a){return i("bigint:"+a.toString())},_process:function(){return i("process")},_timer:function(){return i("timer")},_pipe:function(){return i("pipe")},_tcp:function(){return i("tcp")},_udp:function(){return i("udp")},_tty:function(){return i("tty")},_statwatcher:function(){return i("statwatcher")},_securecontext:function(){return i("securecontext")},_connection:function(){return i("connection")},_zlib:function(){return i("zlib")},_context:function(){return i("context")},_nodescript:function(){return i("nodescript")},_httpparser:function(){return i("httpparser")},_dataview:function(){return i("dataview")},_signal:function(){return i("signal")},_fsevent:function(){return i("fsevent")},_tlswrap:function(){return i("tlswrap")}}}function
|
|
35
|
+
`)},_domwindow:function(){return i("domwindow")},_bigint:function(a){return i("bigint:"+a.toString())},_process:function(){return i("process")},_timer:function(){return i("timer")},_pipe:function(){return i("pipe")},_tcp:function(){return i("tcp")},_udp:function(){return i("udp")},_tty:function(){return i("tty")},_statwatcher:function(){return i("statwatcher")},_securecontext:function(){return i("securecontext")},_connection:function(){return i("connection")},_zlib:function(){return i("zlib")},_context:function(){return i("context")},_nodescript:function(){return i("nodescript")},_httpparser:function(){return i("httpparser")},_dataview:function(){return i("dataview")},_signal:function(){return i("signal")},_fsevent:function(){return i("fsevent")},_tlswrap:function(){return i("tlswrap")}}}function Nh(){return{buf:"",write:function(e){this.buf+=e},end:function(e){this.buf+=e},read:function(){return this.buf}}}});var Ah=b(function(Ia,Or){//! moment.js
|
|
36
36
|
//! version : 2.30.1
|
|
37
37
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
38
38
|
//! license : MIT
|
|
39
39
|
//! momentjs.com
|
|
40
|
-
(function(e,t){typeof
|
|
40
|
+
(function(e,t){typeof Ia==="object"&&typeof Or<"u"?Or.exports=t():typeof define==="function"&&define.amd?define(t):e.moment=t()})(Ia,function(){var e;function t(){return e.apply(null,arguments)}function r(n){e=n}function i(n){return n instanceof Array||Object.prototype.toString.call(n)==="[object Array]"}function a(n){return n!=null&&Object.prototype.toString.call(n)==="[object Object]"}function u(n,s){return Object.prototype.hasOwnProperty.call(n,s)}function f(n){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(n).length===0;else{var s;for(s in n)if(u(n,s))return!1;return!0}}function c(n){return n===void 0}function d(n){return typeof n==="number"||Object.prototype.toString.call(n)==="[object Number]"}function g(n){return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}function v(n,s){var o=[],l,h=n.length;for(l=0;l<h;++l)o.push(s(n[l],l));return o}function _(n,s){for(var o in s)if(u(s,o))n[o]=s[o];if(u(s,"toString"))n.toString=s.toString;if(u(s,"valueOf"))n.valueOf=s.valueOf;return n}function w(n,s,o,l){return co(n,s,o,l,!0).utc()}function E(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function p(n){if(n._pf==null)n._pf=E();return n._pf}var M;if(Array.prototype.some)M=Array.prototype.some;else M=function(n){var s=Object(this),o=s.length>>>0,l;for(l=0;l<o;l++)if(l in s&&n.call(this,s[l],l,s))return!0;return!1};function P(n){var s=null,o=!1,l=n._d&&!isNaN(n._d.getTime());if(l){if(s=p(n),o=M.call(s.parsedDateParts,function(h){return h!=null}),l=s.overflow<0&&!s.empty&&!s.invalidEra&&!s.invalidMonth&&!s.invalidWeekday&&!s.weekdayMismatch&&!s.nullInput&&!s.invalidFormat&&!s.userInvalidated&&(!s.meridiem||s.meridiem&&o),n._strict)l=l&&s.charsLeftOver===0&&s.unusedTokens.length===0&&s.bigHour===void 0}if(Object.isFrozen==null||!Object.isFrozen(n))n._isValid=l;else return l;return n._isValid}function A(n){var s=w(NaN);if(n!=null)_(p(s),n);else p(s).userInvalidated=!0;return s}var W=t.momentProperties=[],O=!1;function N(n,s){var o,l,h,m=W.length;if(!c(s._isAMomentObject))n._isAMomentObject=s._isAMomentObject;if(!c(s._i))n._i=s._i;if(!c(s._f))n._f=s._f;if(!c(s._l))n._l=s._l;if(!c(s._strict))n._strict=s._strict;if(!c(s._tzm))n._tzm=s._tzm;if(!c(s._isUTC))n._isUTC=s._isUTC;if(!c(s._offset))n._offset=s._offset;if(!c(s._pf))n._pf=p(s);if(!c(s._locale))n._locale=s._locale;if(m>0){for(o=0;o<m;o++)if(l=W[o],h=s[l],!c(h))n[l]=h}return n}function Z(n){if(N(this,n),this._d=new Date(n._d!=null?n._d.getTime():NaN),!this.isValid())this._d=new Date(NaN);if(O===!1)O=!0,t.updateOffset(this),O=!1}function Y(n){return n instanceof Z||n!=null&&n._isAMomentObject!=null}function H(n){if(t.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn)console.warn("Deprecation warning: "+n)}function I(n,s){var o=!0;return _(function(){if(t.deprecationHandler!=null)t.deprecationHandler(null,n);if(o){var l=[],h,m,y,k=arguments.length;for(m=0;m<k;m++){if(h="",typeof arguments[m]==="object"){h+=`
|
|
41
41
|
[`+m+"] ";for(y in arguments[0])if(u(arguments[0],y))h+=y+": "+arguments[0][y]+", ";h=h.slice(0,-2)}else h=arguments[m];l.push(h)}H(n+`
|
|
42
42
|
Arguments: `+Array.prototype.slice.call(l).join("")+`
|
|
43
|
-
`+Error().stack),o=!1}return s.apply(this,arguments)},s)}var F={};function ue(n,s){if(t.deprecationHandler!=null)t.deprecationHandler(n,s);if(!F[n])H(s),F[n]=!0}t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;function ee(n){return typeof Function<"u"&&n instanceof Function||Object.prototype.toString.call(n)==="[object Function]"}function fe(n){var s,o;for(o in n)if(u(n,o))if(s=n[o],ee(s))this[o]=s;else this["_"+o]=s;this._config=n,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function _e(n,s){var o=_({},n),l;for(l in s)if(u(s,l))if(a(n[l])&&a(s[l]))o[l]={},_(o[l],n[l]),_(o[l],s[l]);else if(s[l]!=null)o[l]=s[l];else delete o[l];for(l in n)if(u(n,l)&&!u(s,l)&&a(n[l]))o[l]=_({},o[l]);return o}function we(n){if(n!=null)this.set(n)}var Ue;if(Object.keys)Ue=Object.keys;else Ue=function(n){var s,o=[];for(s in n)if(u(n,s))o.push(s);return o};var S={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function T(n,s,o){var l=this._calendar[n]||this._calendar.sameElse;return ee(l)?l.call(s,o):l}function z(n,s,o){var l=""+Math.abs(n),h=s-l.length,m=n>=0;return(m?o?"+":"":"-")+Math.pow(10,Math.max(0,h)).toString().substr(1)+l}var ge=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,q=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Oe={},ke={};function L(n,s,o,l){var h=l;if(typeof l==="string")h=function(){return this[l]()};if(n)ke[n]=h;if(s)ke[s[0]]=function(){return z(h.apply(this,arguments),s[1],s[2])};if(o)ke[o]=function(){return this.localeData().ordinal(h.apply(this,arguments),n)}}function Gt(n){if(n.match(/\[[\s\S]/))return n.replace(/^\[|\]$/g,"");return n.replace(/\\/g,"")}function hn(n){var s=n.match(ge),o,l;for(o=0,l=s.length;o<l;o++)if(ke[s[o]])s[o]=ke[s[o]];else s[o]=Gt(s[o]);return function(h){var m="",y;for(y=0;y<l;y++)m+=ee(s[y])?s[y].call(h,n):s[y];return m}}function tt(n,s){if(!n.isValid())return n.localeData().invalidDate();return s=dn(s,n.localeData()),Oe[s]=Oe[s]||hn(s),Oe[s](n)}function dn(n,s){var o=5;function l(h){return s.longDateFormat(h)||h}q.lastIndex=0;while(o>=0&&q.test(n))n=n.replace(q,l),q.lastIndex=0,o-=1;return n}var Ne={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function mn(n){var s=this._longDateFormat[n],o=this._longDateFormat[n.toUpperCase()];if(s||!o)return s;return this._longDateFormat[n]=o.match(ge).map(function(l){if(l==="MMMM"||l==="MM"||l==="DD"||l==="dddd")return l.slice(1);return l}).join(""),this._longDateFormat[n]}var di="Invalid date";function gn(){return this._invalidDate}var pn="%d",Vt=/\d{1,2}/;function Bt(n){return this._ordinal.replace("%d",n)}var mi={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function kt(n,s,o,l){var h=this._relativeTime[o];return ee(h)?h(n,s,o,l):h.replace(/%d/i,n)}function mt(n,s){var o=this._relativeTime[n>0?"future":"past"];return ee(o)?o(s):o.replace(/%s/i,s)}var Zt={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function De(n){return typeof n==="string"?Zt[n]||Zt[n.toLowerCase()]:void 0}function Jt(n){var s={},o,l;for(l in n)if(u(n,l)){if(o=De(l),o)s[o]=n[l]}return s}var jh={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ih(n){var s=[],o;for(o in n)if(u(n,o))s.push({unit:o,priority:jh[o]});return s.sort(function(l,h){return l.priority-h.priority}),s}var Ya=/\d/,Le=/\d\d/,Fa=/\d{3}/,gi=/\d{4}/,yn=/[+-]?\d{6}/,te=/\d\d?/,Ca=/\d\d\d\d?/,ja=/\d\d\d\d\d\d?/,_n=/\d{1,3}/,pi=/\d{1,4}/,wn=/[+-]?\d{1,6}/,Kt=/\d+/,bn=/[+-]?\d+/,Wh=/Z|[+-]\d\d:?\d\d/gi,vn=/Z|[+-]\d\d(?::?\d\d)?/gi,$h=/[+-]?\d+(\.\d{1,3})?/,Or=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Qt=/^[1-9]\d?/,yi=/^([1-9]\d|\d)/,Sn;Sn={};function R(n,s,o){Sn[n]=ee(s)?s:function(l,h){return l&&o?o:s}}function Hh(n,s){if(!u(Sn,n))return new RegExp(Uh(n));return Sn[n](s._strict,s._locale)}function Uh(n){return rt(n.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(s,o,l,h,m){return o||l||h||m}))}function rt(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ae(n){if(n<0)return Math.ceil(n)||0;else return Math.floor(n)}function V(n){var s=+n,o=0;if(s!==0&&isFinite(s))o=Ae(s);return o}var _i={};function X(n,s){var o,l=s,h;if(typeof n==="string")n=[n];if(d(s))l=function(m,y){y[s]=V(m)};h=n.length;for(o=0;o<h;o++)_i[n[o]]=l}function kr(n,s){X(n,function(o,l,h,m){h._w=h._w||{},s(o,h._w,h,m)})}function zh(n,s,o){if(s!=null&&u(_i,n))_i[n](s,o._a,o,n)}function xn(n){return n%4===0&&n%100!==0||n%400===0}var ve=0,nt=1,ze=2,ce=3,Fe=4,it=5,Dt=6,Gh=7,Vh=8;L("Y",0,0,function(){var n=this.year();return n<=9999?z(n,4):"+"+n}),L(0,["YY",2],0,function(){return this.year()%100}),L(0,["YYYY",4],0,"year"),L(0,["YYYYY",5],0,"year"),L(0,["YYYYYY",6,!0],0,"year"),R("Y",bn),R("YY",te,Le),R("YYYY",pi,gi),R("YYYYY",wn,yn),R("YYYYYY",wn,yn),X(["YYYYY","YYYYYY"],ve),X("YYYY",function(n,s){s[ve]=n.length===2?t.parseTwoDigitYear(n):V(n)}),X("YY",function(n,s){s[ve]=t.parseTwoDigitYear(n)}),X("Y",function(n,s){s[ve]=parseInt(n,10)});function Dr(n){return xn(n)?366:365}t.parseTwoDigitYear=function(n){return V(n)+(V(n)>68?1900:2000)};var Ia=Xt("FullYear",!0);function Bh(){return xn(this.year())}function Xt(n,s){return function(o){if(o!=null)return Wa(this,n,o),t.updateOffset(this,s),this;else return Rr(this,n)}}function Rr(n,s){if(!n.isValid())return NaN;var{_d:o,_isUTC:l}=n;switch(s){case"Milliseconds":return l?o.getUTCMilliseconds():o.getMilliseconds();case"Seconds":return l?o.getUTCSeconds():o.getSeconds();case"Minutes":return l?o.getUTCMinutes():o.getMinutes();case"Hours":return l?o.getUTCHours():o.getHours();case"Date":return l?o.getUTCDate():o.getDate();case"Day":return l?o.getUTCDay():o.getDay();case"Month":return l?o.getUTCMonth():o.getMonth();case"FullYear":return l?o.getUTCFullYear():o.getFullYear();default:return NaN}}function Wa(n,s,o){var l,h,m,y,D;if(!n.isValid()||isNaN(o))return;switch(l=n._d,h=n._isUTC,s){case"Milliseconds":return void(h?l.setUTCMilliseconds(o):l.setMilliseconds(o));case"Seconds":return void(h?l.setUTCSeconds(o):l.setSeconds(o));case"Minutes":return void(h?l.setUTCMinutes(o):l.setMinutes(o));case"Hours":return void(h?l.setUTCHours(o):l.setHours(o));case"Date":return void(h?l.setUTCDate(o):l.setDate(o));case"FullYear":break;default:return}m=o,y=n.month(),D=n.date(),D=D===29&&y===1&&!xn(m)?28:D,h?l.setUTCFullYear(m,y,D):l.setFullYear(m,y,D)}function Zh(n){if(n=De(n),ee(this[n]))return this[n]();return this}function Jh(n,s){if(typeof n==="object"){n=Jt(n);var o=Ih(n),l,h=o.length;for(l=0;l<h;l++)this[o[l].unit](n[o[l].unit])}else if(n=De(n),ee(this[n]))return this[n](s);return this}function Kh(n,s){return(n%s+s)%s}var ae;if(Array.prototype.indexOf)ae=Array.prototype.indexOf;else ae=function(n){var s;for(s=0;s<this.length;++s)if(this[s]===n)return s;return-1};function wi(n,s){if(isNaN(n)||isNaN(s))return NaN;var o=Kh(s,12);return n+=(s-o)/12,o===1?xn(n)?29:28:31-o%7%2}L("M",["MM",2],"Mo",function(){return this.month()+1}),L("MMM",0,0,function(n){return this.localeData().monthsShort(this,n)}),L("MMMM",0,0,function(n){return this.localeData().months(this,n)}),R("M",te,Qt),R("MM",te,Le),R("MMM",function(n,s){return s.monthsShortRegex(n)}),R("MMMM",function(n,s){return s.monthsRegex(n)}),X(["M","MM"],function(n,s){s[nt]=V(n)-1}),X(["MMM","MMMM"],function(n,s,o,l){var h=o._locale.monthsParse(n,l,o._strict);if(h!=null)s[nt]=h;else p(o).invalidMonth=n});var Qh="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),$a="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ha=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Xh=Or,ed=Or;function td(n,s){if(!n)return i(this._months)?this._months:this._months.standalone;return i(this._months)?this._months[n.month()]:this._months[(this._months.isFormat||Ha).test(s)?"format":"standalone"][n.month()]}function rd(n,s){if(!n)return i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone;return i(this._monthsShort)?this._monthsShort[n.month()]:this._monthsShort[Ha.test(s)?"format":"standalone"][n.month()]}function nd(n,s,o){var l,h,m,y=n.toLocaleLowerCase();if(!this._monthsParse){this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[];for(l=0;l<12;++l)m=w([2000,l]),this._shortMonthsParse[l]=this.monthsShort(m,"").toLocaleLowerCase(),this._longMonthsParse[l]=this.months(m,"").toLocaleLowerCase()}if(o)if(s==="MMM")return h=ae.call(this._shortMonthsParse,y),h!==-1?h:null;else return h=ae.call(this._longMonthsParse,y),h!==-1?h:null;else if(s==="MMM"){if(h=ae.call(this._shortMonthsParse,y),h!==-1)return h;return h=ae.call(this._longMonthsParse,y),h!==-1?h:null}else{if(h=ae.call(this._longMonthsParse,y),h!==-1)return h;return h=ae.call(this._shortMonthsParse,y),h!==-1?h:null}}function id(n,s,o){var l,h,m;if(this._monthsParseExact)return nd.call(this,n,s,o);if(!this._monthsParse)this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[];for(l=0;l<12;l++){if(h=w([2000,l]),o&&!this._longMonthsParse[l])this._longMonthsParse[l]=new RegExp("^"+this.months(h,"").replace(".","")+"$","i"),this._shortMonthsParse[l]=new RegExp("^"+this.monthsShort(h,"").replace(".","")+"$","i");if(!o&&!this._monthsParse[l])m="^"+this.months(h,"")+"|^"+this.monthsShort(h,""),this._monthsParse[l]=new RegExp(m.replace(".",""),"i");if(o&&s==="MMMM"&&this._longMonthsParse[l].test(n))return l;else if(o&&s==="MMM"&&this._shortMonthsParse[l].test(n))return l;else if(!o&&this._monthsParse[l].test(n))return l}}function Ua(n,s){if(!n.isValid())return n;if(typeof s==="string"){if(/^\d+$/.test(s))s=V(s);else if(s=n.localeData().monthsParse(s),!d(s))return n}var o=s,l=n.date();return l=l<29?l:Math.min(l,wi(n.year(),o)),n._isUTC?n._d.setUTCMonth(o,l):n._d.setMonth(o,l),n}function za(n){if(n!=null)return Ua(this,n),t.updateOffset(this,!0),this;else return Rr(this,"Month")}function sd(){return wi(this.year(),this.month())}function ad(n){if(this._monthsParseExact){if(!u(this,"_monthsRegex"))Ga.call(this);if(n)return this._monthsShortStrictRegex;else return this._monthsShortRegex}else{if(!u(this,"_monthsShortRegex"))this._monthsShortRegex=Xh;return this._monthsShortStrictRegex&&n?this._monthsShortStrictRegex:this._monthsShortRegex}}function od(n){if(this._monthsParseExact){if(!u(this,"_monthsRegex"))Ga.call(this);if(n)return this._monthsStrictRegex;else return this._monthsRegex}else{if(!u(this,"_monthsRegex"))this._monthsRegex=ed;return this._monthsStrictRegex&&n?this._monthsStrictRegex:this._monthsRegex}}function Ga(){function n(C,Z){return Z.length-C.length}var s=[],o=[],l=[],h,m,y,D;for(h=0;h<12;h++)m=w([2000,h]),y=rt(this.monthsShort(m,"")),D=rt(this.months(m,"")),s.push(y),o.push(D),l.push(D),l.push(y);s.sort(n),o.sort(n),l.sort(n),this._monthsRegex=new RegExp("^("+l.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function ud(n,s,o,l,h,m,y){var D;if(n<100&&n>=0){if(D=new Date(n+400,s,o,l,h,m,y),isFinite(D.getFullYear()))D.setFullYear(n)}else D=new Date(n,s,o,l,h,m,y);return D}function Tr(n){var s,o;if(n<100&&n>=0){if(o=Array.prototype.slice.call(arguments),o[0]=n+400,s=new Date(Date.UTC.apply(null,o)),isFinite(s.getUTCFullYear()))s.setUTCFullYear(n)}else s=new Date(Date.UTC.apply(null,arguments));return s}function Mn(n,s,o){var l=7+s-o,h=(7+Tr(n,0,l).getUTCDay()-s)%7;return-h+l-1}function Va(n,s,o,l,h){var m=(7+o-l)%7,y=Mn(n,l,h),D=1+7*(s-1)+m+y,C,Z;if(D<=0)C=n-1,Z=Dr(C)+D;else if(D>Dr(n))C=n+1,Z=D-Dr(n);else C=n,Z=D;return{year:C,dayOfYear:Z}}function Nr(n,s,o){var l=Mn(n.year(),s,o),h=Math.floor((n.dayOfYear()-l-1)/7)+1,m,y;if(h<1)y=n.year()-1,m=h+st(y,s,o);else if(h>st(n.year(),s,o))m=h-st(n.year(),s,o),y=n.year()+1;else y=n.year(),m=h;return{week:m,year:y}}function st(n,s,o){var l=Mn(n,s,o),h=Mn(n+1,s,o);return(Dr(n)-l+h)/7}L("w",["ww",2],"wo","week"),L("W",["WW",2],"Wo","isoWeek"),R("w",te,Qt),R("ww",te,Le),R("W",te,Qt),R("WW",te,Le),kr(["w","ww","W","WW"],function(n,s,o,l){s[l.substr(0,1)]=V(n)});function ld(n){return Nr(n,this._week.dow,this._week.doy).week}var fd={dow:0,doy:6};function cd(){return this._week.dow}function hd(){return this._week.doy}function dd(n){var s=this.localeData().week(this);return n==null?s:this.add((n-s)*7,"d")}function md(n){var s=Nr(this,1,4).week;return n==null?s:this.add((n-s)*7,"d")}L("d",0,"do","day"),L("dd",0,0,function(n){return this.localeData().weekdaysMin(this,n)}),L("ddd",0,0,function(n){return this.localeData().weekdaysShort(this,n)}),L("dddd",0,0,function(n){return this.localeData().weekdays(this,n)}),L("e",0,0,"weekday"),L("E",0,0,"isoWeekday"),R("d",te),R("e",te),R("E",te),R("dd",function(n,s){return s.weekdaysMinRegex(n)}),R("ddd",function(n,s){return s.weekdaysShortRegex(n)}),R("dddd",function(n,s){return s.weekdaysRegex(n)}),kr(["dd","ddd","dddd"],function(n,s,o,l){var h=o._locale.weekdaysParse(n,l,o._strict);if(h!=null)s.d=h;else p(o).invalidWeekday=n}),kr(["d","e","E"],function(n,s,o,l){s[l]=V(n)});function gd(n,s){if(typeof n!=="string")return n;if(!isNaN(n))return parseInt(n,10);if(n=s.weekdaysParse(n),typeof n==="number")return n;return null}function pd(n,s){if(typeof n==="string")return s.weekdaysParse(n)%7||7;return isNaN(n)?null:n}function bi(n,s){return n.slice(s,7).concat(n.slice(0,s))}var yd="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ba="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),_d="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),wd=Or,bd=Or,vd=Or;function Sd(n,s){var o=i(this._weekdays)?this._weekdays:this._weekdays[n&&n!==!0&&this._weekdays.isFormat.test(s)?"format":"standalone"];return n===!0?bi(o,this._week.dow):n?o[n.day()]:o}function xd(n){return n===!0?bi(this._weekdaysShort,this._week.dow):n?this._weekdaysShort[n.day()]:this._weekdaysShort}function Md(n){return n===!0?bi(this._weekdaysMin,this._week.dow):n?this._weekdaysMin[n.day()]:this._weekdaysMin}function Ed(n,s,o){var l,h,m,y=n.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[];for(l=0;l<7;++l)m=w([2000,1]).day(l),this._minWeekdaysParse[l]=this.weekdaysMin(m,"").toLocaleLowerCase(),this._shortWeekdaysParse[l]=this.weekdaysShort(m,"").toLocaleLowerCase(),this._weekdaysParse[l]=this.weekdays(m,"").toLocaleLowerCase()}if(o)if(s==="dddd")return h=ae.call(this._weekdaysParse,y),h!==-1?h:null;else if(s==="ddd")return h=ae.call(this._shortWeekdaysParse,y),h!==-1?h:null;else return h=ae.call(this._minWeekdaysParse,y),h!==-1?h:null;else if(s==="dddd"){if(h=ae.call(this._weekdaysParse,y),h!==-1)return h;if(h=ae.call(this._shortWeekdaysParse,y),h!==-1)return h;return h=ae.call(this._minWeekdaysParse,y),h!==-1?h:null}else if(s==="ddd"){if(h=ae.call(this._shortWeekdaysParse,y),h!==-1)return h;if(h=ae.call(this._weekdaysParse,y),h!==-1)return h;return h=ae.call(this._minWeekdaysParse,y),h!==-1?h:null}else{if(h=ae.call(this._minWeekdaysParse,y),h!==-1)return h;if(h=ae.call(this._weekdaysParse,y),h!==-1)return h;return h=ae.call(this._shortWeekdaysParse,y),h!==-1?h:null}}function Od(n,s,o){var l,h,m;if(this._weekdaysParseExact)return Ed.call(this,n,s,o);if(!this._weekdaysParse)this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[];for(l=0;l<7;l++){if(h=w([2000,1]).day(l),o&&!this._fullWeekdaysParse[l])this._fullWeekdaysParse[l]=new RegExp("^"+this.weekdays(h,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[l]=new RegExp("^"+this.weekdaysShort(h,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[l]=new RegExp("^"+this.weekdaysMin(h,"").replace(".","\\.?")+"$","i");if(!this._weekdaysParse[l])m="^"+this.weekdays(h,"")+"|^"+this.weekdaysShort(h,"")+"|^"+this.weekdaysMin(h,""),this._weekdaysParse[l]=new RegExp(m.replace(".",""),"i");if(o&&s==="dddd"&&this._fullWeekdaysParse[l].test(n))return l;else if(o&&s==="ddd"&&this._shortWeekdaysParse[l].test(n))return l;else if(o&&s==="dd"&&this._minWeekdaysParse[l].test(n))return l;else if(!o&&this._weekdaysParse[l].test(n))return l}}function kd(n){if(!this.isValid())return n!=null?this:NaN;var s=Rr(this,"Day");if(n!=null)return n=gd(n,this.localeData()),this.add(n-s,"d");else return s}function Dd(n){if(!this.isValid())return n!=null?this:NaN;var s=(this.day()+7-this.localeData()._week.dow)%7;return n==null?s:this.add(n-s,"d")}function Rd(n){if(!this.isValid())return n!=null?this:NaN;if(n!=null){var s=pd(n,this.localeData());return this.day(this.day()%7?s:s-7)}else return this.day()||7}function Td(n){if(this._weekdaysParseExact){if(!u(this,"_weekdaysRegex"))vi.call(this);if(n)return this._weekdaysStrictRegex;else return this._weekdaysRegex}else{if(!u(this,"_weekdaysRegex"))this._weekdaysRegex=wd;return this._weekdaysStrictRegex&&n?this._weekdaysStrictRegex:this._weekdaysRegex}}function Nd(n){if(this._weekdaysParseExact){if(!u(this,"_weekdaysRegex"))vi.call(this);if(n)return this._weekdaysShortStrictRegex;else return this._weekdaysShortRegex}else{if(!u(this,"_weekdaysShortRegex"))this._weekdaysShortRegex=bd;return this._weekdaysShortStrictRegex&&n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}}function Ld(n){if(this._weekdaysParseExact){if(!u(this,"_weekdaysRegex"))vi.call(this);if(n)return this._weekdaysMinStrictRegex;else return this._weekdaysMinRegex}else{if(!u(this,"_weekdaysMinRegex"))this._weekdaysMinRegex=vd;return this._weekdaysMinStrictRegex&&n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}}function vi(){function n(xe,ft){return ft.length-xe.length}var s=[],o=[],l=[],h=[],m,y,D,C,Z;for(m=0;m<7;m++)y=w([2000,1]).day(m),D=rt(this.weekdaysMin(y,"")),C=rt(this.weekdaysShort(y,"")),Z=rt(this.weekdays(y,"")),s.push(D),o.push(C),l.push(Z),h.push(D),h.push(C),h.push(Z);s.sort(n),o.sort(n),l.sort(n),h.sort(n),this._weekdaysRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Si(){return this.hours()%12||12}function Pd(){return this.hours()||24}L("H",["HH",2],0,"hour"),L("h",["hh",2],0,Si),L("k",["kk",2],0,Pd),L("hmm",0,0,function(){return""+Si.apply(this)+z(this.minutes(),2)}),L("hmmss",0,0,function(){return""+Si.apply(this)+z(this.minutes(),2)+z(this.seconds(),2)}),L("Hmm",0,0,function(){return""+this.hours()+z(this.minutes(),2)}),L("Hmmss",0,0,function(){return""+this.hours()+z(this.minutes(),2)+z(this.seconds(),2)});function Za(n,s){L(n,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),s)})}Za("a",!0),Za("A",!1);function Ja(n,s){return s._meridiemParse}R("a",Ja),R("A",Ja),R("H",te,yi),R("h",te,Qt),R("k",te,Qt),R("HH",te,Le),R("hh",te,Le),R("kk",te,Le),R("hmm",Ca),R("hmmss",ja),R("Hmm",Ca),R("Hmmss",ja),X(["H","HH"],ce),X(["k","kk"],function(n,s,o){var l=V(n);s[ce]=l===24?0:l}),X(["a","A"],function(n,s,o){o._isPm=o._locale.isPM(n),o._meridiem=n}),X(["h","hh"],function(n,s,o){s[ce]=V(n),p(o).bigHour=!0}),X("hmm",function(n,s,o){var l=n.length-2;s[ce]=V(n.substr(0,l)),s[Fe]=V(n.substr(l)),p(o).bigHour=!0}),X("hmmss",function(n,s,o){var l=n.length-4,h=n.length-2;s[ce]=V(n.substr(0,l)),s[Fe]=V(n.substr(l,2)),s[it]=V(n.substr(h)),p(o).bigHour=!0}),X("Hmm",function(n,s,o){var l=n.length-2;s[ce]=V(n.substr(0,l)),s[Fe]=V(n.substr(l))}),X("Hmmss",function(n,s,o){var l=n.length-4,h=n.length-2;s[ce]=V(n.substr(0,l)),s[Fe]=V(n.substr(l,2)),s[it]=V(n.substr(h))});function Ad(n){return(n+"").toLowerCase().charAt(0)==="p"}var qd=/[ap]\.?m?\.?/i,Yd=Xt("Hours",!0);function Fd(n,s,o){if(n>11)return o?"pm":"PM";else return o?"am":"AM"}var Ka={calendar:S,longDateFormat:Ne,invalidDate:di,ordinal:pn,dayOfMonthOrdinalParse:Vt,relativeTime:mi,months:Qh,monthsShort:$a,week:fd,weekdays:yd,weekdaysMin:_d,weekdaysShort:Ba,meridiemParse:qd},ne={},Lr={},Pr;function Cd(n,s){var o,l=Math.min(n.length,s.length);for(o=0;o<l;o+=1)if(n[o]!==s[o])return o;return l}function Qa(n){return n?n.toLowerCase().replace("_","-"):n}function jd(n){var s=0,o,l,h,m;while(s<n.length){m=Qa(n[s]).split("-"),o=m.length,l=Qa(n[s+1]),l=l?l.split("-"):null;while(o>0){if(h=En(m.slice(0,o).join("-")),h)return h;if(l&&l.length>=o&&Cd(m,l)>=o-1)break;o--}s++}return Pr}function Id(n){return!!(n&&n.match("^[^/\\\\]*$"))}function En(n){var s=null,o;if(ne[n]===void 0&&typeof Sr<"u"&&Sr&&Sr.exports&&Id(n))try{s=Pr._abbr,o=j,o("./locale/"+n),gt(s)}catch(l){ne[n]=null}return ne[n]}function gt(n,s){var o;if(n){if(c(s))o=at(n);else o=xi(n,s);if(o)Pr=o;else if(typeof console<"u"&&console.warn)console.warn("Locale "+n+" not found. Did you forget to load it?")}return Pr._abbr}function xi(n,s){if(s!==null){var o,l=Ka;if(s.abbr=n,ne[n]!=null)ue("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),l=ne[n]._config;else if(s.parentLocale!=null)if(ne[s.parentLocale]!=null)l=ne[s.parentLocale]._config;else if(o=En(s.parentLocale),o!=null)l=o._config;else{if(!Lr[s.parentLocale])Lr[s.parentLocale]=[];return Lr[s.parentLocale].push({name:n,config:s}),null}if(ne[n]=new we(_e(l,s)),Lr[n])Lr[n].forEach(function(h){xi(h.name,h.config)});return gt(n),ne[n]}else return delete ne[n],null}function Wd(n,s){if(s!=null){var o,l,h=Ka;if(ne[n]!=null&&ne[n].parentLocale!=null)ne[n].set(_e(ne[n]._config,s));else{if(l=En(n),l!=null)h=l._config;if(s=_e(h,s),l==null)s.abbr=n;o=new we(s),o.parentLocale=ne[n],ne[n]=o}gt(n)}else if(ne[n]!=null){if(ne[n].parentLocale!=null){if(ne[n]=ne[n].parentLocale,n===gt())gt(n)}else if(ne[n]!=null)delete ne[n]}return ne[n]}function at(n){var s;if(n&&n._locale&&n._locale._abbr)n=n._locale._abbr;if(!n)return Pr;if(!i(n)){if(s=En(n),s)return s;n=[n]}return jd(n)}function $d(){return Ue(ne)}function Mi(n){var s,o=n._a;if(o&&p(n).overflow===-2){if(s=o[nt]<0||o[nt]>11?nt:o[ze]<1||o[ze]>wi(o[ve],o[nt])?ze:o[ce]<0||o[ce]>24||o[ce]===24&&(o[Fe]!==0||o[it]!==0||o[Dt]!==0)?ce:o[Fe]<0||o[Fe]>59?Fe:o[it]<0||o[it]>59?it:o[Dt]<0||o[Dt]>999?Dt:-1,p(n)._overflowDayOfYear&&(s<ve||s>ze))s=ze;if(p(n)._overflowWeeks&&s===-1)s=Gh;if(p(n)._overflowWeekday&&s===-1)s=Vh;p(n).overflow=s}return n}var Hd=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ud=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,zd=/Z|[+-]\d\d(?::?\d\d)?/,On=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Ei=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Gd=/^\/?Date\((-?\d+)/i,Vd=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Bd={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Xa(n){var s,o,l=n._i,h=Hd.exec(l)||Ud.exec(l),m,y,D,C,Z=On.length,xe=Ei.length;if(h){p(n).iso=!0;for(s=0,o=Z;s<o;s++)if(On[s][1].exec(h[1])){y=On[s][0],m=On[s][2]!==!1;break}if(y==null){n._isValid=!1;return}if(h[3]){for(s=0,o=xe;s<o;s++)if(Ei[s][1].exec(h[3])){D=(h[2]||" ")+Ei[s][0];break}if(D==null){n._isValid=!1;return}}if(!m&&D!=null){n._isValid=!1;return}if(h[4])if(zd.exec(h[4]))C="Z";else{n._isValid=!1;return}n._f=y+(D||"")+(C||""),ki(n)}else n._isValid=!1}function Zd(n,s,o,l,h,m){var y=[Jd(n),$a.indexOf(s),parseInt(o,10),parseInt(l,10),parseInt(h,10)];if(m)y.push(parseInt(m,10));return y}function Jd(n){var s=parseInt(n,10);if(s<=49)return 2000+s;else if(s<=999)return 1900+s;return s}function Kd(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Qd(n,s,o){if(n){var l=Ba.indexOf(n),h=new Date(s[0],s[1],s[2]).getDay();if(l!==h)return p(o).weekdayMismatch=!0,o._isValid=!1,!1}return!0}function Xd(n,s,o){if(n)return Bd[n];else if(s)return 0;else{var l=parseInt(o,10),h=l%100,m=(l-h)/100;return m*60+h}}function eo(n){var s=Vd.exec(Kd(n._i)),o;if(s){if(o=Zd(s[4],s[3],s[2],s[5],s[6],s[7]),!Qd(s[1],o,n))return;n._a=o,n._tzm=Xd(s[8],s[9],s[10]),n._d=Tr.apply(null,n._a),n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm),p(n).rfc2822=!0}else n._isValid=!1}function em(n){var s=Gd.exec(n._i);if(s!==null){n._d=new Date(+s[1]);return}if(Xa(n),n._isValid===!1)delete n._isValid;else return;if(eo(n),n._isValid===!1)delete n._isValid;else return;if(n._strict)n._isValid=!1;else t.createFromInputFallback(n)}t.createFromInputFallback=I("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))});function er(n,s,o){if(n!=null)return n;if(s!=null)return s;return o}function tm(n){var s=new Date(t.now());if(n._useUTC)return[s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()];return[s.getFullYear(),s.getMonth(),s.getDate()]}function Oi(n){var s,o,l=[],h,m,y;if(n._d)return;if(h=tm(n),n._w&&n._a[ze]==null&&n._a[nt]==null)rm(n);if(n._dayOfYear!=null){if(y=er(n._a[ve],h[ve]),n._dayOfYear>Dr(y)||n._dayOfYear===0)p(n)._overflowDayOfYear=!0;o=Tr(y,0,n._dayOfYear),n._a[nt]=o.getUTCMonth(),n._a[ze]=o.getUTCDate()}for(s=0;s<3&&n._a[s]==null;++s)n._a[s]=l[s]=h[s];for(;s<7;s++)n._a[s]=l[s]=n._a[s]==null?s===2?1:0:n._a[s];if(n._a[ce]===24&&n._a[Fe]===0&&n._a[it]===0&&n._a[Dt]===0)n._nextDay=!0,n._a[ce]=0;if(n._d=(n._useUTC?Tr:ud).apply(null,l),m=n._useUTC?n._d.getUTCDay():n._d.getDay(),n._tzm!=null)n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm);if(n._nextDay)n._a[ce]=24;if(n._w&&typeof n._w.d<"u"&&n._w.d!==m)p(n).weekdayMismatch=!0}function rm(n){var s,o,l,h,m,y,D,C,Z;if(s=n._w,s.GG!=null||s.W!=null||s.E!=null){if(m=1,y=4,o=er(s.GG,n._a[ve],Nr(re(),1,4).year),l=er(s.W,1),h=er(s.E,1),h<1||h>7)C=!0}else if(m=n._locale._week.dow,y=n._locale._week.doy,Z=Nr(re(),m,y),o=er(s.gg,n._a[ve],Z.year),l=er(s.w,Z.week),s.d!=null){if(h=s.d,h<0||h>6)C=!0}else if(s.e!=null){if(h=s.e+m,s.e<0||s.e>6)C=!0}else h=m;if(l<1||l>st(o,m,y))p(n)._overflowWeeks=!0;else if(C!=null)p(n)._overflowWeekday=!0;else D=Va(o,l,h,m,y),n._a[ve]=D.year,n._dayOfYear=D.dayOfYear}t.ISO_8601=function(){},t.RFC_2822=function(){};function ki(n){if(n._f===t.ISO_8601){Xa(n);return}if(n._f===t.RFC_2822){eo(n);return}n._a=[],p(n).empty=!0;var s=""+n._i,o,l,h,m,y,D=s.length,C=0,Z,xe;h=dn(n._f,n._locale).match(ge)||[],xe=h.length;for(o=0;o<xe;o++){if(m=h[o],l=(s.match(Hh(m,n))||[])[0],l){if(y=s.substr(0,s.indexOf(l)),y.length>0)p(n).unusedInput.push(y);s=s.slice(s.indexOf(l)+l.length),C+=l.length}if(ke[m]){if(l)p(n).empty=!1;else p(n).unusedTokens.push(m);zh(m,l,n)}else if(n._strict&&!l)p(n).unusedTokens.push(m)}if(p(n).charsLeftOver=D-C,s.length>0)p(n).unusedInput.push(s);if(n._a[ce]<=12&&p(n).bigHour===!0&&n._a[ce]>0)p(n).bigHour=void 0;if(p(n).parsedDateParts=n._a.slice(0),p(n).meridiem=n._meridiem,n._a[ce]=nm(n._locale,n._a[ce],n._meridiem),Z=p(n).era,Z!==null)n._a[ve]=n._locale.erasConvertYear(Z,n._a[ve]);Oi(n),Mi(n)}function nm(n,s,o){var l;if(o==null)return s;if(n.meridiemHour!=null)return n.meridiemHour(s,o);else if(n.isPM!=null){if(l=n.isPM(o),l&&s<12)s+=12;if(!l&&s===12)s=0;return s}else return s}function im(n){var s,o,l,h,m,y,D=!1,C=n._f.length;if(C===0){p(n).invalidFormat=!0,n._d=new Date(NaN);return}for(h=0;h<C;h++){if(m=0,y=!1,s=N({},n),n._useUTC!=null)s._useUTC=n._useUTC;if(s._f=n._f[h],ki(s),P(s))y=!0;if(m+=p(s).charsLeftOver,m+=p(s).unusedTokens.length*10,p(s).score=m,!D){if(l==null||m<l||y){if(l=m,o=s,y)D=!0}}else if(m<l)l=m,o=s}_(n,o||s)}function sm(n){if(n._d)return;var s=Jt(n._i),o=s.day===void 0?s.date:s.day;n._a=v([s.year,s.month,o,s.hour,s.minute,s.second,s.millisecond],function(l){return l&&parseInt(l,10)}),Oi(n)}function am(n){var s=new B(Mi(to(n)));if(s._nextDay)s.add(1,"d"),s._nextDay=void 0;return s}function to(n){var{_i:s,_f:o}=n;if(n._locale=n._locale||at(n._l),s===null||o===void 0&&s==="")return A({nullInput:!0});if(typeof s==="string")n._i=s=n._locale.preparse(s);if(Y(s))return new B(Mi(s));else if(g(s))n._d=s;else if(i(o))im(n);else if(o)ki(n);else om(n);if(!P(n))n._d=null;return n}function om(n){var s=n._i;if(c(s))n._d=new Date(t.now());else if(g(s))n._d=new Date(s.valueOf());else if(typeof s==="string")em(n);else if(i(s))n._a=v(s.slice(0),function(o){return parseInt(o,10)}),Oi(n);else if(a(s))sm(n);else if(d(s))n._d=new Date(s);else t.createFromInputFallback(n)}function ro(n,s,o,l,h){var m={};if(s===!0||s===!1)l=s,s=void 0;if(o===!0||o===!1)l=o,o=void 0;if(a(n)&&f(n)||i(n)&&n.length===0)n=void 0;return m._isAMomentObject=!0,m._useUTC=m._isUTC=h,m._l=o,m._i=n,m._f=s,m._strict=l,am(m)}function re(n,s,o,l){return ro(n,s,o,l,!1)}var um=I("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=re.apply(null,arguments);if(this.isValid()&&n.isValid())return n<this?this:n;else return A()}),lm=I("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=re.apply(null,arguments);if(this.isValid()&&n.isValid())return n>this?this:n;else return A()});function no(n,s){var o,l;if(s.length===1&&i(s[0]))s=s[0];if(!s.length)return re();o=s[0];for(l=1;l<s.length;++l)if(!s[l].isValid()||s[l][n](o))o=s[l];return o}function fm(){var n=[].slice.call(arguments,0);return no("isBefore",n)}function cm(){var n=[].slice.call(arguments,0);return no("isAfter",n)}var hm=function(){return Date.now?Date.now():+new Date},Ar=["year","quarter","month","week","day","hour","minute","second","millisecond"];function dm(n){var s,o=!1,l,h=Ar.length;for(s in n)if(u(n,s)&&!(ae.call(Ar,s)!==-1&&(n[s]==null||!isNaN(n[s]))))return!1;for(l=0;l<h;++l)if(n[Ar[l]]){if(o)return!1;if(parseFloat(n[Ar[l]])!==V(n[Ar[l]]))o=!0}return!0}function mm(){return this._isValid}function gm(){return Ce(NaN)}function kn(n){var s=Jt(n),o=s.year||0,l=s.quarter||0,h=s.month||0,m=s.week||s.isoWeek||0,y=s.day||0,D=s.hour||0,C=s.minute||0,Z=s.second||0,xe=s.millisecond||0;this._isValid=dm(s),this._milliseconds=+xe+Z*1000+C*60000+D*1000*60*60,this._days=+y+m*7,this._months=+h+l*3+o*12,this._data={},this._locale=at(),this._bubble()}function Dn(n){return n instanceof kn}function Di(n){if(n<0)return Math.round(-1*n)*-1;else return Math.round(n)}function pm(n,s,o){var l=Math.min(n.length,s.length),h=Math.abs(n.length-s.length),m=0,y;for(y=0;y<l;y++)if(o&&n[y]!==s[y]||!o&&V(n[y])!==V(s[y]))m++;return m+h}function io(n,s){L(n,0,0,function(){var o=this.utcOffset(),l="+";if(o<0)o=-o,l="-";return l+z(~~(o/60),2)+s+z(~~o%60,2)})}io("Z",":"),io("ZZ",""),R("Z",vn),R("ZZ",vn),X(["Z","ZZ"],function(n,s,o){o._useUTC=!0,o._tzm=Ri(vn,n)});var ym=/([\+\-]|\d\d)/gi;function Ri(n,s){var o=(s||"").match(n),l,h,m;if(o===null)return null;return l=o[o.length-1]||[],h=(l+"").match(ym)||["-",0,0],m=+(h[1]*60)+V(h[2]),m===0?0:h[0]==="+"?m:-m}function Ti(n,s){var o,l;if(s._isUTC)return o=s.clone(),l=(Y(n)||g(n)?n.valueOf():re(n).valueOf())-o.valueOf(),o._d.setTime(o._d.valueOf()+l),t.updateOffset(o,!1),o;else return re(n).local()}function Ni(n){return-Math.round(n._d.getTimezoneOffset())}t.updateOffset=function(){};function _m(n,s,o){var l=this._offset||0,h;if(!this.isValid())return n!=null?this:NaN;if(n!=null){if(typeof n==="string"){if(n=Ri(vn,n),n===null)return this}else if(Math.abs(n)<16&&!o)n=n*60;if(!this._isUTC&&s)h=Ni(this);if(this._offset=n,this._isUTC=!0,h!=null)this.add(h,"m");if(l!==n){if(!s||this._changeInProgress)uo(this,Ce(n-l,"m"),1,!1);else if(!this._changeInProgress)this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null}return this}else return this._isUTC?l:Ni(this)}function wm(n,s){if(n!=null){if(typeof n!=="string")n=-n;return this.utcOffset(n,s),this}else return-this.utcOffset()}function bm(n){return this.utcOffset(0,n)}function vm(n){if(this._isUTC){if(this.utcOffset(0,n),this._isUTC=!1,n)this.subtract(Ni(this),"m")}return this}function Sm(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i==="string"){var n=Ri(Wh,this._i);if(n!=null)this.utcOffset(n);else this.utcOffset(0,!0)}return this}function xm(n){if(!this.isValid())return!1;return n=n?re(n).utcOffset():0,(this.utcOffset()-n)%60===0}function Mm(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Em(){if(!c(this._isDSTShifted))return this._isDSTShifted;var n={},s;if(N(n,this),n=to(n),n._a)s=n._isUTC?w(n._a):re(n._a),this._isDSTShifted=this.isValid()&&pm(n._a,s.toArray())>0;else this._isDSTShifted=!1;return this._isDSTShifted}function Om(){return this.isValid()?!this._isUTC:!1}function km(){return this.isValid()?this._isUTC:!1}function so(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Dm=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Rm=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ce(n,s){var o=n,l=null,h,m,y;if(Dn(n))o={ms:n._milliseconds,d:n._days,M:n._months};else if(d(n)||!isNaN(+n))if(o={},s)o[s]=+n;else o.milliseconds=+n;else if(l=Dm.exec(n))h=l[1]==="-"?-1:1,o={y:0,d:V(l[ze])*h,h:V(l[ce])*h,m:V(l[Fe])*h,s:V(l[it])*h,ms:V(Di(l[Dt]*1000))*h};else if(l=Rm.exec(n))h=l[1]==="-"?-1:1,o={y:Rt(l[2],h),M:Rt(l[3],h),w:Rt(l[4],h),d:Rt(l[5],h),h:Rt(l[6],h),m:Rt(l[7],h),s:Rt(l[8],h)};else if(o==null)o={};else if(typeof o==="object"&&(("from"in o)||("to"in o)))y=Tm(re(o.from),re(o.to)),o={},o.ms=y.milliseconds,o.M=y.months;if(m=new kn(o),Dn(n)&&u(n,"_locale"))m._locale=n._locale;if(Dn(n)&&u(n,"_isValid"))m._isValid=n._isValid;return m}Ce.fn=kn.prototype,Ce.invalid=gm;function Rt(n,s){var o=n&&parseFloat(n.replace(",","."));return(isNaN(o)?0:o)*s}function ao(n,s){var o={};if(o.months=s.month()-n.month()+(s.year()-n.year())*12,n.clone().add(o.months,"M").isAfter(s))--o.months;return o.milliseconds=+s-+n.clone().add(o.months,"M"),o}function Tm(n,s){var o;if(!(n.isValid()&&s.isValid()))return{milliseconds:0,months:0};if(s=Ti(s,n),n.isBefore(s))o=ao(n,s);else o=ao(s,n),o.milliseconds=-o.milliseconds,o.months=-o.months;return o}function oo(n,s){return function(o,l){var h,m;if(l!==null&&!isNaN(+l))ue(s,"moment()."+s+"(period, number) is deprecated. Please use moment()."+s+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),m=o,o=l,l=m;return h=Ce(o,l),uo(this,h,n),this}}function uo(n,s,o,l){var h=s._milliseconds,m=Di(s._days),y=Di(s._months);if(!n.isValid())return;if(l=l==null?!0:l,y)Ua(n,Rr(n,"Month")+y*o);if(m)Wa(n,"Date",Rr(n,"Date")+m*o);if(h)n._d.setTime(n._d.valueOf()+h*o);if(l)t.updateOffset(n,m||y)}var Nm=oo(1,"add"),Lm=oo(-1,"subtract");function lo(n){return typeof n==="string"||n instanceof String}function Pm(n){return Y(n)||g(n)||lo(n)||d(n)||qm(n)||Am(n)||n===null||n===void 0}function Am(n){var s=a(n)&&!f(n),o=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],h,m,y=l.length;for(h=0;h<y;h+=1)m=l[h],o=o||u(n,m);return s&&o}function qm(n){var s=i(n),o=!1;if(s)o=n.filter(function(l){return!d(l)&&lo(n)}).length===0;return s&&o}function Ym(n){var s=a(n)&&!f(n),o=!1,l=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],h,m;for(h=0;h<l.length;h+=1)m=l[h],o=o||u(n,m);return s&&o}function Fm(n,s){var o=n.diff(s,"days",!0);return o<-6?"sameElse":o<-1?"lastWeek":o<0?"lastDay":o<1?"sameDay":o<2?"nextDay":o<7?"nextWeek":"sameElse"}function Cm(n,s){if(arguments.length===1){if(!arguments[0])n=void 0,s=void 0;else if(Pm(arguments[0]))n=arguments[0],s=void 0;else if(Ym(arguments[0]))s=arguments[0],n=void 0}var o=n||re(),l=Ti(o,this).startOf("day"),h=t.calendarFormat(this,l)||"sameElse",m=s&&(ee(s[h])?s[h].call(this,o):s[h]);return this.format(m||this.localeData().calendar(h,this,re(o)))}function jm(){return new B(this)}function Im(n,s){var o=Y(n)?n:re(n);if(!(this.isValid()&&o.isValid()))return!1;if(s=De(s)||"millisecond",s==="millisecond")return this.valueOf()>o.valueOf();else return o.valueOf()<this.clone().startOf(s).valueOf()}function Wm(n,s){var o=Y(n)?n:re(n);if(!(this.isValid()&&o.isValid()))return!1;if(s=De(s)||"millisecond",s==="millisecond")return this.valueOf()<o.valueOf();else return this.clone().endOf(s).valueOf()<o.valueOf()}function $m(n,s,o,l){var h=Y(n)?n:re(n),m=Y(s)?s:re(s);if(!(this.isValid()&&h.isValid()&&m.isValid()))return!1;return l=l||"()",(l[0]==="("?this.isAfter(h,o):!this.isBefore(h,o))&&(l[1]===")"?this.isBefore(m,o):!this.isAfter(m,o))}function Hm(n,s){var o=Y(n)?n:re(n),l;if(!(this.isValid()&&o.isValid()))return!1;if(s=De(s)||"millisecond",s==="millisecond")return this.valueOf()===o.valueOf();else return l=o.valueOf(),this.clone().startOf(s).valueOf()<=l&&l<=this.clone().endOf(s).valueOf()}function Um(n,s){return this.isSame(n,s)||this.isAfter(n,s)}function zm(n,s){return this.isSame(n,s)||this.isBefore(n,s)}function Gm(n,s,o){var l,h,m;if(!this.isValid())return NaN;if(l=Ti(n,this),!l.isValid())return NaN;switch(h=(l.utcOffset()-this.utcOffset())*60000,s=De(s),s){case"year":m=Rn(this,l)/12;break;case"month":m=Rn(this,l);break;case"quarter":m=Rn(this,l)/3;break;case"second":m=(this-l)/1000;break;case"minute":m=(this-l)/60000;break;case"hour":m=(this-l)/3600000;break;case"day":m=(this-l-h)/86400000;break;case"week":m=(this-l-h)/604800000;break;default:m=this-l}return o?m:Ae(m)}function Rn(n,s){if(n.date()<s.date())return-Rn(s,n);var o=(s.year()-n.year())*12+(s.month()-n.month()),l=n.clone().add(o,"months"),h,m;if(s-l<0)h=n.clone().add(o-1,"months"),m=(s-l)/(l-h);else h=n.clone().add(o+1,"months"),m=(s-l)/(h-l);return-(o+m)||0}t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Vm(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Bm(n){if(!this.isValid())return null;var s=n!==!0,o=s?this.clone().utc():this;if(o.year()<0||o.year()>9999)return tt(o,s?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ");if(ee(Date.prototype.toISOString))if(s)return this.toDate().toISOString();else return new Date(this.valueOf()+this.utcOffset()*60*1000).toISOString().replace("Z",tt(o,"Z"));return tt(o,s?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Zm(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var n="moment",s="",o,l,h,m;if(!this.isLocal())n=this.utcOffset()===0?"moment.utc":"moment.parseZone",s="Z";return o="["+n+'("]',l=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",h="-MM-DD[T]HH:mm:ss.SSS",m=s+'[")]',this.format(o+l+h+m)}function Jm(n){if(!n)n=this.isUtc()?t.defaultFormatUtc:t.defaultFormat;var s=tt(this,n);return this.localeData().postformat(s)}function Km(n,s){if(this.isValid()&&(Y(n)&&n.isValid()||re(n).isValid()))return Ce({to:this,from:n}).locale(this.locale()).humanize(!s);else return this.localeData().invalidDate()}function Qm(n){return this.from(re(),n)}function Xm(n,s){if(this.isValid()&&(Y(n)&&n.isValid()||re(n).isValid()))return Ce({from:this,to:n}).locale(this.locale()).humanize(!s);else return this.localeData().invalidDate()}function eg(n){return this.to(re(),n)}function fo(n){var s;if(n===void 0)return this._locale._abbr;else{if(s=at(n),s!=null)this._locale=s;return this}}var co=I("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(n){if(n===void 0)return this.localeData();else return this.locale(n)});function ho(){return this._locale}var Tn=1000,tr=60*Tn,Nn=60*tr,mo=3506328*Nn;function rr(n,s){return(n%s+s)%s}function go(n,s,o){if(n<100&&n>=0)return new Date(n+400,s,o)-mo;else return new Date(n,s,o).valueOf()}function po(n,s,o){if(n<100&&n>=0)return Date.UTC(n+400,s,o)-mo;else return Date.UTC(n,s,o)}function tg(n){var s,o;if(n=De(n),n===void 0||n==="millisecond"||!this.isValid())return this;switch(o=this._isUTC?po:go,n){case"year":s=o(this.year(),0,1);break;case"quarter":s=o(this.year(),this.month()-this.month()%3,1);break;case"month":s=o(this.year(),this.month(),1);break;case"week":s=o(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":s=o(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":s=o(this.year(),this.month(),this.date());break;case"hour":s=this._d.valueOf(),s-=rr(s+(this._isUTC?0:this.utcOffset()*tr),Nn);break;case"minute":s=this._d.valueOf(),s-=rr(s,tr);break;case"second":s=this._d.valueOf(),s-=rr(s,Tn);break}return this._d.setTime(s),t.updateOffset(this,!0),this}function rg(n){var s,o;if(n=De(n),n===void 0||n==="millisecond"||!this.isValid())return this;switch(o=this._isUTC?po:go,n){case"year":s=o(this.year()+1,0,1)-1;break;case"quarter":s=o(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":s=o(this.year(),this.month()+1,1)-1;break;case"week":s=o(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":s=o(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":s=o(this.year(),this.month(),this.date()+1)-1;break;case"hour":s=this._d.valueOf(),s+=Nn-rr(s+(this._isUTC?0:this.utcOffset()*tr),Nn)-1;break;case"minute":s=this._d.valueOf(),s+=tr-rr(s,tr)-1;break;case"second":s=this._d.valueOf(),s+=Tn-rr(s,Tn)-1;break}return this._d.setTime(s),t.updateOffset(this,!0),this}function ng(){return this._d.valueOf()-(this._offset||0)*60000}function ig(){return Math.floor(this.valueOf()/1000)}function sg(){return new Date(this.valueOf())}function ag(){var n=this;return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second(),n.millisecond()]}function og(){var n=this;return{years:n.year(),months:n.month(),date:n.date(),hours:n.hours(),minutes:n.minutes(),seconds:n.seconds(),milliseconds:n.milliseconds()}}function ug(){return this.isValid()?this.toISOString():null}function lg(){return P(this)}function fg(){return _({},p(this))}function cg(){return p(this).overflow}function hg(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}L("N",0,0,"eraAbbr"),L("NN",0,0,"eraAbbr"),L("NNN",0,0,"eraAbbr"),L("NNNN",0,0,"eraName"),L("NNNNN",0,0,"eraNarrow"),L("y",["y",1],"yo","eraYear"),L("y",["yy",2],0,"eraYear"),L("y",["yyy",3],0,"eraYear"),L("y",["yyyy",4],0,"eraYear"),R("N",Li),R("NN",Li),R("NNN",Li),R("NNNN",xg),R("NNNNN",Mg),X(["N","NN","NNN","NNNN","NNNNN"],function(n,s,o,l){var h=o._locale.erasParse(n,l,o._strict);if(h)p(o).era=h;else p(o).invalidEra=n}),R("y",Kt),R("yy",Kt),R("yyy",Kt),R("yyyy",Kt),R("yo",Eg),X(["y","yy","yyy","yyyy"],ve),X(["yo"],function(n,s,o,l){var h;if(o._locale._eraYearOrdinalRegex)h=n.match(o._locale._eraYearOrdinalRegex);if(o._locale.eraYearOrdinalParse)s[ve]=o._locale.eraYearOrdinalParse(n,h);else s[ve]=parseInt(n,10)});function dg(n,s){var o,l,h,m=this._eras||at("en")._eras;for(o=0,l=m.length;o<l;++o){switch(typeof m[o].since){case"string":h=t(m[o].since).startOf("day"),m[o].since=h.valueOf();break}switch(typeof m[o].until){case"undefined":m[o].until=1/0;break;case"string":h=t(m[o].until).startOf("day").valueOf(),m[o].until=h.valueOf();break}}return m}function mg(n,s,o){var l,h,m=this.eras(),y,D,C;n=n.toUpperCase();for(l=0,h=m.length;l<h;++l)if(y=m[l].name.toUpperCase(),D=m[l].abbr.toUpperCase(),C=m[l].narrow.toUpperCase(),o)switch(s){case"N":case"NN":case"NNN":if(D===n)return m[l];break;case"NNNN":if(y===n)return m[l];break;case"NNNNN":if(C===n)return m[l];break}else if([y,D,C].indexOf(n)>=0)return m[l]}function gg(n,s){var o=n.since<=n.until?1:-1;if(s===void 0)return t(n.since).year();else return t(n.since).year()+(s-n.offset)*o}function pg(){var n,s,o,l=this.localeData().eras();for(n=0,s=l.length;n<s;++n){if(o=this.clone().startOf("day").valueOf(),l[n].since<=o&&o<=l[n].until)return l[n].name;if(l[n].until<=o&&o<=l[n].since)return l[n].name}return""}function yg(){var n,s,o,l=this.localeData().eras();for(n=0,s=l.length;n<s;++n){if(o=this.clone().startOf("day").valueOf(),l[n].since<=o&&o<=l[n].until)return l[n].narrow;if(l[n].until<=o&&o<=l[n].since)return l[n].narrow}return""}function _g(){var n,s,o,l=this.localeData().eras();for(n=0,s=l.length;n<s;++n){if(o=this.clone().startOf("day").valueOf(),l[n].since<=o&&o<=l[n].until)return l[n].abbr;if(l[n].until<=o&&o<=l[n].since)return l[n].abbr}return""}function wg(){var n,s,o,l,h=this.localeData().eras();for(n=0,s=h.length;n<s;++n)if(o=h[n].since<=h[n].until?1:-1,l=this.clone().startOf("day").valueOf(),h[n].since<=l&&l<=h[n].until||h[n].until<=l&&l<=h[n].since)return(this.year()-t(h[n].since).year())*o+h[n].offset;return this.year()}function bg(n){if(!u(this,"_erasNameRegex"))Pi.call(this);return n?this._erasNameRegex:this._erasRegex}function vg(n){if(!u(this,"_erasAbbrRegex"))Pi.call(this);return n?this._erasAbbrRegex:this._erasRegex}function Sg(n){if(!u(this,"_erasNarrowRegex"))Pi.call(this);return n?this._erasNarrowRegex:this._erasRegex}function Li(n,s){return s.erasAbbrRegex(n)}function xg(n,s){return s.erasNameRegex(n)}function Mg(n,s){return s.erasNarrowRegex(n)}function Eg(n,s){return s._eraYearOrdinalRegex||Kt}function Pi(){var n=[],s=[],o=[],l=[],h,m,y,D,C,Z=this.eras();for(h=0,m=Z.length;h<m;++h)y=rt(Z[h].name),D=rt(Z[h].abbr),C=rt(Z[h].narrow),s.push(y),n.push(D),o.push(C),l.push(y),l.push(D),l.push(C);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+s.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}L(0,["gg",2],0,function(){return this.weekYear()%100}),L(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Ln(n,s){L(0,[n,n.length],0,s)}Ln("gggg","weekYear"),Ln("ggggg","weekYear"),Ln("GGGG","isoWeekYear"),Ln("GGGGG","isoWeekYear"),R("G",bn),R("g",bn),R("GG",te,Le),R("gg",te,Le),R("GGGG",pi,gi),R("gggg",pi,gi),R("GGGGG",wn,yn),R("ggggg",wn,yn),kr(["gggg","ggggg","GGGG","GGGGG"],function(n,s,o,l){s[l.substr(0,2)]=V(n)}),kr(["gg","GG"],function(n,s,o,l){s[l]=t.parseTwoDigitYear(n)});function Og(n){return yo.call(this,n,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function kg(n){return yo.call(this,n,this.isoWeek(),this.isoWeekday(),1,4)}function Dg(){return st(this.year(),1,4)}function Rg(){return st(this.isoWeekYear(),1,4)}function Tg(){var n=this.localeData()._week;return st(this.year(),n.dow,n.doy)}function Ng(){var n=this.localeData()._week;return st(this.weekYear(),n.dow,n.doy)}function yo(n,s,o,l,h){var m;if(n==null)return Nr(this,l,h).year;else{if(m=st(n,l,h),s>m)s=m;return Lg.call(this,n,s,o,l,h)}}function Lg(n,s,o,l,h){var m=Va(n,s,o,l,h),y=Tr(m.year,0,m.dayOfYear);return this.year(y.getUTCFullYear()),this.month(y.getUTCMonth()),this.date(y.getUTCDate()),this}L("Q",0,"Qo","quarter"),R("Q",Ya),X("Q",function(n,s){s[nt]=(V(n)-1)*3});function Pg(n){return n==null?Math.ceil((this.month()+1)/3):this.month((n-1)*3+this.month()%3)}L("D",["DD",2],"Do","date"),R("D",te,Qt),R("DD",te,Le),R("Do",function(n,s){return n?s._dayOfMonthOrdinalParse||s._ordinalParse:s._dayOfMonthOrdinalParseLenient}),X(["D","DD"],ze),X("Do",function(n,s){s[ze]=V(n.match(te)[0])});var _o=Xt("Date",!0);L("DDD",["DDDD",3],"DDDo","dayOfYear"),R("DDD",_n),R("DDDD",Fa),X(["DDD","DDDD"],function(n,s,o){o._dayOfYear=V(n)});function Ag(n){var s=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/86400000)+1;return n==null?s:this.add(n-s,"d")}L("m",["mm",2],0,"minute"),R("m",te,yi),R("mm",te,Le),X(["m","mm"],Fe);var qg=Xt("Minutes",!1);L("s",["ss",2],0,"second"),R("s",te,yi),R("ss",te,Le),X(["s","ss"],it);var Yg=Xt("Seconds",!1);L("S",0,0,function(){return~~(this.millisecond()/100)}),L(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),L(0,["SSS",3],0,"millisecond"),L(0,["SSSS",4],0,function(){return this.millisecond()*10}),L(0,["SSSSS",5],0,function(){return this.millisecond()*100}),L(0,["SSSSSS",6],0,function(){return this.millisecond()*1000}),L(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),L(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),L(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),R("S",_n,Ya),R("SS",_n,Le),R("SSS",_n,Fa);var pt,wo;for(pt="SSSS";pt.length<=9;pt+="S")R(pt,Kt);function Fg(n,s){s[Dt]=V(("0."+n)*1000)}for(pt="S";pt.length<=9;pt+="S")X(pt,Fg);wo=Xt("Milliseconds",!1),L("z",0,0,"zoneAbbr"),L("zz",0,0,"zoneName");function Cg(){return this._isUTC?"UTC":""}function jg(){return this._isUTC?"Coordinated Universal Time":""}var x=B.prototype;if(x.add=Nm,x.calendar=Cm,x.clone=jm,x.diff=Gm,x.endOf=rg,x.format=Jm,x.from=Km,x.fromNow=Qm,x.to=Xm,x.toNow=eg,x.get=Zh,x.invalidAt=cg,x.isAfter=Im,x.isBefore=Wm,x.isBetween=$m,x.isSame=Hm,x.isSameOrAfter=Um,x.isSameOrBefore=zm,x.isValid=lg,x.lang=co,x.locale=fo,x.localeData=ho,x.max=lm,x.min=um,x.parsingFlags=fg,x.set=Jh,x.startOf=tg,x.subtract=Lm,x.toArray=ag,x.toObject=og,x.toDate=sg,x.toISOString=Bm,x.inspect=Zm,typeof Symbol<"u"&&Symbol.for!=null)x[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"};x.toJSON=ug,x.toString=Vm,x.unix=ig,x.valueOf=ng,x.creationData=hg,x.eraName=pg,x.eraNarrow=yg,x.eraAbbr=_g,x.eraYear=wg,x.year=Ia,x.isLeapYear=Bh,x.weekYear=Og,x.isoWeekYear=kg,x.quarter=x.quarters=Pg,x.month=za,x.daysInMonth=sd,x.week=x.weeks=dd,x.isoWeek=x.isoWeeks=md,x.weeksInYear=Tg,x.weeksInWeekYear=Ng,x.isoWeeksInYear=Dg,x.isoWeeksInISOWeekYear=Rg,x.date=_o,x.day=x.days=kd,x.weekday=Dd,x.isoWeekday=Rd,x.dayOfYear=Ag,x.hour=x.hours=Yd,x.minute=x.minutes=qg,x.second=x.seconds=Yg,x.millisecond=x.milliseconds=wo,x.utcOffset=_m,x.utc=bm,x.local=vm,x.parseZone=Sm,x.hasAlignedHourOffset=xm,x.isDST=Mm,x.isLocal=Om,x.isUtcOffset=km,x.isUtc=so,x.isUTC=so,x.zoneAbbr=Cg,x.zoneName=jg,x.dates=I("dates accessor is deprecated. Use date instead.",_o),x.months=I("months accessor is deprecated. Use month instead",za),x.years=I("years accessor is deprecated. Use year instead",Ia),x.zone=I("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",wm),x.isDSTShifted=I("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Em);function Ig(n){return re(n*1000)}function Wg(){return re.apply(null,arguments).parseZone()}function bo(n){return n}var Q=we.prototype;Q.calendar=T,Q.longDateFormat=mn,Q.invalidDate=gn,Q.ordinal=Bt,Q.preparse=bo,Q.postformat=bo,Q.relativeTime=kt,Q.pastFuture=mt,Q.set=fe,Q.eras=dg,Q.erasParse=mg,Q.erasConvertYear=gg,Q.erasAbbrRegex=vg,Q.erasNameRegex=bg,Q.erasNarrowRegex=Sg,Q.months=td,Q.monthsShort=rd,Q.monthsParse=id,Q.monthsRegex=od,Q.monthsShortRegex=ad,Q.week=ld,Q.firstDayOfYear=hd,Q.firstDayOfWeek=cd,Q.weekdays=Sd,Q.weekdaysMin=Md,Q.weekdaysShort=xd,Q.weekdaysParse=Od,Q.weekdaysRegex=Td,Q.weekdaysShortRegex=Nd,Q.weekdaysMinRegex=Ld,Q.isPM=Ad,Q.meridiem=Fd;function Pn(n,s,o,l){var h=at(),m=w().set(l,s);return h[o](m,n)}function vo(n,s,o){if(d(n))s=n,n=void 0;if(n=n||"",s!=null)return Pn(n,s,o,"month");var l,h=[];for(l=0;l<12;l++)h[l]=Pn(n,l,o,"month");return h}function Ai(n,s,o,l){if(typeof n==="boolean"){if(d(s))o=s,s=void 0;s=s||""}else{if(s=n,o=s,n=!1,d(s))o=s,s=void 0;s=s||""}var h=at(),m=n?h._week.dow:0,y,D=[];if(o!=null)return Pn(s,(o+m)%7,l,"day");for(y=0;y<7;y++)D[y]=Pn(s,(y+m)%7,l,"day");return D}function $g(n,s){return vo(n,s,"months")}function Hg(n,s){return vo(n,s,"monthsShort")}function Ug(n,s,o){return Ai(n,s,o,"weekdays")}function zg(n,s,o){return Ai(n,s,o,"weekdaysShort")}function Gg(n,s,o){return Ai(n,s,o,"weekdaysMin")}gt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(n){var s=n%10,o=V(n%100/10)===1?"th":s===1?"st":s===2?"nd":s===3?"rd":"th";return n+o}}),t.lang=I("moment.lang is deprecated. Use moment.locale instead.",gt),t.langData=I("moment.langData is deprecated. Use moment.localeData instead.",at);var ot=Math.abs;function Vg(){var n=this._data;return this._milliseconds=ot(this._milliseconds),this._days=ot(this._days),this._months=ot(this._months),n.milliseconds=ot(n.milliseconds),n.seconds=ot(n.seconds),n.minutes=ot(n.minutes),n.hours=ot(n.hours),n.months=ot(n.months),n.years=ot(n.years),this}function So(n,s,o,l){var h=Ce(s,o);return n._milliseconds+=l*h._milliseconds,n._days+=l*h._days,n._months+=l*h._months,n._bubble()}function Bg(n,s){return So(this,n,s,1)}function Zg(n,s){return So(this,n,s,-1)}function xo(n){if(n<0)return Math.floor(n);else return Math.ceil(n)}function Jg(){var n=this._milliseconds,s=this._days,o=this._months,l=this._data,h,m,y,D,C;if(!(n>=0&&s>=0&&o>=0||n<=0&&s<=0&&o<=0))n+=xo(qi(o)+s)*86400000,s=0,o=0;return l.milliseconds=n%1000,h=Ae(n/1000),l.seconds=h%60,m=Ae(h/60),l.minutes=m%60,y=Ae(m/60),l.hours=y%24,s+=Ae(y/24),C=Ae(Mo(s)),o+=C,s-=xo(qi(C)),D=Ae(o/12),o%=12,l.days=s,l.months=o,l.years=D,this}function Mo(n){return n*4800/146097}function qi(n){return n*146097/4800}function Kg(n){if(!this.isValid())return NaN;var s,o,l=this._milliseconds;if(n=De(n),n==="month"||n==="quarter"||n==="year")switch(s=this._days+l/86400000,o=this._months+Mo(s),n){case"month":return o;case"quarter":return o/3;case"year":return o/12}else switch(s=this._days+Math.round(qi(this._months)),n){case"week":return s/7+l/604800000;case"day":return s+l/86400000;case"hour":return s*24+l/3600000;case"minute":return s*1440+l/60000;case"second":return s*86400+l/1000;case"millisecond":return Math.floor(s*86400000)+l;default:throw Error("Unknown unit "+n)}}function ut(n){return function(){return this.as(n)}}var Eo=ut("ms"),Qg=ut("s"),Xg=ut("m"),ep=ut("h"),tp=ut("d"),rp=ut("w"),np=ut("M"),ip=ut("Q"),sp=ut("y"),ap=Eo;function op(){return Ce(this)}function up(n){return n=De(n),this.isValid()?this[n+"s"]():NaN}function Tt(n){return function(){return this.isValid()?this._data[n]:NaN}}var lp=Tt("milliseconds"),fp=Tt("seconds"),cp=Tt("minutes"),hp=Tt("hours"),dp=Tt("days"),mp=Tt("months"),gp=Tt("years");function pp(){return Ae(this.days()/7)}var lt=Math.round,nr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function yp(n,s,o,l,h){return h.relativeTime(s||1,!!o,n,l)}function _p(n,s,o,l){var h=Ce(n).abs(),m=lt(h.as("s")),y=lt(h.as("m")),D=lt(h.as("h")),C=lt(h.as("d")),Z=lt(h.as("M")),xe=lt(h.as("w")),ft=lt(h.as("y")),yt=m<=o.ss&&["s",m]||m<o.s&&["ss",m]||y<=1&&["m"]||y<o.m&&["mm",y]||D<=1&&["h"]||D<o.h&&["hh",D]||C<=1&&["d"]||C<o.d&&["dd",C];if(o.w!=null)yt=yt||xe<=1&&["w"]||xe<o.w&&["ww",xe];return yt=yt||Z<=1&&["M"]||Z<o.M&&["MM",Z]||ft<=1&&["y"]||["yy",ft],yt[2]=s,yt[3]=+n>0,yt[4]=l,yp.apply(null,yt)}function wp(n){if(n===void 0)return lt;if(typeof n==="function")return lt=n,!0;return!1}function bp(n,s){if(nr[n]===void 0)return!1;if(s===void 0)return nr[n];if(nr[n]=s,n==="s")nr.ss=s-1;return!0}function vp(n,s){if(!this.isValid())return this.localeData().invalidDate();var o=!1,l=nr,h,m;if(typeof n==="object")s=n,n=!1;if(typeof n==="boolean")o=n;if(typeof s==="object"){if(l=Object.assign({},nr,s),s.s!=null&&s.ss==null)l.ss=s.s-1}if(h=this.localeData(),m=_p(this,!o,l,h),o)m=h.pastFuture(+this,m);return h.postformat(m)}var Yi=Math.abs;function ir(n){return(n>0)-(n<0)||+n}function An(){if(!this.isValid())return this.localeData().invalidDate();var n=Yi(this._milliseconds)/1000,s=Yi(this._days),o=Yi(this._months),l,h,m,y,D=this.asSeconds(),C,Z,xe,ft;if(!D)return"P0D";return l=Ae(n/60),h=Ae(l/60),n%=60,l%=60,m=Ae(o/12),o%=12,y=n?n.toFixed(3).replace(/\.?0+$/,""):"",C=D<0?"-":"",Z=ir(this._months)!==ir(D)?"-":"",xe=ir(this._days)!==ir(D)?"-":"",ft=ir(this._milliseconds)!==ir(D)?"-":"",C+"P"+(m?Z+m+"Y":"")+(o?Z+o+"M":"")+(s?xe+s+"D":"")+(h||l||n?"T":"")+(h?ft+h+"H":"")+(l?ft+l+"M":"")+(n?ft+y+"S":"")}var J=kn.prototype;J.isValid=mm,J.abs=Vg,J.add=Bg,J.subtract=Zg,J.as=Kg,J.asMilliseconds=Eo,J.asSeconds=Qg,J.asMinutes=Xg,J.asHours=ep,J.asDays=tp,J.asWeeks=rp,J.asMonths=np,J.asQuarters=ip,J.asYears=sp,J.valueOf=ap,J._bubble=Jg,J.clone=op,J.get=up,J.milliseconds=lp,J.seconds=fp,J.minutes=cp,J.hours=hp,J.days=dp,J.weeks=pp,J.months=mp,J.years=gp,J.humanize=vp,J.toISOString=An,J.toString=An,J.toJSON=An,J.locale=fo,J.localeData=ho,J.toIsoString=I("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",An),J.lang=co,L("X",0,0,"unix"),L("x",0,0,"valueOf"),R("x",bn),R("X",$h),X("X",function(n,s,o){o._d=new Date(parseFloat(n)*1000)}),X("x",function(n,s,o){o._d=new Date(V(n))});//! moment.js
|
|
44
|
-
return t.version="2.30.1",r(
|
|
43
|
+
`+Error().stack),o=!1}return s.apply(this,arguments)},s)}var F={};function fe(n,s){if(t.deprecationHandler!=null)t.deprecationHandler(n,s);if(!F[n])H(s),F[n]=!0}t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;function re(n){return typeof Function<"u"&&n instanceof Function||Object.prototype.toString.call(n)==="[object Function]"}function he(n){var s,o;for(o in n)if(u(n,o))if(s=n[o],re(s))this[o]=s;else this["_"+o]=s;this._config=n,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function be(n,s){var o=_({},n),l;for(l in s)if(u(s,l))if(a(n[l])&&a(s[l]))o[l]={},_(o[l],n[l]),_(o[l],s[l]);else if(s[l]!=null)o[l]=s[l];else delete o[l];for(l in n)if(u(n,l)&&!u(s,l)&&a(n[l]))o[l]=_({},o[l]);return o}function ve(n){if(n!=null)this.set(n)}var Ve;if(Object.keys)Ve=Object.keys;else Ve=function(n){var s,o=[];for(s in n)if(u(n,s))o.push(s);return o};var S={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function T(n,s,o){var l=this._calendar[n]||this._calendar.sameElse;return re(l)?l.call(s,o):l}function G(n,s,o){var l=""+Math.abs(n),h=s-l.length,m=n>=0;return(m?o?"+":"":"-")+Math.pow(10,Math.max(0,h)).toString().substr(1)+l}var ye=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,q=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ke={},Re={};function L(n,s,o,l){var h=l;if(typeof l==="string")h=function(){return this[l]()};if(n)Re[n]=h;if(s)Re[s[0]]=function(){return G(h.apply(this,arguments),s[1],s[2])};if(o)Re[o]=function(){return this.localeData().ordinal(h.apply(this,arguments),n)}}function Bt(n){if(n.match(/\[[\s\S]/))return n.replace(/^\[|\]$/g,"");return n.replace(/\\/g,"")}function gn(n){var s=n.match(ye),o,l;for(o=0,l=s.length;o<l;o++)if(Re[s[o]])s[o]=Re[s[o]];else s[o]=Bt(s[o]);return function(h){var m="",y;for(y=0;y<l;y++)m+=re(s[y])?s[y].call(h,n):s[y];return m}}function nt(n,s){if(!n.isValid())return n.localeData().invalidDate();return s=pn(s,n.localeData()),ke[s]=ke[s]||gn(s),ke[s](n)}function pn(n,s){var o=5;function l(h){return s.longDateFormat(h)||h}q.lastIndex=0;while(o>=0&&q.test(n))n=n.replace(q,l),q.lastIndex=0,o-=1;return n}var Le={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function yn(n){var s=this._longDateFormat[n],o=this._longDateFormat[n.toUpperCase()];if(s||!o)return s;return this._longDateFormat[n]=o.match(ye).map(function(l){if(l==="MMMM"||l==="MM"||l==="DD"||l==="dddd")return l.slice(1);return l}).join(""),this._longDateFormat[n]}var vi="Invalid date";function _n(){return this._invalidDate}var wn="%d",Zt=/\d{1,2}/;function Jt(n){return this._ordinal.replace("%d",n)}var Si={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Rt(n,s,o,l){var h=this._relativeTime[o];return re(h)?h(n,s,o,l):h.replace(/%d/i,n)}function gt(n,s){var o=this._relativeTime[n>0?"future":"past"];return re(o)?o(s):o.replace(/%s/i,s)}var Kt={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Te(n){return typeof n==="string"?Kt[n]||Kt[n.toLowerCase()]:void 0}function Qt(n){var s={},o,l;for(l in n)if(u(n,l)){if(o=Te(l),o)s[o]=n[l]}return s}var Xh={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ed(n){var s=[],o;for(o in n)if(u(n,o))s.push({unit:o,priority:Xh[o]});return s.sort(function(l,h){return l.priority-h.priority}),s}var Ga=/\d/,Pe=/\d\d/,Va=/\d{3}/,xi=/\d{4}/,bn=/[+-]?\d{6}/,ne=/\d\d?/,za=/\d\d\d\d?/,Ba=/\d\d\d\d\d\d?/,vn=/\d{1,3}/,Mi=/\d{1,4}/,Sn=/[+-]?\d{1,6}/,Xt=/\d+/,xn=/[+-]?\d+/,td=/Z|[+-]\d\d:?\d\d/gi,Mn=/Z|[+-]\d\d(?::?\d\d)?/gi,rd=/[+-]?\d+(\.\d{1,3})?/,Rr=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,er=/^[1-9]\d?/,Ei=/^([1-9]\d|\d)/,En;En={};function R(n,s,o){En[n]=re(s)?s:function(l,h){return l&&o?o:s}}function nd(n,s){if(!u(En,n))return new RegExp(id(n));return En[n](s._strict,s._locale)}function id(n){return it(n.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(s,o,l,h,m){return o||l||h||m}))}function it(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function qe(n){if(n<0)return Math.ceil(n)||0;else return Math.floor(n)}function z(n){var s=+n,o=0;if(s!==0&&isFinite(s))o=qe(s);return o}var Oi={};function ee(n,s){var o,l=s,h;if(typeof n==="string")n=[n];if(d(s))l=function(m,y){y[s]=z(m)};h=n.length;for(o=0;o<h;o++)Oi[n[o]]=l}function Tr(n,s){ee(n,function(o,l,h,m){h._w=h._w||{},s(o,h._w,h,m)})}function sd(n,s,o){if(s!=null&&u(Oi,n))Oi[n](s,o._a,o,n)}function On(n){return n%4===0&&n%100!==0||n%400===0}var xe=0,st=1,ze=2,de=3,je=4,at=5,Tt=6,ad=7,od=8;L("Y",0,0,function(){var n=this.year();return n<=9999?G(n,4):"+"+n}),L(0,["YY",2],0,function(){return this.year()%100}),L(0,["YYYY",4],0,"year"),L(0,["YYYYY",5],0,"year"),L(0,["YYYYYY",6,!0],0,"year"),R("Y",xn),R("YY",ne,Pe),R("YYYY",Mi,xi),R("YYYYY",Sn,bn),R("YYYYYY",Sn,bn),ee(["YYYYY","YYYYYY"],xe),ee("YYYY",function(n,s){s[xe]=n.length===2?t.parseTwoDigitYear(n):z(n)}),ee("YY",function(n,s){s[xe]=t.parseTwoDigitYear(n)}),ee("Y",function(n,s){s[xe]=parseInt(n,10)});function Nr(n){return On(n)?366:365}t.parseTwoDigitYear=function(n){return z(n)+(z(n)>68?1900:2000)};var Za=tr("FullYear",!0);function ud(){return On(this.year())}function tr(n,s){return function(o){if(o!=null)return Ja(this,n,o),t.updateOffset(this,s),this;else return Lr(this,n)}}function Lr(n,s){if(!n.isValid())return NaN;var{_d:o,_isUTC:l}=n;switch(s){case"Milliseconds":return l?o.getUTCMilliseconds():o.getMilliseconds();case"Seconds":return l?o.getUTCSeconds():o.getSeconds();case"Minutes":return l?o.getUTCMinutes():o.getMinutes();case"Hours":return l?o.getUTCHours():o.getHours();case"Date":return l?o.getUTCDate():o.getDate();case"Day":return l?o.getUTCDay():o.getDay();case"Month":return l?o.getUTCMonth():o.getMonth();case"FullYear":return l?o.getUTCFullYear():o.getFullYear();default:return NaN}}function Ja(n,s,o){var l,h,m,y,k;if(!n.isValid()||isNaN(o))return;switch(l=n._d,h=n._isUTC,s){case"Milliseconds":return void(h?l.setUTCMilliseconds(o):l.setMilliseconds(o));case"Seconds":return void(h?l.setUTCSeconds(o):l.setSeconds(o));case"Minutes":return void(h?l.setUTCMinutes(o):l.setMinutes(o));case"Hours":return void(h?l.setUTCHours(o):l.setHours(o));case"Date":return void(h?l.setUTCDate(o):l.setDate(o));case"FullYear":break;default:return}m=o,y=n.month(),k=n.date(),k=k===29&&y===1&&!On(m)?28:k,h?l.setUTCFullYear(m,y,k):l.setFullYear(m,y,k)}function ld(n){if(n=Te(n),re(this[n]))return this[n]();return this}function fd(n,s){if(typeof n==="object"){n=Qt(n);var o=ed(n),l,h=o.length;for(l=0;l<h;l++)this[o[l].unit](n[o[l].unit])}else if(n=Te(n),re(this[n]))return this[n](s);return this}function cd(n,s){return(n%s+s)%s}var ue;if(Array.prototype.indexOf)ue=Array.prototype.indexOf;else ue=function(n){var s;for(s=0;s<this.length;++s)if(this[s]===n)return s;return-1};function Di(n,s){if(isNaN(n)||isNaN(s))return NaN;var o=cd(s,12);return n+=(s-o)/12,o===1?On(n)?29:28:31-o%7%2}L("M",["MM",2],"Mo",function(){return this.month()+1}),L("MMM",0,0,function(n){return this.localeData().monthsShort(this,n)}),L("MMMM",0,0,function(n){return this.localeData().months(this,n)}),R("M",ne,er),R("MM",ne,Pe),R("MMM",function(n,s){return s.monthsShortRegex(n)}),R("MMMM",function(n,s){return s.monthsRegex(n)}),ee(["M","MM"],function(n,s){s[st]=z(n)-1}),ee(["MMM","MMMM"],function(n,s,o,l){var h=o._locale.monthsParse(n,l,o._strict);if(h!=null)s[st]=h;else p(o).invalidMonth=n});var hd="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ka="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Qa=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,dd=Rr,md=Rr;function gd(n,s){if(!n)return i(this._months)?this._months:this._months.standalone;return i(this._months)?this._months[n.month()]:this._months[(this._months.isFormat||Qa).test(s)?"format":"standalone"][n.month()]}function pd(n,s){if(!n)return i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone;return i(this._monthsShort)?this._monthsShort[n.month()]:this._monthsShort[Qa.test(s)?"format":"standalone"][n.month()]}function yd(n,s,o){var l,h,m,y=n.toLocaleLowerCase();if(!this._monthsParse){this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[];for(l=0;l<12;++l)m=w([2000,l]),this._shortMonthsParse[l]=this.monthsShort(m,"").toLocaleLowerCase(),this._longMonthsParse[l]=this.months(m,"").toLocaleLowerCase()}if(o)if(s==="MMM")return h=ue.call(this._shortMonthsParse,y),h!==-1?h:null;else return h=ue.call(this._longMonthsParse,y),h!==-1?h:null;else if(s==="MMM"){if(h=ue.call(this._shortMonthsParse,y),h!==-1)return h;return h=ue.call(this._longMonthsParse,y),h!==-1?h:null}else{if(h=ue.call(this._longMonthsParse,y),h!==-1)return h;return h=ue.call(this._shortMonthsParse,y),h!==-1?h:null}}function _d(n,s,o){var l,h,m;if(this._monthsParseExact)return yd.call(this,n,s,o);if(!this._monthsParse)this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[];for(l=0;l<12;l++){if(h=w([2000,l]),o&&!this._longMonthsParse[l])this._longMonthsParse[l]=new RegExp("^"+this.months(h,"").replace(".","")+"$","i"),this._shortMonthsParse[l]=new RegExp("^"+this.monthsShort(h,"").replace(".","")+"$","i");if(!o&&!this._monthsParse[l])m="^"+this.months(h,"")+"|^"+this.monthsShort(h,""),this._monthsParse[l]=new RegExp(m.replace(".",""),"i");if(o&&s==="MMMM"&&this._longMonthsParse[l].test(n))return l;else if(o&&s==="MMM"&&this._shortMonthsParse[l].test(n))return l;else if(!o&&this._monthsParse[l].test(n))return l}}function Xa(n,s){if(!n.isValid())return n;if(typeof s==="string"){if(/^\d+$/.test(s))s=z(s);else if(s=n.localeData().monthsParse(s),!d(s))return n}var o=s,l=n.date();return l=l<29?l:Math.min(l,Di(n.year(),o)),n._isUTC?n._d.setUTCMonth(o,l):n._d.setMonth(o,l),n}function eo(n){if(n!=null)return Xa(this,n),t.updateOffset(this,!0),this;else return Lr(this,"Month")}function wd(){return Di(this.year(),this.month())}function bd(n){if(this._monthsParseExact){if(!u(this,"_monthsRegex"))to.call(this);if(n)return this._monthsShortStrictRegex;else return this._monthsShortRegex}else{if(!u(this,"_monthsShortRegex"))this._monthsShortRegex=dd;return this._monthsShortStrictRegex&&n?this._monthsShortStrictRegex:this._monthsShortRegex}}function vd(n){if(this._monthsParseExact){if(!u(this,"_monthsRegex"))to.call(this);if(n)return this._monthsStrictRegex;else return this._monthsRegex}else{if(!u(this,"_monthsRegex"))this._monthsRegex=md;return this._monthsStrictRegex&&n?this._monthsStrictRegex:this._monthsRegex}}function to(){function n(C,J){return J.length-C.length}var s=[],o=[],l=[],h,m,y,k;for(h=0;h<12;h++)m=w([2000,h]),y=it(this.monthsShort(m,"")),k=it(this.months(m,"")),s.push(y),o.push(k),l.push(k),l.push(y);s.sort(n),o.sort(n),l.sort(n),this._monthsRegex=new RegExp("^("+l.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Sd(n,s,o,l,h,m,y){var k;if(n<100&&n>=0){if(k=new Date(n+400,s,o,l,h,m,y),isFinite(k.getFullYear()))k.setFullYear(n)}else k=new Date(n,s,o,l,h,m,y);return k}function Pr(n){var s,o;if(n<100&&n>=0){if(o=Array.prototype.slice.call(arguments),o[0]=n+400,s=new Date(Date.UTC.apply(null,o)),isFinite(s.getUTCFullYear()))s.setUTCFullYear(n)}else s=new Date(Date.UTC.apply(null,arguments));return s}function Dn(n,s,o){var l=7+s-o,h=(7+Pr(n,0,l).getUTCDay()-s)%7;return-h+l-1}function ro(n,s,o,l,h){var m=(7+o-l)%7,y=Dn(n,l,h),k=1+7*(s-1)+m+y,C,J;if(k<=0)C=n-1,J=Nr(C)+k;else if(k>Nr(n))C=n+1,J=k-Nr(n);else C=n,J=k;return{year:C,dayOfYear:J}}function Ar(n,s,o){var l=Dn(n.year(),s,o),h=Math.floor((n.dayOfYear()-l-1)/7)+1,m,y;if(h<1)y=n.year()-1,m=h+ot(y,s,o);else if(h>ot(n.year(),s,o))m=h-ot(n.year(),s,o),y=n.year()+1;else y=n.year(),m=h;return{week:m,year:y}}function ot(n,s,o){var l=Dn(n,s,o),h=Dn(n+1,s,o);return(Nr(n)-l+h)/7}L("w",["ww",2],"wo","week"),L("W",["WW",2],"Wo","isoWeek"),R("w",ne,er),R("ww",ne,Pe),R("W",ne,er),R("WW",ne,Pe),Tr(["w","ww","W","WW"],function(n,s,o,l){s[l.substr(0,1)]=z(n)});function xd(n){return Ar(n,this._week.dow,this._week.doy).week}var Md={dow:0,doy:6};function Ed(){return this._week.dow}function Od(){return this._week.doy}function Dd(n){var s=this.localeData().week(this);return n==null?s:this.add((n-s)*7,"d")}function kd(n){var s=Ar(this,1,4).week;return n==null?s:this.add((n-s)*7,"d")}L("d",0,"do","day"),L("dd",0,0,function(n){return this.localeData().weekdaysMin(this,n)}),L("ddd",0,0,function(n){return this.localeData().weekdaysShort(this,n)}),L("dddd",0,0,function(n){return this.localeData().weekdays(this,n)}),L("e",0,0,"weekday"),L("E",0,0,"isoWeekday"),R("d",ne),R("e",ne),R("E",ne),R("dd",function(n,s){return s.weekdaysMinRegex(n)}),R("ddd",function(n,s){return s.weekdaysShortRegex(n)}),R("dddd",function(n,s){return s.weekdaysRegex(n)}),Tr(["dd","ddd","dddd"],function(n,s,o,l){var h=o._locale.weekdaysParse(n,l,o._strict);if(h!=null)s.d=h;else p(o).invalidWeekday=n}),Tr(["d","e","E"],function(n,s,o,l){s[l]=z(n)});function Rd(n,s){if(typeof n!=="string")return n;if(!isNaN(n))return parseInt(n,10);if(n=s.weekdaysParse(n),typeof n==="number")return n;return null}function Td(n,s){if(typeof n==="string")return s.weekdaysParse(n)%7||7;return isNaN(n)?null:n}function ki(n,s){return n.slice(s,7).concat(n.slice(0,s))}var Nd="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),no="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ld="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Pd=Rr,Ad=Rr,qd=Rr;function Yd(n,s){var o=i(this._weekdays)?this._weekdays:this._weekdays[n&&n!==!0&&this._weekdays.isFormat.test(s)?"format":"standalone"];return n===!0?ki(o,this._week.dow):n?o[n.day()]:o}function Fd(n){return n===!0?ki(this._weekdaysShort,this._week.dow):n?this._weekdaysShort[n.day()]:this._weekdaysShort}function Cd(n){return n===!0?ki(this._weekdaysMin,this._week.dow):n?this._weekdaysMin[n.day()]:this._weekdaysMin}function jd(n,s,o){var l,h,m,y=n.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[];for(l=0;l<7;++l)m=w([2000,1]).day(l),this._minWeekdaysParse[l]=this.weekdaysMin(m,"").toLocaleLowerCase(),this._shortWeekdaysParse[l]=this.weekdaysShort(m,"").toLocaleLowerCase(),this._weekdaysParse[l]=this.weekdays(m,"").toLocaleLowerCase()}if(o)if(s==="dddd")return h=ue.call(this._weekdaysParse,y),h!==-1?h:null;else if(s==="ddd")return h=ue.call(this._shortWeekdaysParse,y),h!==-1?h:null;else return h=ue.call(this._minWeekdaysParse,y),h!==-1?h:null;else if(s==="dddd"){if(h=ue.call(this._weekdaysParse,y),h!==-1)return h;if(h=ue.call(this._shortWeekdaysParse,y),h!==-1)return h;return h=ue.call(this._minWeekdaysParse,y),h!==-1?h:null}else if(s==="ddd"){if(h=ue.call(this._shortWeekdaysParse,y),h!==-1)return h;if(h=ue.call(this._weekdaysParse,y),h!==-1)return h;return h=ue.call(this._minWeekdaysParse,y),h!==-1?h:null}else{if(h=ue.call(this._minWeekdaysParse,y),h!==-1)return h;if(h=ue.call(this._weekdaysParse,y),h!==-1)return h;return h=ue.call(this._shortWeekdaysParse,y),h!==-1?h:null}}function Id(n,s,o){var l,h,m;if(this._weekdaysParseExact)return jd.call(this,n,s,o);if(!this._weekdaysParse)this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[];for(l=0;l<7;l++){if(h=w([2000,1]).day(l),o&&!this._fullWeekdaysParse[l])this._fullWeekdaysParse[l]=new RegExp("^"+this.weekdays(h,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[l]=new RegExp("^"+this.weekdaysShort(h,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[l]=new RegExp("^"+this.weekdaysMin(h,"").replace(".","\\.?")+"$","i");if(!this._weekdaysParse[l])m="^"+this.weekdays(h,"")+"|^"+this.weekdaysShort(h,"")+"|^"+this.weekdaysMin(h,""),this._weekdaysParse[l]=new RegExp(m.replace(".",""),"i");if(o&&s==="dddd"&&this._fullWeekdaysParse[l].test(n))return l;else if(o&&s==="ddd"&&this._shortWeekdaysParse[l].test(n))return l;else if(o&&s==="dd"&&this._minWeekdaysParse[l].test(n))return l;else if(!o&&this._weekdaysParse[l].test(n))return l}}function Wd(n){if(!this.isValid())return n!=null?this:NaN;var s=Lr(this,"Day");if(n!=null)return n=Rd(n,this.localeData()),this.add(n-s,"d");else return s}function $d(n){if(!this.isValid())return n!=null?this:NaN;var s=(this.day()+7-this.localeData()._week.dow)%7;return n==null?s:this.add(n-s,"d")}function Hd(n){if(!this.isValid())return n!=null?this:NaN;if(n!=null){var s=Td(n,this.localeData());return this.day(this.day()%7?s:s-7)}else return this.day()||7}function Ud(n){if(this._weekdaysParseExact){if(!u(this,"_weekdaysRegex"))Ri.call(this);if(n)return this._weekdaysStrictRegex;else return this._weekdaysRegex}else{if(!u(this,"_weekdaysRegex"))this._weekdaysRegex=Pd;return this._weekdaysStrictRegex&&n?this._weekdaysStrictRegex:this._weekdaysRegex}}function Gd(n){if(this._weekdaysParseExact){if(!u(this,"_weekdaysRegex"))Ri.call(this);if(n)return this._weekdaysShortStrictRegex;else return this._weekdaysShortRegex}else{if(!u(this,"_weekdaysShortRegex"))this._weekdaysShortRegex=Ad;return this._weekdaysShortStrictRegex&&n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}}function Vd(n){if(this._weekdaysParseExact){if(!u(this,"_weekdaysRegex"))Ri.call(this);if(n)return this._weekdaysMinStrictRegex;else return this._weekdaysMinRegex}else{if(!u(this,"_weekdaysMinRegex"))this._weekdaysMinRegex=qd;return this._weekdaysMinStrictRegex&&n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}}function Ri(){function n(Ee,ht){return ht.length-Ee.length}var s=[],o=[],l=[],h=[],m,y,k,C,J;for(m=0;m<7;m++)y=w([2000,1]).day(m),k=it(this.weekdaysMin(y,"")),C=it(this.weekdaysShort(y,"")),J=it(this.weekdays(y,"")),s.push(k),o.push(C),l.push(J),h.push(k),h.push(C),h.push(J);s.sort(n),o.sort(n),l.sort(n),h.sort(n),this._weekdaysRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ti(){return this.hours()%12||12}function zd(){return this.hours()||24}L("H",["HH",2],0,"hour"),L("h",["hh",2],0,Ti),L("k",["kk",2],0,zd),L("hmm",0,0,function(){return""+Ti.apply(this)+G(this.minutes(),2)}),L("hmmss",0,0,function(){return""+Ti.apply(this)+G(this.minutes(),2)+G(this.seconds(),2)}),L("Hmm",0,0,function(){return""+this.hours()+G(this.minutes(),2)}),L("Hmmss",0,0,function(){return""+this.hours()+G(this.minutes(),2)+G(this.seconds(),2)});function io(n,s){L(n,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),s)})}io("a",!0),io("A",!1);function so(n,s){return s._meridiemParse}R("a",so),R("A",so),R("H",ne,Ei),R("h",ne,er),R("k",ne,er),R("HH",ne,Pe),R("hh",ne,Pe),R("kk",ne,Pe),R("hmm",za),R("hmmss",Ba),R("Hmm",za),R("Hmmss",Ba),ee(["H","HH"],de),ee(["k","kk"],function(n,s,o){var l=z(n);s[de]=l===24?0:l}),ee(["a","A"],function(n,s,o){o._isPm=o._locale.isPM(n),o._meridiem=n}),ee(["h","hh"],function(n,s,o){s[de]=z(n),p(o).bigHour=!0}),ee("hmm",function(n,s,o){var l=n.length-2;s[de]=z(n.substr(0,l)),s[je]=z(n.substr(l)),p(o).bigHour=!0}),ee("hmmss",function(n,s,o){var l=n.length-4,h=n.length-2;s[de]=z(n.substr(0,l)),s[je]=z(n.substr(l,2)),s[at]=z(n.substr(h)),p(o).bigHour=!0}),ee("Hmm",function(n,s,o){var l=n.length-2;s[de]=z(n.substr(0,l)),s[je]=z(n.substr(l))}),ee("Hmmss",function(n,s,o){var l=n.length-4,h=n.length-2;s[de]=z(n.substr(0,l)),s[je]=z(n.substr(l,2)),s[at]=z(n.substr(h))});function Bd(n){return(n+"").toLowerCase().charAt(0)==="p"}var Zd=/[ap]\.?m?\.?/i,Jd=tr("Hours",!0);function Kd(n,s,o){if(n>11)return o?"pm":"PM";else return o?"am":"AM"}var ao={calendar:S,longDateFormat:Le,invalidDate:vi,ordinal:wn,dayOfMonthOrdinalParse:Zt,relativeTime:Si,months:hd,monthsShort:Ka,week:Md,weekdays:Nd,weekdaysMin:Ld,weekdaysShort:no,meridiemParse:Zd},se={},qr={},Yr;function Qd(n,s){var o,l=Math.min(n.length,s.length);for(o=0;o<l;o+=1)if(n[o]!==s[o])return o;return l}function oo(n){return n?n.toLowerCase().replace("_","-"):n}function Xd(n){var s=0,o,l,h,m;while(s<n.length){m=oo(n[s]).split("-"),o=m.length,l=oo(n[s+1]),l=l?l.split("-"):null;while(o>0){if(h=kn(m.slice(0,o).join("-")),h)return h;if(l&&l.length>=o&&Qd(m,l)>=o-1)break;o--}s++}return Yr}function em(n){return!!(n&&n.match("^[^/\\\\]*$"))}function kn(n){var s=null,o;if(se[n]===void 0&&typeof Or<"u"&&Or&&Or.exports&&em(n))try{s=Yr._abbr,o=j,o("./locale/"+n),pt(s)}catch(l){se[n]=null}return se[n]}function pt(n,s){var o;if(n){if(c(s))o=ut(n);else o=Ni(n,s);if(o)Yr=o;else if(typeof console<"u"&&console.warn)console.warn("Locale "+n+" not found. Did you forget to load it?")}return Yr._abbr}function Ni(n,s){if(s!==null){var o,l=ao;if(s.abbr=n,se[n]!=null)fe("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),l=se[n]._config;else if(s.parentLocale!=null)if(se[s.parentLocale]!=null)l=se[s.parentLocale]._config;else if(o=kn(s.parentLocale),o!=null)l=o._config;else{if(!qr[s.parentLocale])qr[s.parentLocale]=[];return qr[s.parentLocale].push({name:n,config:s}),null}if(se[n]=new ve(be(l,s)),qr[n])qr[n].forEach(function(h){Ni(h.name,h.config)});return pt(n),se[n]}else return delete se[n],null}function tm(n,s){if(s!=null){var o,l,h=ao;if(se[n]!=null&&se[n].parentLocale!=null)se[n].set(be(se[n]._config,s));else{if(l=kn(n),l!=null)h=l._config;if(s=be(h,s),l==null)s.abbr=n;o=new ve(s),o.parentLocale=se[n],se[n]=o}pt(n)}else if(se[n]!=null){if(se[n].parentLocale!=null){if(se[n]=se[n].parentLocale,n===pt())pt(n)}else if(se[n]!=null)delete se[n]}return se[n]}function ut(n){var s;if(n&&n._locale&&n._locale._abbr)n=n._locale._abbr;if(!n)return Yr;if(!i(n)){if(s=kn(n),s)return s;n=[n]}return Xd(n)}function rm(){return Ve(se)}function Li(n){var s,o=n._a;if(o&&p(n).overflow===-2){if(s=o[st]<0||o[st]>11?st:o[ze]<1||o[ze]>Di(o[xe],o[st])?ze:o[de]<0||o[de]>24||o[de]===24&&(o[je]!==0||o[at]!==0||o[Tt]!==0)?de:o[je]<0||o[je]>59?je:o[at]<0||o[at]>59?at:o[Tt]<0||o[Tt]>999?Tt:-1,p(n)._overflowDayOfYear&&(s<xe||s>ze))s=ze;if(p(n)._overflowWeeks&&s===-1)s=ad;if(p(n)._overflowWeekday&&s===-1)s=od;p(n).overflow=s}return n}var nm=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,im=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,sm=/Z|[+-]\d\d(?::?\d\d)?/,Rn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Pi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],am=/^\/?Date\((-?\d+)/i,om=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,um={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function uo(n){var s,o,l=n._i,h=nm.exec(l)||im.exec(l),m,y,k,C,J=Rn.length,Ee=Pi.length;if(h){p(n).iso=!0;for(s=0,o=J;s<o;s++)if(Rn[s][1].exec(h[1])){y=Rn[s][0],m=Rn[s][2]!==!1;break}if(y==null){n._isValid=!1;return}if(h[3]){for(s=0,o=Ee;s<o;s++)if(Pi[s][1].exec(h[3])){k=(h[2]||" ")+Pi[s][0];break}if(k==null){n._isValid=!1;return}}if(!m&&k!=null){n._isValid=!1;return}if(h[4])if(sm.exec(h[4]))C="Z";else{n._isValid=!1;return}n._f=y+(k||"")+(C||""),qi(n)}else n._isValid=!1}function lm(n,s,o,l,h,m){var y=[fm(n),Ka.indexOf(s),parseInt(o,10),parseInt(l,10),parseInt(h,10)];if(m)y.push(parseInt(m,10));return y}function fm(n){var s=parseInt(n,10);if(s<=49)return 2000+s;else if(s<=999)return 1900+s;return s}function cm(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function hm(n,s,o){if(n){var l=no.indexOf(n),h=new Date(s[0],s[1],s[2]).getDay();if(l!==h)return p(o).weekdayMismatch=!0,o._isValid=!1,!1}return!0}function dm(n,s,o){if(n)return um[n];else if(s)return 0;else{var l=parseInt(o,10),h=l%100,m=(l-h)/100;return m*60+h}}function lo(n){var s=om.exec(cm(n._i)),o;if(s){if(o=lm(s[4],s[3],s[2],s[5],s[6],s[7]),!hm(s[1],o,n))return;n._a=o,n._tzm=dm(s[8],s[9],s[10]),n._d=Pr.apply(null,n._a),n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm),p(n).rfc2822=!0}else n._isValid=!1}function mm(n){var s=am.exec(n._i);if(s!==null){n._d=new Date(+s[1]);return}if(uo(n),n._isValid===!1)delete n._isValid;else return;if(lo(n),n._isValid===!1)delete n._isValid;else return;if(n._strict)n._isValid=!1;else t.createFromInputFallback(n)}t.createFromInputFallback=I("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))});function rr(n,s,o){if(n!=null)return n;if(s!=null)return s;return o}function gm(n){var s=new Date(t.now());if(n._useUTC)return[s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()];return[s.getFullYear(),s.getMonth(),s.getDate()]}function Ai(n){var s,o,l=[],h,m,y;if(n._d)return;if(h=gm(n),n._w&&n._a[ze]==null&&n._a[st]==null)pm(n);if(n._dayOfYear!=null){if(y=rr(n._a[xe],h[xe]),n._dayOfYear>Nr(y)||n._dayOfYear===0)p(n)._overflowDayOfYear=!0;o=Pr(y,0,n._dayOfYear),n._a[st]=o.getUTCMonth(),n._a[ze]=o.getUTCDate()}for(s=0;s<3&&n._a[s]==null;++s)n._a[s]=l[s]=h[s];for(;s<7;s++)n._a[s]=l[s]=n._a[s]==null?s===2?1:0:n._a[s];if(n._a[de]===24&&n._a[je]===0&&n._a[at]===0&&n._a[Tt]===0)n._nextDay=!0,n._a[de]=0;if(n._d=(n._useUTC?Pr:Sd).apply(null,l),m=n._useUTC?n._d.getUTCDay():n._d.getDay(),n._tzm!=null)n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm);if(n._nextDay)n._a[de]=24;if(n._w&&typeof n._w.d<"u"&&n._w.d!==m)p(n).weekdayMismatch=!0}function pm(n){var s,o,l,h,m,y,k,C,J;if(s=n._w,s.GG!=null||s.W!=null||s.E!=null){if(m=1,y=4,o=rr(s.GG,n._a[xe],Ar(ie(),1,4).year),l=rr(s.W,1),h=rr(s.E,1),h<1||h>7)C=!0}else if(m=n._locale._week.dow,y=n._locale._week.doy,J=Ar(ie(),m,y),o=rr(s.gg,n._a[xe],J.year),l=rr(s.w,J.week),s.d!=null){if(h=s.d,h<0||h>6)C=!0}else if(s.e!=null){if(h=s.e+m,s.e<0||s.e>6)C=!0}else h=m;if(l<1||l>ot(o,m,y))p(n)._overflowWeeks=!0;else if(C!=null)p(n)._overflowWeekday=!0;else k=ro(o,l,h,m,y),n._a[xe]=k.year,n._dayOfYear=k.dayOfYear}t.ISO_8601=function(){},t.RFC_2822=function(){};function qi(n){if(n._f===t.ISO_8601){uo(n);return}if(n._f===t.RFC_2822){lo(n);return}n._a=[],p(n).empty=!0;var s=""+n._i,o,l,h,m,y,k=s.length,C=0,J,Ee;h=pn(n._f,n._locale).match(ye)||[],Ee=h.length;for(o=0;o<Ee;o++){if(m=h[o],l=(s.match(nd(m,n))||[])[0],l){if(y=s.substr(0,s.indexOf(l)),y.length>0)p(n).unusedInput.push(y);s=s.slice(s.indexOf(l)+l.length),C+=l.length}if(Re[m]){if(l)p(n).empty=!1;else p(n).unusedTokens.push(m);sd(m,l,n)}else if(n._strict&&!l)p(n).unusedTokens.push(m)}if(p(n).charsLeftOver=k-C,s.length>0)p(n).unusedInput.push(s);if(n._a[de]<=12&&p(n).bigHour===!0&&n._a[de]>0)p(n).bigHour=void 0;if(p(n).parsedDateParts=n._a.slice(0),p(n).meridiem=n._meridiem,n._a[de]=ym(n._locale,n._a[de],n._meridiem),J=p(n).era,J!==null)n._a[xe]=n._locale.erasConvertYear(J,n._a[xe]);Ai(n),Li(n)}function ym(n,s,o){var l;if(o==null)return s;if(n.meridiemHour!=null)return n.meridiemHour(s,o);else if(n.isPM!=null){if(l=n.isPM(o),l&&s<12)s+=12;if(!l&&s===12)s=0;return s}else return s}function _m(n){var s,o,l,h,m,y,k=!1,C=n._f.length;if(C===0){p(n).invalidFormat=!0,n._d=new Date(NaN);return}for(h=0;h<C;h++){if(m=0,y=!1,s=N({},n),n._useUTC!=null)s._useUTC=n._useUTC;if(s._f=n._f[h],qi(s),P(s))y=!0;if(m+=p(s).charsLeftOver,m+=p(s).unusedTokens.length*10,p(s).score=m,!k){if(l==null||m<l||y){if(l=m,o=s,y)k=!0}}else if(m<l)l=m,o=s}_(n,o||s)}function wm(n){if(n._d)return;var s=Qt(n._i),o=s.day===void 0?s.date:s.day;n._a=v([s.year,s.month,o,s.hour,s.minute,s.second,s.millisecond],function(l){return l&&parseInt(l,10)}),Ai(n)}function bm(n){var s=new Z(Li(fo(n)));if(s._nextDay)s.add(1,"d"),s._nextDay=void 0;return s}function fo(n){var{_i:s,_f:o}=n;if(n._locale=n._locale||ut(n._l),s===null||o===void 0&&s==="")return A({nullInput:!0});if(typeof s==="string")n._i=s=n._locale.preparse(s);if(Y(s))return new Z(Li(s));else if(g(s))n._d=s;else if(i(o))_m(n);else if(o)qi(n);else vm(n);if(!P(n))n._d=null;return n}function vm(n){var s=n._i;if(c(s))n._d=new Date(t.now());else if(g(s))n._d=new Date(s.valueOf());else if(typeof s==="string")mm(n);else if(i(s))n._a=v(s.slice(0),function(o){return parseInt(o,10)}),Ai(n);else if(a(s))wm(n);else if(d(s))n._d=new Date(s);else t.createFromInputFallback(n)}function co(n,s,o,l,h){var m={};if(s===!0||s===!1)l=s,s=void 0;if(o===!0||o===!1)l=o,o=void 0;if(a(n)&&f(n)||i(n)&&n.length===0)n=void 0;return m._isAMomentObject=!0,m._useUTC=m._isUTC=h,m._l=o,m._i=n,m._f=s,m._strict=l,bm(m)}function ie(n,s,o,l){return co(n,s,o,l,!1)}var Sm=I("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=ie.apply(null,arguments);if(this.isValid()&&n.isValid())return n<this?this:n;else return A()}),xm=I("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=ie.apply(null,arguments);if(this.isValid()&&n.isValid())return n>this?this:n;else return A()});function ho(n,s){var o,l;if(s.length===1&&i(s[0]))s=s[0];if(!s.length)return ie();o=s[0];for(l=1;l<s.length;++l)if(!s[l].isValid()||s[l][n](o))o=s[l];return o}function Mm(){var n=[].slice.call(arguments,0);return ho("isBefore",n)}function Em(){var n=[].slice.call(arguments,0);return ho("isAfter",n)}var Om=function(){return Date.now?Date.now():+new Date},Fr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Dm(n){var s,o=!1,l,h=Fr.length;for(s in n)if(u(n,s)&&!(ue.call(Fr,s)!==-1&&(n[s]==null||!isNaN(n[s]))))return!1;for(l=0;l<h;++l)if(n[Fr[l]]){if(o)return!1;if(parseFloat(n[Fr[l]])!==z(n[Fr[l]]))o=!0}return!0}function km(){return this._isValid}function Rm(){return Ie(NaN)}function Tn(n){var s=Qt(n),o=s.year||0,l=s.quarter||0,h=s.month||0,m=s.week||s.isoWeek||0,y=s.day||0,k=s.hour||0,C=s.minute||0,J=s.second||0,Ee=s.millisecond||0;this._isValid=Dm(s),this._milliseconds=+Ee+J*1000+C*60000+k*1000*60*60,this._days=+y+m*7,this._months=+h+l*3+o*12,this._data={},this._locale=ut(),this._bubble()}function Nn(n){return n instanceof Tn}function Yi(n){if(n<0)return Math.round(-1*n)*-1;else return Math.round(n)}function Tm(n,s,o){var l=Math.min(n.length,s.length),h=Math.abs(n.length-s.length),m=0,y;for(y=0;y<l;y++)if(o&&n[y]!==s[y]||!o&&z(n[y])!==z(s[y]))m++;return m+h}function mo(n,s){L(n,0,0,function(){var o=this.utcOffset(),l="+";if(o<0)o=-o,l="-";return l+G(~~(o/60),2)+s+G(~~o%60,2)})}mo("Z",":"),mo("ZZ",""),R("Z",Mn),R("ZZ",Mn),ee(["Z","ZZ"],function(n,s,o){o._useUTC=!0,o._tzm=Fi(Mn,n)});var Nm=/([\+\-]|\d\d)/gi;function Fi(n,s){var o=(s||"").match(n),l,h,m;if(o===null)return null;return l=o[o.length-1]||[],h=(l+"").match(Nm)||["-",0,0],m=+(h[1]*60)+z(h[2]),m===0?0:h[0]==="+"?m:-m}function Ci(n,s){var o,l;if(s._isUTC)return o=s.clone(),l=(Y(n)||g(n)?n.valueOf():ie(n).valueOf())-o.valueOf(),o._d.setTime(o._d.valueOf()+l),t.updateOffset(o,!1),o;else return ie(n).local()}function ji(n){return-Math.round(n._d.getTimezoneOffset())}t.updateOffset=function(){};function Lm(n,s,o){var l=this._offset||0,h;if(!this.isValid())return n!=null?this:NaN;if(n!=null){if(typeof n==="string"){if(n=Fi(Mn,n),n===null)return this}else if(Math.abs(n)<16&&!o)n=n*60;if(!this._isUTC&&s)h=ji(this);if(this._offset=n,this._isUTC=!0,h!=null)this.add(h,"m");if(l!==n){if(!s||this._changeInProgress)_o(this,Ie(n-l,"m"),1,!1);else if(!this._changeInProgress)this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null}return this}else return this._isUTC?l:ji(this)}function Pm(n,s){if(n!=null){if(typeof n!=="string")n=-n;return this.utcOffset(n,s),this}else return-this.utcOffset()}function Am(n){return this.utcOffset(0,n)}function qm(n){if(this._isUTC){if(this.utcOffset(0,n),this._isUTC=!1,n)this.subtract(ji(this),"m")}return this}function Ym(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i==="string"){var n=Fi(td,this._i);if(n!=null)this.utcOffset(n);else this.utcOffset(0,!0)}return this}function Fm(n){if(!this.isValid())return!1;return n=n?ie(n).utcOffset():0,(this.utcOffset()-n)%60===0}function Cm(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function jm(){if(!c(this._isDSTShifted))return this._isDSTShifted;var n={},s;if(N(n,this),n=fo(n),n._a)s=n._isUTC?w(n._a):ie(n._a),this._isDSTShifted=this.isValid()&&Tm(n._a,s.toArray())>0;else this._isDSTShifted=!1;return this._isDSTShifted}function Im(){return this.isValid()?!this._isUTC:!1}function Wm(){return this.isValid()?this._isUTC:!1}function go(){return this.isValid()?this._isUTC&&this._offset===0:!1}var $m=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Hm=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ie(n,s){var o=n,l=null,h,m,y;if(Nn(n))o={ms:n._milliseconds,d:n._days,M:n._months};else if(d(n)||!isNaN(+n))if(o={},s)o[s]=+n;else o.milliseconds=+n;else if(l=$m.exec(n))h=l[1]==="-"?-1:1,o={y:0,d:z(l[ze])*h,h:z(l[de])*h,m:z(l[je])*h,s:z(l[at])*h,ms:z(Yi(l[Tt]*1000))*h};else if(l=Hm.exec(n))h=l[1]==="-"?-1:1,o={y:Nt(l[2],h),M:Nt(l[3],h),w:Nt(l[4],h),d:Nt(l[5],h),h:Nt(l[6],h),m:Nt(l[7],h),s:Nt(l[8],h)};else if(o==null)o={};else if(typeof o==="object"&&(("from"in o)||("to"in o)))y=Um(ie(o.from),ie(o.to)),o={},o.ms=y.milliseconds,o.M=y.months;if(m=new Tn(o),Nn(n)&&u(n,"_locale"))m._locale=n._locale;if(Nn(n)&&u(n,"_isValid"))m._isValid=n._isValid;return m}Ie.fn=Tn.prototype,Ie.invalid=Rm;function Nt(n,s){var o=n&&parseFloat(n.replace(",","."));return(isNaN(o)?0:o)*s}function po(n,s){var o={};if(o.months=s.month()-n.month()+(s.year()-n.year())*12,n.clone().add(o.months,"M").isAfter(s))--o.months;return o.milliseconds=+s-+n.clone().add(o.months,"M"),o}function Um(n,s){var o;if(!(n.isValid()&&s.isValid()))return{milliseconds:0,months:0};if(s=Ci(s,n),n.isBefore(s))o=po(n,s);else o=po(s,n),o.milliseconds=-o.milliseconds,o.months=-o.months;return o}function yo(n,s){return function(o,l){var h,m;if(l!==null&&!isNaN(+l))fe(s,"moment()."+s+"(period, number) is deprecated. Please use moment()."+s+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),m=o,o=l,l=m;return h=Ie(o,l),_o(this,h,n),this}}function _o(n,s,o,l){var h=s._milliseconds,m=Yi(s._days),y=Yi(s._months);if(!n.isValid())return;if(l=l==null?!0:l,y)Xa(n,Lr(n,"Month")+y*o);if(m)Ja(n,"Date",Lr(n,"Date")+m*o);if(h)n._d.setTime(n._d.valueOf()+h*o);if(l)t.updateOffset(n,m||y)}var Gm=yo(1,"add"),Vm=yo(-1,"subtract");function wo(n){return typeof n==="string"||n instanceof String}function zm(n){return Y(n)||g(n)||wo(n)||d(n)||Zm(n)||Bm(n)||n===null||n===void 0}function Bm(n){var s=a(n)&&!f(n),o=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],h,m,y=l.length;for(h=0;h<y;h+=1)m=l[h],o=o||u(n,m);return s&&o}function Zm(n){var s=i(n),o=!1;if(s)o=n.filter(function(l){return!d(l)&&wo(n)}).length===0;return s&&o}function Jm(n){var s=a(n)&&!f(n),o=!1,l=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],h,m;for(h=0;h<l.length;h+=1)m=l[h],o=o||u(n,m);return s&&o}function Km(n,s){var o=n.diff(s,"days",!0);return o<-6?"sameElse":o<-1?"lastWeek":o<0?"lastDay":o<1?"sameDay":o<2?"nextDay":o<7?"nextWeek":"sameElse"}function Qm(n,s){if(arguments.length===1){if(!arguments[0])n=void 0,s=void 0;else if(zm(arguments[0]))n=arguments[0],s=void 0;else if(Jm(arguments[0]))s=arguments[0],n=void 0}var o=n||ie(),l=Ci(o,this).startOf("day"),h=t.calendarFormat(this,l)||"sameElse",m=s&&(re(s[h])?s[h].call(this,o):s[h]);return this.format(m||this.localeData().calendar(h,this,ie(o)))}function Xm(){return new Z(this)}function eg(n,s){var o=Y(n)?n:ie(n);if(!(this.isValid()&&o.isValid()))return!1;if(s=Te(s)||"millisecond",s==="millisecond")return this.valueOf()>o.valueOf();else return o.valueOf()<this.clone().startOf(s).valueOf()}function tg(n,s){var o=Y(n)?n:ie(n);if(!(this.isValid()&&o.isValid()))return!1;if(s=Te(s)||"millisecond",s==="millisecond")return this.valueOf()<o.valueOf();else return this.clone().endOf(s).valueOf()<o.valueOf()}function rg(n,s,o,l){var h=Y(n)?n:ie(n),m=Y(s)?s:ie(s);if(!(this.isValid()&&h.isValid()&&m.isValid()))return!1;return l=l||"()",(l[0]==="("?this.isAfter(h,o):!this.isBefore(h,o))&&(l[1]===")"?this.isBefore(m,o):!this.isAfter(m,o))}function ng(n,s){var o=Y(n)?n:ie(n),l;if(!(this.isValid()&&o.isValid()))return!1;if(s=Te(s)||"millisecond",s==="millisecond")return this.valueOf()===o.valueOf();else return l=o.valueOf(),this.clone().startOf(s).valueOf()<=l&&l<=this.clone().endOf(s).valueOf()}function ig(n,s){return this.isSame(n,s)||this.isAfter(n,s)}function sg(n,s){return this.isSame(n,s)||this.isBefore(n,s)}function ag(n,s,o){var l,h,m;if(!this.isValid())return NaN;if(l=Ci(n,this),!l.isValid())return NaN;switch(h=(l.utcOffset()-this.utcOffset())*60000,s=Te(s),s){case"year":m=Ln(this,l)/12;break;case"month":m=Ln(this,l);break;case"quarter":m=Ln(this,l)/3;break;case"second":m=(this-l)/1000;break;case"minute":m=(this-l)/60000;break;case"hour":m=(this-l)/3600000;break;case"day":m=(this-l-h)/86400000;break;case"week":m=(this-l-h)/604800000;break;default:m=this-l}return o?m:qe(m)}function Ln(n,s){if(n.date()<s.date())return-Ln(s,n);var o=(s.year()-n.year())*12+(s.month()-n.month()),l=n.clone().add(o,"months"),h,m;if(s-l<0)h=n.clone().add(o-1,"months"),m=(s-l)/(l-h);else h=n.clone().add(o+1,"months"),m=(s-l)/(h-l);return-(o+m)||0}t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function og(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ug(n){if(!this.isValid())return null;var s=n!==!0,o=s?this.clone().utc():this;if(o.year()<0||o.year()>9999)return nt(o,s?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ");if(re(Date.prototype.toISOString))if(s)return this.toDate().toISOString();else return new Date(this.valueOf()+this.utcOffset()*60*1000).toISOString().replace("Z",nt(o,"Z"));return nt(o,s?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function lg(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var n="moment",s="",o,l,h,m;if(!this.isLocal())n=this.utcOffset()===0?"moment.utc":"moment.parseZone",s="Z";return o="["+n+'("]',l=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",h="-MM-DD[T]HH:mm:ss.SSS",m=s+'[")]',this.format(o+l+h+m)}function fg(n){if(!n)n=this.isUtc()?t.defaultFormatUtc:t.defaultFormat;var s=nt(this,n);return this.localeData().postformat(s)}function cg(n,s){if(this.isValid()&&(Y(n)&&n.isValid()||ie(n).isValid()))return Ie({to:this,from:n}).locale(this.locale()).humanize(!s);else return this.localeData().invalidDate()}function hg(n){return this.from(ie(),n)}function dg(n,s){if(this.isValid()&&(Y(n)&&n.isValid()||ie(n).isValid()))return Ie({from:this,to:n}).locale(this.locale()).humanize(!s);else return this.localeData().invalidDate()}function mg(n){return this.to(ie(),n)}function bo(n){var s;if(n===void 0)return this._locale._abbr;else{if(s=ut(n),s!=null)this._locale=s;return this}}var vo=I("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(n){if(n===void 0)return this.localeData();else return this.locale(n)});function So(){return this._locale}var Pn=1000,nr=60*Pn,An=60*nr,xo=3506328*An;function ir(n,s){return(n%s+s)%s}function Mo(n,s,o){if(n<100&&n>=0)return new Date(n+400,s,o)-xo;else return new Date(n,s,o).valueOf()}function Eo(n,s,o){if(n<100&&n>=0)return Date.UTC(n+400,s,o)-xo;else return Date.UTC(n,s,o)}function gg(n){var s,o;if(n=Te(n),n===void 0||n==="millisecond"||!this.isValid())return this;switch(o=this._isUTC?Eo:Mo,n){case"year":s=o(this.year(),0,1);break;case"quarter":s=o(this.year(),this.month()-this.month()%3,1);break;case"month":s=o(this.year(),this.month(),1);break;case"week":s=o(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":s=o(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":s=o(this.year(),this.month(),this.date());break;case"hour":s=this._d.valueOf(),s-=ir(s+(this._isUTC?0:this.utcOffset()*nr),An);break;case"minute":s=this._d.valueOf(),s-=ir(s,nr);break;case"second":s=this._d.valueOf(),s-=ir(s,Pn);break}return this._d.setTime(s),t.updateOffset(this,!0),this}function pg(n){var s,o;if(n=Te(n),n===void 0||n==="millisecond"||!this.isValid())return this;switch(o=this._isUTC?Eo:Mo,n){case"year":s=o(this.year()+1,0,1)-1;break;case"quarter":s=o(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":s=o(this.year(),this.month()+1,1)-1;break;case"week":s=o(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":s=o(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":s=o(this.year(),this.month(),this.date()+1)-1;break;case"hour":s=this._d.valueOf(),s+=An-ir(s+(this._isUTC?0:this.utcOffset()*nr),An)-1;break;case"minute":s=this._d.valueOf(),s+=nr-ir(s,nr)-1;break;case"second":s=this._d.valueOf(),s+=Pn-ir(s,Pn)-1;break}return this._d.setTime(s),t.updateOffset(this,!0),this}function yg(){return this._d.valueOf()-(this._offset||0)*60000}function _g(){return Math.floor(this.valueOf()/1000)}function wg(){return new Date(this.valueOf())}function bg(){var n=this;return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second(),n.millisecond()]}function vg(){var n=this;return{years:n.year(),months:n.month(),date:n.date(),hours:n.hours(),minutes:n.minutes(),seconds:n.seconds(),milliseconds:n.milliseconds()}}function Sg(){return this.isValid()?this.toISOString():null}function xg(){return P(this)}function Mg(){return _({},p(this))}function Eg(){return p(this).overflow}function Og(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}L("N",0,0,"eraAbbr"),L("NN",0,0,"eraAbbr"),L("NNN",0,0,"eraAbbr"),L("NNNN",0,0,"eraName"),L("NNNNN",0,0,"eraNarrow"),L("y",["y",1],"yo","eraYear"),L("y",["yy",2],0,"eraYear"),L("y",["yyy",3],0,"eraYear"),L("y",["yyyy",4],0,"eraYear"),R("N",Ii),R("NN",Ii),R("NNN",Ii),R("NNNN",Fg),R("NNNNN",Cg),ee(["N","NN","NNN","NNNN","NNNNN"],function(n,s,o,l){var h=o._locale.erasParse(n,l,o._strict);if(h)p(o).era=h;else p(o).invalidEra=n}),R("y",Xt),R("yy",Xt),R("yyy",Xt),R("yyyy",Xt),R("yo",jg),ee(["y","yy","yyy","yyyy"],xe),ee(["yo"],function(n,s,o,l){var h;if(o._locale._eraYearOrdinalRegex)h=n.match(o._locale._eraYearOrdinalRegex);if(o._locale.eraYearOrdinalParse)s[xe]=o._locale.eraYearOrdinalParse(n,h);else s[xe]=parseInt(n,10)});function Dg(n,s){var o,l,h,m=this._eras||ut("en")._eras;for(o=0,l=m.length;o<l;++o){switch(typeof m[o].since){case"string":h=t(m[o].since).startOf("day"),m[o].since=h.valueOf();break}switch(typeof m[o].until){case"undefined":m[o].until=1/0;break;case"string":h=t(m[o].until).startOf("day").valueOf(),m[o].until=h.valueOf();break}}return m}function kg(n,s,o){var l,h,m=this.eras(),y,k,C;n=n.toUpperCase();for(l=0,h=m.length;l<h;++l)if(y=m[l].name.toUpperCase(),k=m[l].abbr.toUpperCase(),C=m[l].narrow.toUpperCase(),o)switch(s){case"N":case"NN":case"NNN":if(k===n)return m[l];break;case"NNNN":if(y===n)return m[l];break;case"NNNNN":if(C===n)return m[l];break}else if([y,k,C].indexOf(n)>=0)return m[l]}function Rg(n,s){var o=n.since<=n.until?1:-1;if(s===void 0)return t(n.since).year();else return t(n.since).year()+(s-n.offset)*o}function Tg(){var n,s,o,l=this.localeData().eras();for(n=0,s=l.length;n<s;++n){if(o=this.clone().startOf("day").valueOf(),l[n].since<=o&&o<=l[n].until)return l[n].name;if(l[n].until<=o&&o<=l[n].since)return l[n].name}return""}function Ng(){var n,s,o,l=this.localeData().eras();for(n=0,s=l.length;n<s;++n){if(o=this.clone().startOf("day").valueOf(),l[n].since<=o&&o<=l[n].until)return l[n].narrow;if(l[n].until<=o&&o<=l[n].since)return l[n].narrow}return""}function Lg(){var n,s,o,l=this.localeData().eras();for(n=0,s=l.length;n<s;++n){if(o=this.clone().startOf("day").valueOf(),l[n].since<=o&&o<=l[n].until)return l[n].abbr;if(l[n].until<=o&&o<=l[n].since)return l[n].abbr}return""}function Pg(){var n,s,o,l,h=this.localeData().eras();for(n=0,s=h.length;n<s;++n)if(o=h[n].since<=h[n].until?1:-1,l=this.clone().startOf("day").valueOf(),h[n].since<=l&&l<=h[n].until||h[n].until<=l&&l<=h[n].since)return(this.year()-t(h[n].since).year())*o+h[n].offset;return this.year()}function Ag(n){if(!u(this,"_erasNameRegex"))Wi.call(this);return n?this._erasNameRegex:this._erasRegex}function qg(n){if(!u(this,"_erasAbbrRegex"))Wi.call(this);return n?this._erasAbbrRegex:this._erasRegex}function Yg(n){if(!u(this,"_erasNarrowRegex"))Wi.call(this);return n?this._erasNarrowRegex:this._erasRegex}function Ii(n,s){return s.erasAbbrRegex(n)}function Fg(n,s){return s.erasNameRegex(n)}function Cg(n,s){return s.erasNarrowRegex(n)}function jg(n,s){return s._eraYearOrdinalRegex||Xt}function Wi(){var n=[],s=[],o=[],l=[],h,m,y,k,C,J=this.eras();for(h=0,m=J.length;h<m;++h)y=it(J[h].name),k=it(J[h].abbr),C=it(J[h].narrow),s.push(y),n.push(k),o.push(C),l.push(y),l.push(k),l.push(C);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+s.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}L(0,["gg",2],0,function(){return this.weekYear()%100}),L(0,["GG",2],0,function(){return this.isoWeekYear()%100});function qn(n,s){L(0,[n,n.length],0,s)}qn("gggg","weekYear"),qn("ggggg","weekYear"),qn("GGGG","isoWeekYear"),qn("GGGGG","isoWeekYear"),R("G",xn),R("g",xn),R("GG",ne,Pe),R("gg",ne,Pe),R("GGGG",Mi,xi),R("gggg",Mi,xi),R("GGGGG",Sn,bn),R("ggggg",Sn,bn),Tr(["gggg","ggggg","GGGG","GGGGG"],function(n,s,o,l){s[l.substr(0,2)]=z(n)}),Tr(["gg","GG"],function(n,s,o,l){s[l]=t.parseTwoDigitYear(n)});function Ig(n){return Oo.call(this,n,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Wg(n){return Oo.call(this,n,this.isoWeek(),this.isoWeekday(),1,4)}function $g(){return ot(this.year(),1,4)}function Hg(){return ot(this.isoWeekYear(),1,4)}function Ug(){var n=this.localeData()._week;return ot(this.year(),n.dow,n.doy)}function Gg(){var n=this.localeData()._week;return ot(this.weekYear(),n.dow,n.doy)}function Oo(n,s,o,l,h){var m;if(n==null)return Ar(this,l,h).year;else{if(m=ot(n,l,h),s>m)s=m;return Vg.call(this,n,s,o,l,h)}}function Vg(n,s,o,l,h){var m=ro(n,s,o,l,h),y=Pr(m.year,0,m.dayOfYear);return this.year(y.getUTCFullYear()),this.month(y.getUTCMonth()),this.date(y.getUTCDate()),this}L("Q",0,"Qo","quarter"),R("Q",Ga),ee("Q",function(n,s){s[st]=(z(n)-1)*3});function zg(n){return n==null?Math.ceil((this.month()+1)/3):this.month((n-1)*3+this.month()%3)}L("D",["DD",2],"Do","date"),R("D",ne,er),R("DD",ne,Pe),R("Do",function(n,s){return n?s._dayOfMonthOrdinalParse||s._ordinalParse:s._dayOfMonthOrdinalParseLenient}),ee(["D","DD"],ze),ee("Do",function(n,s){s[ze]=z(n.match(ne)[0])});var Do=tr("Date",!0);L("DDD",["DDDD",3],"DDDo","dayOfYear"),R("DDD",vn),R("DDDD",Va),ee(["DDD","DDDD"],function(n,s,o){o._dayOfYear=z(n)});function Bg(n){var s=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/86400000)+1;return n==null?s:this.add(n-s,"d")}L("m",["mm",2],0,"minute"),R("m",ne,Ei),R("mm",ne,Pe),ee(["m","mm"],je);var Zg=tr("Minutes",!1);L("s",["ss",2],0,"second"),R("s",ne,Ei),R("ss",ne,Pe),ee(["s","ss"],at);var Jg=tr("Seconds",!1);L("S",0,0,function(){return~~(this.millisecond()/100)}),L(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),L(0,["SSS",3],0,"millisecond"),L(0,["SSSS",4],0,function(){return this.millisecond()*10}),L(0,["SSSSS",5],0,function(){return this.millisecond()*100}),L(0,["SSSSSS",6],0,function(){return this.millisecond()*1000}),L(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),L(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),L(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),R("S",vn,Ga),R("SS",vn,Pe),R("SSS",vn,Va);var yt,ko;for(yt="SSSS";yt.length<=9;yt+="S")R(yt,Xt);function Kg(n,s){s[Tt]=z(("0."+n)*1000)}for(yt="S";yt.length<=9;yt+="S")ee(yt,Kg);ko=tr("Milliseconds",!1),L("z",0,0,"zoneAbbr"),L("zz",0,0,"zoneName");function Qg(){return this._isUTC?"UTC":""}function Xg(){return this._isUTC?"Coordinated Universal Time":""}var x=Z.prototype;if(x.add=Gm,x.calendar=Qm,x.clone=Xm,x.diff=ag,x.endOf=pg,x.format=fg,x.from=cg,x.fromNow=hg,x.to=dg,x.toNow=mg,x.get=ld,x.invalidAt=Eg,x.isAfter=eg,x.isBefore=tg,x.isBetween=rg,x.isSame=ng,x.isSameOrAfter=ig,x.isSameOrBefore=sg,x.isValid=xg,x.lang=vo,x.locale=bo,x.localeData=So,x.max=xm,x.min=Sm,x.parsingFlags=Mg,x.set=fd,x.startOf=gg,x.subtract=Vm,x.toArray=bg,x.toObject=vg,x.toDate=wg,x.toISOString=ug,x.inspect=lg,typeof Symbol<"u"&&Symbol.for!=null)x[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"};x.toJSON=Sg,x.toString=og,x.unix=_g,x.valueOf=yg,x.creationData=Og,x.eraName=Tg,x.eraNarrow=Ng,x.eraAbbr=Lg,x.eraYear=Pg,x.year=Za,x.isLeapYear=ud,x.weekYear=Ig,x.isoWeekYear=Wg,x.quarter=x.quarters=zg,x.month=eo,x.daysInMonth=wd,x.week=x.weeks=Dd,x.isoWeek=x.isoWeeks=kd,x.weeksInYear=Ug,x.weeksInWeekYear=Gg,x.isoWeeksInYear=$g,x.isoWeeksInISOWeekYear=Hg,x.date=Do,x.day=x.days=Wd,x.weekday=$d,x.isoWeekday=Hd,x.dayOfYear=Bg,x.hour=x.hours=Jd,x.minute=x.minutes=Zg,x.second=x.seconds=Jg,x.millisecond=x.milliseconds=ko,x.utcOffset=Lm,x.utc=Am,x.local=qm,x.parseZone=Ym,x.hasAlignedHourOffset=Fm,x.isDST=Cm,x.isLocal=Im,x.isUtcOffset=Wm,x.isUtc=go,x.isUTC=go,x.zoneAbbr=Qg,x.zoneName=Xg,x.dates=I("dates accessor is deprecated. Use date instead.",Do),x.months=I("months accessor is deprecated. Use month instead",eo),x.years=I("years accessor is deprecated. Use year instead",Za),x.zone=I("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Pm),x.isDSTShifted=I("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",jm);function ep(n){return ie(n*1000)}function tp(){return ie.apply(null,arguments).parseZone()}function Ro(n){return n}var X=ve.prototype;X.calendar=T,X.longDateFormat=yn,X.invalidDate=_n,X.ordinal=Jt,X.preparse=Ro,X.postformat=Ro,X.relativeTime=Rt,X.pastFuture=gt,X.set=he,X.eras=Dg,X.erasParse=kg,X.erasConvertYear=Rg,X.erasAbbrRegex=qg,X.erasNameRegex=Ag,X.erasNarrowRegex=Yg,X.months=gd,X.monthsShort=pd,X.monthsParse=_d,X.monthsRegex=vd,X.monthsShortRegex=bd,X.week=xd,X.firstDayOfYear=Od,X.firstDayOfWeek=Ed,X.weekdays=Yd,X.weekdaysMin=Cd,X.weekdaysShort=Fd,X.weekdaysParse=Id,X.weekdaysRegex=Ud,X.weekdaysShortRegex=Gd,X.weekdaysMinRegex=Vd,X.isPM=Bd,X.meridiem=Kd;function Yn(n,s,o,l){var h=ut(),m=w().set(l,s);return h[o](m,n)}function To(n,s,o){if(d(n))s=n,n=void 0;if(n=n||"",s!=null)return Yn(n,s,o,"month");var l,h=[];for(l=0;l<12;l++)h[l]=Yn(n,l,o,"month");return h}function $i(n,s,o,l){if(typeof n==="boolean"){if(d(s))o=s,s=void 0;s=s||""}else{if(s=n,o=s,n=!1,d(s))o=s,s=void 0;s=s||""}var h=ut(),m=n?h._week.dow:0,y,k=[];if(o!=null)return Yn(s,(o+m)%7,l,"day");for(y=0;y<7;y++)k[y]=Yn(s,(y+m)%7,l,"day");return k}function rp(n,s){return To(n,s,"months")}function np(n,s){return To(n,s,"monthsShort")}function ip(n,s,o){return $i(n,s,o,"weekdays")}function sp(n,s,o){return $i(n,s,o,"weekdaysShort")}function ap(n,s,o){return $i(n,s,o,"weekdaysMin")}pt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(n){var s=n%10,o=z(n%100/10)===1?"th":s===1?"st":s===2?"nd":s===3?"rd":"th";return n+o}}),t.lang=I("moment.lang is deprecated. Use moment.locale instead.",pt),t.langData=I("moment.langData is deprecated. Use moment.localeData instead.",ut);var lt=Math.abs;function op(){var n=this._data;return this._milliseconds=lt(this._milliseconds),this._days=lt(this._days),this._months=lt(this._months),n.milliseconds=lt(n.milliseconds),n.seconds=lt(n.seconds),n.minutes=lt(n.minutes),n.hours=lt(n.hours),n.months=lt(n.months),n.years=lt(n.years),this}function No(n,s,o,l){var h=Ie(s,o);return n._milliseconds+=l*h._milliseconds,n._days+=l*h._days,n._months+=l*h._months,n._bubble()}function up(n,s){return No(this,n,s,1)}function lp(n,s){return No(this,n,s,-1)}function Lo(n){if(n<0)return Math.floor(n);else return Math.ceil(n)}function fp(){var n=this._milliseconds,s=this._days,o=this._months,l=this._data,h,m,y,k,C;if(!(n>=0&&s>=0&&o>=0||n<=0&&s<=0&&o<=0))n+=Lo(Hi(o)+s)*86400000,s=0,o=0;return l.milliseconds=n%1000,h=qe(n/1000),l.seconds=h%60,m=qe(h/60),l.minutes=m%60,y=qe(m/60),l.hours=y%24,s+=qe(y/24),C=qe(Po(s)),o+=C,s-=Lo(Hi(C)),k=qe(o/12),o%=12,l.days=s,l.months=o,l.years=k,this}function Po(n){return n*4800/146097}function Hi(n){return n*146097/4800}function cp(n){if(!this.isValid())return NaN;var s,o,l=this._milliseconds;if(n=Te(n),n==="month"||n==="quarter"||n==="year")switch(s=this._days+l/86400000,o=this._months+Po(s),n){case"month":return o;case"quarter":return o/3;case"year":return o/12}else switch(s=this._days+Math.round(Hi(this._months)),n){case"week":return s/7+l/604800000;case"day":return s+l/86400000;case"hour":return s*24+l/3600000;case"minute":return s*1440+l/60000;case"second":return s*86400+l/1000;case"millisecond":return Math.floor(s*86400000)+l;default:throw Error("Unknown unit "+n)}}function ft(n){return function(){return this.as(n)}}var Ao=ft("ms"),hp=ft("s"),dp=ft("m"),mp=ft("h"),gp=ft("d"),pp=ft("w"),yp=ft("M"),_p=ft("Q"),wp=ft("y"),bp=Ao;function vp(){return Ie(this)}function Sp(n){return n=Te(n),this.isValid()?this[n+"s"]():NaN}function Lt(n){return function(){return this.isValid()?this._data[n]:NaN}}var xp=Lt("milliseconds"),Mp=Lt("seconds"),Ep=Lt("minutes"),Op=Lt("hours"),Dp=Lt("days"),kp=Lt("months"),Rp=Lt("years");function Tp(){return qe(this.days()/7)}var ct=Math.round,sr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Np(n,s,o,l,h){return h.relativeTime(s||1,!!o,n,l)}function Lp(n,s,o,l){var h=Ie(n).abs(),m=ct(h.as("s")),y=ct(h.as("m")),k=ct(h.as("h")),C=ct(h.as("d")),J=ct(h.as("M")),Ee=ct(h.as("w")),ht=ct(h.as("y")),_t=m<=o.ss&&["s",m]||m<o.s&&["ss",m]||y<=1&&["m"]||y<o.m&&["mm",y]||k<=1&&["h"]||k<o.h&&["hh",k]||C<=1&&["d"]||C<o.d&&["dd",C];if(o.w!=null)_t=_t||Ee<=1&&["w"]||Ee<o.w&&["ww",Ee];return _t=_t||J<=1&&["M"]||J<o.M&&["MM",J]||ht<=1&&["y"]||["yy",ht],_t[2]=s,_t[3]=+n>0,_t[4]=l,Np.apply(null,_t)}function Pp(n){if(n===void 0)return ct;if(typeof n==="function")return ct=n,!0;return!1}function Ap(n,s){if(sr[n]===void 0)return!1;if(s===void 0)return sr[n];if(sr[n]=s,n==="s")sr.ss=s-1;return!0}function qp(n,s){if(!this.isValid())return this.localeData().invalidDate();var o=!1,l=sr,h,m;if(typeof n==="object")s=n,n=!1;if(typeof n==="boolean")o=n;if(typeof s==="object"){if(l=Object.assign({},sr,s),s.s!=null&&s.ss==null)l.ss=s.s-1}if(h=this.localeData(),m=Lp(this,!o,l,h),o)m=h.pastFuture(+this,m);return h.postformat(m)}var Ui=Math.abs;function ar(n){return(n>0)-(n<0)||+n}function Fn(){if(!this.isValid())return this.localeData().invalidDate();var n=Ui(this._milliseconds)/1000,s=Ui(this._days),o=Ui(this._months),l,h,m,y,k=this.asSeconds(),C,J,Ee,ht;if(!k)return"P0D";return l=qe(n/60),h=qe(l/60),n%=60,l%=60,m=qe(o/12),o%=12,y=n?n.toFixed(3).replace(/\.?0+$/,""):"",C=k<0?"-":"",J=ar(this._months)!==ar(k)?"-":"",Ee=ar(this._days)!==ar(k)?"-":"",ht=ar(this._milliseconds)!==ar(k)?"-":"",C+"P"+(m?J+m+"Y":"")+(o?J+o+"M":"")+(s?Ee+s+"D":"")+(h||l||n?"T":"")+(h?ht+h+"H":"")+(l?ht+l+"M":"")+(n?ht+y+"S":"")}var K=Tn.prototype;K.isValid=km,K.abs=op,K.add=up,K.subtract=lp,K.as=cp,K.asMilliseconds=Ao,K.asSeconds=hp,K.asMinutes=dp,K.asHours=mp,K.asDays=gp,K.asWeeks=pp,K.asMonths=yp,K.asQuarters=_p,K.asYears=wp,K.valueOf=bp,K._bubble=fp,K.clone=vp,K.get=Sp,K.milliseconds=xp,K.seconds=Mp,K.minutes=Ep,K.hours=Op,K.days=Dp,K.weeks=Tp,K.months=kp,K.years=Rp,K.humanize=qp,K.toISOString=Fn,K.toString=Fn,K.toJSON=Fn,K.locale=bo,K.localeData=So,K.toIsoString=I("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Fn),K.lang=vo,L("X",0,0,"unix"),L("x",0,0,"valueOf"),R("x",xn),R("X",rd),ee("X",function(n,s,o){o._d=new Date(parseFloat(n)*1000)}),ee("x",function(n,s,o){o._d=new Date(z(n))});//! moment.js
|
|
44
|
+
return t.version="2.30.1",r(ie),t.fn=x,t.min=Mm,t.max=Em,t.now=Om,t.utc=w,t.unix=ep,t.months=rp,t.isDate=g,t.locale=pt,t.invalid=A,t.duration=Ie,t.isMoment=Y,t.weekdays=ip,t.parseZone=tp,t.localeData=ut,t.isDuration=Nn,t.monthsShort=np,t.weekdaysMin=ap,t.defineLocale=Ni,t.updateLocale=tm,t.locales=rm,t.weekdaysShort=sp,t.normalizeUnits=Te,t.relativeTimeRounding=Pp,t.relativeTimeThreshold=Ap,t.calendarFormat=Km,t.prototype=x,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t})});var Ih=b(function(Px,jh){/*!
|
|
45
45
|
* FileStreamRotator
|
|
46
46
|
* Copyright(c) 2012-2017 Holiday Extras.
|
|
47
47
|
* Copyright(c) 2017 Roger C.
|
|
48
48
|
* MIT Licensed
|
|
49
|
-
*/var le=j("fs"),Ot=j("path"),zt=vh(),xh=j("crypto"),cS=j("events"),et={};Oh.exports=et;var Mh=["daily","test","m","h","custom"],Eh="YYYYMMDDHHmm",hS=function(e,t){if(typeof t=="number"){switch(e){case"m":if(t<0||t>60)return!1;break;case"h":if(t<0||t>24)return!1;break}return{type:e,digit:t}}},dS=function(e){switch(e){case"custom":case"daily":return{type:e,digit:void 0};case"test":return{type:e,digit:0}}return!1};et.getFrequency=function(e){var t=e.toLowerCase().match(/^(\d+)([mh])$/);if(t)return hS(t[2],parseInt(t[1]));var r=dS(e);if(r)return r;return!1};et.parseFileSize=function(e){if(e&&typeof e=="string"){var t=e.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/);if(t)switch(t[2]){case"k":return t[1]*1024;case"m":return t[1]*1024*1024;case"g":return t[1]*1024*1024*1024}}return null};et.getDate=function(e,t,r){t=t||Eh;let i=r?zt.utc():zt().local();if(e&&Mh.indexOf(e.type)!==-1)switch(e.type){case"m":var a=Math.floor(i.minutes()/e.digit)*e.digit;return i.minutes(a).format(t);case"h":var u=Math.floor(i.hour()/e.digit)*e.digit;return i.hour(u).format(t);case"daily":case"custom":case"test":return i.format(t)}return i.format(t)};et.setAuditLog=function(e,t,r){var i=null;if(e){var a=e.toString().substr(-1),u=e.toString().match(/^(\d+)/);if(Number(u[1])>0){var f=Ot.dirname(r.replace(/%DATE%.+/,"_filename"));try{if(t){var c=Ot.resolve(t);i=JSON.parse(le.readFileSync(c,{encoding:"utf-8"}))}else{var c=Ot.resolve(f+"/.audit.json");i=JSON.parse(le.readFileSync(c,{encoding:"utf-8"}))}}catch(d){if(d.code!=="ENOENT")return null;i={keep:{days:!1,amount:Number(u[1])},auditLog:t||f+"/.audit.json",files:[]}}i.keep={days:a==="d",amount:Number(u[1])}}}return i};et.writeAuditLog=function(e,t){try{Aa(e.auditLog),le.writeFileSync(e.auditLog,JSON.stringify(e,null,4))}catch(r){if(t)console.error(new Date,"[FileStreamRotator] Failed to store log audit at:",e.auditLog,"Error:",r)}};function Sh(e,t){if(e.hash===xh.createHash(e.hashType).update(e.name+"LOG_FILE"+e.date).digest("hex"))try{if(le.existsSync(e.name))le.unlinkSync(e.name)}catch(r){if(t)console.error(new Date,"[FileStreamRotator] Could not remove old log file: ",e.name)}}function mS(e,t,r){let i=t||"current.log",a=Ot.dirname(e),u=Ot.basename(e),f=a+"/"+i;try{if(le.lstatSync(f).isSymbolicLink())le.unlinkSync(f),le.symlinkSync(u,f)}catch(c){if(c&&c.code=="ENOENT")try{le.symlinkSync(u,f)}catch(d){if(r)console.error(new Date,"[FileStreamRotator] Could not create symlink file: ",f," -> ",u)}}}function gS(e,t,r){if(!e)return null;try{let i=le.lstatSync(e);return le.watch(e,function(a,u){if(a=="rename")try{let f=le.lstatSync(e)}catch(f){r(f,e)}})}catch(i){if(t)console.log(new Date,"[FileStreamRotator] Could not add watcher for "+e)}}et.addLogToAudit=function(e,t,r,i){if(t&&t.files){var a=t.files.findIndex(function(g){return g.name===e});if(a!==-1)return t;var u=Date.now();if(t.files.push({date:u,name:e,hash:xh.createHash(t.hashType).update(e+"LOG_FILE"+u).digest("hex")}),t.keep.days){var f=zt().subtract(t.keep.amount,"days").valueOf(),c=t.files.filter(function(g){if(g.date>f)return!0;return g.hashType=t.hashType,Sh(g,i),r.emit("logRemoved",g),!1});t.files=c}else{var d=t.files.splice(-t.keep.amount);if(t.files.length>0)t.files.filter(function(g){return g.hashType=t.hashType,Sh(g,i),r.emit("logRemoved",g),!1});t.files=d}et.writeAuditLog(t,i)}return t};et.getStream=function(e){var t=null,r=null,i=this;if(!e.filename)return console.error(new Date,"[FileStreamRotator] No filename supplied. Defaulting to STDOUT"),process.stdout;if(e.frequency)t=i.getFrequency(e.frequency);let a=i.setAuditLog(e.max_logs,e.audit_file,e.filename);if(a!=null)a.hashType=e.audit_hash_type!==void 0?e.audit_hash_type:"md5";i.verbose=e.verbose!==void 0?e.verbose:!0;var u=null,f=0,c=0;if(e.size)u=et.parseFileSize(e.size);var d=e.date_format||Eh;if(t&&t.type=="daily"){if(!e.date_format)d="YYYY-MM-DD";if(zt().format(d)!=zt().endOf("day").format(d)||zt().format(d)==zt().add(1,"day").format(d)){if(i.verbose)console.log(new Date,"[FileStreamRotator] Changing type to custom as date format changes more often than once a day or not every day");t.type="custom"}}if(t)r=e.frequency?i.getDate(t,d,e.utc):"";e.create_symlink=e.create_symlink||!1,e.extension=e.extension||"";var g=e.filename,v=null,_=g+(r?"."+r:"");if(g.match(/%DATE%/))_=g.replace(/%DATE%/g,r?r:i.getDate(null,d,e.utc));if(u){var w=null,E=_,p=null;if(a&&a.files&&a.files instanceof Array&&a.files.length>0){var M=a.files[a.files.length-1].name;if(M.match(E)){var P=M.match(E+"\\.(\\d+)");if(P)E=M,f=P[1]}}if(f==0&&E==_)E+=e.extension;while(p=le.existsSync(E))w=E,f++,E=_+"."+f+e.extension;if(w){var A=le.statSync(w);if(A.size<u)E=w,f--,c=A.size}_=E}else _+=e.extension;if(i.verbose)console.log(new Date,"[FileStreamRotator] Logging to: ",_);Aa(_);var W=e.file_options||{flags:"a"},O=le.createWriteStream(_,W);if(r&&t&&Mh.indexOf(t.type)>-1||u>0){if(i.verbose)console.log(new Date,"[FileStreamRotator] Rotating file: ",t?t.type:"",u?"size: "+u:"");var N=new cS;N.auditLog=a,N.end=function(){O.end.apply(O,arguments)},Pa(O,N),N.on("close",function(){if(B)B.close()}),N.on("new",function(Y){if(N.auditLog=i.addLogToAudit(Y,N.auditLog,N,i.verbose),e.create_symlink)mS(Y,e.symlink_name,i.verbose);if(e.watch_log)N.emit("addWatcher",Y)});var B;return N.on("addWatcher",function(Y){if(B)B.close();if(!e.watch_log)return;B=gS(Y,i.verbose,function(H,I){N.emit("createLog",I)})}),N.on("createLog",function(Y){try{let H=le.lstatSync(Y)}catch(H){if(O&&O.end=="function")O.end();O=le.createWriteStream(Y,W),N.emit("new",Y),Pa(O,N)}}),N.write=function(Y,H){var I=t?this.getDate(t,d,e.utc):r;if(I!=r||u&&c>u){var F=g+(r&&t?"."+I:"");if(g.match(/%DATE%/)&&r)F=g.replace(/%DATE%/g,I);if(u&&c>u)f++,F+="."+f+e.extension;else f=0,F+=e.extension;if(c=0,i.verbose)console.log(new Date,j("util").format("[FileStreamRotator] Changing logs from %s to %s",_,F));if(r=I,v=_,_=F,e.end_stream===!0)O.end();else O.destroy();Aa(_),O=le.createWriteStream(F,W),N.emit("new",F),N.emit("rotate",v,F),Pa(O,N)}O.write(Y,H),c+=Buffer.byteLength(Y,H)}.bind(this),process.nextTick(function(){N.emit("new",_)}),N.emit("new",_),N}else{if(i.verbose)console.log(new Date,"[FileStreamRotator] File won't be rotated: ",e.frequency,e.size);return process.nextTick(function(){O.emit("new",_)}),O}};var Aa=function(e){var t=Ot.dirname(e);t.split(Ot.sep).reduce(function(r,i){if(r+=i+Ot.sep,!le.existsSync(r))try{le.mkdirSync(r)}catch(a){if(a.code!=="EEXIST")throw a}return r},"")},Pa=function(t,r){t.on("close",function(){r.emit("close")}),t.on("finish",function(){r.emit("finish")}),t.on("error",function(i){r.emit("error",i)}),t.on("open",function(i){r.emit("open",i)})}});var Lh=b(function(Ax,Nh){var dt=j("fs"),pS=j("os"),xr=j("path"),yS=j("util"),Dh=j("zlib"),_S=bh(),wS=oe().MESSAGE,Rh=j("stream").PassThrough,Th=It(),bS={json:!1,colorize:!1,eol:pS.EOL,logstash:null,prettyPrint:!1,label:null,stringify:!1,depth:null,showLevel:!0,timestamp:()=>new Date().toISOString()},Mr=function(e){e=e||{},Th.call(this,e);function t(u){Array.prototype.slice.call(arguments,1).forEach((f)=>{if(e[f])throw Error("Cannot set "+f+" and "+u+" together")})}function r(u){if(u&&typeof u==="string"){if(u.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/))return u}else if(u&&Number.isInteger(u)){let f=Math.round(u/1024);return f===0?"1k":f+"k"}return null}function i(u){return!/["<>|:*?\\/\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(u)}function a(u){return!/["<>|\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(u)}if(this.options=Object.assign({},bS,e),e.stream)t("stream","filename","maxsize"),this.logStream=new Rh,this.logStream.pipe(e.stream);else{if(this.filename=e.filename?xr.basename(e.filename):"winston.log",this.dirname=e.dirname||xr.dirname(e.filename),!i(this.filename)||!a(this.dirname))throw Error("Your path or filename contain an invalid character.");if(this.logStream=kh().getStream({filename:xr.join(this.dirname,this.filename),frequency:e.frequency?e.frequency:"custom",date_format:e.datePattern?e.datePattern:"YYYY-MM-DD",verbose:!1,size:r(e.maxSize),max_logs:e.maxFiles,end_stream:!0,audit_file:e.auditFile?e.auditFile:xr.join(this.dirname,"."+_S(e)+"-audit.json"),file_options:e.options?e.options:{flags:"a"},utc:e.utc?e.utc:!1,extension:e.extension?e.extension:"",create_symlink:e.createSymlink?e.createSymlink:!1,symlink_name:e.symlinkName?e.symlinkName:"current.log",watch_log:e.watchLog?e.watchLog:!1,audit_hash_type:e.auditHashType?e.auditHashType:"sha256"}),this.logStream.on("new",(u)=>{this.emit("new",u)}),this.logStream.on("rotate",(u,f)=>{this.emit("rotate",u,f)}),this.logStream.on("logRemoved",(u)=>{if(e.zippedArchive){let f=u.name+".gz";try{dt.unlinkSync(f)}catch(c){if(c.code!=="ENOENT"){c.message=`Error occurred while removing ${f}: ${c.message}`,this.emit("error",c);return}}this.emit("logRemoved",f);return}this.emit("logRemoved",u.name)}),e.zippedArchive)this.logStream.on("rotate",(u)=>{try{if(!dt.existsSync(u))return}catch(g){g.message=`Error occurred while checking existence of ${u}: ${g.message}`,this.emit("error",g);return}try{if(dt.existsSync(`${u}.gz`))return}catch(g){g.message=`Error occurred while checking existence of ${u}.gz: ${g.message}`,this.emit("error",g);return}let f=Dh.createGzip(),c=dt.createReadStream(u);c.on("error",(g)=>{g.message=`Error occurred while reading ${u}: ${g.message}`,this.emit("error",g)});let d=dt.createWriteStream(u+".gz");d.on("error",(g)=>{g.message=`Error occurred while writing ${u}.gz: ${g.message}`,this.emit("error",g)}),c.pipe(f).pipe(d).on("finish",()=>{try{dt.unlinkSync(u)}catch(g){if(g.code!=="ENOENT"){g.message=`Error occurred while removing ${u}: ${g.message}`,this.emit("error",g);return}}this.emit("archive",u+".gz")})});if(e.watchLog)this.logStream.on("addWatcher",(u)=>{this.emit("addWatcher",u)})}};Nh.exports=Mr;yS.inherits(Mr,Th);Mr.prototype.name="dailyRotateFile";var vS=function(){};Mr.prototype.log=function(e,t){t=t||vS,this.logStream.write(e[wS]+this.options.eol),this.emit("logged",e),t(null,!0)};Mr.prototype.close=function(){if(this.logStream)this.logStream.end(()=>{this.emit("finish")})};Mr.prototype.query=function(e,t){if(typeof e==="function")t=e,e={};if(!this.options.json)throw Error("query() may not be used without the json option being set to true");if(!this.filename)throw Error("query() may not be used when initializing with a stream");let r=[];if(e=e||{},e.rows=e.rows||e.limit||10,e.start=e.start||0,e.until=e.until||new Date,typeof e.until!=="object")e.until=new Date(e.until);if(e.from=e.from||e.until-86400000,typeof e.from!=="object")e.from=new Date(e.from);e.order=e.order||"desc";let i=(()=>{let u=new RegExp(this.filename.replace("%DATE%",".*"),"i");return dt.readdirSync(this.dirname).filter((f)=>xr.basename(f).match(u))})();if(i.length===0&&t)t(null,r);let a=(u)=>{if(!u)return;let f=xr.join(this.dirname,u),c="",d;if(u.endsWith(".gz")){d=new Rh;let v=dt.createReadStream(f);v.on("error",(_)=>{_.message=`Error occurred while reading ${f}: ${_.message}`,d.emit("error",_)}),v.pipe(Dh.createGunzip()).pipe(d)}else d=dt.createReadStream(f,{encoding:"utf8"});d.on("error",(v)=>{if(d.readable)d.destroy();if(!t)return;return v.code==="ENOENT"?t(null,r):t(v)}),d.on("data",(v)=>{v=(c+v).split(/\n+/);let _=v.length-1;for(let w=0;w<_;w++)g(v[w]);c=v[_]}),d.on("end",()=>{if(c)g(c,!0);if(i.length)a(i.shift());else if(t){if(r.sort((w,E)=>{let p=new Date(w.timestamp).getTime(),M=new Date(E.timestamp).getTime();return p>M?1:p<M?-1:0}),e.order==="desc")r=r.reverse();let v=e.start||0,_=e.limit||r.length;if(r=r.slice(v,v+_),e.fields)r=r.map((w)=>{let E={};return e.fields.forEach((p)=>{E[p]=w[p]}),E});t(null,r)}});function g(v,_){try{let w=JSON.parse(v);if(!w||typeof w!=="object")return;let E=new Date(w.timestamp);if(e.from&&E<e.from||e.until&&E>e.until||e.level&&e.level!==w.level)return;r.push(w)}catch(w){if(!_)d.emit("error",w)}}};a(i.shift())}});var qh=b(function(qx,Ah){var SS=Ra(),Ph=Lh();SS.transports.DailyRotateFile=Ph;Ah.exports=Ph});import cn from"path";import Er from"fs";import Ve from"path";var qr={},Yr=Fi(),{isBunRuntime:je,isCloudflareRuntime:Ro,isNodeRuntime:Dp,hasFileSystemAccess:Ge,console:sr}=Yr,To=qr;Ci();function Me(e,t){let r=typeof process<"u"?process.env:void 0,i=r?r[e]:void 0,a=je?Bun?.env?.[e]:void 0,u=To[e],f=typeof u==="string"?u:void 0,c=Ro?f??i??a:i??a??f;return c===void 0||c===""?t:c}function NS(e,t){if(typeof process<"u")process.env[e]=t;To[e]=t}function LS(e){globalThis.__hapiRuntimeOverride="cloudflare",No(),Object.assign(qr,e)}function PS(){delete globalThis.__hapiRuntimeOverride,No()}async function AS(e){if(!je)throw Error(`File system access not available in this runtime: ${e}`);return await Bun.file(e).text()}async function qS(e){if(!je)throw Error(`File system access not available in this runtime: ${e}`);return await Bun.file(e).json()}async function YS(e){return je?await Bun.file(e).exists():!1}function FS(e){if(!je)throw Error(`File system access not available in this runtime: ${e}`);return Bun.file(e)}function No(){let e=Fi();Ao(e),Ci()}function Lo(){if(Ge)return;if(Po()!==void 0)return;let e=Fi();Ao(e),Ci()}function Fi(){let e=Po(),t=Rp(e),r=t?!1:Tp(e),i=Np(e,r);return{isBunRuntime:t,isCloudflareRuntime:r,isNodeRuntime:i,hasFileSystemAccess:!r&&(t||i),console:Lp()}}function Rp(e){if(e==="bun")return!0;if(e==="cloudflare"||e==="node")return!1;return typeof Bun<"u"}function Tp(e){if(e==="cloudflare")return!0;if(e==="bun"||e==="node")return!1;let t=typeof globalThis<"u"?globalThis:void 0,r=t?.navigator?.userAgent??"",i=typeof r==="string"&&r.includes("Cloudflare-Workers"),a=typeof t?.__ENVIRONMENT__==="string"&&t.__ENVIRONMENT__.toLowerCase()==="workerd",u=typeof t?.caches?.default<"u";return i||a||u}function Np(e,t){if(e==="node")return!0;if(e==="bun"||e==="cloudflare")return!1;if(t)return!1;let r=typeof process<"u"?process.versions?.node:void 0;return typeof r==="string"&&r.length>0}function Po(){return typeof globalThis<"u"?globalThis.__hapiRuntimeOverride:void 0}function Lp(){let e=()=>{},t=typeof console<"u"?console:void 0;if(!t)return{log:e,info:e,warn:e,error:e,debug:e};let r=(a,u)=>typeof a==="function"?a.bind(t):u,i=r(t.log,e);return{log:i,info:r(t.info,i),warn:r(t.warn,i),error:r(t.error,i),debug:r(t.debug,i)}}function Ao(e){je=e.isBunRuntime,Ro=e.isCloudflareRuntime,Dp=e.isNodeRuntime,Ge=e.hasFileSystemAccess,sr=e.console}function Ci(){let e=Pp();for(let t of Object.keys(qr))delete qr[t];Object.assign(qr,e)}function Pp(){if(je)return{...typeof Bun<"u"?Bun.env:{},...typeof process<"u"?process.env:{}};return(typeof process<"u"?process:void 0)?.env??{}}var _t=Ge?qo():Yo(),{home:Ap,specs:qp,config:Yp,src:Fp,logs:Ii,certs:Cp,plugins:jp}=_t;function WS(){return{..._t}}function $S(){return Ge?qo():Yo()}function qo(){let e=Me("HAPI_HOME"),t=e&&e.trim().length>0?Wp(e):Ip();return Fo(t)}function Yo(){return Fo("/hapi")}function Fo(e){return{home:e,specs:Ve.join(e,"specs"),config:Ve.join(e,"config"),src:Ve.join(e,"src"),logs:Ve.join(e,"logs"),certs:Ve.join(e,"certs"),plugins:Ve.join(e,"plugins")}}function Ip(){return Ve.join(ji(),".hapi")}function Wp(e){let t=e.trim(),r=t==="~"?ji():t.replace(/^~(?=[\\/])/,ji());return Ve.resolve(r)}function ji(){let e=je?globalThis.Bun?.env??{}:{},t=e.HOME??e.USERPROFILE??Me("HOME")??Me("USERPROFILE")??$p(Me("HOMEDRIVE"),Me("HOMEPATH"));return t?Ve.resolve(t):Ve.resolve(".")}function $p(e,t){if(!e||!t)return;return`${e}${t}`}async function Hp(e){if(!Ge)return;try{let t=await import("fs/promises");await t.mkdir(e,{recursive:!0})}catch{}}async function HS(){if(!Ge)return;await Promise.all([Ap,qp,Yp,Fp,Ii,Cp,jp].map(Hp))}var Se=null;Lo();if(Ge)try{let e=await Promise.resolve().then(() => Do(Ra(),1));await Promise.resolve().then(() => Do(qh(),1)),Se=e.default??e}catch{Se=null}var xS=typeof globalThis.it==="function"&&typeof globalThis.describe==="function",Ch=je&&typeof globalThis.Bun<"u"&&Array.isArray(globalThis.Bun.argv)&&globalThis.Bun.argv.includes("test")||xS,Yh=()=>{let e=Me("NODE_ENV");return e==="production"||!e||e!=="development"},Fh=Me("LOG_DIR"),MS=()=>Ch?cn.resolve(process.cwd(),".test-hapi-home/logs"):Ii;Se?.addColors({http:"magenta",debug:"grey"});var ES=Se?.format.colorize(),OS=Se?Se.format.combine(Se.format.timestamp({format:"YYYY-MM-DD HH:mm:ss"}),Se.format.printf((e)=>{let{timestamp:t,level:r,message:i,...a}=e,u=Object.keys(a).length?`
|
|
50
|
-
${JSON.stringify(a,null,2)}`:"";return ES?.colorize(r,`${t} [${r.toUpperCase()}]: ${i}${u}`)??`${t} [${r.toUpperCase()}]: ${i}${u}`})):void 0,
|
|
49
|
+
*/var ce=j("fs"),kt=j("path"),zt=Ah(),Yh=j("crypto"),mS=j("events"),rt={};jh.exports=rt;var Fh=["daily","test","m","h","custom"],Ch="YYYYMMDDHHmm",gS=function(e,t){if(typeof t=="number"){switch(e){case"m":if(t<0||t>60)return!1;break;case"h":if(t<0||t>24)return!1;break}return{type:e,digit:t}}},pS=function(e){switch(e){case"custom":case"daily":return{type:e,digit:void 0};case"test":return{type:e,digit:0}}return!1};rt.getFrequency=function(e){var t=e.toLowerCase().match(/^(\d+)([mh])$/);if(t)return gS(t[2],parseInt(t[1]));var r=pS(e);if(r)return r;return!1};rt.parseFileSize=function(e){if(e&&typeof e=="string"){var t=e.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/);if(t)switch(t[2]){case"k":return t[1]*1024;case"m":return t[1]*1024*1024;case"g":return t[1]*1024*1024*1024}}return null};rt.getDate=function(e,t,r){t=t||Ch;let i=r?zt.utc():zt().local();if(e&&Fh.indexOf(e.type)!==-1)switch(e.type){case"m":var a=Math.floor(i.minutes()/e.digit)*e.digit;return i.minutes(a).format(t);case"h":var u=Math.floor(i.hour()/e.digit)*e.digit;return i.hour(u).format(t);case"daily":case"custom":case"test":return i.format(t)}return i.format(t)};rt.setAuditLog=function(e,t,r){var i=null;if(e){var a=e.toString().substr(-1),u=e.toString().match(/^(\d+)/);if(Number(u[1])>0){var f=kt.dirname(r.replace(/%DATE%.+/,"_filename"));try{if(t){var c=kt.resolve(t);i=JSON.parse(ce.readFileSync(c,{encoding:"utf-8"}))}else{var c=kt.resolve(f+"/.audit.json");i=JSON.parse(ce.readFileSync(c,{encoding:"utf-8"}))}}catch(d){if(d.code!=="ENOENT")return null;i={keep:{days:!1,amount:Number(u[1])},auditLog:t||f+"/.audit.json",files:[]}}i.keep={days:a==="d",amount:Number(u[1])}}}return i};rt.writeAuditLog=function(e,t){try{$a(e.auditLog),ce.writeFileSync(e.auditLog,JSON.stringify(e,null,4))}catch(r){if(t)console.error(new Date,"[FileStreamRotator] Failed to store log audit at:",e.auditLog,"Error:",r)}};function qh(e,t){if(e.hash===Yh.createHash(e.hashType).update(e.name+"LOG_FILE"+e.date).digest("hex"))try{if(ce.existsSync(e.name))ce.unlinkSync(e.name)}catch(r){if(t)console.error(new Date,"[FileStreamRotator] Could not remove old log file: ",e.name)}}function yS(e,t,r){let i=t||"current.log",a=kt.dirname(e),u=kt.basename(e),f=a+"/"+i;try{if(ce.lstatSync(f).isSymbolicLink())ce.unlinkSync(f),ce.symlinkSync(u,f)}catch(c){if(c&&c.code=="ENOENT")try{ce.symlinkSync(u,f)}catch(d){if(r)console.error(new Date,"[FileStreamRotator] Could not create symlink file: ",f," -> ",u)}}}function _S(e,t,r){if(!e)return null;try{let i=ce.lstatSync(e);return ce.watch(e,function(a,u){if(a=="rename")try{let f=ce.lstatSync(e)}catch(f){r(f,e)}})}catch(i){if(t)console.log(new Date,"[FileStreamRotator] Could not add watcher for "+e)}}rt.addLogToAudit=function(e,t,r,i){if(t&&t.files){var a=t.files.findIndex(function(g){return g.name===e});if(a!==-1)return t;var u=Date.now();if(t.files.push({date:u,name:e,hash:Yh.createHash(t.hashType).update(e+"LOG_FILE"+u).digest("hex")}),t.keep.days){var f=zt().subtract(t.keep.amount,"days").valueOf(),c=t.files.filter(function(g){if(g.date>f)return!0;return g.hashType=t.hashType,qh(g,i),r.emit("logRemoved",g),!1});t.files=c}else{var d=t.files.splice(-t.keep.amount);if(t.files.length>0)t.files.filter(function(g){return g.hashType=t.hashType,qh(g,i),r.emit("logRemoved",g),!1});t.files=d}rt.writeAuditLog(t,i)}return t};rt.getStream=function(e){var t=null,r=null,i=this;if(!e.filename)return console.error(new Date,"[FileStreamRotator] No filename supplied. Defaulting to STDOUT"),process.stdout;if(e.frequency)t=i.getFrequency(e.frequency);let a=i.setAuditLog(e.max_logs,e.audit_file,e.filename);if(a!=null)a.hashType=e.audit_hash_type!==void 0?e.audit_hash_type:"md5";i.verbose=e.verbose!==void 0?e.verbose:!0;var u=null,f=0,c=0;if(e.size)u=rt.parseFileSize(e.size);var d=e.date_format||Ch;if(t&&t.type=="daily"){if(!e.date_format)d="YYYY-MM-DD";if(zt().format(d)!=zt().endOf("day").format(d)||zt().format(d)==zt().add(1,"day").format(d)){if(i.verbose)console.log(new Date,"[FileStreamRotator] Changing type to custom as date format changes more often than once a day or not every day");t.type="custom"}}if(t)r=e.frequency?i.getDate(t,d,e.utc):"";e.create_symlink=e.create_symlink||!1,e.extension=e.extension||"";var g=e.filename,v=null,_=g+(r?"."+r:"");if(g.match(/%DATE%/))_=g.replace(/%DATE%/g,r?r:i.getDate(null,d,e.utc));if(u){var w=null,E=_,p=null;if(a&&a.files&&a.files instanceof Array&&a.files.length>0){var M=a.files[a.files.length-1].name;if(M.match(E)){var P=M.match(E+"\\.(\\d+)");if(P)E=M,f=P[1]}}if(f==0&&E==_)E+=e.extension;while(p=ce.existsSync(E))w=E,f++,E=_+"."+f+e.extension;if(w){var A=ce.statSync(w);if(A.size<u)E=w,f--,c=A.size}_=E}else _+=e.extension;if(i.verbose)console.log(new Date,"[FileStreamRotator] Logging to: ",_);$a(_);var W=e.file_options||{flags:"a"},O=ce.createWriteStream(_,W);if(r&&t&&Fh.indexOf(t.type)>-1||u>0){if(i.verbose)console.log(new Date,"[FileStreamRotator] Rotating file: ",t?t.type:"",u?"size: "+u:"");var N=new mS;N.auditLog=a,N.end=function(){O.end.apply(O,arguments)},Wa(O,N),N.on("close",function(){if(Z)Z.close()}),N.on("new",function(Y){if(N.auditLog=i.addLogToAudit(Y,N.auditLog,N,i.verbose),e.create_symlink)yS(Y,e.symlink_name,i.verbose);if(e.watch_log)N.emit("addWatcher",Y)});var Z;return N.on("addWatcher",function(Y){if(Z)Z.close();if(!e.watch_log)return;Z=_S(Y,i.verbose,function(H,I){N.emit("createLog",I)})}),N.on("createLog",function(Y){try{let H=ce.lstatSync(Y)}catch(H){if(O&&O.end=="function")O.end();O=ce.createWriteStream(Y,W),N.emit("new",Y),Wa(O,N)}}),N.write=function(Y,H){var I=t?this.getDate(t,d,e.utc):r;if(I!=r||u&&c>u){var F=g+(r&&t?"."+I:"");if(g.match(/%DATE%/)&&r)F=g.replace(/%DATE%/g,I);if(u&&c>u)f++,F+="."+f+e.extension;else f=0,F+=e.extension;if(c=0,i.verbose)console.log(new Date,j("util").format("[FileStreamRotator] Changing logs from %s to %s",_,F));if(r=I,v=_,_=F,e.end_stream===!0)O.end();else O.destroy();$a(_),O=ce.createWriteStream(F,W),N.emit("new",F),N.emit("rotate",v,F),Wa(O,N)}O.write(Y,H),c+=Buffer.byteLength(Y,H)}.bind(this),process.nextTick(function(){N.emit("new",_)}),N.emit("new",_),N}else{if(i.verbose)console.log(new Date,"[FileStreamRotator] File won't be rotated: ",e.frequency,e.size);return process.nextTick(function(){O.emit("new",_)}),O}};var $a=function(e){var t=kt.dirname(e);t.split(kt.sep).reduce(function(r,i){if(r+=i+kt.sep,!ce.existsSync(r))try{ce.mkdirSync(r)}catch(a){if(a.code!=="EEXIST")throw a}return r},"")},Wa=function(t,r){t.on("close",function(){r.emit("close")}),t.on("finish",function(){r.emit("finish")}),t.on("error",function(i){r.emit("error",i)}),t.on("open",function(i){r.emit("open",i)})}});var Gh=b(function(Ax,Uh){var we=j("fs"),Wh=j("os"),Ce=j("path"),$h=j("util"),bi=j("zlib"),wS=Ph(),bS=le().MESSAGE,Hh=j("stream").PassThrough,Ha=$t(),vS={json:!1,colorize:!1,eol:Wh.EOL,logstash:null,prettyPrint:!1,label:null,stringify:!1,depth:null,showLevel:!0,timestamp:()=>new Date().toISOString()},Dr=function(e){e=e||{},Ha.call(this,e);function t(u){Array.prototype.slice.call(arguments,1).forEach((f)=>{if(e[f])throw Error("Cannot set "+f+" and "+u+" together")})}function r(u){if(u&&typeof u==="string"){if(u.toLowerCase().match(/^((?:0\.)?\d+)([kmg])$/))return u}else if(u&&Number.isInteger(u)){let f=Math.round(u/1024);return f===0?"1k":f+"k"}return null}function i(u){return!/["<>|:*?\\/\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(u)}function a(u){return!/["<>|\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]/g.test(u)}if(this.options=Object.assign({},vS,e),e.stream)t("stream","filename","maxsize"),this.logStream=new Hh,this.logStream.pipe(e.stream);else{if(this.filename=e.filename?Ce.basename(e.filename):"winston.log",this.dirname=e.dirname||Ce.dirname(e.filename),!i(this.filename)||!a(this.dirname))throw Error("Your path or filename contain an invalid character.");if(this.logStream=Ih().getStream({filename:Ce.join(this.dirname,this.filename),frequency:e.frequency?e.frequency:"custom",date_format:e.datePattern?e.datePattern:"YYYY-MM-DD",verbose:!1,size:r(e.maxSize),max_logs:e.maxFiles,end_stream:!0,audit_file:e.auditFile?e.auditFile:Ce.join(this.dirname,"."+wS(e)+"-audit.json"),file_options:e.options?e.options:{flags:"a"},utc:e.utc?e.utc:!1,extension:e.extension?e.extension:"",create_symlink:e.createSymlink?e.createSymlink:!1,symlink_name:e.symlinkName?e.symlinkName:"current.log",watch_log:e.watchLog?e.watchLog:!1,audit_hash_type:e.auditHashType?e.auditHashType:"sha256"}),this.logStream.on("new",(u)=>{this.emit("new",u)}),this.logStream.on("rotate",(u,f)=>{this.emit("rotate",u,f)}),this.logStream.on("logRemoved",(u)=>{if(e.zippedArchive){let f=u.name+".gz";try{we.unlinkSync(f)}catch(c){if(c.code!=="ENOENT"){c.message=`Error occurred while removing ${f}: ${c.message}`,this.emit("error",c);return}}this.emit("logRemoved",f);return}this.emit("logRemoved",u.name)}),e.zippedArchive)this.logStream.on("rotate",(u)=>{try{if(!we.existsSync(u))return}catch(g){g.message=`Error occurred while checking existence of ${u}: ${g.message}`,this.emit("error",g);return}try{if(we.existsSync(`${u}.gz`))return}catch(g){g.message=`Error occurred while checking existence of ${u}.gz: ${g.message}`,this.emit("error",g);return}let f=bi.createGzip(),c=we.createReadStream(u);c.on("error",(g)=>{g.message=`Error occurred while reading ${u}: ${g.message}`,this.emit("error",g)});let d=we.createWriteStream(u+".gz");d.on("error",(g)=>{g.message=`Error occurred while writing ${u}.gz: ${g.message}`,this.emit("error",g)}),c.pipe(f).pipe(d).on("finish",()=>{try{we.unlinkSync(u)}catch(g){if(g.code!=="ENOENT"){g.message=`Error occurred while removing ${u}: ${g.message}`,this.emit("error",g);return}}this.emit("archive",u+".gz")})});if(e.watchLog)this.logStream.on("addWatcher",(u)=>{this.emit("addWatcher",u)})}};Uh.exports=Dr;$h.inherits(Dr,Ha);Dr.prototype.name="dailyRotateFile";var SS=function(){};Dr.prototype.log=function(e,t){t=t||SS,this.logStream.write(e[bS]+this.options.eol),this.emit("logged",e),t(null,!0)};Dr.prototype.close=function(){if(this.logStream)this.logStream.end(()=>{this.emit("finish")})};Dr.prototype.query=function(e,t){if(typeof e==="function")t=e,e={};if(!this.options.json)throw Error("query() may not be used without the json option being set to true");if(!this.filename)throw Error("query() may not be used when initializing with a stream");let r=[];if(e=e||{},e.rows=e.rows||e.limit||10,e.start=e.start||0,e.until=e.until||new Date,typeof e.until!=="object")e.until=new Date(e.until);if(e.from=e.from||e.until-86400000,typeof e.from!=="object")e.from=new Date(e.from);e.order=e.order||"desc";let i=(()=>{let u=new RegExp(this.filename.replace("%DATE%",".*"),"i");return we.readdirSync(this.dirname).filter((f)=>Ce.basename(f).match(u))})();if(i.length===0&&t)t(null,r);let a=(u)=>{if(!u)return;let f=Ce.join(this.dirname,u),c="",d;if(u.endsWith(".gz")){d=new Hh;let v=we.createReadStream(f);v.on("error",(_)=>{_.message=`Error occurred while reading ${f}: ${_.message}`,d.emit("error",_)}),v.pipe(bi.createGunzip()).pipe(d)}else d=we.createReadStream(f,{encoding:"utf8"});d.on("error",(v)=>{if(d.readable)d.destroy();if(!t)return;return v.code==="ENOENT"?t(null,r):t(v)}),d.on("data",(v)=>{v=(c+v).split(/\n+/);let _=v.length-1;for(let w=0;w<_;w++)g(v[w]);c=v[_]}),d.on("end",()=>{if(c)g(c,!0);if(i.length)a(i.shift());else if(t){if(r.sort((w,E)=>{let p=new Date(w.timestamp).getTime(),M=new Date(E.timestamp).getTime();return p>M?1:p<M?-1:0}),e.order==="desc")r=r.reverse();let v=e.start||0,_=e.limit||r.length;if(r=r.slice(v,v+_),e.fields)r=r.map((w)=>{let E={};return e.fields.forEach((p)=>{E[p]=w[p]}),E});t(null,r)}});function g(v,_){try{let w=JSON.parse(v);if(!w||typeof w!=="object")return;let E=new Date(w.timestamp);if(e.from&&E<e.from||e.until&&E>e.until||e.level&&e.level!==w.level)return;r.push(w)}catch(w){if(!_)d.emit("error",w)}}};a(i.shift())}});var Zh=b(function(qx,Bh){var Vh=Fa(),zh=Gh();Vh.transports.DailyRotateFile=zh;Bh.exports=zh});import mn from"path";import kr from"fs";import Ze from"path";var Cr={},jr=Gi(),{isBunRuntime:We,isCloudflareRuntime:Co,isNodeRuntime:$p,hasFileSystemAccess:Be,console:or}=jr,jo=Cr;Vi();function Oe(e,t){let r=typeof process<"u"?process.env:void 0,i=r?r[e]:void 0,a=We?Bun?.env?.[e]:void 0,u=jo[e],f=typeof u==="string"?u:void 0,c=Co?f??i??a:i??a??f;return c===void 0||c===""?t:c}function NS(e,t){if(typeof process<"u")process.env[e]=t;jo[e]=t}function LS(e){globalThis.__hapiRuntimeOverride="cloudflare",Io(),Object.assign(Cr,e)}function PS(){delete globalThis.__hapiRuntimeOverride,Io()}async function AS(e){if(!We)throw Error(`File system access not available in this runtime: ${e}`);return await Bun.file(e).text()}async function qS(e){if(!We)throw Error(`File system access not available in this runtime: ${e}`);return await Bun.file(e).json()}async function YS(e){return We?await Bun.file(e).exists():!1}function FS(e){if(!We)throw Error(`File system access not available in this runtime: ${e}`);return Bun.file(e)}function Io(){let e=Gi();Ho(e),Vi()}function Wo(){if(Be)return;if($o()!==void 0)return;let e=Gi();Ho(e),Vi()}function Gi(){let e=$o(),t=Hp(e),r=t?!1:Up(e),i=Gp(e,r);return{isBunRuntime:t,isCloudflareRuntime:r,isNodeRuntime:i,hasFileSystemAccess:!r&&(t||i),console:Vp()}}function Hp(e){if(e==="bun")return!0;if(e==="cloudflare"||e==="node")return!1;return typeof Bun<"u"}function Up(e){if(e==="cloudflare")return!0;if(e==="bun"||e==="node")return!1;let t=typeof globalThis<"u"?globalThis:void 0,r=t?.navigator?.userAgent??"",i=typeof r==="string"&&r.includes("Cloudflare-Workers"),a=typeof t?.__ENVIRONMENT__==="string"&&t.__ENVIRONMENT__.toLowerCase()==="workerd",u=typeof t?.caches?.default<"u";return i||a||u}function Gp(e,t){if(e==="node")return!0;if(e==="bun"||e==="cloudflare")return!1;if(t)return!1;let r=typeof process<"u"?process.versions?.node:void 0;return typeof r==="string"&&r.length>0}function $o(){return typeof globalThis<"u"?globalThis.__hapiRuntimeOverride:void 0}function Vp(){let e=()=>{},t=typeof console<"u"?console:void 0;if(!t)return{log:e,info:e,warn:e,error:e,debug:e};let r=(a,u)=>typeof a==="function"?a.bind(t):u,i=r(t.log,e);return{log:i,info:r(t.info,i),warn:r(t.warn,i),error:r(t.error,i),debug:r(t.debug,i)}}function Ho(e){We=e.isBunRuntime,Co=e.isCloudflareRuntime,$p=e.isNodeRuntime,Be=e.hasFileSystemAccess,or=e.console}function Vi(){let e=zp();for(let t of Object.keys(Cr))delete Cr[t];Object.assign(Cr,e)}function zp(){if(We)return{...typeof Bun<"u"?Bun.env:{},...typeof process<"u"?process.env:{}};return(typeof process<"u"?process:void 0)?.env??{}}var wt=Be?Uo():Go(),{home:Bp,specs:Zp,config:Jp,src:Kp,logs:Bi,certs:Qp,plugins:Xp}=wt;function WS(){return{...wt}}function $S(){return Be?Uo():Go()}function Uo(){let e=Oe("HAPI_HOME"),t=e&&e.trim().length>0?t0(e):e0();return Vo(t)}function Go(){return Vo("/hapi")}function Vo(e){return{home:e,specs:Ze.join(e,"specs"),config:Ze.join(e,"config"),src:Ze.join(e,"src"),logs:Ze.join(e,"logs"),certs:Ze.join(e,"certs"),plugins:Ze.join(e,"plugins")}}function e0(){return Ze.join(zi(),".hapi")}function t0(e){let t=e.trim(),r=t==="~"?zi():t.replace(/^~(?=[\\/])/,zi());return Ze.resolve(r)}function zi(){let e=We?globalThis.Bun?.env??{}:{},t=e.HOME??e.USERPROFILE??Oe("HOME")??Oe("USERPROFILE")??r0(Oe("HOMEDRIVE"),Oe("HOMEPATH"));return t?Ze.resolve(t):Ze.resolve(".")}function r0(e,t){if(!e||!t)return;return`${e}${t}`}async function n0(e){if(!Be)return;try{let t=await import("fs/promises");await t.mkdir(e,{recursive:!0})}catch{}}async function HS(){if(!Be)return;await Promise.all([Bp,Zp,Jp,Kp,Bi,Qp,Xp].map(n0))}var Me=null;Wo();if(Be)try{let e=await Promise.resolve().then(() => Fo(Fa(),1));await Promise.resolve().then(() => Fo(Zh(),1)),Me=e.default??e}catch{Me=null}var xS=typeof globalThis.it==="function"&&typeof globalThis.describe==="function",Qh=We&&typeof globalThis.Bun<"u"&&Array.isArray(globalThis.Bun.argv)&&globalThis.Bun.argv.includes("test")||xS,Jh=()=>{let e=Oe("NODE_ENV");return e==="production"||!e||e!=="development"},Kh=Oe("LOG_DIR"),MS=()=>Qh?mn.resolve(process.cwd(),".test-hapi-home/logs"):Bi;Me?.addColors({http:"magenta",debug:"grey"});var ES=Me?.format.colorize(),OS=Me?Me.format.combine(Me.format.timestamp({format:"YYYY-MM-DD HH:mm:ss"}),Me.format.printf((e)=>{let{timestamp:t,level:r,message:i,...a}=e,u=Object.keys(a).length?`
|
|
50
|
+
${JSON.stringify(a,null,2)}`:"";return ES?.colorize(r,`${t} [${r.toUpperCase()}]: ${i}${u}`)??`${t} [${r.toUpperCase()}]: ${i}${u}`})):void 0,DS=Me?Me.format.combine(Me.format.timestamp(),Me.format.json()):void 0,kS=(e)=>{let t=`[${e}]`,r=(i,...a)=>{(or[i]??or.log)(t,...a)};return{log:(i,...a)=>{(or[typeof i==="string"?i:"log"]??or.log)(t,...a)},info:(...i)=>r("info",...i),warn:(...i)=>r("warn",...i),error:(...i)=>r("error",...i),debug:(...i)=>r("debug",...i)}};function RS(e){let t=typeof e==="string"?{projectname:e}:e,r=t.projectname,i=Oe("NODE_ENV")==="test"||Qh,a=t.disableFileLogs||i&&Oe("HAPI_ENABLE_TEST_FILE_LOGS")!=="true"||Oe("HAPI_DISABLE_FILE_LOGS")==="true";if(!Me)return kS(r);let u=t.logDir?mn.resolve(t.logDir):Kh?mn.resolve(Kh):MS(),f=!a;if(f&&Be)try{kr.mkdirSync(u,{recursive:!0});try{kr.accessSync(u,kr.constants.W_OK)}catch{throw Error("No write permission in log dir")}}catch{try{u=mn.resolve(process.cwd(),".test-hapi-home/logs"),kr.mkdirSync(u,{recursive:!0}),kr.accessSync(u,kr.constants.W_OK)}catch{f=!1}}let c=[];if(f)c.push(new Me.transports.DailyRotateFile({filename:mn.join(u,`${r}-hapi-%DATE%.log`),datePattern:"YYYY-MM-DD",maxSize:"20m",maxFiles:"14d",format:DS}));if(!Jh()||a||!f)c.push(new Me.transports.Console({format:OS}));return Me.createLogger({level:Jh()?Oe("HAPI_LOG_LEVEL_PROD")??"info":Oe("HAPI_LOG_LEVEL_DEV")??"debug",transports:c})}var Ua=null;function dn(){if(!Ua){let e=Oe("HAPI_PROJECT_NAME")??"hapi";Ua=RS(e)}return Ua}var Ix={log:(...e)=>dn().log(...e),info:(...e)=>dn().info(...e),warn:(...e)=>dn().warn(...e),error:(...e)=>dn().error(...e),debug:(...e)=>dn().debug(...e)};export{RS as createLogger,Ix as logger};
|