UNPKG

chromatic

Version:

Automate visual testing across browsers. Gather UI feedback. Versioned documentation.

18 lines • 124 kB
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d29ed838-f433-5422-bf53-c5d949c43a3a")}catch(e){}}();
const e=require(`./chunk-gGpyby2o.cjs`);let t=require(`fs`),n=require(`path`),r=require(`url`);r=e.a(r,1);let i=require(`util`);i=e.a(i,1);let a=require(`node:util`),o=require(`node:child_process`),s=require(`node:fs`);s=e.a(s,1);let c=require(`node:path`);c=e.a(c,1);let l=require(`node:process`);l=e.a(l,1);let u=require(`node:url`);u=e.a(u,1);let d=require(`node:module`);d=e.a(d,1);function f(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf(`-`)===-1&&e.indexOf(`_`)===-1)return e;{let t=``,n=!1,r=e.match(/^-+/);for(let i=r?r[0].length:0;i<e.length;i++){let r=e.charAt(i);n&&(n=!1,r=r.toUpperCase()),i!==0&&(r===`-`||r===`_`)?n=!0:r!==`-`&&r!==`_`&&(t+=r)}return t}}function p(e,t){let n=e.toLowerCase();t||=`-`;let r=``;for(let i=0;i<e.length;i++){let a=n.charAt(i),o=e.charAt(i);a!==o&&i>0?r+=`${t}${n.charAt(i)}`:r+=o}return r}function m(e){return e==null?!1:typeof e==`number`||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function h(e){if(Array.isArray(e))return e.map(e=>typeof e==`string`?e:e+``);e=e.trim();let t=0,n=null,r=null,i=null,a=[];for(let o=0;o<e.length;o++){if(n=r,r=e.charAt(o),r===` `&&!i){n!==` `&&t++;continue}r===i?i=null:(r===`'`||r===`"`)&&!i&&(i=r),a[t]||(a[t]=``),a[t]+=r}return a}var g;(function(e){e.BOOLEAN=`boolean`,e.STRING=`string`,e.NUMBER=`number`,e.ARRAY=`array`})(g||={});let _;var v=class{constructor(e){_=e}parse(e,t){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},t),r=h(e),i=typeof e==`string`,a=y(Object.assign(Object.create(null),n.alias)),o=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":`no-`,"parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),s=Object.assign(Object.create(null),n.default),c=n.configObjects||[],l=n.envPrefix,u=o[`populate--`],d=u?`--`:`_`,v=Object.create(null),S=Object.create(null),C=n.__||_.format,w={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},T=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,E=RegExp(`^--`+o[`negation-prefix`]+`(.+)`);[].concat(n.array||[]).filter(Boolean).forEach(function(e){let t=typeof e==`object`?e.key:e,n=Object.keys(e).map(function(e){return{boolean:`bools`,string:`strings`,number:`numbers`}[e]}).filter(Boolean).pop();n&&(w[n][t]=!0),w.arrays[t]=!0,w.keys.push(t)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(e){w.bools[e]=!0,w.keys.push(e)}),[].concat(n.string||[]).filter(Boolean).forEach(function(e){w.strings[e]=!0,w.keys.push(e)}),[].concat(n.number||[]).filter(Boolean).forEach(function(e){w.numbers[e]=!0,w.keys.push(e)}),[].concat(n.count||[]).filter(Boolean).forEach(function(e){w.counts[e]=!0,w.keys.push(e)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(e){w.normalize[e]=!0,w.keys.push(e)}),typeof n.narg==`object`&&Object.entries(n.narg).forEach(([e,t])=>{typeof t==`number`&&(w.nargs[e]=t,w.keys.push(e))}),typeof n.coerce==`object`&&Object.entries(n.coerce).forEach(([e,t])=>{typeof t==`function`&&(w.coercions[e]=t,w.keys.push(e))}),n.config!==void 0&&(Array.isArray(n.config)||typeof n.config==`string`?[].concat(n.config).filter(Boolean).forEach(function(e){w.configs[e]=!0}):typeof n.config==`object`&&Object.entries(n.config).forEach(([e,t])=>{(typeof t==`boolean`||typeof t==`function`)&&(w.configs[e]=t)})),ce(n.key,a,n.default,w.arrays),Object.keys(s).forEach(function(e){(w.aliases[e]||[]).forEach(function(t){s[t]=s[e]})});let D=null;pe();let O=[],k=Object.assign(Object.create(null),{_:[]}),A={};for(let e=0;e<r.length;e++){let t=r[e],n=t.replace(/^-{3,}/,`---`),i,a,s,c,l,u;if(t!==`--`&&/^-/.test(t)&&H(t))j(t);else if(n.match(/^---+(=|$)/)){j(t);continue}else if(t.match(/^--.+=/)||!o[`short-option-groups`]&&t.match(/^-.+=/))c=t.match(/^--?([^=]+)=([\s\S]*)$/),c!==null&&Array.isArray(c)&&c.length>=3&&(B(c[1],w.arrays)?e=N(e,c[1],r,c[2]):B(c[1],w.nargs)===!1?P(c[1],c[2],!0):e=M(e,c[1],r,c[2]));else if(t.match(E)&&o[`boolean-negation`])c=t.match(E),c!==null&&Array.isArray(c)&&c.length>=2&&(a=c[1],P(a,B(a,w.arrays)?[!1]:!1));else if(t.match(/^--.+/)||!o[`short-option-groups`]&&t.match(/^-[^-]+/))c=t.match(/^--?(.+)/),c!==null&&Array.isArray(c)&&c.length>=2&&(a=c[1],B(a,w.arrays)?e=N(e,a,r):B(a,w.nargs)===!1?(l=r[e+1],l!==void 0&&(!l.match(/^-/)||l.match(T))&&!B(a,w.bools)&&!B(a,w.counts)||/^(true|false)$/.test(l)?(P(a,l),e++):P(a,W(a))):e=M(e,a,r));else if(t.match(/^-.\..+=/))c=t.match(/^-([^=]+)=([\s\S]*)$/),c!==null&&Array.isArray(c)&&c.length>=3&&P(c[1],c[2]);else if(t.match(/^-.\..+/)&&!t.match(T))l=r[e+1],c=t.match(/^-(.\..+)/),c!==null&&Array.isArray(c)&&c.length>=2&&(a=c[1],l!==void 0&&!l.match(/^-/)&&!B(a,w.bools)&&!B(a,w.counts)?(P(a,l),e++):P(a,W(a)));else if(t.match(/^-[^-]+/)&&!t.match(T)){s=t.slice(1,-1).split(``),i=!1;for(let n=0;n<s.length;n++){if(l=t.slice(n+2),s[n+1]&&s[n+1]===`=`){u=t.slice(n+3),a=s[n],B(a,w.arrays)?e=N(e,a,r,u):B(a,w.nargs)===!1?P(a,u):e=M(e,a,r,u),i=!0;break}if(l===`-`){P(s[n],l);continue}if(/[A-Za-z]/.test(s[n])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(l)&&B(l,w.bools)===!1){P(s[n],l),i=!0;break}if(s[n+1]&&s[n+1].match(/\W/)){P(s[n],l),i=!0;break}else P(s[n],W(s[n]))}a=t.slice(-1)[0],!i&&a!==`-`&&(B(a,w.arrays)?e=N(e,a,r):B(a,w.nargs)===!1?(l=r[e+1],l!==void 0&&(!/^(-|--)[^-]/.test(l)||l.match(T))&&!B(a,w.bools)&&!B(a,w.counts)||/^(true|false)$/.test(l)?(P(a,l),e++):P(a,W(a))):e=M(e,a,r))}else if(t.match(/^-[0-9]$/)&&t.match(T)&&B(t.slice(1),w.bools))a=t.slice(1),P(a,W(a));else if(t===`--`){O=r.slice(e+1);break}else if(o[`halt-at-non-option`]){O=r.slice(e);break}else j(t)}ie(k,!0),ie(k,!1),ne(k),re(),se(k,w.aliases,s,!0),ae(k),o[`set-placeholder-key`]&&oe(k),Object.keys(w.counts).forEach(function(e){R(k,e.split(`.`))||P(e,0)}),u&&O.length&&(k[d]=[]),O.forEach(function(e){k[d].push(e)}),o[`camel-case-expansion`]&&o[`strip-dashed`]&&Object.keys(k).filter(e=>e!==`--`&&e.includes(`-`)).forEach(e=>{delete k[e]}),o[`strip-aliased`]&&[].concat(...Object.keys(a).map(e=>a[e])).forEach(e=>{o[`camel-case-expansion`]&&e.includes(`-`)&&delete k[e.split(`.`).map(e=>f(e)).join(`.`)],delete k[e]});function j(e){let t=I(`_`,e);(typeof t==`string`||typeof t==`number`)&&k._.push(t)}function M(e,t,n,r){let i,a=B(t,w.nargs);if(a=typeof a!=`number`||isNaN(a)?1:a,a===0)return G(r)||(D=Error(C(`Argument unexpected for: %s`,t))),P(t,W(t)),e;let s=+!G(r);if(o[`nargs-eats-options`])n.length-(e+1)+s<a&&(D=Error(C(`Not enough arguments following: %s`,t))),s=a;else{for(i=e+1;i<n.length&&(!n[i].match(/^-[^0-9]/)||n[i].match(T)||H(n[i]));i++)s++;s<a&&(D=Error(C(`Not enough arguments following: %s`,t)))}let c=Math.min(s,a);for(!G(r)&&c>0&&(P(t,r),c--),i=e+1;i<c+e+1;i++)P(t,n[i]);return e+c}function N(e,t,n,r){let a=[],c=r||n[e+1],l=B(t,w.nargs);if(B(t,w.bools)&&!/^(true|false)$/.test(c))a.push(!0);else if(G(c)||G(r)&&/^-/.test(c)&&!T.test(c)&&!H(c)){if(s[t]!==void 0){let e=s[t];a=Array.isArray(e)?e:[e]}}else{G(r)||a.push(F(t,r,!0));for(let r=e+1;r<n.length&&!(!o[`greedy-arrays`]&&a.length>0||l&&typeof l==`number`&&a.length>=l||(c=n[r],/^-/.test(c)&&!T.test(c)&&!H(c)));r++)e=r,a.push(F(t,c,i))}return typeof l==`number`&&(l&&a.length<l||isNaN(l)&&a.length===0)&&(D=Error(C(`Not enough arguments following: %s`,t))),P(t,a),e}function P(e,t,n=i){/-/.test(e)&&o[`camel-case-expansion`]&&te(e,e.split(`.`).map(function(e){return f(e)}).join(`.`));let r=F(e,t,n),a=e.split(`.`);z(k,a,r),w.aliases[e]&&w.aliases[e].forEach(function(e){z(k,e.split(`.`),r)}),a.length>1&&o[`dot-notation`]&&(w.aliases[a[0]]||[]).forEach(function(t){let n=t.split(`.`),i=[].concat(a);i.shift(),n=n.concat(i),(w.aliases[e]||[]).includes(n.join(`.`))||z(k,n,r)}),B(e,w.normalize)&&!B(e,w.arrays)&&[e].concat(w.aliases[e]||[]).forEach(function(e){Object.defineProperty(A,e,{enumerable:!0,get(){return t},set(e){t=typeof e==`string`?_.normalize(e):e}})})}function te(e,t){w.aliases[e]&&w.aliases[e].length||(w.aliases[e]=[t],v[t]=!0),w.aliases[t]&&w.aliases[t].length||te(t,e)}function F(e,t,n){n&&(t=ee(t)),(B(e,w.bools)||B(e,w.counts))&&typeof t==`string`&&(t=t===`true`);let r=Array.isArray(t)?t.map(function(t){return I(e,t)}):I(e,t);return B(e,w.counts)&&(G(r)||typeof r==`boolean`)&&(r=b()),B(e,w.normalize)&&B(e,w.arrays)&&(r=Array.isArray(t)?t.map(e=>_.normalize(e)):_.normalize(t)),r}function I(e,t){return!o[`parse-positional-numbers`]&&e===`_`||!B(e,w.strings)&&!B(e,w.bools)&&!Array.isArray(t)&&(m(t)&&o[`parse-numbers`]&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)))||!G(t)&&B(e,w.numbers))&&(t=Number(t)),t}function ne(e){let t=Object.create(null);se(t,w.aliases,s),Object.keys(w.configs).forEach(function(n){let r=e[n]||t[n];if(r)try{let e=null,t=_.resolve(_.cwd(),r),i=w.configs[n];if(typeof i==`function`){try{e=i(t)}catch(t){e=t}if(e instanceof Error){D=e;return}}else e=_.require(t);L(e)}catch(t){t.name===`PermissionDenied`?D=t:e[n]&&(D=Error(C(`Invalid JSON config file: %s`,r)))}})}function L(e,t){Object.keys(e).forEach(function(n){let r=e[n],i=t?t+`.`+n:n;typeof r==`object`&&r&&!Array.isArray(r)&&o[`dot-notation`]?L(r,i):(!R(k,i.split(`.`))||B(i,w.arrays)&&o[`combine-arrays`])&&P(i,r)})}function re(){c!==void 0&&c.forEach(function(e){L(e)})}function ie(e,t){if(l===void 0)return;let n=typeof l==`string`?l:``,r=_.env();Object.keys(r).forEach(function(i){if(n===``||i.lastIndexOf(n,0)===0){let a=i.split(`__`).map(function(e,t){return t===0&&(e=e.substring(n.length)),f(e)});(t&&w.configs[a.join(`.`)]||!t)&&!R(e,a)&&P(a.join(`.`),r[i])}})}function ae(e){let t,n=new Set;Object.keys(e).forEach(function(r){if(!n.has(r)&&(t=B(r,w.coercions),typeof t==`function`))try{let i=I(r,t(e[r]));[].concat(w.aliases[r]||[],r).forEach(t=>{n.add(t),e[t]=i})}catch(e){D=e}})}function oe(e){return w.keys.forEach(t=>{~t.indexOf(`.`)||e[t]===void 0&&(e[t]=void 0)}),e}function se(e,t,n,r=!1){Object.keys(n).forEach(function(i){R(e,i.split(`.`))||(z(e,i.split(`.`),n[i]),r&&(S[i]=!0),(t[i]||[]).forEach(function(t){R(e,t.split(`.`))||z(e,t.split(`.`),n[i])}))})}function R(e,t){let n=e;o[`dot-notation`]||(t=[t.join(`.`)]),t.slice(0,-1).forEach(function(e){n=n[e]||{}});let r=t[t.length-1];return typeof n==`object`?r in n:!1}function z(e,t,n){let r=e;o[`dot-notation`]||(t=[t.join(`.`)]),t.slice(0,-1).forEach(function(e){e=x(e),typeof r==`object`&&r[e]===void 0&&(r[e]={}),typeof r[e]!=`object`||Array.isArray(r[e])?(Array.isArray(r[e])?r[e].push({}):r[e]=[r[e],{}],r=r[e][r[e].length-1]):r=r[e]});let i=x(t[t.length-1]),a=B(t.join(`.`),w.arrays),s=Array.isArray(n),c=o[`duplicate-arguments-array`];!c&&B(i,w.nargs)&&(c=!0,(!G(r[i])&&w.nargs[i]===1||Array.isArray(r[i])&&r[i].length===w.nargs[i])&&(r[i]=void 0)),n===b()?r[i]=b(r[i]):Array.isArray(r[i])?c&&a&&s?r[i]=o[`flatten-duplicate-arrays`]?r[i].concat(n):(Array.isArray(r[i][0])?r[i]:[r[i]]).concat([n]):!c&&!!a==!!s?r[i]=n:r[i]=r[i].concat([n]):r[i]===void 0&&a?r[i]=s?n:[n]:c&&!(r[i]===void 0||B(i,w.counts)||B(i,w.bools))?r[i]=[r[i],n]:r[i]=n}function ce(...e){e.forEach(function(e){Object.keys(e||{}).forEach(function(e){w.aliases[e]||(w.aliases[e]=[].concat(a[e]||[]),w.aliases[e].concat(e).forEach(function(t){if(/-/.test(t)&&o[`camel-case-expansion`]){let n=f(t);n!==e&&w.aliases[e].indexOf(n)===-1&&(w.aliases[e].push(n),v[n]=!0)}}),w.aliases[e].concat(e).forEach(function(t){if(t.length>1&&/[A-Z]/.test(t)&&o[`camel-case-expansion`]){let n=p(t,`-`);n!==e&&w.aliases[e].indexOf(n)===-1&&(w.aliases[e].push(n),v[n]=!0)}}),w.aliases[e].forEach(function(t){w.aliases[t]=[e].concat(w.aliases[e].filter(function(e){return t!==e}))}))})})}function B(e,t){let n=[].concat(w.aliases[e]||[],e),r=Object.keys(t),i=n.find(e=>r.includes(e));return i?t[i]:!1}function le(e){let t=Object.keys(w);return[].concat(t.map(e=>w[e])).some(function(t){return Array.isArray(t)?t.includes(e):t[e]})}function V(e,...t){return[].concat(...t).some(function(t){let n=e.match(t);return n&&le(n[1])})}function ue(e){if(e.match(T)||!e.match(/^-[^-]+/))return!1;let t=!0,n,r=e.slice(1).split(``);for(let i=0;i<r.length;i++){if(n=e.slice(i+2),!le(r[i])){t=!1;break}if(r[i+1]&&r[i+1]===`=`||n===`-`||/[A-Za-z]/.test(r[i])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(n)||r[i+1]&&r[i+1].match(/\W/))break}return t}function H(e){return o[`unknown-options-as-args`]&&U(e)}function U(e){return e=e.replace(/^-{3,}/,`--`),e.match(T)||ue(e)?!1:!V(e,/^-+([^=]+?)=[\s\S]*$/,E,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function W(e){return!B(e,w.bools)&&!B(e,w.counts)&&`${e}`in s?s[e]:de(fe(e))}function de(e){return{[g.BOOLEAN]:!0,[g.STRING]:``,[g.NUMBER]:void 0,[g.ARRAY]:[]}[e]}function fe(e){let t=g.BOOLEAN;return B(e,w.strings)?t=g.STRING:B(e,w.numbers)?t=g.NUMBER:B(e,w.bools)?t=g.BOOLEAN:B(e,w.arrays)&&(t=g.ARRAY),t}function G(e){return e===void 0}function pe(){Object.keys(w.counts).find(e=>B(e,w.arrays)?(D=Error(C(`Invalid configuration: %s, opts.count excludes opts.array.`,e)),!0):B(e,w.nargs)?(D=Error(C(`Invalid configuration: %s, opts.count excludes opts.narg.`,e)),!0):!1)}return{aliases:Object.assign({},w.aliases),argv:Object.assign(A,k),configuration:o,defaulted:Object.assign({},S),error:D,newAliases:Object.assign({},v)}}};function y(e){let t=[],n=Object.create(null),r=!0;for(Object.keys(e).forEach(function(n){t.push([].concat(e[n],n))});r;){r=!1;for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++)if(t[e].filter(function(e){return t[n].indexOf(e)!==-1}).length){t[e]=t[e].concat(t[n]),t.splice(n,1),r=!0;break}}return t.forEach(function(e){e=e.filter(function(e,t,n){return n.indexOf(e)===t});let t=e.pop();t!==void 0&&typeof t==`string`&&(n[t]=e)}),n}function b(e){return e===void 0?1:e+1}function x(e){return e===`__proto__`?`___proto___`:e}function ee(e){return typeof e==`string`&&(e[0]===`'`||e[0]===`"`)&&e[e.length-1]===e[0]?e.substring(1,e.length-1):e}const S=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):20,C=(process==null?void 0:process.versions)?.node??(process==null?void 0:process.version)?.slice(1);if(C&&Number(C.match(/^([^.]+)/)[1])<S)throw Error(`yargs parser supports a minimum Node.js version of ${S}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const w=process?process.env:{},T=d.createRequire?(0,d.createRequire)(require(`url`).pathToFileURL(__filename).href):void 0,E=new v({cwd:process.cwd,env:()=>w,format:i.format,normalize:n.normalize,resolve:n.resolve,require:e=>{if(T!==void 0)return T(e);if(e.match(/\.json$/))return JSON.parse((0,t.readFileSync)(e,`utf8`));throw Error(`only .json config files are supported in ESM`)}}),D=function(e,t){return E.parse(e.slice(),t).argv};D.detailed=function(e,t){return E.parse(e.slice(),t)},D.camelCase=f,D.decamelize=p,D.looksLikeNumber=m;const O=e=>typeof e==`object`&&!!e,k=e=>!(!O(e)||e instanceof RegExp||e instanceof Error||e instanceof Date||e instanceof Map||e instanceof Set||e instanceof WeakMap||e instanceof WeakSet||e instanceof Promise||e instanceof ArrayBuffer||e instanceof DataView||ArrayBuffer.isView(e)||globalThis.Blob&&e instanceof globalThis.Blob||typeof e.$$typeof==`symbol`||typeof e.asymmetricMatch==`function`),A=Symbol(`mapObjectSkip`),j=(e,t)=>{if(t){let t=Object.keys(e),n=Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t)?.enumerable);return[...t,...n]}return Object.keys(e)},M=(e,t,n,r=new WeakMap)=>{let{target:i={},...a}={deep:!1,includeSymbols:!1,...n};if(r.has(e))return r.get(e);r.set(e,i);let o=e=>e.map(e=>k(e)?M(e,t,a,r):e);if(Array.isArray(e))return o(e);for(let n of j(e,a.includeSymbols)){let s=e[n],c=t(n,s);if(c===A)continue;if(!Array.isArray(c))throw TypeError(`Mapper must return an array or mapObjectSkip, got ${c===null?`null`:typeof c}`);if(c.length<2)throw TypeError(`Mapper must return an array with at least 2 elements [key, value], got ${c.length} elements`);let[l,u,{shouldRecurse:d=!0}={}]=c;if(l!==`__proto__`){a.deep&&d&&k(u)&&(u=Array.isArray(u)?o(u):M(u,t,a,r));try{i[l]=u}catch(e){if(e.name===`TypeError`&&e.message.includes(`read only`))continue;throw e}}}return i};function N(e,t,n){if(!O(e))throw TypeError(`Expected an object, got \`${e}\` (${typeof e})`);if(Array.isArray(e))throw TypeError(`Expected an object, got an array`);return M(e,(n,r)=>t(n,r,e),n)}const P=/[\p{Lu}]/u,te=/[\p{Ll}]/u,F=/^[\p{Lu}](?![\p{Lu}])/u,I=/[_.\- ]+/,ne=/([\p{Alpha}\p{N}_]|$)/u,L=RegExp(`^`+I.source),re=new RegExp(I.source+ne.source,`gu`),ie=new RegExp(String.raw`\d+`+ne.source,`gu`),ae=(e,t,n,r)=>{let i=!1,a=!1,o=!1,s=!1;for(let c=0;c<e.length;c++){let l=e[c];s=c>2?e[c-3]===`-`:!0,i&&P.test(l)?(e=e.slice(0,c)+`-`+e.slice(c),i=!1,o=a,a=!0,c++):a&&o&&te.test(l)&&(!s||r)?(e=e.slice(0,c-1)+`-`+e.slice(c-1),o=a,a=!1,i=!0):(i=t(l)===l&&n(l)!==l,o=a,a=n(l)===l&&t(l)!==l)}return e},oe=(e,t)=>e.replace(F,e=>t(e)),se=(e,t,n)=>{let r=``,i=!1,a=!1,o=[...e];for(let e=0;e<o.length;e++){let s=o[e],c=P.test(s),l=e+1<o.length&&P.test(o[e+1]);i&&/[\p{Alpha}]/u.test(s)?(r+=s,i=!1,a=c):n&&c&&(a||l)?(r+=s,a=!0):/\d/.test(s)?(r+=s,i=!0,a=!1):I.test(s)?(r+=s,a=!1):(r+=t(s),i=!1,a=!1)}return r},R=(e,t,{capitalizeAfterNumber:n})=>{let r=n?(e,n,r,i)=>{let a=i.charAt(r+e.length);return I.test(a)?e:n?e.slice(0,-n.length)+t(n):e}:e=>e;return e.replaceAll(ie,r).replaceAll(re,(e,n)=>t(n))};function z(e,t){if(!(typeof e==`string`||Array.isArray(e)))throw TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,capitalizeAfterNumber:!0,...t},e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length>0).join(`-`):e.trim(),e.length===0)return``;let n=e.match(/^[_$]*/)[0];if(e=e.slice(n.length),e.length===0)return n;let r=t.locale===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t.locale),i=t.locale===!1?e=>e.toUpperCase():e=>e.toLocaleUpperCase(t.locale);return e.length===1?I.test(e)?n:n+(t.pascalCase?i(e):r(e)):(e!==r(e)&&(e=ae(e,r,i,t.preserveConsecutiveUppercase)),e=e.replace(L,``),e=t.capitalizeAfterNumber?t.preserveConsecutiveUppercase?oe(e,r):r(e):se(e,r,t.preserveConsecutiveUppercase),t.pascalCase&&e.length>0&&(e=i(e[0])+e.slice(1)),n+R(e,i,t))}let ce=class extends Map{#e=0;#t=new Map;#n=new Map;#r;#i;#a;constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge==`number`&&e.maxAge===0)throw TypeError("`maxAge` must be a number greater than 0");this.#r=e.maxSize,this.#i=e.maxAge||1/0,this.#a=e.onEviction}get __oldCache(){return this.#n}#o(e){if(typeof this.#a==`function`)for(let[t,n]of e)this.#a(t,n.value)}#s(e,t){return typeof t.expiry==`number`&&t.expiry<=Date.now()?(typeof this.#a==`function`&&this.#a(e,t.value),this.delete(e)):!1}#c(e,t){if(this.#s(e,t)===!1)return t.value}#l(e,t){return t.expiry?this.#c(e,t):t.value}#u(e,t){let n=t.get(e);return this.#l(e,n)}#d(e,t){this.#t.set(e,t),this.#e++,this.#e>=this.#r&&(this.#e=0,this.#o(this.#n),this.#n=this.#t,this.#t=new Map)}#f(e,t){this.#n.delete(e),this.#d(e,t)}*#p(){for(let e of this.#n){let[t,n]=e;this.#t.has(t)||this.#s(t,n)===!1&&(yield e)}for(let e of this.#t){let[t,n]=e;this.#s(t,n)===!1&&(yield e)}}get(e){if(this.#t.has(e)){let t=this.#t.get(e);return this.#l(e,t)}if(this.#n.has(e)){let t=this.#n.get(e);if(this.#s(e,t)===!1)return this.#f(e,t),t.value}}set(e,t,{maxAge:n=this.#i}={}){let r=typeof n==`number`&&n!==1/0?Date.now()+n:void 0;return this.#t.has(e)?this.#t.set(e,{value:t,expiry:r}):this.#d(e,{value:t,expiry:r}),this}has(e){return this.#t.has(e)?!this.#s(e,this.#t.get(e)):this.#n.has(e)?!this.#s(e,this.#n.get(e)):!1}peek(e){if(this.#t.has(e))return this.#u(e,this.#t);if(this.#n.has(e))return this.#u(e,this.#n)}expiresIn(e){let t=this.#t.get(e)??this.#n.get(e);if(t)return t.expiry?t.expiry-Date.now():1/0}delete(e){let t=this.#t.delete(e);return t&&this.#e--,this.#n.delete(e)||t}clear(){this.#t.clear(),this.#n.clear(),this.#e=0}resize(e){if(!(e&&e>0))throw TypeError("`maxSize` must be a number greater than 0");let t=[...this.#p()],n=t.length-e;n<0?(this.#t=new Map(t),this.#n=new Map,this.#e=t.length):(n>0&&this.#o(t.slice(0,n)),this.#n=new Map(t.slice(n)),this.#t=new Map,this.#e=0),this.#r=e}evict(e=1){let t=Number(e);if(!t||t<=0)return;let n=[...this.#p()],r=Math.trunc(Math.min(t,Math.max(n.length-1,0)));r<=0||(this.#o(n.slice(0,r)),this.#n=new Map(n.slice(r)),this.#t=new Map,this.#e=0)}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.#t){let[t,n]=e;this.#s(t,n)===!1&&(yield[t,n.value])}for(let e of this.#n){let[t,n]=e;this.#t.has(t)||this.#s(t,n)===!1&&(yield[t,n.value])}}*entriesDescending(){let e=[...this.#t];for(let t=e.length-1;t>=0;--t){let[n,r]=e[t];this.#s(n,r)===!1&&(yield[n,r.value])}e=[...this.#n];for(let t=e.length-1;t>=0;--t){let[n,r]=e[t];this.#t.has(n)||this.#s(n,r)===!1&&(yield[n,r.value])}}*entriesAscending(){for(let[e,t]of this.#p())yield[e,t.value]}get size(){if(!this.#e)return this.#n.size;let e=0;for(let t of this.#n.keys())this.#t.has(t)||e++;return Math.min(this.#e+e,this.#r)}get maxSize(){return this.#r}get maxAge(){return this.#i}entries(){return this.entriesAscending()}forEach(e,t=this){for(let[n,r]of this.entriesAscending())e.call(t,r,n,this)}get[Symbol.toStringTag](){return`QuickLRU`}toString(){return`QuickLRU(${this.size}/${this.maxSize})`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}};const B=(e,t)=>e.some(e=>typeof e==`string`?e===t:(e.lastIndex=0,e.test(t))),le=e=>e.trim()!==``&&!Number.isNaN(Number(e)),V=new ce({maxSize:1e5}),ue=e=>ArrayBuffer.isView(e)||e instanceof Date||e instanceof RegExp||e instanceof Error||e instanceof Map||e instanceof Set||e instanceof WeakMap||e instanceof WeakSet||e instanceof Promise,H=e=>typeof e==`object`&&!!e&&!ue(e),U=(e,t={},n=new WeakMap,r)=>{if(!H(e))return e;if(n.has(e))return n.get(e);let{exclude:i,pascalCase:a=!1,stopPaths:o,deep:s=!1,preserveConsecutiveUppercase:c=!1}=t,l=new Set(o);if(Array.isArray(e)){let i=[];n.set(e,i);for(let a of e)i.push(H(a)?U(a,t,n,r):a);return i}let u={};n.set(e,u);let d=N(e,(e=>(r,o)=>{if(s&&H(o)){let i=e===void 0?r:`${e}.${r}`;l.has(i)||(o=Array.isArray(o)?o.map(e=>H(e)?U(e,t,n,i):e):U(o,t,n,i))}if(typeof r==`string`&&!le(r)&&!(i&&B(i,r))){let e=a?`${r}_`:r;V.has(e)?r=V.get(e):(r=z(r,{pascalCase:a,locale:!1,preserveConsecutiveUppercase:c}),r.length<100&&V.set(e,r))}return[r,o]})(r),{deep:!1});Object.assign(u,d);let f=Object.getOwnPropertySymbols(e);for(let i of f)u[i]=s&&H(e[i])?U(e[i],t,n,r):e[i];return u};function W(e,t){let n=new WeakMap;return Array.isArray(e)?e.map(e=>H(e)?U(e,t,n,void 0):e):U(e,t,n)}function de(e){let t=0,n=e.length;for(;t<n&&(e[t]===`\r`||e[t]===`
`);)t++;for(;n>t&&(e[n-1]===`\r`||e[n-1]===`
`);)n--;return t>0||n<e.length?e.slice(t,n):e}function fe(e){let t=e.match(/^[ \t]*(?=\S)/gm);if(!t)return e;let n=1/0;for(let e of t)n=Math.min(n,e.length);return n===0||n===1/0?e:e.replace(RegExp(`^[ \\t]{${n}}`,`gm`),``)}function G(e,t=1,n={}){let{indent:r=` `,includeEmptyLines:i=!1}=n;if(typeof e!=`string`)throw TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!=`number`)throw TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if(typeof r!=`string`)throw TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r}\``);if(t===0)return e;let a=i?/^/gm:/^(?!\s*$)/gm;return e.replace(a,r.repeat(t))}function pe(e,t=0,n={}){return G(fe(e),t,n)}const me=e=>e instanceof URL?(0,u.fileURLToPath)(e):e;function he(e,{cwd:t=l.default.cwd(),type:n=`file`,stopAt:r}={}){let i=c.default.resolve(me(t)??``),{root:a}=c.default.parse(i);r=c.default.resolve(i,me(r)??a);let o=c.default.isAbsolute(e);for(;i;){let t=o?e:c.default.join(i,e);try{let e=s.default.statSync(t,{throwIfNoEntry:!1});if(n===`file`&&e?.isFile()||n===`directory`&&e?.isDirectory())return t}catch{}if(i===r||i===a)break;i=c.default.dirname(i)}}function ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var K={},q={exports:{}},_e;function ve(){if(_e)return q.exports;_e=1;let e=process||{},t=e.argv||[],n=e.env||{},r=!(n.NO_COLOR||t.includes(`--no-color`))&&(!!n.FORCE_COLOR||t.includes(`--color`)||e.platform===`win32`||(e.stdout||{}).isTTY&&n.TERM!==`dumb`||!!n.CI),i=(e,t,n=e)=>r=>{let i=``+r,o=i.indexOf(t,e.length);return~o?e+a(i,t,n,o)+t:e+i+t},a=(e,t,n,r)=>{let i=``,a=0;do i+=e.substring(a,r)+n,a=r+t.length,r=e.indexOf(t,a);while(~r);return i+e.substring(a)},o=(e=r)=>{let t=e?i:()=>String;return{isColorSupported:e,reset:t(`\x1B[0m`,`\x1B[0m`),bold:t(`\x1B[1m`,`\x1B[22m`,`\x1B[22m\x1B[1m`),dim:t(`\x1B[2m`,`\x1B[22m`,`\x1B[22m\x1B[2m`),italic:t(`\x1B[3m`,`\x1B[23m`),underline:t(`\x1B[4m`,`\x1B[24m`),inverse:t(`\x1B[7m`,`\x1B[27m`),hidden:t(`\x1B[8m`,`\x1B[28m`),strikethrough:t(`\x1B[9m`,`\x1B[29m`),black:t(`\x1B[30m`,`\x1B[39m`),red:t(`\x1B[31m`,`\x1B[39m`),green:t(`\x1B[32m`,`\x1B[39m`),yellow:t(`\x1B[33m`,`\x1B[39m`),blue:t(`\x1B[34m`,`\x1B[39m`),magenta:t(`\x1B[35m`,`\x1B[39m`),cyan:t(`\x1B[36m`,`\x1B[39m`),white:t(`\x1B[37m`,`\x1B[39m`),gray:t(`\x1B[90m`,`\x1B[39m`),bgBlack:t(`\x1B[40m`,`\x1B[49m`),bgRed:t(`\x1B[41m`,`\x1B[49m`),bgGreen:t(`\x1B[42m`,`\x1B[49m`),bgYellow:t(`\x1B[43m`,`\x1B[49m`),bgBlue:t(`\x1B[44m`,`\x1B[49m`),bgMagenta:t(`\x1B[45m`,`\x1B[49m`),bgCyan:t(`\x1B[46m`,`\x1B[49m`),bgWhite:t(`\x1B[47m`,`\x1B[49m`),blackBright:t(`\x1B[90m`,`\x1B[39m`),redBright:t(`\x1B[91m`,`\x1B[39m`),greenBright:t(`\x1B[92m`,`\x1B[39m`),yellowBright:t(`\x1B[93m`,`\x1B[39m`),blueBright:t(`\x1B[94m`,`\x1B[39m`),magentaBright:t(`\x1B[95m`,`\x1B[39m`),cyanBright:t(`\x1B[96m`,`\x1B[39m`),whiteBright:t(`\x1B[97m`,`\x1B[39m`),bgBlackBright:t(`\x1B[100m`,`\x1B[49m`),bgRedBright:t(`\x1B[101m`,`\x1B[49m`),bgGreenBright:t(`\x1B[102m`,`\x1B[49m`),bgYellowBright:t(`\x1B[103m`,`\x1B[49m`),bgBlueBright:t(`\x1B[104m`,`\x1B[49m`),bgMagentaBright:t(`\x1B[105m`,`\x1B[49m`),bgCyanBright:t(`\x1B[106m`,`\x1B[49m`),bgWhiteBright:t(`\x1B[107m`,`\x1B[49m`)}};return q.exports=o(),q.exports.createColors=o,q.exports}var J={},ye;function be(){return ye?J:(ye=1,Object.defineProperty(J,`__esModule`,{value:!0}),J.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,J.matchToToken=function(e){var t={type:`invalid`,value:e[0],closed:void 0};return e[1]?(t.type=`string`,t.closed=!!(e[3]||e[4])):e[5]?t.type=`comment`:e[6]?(t.type=`comment`,t.closed=!!e[7]):e[8]?t.type=`regex`:e[9]?t.type=`number`:e[10]?t.type=`name`:e[11]?t.type=`punctuator`:e[12]&&(t.type=`whitespace`),t},J)}var xe={},Y={},Se;function Ce(){if(Se)return Y;Se=1,Object.defineProperty(Y,`__esModule`,{value:!0}),Y.isIdentifierChar=c,Y.isIdentifierName=l,Y.isIdentifierStart=s;let e=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,t=`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`,n=RegExp(`[`+e+`]`),r=RegExp(`[`+e+t+`]`);e=t=null;let i=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],a=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];function o(e,t){let n=65536;for(let r=0,i=t.length;r<i;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function s(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&n.test(String.fromCharCode(e)):o(e,i)}function c(e){return e<48?e===36:e<58?!0:e<65?!1:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&r.test(String.fromCharCode(e)):o(e,i)||o(e,a)}function l(e){let t=!0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if((r&64512)==55296&&n+1<e.length){let t=e.charCodeAt(++n);(t&64512)==56320&&(r=65536+((r&1023)<<10)+(t&1023))}if(t){if(t=!1,!s(r))return!1}else if(!c(r))return!1}return!t}return Y}var X={},we;function Te(){if(we)return X;we=1,Object.defineProperty(X,`__esModule`,{value:!0}),X.isKeyword=c,X.isReservedWord=i,X.isStrictBindOnlyReservedWord=o,X.isStrictBindReservedWord=s,X.isStrictReservedWord=a;let e={keyword:`break.case.catch.continue.debugger.default.do.else.finally.for.function.if.return.switch.throw.try.var.const.while.with.new.this.super.class.extends.export.import.null.true.false.in.instanceof.typeof.void.delete`.split(`.`),strict:[`implements`,`interface`,`let`,`package`,`private`,`protected`,`public`,`static`,`yield`],strictBind:[`eval`,`arguments`]},t=new Set(e.keyword),n=new Set(e.strict),r=new Set(e.strictBind);function i(e,t){return t&&e===`await`||e===`enum`}function a(e,t){return i(e,t)||n.has(e)}function o(e){return r.has(e)}function s(e,t){return a(e,t)||o(e)}function c(e){return t.has(e)}return X}var Ee;function De(){return Ee?xe:(Ee=1,(function(e){Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`isIdentifierChar`,{enumerable:!0,get:function(){return t.isIdentifierChar}}),Object.defineProperty(e,`isIdentifierName`,{enumerable:!0,get:function(){return t.isIdentifierName}}),Object.defineProperty(e,`isIdentifierStart`,{enumerable:!0,get:function(){return t.isIdentifierStart}}),Object.defineProperty(e,`isKeyword`,{enumerable:!0,get:function(){return n.isKeyword}}),Object.defineProperty(e,`isReservedWord`,{enumerable:!0,get:function(){return n.isReservedWord}}),Object.defineProperty(e,`isStrictBindOnlyReservedWord`,{enumerable:!0,get:function(){return n.isStrictBindOnlyReservedWord}}),Object.defineProperty(e,`isStrictBindReservedWord`,{enumerable:!0,get:function(){return n.isStrictBindReservedWord}}),Object.defineProperty(e,`isStrictReservedWord`,{enumerable:!0,get:function(){return n.isStrictReservedWord}});var t=Ce(),n=Te()})(xe),xe)}var Oe;function ke(){if(Oe)return K;Oe=1,Object.defineProperty(K,`__esModule`,{value:!0});var e=ve(),t=be(),n=De();function r(){return typeof process==`object`&&(process.env.FORCE_COLOR===`0`||process.env.FORCE_COLOR===`false`)?!1:e.isColorSupported}let i=(e,t)=>n=>e(t(n));function a(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.gray,invalid:i(i(e.white,e.bgRed),e.bold),gutter:e.gray,marker:i(e.red,e.bold),message:i(e.red,e.bold),reset:e.reset}}let o=a(e.createColors(!0)),s=a(e.createColors(!1));function c(e){return e?o:s}let l=new Set([`as`,`async`,`from`,`get`,`of`,`set`]),u=/\r\n|[\n\r\u2028\u2029]/,d=/^[()[\]{}]$/,f;{let e=/^[a-z][\w-]*$/i,r=function(t,r,i){if(t.type===`name`){if(n.isKeyword(t.value)||n.isStrictReservedWord(t.value,!0)||l.has(t.value))return`keyword`;if(e.test(t.value)&&(i[r-1]===`<`||i.slice(r-2,r)===`</`))return`jsxIdentifier`;if(t.value[0]!==t.value[0].toLowerCase())return`capitalized`}return t.type===`punctuator`&&d.test(t.value)?`bracket`:t.type===`invalid`&&(t.value===`@`||t.value===`#`)?`punctuator`:t.type};f=function*(e){let n;for(;n=t.default.exec(e);){let i=t.matchToToken(n);yield{type:r(i,n.index,e),value:i.value}}}}function p(e){if(e===``)return``;let t=c(!0),n=``;for(let{type:r,value:i}of f(e))r in t?n+=i.split(u).map(e=>t[r](e)).join(`
`):n+=i;return n}let m=!1,h=/\r\n|[\n\r\u2028\u2029]/;function g(e,t,n){let r=Object.assign({column:0,line:-1},e.start),i=Object.assign({},r,e.end),{linesAbove:a=2,linesBelow:o=3}=n||{},s=r.line,c=r.column,l=i.line,u=i.column,d=Math.max(s-(a+1),0),f=Math.min(t.length,l+o);s===-1&&(d=0),l===-1&&(f=t.length);let p=l-s,m={};if(p)for(let e=0;e<=p;e++){let n=e+s;c?e===0?m[n]=[c,t[n-1].length-c+1]:e===p?m[n]=[0,u]:m[n]=[0,t[n-e].length]:m[n]=!0}else c===u?c?m[s]=[c,0]:m[s]=!0:m[s]=[c,u-c];return{start:d,end:f,markerLines:m}}function _(e,t,n={}){let i=n.forceColor||r()&&n.highlightCode,a=c(i),{start:o,end:s,markerLines:l}=g(t,e.split(h),n),u=t.start&&typeof t.start.column==`number`,d=String(s).length,f=(i?p(e):e).split(h,s).slice(o,s).map((e,t)=>{let r=o+1+t,i=` ${` ${r}`.slice(-d)} |`,s=l[r],c=!l[r+1];if(s){let t=``;if(Array.isArray(s)){let r=e.slice(0,Math.max(s[0]-1,0)).replace(/[^\t]/g,` `),o=s[1]||1;t=[`
 `,a.gutter(i.replace(/\d/g,` `)),` `,r,a.marker(`^`).repeat(o)].join(``),c&&n.message&&(t+=` `+a.message(n.message))}return[a.marker(`>`),a.gutter(i),e.length>0?` ${e}`:``,t].join(``)}else return` ${a.gutter(i)}${e.length>0?` ${e}`:``}`}).join(`
`);return n.message&&!u&&(f=`${` `.repeat(d+1)}${n.message}\n${f}`),i?a.reset(f):f}function v(e,t,n,r={}){if(!m){m=!0;let e="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(e,`DeprecationWarning`);else{let t=Error(e);t.name=`DeprecationWarning`,console.warn(Error(e))}}return n=Math.max(n,0),_(e,{start:{column:n,line:t}},r)}return K.codeFrameColumns=_,K.default=v,K.highlight=p,K}var Ae=ke();const je=({oneBased:e,oneBasedLine:t=e,oneBasedColumn:n=e}={})=>[+!!t,+!!n];function Me(e,t,n){let r=t===0?-1:e.lastIndexOf(`
`,t-1),[i,a]=je(n);return{line:r===-1?i:e.slice(0,r+1).match(/\n/g).length+i,column:t-r-1+a}}function Ne(e,t,n){if(typeof e!=`string`)throw TypeError(`Text parameter should be a string`);if(!Number.isInteger(t))throw TypeError(`Index parameter should be an integer`);if(t<0||t>e.length)throw RangeError(`Index out of bounds`);return Me(e,t,n)}const Pe=e=>`\\u{${e.codePointAt(0).toString(16)}}`;var Fe=class e extends Error{name=`JSONError`;fileName;#e;#t;#n;#r;#i;constructor(t){if(typeof t==`string`)super(),this.#n=t;else{let{jsonParseError:e,fileName:n,input:r}=t;super(void 0,{cause:e}),this.#e=r,this.#t=e,this.fileName=n}Error.captureStackTrace?.(this,e)}get message(){this.#n??=`${Le(this.#t.message)}${this.#e===``?` while parsing empty string`:``}`;let{codeFrame:e}=this;return`${this.#n}${this.fileName?` in ${this.fileName}`:``}${e?`\n\n${e}\n`:``}`}set message(e){this.#n=e}#a(e){if(!this.#t)return;let t=this.#e,n=Ie(t,this.#t.message);if(n)return Ae.codeFrameColumns(t,{start:n},{highlightCode:e})}get codeFrame(){return this.#r??=this.#a(!0),this.#r}get rawCodeFrame(){return this.#i??=this.#a(!1),this.#i}};const Ie=(e,t)=>{let n=t.match(/in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))?$/);if(!n)return;let{index:r,line:i,column:a}=n.groups;return i&&a?{line:Number(i),column:Number(a)}:Ne(e,Number(r),{oneBased:!0})},Le=e=>e.replace(/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,(e,t,n)=>`"${n}"(${Pe(n)})`);function Re(e,t,n){try{return JSON.parse(e,t)}catch(t){throw new Fe({jsonParseError:t,fileName:n,input:e})}}var ze,Be;function Ve(){return Be?ze:(Be=1,ze=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{},ze)}var He,Ue;function We(){return Ue?He:(Ue=1,He={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},He)}var Z={exports:{}},Ge;function Ke(){return Ge?Z.exports:(Ge=1,(function(e,t){let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=We(),a=Ve();t=e.exports={};let o=t.re=[],s=t.safeRe=[],c=t.src=[],l=t.safeSrc=[],u=t.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),t.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})(Z,Z.exports),Z.exports)}var qe,Je;function Ye(){if(Je)return qe;Je=1;let e=Object.freeze({loose:!0}),t=Object.freeze({});return qe=n=>n?typeof n==`object`?n:e:t,qe}var Xe,Ze;function Qe(){if(Ze)return Xe;Ze=1;let e=/^[0-9]+$/,t=(t,n)=>{let r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:t<n?-1:1};return Xe={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)},Xe}var $e,et;function tt(){if(et)return $e;et=1;let e=Ve(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=We(),{safeRe:r,t:i}=Ke(),a=Ye(),{compareIdentifiers:o}=Qe();class s{constructor(o,c){if(c=a(c),o instanceof s){if(o.loose===!!c.loose&&o.includePrerelease===!!c.includePrerelease)return o;o=o.version}else if(typeof o!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof o}".`);if(o.length>t)throw TypeError(`version is longer than ${t} characters`);e(`SemVer`,o,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=o.trim().match(c.loose?r[i.LOOSE]:r[i.FULL]);if(!l)throw TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>n||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>n||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>n||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<n)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(e(`SemVer.compare`,this.version,this.options,t),!(t instanceof s)){if(typeof t==`string`&&t===this.version)return 0;t=new s(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof s||(e=new s(e,this.options)),o(this.major,e.major)||o(this.minor,e.minor)||o(this.patch,e.patch)}comparePre(t){if(t instanceof s||(t=new s(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let r=this.prerelease[n],i=t.prerelease[n];if(e(`prerelease compare`,n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return o(r,i)}while(++n)}compareBuild(t){t instanceof s||(t=new s(t,this.options));let n=0;do{let r=this.build[n],i=t.build[n];if(e(`build compare`,n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return o(r,i)}while(++n)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?r[i.PRERELEASELOOSE]:r[i.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),o(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}return $e=s,$e}var nt,rt;function it(){if(rt)return nt;rt=1;let e=tt();return nt=(t,n,r=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(e){if(!r)return null;throw e}},nt}var at,ot;function st(){if(ot)return at;ot=1;let e=it();return at=(t,n)=>{let r=e(t,n);return r?r.version:null},at}var ct,lt;function ut(){if(lt)return ct;lt=1;let e=it();return ct=(t,n)=>{let r=e(t.trim().replace(/^[=v]+/,``),n);return r?r.version:null},ct}const dt=`0BSD,3D-Slicer-1.0,AAL,ADSL,AFL-1.1,AFL-1.2,AFL-2.0,AFL-2.1,AFL-3.0,AGPL-1.0-only,AGPL-1.0-or-later,AGPL-3.0-only,AGPL-3.0-or-later,AMD-newlib,AMDPLPA,AML,AML-glslang,AMPAS,ANTLR-PD,ANTLR-PD-fallback,APAFML,APL-1.0,APSL-1.0,APSL-1.1,APSL-1.2,APSL-2.0,ASWF-Digital-Assets-1.0,ASWF-Digital-Assets-1.1,Abstyles,AdaCore-doc,Adobe-2006,Adobe-Display-PostScript,Adobe-Glyph,Adobe-Utopia,Afmparse,Aladdin,Apache-1.0,Apache-1.1,Apache-2.0,App-s2p,Arphic-1999,Artistic-1.0,Artistic-1.0-Perl,Artistic-1.0-cl8,Artistic-2.0,Artistic-dist,Aspell-RU,BSD-1-Clause,BSD-2-Clause,BSD-2-Clause-Darwin,BSD-2-Clause-Patent,BSD-2-Clause-Views,BSD-2-Clause-first-lines,BSD-2-Clause-pkgconf-disclaimer,BSD-3-Clause,BSD-3-Clause-Attribution,BSD-3-Clause-Clear,BSD-3-Clause-HP,BSD-3-Clause-LBNL,BSD-3-Clause-Modification,BSD-3-Clause-No-Military-License,BSD-3-Clause-No-Nuclear-License,BSD-3-Clause-No-Nuclear-License-2014,BSD-3-Clause-No-Nuclear-Warranty,BSD-3-Clause-Open-MPI,BSD-3-Clause-Sun,BSD-3-Clause-acpica,BSD-3-Clause-flex,BSD-4-Clause,BSD-4-Clause-Shortened,BSD-4-Clause-UC,BSD-4.3RENO,BSD-4.3TAHOE,BSD-Advertising-Acknowledgement,BSD-Attribution-HPND-disclaimer,BSD-Inferno-Nettverk,BSD-Protection,BSD-Source-Code,BSD-Source-beginning-file,BSD-Systemics,BSD-Systemics-W3Works,BSL-1.0,BUSL-1.1,Baekmuk,Bahyph,Barr,Beerware,BitTorrent-1.0,BitTorrent-1.1,Bitstream-Charter,Bitstream-Vera,BlueOak-1.0.0,Boehm-GC,Boehm-GC-without-fee,Borceux,Brian-Gladman-2-Clause,Brian-Gladman-3-Clause,C-UDA-1.0,CAL-1.0,CAL-1.0-Combined-Work-Exception,CATOSL-1.1,CC-BY-1.0,CC-BY-2.0,CC-BY-2.5,CC-BY-2.5-AU,CC-BY-3.0,CC-BY-3.0-AT,CC-BY-3.0-AU,CC-BY-3.0-DE,CC-BY-3.0-IGO,CC-BY-3.0-NL,CC-BY-3.0-US,CC-BY-4.0,CC-BY-NC-1.0,CC-BY-NC-2.0,CC-BY-NC-2.5,CC-BY-NC-3.0,CC-BY-NC-3.0-DE,CC-BY-NC-4.0,CC-BY-NC-ND-1.0,CC-BY-NC-ND-2.0,CC-BY-NC-ND-2.5,CC-BY-NC-ND-3.0,CC-BY-NC-ND-3.0-DE,CC-BY-NC-ND-3.0-IGO,CC-BY-NC-ND-4.0,CC-BY-NC-SA-1.0,CC-BY-NC-SA-2.0,CC-BY-NC-SA-2.0-DE,CC-BY-NC-SA-2.0-FR,CC-BY-NC-SA-2.0-UK,CC-BY-NC-SA-2.5,CC-BY-NC-SA-3.0,CC-BY-NC-SA-3.0-DE,CC-BY-NC-SA-3.0-IGO,CC-BY-NC-SA-4.0,CC-BY-ND-1.0,CC-BY-ND-2.0,CC-BY-ND-2.5,CC-BY-ND-3.0,CC-BY-ND-3.0-DE,CC-BY-ND-4.0,CC-BY-SA-1.0,CC-BY-SA-2.0,CC-BY-SA-2.0-UK,CC-BY-SA-2.1-JP,CC-BY-SA-2.5,CC-BY-SA-3.0,CC-BY-SA-3.0-AT,CC-BY-SA-3.0-DE,CC-BY-SA-3.0-IGO,CC-BY-SA-4.0,CC-PDDC,CC-PDM-1.0,CC-SA-1.0,CC0-1.0,CDDL-1.0,CDDL-1.1,CDL-1.0,CDLA-Permissive-1.0,CDLA-Permissive-2.0,CDLA-Sharing-1.0,CECILL-1.0,CECILL-1.1,CECILL-2.0,CECILL-2.1,CECILL-B,CECILL-C,CERN-OHL-1.1,CERN-OHL-1.2,CERN-OHL-P-2.0,CERN-OHL-S-2.0,CERN-OHL-W-2.0,CFITSIO,CMU-Mach,CMU-Mach-nodoc,CNRI-Jython,CNRI-Python,CNRI-Python-GPL-Compatible,COIL-1.0,CPAL-1.0,CPL-1.0,CPOL-1.02,CUA-OPL-1.0,Caldera,Caldera-no-preamble,Catharon,ClArtistic,Clips,Community-Spec-1.0,Condor-1.1,Cornell-Lossless-JPEG,Cronyx,Crossword,CryptoSwift,CrystalStacker,Cube,D-FSL-1.0,DEC-3-Clause,DL-DE-BY-2.0,DL-DE-ZERO-2.0,DOC,DRL-1.0,DRL-1.1,DSDP,DocBook-DTD,DocBook-Schema,DocBook-Stylesheet,DocBook-XML,Dotseqn,ECL-1.0,ECL-2.0,EFL-1.0,EFL-2.0,EPICS,EPL-1.0,EPL-2.0,EUDatagrid,EUPL-1.0,EUPL-1.1,EUPL-1.2,Elastic-2.0,Entessa,ErlPL-1.1,Eurosym,FBM,FDK-AAC,FSFAP,FSFAP-no-warranty-disclaimer,FSFUL,FSFULLR,FSFULLRSD,FSFULLRWD,FSL-1.1-ALv2,FSL-1.1-MIT,FTL,Fair,Ferguson-Twofish,Frameworx-1.0,FreeBSD-DOC,FreeImage,Furuseth,GCR-docs,GD,GFDL-1.1-invariants-only,GFDL-1.1-invariants-or-later,GFDL-1.1-no-invariants-only,GFDL-1.1-no-invariants-or-later,GFDL-1.1-only,GFDL-1.1-or-later,GFDL-1.2-invariants-only,GFDL-1.2-invariants-or-later,GFDL-1.2-no-invariants-only,GFDL-1.2-no-invariants-or-later,GFDL-1.2-only,GFDL-1.2-or-later,GFDL-1.3-invariants-only,GFDL-1.3-invariants-or-later,GFDL-1.3-no-invariants-only,GFDL-1.3-no-invariants-or-later,GFDL-1.3-only,GFDL-1.3-or-later,GL2PS,GLWTPL,GPL-1.0-only,GPL-1.0-or-later,GPL-2.0-only,GPL-2.0-or-later,GPL-3.0-only,GPL-3.0-or-later,Game-Programming-Gems,Giftware,Glide,Glulxe,Graphics-Gems,Gutmann,HDF5,HIDAPI,HP-1986,HP-1989,HPND,HPND-DEC,HPND-Fenneberg-Livingston,HPND-INRIA-IMAG,HPND-Intel,HPND-Kevlin-Henney,HPND-MIT-disclaimer,HPND-Markus-Kuhn,HPND-Netrek,HPND-Pbmplus,HPND-UC,HPND-UC-export-US,HPND-doc,HPND-doc-sell,HPND-export-US,HPND-export-US-acknowledgement,HPND-export-US-modify,HPND-export2-US,HPND-merchantability-variant,HPND-sell-MIT-disclaimer-xserver,HPND-sell-regexpr,HPND-sell-variant,HPND-sell-variant-MIT-disclaimer,HPND-sell-variant-MIT-disclaimer-rev,HTMLTIDY,HaskellReport,Hippocratic-2.1,IBM-pibs,ICU,IEC-Code-Components-EULA,IJG,IJG-short,IPA,IPL-1.0,ISC,ISC-Veillard,ImageMagick,Imlib2,Info-ZIP,Inner-Net-2.0,InnoSetup,Intel,Intel-ACPI,Interbase-1.0,JPL-image,JPNIC,JSON,Jam,JasPer-2.0,Kastrup,Kazlib,Knuth-CTAN,LAL-1.2,LAL-1.3,LGPL-2.0-only,LGPL-2.0-or-later,LGPL-2.1-only,LGPL-2.1-or-later,LGPL-3.0-only,LGPL-3.0-or-later,LGPLLR,LOOP,LPD-document,LPL-1.0,LPL-1.02,LPPL-1.0,LPPL-1.1,LPPL-1.2,LPPL-1.3a,LPPL-1.3c,LZMA-SDK-9.11-to-9.20,LZMA-SDK-9.22,Latex2e,Latex2e-translated-notice,Leptonica,LiLiQ-P-1.1,LiLiQ-R-1.1,LiLiQ-Rplus-1.1,Libpng,Linux-OpenIB,Linux-man-pages-1-para,Linux-man-pages-copyleft,Linux-man-pages-copyleft-2-para,Linux-man-pages-copyleft-var,Lucida-Bitmap-Fonts,MIPS,MIT,MIT-0,MIT-CMU,MIT-Click,MIT-Festival,MIT-Khronos-old,MIT-Modern-Variant,MIT-Wu,MIT-advertising,MIT-enna,MIT-feh,MIT-open-group,MIT-testregex,MITNFA,MMIXware,MPEG-SSG,MPL-1.0,MPL-1.1,MPL-2.0,MPL-2.0-no-copyleft-exception,MS-LPL,MS-PL,MS-RL,MTLL,Mackerras-3-Clause,Mackerras-3-Clause-acknowledgment,MakeIndex,Martin-Birgmeier,McPhee-slideshow,Minpack,MirOS,Motosoto,MulanPSL-1.0,MulanPSL-2.0,Multics,Mup,NAIST-2003,NASA-1.3,NBPL-1.0,NCBI-PD,NCGL-UK-2.0,NCL,NCSA,NGPL,NICTA-1.0,NIST-PD,NIST-PD-fallback,NIST-Software,NLOD-1.0,NLOD-2.0,NLPL,NOSL,NPL-1.0,NPL-1.1,NPOSL-3.0,NRL,NTIA-PD,NTP,NTP-0,Naumen,NetCDF,Newsletr,Nokia,Noweb,O-UDA-1.0,OAR,OCCT-PL,OCLC-2.0,ODC-By-1.0,ODbL-1.0,OFFIS,OFL-1.0,OFL-1.0-RFN,OFL-1.0-no-RFN,OFL-1.1,OFL-1.1-RFN,OFL-1.1-no-RFN,OGC-1.0,OGDL-Taiwan-1.0,OGL-Canada-2.0,OGL-UK-1.0,OGL-UK-2.0,OGL-UK-3.0,OGTSL,OLDAP-1.1,OLDAP-1.2,OLDAP-1.3,OLDAP-1.4,OLDAP-2.0,OLDAP-2.0.1,OLDAP-2.1,OLDAP-2.2,OLDAP-2.2.1,OLDAP-2.2.2,OLDAP-2.3,OLDAP-2.4,OLDAP-2.5,OLDAP-2.6,OLDAP-2.7,OLDAP-2.8,OLFL-1.3,OML,OPL-1.0,OPL-UK-3.0,OPUBL-1.0,OSET-PL-2.1,OSL-1.0,OSL-1.1,OSL-2.0,OSL-2.1,OSL-3.0,OpenPBS-2.3,OpenSSL,OpenSSL-standalone,OpenVision,PADL,PDDL-1.0,PHP-3.0,PHP-3.01,PPL,PSF-2.0,Parity-6.0.0,Parity-7.0.0,Pixar,Plexus,PolyForm-Noncommercial-1.0.0,PolyForm-Small-Business-1.0.0,PostgreSQL,Python-2.0,Python-2.0.1,QPL-1.0,QPL-1.0-INRIA-2004,Qhull,RHeCos-1.1,RPL-1.1,RPL-1.5,RPSL-1.0,RSA-MD,RSCPL,Rdisc,Ruby,Ruby-pty,SAX-PD,SAX-PD-2.0,SCEA,SGI-B-1.0,SGI-B-1.1,SGI-B-2.0,SGI-OpenGL,SGP4,SHL-0.5,SHL-0.51,SISSL,SISSL-1.2,SL,SMAIL-GPL,SMLNJ,SMPPL,SNIA,SOFA,SPL-1.0,SSH-OpenSSH,SSH-short,SSLeay-standalone,SSPL-1.0,SUL-1.0,SWL,Saxpath,SchemeReport,Sendmail,Sendmail-8.23,Sendmail-Open-Source-1.1,SimPL-2.0,Sleepycat,Soundex,Spencer-86,Spencer-94,Spencer-99,SugarCRM-1.1.3,Sun-PPP,Sun-PPP-2000,SunPro,Symlinks,TAPR-OHL-1.0,TCL,TCP-wrappers,TGPPL-1.0,TMate,TORQUE-1.1,TOSL,TPDL,TPL-1.0,TTWL,TTYP0,TU-Berlin-1.0,TU-Berlin-2.0,TermReadKey,ThirdEye,TrustedQSL,UCAR,UCL-1.0,UMich-Merit,UPL-1.0,URT-RLE,Ubuntu-font-1.0,Unicode-3.0,Unicode-DFS-2015,Unicode-DFS-2016,Unicode-TOU,UnixCrypt,Unlicense,Unlicense-libtelnet,Unlicense-libwhirlpool,VOSTROM,VSL-1.0,Vim,W3C,W3C-19980720,W3C-20150513,WTFPL,Watcom-1.0,Widget-Workshop,Wsuipa,X11,X11-distribute-modifications-variant,X11-swapped,XFree86-1.1,XSkat,Xdebug-1.03,Xerox,Xfig,Xnet,YPL-1.0,YPL-1.1,ZPL-1.1,ZPL-2.0,ZPL-2.1,Zed,Zeeff,Zend-2.0,Zimbra-1.3,Zimbra-1.4,Zlib,any-OSI,any-OSI-perl-modules,bcrypt-Solar-Designer,blessing,bzip2-1.0.6,check-cvs,checkmk,copyleft-next-0.3.0,copyleft-next-0.3.1,curl,cve-tou,diffmark,dtoa,dvipdfm,eGenix,etalab-2.0,fwlw,gSOAP-1.3b,generic-xts,gnuplot,gtkbook,hdparm,iMatix,jove,libpng-1.6.35,libpng-2.0,libselinux-1.0,libtiff,libutil-David-Nugent,lsof,magaz,mailprio,man2html,metamail,mpi-permissive,mpich2,mplus,ngrep,pkgconf,pnmstitch,psfrag,psutils,python-ldap,radvd,snprintf,softSurfer,ssh-keyscan,swrule,threeparttable,ulem,w3m,wwl,xinetd,xkeyboard-config-Zinoviev,xlock,xpp,xzoom,zlib-acknowledgement`.split(`,`),ft=`AGPL-1.0,AGPL-3.0,BSD-2-Clause-FreeBSD,BSD-2-Clause-NetBSD,GFDL-1.1,GFDL-1.2,GFDL-1.3,GPL-1.0,GPL-2.0,GPL-2.0-with-GCC-exception,GPL-2.0-with-autoconf-exception,GPL-2.0-with-bison-exception,GPL-2.0-with-classpath-exception,GPL-2.0-with-font-exception,GPL-3.0,GPL-3.0-with-GCC-exception,GPL-3.0-with-autoconf-exception,LGPL-2.0,LGPL-2.1,LGPL-3.0,Net-SNMP,Nunit,StandardML-NJ,bzip2-1.0.5,eCos-2.0,wxWindows`.split(`,`),pt=`389-exception,Asterisk-exception,Autoconf-exception-2.0,Autoconf-exception-3.0,Autoconf-exception-generic,Autoconf-exception-generic-3.0,Autoconf-exception-macro,Bison-exception-1.24,Bison-exception-2.2,Bootloader-exception,Classpath-exception-2.0,CLISP-exception-2.0,cryptsetup-OpenSSL-exception,DigiRule-FOSS-exception,eCos-exception-2.0,Fawkes-Runtime-exception,FLTK-exception,fmt-exception,Font-exception-2.0,freertos-exception-2.0,GCC-exception-2.0,GCC-exception-2.0-note,GCC-exception-3.1,Gmsh-exception,GNAT-exception,GNOME-examples-exception,GNU-compiler-exception,gnu-javamail-exception,GPL-3.0-interface-exception,GPL-3.0-linking-exception,GPL-3.0-linking-source-exception,GPL-CC-1.0,GStreamer-exception-2005,GStreamer-exception-2008,i2p-gpl-java-exception,KiCad-libraries-exception,LGPL-3.0-linking-exception,libpri-OpenH323-exception,Libtool-exception,Linux-syscall-note,LLGPL,LLVM-exception,LZMA-exception,mif-exception,OCaml-LGPL-linking-exception,OCCT-exception-1.0,OpenJDK-assembly-exception-1.0,openvpn-openssl-exception,PS-or-PDF-font-exception-20170817,QPL-1.0-INRIA-2004-exception,Qt-GPL-exception-1.0,Qt-LGPL-exception-1.1,Qwt-exception-1.0,SANE-exception,SHL-2.0,SHL-2.1,stunnel-exception,SWI-exception,Swift-exception,Texinfo-exception,u-boot-exception-2.0,UBDL-exception,Universal-FOSS-exception-1.0,vsftpd-openssl-exception,WxWindows-exception-3.1,x11vnc-openssl-exception`.split(`,`);var mt,ht;function gt(){if(ht)return mt;ht=1;var e=[].concat(dt,ft),t=pt;return mt=function(n){var r=0;function i(){return r<n.length}function a(e){if(e instanceof RegExp){var t=n.slice(r).match(e);if(t)return r+=t[0].length,t[0]}else if(n.indexOf(e,r)===r)return r+=e.length,e}function o(){a(/[ ]*/)}function s(){for(var e,t=[`WITH`,`AND`,`OR`,`(`,`)`,`:`,`+`],i=0;i<t.length&&(e=a(t[i]),!e);i++);if(e===`+`&&r>1&&n[r-2]===` `)throw Error("Space before `+`");return e&&{type:`OPERATOR`,string:e}}function c(){return a(/[A-Za-z0-9-.]+/)}function l(){var e=c();if(!e)throw Error(`Expected idstring at offset `+r);return e}function u(){if(a(`DocumentRef-`))return{type:`DOCUMENTREF`,string:l()}}function d(){if(a(`LicenseRef-`))return{type:`LICENSEREF`,string:l()}}function f(){var n=r,i=c();if(e.indexOf(i)!==-1)return{type:`LICENSE`,string:i};if(t.indexOf(i)!==-1)return{type:`EXCEPTION`,string:i};r=n}function p(){return s()||u()||d()||f()}for(var m=[];i()&&(o(),i());){var h=p();if(!h)throw Error("Unexpected `"+n[r]+"` at offset "+r);m.push(h)}return m},mt}var _t,vt;function yt(){return vt?_t:(vt=1,_t=function(e){var t=0;function n(){return t<e.length}function r(){return n()?e[t]:null}function i(){if(!n())throw Error();t++}function a(e){var t=r();if(t&&t.type===`OPERATOR`&&e===t.string)return i(),t.string}function o(){if(a(`WITH`)){var e=r();if(e&&e.type===`EXCEPTION`)return i(),e.string;throw Error("Expected exception after `WITH`")}}function s(){var e=t,n=``,o=r();if(o.type===`DOCUMENTREF`&&(i(),n+=`DocumentRef-`+o.string+`:`,!a(`:`)))throw Error("Expected `:` after `DocumentRef-...`");if(o=r(),o.type===`LICENSEREF`)return i(),n+=`LicenseRef-`+o.string,{license:n};t=e}function c(){var e=r();if(e&&e.type===`LICENSE`){i();var t={license:e.string};a(`+`)&&(t.plus=!0);var n=o();return n&&(t.exception=n),t}}function l(){if(a(`(`)){var e=f();if(!a(`)`))throw Error("Expected `)`");return e}}function u(){return l()||s()||c()}function d(e,t){return function n(){var r=t();if(r){if(!a(e))return r;var i=n();if(!i)throw Error(`Expected expression`);return{left:r,conjunction:e.toLowerCase(),right:i}}}}var f=d(`OR`,d(`AND`,u)),p=f();if(!p||n())throw Error(`Syntax error`);return p},_t)}var bt,xt;function St(){if(xt)return bt;xt=1;var e=gt(),t=yt();return bt=function(n){return t(e(n))},bt}var Ct,wt;function Tt(){if(wt)return Ct;wt=1;var e=St(),t=dt;function n(t){try{return e(t),!0}catch{return!1}}function r(e,t){var n=t[0].length-e[0].length;return n===0?e[0].toUpperCase().localeCompare(t[0].toUpperCase()):n}var i=[[`APGL`,`AGPL`],[`Gpl`,`GPL`],[`GLP`,`GPL`],[`APL`,`Apache`],[`ISD`,`ISC`],[`GLP`,`GPL`],[`IST`,`ISC`],[`Claude`,`Clause`],[` or later`,`+`],[` International`,``],[`GNU`,`GPL`],[`GUN`,`GPL`],[`+`,``],[`GNU GPL`,`GPL`],[`GNU LGPL`,`LGPL`],[`GNU/GPL`,`GPL`],[`GNU GLP`,`GPL`],[`GNU LESSER GENERAL PUBLIC LICENSE`,`LGPL`],[`GNU Lesser General Public License`,`LGPL`],[`GNU LESSER GENERAL PUBLIC LICENSE`,`LGPL-2.1`],[`GNU Lesser General Public License`,`LGPL-2.1`],[`LESSER GENERAL PUBLIC LICENSE`,`LGPL`],[`Lesser General Public License`,`LGPL`],[`LESSER GENERAL PUBLIC LICENSE`,`LGPL-2.1`],[`Lesser General Public License`,`LGPL-2.1`],[`GNU General Public License`,`GPL`],[`Gnu public license`,`GPL`],[`GNU Public License`,`GPL`],[`GNU GENERAL PUBLIC LICENSE`,`GPL`],[`MTI`,`MIT`],[`Mozilla Public License`,`MPL`],[`Universal Permissive License`,`UPL`],[`WTH`,`WTF`],[`WTFGPL`,`WTFPL`],[`-License`,``]].sort(r),a=0,o=1,s=[function(e){return e.toUpperCase()},function(e){return e.trim()},function(e){return e.replace(/\./g,``)},function(e){return e.replace(/\s+/g,``)},function(e){return e.replace(/\s+/g,`-`)},function(e){return e.replace(`v`,`-`)},function(e){return e.replace(/,?\s*(\d)/,`-$1`)},function(e){return e.replace(/,?\s*(\d)/,`-$1.0`)},function(e){return e.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,`-$2`)},function(e){return e.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,`-$2.0`)},function(e){return e[0].toUpperCase()+e.slice(1)},function(e){return e.replace(`/`,`-`)},function(e){return e.replace(/\s*V\s*(\d)/,`-$1`).replace(/(\d)$/,`$1.0`)},function(e){return e.indexOf(`3.0`)===-1?e+`-only`:e+`-or-later`},function(e){return e+`only`},function(e){return e.replace(/(\d)$/,`-$1.0`)},function(e){return e.replace(/(-| )?(\d)$/,`-$2-Clause`)},function(e){return e.replace(/(-| )clause(-| )(\d)/,`-$3-Clause`)},function(e){return e.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,`BSD-3-Clause`)},function(e){return e.replace(/\bSimplified(-| )?BSD((-| )License)?/i,`BSD-2-Clause`)},function(e){return e.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,`BSD-2-Clause-$1BSD`)},function(e){return e.replace(/\bClear(-| )?BSD((-| )License)?/i,`BSD-3-Clause-Clear`)},function(e){return e.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,`BSD-4-Clause`)},function(e){return`CC-`+e},function(e){return`CC-`+e+`-4.0`},function(e){return e.replace(`Attribution`,`BY`).replace(`NonCommercial`,`NC`).replace(`NoDerivatives`,`ND`).replace(/ (\d)/,`-$1`).replace(/ ?International/,``)},function(e){return`CC-`+e.replace(`Attribution`,`BY`).replace(`NonCommercial`,`NC`).replace(`NoDerivatives`,`ND`).replace(/ (\d)/,`-$1`).replace(/ ?International/,``)+`-4.0`}],c=t.map(function(e){var t=/^(.*)-\d+\.\d+$/.exec(e);return t?[t[0],t[1]]:[e,null]}).reduce(function(e,t){var n=t[1];return e[n]=e[n]||[],e[n].push(t[0]),e},{}),l=Object.keys(c).map(function(e){return[e,c[e]]}).filter(function(e){return e[1].length===1&&e[0]!==null&&e[0]!==`APL`}).map(function(e){return[e[0],e[1][0]]});c=void 0;var u=[[`UNLI`,`Unlicense`],[`WTF`,`WTFPL`],[`2 CLAUSE`,`BSD-2-Clause`],[`2-CLAUSE`,`BSD-2-Clause`],[`3 CLAUSE`,`BSD-3-Clause`],[`3-CLAUSE`,`BSD-3-Clause`],[`AFFERO`,`AGPL-3.0-or-later`],[`AGPL`,`AGPL-3.0-or-later`],[`APACHE`,`Apache-2.0`],[`ARTISTIC`,`Artistic-2.0`],[`Affero`,`AGPL-3.0-or-later`],[`BEER`,`Beerware`],[`BOOST`,`BSL-1.0`],[`BSD`,`BSD-2-Clause`],[`CDDL`,`CDDL-1.1`],[`ECLIPSE`,`EPL-1.0`],[`FUCK`,`WTFPL`],[`GNU`,`GPL-3.0-or-later`],[`LGPL`,`LGPL-3.0-or-later`],[`GPLV1`,`GPL-1.0-only`],[`GPL-1`,`GPL-1.0-only`],[`GPLV2`,`GPL-2.0-only`],[`GPL-2`,`GPL-2.0-only`],[`GPL`,`GPL-3.0-or-later`],[`MIT +NO-FALSE-ATTRIBS`,`MITNFA`],[`MIT`,`MIT`],[`MPL`,`MPL-2.0`],[`X11`,`X11`],[`ZLIB`,`Zlib`]].concat(l).sort(r),d=0,f=1,p=function(e){for(var t=0;t<s.length;t++){var r=s[t](e).trim();if(r!==e&&n(r))return r}return null},m=function(e){for(var t=e.toUpperCase(),n=0;n<u.length;n++){var r=u[n];if(t.indexOf(r[d])>-1)return r[f]}return null},h=function(e,t){for(var n=0;n<i.length;n++){var r=i[n],s=r[a];if(e.indexOf(s)>-1){var c=t(e.replace(s,r[o]));if(c!==null)return c}}return null};Ct=function(e,t){t||={};var r=t.upgrade===void 0?!0:!!t.upgrade;function i(e){return r?g(e):e}if(!(typeof e==`string`&&e.trim().length!==0))throw Error(`Invalid argument. Expected non-empty string.`);if(e=e.trim(),n(e))return i(e);var a=e.replace(/\+$/,``).trim();if(n(a))return i(a);var o=p(e);return o!==null||(o=h(e,function(e){return n(e)?e:p(e)}),o!==null)||(o=m(e),o!==null)||(o=h(e,m),o!==null)?i(o):null};function g(e){return[`GPL-1.0`,`LGPL-1.0`,`AGPL-1.0`,`GPL-2.0`,`LGPL-2.0`,`AGPL-2.0`,`LGPL-2.1`].indexOf(e)===-1?[`GPL-1.0+`,`GPL-2.0+`,`GPL-3.0+`,`LGPL-2.0+`,`LGPL-2.1+`,`LGPL-3.0+`,`AGPL-1.0+`,`AGPL-3.0+`].indexOf(e)===-1?[`GPL-3.0`,`LGPL-3.0`,`AGPL-3.0`].indexOf(e)===-1?e:e+`-or-later`:e.replace(/\+$/,`-or-later`):e+`-only`}return Ct}var Et,Dt;function Ot(){if(Dt)return Et;Dt=1;var e=St(),t=Tt(),n=`license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"`,r=/^SEE LICEN[CS]E IN (.+)$/;function i(e,t){return t.slice(0,e.length)===e}function a(e){if(e.hasOwnProperty(`license`)){var t=e.license;return i(`LicenseRef`,t)||i(`DocumentRef`,t)}else return a(e.left)||a(e.right)}return Et=function(i){var o;try{o=e(i)}catch{var s;if(i===`UNLICENSED`||i===`UNLICENCED`)return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(s=r.exec(i))return{validForOldPackages:!0,validForNewPackages:!0,inFile:s[1]};var c={validForOldPackages:!1,validForNewPackages:!1,warnings:[n]};if(i.trim().length!==0){var l=t(i);l&&c.warnings.push(`license is similar to the valid expression "`+l+`"`)}return c}return a(o)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[n]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}},Et}var Q={},kt;function At(){if(kt)return Q;kt=1,Object.defineProperty(Q,`__esModule`,{value:!0}),Q.LRUCache=void 0;let e=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date,t=new Set,n=typeof process==`object`&&process?process:{},r=(e,t,r,i)=>{typeof n.emitWarning==`function`?n.emitWarning(e,t,r,i):console.error(`[${r}] ${t}: ${e}`)},i=globalThis.AbortController,a=globalThis.AbortSignal;if(i===void 0){a=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},i=class{constructor(){t()}signal=new a;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e=n.env?.LRU_CACHE_IGNORE_AC_WARNING!==`1`,t=()=>{e&&(e=!1,r("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.",`NO_ABORT_CONTROLLER`,`ENOTSUP`,t))}}let o=e=>!t.has(e),s=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),c=e=>s(e)?e<=2**8?Uint8Array:e<=2**16?Uint16Array:e<=2**32?Uint32Array:e<=2**53-1?l:null:null;class l extends Array{constructor(e){super(e),this.fill(0)}}class u{heap;length;static#e=!1;static create(e){let t=c(e);if(!t)return[];u.#e=!0;let n=new u(e,t);return u.#e=!1,n}constructor(e,t){if(!u.#e)throw TypeError(`instantiate Stack using Stack.create(n)`);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class d{#e;#t;#n;#r;#i;#a;#o;#s;get perf(){return this.#s}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#l;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y;#b;#x;#S;#C;#w;#T;static unsafeExposeInternals(e){return{starts:e.#b,ttls:e.#x,sizes:e.#y,keyMap:e.#u,keyList:e.#d,valList:e.#f,next:e.#p,prev:e.#m,get head(){return e.#h},get tail(){return e.#g},free:e.#_,isBackgroundFetch:t=>e.#B(t),backgroundFetch:(t,n,r,i)=>e.#z(t,n,r,i),moveToTail:t=>e.#H(t),indexes:t=>e.#F(t),rindexes:t=>e.#I(t),isStale:t=>e.#A(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#l}get size(){return this.#c}get fetchMethod(){return this.#a}get memoMethod(){return this.#o}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#i}constructor(n){let{max:i=0,ttl:a,ttlResolution:l=1,ttlAutopurge:f,updateAgeOnGet:p,updateAgeOnHas:m,allowStale:h,dispose:g,onInsert:_,disposeAfter:v,noDisposeOnSet:y,noUpdateTTL:b,maxSize:x=0,maxEntrySize:ee=0,sizeCalculation:S,fetchMethod:C,memoMethod:w,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:D,allowStaleOnFetchAbort:O,ignoreFetchAbort:k,perf:A}=n;if(A!==void 0&&typeof A?.now!=`function`)throw TypeError(`perf option must have a now() method if specified`);if(this.#s=A??e,i!==0&&!s(i))throw TypeError(`max option must be a nonnegative integer`);let j=i?c(i):Array;if(!j)throw Error(`invalid max value: `+i);if(this.#e=i,this.#t=x,this.maxEntrySize=ee||this.#t,this.sizeCalculation=S,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(w!==void 0&&typeof w!=`function`)throw TypeError(`memoMethod must be a function if defined`);if(this.#o=w,C!==void 0&&typeof C!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(this.#a=C,this.#C=!!C,this.#u=new Map,this.#d=Array(i).fill(void 0),this.#f=Array(i).fill(void 0),this.#p=new j(i),this.#m=new j(i),this.#h=0,this.#g=0,this.#_=u.create(i),this.#c=0,this.#l=0,typeof g==`function`&&(this.#n=g),typeof _==`function`&&(this.#r=_),typeof v==`function`?(this.#i=v,this.#v=[]):(this.#i=void 0,this.#v=void 0),this.#S=!!this.#n,this.#T=!!this.#r,this.#w=!!this.#i,this.noDisposeOnSet=!!y,this.noUpdateTTL=!!b,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!D,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.#t!==0&&!s(this.#t))throw TypeError(`maxSize must be a positive integer if specified`);if(!s(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);this.#j()}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!p,this.updateAgeOnHas=!!m,this.ttlResolution=s(l)||l===0?l:1,this.ttlAutopurge=!!f,this.ttl=a||0,this.ttl){if(!s(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);this.#E()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!this.#e&&!this.#t){let e=`LRU_CACHE_UNBOUNDED`;o(e)&&(t.add(e),r(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,e,d))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#E(){let e=new l(this.#e),t=new l(this.#e);this.#x=e,this.#b=t,this.#k=(n,r,i=this.#s.now())=>{if(t[n]=r===0?0:i,e[n]=r,r!==0&&this.ttlAutopurge){let e=setTimeout(()=>{this.#A(n)&&this.#U(this.#d[n],`expire`)},r+1);e.unref&&e.unref()}},this.#D=n=>{t[n]=e[n]===0?0:this.#s.now()},this.#O=(i,a)=>{if(e[a]){let o=e[a],s=t[a];if(!o||!s)return;i.ttl=o,i.start=s,i.now=n||r(),i.remainingTTL=o-(i.now-s)}};let n=0,r=()=>{let e=this.#s.now();if(this.ttlResolution>0){n=e;let t=setTimeout(()=>n=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=i=>{let a=this.#u.get(i);if(a===void 0)return 0;let o=e[a],s=t[a];return!o||!s?1/0:o-((n||r())-s)},this.#A=i=>{let a=t[i],o=e[i];return!!o&&!!a&&(n||r())-a>o}}#D=()=>{};#O=()=>{};#k=()=>{};#A=()=>!1;#j(){let e=new l(this.#e);this.#l=0,this.#y=e,this.#M=t=>{this.#l-=e[t],e[t]=0},this.#P=(e,t,n,r)=>{if(this.#B(t))return 0;if(!s(n))if(r){if(typeof r!=`function`)throw TypeError(`sizeCalculation must be a function`);if(n=r(t,e),!s(n))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`);return n},this.#N=(t,n,r)=>{if(e[t]=n,this.#t){let n=this.#t-e[t];for(;this.#l>n;)this.#R(!0)}this.#l+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#l)}}#M=e=>{};#N=(e,t,n)=>{};#P=(e,t,n,r)=>{if(n||r)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`);return 0};*#F({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#g;!(!this.#L(t)||((e||!this.#A(t))&&(yield t),t===this.#h));)t=this.#m[t]}*#I({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#h;!(!this.#L(t)||((e||!this.#A(t))&&(yield t),t===this.#g));)t=this.#p[t]}#L(e){return e!==void 0&&this.#u.get(this.#d[e])===e}*entries(){for(let e of this.#F())this.#f[e]!==void 0&&this.#d[e]!==void 0&&!this.#B(this.#f[e])&&(yield[this.#d[e],this.#f[e]])}*rentries(){for(let e of this.#I())this.#f[e]!==void 0&&this.#d[e]!==void 0&&!this.#B(this.#f[e])&&(yield[this.#d[e],this.#f[e]])}*keys(){for(let e of this.#F()){let t=this.#d[e];t!==void 0&&!this.#B(this.#f[e])&&(yield t)}}*rkeys(){for(let e of this.#I()){let t=this.#d[e];t!==void 0&&!this.#B(this.#f[e])&&(yield t)}}*values(){for(let e of this.#F())this.#f[e]!==void 0&&!this.#B(this.#f[e])&&(yield this.#f[e])}*rvalues(){for(let e of this.#I())this.#f[e]!==void 0&&!this.#B(this.#f[e])&&(yield this.#f[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]=`LRUCache`;find(e,t={}){for(let n of this.#F()){let r=this.#f[n],i=this.#B(r)?r.__staleWhileFetching:r;if(i!==void 0&&e(i,this.#d[n],this))return this.get(this.#d[n],t)}}forEach(e,t=this){for(let n of this.#F()){let r=this.#f[n],i=this.#B(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#d[n],this)}}rforEach(e,t=this){for(let n of this.#I()){let r=this.#f[n],i=this.#B(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#d[n],this)}}purgeStale(){let e=!1;for(let t of this.#I({allowStale:!0}))this.#A(t)&&(this.#U(this.#d[t],`expire`),e=!0);return e}info(e){let t=this.#u.get(e);if(t===void 0)return;let n=this.#f[t],r=this.#B(n)?n.__staleWhileFetching:n;if(r===void 0)return;let i={value:r};if(this.#x&&this.#b){let e=this.#x[t],n=this.#b[t];e&&n&&(i.ttl=e-(this.#s.now()-n),i.start=Date.now())}return this.#y&&(i.size=this.#y[t]),i}dump(){let e=[];for(let t of this.#F({allowStale:!0})){let n=this.#d[t],r=this.#f[t],i=this.#B(r)?r.__staleWhileFetching:r;if(i===void 0||n===void 0)continue;let a={value:i};if(this.#x&&this.#b){a.ttl=this.#x[t];let e=this.#s.now()-this.#b[t];a.start=Math.floor(Date.now()-e)}this.#y&&(a.size=this.#y[t]),e.unshift([n,a])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let e=Date.now()-n.start;n.start=this.#s.now()-e}this.set(t,n.value,n)}}set(e,t,n={}){if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:s}=n,{noUpdateTTL:c=this.noUpdateTTL}=n,l=this.#P(e,t,n.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize)return s&&(s.set=`miss`,s.maxEntrySizeExceeded=!0),this.#U(e,`set`),this;let u=this.#c===0?void 0:this.#u.get(e);if(u===void 0)u=this.#c===0?this.#g:this.#_.length===0?this.#c===this.#e?this.#R(!1):this.#c:this.#_.pop(),this.#d[u]=e,this.#f[u]=t,this.#u.set(e,u),this.#p[this.#g]=u,this.#m[u]=this.#g,this.#g=u,this.#c++,this.#N(u,l,s),s&&(s.set=`add`),c=!1,this.#T&&this.#r?.(t,e,`add`);else{this.#H(u);let n=this.#f[u];if(t!==n){if(this.#C&&this.#B(n)){n.__abortController.abort(Error(`replaced`));let{__staleWhileFetching:t}=n;t!==void 0&&!a&&(this.#S&&this.#n?.(t,e,`set`),this.#w&&this.#v?.push([t,e,`set`]))}else a||(this.#S&&this.#n?.(n,e,`set`),this.#w&&this.#v?.push([n,e,`set`]));if(this.#M(u),this.#N(u,l,s),this.#f[u]=t,s){s.set=`replace`;let e=n&&this.#B(n)?n.__staleWhileFetching:n;e!==void 0&&(s.oldValue=e)}}else s&&(s.set=`update`);this.#T&&this.onInsert?.(t,e,t===n?`update`:`replace`)}if(r!==0&&!this.#x&&this.#E(),this.#x&&(c||this.#k(u,r,i),s&&this.#O(s,u)),!a&&this.#w&&this.#v){let e=this.#v,t;for(;t=e?.shift();)this.#i?.(...t)}return this}pop(){try{for(;this.#c;){let e=this.#f[this.#h];if(this.#R(!0),this.#B(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#w&&this.#v){let e=this.#v,t;for(;t=e?.shift();)this.#i?.(...t)}}}#R(e){let t=this.#h,n=this.#d[t],r=this.#f[t];return this.#C&&this.#B(r)?r.__abortController.abort(Error(`evicted`)):(this.#S||this.#w)&&(this.#S&&this.#n?.(r,n,`evict`),this.#w&&this.#v?.push([r,n,`evict`])),this.#M(t),e&&(this.#d[t]=void 0,this.#f[t]=void 0,this.#_.push(t)),this.#c===1?(this.#h=this.#g=0,this.#_.length=0):this.#h=this.#p[t],this.#u.delete(n),this.#c--,t}has(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=this.#u.get(e);if(i!==void 0){let e=this.#f[i];if(this.#B(e)&&e.__staleWhileFetching===void 0)return!1;if(this.#A(i))r&&(r.has=`stale`,this.#O(r,i));else return n&&this.#D(i),r&&(r.has=`hit`,this.#O(r,i)),!0}else r&&(r.has=`miss`);return!1}peek(e,t={}){let{allowStale:n=this.allowStale}=t,r=this.#u.get(e);if(r===void 0||!n&&this.#A(r))return;let i=this.#f[r];return this.#B(i)?i.__staleWhileFetching:i}#z(e,t,n,r){let a=t===void 0?void 0:this.#f[t];if(this.#B(a))return a;let o=new i,{signal:s}=n;s?.addEventListener(`abort`,()=>o.abort(s.reason),{signal:o.signal});let c={signal:o.signal,options:n,context:r},l=(r,i=!1)=>{let{aborted:a}=o.signal,s=n.ignoreFetchAbort&&r!==void 0;if(n.status&&(a&&!i?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,s&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),a&&!s&&!i)return d(o.signal.reason);let l=p;return this.#f[t]===p&&(r===void 0?l.__staleWhileFetching===void 0?this.#U(e,`fetch`):this.#f[t]=l.__staleWhileFetching:(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,c.options))),r},u=e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),d(e)),d=r=>{let{aborted:i}=o.signal,a=i&&n.allowStaleOnFetchAbort,s=a||n.allowStaleOnFetchRejection,c=s||n.noDeleteOnFetchRejection,l=p;if(this.#f[t]===p&&(!c||l.__staleWhileFetching===void 0?this.#U(e,`fetch`):a||(this.#f[t]=l.__staleWhileFetching)),s)return n.status&&l.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),l.__staleWhileFetching;if(l.__returned===l)throw r},f=(t,r)=>{let i=this.#a?.(e,a,c);i&&i instanceof Promise&&i.then(e=>t(e===void 0?void 0:e),r),o.signal.addEventListener(`abort`,()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))})};n.status&&(n.status.fetchDispatched=!0);let p=new Promise(f).then(l,u),m=Object.assign(p,{__abortController:o,__staleWhileFetching:a,__returned:void 0});return t===void 0?(this.set(e,m,{...c.options,status:void 0}),t=this.#u.get(e)):this.#f[t]=m,m}#B(e){if(!this.#C)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty(`__staleWhileFetching`)&&t.__abortController instanceof i}async fetch(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:h=!1,status:g,signal:_}=t;if(!this.#C)return g&&(g.fetch=`get`),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:g});let v={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:s,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:g,signal:_},y=this.#u.get(e);if(y===void 0){g&&(g.fetch=`miss`);let t=this.#z(e,y,v,m);return t.__returned=t}else{let t=this.#f[y];if(this.#B(t)){let e=n&&t.__staleWhileFetching!==void 0;return g&&(g.fetch=`inflight`,e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let i=this.#A(y);if(!h&&!i)return g&&(g.fetch=`hit`),this.#H(y),r&&this.#D(y),g&&this.#O(g,y),t;let a=this.#z(e,y,v,m),o=a.__staleWhileFetching!==void 0&&n;return g&&(g.fetch=i?`stale`:`refresh`,o&&i&&(g.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}async forceFetch(e,t={}){let n=await this.fetch(e,t);if(n===void 0)throw Error(`fetch() returned undefined`);return n}memo(e,t={}){let n=this.#o;if(!n)throw Error(`no memoMethod provided to constructor`);let{context:r,forceRefresh:i,...a}=t,o=this.get(e,a);if(!i&&o!==void 0)return o;let s=n(e,o,{options:a,context:r});return this.set(e,s,a),s}get(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=this.#u.get(e);if(o!==void 0){let t=this.#f[o],s=this.#B(t);return a&&this.#O(a,o),this.#A(o)?(a&&(a.get=`stale`),s?(a&&n&&t.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?t.__staleWhileFetching:void 0):(i||this.#U(e,`expire`),a&&n&&(a.returnedStale=!0),n?t:void 0)):(a&&(a.get=`hit`),s?t.__staleWhileFetching:(this.#H(o),r&&this.#D(o),t))}else a&&(a.get=`miss`)}#V(e,t){this.#m[t]=e,this.#p[e]=t}#H(e){e!==this.#g&&(e===this.#h?this.#h=this.#p[e]:this.#V(this.#m[e],this.#p[e]),this.#V(this.#g,e),this.#g=e)}delete(e){return this.#U(e,`delete`)}#U(e,t){let n=!1;if(this.#c!==0){let r=this.#u.get(e);if(r!==void 0)if(n=!0,this.#c===1)this.#W(t);else{this.#M(r);let n=this.#f[r];if(this.#B(n)?n.__abortController.abort(Error(`deleted`)):(this.#S||this.#w)&&(this.#S&&this.#n?.(n,e,t),this.#w&&this.#v?.push([n,e,t])),this.#u.delete(e),this.#d[r]=void 0,this.#f[r]=void 0,r===this.#g)this.#g=this.#m[r];else if(r===this.#h)this.#h=this.#p[r];else{let e=this.#m[r];this.#p[e]=this.#p[r];let t=this.#p[r];this.#m[t]=this.#m[r]}this.#c--,this.#_.push(r)}}if(this.#w&&this.#v?.length){let e=this.#v,t;for(;t=e?.shift();)this.#i?.(...t)}return n}clear(){return this.#W(`delete`)}#W(e){for(let t of this.#I({allowStale:!0})){let n=this.#f[t];if(this.#B(n))n.__abortController.abort(Error(`deleted`));else{let r=this.#d[t];this.#S&&this.#n?.(n,r,e),this.#w&&this.#v?.push([n,r,e])}}if(this.#u.clear(),this.#f.fill(void 0),this.#d.fill(void 0),this.#x&&this.#b&&(this.#x.fill(0),this.#b.fill(0)),this.#y&&this.#y.fill(0),this.#h=0,this.#g=0,this.#_.length=0,this.#l=0,this.#c=0,this.#w&&this.#v){let e=this.#v,t;for(;t=e?.shift();)this.#i?.(...t)}}}return Q.LRUCache=d,Q}var jt,Mt;function Nt(){if(Mt)return jt;Mt=1;let e=(...e)=>e.every(e=>e)?e.join(``):``,t=e=>e?encodeURIComponent(e):``,n=e=>e.toLowerCase().replace(/^\W+/g,``).replace(/(?<!\W)\W+$/,``).replace(/\//g,``).replace(/\W+/g,`-`),r={sshtemplate:({domain:t,user:n,project:r,committish:i})=>`git@${t}:${n}/${r}.git${e(`#`,i)}`,sshurltemplate:({domain:t,user:n,project:r,committish:i})=>`git+ssh://git@${t}/${n}/${r}.git${e(`#`,i)}`,edittemplate:({domain:n,user:r,project:i,committish:a,editpath:o,path:s})=>`https://${n}/${r}/${i}${e(`/`,o,`/`,t(a||`HEAD`),`/`,s)}`,browsetemplate:({domain:n,user:r,project:i,committish:a,treepath:o})=>`https://${n}/${r}/${i}${e(`/`,o,`/`,t(a))}`,browsetreetemplate:({domain:n,user:r,project:i,committish:a,treepath:o,path:s,fragment:c,hashformat:l})=>`https://${n}/${r}/${i}/${o}/${t(a||`HEAD`)}/${s}${e(`#`,l(c||``))}`,browseblobtemplate:({domain:n,user:r,project:i,committish:a,blobpath:o,path:s,fragment:c,hashformat:l})=>`https://${n}/${r}/${i}/${o}/${t(a||`HEAD`)}/${s}${e(`#`,l(c||``))}`,docstemplate:({domain:n,user:r,project:i,treepath:a,committish:o})=>`https://${n}/${r}/${i}${e(`/`,a,`/`,t(o))}#readme`,httpstemplate:({auth:t,domain:n,user:r,project:i,committish:a})=>`git+https://${e(t,`@`)}${n}/${r}/${i}.git${e(`#`,a)}`,filetemplate:({domain:e,user:n,project:r,committish:i,path:a})=>`https://${e}/${n}/${r}/raw/${t(i||`HEAD`)}/${a}`,shortcuttemplate:({type:t,user:n,project:r,committish:i})=>`${t}:${n}/${r}${e(`#`,i)}`,pathtemplate:({user:t,project:n,committish:r})=>`${t}/${n}${e(`#`,r)}`,bugstemplate:({domain:e,user:t,project:n})=>`https://${e}/${t}/${n}/issues`,hashformat:n},i={};i.github={protocols:[`git:`,`http:`,`git+ssh:`,`git+https:`,`ssh:`,`https:`],domain:`github.com`,treepath:`tree`,blobpath:`blob`,editpath:`edit`,filetemplate:({auth:n,user:r,project:i,committish:a,path:o})=>`https://${e(n,`@`)}raw.githubusercontent.com/${r}/${i}/${t(a||`HEAD`)}/${o}`,gittemplate:({auth:t,domain:n,user:r,project:i,committish:a})=>`git://${e(t,`@`)}${n}/${r}/${i}.git${e(`#`,a)}`,tarballtemplate:({domain:e,user:n,project:r,committish:i})=>`https://codeload.${e}/${n}/${r}/tar.gz/${t(i||`HEAD`)}`,extract:e=>{let[,t,n,r,i]=e.pathname.split(`/`,5);if(!(r&&r!==`tree`)&&(r||(i=e.hash.slice(1)),n&&n.endsWith(`.git`)&&(n=n.slice(0,-4)),!(!t||!n)))return{user:t,project:n,committish:i}}},i.bitbucket={protocols:[`git+ssh:`,`git+https:`,`ssh:`,`https:`],domain:`bitbucket.org`,treepath:`src`,blobpath:`src`,editpath:`?mode=edit`,edittemplate:({domain:n,user:r,project:i,committish:a,treepath:o,path:s,editpath:c})=>`https://${n}/${r}/${i}${e(`/`,o,`/`,t(a||`HEAD`),`/`,s,c)}`,tarballtemplate:({domain:e,user:n,project:r,committish:i})=>`https://${e}/${n}/${r}/get/${t(i||`HEAD`)}.tar.gz`,extract:e=>{let[,t,n,r]=e.pathname.split(`/`,4);if(![`get`].includes(r)&&(n&&n.endsWith(`.git`)&&(n=n.slice(0,-4)),!(!t||!n)))return{user:t,project:n,committish:e.hash.slice(1)}}},i.gitlab={protocols:[`git+ssh:`,`git+https:`,`ssh:`,`https:`],domain:`gitlab.com`,treepath:`tree`,blobpath:`tree`,editpath:`-/edit`,httpstemplate:({auth:t,domain:n,user:r,project:i,committish:a})=>`git+https://${e(t,`@`)}${n}/${r}/${i}.git${e(`#`,a)}`,tarballtemplate:({domain:e,user:n,project:r,committish:i})=>`https://${e}/${n}/${r}/repository/archive.tar.gz?ref=${t(i||`HEAD`)}`,extract:e=>{let t=e.pathname.slice(1);if(t.includes(`/-/`)||t.includes(`/archive.tar.gz`))return;let n=t.split(`/`),r=n.pop();r.endsWith(`.git`)&&(r=r.slice(0,-4));let i=n.join(`/`);if(!(!i||!r))return{user:i,project:r,committish:e.hash.slice(1)}}},i.gist={protocols:[`git:`,`git+ssh:`,`git+https:`,`ssh:`,`https:`],domain:`gist.github.com`,editpath:`edit`,sshtemplate:({domain:t,project:n,committish:r})=>`git@${t}:${n}.git${e(`#`,r)}`,sshurltemplate:({domain:t,project:n,committish:r})=>`git+ssh://git@${t}/${n}.git${e(`#`,r)}`,edittemplate:({domain:n,user:r,project:i,committish:a,editpath:o})=>`https://${n}/${r}/${i}${e(`/`,t(a))}/${o}`,browsetemplate:({domain:n,project:r,committish:i})=>`https://${n}/${r}${e(`/`,t(i))}`,browsetreetemplate:({domain:n,project:r,committish:i,path:a,hashformat:o})=>`https://${n}/${r}${e(`/`,t(i))}${e(`#`,o(a))}`,browseblobtemplate:({domain:n,project:r,committish:i,path:a,hashformat:o})=>`https://${n}/${r}${e(`/`,t(i))}${e(`#`,o(a))}`,docstemplate:({domain:n,project:r,committish:i})=>`https://${n}/${r}${e(`/`,t(i))}`,httpstemplate:({domain:t,project:n,committish:r})=>`git+https://${t}/${n}.git${e(`#`,r)}`,filetemplate:({user:n,project:r,committish:i,path:a})=>`https://gist.githubusercontent.com/${n}/${r}/raw${e(`/`,t(i))}/${a}`,shortcuttemplate:({type:t,project:n,committish:r})=>`${t}:${n}${e(`#`,r)}`,pathtemplate:({project:t,committish:n})=>`${t}${e(`#`,n)}`,bugstemplate:({domain:e,project:t})=>`https://${e}/${t}`,gittemplate:({domain:t,project:n,committish:r})=>`git://${t}/${n}.git${e(`#`,r)}`,tarballtemplate:({project:e,committish:n})=>`https://codeload.github.com/gist/${e}/tar.gz/${t(n||`HEAD`)}`,extract:e=>{let[,t,n,r]=e.pathname.split(`/`,4);if(r!==`raw`){if(!n){if(!t)return;n=t,t=null}return n.endsWith(`.git`)&&(n=n.slice(0,-4)),{user:t,project:n,committish:e.hash.slice(1)}}},hashformat:function(e){return e&&`file-`+n(e)}},i.sourcehut={protocols:[`git+ssh:`,`https:`],domain:`git.sr.ht`,treepath:`tree`,blobpath:`tree`,filetemplate:({domain:e,user:n,project:r,committish:i,path:a})=>`https://${e}/${n}/${r}/blob/${t(i)||`HEAD`}/${a}`,httpstemplate:({domain:t,user:n,project:r,committish:i})=>`https://${t}/${n}/${r}.git${e(`#`,i)}`,tarballtemplate:({domain:e,user:n,project:r,committish:i})=>`https://${e}/${n}/${r}/archive/${t(i)||`HEAD`}.tar.gz`,bugstemplate:()=>null,extract:e=>{let[,t,n,r]=e.pathname.split(`/`,4);if(![`archive`].includes(r)&&(n&&n.endsWith(`.git`)&&(n=n.slice(0,-4)),!(!t||!n)))return{user:t,project:n,committish:e.hash.slice(1)}}};for(let[e,t]of Object.entries(i))i[e]=Object.assign({},r,t);return jt=i,jt}var Pt,Ft;function It(){if(Ft)return Pt;Ft=1;let e=r.default,t=(e,t,n)=>{let r=e.indexOf(n);return e.lastIndexOf(t,r>-1?r:1/0)},n=t=>{try{return new e.URL(t)}catch{}},i=(e,t)=>{let n=e.indexOf(`:`),r=e.slice(0,n+1);if(Object.prototype.hasOwnProperty.call(t,r))return e;let i=e.indexOf(`@`);return i>-1?i>n?`git+ssh://${e}`:e:e.indexOf(`//`)===n+1?e:`${e.slice(0,n+1)}//${e.slice(n+1)}`},a=e=>{let n=t(e,`@`,`#`),r=t(e,`:`,`#`);return r>n&&(e=e.slice(0,r)+`/`+e.slice(r+1)),t(e,`:`,`#`)===-1&&e.indexOf(`//`)===-1&&(e=`git+ssh://${e}`),e};return Pt=(e,t)=>{let r=t?i(e,t):e;return n(r)||n(a(r))},Pt}var Lt,Rt;function zt(){if(Rt)return Lt;Rt=1;let e=It(),t=e=>{let t=e.indexOf(`#`),n=e.indexOf(`/`),r=e.indexOf(`/`,n+1),i=e.indexOf(`:`),a=/\s/.exec(e),o=e.indexOf(`@`),s=!a||t>-1&&a.index>t,c=o===-1||t>-1&&o>t,l=i===-1||t>-1&&i>t,u=r===-1||t>-1&&r>t,d=n>0,f=t>-1?e[t-1]!==`/`:!e.endsWith(`/`),p=!e.startsWith(`.`);return s&&d&&f&&p&&c&&l&&u};return Lt=(n,r,{gitHosts:i,protocols:a})=>{if(!n)return;let o=e(t(n)?`github:${n}`:n,a);if(!o)return;let s=i.byShortcut[o.protocol],c=i.byDomain[o.hostname.startsWith(`www.`)?o.hostname.slice(4):o.hostname],l=s||c;if(!l)return;let u=i[s||c],d=null;a[o.protocol]?.auth&&(o.username||o.password)&&(d=`${o.username}${o.password?`:`+o.password:``}`);let f=null,p=null,m=null,h=null;try{if(s){let e=o.pathname.startsWith(`/`)?o.pathname.slice(1):o.pathname,t=e.indexOf(`@`);t>-1&&(e=e.slice(t+1));let n=e.lastIndexOf(`/`);n>-1?(p=decodeURIComponent(e.slice(0,n)),p||=null,m=decodeURIComponent(e.slice(n+1))):m=decodeURIComponent(e),m.endsWith(`.git`)&&(m=m.slice(0,-4)),o.hash&&(f=decodeURIComponent(o.hash.slice(1))),h=`shortcut`}else{if(!u.protocols.includes(o.protocol))return;let e=u.extract(o);if(!e)return;p=e.user&&decodeURIComponent(e.user),m=decodeURIComponent(e.project),f=decodeURIComponent(e.committish),h=a[o.protocol]?.name||o.protocol.slice(0,-1)}}catch(e){if(e instanceof URIError)return;throw e}return[l,p,d,m,f,h,r]},Lt}var Bt,Vt;function Ht(){if(Vt)return Bt;Vt=1;let{LRUCache:e}=At(),t=Nt(),n=zt(),r=It(),i=new e({max:1e3});function a(e){try{let{protocol:t,hostname:n,pathname:r}=new URL(e);return n?`${/(?:git\+)http:$/.test(t)?`http:`:`https:`}//${n}${r.replace(/\.git$/,``)}`:null}catch{return null}}class o{constructor(e,t,n,r,i,a,s={}){Object.assign(this,o.#e[e],{type:e,user:t,auth:n,project:r,committish:i,default:a,opts:s})}static#e={byShortcut:{},byDomain:{}};static#t={"git+ssh:":{name:`sshurl`},"ssh:":{name:`sshurl`},"git+https:":{name:`https`,auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(e,t){o.#e[e]=t,o.#e.byDomain[t.domain]=e,o.#e.byShortcut[`${e}:`]=e,o.#t[`${e}:`]={name:e}}static fromUrl(e,t){if(typeof e!=`string`)return;let r=e+JSON.stringify(t||{});if(!i.has(r)){let a=n(e,t,{gitHosts:o.#e,protocols:o.#t});i.set(r,a?new o(...a):void 0)}return i.get(r)}static fromManifest(e,t={}){if(!e||typeof e!=`object`)return;let n=e.repository,r=n&&(typeof n==`string`?n:typeof n==`object`&&typeof n.url==`string`?n.url:null);if(!r)throw Error(`no repository`);let i=r&&o.fromUrl(r.replace(/^git\+/,``),t)||null;if(i)return i;let s=a(r);return o.fromUrl(s,t)||s}static parseUrl(e){return r(e)}#n(e,t){if(typeof e!=`function`)return null;let n={...this,...this.opts,...t};n.path||=``,n.path.startsWith(`/`)&&(n.path=n.path.slice(1)),n.noCommittish&&(n.committish=null);let r=e(n);return n.noGitPlus&&r.startsWith(`git+`)?r.slice(4):r}hash(){return this.committish?`#${this.committish}`:``}ssh(e){return this.#n(this.sshtemplate,e)}sshurl(e){return this.#n(this.sshurltemplate,e)}browse(e,...t){return typeof e==`string`?typeof t[0]==`string`?this.#n(this.browsetreetemplate,{...t[1],fragment:t[0],path:e}):this.#n(this.browsetreetemplate,{...t[0],path:e}):this.#n(this.browsetemplate,e)}browseFile(e,...t){return typeof t[0]==`string`?this.#n(this.browseblobtemplate,{...t[1],fragment:t[0],path:e}):this.#n(this.browseblobtemplate,{...t[0],path:e})}docs(e){return this.#n(this.docstemplate,e)}bugs(e){return this.#n(this.bugstemplate,e)}https(e){return this.#n(this.httpstemplate,e)}git(e){return this.#n(this.gittemplate,e)}shortcut(e){return this.#n(this.shortcuttemplate,e)}path(e){return this.#n(this.pathtemplate,e)}tarball(e){return this.#n(this.tarballtemplate,{...e,noCommittish:!1})}file(e,t){return this.#n(this.filetemplate,{...t,path:e})}edit(e,t){return this.#n(this.edittemplate,{...t,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]==`function`?this[this.default](e):this.sshurl(e)}}for(let[e,n]of Object.entries(t))o.addHost(e,n);return Bt=o,Bt}var Ut,Wt;function Gt(){if(Wt)return Ut;Wt=1,Ut=e;function e(e){if(!e||e===`ERROR: No README data found!`)return;e=e.trim().split(`
`);let t=0;for(;e[t]&&e[t].trim().match(/^(#|$)/);)t++;let n=e.length,r=t+1;for(;r<n&&e[r].trim();)r++;return e.slice(t,r).join(` `).trim()}return Ut}const Kt={topLevel:{dependancies:`dependencies`,dependecies:`dependencies`,depdenencies:`dependencies`,devEependencies:`devDependencies`,depends:`dependencies`,"dev-dependencies":`devDependencies`,devDependences:`devDependencies`,devDepenencies:`devDependencies`,devdependencies:`devDependencies`,repostitory:`repository`,repo:`repository`,prefereGlobal:`preferGlobal`,hompage:`homepage`,hampage:`homepage`,autohr:`author`,autor:`author`,contributers:`contributors`,publicationConfig:`publishConfig`,script:`scripts`},bugs:{web:`url`,name:`url`},script:{server:`start`,tests:`test`}};var qt,Jt;function Yt(){if(Jt)return qt;Jt=1;var{URL:e}=u.default,t=st(),n=ut(),r=Ot(),i=Ht(),{isBuiltin:a}=d.default,o=[`dependencies`,`devDependencies`,`optionalDependencies`],s=Gt(),c=Kt,l=e=>e.includes(`@`)&&e.indexOf(`@`)<e.lastIndexOf(`.`);qt={warn:function(){},fixRepositoryField:function(e){if(e.repositories&&(this.warn(`repositories`),e.repository=e.repositories[0]),!e.repository)return this.warn(`missingRepository`);typeof e.repository==`string`&&(e.repository={type:`git`,url:e.repository});var t=e.repository.url||``;if(t){var n=i.fromUrl(t);n&&(t=e.repository.url=n.getDefaultRepresentation()===`shortcut`?n.https():n.toString())}t.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn(`brokenGitUrl`,t)},fixTypos:function(e){Object.keys(c.topLevel).forEach(function(t){Object.prototype.hasOwnProperty.call(e,t)&&this.warn(`typo`,t,c.topLevel[t])},this)},fixScriptsField:function(e){if(e.scripts){if(typeof e.scripts!=`object`){this.warn(`nonObjectScripts`),delete e.scripts;return}Object.keys(e.scripts).forEach(function(t){typeof e.scripts[t]==`string`?c.script[t]&&!e.scripts[c.script[t]]&&this.warn(`typo`,t,c.script[t],`scripts`):(this.warn(`nonStringScript`),delete e.scripts[t])},this)}},fixFilesField:function(e){var t=e.files;t&&!Array.isArray(t)?(this.warn(`nonArrayFiles`),delete e.files):e.files&&=e.files.filter(function(e){return!e||typeof e!=`string`?(this.warn(`invalidFilename`,e),!1):!0},this)},fixBinField:function(e){if(e.bin&&typeof e.bin==`string`){var t={},n;(n=e.name.match(/^@[^/]+[/](.*)$/))?t[n[1]]=e.bin:t[e.name]=e.bin,e.bin=t}},fixManField:function(e){e.man&&typeof e.man==`string`&&(e.man=[e.man])},fixBundleDependenciesField:function(e){var t=`bundledDependencies`,n=`bundleDependencies`;e[t]&&!e[n]&&(e[n]=e[t],delete e[t]),e[n]&&!Array.isArray(e[n])?(this.warn(`nonArrayBundleDependencies`),delete e[n]):e[n]&&(e[n]=e[n].filter(function(t){return!t||typeof t!=`string`?(this.warn(`nonStringBundleDependency`,t),!1):(e.dependencies||={},Object.prototype.hasOwnProperty.call(e.dependencies,t)||(this.warn(`nonDependencyBundleDependency`,t),e.dependencies[t]=`*`),!0)},this))},fixDependencies:function(e){b(e,this.warn),v(e,this.warn),this.fixBundleDependenciesField(e),[`dependencies`,`devDependencies`].forEach(function(t){if(t in e){if(!e[t]||typeof e[t]!=`object`){this.warn(`nonObjectDependencies`,t),delete e[t];return}Object.keys(e[t]).forEach(function(n){var r=e[t][n];typeof r!=`string`&&(this.warn(`nonStringDependency`,n,JSON.stringify(r)),delete e[t][n]);var a=i.fromUrl(e[t][n]);a&&(e[t][n]=a.toString())},this)}},this)},fixModulesField:function(e){e.modules&&(this.warn(`deprecatedModules`),delete e.modules)},fixKeywordsField:function(e){typeof e.keywords==`string`&&(e.keywords=e.keywords.split(/,\s+/)),e.keywords&&!Array.isArray(e.keywords)?(delete e.keywords,this.warn(`nonArrayKeywords`)):e.keywords&&=e.keywords.filter(function(e){return typeof e!=`string`||!e?(this.warn(`nonStringKeyword`),!1):!0},this)},fixVersionField:function(e,r){var i=!r;if(!e.version)return e.version=``,!0;if(!t(e.version,i))throw Error(`Invalid version: "`+e.version+`"`);return e.version=n(e.version,i),!0},fixPeople:function(e){h(e,g),h(e,_)},fixNameField:function(e,t){typeof t==`boolean`?t={strict:t}:t===void 0&&(t={});var n=t.strict;if(!e.name&&!n){e.name=``;return}if(typeof e.name!=`string`)throw Error(`name field must be a string.`);n||(e.name=e.name.trim()),m(e.name,n,t.allowLegacyCase),a(e.name)&&this.warn(`conflictingName`,e.name)},fixDescriptionField:function(e){e.description&&typeof e.description!=`string`&&(this.warn(`nonStringDescription`),delete e.description),e.readme&&!e.description&&(e.description=s(e.readme)),e.description===void 0&&delete e.description,e.description||this.warn(`missingDescription`)},fixReadmeField:function(e){e.readme||=(this.warn(`missingReadme`),`ERROR: No README data found!`)},fixBugsField:function(t){if(!t.bugs&&t.repository&&t.repository.url){var n=i.fromUrl(t.repository.url);n&&n.bugs()&&(t.bugs={url:n.bugs()})}else if(t.bugs){if(typeof t.bugs==`string`)l(t.bugs)?t.bugs={email:t.bugs}:e.canParse(t.bugs)?t.bugs={url:t.bugs}:this.warn(`nonEmailUrlBugsString`);else{x(t.bugs,this.warn);var r=t.bugs;t.bugs={},r.url&&(e.canParse(r.url)?t.bugs.url=r.url:this.warn(`nonUrlBugsUrlField`)),r.email&&(typeof r.email==`string`&&l(r.email)?t.bugs.email=r.email:this.warn(`nonEmailBugsEmailField`))}!t.bugs.email&&!t.bugs.url&&(delete t.bugs,this.warn(`emptyNormalizedBugs`))}},fixHomepageField:function(t){if(!t.homepage&&t.repository&&t.repository.url){var n=i.fromUrl(t.repository.url);n&&n.docs()&&(t.homepage=n.docs())}if(t.homepage){if(typeof t.homepage!=`string`)return this.warn(`nonUrlHomepage`),delete t.homepage;e.canParse(t.homepage)||(t.homepage=`http://`+t.homepage)}},fixLicenseField:function(e){let t=e.license||e.licence;if(!t)return this.warn(`missingLicense`);if(typeof t!=`string`||t.length<1||t.trim()===``||!r(t).validForNewPackages)return this.warn(`invalidLicense`)}};function f(e){if(e.charAt(0)!==`@`)return!1;var t=e.slice(1).split(`/`);return t.length===2?t[0]&&t[1]&&t[0]===encodeURIComponent(t[0])&&t[1]===encodeURIComponent(t[1]):!1}function p(e){return!e.match(/[/@\s+%:]/)&&e===encodeURIComponent(e)}function m(e,t,n){if(e.charAt(0)===`.`||!(f(e)||p(e))||t&&!n&&e!==e.toLowerCase()||e.toLowerCase()===`node_modules`||e.toLowerCase()===`favicon.ico`)throw Error(`Invalid name: `+JSON.stringify(e))}function h(e,t){return e.author&&=t(e.author),[`maintainers`,`contributors`].forEach(function(n){Array.isArray(e[n])&&(e[n]=e[n].map(t))}),e}function g(e){if(typeof e==`string`)return e;var t=e.name||``,n=e.url||e.web,r=n?` (`+n+`)`:``,i=e.email||e.mail;return t+(i?` <`+i+`>`:``)+r}function _(e){if(typeof e!=`string`)return e;var t=e.match(/^([^(<]+)/),n=e.match(/\(([^()]+)\)/),r=e.match(/<([^<>]+)>/),i={};return t&&t[0].trim()&&(i.name=t[0].trim()),r&&(i.email=r[1]),n&&(i.url=n[1]),i}function v(e){var t=e.optionalDependencies;if(t){var n=e.dependencies||{};Object.keys(t).forEach(function(e){n[e]=t[e]}),e.dependencies=n}}function y(e,t,n){if(!e)return{};if(typeof e==`string`&&(e=e.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(e))return e;n(`deprecatedArrayDependencies`,t);var r={};return e.filter(function(e){return typeof e==`string`}).forEach(function(e){e=e.trim().split(/(:?[@\s><=])/);var t=e.shift(),n=e.join(``);n=n.trim(),n=n.replace(/^@/,``),r[t]=n}),r}function b(e,t){o.forEach(function(n){e[n]&&(e[n]=y(e[n],n,t))})}function x(e,t){e&&Object.keys(e).forEach(function(n){c.bugs[n]&&(t(`typo`,n,c.bugs[n],`bugs`),e[c.bugs[n]]=e[n],delete e[n])})}return qt}const Xt={repositories:`'repositories' (plural) Not supported. Please pick one as the 'repository' field`,missingRepository:`No repository field.`,brokenGitUrl:`Probably broken git url: %s`,nonObjectScripts:`scripts must be an object`,nonStringScript:`script values must be string commands`,nonArrayFiles:`Invalid 'files' member`,invalidFilename:`Invalid filename in 'files' list: %s`,nonArrayBundleDependencies:`Invalid 'bundleDependencies' list. Must be array of package names`,nonStringBundleDependency:`Invalid bundleDependencies member: %s`,nonDependencyBundleDependency:`Non-dependency in bundleDependencies: %s`,nonObjectDependencies:`%s field must be an object`,nonStringDependency:`Invalid dependency: %s %s`,deprecatedArrayDependencies:`specifying %s as array is deprecated`,deprecatedModules:`modules field is deprecated`,nonArrayKeywords:`keywords should be an array of strings`,nonStringKeyword:`keywords should be an array of strings`,conflictingName:`%s is also the name of a node core module.`,nonStringDescription:`'description' field should be a string`,missingDescription:`No description`,missingReadme:`No README data`,missingLicense:`No license field.`,nonEmailUrlBugsString:`Bug string field must be url, email, or {email,url}`,nonUrlBugsUrlField:`bugs.url field must be a string url. Deleted.`,nonEmailBugsEmailField:`bugs.email field must be a string email. Deleted.`,emptyNormalizedBugs:`Normalized value of bugs field is an empty object. Deleted.`,nonUrlHomepage:`homepage field must be a string url. Deleted.`,invalidLicense:`license should be a valid SPDX license expression`,typo:`%s should probably be %s.`};var Zt,Qt;function $t(){if(Qt)return Zt;Qt=1;var e=i.default,t=Xt;Zt=function(){var r=Array.prototype.slice.call(arguments,0),i=r.shift();if(i===`typo`)return n.apply(null,r);var a=t[i]?t[i]:i+`: '%s'`;return r.unshift(a),e.format.apply(null,r)};function n(n,r,i){return i&&(n=i+`['`+n+`']`,r=i+`['`+r+`']`),e.format(t.typo,n,r)}return Zt}var en,tn;function nn(){if(tn)return en;tn=1,en=a;var e=Yt();a.fixer=e;var t=$t(),n=[`name`,`version`,`description`,`repository`,`modules`,`scripts`,`files`,`bin`,`man`,`bugs`,`keywords`,`readme`,`homepage`,`license`],r=[`dependencies`,`people`,`typos`],i=n.map(function(e){return o(e)+`Field`});i=i.concat(r);function a(n,r,a){r===!0&&(r=null,a=!0),a||=!1,(!r||n.private)&&(r=function(){}),n.scripts&&n.scripts.install===`node-gyp rebuild`&&!n.scripts.preinstall&&(n.gypfile=!0),e.warn=function(){r(t.apply(null,arguments))},i.forEach(function(t){e[`fix`+o(t)](n,a)}),n._id=n.name+`@`+n.version}function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}return en}const rn=ge(nn());(0,a.promisify)(o.execFile);function an(e){return e instanceof URL?(0,u.fileURLToPath)(e):e}const on=e=>c.default.resolve(an(e)??`.`,`package.json`),sn=(e,t)=>{let n=typeof e==`string`?Re(e):e;return t&&rn(n),n};function cn({cwd:e,normalize:t=!0}={}){return sn(s.default.readFileSync(on(e),`utf8`),t)}function ln(e){let t=he(`package.json`,e);if(t)return{packageJson:cn({...e,cwd:c.default.dirname(t)}),path:t}}const un=(e,t)=>(e=e.replace(/((?<![\p{Uppercase_Letter}\d])[\p{Uppercase_Letter}\d](?![\p{Uppercase_Letter}\d]))/gu,e=>e.toLowerCase()),e.replace(/(?<!\p{Uppercase_Letter})(\p{Uppercase_Letter}+)(\p{Uppercase_Letter}\p{Lowercase_Letter}+)/gu,(e,n,r)=>n+t+r.toLowerCase()));function dn(e,{separator:t=`_`,preserveConsecutiveUppercase:n=!1}={}){if(!(typeof e==`string`&&typeof t==`string`))throw TypeError("The `text` and `separator` arguments should be of type `string`");if(e.length<2)return n?e:e.toLowerCase();let r=`$1${t}$2`,i=e.replace(/([\p{Lowercase_Letter}\d])(\p{Uppercase_Letter})/gu,r);return n?un(i,t):i.replace(/(\p{Uppercase_Letter})(\p{Uppercase_Letter}\p{Lowercase_Letter}+)/gu,r).toLowerCase()}var fn={exports:{}},pn,mn;function hn(){if(mn)return pn;mn=1;var e=Object.prototype.toString;return pn=function(t){var n;return e.call(t)===`[object Object]`&&(n=Object.getPrototypeOf(t),n===null||n===Object.getPrototypeOf({}))},pn}var gn,_n;function vn(){return _n?gn:(_n=1,gn=function(e){return e==null?[]:Array.isArray(e)?e:[e]},gn)}var yn,bn;function xn(){if(bn)return yn;bn=1;var e=Object.prototype.toString;yn=function(u){if(u===void 0)return`undefined`;if(u===null)return`null`;var d=typeof u;if(d===`boolean`)return`boolean`;if(d===`string`)return`string`;if(d===`number`)return`number`;if(d===`symbol`)return`symbol`;if(d===`function`)return o(u)?`generatorfunction`:`function`;if(n(u))return`array`;if(l(u))return`buffer`;if(c(u))return`arguments`;if(i(u))return`date`;if(r(u))return`error`;if(a(u))return`regexp`;switch(t(u)){case`Symbol`:return`symbol`;case`Promise`:return`promise`;case`WeakMap`:return`weakmap`;case`WeakSet`:return`weakset`;case`Map`:return`map`;case`Set`:return`set`;case`Int8Array`:return`int8array`;case`Uint8Array`:return`uint8array`;case`Uint8ClampedArray`:return`uint8clampedarray`;case`Int16Array`:return`int16array`;case`Uint16Array`:return`uint16array`;case`Int32Array`:return`int32array`;case`Uint32Array`:return`uint32array`;case`Float32Array`:return`float32array`;case`Float64Array`:return`float64array`}if(s(u))return`generator`;switch(d=e.call(u),d){case`[object Object]`:return`object`;case`[object Map Iterator]`:return`mapiterator`;case`[object Set Iterator]`:return`setiterator`;case`[object String Iterator]`:return`stringiterator`;case`[object Array Iterator]`:return`arrayiterator`}return d.slice(8,-1).toLowerCase().replace(/\s/g,``)};function t(e){return typeof e.constructor==`function`?e.constructor.name:null}function n(e){return Array.isArray?Array.isArray(e):e instanceof Array}function r(e){return e instanceof Error||typeof e.message==`string`&&e.constructor&&typeof e.constructor.stackTraceLimit==`number`}function i(e){return e instanceof Date?!0:typeof e.toDateString==`function`&&typeof e.getDate==`function`&&typeof e.setDate==`function`}function a(e){return e instanceof RegExp?!0:typeof e.flags==`string`&&typeof e.ignoreCase==`boolean`&&typeof e.multiline==`boolean`&&typeof e.global==`boolean`}function o(e,n){return t(e)===`GeneratorFunction`}function s(e){return typeof e.throw==`function`&&typeof e.return==`function`&&typeof e.next==`function`}function c(e){try{if(typeof e.length==`number`&&typeof e.callee==`function`)return!0}catch(e){if(e.message.indexOf(`callee`)!==-1)return!0}return!1}function l(e){return e.constructor&&typeof e.constructor.isBuffer==`function`?e.constructor.isBuffer(e):!1}return yn}var Sn;function Cn(){if(Sn)return fn.exports;Sn=1;let e=hn(),t=vn(),n=xn(),r=(e,t,n)=>{e[t]||(e[t]=[]),e[t].push(n)},i=(e,t,n,r)=>{e[t]||(e[t]={}),e[t][n]=r},a=e=>Array.isArray(e)?`[${e.map(a).join(`, `)}]`:n(e)===`string`?JSON.stringify(e):e,o=e=>{if(Array.isArray(e)&&e.length>0){let[t]=e;return`${n(t)}-array`}return n(e)},s=(e,t)=>{let n=e===`array`?`string-array`:e;return u.includes(n)&&Array.isArray(t)&&t.length===0?`array`:n},c=[`stopEarly`,`unknown`,`--`],l=[`string`,`boolean`,`number`],u=l.map(e=>`${e}-array`),d=[...l,`array`,...u],f=n=>{n||={};let l={};return c.forEach(e=>{n[e]&&(l[e]=n[e])}),Object.keys(n).forEach(c=>{let f=n[c];if(c===`arguments`&&(c=`_`),typeof f==`string`&&(f={type:f}),e(f)){let e=f,{type:n}=e;if(n){if(!d.includes(n))throw TypeError(`Expected type of "${c}" to be one of ${a(d)}, got ${a(n)}`);if(u.includes(n)){let[e]=n.split(`-`);r(l,`array`,{key:c,[e]:!0})}else r(l,n,c)}if({}.hasOwnProperty.call(e,`default`)){let{default:t}=e,r=o(t),u=s(n,t);if(u&&u!==r)throw TypeError(`Expected "${c}" default value to be of type "${u}", got ${a(r)}`);i(l,`default`,c,t)}t(e.alias).forEach(e=>{i(l,`alias`,e,c)})}}),l};return fn.exports=f,fn.exports.default=f,fn.exports}const wn=ge(Cn());var Tn={exports:{}},En;function Dn(){if(En)return Tn.exports;En=1;let e=e=>typeof e==`object`&&!!e,t=Symbol(`skip`),n=t=>e(t)&&!(t instanceof RegExp)&&!(t instanceof Error)&&!(t instanceof Date),r=(e,i,a,o=new WeakMap)=>{if(a={deep:!1,target:{},...a},o.has(e))return o.get(e);o.set(e,a.target);let{target:s}=a;delete a.target;let c=e=>e.map(e=>n(e)?r(e,i,a,o):e);if(Array.isArray(e))return c(e);for(let[l,u]of Object.entries(e)){let d=i(l,u,e);if(d===t)continue;let[f,p,{shouldRecurse:m=!0}={}]=d;f!==`__proto__`&&(a.deep&&m&&n(p)&&(p=Array.isArray(p)?c(p):r(p,i,a,o)),s[f]=p)}return s};return Tn.exports=(t,n,i)=>{if(!e(t))throw TypeError(`Expected an object, got \`${t}\` (${typeof t})`);return r(t,n,i)},Tn.exports.mapObjectSkip=t,Tn.exports}const On=ge(Dn());var kn=class extends Map{constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge==`number`&&e.maxAge===0)throw TypeError("`maxAge` must be a number greater than 0");this.maxSize=e.maxSize,this.maxAge=e.maxAge||1/0,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(e){if(typeof this.onEviction==`function`)for(let[t,n]of e)this.onEviction(t,n.value)}_deleteIfExpired(e,t){return typeof t.expiry==`number`&&t.expiry<=Date.now()?(typeof this.onEviction==`function`&&this.onEviction(e,t.value),this.delete(e)):!1}_getOrDeleteIfExpired(e,t){if(this._deleteIfExpired(e,t)===!1)return t.value}_getItemValue(e,t){return t.expiry?this._getOrDeleteIfExpired(e,t):t.value}_peek(e,t){let n=t.get(e);return this._getItemValue(e,n)}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(e,t){this.oldCache.delete(e),this._set(e,t)}*_entriesAscending(){for(let e of this.oldCache){let[t,n]=e;this.cache.has(t)||this._deleteIfExpired(t,n)===!1&&(yield e)}for(let e of this.cache){let[t,n]=e;this._deleteIfExpired(t,n)===!1&&(yield e)}}get(e){if(this.cache.has(e)){let t=this.cache.get(e);return this._getItemValue(e,t)}if(this.oldCache.has(e)){let t=this.oldCache.get(e);if(this._deleteIfExpired(e,t)===!1)return this._moveToRecent(e,t),t.value}}set(e,t,{maxAge:n=this.maxAge}={}){let r=typeof n==`number`&&n!==1/0?Date.now()+n:void 0;return this.cache.has(e)?this.cache.set(e,{value:t,expiry:r}):this._set(e,{value:t,expiry:r}),this}has(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):this.oldCache.has(e)?!this._deleteIfExpired(e,this.oldCache.get(e)):!1}peek(e){if(this.cache.has(e))return this._peek(e,this.cache);if(this.oldCache.has(e))return this._peek(e,this.oldCache)}delete(e){let t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(e){if(!(e&&e>0))throw TypeError("`maxSize` must be a number greater than 0");let t=[...this._entriesAscending()],n=t.length-e;n<0?(this.cache=new Map(t),this.oldCache=new Map,this._size=t.length):(n>0&&this._emitEvictions(t.slice(0,n)),this.oldCache=new Map(t.slice(n)),this.cache=new Map,this._size=0),this.maxSize=e}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache){let[t,n]=e;this._deleteIfExpired(t,n)===!1&&(yield[t,n.value])}for(let e of this.oldCache){let[t,n]=e;this.cache.has(t)||this._deleteIfExpired(t,n)===!1&&(yield[t,n.value])}}*entriesDescending(){let e=[...this.cache];for(let t=e.length-1;t>=0;--t){let[n,r]=e[t];this._deleteIfExpired(n,r)===!1&&(yield[n,r.value])}e=[...this.oldCache];for(let t=e.length-1;t>=0;--t){let[n,r]=e[t];this.cache.has(n)||this._deleteIfExpired(n,r)===!1&&(yield[n,r.value])}}*entriesAscending(){for(let[e,t]of this._entriesAscending())yield[e,t.value]}get size(){if(!this._size)return this.oldCache.size;let e=0;for(let t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}entries(){return this.entriesAscending()}forEach(e,t=this){for(let[n,r]of this.entriesAscending())e.call(t,r,n,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};const An=(e,t)=>e.some(e=>typeof e==`string`?e===t:(e.lastIndex=0,e.test(t))),jn=new kn({maxSize:1e5}),Mn=e=>typeof e==`object`&&!!e&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date),Nn=(e,t={})=>{if(!Mn(e))return e;let{separator:n=`_`,exclude:r,deep:i=!1}=t,a=e=>(e,t)=>{if(i&&Mn(t)&&(t=On(t,a())),!(r&&An(r,e))){let t=`${n}${e}`;if(jn.has(t))e=jn.get(t);else{let r=dn(e,{separator:n});e.length<100&&jn.set(t,r),e=r}}return[e,t]};return On(e,a())};function Pn(e,t){return Array.isArray(e)?Object.keys(e).map(n=>Nn(e[n],t)):Nn(e,t)}const $=e=>`--${dn(e,{separator:`-`})}`,Fn=(e,t=`--`)=>`\`${t}${e.join(`\`, \`${t}`)}\``,In=e=>Object.prototype.toString.call(e)===`[object Object]`,Ln=e=>{if(!In(e.flags))throw TypeError("The `flags` option must be an object.");if(e.input!==void 0&&typeof e.input!=`string`&&!In(e.input))throw TypeError("The `input` option must be a string or an object.");if(In(e.input)&&Object.hasOwn(e.input,`isRequired`)&&typeof e.input.isRequired!=`boolean`&&typeof e.input.isRequired!=`function`)throw TypeError("The `input.isRequired` option must be a boolean or a function.");if(e.commands!==void 0){if(!Array.isArray(e.commands))throw TypeError("The `commands` option must be an array of strings.");if(e.commands.length===0)throw TypeError("The `commands` option must contain at least one command.");if(e.commands.some(e=>typeof e!=`string`||e===``||e.startsWith(`-`)||/\s/.test(e)))throw TypeError("The `commands` option must be an array of non-empty strings without whitespace that do not start with `-`.")}let t={flags:{keyContainsDashes:{filter:([e])=>e.includes(`-`)&&e!==`--`,message:e=>`Flag keys may not contain '-'. Invalid flags: ${Fn(e,``)}`},aliasIsSet:{filter:([,e])=>Object.hasOwn(e,`alias`),message:e=>`The option \`alias\` has been renamed to \`shortFlag\`. The following flags need to be updated: ${Fn(e)}`},choicesNotAnArray:{filter:([,e])=>Object.hasOwn(e,`choices`)&&!Array.isArray(e.choices),message:e=>`The option \`choices\` must be an array. Invalid flags: ${Fn(e)}`},choicesNotMatchFlagType:{filter:([,e])=>e.type&&Array.isArray(e.choices)&&e.choices.some(t=>typeof t!==e.type),message(t){return`Each value of the option \`choices\` must be of the same type as its flag. Invalid flags: ${t.map(t=>`(\`${$(t)}\`, type: '${e.flags[t].type}')`).join(`, `)}`}},defaultNotInChoices:{filter:([,e])=>Object.hasOwn(e,`default`)&&Array.isArray(e.choices)&&![e.default].flat().every(t=>e.choices.includes(t)),message:e=>`Each value of the option \`default\` must exist within the option \`choices\`. Invalid flags: ${Fn(e)}`}}},n=[];for(let[r,i]of Object.entries(t)){let t=Object.entries(e[r]);for(let{filter:e,message:r}of Object.values(i)){let i=t.filter(t=>e(t)),a=i.map(([e])=>e);i.length>0&&n.push(r(a))}}if(n.length>0)throw Error(n.join(`
`))},Rn=(e,t)=>{if(typeof e!=`string`&&(t=e,e=``),!t.importMeta?.url)throw TypeError("The `importMeta` option is required. Its value must be `import.meta`.");let n=t.pkg??ln({cwd:c.default.dirname((0,u.fileURLToPath)(t.importMeta.url)),normalize:!1})?.packageJson??{},r=!1,i=()=>(r||=(rn(n),!0),n),a={argv:l.default.argv.slice(2),inferType:!1,input:`string`,description:n.description??!1,help:e,version:n.version||`No version found`,autoHelp:!0,autoVersion:!0,booleanDefault:!1,allowUnknownFlags:!0,helpIndent:2,...t,pkg:n,getPackage:i};a.flags===void 0&&(a.flags={}),Ln(a);let o=a.input;if(o&&typeof o==`object`&&!Array.isArray(o)){let{isRequired:e,...t}=o;a.inputOptions=e===void 0?{}:{isRequired:e},a.input=Object.keys(t).length>0?t:`string`}else a.inputOptions={};return a},zn=(e,t)=>{if(e===`--`||dn(e,{separator:`-`})===e)return;let n=[];t.alias!==void 0&&(n=Array.isArray(t.alias)?t.alias:[t.alias]),!n.includes(e)&&(n.push(e),t.alias=n.length===1?n[0]:n)},Bn=({flags:e,booleanDefault:t})=>{let n={};for(let[r,i]of Object.entries(e)){let e={...i};if(e.shortFlag&&(e.alias=e.shortFlag,delete e.shortFlag),t!==void 0&&e.type===`boolean`&&!Object.hasOwn(e,`default`)&&(e.default=e.isMultiple?[t]:t),e.isMultiple&&(e.type=e.type?`${e.type}-array`:`array`,e.default??=[],delete e.isMultiple),Array.isArray(e.aliases)){let t=[...e.aliases];e.alias&&t.push(e.alias),e.alias=t,delete e.aliases}zn(r,e),n[r]=e}return n},Vn=e=>{let t=Bn(e);return t.arguments=e.input,t=Pn(t,{separator:`-`,exclude:[`stopEarly`,`--`]}),e.inferType&&delete t.arguments,e.allowUnknownFlags||(e.autoHelp&&!t.help&&(t.help={type:`boolean`}),e.autoVersion&&!t.version&&(t.version={type:`boolean`})),t=wn(t),t.configuration={...t.configuration,"greedy-arrays":!1,"parse-numbers":e.inferType},e.commands&&(t.configuration[`halt-at-non-option`]=!0),t[`--`]&&(t.configuration[`populate--`]=!0),e.allowUnknownFlags||(t.configuration[`unknown-options-as-args`]=!0),t},Hn=(e,t)=>{for(let[n,r]of Object.entries(t.flags))if(n!==`--`&&!r.isMultiple&&Array.isArray(e[n]))throw Error(`The flag --${n} can only be set once.`)},Un=(e,t,n)=>{let{choices:r,isRequired:i}=t;if(!r)return;let a=`Value must be one of: [\`${r.join("`, `")}\`]`;if(n===void 0)return i?`Flag \`${$(e)}\` has no value. ${a}`:void 0;if(Array.isArray(n)){let t=n.filter(e=>!r.includes(e));if(t.length>0)return`Unknown ${t.length>1?`values`:`value`} for flag \`${$(e)}\`: \`${t.join("`, `")}\`. ${a}`}else if(!r.includes(n))return`Unknown value for flag \`${$(e)}\`: \`${n}\`. ${a}`},Wn=(e,t)=>{let n=[];for(let[r,i]of Object.entries(e)){let e=t[r],a=Un(r,i,e);a&&n.push(a)}if(n.length>0)throw Error(n.join(`
`))},Gn=(e,t)=>{Hn(e,t),Wn(t.flags,e)},Kn=e=>{console.error([`Unknown flag${e.length>1?`s`:``}`,...e].join(`
`))},qn=e=>/^-(?:\d+|\d*\.\d+)(?:e[+-]?\d+)?$/i.test(e),Jn=e=>{let t=e.filter(e=>typeof e==`string`&&e.length>1&&e.startsWith(`-`)&&!qn(e));t.length>0&&(Kn(t),l.default.exit(2))},Yn=(e,t,n,r)=>{let i=t[e],a=!0;if(typeof i.isRequired==`function`&&(a=i.isRequired(n,r),typeof a!=`boolean`))throw TypeError(`Return value for isRequired callback should be of type boolean, but ${typeof a} was returned.`);return(n[e]===void 0||i.isMultiple&&n[e].length===0)&&a},Xn=e=>{console.error(`Missing required flag${e.length>1?`s`:``}`);for(let t of e)console.error(`\t${$(t.key)}${t.shortFlag?`, -${t.shortFlag}`:``}`)},Zn=(e,t)=>{let{isRequired:n}=e.inputOptions;if(n){if(typeof n==`function`){let e=n(t);if(typeof e!=`boolean`)throw TypeError(`Return value for isRequired callback should be of type boolean, but ${typeof e} was returned.`);if(!e)return}t.length===0&&(console.error(`Missing required input`),l.default.exit(2))}},Qn=(e,t,n)=>{let r=[];for(let i of Object.keys(e))e[i].isRequired&&Yn(i,e,t,n)&&r.push({key:i,...e[i]});r.length>0&&(Xn(r),l.default.exit(2))},$n=e=>{if(!e.startsWith(`@`))return e;let t=e.indexOf(`/`);return t===-1?e:e.slice(t+1)},er=e=>{if(!e||typeof e!=`object`)return``;let t=typeof e.name==`string`?e.name:``,n=$n(t),{bin:r}=e;return typeof r==`string`?n:r&&typeof r==`object`?Object.keys(r).at(0)??t:t},tr=(e,t)=>{console.error(e),console.error(`Available commands: ${t.join(`, `)}`)},nr=(e,t,n,r)=>{if(!t.commands)return{command:void 0,input:e};if(e.length===0)return{command:void 0,input:[]};let i=String(e[0]);if(!t.commands.includes(i)){if(!t.allowUnknownFlags&&i.startsWith(`-`)){let r=t.argv.indexOf(`--`),a=!1;if(r!==-1&&(a=!D(t.argv.slice(0,r),n)._.map(String).includes(i)),!a){let t=e.findIndex(e=>typeof e!=`string`||!e.startsWith(`-`));Jn(t===-1?e:e.slice(0,t))}}return tr(`Unknown command: ${i}`,t.commands),r(),{command:void 0,input:[]}}return{command:i,input:e.slice(1)}},rr=({pkg:e,getPackage:t,...n},r)=>{let i=D(n.argv,r),a=``;if(n.help&&(a=de((n.help||``).replace(/\t+\n*$/,``)),a.includes(`
`)&&(a=pe(a,n.helpIndent)),a=`\n${a}`),n.description!==!1){let{description:e}=n;e&&(e=a?pe(`\n${e}\n`,n.helpIndent):`\n${e}`,a=`${e}${a}`)}a+=`
`;let o=e=>{console.log(a),l.default.exit(typeof e==`number`?e:2)},s=()=>{console.log(n.version),l.default.exit(0)};i._.length===0&&n.argv.length===1&&(i.version===!0&&n.autoVersion?s():i.help===!0&&n.autoHelp&&o(0));let{command:c,input:u}=nr(i._,n,r,o);if(delete i._,!n.allowUnknownFlags&&!n.commands){let e=u,t=n.argv.indexOf(`--`);t!==-1&&!Object.hasOwn(n.flags,`--`)&&(e=D(n.argv.slice(0,t),r)._),Jn(e)}let d=W(i,{exclude:[`--`,/^\w$/]}),f={...d};Gn(d,n);for(let e of Object.values(n.flags)){if(Array.isArray(e.aliases))for(let t of e.aliases)delete d[t];delete d[e.shortFlag]}return Qn(n.flags,d,u),Zn(n,u),{input:u,command:c,flags:d,unnormalizedFlags:f,get pkg(){return t?t():e},help:a,showHelp:o,showVersion:s}},ir=(e,t={})=>{let n=Rn(e,t),r=rr(n,Vn(n));return l.default.title=er(n.pkg),r},ar={url:require(`url`).pathToFileURL(__filename).href};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return ir}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return ar}});
//# sourceMappingURL=meowImportMeta-C1QmuJuk.cjs.map
//# debugId=d29ed838-f433-5422-bf53-c5d949c43a3a