code-server
Version:
Run VS Code on a remote server.
2 lines • 445 kB
JavaScript
/*! For license information please see watchdog.bundle.js.LICENSE.txt */
(()=>{var e={9850:(e,t,r)=>{"use strict";const n=r(5622),o=r(3129),i=r(6939),s=r(4521),a=r(5191),c=r(2106),p=r(8662),d=r(405),{spawnedKill:u,spawnedCancel:l,setupTimeout:f,validateTimeout:m,setExitHandler:y}=r(4027),{handleInput:h,getSpawnedResult:g,makeAllStream:b,validateInputSync:w}=r(433),{mergePromise:v,getSpawnedPromise:_}=r(514),{joinCommand:k,parseCommand:S,getEscapedCommand:P}=r(4586),M=(e,t,r={})=>{const o=i._parse(e,t,r);return e=o.command,t=o.args,(r={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(r=o.options).cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...r}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const i=t?{...process.env,...e}:e;return r?a.env({env:i,cwd:n,execPath:o}):i})(r),r.stdio=d(r),"win32"===process.platform&&"cmd"===n.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:o}},T=(e,t,r)=>"string"==typeof t||Buffer.isBuffer(t)?e.stripFinalNewline?s(t):t:void 0===r?void 0:"",C=(e,t,r)=>{const n=M(e,t,r),i=k(e,t),s=P(e,t);let a;m(n.options);try{a=o.spawn(n.file,n.args,n.options)}catch(e){const t=new o.ChildProcess,r=Promise.reject(p({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return v(t,r)}const d=_(a),w=f(a,n.options,d),S=y(a,n.options,w),C={isCanceled:!1};a.kill=u.bind(null,a.kill.bind(a)),a.cancel=l.bind(null,a,C);const O=c((async()=>{const[{error:e,exitCode:t,signal:r,timedOut:o},c,d,u]=await g(a,n.options,S),l=T(n.options,c),f=T(n.options,d),m=T(n.options,u);if(e||0!==t||null!==r){const c=p({error:e,exitCode:t,signal:r,stdout:l,stderr:f,all:m,command:i,escapedCommand:s,parsed:n,timedOut:o,isCanceled:C.isCanceled,killed:a.killed});if(!n.options.reject)return c;throw c}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:f,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return h(a,n.options.input),a.all=b(a,n.options),v(a,O)};e.exports=C,e.exports.sync=(e,t,r)=>{const n=M(e,t,r),i=k(e,t),s=P(e,t);let a;w(n.options);try{a=o.spawnSync(n.file,n.args,n.options)}catch(e){throw p({error:e,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}const c=T(n.options,a.stdout,a.error),d=T(n.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=p({stdout:c,stderr:d,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:n,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!n.options.reject)return e;throw e}return{command:i,escapedCommand:s,exitCode:0,stdout:c,stderr:d,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},e.exports.command=(e,t)=>{const[r,...n]=S(e);return C(r,n,t)},e.exports.commandSync=(e,t)=>{const[r,...n]=S(e);return C.sync(r,n,t)},e.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&"object"==typeof t&&(r=t,t=[]);const n=d.node(r),o=process.execArgv.filter((e=>!e.startsWith("--inspect"))),{nodePath:i=process.execPath,nodeOptions:s=o}=r;return C(i,[...s,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})}},4586:e=>{"use strict";const t=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],r=/^[\w.-]+$/,n=/"/g,o=/ +/g;e.exports={joinCommand:(e,r)=>t(e,r).join(" "),getEscapedCommand:(e,o)=>t(e,o).map((e=>(e=>"string"!=typeof e||r.test(e)?e:`"${e.replace(n,'\\"')}"`)(e))).join(" "),parseCommand:e=>{const t=[];for(const r of e.trim().split(o)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t}}},8662:(e,t,r)=>{"use strict";const{signalsByName:n}=r(3808);e.exports=({stdout:e,stderr:t,all:r,error:o,signal:i,exitCode:s,command:a,escapedCommand:c,timedOut:p,isCanceled:d,killed:u,parsed:{options:{timeout:l}}})=>{s=null===s?void 0:s;const f=void 0===(i=null===i?void 0:i)?void 0:n[i].description,m=`Command ${(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?`failed with ${r}`:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:p,timeout:l,errorCode:o&&o.code,signal:i,signalDescription:f,exitCode:s,isCanceled:d})}: ${a}`,y="[object Error]"===Object.prototype.toString.call(o),h=y?`${m}\n${o.message}`:m,g=[h,t,e].filter(Boolean).join("\n");return y?(o.originalMessage=o.message,o.message=g):o=new Error(g),o.shortMessage=h,o.command=a,o.escapedCommand=c,o.exitCode=s,o.signal=i,o.signalDescription=f,o.stdout=e,o.stderr=t,void 0!==r&&(o.all=r),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=Boolean(p),o.isCanceled=d,o.killed=u&&!p,o}},4027:(e,t,r)=>{"use strict";const n=r(2087),o=r(3973),i=(e,{forceKillAfterTimeout:t},r)=>s(e)&&!1!==t&&r,s=e=>e===n.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),a=({forceKillAfterTimeout:e=!0})=>{if(!0===e)return 5e3;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e};e.exports={spawnedKill:(e,t="SIGTERM",r={})=>{const n=e(t);return((e,t,r,n)=>{if(!i(t,r,n))return;const o=a(r),s=setTimeout((()=>{e("SIGKILL")}),o);s.unref&&s.unref()})(e,t,r,n),n},spawnedCancel:(e,t)=>{e.kill()&&(t.isCanceled=!0)},setupTimeout:(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise(((n,i)=>{o=setTimeout((()=>{((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)}),t)})),s=n.finally((()=>{clearTimeout(o)}));return Promise.race([i,s])},validateTimeout:({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;const i=o((()=>{e.kill()}));return n.finally((()=>{i()}))}}},514:e=>{"use strict";const t=(async()=>{})().constructor.prototype,r=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(t,e)]));e.exports={mergePromise:(e,t)=>{for(const[n,o]of r){const r="function"==typeof t?(...e)=>Reflect.apply(o.value,t(),e):o.value.bind(t);Reflect.defineProperty(e,n,{...o,value:r})}return e},getSpawnedPromise:e=>new Promise(((t,r)=>{e.on("exit",((e,r)=>{t({exitCode:e,signal:r})})),e.on("error",(e=>{r(e)})),e.stdin&&e.stdin.on("error",(e=>{r(e)}))}))}},405:e=>{"use strict";const t=["stdin","stdout","stderr"],r=e=>{if(!e)return;const{stdio:r}=e;if(void 0===r)return t.map((t=>e[t]));if((e=>t.some((t=>void 0!==e[t])))(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${t.map((e=>`\`${e}\``)).join(", ")}`);if("string"==typeof r)return r;if(!Array.isArray(r))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof r}\``);const n=Math.max(r.length,t.length);return Array.from({length:n},((e,t)=>r[t]))};e.exports=r,e.exports.node=e=>{const t=r(e);return"ipc"===t?"ipc":void 0===t||"string"==typeof t?[t,t,t,"ipc"]:t.includes("ipc")?t:[...t,"ipc"]}},433:(e,t,r)=>{"use strict";const n=r(2240),o=r(3743),i=r(1779),s=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},a=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?o(e,{encoding:t,maxBuffer:n}):o.buffer(e,{maxBuffer:n})};e.exports={handleInput:(e,t)=>{void 0!==t&&void 0!==e.stdin&&(n(t)?t.pipe(e.stdin):e.stdin.end(t))},makeAllStream:(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const r=i();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r},getSpawnedResult:async({stdout:e,stderr:t,all:r},{encoding:n,buffer:o,maxBuffer:i},c)=>{const p=a(e,{encoding:n,buffer:o,maxBuffer:i}),d=a(t,{encoding:n,buffer:o,maxBuffer:i}),u=a(r,{encoding:n,buffer:o,maxBuffer:2*i});try{return await Promise.all([c,p,d,u])}catch(n){return Promise.all([{error:n,signal:n.signal,timedOut:n.timedOut},s(e,p),s(t,d),s(r,u)])}},validateInputSync:({input:e})=>{if(n(e))throw new TypeError("The `input` option cannot be a stream in sync mode")}}},6939:(e,t,r)=>{"use strict";const n=r(3129),o=r(9672),i=r(9357);function s(e,t,r){const s=o(e,t,r),a=n.spawn(s.command,s.args,s.options);return i.hookChildProcess(a,s),a}e.exports=s,e.exports.spawn=s,e.exports.sync=function(e,t,r){const s=o(e,t,r),a=n.spawnSync(s.command,s.args,s.options);return a.error=a.error||i.verifyENOENTSync(a.status,s),a},e.exports._parse=o,e.exports._enoent=i},9357:e=>{"use strict";const t="win32"===process.platform;function r(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function n(e,n){return t&&1===e&&!n.file?r(n.original,"spawn"):null}e.exports={hookChildProcess:function(e,r){if(!t)return;const o=e.emit;e.emit=function(t,i){if("exit"===t){const t=n(i,r);if(t)return o.call(e,"error",t)}return o.apply(e,arguments)}},verifyENOENT:n,verifyENOENTSync:function(e,n){return t&&1===e&&!n.file?r(n.original,"spawnSync"):null},notFoundError:r}},9672:(e,t,r)=>{"use strict";const n=r(5622),o=r(7515),i=r(4454),s=r(8313),a="win32"===process.platform,c=/\.(?:com|exe)$/i,p=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;e.exports=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const d={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?d:function(e){if(!a)return e;const t=function(e){e.file=o(e);const t=e.file&&s(e.file);return t?(e.args.unshift(e.file),e.command=t,o(e)):e.file}(e),r=!c.test(t);if(e.options.forceShell||r){const r=p.test(t);e.command=n.normalize(e.command),e.command=i.command(e.command),e.args=e.args.map((e=>i.argument(e,r)));const o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(d)}},4454:e=>{"use strict";const t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e.replace(t,"^$1")},e.exports.argument=function(e,r){return e=(e=`"${e=(e=(e=`${e}`).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(t,"^$1"),r&&(e=e.replace(t,"^$1")),e}},8313:(e,t,r)=>{"use strict";const n=r(5747),o=r(1857);e.exports=function(e){const t=Buffer.alloc(150);let r;try{r=n.openSync(e,"r"),n.readSync(r,t,0,150,0),n.closeSync(r)}catch(e){}return o(t.toString())}},7515:(e,t,r)=>{"use strict";const n=r(5622),o=r(6754),i=r(1915);function s(e,t){const r=e.options.env||process.env,s=process.cwd(),a=null!=e.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch(e){}let p;try{p=o.sync(e.command,{path:r[i({env:r})],pathExt:t?n.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return p&&(p=n.resolve(a?e.options.cwd:"",p)),p}e.exports=function(e){return s(e)||s(e,!0)}},1915:e=>{"use strict";const t=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};e.exports=t,e.exports.default=t},1857:(e,t,r)=>{"use strict";const n=r(5394);e.exports=(e="")=>{const t=e.match(n);if(!t)return null;const[r,o]=t[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return"env"===i?o:o?`${i} ${o}`:i}},5394:e=>{"use strict";e.exports=/^#!(.*)/},6754:(e,t,r)=>{const n="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,o=r(5622),i=n?";":":",s=r(4219),a=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),c=(e,t)=>{const r=t.colon||i,o=e.match(/\//)||n&&e.match(/\\/)?[""]:[...n?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],s=n?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=n?s.split(r):[""];return n&&-1!==e.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:o,pathExt:a,pathExtExe:s}},p=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:n,pathExt:i,pathExtExe:p}=c(e,t),d=[],u=r=>new Promise(((i,s)=>{if(r===n.length)return t.all&&d.length?i(d):s(a(e));const c=n[r],p=/^".*"$/.test(c)?c.slice(1,-1):c,u=o.join(p,e),f=!p&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;i(l(f,r,0))})),l=(e,r,n)=>new Promise(((o,a)=>{if(n===i.length)return o(u(r+1));const c=i[n];s(e+c,{pathExt:p},((i,s)=>{if(!i&&s){if(!t.all)return o(e+c);d.push(e+c)}return o(l(e,r,n+1))}))}));return r?u(0).then((e=>r(null,e)),r):u(0)};e.exports=p,p.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:n,pathExtExe:i}=c(e,t),p=[];for(let a=0;a<r.length;a++){const c=r[a],d=/^".*"$/.test(c)?c.slice(1,-1):c,u=o.join(d,e),l=!d&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let e=0;e<n.length;e++){const r=l+n[e];try{if(s.sync(r,{pathExt:i})){if(!t.all)return r;p.push(r)}}catch(e){}}}if(t.all&&p.length)return p;if(t.nothrow)return null;throw a(e)}},4185:(e,t,r)=>{"use strict";const{PassThrough:n}=r(2413);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const o="buffer"===r;let i=!1;t?i=!(r||o):r=r||"utf8",o&&(r=null);const s=new n({objectMode:i});r&&s.setEncoding(r);let a=0;const c=[];return s.on("data",(e=>{c.push(e),i?a=c.length:a+=e.length})),s.getBufferedValue=()=>t?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s}},3743:(e,t,r)=>{"use strict";const{constants:n}=r(4293),o=r(2413),{promisify:i}=r(1669),s=r(4185),a=i(o.pipeline);class c extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function p(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,o=s(t);return await new Promise(((t,i)=>{const s=e=>{e&&o.getBufferedLength()<=n.MAX_LENGTH&&(e.bufferedData=o.getBufferedValue()),i(e)};(async()=>{try{await a(e,o),t()}catch(e){s(e)}})(),o.on("data",(()=>{o.getBufferedLength()>r&&s(new c)}))})),o.getBufferedValue()}e.exports=p,e.exports.buffer=(e,t)=>p(e,{...t,encoding:"buffer"}),e.exports.array=(e,t)=>p(e,{...t,array:!0}),e.exports.MaxBufferError=c},3909:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SIGNALS=void 0,t.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]},3808:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.signalsByNumber=t.signalsByName=void 0;var n=r(2087),o=r(8175),i=r(1776);const s=(0,o.getSignals)().reduce((function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}}),{});t.signalsByName=s;const a=function(e,t){const r=t.find((({name:t})=>n.constants.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))},c=function(){const e=(0,o.getSignals)(),t=i.SIGRTMAX+1,r=Array.from({length:t},((t,r)=>function(e,t){const r=a(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:c,standard:p}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:c,standard:p}}}(r,e)));return Object.assign({},...r)}();t.signalsByNumber=c},1776:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SIGRTMAX=t.getRealtimeSignals=void 0,t.getRealtimeSignals=function(){const e=o-n+1;return Array.from({length:e},r)};const r=function(e,t){return{name:`SIGRT${t+1}`,number:n+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},n=34,o=64;t.SIGRTMAX=o},8175:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSignals=void 0;var n=r(2087),o=r(3909),i=r(1776);t.getSignals=function(){const e=(0,i.getRealtimeSignals)();return[...o.SIGNALS,...e].map(s)};const s=function({name:e,number:t,description:r,action:o,forced:i=!1,standard:s}){const{signals:{[e]:a}}=n.constants,c=void 0!==a;return{name:e,number:c?a:t,description:r,supported:c,action:o,forced:i,standard:s}}},1947:(e,t,r)=>{try{var n=r(1669);if("function"!=typeof n.inherits)throw"";e.exports=n.inherits}catch(t){e.exports=r(7442)}},7442:e=>{"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},1072:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tagProperty=t.tagParameter=t.decorate=void 0;var n=r(1954),o=r(1307);function i(e,t,r,o,i){var s={},a="number"==typeof i,c=void 0!==i&&a?i.toString():r;if(a&&void 0!==r)throw new Error(n.INVALID_DECORATOR_OPERATION);Reflect.hasOwnMetadata(e,t)&&(s=Reflect.getMetadata(e,t));var p=s[c];if(Array.isArray(p))for(var d=0,u=p;d<u.length;d++){var l=u[d];if(l.key===o.key)throw new Error(n.DUPLICATED_METADATA+" "+l.key.toString())}else p=[];p.push(o),s[c]=p,Reflect.defineMetadata(e,s,t)}function s(e,t){Reflect.decorate(e,t)}function a(e,t){return function(r,n){t(r,n,e)}}t.tagParameter=function(e,t,r,n){i(o.TAGGED,e,t,n,r)},t.tagProperty=function(e,t,r){i(o.TAGGED_PROP,e.constructor,t,r)},t.decorate=function(e,t,r){"number"==typeof r?s([a(r,e)],t):"string"==typeof r?Reflect.decorate([e],t,r):s([e],t)}},3636:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inject=t.LazyServiceIdentifer=void 0;var n=r(1954),o=r(1307),i=r(76),s=r(1072),a=function(){function e(e){this._cb=e}return e.prototype.unwrap=function(){return this._cb()},e}();t.LazyServiceIdentifer=a,t.inject=function(e){return function(t,r,a){if(void 0===e)throw new Error(n.UNDEFINED_INJECT_ANNOTATION(t.name));var c=new i.Metadata(o.INJECT_TAG,e);"number"==typeof a?s.tagParameter(t,r,a,c):s.tagProperty(t,r,c)}}},8895:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectable=void 0;var n=r(1954),o=r(1307);t.injectable=function(){return function(e){if(Reflect.hasOwnMetadata(o.PARAM_TYPES,e))throw new Error(n.DUPLICATED_INJECTABLE_DECORATOR);var t=Reflect.getMetadata(o.DESIGN_PARAM_TYPES,e)||[];return Reflect.defineMetadata(o.PARAM_TYPES,t,e),e}}},2598:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multiInject=void 0;var n=r(1307),o=r(76),i=r(1072);t.multiInject=function(e){return function(t,r,s){var a=new o.Metadata(n.MULTI_INJECT_TAG,e);"number"==typeof s?i.tagParameter(t,r,s,a):i.tagProperty(t,r,a)}}},4320:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.named=void 0;var n=r(1307),o=r(76),i=r(1072);t.named=function(e){return function(t,r,s){var a=new o.Metadata(n.NAMED_TAG,e);"number"==typeof s?i.tagParameter(t,r,s,a):i.tagProperty(t,r,a)}}},7815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.optional=void 0;var n=r(1307),o=r(76),i=r(1072);t.optional=function(){return function(e,t,r){var s=new o.Metadata(n.OPTIONAL_TAG,!0);"number"==typeof r?i.tagParameter(e,t,r,s):i.tagProperty(e,t,s)}}},1557:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postConstruct=void 0;var n=r(1954),o=r(1307),i=r(76);t.postConstruct=function(){return function(e,t,r){var s=new i.Metadata(o.POST_CONSTRUCT,t);if(Reflect.hasOwnMetadata(o.POST_CONSTRUCT,e.constructor))throw new Error(n.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.defineMetadata(o.POST_CONSTRUCT,s,e.constructor)}}},5501:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tagged=void 0;var n=r(76),o=r(1072);t.tagged=function(e,t){return function(r,i,s){var a=new n.Metadata(e,t);"number"==typeof s?o.tagParameter(r,i,s,a):o.tagProperty(r,i,a)}}},6538:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.targetName=void 0;var n=r(1307),o=r(76),i=r(1072);t.targetName=function(e){return function(t,r,s){var a=new o.Metadata(n.NAME_TAG,e);i.tagParameter(t,r,s,a)}}},3828:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unmanaged=void 0;var n=r(1307),o=r(76),i=r(1072);t.unmanaged=function(){return function(e,t,r){var s=new o.Metadata(n.UNMANAGED_TAG,!0);i.tagParameter(e,t,r,s)}}},85:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Binding=void 0;var n=r(5188),o=r(6441),i=function(){function e(e,t){this.id=o.id(),this.activated=!1,this.serviceIdentifier=e,this.scope=t,this.type=n.BindingTypeEnum.Invalid,this.constraint=function(e){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}return e.prototype.clone=function(){var t=new e(this.serviceIdentifier,this.scope);return t.activated=t.scope===n.BindingScopeEnum.Singleton&&this.activated,t.implementationType=this.implementationType,t.dynamicValue=this.dynamicValue,t.scope=this.scope,t.type=this.type,t.factory=this.factory,t.provider=this.provider,t.constraint=this.constraint,t.onActivation=this.onActivation,t.cache=this.cache,t},e}();t.Binding=i},8497:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingCount=void 0,t.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}},1954:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STACK_OVERFLOW=t.CIRCULAR_DEPENDENCY_IN_FACTORY=t.POST_CONSTRUCT_ERROR=t.MULTIPLE_POST_CONSTRUCT_METHODS=t.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=t.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=t.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=t.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=t.ARGUMENTS_LENGTH_MISMATCH=t.INVALID_DECORATOR_OPERATION=t.INVALID_TO_SELF_VALUE=t.INVALID_FUNCTION_BINDING=t.INVALID_MIDDLEWARE_RETURN=t.NO_MORE_SNAPSHOTS_AVAILABLE=t.INVALID_BINDING_TYPE=t.NOT_IMPLEMENTED=t.CIRCULAR_DEPENDENCY=t.UNDEFINED_INJECT_ANNOTATION=t.MISSING_INJECT_ANNOTATION=t.MISSING_INJECTABLE_ANNOTATION=t.NOT_REGISTERED=t.CANNOT_UNBIND=t.AMBIGUOUS_MATCH=t.KEY_NOT_FOUND=t.NULL_ARGUMENT=t.DUPLICATED_METADATA=t.DUPLICATED_INJECTABLE_DECORATOR=void 0,t.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",t.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",t.NULL_ARGUMENT="NULL argument",t.KEY_NOT_FOUND="Key Not Found",t.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",t.CANNOT_UNBIND="Could not unbind serviceIdentifier:",t.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",t.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",t.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:",t.UNDEFINED_INJECT_ANNOTATION=function(e){return"@inject called with undefined this could mean that the class "+e+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},t.CIRCULAR_DEPENDENCY="Circular dependency found:",t.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",t.INVALID_BINDING_TYPE="Invalid binding type:",t.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",t.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",t.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",t.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",t.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.",t.ARGUMENTS_LENGTH_MISMATCH=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"The number of constructor arguments in the derived class "+e[0]+" must be >= than the number of constructor arguments of its base class."},t.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",t.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",t.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",t.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",t.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class",t.POST_CONSTRUCT_ERROR=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"@postConstruct error in class "+e[0]+": "+e[1]},t.CIRCULAR_DEPENDENCY_IN_FACTORY=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"It looks like there is a circular dependency in one of the '"+e[0]+"' bindings. Please investigate bindings withservice identifier '"+e[1]+"'."},t.STACK_OVERFLOW="Maximum call stack size exceeded"},5188:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TargetTypeEnum=t.BindingTypeEnum=t.BindingScopeEnum=void 0,t.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"},t.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"},t.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"}},1307:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NON_CUSTOM_TAG_KEYS=t.POST_CONSTRUCT=t.DESIGN_PARAM_TYPES=t.PARAM_TYPES=t.TAGGED_PROP=t.TAGGED=t.MULTI_INJECT_TAG=t.INJECT_TAG=t.OPTIONAL_TAG=t.UNMANAGED_TAG=t.NAME_TAG=t.NAMED_TAG=void 0,t.NAMED_TAG="named",t.NAME_TAG="name",t.UNMANAGED_TAG="unmanaged",t.OPTIONAL_TAG="optional",t.INJECT_TAG="inject",t.MULTI_INJECT_TAG="multi_inject",t.TAGGED="inversify:tagged",t.TAGGED_PROP="inversify:tagged_props",t.PARAM_TYPES="inversify:paramtypes",t.DESIGN_PARAM_TYPES="design:paramtypes",t.POST_CONSTRUCT="post_construct",t.NON_CUSTOM_TAG_KEYS=[t.INJECT_TAG,t.MULTI_INJECT_TAG,t.NAME_TAG,t.UNMANAGED_TAG,t.NAMED_TAG,t.OPTIONAL_TAG]},9397:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.Container=void 0;var s=r(85),a=r(1954),c=r(5188),p=r(1307),d=r(1398),u=r(2007),l=r(5498),f=r(2286),m=r(6441),y=r(8426),h=r(6482),g=r(6006),b=function(){function e(e){this._appliedMiddleware=[];var t=e||{};if("object"!=typeof t)throw new Error(""+a.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(void 0===t.defaultScope)t.defaultScope=c.BindingScopeEnum.Transient;else if(t.defaultScope!==c.BindingScopeEnum.Singleton&&t.defaultScope!==c.BindingScopeEnum.Transient&&t.defaultScope!==c.BindingScopeEnum.Request)throw new Error(""+a.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(void 0===t.autoBindInjectable)t.autoBindInjectable=!1;else if("boolean"!=typeof t.autoBindInjectable)throw new Error(""+a.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(void 0===t.skipBaseClassChecks)t.skipBaseClassChecks=!1;else if("boolean"!=typeof t.skipBaseClassChecks)throw new Error(""+a.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:t.autoBindInjectable,defaultScope:t.defaultScope,skipBaseClassChecks:t.skipBaseClassChecks},this.id=m.id(),this._bindingDictionary=new g.Lookup,this._snapshots=[],this._middleware=null,this.parent=null,this._metadataReader=new d.MetadataReader}return e.merge=function(t,r){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var s=new e,a=i([t,r],n).map((function(e){return u.getBindingDictionary(e)})),c=u.getBindingDictionary(s);function p(e,t){e.traverse((function(e,r){r.forEach((function(e){t.add(e.serviceIdentifier,e.clone())}))}))}return a.forEach((function(e){p(e,c)})),s},e.prototype.load=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=this._getContainerModuleHelpersFactory(),n=0,o=e;n<o.length;n++){var i=o[n],s=r(i.id);i.registry(s.bindFunction,s.unbindFunction,s.isboundFunction,s.rebindFunction)}},e.prototype.loadAsync=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(this,void 0,void 0,(function(){var t,r,n,i,s;return o(this,(function(o){switch(o.label){case 0:t=this._getContainerModuleHelpersFactory(),r=0,n=e,o.label=1;case 1:return r<n.length?(i=n[r],s=t(i.id),[4,i.registry(s.bindFunction,s.unbindFunction,s.isboundFunction,s.rebindFunction)]):[3,4];case 2:o.sent(),o.label=3;case 3:return r++,[3,1];case 4:return[2]}}))}))},e.prototype.unload=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=function(e){return function(t){return t.moduleId===e}};t.forEach((function(t){var r=n(t.id);e._bindingDictionary.removeByCondition(r)}))},e.prototype.bind=function(e){var t=this.options.defaultScope||c.BindingScopeEnum.Transient,r=new s.Binding(e,t);return this._bindingDictionary.add(e,r),new f.BindingToSyntax(r)},e.prototype.rebind=function(e){return this.unbind(e),this.bind(e)},e.prototype.unbind=function(e){try{this._bindingDictionary.remove(e)}catch(t){throw new Error(a.CANNOT_UNBIND+" "+y.getServiceIdentifierAsString(e))}},e.prototype.unbindAll=function(){this._bindingDictionary=new g.Lookup},e.prototype.isBound=function(e){var t=this._bindingDictionary.hasKey(e);return!t&&this.parent&&(t=this.parent.isBound(e)),t},e.prototype.isBoundNamed=function(e,t){return this.isBoundTagged(e,p.NAMED_TAG,t)},e.prototype.isBoundTagged=function(e,t,r){var n=!1;if(this._bindingDictionary.hasKey(e)){var o=this._bindingDictionary.get(e),i=u.createMockRequest(this,e,t,r);n=o.some((function(e){return e.constraint(i)}))}return!n&&this.parent&&(n=this.parent.isBoundTagged(e,t,r)),n},e.prototype.snapshot=function(){this._snapshots.push(h.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware))},e.prototype.restore=function(){var e=this._snapshots.pop();if(void 0===e)throw new Error(a.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=e.bindings,this._middleware=e.middleware},e.prototype.createChild=function(t){var r=new e(t||this.options);return r.parent=this,r},e.prototype.applyMiddleware=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._appliedMiddleware=this._appliedMiddleware.concat(e);var r=this._middleware?this._middleware:this._planAndResolve();this._middleware=e.reduce((function(e,t){return t(e)}),r)},e.prototype.applyCustomMetadataReader=function(e){this._metadataReader=e},e.prototype.get=function(e){return this._get(!1,!1,c.TargetTypeEnum.Variable,e)},e.prototype.getTagged=function(e,t,r){return this._get(!1,!1,c.TargetTypeEnum.Variable,e,t,r)},e.prototype.getNamed=function(e,t){return this.getTagged(e,p.NAMED_TAG,t)},e.prototype.getAll=function(e){return this._get(!0,!0,c.TargetTypeEnum.Variable,e)},e.prototype.getAllTagged=function(e,t,r){return this._get(!1,!0,c.TargetTypeEnum.Variable,e,t,r)},e.prototype.getAllNamed=function(e,t){return this.getAllTagged(e,p.NAMED_TAG,t)},e.prototype.resolve=function(e){var t=this.createChild();return t.bind(e).toSelf(),this._appliedMiddleware.forEach((function(e){t.applyMiddleware(e)})),t.get(e)},e.prototype._getContainerModuleHelpersFactory=function(){var e=this,t=function(e,t){e._binding.moduleId=t},r=function(r){return function(n){var o=e.rebind.bind(e)(n);return t(o,r),o}};return function(n){return{bindFunction:(o=n,function(r){var n=e.bind.bind(e)(r);return t(n,o),n}),isboundFunction:function(t){return e.isBound.bind(e)(t)},rebindFunction:r(n),unbindFunction:function(t){e.unbind.bind(e)(t)}};var o}},e.prototype._get=function(e,t,r,n,o,i){var s=null,c={avoidConstraints:e,contextInterceptor:function(e){return e},isMultiInject:t,key:o,serviceIdentifier:n,targetType:r,value:i};if(this._middleware){if(null==(s=this._middleware(c)))throw new Error(a.INVALID_MIDDLEWARE_RETURN)}else s=this._planAndResolve()(c);return s},e.prototype._planAndResolve=function(){var e=this;return function(t){var r=u.plan(e._metadataReader,e,t.isMultiInject,t.targetType,t.serviceIdentifier,t.key,t.value,t.avoidConstraints);return r=t.contextInterceptor(r),l.resolve(r)}},e}();t.Container=b},8987:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncContainerModule=t.ContainerModule=void 0;var n=r(6441);t.ContainerModule=function(e){this.id=n.id(),this.registry=e};t.AsyncContainerModule=function(e){this.id=n.id(),this.registry=e}},6482:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerSnapshot=void 0;var r=function(){function e(){}return e.of=function(t,r){var n=new e;return n.bindings=t,n.middleware=r,n},e}();t.ContainerSnapshot=r},6006:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Lookup=void 0;var n=r(1954),o=function(){function e(){this._map=new Map}return e.prototype.getMap=function(){return this._map},e.prototype.add=function(e,t){if(null==e)throw new Error(n.NULL_ARGUMENT);if(null==t)throw new Error(n.NULL_ARGUMENT);var r=this._map.get(e);void 0!==r?(r.push(t),this._map.set(e,r)):this._map.set(e,[t])},e.prototype.get=function(e){if(null==e)throw new Error(n.NULL_ARGUMENT);var t=this._map.get(e);if(void 0!==t)return t;throw new Error(n.KEY_NOT_FOUND)},e.prototype.remove=function(e){if(null==e)throw new Error(n.NULL_ARGUMENT);if(!this._map.delete(e))throw new Error(n.KEY_NOT_FOUND)},e.prototype.removeByCondition=function(e){var t=this;this._map.forEach((function(r,n){var o=r.filter((function(t){return!e(t)}));o.length>0?t._map.set(n,o):t._map.delete(n)}))},e.prototype.hasKey=function(e){if(null==e)throw new Error(n.NULL_ARGUMENT);return this._map.has(e)},e.prototype.clone=function(){var t=new e;return this._map.forEach((function(e,r){e.forEach((function(e){return t.add(r,e.clone())}))})),t},e.prototype.traverse=function(e){this._map.forEach((function(t,r){e(r,t)}))},e}();t.Lookup=o},5719:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multiBindToService=t.getServiceIdentifierAsString=t.typeConstraint=t.namedConstraint=t.taggedConstraint=t.traverseAncerstors=t.decorate=t.id=t.MetadataReader=t.postConstruct=t.targetName=t.multiInject=t.unmanaged=t.optional=t.LazyServiceIdentifer=t.inject=t.named=t.tagged=t.injectable=t.ContainerModule=t.AsyncContainerModule=t.TargetTypeEnum=t.BindingTypeEnum=t.BindingScopeEnum=t.Container=t.METADATA_KEY=void 0;var n=r(1307);t.METADATA_KEY=n;var o=r(9397);Object.defineProperty(t,"Container",{enumerable:!0,get:function(){return o.Container}});var i=r(5188);Object.defineProperty(t,"BindingScopeEnum",{enumerable:!0,get:function(){return i.BindingScopeEnum}}),Object.defineProperty(t,"BindingTypeEnum",{enumerable:!0,get:function(){return i.BindingTypeEnum}}),Object.defineProperty(t,"TargetTypeEnum",{enumerable:!0,get:function(){return i.TargetTypeEnum}});var s=r(8987);Object.defineProperty(t,"AsyncContainerModule",{enumerable:!0,get:function(){return s.AsyncContainerModule}}),Object.defineProperty(t,"ContainerModule",{enumerable:!0,get:function(){return s.ContainerModule}});var a=r(8895);Object.defineProperty(t,"injectable",{enumerable:!0,get:function(){return a.injectable}});var c=r(5501);Object.defineProperty(t,"tagged",{enumerable:!0,get:function(){return c.tagged}});var p=r(4320);Object.defineProperty(t,"named",{enumerable:!0,get:function(){return p.named}});var d=r(3636);Object.defineProperty(t,"inject",{enumerable:!0,get:function(){return d.inject}}),Object.defineProperty(t,"LazyServiceIdentifer",{enumerable:!0,get:function(){return d.LazyServiceIdentifer}});var u=r(7815);Object.defineProperty(t,"optional",{enumerable:!0,get:function(){return u.optional}});var l=r(3828);Object.defineProperty(t,"unmanaged",{enumerable:!0,get:function(){return l.unmanaged}});var f=r(2598);Object.defineProperty(t,"multiInject",{enumerable:!0,get:function(){return f.multiInject}});var m=r(6538);Object.defineProperty(t,"targetName",{enumerable:!0,get:function(){return m.targetName}});var y=r(1557);Object.defineProperty(t,"postConstruct",{enumerable:!0,get:function(){return y.postConstruct}});var h=r(1398);Object.defineProperty(t,"MetadataReader",{enumerable:!0,get:function(){return h.MetadataReader}});var g=r(6441);Object.defineProperty(t,"id",{enumerable:!0,get:function(){return g.id}});var b=r(1072);Object.defineProperty(t,"decorate",{enumerable:!0,get:function(){return b.decorate}});var w=r(2265);Object.defineProperty(t,"traverseAncerstors",{enumerable:!0,get:function(){return w.traverseAncerstors}}),Object.defineProperty(t,"taggedConstraint",{enumerable:!0,get:function(){return w.taggedConstraint}}),Object.defineProperty(t,"namedConstraint",{enumerable:!0,get:function(){return w.namedConstraint}}),Object.defineProperty(t,"typeConstraint",{enumerable:!0,get:function(){return w.typeConstraint}});var v=r(8426);Object.defineProperty(t,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return v.getServiceIdentifierAsString}});var _=r(7373);Object.defineProperty(t,"multiBindToService",{enumerable:!0,get:function(){return _.multiBindToService}})},1018:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Context=void 0;var n=r(6441),o=function(){function e(e){this.id=n.id(),this.container=e}return e.prototype.addPlan=function(e){this.plan=e},e.prototype.setCurrentRequest=function(e){this.currentRequest=e},e}();t.Context=o},76:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var n=r(1307),o=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.toString=function(){return this.key===n.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},e}();t.Metadata=o},1398:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataReader=void 0;var n=r(1307),o=function(){function e(){}return e.prototype.getConstructorMetadata=function(e){return{compilerGeneratedMetadata:Reflect.getMetadata(n.PARAM_TYPES,e),userGeneratedMetadata:Reflect.getMetadata(n.TAGGED,e)||{}}},e.prototype.getPropertiesMetadata=function(e){return Reflect.getMetadata(n.TAGGED_PROP,e)||[]},e}();t.MetadataReader=o},7475:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Plan=void 0;t.Plan=function(e,t){this.parentContext=e,this.rootRequest=t}},2007:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBindingDictionary=t.createMockRequest=t.plan=void 0;var n=r(8497),o=r(1954),i=r(5188),s=r(1307),a=r(4841),c=r(8426),p=r(1018),d=r(76),u=r(7475),l=r(2906),f=r(2883),m=r(3891);function y(e){return e._bindingDictionary}function h(e,t,r,i,s){var a,p=b(r.container,s.serviceIdentifier);return p.length===n.BindingCount.NoBindingsAvailable&&r.container.options.autoBindInjectable&&"function"==typeof s.serviceIdentifier&&e.getConstructorMetadata(s.serviceIdentifier).compilerGeneratedMetadata&&(r.container.bind(s.serviceIdentifier).toSelf(),p=b(r.container,s.serviceIdentifier)),a=t?p:p.filter((function(e){var t=new f.Request(e.serviceIdentifier,r,i,e,s);return e.constraint(t)})),function(e,t,r,i){switch(t.length){case n.BindingCount.NoBindingsAvailable:if(r.isOptional())return t;var s=c.getServiceIdentifierAsString(e),a=o.NOT_REGISTERED;throw a+=c.listMetadataForTarget(s,r),a+=c.listRegisteredBindingsForServiceIdentifier(i,s,b),new Error(a);case n.BindingCount.OnlyOneBindingAvailable:if(!r.isArray())return t;case n.BindingCount.MultipleBindingsAvailable:default:if(r.isArray())return t;throw s=c.getServiceIdentifierAsString(e),a=o.AMBIGUOUS_MATCH+" "+s,a+=c.listRegisteredBindingsForServiceIdentifier(i,s,b),new Error(a)}}(s.serviceIdentifier,a,s,r.container),a}function g(e,t,r,n,s,a){var c,p;if(null===s){c=h(e,t,n,null,a),p=new f.Request(r,n,null,c,a);var d=new u.Plan(n,p);n.addPlan(d)}else c=h(e,t,n,s,a),p=s.addChildRequest(a.serviceIdentifier,c,a);c.forEach((function(t){var r=null;if(a.isArray())r=p.addChildRequest(t.serviceIdentifier,t,a);else{if(t.cache)return;r=p}if(t.type===i.BindingTypeEnum.Instance&&null!==t.implementationType){var s=l.getDependencies(e,t.implementationType);if(!n.container.options.skipBaseClassChecks){var c=l.getBaseClassDependencyCount(e,t.implementationType);if(s.length<c){var d=o.ARGUMENTS_LENGTH_MISMATCH(l.getFunctionName(t.implementationType));throw new Error(d)}}s.forEach((function(t){g(e,!1,t.serviceIdentifier,n,r,t)}))}}))}function b(e,t){var r=[],n=y(e);return n.hasKey(t)?r=n.get(t):null!==e.parent&&(r=b(e.parent,t)),r}t.getBindingDictionary=y,t.plan=function(e,t,r,n,o,i,u,l){void 0===l&&(l=!1);var f=new p.Context(t),y=function(e,t,r,n,o,i){var a=e?s.MULTI_INJECT_TAG:s.INJECT_TAG,c=new d.Metadata(a,r),p=new m.Target(t,"",r,c);if(void 0!==o){var u=new d.Metadata(o,i);p.metadata.push(u)}return p}(r,n,o,0,i,u);try{return g(e,l,o,f,null,y),f}catch(e){throw a.isStackOverflowExeption(e)&&f.plan&&c.circularDependencyToException(f.plan.rootRequest),e}},t.createMockRequest=function(e,t,r,n){var o=new m.Target(i.TargetTypeEnum.Variable,"",t,new d.Metadata(r,n)),s=new p.Context(e);return new f.Request(t,s,null,[],o)}},9946:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryableString=void 0;var r=function(){function e(e){this.str=e}return e.prototype.startsWith=function(e){return 0===this.str.indexOf(e)},e.prototype.endsWith=function(e){var t,r=e.split("").reverse().join("");return t=this.str.split("").reverse().join(""),this.startsWith.call({str:t},r)},e.prototype.contains=function(e){return-1!==this.str.indexOf(e)},e.prototype.equals=function(e){return this.str===e},e.prototype.value=function(){return this.str},e}();t.QueryableString=r},2906:function(e,t,r){"use strict";var n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.getFunctionName=t.getBaseClassDependencyCount=t.getDependencies=void 0;var o=r(3636),i=r(1954),s=r(5188),a=r(1307),c=r(8426);Object.defineProperty(t,"getFunctionName",{enumerable:!0,get:function(){return c.getFunctionName}});var p=r(3891);function d(e,t,r,o){var s=e.getConstructorMetadata(r),a=s.compilerGeneratedMetadata;if(void 0===a){var c=i.MISSING_INJECTABLE_ANNOTATION+" "+t+".";throw new Error(c)}var p=s.userGeneratedMetadata,d=Object.keys(p),f=0===r.length&&d.length>0,m=d.length>r.length,y=function(e,t,r,n,o){for(var i=[],s=0;s<o;s++){var a=u(s,e,t,r,n);null!==a&&i.push(a)}return i}(o,t,a,p,f||m?d.length:r.length),h=l(e,r);return n(n([],y),h)}function u(e,t,r,n,a){var c=a[e.toString()]||[],d=f(c),u=!0!==d.unmanaged,l=n[e];if((l=d.inject||d.multiInject||l)instanceof o.LazyServiceIdentifer&&(l=l.unwrap()),u){if(!t&&(l===Object||l===Function||void 0===l)){var m=i.MISSING_INJECT_ANNOTATION+" argument "+e+" in class "+r+".";throw new Error(m)}var y=new p.Target(s.TargetTypeEnum.ConstructorArgument,d.targetName,l);return y.metadata=c,y}return null}function l(e,t){for(var r=e.getPropertiesMetadata(t),o=[],i=0,a=Object.keys(r);i<a.length;i++){var c=a[i],d=r[c],u=f(r[c]),m=u.targetName||c,y=u.inject||u.multiInject,h=new p.Target(s.TargetTypeEnum.ClassProperty,m,y);h.metadata=d,o.push(h)}var g=Object.getPrototypeOf(t.prototype).constructor;if(g!==Object){var b=l(e,g);o=n(n([],o),b)}return o}function f(e){var t={};return e.forEach((function(e){t[e.key.toString()]=e.value})),{inject:t[a.INJECT_TAG],multiInject:t[a.MULTI_INJECT_TAG],targetName:t[a.NAME_TAG],unmanaged:t[a.UNMANAGED_TAG]}}t.getDependencies=function(e,t){return d(e,c.getFunctionName(t),t,!1)},t.getBaseClassDependencyCount=function e(t,r){var n=Object.getPrototypeOf(r.prototype).constructor;if(n!==Object){var o=d(t,c.getFunctionName(n),n,!0),i=o.map((function(e){return e.metadata.filter((function(e){return e.key===a.UNMANAGED_TAG}))})),s=[].concat.apply([],i).length,p=o.length-s;return p>0?p:e(t,n)}return 0}},2883:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Request=void 0;var n=r(6441),o=function(){function e(e,t,r,o,i){this.id=n.id(),this.serviceIdentifier=e,this.parentContext=t,this.parentRequest=r,this.target=i,this.childRequests=[],this.bindings=Array.isArray(o)?o:[o],this.requestScope=null===r?new Map:null}return e.prototype.addChildRequest=function(t,r,n){var o=new e(t,this.parentContext,this,r,n);return this.childRequests.push(o),o},e}();t.Request=o},3891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Target=void 0;var n=r(1307),o=r(6441),i=r(76),s=r(9946),a=function(){function e(e,t,r,a){this.id=o.id(),this.type=e,this.serviceIdentifier=r,this.name=new s.QueryableString(t||""),this.metadata=new Array;var c=null;"string"==typeof a?c=new i.Metadata(n.NAMED_TAG,a):a instanceof i.Metadata&&(c=a),null!==c&&this.metadata.push(c)}return e.prototype.hasTag=function(e){for(var t=0,r=this.metadata;t<r.length;t++)if(r[t].key===e)return!0;return!1},e.prototype.isArray=function(){return this.hasTag(n.MULTI_INJECT_TAG)},e.prototype.matchesArray=function(e){return this.matchesTag(n.MULTI_INJECT_TAG)(e)},e.prototype.isNamed=function(){return this.hasTag(n.NAMED_TAG)},e.prototype.isTagged=function(){return this.metadata.some((fu