@nice-move/prettier-plugin-package-json
Version:
A `prettier` plugin to make `package.json` prettier
1 lines • 87.3 kB
JavaScript
import{createRequire as e}from"node:module";var t={582:e=>{e.exports=function(){return/^\s*([^<(]*?)\s*([<(]([^>)]*?)[>)])?\s*([<(]([^>)]*?)[>)])*\s*$/}},484:e=>{function t(e,t,r){e instanceof RegExp&&(e=i(e,r)),t instanceof RegExp&&(t=i(t,r));var n=s(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function i(e,t){var i=t.match(e);return i?i[0]:null}function s(e,t,i){var s,r,n,o,a,l=i.indexOf(e),c=i.indexOf(t,l+1),h=l;if(l>=0&&c>0){if(e===t)return[l,c];for(s=[],n=i.length;h>=0&&!a;)h==l?(s.push(h),l=i.indexOf(e,h+1)):1==s.length?a=[s.pop(),c]:((r=s.pop())<n&&(n=r,o=c),c=i.indexOf(t,h+1)),h=l<c&&l>=0?l:c;s.length&&(a=[n,o])}return a}e.exports=t,t.range=s},189:(e,t,i)=>{var s=i(486),r=i(484);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),L(function(e){return e.split("\\\\").join(n).split("\\{").join(o).split("\\}").join(a).split("\\,").join(l).split("\\.").join(c)}(e),!0).map(p)):[]};var n="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",l="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function h(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function p(e){return e.split(n).join("\\").split(o).join("{").split(a).join("}").split(l).join(",").split(c).join(".")}function u(e){if(!e)return[""];var t=[],i=r("{","}",e);if(!i)return e.split(",");var s=i.pre,n=i.body,o=i.post,a=s.split(",");a[a.length-1]+="{"+n+"}";var l=u(o);return o.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),t.push.apply(t,a),t}function d(e){return"{"+e+"}"}function f(e){return/^-?0\d/.test(e)}function m(e,t){return e<=t}function g(e,t){return e>=t}function L(e,t){var i=[],n=r("{","}",e);if(!n||/\$$/.test(n.pre))return[e];var o,l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),p=l||c,E=n.body.indexOf(",")>=0;if(!p&&!E)return n.post.match(/,.*\}/)?L(e=n.pre+"{"+n.body+a+n.post):[e];if(p)o=n.body.split(/\.\./);else if(1===(o=u(n.body)).length&&1===(o=L(o[0],!1).map(d)).length)return(y=n.post.length?L(n.post,!1):[""]).map((function(e){return n.pre+o[0]+e}));var S,v=n.pre,y=n.post.length?L(n.post,!1):[""];if(p){var b=h(o[0]),C=h(o[1]),A=Math.max(o[0].length,o[1].length),D=3==o.length?Math.abs(h(o[2])):1,P=m;C<b&&(D*=-1,P=g);var O=o.some(f);S=[];for(var N=b;P(N,C);N+=D){var x;if(c)"\\"===(x=String.fromCharCode(N))&&(x="");else if(x=String(N),O){var w=A-x.length;if(w>0){var I=new Array(w+1).join("0");x=N<0?"-"+I+x.slice(1):I+x}}S.push(x)}}else S=s(o,(function(e){return L(e,!1)}));for(var R=0;R<S.length;R++)for(var $=0;$<y.length;$++){var T=v+S[R]+y[$];(!t||p||T)&&i.push(T)}return i}},486:e=>{e.exports=function(e,i){for(var s=[],r=0;r<e.length;r++){var n=i(e[r],r);t(n)?s.push.apply(s,n):s.push(n)}return s};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},135:(e,t,i)=>{const s=i(76);e.exports=(e,t,{gitHosts:i,protocols:r})=>{if(!e)return;const n=(e=>{const t=e.indexOf("#"),i=e.indexOf("/"),s=e.indexOf("/",i+1),r=e.indexOf(":"),n=/\s/.exec(e),o=e.indexOf("@"),a=!n||t>-1&&n.index>t,l=-1===o||t>-1&&o>t,c=-1===r||t>-1&&r>t,h=-1===s||t>-1&&s>t,p=i>0,u=t>-1?"/"!==e[t-1]:!e.endsWith("/"),d=!e.startsWith(".");return a&&p&&u&&d&&l&&c&&h})(e)?`github:${e}`:e,o=s(n,r);if(!o)return;const a=i.byShortcut[o.protocol],l=i.byDomain[o.hostname.startsWith("www.")?o.hostname.slice(4):o.hostname],c=a||l;if(!c)return;const h=i[a||l];let p=null;r[o.protocol]?.auth&&(o.username||o.password)&&(p=`${o.username}${o.password?":"+o.password:""}`);let u=null,d=null,f=null,m=null;try{if(a){let e=o.pathname.startsWith("/")?o.pathname.slice(1):o.pathname;const t=e.indexOf("@");t>-1&&(e=e.slice(t+1));const i=e.lastIndexOf("/");i>-1?(d=decodeURIComponent(e.slice(0,i)),d||(d=null),f=decodeURIComponent(e.slice(i+1))):f=decodeURIComponent(e),f.endsWith(".git")&&(f=f.slice(0,-4)),o.hash&&(u=decodeURIComponent(o.hash.slice(1))),m="shortcut"}else{if(!h.protocols.includes(o.protocol))return;const e=h.extract(o);if(!e)return;d=e.user&&decodeURIComponent(e.user),f=decodeURIComponent(e.project),u=decodeURIComponent(e.committish),m=r[o.protocol]?.name||o.protocol.slice(0,-1)}}catch(e){if(e instanceof URIError)return;throw e}return[c,d,p,f,u,m,t]}},216:e=>{const t=(...e)=>e.every((e=>e))?e.join(""):"",i=e=>e?encodeURIComponent(e):"",s=e=>e.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),r={sshtemplate:({domain:e,user:i,project:s,committish:r})=>`git@${e}:${i}/${s}.git${t("#",r)}`,sshurltemplate:({domain:e,user:i,project:s,committish:r})=>`git+ssh://git@${e}/${i}/${s}.git${t("#",r)}`,edittemplate:({domain:e,user:s,project:r,committish:n,editpath:o,path:a})=>`https://${e}/${s}/${r}${t("/",o,"/",i(n||"HEAD"),"/",a)}`,browsetemplate:({domain:e,user:s,project:r,committish:n,treepath:o})=>`https://${e}/${s}/${r}${t("/",o,"/",i(n))}`,browsetreetemplate:({domain:e,user:s,project:r,committish:n,treepath:o,path:a,fragment:l,hashformat:c})=>`https://${e}/${s}/${r}/${o}/${i(n||"HEAD")}/${a}${t("#",c(l||""))}`,browseblobtemplate:({domain:e,user:s,project:r,committish:n,blobpath:o,path:a,fragment:l,hashformat:c})=>`https://${e}/${s}/${r}/${o}/${i(n||"HEAD")}/${a}${t("#",c(l||""))}`,docstemplate:({domain:e,user:s,project:r,treepath:n,committish:o})=>`https://${e}/${s}/${r}${t("/",n,"/",i(o))}#readme`,httpstemplate:({auth:e,domain:i,user:s,project:r,committish:n})=>`git+https://${t(e,"@")}${i}/${s}/${r}.git${t("#",n)}`,filetemplate:({domain:e,user:t,project:s,committish:r,path:n})=>`https://${e}/${t}/${s}/raw/${i(r||"HEAD")}/${n}`,shortcuttemplate:({type:e,user:i,project:s,committish:r})=>`${e}:${i}/${s}${t("#",r)}`,pathtemplate:({user:e,project:i,committish:s})=>`${e}/${i}${t("#",s)}`,bugstemplate:({domain:e,user:t,project:i})=>`https://${e}/${t}/${i}/issues`,hashformat:s},n={};n.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:e,user:s,project:r,committish:n,path:o})=>`https://${t(e,"@")}raw.githubusercontent.com/${s}/${r}/${i(n||"HEAD")}/${o}`,gittemplate:({auth:e,domain:i,user:s,project:r,committish:n})=>`git://${t(e,"@")}${i}/${s}/${r}.git${t("#",n)}`,tarballtemplate:({domain:e,user:t,project:s,committish:r})=>`https://codeload.${e}/${t}/${s}/tar.gz/${i(r||"HEAD")}`,extract:e=>{let[,t,i,s,r]=e.pathname.split("/",5);if((!s||"tree"===s)&&(s||(r=e.hash.slice(1)),i&&i.endsWith(".git")&&(i=i.slice(0,-4)),t&&i))return{user:t,project:i,committish:r}}},n.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:e,user:s,project:r,committish:n,treepath:o,path:a,editpath:l})=>`https://${e}/${s}/${r}${t("/",o,"/",i(n||"HEAD"),"/",a,l)}`,tarballtemplate:({domain:e,user:t,project:s,committish:r})=>`https://${e}/${t}/${s}/get/${i(r||"HEAD")}.tar.gz`,extract:e=>{let[,t,i,s]=e.pathname.split("/",4);if(!["get"].includes(s)&&(i&&i.endsWith(".git")&&(i=i.slice(0,-4)),t&&i))return{user:t,project:i,committish:e.hash.slice(1)}}},n.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:e,domain:i,user:s,project:r,committish:n})=>`git+https://${t(e,"@")}${i}/${s}/${r}.git${t("#",n)}`,tarballtemplate:({domain:e,user:t,project:s,committish:r})=>`https://${e}/${t}/${s}/repository/archive.tar.gz?ref=${i(r||"HEAD")}`,extract:e=>{const t=e.pathname.slice(1);if(t.includes("/-/")||t.includes("/archive.tar.gz"))return;const i=t.split("/");let s=i.pop();s.endsWith(".git")&&(s=s.slice(0,-4));const r=i.join("/");return r&&s?{user:r,project:s,committish:e.hash.slice(1)}:void 0}},n.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:e,project:i,committish:s})=>`git@${e}:${i}.git${t("#",s)}`,sshurltemplate:({domain:e,project:i,committish:s})=>`git+ssh://git@${e}/${i}.git${t("#",s)}`,edittemplate:({domain:e,user:s,project:r,committish:n,editpath:o})=>`https://${e}/${s}/${r}${t("/",i(n))}/${o}`,browsetemplate:({domain:e,project:s,committish:r})=>`https://${e}/${s}${t("/",i(r))}`,browsetreetemplate:({domain:e,project:s,committish:r,path:n,hashformat:o})=>`https://${e}/${s}${t("/",i(r))}${t("#",o(n))}`,browseblobtemplate:({domain:e,project:s,committish:r,path:n,hashformat:o})=>`https://${e}/${s}${t("/",i(r))}${t("#",o(n))}`,docstemplate:({domain:e,project:s,committish:r})=>`https://${e}/${s}${t("/",i(r))}`,httpstemplate:({domain:e,project:i,committish:s})=>`git+https://${e}/${i}.git${t("#",s)}`,filetemplate:({user:e,project:s,committish:r,path:n})=>`https://gist.githubusercontent.com/${e}/${s}/raw${t("/",i(r))}/${n}`,shortcuttemplate:({type:e,project:i,committish:s})=>`${e}:${i}${t("#",s)}`,pathtemplate:({project:e,committish:i})=>`${e}${t("#",i)}`,bugstemplate:({domain:e,project:t})=>`https://${e}/${t}`,gittemplate:({domain:e,project:i,committish:s})=>`git://${e}/${i}.git${t("#",s)}`,tarballtemplate:({project:e,committish:t})=>`https://codeload.github.com/gist/${e}/tar.gz/${i(t||"HEAD")}`,extract:e=>{let[,t,i,s]=e.pathname.split("/",4);if("raw"!==s){if(!i){if(!t)return;i=t,t=null}return i.endsWith(".git")&&(i=i.slice(0,-4)),{user:t,project:i,committish:e.hash.slice(1)}}},hashformat:function(e){return e&&"file-"+s(e)}},n.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:e,user:t,project:s,committish:r,path:n})=>`https://${e}/${t}/${s}/blob/${i(r)||"HEAD"}/${n}`,httpstemplate:({domain:e,user:i,project:s,committish:r})=>`https://${e}/${i}/${s}.git${t("#",r)}`,tarballtemplate:({domain:e,user:t,project:s,committish:r})=>`https://${e}/${t}/${s}/archive/${i(r)||"HEAD"}.tar.gz`,bugstemplate:()=>null,extract:e=>{let[,t,i,s]=e.pathname.split("/",4);if(!["archive"].includes(s)&&(i&&i.endsWith(".git")&&(i=i.slice(0,-4)),t&&i))return{user:t,project:i,committish:e.hash.slice(1)}}};for(const[e,t]of Object.entries(n))n[e]=Object.assign({},r,t);e.exports=n},99:(e,t,i)=>{const{LRUCache:s}=i(606),r=i(216),n=i(135),o=i(76),a=new s({max:1e3});class l{constructor(e,t,i,s,r,n,o={}){Object.assign(this,l.#e[e],{type:e,user:t,auth:i,project:s,committish:r,default:n,opts:o})}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){l.#e[e]=t,l.#e.byDomain[t.domain]=e,l.#e.byShortcut[`${e}:`]=e,l.#t[`${e}:`]={name:e}}static fromUrl(e,t){if("string"!=typeof e)return;const i=e+JSON.stringify(t||{});if(!a.has(i)){const s=n(e,t,{gitHosts:l.#e,protocols:l.#t});a.set(i,s?new l(...s):void 0)}return a.get(i)}static parseUrl(e){return o(e)}#i(e,t){if("function"!=typeof e)return null;const i={...this,...this.opts,...t};i.path||(i.path=""),i.path.startsWith("/")&&(i.path=i.path.slice(1)),i.noCommittish&&(i.committish=null);const s=e(i);return i.noGitPlus&&s.startsWith("git+")?s.slice(4):s}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#i(this.sshtemplate,e)}sshurl(e){return this.#i(this.sshurltemplate,e)}browse(e,...t){return"string"!=typeof e?this.#i(this.browsetemplate,e):"string"!=typeof t[0]?this.#i(this.browsetreetemplate,{...t[0],path:e}):this.#i(this.browsetreetemplate,{...t[1],fragment:t[0],path:e})}browseFile(e,...t){return"string"!=typeof t[0]?this.#i(this.browseblobtemplate,{...t[0],path:e}):this.#i(this.browseblobtemplate,{...t[1],fragment:t[0],path:e})}docs(e){return this.#i(this.docstemplate,e)}bugs(e){return this.#i(this.bugstemplate,e)}https(e){return this.#i(this.httpstemplate,e)}git(e){return this.#i(this.gittemplate,e)}shortcut(e){return this.#i(this.shortcuttemplate,e)}path(e){return this.#i(this.pathtemplate,e)}tarball(e){return this.#i(this.tarballtemplate,{...e,noCommittish:!1})}file(e,t){return this.#i(this.filetemplate,{...t,path:e})}edit(e,t){return this.#i(this.edittemplate,{...t,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&"function"==typeof this[this.default]?this[this.default](e):this.sshurl(e)}}for(const[e,t]of Object.entries(r))l.addHost(e,t);e.exports=l},76:(e,t,i)=>{const s=i(16),r=(e,t,i)=>{const s=e.indexOf(i);return e.lastIndexOf(t,s>-1?s:1/0)},n=e=>{try{return new s.URL(e)}catch{}};e.exports=(e,t)=>{const i=t?((e,t)=>{const i=e.indexOf(":"),s=e.slice(0,i+1);if(Object.prototype.hasOwnProperty.call(t,s))return e;const r=e.indexOf("@");return r>-1?r>i?`git+ssh://${e}`:e:e.indexOf("//")===i+1?e:`${e.slice(0,i+1)}//${e.slice(i+1)}`})(e,t):e;return n(i)||n((e=>{const t=r(e,"@","#"),i=r(e,":","#");return i>t&&(e=e.slice(0,i)+"/"+e.slice(i+1)),-1===r(e,":","#")&&-1===e.indexOf("//")&&(e=`git+ssh://${e}`),e})(i))}},797:(e,t,i)=>{e.exports=u,u.Minimatch=d;var s=function(){try{return i(928)}catch(e){}}()||{sep:"/"};u.sep=s.sep;var r=u.GLOBSTAR=d.GLOBSTAR={},n=i(189),o={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="[^/]",l=a+"*?",c="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{}),h=/\/+/;function p(e,t){t=t||{};var i={};return Object.keys(e).forEach((function(t){i[t]=e[t]})),Object.keys(t).forEach((function(e){i[e]=t[e]})),i}function u(e,t,i){return m(t),i||(i={}),!(!i.nocomment&&"#"===t.charAt(0))&&new d(t,i).match(e)}function d(e,t){if(!(this instanceof d))return new d(e,t);m(e),t||(t={}),e=e.trim(),t.allowWindowsEscape||"/"===s.sep||(e=e.split(s.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}function f(e,t){return t||(t=this instanceof d?this.options:{}),e=void 0===e?this.pattern:e,m(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:n(e)}u.filter=function(e,t){return t=t||{},function(i,s,r){return u(i,e,t)}},u.defaults=function(e){if(!e||"object"!=typeof e||!Object.keys(e).length)return u;var t=u,i=function(i,s,r){return t(i,s,p(e,r))};return(i.Minimatch=function(i,s){return new t.Minimatch(i,p(e,s))}).defaults=function(i){return t.defaults(p(e,i)).Minimatch},i.filter=function(i,s){return t.filter(i,p(e,s))},i.defaults=function(i){return t.defaults(p(e,i))},i.makeRe=function(i,s){return t.makeRe(i,p(e,s))},i.braceExpand=function(i,s){return t.braceExpand(i,p(e,s))},i.match=function(i,s,r){return t.match(i,s,p(e,r))},i},d.defaults=function(e){return u.defaults(e).Minimatch},d.prototype.debug=function(){},d.prototype.make=function(){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){this.parseNegate();var i=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,i),i=this.globParts=i.map((function(e){return e.split(h)})),this.debug(this.pattern,i),i=i.map((function(e,t,i){return e.map(this.parse,this)}),this),this.debug(this.pattern,i),i=i.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,i),this.set=i}else this.empty=!0;else this.comment=!0},d.prototype.parseNegate=function(){var e=this.pattern,t=!1,i=0;if(!this.options.nonegate){for(var s=0,r=e.length;s<r&&"!"===e.charAt(s);s++)t=!t,i++;i&&(this.pattern=e.substr(i)),this.negate=t}},u.braceExpand=function(e,t){return f(e,t)},d.prototype.braceExpand=f;var m=function(e){if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};d.prototype.parse=function(e,t){m(e);var i=this.options;if("**"===e){if(!i.noglobstar)return r;e="*"}if(""===e)return"";var s,n="",h=!!i.nocase,p=!1,u=[],d=[],f=!1,L=-1,E=-1,S="."===e.charAt(0)?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=this;function y(){if(s){switch(s){case"*":n+=l,h=!0;break;case"?":n+=a,h=!0;break;default:n+="\\"+s}v.debug("clearStateChar %j %j",s,n),s=!1}}for(var b,C=0,A=e.length;C<A&&(b=e.charAt(C));C++)if(this.debug("%s\t%s %s %j",e,C,n,b),p&&c[b])n+="\\"+b,p=!1;else switch(b){case"/":return!1;case"\\":y(),p=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,C,n,b),f){this.debug(" in class"),"!"===b&&C===E+1&&(b="^"),n+=b;continue}v.debug("call clearStateChar %j",s),y(),s=b,i.noext&&y();continue;case"(":if(f){n+="(";continue}if(!s){n+="\\(";continue}u.push({type:s,start:C-1,reStart:n.length,open:o[s].open,close:o[s].close}),n+="!"===s?"(?:(?!(?:":"(?:",this.debug("plType %j %j",s,n),s=!1;continue;case")":if(f||!u.length){n+="\\)";continue}y(),h=!0;var D=u.pop();n+=D.close,"!"===D.type&&d.push(D),D.reEnd=n.length;continue;case"|":if(f||!u.length||p){n+="\\|",p=!1;continue}y(),n+="|";continue;case"[":if(y(),f){n+="\\"+b;continue}f=!0,E=C,L=n.length,n+=b;continue;case"]":if(C===E+1||!f){n+="\\"+b,p=!1;continue}var P=e.substring(E+1,C);try{RegExp("["+P+"]")}catch(e){var O=this.parse(P,g);n=n.substr(0,L)+"\\["+O[0]+"\\]",h=h||O[1],f=!1;continue}h=!0,f=!1,n+=b;continue;default:y(),p?p=!1:!c[b]||"^"===b&&f||(n+="\\"),n+=b}for(f&&(P=e.substr(E+1),O=this.parse(P,g),n=n.substr(0,L)+"\\["+O[0],h=h||O[1]),D=u.pop();D;D=u.pop()){var N=n.slice(D.reStart+D.open.length);this.debug("setting tail",n,D),N=N.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(e,t,i){return i||(i="\\"),t+t+i+"|"})),this.debug("tail=%j\n %s",N,N,D,n);var x="*"===D.type?l:"?"===D.type?a:"\\"+D.type;h=!0,n=n.slice(0,D.reStart)+x+"\\("+N}y(),p&&(n+="\\\\");var w=!1;switch(n.charAt(0)){case"[":case".":case"(":w=!0}for(var I=d.length-1;I>-1;I--){var R=d[I],$=n.slice(0,R.reStart),T=n.slice(R.reStart,R.reEnd-8),G=n.slice(R.reEnd-8,R.reEnd),F=n.slice(R.reEnd);G+=F;var k=$.split("(").length-1,B=F;for(C=0;C<k;C++)B=B.replace(/\)[+*?]?/,"");var M="";""===(F=B)&&t!==g&&(M="$"),n=$+T+F+M+G}if(""!==n&&h&&(n="(?=.)"+n),w&&(n=S+n),t===g)return[n,h];if(!h)return e.replace(/\\(.)/g,"$1");var U=i.nocase?"i":"";try{var j=new RegExp("^"+n+"$",U)}catch(e){return new RegExp("$.")}return j._glob=e,j._src=n,j};var g={};u.makeRe=function(e,t){return new d(e,t||{}).makeRe()},d.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,i=t.noglobstar?l:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",s=t.nocase?"i":"",n=e.map((function(e){return e.map((function(e){return e===r?i:"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e._src})).join("\\/")})).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,s)}catch(e){this.regexp=!1}return this.regexp},u.match=function(e,t,i){var s=new d(t,i=i||{});return e=e.filter((function(e){return s.match(e)})),s.options.nonull&&!e.length&&e.push(t),e},d.prototype.match=function(e,t){if(void 0===t&&(t=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var i=this.options;"/"!==s.sep&&(e=e.split(s.sep).join("/")),e=e.split(h),this.debug(this.pattern,"split",e);var r,n,o=this.set;for(this.debug(this.pattern,"set",o),n=e.length-1;n>=0&&!(r=e[n]);n--);for(n=0;n<o.length;n++){var a=o[n],l=e;if(i.matchBase&&1===a.length&&(l=[r]),this.matchOne(l,a,t))return!!i.flipNegate||!this.negate}return!i.flipNegate&&this.negate},d.prototype.matchOne=function(e,t,i){var s=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var n=0,o=0,a=e.length,l=t.length;n<a&&o<l;n++,o++){this.debug("matchOne loop");var c,h=t[o],p=e[n];if(this.debug(t,h,p),!1===h)return!1;if(h===r){this.debug("GLOBSTAR",[t,h,p]);var u=n,d=o+1;if(d===l){for(this.debug("** at the end");n<a;n++)if("."===e[n]||".."===e[n]||!s.dot&&"."===e[n].charAt(0))return!1;return!0}for(;u<a;){var f=e[u];if(this.debug("\nglobstar while",e,u,t,d,f),this.matchOne(e.slice(u),t.slice(d),i))return this.debug("globstar found match!",u,a,f),!0;if("."===f||".."===f||!s.dot&&"."===f.charAt(0)){this.debug("dot detected!",e,u,t,d);break}this.debug("globstar swallow a segment, and continue"),u++}return!(!i||(this.debug("\n>>> no match, partial?",e,u,t,d),u!==a))}if("string"==typeof h?(c=p===h,this.debug("string match",h,p,c)):(c=p.match(h),this.debug("pattern match",h,p,c)),!c)return!1}if(n===a&&o===l)return!0;if(n===a)return i;if(o===l)return n===a-1&&""===e[n];throw new Error("wtf?")}},368:e=>{e.exports=function(e){if(!e)return;if("ERROR: No README data found!"===e)return;e=e.trim().split("\n");let t=0;for(;e[t]&&e[t].trim().match(/^(#|$)/);)t++;const i=e.length;let s=t+1;for(;s<i&&e[s].trim();)s++;return e.slice(t,s).join(" ").trim()}},672:(e,t,i)=>{var s=i(139),r=i(788),n=i(336),o=i(99),a=i(995),l=["dependencies","devDependencies","optionalDependencies"],c=i(368),h=i(16),p=i(248),u=e=>e.includes("@")&&e.indexOf("@")<e.lastIndexOf(".");function d(e,t){return e.author&&(e.author=t(e.author)),["maintainers","contributors"].forEach((function(i){Array.isArray(e[i])&&(e[i]=e[i].map(t))})),e}function f(e){if("string"==typeof e)return e;var t=e.name||"",i=e.url||e.web,s=i?" ("+i+")":"",r=e.email||e.mail;return t+(r?" <"+r+">":"")+s}function m(e){if("string"!=typeof e)return e;var t=e.match(/^([^(<]+)/),i=e.match(/\(([^()]+)\)/),s=e.match(/<([^<>]+)>/),r={};return t&&t[0].trim()&&(r.name=t[0].trim()),s&&(r.email=s[1]),i&&(r.url=i[1]),r}e.exports={warn:function(){},fixRepositoryField:function(e){if(e.repositories&&(this.warn("repositories"),e.repository=e.repositories[0]),!e.repository)return this.warn("missingRepository");"string"==typeof e.repository&&(e.repository={type:"git",url:e.repository});var t=e.repository.url||"";if(t){var i=o.fromUrl(t);i&&(t=e.repository.url="shortcut"===i.getDefaultRepresentation()?i.https():i.toString())}t.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",t)},fixTypos:function(e){Object.keys(p.topLevel).forEach((function(t){Object.prototype.hasOwnProperty.call(e,t)&&this.warn("typo",t,p.topLevel[t])}),this)},fixScriptsField:function(e){if(e.scripts)return"object"!=typeof e.scripts?(this.warn("nonObjectScripts"),void delete e.scripts):void Object.keys(e.scripts).forEach((function(t){"string"!=typeof e.scripts[t]?(this.warn("nonStringScript"),delete e.scripts[t]):p.script[t]&&!e.scripts[p.script[t]]&&this.warn("typo",t,p.script[t],"scripts")}),this)},fixFilesField:function(e){var t=e.files;t&&!Array.isArray(t)?(this.warn("nonArrayFiles"),delete e.files):e.files&&(e.files=e.files.filter((function(e){return!(!e||"string"!=typeof e)||(this.warn("invalidFilename",e),!1)}),this))},fixBinField:function(e){if(e.bin&&"string"==typeof e.bin){var t,i={};(t=e.name.match(/^@[^/]+[/](.*)$/))?i[t[1]]=e.bin:i[e.name]=e.bin,e.bin=i}},fixManField:function(e){e.man&&"string"==typeof e.man&&(e.man=[e.man])},fixBundleDependenciesField:function(e){var t="bundledDependencies",i="bundleDependencies";e[t]&&!e[i]&&(e[i]=e[t],delete e[t]),e[i]&&!Array.isArray(e[i])?(this.warn("nonArrayBundleDependencies"),delete e[i]):e[i]&&(e[i]=e[i].filter((function(t){return t&&"string"==typeof t?(e.dependencies||(e.dependencies={}),Object.prototype.hasOwnProperty.call(e.dependencies,t)||(this.warn("nonDependencyBundleDependency",t),e.dependencies[t]="*"),!0):(this.warn("nonStringBundleDependency",t),!1)}),this))},fixDependencies:function(e){!function(e,t){l.forEach((function(i){e[i]&&(e[i]=function(e,t,i){if(!e)return{};if("string"==typeof e&&(e=e.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(e))return e;i("deprecatedArrayDependencies",t);var s={};return e.filter((function(e){return"string"==typeof e})).forEach((function(e){var t=(e=e.trim().split(/(:?[@\s><=])/)).shift(),i=e.join("");i=(i=i.trim()).replace(/^@/,""),s[t]=i})),s}(e[i],i,t))}))}(e,this.warn),function(e){var t=e.optionalDependencies;if(t){var i=e.dependencies||{};Object.keys(t).forEach((function(e){i[e]=t[e]})),e.dependencies=i}}(e,this.warn),this.fixBundleDependenciesField(e),["dependencies","devDependencies"].forEach((function(t){if(t in e)return e[t]&&"object"==typeof e[t]?void Object.keys(e[t]).forEach((function(i){var s=e[t][i];"string"!=typeof s&&(this.warn("nonStringDependency",i,JSON.stringify(s)),delete e[t][i]);var r=o.fromUrl(e[t][i]);r&&(e[t][i]=r.toString())}),this):(this.warn("nonObjectDependencies",t),void delete e[t])}),this)},fixModulesField:function(e){e.modules&&(this.warn("deprecatedModules"),delete e.modules)},fixKeywordsField:function(e){"string"==typeof e.keywords&&(e.keywords=e.keywords.split(/,\s+/)),e.keywords&&!Array.isArray(e.keywords)?(delete e.keywords,this.warn("nonArrayKeywords")):e.keywords&&(e.keywords=e.keywords.filter((function(e){return!("string"!=typeof e||!e)||(this.warn("nonStringKeyword"),!1)}),this))},fixVersionField:function(e,t){var i=!t;if(!e.version)return e.version="",!0;if(!s(e.version,i))throw new Error('Invalid version: "'+e.version+'"');return e.version=r(e.version,i),!0},fixPeople:function(e){d(e,f),d(e,m)},fixNameField:function(e,t){"boolean"==typeof t?t={strict:t}:void 0===t&&(t={});var i=t.strict;if(e.name||i){if("string"!=typeof e.name)throw new Error("name field must be a string.");i||(e.name=e.name.trim()),function(e,t,i){if("."===e.charAt(0)||!function(e){if("@"!==e.charAt(0))return!1;var t=e.slice(1).split("/");return 2===t.length&&(t[0]&&t[1]&&t[0]===encodeURIComponent(t[0])&&t[1]===encodeURIComponent(t[1]))}(e)&&((s=e).match(/[/@\s+%:]/)||s!==encodeURIComponent(s))||t&&!i&&e!==e.toLowerCase()||"node_modules"===e.toLowerCase()||"favicon.ico"===e.toLowerCase())throw new Error("Invalid name: "+JSON.stringify(e));var s}(e.name,i,t.allowLegacyCase),a.builtinModules.includes(e.name)&&this.warn("conflictingName",e.name)}else e.name=""},fixDescriptionField:function(e){e.description&&"string"!=typeof e.description&&(this.warn("nonStringDescription"),delete e.description),e.readme&&!e.description&&(e.description=c(e.readme)),void 0===e.description&&delete e.description,e.description||this.warn("missingDescription")},fixReadmeField:function(e){e.readme||(this.warn("missingReadme"),e.readme="ERROR: No README data found!")},fixBugsField:function(e){if(!e.bugs&&e.repository&&e.repository.url){var t=o.fromUrl(e.repository.url);t&&t.bugs()&&(e.bugs={url:t.bugs()})}else if(e.bugs){if("string"==typeof e.bugs)u(e.bugs)?e.bugs={email:e.bugs}:h.parse(e.bugs).protocol?e.bugs={url:e.bugs}:this.warn("nonEmailUrlBugsString");else{s=e.bugs,r=this.warn,s&&Object.keys(s).forEach((function(e){p.bugs[e]&&(r("typo",e,p.bugs[e],"bugs"),s[p.bugs[e]]=s[e],delete s[e])}));var i=e.bugs;e.bugs={},i.url&&("string"==typeof i.url&&h.parse(i.url).protocol?e.bugs.url=i.url:this.warn("nonUrlBugsUrlField")),i.email&&("string"==typeof i.email&&u(i.email)?e.bugs.email=i.email:this.warn("nonEmailBugsEmailField"))}e.bugs.email||e.bugs.url||(delete e.bugs,this.warn("emptyNormalizedBugs"))}var s,r},fixHomepageField:function(e){if(!e.homepage&&e.repository&&e.repository.url){var t=o.fromUrl(e.repository.url);t&&t.docs()&&(e.homepage=t.docs())}if(e.homepage)return"string"!=typeof e.homepage?(this.warn("nonUrlHomepage"),delete e.homepage):void(h.parse(e.homepage).protocol||(e.homepage="http://"+e.homepage))},fixLicenseField:function(e){const t=e.license||e.licence;return t?"string"!=typeof t||t.length<1||""===t.trim()?this.warn("invalidLicense"):n(t).validForNewPackages?void 0:this.warn("invalidLicense"):this.warn("missingLicense")}}},511:(e,t,i)=>{var s=i(23),r=i(856);function n(e,t,i){return i&&(e=i+"['"+e+"']",t=i+"['"+t+"']"),s.format(r.typo,e,t)}e.exports=function(){var e=Array.prototype.slice.call(arguments,0),t=e.shift();if("typo"===t)return n.apply(null,e);var i=r[t]?r[t]:t+": '%s'";return e.unshift(i),s.format.apply(null,e)}},263:(e,t,i)=>{e.exports=o;var s=i(672);o.fixer=s;var r=i(511),n=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"].map((function(e){return a(e)+"Field"}));function o(e,t,i){!0===t&&(t=null,i=!0),i||(i=!1),t&&!e.private||(t=function(){}),e.scripts&&"node-gyp rebuild"===e.scripts.install&&!e.scripts.preinstall&&(e.gypfile=!0),s.warn=function(){t(r.apply(null,arguments))},n.forEach((function(t){s["fix"+a(t)](e,i)})),e._id=e.name+"@"+e.version}function a(e){return e.charAt(0).toUpperCase()+e.slice(1)}n=n.concat(["dependencies","people","typos"])},33:(e,t,i)=>{const{join:s,basename:r}=i(928),n=e=>(delete e.bin,e),o=e=>{const t=e.bin,i={};let n=!1;return Object.keys(t).forEach((e=>{const o=s("/",r(e.replace(/\\|:/g,"/"))).slice(1);if("string"!=typeof t[e]||!o)return;const a=s("/",t[e].replace(/\\/g,"/")).replace(/\\/g,"/").slice(1);a&&(i[o]=a,n=!0)})),n?e.bin=i:delete e.bin,e};e.exports=e=>e.bin?"string"==typeof e.bin?(e=>e.name?(e.bin={[e.name]:e.bin},o(e)):n(e))(e):Array.isArray(e.bin)?(e=>(e.bin=e.bin.reduce(((e,t)=>(e[r(t)]=t,e)),{}),o(e)))(e):"object"==typeof e.bin?o(e):n(e):n(e)},951:(e,t,i)=>{var s=i(582);e.exports=function(e){if("string"!=typeof e)throw new TypeError("expected author to be a string");if(!e||!/\w/.test(e))return{};var t=[].concat.apply([],s().exec(e)),i={};t[1]&&(i.name=t[1]);for(var r=2;r<t.length;r++){var n=t[r];r%2==0&&n&&t[r+1]&&("<"===n.charAt(0)?(i.email=t[r+1],r++):"("===n.charAt(0)&&(i.url=t[r+1],r++))}return i}},69:(e,t)=>{t.__esModule=!0,t.defaultOptions=void 0,t.defaultOptions={useTabs:!1,tabWidth:2,expandUsers:!1,keyOrder:["$schema","private","name","version","description","license","author","maintainers","contributors","homepage","repository","bugs","type","exports","main","module","browser","man","preferGlobal","bin","files","directories","scripts","config","sideEffects","types","typings","workspaces","resolutions","dependencies","bundleDependencies","bundledDependencies","peerDependencies","peerDependenciesMeta","optionalDependencies","devDependencies","keywords","engines","engineStrict","os","cpu","publishConfig"]}},858:function(e,t,i){var s=this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,i=1,s=arguments.length;i<s;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s.apply(this,arguments)},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.check=t.format=void 0;var n=i(981),o=r(i(280)),a=i(69),l=r(i(172)),c=r(i(911)),h=r(i(414)),p=r(i(377));function u(e,t){var i=d(t),r=s(s(s(s(s(s(s(s(s(s(s(s(s(s(s(s(s(s(s(s(s({},e),(0,c.default)("author",e,t)),(0,c.default)("maintainers",e,s(s({},t),{enforceMultiple:!0}))),(0,c.default)("contributors",e,s(s({},t),{enforceMultiple:!0}))),m("man",e)),m("bin",e)),(0,h.default)(e)),m("directories",e)),(0,p.default)(e.scripts)),m("config",e)),(0,l.default)("optionalDependencies",e)),(0,l.default)("dependencies",e)),(0,l.default)("bundleDependencies",e)),(0,l.default)("bundledDependencies",e)),(0,l.default)("peerDependencies",e)),(0,l.default)("devDependencies",e)),m("keywords",e)),m("engines",e)),m("os",e)),m("cpu",e)),m("publishConfig",e));return f((0,o.default)(r,i.keyOrder),i)}function d(e){var t=(0,n.cosmiconfigSync)("prettier-package-json").search();return s(s(s({},a.defaultOptions),null==t?void 0:t.config),e)}function f(e,t){var i=t.useTabs?"\t":t.tabWidth;return JSON.stringify(e,null,i)+"\n"}function m(e,t){var i,s,r=t[e];if(Array.isArray(r))return 0===r.length?{}:((i={})[e]=r.sort(),i);if("object"==typeof r){var n=Object.keys(r);return 0===n.length?{}:((s={})[e]=(0,o.default)(r,n.sort()),s)}return{}}t.format=u,t.check=function(e,t){try{var i=d(t),s="string"==typeof e?JSON.parse(e):e,r=u(s,i);return f(s,i)===r}catch(e){return!1}}},911:function(e,t,i){var s=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var s,r=0,n=t.length;r<n;r++)!s&&r in t||(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var n=r(i(951)),o=r(i(280)),a=r(i(644)),l=function(e){return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var s=t.map((function(t){return t[e]})),r=s[0],n=s[1];return r!==n?r<n?-1:1:0}};function c(e){return e?Array.isArray(e)?e.reduce((function(e,t){return s(s([],e,!0),c(t),!0)}),[]):"object"==typeof e?[e]:"string"==typeof e?[(0,n.default)(e)]:[]:[]}function h(e){return[e.name,e.email?"<".concat(e.email,">"):void 0,e.url?"(".concat(e.url,")"):void 0].filter(Boolean).join(" ")}t.default=function(e,t,i){var s,r;void 0===i&&(i={});var n=l("name"),p=l("email"),u=c(t[e]).map((function(e){return(0,o.default)(e,["name","email","url"])})).sort((0,a.default)(n,p));switch(u.length){case 0:return{};case 1:if(!i.enforceMultiple)return(s={})[e]=i.expandUsers?u[0]:h(u[0]),s;default:return(r={})[e]=i.expandUsers?u:u.map(h),r}}},172:function(e,t,i){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var r=s(i(280));function n(e,t){return e.localeCompare(t,"en")}t.default=function(e,t){var i,s=t[e],o=Object.keys(s||{});return 0===o.length?{}:((i={})[e]=(0,r.default)(s,o.sort(n)),i)}},414:function(e,t,i){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var r=s(i(797)),n=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.some((function(e){return e(t)}))}},o=[/^package.json$/,/^README.*/i,/^CHANGE(S|LOG).*/i,/^HISTORY.*/i,/^LICEN(C|S)E.*/i,/^NOTICE.*/i].map((function(e){return function(t){return e.test(t)}})).reduce((function(e,t){return n(e,t)})),a=[".git","CVS",".svn",".hg",".lock-wscript",".wafpickle-N",".*.swp",".DS_Store","._*","npm-debug.log",".npmrc","node_modules","config.gypi","*.orig","package-lock.json"].map((function(e){return r.default.filter(e)})).reduce((function(e,t){return n(e,t)}));t.default=function(e){var t,i=e.files,s=void 0===i?[]:i,r=e.main,l=n(o,a,(function(e){return e===r})),c=s.filter((t=l,function(e){return!t(e)})).sort().sort((function(e,t){return e.endsWith("/")&&!t.endsWith("/")?-1:!e.endsWith("/")&&t.endsWith("/")?1:0})).sort((function(e,t){return e.startsWith("!")&&!t.startsWith("!")?1:!e.startsWith("!")&&t.startsWith("!")?-1:0}));return c.length>0?{files:c}:{}}},377:function(e,t,i){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var r=s(i(280)),n=s(i(644)),o=/^(pre|post)/,a=/([:/])/,l=["install","prepare","pack","publish","restart","start","stop","test","version","uninstall"];function c(e,t){if("prepublishOnly"===t)return{prefix:"pre",base:"publish",original:t};var i=o.exec(t),s=i?i[0]:void 0,r=s?t.slice(s.length):t;return(null==e?void 0:e.hasOwnProperty(r))||l.includes(r)?{prefix:s,base:r,original:t}:{prefix:void 0,base:t,original:t}}t.default=function(e){var t=Object.keys(e||{}),i=(0,n.default)(function(e){return function(t,i){for(var s=c(e,t),r=c(e,i),n=s.base.split(a),o=r.base.split(a),l=n.length,h=o.length,p=0;p<Math.min(l,h);p++)if(n[p]!==o[p])return n[p]<o[p]?-1:1;return l!==h?l<h?-1:1:0}}(e),function(e){return function(t,i){var s=c(e,t),r=c(e,i);return"pre"===s.prefix||"post"===r.prefix?-1:"post"===s.prefix||"pre"===r.prefix?1:s.base!==r.base?s.base<r.base?-1:1:0}}(e));return 0===t.length?{}:{scripts:(0,r.default)(e,t.sort(i))}}},642:(e,t,i)=>{const s=i(742),{MAX_LENGTH:r,MAX_SAFE_INTEGER:n}=i(120),{safeRe:o,t:a}=i(532),l=i(305),{compareIdentifiers:c}=i(1);class h{constructor(e,t){if(t=l(t),e instanceof h){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>r)throw new TypeError(`version is longer than ${r} characters`);s("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const i=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<n)return t}return e})):this.prerelease=[],this.build=i[5]?i[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(e){if(s("SemVer.compare",this.version,this.options,e),!(e instanceof h)){if("string"==typeof e&&e===this.version)return 0;e=new h(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof h||(e=new h(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof h||(e=new h(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const i=this.prerelease[t],r=e.prerelease[t];if(s("prerelease compare",t,i,r),void 0===i&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===i)return-1;if(i!==r)return c(i,r)}while(++t)}compareBuild(e){e instanceof h||(e=new h(e,this.options));let t=0;do{const i=this.build[t],r=e.build[t];if(s("build compare",t,i,r),void 0===i&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===i)return-1;if(i!==r)return c(i,r)}while(++t)}inc(e,t,i){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,i),this.inc("pre",t,i);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,i),this.inc("pre",t,i);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(i)?1:0;if(!t&&!1===i)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let s=this.prerelease.length;for(;--s>=0;)"number"==typeof this.prerelease[s]&&(this.prerelease[s]++,s=-2);if(-1===s){if(t===this.prerelease.join(".")&&!1===i)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let s=[t,e];!1===i&&(s=[t]),0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=h},788:(e,t,i)=>{const s=i(86);e.exports=(e,t)=>{const i=s(e.trim().replace(/^[=v]+/,""),t);return i?i.version:null}},86:(e,t,i)=>{const s=i(642);e.exports=(e,t,i=!1)=>{if(e instanceof s)return e;try{return new s(e,t)}catch(e){if(!i)return null;throw e}}},139:(e,t,i)=>{const s=i(86);e.exports=(e,t)=>{const i=s(e,t);return i?i.version:null}},120:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},742:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},1:e=>{const t=/^[0-9]+$/,i=(e,i)=>{const s=t.test(e),r=t.test(i);return s&&r&&(e=+e,i=+i),e===i?0:s&&!r?-1:r&&!s?1:e<i?-1:1};e.exports={compareIdentifiers:i,rcompareIdentifiers:(e,t)=>i(t,e)}},305:e=>{const t=Object.freeze({loose:!0}),i=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:i},532:(e,t,i)=>{const{MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:n}=i(120),o=i(742),a=(t=e.exports={}).re=[],l=t.safeRe=[],c=t.src=[],h=t.t={};let p=0;const u="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",n],[u,r]],f=(e,t,i)=>{const s=(e=>{for(const[t,i]of d)e=e.split(`${t}*`).join(`${t}{0,${i}}`).split(`${t}+`).join(`${t}{1,${i}}`);return e})(t),r=p++;o(e,r,t),h[e]=r,c[r]=t,a[r]=new RegExp(t,i?"g":void 0),l[r]=new RegExp(s,i?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u}*`),f("MAINVERSION",`(${c[h.NUMERICIDENTIFIER]})\\.(${c[h.NUMERICIDENTIFIER]})\\.(${c[h.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${c[h.NUMERICIDENTIFIERLOOSE]})\\.(${c[h.NUMERICIDENTIFIERLOOSE]})\\.(${c[h.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${c[h.NUMERICIDENTIFIER]}|${c[h.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${c[h.NUMERICIDENTIFIERLOOSE]}|${c[h.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${c[h.PRERELEASEIDENTIFIER]}(?:\\.${c[h.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${c[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[h.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${u}+`),f("BUILD",`(?:\\+(${c[h.BUILDIDENTIFIER]}(?:\\.${c[h.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${c[h.MAINVERSION]}${c[h.PRERELEASE]}?${c[h.BUILD]}?`),f("FULL",`^${c[h.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${c[h.MAINVERSIONLOOSE]}${c[h.PRERELEASELOOSE]}?${c[h.BUILD]}?`),f("LOOSE",`^${c[h.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${c[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${c[h.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${c[h.XRANGEIDENTIFIER]})(?:\\.(${c[h.XRANGEIDENTIFIER]})(?:\\.(${c[h.XRANGEIDENTIFIER]})(?:${c[h.PRERELEASE]})?${c[h.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${c[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[h.XRANGEIDENTIFIERLOOSE]})(?:${c[h.PRERELEASELOOSE]})?${c[h.BUILD]}?)?)?`),f("XRANGE",`^${c[h.GTLT]}\\s*${c[h.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${c[h.GTLT]}\\s*${c[h.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${s}})(?:\\.(\\d{1,${s}}))?(?:\\.(\\d{1,${s}}))?`),f("COERCE",`${c[h.COERCEPLAIN]}(?:$|[^\\d])`),f("COERCEFULL",c[h.COERCEPLAIN]+`(?:${c[h.PRERELEASE]})?`+`(?:${c[h.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",c[h.COERCE],!0),f("COERCERTLFULL",c[h.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${c[h.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${c[h.LONETILDE]}${c[h.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${c[h.LONETILDE]}${c[h.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${c[h.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${c[h.LONECARET]}${c[h.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${c[h.LONECARET]}${c[h.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${c[h.GTLT]}\\s*(${c[h.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${c[h.GTLT]}\\s*(${c[h.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${c[h.GTLT]}\\s*(${c[h.LOOSEPLAIN]}|${c[h.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${c[h.XRANGEPLAIN]})\\s+-\\s+(${c[h.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${c[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[h.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},280:e=>{e.exports=function(e,t){var i,s;"function"==typeof t?s=t:i=t;var r=Object.keys(e);return(i||[]).concat(r.sort(s)).reduce((function(t,i){return-1!==r.indexOf(i)&&(t[i]=e[i]),t}),Object.create(null))}},644:(e,t)=>{function i(e,t){var s=e[0],r=e.slice(1),n=s&&t(s);return void 0===n&&r.length?i(r,t):n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,s){return i(e,function(e,t){return function(i){var s=i(e,t);return 0===s?void 0:s}}(t,s))||0}}},54:(e,t,i)=>{var s=i(771),r=i(269);function n(e){try{return s(e),!0}catch(e){return!1}}function o(e,t){var i=t[0].length-e[0].length;return 0!==i?i:e[0].toUpperCase().localeCompare(t[0].toUpperCase())}var a=[["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(o),l=[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-1!==e.indexOf("3.0")?e+"-or-later":e+"-only"},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=r.map((function(e){var t=/^(.*)-\d+\.\d+$/.exec(e);return t?[t[0],t[1]]:[e,null]})).reduce((function(e,t){var i=t[1];return e[i]=e[i]||[],e[i].push(t[0]),e}),{}),h=Object.keys(c).map((function(e){return[e,c[e]]})).filter((function(e){return 1===e[1].length&&null!==e[0]&&"APL"!==e[0]})).map((function(e){return[e[0],e[1][0]]}));c=void 0;var p=[["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(h).sort(o),u=function(e){for(var t=0;t<l.length;t++){var i=l[t](e).trim();if(i!==e&&n(i))return i}return null},d=function(e){for(var t=e.toUpperCase(),i=0;i<p.length;i++){var s=p[i];if(t.indexOf(s[0])>-1)return s[1]}return null},f=function(e,t){for(var i=0;i<a.length;i++){var s=a[i],r=s[0];if(e.indexOf(r)>-1){var n=t(e.replace(r,s[1]));if(null!==n)return n}}return null};e.exports=function(e,t){var i=void 0===(t=t||{}).upgrade||!!t.upgrade;function s(e){return i?function(e){return-1!==["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(e)?e+"-only":-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)?e.replace(/\+$/,"-or-later"):-1!==["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(e)?e+"-or-later":e}(e):e}if("string"!=typeof e||0===e.trim().length)throw Error("Invalid argument. Expected non-empty string.");if(n(e=e.trim()))return s(e);var r=e.replace(/\+$/,"").trim();if(n(r))return s(r);var o=u(e);return null!==o||null!==(o=f(e,(function(e){return n(e)?e:u(e)})))||null!==(o=d(e))||null!==(o=f(e,d))?s(o):null}},771:(e,t,i)=>{var s=i(186),r=i(580);e.exports=function(e){return r(s(e))}},580:e=>{e.exports=function(e){var t=0;function i(){return t<e.length}function s(){return i()?e[t]:null}function r(){if(!i())throw new Error;t++}function n(e){var t=s();if(t&&"OPERATOR"===t.type&&e===t.string)return r(),t.string}function o(e,t){return function i(){var s=t();if(s){if(!n(e))return s;var r=i();if(!r)throw new Error("Expected expression");return{left:s,conjunction:e.toLowerCase(),right:r}}}}var a=o("AND",(function(){return function(){if(n("(")){var e=l();if(!n(")"))throw new Error("Expected `)`");return e}}()||function(){var e=t,i="",o=s();if("DOCUMENTREF"===o.type&&(r(),i+="DocumentRef-"+o.string+":",!n(":")))throw new Error("Expected `:` after `DocumentRef-...`");if("LICENSEREF"===(o=s()).type)return r(),{license:i+="LicenseRef-"+o.string};t=e}()||functi