@ministryofjustice/hmpps-digital-prison-reporting-frontend
Version:
The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.
8 lines (7 loc) • 105 kB
JavaScript
var Mo=Object.create;var ft=Object.defineProperty;var To=Object.getOwnPropertyDescriptor;var Io=Object.getOwnPropertyNames;var No=Object.getPrototypeOf,Po=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),jo=(t,e)=>{for(var r in e)ft(t,r,{get:e[r],enumerable:!0})},Ur=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Io(e))!Po.call(t,i)&&i!==r&&ft(t,i,{get:()=>e[i],enumerable:!(n=To(e,i))||n.enumerable});return t};var Gr=(t,e,r)=>(r=t!=null?Mo(No(t)):{},Ur(e||!t||!t.__esModule?ft(r,"default",{value:t,enumerable:!0}):r,t)),Bo=t=>Ur(ft({},"__esModule",{value:!0}),t);var zr=w((nu,Nt)=>{var qo=Object.prototype.hasOwnProperty;function $r(t){return"[Throws: "+(t?t.message:"?")+"]"}function Fo(t,e){if(qo.call(t,e))try{return t[e]}catch(r){return $r(r)}return t[e]}function Vr(t){var e=[];function r(n){if(n===null||typeof n!="object")return n;if(e.indexOf(n)!==-1)return"[Circular]";if(e.push(n),typeof n.toJSON=="function")try{var i=r(n.toJSON());return e.pop(),i}catch(a){return $r(a)}if(Array.isArray(n)){var o=n.map(r);return e.pop(),o}var s=Object.keys(n).reduce(function(a,u){return a[u]=r(Fo(n,u)),a},{});return e.pop(),s}return r(t)}Nt.exports=function(t,e,r){return JSON.stringify(Vr(t),e,r)};Nt.exports.ensureProperties=Vr});var Qr=w((iu,Wr)=>{var U=require("fs"),Fe=require("path");Wr.exports=ht;ht.ncp=ht;function ht(t,e,r,n){var i=n;n||(i=r,r={});var o=process.cwd(),s=Fe.resolve(o,t),a=Fe.resolve(o,e),u=r.filter,l=r.rename,c=r.transform,d=r.clobber!==!1,f=r.modified,h=r.dereference,g=null,m=0,k=0,v=0,S=r.limit||ht.limit||16;S=S<1?1:S>512?512:S,T(s);function T(y){if(m++,u){if(u instanceof RegExp){if(!u.test(y))return Q(!0)}else if(typeof u=="function"&&!u(y))return Q(!0)}return b(y)}function b(y){var E=h?U.stat:U.lstat;if(v>=S)return setImmediate(function(){b(y)});v++,E(y,function(R,L){var V={};if(R)return W(R);if(V.name=y,V.mode=L.mode,V.mtime=L.mtime,V.atime=L.atime,L.isDirectory())return $(V);if(L.isFile())return C(V);if(L.isSymbolicLink())return _(y)})}function C(y){var E=y.name.replace(s,a);l&&(E=l(E)),re(E,function(R){if(R)return ee(y,E);if(d&&z(E,function(){ee(y,E)}),f){var L=h?U.stat:U.lstat;L(E,function(V,qe){if(y.mtime.getTime()>qe.mtime.getTime())ee(y,E);else return Q()})}else return Q()})}function ee(y,E){var R=U.createReadStream(y.name),L=U.createWriteStream(E,{mode:y.mode});R.on("error",W),L.on("error",W),c?c(R,L,y):L.on("open",function(){R.pipe(L)}),L.once("finish",function(){f&&U.utimesSync(E,y.atime,y.mtime),Q()})}function z(y,E){U.unlink(y,function(R){return R?W(R):E()})}function $(y){var E=y.name.replace(s,a);re(E,function(R){if(R)return M(y,E);ie(y.name)})}function M(y,E){U.mkdir(E,y.mode,function(R){if(R)return W(R);ie(y.name)})}function ie(y){U.readdir(y,function(E,R){return E?W(E):(R.forEach(function(L){T(Fe.join(y,L))}),Q())})}function _(y){var E=y.replace(s,a);U.readlink(y,function(R,L){if(R)return W(R);K(L,E)})}function K(y,E){h&&(y=Fe.resolve(o,y)),re(E,function(R){if(R)return te(y,E);U.readlink(E,function(L,V){return L?W(L):(h&&(V=Fe.resolve(o,V)),V===y?Q():z(E,function(){te(y,E)}))})})}function te(y,E){U.symlink(y,E,function(R){return R?W(R):Q()})}function re(y,E){U.lstat(y,function(R){return R&&R.code==="ENOENT"?E(!0):E(!1)})}function W(y){return r.stopOnError?i(y):(!g&&r.errs?g=U.createWriteStream(r.errs):g||(g=[]),typeof g.write>"u"?g.push(y):g.write(y.stack+`
`),Q())}function Q(y){if(y||v--,k++,m===k&&v===0&&i!==void 0)return i(g||null)}}});var Yr=w((ou,Jr)=>{Jr.exports=function(t,e){for(var r=[],n=0;n<t.length;n++){var i=e(t[n],n);Uo(i)?r.push.apply(r,i):r.push(i)}return r};var Uo=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"}});var en=w((su,Zr)=>{"use strict";Zr.exports=Hr;function Hr(t,e,r){t instanceof RegExp&&(t=Xr(t,r)),e instanceof RegExp&&(e=Xr(e,r));var n=Kr(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function Xr(t,e){var r=e.match(t);return r?r[0]:null}Hr.range=Kr;function Kr(t,e,r){var n,i,o,s,a,u=r.indexOf(t),l=r.indexOf(e,u+1),c=u;if(u>=0&&l>0){if(t===e)return[u,l];for(n=[],o=r.length;c>=0&&!a;)c==u?(n.push(c),u=r.indexOf(t,c+1)):n.length==1?a=[n.pop(),l]:(i=n.pop(),i<o&&(o=i,s=l),l=r.indexOf(e,c+1)),c=u<l&&u>=0?u:l;n.length&&(a=[o,s])}return a}});var ln=w((au,un)=>{var Go=Yr(),tn=en();un.exports=zo;var rn="\0SLASH"+Math.random()+"\0",nn="\0OPEN"+Math.random()+"\0",jt="\0CLOSE"+Math.random()+"\0",on="\0COMMA"+Math.random()+"\0",sn="\0PERIOD"+Math.random()+"\0";function Pt(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function $o(t){return t.split("\\\\").join(rn).split("\\{").join(nn).split("\\}").join(jt).split("\\,").join(on).split("\\.").join(sn)}function Vo(t){return t.split(rn).join("\\").split(nn).join("{").split(jt).join("}").split(on).join(",").split(sn).join(".")}function an(t){if(!t)return[""];var e=[],r=tn("{","}",t);if(!r)return t.split(",");var n=r.pre,i=r.body,o=r.post,s=n.split(",");s[s.length-1]+="{"+i+"}";var a=an(o);return o.length&&(s[s.length-1]+=a.shift(),s.push.apply(s,a)),e.push.apply(e,s),e}function zo(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),Re($o(t),!0).map(Vo)):[]}function Wo(t){return"{"+t+"}"}function Qo(t){return/^-?0\d/.test(t)}function Jo(t,e){return t<=e}function Yo(t,e){return t>=e}function Re(t,e){var r=[],n=tn("{","}",t);if(!n||/\$$/.test(n.pre))return[t];var i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),s=i||o,a=n.body.indexOf(",")>=0;if(!s&&!a)return n.post.match(/,.*\}/)?(t=n.pre+"{"+n.body+jt+n.post,Re(t)):[t];var u;if(s)u=n.body.split(/\.\./);else if(u=an(n.body),u.length===1&&(u=Re(u[0],!1).map(Wo),u.length===1)){var c=n.post.length?Re(n.post,!1):[""];return c.map(function(_){return n.pre+u[0]+_})}var l=n.pre,c=n.post.length?Re(n.post,!1):[""],d;if(s){var f=Pt(u[0]),h=Pt(u[1]),g=Math.max(u[0].length,u[1].length),m=u.length==3?Math.abs(Pt(u[2])):1,k=Jo,v=h<f;v&&(m*=-1,k=Yo);var S=u.some(Qo);d=[];for(var T=f;k(T,h);T+=m){var b;if(o)b=String.fromCharCode(T),b==="\\"&&(b="");else if(b=String(T),S){var C=g-b.length;if(C>0){var ee=new Array(C+1).join("0");T<0?b="-"+ee+b.slice(1):b=ee+b}}d.push(b)}}else d=Go(u,function(ie){return Re(ie,!1)});for(var z=0;z<d.length;z++)for(var $=0;$<c.length;$++){var M=l+d[z]+c[$];(!e||s||M)&&r.push(M)}return r}});var pt=w((uu,gn)=>{gn.exports=J;J.Minimatch=P;var Ue=function(){try{return require("path")}catch{}}()||{sep:"/"};J.sep=Ue.sep;var Ft=J.GLOBSTAR=P.GLOBSTAR={},Xo=ln(),cn={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},Bt="[^/]",qt=Bt+"*?",Ho="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Ko="(?:(?!(?:\\/|^)\\.).)*?",fn=Zo("().*{}+?[]^$\\!");function Zo(t){return t.split("").reduce(function(e,r){return e[r]=!0,e},{})}var hn=/\/+/;J.filter=es;function es(t,e){return e=e||{},function(r,n,i){return J(r,t,e)}}function he(t,e){e=e||{};var r={};return Object.keys(t).forEach(function(n){r[n]=t[n]}),Object.keys(e).forEach(function(n){r[n]=e[n]}),r}J.defaults=function(t){if(!t||typeof t!="object"||!Object.keys(t).length)return J;var e=J,r=function(i,o,s){return e(i,o,he(t,s))};return r.Minimatch=function(i,o){return new e.Minimatch(i,he(t,o))},r.Minimatch.defaults=function(i){return e.defaults(he(t,i)).Minimatch},r.filter=function(i,o){return e.filter(i,he(t,o))},r.defaults=function(i){return e.defaults(he(t,i))},r.makeRe=function(i,o){return e.makeRe(i,he(t,o))},r.braceExpand=function(i,o){return e.braceExpand(i,he(t,o))},r.match=function(n,i,o){return e.match(n,i,he(t,o))},r};P.defaults=function(t){return J.defaults(t).Minimatch};function J(t,e,r){return gt(e),r||(r={}),!r.nocomment&&e.charAt(0)==="#"?!1:new P(e,r).match(t)}function P(t,e){if(!(this instanceof P))return new P(t,e);gt(t),e||(e={}),t=t.trim(),!e.allowWindowsEscape&&Ue.sep!=="/"&&(t=t.split(Ue.sep).join("/")),this.options=e,this.set=[],this.pattern=t,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}P.prototype.debug=function(){};P.prototype.make=ts;function ts(){var t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate();var r=this.globSet=this.braceExpand();e.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,r),r=this.globParts=r.map(function(n){return n.split(hn)}),this.debug(this.pattern,r),r=r.map(function(n,i,o){return n.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(n){return n.indexOf(!1)===-1}),this.debug(this.pattern,r),this.set=r}P.prototype.parseNegate=rs;function rs(){var t=this.pattern,e=!1,r=this.options,n=0;if(!r.nonegate){for(var i=0,o=t.length;i<o&&t.charAt(i)==="!";i++)e=!e,n++;n&&(this.pattern=t.substr(n)),this.negate=e}}J.braceExpand=function(t,e){return dn(t,e)};P.prototype.braceExpand=dn;function dn(t,e){return e||(this instanceof P?e=this.options:e={}),t=typeof t>"u"?this.pattern:t,gt(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:Xo(t)}var ns=1024*64,gt=function(t){if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>ns)throw new TypeError("pattern is too long")};P.prototype.parse=is;var dt={};function is(t,e){gt(t);var r=this.options;if(t==="**")if(r.noglobstar)t="*";else return Ft;if(t==="")return"";var n="",i=!!r.nocase,o=!1,s=[],a=[],u,l=!1,c=-1,d=-1,f=t.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",h=this;function g(){if(u){switch(u){case"*":n+=qt,i=!0;break;case"?":n+=Bt,i=!0;break;default:n+="\\"+u;break}h.debug("clearStateChar %j %j",u,n),u=!1}}for(var m=0,k=t.length,v;m<k&&(v=t.charAt(m));m++){if(this.debug("%s %s %s %j",t,m,n,v),o&&fn[v]){n+="\\"+v,o=!1;continue}switch(v){case"/":return!1;case"\\":g(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",t,m,n,v),l){this.debug(" in class"),v==="!"&&m===d+1&&(v="^"),n+=v;continue}h.debug("call clearStateChar %j",u),g(),u=v,r.noext&&g();continue;case"(":if(l){n+="(";continue}if(!u){n+="\\(";continue}s.push({type:u,start:m-1,reStart:n.length,open:cn[u].open,close:cn[u].close}),n+=u==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",u,n),u=!1;continue;case")":if(l||!s.length){n+="\\)";continue}g(),i=!0;var S=s.pop();n+=S.close,S.type==="!"&&a.push(S),S.reEnd=n.length;continue;case"|":if(l||!s.length||o){n+="\\|",o=!1;continue}g(),n+="|";continue;case"[":if(g(),l){n+="\\"+v;continue}l=!0,d=m,c=n.length,n+=v;continue;case"]":if(m===d+1||!l){n+="\\"+v,o=!1;continue}var T=t.substring(d+1,m);try{RegExp("["+T+"]")}catch{var b=this.parse(T,dt);n=n.substr(0,c)+"\\["+b[0]+"\\]",i=i||b[1],l=!1;continue}i=!0,l=!1,n+=v;continue;default:g(),o?o=!1:fn[v]&&!(v==="^"&&l)&&(n+="\\"),n+=v}}for(l&&(T=t.substr(d+1),b=this.parse(T,dt),n=n.substr(0,c)+"\\["+b[0],i=i||b[1]),S=s.pop();S;S=s.pop()){var C=n.slice(S.reStart+S.open.length);this.debug("setting tail",n,S),C=C.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(L,V,qe){return qe||(qe="\\"),V+V+qe+"|"}),this.debug(`tail=%j
%s`,C,C,S,n);var ee=S.type==="*"?qt:S.type==="?"?Bt:"\\"+S.type;i=!0,n=n.slice(0,S.reStart)+ee+"\\("+C}g(),o&&(n+="\\\\");var z=!1;switch(n.charAt(0)){case"[":case".":case"(":z=!0}for(var $=a.length-1;$>-1;$--){var M=a[$],ie=n.slice(0,M.reStart),_=n.slice(M.reStart,M.reEnd-8),K=n.slice(M.reEnd-8,M.reEnd),te=n.slice(M.reEnd);K+=te;var re=ie.split("(").length-1,W=te;for(m=0;m<re;m++)W=W.replace(/\)[+*?]?/,"");te=W;var Q="";te===""&&e!==dt&&(Q="$");var y=ie+_+te+Q+K;n=y}if(n!==""&&i&&(n="(?=.)"+n),z&&(n=f+n),e===dt)return[n,i];if(!i)return ss(t);var E=r.nocase?"i":"";try{var R=new RegExp("^"+n+"$",E)}catch{return new RegExp("$.")}return R._glob=t,R._src=n,R}J.makeRe=function(t,e){return new P(t,e||{}).makeRe()};P.prototype.makeRe=os;function os(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?qt:e.dot?Ho:Ko,n=e.nocase?"i":"",i=t.map(function(o){return o.map(function(s){return s===Ft?r:typeof s=="string"?as(s):s._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch{this.regexp=!1}return this.regexp}J.match=function(t,e,r){r=r||{};var n=new P(e,r);return t=t.filter(function(i){return n.match(i)}),n.options.nonull&&!t.length&&t.push(e),t};P.prototype.match=function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var n=this.options;Ue.sep!=="/"&&(e=e.split(Ue.sep).join("/")),e=e.split(hn),this.debug(this.pattern,"split",e);var i=this.set;this.debug(this.pattern,"set",i);var o,s;for(s=e.length-1;s>=0&&(o=e[s],!o);s--);for(s=0;s<i.length;s++){var a=i[s],u=e;n.matchBase&&a.length===1&&(u=[o]);var l=this.matchOne(u,a,r);if(l)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate};P.prototype.matchOne=function(t,e,r){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,o=0,s=t.length,a=e.length;i<s&&o<a;i++,o++){this.debug("matchOne loop");var u=e[o],l=t[i];if(this.debug(e,u,l),u===!1)return!1;if(u===Ft){this.debug("GLOBSTAR",[e,u,l]);var c=i,d=o+1;if(d===a){for(this.debug("** at the end");i<s;i++)if(t[i]==="."||t[i]===".."||!n.dot&&t[i].charAt(0)===".")return!1;return!0}for(;c<s;){var f=t[c];if(this.debug(`
globstar while`,t,c,e,d,f),this.matchOne(t.slice(c),e.slice(d),r))return this.debug("globstar found match!",c,s,f),!0;if(f==="."||f===".."||!n.dot&&f.charAt(0)==="."){this.debug("dot detected!",t,c,e,d);break}this.debug("globstar swallow a segment, and continue"),c++}return!!(r&&(this.debug(`
>>> no match, partial?`,t,c,e,d),c===s))}var h;if(typeof u=="string"?(h=l===u,this.debug("string match",u,l,h)):(h=l.match(u),this.debug("pattern match",u,l,h)),!h)return!1}if(i===s&&o===a)return!0;if(i===s)return r;if(o===a)return i===s-1&&t[i]==="";throw new Error("wtf?")};function ss(t){return t.replace(/\\(.)/g,"$1")}function as(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var pn=w((lu,Ut)=>{typeof Object.create=="function"?Ut.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ut.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var mn=w((cu,$t)=>{try{if(Gt=require("util"),typeof Gt.inherits!="function")throw"";$t.exports=Gt.inherits}catch{$t.exports=pn()}var Gt});var vt=w((fu,mt)=>{"use strict";function vn(t){return t.charAt(0)==="/"}function yn(t){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,r=e.exec(t),n=r[1]||"",i=!!(n&&n.charAt(1)!==":");return!!(r[2]||i)}mt.exports=process.platform==="win32"?yn:vn;mt.exports.posix=vn;mt.exports.win32=yn});var Wt=w(oe=>{oe.alphasort=_n;oe.alphasorti=wn;oe.setopts=hs;oe.ownProp=Sn;oe.makeAbs=zt;oe.finish=ds;oe.mark=gs;oe.isIgnored=bn;oe.childrenIgnored=ps;function Sn(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Ce=require("path"),us=pt(),ls=vt(),Vt=us.Minimatch;function wn(t,e){return t.toLowerCase().localeCompare(e.toLowerCase())}function _n(t,e){return t.localeCompare(e)}function cs(t,e){t.ignore=e.ignore||[],Array.isArray(t.ignore)||(t.ignore=[t.ignore]),t.ignore.length&&(t.ignore=t.ignore.map(fs))}function fs(t){var e=null;if(t.slice(-3)==="/**"){var r=t.replace(/(\/\*\*)+$/,"");e=new Vt(r,{dot:!0})}return{matcher:new Vt(t,{dot:!0}),gmatcher:e}}function hs(t,e,r){if(r||(r={}),r.matchBase&&e.indexOf("/")===-1){if(r.noglobstar)throw new Error("base matching requires globstar");e="**/"+e}t.silent=!!r.silent,t.pattern=e,t.strict=r.strict!==!1,t.realpath=!!r.realpath,t.realpathCache=r.realpathCache||Object.create(null),t.follow=!!r.follow,t.dot=!!r.dot,t.mark=!!r.mark,t.nodir=!!r.nodir,t.nodir&&(t.mark=!0),t.sync=!!r.sync,t.nounique=!!r.nounique,t.nonull=!!r.nonull,t.nosort=!!r.nosort,t.nocase=!!r.nocase,t.stat=!!r.stat,t.noprocess=!!r.noprocess,t.maxLength=r.maxLength||1/0,t.cache=r.cache||Object.create(null),t.statCache=r.statCache||Object.create(null),t.symlinks=r.symlinks||Object.create(null),cs(t,r),t.changedCwd=!1;var n=process.cwd();Sn(r,"cwd")?(t.cwd=r.cwd,t.changedCwd=Ce.resolve(r.cwd)!==n):t.cwd=n,t.root=r.root||Ce.resolve(t.cwd,"/"),t.root=Ce.resolve(t.root),process.platform==="win32"&&(t.root=t.root.replace(/\\/g,"/")),t.nomount=!!r.nomount,r.nonegate=!0,r.nocomment=!0,t.minimatch=new Vt(e,r),t.options=t.minimatch.options}function ds(t){for(var e=t.nounique,r=e?[]:Object.create(null),n=0,i=t.matches.length;n<i;n++){var o=t.matches[n];if(!o||Object.keys(o).length===0){if(t.nonull){var s=t.minimatch.globSet[n];e?r.push(s):r[s]=!0}}else{var a=Object.keys(o);e?r.push.apply(r,a):a.forEach(function(u){r[u]=!0})}}if(e||(r=Object.keys(r)),t.nosort||(r=r.sort(t.nocase?wn:_n)),t.mark){for(var n=0;n<r.length;n++)r[n]=t._mark(r[n]);t.nodir&&(r=r.filter(function(u){return!/\/$/.test(u)}))}t.ignore.length&&(r=r.filter(function(u){return!bn(t,u)})),t.found=r}function gs(t,e){var r=zt(t,e),n=t.cache[r],i=e;if(n){var o=n==="DIR"||Array.isArray(n),s=e.slice(-1)==="/";if(o&&!s?i+="/":!o&&s&&(i=i.slice(0,-1)),i!==e){var a=zt(t,i);t.statCache[a]=t.statCache[r],t.cache[a]=t.cache[r]}}return i}function zt(t,e){var r=e;return e.charAt(0)==="/"?r=Ce.join(t.root,e):ls(e)||e===""?r=e:t.changedCwd?r=Ce.resolve(t.cwd,e):r=Ce.resolve(e),r}function bn(t,e){return t.ignore.length?t.ignore.some(function(r){return r.matcher.match(e)||!!(r.gmatcher&&r.gmatcher.match(e))}):!1}function ps(t,e){return t.ignore.length?t.ignore.some(function(r){return!!(r.gmatcher&&r.gmatcher.match(e))}):!1}});var On=w((yu,An)=>{An.exports=Cn;Cn.GlobSync=N;var Ge=require("fs"),En=pt(),du=En.Minimatch,gu=Yt().Glob,pu=require("util"),Qt=require("path"),Rn=require("assert"),yt=vt(),de=Wt(),mu=de.alphasort,vu=de.alphasorti,ms=de.setopts,Jt=de.ownProp,vs=de.childrenIgnored;function Cn(t,e){if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
See: https://github.com/isaacs/node-glob/issues/167`);return new N(t,e).found}function N(t,e){if(!t)throw new Error("must provide pattern");if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof N))return new N(t,e);if(ms(this,t,e),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;n<r;n++)this._process(this.minimatch.set[n],n,!1);this._finish()}N.prototype._finish=function(){if(Rn(this instanceof N),this.realpath){var t=this;this.matches.forEach(function(e,r){var n=t.matches[r]=Object.create(null);for(var i in e)try{i=t._makeAbs(i);var o=Ge.realpathSync(i,t.realpathCache);n[o]=!0}catch(s){if(s.syscall==="stat")n[t._makeAbs(i)]=!0;else throw s}})}de.finish(this)};N.prototype._process=function(t,e,r){Rn(this instanceof N);for(var n=0;typeof t[n]=="string";)n++;var i;switch(n){case t.length:this._processSimple(t.join("/"),e);return;case 0:i=null;break;default:i=t.slice(0,n).join("/");break}var o=t.slice(n),s;i===null?s=".":((yt(i)||yt(t.join("/")))&&(!i||!yt(i))&&(i="/"+i),s=i);var a=this._makeAbs(s);if(!vs(this,s)){var u=o[0]===En.GLOBSTAR;u?this._processGlobStar(i,s,a,o,e,r):this._processReaddir(i,s,a,o,e,r)}};N.prototype._processReaddir=function(t,e,r,n,i,o){var s=this._readdir(r,o);if(s){for(var a=n[0],u=!!this.minimatch.negate,l=a._glob,c=this.dot||l.charAt(0)===".",d=[],f=0;f<s.length;f++){var h=s[f];if(h.charAt(0)!=="."||c){var g;u&&!t?g=!h.match(a):g=h.match(a),g&&d.push(h)}}var m=d.length;if(m!==0){if(n.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var f=0;f<m;f++){var h=d[f];t&&(t.slice(-1)!=="/"?h=t+"/"+h:h=t+h),h.charAt(0)==="/"&&!this.nomount&&(h=Qt.join(this.root,h)),this.matches[i][h]=!0}return}n.shift();for(var f=0;f<m;f++){var h=d[f],k;t?k=[t,h]:k=[h],this._process(k.concat(n),i,o)}}}};N.prototype._emitMatch=function(t,e){var r=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),!this.matches[t][e]){if(this.nodir){var n=this.cache[this._makeAbs(e)];if(n==="DIR"||Array.isArray(n))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}};N.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,r,n;try{r=Ge.lstatSync(t)}catch{return null}var i=r.isSymbolicLink();return this.symlinks[t]=i,!i&&!r.isDirectory()?this.cache[t]="FILE":e=this._readdir(t,!1),e};N.prototype._readdir=function(t,e){var r;if(e&&!Jt(this.symlinks,t))return this._readdirInGlobStar(t);if(Jt(this.cache,t)){var n=this.cache[t];if(!n||n==="FILE")return null;if(Array.isArray(n))return n}try{return this._readdirEntries(t,Ge.readdirSync(t))}catch(i){return this._readdirError(t,i),null}};N.prototype._readdirEntries=function(t,e){if(!this.mark&&!this.stat)for(var r=0;r<e.length;r++){var n=e[r];t==="/"?n=t+n:n=t+"/"+n,this.cache[n]=!0}return this.cache[t]=e,e};N.prototype._readdirError=function(t,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":this.cache[this._makeAbs(t)]="FILE";break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:if(this.cache[this._makeAbs(t)]=!1,this.strict)throw e;this.silent||console.error("glob error",e);break}};N.prototype._processGlobStar=function(t,e,r,n,i,o){var s=this._readdir(r,o);if(s){var a=n.slice(1),u=t?[t]:[],l=u.concat(a);this._process(l,i,!1);var c=s.length,d=this.symlinks[r];if(!(d&&o))for(var f=0;f<c;f++){var h=s[f];if(!(h.charAt(0)==="."&&!this.dot)){var g=u.concat(s[f],a);this._process(g,i,!0);var m=u.concat(s[f],n);this._process(m,i,!0)}}}};N.prototype._processSimple=function(t,e){var r=this._stat(t);if(this.matches[e]||(this.matches[e]=Object.create(null)),!!r){if(t&&yt(t)&&!this.nomount){var n=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=Qt.join(this.root,t):(t=Qt.resolve(this.root,t),n&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this.matches[e][t]=!0}};N.prototype._stat=function(t){var e=this._makeAbs(t),r=t.slice(-1)==="/";if(t.length>this.maxLength)return!1;if(!this.stat&&Jt(this.cache,e)){var s=this.cache[e];if(Array.isArray(s)&&(s="DIR"),!r||s==="DIR")return s;if(r&&s==="FILE")return!1}var n,i=this.statCache[e];if(!i){var o;try{o=Ge.lstatSync(e)}catch{return!1}if(o.isSymbolicLink())try{i=Ge.statSync(e)}catch{i=o}else i=o}this.statCache[e]=i;var s=i.isDirectory()?"DIR":"FILE";return this.cache[e]=this.cache[e]||s,r&&s!=="DIR"?!1:s};N.prototype._mark=function(t){return de.mark(this,t)};N.prototype._makeAbs=function(t){return de.makeAbs(this,t)}});var Xt=w((Su,Dn)=>{Dn.exports=kn;function kn(t,e){if(t&&e)return kn(t)(e);if(typeof t!="function")throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(n){r[n]=t[n]}),r;function r(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var o=t.apply(this,n),s=n[n.length-1];return typeof o=="function"&&o!==s&&Object.keys(s).forEach(function(a){o[a]=s[a]}),o}}});var Kt=w((wu,Ht)=>{var xn=Xt();Ht.exports=xn(St);Ht.exports.strict=xn(Ln);St.proto=St(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return St(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Ln(this)},configurable:!0})});function St(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function Ln(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}});var Tn=w((_u,Mn)=>{var ys=Xt(),$e=Object.create(null),Ss=Kt();Mn.exports=ys(ws);function ws(t,e){return $e[t]?($e[t].push(e),null):($e[t]=[e],_s(t))}function _s(t){return Ss(function e(){var r=$e[t],n=r.length,i=bs(arguments);try{for(var o=0;o<n;o++)r[o].apply(null,i)}finally{r.length>n?(r.splice(0,n),process.nextTick(function(){e.apply(null,i)})):delete $e[t]}})}function bs(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n]=t[n];return r}});var Yt=w((Au,Nn)=>{Nn.exports=ve;var Ve=require("fs"),In=pt(),bu=In.Minimatch,Es=mn(),Rs=require("events").EventEmitter,Zt=require("path"),er=require("assert"),wt=vt(),rr=On(),ae=Wt(),Eu=ae.alphasort,Ru=ae.alphasorti,Cs=ae.setopts,tr=ae.ownProp,nr=Tn(),Cu=require("util"),As=ae.childrenIgnored,Os=ae.isIgnored,ks=Kt();function ve(t,e,r){if(typeof e=="function"&&(r=e,e={}),e||(e={}),e.sync){if(r)throw new TypeError("callback provided to sync glob");return rr(t,e)}return new O(t,e,r)}ve.sync=rr;var Ds=ve.GlobSync=rr.GlobSync;ve.glob=ve;function xs(t,e){if(e===null||typeof e!="object")return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}ve.hasMagic=function(t,e){var r=xs({},e);r.noprocess=!0;var n=new O(t,r),i=n.minimatch.set;if(i.length>1)return!0;for(var o=0;o<i[0].length;o++)if(typeof i[0][o]!="string")return!0;return!1};ve.Glob=O;Es(O,Rs);function O(t,e,r){if(typeof e=="function"&&(r=e,e=null),e&&e.sync){if(r)throw new TypeError("callback provided to sync glob");return new Ds(t,e)}if(!(this instanceof O))return new O(t,e,r);Cs(this,t,e),this._didRealPath=!1;var i=this.minimatch.set.length;this.matches=new Array(i),typeof r=="function"&&(r=ks(r),this.on("error",r),this.on("end",function(a){r(null,a)}));var n=this,i=this.minimatch.set.length;if(this._processing=0,this.matches=new Array(i),this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(i===0)return s();for(var o=0;o<i;o++)this._process(this.minimatch.set[o],o,!1,s);function s(){--n._processing,n._processing<=0&&n._finish()}}O.prototype._finish=function(){if(er(this instanceof O),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();ae.finish(this),this.emit("end",this.found)}};O.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var t=this.matches.length;if(t===0)return this._finish();for(var e=this,r=0;r<this.matches.length;r++)this._realpathSet(r,n);function n(){--t===0&&e._finish()}};O.prototype._realpathSet=function(t,e){var r=this.matches[t];if(!r)return e();var n=Object.keys(r),i=this,o=n.length;if(o===0)return e();var s=this.matches[t]=Object.create(null);n.forEach(function(a,u){a=i._makeAbs(a),Ve.realpath(a,i.realpathCache,function(l,c){l?l.syscall==="stat"?s[a]=!0:i.emit("error",l):s[c]=!0,--o===0&&(i.matches[t]=s,e())})})};O.prototype._mark=function(t){return ae.mark(this,t)};O.prototype._makeAbs=function(t){return ae.makeAbs(this,t)};O.prototype.abort=function(){this.aborted=!0,this.emit("abort")};O.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};O.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<t.length;e++){var r=t[e];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(var e=0;e<n.length;e++){var i=n[e];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}};O.prototype._process=function(t,e,r,n){if(er(this instanceof O),er(typeof n=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([t,e,r,n]);return}for(var i=0;typeof t[i]=="string";)i++;var o;switch(i){case t.length:this._processSimple(t.join("/"),e,n);return;case 0:o=null;break;default:o=t.slice(0,i).join("/");break}var s=t.slice(i),a;o===null?a=".":((wt(o)||wt(t.join("/")))&&(!o||!wt(o))&&(o="/"+o),a=o);var u=this._makeAbs(a);if(As(this,a))return n();var l=s[0]===In.GLOBSTAR;l?this._processGlobStar(o,a,u,s,e,r,n):this._processReaddir(o,a,u,s,e,r,n)}};O.prototype._processReaddir=function(t,e,r,n,i,o,s){var a=this;this._readdir(r,o,function(u,l){return a._processReaddir2(t,e,r,n,i,o,l,s)})};O.prototype._processReaddir2=function(t,e,r,n,i,o,s,a){if(!s)return a();for(var u=n[0],l=!!this.minimatch.negate,c=u._glob,d=this.dot||c.charAt(0)===".",f=[],h=0;h<s.length;h++){var g=s[h];if(g.charAt(0)!=="."||d){var m;l&&!t?m=!g.match(u):m=g.match(u),m&&f.push(g)}}var k=f.length;if(k===0)return a();if(n.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var h=0;h<k;h++){var g=f[h];t&&(t!=="/"?g=t+"/"+g:g=t+g),g.charAt(0)==="/"&&!this.nomount&&(g=Zt.join(this.root,g)),this._emitMatch(i,g)}return a()}n.shift();for(var h=0;h<k;h++){var g=f[h],v;t&&(t!=="/"?g=t+"/"+g:g=t+g),this._process([g].concat(n),i,o,a)}a()};O.prototype._emitMatch=function(t,e){if(!this.aborted&&!this.matches[t][e]&&!Os(this,e)){if(this.paused){this._emitQueue.push([t,e]);return}var r=this._makeAbs(e);if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.mark&&(e=this._mark(e)),this.matches[t][e]=!0;var i=this.statCache[r];i&&this.emit("stat",e,i),this.emit("match",e)}};O.prototype._readdirInGlobStar=function(t,e){if(this.aborted)return;if(this.follow)return this._readdir(t,!1,e);var r="lstat\0"+t,n=this,i=nr(r,o);i&&Ve.lstat(t,i);function o(s,a){if(s)return e();var u=a.isSymbolicLink();n.symlinks[t]=u,!u&&!a.isDirectory()?(n.cache[t]="FILE",e()):n._readdir(t,!1,e)}};O.prototype._readdir=function(t,e,r){if(!this.aborted&&(r=nr("readdir\0"+t+"\0"+e,r),!!r)){if(e&&!tr(this.symlinks,t))return this._readdirInGlobStar(t,r);if(tr(this.cache,t)){var n=this.cache[t];if(!n||n==="FILE")return r();if(Array.isArray(n))return r(null,n)}var i=this;Ve.readdir(t,Ls(this,t,r))}};function Ls(t,e,r){return function(n,i){n?t._readdirError(e,n,r):t._readdirEntries(e,i,r)}}O.prototype._readdirEntries=function(t,e,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var n=0;n<e.length;n++){var i=e[n];t==="/"?i=t+i:i=t+"/"+i,this.cache[i]=!0}return this.cache[t]=e,r(null,e)}};O.prototype._readdirError=function(t,e,r){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":this.cache[this._makeAbs(t)]="FILE";break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:this.cache[this._makeAbs(t)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e);break}return r()}};O.prototype._processGlobStar=function(t,e,r,n,i,o,s){var a=this;this._readdir(r,o,function(u,l){a._processGlobStar2(t,e,r,n,i,o,l,s)})};O.prototype._processGlobStar2=function(t,e,r,n,i,o,s,a){if(!s)return a();var u=n.slice(1),l=t?[t]:[],c=l.concat(u);this._process(c,i,!1,a);var d=this.symlinks[r],f=s.length;if(d&&o)return a();for(var h=0;h<f;h++){var g=s[h];if(!(g.charAt(0)==="."&&!this.dot)){var m=l.concat(s[h],u);this._process(m,i,!0,a);var k=l.concat(s[h],n);this._process(k,i,!0,a)}}a()};O.prototype._processSimple=function(t,e,r){var n=this;this._stat(t,function(i,o){n._processSimple2(t,e,i,o,r)})};O.prototype._processSimple2=function(t,e,r,n,i){if(this.matches[e]||(this.matches[e]=Object.create(null)),!n)return i();if(t&&wt(t)&&!this.nomount){var o=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=Zt.join(this.root,t):(t=Zt.resolve(this.root,t),o&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t),i()};O.prototype._stat=function(t,e){var r=this._makeAbs(t),n=t.slice(-1)==="/";if(t.length>this.maxLength)return e();if(!this.stat&&tr(this.cache,r)){var i=this.cache[r];if(Array.isArray(i)&&(i="DIR"),!n||i==="DIR")return e(null,i);if(n&&i==="FILE")return e()}var o,s=this.statCache[r];if(s!==void 0){if(s===!1)return e(null,s);var a=s.isDirectory()?"DIR":"FILE";return n&&a==="FILE"?e():e(null,a,s)}var u=this,l=nr("stat\0"+r,c);l&&Ve.lstat(r,l);function c(d,f){if(f&&f.isSymbolicLink())return Ve.stat(r,function(h,g){h?u._stat2(t,r,null,f,e):u._stat2(t,r,h,g,e)});u._stat2(t,r,d,f,e)}};O.prototype._stat2=function(t,e,r,n,i){if(r)return this.statCache[e]=!1,i();var o=t.slice(-1)==="/";if(this.statCache[e]=n,e.slice(-1)==="/"&&!n.isDirectory())return i(null,!1,n);var s=n.isDirectory()?"DIR":"FILE";return this.cache[e]=this.cache[e]||s,o&&s!=="DIR"?i():i(null,s,n)}});var Un=w((Ou,Fn)=>{Fn.exports=ar;ar.sync=qn;var A=require("assert"),Pn=require("path"),Et=require("fs"),Rt=Yt(),jn={nosort:!0,nocomment:!0,nonegate:!0,silent:!0},ir=0,sr=process.platform==="win32";function Bn(t){var e=["unlink","chmod","stat","lstat","rmdir","readdir"];e.forEach(function(r){t[r]=t[r]||Et[r],r=r+"Sync",t[r]=t[r]||Et[r]}),t.maxBusyTries=t.maxBusyTries||3,t.emfileWait=t.emfileWait||1e3,t.disableGlob=t.disableGlob||!1}function ar(t,e,r){typeof e=="function"&&(r=e,e={}),A(t,"rimraf: missing path"),A.equal(typeof t,"string","rimraf: path should be a string"),A(e,"rimraf: missing options"),A.equal(typeof e,"object","rimraf: options should be object"),A.equal(typeof r,"function","rimraf: callback function required"),Bn(e);var n=0,i=null,o=0;if(e.disableGlob||!Rt.hasMagic(t))return a(null,[t]);Et.lstat(t,function(u,l){if(!u)return a(null,[t]);Rt(t,jn,a)});function s(u){i=i||u,--o===0&&r(i)}function a(u,l){if(u)return r(u);if(o=l.length,o===0)return r();l.forEach(function(c){or(c,e,function d(f){if(f){if(sr&&(f.code==="EBUSY"||f.code==="ENOTEMPTY"||f.code==="EPERM")&&n<e.maxBusyTries){n++;var h=n*100;return setTimeout(function(){or(c,e,d)},h)}if(f.code==="EMFILE"&&ir<e.emfileWait)return setTimeout(function(){or(c,e,d)},ir++);f.code==="ENOENT"&&(f=null)}ir=0,s(f)})})}}function or(t,e,r){A(t),A(e),A(typeof r=="function"),e.lstat(t,function(n,i){if(n&&n.code==="ENOENT")return r(null);if(i&&i.isDirectory())return _t(t,e,n,r);e.unlink(t,function(o){if(o){if(o.code==="ENOENT")return r(null);if(o.code==="EPERM")return sr?Ms(t,e,o,r):_t(t,e,o,r);if(o.code==="EISDIR")return _t(t,e,o,r)}return r(o)})})}function Ms(t,e,r,n){A(t),A(e),A(typeof n=="function"),r&&A(r instanceof Error),e.chmod(t,666,function(i){i?n(i.code==="ENOENT"?null:r):e.stat(t,function(o,s){o?n(o.code==="ENOENT"?null:r):s.isDirectory()?_t(t,e,r,n):e.unlink(t,n)})})}function Ts(t,e,r){A(t),A(e),r&&A(r instanceof Error);try{e.chmodSync(t,666)}catch(i){if(i.code==="ENOENT")return;throw r}try{var n=e.statSync(t)}catch(i){if(i.code==="ENOENT")return;throw r}n.isDirectory()?bt(t,e,r):e.unlinkSync(t)}function _t(t,e,r,n){A(t),A(e),r&&A(r instanceof Error),A(typeof n=="function"),e.rmdir(t,function(i){i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")?Is(t,e,n):i&&i.code==="ENOTDIR"?n(r):n(i)})}function Is(t,e,r){A(t),A(e),A(typeof r=="function"),e.readdir(t,function(n,i){if(n)return r(n);var o=i.length;if(o===0)return e.rmdir(t,r);var s;i.forEach(function(a){ar(Pn.join(t,a),e,function(u){if(!s){if(u)return r(s=u);--o===0&&e.rmdir(t,r)}})})})}function qn(t,e){e=e||{},Bn(e),A(t,"rimraf: missing path"),A.equal(typeof t,"string","rimraf: path should be a string"),A(e,"rimraf: missing options"),A.equal(typeof e,"object","rimraf: options should be object");var r;if(e.disableGlob||!Rt.hasMagic(t))r=[t];else try{Et.lstatSync(t),r=[t]}catch{r=Rt.sync(t,jn)}if(r.length)for(var n=0;n<r.length;n++){var t=r[n];try{var i=e.lstatSync(t)}catch(s){if(s.code==="ENOENT")return}try{i&&i.isDirectory()?bt(t,e,null):e.unlinkSync(t)}catch(s){if(s.code==="ENOENT")return;if(s.code==="EPERM")return sr?Ts(t,e,s):bt(t,e,s);if(s.code!=="EISDIR")throw s;bt(t,e,s)}}}function bt(t,e,r){A(t),A(e),r&&A(r instanceof Error);try{e.rmdirSync(t)}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR")throw r;(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")&&Ns(t,e)}}function Ns(t,e){A(t),A(e),e.readdirSync(t).forEach(function(r){qn(Pn.join(t,r),e)}),e.rmdirSync(t,e)}});var zn=w((ku,Vn)=>{var ze=require("path"),Gn=require("fs"),$n=parseInt("0777",8);Vn.exports=Ae.mkdirp=Ae.mkdirP=Ae;function Ae(t,e,r,n){typeof e=="function"?(r=e,e={}):(!e||typeof e!="object")&&(e={mode:e});var i=e.mode,o=e.fs||Gn;i===void 0&&(i=$n),n||(n=null);var s=r||function(){};t=ze.resolve(t),o.mkdir(t,i,function(a){if(!a)return n=n||t,s(null,n);switch(a.code){case"ENOENT":if(ze.dirname(t)===t)return s(a);Ae(ze.dirname(t),e,function(u,l){u?s(u,l):Ae(t,e,s,l)});break;default:o.stat(t,function(u,l){u||!l.isDirectory()?s(a,n):s(null,n)});break}})}Ae.sync=function t(e,r,n){(!r||typeof r!="object")&&(r={mode:r});var i=r.mode,o=r.fs||Gn;i===void 0&&(i=$n),n||(n=null),e=ze.resolve(e);try{o.mkdirSync(e,i),n=n||e}catch(a){switch(a.code){case"ENOENT":n=t(ze.dirname(e),r,n),t(e,r,n);break;default:var s;try{s=o.statSync(e)}catch{throw a}if(!s.isDirectory())throw a;break}}return n}});var Xn=w((Du,Yn)=>{var Oe=require("fs"),Ps=Qr().ncp,js=require("path"),Wn=Un(),Bs=zn();Yn.exports=qs;function qs(t,e,r,n){typeof r=="function"&&(n=r,r={});var i=!!r.mkdirp,o=r.clobber!==!1,s=r.limit||16;i?a():u();function a(){Bs(js.dirname(e),function(l){if(l)return n(l);u()})}function u(){o?Oe.rename(t,e,function(l){if(!l)return n();if(l.code!=="EXDEV")return n(l);Qn(t,e,o,s,n)}):Oe.link(t,e,function(l){if(l){if(l.code==="EXDEV"){Qn(t,e,o,s,n);return}if(l.code==="EISDIR"||l.code==="EPERM"){Jn(t,e,o,s,n);return}n(l);return}Oe.unlink(t,n)})}}function Qn(t,e,r,n,i){var o=r?"w":"wx",s=Oe.createReadStream(t),a=Oe.createWriteStream(e,{flags:o});s.on("error",function(l){s.destroy(),a.destroy(),a.removeListener("close",u),l.code==="EISDIR"||l.code==="EPERM"?Jn(t,e,r,n,i):i(l)}),a.on("error",function(l){s.destroy(),a.destroy(),a.removeListener("close",u),i(l)}),a.once("close",u),s.pipe(a);function u(){Oe.unlink(t,i)}}function Jn(t,e,r,n,i){var o={stopOnErr:!0,clobber:!1,limit:n};r?Wn(e,{disableGlob:!0},function(a){if(a)return i(a);s()}):s();function s(){Ps(t,e,o,function(a){if(a)return i(a[0]);Wn(t,{disableGlob:!0},i)})}}});var Kn=w(ur=>{var Hn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ur.encode=function(t){if(0<=t&&t<Hn.length)return Hn[t];throw new TypeError("Must be between 0 and 63: "+t)};ur.decode=function(t){var e=65,r=90,n=97,i=122,o=48,s=57,a=43,u=47,l=26,c=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+l:o<=t&&t<=s?t-o+c:t==a?62:t==u?63:-1}});var fr=w(cr=>{var Zn=Kn(),lr=5,ei=1<<lr,ti=ei-1,ri=ei;function Fs(t){return t<0?(-t<<1)+1:(t<<1)+0}function Us(t){var e=(t&1)===1,r=t>>1;return e?-r:r}cr.encode=function(e){var r="",n,i=Fs(e);do n=i&ti,i>>>=lr,i>0&&(n|=ri),r+=Zn.encode(n);while(i>0);return r};cr.decode=function(e,r,n){var i=e.length,o=0,s=0,a,u;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(u=Zn.decode(e.charCodeAt(r++)),u===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(u&ri),u&=ti,o=o+(u<<s),s+=lr}while(a);n.value=Us(o),n.rest=r}});var xe=w(F=>{function Gs(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}F.getArg=Gs;var ni=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,$s=/^data:.+\,.+$/;function We(t){var e=t.match(ni);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}F.urlParse=We;function ke(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}F.urlGenerate=ke;function hr(t){var e=t,r=We(t);if(r){if(!r.path)return t;e=r.path}for(var n=F.isAbsolute(e),i=e.split(/\/+/),o,s=0,a=i.length-1;a>=0;a--)o=i[a],o==="."?i.splice(a,1):o===".."?s++:s>0&&(o===""?(i.splice(a+1,s),s=0):(i.splice(a,2),s--));return e=i.join("/"),e===""&&(e=n?"/":"."),r?(r.path=e,ke(r)):e}F.normalize=hr;function ii(t,e){t===""&&(t="."),e===""&&(e=".");var r=We(e),n=We(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),ke(r);if(r||e.match($s))return e;if(n&&!n.host&&!n.path)return n.host=e,ke(n);var i=e.charAt(0)==="/"?e:hr(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,ke(n)):i}F.join=ii;F.isAbsolute=function(t){return t.charAt(0)==="/"||ni.test(t)};function Vs(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}F.relative=Vs;var oi=function(){var t=Object.create(null);return!("__proto__"in t)}();function si(t){return t}function zs(t){return ai(t)?"$"+t:t}F.toSetString=oi?si:zs;function Ws(t){return ai(t)?t.slice(1):t}F.fromSetString=oi?si:Ws;function ai(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function Qs(t,e,r){var n=De(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:De(t.name,e.name)}F.compareByOriginalPositions=Qs;function Js(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=De(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:De(t.name,e.name)}F.compareByGeneratedPositionsDeflated=Js;function De(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function Ys(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=De(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:De(t.name,e.name)}F.compareByGeneratedPositionsInflated=Ys;function Xs(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}F.parseSourceMapInput=Xs;function Hs(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=We(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=ii(ke(n),e)}return hr(e)}F.computeSourceURL=Hs});var pr=w(ui=>{var dr=xe(),gr=Object.prototype.hasOwnProperty,ye=typeof Map<"u";function ue(){this._array=[],this._set=ye?new Map:Object.create(null)}ue.fromArray=function(e,r){for(var n=new ue,i=0,o=e.length;i<o;i++)n.add(e[i],r);return n};ue.prototype.size=function(){return ye?this._set.size:Object.getOwnPropertyNames(this._set).length};ue.prototype.add=function(e,r){var n=ye?e:dr.toSetString(e),i=ye?this.has(e):gr.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(e),i||(ye?this._set.set(e,o):this._set[n]=o)};ue.prototype.has=function(e){if(ye)return this._set.has(e);var r=dr.toSetString(e);return gr.call(this._set,r)};ue.prototype.indexOf=function(e){if(ye){var r=this._set.get(e);if(r>=0)return r}else{var n=dr.toSetString(e);if(gr.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};ue.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};ue.prototype.toArray=function(){return this._array.slice()};ui.ArraySet=ue});var fi=w(ci=>{var li=xe();function Ks(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return n>r||n==r&&o>=i||li.compareByGeneratedPositionsInflated(t,e)<=0}function Ct(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Ct.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Ct.prototype.add=function(e){Ks(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Ct.prototype.toArray=function(){return this._sorted||(this._array.sort(li.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};ci.MappingList=Ct});var mr=w(hi=>{var Qe=fr(),I=xe(),At=pr().ArraySet,Zs=fi().MappingList;function Z(t){t||(t={}),this._file=I.getArg(t,"file",null),this._sourceRoot=I.getArg(t,"sourceRoot",null),this._skipValidation=I.getArg(t,"skipValidation",!1),this._sources=new At,this._names=new At,this._mappings=new Zs,this._sourcesContents=null}Z.prototype._version=3;Z.fromSourceMap=function(e){var r=e.sourceRoot,n=new Z({file:e.file,sourceRoot:r});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=I.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),e.sources.forEach(function(i){var o=i;r!==null&&(o=I.relative(r,i)),n._sources.has(o)||n._sources.add(o);var s=e.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};Z.prototype.addMapping=function(e){var r=I.getArg(e,"generated"),n=I.getArg(e,"original",null),i=I.getArg(e,"source",null),o=I.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,n,i,o),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:o})};Z.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=I.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[I.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[I.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Z.prototype.applySourceMap=function(e,r,n){var i=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var o=this._sourceRoot;o!=null&&(i=I.relative(o,i));var s=new At,a=new At;this._mappings.unsortedForEach(function(u){if(u.source===i&&u.originalLine!=null){var l=e.originalPositionFor({line:u.originalLine,column:u.originalColumn});l.source!=null&&(u.source=l.source,n!=null&&(u.source=I.join(n,u.source)),o!=null&&(u.source=I.relative(o,u.source)),u.originalLine=l.line,u.originalColumn=l.column,l.name!=null&&(u.name=l.name))}var c=u.source;c!=null&&!s.has(c)&&s.add(c);var d=u.name;d!=null&&!a.has(d)&&a.add(d)},this),this._sources=s,this._names=a,e.sources.forEach(function(u){var l=e.sourceContentFor(u);l!=null&&(n!=null&&(u=I.join(n,u)),o!=null&&(u=I.relative(o,u)),this.setSourceContent(u,l))},this)};Z.prototype._validateMapping=function(e,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!i)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:i}))}};Z.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,o=0,s=0,a="",u,l,c,d,f=this._mappings.toArray(),h=0,g=f.length;h<g;h++){if(l=f[h],u="",l.generatedLine!==r)for(e=0;l.generatedLine!==r;)u+=";",r++;else if(h>0){if(!I.compareByGeneratedPositionsInflated(l,f[h-1]))continue;u+=","}u+=Qe.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(d=this._sources.indexOf(l.source),u+=Qe.encode(d-s),s=d,u+=Qe.encode(l.originalLine-1-i),i=l.originalLine-1,u+=Qe.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(c=this._names.indexOf(l.name),u+=Qe.encode(c-o),o=c)),a+=u}return a};Z.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=I.relative(r,n));var i=I.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Z.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};Z.prototype.toString=function(){return JSON.stringify(this.toJSON())};hi.SourceMapGenerator=Z});var di=w(Se=>{Se.GREATEST_LOWER_BOUND=1;Se.LEAST_UPPER_BOUND=2;function vr(t,e,r,n,i,o){var s=Math.floor((e-t)/2)+t,a=i(r,n[s],!0);return a===0?s:a>0?e-s>1?vr(s,e,r,n,i,o):o==Se.LEAST_UPPER_BOUND?e<n.length?e:-1:s:s-t>1?vr(t,s,r,n,i,o):o==Se.LEAST_UPPER_BOUND?s:t<0?-1:t}Se.search=function(e,r,n,i){if(r.length===0)return-1;var o=vr(-1,r.length,e,r,n,i||Se.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o}});var pi=w(gi=>{function yr(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function ea(t,e){return Math.round(t+Math.random()*(e-t))}function Sr(t,e,r,n){if(r<n){var i=ea(r,n),o=r-1;yr(t,i,n);for(var s=t[n],a=r;a<n;a++)e(t[a],s)<=0&&(o+=1,yr(t,o,a));yr(t,o+1,a);var u=o+1;Sr(t,e,r,u-1),Sr(t,e,u+1,n)}}gi.quickSort=function(t,e){Sr(t,e,0,t.length-1)}});var vi=w(Ot=>{var p=xe(),wr=di(),Le=pr().ArraySet,ta=fr(),Je=pi().quickSort;function D(t,e){var r=t;return typeof t=="string"&&(r=p.parseSourceMapInput(t)),r.sections!=null?new ne(r,e):new j(r,e)}D.fromSourceMap=function(t,e){return j.fromSourceMap(t,e)};D.prototype._version=3;D.prototype.__generatedMappings=null;Object.defineProperty(D.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});D.prototype.__originalMappings=null;Object.defineProperty(D.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});D.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};D.prototype._parseMappings=function(e,r){throw new Error("Subclass