@frontfriend/sdk 1.3.1 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD_PARTY_NOTICES +2 -0
- package/dist/cli.js +175 -180
- package/dist/lib/core/adoption.js +1 -1
- package/dist/lib/core/api-client.js +8 -8
- package/dist/lib/core/application-adoption.js +17 -17
- package/dist/lib/core/cache-manager.js +1 -1
- package/dist/lib/core/cached-components-config.js +11 -11
- package/dist/lib/core/credentials.js +7 -7
- package/dist/lib/core/nativeSource.js +2 -2
- package/dist/lib/core/token-artifact-client.js +10 -10
- package/dist/mcp.cjs +673 -121
- package/dist/next.js +11 -11
- package/dist/package.json +1 -1
- package/dist/vite.js +14 -14
- package/package.json +2 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var C=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports);var Sr=C((Df,wr)=>{wr.exports=br;br.sync=Fo;var yr=require("fs");function Vo(i,r){var n=r.pathExt!==void 0?r.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var o=0;o<n.length;o++){var h=n[o].toLowerCase();if(h&&i.substr(-h.length).toLowerCase()===h)return!0}return!1}function Er(i,r,n){return!i.isSymbolicLink()&&!i.isFile()?!1:Vo(r,n)}function br(i,r,n){yr.stat(i,function(o,h){n(o,o?!1:Er(h,i,r))})}function Fo(i,r){return Er(yr.statSync(i),i,r)}});var Ar=C((qf,_r)=>{_r.exports=Ir;Ir.sync=$o;var Cr=require("fs");function Ir(i,r,n){Cr.stat(i,function(o,h){n(o,o?!1:kr(h,r))})}function $o(i,r){return kr(Cr.statSync(i),r)}function kr(i,r){return i.isFile()&&Do(i,r)}function Do(i,r){var n=i.mode,o=i.uid,h=i.gid,l=r.uid!==void 0?r.uid:process.getuid&&process.getuid(),p=r.gid!==void 0?r.gid:process.getgid&&process.getgid(),m=parseInt("100",8),g=parseInt("010",8),x=parseInt("001",8),S=m|g,v=n&x||n&g&&h===p||n&m&&o===l||n&S&&l===0;return v}});var Tr=C((Bf,Nr)=>{var jf=require("fs"),ht;process.platform==="win32"||global.TESTING_WINDOWS?ht=Sr():ht=Ar();Nr.exports=Mt;Mt.sync=qo;function Mt(i,r,n){if(typeof r=="function"&&(n=r,r={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(o,h){Mt(i,r||{},function(l,p){l?h(l):o(p)})})}ht(i,r||{},function(o,h){o&&(o.code==="EACCES"||r&&r.ignoreErrors)&&(o=null,h=!1),n(o,h)})}function qo(i,r){try{return ht.sync(i,r||{})}catch(n){if(r&&r.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var $r=C((Uf,Fr)=>{var Re=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Rr=require("path"),jo=Re?";":":",Pr=Tr(),Lr=i=>Object.assign(new Error(`not found: ${i}`),{code:"ENOENT"}),Or=(i,r)=>{let n=r.colon||jo,o=i.match(/\//)||Re&&i.match(/\\/)?[""]:[...Re?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(n)],h=Re?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",l=Re?h.split(n):[""];return Re&&i.indexOf(".")!==-1&&l[0]!==""&&l.unshift(""),{pathEnv:o,pathExt:l,pathExtExe:h}},Vr=(i,r,n)=>{typeof r=="function"&&(n=r,r={}),r||(r={});let{pathEnv:o,pathExt:h,pathExtExe:l}=Or(i,r),p=[],m=x=>new Promise((S,v)=>{if(x===o.length)return r.all&&p.length?S(p):v(Lr(i));let b=o[x],E=/^".*"$/.test(b)?b.slice(1,-1):b,N=Rr.join(E,i),q=!E&&/^\.[\\\/]/.test(i)?i.slice(0,2)+N:N;S(g(q,x,0))}),g=(x,S,v)=>new Promise((b,E)=>{if(v===h.length)return b(m(S+1));let N=h[v];Pr(x+N,{pathExt:l},(q,G)=>{if(!q&&G)if(r.all)p.push(x+N);else return b(x+N);return b(g(x,S,v+1))})});return n?m(0).then(x=>n(null,x),n):m(0)},Bo=(i,r)=>{r=r||{};let{pathEnv:n,pathExt:o,pathExtExe:h}=Or(i,r),l=[];for(let p=0;p<n.length;p++){let m=n[p],g=/^".*"$/.test(m)?m.slice(1,-1):m,x=Rr.join(g,i),S=!g&&/^\.[\\\/]/.test(i)?i.slice(0,2)+x:x;for(let v=0;v<o.length;v++){let b=S+o[v];try{if(Pr.sync(b,{pathExt:h}))if(r.all)l.push(b);else return b}catch{}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw Lr(i)};Fr.exports=Vr;Vr.sync=Bo});var qr=C((Mf,Gt)=>{"use strict";var Dr=(i={})=>{let r=i.env||process.env;return(i.platform||process.platform)!=="win32"?"PATH":Object.keys(r).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"};Gt.exports=Dr;Gt.exports.default=Dr});var Mr=C((Gf,Ur)=>{"use strict";var jr=require("path"),Uo=$r(),Mo=qr();function Br(i,r){let n=i.options.env||process.env,o=process.cwd(),h=i.options.cwd!=null,l=h&&process.chdir!==void 0&&!process.chdir.disabled;if(l)try{process.chdir(i.options.cwd)}catch{}let p;try{p=Uo.sync(i.command,{path:n[Mo({env:n})],pathExt:r?jr.delimiter:void 0})}catch{}finally{l&&process.chdir(o)}return p&&(p=jr.resolve(h?i.options.cwd:"",p)),p}function Go(i){return Br(i)||Br(i,!0)}Ur.exports=Go});var Gr=C((Hf,Wt)=>{"use strict";var Ht=/([()\][%!^"`<>&|;, *?])/g;function Ho(i){return i=i.replace(Ht,"^$1"),i}function Wo(i,r){return i=`${i}`,i=i.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),i=i.replace(/(?=(\\+?)?)\1$/,"$1$1"),i=`"${i}"`,i=i.replace(Ht,"^$1"),r&&(i=i.replace(Ht,"^$1")),i}Wt.exports.command=Ho;Wt.exports.argument=Wo});var Wr=C((Wf,Hr)=>{"use strict";Hr.exports=/^#!(.*)/});var Xr=C((zf,zr)=>{"use strict";var zo=Wr();zr.exports=(i="")=>{let r=i.match(zo);if(!r)return null;let[n,o]=r[0].replace(/#! ?/,"").split(" "),h=n.split("/").pop();return h==="env"?o:o?`${h} ${o}`:h}});var Yr=C((Xf,Kr)=>{"use strict";var zt=require("fs"),Xo=Xr();function Ko(i){let n=Buffer.alloc(150),o;try{o=zt.openSync(i,"r"),zt.readSync(o,n,0,150,0),zt.closeSync(o)}catch{}return Xo(n.toString())}Kr.exports=Ko});var es=C((Kf,Zr)=>{"use strict";var Yo=require("path"),Jr=Mr(),Qr=Gr(),Jo=Yr(),Qo=process.platform==="win32",Zo=/\.(?:com|exe)$/i,eu=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function tu(i){i.file=Jr(i);let r=i.file&&Jo(i.file);return r?(i.args.unshift(i.file),i.command=r,Jr(i)):i.file}function iu(i){if(!Qo)return i;let r=tu(i),n=!Zo.test(r);if(i.options.forceShell||n){let o=eu.test(r);i.command=Yo.normalize(i.command),i.command=Qr.command(i.command),i.args=i.args.map(l=>Qr.argument(l,o));let h=[i.command].concat(i.args).join(" ");i.args=["/d","/s","/c",`"${h}"`],i.command=process.env.comspec||"cmd.exe",i.options.windowsVerbatimArguments=!0}return i}function ru(i,r,n){r&&!Array.isArray(r)&&(n=r,r=null),r=r?r.slice(0):[],n=Object.assign({},n);let o={command:i,args:r,options:n,file:void 0,original:{command:i,args:r}};return n.shell?o:iu(o)}Zr.exports=ru});var rs=C((Yf,is)=>{"use strict";var Xt=process.platform==="win32";function Kt(i,r){return Object.assign(new Error(`${r} ${i.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${r} ${i.command}`,path:i.command,spawnargs:i.args})}function su(i,r){if(!Xt)return;let n=i.emit;i.emit=function(o,h){if(o==="exit"){let l=ts(h,r);if(l)return n.call(i,"error",l)}return n.apply(i,arguments)}}function ts(i,r){return Xt&&i===1&&!r.file?Kt(r.original,"spawn"):null}function nu(i,r){return Xt&&i===1&&!r.file?Kt(r.original,"spawnSync"):null}is.exports={hookChildProcess:su,verifyENOENT:ts,verifyENOENTSync:nu,notFoundError:Kt}});var as=C((Jf,Pe)=>{"use strict";var ss=require("child_process"),Yt=es(),Jt=rs();function ns(i,r,n){let o=Yt(i,r,n),h=ss.spawn(o.command,o.args,o.options);return Jt.hookChildProcess(h,o),h}function au(i,r,n){let o=Yt(i,r,n),h=ss.spawnSync(o.command,o.args,o.options);return h.error=h.error||Jt.verifyENOENTSync(h.status,o),h}Pe.exports=ns;Pe.exports.spawn=ns;Pe.exports.sync=au;Pe.exports._parse=Yt;Pe.exports._enoent=Jt});var Le=C((Qf,os)=>{"use strict";var ou="2.0.0",uu=Number.MAX_SAFE_INTEGER||9007199254740991,cu=16,hu=250,lu=["major","premajor","minor","preminor","patch","prepatch","prerelease"];os.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:cu,MAX_SAFE_BUILD_LENGTH:hu,MAX_SAFE_INTEGER:uu,RELEASE_TYPES:lu,SEMVER_SPEC_VERSION:ou,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var He=C((Zf,us)=>{"use strict";var fu=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{};us.exports=fu});var Oe=C((oe,cs)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Qt,MAX_SAFE_BUILD_LENGTH:pu,MAX_LENGTH:du}=Le(),mu=He();oe=cs.exports={};var xu=oe.re=[],gu=oe.safeRe=[],I=oe.src=[],vu=oe.safeSrc=[],k=oe.t={},yu=0,Zt="[a-zA-Z0-9-]",Eu=[["\\s",1],["\\d",du],[Zt,pu]],bu=i=>{for(let[r,n]of Eu)i=i.split(`${r}*`).join(`${r}{0,${n}}`).split(`${r}+`).join(`${r}{1,${n}}`);return i},P=(i,r,n)=>{let o=bu(r),h=yu++;mu(i,h,r),k[i]=h,I[h]=r,vu[h]=o,xu[h]=new RegExp(r,n?"g":void 0),gu[h]=new RegExp(o,n?"g":void 0)};P("NUMERICIDENTIFIER","0|[1-9]\\d*");P("NUMERICIDENTIFIERLOOSE","\\d+");P("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Zt}*`);P("MAINVERSION",`(${I[k.NUMERICIDENTIFIER]})\\.(${I[k.NUMERICIDENTIFIER]})\\.(${I[k.NUMERICIDENTIFIER]})`);P("MAINVERSIONLOOSE",`(${I[k.NUMERICIDENTIFIERLOOSE]})\\.(${I[k.NUMERICIDENTIFIERLOOSE]})\\.(${I[k.NUMERICIDENTIFIERLOOSE]})`);P("PRERELEASEIDENTIFIER",`(?:${I[k.NONNUMERICIDENTIFIER]}|${I[k.NUMERICIDENTIFIER]})`);P("PRERELEASEIDENTIFIERLOOSE",`(?:${I[k.NONNUMERICIDENTIFIER]}|${I[k.NUMERICIDENTIFIERLOOSE]})`);P("PRERELEASE",`(?:-(${I[k.PRERELEASEIDENTIFIER]}(?:\\.${I[k.PRERELEASEIDENTIFIER]})*))`);P("PRERELEASELOOSE",`(?:-?(${I[k.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${I[k.PRERELEASEIDENTIFIERLOOSE]})*))`);P("BUILDIDENTIFIER",`${Zt}+`);P("BUILD",`(?:\\+(${I[k.BUILDIDENTIFIER]}(?:\\.${I[k.BUILDIDENTIFIER]})*))`);P("FULLPLAIN",`v?${I[k.MAINVERSION]}${I[k.PRERELEASE]}?${I[k.BUILD]}?`);P("FULL",`^${I[k.FULLPLAIN]}$`);P("LOOSEPLAIN",`[v=\\s]*${I[k.MAINVERSIONLOOSE]}${I[k.PRERELEASELOOSE]}?${I[k.BUILD]}?`);P("LOOSE",`^${I[k.LOOSEPLAIN]}$`);P("GTLT","((?:<|>)?=?)");P("XRANGEIDENTIFIERLOOSE",`${I[k.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);P("XRANGEIDENTIFIER",`${I[k.NUMERICIDENTIFIER]}|x|X|\\*`);P("XRANGEPLAIN",`[v=\\s]*(${I[k.XRANGEIDENTIFIER]})(?:\\.(${I[k.XRANGEIDENTIFIER]})(?:\\.(${I[k.XRANGEIDENTIFIER]})(?:${I[k.PRERELEASE]})?${I[k.BUILD]}?)?)?`);P("XRANGEPLAINLOOSE",`[v=\\s]*(${I[k.XRANGEIDENTIFIERLOOSE]})(?:\\.(${I[k.XRANGEIDENTIFIERLOOSE]})(?:\\.(${I[k.XRANGEIDENTIFIERLOOSE]})(?:${I[k.PRERELEASELOOSE]})?${I[k.BUILD]}?)?)?`);P("XRANGE",`^${I[k.GTLT]}\\s*${I[k.XRANGEPLAIN]}$`);P("XRANGELOOSE",`^${I[k.GTLT]}\\s*${I[k.XRANGEPLAINLOOSE]}$`);P("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Qt}})(?:\\.(\\d{1,${Qt}}))?(?:\\.(\\d{1,${Qt}}))?`);P("COERCE",`${I[k.COERCEPLAIN]}(?:$|[^\\d])`);P("COERCEFULL",I[k.COERCEPLAIN]+`(?:${I[k.PRERELEASE]})?(?:${I[k.BUILD]})?(?:$|[^\\d])`);P("COERCERTL",I[k.COERCE],!0);P("COERCERTLFULL",I[k.COERCEFULL],!0);P("LONETILDE","(?:~>?)");P("TILDETRIM",`(\\s*)${I[k.LONETILDE]}\\s+`,!0);oe.tildeTrimReplace="$1~";P("TILDE",`^${I[k.LONETILDE]}${I[k.XRANGEPLAIN]}$`);P("TILDELOOSE",`^${I[k.LONETILDE]}${I[k.XRANGEPLAINLOOSE]}$`);P("LONECARET","(?:\\^)");P("CARETTRIM",`(\\s*)${I[k.LONECARET]}\\s+`,!0);oe.caretTrimReplace="$1^";P("CARET",`^${I[k.LONECARET]}${I[k.XRANGEPLAIN]}$`);P("CARETLOOSE",`^${I[k.LONECARET]}${I[k.XRANGEPLAINLOOSE]}$`);P("COMPARATORLOOSE",`^${I[k.GTLT]}\\s*(${I[k.LOOSEPLAIN]})$|^$`);P("COMPARATOR",`^${I[k.GTLT]}\\s*(${I[k.FULLPLAIN]})$|^$`);P("COMPARATORTRIM",`(\\s*)${I[k.GTLT]}\\s*(${I[k.LOOSEPLAIN]}|${I[k.XRANGEPLAIN]})`,!0);oe.comparatorTrimReplace="$1$2$3";P("HYPHENRANGE",`^\\s*(${I[k.XRANGEPLAIN]})\\s+-\\s+(${I[k.XRANGEPLAIN]})\\s*$`);P("HYPHENRANGELOOSE",`^\\s*(${I[k.XRANGEPLAINLOOSE]})\\s+-\\s+(${I[k.XRANGEPLAINLOOSE]})\\s*$`);P("STAR","(<|>)?=?\\s*\\*");P("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");P("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var lt=C((ep,hs)=>{"use strict";var wu=Object.freeze({loose:!0}),Su=Object.freeze({}),Cu=i=>i?typeof i!="object"?wu:i:Su;hs.exports=Cu});var ei=C((tp,ps)=>{"use strict";var ls=/^[0-9]+$/,fs=(i,r)=>{if(typeof i=="number"&&typeof r=="number")return i===r?0:i<r?-1:1;let n=ls.test(i),o=ls.test(r);return n&&o&&(i=+i,r=+r),i===r?0:n&&!o?-1:o&&!n?1:i<r?-1:1},Iu=(i,r)=>fs(r,i);ps.exports={compareIdentifiers:fs,rcompareIdentifiers:Iu}});var H=C((ip,ms)=>{"use strict";var ft=He(),{MAX_LENGTH:ds,MAX_SAFE_INTEGER:pt}=Le(),{safeRe:dt,t:mt}=Oe(),ku=lt(),{compareIdentifiers:ti}=ei(),_u=(i,r)=>{let n=r.split(".");if(n.length>i.length)return!1;for(let o=0;o<n.length;o++)if(ti(i[o],n[o])!==0)return!1;return!0},ii=class i{constructor(r,n){if(n=ku(n),r instanceof i){if(r.loose===!!n.loose&&r.includePrerelease===!!n.includePrerelease)return r;r=r.version}else if(typeof r!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof r}".`);if(r.length>ds)throw new TypeError(`version is longer than ${ds} characters`);ft("SemVer",r,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let o=r.trim().match(n.loose?dt[mt.LOOSE]:dt[mt.FULL]);if(!o)throw new TypeError(`Invalid Version: ${r}`);if(this.raw=r,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>pt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>pt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>pt||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(h=>{if(/^[0-9]+$/.test(h)){let l=+h;if(l>=0&&l<pt)return l}return h}):this.prerelease=[],this.build=o[5]?o[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(r){if(ft("SemVer.compare",this.version,this.options,r),!(r instanceof i)){if(typeof r=="string"&&r===this.version)return 0;r=new i(r,this.options)}return r.version===this.version?0:this.compareMain(r)||this.comparePre(r)}compareMain(r){return r instanceof i||(r=new i(r,this.options)),this.major<r.major?-1:this.major>r.major?1:this.minor<r.minor?-1:this.minor>r.minor?1:this.patch<r.patch?-1:this.patch>r.patch?1:0}comparePre(r){if(r instanceof i||(r=new i(r,this.options)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;let n=0;do{let o=this.prerelease[n],h=r.prerelease[n];if(ft("prerelease compare",n,o,h),o===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(o===void 0)return-1;if(o===h)continue;return ti(o,h)}while(++n)}compareBuild(r){r instanceof i||(r=new i(r,this.options));let n=0;do{let o=this.build[n],h=r.build[n];if(ft("build compare",n,o,h),o===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(o===void 0)return-1;if(o===h)continue;return ti(o,h)}while(++n)}inc(r,n,o){if(r.startsWith("pre")){if(!n&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let h=`-${n}`.match(this.options.loose?dt[mt.PRERELEASELOOSE]:dt[mt.PRERELEASE]);if(!h||h[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,o),this.inc("pre",n,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,o),this.inc("pre",n,o);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let h=Number(o)?1:0;if(this.prerelease.length===0)this.prerelease=[h];else{let l=this.prerelease.length;for(;--l>=0;)typeof this.prerelease[l]=="number"&&(this.prerelease[l]++,l=-2);if(l===-1){if(n===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(h)}}if(n){let l=[n,h];if(o===!1&&(l=[n]),_u(this.prerelease,n)){let p=this.prerelease[n.split(".").length];isNaN(p)&&(this.prerelease=l)}else this.prerelease=l}break}default:throw new Error(`invalid increment argument: ${r}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};ms.exports=ii});var xe=C((rp,gs)=>{"use strict";var xs=H(),Au=(i,r,n=!1)=>{if(i instanceof xs)return i;try{return new xs(i,r)}catch(o){if(!n)return null;throw o}};gs.exports=Au});var ys=C((sp,vs)=>{"use strict";var Nu=xe(),Tu=(i,r)=>{let n=Nu(i,r);return n?n.version:null};vs.exports=Tu});var bs=C((np,Es)=>{"use strict";var Ru=xe(),Pu=(i,r)=>{let n=Ru(i.trim().replace(/^[=v]+/,""),r);return n?n.version:null};Es.exports=Pu});var Cs=C((ap,Ss)=>{"use strict";var ws=H(),Lu=(i,r,n,o,h)=>{typeof n=="string"&&(h=o,o=n,n=void 0);try{return new ws(i instanceof ws?i.version:i,n).inc(r,o,h).version}catch{return null}};Ss.exports=Lu});var _s=C((op,ks)=>{"use strict";var Is=xe(),Ou=(i,r)=>{let n=Is(i,null,!0),o=Is(r,null,!0),h=n.compare(o);if(h===0)return null;let l=h>0,p=l?n:o,m=l?o:n,g=!!p.prerelease.length;if(!!m.prerelease.length&&!g){if(!m.patch&&!m.minor)return"major";if(m.compareMain(p)===0)return m.minor&&!m.patch?"minor":"patch"}let S=g?"pre":"";return n.major!==o.major?S+"major":n.minor!==o.minor?S+"minor":n.patch!==o.patch?S+"patch":"prerelease"};ks.exports=Ou});var Ns=C((up,As)=>{"use strict";var Vu=H(),Fu=(i,r)=>new Vu(i,r).major;As.exports=Fu});var Rs=C((cp,Ts)=>{"use strict";var $u=H(),Du=(i,r)=>new $u(i,r).minor;Ts.exports=Du});var Ls=C((hp,Ps)=>{"use strict";var qu=H(),ju=(i,r)=>new qu(i,r).patch;Ps.exports=ju});var Vs=C((lp,Os)=>{"use strict";var Bu=xe(),Uu=(i,r)=>{let n=Bu(i,r);return n&&n.prerelease.length?n.prerelease:null};Os.exports=Uu});var ie=C((fp,$s)=>{"use strict";var Fs=H(),Mu=(i,r,n)=>new Fs(i,n).compare(new Fs(r,n));$s.exports=Mu});var qs=C((pp,Ds)=>{"use strict";var Gu=ie(),Hu=(i,r,n)=>Gu(r,i,n);Ds.exports=Hu});var Bs=C((dp,js)=>{"use strict";var Wu=ie(),zu=(i,r)=>Wu(i,r,!0);js.exports=zu});var xt=C((mp,Ms)=>{"use strict";var Us=H(),Xu=(i,r,n)=>{let o=new Us(i,n),h=new Us(r,n);return o.compare(h)||o.compareBuild(h)};Ms.exports=Xu});var Hs=C((xp,Gs)=>{"use strict";var Ku=xt(),Yu=(i,r)=>i.sort((n,o)=>Ku(n,o,r));Gs.exports=Yu});var zs=C((gp,Ws)=>{"use strict";var Ju=xt(),Qu=(i,r)=>i.sort((n,o)=>Ju(o,n,r));Ws.exports=Qu});var We=C((vp,Xs)=>{"use strict";var Zu=ie(),ec=(i,r,n)=>Zu(i,r,n)>0;Xs.exports=ec});var gt=C((yp,Ks)=>{"use strict";var tc=ie(),ic=(i,r,n)=>tc(i,r,n)<0;Ks.exports=ic});var ri=C((Ep,Ys)=>{"use strict";var rc=ie(),sc=(i,r,n)=>rc(i,r,n)===0;Ys.exports=sc});var si=C((bp,Js)=>{"use strict";var nc=ie(),ac=(i,r,n)=>nc(i,r,n)!==0;Js.exports=ac});var vt=C((wp,Qs)=>{"use strict";var oc=ie(),uc=(i,r,n)=>oc(i,r,n)>=0;Qs.exports=uc});var yt=C((Sp,Zs)=>{"use strict";var cc=ie(),hc=(i,r,n)=>cc(i,r,n)<=0;Zs.exports=hc});var ni=C((Cp,en)=>{"use strict";var lc=ri(),fc=si(),pc=We(),dc=vt(),mc=gt(),xc=yt(),gc=(i,r,n,o)=>{switch(r){case"===":return typeof i=="object"&&(i=i.version),typeof n=="object"&&(n=n.version),i===n;case"!==":return typeof i=="object"&&(i=i.version),typeof n=="object"&&(n=n.version),i!==n;case"":case"=":case"==":return lc(i,n,o);case"!=":return fc(i,n,o);case">":return pc(i,n,o);case">=":return dc(i,n,o);case"<":return mc(i,n,o);case"<=":return xc(i,n,o);default:throw new TypeError(`Invalid operator: ${r}`)}};en.exports=gc});var rn=C((Ip,tn)=>{"use strict";var vc=H(),yc=xe(),{safeRe:Et,t:bt}=Oe(),Ec=(i,r)=>{if(i instanceof vc)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;r=r||{};let n=null;if(!r.rtl)n=i.match(r.includePrerelease?Et[bt.COERCEFULL]:Et[bt.COERCE]);else{let g=r.includePrerelease?Et[bt.COERCERTLFULL]:Et[bt.COERCERTL],x;for(;(x=g.exec(i))&&(!n||n.index+n[0].length!==i.length);)(!n||x.index+x[0].length!==n.index+n[0].length)&&(n=x),g.lastIndex=x.index+x[1].length+x[2].length;g.lastIndex=-1}if(n===null)return null;let o=n[2],h=n[3]||"0",l=n[4]||"0",p=r.includePrerelease&&n[5]?`-${n[5]}`:"",m=r.includePrerelease&&n[6]?`+${n[6]}`:"";return yc(`${o}.${h}.${l}${p}${m}`,r)};tn.exports=Ec});var nn=C((kp,sn)=>{"use strict";var bc=xe(),wc=Le(),Sc=H(),Cc=(i,r,n)=>{if(!wc.RELEASE_TYPES.includes(r))return null;let o=Ic(i,n);return o&&kc(o,r)},Ic=(i,r)=>{let n=i instanceof Sc?i.version:i;return bc(n,r)},kc=(i,r)=>{if(_c(r))return i.version;switch(i.prerelease=[],r){case"major":i.minor=0,i.patch=0;break;case"minor":i.patch=0;break}return i.format()},_c=i=>i.startsWith("pre");sn.exports=Cc});var on=C((_p,an)=>{"use strict";var ai=class{constructor(){this.max=1e3,this.map=new Map}get(r){let n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){let h=this.map.keys().next().value;this.delete(h)}this.map.set(r,n)}return this}};an.exports=ai});var re=C((Ap,ln)=>{"use strict";var Ac=/\s+/g,oi=class i{constructor(r,n){if(n=Tc(n),r instanceof i)return r.loose===!!n.loose&&r.includePrerelease===!!n.includePrerelease?r:new i(r.raw,n);if(r instanceof ui)return this.raw=r.value,this.set=[[r]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=r.trim().replace(Ac," "),this.set=this.raw.split("||").map(o=>this.parseRange(o.trim())).filter(o=>o.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let o=this.set[0];if(this.set=this.set.filter(h=>!cn(h[0])),this.set.length===0)this.set=[o];else if(this.set.length>1){for(let h of this.set)if(h.length===1&&qc(h[0])){this.set=[h];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let r=0;r<this.set.length;r++){r>0&&(this.formatted+="||");let n=this.set[r];for(let o=0;o<n.length;o++)o>0&&(this.formatted+=" "),this.formatted+=n[o].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(r){r=r.replace(Dc,"");let o=((this.options.includePrerelease&&Fc)|(this.options.loose&&$c))+":"+r,h=un.get(o);if(h)return h;let l=this.options.loose,p=l?Y[W.HYPHENRANGELOOSE]:Y[W.HYPHENRANGE];r=r.replace(p,Yc(this.options.includePrerelease)),D("hyphen replace",r),r=r.replace(Y[W.COMPARATORTRIM],Lc),D("comparator trim",r),r=r.replace(Y[W.TILDETRIM],Oc),D("tilde trim",r),r=r.replace(Y[W.CARETTRIM],Vc),D("caret trim",r);let m=r.split(" ").map(v=>jc(v,this.options)).join(" ").split(/\s+/).map(v=>Kc(v,this.options));l&&(m=m.filter(v=>(D("loose invalid filter",v,this.options),!!v.match(Y[W.COMPARATORLOOSE])))),D("range list",m);let g=new Map,x=m.map(v=>new ui(v,this.options));for(let v of x){if(cn(v))return[v];g.set(v.value,v)}g.size>1&&g.has("")&&g.delete("");let S=[...g.values()];return un.set(o,S),S}intersects(r,n){if(!(r instanceof i))throw new TypeError("a Range is required");return this.set.some(o=>hn(o,n)&&r.set.some(h=>hn(h,n)&&o.every(l=>h.every(p=>l.intersects(p,n)))))}test(r){if(!r)return!1;if(typeof r=="string")try{r=new Rc(r,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(Jc(this.set[n],r,this.options))return!0;return!1}};ln.exports=oi;var Nc=on(),un=new Nc,Tc=lt(),ui=ze(),D=He(),Rc=H(),{safeRe:Y,src:Pc,t:W,comparatorTrimReplace:Lc,tildeTrimReplace:Oc,caretTrimReplace:Vc}=Oe(),{FLAG_INCLUDE_PRERELEASE:Fc,FLAG_LOOSE:$c}=Le(),Dc=new RegExp(Pc[W.BUILD],"g"),cn=i=>i.value==="<0.0.0-0",qc=i=>i.value==="",hn=(i,r)=>{let n=!0,o=i.slice(),h=o.pop();for(;n&&o.length;)n=o.every(l=>h.intersects(l,r)),h=o.pop();return n},jc=(i,r)=>(i=i.replace(Y[W.BUILD],""),D("comp",i,r),i=Gc(i,r),D("caret",i),i=Uc(i,r),D("tildes",i),i=Wc(i,r),D("xrange",i),i=Xc(i,r),D("stars",i),i),U=i=>!i||i.toLowerCase()==="x"||i==="*",Bc=(i,r,n)=>U(i)&&!U(r)||U(r)&&n&&!U(n),Uc=(i,r)=>i.trim().split(/\s+/).map(n=>Mc(n,r)).join(" "),Mc=(i,r)=>{let n=r.loose?Y[W.TILDELOOSE]:Y[W.TILDE],o=r.includePrerelease?"-0":"";return i.replace(n,(h,l,p,m,g)=>{D("tilde",i,h,l,p,m,g);let x;return U(l)?x="":U(p)?x=`>=${l}.0.0${o} <${+l+1}.0.0-0`:U(m)?x=`>=${l}.${p}.0${o} <${l}.${+p+1}.0-0`:g?(D("replaceTilde pr",g),x=`>=${l}.${p}.${m}-${g} <${l}.${+p+1}.0-0`):x=`>=${l}.${p}.${m} <${l}.${+p+1}.0-0`,D("tilde return",x),x})},Gc=(i,r)=>i.trim().split(/\s+/).map(n=>Hc(n,r)).join(" "),Hc=(i,r)=>{D("caret",i,r);let n=r.loose?Y[W.CARETLOOSE]:Y[W.CARET],o=r.includePrerelease?"-0":"";return i.replace(n,(h,l,p,m,g)=>{D("caret",i,h,l,p,m,g);let x;return U(l)?x="":U(p)?x=`>=${l}.0.0${o} <${+l+1}.0.0-0`:U(m)?l==="0"?x=`>=${l}.${p}.0${o} <${l}.${+p+1}.0-0`:x=`>=${l}.${p}.0${o} <${+l+1}.0.0-0`:g?(D("replaceCaret pr",g),l==="0"?p==="0"?x=`>=${l}.${p}.${m}-${g} <${l}.${p}.${+m+1}-0`:x=`>=${l}.${p}.${m}-${g} <${l}.${+p+1}.0-0`:x=`>=${l}.${p}.${m}-${g} <${+l+1}.0.0-0`):(D("no pr"),l==="0"?p==="0"?x=`>=${l}.${p}.${m} <${l}.${p}.${+m+1}-0`:x=`>=${l}.${p}.${m} <${l}.${+p+1}.0-0`:x=`>=${l}.${p}.${m} <${+l+1}.0.0-0`),D("caret return",x),x})},Wc=(i,r)=>(D("replaceXRanges",i,r),i.split(/\s+/).map(n=>zc(n,r)).join(" ")),zc=(i,r)=>{i=i.trim();let n=r.loose?Y[W.XRANGELOOSE]:Y[W.XRANGE];return i.replace(n,(o,h,l,p,m,g)=>{if(D("xRange",i,o,h,l,p,m,g),Bc(l,p,m))return i;let x=U(l),S=x||U(p),v=S||U(m),b=v;return h==="="&&b&&(h=""),g=r.includePrerelease?"-0":"",x?h===">"||h==="<"?o="<0.0.0-0":o="*":h&&b?(S&&(p=0),m=0,h===">"?(h=">=",S?(l=+l+1,p=0,m=0):(p=+p+1,m=0)):h==="<="&&(h="<",S?l=+l+1:p=+p+1),h==="<"&&(g="-0"),o=`${h+l}.${p}.${m}${g}`):S?o=`>=${l}.0.0${g} <${+l+1}.0.0-0`:v&&(o=`>=${l}.${p}.0${g} <${l}.${+p+1}.0-0`),D("xRange return",o),o})},Xc=(i,r)=>(D("replaceStars",i,r),i.trim().replace(Y[W.STAR],"")),Kc=(i,r)=>(D("replaceGTE0",i,r),i.trim().replace(Y[r.includePrerelease?W.GTE0PRE:W.GTE0],"")),Yc=i=>(r,n,o,h,l,p,m,g,x,S,v,b)=>(U(o)?n="":U(h)?n=`>=${o}.0.0${i?"-0":""}`:U(l)?n=`>=${o}.${h}.0${i?"-0":""}`:p?n=`>=${n}`:n=`>=${n}${i?"-0":""}`,U(x)?g="":U(S)?g=`<${+x+1}.0.0-0`:U(v)?g=`<${x}.${+S+1}.0-0`:b?g=`<=${x}.${S}.${v}-${b}`:i?g=`<${x}.${S}.${+v+1}-0`:g=`<=${g}`,`${n} ${g}`.trim()),Jc=(i,r,n)=>{for(let o=0;o<i.length;o++)if(!i[o].test(r))return!1;if(r.prerelease.length&&!n.includePrerelease){for(let o=0;o<i.length;o++)if(D(i[o].semver),i[o].semver!==ui.ANY&&i[o].semver.prerelease.length>0){let h=i[o].semver;if(h.major===r.major&&h.minor===r.minor&&h.patch===r.patch)return!0}return!1}return!0}});var ze=C((Np,gn)=>{"use strict";var Xe=Symbol("SemVer ANY"),li=class i{static get ANY(){return Xe}constructor(r,n){if(n=fn(n),r instanceof i){if(r.loose===!!n.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),hi("comparator",r,n),this.options=n,this.loose=!!n.loose,this.parse(r),this.semver===Xe?this.value="":this.value=this.operator+this.semver.version,hi("comp",this)}parse(r){let n=this.options.loose?pn[dn.COMPARATORLOOSE]:pn[dn.COMPARATOR],o=r.match(n);if(!o)throw new TypeError(`Invalid comparator: ${r}`);this.operator=o[1]!==void 0?o[1]:"",this.operator==="="&&(this.operator=""),o[2]?this.semver=new mn(o[2],this.options.loose):this.semver=Xe}toString(){return this.value}test(r){if(hi("Comparator.test",r,this.options.loose),this.semver===Xe||r===Xe)return!0;if(typeof r=="string")try{r=new mn(r,this.options)}catch{return!1}return ci(r,this.operator,this.semver,this.options)}intersects(r,n){if(!(r instanceof i))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new xn(r.value,n).test(this.value):r.operator===""?r.value===""?!0:new xn(this.value,n).test(r.semver):(n=fn(n),n.includePrerelease&&(this.value==="<0.0.0-0"||r.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||r.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&r.operator.startsWith(">")||this.operator.startsWith("<")&&r.operator.startsWith("<")||this.semver.version===r.semver.version&&this.operator.includes("=")&&r.operator.includes("=")||ci(this.semver,"<",r.semver,n)&&this.operator.startsWith(">")&&r.operator.startsWith("<")||ci(this.semver,">",r.semver,n)&&this.operator.startsWith("<")&&r.operator.startsWith(">")))}};gn.exports=li;var fn=lt(),{safeRe:pn,t:dn}=Oe(),ci=ni(),hi=He(),mn=H(),xn=re()});var Ke=C((Tp,vn)=>{"use strict";var Qc=re(),Zc=(i,r,n)=>{try{r=new Qc(r,n)}catch{return!1}return r.test(i)};vn.exports=Zc});var En=C((Rp,yn)=>{"use strict";var eh=re(),th=(i,r)=>new eh(i,r).set.map(n=>n.map(o=>o.value).join(" ").trim().split(" "));yn.exports=th});var wn=C((Pp,bn)=>{"use strict";var ih=H(),rh=re(),sh=(i,r,n)=>{let o=null,h=null,l=null;try{l=new rh(r,n)}catch{return null}return i.forEach(p=>{l.test(p)&&(!o||h.compare(p)===-1)&&(o=p,h=new ih(o,n))}),o};bn.exports=sh});var Cn=C((Lp,Sn)=>{"use strict";var nh=H(),ah=re(),oh=(i,r,n)=>{let o=null,h=null,l=null;try{l=new ah(r,n)}catch{return null}return i.forEach(p=>{l.test(p)&&(!o||h.compare(p)===1)&&(o=p,h=new nh(o,n))}),o};Sn.exports=oh});var _n=C((Op,kn)=>{"use strict";var fi=H(),uh=re(),In=We(),ch=(i,r)=>{i=new uh(i,r);let n=new fi("0.0.0");if(i.test(n)||(n=new fi("0.0.0-0"),i.test(n)))return n;n=null;for(let o=0;o<i.set.length;++o){let h=i.set[o],l=null;h.forEach(p=>{let m=new fi(p.semver.version);switch(p.operator){case">":m.prerelease.length===0?m.patch++:m.prerelease.push(0),m.raw=m.format();case"":case">=":(!l||In(m,l))&&(l=m);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${p.operator}`)}}),l&&(!n||In(n,l))&&(n=l)}return n&&i.test(n)?n:null};kn.exports=ch});var Nn=C((Vp,An)=>{"use strict";var hh=re(),lh=(i,r)=>{try{return new hh(i,r).range||"*"}catch{return null}};An.exports=lh});var wt=C((Fp,Ln)=>{"use strict";var fh=H(),Pn=ze(),{ANY:ph}=Pn,dh=re(),mh=Ke(),Tn=We(),Rn=gt(),xh=yt(),gh=vt(),vh=(i,r,n,o)=>{i=new fh(i,o),r=new dh(r,o);let h,l,p,m,g;switch(n){case">":h=Tn,l=xh,p=Rn,m=">",g=">=";break;case"<":h=Rn,l=gh,p=Tn,m="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(mh(i,r,o))return!1;for(let x=0;x<r.set.length;++x){let S=r.set[x],v=null,b=null;if(S.forEach(E=>{E.semver===ph&&(E=new Pn(">=0.0.0")),v=v||E,b=b||E,h(E.semver,v.semver,o)?v=E:p(E.semver,b.semver,o)&&(b=E)}),v.operator===m||v.operator===g||(!b.operator||b.operator===m)&&l(i,b.semver))return!1;if(b.operator===g&&p(i,b.semver))return!1}return!0};Ln.exports=vh});var Vn=C(($p,On)=>{"use strict";var yh=wt(),Eh=(i,r,n)=>yh(i,r,">",n);On.exports=Eh});var $n=C((Dp,Fn)=>{"use strict";var bh=wt(),wh=(i,r,n)=>bh(i,r,"<",n);Fn.exports=wh});var jn=C((qp,qn)=>{"use strict";var Dn=re(),Sh=(i,r,n)=>(i=new Dn(i,n),r=new Dn(r,n),i.intersects(r,n));qn.exports=Sh});var Un=C((jp,Bn)=>{"use strict";var Ch=Ke(),Ih=ie();Bn.exports=(i,r,n)=>{let o=[],h=null,l=null,p=i.sort((S,v)=>Ih(S,v,n));for(let S of p)Ch(S,r,n)?(l=S,h||(h=S)):(l&&o.push([h,l]),l=null,h=null);h&&o.push([h,null]);let m=[];for(let[S,v]of o)S===v?m.push(S):!v&&S===p[0]?m.push("*"):v?S===p[0]?m.push(`<=${v}`):m.push(`${S} - ${v}`):m.push(`>=${S}`);let g=m.join(" || "),x=typeof r.raw=="string"?r.raw:String(r);return g.length<x.length?g:r}});var Xn=C((Bp,zn)=>{"use strict";var Mn=re(),mi=ze(),{ANY:pi}=mi,di=Ke(),xi=ie(),kh=(i,r,n={})=>{if(i===r)return!0;i=new Mn(i,n),r=new Mn(r,n);let o=!1;e:for(let h of i.set){for(let l of r.set){let p=Ah(h,l,n);if(o=o||p!==null,p)continue e}if(o)return!1}return!0},_h=[new mi(">=0.0.0-0")],Gn=[new mi(">=0.0.0")],Ah=(i,r,n)=>{if(i===r)return!0;if(i.length===1&&i[0].semver===pi){if(r.length===1&&r[0].semver===pi)return!0;n.includePrerelease?i=_h:i=Gn}if(r.length===1&&r[0].semver===pi){if(n.includePrerelease)return!0;r=Gn}let o=new Set,h,l;for(let E of i)E.operator===">"||E.operator===">="?h=Hn(h,E,n):E.operator==="<"||E.operator==="<="?l=Wn(l,E,n):o.add(E.semver);if(o.size>1)return null;let p;if(h&&l){if(p=xi(h.semver,l.semver,n),p>0)return null;if(p===0&&(h.operator!==">="||l.operator!=="<="))return null}for(let E of o){if(h&&!di(E,String(h),n)||l&&!di(E,String(l),n))return null;for(let N of r)if(!di(E,String(N),n))return!1;return!0}let m,g,x,S,v=l&&!n.includePrerelease&&l.semver.prerelease.length?l.semver:!1,b=h&&!n.includePrerelease&&h.semver.prerelease.length?h.semver:!1;v&&v.prerelease.length===1&&l.operator==="<"&&v.prerelease[0]===0&&(v=!1);for(let E of r){if(S=S||E.operator===">"||E.operator===">=",x=x||E.operator==="<"||E.operator==="<=",h){if(b&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===b.major&&E.semver.minor===b.minor&&E.semver.patch===b.patch&&(b=!1),E.operator===">"||E.operator===">="){if(m=Hn(h,E,n),m===E&&m!==h)return!1}else if(h.operator===">="&&!E.test(h.semver))return!1}if(l){if(v&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===v.major&&E.semver.minor===v.minor&&E.semver.patch===v.patch&&(v=!1),E.operator==="<"||E.operator==="<="){if(g=Wn(l,E,n),g===E&&g!==l)return!1}else if(l.operator==="<="&&!E.test(l.semver))return!1}if(!E.operator&&(l||h)&&p!==0)return!1}return!(h&&x&&!l&&p!==0||l&&S&&!h&&p!==0||b||v)},Hn=(i,r,n)=>{if(!i)return r;let o=xi(i.semver,r.semver,n);return o>0?i:o<0||r.operator===">"&&i.operator===">="?r:i},Wn=(i,r,n)=>{if(!i)return r;let o=xi(i.semver,r.semver,n);return o<0?i:o>0||r.operator==="<"&&i.operator==="<="?r:i};zn.exports=kh});var Qn=C((Up,Jn)=>{"use strict";var gi=Oe(),Kn=Le(),Nh=H(),Yn=ei(),Th=xe(),Rh=ys(),Ph=bs(),Lh=Cs(),Oh=_s(),Vh=Ns(),Fh=Rs(),$h=Ls(),Dh=Vs(),qh=ie(),jh=qs(),Bh=Bs(),Uh=xt(),Mh=Hs(),Gh=zs(),Hh=We(),Wh=gt(),zh=ri(),Xh=si(),Kh=vt(),Yh=yt(),Jh=ni(),Qh=rn(),Zh=nn(),el=ze(),tl=re(),il=Ke(),rl=En(),sl=wn(),nl=Cn(),al=_n(),ol=Nn(),ul=wt(),cl=Vn(),hl=$n(),ll=jn(),fl=Un(),pl=Xn();Jn.exports={parse:Th,valid:Rh,clean:Ph,inc:Lh,diff:Oh,major:Vh,minor:Fh,patch:$h,prerelease:Dh,compare:qh,rcompare:jh,compareLoose:Bh,compareBuild:Uh,sort:Mh,rsort:Gh,gt:Hh,lt:Wh,eq:zh,neq:Xh,gte:Kh,lte:Yh,cmp:Jh,coerce:Qh,truncate:Zh,Comparator:el,Range:tl,satisfies:il,toComparators:rl,maxSatisfying:sl,minSatisfying:nl,minVersion:al,validRange:ol,outside:ul,gtr:cl,ltr:hl,intersects:ll,simplifyRange:fl,subset:pl,SemVer:Nh,re:gi.re,src:gi.src,tokens:gi.t,SEMVER_SPEC_VERSION:Kn.SEMVER_SPEC_VERSION,RELEASE_TYPES:Kn.RELEASE_TYPES,compareIdentifiers:Yn.compareIdentifiers,rcompareIdentifiers:Yn.rcompareIdentifiers}});var St=C((Mp,Zn)=>{var dl="https://app.frontfriend.dev",ml=".cache/frontfriend",xl={JS:["tokens.js","variables.js","semanticVariables.js","semanticDarkVariables.js","keyframes.js","animations.js","safelist.js","custom.js"],JSON:["fonts.json","icons.json","components-config.json","iconLibrary.json","version.json","versionMetadata.json","metadata.json","base.json","nativeTokens.json"]},gl={FF_ID:"FF_ID",FF_API_URL:"FF_API_URL",FF_AUTH_TOKEN:"FF_AUTH_TOKEN",FF_MACHINE_TOKEN:"FRONTFRIEND_MACHINE_TOKEN"};function vl(i){if(!i)return null;try{let r=new URL(i);return r.hostname.startsWith("app.")?`${r.protocol}//${r.hostname.replace(/^app\./,"registry.")}`:null}catch{return null}}Zn.exports={DEFAULT_API_URL:dl,CACHE_DIR_NAME:ml,CACHE_TTL_DAYS:7,CACHE_TTL_MS:6048e5,CACHE_FILES:xl,ENV_VARS:gl,deriveRegistryFromApiUrl:vl}});var _t=C((Gp,ha)=>{var ge=require("fs"),se=require("path"),ta=as(),ne=Qn(),{DEFAULT_API_URL:yl}=St(),ia=["dependencies","devDependencies","optionalDependencies","peerDependencies"];function vi(i){let r=typeof i=="string"&&i.match(/^((?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*)(?:@([^\r\n]+))?$/);if(!r)throw new Error(`Invalid npm dependency: ${String(i)}`);return{name:r[1],version:r[2]}}function yi(i){let r=new Map;for(let n of i){let{name:o,version:h}=vi(n),l=r.get(o);r.set(o,l&&h?ra(o,l,h):h||l)}return r}function ra(i,r,n){if(r===n)return r;let o=ne.validRange(r),h=ne.validRange(n);if(o&&h)try{if(ne.subset(h,o))return n;if(ne.subset(o,h))return r}catch{}throw new Error(`Conflicting registry versions for ${i}: ${r} and ${n}`)}function El(i,r){let n=typeof i=="string"&&ne.validRange(i),o=ne.validRange(r);if(!n||!o)return!1;try{return ne.subset(n,o)}catch{return!1}}function It(i,r){if(El(i,r))return"satisfied";let n=typeof i=="string"&&ne.validRange(i),o=ne.validRange(r);if(!n||!o)return"incomparable";try{let h=ne.minVersion(n),l=ne.minVersion(o);return!h||!l?"incomparable":ne.lt(h,l)?"lower":"newer"}catch{return"incomparable"}}function Ct(i,r){let n=ia.find(o=>Object.hasOwn(i[o]||{},r));return n?{section:n,existing:i[n][r]}:null}function sa(i,r){let n=yi(r);if(n.size===0)return;let o=se.join(i,"package.json"),h=JSON.parse(ge.readFileSync(o,"utf8"));for(let[l,p]of n){let m=Ct(h,l),g=m?.section||"dependencies";h[g]||={};let x=m?.existing;h[g][l]=x===void 0?p||"latest":p&&It(x,p)==="lower"?p:x}ge.writeFileSync(o,`${JSON.stringify(h,null,2)}
|
|
2
|
-
`)}function kt(i){let r=[["pnpm-lock.yaml","pnpm"],["yarn.lock","yarn"],["bun.lock","bun"],["bun.lockb","bun"],["package-lock.json","npm"],["npm-shrinkwrap.json","npm"]];for(let n=se.resolve(i);;n=se.dirname(n)){let o=se.join(n,"package.json");if(ge.existsSync(o)){let h=JSON.parse(ge.readFileSync(o,"utf8")),l=String(h.packageManager||"").split("@")[0];if(["npm","pnpm","yarn","bun"].includes(l))return l}for(let[h,l]of r)if(ge.existsSync(se.join(n,h)))return l;if(se.dirname(n)===n)return"npm"}}var
|
|
1
|
+
var C=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports);var Cr=C((Gf,Sr)=>{Sr.exports=wr;wr.sync=Uo;var Er=require("fs");function jo(i,r){var n=r.pathExt!==void 0?r.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var o=0;o<n.length;o++){var h=n[o].toLowerCase();if(h&&i.substr(-h.length).toLowerCase()===h)return!0}return!1}function br(i,r,n){return!i.isSymbolicLink()&&!i.isFile()?!1:jo(r,n)}function wr(i,r,n){Er.stat(i,function(o,h){n(o,o?!1:br(h,i,r))})}function Uo(i,r){return br(Er.statSync(i),i,r)}});var Nr=C((Hf,Ar)=>{Ar.exports=kr;kr.sync=Bo;var Ir=require("fs");function kr(i,r,n){Ir.stat(i,function(o,h){n(o,o?!1:_r(h,r))})}function Bo(i,r){return _r(Ir.statSync(i),r)}function _r(i,r){return i.isFile()&&Mo(i,r)}function Mo(i,r){var n=i.mode,o=i.uid,h=i.gid,l=r.uid!==void 0?r.uid:process.getuid&&process.getuid(),p=r.gid!==void 0?r.gid:process.getgid&&process.getgid(),m=parseInt("100",8),g=parseInt("010",8),x=parseInt("001",8),S=m|g,v=n&x||n&g&&h===p||n&m&&o===l||n&S&&l===0;return v}});var Rr=C((zf,Tr)=>{var Wf=require("fs"),ht;process.platform==="win32"||global.TESTING_WINDOWS?ht=Cr():ht=Nr();Tr.exports=Mt;Mt.sync=Go;function Mt(i,r,n){if(typeof r=="function"&&(n=r,r={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(o,h){Mt(i,r||{},function(l,p){l?h(l):o(p)})})}ht(i,r||{},function(o,h){o&&(o.code==="EACCES"||r&&r.ignoreErrors)&&(o=null,h=!1),n(o,h)})}function Go(i,r){try{return ht.sync(i,r||{})}catch(n){if(r&&r.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var Dr=C((Xf,$r)=>{var Re=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Pr=require("path"),Ho=Re?";":":",Lr=Rr(),Or=i=>Object.assign(new Error(`not found: ${i}`),{code:"ENOENT"}),Vr=(i,r)=>{let n=r.colon||Ho,o=i.match(/\//)||Re&&i.match(/\\/)?[""]:[...Re?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(n)],h=Re?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",l=Re?h.split(n):[""];return Re&&i.indexOf(".")!==-1&&l[0]!==""&&l.unshift(""),{pathEnv:o,pathExt:l,pathExtExe:h}},Fr=(i,r,n)=>{typeof r=="function"&&(n=r,r={}),r||(r={});let{pathEnv:o,pathExt:h,pathExtExe:l}=Vr(i,r),p=[],m=x=>new Promise((S,v)=>{if(x===o.length)return r.all&&p.length?S(p):v(Or(i));let b=o[x],E=/^".*"$/.test(b)?b.slice(1,-1):b,N=Pr.join(E,i),q=!E&&/^\.[\\\/]/.test(i)?i.slice(0,2)+N:N;S(g(q,x,0))}),g=(x,S,v)=>new Promise((b,E)=>{if(v===h.length)return b(m(S+1));let N=h[v];Lr(x+N,{pathExt:l},(q,G)=>{if(!q&&G)if(r.all)p.push(x+N);else return b(x+N);return b(g(x,S,v+1))})});return n?m(0).then(x=>n(null,x),n):m(0)},Wo=(i,r)=>{r=r||{};let{pathEnv:n,pathExt:o,pathExtExe:h}=Vr(i,r),l=[];for(let p=0;p<n.length;p++){let m=n[p],g=/^".*"$/.test(m)?m.slice(1,-1):m,x=Pr.join(g,i),S=!g&&/^\.[\\\/]/.test(i)?i.slice(0,2)+x:x;for(let v=0;v<o.length;v++){let b=S+o[v];try{if(Lr.sync(b,{pathExt:h}))if(r.all)l.push(b);else return b}catch{}}}if(r.all&&l.length)return l;if(r.nothrow)return null;throw Or(i)};$r.exports=Fr;Fr.sync=Wo});var jr=C((Kf,Gt)=>{"use strict";var qr=(i={})=>{let r=i.env||process.env;return(i.platform||process.platform)!=="win32"?"PATH":Object.keys(r).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"};Gt.exports=qr;Gt.exports.default=qr});var Gr=C((Yf,Mr)=>{"use strict";var Ur=require("path"),zo=Dr(),Xo=jr();function Br(i,r){let n=i.options.env||process.env,o=process.cwd(),h=i.options.cwd!=null,l=h&&process.chdir!==void 0&&!process.chdir.disabled;if(l)try{process.chdir(i.options.cwd)}catch{}let p;try{p=zo.sync(i.command,{path:n[Xo({env:n})],pathExt:r?Ur.delimiter:void 0})}catch{}finally{l&&process.chdir(o)}return p&&(p=Ur.resolve(h?i.options.cwd:"",p)),p}function Ko(i){return Br(i)||Br(i,!0)}Mr.exports=Ko});var Hr=C((Jf,Wt)=>{"use strict";var Ht=/([()\][%!^"`<>&|;, *?])/g;function Yo(i){return i=i.replace(Ht,"^$1"),i}function Jo(i,r){return i=`${i}`,i=i.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),i=i.replace(/(?=(\\+?)?)\1$/,"$1$1"),i=`"${i}"`,i=i.replace(Ht,"^$1"),r&&(i=i.replace(Ht,"^$1")),i}Wt.exports.command=Yo;Wt.exports.argument=Jo});var zr=C((Qf,Wr)=>{"use strict";Wr.exports=/^#!(.*)/});var Kr=C((Zf,Xr)=>{"use strict";var Qo=zr();Xr.exports=(i="")=>{let r=i.match(Qo);if(!r)return null;let[n,o]=r[0].replace(/#! ?/,"").split(" "),h=n.split("/").pop();return h==="env"?o:o?`${h} ${o}`:h}});var Jr=C((ep,Yr)=>{"use strict";var zt=require("fs"),Zo=Kr();function eu(i){let n=Buffer.alloc(150),o;try{o=zt.openSync(i,"r"),zt.readSync(o,n,0,150,0),zt.closeSync(o)}catch{}return Zo(n.toString())}Yr.exports=eu});var ts=C((tp,es)=>{"use strict";var tu=require("path"),Qr=Gr(),Zr=Hr(),iu=Jr(),ru=process.platform==="win32",su=/\.(?:com|exe)$/i,nu=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function au(i){i.file=Qr(i);let r=i.file&&iu(i.file);return r?(i.args.unshift(i.file),i.command=r,Qr(i)):i.file}function ou(i){if(!ru)return i;let r=au(i),n=!su.test(r);if(i.options.forceShell||n){let o=nu.test(r);i.command=tu.normalize(i.command),i.command=Zr.command(i.command),i.args=i.args.map(l=>Zr.argument(l,o));let h=[i.command].concat(i.args).join(" ");i.args=["/d","/s","/c",`"${h}"`],i.command=process.env.comspec||"cmd.exe",i.options.windowsVerbatimArguments=!0}return i}function uu(i,r,n){r&&!Array.isArray(r)&&(n=r,r=null),r=r?r.slice(0):[],n=Object.assign({},n);let o={command:i,args:r,options:n,file:void 0,original:{command:i,args:r}};return n.shell?o:ou(o)}es.exports=uu});var ss=C((ip,rs)=>{"use strict";var Xt=process.platform==="win32";function Kt(i,r){return Object.assign(new Error(`${r} ${i.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${r} ${i.command}`,path:i.command,spawnargs:i.args})}function cu(i,r){if(!Xt)return;let n=i.emit;i.emit=function(o,h){if(o==="exit"){let l=is(h,r);if(l)return n.call(i,"error",l)}return n.apply(i,arguments)}}function is(i,r){return Xt&&i===1&&!r.file?Kt(r.original,"spawn"):null}function hu(i,r){return Xt&&i===1&&!r.file?Kt(r.original,"spawnSync"):null}rs.exports={hookChildProcess:cu,verifyENOENT:is,verifyENOENTSync:hu,notFoundError:Kt}});var os=C((rp,Pe)=>{"use strict";var ns=require("child_process"),Yt=ts(),Jt=ss();function as(i,r,n){let o=Yt(i,r,n),h=ns.spawn(o.command,o.args,o.options);return Jt.hookChildProcess(h,o),h}function lu(i,r,n){let o=Yt(i,r,n),h=ns.spawnSync(o.command,o.args,o.options);return h.error=h.error||Jt.verifyENOENTSync(h.status,o),h}Pe.exports=as;Pe.exports.spawn=as;Pe.exports.sync=lu;Pe.exports._parse=Yt;Pe.exports._enoent=Jt});var Le=C((sp,us)=>{"use strict";var fu="2.0.0",pu=Number.MAX_SAFE_INTEGER||9007199254740991,du=16,mu=250,xu=["major","premajor","minor","preminor","patch","prepatch","prerelease"];us.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:du,MAX_SAFE_BUILD_LENGTH:mu,MAX_SAFE_INTEGER:pu,RELEASE_TYPES:xu,SEMVER_SPEC_VERSION:fu,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var He=C((np,cs)=>{"use strict";var gu=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{};cs.exports=gu});var Oe=C((oe,hs)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Qt,MAX_SAFE_BUILD_LENGTH:vu,MAX_LENGTH:yu}=Le(),Eu=He();oe=hs.exports={};var bu=oe.re=[],wu=oe.safeRe=[],I=oe.src=[],Su=oe.safeSrc=[],k=oe.t={},Cu=0,Zt="[a-zA-Z0-9-]",Iu=[["\\s",1],["\\d",yu],[Zt,vu]],ku=i=>{for(let[r,n]of Iu)i=i.split(`${r}*`).join(`${r}{0,${n}}`).split(`${r}+`).join(`${r}{1,${n}}`);return i},P=(i,r,n)=>{let o=ku(r),h=Cu++;Eu(i,h,r),k[i]=h,I[h]=r,Su[h]=o,bu[h]=new RegExp(r,n?"g":void 0),wu[h]=new RegExp(o,n?"g":void 0)};P("NUMERICIDENTIFIER","0|[1-9]\\d*");P("NUMERICIDENTIFIERLOOSE","\\d+");P("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Zt}*`);P("MAINVERSION",`(${I[k.NUMERICIDENTIFIER]})\\.(${I[k.NUMERICIDENTIFIER]})\\.(${I[k.NUMERICIDENTIFIER]})`);P("MAINVERSIONLOOSE",`(${I[k.NUMERICIDENTIFIERLOOSE]})\\.(${I[k.NUMERICIDENTIFIERLOOSE]})\\.(${I[k.NUMERICIDENTIFIERLOOSE]})`);P("PRERELEASEIDENTIFIER",`(?:${I[k.NONNUMERICIDENTIFIER]}|${I[k.NUMERICIDENTIFIER]})`);P("PRERELEASEIDENTIFIERLOOSE",`(?:${I[k.NONNUMERICIDENTIFIER]}|${I[k.NUMERICIDENTIFIERLOOSE]})`);P("PRERELEASE",`(?:-(${I[k.PRERELEASEIDENTIFIER]}(?:\\.${I[k.PRERELEASEIDENTIFIER]})*))`);P("PRERELEASELOOSE",`(?:-?(${I[k.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${I[k.PRERELEASEIDENTIFIERLOOSE]})*))`);P("BUILDIDENTIFIER",`${Zt}+`);P("BUILD",`(?:\\+(${I[k.BUILDIDENTIFIER]}(?:\\.${I[k.BUILDIDENTIFIER]})*))`);P("FULLPLAIN",`v?${I[k.MAINVERSION]}${I[k.PRERELEASE]}?${I[k.BUILD]}?`);P("FULL",`^${I[k.FULLPLAIN]}$`);P("LOOSEPLAIN",`[v=\\s]*${I[k.MAINVERSIONLOOSE]}${I[k.PRERELEASELOOSE]}?${I[k.BUILD]}?`);P("LOOSE",`^${I[k.LOOSEPLAIN]}$`);P("GTLT","((?:<|>)?=?)");P("XRANGEIDENTIFIERLOOSE",`${I[k.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);P("XRANGEIDENTIFIER",`${I[k.NUMERICIDENTIFIER]}|x|X|\\*`);P("XRANGEPLAIN",`[v=\\s]*(${I[k.XRANGEIDENTIFIER]})(?:\\.(${I[k.XRANGEIDENTIFIER]})(?:\\.(${I[k.XRANGEIDENTIFIER]})(?:${I[k.PRERELEASE]})?${I[k.BUILD]}?)?)?`);P("XRANGEPLAINLOOSE",`[v=\\s]*(${I[k.XRANGEIDENTIFIERLOOSE]})(?:\\.(${I[k.XRANGEIDENTIFIERLOOSE]})(?:\\.(${I[k.XRANGEIDENTIFIERLOOSE]})(?:${I[k.PRERELEASELOOSE]})?${I[k.BUILD]}?)?)?`);P("XRANGE",`^${I[k.GTLT]}\\s*${I[k.XRANGEPLAIN]}$`);P("XRANGELOOSE",`^${I[k.GTLT]}\\s*${I[k.XRANGEPLAINLOOSE]}$`);P("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Qt}})(?:\\.(\\d{1,${Qt}}))?(?:\\.(\\d{1,${Qt}}))?`);P("COERCE",`${I[k.COERCEPLAIN]}(?:$|[^\\d])`);P("COERCEFULL",I[k.COERCEPLAIN]+`(?:${I[k.PRERELEASE]})?(?:${I[k.BUILD]})?(?:$|[^\\d])`);P("COERCERTL",I[k.COERCE],!0);P("COERCERTLFULL",I[k.COERCEFULL],!0);P("LONETILDE","(?:~>?)");P("TILDETRIM",`(\\s*)${I[k.LONETILDE]}\\s+`,!0);oe.tildeTrimReplace="$1~";P("TILDE",`^${I[k.LONETILDE]}${I[k.XRANGEPLAIN]}$`);P("TILDELOOSE",`^${I[k.LONETILDE]}${I[k.XRANGEPLAINLOOSE]}$`);P("LONECARET","(?:\\^)");P("CARETTRIM",`(\\s*)${I[k.LONECARET]}\\s+`,!0);oe.caretTrimReplace="$1^";P("CARET",`^${I[k.LONECARET]}${I[k.XRANGEPLAIN]}$`);P("CARETLOOSE",`^${I[k.LONECARET]}${I[k.XRANGEPLAINLOOSE]}$`);P("COMPARATORLOOSE",`^${I[k.GTLT]}\\s*(${I[k.LOOSEPLAIN]})$|^$`);P("COMPARATOR",`^${I[k.GTLT]}\\s*(${I[k.FULLPLAIN]})$|^$`);P("COMPARATORTRIM",`(\\s*)${I[k.GTLT]}\\s*(${I[k.LOOSEPLAIN]}|${I[k.XRANGEPLAIN]})`,!0);oe.comparatorTrimReplace="$1$2$3";P("HYPHENRANGE",`^\\s*(${I[k.XRANGEPLAIN]})\\s+-\\s+(${I[k.XRANGEPLAIN]})\\s*$`);P("HYPHENRANGELOOSE",`^\\s*(${I[k.XRANGEPLAINLOOSE]})\\s+-\\s+(${I[k.XRANGEPLAINLOOSE]})\\s*$`);P("STAR","(<|>)?=?\\s*\\*");P("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");P("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var lt=C((ap,ls)=>{"use strict";var _u=Object.freeze({loose:!0}),Au=Object.freeze({}),Nu=i=>i?typeof i!="object"?_u:i:Au;ls.exports=Nu});var ei=C((op,ds)=>{"use strict";var fs=/^[0-9]+$/,ps=(i,r)=>{if(typeof i=="number"&&typeof r=="number")return i===r?0:i<r?-1:1;let n=fs.test(i),o=fs.test(r);return n&&o&&(i=+i,r=+r),i===r?0:n&&!o?-1:o&&!n?1:i<r?-1:1},Tu=(i,r)=>ps(r,i);ds.exports={compareIdentifiers:ps,rcompareIdentifiers:Tu}});var H=C((up,xs)=>{"use strict";var ft=He(),{MAX_LENGTH:ms,MAX_SAFE_INTEGER:pt}=Le(),{safeRe:dt,t:mt}=Oe(),Ru=lt(),{compareIdentifiers:ti}=ei(),Pu=(i,r)=>{let n=r.split(".");if(n.length>i.length)return!1;for(let o=0;o<n.length;o++)if(ti(i[o],n[o])!==0)return!1;return!0},ii=class i{constructor(r,n){if(n=Ru(n),r instanceof i){if(r.loose===!!n.loose&&r.includePrerelease===!!n.includePrerelease)return r;r=r.version}else if(typeof r!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof r}".`);if(r.length>ms)throw new TypeError(`version is longer than ${ms} characters`);ft("SemVer",r,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let o=r.trim().match(n.loose?dt[mt.LOOSE]:dt[mt.FULL]);if(!o)throw new TypeError(`Invalid Version: ${r}`);if(this.raw=r,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>pt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>pt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>pt||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(h=>{if(/^[0-9]+$/.test(h)){let l=+h;if(l>=0&&l<pt)return l}return h}):this.prerelease=[],this.build=o[5]?o[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(r){if(ft("SemVer.compare",this.version,this.options,r),!(r instanceof i)){if(typeof r=="string"&&r===this.version)return 0;r=new i(r,this.options)}return r.version===this.version?0:this.compareMain(r)||this.comparePre(r)}compareMain(r){return r instanceof i||(r=new i(r,this.options)),this.major<r.major?-1:this.major>r.major?1:this.minor<r.minor?-1:this.minor>r.minor?1:this.patch<r.patch?-1:this.patch>r.patch?1:0}comparePre(r){if(r instanceof i||(r=new i(r,this.options)),this.prerelease.length&&!r.prerelease.length)return-1;if(!this.prerelease.length&&r.prerelease.length)return 1;if(!this.prerelease.length&&!r.prerelease.length)return 0;let n=0;do{let o=this.prerelease[n],h=r.prerelease[n];if(ft("prerelease compare",n,o,h),o===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(o===void 0)return-1;if(o===h)continue;return ti(o,h)}while(++n)}compareBuild(r){r instanceof i||(r=new i(r,this.options));let n=0;do{let o=this.build[n],h=r.build[n];if(ft("build compare",n,o,h),o===void 0&&h===void 0)return 0;if(h===void 0)return 1;if(o===void 0)return-1;if(o===h)continue;return ti(o,h)}while(++n)}inc(r,n,o){if(r.startsWith("pre")){if(!n&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let h=`-${n}`.match(this.options.loose?dt[mt.PRERELEASELOOSE]:dt[mt.PRERELEASE]);if(!h||h[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(r){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,o),this.inc("pre",n,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,o),this.inc("pre",n,o);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let h=Number(o)?1:0;if(this.prerelease.length===0)this.prerelease=[h];else{let l=this.prerelease.length;for(;--l>=0;)typeof this.prerelease[l]=="number"&&(this.prerelease[l]++,l=-2);if(l===-1){if(n===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(h)}}if(n){let l=[n,h];if(o===!1&&(l=[n]),Pu(this.prerelease,n)){let p=this.prerelease[n.split(".").length];isNaN(p)&&(this.prerelease=l)}else this.prerelease=l}break}default:throw new Error(`invalid increment argument: ${r}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};xs.exports=ii});var xe=C((cp,vs)=>{"use strict";var gs=H(),Lu=(i,r,n=!1)=>{if(i instanceof gs)return i;try{return new gs(i,r)}catch(o){if(!n)return null;throw o}};vs.exports=Lu});var Es=C((hp,ys)=>{"use strict";var Ou=xe(),Vu=(i,r)=>{let n=Ou(i,r);return n?n.version:null};ys.exports=Vu});var ws=C((lp,bs)=>{"use strict";var Fu=xe(),$u=(i,r)=>{let n=Fu(i.trim().replace(/^[=v]+/,""),r);return n?n.version:null};bs.exports=$u});var Is=C((fp,Cs)=>{"use strict";var Ss=H(),Du=(i,r,n,o,h)=>{typeof n=="string"&&(h=o,o=n,n=void 0);try{return new Ss(i instanceof Ss?i.version:i,n).inc(r,o,h).version}catch{return null}};Cs.exports=Du});var As=C((pp,_s)=>{"use strict";var ks=xe(),qu=(i,r)=>{let n=ks(i,null,!0),o=ks(r,null,!0),h=n.compare(o);if(h===0)return null;let l=h>0,p=l?n:o,m=l?o:n,g=!!p.prerelease.length;if(!!m.prerelease.length&&!g){if(!m.patch&&!m.minor)return"major";if(m.compareMain(p)===0)return m.minor&&!m.patch?"minor":"patch"}let S=g?"pre":"";return n.major!==o.major?S+"major":n.minor!==o.minor?S+"minor":n.patch!==o.patch?S+"patch":"prerelease"};_s.exports=qu});var Ts=C((dp,Ns)=>{"use strict";var ju=H(),Uu=(i,r)=>new ju(i,r).major;Ns.exports=Uu});var Ps=C((mp,Rs)=>{"use strict";var Bu=H(),Mu=(i,r)=>new Bu(i,r).minor;Rs.exports=Mu});var Os=C((xp,Ls)=>{"use strict";var Gu=H(),Hu=(i,r)=>new Gu(i,r).patch;Ls.exports=Hu});var Fs=C((gp,Vs)=>{"use strict";var Wu=xe(),zu=(i,r)=>{let n=Wu(i,r);return n&&n.prerelease.length?n.prerelease:null};Vs.exports=zu});var ie=C((vp,Ds)=>{"use strict";var $s=H(),Xu=(i,r,n)=>new $s(i,n).compare(new $s(r,n));Ds.exports=Xu});var js=C((yp,qs)=>{"use strict";var Ku=ie(),Yu=(i,r,n)=>Ku(r,i,n);qs.exports=Yu});var Bs=C((Ep,Us)=>{"use strict";var Ju=ie(),Qu=(i,r)=>Ju(i,r,!0);Us.exports=Qu});var xt=C((bp,Gs)=>{"use strict";var Ms=H(),Zu=(i,r,n)=>{let o=new Ms(i,n),h=new Ms(r,n);return o.compare(h)||o.compareBuild(h)};Gs.exports=Zu});var Ws=C((wp,Hs)=>{"use strict";var ec=xt(),tc=(i,r)=>i.sort((n,o)=>ec(n,o,r));Hs.exports=tc});var Xs=C((Sp,zs)=>{"use strict";var ic=xt(),rc=(i,r)=>i.sort((n,o)=>ic(o,n,r));zs.exports=rc});var We=C((Cp,Ks)=>{"use strict";var sc=ie(),nc=(i,r,n)=>sc(i,r,n)>0;Ks.exports=nc});var gt=C((Ip,Ys)=>{"use strict";var ac=ie(),oc=(i,r,n)=>ac(i,r,n)<0;Ys.exports=oc});var ri=C((kp,Js)=>{"use strict";var uc=ie(),cc=(i,r,n)=>uc(i,r,n)===0;Js.exports=cc});var si=C((_p,Qs)=>{"use strict";var hc=ie(),lc=(i,r,n)=>hc(i,r,n)!==0;Qs.exports=lc});var vt=C((Ap,Zs)=>{"use strict";var fc=ie(),pc=(i,r,n)=>fc(i,r,n)>=0;Zs.exports=pc});var yt=C((Np,en)=>{"use strict";var dc=ie(),mc=(i,r,n)=>dc(i,r,n)<=0;en.exports=mc});var ni=C((Tp,tn)=>{"use strict";var xc=ri(),gc=si(),vc=We(),yc=vt(),Ec=gt(),bc=yt(),wc=(i,r,n,o)=>{switch(r){case"===":return typeof i=="object"&&(i=i.version),typeof n=="object"&&(n=n.version),i===n;case"!==":return typeof i=="object"&&(i=i.version),typeof n=="object"&&(n=n.version),i!==n;case"":case"=":case"==":return xc(i,n,o);case"!=":return gc(i,n,o);case">":return vc(i,n,o);case">=":return yc(i,n,o);case"<":return Ec(i,n,o);case"<=":return bc(i,n,o);default:throw new TypeError(`Invalid operator: ${r}`)}};tn.exports=wc});var sn=C((Rp,rn)=>{"use strict";var Sc=H(),Cc=xe(),{safeRe:Et,t:bt}=Oe(),Ic=(i,r)=>{if(i instanceof Sc)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;r=r||{};let n=null;if(!r.rtl)n=i.match(r.includePrerelease?Et[bt.COERCEFULL]:Et[bt.COERCE]);else{let g=r.includePrerelease?Et[bt.COERCERTLFULL]:Et[bt.COERCERTL],x;for(;(x=g.exec(i))&&(!n||n.index+n[0].length!==i.length);)(!n||x.index+x[0].length!==n.index+n[0].length)&&(n=x),g.lastIndex=x.index+x[1].length+x[2].length;g.lastIndex=-1}if(n===null)return null;let o=n[2],h=n[3]||"0",l=n[4]||"0",p=r.includePrerelease&&n[5]?`-${n[5]}`:"",m=r.includePrerelease&&n[6]?`+${n[6]}`:"";return Cc(`${o}.${h}.${l}${p}${m}`,r)};rn.exports=Ic});var an=C((Pp,nn)=>{"use strict";var kc=xe(),_c=Le(),Ac=H(),Nc=(i,r,n)=>{if(!_c.RELEASE_TYPES.includes(r))return null;let o=Tc(i,n);return o&&Rc(o,r)},Tc=(i,r)=>{let n=i instanceof Ac?i.version:i;return kc(n,r)},Rc=(i,r)=>{if(Pc(r))return i.version;switch(i.prerelease=[],r){case"major":i.minor=0,i.patch=0;break;case"minor":i.patch=0;break}return i.format()},Pc=i=>i.startsWith("pre");nn.exports=Nc});var un=C((Lp,on)=>{"use strict";var ai=class{constructor(){this.max=1e3,this.map=new Map}get(r){let n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){let h=this.map.keys().next().value;this.delete(h)}this.map.set(r,n)}return this}};on.exports=ai});var re=C((Op,fn)=>{"use strict";var Lc=/\s+/g,oi=class i{constructor(r,n){if(n=Vc(n),r instanceof i)return r.loose===!!n.loose&&r.includePrerelease===!!n.includePrerelease?r:new i(r.raw,n);if(r instanceof ui)return this.raw=r.value,this.set=[[r]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=r.trim().replace(Lc," "),this.set=this.raw.split("||").map(o=>this.parseRange(o.trim())).filter(o=>o.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let o=this.set[0];if(this.set=this.set.filter(h=>!hn(h[0])),this.set.length===0)this.set=[o];else if(this.set.length>1){for(let h of this.set)if(h.length===1&&Gc(h[0])){this.set=[h];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let r=0;r<this.set.length;r++){r>0&&(this.formatted+="||");let n=this.set[r];for(let o=0;o<n.length;o++)o>0&&(this.formatted+=" "),this.formatted+=n[o].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(r){r=r.replace(Mc,"");let o=((this.options.includePrerelease&&Uc)|(this.options.loose&&Bc))+":"+r,h=cn.get(o);if(h)return h;let l=this.options.loose,p=l?Y[W.HYPHENRANGELOOSE]:Y[W.HYPHENRANGE];r=r.replace(p,th(this.options.includePrerelease)),D("hyphen replace",r),r=r.replace(Y[W.COMPARATORTRIM],Dc),D("comparator trim",r),r=r.replace(Y[W.TILDETRIM],qc),D("tilde trim",r),r=r.replace(Y[W.CARETTRIM],jc),D("caret trim",r);let m=r.split(" ").map(v=>Hc(v,this.options)).join(" ").split(/\s+/).map(v=>eh(v,this.options));l&&(m=m.filter(v=>(D("loose invalid filter",v,this.options),!!v.match(Y[W.COMPARATORLOOSE])))),D("range list",m);let g=new Map,x=m.map(v=>new ui(v,this.options));for(let v of x){if(hn(v))return[v];g.set(v.value,v)}g.size>1&&g.has("")&&g.delete("");let S=[...g.values()];return cn.set(o,S),S}intersects(r,n){if(!(r instanceof i))throw new TypeError("a Range is required");return this.set.some(o=>ln(o,n)&&r.set.some(h=>ln(h,n)&&o.every(l=>h.every(p=>l.intersects(p,n)))))}test(r){if(!r)return!1;if(typeof r=="string")try{r=new Fc(r,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(ih(this.set[n],r,this.options))return!0;return!1}};fn.exports=oi;var Oc=un(),cn=new Oc,Vc=lt(),ui=ze(),D=He(),Fc=H(),{safeRe:Y,src:$c,t:W,comparatorTrimReplace:Dc,tildeTrimReplace:qc,caretTrimReplace:jc}=Oe(),{FLAG_INCLUDE_PRERELEASE:Uc,FLAG_LOOSE:Bc}=Le(),Mc=new RegExp($c[W.BUILD],"g"),hn=i=>i.value==="<0.0.0-0",Gc=i=>i.value==="",ln=(i,r)=>{let n=!0,o=i.slice(),h=o.pop();for(;n&&o.length;)n=o.every(l=>h.intersects(l,r)),h=o.pop();return n},Hc=(i,r)=>(i=i.replace(Y[W.BUILD],""),D("comp",i,r),i=Kc(i,r),D("caret",i),i=zc(i,r),D("tildes",i),i=Jc(i,r),D("xrange",i),i=Zc(i,r),D("stars",i),i),B=i=>!i||i.toLowerCase()==="x"||i==="*",Wc=(i,r,n)=>B(i)&&!B(r)||B(r)&&n&&!B(n),zc=(i,r)=>i.trim().split(/\s+/).map(n=>Xc(n,r)).join(" "),Xc=(i,r)=>{let n=r.loose?Y[W.TILDELOOSE]:Y[W.TILDE],o=r.includePrerelease?"-0":"";return i.replace(n,(h,l,p,m,g)=>{D("tilde",i,h,l,p,m,g);let x;return B(l)?x="":B(p)?x=`>=${l}.0.0${o} <${+l+1}.0.0-0`:B(m)?x=`>=${l}.${p}.0${o} <${l}.${+p+1}.0-0`:g?(D("replaceTilde pr",g),x=`>=${l}.${p}.${m}-${g} <${l}.${+p+1}.0-0`):x=`>=${l}.${p}.${m} <${l}.${+p+1}.0-0`,D("tilde return",x),x})},Kc=(i,r)=>i.trim().split(/\s+/).map(n=>Yc(n,r)).join(" "),Yc=(i,r)=>{D("caret",i,r);let n=r.loose?Y[W.CARETLOOSE]:Y[W.CARET],o=r.includePrerelease?"-0":"";return i.replace(n,(h,l,p,m,g)=>{D("caret",i,h,l,p,m,g);let x;return B(l)?x="":B(p)?x=`>=${l}.0.0${o} <${+l+1}.0.0-0`:B(m)?l==="0"?x=`>=${l}.${p}.0${o} <${l}.${+p+1}.0-0`:x=`>=${l}.${p}.0${o} <${+l+1}.0.0-0`:g?(D("replaceCaret pr",g),l==="0"?p==="0"?x=`>=${l}.${p}.${m}-${g} <${l}.${p}.${+m+1}-0`:x=`>=${l}.${p}.${m}-${g} <${l}.${+p+1}.0-0`:x=`>=${l}.${p}.${m}-${g} <${+l+1}.0.0-0`):(D("no pr"),l==="0"?p==="0"?x=`>=${l}.${p}.${m} <${l}.${p}.${+m+1}-0`:x=`>=${l}.${p}.${m} <${l}.${+p+1}.0-0`:x=`>=${l}.${p}.${m} <${+l+1}.0.0-0`),D("caret return",x),x})},Jc=(i,r)=>(D("replaceXRanges",i,r),i.split(/\s+/).map(n=>Qc(n,r)).join(" ")),Qc=(i,r)=>{i=i.trim();let n=r.loose?Y[W.XRANGELOOSE]:Y[W.XRANGE];return i.replace(n,(o,h,l,p,m,g)=>{if(D("xRange",i,o,h,l,p,m,g),Wc(l,p,m))return i;let x=B(l),S=x||B(p),v=S||B(m),b=v;return h==="="&&b&&(h=""),g=r.includePrerelease?"-0":"",x?h===">"||h==="<"?o="<0.0.0-0":o="*":h&&b?(S&&(p=0),m=0,h===">"?(h=">=",S?(l=+l+1,p=0,m=0):(p=+p+1,m=0)):h==="<="&&(h="<",S?l=+l+1:p=+p+1),h==="<"&&(g="-0"),o=`${h+l}.${p}.${m}${g}`):S?o=`>=${l}.0.0${g} <${+l+1}.0.0-0`:v&&(o=`>=${l}.${p}.0${g} <${l}.${+p+1}.0-0`),D("xRange return",o),o})},Zc=(i,r)=>(D("replaceStars",i,r),i.trim().replace(Y[W.STAR],"")),eh=(i,r)=>(D("replaceGTE0",i,r),i.trim().replace(Y[r.includePrerelease?W.GTE0PRE:W.GTE0],"")),th=i=>(r,n,o,h,l,p,m,g,x,S,v,b)=>(B(o)?n="":B(h)?n=`>=${o}.0.0${i?"-0":""}`:B(l)?n=`>=${o}.${h}.0${i?"-0":""}`:p?n=`>=${n}`:n=`>=${n}${i?"-0":""}`,B(x)?g="":B(S)?g=`<${+x+1}.0.0-0`:B(v)?g=`<${x}.${+S+1}.0-0`:b?g=`<=${x}.${S}.${v}-${b}`:i?g=`<${x}.${S}.${+v+1}-0`:g=`<=${g}`,`${n} ${g}`.trim()),ih=(i,r,n)=>{for(let o=0;o<i.length;o++)if(!i[o].test(r))return!1;if(r.prerelease.length&&!n.includePrerelease){for(let o=0;o<i.length;o++)if(D(i[o].semver),i[o].semver!==ui.ANY&&i[o].semver.prerelease.length>0){let h=i[o].semver;if(h.major===r.major&&h.minor===r.minor&&h.patch===r.patch)return!0}return!1}return!0}});var ze=C((Vp,vn)=>{"use strict";var Xe=Symbol("SemVer ANY"),li=class i{static get ANY(){return Xe}constructor(r,n){if(n=pn(n),r instanceof i){if(r.loose===!!n.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),hi("comparator",r,n),this.options=n,this.loose=!!n.loose,this.parse(r),this.semver===Xe?this.value="":this.value=this.operator+this.semver.version,hi("comp",this)}parse(r){let n=this.options.loose?dn[mn.COMPARATORLOOSE]:dn[mn.COMPARATOR],o=r.match(n);if(!o)throw new TypeError(`Invalid comparator: ${r}`);this.operator=o[1]!==void 0?o[1]:"",this.operator==="="&&(this.operator=""),o[2]?this.semver=new xn(o[2],this.options.loose):this.semver=Xe}toString(){return this.value}test(r){if(hi("Comparator.test",r,this.options.loose),this.semver===Xe||r===Xe)return!0;if(typeof r=="string")try{r=new xn(r,this.options)}catch{return!1}return ci(r,this.operator,this.semver,this.options)}intersects(r,n){if(!(r instanceof i))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new gn(r.value,n).test(this.value):r.operator===""?r.value===""?!0:new gn(this.value,n).test(r.semver):(n=pn(n),n.includePrerelease&&(this.value==="<0.0.0-0"||r.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||r.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&r.operator.startsWith(">")||this.operator.startsWith("<")&&r.operator.startsWith("<")||this.semver.version===r.semver.version&&this.operator.includes("=")&&r.operator.includes("=")||ci(this.semver,"<",r.semver,n)&&this.operator.startsWith(">")&&r.operator.startsWith("<")||ci(this.semver,">",r.semver,n)&&this.operator.startsWith("<")&&r.operator.startsWith(">")))}};vn.exports=li;var pn=lt(),{safeRe:dn,t:mn}=Oe(),ci=ni(),hi=He(),xn=H(),gn=re()});var Ke=C((Fp,yn)=>{"use strict";var rh=re(),sh=(i,r,n)=>{try{r=new rh(r,n)}catch{return!1}return r.test(i)};yn.exports=sh});var bn=C(($p,En)=>{"use strict";var nh=re(),ah=(i,r)=>new nh(i,r).set.map(n=>n.map(o=>o.value).join(" ").trim().split(" "));En.exports=ah});var Sn=C((Dp,wn)=>{"use strict";var oh=H(),uh=re(),ch=(i,r,n)=>{let o=null,h=null,l=null;try{l=new uh(r,n)}catch{return null}return i.forEach(p=>{l.test(p)&&(!o||h.compare(p)===-1)&&(o=p,h=new oh(o,n))}),o};wn.exports=ch});var In=C((qp,Cn)=>{"use strict";var hh=H(),lh=re(),fh=(i,r,n)=>{let o=null,h=null,l=null;try{l=new lh(r,n)}catch{return null}return i.forEach(p=>{l.test(p)&&(!o||h.compare(p)===1)&&(o=p,h=new hh(o,n))}),o};Cn.exports=fh});var An=C((jp,_n)=>{"use strict";var fi=H(),ph=re(),kn=We(),dh=(i,r)=>{i=new ph(i,r);let n=new fi("0.0.0");if(i.test(n)||(n=new fi("0.0.0-0"),i.test(n)))return n;n=null;for(let o=0;o<i.set.length;++o){let h=i.set[o],l=null;h.forEach(p=>{let m=new fi(p.semver.version);switch(p.operator){case">":m.prerelease.length===0?m.patch++:m.prerelease.push(0),m.raw=m.format();case"":case">=":(!l||kn(m,l))&&(l=m);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${p.operator}`)}}),l&&(!n||kn(n,l))&&(n=l)}return n&&i.test(n)?n:null};_n.exports=dh});var Tn=C((Up,Nn)=>{"use strict";var mh=re(),xh=(i,r)=>{try{return new mh(i,r).range||"*"}catch{return null}};Nn.exports=xh});var wt=C((Bp,On)=>{"use strict";var gh=H(),Ln=ze(),{ANY:vh}=Ln,yh=re(),Eh=Ke(),Rn=We(),Pn=gt(),bh=yt(),wh=vt(),Sh=(i,r,n,o)=>{i=new gh(i,o),r=new yh(r,o);let h,l,p,m,g;switch(n){case">":h=Rn,l=bh,p=Pn,m=">",g=">=";break;case"<":h=Pn,l=wh,p=Rn,m="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Eh(i,r,o))return!1;for(let x=0;x<r.set.length;++x){let S=r.set[x],v=null,b=null;if(S.forEach(E=>{E.semver===vh&&(E=new Ln(">=0.0.0")),v=v||E,b=b||E,h(E.semver,v.semver,o)?v=E:p(E.semver,b.semver,o)&&(b=E)}),v.operator===m||v.operator===g||(!b.operator||b.operator===m)&&l(i,b.semver))return!1;if(b.operator===g&&p(i,b.semver))return!1}return!0};On.exports=Sh});var Fn=C((Mp,Vn)=>{"use strict";var Ch=wt(),Ih=(i,r,n)=>Ch(i,r,">",n);Vn.exports=Ih});var Dn=C((Gp,$n)=>{"use strict";var kh=wt(),_h=(i,r,n)=>kh(i,r,"<",n);$n.exports=_h});var Un=C((Hp,jn)=>{"use strict";var qn=re(),Ah=(i,r,n)=>(i=new qn(i,n),r=new qn(r,n),i.intersects(r,n));jn.exports=Ah});var Mn=C((Wp,Bn)=>{"use strict";var Nh=Ke(),Th=ie();Bn.exports=(i,r,n)=>{let o=[],h=null,l=null,p=i.sort((S,v)=>Th(S,v,n));for(let S of p)Nh(S,r,n)?(l=S,h||(h=S)):(l&&o.push([h,l]),l=null,h=null);h&&o.push([h,null]);let m=[];for(let[S,v]of o)S===v?m.push(S):!v&&S===p[0]?m.push("*"):v?S===p[0]?m.push(`<=${v}`):m.push(`${S} - ${v}`):m.push(`>=${S}`);let g=m.join(" || "),x=typeof r.raw=="string"?r.raw:String(r);return g.length<x.length?g:r}});var Kn=C((zp,Xn)=>{"use strict";var Gn=re(),mi=ze(),{ANY:pi}=mi,di=Ke(),xi=ie(),Rh=(i,r,n={})=>{if(i===r)return!0;i=new Gn(i,n),r=new Gn(r,n);let o=!1;e:for(let h of i.set){for(let l of r.set){let p=Lh(h,l,n);if(o=o||p!==null,p)continue e}if(o)return!1}return!0},Ph=[new mi(">=0.0.0-0")],Hn=[new mi(">=0.0.0")],Lh=(i,r,n)=>{if(i===r)return!0;if(i.length===1&&i[0].semver===pi){if(r.length===1&&r[0].semver===pi)return!0;n.includePrerelease?i=Ph:i=Hn}if(r.length===1&&r[0].semver===pi){if(n.includePrerelease)return!0;r=Hn}let o=new Set,h,l;for(let E of i)E.operator===">"||E.operator===">="?h=Wn(h,E,n):E.operator==="<"||E.operator==="<="?l=zn(l,E,n):o.add(E.semver);if(o.size>1)return null;let p;if(h&&l){if(p=xi(h.semver,l.semver,n),p>0)return null;if(p===0&&(h.operator!==">="||l.operator!=="<="))return null}for(let E of o){if(h&&!di(E,String(h),n)||l&&!di(E,String(l),n))return null;for(let N of r)if(!di(E,String(N),n))return!1;return!0}let m,g,x,S,v=l&&!n.includePrerelease&&l.semver.prerelease.length?l.semver:!1,b=h&&!n.includePrerelease&&h.semver.prerelease.length?h.semver:!1;v&&v.prerelease.length===1&&l.operator==="<"&&v.prerelease[0]===0&&(v=!1);for(let E of r){if(S=S||E.operator===">"||E.operator===">=",x=x||E.operator==="<"||E.operator==="<=",h){if(b&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===b.major&&E.semver.minor===b.minor&&E.semver.patch===b.patch&&(b=!1),E.operator===">"||E.operator===">="){if(m=Wn(h,E,n),m===E&&m!==h)return!1}else if(h.operator===">="&&!E.test(h.semver))return!1}if(l){if(v&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===v.major&&E.semver.minor===v.minor&&E.semver.patch===v.patch&&(v=!1),E.operator==="<"||E.operator==="<="){if(g=zn(l,E,n),g===E&&g!==l)return!1}else if(l.operator==="<="&&!E.test(l.semver))return!1}if(!E.operator&&(l||h)&&p!==0)return!1}return!(h&&x&&!l&&p!==0||l&&S&&!h&&p!==0||b||v)},Wn=(i,r,n)=>{if(!i)return r;let o=xi(i.semver,r.semver,n);return o>0?i:o<0||r.operator===">"&&i.operator===">="?r:i},zn=(i,r,n)=>{if(!i)return r;let o=xi(i.semver,r.semver,n);return o<0?i:o>0||r.operator==="<"&&i.operator==="<="?r:i};Xn.exports=Rh});var Zn=C((Xp,Qn)=>{"use strict";var gi=Oe(),Yn=Le(),Oh=H(),Jn=ei(),Vh=xe(),Fh=Es(),$h=ws(),Dh=Is(),qh=As(),jh=Ts(),Uh=Ps(),Bh=Os(),Mh=Fs(),Gh=ie(),Hh=js(),Wh=Bs(),zh=xt(),Xh=Ws(),Kh=Xs(),Yh=We(),Jh=gt(),Qh=ri(),Zh=si(),el=vt(),tl=yt(),il=ni(),rl=sn(),sl=an(),nl=ze(),al=re(),ol=Ke(),ul=bn(),cl=Sn(),hl=In(),ll=An(),fl=Tn(),pl=wt(),dl=Fn(),ml=Dn(),xl=Un(),gl=Mn(),vl=Kn();Qn.exports={parse:Vh,valid:Fh,clean:$h,inc:Dh,diff:qh,major:jh,minor:Uh,patch:Bh,prerelease:Mh,compare:Gh,rcompare:Hh,compareLoose:Wh,compareBuild:zh,sort:Xh,rsort:Kh,gt:Yh,lt:Jh,eq:Qh,neq:Zh,gte:el,lte:tl,cmp:il,coerce:rl,truncate:sl,Comparator:nl,Range:al,satisfies:ol,toComparators:ul,maxSatisfying:cl,minSatisfying:hl,minVersion:ll,validRange:fl,outside:pl,gtr:dl,ltr:ml,intersects:xl,simplifyRange:gl,subset:vl,SemVer:Oh,re:gi.re,src:gi.src,tokens:gi.t,SEMVER_SPEC_VERSION:Yn.SEMVER_SPEC_VERSION,RELEASE_TYPES:Yn.RELEASE_TYPES,compareIdentifiers:Jn.compareIdentifiers,rcompareIdentifiers:Jn.rcompareIdentifiers}});var St=C((Kp,ea)=>{var yl="https://app.frontfriend.dev",El=".cache/frontfriend",bl={JS:["tokens.js","variables.js","semanticVariables.js","semanticDarkVariables.js","keyframes.js","animations.js","safelist.js","custom.js"],JSON:["fonts.json","icons.json","components-config.json","iconLibrary.json","version.json","versionMetadata.json","metadata.json","base.json","nativeTokens.json"]},wl={FF_ID:"FF_ID",FF_API_URL:"FF_API_URL",FF_AUTH_TOKEN:"FF_AUTH_TOKEN",FF_MACHINE_TOKEN:"FRONTFRIEND_MACHINE_TOKEN"};function Sl(i){if(!i)return null;try{let r=new URL(i);return r.hostname.startsWith("app.")?`${r.protocol}//${r.hostname.replace(/^app\./,"registry.")}`:null}catch{return null}}ea.exports={DEFAULT_API_URL:yl,CACHE_DIR_NAME:El,CACHE_TTL_DAYS:7,CACHE_TTL_MS:6048e5,CACHE_FILES:bl,ENV_VARS:wl,deriveRegistryFromApiUrl:Sl}});var _t=C((Yp,ha)=>{var ge=require("fs"),se=require("path"),ia=os(),ne=Zn(),{DEFAULT_API_URL:Cl}=St(),ra=["dependencies","devDependencies","optionalDependencies","peerDependencies"];function vi(i){let r=typeof i=="string"&&i.match(/^((?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*)(?:@([^\r\n]+))?$/);if(!r)throw new Error(`Invalid npm dependency: ${String(i)}`);return{name:r[1],version:r[2]}}function Ei(i){let r=new Map;for(let n of i){let{name:o,version:h}=vi(n),l=r.get(o);r.set(o,l&&h?sa(o,l,h):h||l)}return r}function sa(i,r,n){if(r===n)return r;let o=ne.validRange(r),h=ne.validRange(n);if(o&&h)try{if(ne.subset(h,o))return n;if(ne.subset(o,h))return r}catch{}throw new Error(`Conflicting registry versions for ${i}: ${r} and ${n}`)}function Il(i,r){let n=typeof i=="string"&&ne.validRange(i),o=ne.validRange(r);if(!n||!o)return!1;try{return ne.subset(n,o)}catch{return!1}}function It(i,r){if(Il(i,r))return"satisfied";let n=typeof i=="string"&&ne.validRange(i),o=ne.validRange(r);if(!n||!o)return"incomparable";try{let h=ne.minVersion(n),l=ne.minVersion(o);return!h||!l?"incomparable":ne.lt(h,l)?"lower":"newer"}catch{return"incomparable"}}function Ct(i,r){let n=ra.find(o=>Object.hasOwn(i[o]||{},r));return n?{section:n,existing:i[n][r]}:null}function na(i,r){let n=Ei(r);if(n.size===0)return;let o=se.join(i,"package.json"),h=JSON.parse(ge.readFileSync(o,"utf8"));for(let[l,p]of n){let m=Ct(h,l),g=m?.section||"dependencies";h[g]||={};let x=m?.existing;h[g][l]=x===void 0?p||"latest":p&&It(x,p)==="lower"?p:x}ge.writeFileSync(o,`${JSON.stringify(h,null,2)}
|
|
2
|
+
`)}function kt(i){let r=[["pnpm-lock.yaml","pnpm"],["yarn.lock","yarn"],["bun.lock","bun"],["bun.lockb","bun"],["package-lock.json","npm"],["npm-shrinkwrap.json","npm"]];for(let n=se.resolve(i);;n=se.dirname(n)){let o=se.join(n,"package.json");if(ge.existsSync(o)){let h=JSON.parse(ge.readFileSync(o,"utf8")),l=String(h.packageManager||"").split("@")[0];if(["npm","pnpm","yarn","bun"].includes(l))return l}for(let[h,l]of r)if(ge.existsSync(se.join(n,h)))return l;if(se.dirname(n)===n)return"npm"}}var ta={npm:"npx",pnpm:"pnpm exec",yarn:"yarn",bun:"bunx"};function yi(i,r=process.cwd()){let n;try{n=kt(r)}catch{n="npm"}return`${ta[n]||ta.npm} frontfriend ${i}`}function kl(i,r=process.cwd()){let n=null;try{if(n=i?new URL(i).origin:null,n==="https://app.v4.frontfriend.dev")return yi("login --api-url https://app.frontfriend.dev",r)}catch{n=null}return yi(n&&n!==new URL(Cl).origin?`login --api-url ${n}`:"login",r)}function aa(i){return JSON.parse(ge.readFileSync(se.join(i,"package.json"),"utf8"))}function bi(i,r){let n=Ei(r);if(n.size===0)return[];let o=aa(i),h=[];for(let[l,p]of n){let m=Ct(o,l);m&&(!p||It(m.existing,p)!=="lower")||h.push(p?`${l}@${p}`:l)}return h}function _l(i,r){let n=r.filter(v=>v.required),o=Ei(n.flatMap(v=>v.dependencies)),h=(v,b)=>b.filter(E=>E.dependencies.some(N=>vi(N).name===v)).map(E=>E.component).filter(Boolean),l=r.filter(v=>!v.required);if(o.size===0&&l.length===0)return{missing:[],kept:[],repair:[]};let p=aa(i),m=[],g=[];for(let[v,b]of o){let E=Ct(p,v);if(!E){m.push(b?`${v}@${b}`:v);continue}if(!b)continue;let N=It(E.existing,b);N==="lower"?m.push(`${v}@${b}`):N!=="satisfied"&&g.push({name:v,current:E.existing,declared:b,components:h(v,n)})}let x=new Map;for(let v of l.flatMap(b=>b.dependencies)){let{name:b,version:E}=vi(v);if(o.has(b)||Ct(p,b))continue;let N=x.get(b),q=E||N?.version;if(N?.version&&E&&N.version!==E)try{q=sa(b,N.version,E)}catch{q=N.version}x.set(b,{version:q})}let S=[...x].map(([v,{version:b}])=>({request:b?`${v}@${b}`:v,components:h(v,l)}));return{missing:m,kept:g,repair:S}}function oa(i,r){return[i==="npm"?"install":"add",...r]}function Al(i){return/^[\w@/.:^~=+-]+$/.test(i)?i:`'${i.replace(/'/g,"'\\''")}'`}function ua(i,r){let n=kt(i);return[n,...oa(n,r)].map(Al).join(" ")}function ca(i,r,{stdio:n="inherit"}={}){let o=bi(i,r);if(o.length===0)return;let h=kt(i),l=ia.sync(h,oa(h,o),{cwd:i,stdio:n});if(l.error||l.status!==0)throw na(i,r),l.error||new Error(`${h} dependency installation failed with status ${l.status}. Dependencies were saved; run ${h} install.`)}function Nl(i,r,{install:n=!0,stdio:o="inherit",log:h=console.log}={}){let l=bi(i,r);if(l.length===0)return{missing:l,command:null,installed:!1};let p=ua(i,l);if(!n)return h(`\u{1F4E6} Component dependencies missing from package.json. Install them with:
|
|
3
3
|
${p}`),{missing:l,command:p,installed:!1};h(`\u{1F4E6} Installing component dependencies: ${p}`);try{return ca(i,l,{stdio:o}),{missing:l,command:p,installed:!0}}catch(m){return h(`\u26A0\uFE0F Component dependencies were not installed: ${m.message}
|
|
4
4
|
Install them with:
|
|
5
|
-
${p}`),{missing:l,command:p,installed:!1,error:m.message}}}function
|
|
6
|
-
${g}`),{installed:!1,command:g};h(`\u{1F4E6} Installing ${r}: ${g}`);let x=
|
|
5
|
+
${p}`),{missing:l,command:p,installed:!1,error:m.message}}}function Tl(i,r){for(let n=se.resolve(i);;n=se.dirname(n)){if(ge.existsSync(se.join(n,"node_modules",r,"package.json")))return!0;if(se.dirname(n)===n)return!1}}function Rl(i,r,{install:n=!0,stdio:o="inherit",log:h=console.log}={}){let l=JSON.parse(ge.readFileSync(se.join(i,"package.json"),"utf8"));if(!ra.some(v=>Object.hasOwn(l[v]||{},r))||Tl(i,r))return{installed:!1,command:null};let m=kt(i),g=`${m} install`;if(!n)return h(`\u{1F4E6} ${r} is in package.json but not installed. Install it with:
|
|
6
|
+
${g}`),{installed:!1,command:g};h(`\u{1F4E6} Installing ${r}: ${g}`);let x=ia.sync(m,["install"],{cwd:i,stdio:o});if(!x.error&&x.status===0)return{installed:!0,command:g};let S=x.error?x.error.message:`${m} install failed with status ${x.status}`;return h(`\u26A0\uFE0F ${r} was not installed: ${S}
|
|
7
7
|
Install it with:
|
|
8
|
-
${g}`),{installed:!1,command:g,error:S}}ha.exports={cliCommand:
|
|
9
|
-
`,{mode:384}),B.renameSync(n,i);try{B.chmodSync(i,384)}catch{}}finally{B.rmSync(n,{force:!0})}}async function Dl(i,r,n){B.mkdirSync(require("path").dirname(i),{recursive:!0,mode:448});let o=`${i}.lock`,h=Date.now()+2e4,l;for(;l===void 0;)try{l=B.openSync(o,"wx",384),B.writeFileSync(l,String(process.pid))}catch(p){if(p.code!=="EEXIST")throw p;try{let m=Number(B.readFileSync(o,"utf8"));if(Number.isInteger(m)&&m>0)try{process.kill(m,0)}catch(g){if(g.code==="ESRCH"){B.unlinkSync(o);continue}}}catch(m){if(m.code==="ENOENT")continue}if(Date.now()>=h)throw n();await new Promise(m=>setTimeout(m,50))}try{return await r()}finally{B.closeSync(l),B.unlinkSync(o)}}ma.exports={writePrivateJsonFileAtomic:$l,withPrivateFileLock:Dl,readJsonFileSafe:Al,readFileSafe:Nl,writeJsonFile:Tl,writeTextFile:Rl,writeModuleExportsFile:Pl,fileExists:Ll,ensureDirectoryExists:Ol,removeDirectory:Vl,removeFile:Fl}});var Ci=C((zp,Sa)=>{var{fileExists:ql,readJsonFileSafe:jl,removeFile:Bl,writePrivateJsonFileAtomic:Ul,withPrivateFileLock:Ml}=At(),xa=require("path"),Gl=require("os"),Hl=require("https"),Wl=require("http"),{URL:pe}=require("url"),{DEFAULT_API_URL:we}=St(),{cliCommand:ga,loginCommand:zl}=_t(),Xl=xa.join(Gl.homedir(),".frontfriend"),Fe=xa.join(Xl,"credentials");function Kl(){return Fe}function Nt(){try{return jl(Fe)}catch{return null}}function va(i){try{let r=JSON.parse(Buffer.from(String(i).split(".")[1],"base64url").toString("utf8"));return typeof r.email=="string"?r.email:null}catch{return null}}function Yl(){let i=Nt();if(!i||!i.accessToken)return null;let r=Number(i.refreshExpiresAt)||0;return{email:va(i.accessToken),apiUrl:i.ffApiUrl||null,expired:r>0&&r<Date.now()}}function ya(i){Ul(Fe,i)}function Jl(){return ql(Fe)?(Bl(Fe),!0):!1}function Si(i,r=60*1e3){return!i?.accessToken||!i.expiresAt||Date.now()+r>=i.expiresAt}function Ve(i,{apiUrl:r,login:n,next:o}={}){let h=o||`Run \`${n||zl(r)}\` to sign in, then run the command again.`,l=new Error(`${i}. ${h}`);return l.code="FF_AUTH_REFRESH_FAILED",l}function Ea(i,r,n){return new Promise((o,h)=>{let l=new pe(i);if(l.protocol!=="https:"&&!(l.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(l.hostname))){h(new Error("Frontfriend API URLs require HTTPS except on localhost"));return}let p=l.protocol==="https:"?Hl:Wl,m=JSON.stringify(r||{}),g=p.request({hostname:l.hostname,port:l.port,path:`${l.pathname}${l.search}`,method:"POST",headers:{"content-type":"application/json","content-length":Buffer.byteLength(m),...n?{authorization:`Bearer ${n}`}:{}}},x=>{let S="";x.on("data",v=>{S+=v}),x.on("end",()=>{if(x.statusCode>=300&&x.statusCode<400){let b=x.headers.location?` to ${x.headers.location}`:"",E=new Error(`HTTP ${x.statusCode}: redirected${b}`);E.statusCode=x.statusCode,E.body=S,h(E);return}let v=null;try{v=S?JSON.parse(S):null}catch{let E=x.headers["content-type"]||"unknown content-type",N=new Error(`Expected JSON from FrontFriend API at ${i}, but received ${E} (HTTP ${x.statusCode}). Check FF_API_URL or pass --api-url with the FrontFriend app URL.`);if(N.statusCode=x.statusCode,N.body=S,x.statusCode>=400){h(N);return}h(N);return}if(x.statusCode>=400){let b=new Error(v?.error_description||v?.error||`HTTP ${x.statusCode}`);b.statusCode=x.statusCode,b.body=v,h(b);return}o(v)})});g.setTimeout(15e3,()=>g.destroy(Object.assign(new Error("Frontfriend API request timed out"),{code:"ETIMEDOUT"}))),g.on("error",h),g.write(m),g.end()})}function ba(i,r){let n=new pe(i?.ffApiUrl||we).origin,o=new pe(r).origin;return Ve(`You are signed in to ${n}, but this command uses ${o}`,{login:ga(`login --api-url ${o}`)})}async function Ql(i){return Ml(Fe,i,()=>Ve("Another Frontfriend command is renewing your sign-in",{next:"Wait for it to finish, then run the command again."}))}async function wa(i,r=we){return Ql(async()=>{let n=Nt();if(n&&new pe(n.ffApiUrl||we).origin===new pe(r).origin){if(!Si(n))return n;i=n}return Zl(i,r)})}async function Zl(i,r=we){if(new pe(r).origin!==new pe(i.ffApiUrl||we).origin)throw ba(i,r);if(!i?.refreshToken||!i?.deviceId)throw Ve("Your Frontfriend sign-in has expired",{apiUrl:r});let n;try{n=await Ea(`${r}/api/plugin/token`,{grant_type:"refresh_token",refresh_token:i.refreshToken,device_id:i.deviceId})}catch(h){throw Object.assign(Ve(h?.message?`Could not renew your Frontfriend sign-in (${h.message})`:"Could not renew your Frontfriend sign-in",{apiUrl:r}),{cause:h})}if(!n?.access_token||!n?.refresh_token)throw Ve("Could not renew your Frontfriend sign-in",{apiUrl:r});let o={accessToken:n.access_token,refreshToken:n.refresh_token,deviceId:n.device_id||i.deviceId,expiresAt:Date.now()+(n.expires_in||900)*1e3,refreshExpiresAt:Date.now()+(n.refresh_expires_in||604800)*1e3,ffApiUrl:r};return ya(o),o}var ef="ffm_";function tf(i){return typeof i=="string"&&i.startsWith(ef)}async function rf(i={}){if(i.envToken)return i.envToken;if(!i.skipCredentials){let r=Nt();if(r?.accessToken||r?.refreshToken){let n=i.baseURL||r.ffApiUrl||we;if(new pe(n).origin!==new pe(r.ffApiUrl||we).origin)throw ba(r,n);return r.accessToken&&!Si(r)?r.accessToken:(await wa(r,n)).accessToken}}return i.configuredToken?(i.silent||console.warn(`\u26A0\uFE0F auth-token in frontfriend.config.js is deprecated. Run \`${ga("login")}\` to keep your sign-in outside the repository.`),i.configuredToken):null}Sa.exports={isMachineCredential:tf,accountEmail:va,signedInAccount:Yl,getCredentialsPath:Kl,readCredentials:Nt,writeCredentials:ya,deleteCredentials:Jl,isExpired:Si,postJson:Ea,refreshCredentials:wa,resolveAuthToken:rf,createAuthRefreshError:Ve}});var ka=C((Xp,Ia)=>{var ue=require("path"),{fileExists:Ii}=At();function Ca(i,r=process.cwd()){let n=r;for(;n!==ue.parse(n).root;){let o=ue.join(n,i);if(Ii(o))return o;n=ue.dirname(n)}return null}function sf(i,r=process.cwd(),n=null){let o=[],h=r,l=10;for(let p=0;p<l;p++){o.push(ue.join(h,i)),p<3&&o.push(ue.join(h,"../".repeat(p+1)+i));let m=ue.dirname(h);if(m===h)break;h=m}o.push(ue.join(__dirname,"../../../",i));for(let p of o)if(Ii(p)&&(!n||n(p)))return p;return null}function nf(i,r=process.cwd()){let n=i.map(o=>ue.isAbsolute(o)?o:ue.join(r,o));for(let o of n)if(Ii(o))return o;return null}function af(i=process.cwd()){let r=Ca("frontfriend.config.js",i);return r?ue.dirname(r):i}Ia.exports={findFileUpward:Ca,findDirectoryUpward:sf,findDirectoryWithPaths:nf,resolveProjectRoot:af}});var Aa=C((Tt,_a)=>{(function(i,r){typeof Tt=="object"&&typeof _a<"u"?r(Tt):typeof define=="function"&&define.amd?define(["exports"],r):(i=typeof globalThis<"u"?globalThis:i||self,r(i.acorn={}))})(Tt,function(i){"use strict";var r=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],n=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],o="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",h="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",l={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},p="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",m={5:p,"5module":p+" export import",6:p+" const class extends export import super"},g=/^in(stanceof)?$/,x=new RegExp("["+h+"]"),S=new RegExp("["+h+o+"]");function v(e,t){for(var s=65536,a=0;a<t.length;a+=2){if(s+=t[a],s>e)return!1;if(s+=t[a+1],s>=e)return!0}return!1}function b(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&x.test(String.fromCharCode(e)):t===!1?!1:v(e,n)}function E(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&S.test(String.fromCharCode(e)):t===!1?!1:v(e,n)||v(e,r)}var N=function(t,s){s===void 0&&(s={}),this.label=t,this.keyword=s.keyword,this.beforeExpr=!!s.beforeExpr,this.startsExpr=!!s.startsExpr,this.isLoop=!!s.isLoop,this.isAssign=!!s.isAssign,this.prefix=!!s.prefix,this.postfix=!!s.postfix,this.binop=s.binop||null,this.updateContext=null};function q(e,t){return new N(e,{beforeExpr:!0,binop:t})}var G={beforeExpr:!0},J={startsExpr:!0},Qe={};function V(e,t){return t===void 0&&(t={}),t.keyword=e,Qe[e]=new N(e,t)}var u={num:new N("num",J),regexp:new N("regexp",J),string:new N("string",J),name:new N("name",J),privateId:new N("privateId",J),eof:new N("eof"),bracketL:new N("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new N("]"),braceL:new N("{",{beforeExpr:!0,startsExpr:!0}),braceR:new N("}"),parenL:new N("(",{beforeExpr:!0,startsExpr:!0}),parenR:new N(")"),comma:new N(",",G),semi:new N(";",G),colon:new N(":",G),dot:new N("."),question:new N("?",G),questionDot:new N("?."),arrow:new N("=>",G),template:new N("template"),invalidTemplate:new N("invalidTemplate"),ellipsis:new N("...",G),backQuote:new N("`",J),dollarBraceL:new N("${",{beforeExpr:!0,startsExpr:!0}),eq:new N("=",{beforeExpr:!0,isAssign:!0}),assign:new N("_=",{beforeExpr:!0,isAssign:!0}),incDec:new N("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new N("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:q("||",1),logicalAND:q("&&",2),bitwiseOR:q("|",3),bitwiseXOR:q("^",4),bitwiseAND:q("&",5),equality:q("==/!=/===/!==",6),relational:q("</>/<=/>=",7),bitShift:q("<</>>/>>>",8),plusMin:new N("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:q("%",10),star:q("*",10),slash:q("/",10),starstar:new N("**",{beforeExpr:!0}),coalesce:q("??",1),_break:V("break"),_case:V("case",G),_catch:V("catch"),_continue:V("continue"),_debugger:V("debugger"),_default:V("default",G),_do:V("do",{isLoop:!0,beforeExpr:!0}),_else:V("else",G),_finally:V("finally"),_for:V("for",{isLoop:!0}),_function:V("function",J),_if:V("if"),_return:V("return",G),_switch:V("switch"),_throw:V("throw",G),_try:V("try"),_var:V("var"),_const:V("const"),_while:V("while",{isLoop:!0}),_with:V("with"),_new:V("new",{beforeExpr:!0,startsExpr:!0}),_this:V("this",J),_super:V("super",J),_class:V("class",J),_extends:V("extends",G),_export:V("export"),_import:V("import",J),_null:V("null",J),_true:V("true",J),_false:V("false",J),_in:V("in",{beforeExpr:!0,binop:7}),_instanceof:V("instanceof",{beforeExpr:!0,binop:7}),_typeof:V("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:V("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:V("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},K=/\r\n?|\n|\u2028|\u2029/,Oi=new RegExp(K.source,"g");function ve(e){return e===10||e===13||e===8232||e===8233}function Vi(e,t,s){s===void 0&&(s=e.length);for(var a=t;a<s;a++){var c=e.charCodeAt(a);if(ve(c))return a<s-1&&c===13&&e.charCodeAt(a+1)===10?a+2:a+1}return-1}var Lt=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,M=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Fi=Object.prototype,eo=Fi.hasOwnProperty,to=Fi.toString,Ie=Object.hasOwn||function(e,t){return eo.call(e,t)},$i=Array.isArray||function(e){return to.call(e)==="[object Array]"},Di=Object.create(null);function de(e){return Di[e]||(Di[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function ce(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var io=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ke=function(t,s){this.line=t,this.column=s};ke.prototype.offset=function(t){return new ke(this.line,this.column+t)};var qe=function(t,s,a){this.start=s,this.end=a,t.sourceFile!==null&&(this.source=t.sourceFile)};function Ot(e,t){for(var s=1,a=0;;){var c=Vi(e,a,t);if(c<0)return new ke(s,t-a);++s,a=c}}var Ze={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},qi=!1;function ro(e){var t={};for(var s in Ze)t[s]=e&&Ie(e,s)?e[s]:Ze[s];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!qi&&typeof console=="object"&&console.warn&&(qi=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
10
|
-
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14)
|
|
11
|
-
`,a-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(K).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=u.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||t.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?Ee:ye),this.regexpState=null,this.privateNameStack=[]},Q={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};j.prototype.parse=function(){var t=this,s=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(s)})},Q.inFunction.get=function(){return(this.currentVarScope().flags&Ee)>0},Q.inGenerator.get=function(){return(this.currentVarScope().flags&ji)>0},Q.inAsync.get=function(){return(this.currentVarScope().flags&Vt)>0},Q.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],s=t.flags;if(s&(be|je))return!1;if(s&Ee)return(s&Vt)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Q.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&ye)},Q.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&et)>0||this.options.allowSuperOutsideMethod},Q.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Ui)>0},Q.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Q.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],s=t.flags;if(s&(be|je)||s&Ee&&!(s&Ft))return!0}return!1},Q.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&Mi||!this.inModule&&t&ye)},Q.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&be)>0},j.extend=function(){for(var t=[],s=arguments.length;s--;)t[s]=arguments[s];for(var a=this,c=0;c<t.length;c++)a=t[c](a);return a},j.parse=function(t,s){return new this(s,t).parse()},j.parseExpressionAt=function(t,s,a){var c=new this(a,t,s);return c.nextToken(),c.parseExpression()},j.tokenizer=function(t,s){return new this(s,t)},Object.defineProperties(j.prototype,Q);var z=j.prototype,no=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;z.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){M.lastIndex=e,e+=M.exec(this.input)[0].length;var t=no.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){M.lastIndex=e+t[0].length;var s=M.exec(this.input),a=s.index+s[0].length,c=this.input.charAt(a);return c===";"||c==="}"||K.test(s[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(c)||c==="!"&&this.input.charAt(a+1)==="=")}e+=t[0].length,M.lastIndex=e,e+=M.exec(this.input)[0].length,this.input[e]===";"&&e++}},z.eat=function(e){return this.type===e?(this.next(),!0):!1},z.isContextual=function(e){return this.type===u.name&&this.value===e&&!this.containsEsc},z.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},z.catchStackOverflow=function(e){try{return e()}catch(t){if(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message)))this.raise(this.start,"Not enough stack space to parse input");else throw t}},z.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},z.canInsertSemicolon=function(){return this.type===u.eof||this.type===u.braceR||K.test(this.input.slice(this.lastTokEnd,this.start))},z.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},z.semicolon=function(){!this.eat(u.semi)&&!this.insertSemicolon()&&this.unexpected()},z.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},z.expect=function(e){this.eat(e)||this.unexpected()},z.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var rt=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};z.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var s=t?e.parenthesizedAssign:e.parenthesizedBind;s>-1&&this.raiseRecoverable(s,t?"Assigning to rvalue":"Parenthesized pattern")}},z.checkExpressionErrors=function(e,t){if(!e)return!1;var s=e.shorthandAssign,a=e.doubleProto;if(!t)return s>=0||a>=0;s>=0&&this.raise(s,"Shorthand property assignments are valid only in destructuring patterns"),a>=0&&this.raiseRecoverable(a,"Redefinition of __proto__ property")},z.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},z.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var A=j.prototype;A.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==u.eof;){var s=this.parseStatement(null,!0,t);e.body.push(s)}if(this.inModule)for(var a=0,c=Object.keys(this.undefinedExports);a<c.length;a+=1){var f=c[a];this.raiseRecoverable(this.undefinedExports[f].start,"Export '"+f+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var qt={kind:"loop"},ao={kind:"switch"};A.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;M.lastIndex=this.pos;var t=M.exec(this.input),s=this.pos+t[0].length,a=this.fullCharCodeAt(s);if(a===91||a===92)return!0;if(e)return!1;if(a===123)return!0;if(b(a)){var c=s;do s+=a<=65535?1:2;while(E(a=this.fullCharCodeAt(s)));if(a===92)return!0;var f=this.input.slice(c,s);if(!g.test(f))return!0}return!1},A.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;M.lastIndex=this.pos;var e=M.exec(this.input),t=this.pos+e[0].length,s;return!K.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(E(s=this.fullCharCodeAt(t+8))||s===92))},A.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;M.lastIndex=this.pos;var s=M.exec(this.input),a=this.pos+s[0].length;if(K.test(this.input.slice(this.pos,a)))return!1;if(e){var c=a+5,f;if(this.input.slice(a,c)!=="using"||c===this.input.length||E(f=this.fullCharCodeAt(c))||f===92)return!1;M.lastIndex=c;var d=M.exec(this.input);if(a=c+d[0].length,d&&K.test(this.input.slice(c,a)))return!1}var y=this.fullCharCodeAt(a);if(!b(y)&&y!==92)return!1;var w=a;do a+=y<=65535?1:2;while(E(y=this.fullCharCodeAt(a)));if(y===92)return!0;var T=this.input.slice(w,a);if(g.test(T))return!1;if(t&&!e&&T==="of"){M.lastIndex=a;var L=M.exec(this.input);if(a=a+L[0].length,this.input.charCodeAt(a)!==61||(y=this.input.charCodeAt(a+1))===61||y===62)return!1}return!0},A.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},A.isUsing=function(e){return this.isUsingKeyword(!1,e)},A.parseStatement=function(e,t,s){var a=this.type,c=this.startNode(),f;switch(this.isLet(e)&&(a=u._var,f="let"),a){case u._break:case u._continue:return this.parseBreakContinueStatement(c,a.keyword);case u._debugger:return this.parseDebuggerStatement(c);case u._do:return this.parseDoStatement(c);case u._for:return this.parseForStatement(c);case u._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(c,!1,!e);case u._class:return e&&this.unexpected(),this.parseClass(c,!0);case u._if:return this.parseIfStatement(c);case u._return:return this.parseReturnStatement(c);case u._switch:return this.parseSwitchStatement(c);case u._throw:return this.parseThrowStatement(c);case u._try:return this.parseTryStatement(c);case u._const:case u._var:return f=f||this.value,e&&f!=="var"&&this.unexpected(),this.parseVarStatement(c,f);case u._while:return this.parseWhileStatement(c);case u._with:return this.parseWithStatement(c);case u.braceL:return this.parseBlock(!0,c);case u.semi:return this.parseEmptyStatement(c);case u._export:case u._import:if(this.options.ecmaVersion>10&&a===u._import){M.lastIndex=this.pos;var d=M.exec(this.input),y=this.pos+d[0].length,w=this.input.charCodeAt(y);if(w===40||w===46)return this.parseExpressionStatement(c,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),a===u._import?this.parseImport(c):this.parseExport(c,s);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(c,!0,!e);var T=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(T)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),e&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),T==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(c,!1,T),this.semicolon(),this.finishNode(c,"VariableDeclaration");var L=this.value,$=this.parseExpression();return a===u.name&&$.type==="Identifier"&&this.eat(u.colon)?this.parseLabeledStatement(c,L,$,e):this.parseExpressionStatement(c,$)}},A.parseBreakContinueStatement=function(e,t){var s=t==="break";this.next(),this.eat(u.semi)||this.insertSemicolon()?e.label=null:this.type!==u.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var a=0;a<this.labels.length;++a){var c=this.labels[a];if((e.label==null||c.name===e.label.name)&&(c.kind!=null&&(s||c.kind==="loop")||e.label&&s))break}return a===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,s?"BreakStatement":"ContinueStatement")},A.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},A.parseDoStatement=function(e){return this.next(),this.labels.push(qt),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(u._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(u.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},A.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(qt),this.enterScope(0),this.expect(u.parenL),this.type===u.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var s=this.isLet();if(this.type===u._var||this.type===u._const||s){var a=this.startNode(),c=s?"let":this.value;return this.next(),this.parseVar(a,!0,c),this.finishNode(a,"VariableDeclaration"),this.parseForAfterInit(e,a,t)}var f=this.isContextual("let"),d=!1,y=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(y){var w=this.startNode();return this.next(),y==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(w,!0,y),this.finishNode(w,"VariableDeclaration"),this.parseForAfterInit(e,w,t)}var T=this.containsEsc,L=new rt,$=this.start,X=t>-1?this.parseExprSubscripts(L,"await"):this.parseExpression(!0,L);return this.type===u._in||(d=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===u._in&&this.unexpected(t),e.await=!0):d&&this.options.ecmaVersion>=8&&(X.start===$&&!T&&X.type==="Identifier"&&X.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),f&&d&&this.raise(X.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(X,!1,L),this.checkLValPattern(X),this.parseForIn(e,X)):(this.checkExpressionErrors(L,!0),t>-1&&this.unexpected(t),this.parseFor(e,X))},A.parseForAfterInit=function(e,t,s){return(this.type===u._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.type===u._in?((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&s>-1&&this.unexpected(s)):this.options.ecmaVersion>=9&&(e.await=s>-1),this.parseForIn(e,t)):(s>-1&&this.unexpected(s),this.parseFor(e,t))},A.parseFunctionStatement=function(e,t,s){return this.next(),this.parseFunction(e,Be|(s?0:jt),!1,t)},A.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(u._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},A.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(u.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},A.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(u.braceL),this.labels.push(ao),this.enterScope(Mi);for(var t,s=!1;this.type!==u.braceR;)if(this.type===u._case||this.type===u._default){var a=this.type===u._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),a?t.test=this.parseExpression():(s&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),s=!0,t.test=null),this.expect(u.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},A.parseThrowStatement=function(e){return this.next(),K.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var oo=[];A.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Bi:0),this.checkLValPattern(e,t?Hi:he),this.expect(u.parenR),e},A.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===u._catch){var t=this.startNode();this.next(),this.eat(u.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(u._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},A.parseVarStatement=function(e,t,s){return this.next(),this.parseVar(e,!1,t,s),this.semicolon(),this.finishNode(e,"VariableDeclaration")},A.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(qt),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},A.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},A.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},A.parseLabeledStatement=function(e,t,s,a){for(var c=0,f=this.labels;c<f.length;c+=1){var d=f[c];d.name===t&&this.raise(s.start,"Label '"+t+"' is already declared")}for(var y=this.type.isLoop?"loop":this.type===u._switch?"switch":null,w=this.labels.length-1;w>=0;w--){var T=this.labels[w];if(T.statementStart===e.start)T.statementStart=this.start,T.kind=y;else break}return this.labels.push({name:t,kind:y,statementStart:this.start}),e.body=this.parseStatement(a?a.indexOf("label")===-1?a+"label":a:"label"),this.labels.pop(),e.label=s,this.finishNode(e,"LabeledStatement")},A.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},A.parseBlock=function(e,t,s){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(u.braceL),e&&this.enterScope(0);this.type!==u.braceR;){var a=this.parseStatement(null);t.body.push(a)}return s&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},A.parseFor=function(e,t){return e.init=t,this.expect(u.semi),e.test=this.type===u.semi?null:this.parseExpression(),this.expect(u.semi),e.update=this.type===u.parenR?null:this.parseExpression(),this.expect(u.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},A.parseForIn=function(e,t){var s=this.type===u._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!s||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(s?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=s?this.parseExpression():this.parseMaybeAssign(),this.expect(u.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,s?"ForInStatement":"ForOfStatement")},A.parseVar=function(e,t,s,a){for(e.declarations=[],e.kind=s;;){var c=this.startNode();if(this.parseVarId(c,s),this.eat(u.eq)?c.init=this.parseMaybeAssign(t):!a&&s==="const"&&!(this.type===u._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!a&&(s==="using"||s==="await using")&&this.options.ecmaVersion>=17&&this.type!==u._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+s+" declaration"):!a&&c.id.type!=="Identifier"&&!(t&&(this.type===u._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):c.init=null,e.declarations.push(this.finishNode(c,"VariableDeclarator")),!this.eat(u.comma))break}return e},A.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Dt:he,!1)};var Be=1,jt=2,zi=4;A.parseFunction=function(e,t,s,a,c){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!a)&&(this.type===u.star&&t&jt&&this.unexpected(),e.generator=this.eat(u.star)),this.options.ecmaVersion>=8&&(e.async=!!a),t&Be&&(e.id=t&zi&&this.type!==u.name?null:this.parseIdent(),e.id&&!(t&jt)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Dt:he:Gi));var f=this.yieldPos,d=this.awaitPos,y=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope($t(e.async,e.generator)),t&Be||(e.id=this.type===u.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,s,!1,c),this.yieldPos=f,this.awaitPos=d,this.awaitIdentPos=y,this.finishNode(e,t&Be?"FunctionDeclaration":"FunctionExpression")},A.parseFunctionParams=function(e){this.expect(u.parenL),e.params=this.parseBindingList(u.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},A.parseClass=function(e,t){this.next();var s=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var a=this.enterClassBody(),c=this.startNode(),f=!1;for(c.body=[],this.expect(u.braceL);this.type!==u.braceR;){var d=this.parseClassElement(e.superClass!==null);d&&(c.body.push(d),d.type==="MethodDefinition"&&d.kind==="constructor"?(f&&this.raiseRecoverable(d.start,"Duplicate constructor in the same class"),f=!0):d.key&&d.key.type==="PrivateIdentifier"&&uo(a,d)&&this.raiseRecoverable(d.key.start,"Identifier '#"+d.key.name+"' has already been declared"))}return this.strict=s,this.next(),e.body=this.finishNode(c,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},A.parseClassElement=function(e){if(this.eat(u.semi))return null;var t=this.options.ecmaVersion,s=this.startNode(),a="",c=!1,f=!1,d="method",y=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(u.braceL))return this.parseClassStaticBlock(s),s;this.isClassElementNameStart()||this.type===u.star?y=!0:a="static"}if(s.static=y,!a&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===u.star)&&!this.canInsertSemicolon()?f=!0:a="async"),!a&&(t>=9||!f)&&this.eat(u.star)&&(c=!0),!a&&!f&&!c){var w=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?d=w:a=w)}if(a?(s.computed=!1,s.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),s.key.name=a,this.finishNode(s.key,"Identifier")):this.parseClassElementName(s),t<13||this.type===u.parenL||d!=="method"||c||f){var T=!s.static&&st(s,"constructor"),L=T&&e;T&&d!=="method"&&this.raise(s.key.start,"Constructor can't have get/set modifier"),s.kind=T?"constructor":d,this.parseClassMethod(s,c,f,L)}else this.parseClassField(s);return s},A.isClassElementNameStart=function(){return this.type===u.name||this.type===u.privateId||this.type===u.num||this.type===u.string||this.type===u.bracketL||this.type.keyword},A.parseClassElementName=function(e){this.type===u.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},A.parseClassMethod=function(e,t,s,a){var c=e.key;e.kind==="constructor"?(t&&this.raise(c.start,"Constructor can't be a generator"),s&&this.raise(c.start,"Constructor can't be an async method")):e.static&&st(e,"prototype")&&this.raise(c.start,"Classes may not have a static property named prototype");var f=e.value=this.parseMethod(t,s,a);return e.kind==="get"&&f.params.length!==0&&this.raiseRecoverable(f.start,"getter should have no params"),e.kind==="set"&&f.params.length!==1&&this.raiseRecoverable(f.start,"setter should have exactly one param"),e.kind==="set"&&f.params[0].type==="RestElement"&&this.raiseRecoverable(f.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},A.parseClassField=function(e){return st(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&st(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(u.eq)?(this.enterScope(je|et),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")},A.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(be|et);this.type!==u.braceR;){var s=this.parseStatement(null);e.body.push(s)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},A.parseClassId=function(e,t){this.type===u.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,he,!1)):(t===!0&&this.unexpected(),e.id=null)},A.parseClassSuper=function(e){e.superClass=this.eat(u._extends)?this.parseExprSubscripts(null,!1):null},A.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},A.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,s=e.used;if(this.options.checkPrivateFields)for(var a=this.privateNameStack.length,c=a===0?null:this.privateNameStack[a-1],f=0;f<s.length;++f){var d=s[f];Ie(t,d.name)||(c?c.used.push(d):this.raiseRecoverable(d.start,"Private field '#"+d.name+"' must be declared in an enclosing class"))}};function uo(e,t){var s=t.key.name,a=e[s],c="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(c=(t.static?"s":"i")+t.kind),a==="iget"&&c==="iset"||a==="iset"&&c==="iget"||a==="sget"&&c==="sset"||a==="sset"&&c==="sget"?(e[s]="true",!1):a?!0:(e[s]=c,!1)}function st(e,t){var s=e.computed,a=e.key;return!s&&(a.type==="Identifier"&&a.name===t||a.type==="Literal"&&a.value===t)}A.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==u.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},A.parseExport=function(e,t){if(this.next(),this.eat(u.star))return this.parseExportAllDeclaration(e,t);if(this.eat(u._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==u.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var s=0,a=e.specifiers;s<a.length;s+=1){var c=a[s];this.checkUnreserved(c.local),this.checkLocalExport(c.local),c.local.type==="Literal"&&this.raise(c.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},A.parseExportDeclaration=function(e){return this.parseStatement(null)},A.parseExportDefaultDeclaration=function(){var e;if(this.type===u._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,Be|zi,!1,e)}else if(this.type===u._class){var s=this.startNode();return this.parseClass(s,"nullableID")}else{var a=this.parseMaybeAssign();return this.semicolon(),a}},A.checkExport=function(e,t,s){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),Ie(e,t)&&this.raiseRecoverable(s,"Duplicate export '"+t+"'"),e[t]=!0)},A.checkPatternExport=function(e,t){var s=t.type;if(s==="Identifier")this.checkExport(e,t,t.start);else if(s==="ObjectPattern")for(var a=0,c=t.properties;a<c.length;a+=1){var f=c[a];this.checkPatternExport(e,f)}else if(s==="ArrayPattern")for(var d=0,y=t.elements;d<y.length;d+=1){var w=y[d];w&&this.checkPatternExport(e,w)}else s==="Property"?this.checkPatternExport(e,t.value):s==="AssignmentPattern"?this.checkPatternExport(e,t.left):s==="RestElement"&&this.checkPatternExport(e,t.argument)},A.checkVariableExport=function(e,t){if(e)for(var s=0,a=t;s<a.length;s+=1){var c=a[s];this.checkPatternExport(e,c.id)}},A.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},A.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")},A.parseExportSpecifiers=function(e){var t=[],s=!0;for(this.expect(u.braceL);!this.eat(u.braceR);){if(s)s=!1;else if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break;t.push(this.parseExportSpecifier(e))}return t},A.parseImport=function(e){return this.next(),this.type===u.string?(e.specifiers=oo,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===u.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},A.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,he),this.finishNode(e,"ImportSpecifier")},A.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,he),this.finishNode(e,"ImportDefaultSpecifier")},A.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,he),this.finishNode(e,"ImportNamespaceSpecifier")},A.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===u.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(u.comma)))return e;if(this.type===u.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(u.braceL);!this.eat(u.braceR);){if(t)t=!1;else if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break;e.push(this.parseImportSpecifier())}return e},A.parseWithClause=function(){var e=[];if(!this.eat(u._with))return e;this.expect(u.braceL);for(var t={},s=!0;!this.eat(u.braceR);){if(s)s=!1;else if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break;var a=this.parseImportAttribute(),c=a.key.type==="Identifier"?a.key.name:a.key.value;Ie(t,c)&&this.raiseRecoverable(a.key.start,"Duplicate attribute key '"+c+"'"),t[c]=!0,e.push(a)}return e},A.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===u.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(u.colon),this.type!==u.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},A.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===u.string){var e=this.parseLiteral(this.value);return io.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},A.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},A.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var Z=j.prototype;Z.toAssignable=function(e,t,s){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",s&&this.checkPatternErrors(s,!0);for(var a=0,c=e.properties;a<c.length;a+=1){var f=c[a];this.toAssignable(f,t),f.type==="RestElement"&&(f.argument.type==="ArrayPattern"||f.argument.type==="ObjectPattern")&&this.raise(f.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",s&&this.checkPatternErrors(s,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,s);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else s&&this.checkPatternErrors(s,!0);return e},Z.toAssignableList=function(e,t){for(var s=e.length,a=0;a<s;a++){var c=e[a];c&&this.toAssignable(c,t)}if(s){var f=e[s-1];this.options.ecmaVersion===6&&t&&f&&f.type==="RestElement"&&f.argument.type!=="Identifier"&&this.unexpected(f.argument.start)}return e},Z.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},Z.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==u.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},Z.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case u.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(u.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case u.braceL:return this.parseObj(!0)}return this.parseIdent()},Z.parseBindingList=function(e,t,s,a){for(var c=[],f=!0;!this.eat(e);)if(f?f=!1:this.expect(u.comma),t&&this.type===u.comma)c.push(null);else{if(s&&this.afterTrailingComma(e))break;if(this.type===u.ellipsis){var d=this.parseRestBinding();this.parseBindingListItem(d),c.push(d),this.type===u.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else c.push(this.parseAssignableListItem(a))}return c},Z.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},Z.parseBindingListItem=function(e){return e},Z.parseMaybeDefault=function(e,t,s){if(s=s||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(u.eq))return s;var a=this.startNodeAt(e,t);return a.left=s,a.right=this.parseMaybeAssign(),this.finishNode(a,"AssignmentPattern")},Z.checkLValSimple=function(e,t,s){t===void 0&&(t=it);var a=t!==it;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(a?"Binding ":"Assigning to ")+e.name+" in strict mode"),a&&(t===he&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),s&&(Ie(s,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),s[e.name]=!0),t!==Wi&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":a&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return a&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,s);default:this.raise(e.start,(a?"Binding":"Assigning to")+" rvalue")}},Z.checkLValPattern=function(e,t,s){switch(t===void 0&&(t=it),e.type){case"ObjectPattern":for(var a=0,c=e.properties;a<c.length;a+=1){var f=c[a];this.checkLValInnerPattern(f,t,s)}break;case"ArrayPattern":for(var d=0,y=e.elements;d<y.length;d+=1){var w=y[d];w&&this.checkLValInnerPattern(w,t,s)}break;default:this.checkLValSimple(e,t,s)}},Z.checkLValInnerPattern=function(e,t,s){switch(t===void 0&&(t=it),e.type){case"Property":this.checkLValInnerPattern(e.value,t,s);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,s);break;case"RestElement":this.checkLValPattern(e.argument,t,s);break;default:this.checkLValPattern(e,t,s)}};var ee=function(t,s,a,c,f){this.token=t,this.isExpr=!!s,this.preserveSpace=!!a,this.override=c,this.generator=!!f},F={b_stat:new ee("{",!1),b_expr:new ee("{",!0),b_tmpl:new ee("${",!1),p_stat:new ee("(",!1),p_expr:new ee("(",!0),q_tmpl:new ee("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new ee("function",!1),f_expr:new ee("function",!0),f_expr_gen:new ee("function",!0,!1,null,!0),f_gen:new ee("function",!1,!1,null,!0)},_e=j.prototype;_e.initialContext=function(){return[F.b_stat]},_e.curContext=function(){return this.context[this.context.length-1]},_e.braceIsBlock=function(e){var t=this.curContext();return t===F.f_expr||t===F.f_stat?!0:e===u.colon&&(t===F.b_stat||t===F.b_expr)?!t.isExpr:e===u._return||e===u.name&&this.exprAllowed?K.test(this.input.slice(this.lastTokEnd,this.start)):e===u._else||e===u.semi||e===u.eof||e===u.parenR||e===u.arrow?!0:e===u.braceL?t===F.b_stat:e===u._var||e===u._const||e===u.name?!1:!this.exprAllowed},_e.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1},_e.updateContext=function(e){var t,s=this.type;s.keyword&&e===u.dot?this.exprAllowed=!1:(t=s.updateContext)?t.call(this,e):this.exprAllowed=s.beforeExpr},_e.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},u.parenR.updateContext=u.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===F.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr},u.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?F.b_stat:F.b_expr),this.exprAllowed=!0},u.dollarBraceL.updateContext=function(){this.context.push(F.b_tmpl),this.exprAllowed=!0},u.parenL.updateContext=function(e){var t=e===u._if||e===u._for||e===u._with||e===u._while;this.context.push(t?F.p_stat:F.p_expr),this.exprAllowed=!0},u.incDec.updateContext=function(){},u._function.updateContext=u._class.updateContext=function(e){e.beforeExpr&&e!==u._else&&!(e===u.semi&&this.curContext()!==F.p_stat)&&!(e===u._return&&K.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===u.colon||e===u.braceL)&&this.curContext()===F.b_stat)?this.context.push(F.f_expr):this.context.push(F.f_stat),this.exprAllowed=!1},u.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},u.backQuote.updateContext=function(){this.curContext()===F.q_tmpl?this.context.pop():this.context.push(F.q_tmpl),this.exprAllowed=!1},u.star.updateContext=function(e){if(e===u._function){var t=this.context.length-1;this.context[t]===F.f_expr?this.context[t]=F.f_expr_gen:this.context[t]=F.f_gen}this.exprAllowed=!0},u.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==u.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var R=j.prototype;R.checkPropClash=function(e,t,s){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var a=e.key,c;switch(a.type){case"Identifier":c=a.name;break;case"Literal":c=String(a.value);break;default:return}var f=e.kind;if(this.options.ecmaVersion>=6){c==="__proto__"&&f==="init"&&(t.proto&&(s?s.doubleProto<0&&(s.doubleProto=a.start):this.raiseRecoverable(a.start,"Redefinition of __proto__ property")),t.proto=!0);return}c="$"+c;var d=t[c];if(d){var y;f==="init"?y=this.strict&&d.init||d.get||d.set:y=d.init||d[f],y&&this.raiseRecoverable(a.start,"Redefinition of property")}else d=t[c]={init:!1,get:!1,set:!1};d[f]=!0}},R.parseExpression=function(e,t){var s=this;return this.catchStackOverflow(function(){var a=s.start,c=s.startLoc,f=s.parseMaybeAssign(e,t);if(s.type===u.comma){var d=s.startNodeAt(a,c);for(d.expressions=[f];s.eat(u.comma);)d.expressions.push(s.parseMaybeAssign(e,t));return s.finishNode(d,"SequenceExpression")}return f})},R.parseMaybeAssign=function(e,t,s){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var a=!1,c=-1,f=-1,d=-1;t?(c=t.parenthesizedAssign,f=t.trailingComma,d=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new rt,a=!0);var y=this.start,w=this.startLoc;(this.type===u.parenL||this.type===u.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var T=this.parseMaybeConditional(e,t);if(s&&(T=s.call(this,T,y,w)),this.type.isAssign){var L=this.startNodeAt(y,w);return L.operator=this.value,this.type===u.eq&&(T=this.toAssignable(T,!1,t)),a||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=T.start&&(t.shorthandAssign=-1),this.type===u.eq?this.checkLValPattern(T):this.checkLValSimple(T),L.left=T,this.next(),L.right=this.parseMaybeAssign(e),d>-1&&(t.doubleProto=d),this.finishNode(L,"AssignmentExpression")}else a&&this.checkExpressionErrors(t,!0);return c>-1&&(t.parenthesizedAssign=c),f>-1&&(t.trailingComma=f),T},R.parseMaybeConditional=function(e,t){var s=this.start,a=this.startLoc,c=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return c;if(!(c.type==="ArrowFunctionExpression"&&c.start===s)&&this.eat(u.question)){var f=this.startNodeAt(s,a);return f.test=c,f.consequent=this.parseMaybeAssign(),this.expect(u.colon),f.alternate=this.parseMaybeAssign(e),this.finishNode(f,"ConditionalExpression")}return c},R.parseExprOps=function(e,t){var s=this.start,a=this.startLoc,c=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||c.start===s&&c.type==="ArrowFunctionExpression"?c:this.parseExprOp(c,s,a,-1,e)},R.parseExprOp=function(e,t,s,a,c){var f=this.type.binop;if(f!=null&&(!c||this.type!==u._in)&&f>a){var d=this.type===u.logicalOR||this.type===u.logicalAND,y=this.type===u.coalesce;y&&(f=u.logicalAND.binop);var w=this.value;this.next();var T=this.start,L=this.startLoc,$=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,c),T,L,f,c),X=this.buildBinary(t,s,e,$,w,d||y);return(d&&this.type===u.coalesce||y&&(this.type===u.logicalOR||this.type===u.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(X,t,s,a,c)}return e},R.buildBinary=function(e,t,s,a,c,f){a.type==="PrivateIdentifier"&&this.raise(a.start,"Private identifier can only be left side of binary expression");var d=this.startNodeAt(e,t);return d.left=s,d.operator=c,d.right=a,this.finishNode(d,f?"LogicalExpression":"BinaryExpression")},R.parseMaybeUnary=function(e,t,s,a){var c=this.start,f=this.startLoc,d;if(this.isContextual("await")&&this.canAwait)d=this.parseAwait(a),t=!0;else if(this.type.prefix){var y=this.startNode(),w=this.type===u.incDec;y.operator=this.value,y.prefix=!0,this.next(),y.argument=this.parseMaybeUnary(null,!0,w,a),this.checkExpressionErrors(e,!0),w?this.checkLValSimple(y.argument):this.strict&&y.operator==="delete"&&Xi(y.argument)?this.raiseRecoverable(y.start,"Deleting local variable in strict mode"):y.operator==="delete"&&Bt(y.argument)?this.raiseRecoverable(y.start,"Private fields can not be deleted"):t=!0,d=this.finishNode(y,w?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===u.privateId)(a||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),d=this.parsePrivateIdent(),this.type!==u._in&&this.unexpected();else{if(d=this.parseExprSubscripts(e,a),this.checkExpressionErrors(e))return d;for(;this.type.postfix&&!this.canInsertSemicolon();){var T=this.startNodeAt(c,f);T.operator=this.value,T.prefix=!1,T.argument=d,this.checkLValSimple(d),this.next(),d=this.finishNode(T,"UpdateExpression")}}if(!s&&this.eat(u.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(c,f,d,this.parseMaybeUnary(null,!1,!1,a),"**",!1);else return d};function Xi(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Xi(e.expression)}function Bt(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Bt(e.expression)||e.type==="ParenthesizedExpression"&&Bt(e.expression)}R.parseExprSubscripts=function(e,t){var s=this.start,a=this.startLoc,c=this.parseExprAtom(e,t);if(c.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return c;var f=this.parseSubscripts(c,s,a,!1,t);return e&&f.type==="MemberExpression"&&(e.parenthesizedAssign>=f.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=f.start&&(e.parenthesizedBind=-1),e.trailingComma>=f.start&&(e.trailingComma=-1)),f},R.parseSubscripts=function(e,t,s,a,c){for(var f=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,d=!1;;){var y=this.parseSubscript(e,t,s,a,f,d,c);if(y.optional&&(d=!0),y===e||y.type==="ArrowFunctionExpression"){if(d){var w=this.startNodeAt(t,s);w.expression=y,y=this.finishNode(w,"ChainExpression")}return y}e=y}},R.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(u.arrow)},R.parseSubscriptAsyncArrow=function(e,t,s,a){return this.parseArrowExpression(this.startNodeAt(e,t),s,!0,a)},R.parseSubscript=function(e,t,s,a,c,f,d){var y=this.options.ecmaVersion>=11,w=y&&this.eat(u.questionDot);a&&w&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var T=this.eat(u.bracketL);if(T||w&&this.type!==u.parenL&&this.type!==u.backQuote||this.eat(u.dot)){var L=this.startNodeAt(t,s);L.object=e,T?(L.property=this.parseExpression(),this.expect(u.bracketR)):this.type===u.privateId&&e.type!=="Super"?L.property=this.parsePrivateIdent():L.property=this.parseIdent(this.options.allowReserved!=="never"),L.computed=!!T,y&&(L.optional=w),e=this.finishNode(L,"MemberExpression")}else if(!a&&this.eat(u.parenL)){var $=new rt,X=this.yieldPos,Ge=this.awaitPos,Ae=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var ct=this.parseExprList(u.parenR,this.options.ecmaVersion>=8,!1,$);if(c&&!w&&this.shouldParseAsyncArrow())return this.checkPatternErrors($,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=X,this.awaitPos=Ge,this.awaitIdentPos=Ae,this.parseSubscriptAsyncArrow(t,s,ct,d);this.checkExpressionErrors($,!0),this.yieldPos=X||this.yieldPos,this.awaitPos=Ge||this.awaitPos,this.awaitIdentPos=Ae||this.awaitIdentPos;var Ne=this.startNodeAt(t,s);Ne.callee=e,Ne.arguments=ct,y&&(Ne.optional=w),e=this.finishNode(Ne,"CallExpression")}else if(this.type===u.backQuote){(w||f)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Te=this.startNodeAt(t,s);Te.tag=e,Te.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(Te,"TaggedTemplateExpression")}return e},R.parseExprAtom=function(e,t,s){this.type===u.slash&&this.readRegexp();var a,c=this.potentialArrowAt===this.start;switch(this.type){case u._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),a=this.startNode(),this.next(),this.type===u.parenL&&!this.allowDirectSuper&&this.raise(a.start,"super() call outside constructor of a subclass"),this.type!==u.dot&&this.type!==u.bracketL&&this.type!==u.parenL&&this.unexpected(),this.finishNode(a,"Super");case u._this:return a=this.startNode(),this.next(),this.finishNode(a,"ThisExpression");case u.name:var f=this.start,d=this.startLoc,y=this.containsEsc,w=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!y&&w.name==="async"&&!this.canInsertSemicolon()&&this.eat(u._function))return this.overrideContext(F.f_expr),this.parseFunction(this.startNodeAt(f,d),0,!1,!0,t);if(c&&!this.canInsertSemicolon()){if(this.eat(u.arrow))return this.parseArrowExpression(this.startNodeAt(f,d),[w],!1,t);if(this.options.ecmaVersion>=8&&w.name==="async"&&this.type===u.name&&!y&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return w=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(u.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(f,d),[w],!0,t)}return w;case u.regexp:var T=this.value;return a=this.parseLiteral(T.value),a.regex={pattern:T.pattern,flags:T.flags},a;case u.num:case u.string:return this.parseLiteral(this.value);case u._null:case u._true:case u._false:return a=this.startNode(),a.value=this.type===u._null?null:this.type===u._true,a.raw=this.type.keyword,this.next(),this.finishNode(a,"Literal");case u.parenL:var L=this.start,$=this.parseParenAndDistinguishExpression(c,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget($)&&(e.parenthesizedAssign=L),e.parenthesizedBind<0&&(e.parenthesizedBind=L)),$;case u.bracketL:return a=this.startNode(),this.next(),a.elements=this.parseExprList(u.bracketR,!0,!0,e),this.finishNode(a,"ArrayExpression");case u.braceL:return this.overrideContext(F.b_expr),this.parseObj(!1,e);case u._function:return a=this.startNode(),this.next(),this.parseFunction(a,0);case u._class:return this.parseClass(this.startNode(),!1);case u._new:return this.parseNew();case u.backQuote:return this.parseTemplate();case u._import:return this.options.ecmaVersion>=11?this.parseExprImport(s):this.unexpected();default:return this.parseExprAtomDefault()}},R.parseExprAtomDefault=function(){this.unexpected()},R.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===u.parenL&&!e)return this.parseDynamicImport(t);if(this.type===u.dot){var s=this.startNodeAt(t.start,t.loc&&t.loc.start);return s.name="import",t.meta=this.finishNode(s,"Identifier"),this.parseImportMeta(t)}else this.unexpected()},R.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(u.parenR)?e.options=null:(this.expect(u.comma),this.afterTrailingComma(u.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(u.parenR)||(this.expect(u.comma),this.afterTrailingComma(u.parenR)||this.unexpected())));else if(!this.eat(u.parenR)){var t=this.start;this.eat(u.comma)&&this.eat(u.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},R.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},R.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},R.parseParenExpression=function(){this.expect(u.parenL);var e=this.parseExpression();return this.expect(u.parenR),e},R.shouldParseArrow=function(e){return!this.canInsertSemicolon()},R.parseParenAndDistinguishExpression=function(e,t){var s=this.start,a=this.startLoc,c,f=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var d=this.start,y=this.startLoc,w=[],T=!0,L=!1,$=new rt,X=this.yieldPos,Ge=this.awaitPos,Ae;for(this.yieldPos=0,this.awaitPos=0;this.type!==u.parenR;)if(T?T=!1:this.expect(u.comma),f&&this.afterTrailingComma(u.parenR,!0)){L=!0;break}else if(this.type===u.ellipsis){Ae=this.start,w.push(this.parseParenItem(this.parseRestBinding())),this.type===u.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else w.push(this.parseMaybeAssign(!1,$,this.parseParenItem));var ct=this.lastTokEnd,Ne=this.lastTokEndLoc;if(this.expect(u.parenR),e&&this.shouldParseArrow(w)&&this.eat(u.arrow))return this.checkPatternErrors($,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=X,this.awaitPos=Ge,this.parseParenArrowList(s,a,w,t);(!w.length||L)&&this.unexpected(this.lastTokStart),Ae&&this.unexpected(Ae),this.checkExpressionErrors($,!0),this.yieldPos=X||this.yieldPos,this.awaitPos=Ge||this.awaitPos,w.length>1?(c=this.startNodeAt(d,y),c.expressions=w,this.finishNodeAt(c,"SequenceExpression",ct,Ne)):c=w[0]}else c=this.parseParenExpression();if(this.options.preserveParens){var Te=this.startNodeAt(s,a);return Te.expression=c,this.finishNode(Te,"ParenthesizedExpression")}else return c},R.parseParenItem=function(e){return e},R.parseParenArrowList=function(e,t,s,a){return this.parseArrowExpression(this.startNodeAt(e,t),s,!1,a)};var co=[];R.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===u.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var s=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),s&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var a=this.start,c=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),a,c,!0,!1),e.callee.type==="Super"&&this.raiseRecoverable(a,"Invalid use of 'super'"),this.eat(u.parenL)?e.arguments=this.parseExprList(u.parenR,this.options.ecmaVersion>=8,!1):e.arguments=co,this.finishNode(e,"NewExpression")},R.parseTemplateElement=function(e){var t=e.isTagged,s=this.startNode();return this.type===u.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),s.value={raw:this.value.replace(/\r\n?/g,`
|
|
8
|
+
${g}`),{installed:!1,command:g,error:S}}ha.exports={cliCommand:yi,loginCommand:kl,installDeclaredPackage:Rl,saveNpmDependencies:na,installNpmDependencies:ca,installMissingNpmDependencies:Nl,missingNpmDependencies:bi,npmInstallCommand:ua,planNpmDependencies:_l,requirementStatus:It}});var da=C((Jp,pa)=>{function fe(i){return i!==null&&typeof i=="object"&&!Array.isArray(i)}function wi(i,r){if(!fe(i)||!fe(r))return r===void 0?i:r;let n={...i};for(let[o,h]of Object.entries(r))n[o]=o in n?wi(n[o],h):h;return n}function Si(i,r,n=[],o=[]){if(i===void 0||r===void 0)return o;if(!fe(i)||!fe(r))return o.push(n.join(".")),o;for(let h of Object.keys(i))h in r&&Si(i[h],r[h],[...n,h],o);return o}function la(i){return fe(i)&&("styles"in i||"behavior"in i)}function fa(i,r="component"){if(!la(i)||!fe(i.styles)||i.behavior!==void 0&&!fe(i.behavior)||Object.keys(i).some(o=>!["styles","behavior"].includes(o)))throw new TypeError(`Component ${r} must use the styles/behavior envelope`);let n=Si(i.styles,i.behavior,[r]);if(n.length>0)throw new Error(`Component config styles/behavior conflict at ${n.join(", ")}`);return wi(i.styles||{},i.behavior||{})}function Pl(i){if(!fe(i))return i;let r=!1,n={};for(let[o,h]of Object.entries(i))n[o]=fa(h,o),n[o]!==h&&(r=!0);return r?n:i}pa.exports={isPlainObject:fe,deepMerge:wi,findTreeConflicts:Si,isComponentEnvelope:la,toRuntimeComponentConfig:fa,toRuntimeComponentsConfig:Pl}});var va=C((Qp,ga)=>{"use strict";var ma="https://app.v4.frontfriend.dev",xa="https://app.frontfriend.dev";function Ll(i){if(new URL(i).origin===ma)throw Object.assign(new Error(`The API origin ${ma} has moved to ${xa}. Update api-url in frontfriend.config.js and the agent installation, then run frontfriend login --api-url ${xa}. Credentials were not sent or forwarded.`),{code:"FF_API_ORIGIN_RETIRED"})}ga.exports={assertCurrentApiOrigin:Ll}});var At=C((Zp,ya)=>{var U=require("fs");function Ol(i){try{let r=U.readFileSync(i,"utf8");return JSON.parse(r)}catch(r){if(r.code==="ENOENT")return null;throw r}}function Vl(i){try{return U.readFileSync(i,"utf8").replace(/^\uFEFF/,"")}catch(r){if(r.code==="ENOENT")return null;throw r}}function Fl(i,r,n=2){let o=JSON.stringify(r,null,n);U.writeFileSync(i,o,"utf8")}function $l(i,r){U.writeFileSync(i,r,"utf8")}function Dl(i,r){if(r==null||typeof r=="object"&&Object.keys(r).length===0||Array.isArray(r)&&r.length===0){let o=`module.exports = ${Array.isArray(r)?"[]":"{}"};`;U.writeFileSync(i,o,"utf8")}else{let n=`module.exports = ${JSON.stringify(r,null,2)};`;U.writeFileSync(i,n,"utf8")}}function ql(i){return U.existsSync(i)}function jl(i){U.mkdirSync(i,{recursive:!0})}function Ul(i){U.rmSync(i,{recursive:!0,force:!0})}function Bl(i){U.rmSync(i,{force:!0})}function Ml(i,r){U.mkdirSync(require("path").dirname(i),{recursive:!0,mode:448});let n=`${i}.${process.pid}.${Date.now()}.tmp`;try{U.writeFileSync(n,`${JSON.stringify(r,null,2)}
|
|
9
|
+
`,{mode:384}),U.renameSync(n,i);try{U.chmodSync(i,384)}catch{}}finally{U.rmSync(n,{force:!0})}}async function Gl(i,r,n){U.mkdirSync(require("path").dirname(i),{recursive:!0,mode:448});let o=`${i}.lock`,h=Date.now()+2e4,l;for(;l===void 0;)try{l=U.openSync(o,"wx",384),U.writeFileSync(l,String(process.pid))}catch(p){if(p.code!=="EEXIST")throw p;try{let m=Number(U.readFileSync(o,"utf8"));if(Number.isInteger(m)&&m>0)try{process.kill(m,0)}catch(g){if(g.code==="ESRCH"){U.unlinkSync(o);continue}}}catch(m){if(m.code==="ENOENT")continue}if(Date.now()>=h)throw n();await new Promise(m=>setTimeout(m,50))}try{return await r()}finally{U.closeSync(l),U.unlinkSync(o)}}ya.exports={writePrivateJsonFileAtomic:Ml,withPrivateFileLock:Gl,readJsonFileSafe:Ol,readFileSafe:Vl,writeJsonFile:Fl,writeTextFile:$l,writeModuleExportsFile:Dl,fileExists:ql,ensureDirectoryExists:jl,removeDirectory:Ul,removeFile:Bl}});var Ii=C((ed,Aa)=>{var{assertCurrentApiOrigin:Ea}=va(),{fileExists:Hl,readJsonFileSafe:Wl,removeFile:zl,writePrivateJsonFileAtomic:Xl,withPrivateFileLock:Kl}=At(),ba=require("path"),Yl=require("os"),Jl=require("https"),Ql=require("http"),{URL:pe}=require("url"),{DEFAULT_API_URL:we}=St(),{cliCommand:wa,loginCommand:Zl}=_t(),ef=ba.join(Yl.homedir(),".frontfriend"),Fe=ba.join(ef,"credentials");function tf(){return Fe}function Nt(){try{return Wl(Fe)}catch{return null}}function Sa(i){try{let r=JSON.parse(Buffer.from(String(i).split(".")[1],"base64url").toString("utf8"));return typeof r.email=="string"?r.email:null}catch{return null}}function rf(){let i=Nt();if(!i||!i.accessToken)return null;let r=Number(i.refreshExpiresAt)||0;return{email:Sa(i.accessToken),apiUrl:i.ffApiUrl||null,expired:r>0&&r<Date.now()}}function Ca(i){Xl(Fe,i)}function sf(){return Hl(Fe)?(zl(Fe),!0):!1}function Ci(i,r=60*1e3){return!i?.accessToken||!i.expiresAt||Date.now()+r>=i.expiresAt}function Ve(i,{apiUrl:r,login:n,next:o}={}){let h=o||`Run \`${n||Zl(r)}\` to sign in, then run the command again.`,l=new Error(`${i}. ${h}`);return l.code="FF_AUTH_REFRESH_FAILED",l}function Ia(i,r,n){return Ea(i),new Promise((o,h)=>{let l=new pe(i);if(l.protocol!=="https:"&&!(l.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(l.hostname))){h(new Error("Frontfriend API URLs require HTTPS except on localhost"));return}let p=l.protocol==="https:"?Jl:Ql,m=JSON.stringify(r||{}),g=p.request({hostname:l.hostname,port:l.port,path:`${l.pathname}${l.search}`,method:"POST",headers:{"content-type":"application/json","content-length":Buffer.byteLength(m),...n?{authorization:`Bearer ${n}`}:{}}},x=>{let S="";x.on("data",v=>{S+=v}),x.on("end",()=>{if(x.statusCode>=300&&x.statusCode<400){let b=x.headers.location?` to ${x.headers.location}`:"",E=new Error(`HTTP ${x.statusCode}: redirected${b}`);E.statusCode=x.statusCode,E.body=S,h(E);return}let v=null;try{v=S?JSON.parse(S):null}catch{let E=x.headers["content-type"]||"unknown content-type",N=new Error(`Expected JSON from FrontFriend API at ${i}, but received ${E} (HTTP ${x.statusCode}). Check FF_API_URL or pass --api-url with the FrontFriend app URL.`);if(N.statusCode=x.statusCode,N.body=S,x.statusCode>=400){h(N);return}h(N);return}if(x.statusCode>=400){let b=new Error(v?.error_description||v?.error||`HTTP ${x.statusCode}`);b.statusCode=x.statusCode,b.body=v,h(b);return}o(v)})});g.setTimeout(15e3,()=>g.destroy(Object.assign(new Error("Frontfriend API request timed out"),{code:"ETIMEDOUT"}))),g.on("error",h),g.write(m),g.end()})}function ka(i,r){let n=new pe(i?.ffApiUrl||we).origin,o=new pe(r).origin;return Ve(`You are signed in to ${n}, but this command uses ${o}`,{login:wa(`login --api-url ${o}`)})}async function nf(i){return Kl(Fe,i,()=>Ve("Another Frontfriend command is renewing your sign-in",{next:"Wait for it to finish, then run the command again."}))}async function _a(i,r=we){return nf(async()=>{let n=Nt();if(n&&new pe(n.ffApiUrl||we).origin===new pe(r).origin){if(!Ci(n))return n;i=n}return af(i,r)})}async function af(i,r=we){if(new pe(r).origin!==new pe(i.ffApiUrl||we).origin)throw ka(i,r);if(!i?.refreshToken||!i?.deviceId)throw Ve("Your Frontfriend sign-in has expired",{apiUrl:r});let n;try{n=await Ia(`${r}/api/plugin/token`,{grant_type:"refresh_token",refresh_token:i.refreshToken,device_id:i.deviceId})}catch(h){throw Object.assign(Ve(h?.message?`Could not renew your Frontfriend sign-in (${h.message})`:"Could not renew your Frontfriend sign-in",{apiUrl:r}),{cause:h})}if(!n?.access_token||!n?.refresh_token)throw Ve("Could not renew your Frontfriend sign-in",{apiUrl:r});let o={accessToken:n.access_token,refreshToken:n.refresh_token,deviceId:n.device_id||i.deviceId,expiresAt:Date.now()+(n.expires_in||900)*1e3,refreshExpiresAt:Date.now()+(n.refresh_expires_in||604800)*1e3,ffApiUrl:r};return Ca(o),o}var of="ffm_";function uf(i){return typeof i=="string"&&i.startsWith(of)}async function cf(i={}){if(i.baseURL&&Ea(i.baseURL),i.envToken)return i.envToken;if(!i.skipCredentials){let r=Nt();if(r?.accessToken||r?.refreshToken){let n=i.baseURL||r.ffApiUrl||we;if(new pe(n).origin!==new pe(r.ffApiUrl||we).origin)throw ka(r,n);return r.accessToken&&!Ci(r)?r.accessToken:(await _a(r,n)).accessToken}}return i.configuredToken?(i.silent||console.warn(`\u26A0\uFE0F auth-token in frontfriend.config.js is deprecated. Run \`${wa("login")}\` to keep your sign-in outside the repository.`),i.configuredToken):null}Aa.exports={isMachineCredential:uf,accountEmail:Sa,signedInAccount:rf,getCredentialsPath:tf,readCredentials:Nt,writeCredentials:Ca,deleteCredentials:sf,isExpired:Ci,postJson:Ia,refreshCredentials:_a,resolveAuthToken:cf,createAuthRefreshError:Ve}});var Ra=C((td,Ta)=>{var ue=require("path"),{fileExists:ki}=At();function Na(i,r=process.cwd()){let n=r;for(;n!==ue.parse(n).root;){let o=ue.join(n,i);if(ki(o))return o;n=ue.dirname(n)}return null}function hf(i,r=process.cwd(),n=null){let o=[],h=r,l=10;for(let p=0;p<l;p++){o.push(ue.join(h,i)),p<3&&o.push(ue.join(h,"../".repeat(p+1)+i));let m=ue.dirname(h);if(m===h)break;h=m}o.push(ue.join(__dirname,"../../../",i));for(let p of o)if(ki(p)&&(!n||n(p)))return p;return null}function lf(i,r=process.cwd()){let n=i.map(o=>ue.isAbsolute(o)?o:ue.join(r,o));for(let o of n)if(ki(o))return o;return null}function ff(i=process.cwd()){let r=Na("frontfriend.config.js",i);return r?ue.dirname(r):i}Ta.exports={findFileUpward:Na,findDirectoryUpward:hf,findDirectoryWithPaths:lf,resolveProjectRoot:ff}});var La=C((Tt,Pa)=>{(function(i,r){typeof Tt=="object"&&typeof Pa<"u"?r(Tt):typeof define=="function"&&define.amd?define(["exports"],r):(i=typeof globalThis<"u"?globalThis:i||self,r(i.acorn={}))})(Tt,function(i){"use strict";var r=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],n=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],o="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",h="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",l={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},p="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",m={5:p,"5module":p+" export import",6:p+" const class extends export import super"},g=/^in(stanceof)?$/,x=new RegExp("["+h+"]"),S=new RegExp("["+h+o+"]");function v(e,t){for(var s=65536,a=0;a<t.length;a+=2){if(s+=t[a],s>e)return!1;if(s+=t[a+1],s>=e)return!0}return!1}function b(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&x.test(String.fromCharCode(e)):t===!1?!1:v(e,n)}function E(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&S.test(String.fromCharCode(e)):t===!1?!1:v(e,n)||v(e,r)}var N=function(t,s){s===void 0&&(s={}),this.label=t,this.keyword=s.keyword,this.beforeExpr=!!s.beforeExpr,this.startsExpr=!!s.startsExpr,this.isLoop=!!s.isLoop,this.isAssign=!!s.isAssign,this.prefix=!!s.prefix,this.postfix=!!s.postfix,this.binop=s.binop||null,this.updateContext=null};function q(e,t){return new N(e,{beforeExpr:!0,binop:t})}var G={beforeExpr:!0},J={startsExpr:!0},Qe={};function V(e,t){return t===void 0&&(t={}),t.keyword=e,Qe[e]=new N(e,t)}var u={num:new N("num",J),regexp:new N("regexp",J),string:new N("string",J),name:new N("name",J),privateId:new N("privateId",J),eof:new N("eof"),bracketL:new N("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new N("]"),braceL:new N("{",{beforeExpr:!0,startsExpr:!0}),braceR:new N("}"),parenL:new N("(",{beforeExpr:!0,startsExpr:!0}),parenR:new N(")"),comma:new N(",",G),semi:new N(";",G),colon:new N(":",G),dot:new N("."),question:new N("?",G),questionDot:new N("?."),arrow:new N("=>",G),template:new N("template"),invalidTemplate:new N("invalidTemplate"),ellipsis:new N("...",G),backQuote:new N("`",J),dollarBraceL:new N("${",{beforeExpr:!0,startsExpr:!0}),eq:new N("=",{beforeExpr:!0,isAssign:!0}),assign:new N("_=",{beforeExpr:!0,isAssign:!0}),incDec:new N("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new N("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:q("||",1),logicalAND:q("&&",2),bitwiseOR:q("|",3),bitwiseXOR:q("^",4),bitwiseAND:q("&",5),equality:q("==/!=/===/!==",6),relational:q("</>/<=/>=",7),bitShift:q("<</>>/>>>",8),plusMin:new N("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:q("%",10),star:q("*",10),slash:q("/",10),starstar:new N("**",{beforeExpr:!0}),coalesce:q("??",1),_break:V("break"),_case:V("case",G),_catch:V("catch"),_continue:V("continue"),_debugger:V("debugger"),_default:V("default",G),_do:V("do",{isLoop:!0,beforeExpr:!0}),_else:V("else",G),_finally:V("finally"),_for:V("for",{isLoop:!0}),_function:V("function",J),_if:V("if"),_return:V("return",G),_switch:V("switch"),_throw:V("throw",G),_try:V("try"),_var:V("var"),_const:V("const"),_while:V("while",{isLoop:!0}),_with:V("with"),_new:V("new",{beforeExpr:!0,startsExpr:!0}),_this:V("this",J),_super:V("super",J),_class:V("class",J),_extends:V("extends",G),_export:V("export"),_import:V("import",J),_null:V("null",J),_true:V("true",J),_false:V("false",J),_in:V("in",{beforeExpr:!0,binop:7}),_instanceof:V("instanceof",{beforeExpr:!0,binop:7}),_typeof:V("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:V("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:V("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},K=/\r\n?|\n|\u2028|\u2029/,Vi=new RegExp(K.source,"g");function ve(e){return e===10||e===13||e===8232||e===8233}function Fi(e,t,s){s===void 0&&(s=e.length);for(var a=t;a<s;a++){var c=e.charCodeAt(a);if(ve(c))return a<s-1&&c===13&&e.charCodeAt(a+1)===10?a+2:a+1}return-1}var Lt=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,M=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,$i=Object.prototype,no=$i.hasOwnProperty,ao=$i.toString,Ie=Object.hasOwn||function(e,t){return no.call(e,t)},Di=Array.isArray||function(e){return ao.call(e)==="[object Array]"},qi=Object.create(null);function de(e){return qi[e]||(qi[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function ce(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var oo=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ke=function(t,s){this.line=t,this.column=s};ke.prototype.offset=function(t){return new ke(this.line,this.column+t)};var qe=function(t,s,a){this.start=s,this.end=a,t.sourceFile!==null&&(this.source=t.sourceFile)};function Ot(e,t){for(var s=1,a=0;;){var c=Fi(e,a,t);if(c<0)return new ke(s,t-a);++s,a=c}}var Ze={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},ji=!1;function uo(e){var t={};for(var s in Ze)t[s]=e&&Ie(e,s)?e[s]:Ze[s];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!ji&&typeof console=="object"&&console.warn&&(ji=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
10
|
+
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),Di(t.onToken)){var a=t.onToken;t.onToken=function(c){return a.push(c)}}if(Di(t.onComment)&&(t.onComment=co(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function co(e,t){return function(s,a,c,f,d,y){var w={type:s?"Block":"Line",value:a,start:c,end:f};e.locations&&(w.loc=new qe(this,d,y)),e.ranges&&(w.range=[c,f]),t.push(w)}}var ye=1,Ee=2,Vt=4,Ui=8,Ft=16,Bi=32,et=64,Mi=128,be=256,je=512,Gi=1024,tt=ye|Ee|be;function $t(e,t){return Ee|(e?Vt:0)|(t?Ui:0)}var it=0,Dt=1,he=2,Hi=3,Wi=4,zi=5,j=function(t,s,a){this.options=t=uo(t),this.sourceFile=t.sourceFile,this.keywords=de(m[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var c="";t.allowReserved!==!0&&(c=l[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(c+=" await")),this.reservedWords=de(c);var f=(c?c+" ":"")+l.strict;this.reservedWordsStrict=de(f),this.reservedWordsStrictBind=de(f+" "+l.strictBind),this.input=String(s),this.containsEsc=!1,a?(this.pos=a,this.lineStart=this.input.lastIndexOf(`
|
|
11
|
+
`,a-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(K).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=u.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||t.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?Ee:ye),this.regexpState=null,this.privateNameStack=[]},Q={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};j.prototype.parse=function(){var t=this,s=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(s)})},Q.inFunction.get=function(){return(this.currentVarScope().flags&Ee)>0},Q.inGenerator.get=function(){return(this.currentVarScope().flags&Ui)>0},Q.inAsync.get=function(){return(this.currentVarScope().flags&Vt)>0},Q.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],s=t.flags;if(s&(be|je))return!1;if(s&Ee)return(s&Vt)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Q.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&ye)},Q.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&et)>0||this.options.allowSuperOutsideMethod},Q.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Mi)>0},Q.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Q.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],s=t.flags;if(s&(be|je)||s&Ee&&!(s&Ft))return!0}return!1},Q.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&Gi||!this.inModule&&t&ye)},Q.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&be)>0},j.extend=function(){for(var t=[],s=arguments.length;s--;)t[s]=arguments[s];for(var a=this,c=0;c<t.length;c++)a=t[c](a);return a},j.parse=function(t,s){return new this(s,t).parse()},j.parseExpressionAt=function(t,s,a){var c=new this(a,t,s);return c.nextToken(),c.parseExpression()},j.tokenizer=function(t,s){return new this(s,t)},Object.defineProperties(j.prototype,Q);var z=j.prototype,ho=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;z.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){M.lastIndex=e,e+=M.exec(this.input)[0].length;var t=ho.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){M.lastIndex=e+t[0].length;var s=M.exec(this.input),a=s.index+s[0].length,c=this.input.charAt(a);return c===";"||c==="}"||K.test(s[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(c)||c==="!"&&this.input.charAt(a+1)==="=")}e+=t[0].length,M.lastIndex=e,e+=M.exec(this.input)[0].length,this.input[e]===";"&&e++}},z.eat=function(e){return this.type===e?(this.next(),!0):!1},z.isContextual=function(e){return this.type===u.name&&this.value===e&&!this.containsEsc},z.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},z.catchStackOverflow=function(e){try{return e()}catch(t){if(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message)))this.raise(this.start,"Not enough stack space to parse input");else throw t}},z.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},z.canInsertSemicolon=function(){return this.type===u.eof||this.type===u.braceR||K.test(this.input.slice(this.lastTokEnd,this.start))},z.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},z.semicolon=function(){!this.eat(u.semi)&&!this.insertSemicolon()&&this.unexpected()},z.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},z.expect=function(e){this.eat(e)||this.unexpected()},z.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var rt=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};z.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var s=t?e.parenthesizedAssign:e.parenthesizedBind;s>-1&&this.raiseRecoverable(s,t?"Assigning to rvalue":"Parenthesized pattern")}},z.checkExpressionErrors=function(e,t){if(!e)return!1;var s=e.shorthandAssign,a=e.doubleProto;if(!t)return s>=0||a>=0;s>=0&&this.raise(s,"Shorthand property assignments are valid only in destructuring patterns"),a>=0&&this.raiseRecoverable(a,"Redefinition of __proto__ property")},z.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},z.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var A=j.prototype;A.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==u.eof;){var s=this.parseStatement(null,!0,t);e.body.push(s)}if(this.inModule)for(var a=0,c=Object.keys(this.undefinedExports);a<c.length;a+=1){var f=c[a];this.raiseRecoverable(this.undefinedExports[f].start,"Export '"+f+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var qt={kind:"loop"},lo={kind:"switch"};A.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;M.lastIndex=this.pos;var t=M.exec(this.input),s=this.pos+t[0].length,a=this.fullCharCodeAt(s);if(a===91||a===92)return!0;if(e)return!1;if(a===123)return!0;if(b(a)){var c=s;do s+=a<=65535?1:2;while(E(a=this.fullCharCodeAt(s)));if(a===92)return!0;var f=this.input.slice(c,s);if(!g.test(f))return!0}return!1},A.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;M.lastIndex=this.pos;var e=M.exec(this.input),t=this.pos+e[0].length,s;return!K.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(E(s=this.fullCharCodeAt(t+8))||s===92))},A.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;M.lastIndex=this.pos;var s=M.exec(this.input),a=this.pos+s[0].length;if(K.test(this.input.slice(this.pos,a)))return!1;if(e){var c=a+5,f;if(this.input.slice(a,c)!=="using"||c===this.input.length||E(f=this.fullCharCodeAt(c))||f===92)return!1;M.lastIndex=c;var d=M.exec(this.input);if(a=c+d[0].length,d&&K.test(this.input.slice(c,a)))return!1}var y=this.fullCharCodeAt(a);if(!b(y)&&y!==92)return!1;var w=a;do a+=y<=65535?1:2;while(E(y=this.fullCharCodeAt(a)));if(y===92)return!0;var T=this.input.slice(w,a);if(g.test(T))return!1;if(t&&!e&&T==="of"){M.lastIndex=a;var L=M.exec(this.input);if(a=a+L[0].length,this.input.charCodeAt(a)!==61||(y=this.input.charCodeAt(a+1))===61||y===62)return!1}return!0},A.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},A.isUsing=function(e){return this.isUsingKeyword(!1,e)},A.parseStatement=function(e,t,s){var a=this.type,c=this.startNode(),f;switch(this.isLet(e)&&(a=u._var,f="let"),a){case u._break:case u._continue:return this.parseBreakContinueStatement(c,a.keyword);case u._debugger:return this.parseDebuggerStatement(c);case u._do:return this.parseDoStatement(c);case u._for:return this.parseForStatement(c);case u._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(c,!1,!e);case u._class:return e&&this.unexpected(),this.parseClass(c,!0);case u._if:return this.parseIfStatement(c);case u._return:return this.parseReturnStatement(c);case u._switch:return this.parseSwitchStatement(c);case u._throw:return this.parseThrowStatement(c);case u._try:return this.parseTryStatement(c);case u._const:case u._var:return f=f||this.value,e&&f!=="var"&&this.unexpected(),this.parseVarStatement(c,f);case u._while:return this.parseWhileStatement(c);case u._with:return this.parseWithStatement(c);case u.braceL:return this.parseBlock(!0,c);case u.semi:return this.parseEmptyStatement(c);case u._export:case u._import:if(this.options.ecmaVersion>10&&a===u._import){M.lastIndex=this.pos;var d=M.exec(this.input),y=this.pos+d[0].length,w=this.input.charCodeAt(y);if(w===40||w===46)return this.parseExpressionStatement(c,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),a===u._import?this.parseImport(c):this.parseExport(c,s);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(c,!0,!e);var T=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(T)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),e&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),T==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(c,!1,T),this.semicolon(),this.finishNode(c,"VariableDeclaration");var L=this.value,$=this.parseExpression();return a===u.name&&$.type==="Identifier"&&this.eat(u.colon)?this.parseLabeledStatement(c,L,$,e):this.parseExpressionStatement(c,$)}},A.parseBreakContinueStatement=function(e,t){var s=t==="break";this.next(),this.eat(u.semi)||this.insertSemicolon()?e.label=null:this.type!==u.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var a=0;a<this.labels.length;++a){var c=this.labels[a];if((e.label==null||c.name===e.label.name)&&(c.kind!=null&&(s||c.kind==="loop")||e.label&&s))break}return a===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,s?"BreakStatement":"ContinueStatement")},A.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},A.parseDoStatement=function(e){return this.next(),this.labels.push(qt),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(u._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(u.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},A.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(qt),this.enterScope(0),this.expect(u.parenL),this.type===u.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var s=this.isLet();if(this.type===u._var||this.type===u._const||s){var a=this.startNode(),c=s?"let":this.value;return this.next(),this.parseVar(a,!0,c),this.finishNode(a,"VariableDeclaration"),this.parseForAfterInit(e,a,t)}var f=this.isContextual("let"),d=!1,y=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(y){var w=this.startNode();return this.next(),y==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(w,!0,y),this.finishNode(w,"VariableDeclaration"),this.parseForAfterInit(e,w,t)}var T=this.containsEsc,L=new rt,$=this.start,X=t>-1?this.parseExprSubscripts(L,"await"):this.parseExpression(!0,L);return this.type===u._in||(d=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===u._in&&this.unexpected(t),e.await=!0):d&&this.options.ecmaVersion>=8&&(X.start===$&&!T&&X.type==="Identifier"&&X.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),f&&d&&this.raise(X.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(X,!1,L),this.checkLValPattern(X),this.parseForIn(e,X)):(this.checkExpressionErrors(L,!0),t>-1&&this.unexpected(t),this.parseFor(e,X))},A.parseForAfterInit=function(e,t,s){return(this.type===u._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.type===u._in?((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&s>-1&&this.unexpected(s)):this.options.ecmaVersion>=9&&(e.await=s>-1),this.parseForIn(e,t)):(s>-1&&this.unexpected(s),this.parseFor(e,t))},A.parseFunctionStatement=function(e,t,s){return this.next(),this.parseFunction(e,Ue|(s?0:jt),!1,t)},A.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(u._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},A.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(u.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},A.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(u.braceL),this.labels.push(lo),this.enterScope(Gi);for(var t,s=!1;this.type!==u.braceR;)if(this.type===u._case||this.type===u._default){var a=this.type===u._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),a?t.test=this.parseExpression():(s&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),s=!0,t.test=null),this.expect(u.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},A.parseThrowStatement=function(e){return this.next(),K.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var fo=[];A.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Bi:0),this.checkLValPattern(e,t?Wi:he),this.expect(u.parenR),e},A.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===u._catch){var t=this.startNode();this.next(),this.eat(u.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(u._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},A.parseVarStatement=function(e,t,s){return this.next(),this.parseVar(e,!1,t,s),this.semicolon(),this.finishNode(e,"VariableDeclaration")},A.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(qt),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},A.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},A.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},A.parseLabeledStatement=function(e,t,s,a){for(var c=0,f=this.labels;c<f.length;c+=1){var d=f[c];d.name===t&&this.raise(s.start,"Label '"+t+"' is already declared")}for(var y=this.type.isLoop?"loop":this.type===u._switch?"switch":null,w=this.labels.length-1;w>=0;w--){var T=this.labels[w];if(T.statementStart===e.start)T.statementStart=this.start,T.kind=y;else break}return this.labels.push({name:t,kind:y,statementStart:this.start}),e.body=this.parseStatement(a?a.indexOf("label")===-1?a+"label":a:"label"),this.labels.pop(),e.label=s,this.finishNode(e,"LabeledStatement")},A.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},A.parseBlock=function(e,t,s){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(u.braceL),e&&this.enterScope(0);this.type!==u.braceR;){var a=this.parseStatement(null);t.body.push(a)}return s&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},A.parseFor=function(e,t){return e.init=t,this.expect(u.semi),e.test=this.type===u.semi?null:this.parseExpression(),this.expect(u.semi),e.update=this.type===u.parenR?null:this.parseExpression(),this.expect(u.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},A.parseForIn=function(e,t){var s=this.type===u._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!s||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(s?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=s?this.parseExpression():this.parseMaybeAssign(),this.expect(u.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,s?"ForInStatement":"ForOfStatement")},A.parseVar=function(e,t,s,a){for(e.declarations=[],e.kind=s;;){var c=this.startNode();if(this.parseVarId(c,s),this.eat(u.eq)?c.init=this.parseMaybeAssign(t):!a&&s==="const"&&!(this.type===u._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!a&&(s==="using"||s==="await using")&&this.options.ecmaVersion>=17&&this.type!==u._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+s+" declaration"):!a&&c.id.type!=="Identifier"&&!(t&&(this.type===u._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):c.init=null,e.declarations.push(this.finishNode(c,"VariableDeclarator")),!this.eat(u.comma))break}return e},A.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Dt:he,!1)};var Ue=1,jt=2,Xi=4;A.parseFunction=function(e,t,s,a,c){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!a)&&(this.type===u.star&&t&jt&&this.unexpected(),e.generator=this.eat(u.star)),this.options.ecmaVersion>=8&&(e.async=!!a),t&Ue&&(e.id=t&Xi&&this.type!==u.name?null:this.parseIdent(),e.id&&!(t&jt)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Dt:he:Hi));var f=this.yieldPos,d=this.awaitPos,y=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope($t(e.async,e.generator)),t&Ue||(e.id=this.type===u.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,s,!1,c),this.yieldPos=f,this.awaitPos=d,this.awaitIdentPos=y,this.finishNode(e,t&Ue?"FunctionDeclaration":"FunctionExpression")},A.parseFunctionParams=function(e){this.expect(u.parenL),e.params=this.parseBindingList(u.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},A.parseClass=function(e,t){this.next();var s=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var a=this.enterClassBody(),c=this.startNode(),f=!1;for(c.body=[],this.expect(u.braceL);this.type!==u.braceR;){var d=this.parseClassElement(e.superClass!==null);d&&(c.body.push(d),d.type==="MethodDefinition"&&d.kind==="constructor"?(f&&this.raiseRecoverable(d.start,"Duplicate constructor in the same class"),f=!0):d.key&&d.key.type==="PrivateIdentifier"&&po(a,d)&&this.raiseRecoverable(d.key.start,"Identifier '#"+d.key.name+"' has already been declared"))}return this.strict=s,this.next(),e.body=this.finishNode(c,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},A.parseClassElement=function(e){if(this.eat(u.semi))return null;var t=this.options.ecmaVersion,s=this.startNode(),a="",c=!1,f=!1,d="method",y=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(u.braceL))return this.parseClassStaticBlock(s),s;this.isClassElementNameStart()||this.type===u.star?y=!0:a="static"}if(s.static=y,!a&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===u.star)&&!this.canInsertSemicolon()?f=!0:a="async"),!a&&(t>=9||!f)&&this.eat(u.star)&&(c=!0),!a&&!f&&!c){var w=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?d=w:a=w)}if(a?(s.computed=!1,s.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),s.key.name=a,this.finishNode(s.key,"Identifier")):this.parseClassElementName(s),t<13||this.type===u.parenL||d!=="method"||c||f){var T=!s.static&&st(s,"constructor"),L=T&&e;T&&d!=="method"&&this.raise(s.key.start,"Constructor can't have get/set modifier"),s.kind=T?"constructor":d,this.parseClassMethod(s,c,f,L)}else this.parseClassField(s);return s},A.isClassElementNameStart=function(){return this.type===u.name||this.type===u.privateId||this.type===u.num||this.type===u.string||this.type===u.bracketL||this.type.keyword},A.parseClassElementName=function(e){this.type===u.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},A.parseClassMethod=function(e,t,s,a){var c=e.key;e.kind==="constructor"?(t&&this.raise(c.start,"Constructor can't be a generator"),s&&this.raise(c.start,"Constructor can't be an async method")):e.static&&st(e,"prototype")&&this.raise(c.start,"Classes may not have a static property named prototype");var f=e.value=this.parseMethod(t,s,a);return e.kind==="get"&&f.params.length!==0&&this.raiseRecoverable(f.start,"getter should have no params"),e.kind==="set"&&f.params.length!==1&&this.raiseRecoverable(f.start,"setter should have exactly one param"),e.kind==="set"&&f.params[0].type==="RestElement"&&this.raiseRecoverable(f.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},A.parseClassField=function(e){return st(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&st(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(u.eq)?(this.enterScope(je|et),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")},A.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(be|et);this.type!==u.braceR;){var s=this.parseStatement(null);e.body.push(s)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},A.parseClassId=function(e,t){this.type===u.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,he,!1)):(t===!0&&this.unexpected(),e.id=null)},A.parseClassSuper=function(e){e.superClass=this.eat(u._extends)?this.parseExprSubscripts(null,!1):null},A.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},A.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,s=e.used;if(this.options.checkPrivateFields)for(var a=this.privateNameStack.length,c=a===0?null:this.privateNameStack[a-1],f=0;f<s.length;++f){var d=s[f];Ie(t,d.name)||(c?c.used.push(d):this.raiseRecoverable(d.start,"Private field '#"+d.name+"' must be declared in an enclosing class"))}};function po(e,t){var s=t.key.name,a=e[s],c="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(c=(t.static?"s":"i")+t.kind),a==="iget"&&c==="iset"||a==="iset"&&c==="iget"||a==="sget"&&c==="sset"||a==="sset"&&c==="sget"?(e[s]="true",!1):a?!0:(e[s]=c,!1)}function st(e,t){var s=e.computed,a=e.key;return!s&&(a.type==="Identifier"&&a.name===t||a.type==="Literal"&&a.value===t)}A.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==u.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},A.parseExport=function(e,t){if(this.next(),this.eat(u.star))return this.parseExportAllDeclaration(e,t);if(this.eat(u._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==u.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var s=0,a=e.specifiers;s<a.length;s+=1){var c=a[s];this.checkUnreserved(c.local),this.checkLocalExport(c.local),c.local.type==="Literal"&&this.raise(c.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},A.parseExportDeclaration=function(e){return this.parseStatement(null)},A.parseExportDefaultDeclaration=function(){var e;if(this.type===u._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,Ue|Xi,!1,e)}else if(this.type===u._class){var s=this.startNode();return this.parseClass(s,"nullableID")}else{var a=this.parseMaybeAssign();return this.semicolon(),a}},A.checkExport=function(e,t,s){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),Ie(e,t)&&this.raiseRecoverable(s,"Duplicate export '"+t+"'"),e[t]=!0)},A.checkPatternExport=function(e,t){var s=t.type;if(s==="Identifier")this.checkExport(e,t,t.start);else if(s==="ObjectPattern")for(var a=0,c=t.properties;a<c.length;a+=1){var f=c[a];this.checkPatternExport(e,f)}else if(s==="ArrayPattern")for(var d=0,y=t.elements;d<y.length;d+=1){var w=y[d];w&&this.checkPatternExport(e,w)}else s==="Property"?this.checkPatternExport(e,t.value):s==="AssignmentPattern"?this.checkPatternExport(e,t.left):s==="RestElement"&&this.checkPatternExport(e,t.argument)},A.checkVariableExport=function(e,t){if(e)for(var s=0,a=t;s<a.length;s+=1){var c=a[s];this.checkPatternExport(e,c.id)}},A.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},A.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")},A.parseExportSpecifiers=function(e){var t=[],s=!0;for(this.expect(u.braceL);!this.eat(u.braceR);){if(s)s=!1;else if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break;t.push(this.parseExportSpecifier(e))}return t},A.parseImport=function(e){return this.next(),this.type===u.string?(e.specifiers=fo,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===u.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},A.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,he),this.finishNode(e,"ImportSpecifier")},A.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,he),this.finishNode(e,"ImportDefaultSpecifier")},A.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,he),this.finishNode(e,"ImportNamespaceSpecifier")},A.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===u.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(u.comma)))return e;if(this.type===u.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(u.braceL);!this.eat(u.braceR);){if(t)t=!1;else if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break;e.push(this.parseImportSpecifier())}return e},A.parseWithClause=function(){var e=[];if(!this.eat(u._with))return e;this.expect(u.braceL);for(var t={},s=!0;!this.eat(u.braceR);){if(s)s=!1;else if(this.expect(u.comma),this.afterTrailingComma(u.braceR))break;var a=this.parseImportAttribute(),c=a.key.type==="Identifier"?a.key.name:a.key.value;Ie(t,c)&&this.raiseRecoverable(a.key.start,"Duplicate attribute key '"+c+"'"),t[c]=!0,e.push(a)}return e},A.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===u.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(u.colon),this.type!==u.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},A.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===u.string){var e=this.parseLiteral(this.value);return oo.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},A.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},A.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var Z=j.prototype;Z.toAssignable=function(e,t,s){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",s&&this.checkPatternErrors(s,!0);for(var a=0,c=e.properties;a<c.length;a+=1){var f=c[a];this.toAssignable(f,t),f.type==="RestElement"&&(f.argument.type==="ArrayPattern"||f.argument.type==="ObjectPattern")&&this.raise(f.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",s&&this.checkPatternErrors(s,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,s);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else s&&this.checkPatternErrors(s,!0);return e},Z.toAssignableList=function(e,t){for(var s=e.length,a=0;a<s;a++){var c=e[a];c&&this.toAssignable(c,t)}if(s){var f=e[s-1];this.options.ecmaVersion===6&&t&&f&&f.type==="RestElement"&&f.argument.type!=="Identifier"&&this.unexpected(f.argument.start)}return e},Z.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},Z.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==u.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},Z.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case u.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(u.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case u.braceL:return this.parseObj(!0)}return this.parseIdent()},Z.parseBindingList=function(e,t,s,a){for(var c=[],f=!0;!this.eat(e);)if(f?f=!1:this.expect(u.comma),t&&this.type===u.comma)c.push(null);else{if(s&&this.afterTrailingComma(e))break;if(this.type===u.ellipsis){var d=this.parseRestBinding();this.parseBindingListItem(d),c.push(d),this.type===u.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else c.push(this.parseAssignableListItem(a))}return c},Z.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},Z.parseBindingListItem=function(e){return e},Z.parseMaybeDefault=function(e,t,s){if(s=s||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(u.eq))return s;var a=this.startNodeAt(e,t);return a.left=s,a.right=this.parseMaybeAssign(),this.finishNode(a,"AssignmentPattern")},Z.checkLValSimple=function(e,t,s){t===void 0&&(t=it);var a=t!==it;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(a?"Binding ":"Assigning to ")+e.name+" in strict mode"),a&&(t===he&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),s&&(Ie(s,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),s[e.name]=!0),t!==zi&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":a&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return a&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,s);default:this.raise(e.start,(a?"Binding":"Assigning to")+" rvalue")}},Z.checkLValPattern=function(e,t,s){switch(t===void 0&&(t=it),e.type){case"ObjectPattern":for(var a=0,c=e.properties;a<c.length;a+=1){var f=c[a];this.checkLValInnerPattern(f,t,s)}break;case"ArrayPattern":for(var d=0,y=e.elements;d<y.length;d+=1){var w=y[d];w&&this.checkLValInnerPattern(w,t,s)}break;default:this.checkLValSimple(e,t,s)}},Z.checkLValInnerPattern=function(e,t,s){switch(t===void 0&&(t=it),e.type){case"Property":this.checkLValInnerPattern(e.value,t,s);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,s);break;case"RestElement":this.checkLValPattern(e.argument,t,s);break;default:this.checkLValPattern(e,t,s)}};var ee=function(t,s,a,c,f){this.token=t,this.isExpr=!!s,this.preserveSpace=!!a,this.override=c,this.generator=!!f},F={b_stat:new ee("{",!1),b_expr:new ee("{",!0),b_tmpl:new ee("${",!1),p_stat:new ee("(",!1),p_expr:new ee("(",!0),q_tmpl:new ee("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new ee("function",!1),f_expr:new ee("function",!0),f_expr_gen:new ee("function",!0,!1,null,!0),f_gen:new ee("function",!1,!1,null,!0)},_e=j.prototype;_e.initialContext=function(){return[F.b_stat]},_e.curContext=function(){return this.context[this.context.length-1]},_e.braceIsBlock=function(e){var t=this.curContext();return t===F.f_expr||t===F.f_stat?!0:e===u.colon&&(t===F.b_stat||t===F.b_expr)?!t.isExpr:e===u._return||e===u.name&&this.exprAllowed?K.test(this.input.slice(this.lastTokEnd,this.start)):e===u._else||e===u.semi||e===u.eof||e===u.parenR||e===u.arrow?!0:e===u.braceL?t===F.b_stat:e===u._var||e===u._const||e===u.name?!1:!this.exprAllowed},_e.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1},_e.updateContext=function(e){var t,s=this.type;s.keyword&&e===u.dot?this.exprAllowed=!1:(t=s.updateContext)?t.call(this,e):this.exprAllowed=s.beforeExpr},_e.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},u.parenR.updateContext=u.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===F.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr},u.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?F.b_stat:F.b_expr),this.exprAllowed=!0},u.dollarBraceL.updateContext=function(){this.context.push(F.b_tmpl),this.exprAllowed=!0},u.parenL.updateContext=function(e){var t=e===u._if||e===u._for||e===u._with||e===u._while;this.context.push(t?F.p_stat:F.p_expr),this.exprAllowed=!0},u.incDec.updateContext=function(){},u._function.updateContext=u._class.updateContext=function(e){e.beforeExpr&&e!==u._else&&!(e===u.semi&&this.curContext()!==F.p_stat)&&!(e===u._return&&K.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===u.colon||e===u.braceL)&&this.curContext()===F.b_stat)?this.context.push(F.f_expr):this.context.push(F.f_stat),this.exprAllowed=!1},u.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},u.backQuote.updateContext=function(){this.curContext()===F.q_tmpl?this.context.pop():this.context.push(F.q_tmpl),this.exprAllowed=!1},u.star.updateContext=function(e){if(e===u._function){var t=this.context.length-1;this.context[t]===F.f_expr?this.context[t]=F.f_expr_gen:this.context[t]=F.f_gen}this.exprAllowed=!0},u.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==u.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var R=j.prototype;R.checkPropClash=function(e,t,s){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var a=e.key,c;switch(a.type){case"Identifier":c=a.name;break;case"Literal":c=String(a.value);break;default:return}var f=e.kind;if(this.options.ecmaVersion>=6){c==="__proto__"&&f==="init"&&(t.proto&&(s?s.doubleProto<0&&(s.doubleProto=a.start):this.raiseRecoverable(a.start,"Redefinition of __proto__ property")),t.proto=!0);return}c="$"+c;var d=t[c];if(d){var y;f==="init"?y=this.strict&&d.init||d.get||d.set:y=d.init||d[f],y&&this.raiseRecoverable(a.start,"Redefinition of property")}else d=t[c]={init:!1,get:!1,set:!1};d[f]=!0}},R.parseExpression=function(e,t){var s=this;return this.catchStackOverflow(function(){var a=s.start,c=s.startLoc,f=s.parseMaybeAssign(e,t);if(s.type===u.comma){var d=s.startNodeAt(a,c);for(d.expressions=[f];s.eat(u.comma);)d.expressions.push(s.parseMaybeAssign(e,t));return s.finishNode(d,"SequenceExpression")}return f})},R.parseMaybeAssign=function(e,t,s){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var a=!1,c=-1,f=-1,d=-1;t?(c=t.parenthesizedAssign,f=t.trailingComma,d=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new rt,a=!0);var y=this.start,w=this.startLoc;(this.type===u.parenL||this.type===u.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var T=this.parseMaybeConditional(e,t);if(s&&(T=s.call(this,T,y,w)),this.type.isAssign){var L=this.startNodeAt(y,w);return L.operator=this.value,this.type===u.eq&&(T=this.toAssignable(T,!1,t)),a||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=T.start&&(t.shorthandAssign=-1),this.type===u.eq?this.checkLValPattern(T):this.checkLValSimple(T),L.left=T,this.next(),L.right=this.parseMaybeAssign(e),d>-1&&(t.doubleProto=d),this.finishNode(L,"AssignmentExpression")}else a&&this.checkExpressionErrors(t,!0);return c>-1&&(t.parenthesizedAssign=c),f>-1&&(t.trailingComma=f),T},R.parseMaybeConditional=function(e,t){var s=this.start,a=this.startLoc,c=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return c;if(!(c.type==="ArrowFunctionExpression"&&c.start===s)&&this.eat(u.question)){var f=this.startNodeAt(s,a);return f.test=c,f.consequent=this.parseMaybeAssign(),this.expect(u.colon),f.alternate=this.parseMaybeAssign(e),this.finishNode(f,"ConditionalExpression")}return c},R.parseExprOps=function(e,t){var s=this.start,a=this.startLoc,c=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||c.start===s&&c.type==="ArrowFunctionExpression"?c:this.parseExprOp(c,s,a,-1,e)},R.parseExprOp=function(e,t,s,a,c){var f=this.type.binop;if(f!=null&&(!c||this.type!==u._in)&&f>a){var d=this.type===u.logicalOR||this.type===u.logicalAND,y=this.type===u.coalesce;y&&(f=u.logicalAND.binop);var w=this.value;this.next();var T=this.start,L=this.startLoc,$=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,c),T,L,f,c),X=this.buildBinary(t,s,e,$,w,d||y);return(d&&this.type===u.coalesce||y&&(this.type===u.logicalOR||this.type===u.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(X,t,s,a,c)}return e},R.buildBinary=function(e,t,s,a,c,f){a.type==="PrivateIdentifier"&&this.raise(a.start,"Private identifier can only be left side of binary expression");var d=this.startNodeAt(e,t);return d.left=s,d.operator=c,d.right=a,this.finishNode(d,f?"LogicalExpression":"BinaryExpression")},R.parseMaybeUnary=function(e,t,s,a){var c=this.start,f=this.startLoc,d;if(this.isContextual("await")&&this.canAwait)d=this.parseAwait(a),t=!0;else if(this.type.prefix){var y=this.startNode(),w=this.type===u.incDec;y.operator=this.value,y.prefix=!0,this.next(),y.argument=this.parseMaybeUnary(null,!0,w,a),this.checkExpressionErrors(e,!0),w?this.checkLValSimple(y.argument):this.strict&&y.operator==="delete"&&Ki(y.argument)?this.raiseRecoverable(y.start,"Deleting local variable in strict mode"):y.operator==="delete"&&Ut(y.argument)?this.raiseRecoverable(y.start,"Private fields can not be deleted"):t=!0,d=this.finishNode(y,w?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===u.privateId)(a||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),d=this.parsePrivateIdent(),this.type!==u._in&&this.unexpected();else{if(d=this.parseExprSubscripts(e,a),this.checkExpressionErrors(e))return d;for(;this.type.postfix&&!this.canInsertSemicolon();){var T=this.startNodeAt(c,f);T.operator=this.value,T.prefix=!1,T.argument=d,this.checkLValSimple(d),this.next(),d=this.finishNode(T,"UpdateExpression")}}if(!s&&this.eat(u.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(c,f,d,this.parseMaybeUnary(null,!1,!1,a),"**",!1);else return d};function Ki(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Ki(e.expression)}function Ut(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Ut(e.expression)||e.type==="ParenthesizedExpression"&&Ut(e.expression)}R.parseExprSubscripts=function(e,t){var s=this.start,a=this.startLoc,c=this.parseExprAtom(e,t);if(c.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return c;var f=this.parseSubscripts(c,s,a,!1,t);return e&&f.type==="MemberExpression"&&(e.parenthesizedAssign>=f.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=f.start&&(e.parenthesizedBind=-1),e.trailingComma>=f.start&&(e.trailingComma=-1)),f},R.parseSubscripts=function(e,t,s,a,c){for(var f=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,d=!1;;){var y=this.parseSubscript(e,t,s,a,f,d,c);if(y.optional&&(d=!0),y===e||y.type==="ArrowFunctionExpression"){if(d){var w=this.startNodeAt(t,s);w.expression=y,y=this.finishNode(w,"ChainExpression")}return y}e=y}},R.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(u.arrow)},R.parseSubscriptAsyncArrow=function(e,t,s,a){return this.parseArrowExpression(this.startNodeAt(e,t),s,!0,a)},R.parseSubscript=function(e,t,s,a,c,f,d){var y=this.options.ecmaVersion>=11,w=y&&this.eat(u.questionDot);a&&w&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var T=this.eat(u.bracketL);if(T||w&&this.type!==u.parenL&&this.type!==u.backQuote||this.eat(u.dot)){var L=this.startNodeAt(t,s);L.object=e,T?(L.property=this.parseExpression(),this.expect(u.bracketR)):this.type===u.privateId&&e.type!=="Super"?L.property=this.parsePrivateIdent():L.property=this.parseIdent(this.options.allowReserved!=="never"),L.computed=!!T,y&&(L.optional=w),e=this.finishNode(L,"MemberExpression")}else if(!a&&this.eat(u.parenL)){var $=new rt,X=this.yieldPos,Ge=this.awaitPos,Ae=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var ct=this.parseExprList(u.parenR,this.options.ecmaVersion>=8,!1,$);if(c&&!w&&this.shouldParseAsyncArrow())return this.checkPatternErrors($,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=X,this.awaitPos=Ge,this.awaitIdentPos=Ae,this.parseSubscriptAsyncArrow(t,s,ct,d);this.checkExpressionErrors($,!0),this.yieldPos=X||this.yieldPos,this.awaitPos=Ge||this.awaitPos,this.awaitIdentPos=Ae||this.awaitIdentPos;var Ne=this.startNodeAt(t,s);Ne.callee=e,Ne.arguments=ct,y&&(Ne.optional=w),e=this.finishNode(Ne,"CallExpression")}else if(this.type===u.backQuote){(w||f)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Te=this.startNodeAt(t,s);Te.tag=e,Te.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(Te,"TaggedTemplateExpression")}return e},R.parseExprAtom=function(e,t,s){this.type===u.slash&&this.readRegexp();var a,c=this.potentialArrowAt===this.start;switch(this.type){case u._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),a=this.startNode(),this.next(),this.type===u.parenL&&!this.allowDirectSuper&&this.raise(a.start,"super() call outside constructor of a subclass"),this.type!==u.dot&&this.type!==u.bracketL&&this.type!==u.parenL&&this.unexpected(),this.finishNode(a,"Super");case u._this:return a=this.startNode(),this.next(),this.finishNode(a,"ThisExpression");case u.name:var f=this.start,d=this.startLoc,y=this.containsEsc,w=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!y&&w.name==="async"&&!this.canInsertSemicolon()&&this.eat(u._function))return this.overrideContext(F.f_expr),this.parseFunction(this.startNodeAt(f,d),0,!1,!0,t);if(c&&!this.canInsertSemicolon()){if(this.eat(u.arrow))return this.parseArrowExpression(this.startNodeAt(f,d),[w],!1,t);if(this.options.ecmaVersion>=8&&w.name==="async"&&this.type===u.name&&!y&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return w=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(u.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(f,d),[w],!0,t)}return w;case u.regexp:var T=this.value;return a=this.parseLiteral(T.value),a.regex={pattern:T.pattern,flags:T.flags},a;case u.num:case u.string:return this.parseLiteral(this.value);case u._null:case u._true:case u._false:return a=this.startNode(),a.value=this.type===u._null?null:this.type===u._true,a.raw=this.type.keyword,this.next(),this.finishNode(a,"Literal");case u.parenL:var L=this.start,$=this.parseParenAndDistinguishExpression(c,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget($)&&(e.parenthesizedAssign=L),e.parenthesizedBind<0&&(e.parenthesizedBind=L)),$;case u.bracketL:return a=this.startNode(),this.next(),a.elements=this.parseExprList(u.bracketR,!0,!0,e),this.finishNode(a,"ArrayExpression");case u.braceL:return this.overrideContext(F.b_expr),this.parseObj(!1,e);case u._function:return a=this.startNode(),this.next(),this.parseFunction(a,0);case u._class:return this.parseClass(this.startNode(),!1);case u._new:return this.parseNew();case u.backQuote:return this.parseTemplate();case u._import:return this.options.ecmaVersion>=11?this.parseExprImport(s):this.unexpected();default:return this.parseExprAtomDefault()}},R.parseExprAtomDefault=function(){this.unexpected()},R.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===u.parenL&&!e)return this.parseDynamicImport(t);if(this.type===u.dot){var s=this.startNodeAt(t.start,t.loc&&t.loc.start);return s.name="import",t.meta=this.finishNode(s,"Identifier"),this.parseImportMeta(t)}else this.unexpected()},R.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(u.parenR)?e.options=null:(this.expect(u.comma),this.afterTrailingComma(u.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(u.parenR)||(this.expect(u.comma),this.afterTrailingComma(u.parenR)||this.unexpected())));else if(!this.eat(u.parenR)){var t=this.start;this.eat(u.comma)&&this.eat(u.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},R.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},R.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},R.parseParenExpression=function(){this.expect(u.parenL);var e=this.parseExpression();return this.expect(u.parenR),e},R.shouldParseArrow=function(e){return!this.canInsertSemicolon()},R.parseParenAndDistinguishExpression=function(e,t){var s=this.start,a=this.startLoc,c,f=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var d=this.start,y=this.startLoc,w=[],T=!0,L=!1,$=new rt,X=this.yieldPos,Ge=this.awaitPos,Ae;for(this.yieldPos=0,this.awaitPos=0;this.type!==u.parenR;)if(T?T=!1:this.expect(u.comma),f&&this.afterTrailingComma(u.parenR,!0)){L=!0;break}else if(this.type===u.ellipsis){Ae=this.start,w.push(this.parseParenItem(this.parseRestBinding())),this.type===u.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else w.push(this.parseMaybeAssign(!1,$,this.parseParenItem));var ct=this.lastTokEnd,Ne=this.lastTokEndLoc;if(this.expect(u.parenR),e&&this.shouldParseArrow(w)&&this.eat(u.arrow))return this.checkPatternErrors($,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=X,this.awaitPos=Ge,this.parseParenArrowList(s,a,w,t);(!w.length||L)&&this.unexpected(this.lastTokStart),Ae&&this.unexpected(Ae),this.checkExpressionErrors($,!0),this.yieldPos=X||this.yieldPos,this.awaitPos=Ge||this.awaitPos,w.length>1?(c=this.startNodeAt(d,y),c.expressions=w,this.finishNodeAt(c,"SequenceExpression",ct,Ne)):c=w[0]}else c=this.parseParenExpression();if(this.options.preserveParens){var Te=this.startNodeAt(s,a);return Te.expression=c,this.finishNode(Te,"ParenthesizedExpression")}else return c},R.parseParenItem=function(e){return e},R.parseParenArrowList=function(e,t,s,a){return this.parseArrowExpression(this.startNodeAt(e,t),s,!1,a)};var mo=[];R.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===u.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var s=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),s&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var a=this.start,c=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),a,c,!0,!1),e.callee.type==="Super"&&this.raiseRecoverable(a,"Invalid use of 'super'"),this.eat(u.parenL)?e.arguments=this.parseExprList(u.parenR,this.options.ecmaVersion>=8,!1):e.arguments=mo,this.finishNode(e,"NewExpression")},R.parseTemplateElement=function(e){var t=e.isTagged,s=this.startNode();return this.type===u.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),s.value={raw:this.value.replace(/\r\n?/g,`
|
|
12
12
|
`),cooked:null}):s.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
13
|
-
`),cooked:this.value},this.next(),s.tail=this.type===u.backQuote,this.finishNode(s,"TemplateElement")},R.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var s=this.startNode();this.next(),s.expressions=[];var a=this.parseTemplateElement({isTagged:t});for(s.quasis=[a];!a.tail;)this.type===u.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(u.dollarBraceL),s.expressions.push(this.parseExpression()),this.expect(u.braceR),s.quasis.push(a=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(s,"TemplateLiteral")},R.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===u.name||this.type===u.num||this.type===u.string||this.type===u.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===u.star)&&!K.test(this.input.slice(this.lastTokEnd,this.start))},R.parseObj=function(e,t){var s=this.startNode(),a=!0,c={};for(s.properties=[],this.next();!this.eat(u.braceR);){if(a)a=!1;else if(this.expect(u.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(u.braceR))break;var f=this.parseProperty(e,t);e||this.checkPropClash(f,c,t),s.properties.push(f)}return this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},R.parseProperty=function(e,t){var s=this.startNode(),a,c,f,d;if(this.options.ecmaVersion>=9&&this.eat(u.ellipsis))return e?(s.argument=this.parseIdent(!1),this.type===u.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(s,"RestElement")):(s.argument=this.parseMaybeAssign(!1,t),this.type===u.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(s,"SpreadElement"));this.options.ecmaVersion>=6&&(s.method=!1,s.shorthand=!1,(e||t)&&(f=this.start,d=this.startLoc),e||(a=this.eat(u.star)));var y=this.containsEsc;return this.parsePropertyName(s),!e&&!y&&this.options.ecmaVersion>=8&&!a&&this.isAsyncProp(s)?(c=!0,a=this.options.ecmaVersion>=9&&this.eat(u.star),this.parsePropertyName(s)):c=!1,this.parsePropertyValue(s,e,a,c,f,d,t,y),this.finishNode(s,"Property")},R.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var s=e.kind==="get"?0:1;if(e.value.params.length!==s){var a=e.value.start;e.kind==="get"?this.raiseRecoverable(a,"getter should have no params"):this.raiseRecoverable(a,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},R.parsePropertyValue=function(e,t,s,a,c,f,d,y){(s||a)&&this.type===u.colon&&this.unexpected(),this.eat(u.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,d),e.kind="init"):this.options.ecmaVersion>=6&&this.type===u.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(s,a),e.kind="init"):!t&&!y&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==u.comma&&this.type!==u.braceR&&this.type!==u.eq?((s||a)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((s||a)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=c),t?e.value=this.parseMaybeDefault(c,f,this.copyNode(e.key)):this.type===u.eq&&d?(d.shorthandAssign<0&&(d.shorthandAssign=this.start),e.value=this.parseMaybeDefault(c,f,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()},R.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(u.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(u.bracketR),e.key;e.computed=!1}return e.key=this.type===u.num||this.type===u.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},R.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},R.parseMethod=function(e,t,s){var a=this.startNode(),c=this.yieldPos,f=this.awaitPos,d=this.awaitIdentPos;return this.initFunction(a),this.options.ecmaVersion>=6&&(a.generator=e),this.options.ecmaVersion>=8&&(a.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope($t(t,a.generator)|et|(s?Ui:0)),this.expect(u.parenL),a.params=this.parseBindingList(u.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(a,!1,!0,!1),this.yieldPos=c,this.awaitPos=f,this.awaitIdentPos=d,this.finishNode(a,"FunctionExpression")},R.parseArrowExpression=function(e,t,s,a){var c=this.yieldPos,f=this.awaitPos,d=this.awaitIdentPos;return this.enterScope($t(s,!1)|Ft),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!s),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,a),this.yieldPos=c,this.awaitPos=f,this.awaitIdentPos=d,this.finishNode(e,"ArrowFunctionExpression")},R.parseFunctionBody=function(e,t,s,a){var c=t&&this.type!==u.braceL,f=this.strict,d=!1;if(c)e.body=this.parseMaybeAssign(a),e.expression=!0,this.checkParams(e,!1);else{var y=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!f||y)&&(d=this.strictDirective(this.end),d&&y&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var w=this.labels;this.labels=[],d&&(this.strict=!0),this.checkParams(e,!f&&!d&&!t&&!s&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Wi),e.body=this.parseBlock(!1,void 0,d&&!f),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=w}this.exitScope()},R.isSimpleParamList=function(e){for(var t=0,s=e;t<s.length;t+=1){var a=s[t];if(a.type!=="Identifier")return!1}return!0},R.checkParams=function(e,t){for(var s=Object.create(null),a=0,c=e.params;a<c.length;a+=1){var f=c[a];this.checkLValInnerPattern(f,Dt,t?null:s)}},R.parseExprList=function(e,t,s,a){for(var c=[],f=!0;!this.eat(e);){if(f)f=!1;else if(this.expect(u.comma),t&&this.afterTrailingComma(e))break;var d=void 0;s&&this.type===u.comma?d=null:this.type===u.ellipsis?(d=this.parseSpread(a),a&&this.type===u.comma&&a.trailingComma<0&&(a.trailingComma=this.start)):d=this.parseMaybeAssign(!1,a),c.push(d)}return c},R.checkUnreserved=function(e){var t=e.start,s=e.end,a=e.name;if(this.inGenerator&&a==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&a==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&tt)&&a==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(a==="arguments"||a==="await")&&this.raise(t,"Cannot use "+a+" in class static initialization block"),this.keywords.test(a)&&this.raise(t,"Unexpected keyword '"+a+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,s).indexOf("\\")!==-1)){var c=this.strict?this.reservedWordsStrict:this.reservedWords;c.test(a)&&(!this.inAsync&&a==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+a+"' is reserved"))}},R.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t},R.parseIdentNode=function(){var e=this.startNode();return this.type===u.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=u.name):this.unexpected(),e},R.parsePrivateIdent=function(){var e=this.startNode();return this.type===u.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},R.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===u.semi||this.canInsertSemicolon()||this.type!==u.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(u.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},R.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var nt=j.prototype;nt.raise=function(e,t){var s=Ot(this.input,e);t+=" ("+s.line+":"+s.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var a=new SyntaxError(t);throw a.pos=e,a.loc=s,a.raisedAt=this.pos,a},nt.raiseRecoverable=nt.raise,nt.curPosition=function(){if(this.options.locations)return new ke(this.curLine,this.pos-this.lineStart)};var me=j.prototype,ho=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};me.enterScope=function(e){this.scopeStack.push(new ho(e))},me.exitScope=function(){this.scopeStack.pop()},me.treatFunctionsAsVarInScope=function(e){return e.flags&Ee||!this.inModule&&e.flags&ye},me.declareName=function(e,t,s){var a=!1;if(t===he){var c=this.currentScope();a=c.lexical.indexOf(e)>-1||c.functions.indexOf(e)>-1||c.var.indexOf(e)>-1,c.lexical.push(e),this.inModule&&c.flags&ye&&delete this.undefinedExports[e]}else if(t===Hi){var f=this.currentScope();f.lexical.push(e)}else if(t===Gi){var d=this.currentScope();this.treatFunctionsAsVar?a=d.lexical.indexOf(e)>-1:a=d.lexical.indexOf(e)>-1||d.var.indexOf(e)>-1,d.functions.push(e)}else for(var y=this.scopeStack.length-1;y>=0;--y){var w=this.scopeStack[y];if(w.lexical.indexOf(e)>-1&&!(w.flags&Bi&&w.lexical[0]===e)||!this.treatFunctionsAsVarInScope(w)&&w.functions.indexOf(e)>-1){a=!0;break}if(w.var.push(e),this.inModule&&w.flags&ye&&delete this.undefinedExports[e],w.flags&tt)break}a&&this.raiseRecoverable(s,"Identifier '"+e+"' has already been declared")},me.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},me.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},me.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(tt|je|be))return t}},me.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(tt|je|be)&&!(t.flags&Ft))return t}};var Ue=function(t,s,a){this.type="",this.start=s,this.end=0,t.options.locations&&(this.loc=new qe(t,a)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[s,0])},Me=j.prototype;Me.startNode=function(){return new Ue(this,this.start,this.startLoc)},Me.startNodeAt=function(e,t){return new Ue(this,e,t)};function Ki(e,t,s,a){return e.type=t,e.end=s,this.options.locations&&(e.loc.end=a),this.options.ranges&&(e.range[1]=s),e}Me.finishNode=function(e,t){return Ki.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Me.finishNodeAt=function(e,t,s,a){return Ki.call(this,e,t,s,a)},Me.copyNode=function(e){var t=new Ue(this,e.start,this.startLoc);for(var s in e)t[s]=e[s];return t};var lo="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",Yi="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Ji=Yi+" Extended_Pictographic",Qi=Ji,Zi=Qi+" EBase EComp EMod EPres ExtPict",er=Zi,fo=er,po={9:Yi,10:Ji,11:Qi,12:Zi,13:er,14:fo},mo="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",xo={9:"",10:"",11:"",12:"",13:"",14:mo},tr="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",ir="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",rr=ir+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",sr=rr+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",nr=sr+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",ar=nr+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",go=ar+" "+lo,vo={9:ir,10:rr,11:sr,12:nr,13:ar,14:go},or={};function yo(e){var t=or[e]={binary:de(po[e]+" "+tr),binaryOfStrings:de(xo[e]),nonBinary:{General_Category:de(tr),Script:de(vo[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Ut=0,ur=[9,10,11,12,13,14];Ut<ur.length;Ut+=1){var Eo=ur[Ut];yo(Eo)}var _=j.prototype,at=function(t,s){this.parent=t,this.base=s||this};at.prototype.separatedFrom=function(t){for(var s=this;s;s=s.parent)for(var a=t;a;a=a.parent)if(s.base===a.base&&s!==a)return!0;return!1},at.prototype.sibling=function(){return new at(this.parent,this.base)};var ae=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=or[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};ae.prototype.reset=function(t,s,a){var c=a.indexOf("v")!==-1,f=a.indexOf("u")!==-1;this.start=t|0,this.source=s+"",this.flags=a,c&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=f&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=f&&this.parser.options.ecmaVersion>=9)},ae.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},ae.prototype.at=function(t,s){s===void 0&&(s=!1);var a=this.source,c=a.length;if(t>=c)return-1;var f=a.charCodeAt(t);if(!(s||this.switchU)||f<=55295||f>=57344||t+1>=c)return f;var d=a.charCodeAt(t+1);return d>=56320&&d<=57343?(f<<10)+d-56613888:f},ae.prototype.nextIndex=function(t,s){s===void 0&&(s=!1);var a=this.source,c=a.length;if(t>=c)return c;var f=a.charCodeAt(t),d;return!(s||this.switchU)||f<=55295||f>=57344||t+1>=c||(d=a.charCodeAt(t+1))<56320||d>57343?t+1:t+2},ae.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)},ae.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},ae.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)},ae.prototype.eat=function(t,s){return s===void 0&&(s=!1),this.current(s)===t?(this.advance(s),!0):!1},ae.prototype.eatChars=function(t,s){s===void 0&&(s=!1);for(var a=this.pos,c=0,f=t;c<f.length;c+=1){var d=f[c],y=this.at(a,s);if(y===-1||y!==d)return!1;a=this.nextIndex(a,s)}return this.pos=a,!0},_.validateRegExpFlags=function(e){for(var t=e.validFlags,s=e.flags,a=!1,c=!1,f=0;f<s.length;f++){var d=s.charAt(f);t.indexOf(d)===-1&&this.raise(e.start,"Invalid regular expression flag"),s.indexOf(d,f+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),d==="u"&&(a=!0),d==="v"&&(c=!0)}this.options.ecmaVersion>=15&&a&&c&&this.raise(e.start,"Invalid regular expression flag")};function bo(e){for(var t in e)return!0;return!1}_.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&bo(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},_.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,s=e.backReferenceNames;t<s.length;t+=1){var a=s[t];e.groupNames[a]||e.raise("Invalid named capture referenced")}},_.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new at(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},_.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},_.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1},_.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var s=!1;if(this.options.ecmaVersion>=9&&(s=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!s,!0}return e.pos=t,!1},_.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1},_.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},_.regexp_eatBracedQuantifier=function(e,t){var s=e.pos;if(e.eat(123)){var a=0,c=-1;if(this.regexp_eatDecimalDigits(e)&&(a=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(c=e.lastIntValue),e.eat(125)))return c!==-1&&c<a&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=s}return!1},_.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},_.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},_.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var s=this.regexp_eatModifiers(e),a=e.eat(45);if(s||a){for(var c=0;c<s.length;c++){var f=s.charAt(c);s.indexOf(f,c+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(a){var d=this.regexp_eatModifiers(e);!s&&!d&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var y=0;y<d.length;y++){var w=d.charAt(y);(d.indexOf(w,y+1)>-1||s.indexOf(w)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1},_.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},_.regexp_eatModifiers=function(e){for(var t="",s=0;(s=e.current())!==-1&&wo(s);)t+=ce(s),e.advance();return t};function wo(e){return e===105||e===109||e===115}_.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},_.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},_.regexp_eatSyntaxCharacter=function(e){var t=e.current();return cr(t)?(e.lastIntValue=t,e.advance(),!0):!1};function cr(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}_.regexp_eatPatternCharacters=function(e){for(var t=e.pos,s=0;(s=e.current())!==-1&&!cr(s);)e.advance();return e.pos!==t},_.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1},_.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,s=e.groupNames[e.lastStringValue];if(s)if(t)for(var a=0,c=s;a<c.length;a+=1){var f=c[a];f.separatedFrom(e.branchID)||e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");t?(s||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},_.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},_.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=ce(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=ce(e.lastIntValue);return!0}return!1},_.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,s=this.options.ecmaVersion>=11,a=e.current(s);return e.advance(s),a===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,s)&&(a=e.lastIntValue),So(a)?(e.lastIntValue=a,!0):(e.pos=t,!1)};function So(e){return b(e,!0)||e===36||e===95}_.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,s=this.options.ecmaVersion>=11,a=e.current(s);return e.advance(s),a===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,s)&&(a=e.lastIntValue),Co(a)?(e.lastIntValue=a,!0):(e.pos=t,!1)};function Co(e){return E(e,!0)||e===36||e===95||e===8204||e===8205}_.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},_.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var s=e.lastIntValue;if(e.switchU)return s>e.maxBackReference&&(e.maxBackReference=s),!0;if(s<=e.numCapturingParens)return!0;e.pos=t}return!1},_.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},_.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},_.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},_.regexp_eatZero=function(e){return e.current()===48&&!ot(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1},_.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1},_.regexp_eatControlLetter=function(e){var t=e.current();return hr(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function hr(e){return e>=65&&e<=90||e>=97&&e<=122}_.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var s=e.pos,a=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var c=e.lastIntValue;if(a&&c>=55296&&c<=56319){var f=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var d=e.lastIntValue;if(d>=56320&&d<=57343)return e.lastIntValue=(c-55296)*1024+(d-56320)+65536,!0}e.pos=f,e.lastIntValue=c}return!0}if(a&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Io(e.lastIntValue))return!0;a&&e.raise("Invalid unicode escape"),e.pos=s}return!1};function Io(e){return e>=0&&e<=1114111}_.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1},_.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var lr=0,le=1,te=2;_.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(ko(t))return e.lastIntValue=-1,e.advance(),le;var s=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((s=t===80)||t===112)){e.lastIntValue=-1,e.advance();var a;if(e.eat(123)&&(a=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return s&&a===te&&e.raise("Invalid property name"),a;e.raise("Invalid property name")}return lr};function ko(e){return e===100||e===68||e===115||e===83||e===119||e===87}_.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var s=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var a=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,s,a),le}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var c=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,c)}return lr},_.regexp_validateUnicodePropertyNameAndValue=function(e,t,s){Ie(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(s)||e.raise("Invalid property value")},_.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return le;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return te;e.raise("Invalid property name")},_.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";fr(t=e.current());)e.lastStringValue+=ce(t),e.advance();return e.lastStringValue!==""};function fr(e){return hr(e)||e===95}_.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";_o(t=e.current());)e.lastStringValue+=ce(t),e.advance();return e.lastStringValue!==""};function _o(e){return fr(e)||ot(e)}_.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},_.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),s=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&s===te&&e.raise("Negated character class may contain strings"),!0}return!1},_.regexp_classContents=function(e){return e.current()===93?le:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),le)},_.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var s=e.lastIntValue;e.switchU&&(t===-1||s===-1)&&e.raise("Invalid character class"),t!==-1&&s!==-1&&t>s&&e.raise("Range out of order in character class")}}},_.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var s=e.current();(s===99||mr(s))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var a=e.current();return a!==93?(e.lastIntValue=a,e.advance(),!0):!1},_.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},_.regexp_classSetExpression=function(e){var t=le,s;if(!this.regexp_eatClassSetRange(e))if(s=this.regexp_eatClassSetOperand(e)){s===te&&(t=te);for(var a=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(s=this.regexp_eatClassSetOperand(e))){s!==te&&(t=le);continue}e.raise("Invalid character in character class")}if(a!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(a!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(s=this.regexp_eatClassSetOperand(e),!s)return t;s===te&&(t=te)}},_.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var s=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var a=e.lastIntValue;return s!==-1&&a!==-1&&s>a&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},_.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?le:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},_.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var s=e.eat(94),a=this.regexp_classContents(e);if(e.eat(93))return s&&a===te&&e.raise("Negated character class may contain strings"),a;e.pos=t}if(e.eat(92)){var c=this.regexp_eatCharacterClassEscape(e);if(c)return c;e.pos=t}return null},_.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var s=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return s}else e.raise("Invalid escape");e.pos=t}return null},_.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===te&&(t=te);return t},_.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?le:te},_.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var s=e.current();return s<0||s===e.lookahead()&&Ao(s)||No(s)?!1:(e.advance(),e.lastIntValue=s,!0)};function Ao(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function No(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}_.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return To(t)?(e.lastIntValue=t,e.advance(),!0):!1};function To(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}_.regexp_eatClassControlLetter=function(e){var t=e.current();return ot(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1},_.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},_.regexp_eatDecimalDigits=function(e){var t=e.pos,s=0;for(e.lastIntValue=0;ot(s=e.current());)e.lastIntValue=10*e.lastIntValue+(s-48),e.advance();return e.pos!==t};function ot(e){return e>=48&&e<=57}_.regexp_eatHexDigits=function(e){var t=e.pos,s=0;for(e.lastIntValue=0;pr(s=e.current());)e.lastIntValue=16*e.lastIntValue+dr(s),e.advance();return e.pos!==t};function pr(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function dr(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}_.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var s=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+s*8+e.lastIntValue:e.lastIntValue=t*8+s}else e.lastIntValue=t;return!0}return!1},_.regexp_eatOctalDigit=function(e){var t=e.current();return mr(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function mr(e){return e>=48&&e<=55}_.regexp_eatFixedHexDigits=function(e,t){var s=e.pos;e.lastIntValue=0;for(var a=0;a<t;++a){var c=e.current();if(!pr(c))return e.pos=s,!1;e.lastIntValue=16*e.lastIntValue+dr(c),e.advance()}return!0};var ut=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new qe(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},O=j.prototype;O.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new ut(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},O.getToken=function(){return this.next(),new ut(this)},typeof Symbol<"u"&&(O[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===u.eof,value:t}}}}),O.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(u.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())},O.readToken=function(e){return b(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)},O.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var s=this.input.charCodeAt(e+1);return s<=56319||s>=57344?t:(t<<10)+s-56613888},O.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},O.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,s=this.input.indexOf("*/",this.pos+=2);if(s===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=s+2,this.options.locations)for(var a=void 0,c=t;(a=Vi(this.input,c,this.pos))>-1;)++this.curLine,c=this.lineStart=a;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,s),t,this.pos,e,this.curPosition())},O.skipLineComment=function(e){for(var t=this.pos,s=this.options.onComment&&this.curPosition(),a=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!ve(a);)a=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,s,this.curPosition())},O.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&Lt.test(String.fromCharCode(e)))++this.pos;else break e}}},O.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var s=this.type;this.type=e,this.value=t,this.updateContext(s)},O.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(u.ellipsis)):(++this.pos,this.finishToken(u.dot))},O.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(u.assign,2):this.finishOp(u.slash,1)},O.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),s=1,a=e===42?u.star:u.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++s,a=u.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(u.assign,s+1):this.finishOp(a,s)},O.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var s=this.input.charCodeAt(this.pos+2);if(s===61)return this.finishOp(u.assign,3)}return this.finishOp(e===124?u.logicalOR:u.logicalAND,2)}return t===61?this.finishOp(u.assign,2):this.finishOp(e===124?u.bitwiseOR:u.bitwiseAND,1)},O.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(u.assign,2):this.finishOp(u.bitwiseXOR,1)},O.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||K.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(u.incDec,2):t===61?this.finishOp(u.assign,2):this.finishOp(u.plusMin,1)},O.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),s=1;return t===e?(s=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+s)===61?this.finishOp(u.assign,s+1):this.finishOp(u.bitShift,s)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(s=2),this.finishOp(u.relational,s))},O.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(u.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(u.arrow)):this.finishOp(e===61?u.eq:u.prefix,1)},O.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var s=this.input.charCodeAt(this.pos+2);if(s<48||s>57)return this.finishOp(u.questionDot,2)}if(t===63){if(e>=12){var a=this.input.charCodeAt(this.pos+2);if(a===61)return this.finishOp(u.assign,3)}return this.finishOp(u.coalesce,2)}}return this.finishOp(u.question,1)},O.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),b(t,!0)||t===92))return this.finishToken(u.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+ce(t)+"'")},O.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(u.parenL);case 41:return++this.pos,this.finishToken(u.parenR);case 59:return++this.pos,this.finishToken(u.semi);case 44:return++this.pos,this.finishToken(u.comma);case 91:return++this.pos,this.finishToken(u.bracketL);case 93:return++this.pos,this.finishToken(u.bracketR);case 123:return++this.pos,this.finishToken(u.braceL);case 125:return++this.pos,this.finishToken(u.braceR);case 58:return++this.pos,this.finishToken(u.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(u.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(u.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+ce(e)+"'")},O.finishOp=function(e,t){var s=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,s)},O.readRegexp=function(){for(var e,t,s=this.pos;;){this.pos>=this.input.length&&this.raise(s,"Unterminated regular expression");var a=this.input.charAt(this.pos);if(K.test(a)&&this.raise(s,"Unterminated regular expression"),e)e=!1;else{if(a==="[")t=!0;else if(a==="]"&&t)t=!1;else if(a==="/"&&!t)break;e=a==="\\"}++this.pos}var c=this.input.slice(s,this.pos);++this.pos;var f=this.pos,d=this.readWord1();this.containsEsc&&this.unexpected(f);var y=this.regexpState||(this.regexpState=new ae(this));y.reset(s,c,d),this.validateRegExpFlags(y),this.validateRegExpPattern(y);var w=null;try{w=new RegExp(c,d)}catch{}return this.finishToken(u.regexp,{pattern:c,flags:d,value:w})},O.readInt=function(e,t,s){for(var a=this.options.ecmaVersion>=12&&t===void 0,c=s&&this.input.charCodeAt(this.pos)===48,f=this.pos,d=0,y=0,w=0,T=t??1/0;w<T;++w,++this.pos){var L=this.input.charCodeAt(this.pos),$=void 0;if(a&&L===95){c&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),y===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),w===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),y=L;continue}if(L>=97?$=L-97+10:L>=65?$=L-65+10:L>=48&&L<=57?$=L-48:$=1/0,$>=e)break;y=L,d=d*e+$}return a&&y===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===f||t!=null&&this.pos-f!==t?null:d};function Ro(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function xr(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}O.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var s=this.readInt(e);return s==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(s=xr(this.input.slice(t,this.pos)),++this.pos):b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(u.num,s)},O.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var s=this.pos-t>=2&&this.input.charCodeAt(t)===48;s&&this.strict&&this.raise(t,"Invalid number");var a=this.input.charCodeAt(this.pos);if(!s&&!e&&this.options.ecmaVersion>=11&&a===110){var c=xr(this.input.slice(t,this.pos));return++this.pos,b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(u.num,c)}s&&/[89]/.test(this.input.slice(t,this.pos))&&(s=!1),a===46&&!s&&(++this.pos,this.readInt(10),a=this.input.charCodeAt(this.pos)),(a===69||a===101)&&!s&&(a=this.input.charCodeAt(++this.pos),(a===43||a===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var f=Ro(this.input.slice(t,this.pos),s);return this.finishToken(u.num,f)},O.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var s=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(s,"Code point out of bounds")}else t=this.readHexChar(4);return t},O.readString=function(e){for(var t="",s=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var a=this.input.charCodeAt(this.pos);if(a===e)break;a===92?(t+=this.input.slice(s,this.pos),t+=this.readEscapedChar(!1),s=this.pos):a===8232||a===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(ve(a)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(s,this.pos++),this.finishToken(u.string,t)};var gr={};O.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===gr)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},O.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw gr;this.raise(e,t)},O.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var s=this.input.charCodeAt(this.pos);if(s===96||s===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===u.template||this.type===u.invalidTemplate)?s===36?(this.pos+=2,this.finishToken(u.dollarBraceL)):(++this.pos,this.finishToken(u.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(u.template,e));if(s===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(ve(s)){switch(e+=this.input.slice(t,this.pos),++this.pos,s){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
|
|
13
|
+
`),cooked:this.value},this.next(),s.tail=this.type===u.backQuote,this.finishNode(s,"TemplateElement")},R.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var s=this.startNode();this.next(),s.expressions=[];var a=this.parseTemplateElement({isTagged:t});for(s.quasis=[a];!a.tail;)this.type===u.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(u.dollarBraceL),s.expressions.push(this.parseExpression()),this.expect(u.braceR),s.quasis.push(a=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(s,"TemplateLiteral")},R.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===u.name||this.type===u.num||this.type===u.string||this.type===u.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===u.star)&&!K.test(this.input.slice(this.lastTokEnd,this.start))},R.parseObj=function(e,t){var s=this.startNode(),a=!0,c={};for(s.properties=[],this.next();!this.eat(u.braceR);){if(a)a=!1;else if(this.expect(u.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(u.braceR))break;var f=this.parseProperty(e,t);e||this.checkPropClash(f,c,t),s.properties.push(f)}return this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},R.parseProperty=function(e,t){var s=this.startNode(),a,c,f,d;if(this.options.ecmaVersion>=9&&this.eat(u.ellipsis))return e?(s.argument=this.parseIdent(!1),this.type===u.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(s,"RestElement")):(s.argument=this.parseMaybeAssign(!1,t),this.type===u.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(s,"SpreadElement"));this.options.ecmaVersion>=6&&(s.method=!1,s.shorthand=!1,(e||t)&&(f=this.start,d=this.startLoc),e||(a=this.eat(u.star)));var y=this.containsEsc;return this.parsePropertyName(s),!e&&!y&&this.options.ecmaVersion>=8&&!a&&this.isAsyncProp(s)?(c=!0,a=this.options.ecmaVersion>=9&&this.eat(u.star),this.parsePropertyName(s)):c=!1,this.parsePropertyValue(s,e,a,c,f,d,t,y),this.finishNode(s,"Property")},R.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var s=e.kind==="get"?0:1;if(e.value.params.length!==s){var a=e.value.start;e.kind==="get"?this.raiseRecoverable(a,"getter should have no params"):this.raiseRecoverable(a,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},R.parsePropertyValue=function(e,t,s,a,c,f,d,y){(s||a)&&this.type===u.colon&&this.unexpected(),this.eat(u.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,d),e.kind="init"):this.options.ecmaVersion>=6&&this.type===u.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(s,a),e.kind="init"):!t&&!y&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==u.comma&&this.type!==u.braceR&&this.type!==u.eq?((s||a)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((s||a)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=c),t?e.value=this.parseMaybeDefault(c,f,this.copyNode(e.key)):this.type===u.eq&&d?(d.shorthandAssign<0&&(d.shorthandAssign=this.start),e.value=this.parseMaybeDefault(c,f,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()},R.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(u.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(u.bracketR),e.key;e.computed=!1}return e.key=this.type===u.num||this.type===u.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},R.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},R.parseMethod=function(e,t,s){var a=this.startNode(),c=this.yieldPos,f=this.awaitPos,d=this.awaitIdentPos;return this.initFunction(a),this.options.ecmaVersion>=6&&(a.generator=e),this.options.ecmaVersion>=8&&(a.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope($t(t,a.generator)|et|(s?Mi:0)),this.expect(u.parenL),a.params=this.parseBindingList(u.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(a,!1,!0,!1),this.yieldPos=c,this.awaitPos=f,this.awaitIdentPos=d,this.finishNode(a,"FunctionExpression")},R.parseArrowExpression=function(e,t,s,a){var c=this.yieldPos,f=this.awaitPos,d=this.awaitIdentPos;return this.enterScope($t(s,!1)|Ft),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!s),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,a),this.yieldPos=c,this.awaitPos=f,this.awaitIdentPos=d,this.finishNode(e,"ArrowFunctionExpression")},R.parseFunctionBody=function(e,t,s,a){var c=t&&this.type!==u.braceL,f=this.strict,d=!1;if(c)e.body=this.parseMaybeAssign(a),e.expression=!0,this.checkParams(e,!1);else{var y=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!f||y)&&(d=this.strictDirective(this.end),d&&y&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var w=this.labels;this.labels=[],d&&(this.strict=!0),this.checkParams(e,!f&&!d&&!t&&!s&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,zi),e.body=this.parseBlock(!1,void 0,d&&!f),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=w}this.exitScope()},R.isSimpleParamList=function(e){for(var t=0,s=e;t<s.length;t+=1){var a=s[t];if(a.type!=="Identifier")return!1}return!0},R.checkParams=function(e,t){for(var s=Object.create(null),a=0,c=e.params;a<c.length;a+=1){var f=c[a];this.checkLValInnerPattern(f,Dt,t?null:s)}},R.parseExprList=function(e,t,s,a){for(var c=[],f=!0;!this.eat(e);){if(f)f=!1;else if(this.expect(u.comma),t&&this.afterTrailingComma(e))break;var d=void 0;s&&this.type===u.comma?d=null:this.type===u.ellipsis?(d=this.parseSpread(a),a&&this.type===u.comma&&a.trailingComma<0&&(a.trailingComma=this.start)):d=this.parseMaybeAssign(!1,a),c.push(d)}return c},R.checkUnreserved=function(e){var t=e.start,s=e.end,a=e.name;if(this.inGenerator&&a==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&a==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&tt)&&a==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(a==="arguments"||a==="await")&&this.raise(t,"Cannot use "+a+" in class static initialization block"),this.keywords.test(a)&&this.raise(t,"Unexpected keyword '"+a+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,s).indexOf("\\")!==-1)){var c=this.strict?this.reservedWordsStrict:this.reservedWords;c.test(a)&&(!this.inAsync&&a==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+a+"' is reserved"))}},R.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t},R.parseIdentNode=function(){var e=this.startNode();return this.type===u.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=u.name):this.unexpected(),e},R.parsePrivateIdent=function(){var e=this.startNode();return this.type===u.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},R.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===u.semi||this.canInsertSemicolon()||this.type!==u.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(u.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},R.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var nt=j.prototype;nt.raise=function(e,t){var s=Ot(this.input,e);t+=" ("+s.line+":"+s.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var a=new SyntaxError(t);throw a.pos=e,a.loc=s,a.raisedAt=this.pos,a},nt.raiseRecoverable=nt.raise,nt.curPosition=function(){if(this.options.locations)return new ke(this.curLine,this.pos-this.lineStart)};var me=j.prototype,xo=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};me.enterScope=function(e){this.scopeStack.push(new xo(e))},me.exitScope=function(){this.scopeStack.pop()},me.treatFunctionsAsVarInScope=function(e){return e.flags&Ee||!this.inModule&&e.flags&ye},me.declareName=function(e,t,s){var a=!1;if(t===he){var c=this.currentScope();a=c.lexical.indexOf(e)>-1||c.functions.indexOf(e)>-1||c.var.indexOf(e)>-1,c.lexical.push(e),this.inModule&&c.flags&ye&&delete this.undefinedExports[e]}else if(t===Wi){var f=this.currentScope();f.lexical.push(e)}else if(t===Hi){var d=this.currentScope();this.treatFunctionsAsVar?a=d.lexical.indexOf(e)>-1:a=d.lexical.indexOf(e)>-1||d.var.indexOf(e)>-1,d.functions.push(e)}else for(var y=this.scopeStack.length-1;y>=0;--y){var w=this.scopeStack[y];if(w.lexical.indexOf(e)>-1&&!(w.flags&Bi&&w.lexical[0]===e)||!this.treatFunctionsAsVarInScope(w)&&w.functions.indexOf(e)>-1){a=!0;break}if(w.var.push(e),this.inModule&&w.flags&ye&&delete this.undefinedExports[e],w.flags&tt)break}a&&this.raiseRecoverable(s,"Identifier '"+e+"' has already been declared")},me.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},me.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},me.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(tt|je|be))return t}},me.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(tt|je|be)&&!(t.flags&Ft))return t}};var Be=function(t,s,a){this.type="",this.start=s,this.end=0,t.options.locations&&(this.loc=new qe(t,a)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[s,0])},Me=j.prototype;Me.startNode=function(){return new Be(this,this.start,this.startLoc)},Me.startNodeAt=function(e,t){return new Be(this,e,t)};function Yi(e,t,s,a){return e.type=t,e.end=s,this.options.locations&&(e.loc.end=a),this.options.ranges&&(e.range[1]=s),e}Me.finishNode=function(e,t){return Yi.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Me.finishNodeAt=function(e,t,s,a){return Yi.call(this,e,t,s,a)},Me.copyNode=function(e){var t=new Be(this,e.start,this.startLoc);for(var s in e)t[s]=e[s];return t};var go="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",Ji="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Qi=Ji+" Extended_Pictographic",Zi=Qi,er=Zi+" EBase EComp EMod EPres ExtPict",tr=er,vo=tr,yo={9:Ji,10:Qi,11:Zi,12:er,13:tr,14:vo},Eo="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",bo={9:"",10:"",11:"",12:"",13:"",14:Eo},ir="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",rr="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",sr=rr+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",nr=sr+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",ar=nr+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",or=ar+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",wo=or+" "+go,So={9:rr,10:sr,11:nr,12:ar,13:or,14:wo},ur={};function Co(e){var t=ur[e]={binary:de(yo[e]+" "+ir),binaryOfStrings:de(bo[e]),nonBinary:{General_Category:de(ir),Script:de(So[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Bt=0,cr=[9,10,11,12,13,14];Bt<cr.length;Bt+=1){var Io=cr[Bt];Co(Io)}var _=j.prototype,at=function(t,s){this.parent=t,this.base=s||this};at.prototype.separatedFrom=function(t){for(var s=this;s;s=s.parent)for(var a=t;a;a=a.parent)if(s.base===a.base&&s!==a)return!0;return!1},at.prototype.sibling=function(){return new at(this.parent,this.base)};var ae=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=ur[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};ae.prototype.reset=function(t,s,a){var c=a.indexOf("v")!==-1,f=a.indexOf("u")!==-1;this.start=t|0,this.source=s+"",this.flags=a,c&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=f&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=f&&this.parser.options.ecmaVersion>=9)},ae.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},ae.prototype.at=function(t,s){s===void 0&&(s=!1);var a=this.source,c=a.length;if(t>=c)return-1;var f=a.charCodeAt(t);if(!(s||this.switchU)||f<=55295||f>=57344||t+1>=c)return f;var d=a.charCodeAt(t+1);return d>=56320&&d<=57343?(f<<10)+d-56613888:f},ae.prototype.nextIndex=function(t,s){s===void 0&&(s=!1);var a=this.source,c=a.length;if(t>=c)return c;var f=a.charCodeAt(t),d;return!(s||this.switchU)||f<=55295||f>=57344||t+1>=c||(d=a.charCodeAt(t+1))<56320||d>57343?t+1:t+2},ae.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)},ae.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},ae.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)},ae.prototype.eat=function(t,s){return s===void 0&&(s=!1),this.current(s)===t?(this.advance(s),!0):!1},ae.prototype.eatChars=function(t,s){s===void 0&&(s=!1);for(var a=this.pos,c=0,f=t;c<f.length;c+=1){var d=f[c],y=this.at(a,s);if(y===-1||y!==d)return!1;a=this.nextIndex(a,s)}return this.pos=a,!0},_.validateRegExpFlags=function(e){for(var t=e.validFlags,s=e.flags,a=!1,c=!1,f=0;f<s.length;f++){var d=s.charAt(f);t.indexOf(d)===-1&&this.raise(e.start,"Invalid regular expression flag"),s.indexOf(d,f+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),d==="u"&&(a=!0),d==="v"&&(c=!0)}this.options.ecmaVersion>=15&&a&&c&&this.raise(e.start,"Invalid regular expression flag")};function ko(e){for(var t in e)return!0;return!1}_.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&ko(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},_.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,s=e.backReferenceNames;t<s.length;t+=1){var a=s[t];e.groupNames[a]||e.raise("Invalid named capture referenced")}},_.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new at(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},_.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},_.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1},_.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var s=!1;if(this.options.ecmaVersion>=9&&(s=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!s,!0}return e.pos=t,!1},_.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1},_.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},_.regexp_eatBracedQuantifier=function(e,t){var s=e.pos;if(e.eat(123)){var a=0,c=-1;if(this.regexp_eatDecimalDigits(e)&&(a=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(c=e.lastIntValue),e.eat(125)))return c!==-1&&c<a&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=s}return!1},_.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},_.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},_.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var s=this.regexp_eatModifiers(e),a=e.eat(45);if(s||a){for(var c=0;c<s.length;c++){var f=s.charAt(c);s.indexOf(f,c+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(a){var d=this.regexp_eatModifiers(e);!s&&!d&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var y=0;y<d.length;y++){var w=d.charAt(y);(d.indexOf(w,y+1)>-1||s.indexOf(w)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1},_.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},_.regexp_eatModifiers=function(e){for(var t="",s=0;(s=e.current())!==-1&&_o(s);)t+=ce(s),e.advance();return t};function _o(e){return e===105||e===109||e===115}_.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},_.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},_.regexp_eatSyntaxCharacter=function(e){var t=e.current();return hr(t)?(e.lastIntValue=t,e.advance(),!0):!1};function hr(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}_.regexp_eatPatternCharacters=function(e){for(var t=e.pos,s=0;(s=e.current())!==-1&&!hr(s);)e.advance();return e.pos!==t},_.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1},_.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,s=e.groupNames[e.lastStringValue];if(s)if(t)for(var a=0,c=s;a<c.length;a+=1){var f=c[a];f.separatedFrom(e.branchID)||e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");t?(s||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},_.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},_.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=ce(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=ce(e.lastIntValue);return!0}return!1},_.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,s=this.options.ecmaVersion>=11,a=e.current(s);return e.advance(s),a===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,s)&&(a=e.lastIntValue),Ao(a)?(e.lastIntValue=a,!0):(e.pos=t,!1)};function Ao(e){return b(e,!0)||e===36||e===95}_.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,s=this.options.ecmaVersion>=11,a=e.current(s);return e.advance(s),a===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,s)&&(a=e.lastIntValue),No(a)?(e.lastIntValue=a,!0):(e.pos=t,!1)};function No(e){return E(e,!0)||e===36||e===95||e===8204||e===8205}_.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},_.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var s=e.lastIntValue;if(e.switchU)return s>e.maxBackReference&&(e.maxBackReference=s),!0;if(s<=e.numCapturingParens)return!0;e.pos=t}return!1},_.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},_.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},_.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},_.regexp_eatZero=function(e){return e.current()===48&&!ot(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1},_.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1},_.regexp_eatControlLetter=function(e){var t=e.current();return lr(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function lr(e){return e>=65&&e<=90||e>=97&&e<=122}_.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var s=e.pos,a=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var c=e.lastIntValue;if(a&&c>=55296&&c<=56319){var f=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var d=e.lastIntValue;if(d>=56320&&d<=57343)return e.lastIntValue=(c-55296)*1024+(d-56320)+65536,!0}e.pos=f,e.lastIntValue=c}return!0}if(a&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&To(e.lastIntValue))return!0;a&&e.raise("Invalid unicode escape"),e.pos=s}return!1};function To(e){return e>=0&&e<=1114111}_.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1},_.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var fr=0,le=1,te=2;_.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Ro(t))return e.lastIntValue=-1,e.advance(),le;var s=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((s=t===80)||t===112)){e.lastIntValue=-1,e.advance();var a;if(e.eat(123)&&(a=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return s&&a===te&&e.raise("Invalid property name"),a;e.raise("Invalid property name")}return fr};function Ro(e){return e===100||e===68||e===115||e===83||e===119||e===87}_.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var s=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var a=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,s,a),le}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var c=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,c)}return fr},_.regexp_validateUnicodePropertyNameAndValue=function(e,t,s){Ie(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(s)||e.raise("Invalid property value")},_.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return le;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return te;e.raise("Invalid property name")},_.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";pr(t=e.current());)e.lastStringValue+=ce(t),e.advance();return e.lastStringValue!==""};function pr(e){return lr(e)||e===95}_.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Po(t=e.current());)e.lastStringValue+=ce(t),e.advance();return e.lastStringValue!==""};function Po(e){return pr(e)||ot(e)}_.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},_.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),s=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&s===te&&e.raise("Negated character class may contain strings"),!0}return!1},_.regexp_classContents=function(e){return e.current()===93?le:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),le)},_.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var s=e.lastIntValue;e.switchU&&(t===-1||s===-1)&&e.raise("Invalid character class"),t!==-1&&s!==-1&&t>s&&e.raise("Range out of order in character class")}}},_.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var s=e.current();(s===99||xr(s))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var a=e.current();return a!==93?(e.lastIntValue=a,e.advance(),!0):!1},_.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},_.regexp_classSetExpression=function(e){var t=le,s;if(!this.regexp_eatClassSetRange(e))if(s=this.regexp_eatClassSetOperand(e)){s===te&&(t=te);for(var a=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(s=this.regexp_eatClassSetOperand(e))){s!==te&&(t=le);continue}e.raise("Invalid character in character class")}if(a!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(a!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(s=this.regexp_eatClassSetOperand(e),!s)return t;s===te&&(t=te)}},_.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var s=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var a=e.lastIntValue;return s!==-1&&a!==-1&&s>a&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},_.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?le:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},_.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var s=e.eat(94),a=this.regexp_classContents(e);if(e.eat(93))return s&&a===te&&e.raise("Negated character class may contain strings"),a;e.pos=t}if(e.eat(92)){var c=this.regexp_eatCharacterClassEscape(e);if(c)return c;e.pos=t}return null},_.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var s=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return s}else e.raise("Invalid escape");e.pos=t}return null},_.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===te&&(t=te);return t},_.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?le:te},_.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var s=e.current();return s<0||s===e.lookahead()&&Lo(s)||Oo(s)?!1:(e.advance(),e.lastIntValue=s,!0)};function Lo(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Oo(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}_.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Vo(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Vo(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}_.regexp_eatClassControlLetter=function(e){var t=e.current();return ot(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1},_.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},_.regexp_eatDecimalDigits=function(e){var t=e.pos,s=0;for(e.lastIntValue=0;ot(s=e.current());)e.lastIntValue=10*e.lastIntValue+(s-48),e.advance();return e.pos!==t};function ot(e){return e>=48&&e<=57}_.regexp_eatHexDigits=function(e){var t=e.pos,s=0;for(e.lastIntValue=0;dr(s=e.current());)e.lastIntValue=16*e.lastIntValue+mr(s),e.advance();return e.pos!==t};function dr(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function mr(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}_.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var s=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+s*8+e.lastIntValue:e.lastIntValue=t*8+s}else e.lastIntValue=t;return!0}return!1},_.regexp_eatOctalDigit=function(e){var t=e.current();return xr(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function xr(e){return e>=48&&e<=55}_.regexp_eatFixedHexDigits=function(e,t){var s=e.pos;e.lastIntValue=0;for(var a=0;a<t;++a){var c=e.current();if(!dr(c))return e.pos=s,!1;e.lastIntValue=16*e.lastIntValue+mr(c),e.advance()}return!0};var ut=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new qe(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},O=j.prototype;O.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new ut(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},O.getToken=function(){return this.next(),new ut(this)},typeof Symbol<"u"&&(O[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===u.eof,value:t}}}}),O.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(u.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())},O.readToken=function(e){return b(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)},O.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var s=this.input.charCodeAt(e+1);return s<=56319||s>=57344?t:(t<<10)+s-56613888},O.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},O.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,s=this.input.indexOf("*/",this.pos+=2);if(s===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=s+2,this.options.locations)for(var a=void 0,c=t;(a=Fi(this.input,c,this.pos))>-1;)++this.curLine,c=this.lineStart=a;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,s),t,this.pos,e,this.curPosition())},O.skipLineComment=function(e){for(var t=this.pos,s=this.options.onComment&&this.curPosition(),a=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!ve(a);)a=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,s,this.curPosition())},O.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&Lt.test(String.fromCharCode(e)))++this.pos;else break e}}},O.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var s=this.type;this.type=e,this.value=t,this.updateContext(s)},O.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(u.ellipsis)):(++this.pos,this.finishToken(u.dot))},O.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(u.assign,2):this.finishOp(u.slash,1)},O.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),s=1,a=e===42?u.star:u.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++s,a=u.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(u.assign,s+1):this.finishOp(a,s)},O.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var s=this.input.charCodeAt(this.pos+2);if(s===61)return this.finishOp(u.assign,3)}return this.finishOp(e===124?u.logicalOR:u.logicalAND,2)}return t===61?this.finishOp(u.assign,2):this.finishOp(e===124?u.bitwiseOR:u.bitwiseAND,1)},O.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(u.assign,2):this.finishOp(u.bitwiseXOR,1)},O.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||K.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(u.incDec,2):t===61?this.finishOp(u.assign,2):this.finishOp(u.plusMin,1)},O.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),s=1;return t===e?(s=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+s)===61?this.finishOp(u.assign,s+1):this.finishOp(u.bitShift,s)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(s=2),this.finishOp(u.relational,s))},O.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(u.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(u.arrow)):this.finishOp(e===61?u.eq:u.prefix,1)},O.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var s=this.input.charCodeAt(this.pos+2);if(s<48||s>57)return this.finishOp(u.questionDot,2)}if(t===63){if(e>=12){var a=this.input.charCodeAt(this.pos+2);if(a===61)return this.finishOp(u.assign,3)}return this.finishOp(u.coalesce,2)}}return this.finishOp(u.question,1)},O.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),b(t,!0)||t===92))return this.finishToken(u.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+ce(t)+"'")},O.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(u.parenL);case 41:return++this.pos,this.finishToken(u.parenR);case 59:return++this.pos,this.finishToken(u.semi);case 44:return++this.pos,this.finishToken(u.comma);case 91:return++this.pos,this.finishToken(u.bracketL);case 93:return++this.pos,this.finishToken(u.bracketR);case 123:return++this.pos,this.finishToken(u.braceL);case 125:return++this.pos,this.finishToken(u.braceR);case 58:return++this.pos,this.finishToken(u.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(u.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(u.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+ce(e)+"'")},O.finishOp=function(e,t){var s=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,s)},O.readRegexp=function(){for(var e,t,s=this.pos;;){this.pos>=this.input.length&&this.raise(s,"Unterminated regular expression");var a=this.input.charAt(this.pos);if(K.test(a)&&this.raise(s,"Unterminated regular expression"),e)e=!1;else{if(a==="[")t=!0;else if(a==="]"&&t)t=!1;else if(a==="/"&&!t)break;e=a==="\\"}++this.pos}var c=this.input.slice(s,this.pos);++this.pos;var f=this.pos,d=this.readWord1();this.containsEsc&&this.unexpected(f);var y=this.regexpState||(this.regexpState=new ae(this));y.reset(s,c,d),this.validateRegExpFlags(y),this.validateRegExpPattern(y);var w=null;try{w=new RegExp(c,d)}catch{}return this.finishToken(u.regexp,{pattern:c,flags:d,value:w})},O.readInt=function(e,t,s){for(var a=this.options.ecmaVersion>=12&&t===void 0,c=s&&this.input.charCodeAt(this.pos)===48,f=this.pos,d=0,y=0,w=0,T=t??1/0;w<T;++w,++this.pos){var L=this.input.charCodeAt(this.pos),$=void 0;if(a&&L===95){c&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),y===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),w===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),y=L;continue}if(L>=97?$=L-97+10:L>=65?$=L-65+10:L>=48&&L<=57?$=L-48:$=1/0,$>=e)break;y=L,d=d*e+$}return a&&y===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===f||t!=null&&this.pos-f!==t?null:d};function Fo(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function gr(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}O.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var s=this.readInt(e);return s==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(s=gr(this.input.slice(t,this.pos)),++this.pos):b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(u.num,s)},O.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var s=this.pos-t>=2&&this.input.charCodeAt(t)===48;s&&this.strict&&this.raise(t,"Invalid number");var a=this.input.charCodeAt(this.pos);if(!s&&!e&&this.options.ecmaVersion>=11&&a===110){var c=gr(this.input.slice(t,this.pos));return++this.pos,b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(u.num,c)}s&&/[89]/.test(this.input.slice(t,this.pos))&&(s=!1),a===46&&!s&&(++this.pos,this.readInt(10),a=this.input.charCodeAt(this.pos)),(a===69||a===101)&&!s&&(a=this.input.charCodeAt(++this.pos),(a===43||a===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var f=Fo(this.input.slice(t,this.pos),s);return this.finishToken(u.num,f)},O.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var s=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(s,"Code point out of bounds")}else t=this.readHexChar(4);return t},O.readString=function(e){for(var t="",s=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var a=this.input.charCodeAt(this.pos);if(a===e)break;a===92?(t+=this.input.slice(s,this.pos),t+=this.readEscapedChar(!1),s=this.pos):a===8232||a===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(ve(a)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(s,this.pos++),this.finishToken(u.string,t)};var vr={};O.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===vr)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},O.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw vr;this.raise(e,t)},O.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var s=this.input.charCodeAt(this.pos);if(s===96||s===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===u.template||this.type===u.invalidTemplate)?s===36?(this.pos+=2,this.finishToken(u.dollarBraceL)):(++this.pos,this.finishToken(u.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(u.template,e));if(s===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(ve(s)){switch(e+=this.input.slice(t,this.pos),++this.pos,s){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
|
|
14
14
|
`;break;default:e+=String.fromCharCode(s);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},O.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(u.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
|
15
15
|
`&&++this.pos;case`
|
|
16
16
|
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")},O.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
|
17
|
-
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return ce(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var s=this.pos-1;this.invalidStringToken(s,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var a=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],c=parseInt(a,8);return c>255&&(a=a.slice(0,-1),c=parseInt(a,8)),this.pos+=a.length-1,t=this.input.charCodeAt(this.pos),(a!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-a.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(c)}return ve(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}},O.readHexChar=function(e){var t=this.pos,s=this.readInt(16,e);return s===null&&this.invalidStringToken(t,"Bad character escape sequence"),s},O.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,s=this.pos,a=this.options.ecmaVersion>=6;this.pos<this.input.length;){var c=this.fullCharCodeAtPos();if(E(c,a))this.pos+=c<=65535?1:2;else if(c===92){this.containsEsc=!0,e+=this.input.slice(s,this.pos);var f=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var d=this.readCodePoint();(t?b:E)(d,a)||this.invalidStringToken(f,"Invalid Unicode escape"),e+=ce(d),s=this.pos}else break;t=!1}return e+this.input.slice(s,this.pos)},O.readWord=function(){var e=this.readWord1(),t=u.name;return this.keywords.test(e)&&(t=Qe[e]),this.finishToken(t,e)};var vr="8.17.0";j.acorn={Parser:j,version:vr,defaultOptions:Ze,Position:ke,SourceLocation:qe,getLineInfo:Ot,Node:Ue,TokenType:N,tokTypes:u,keywordTypes:Qe,TokContext:ee,tokContexts:F,isIdentifierChar:E,isIdentifierStart:b,Token:ut,isNewLine:ve,lineBreak:K,lineBreakG:Oi,nonASCIIwhitespace:Lt};function Po(e,t){return j.parse(e,t)}function Lo(e,t,s){return j.parseExpressionAt(e,t,s)}function Oo(e,t){return j.tokenizer(e,t)}i.Node=Ue,i.Parser=j,i.Position=ke,i.SourceLocation=qe,i.TokContext=ee,i.Token=ut,i.TokenType=N,i.defaultOptions=Ze,i.getLineInfo=Ot,i.isIdentifierChar=E,i.isIdentifierStart=b,i.isNewLine=ve,i.keywordTypes=Qe,i.lineBreak=K,i.lineBreakG=Oi,i.nonASCIIwhitespace=Lt,i.parse=Po,i.parseExpressionAt=Lo,i.tokContexts=F,i.tokTypes=u,i.tokenizer=Oo,i.version=vr})});var Pa=C((Kp,Ra)=>{var{parse:of}=Aa();function $e(){let i=new Error("Configuration reads require a data-only object export. Remove executable statements from frontfriend.config.js.");return i.code="FRONTFRIEND_CONFIG_VALIDATION",i}function Ta(i){if(i.type!=="Property"||i.computed||i.method||i.kind!=="init")throw $e();let r=i.key.type==="Identifier"?i.key.name:i.key.value;if(typeof r!="string"||["__proto__","constructor","prototype"].includes(r))throw $e();return r}function Na(i){if(i.type==="ExportDefaultDeclaration")return i.declaration;let r=i.type==="ExpressionStatement"?i.expression:null;return r?.type==="AssignmentExpression"&&r.operator==="="&&r.left.type==="MemberExpression"&&!r.left.computed&&r.left.object.name==="module"&&r.left.property.name==="exports"?r.right:null}function uf(i,r){if(i.type!=="VariableDeclaration"||i.declarations.length!==1)return null;let[n]=i.declarations;return n.id.type!=="Identifier"||r?.type!=="Identifier"||r.name!==n.id.name?null:n.init}function cf(i){let n=of(i,{ecmaVersion:"latest",sourceType:"module"}).body.filter(l=>l.type!=="EmptyStatement"&&!l.directive),o=n.length===1?Na(n[0]):n.length===2?uf(n[0],Na(n[1])):null;if(o?.type!=="ObjectExpression")throw $e();function h(l,p=0){if(p>64)throw $e();if(l.type==="Literal"&&(l.value===null||["string","number","boolean"].includes(typeof l.value)))return l.value;if(l.type==="ArrayExpression")return l.elements.map(m=>{if(!m)throw $e();return h(m,p+1)});if(l.type==="ObjectExpression")return Object.fromEntries(l.properties.map(m=>[Ta(m),h(m.value,p+1)]));if(l.type==="UnaryExpression"&&["-","+"].includes(l.operator)&&l.argument.type==="Literal"&&typeof l.argument.value=="number")return l.operator==="-"?-l.argument.value:l.argument.value;if(l.type==="TemplateLiteral"&&l.expressions.length===0)return l.quasis[0].value.cooked;if(l.type==="MemberExpression"&&!l.computed&&l.object.type==="MemberExpression"&&!l.object.computed&&l.object.object.name==="process"&&l.object.property.name==="env")return process.env[l.property.name];if(l.type==="LogicalExpression"&&["||","??"].includes(l.operator)){let m=h(l.left,p+1);return l.operator==="||"?m||h(l.right,p+1):m??h(l.right,p+1)}throw $e()}return{config:h(o),expression:o}}Ra.exports={parseStaticConfig:cf,propertyName:Ta}});var Va=C((Yp,Oa)=>{var{DEFAULT_API_URL:hf}=St();function lf(){try{return Ci().readCredentials()?.ffApiUrl||null}catch{return null}}function La(i=process.cwd()){try{let{findFileUpward:r}=ka(),{parseStaticConfig:n}=Pa(),{readFileSafe:o}=At(),h=r("frontfriend.config.js",i);return h?n(o(h)).config:null}catch{return null}}function ff({flag:i,config:r,startDir:n,env:o=process.env,loginUrl:h=lf}={}){r===void 0&&!i&&(r=La(n));let l=i||r?.["api-url"]||r?.apiUrl||o.FF_API_URL||(typeof h=="function"?h():h)||hf;return String(l).replace(/\/+$/,"")}Oa.exports={resolveApiUrl:ff,nearestConfig:La}});var qa=C((Jp,Da)=>{var{toRuntimeComponentConfig:pf}=da(),Fa='FrontFriend components configuration not found. Run "npx frontfriend init" or "npx frontfriend sync".',df="FrontFriend components configuration was not returned by the SaaS app. The cache was not updated.";function ki(i){return i!==null&&typeof i=="object"&&!Array.isArray(i)}function $a(i,r=Fa){if(!ki(i)||Object.keys(i).length===0)throw new Error(r);for(let[n,o]of Object.entries(i))pf(o,n);return i}var Rt=class extends Error{constructor(r){super(r),this.name="Frontfriend",this.code="FF_SETUP_REQUIRED",this.stack=`${this.name}: ${r}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.stack}};function mf(){try{let i=Ci().signedInAccount();return!!(i&&!i.expired)}catch{return!1}}function xf(i=process.cwd()){let{cliCommand:r,loginCommand:n}=_t(),o=`\`${r("init",i)}\``,h="The design system is not installed in this project yet.";if(mf())return`${h} Run ${o}, then start the app again.`;let l;try{l=Va().resolveApiUrl({startDir:i})}catch{l=void 0}return`${h} Sign in with \`${n(l,i)}\`, run ${o}, then start the app again.`}function _i(i){return new Rt(xf(i))}function gf(i){let r=i.appRoot||process.cwd();if(!i.exists())throw _i(r);let n=i.load(),o=n?.componentsConfig;if(!ki(o)||Object.keys(o).length===0)throw _i(r);return{componentsConfig:$a(o),icons:ki(n.icons)?n.icons:{}}}Da.exports={CACHE_ERROR_MESSAGE:Fa,SAAS_ERROR_MESSAGE:df,assertComponentsConfig:$a,loadCachedComponents:gf,SetupRequiredError:Rt,setupRequiredError:_i}});var Wa=C((Qp,Ha)=>{var{createHash:vf,createPublicKey:yf,sign:Ef,verify:bf}=require("node:crypto"),{assertComponentsConfig:wf}=qa(),ja=16*1024*1024;function Ye(i){let r=new URL(i).origin;return r==="https://app.v4.frontfriend.dev"?"https://app.frontfriend.dev":r}function Ai(i){return vf("sha256").update(i).digest("hex")}function Se(i){if(typeof i!="string"||!/^[a-zA-Z0-9_-][a-zA-Z0-9_.-]{0,199}$/.test(i))throw new Error("Invalid token artifact identity.");return i}function Je(i){return`sdk/1/${Se(i)}`}function Sf(i,r){return`${Je(i)}/releases/${Se(r)}.json`}function Cf(i,r){return`${Je(i)}/tags/${Se(r)}.json`}function Ba(i,r){if(!i||typeof i!="object"||Array.isArray(i))throw new Error("Invalid token payload.");if(r==="shadcn"){if(i.base!=="shadcn"||!i.nativeTokens||typeof i.nativeCss!="string"||!i.nativeCss.trim())throw new Error("The selected Release has no native shadcn token artifact.")}else if(r==="frontfriend"){wf(i.componentsConfig);for(let n of["tokens","variables","semanticVariables","semanticDarkVariables"])if(!i[n]||typeof i[n]!="object"||Array.isArray(i[n]))throw new Error(`Missing token field: ${n}.`)}else throw new Error("Unsupported token base library.")}function Ua(i,r={}){if(!i||i.schemaVersion!==1||i.runtime!=="sdk"||i.colorFormat!=="oklch"||!["frontfriend","shadcn"].includes(i.baseLibrary)||!/^[a-f0-9]{64}$/.test(i.digest)||!Number.isSafeInteger(i.bytes)||i.bytes<=0||i.bytes>ja||!Number.isFinite(Date.parse(i.publishedAt))||typeof i.processorVersion!="string")throw new Error("Invalid token manifest.");if(Se(i.ffId),Se(i.releaseId),Se(i.tokenVersionId),new URL(i.apiOrigin).origin!==i.apiOrigin)throw new Error("Invalid token API origin.");if(i.artifactKey!==`${Je(i.ffId)}/artifacts/${i.digest}.json`)throw new Error("Invalid token artifact path.");for(let n of["apiOrigin","ffId","releaseId","tokenVersionId","baseLibrary"]){let o=n==="apiOrigin"&&r[n]?Ye(r[n]):r[n];if(o&&i[n]!==o)throw new Error(`Token manifest does not match ${n}.`)}return i}function Ma(i,r,n){if(Ua(i,n),r.length!==i.bytes||Ai(r)!==i.digest)throw new Error("Token artifact digest or size mismatch.");let o=JSON.parse(r.toString("utf8"));if(Ba(o,i.baseLibrary),o.metadata?.ffId!==i.ffId)throw new Error("Token payload belongs to another Design System.");return o}function If(i,r){Ba(r,i.baseLibrary);let n=Buffer.from(JSON.stringify(r)),o=Ai(n),h={schemaVersion:1,runtime:"sdk",colorFormat:"oklch",apiOrigin:Ye(i.apiOrigin),ffId:i.ffId,releaseId:i.releaseId,tokenVersionId:i.tokenVersionId,baseLibrary:i.baseLibrary,processorVersion:i.processorVersion,publishedAt:i.publishedAt,digest:o,bytes:n.length,artifactKey:`${Je(i.ffId)}/artifacts/${o}.json`};return Ma(h,n),{manifest:h,bytes:n}}var Ga={"https://app.frontfriend.dev":"MCowBQYDK2VwAyEAQNi4QA/eGZeq4jNgL4HfvlzuF6pTTOjsJYWYOmT9RMc=","https://app.dev.frontfriend.dev":"MCowBQYDK2VwAyEAEFTW/bfHgmUqTT1D12GkWv5uvDvo/Xl4+rbFrUTWy90="};function kf(i,r){let n=Buffer.from(JSON.stringify({schemaVersion:1,capability:"tokens.offline",...i,apiOrigin:Ye(i.apiOrigin)}));return{payload:n.toString("base64"),signature:Ef(null,n,r).toString("base64")}}function _f(i,r,n){if(r[i])return r[i];let{hostname:o}=new URL(i);return["localhost","127.0.0.1","[::1]"].includes(o)?n.FF_OFFLINE_LICENSE_LOCAL_KEY:void 0}function Af(i,r,n=Ga,o=process.env){let h=Ye(r.apiOrigin),l=_f(h,n,o);if(!l)throw new Error("This Frontfriend platform issues no offline licenses.");if(typeof i?.payload!="string"||typeof i?.signature!="string")throw new Error("Malformed offline license.");let p=Buffer.from(i.payload,"base64"),m=yf({key:Buffer.from(l,"base64"),format:"der",type:"spki"});if(!bf(null,p,m,Buffer.from(i.signature,"base64")))throw new Error("The offline license signature is invalid.");let g=JSON.parse(p.toString("utf8"));if(g.schemaVersion!==1||g.capability!=="tokens.offline"||g.ffId!==r.ffId||g.apiOrigin!==h)throw new Error("The offline license belongs to another Design System or platform.");return g}Ha.exports={OFFLINE_LICENSE_KEYS:Ga,signOfflineLicense:kf,verifyOfflineLicense:Af,tokenApiOrigin:Ye,MAX_ARTIFACT_BYTES:ja,digest:Ai,segment:Se,prefix:Je,releaseKey:Sf,tagKey:Cf,assertManifest:Ua,validateArtifact:Ma,makeArtifact:If}});var Ce=require("node:fs"),De=require("node:path"),Nf=require("node:http"),Tf=require("node:https"),{randomUUID:Rf}=require("node:crypto"),{loginCommand:Xa}=_t(),{MAX_ARTIFACT_BYTES:Ka,tokenApiOrigin:Ya,digest:Ni,releaseKey:Ti,tagKey:Pf,assertManifest:Pt,validateArtifact:Lf,OFFLINE_LICENSE_KEYS:Of,verifyOfflineLicense:za}=Wa();function Vf(i,r={},n=process.env){let o=r["token-cdn-url"]??n.FF_TOKEN_CDN_URL;if(o===!1||o==="disabled")return null;if(o)return String(o).replace(/\/+$/,"");let h=Ya(i);return h==="https://app.frontfriend.dev"?"https://tokens.frontfriend.dev":h==="https://app.dev.frontfriend.dev"?"https://tokens.dev.frontfriend.dev":null}function Pi(i){let r=new URL(i);if(r.username||r.password||r.hash||r.protocol!=="https:"&&!(r.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(r.hostname)))throw new Error("Token delivery requires HTTPS (HTTP is allowed only on localhost).");return r}function Ja(i,{timeoutMs:r=5e3,maxBytes:n=Ka,authToken:o}={}){let h=Pi(i);return new Promise((l,p)=>{let m=(h.protocol==="https:"?Tf:Nf).get(h,{headers:{accept:"application/json",...o?{authorization:`Bearer ${o}`}:{}}},x=>{if(x.statusCode!==200){x.resume();let b=Object.assign(new Error(x.statusCode===401?`Sign in with \`${Xa(h.origin)}\`, then run init again.`:x.statusCode===403?"You don't have access to this design system yet. Ask a workspace admin to invite you, accept the invitation from your email, then run init again.":`Token delivery returned HTTP ${x.statusCode}.`),{statusCode:x.statusCode,url:h.toString()});p(b),m.destroy();return}let S=0,v=[];x.on("data",b=>{S+=b.length,S>n?(p(new Error("Token response exceeds the size limit.")),m.destroy()):v.push(b)}),x.on("end",()=>l(Buffer.concat(v))),x.on("error",p),x.on("aborted",()=>p(Object.assign(new Error("Token response was interrupted."),{code:"ECONNRESET"})))}),g=setTimeout(()=>m.destroy(Object.assign(new Error("Token delivery timed out."),{code:"ETIMEDOUT"})),r);m.on("error",p),m.on("close",()=>clearTimeout(g))})}function Qa(i){return Object.assign(new Error(`Sign in with \`${Xa(i)}\`, then run init again. Tokens are delivered only to accounts with access to this Design System.`),{statusCode:401})}function Ff(i){return Object.assign(new Error(`${i} Offline tokens are not enabled for this Workspace: ask your Frontfriend contact to enable them, then run init online once.`),{code:"FF_OFFLINE_TOKENS_UNAVAILABLE"})}function Za(i,r){return r==="cdn"&&i.statusCode===404?!0:i.statusCode?i.statusCode===408||i.statusCode>=500:["ECONNREFUSED","ECONNRESET","ETIMEDOUT","ENOTFOUND","EAI_AGAIN","EHOSTUNREACH","ENETUNREACH","EPIPE"].includes(i.code)}function Ri(i,r){Ce.mkdirSync(De.dirname(i),{recursive:!0});let n=`${i}.${Rf()}.tmp`;try{Ce.writeFileSync(n,JSON.stringify(r),{flag:"wx"}),Ce.renameSync(n,i)}finally{Ce.rmSync(n,{force:!0})}}var Li=class{constructor({ffId:r,apiUrl:n,cdnUrl:o,appRoot:h=process.cwd(),authToken:l,licenseKeys:p=Of,read:m=Ja,studioTimeoutMs:g=3e3,cdnTimeoutMs:x=5e3}){this.ffId=r,this.apiUrl=Pi(n).origin,this.apiOrigin=Ya(this.apiUrl),this.cdnUrl=Pi(o).toString().replace(/\/+$/,""),this.appRoot=h,this.authToken=l,this.licenseKeys=p,this.root=De.join(h,".frontfriend","artifacts",Ni(`${this.apiOrigin}/${r}`)),this.licenseFile=De.join(this.root,"offline-license.json"),this.read=m,this.studioTimeoutMs=g,this.cdnTimeoutMs=x}offlineLicense(){try{return za(JSON.parse(Ce.readFileSync(this.licenseFile,"utf8")),{ffId:this.ffId,apiOrigin:this.apiOrigin},this.licenseKeys)}catch{return null}}acceptLicense(r){try{za(r,{ffId:this.ffId,apiOrigin:this.apiOrigin},this.licenseKeys)}catch{Ce.rmSync(this.licenseFile,{force:!0});return}Ri(this.licenseFile,r)}async fetch(r={}){if(r.offline){if(!this.offlineLicense())throw Ff("Offline token restore needs an offline license.")}else if(!this.authToken)throw Qa(this.apiUrl);if(!r.release&&!r.tag)throw new Error("Choose a Release or tag for token delivery.");let n={ffId:this.ffId,apiOrigin:this.apiOrigin,releaseId:r.release,tokenVersionId:r.version,baseLibrary:r.baseLibrary},o=r.release?Ti(this.ffId,r.release):Pf(this.ffId,r.tag),h=De.join(this.root,`${Ni(o)}.json`),l=[],p,m=g=>{let x=Pt(g.manifest,n);if(p&&x.digest!==p.digest)throw new Error("Local tokens do not match the selected artifact.");let S=Buffer.from(g.payload,"base64");return{manifest:x,payload:Lf(x,S,n)}};if(!r.offline){let g=this.offlineLicense()?["studio","cdn"]:["studio"];for(let x of g)try{let S;if(x==="studio"){let b=new URL(`/api/design-systems/${encodeURIComponent(this.ffId)}/token-artifact`,this.apiUrl);b.searchParams.set(r.release?"release":"tag",r.release||r.tag),S=JSON.parse((await this.read(b.toString(),{timeoutMs:this.studioTimeoutMs,maxBytes:Ka*2,authToken:this.authToken})).toString("utf8")),p=Pt(S.manifest,n),n.releaseId=p.releaseId}else{let b=Date.now(),E=JSON.parse((await this.read(`${this.cdnUrl}/${o}`,{timeoutMs:this.cdnTimeoutMs,maxBytes:65536})).toString("utf8"));if(E.unavailable)throw Object.assign(new Error("The selected token release or tag is unavailable."),{statusCode:410});if(Pt(E,n),p=E,n.releaseId=E.releaseId,!r.release){let G=this.cdnTimeoutMs-(Date.now()-b);if(G<=0)throw Object.assign(new Error("Token delivery timed out."),{code:"ETIMEDOUT"});if(E=JSON.parse((await this.read(`${this.cdnUrl}/${Ti(this.ffId,E.releaseId)}`,{timeoutMs:G,maxBytes:65536})).toString("utf8")),E.unavailable)throw Object.assign(new Error("The selected token release is unavailable."),{statusCode:410});Pt(E,n)}let N=this.cdnTimeoutMs-(Date.now()-b);if(N<=0)throw Object.assign(new Error("Token delivery timed out."),{code:"ETIMEDOUT"});let q=await this.read(`${this.cdnUrl}/${E.artifactKey}`,{timeoutMs:N});S={manifest:E,payload:q.toString("base64")}}let v=m(S);return x==="studio"&&this.acceptLicense(S.offlineLicense),Ri(h,S),r.release||Ri(De.join(De.dirname(h),`${Ni(Ti(this.ffId,v.manifest.releaseId))}.json`),S),this.result(v,x,l)}catch(S){if(!Za(S,x))throw S;l.push(`${x}: ${S.message}`)}}try{return this.result(m(JSON.parse(Ce.readFileSync(h,"utf8"))),"local",l)}catch(g){throw new Error(`Selected token artifact unavailable. ${[...l,`local: ${g.message}`].join(" ")}`)}}result({manifest:r,payload:n},o,h){return{...n,versionMetadata:{...n.versionMetadata,versionId:r.tokenVersionId,releaseId:r.releaseId},tokenDelivery:{source:o,manifest:r,warnings:h,remoteWorkPending:!0}}}};module.exports={TokenArtifactClient:Li,cdnUrlFor:Vf,readPublicBytes:Ja,canFallback:Za,signInError:Qa};
|
|
17
|
+
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return ce(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var s=this.pos-1;this.invalidStringToken(s,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var a=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],c=parseInt(a,8);return c>255&&(a=a.slice(0,-1),c=parseInt(a,8)),this.pos+=a.length-1,t=this.input.charCodeAt(this.pos),(a!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-a.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(c)}return ve(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}},O.readHexChar=function(e){var t=this.pos,s=this.readInt(16,e);return s===null&&this.invalidStringToken(t,"Bad character escape sequence"),s},O.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,s=this.pos,a=this.options.ecmaVersion>=6;this.pos<this.input.length;){var c=this.fullCharCodeAtPos();if(E(c,a))this.pos+=c<=65535?1:2;else if(c===92){this.containsEsc=!0,e+=this.input.slice(s,this.pos);var f=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var d=this.readCodePoint();(t?b:E)(d,a)||this.invalidStringToken(f,"Invalid Unicode escape"),e+=ce(d),s=this.pos}else break;t=!1}return e+this.input.slice(s,this.pos)},O.readWord=function(){var e=this.readWord1(),t=u.name;return this.keywords.test(e)&&(t=Qe[e]),this.finishToken(t,e)};var yr="8.17.0";j.acorn={Parser:j,version:yr,defaultOptions:Ze,Position:ke,SourceLocation:qe,getLineInfo:Ot,Node:Be,TokenType:N,tokTypes:u,keywordTypes:Qe,TokContext:ee,tokContexts:F,isIdentifierChar:E,isIdentifierStart:b,Token:ut,isNewLine:ve,lineBreak:K,lineBreakG:Vi,nonASCIIwhitespace:Lt};function $o(e,t){return j.parse(e,t)}function Do(e,t,s){return j.parseExpressionAt(e,t,s)}function qo(e,t){return j.tokenizer(e,t)}i.Node=Be,i.Parser=j,i.Position=ke,i.SourceLocation=qe,i.TokContext=ee,i.Token=ut,i.TokenType=N,i.defaultOptions=Ze,i.getLineInfo=Ot,i.isIdentifierChar=E,i.isIdentifierStart=b,i.isNewLine=ve,i.keywordTypes=Qe,i.lineBreak=K,i.lineBreakG=Vi,i.nonASCIIwhitespace=Lt,i.parse=$o,i.parseExpressionAt=Do,i.tokContexts=F,i.tokTypes=u,i.tokenizer=qo,i.version=yr})});var $a=C((id,Fa)=>{var{parse:pf}=La();function $e(){let i=new Error("Configuration reads require a data-only object export. Remove executable statements from frontfriend.config.js.");return i.code="FRONTFRIEND_CONFIG_VALIDATION",i}function Va(i){if(i.type!=="Property"||i.computed||i.method||i.kind!=="init")throw $e();let r=i.key.type==="Identifier"?i.key.name:i.key.value;if(typeof r!="string"||["__proto__","constructor","prototype"].includes(r))throw $e();return r}function Oa(i){if(i.type==="ExportDefaultDeclaration")return i.declaration;let r=i.type==="ExpressionStatement"?i.expression:null;return r?.type==="AssignmentExpression"&&r.operator==="="&&r.left.type==="MemberExpression"&&!r.left.computed&&r.left.object.name==="module"&&r.left.property.name==="exports"?r.right:null}function df(i,r){if(i.type!=="VariableDeclaration"||i.declarations.length!==1)return null;let[n]=i.declarations;return n.id.type!=="Identifier"||r?.type!=="Identifier"||r.name!==n.id.name?null:n.init}function mf(i){let n=pf(i,{ecmaVersion:"latest",sourceType:"module"}).body.filter(l=>l.type!=="EmptyStatement"&&!l.directive),o=n.length===1?Oa(n[0]):n.length===2?df(n[0],Oa(n[1])):null;if(o?.type!=="ObjectExpression")throw $e();function h(l,p=0){if(p>64)throw $e();if(l.type==="Literal"&&(l.value===null||["string","number","boolean"].includes(typeof l.value)))return l.value;if(l.type==="ArrayExpression")return l.elements.map(m=>{if(!m)throw $e();return h(m,p+1)});if(l.type==="ObjectExpression")return Object.fromEntries(l.properties.map(m=>[Va(m),h(m.value,p+1)]));if(l.type==="UnaryExpression"&&["-","+"].includes(l.operator)&&l.argument.type==="Literal"&&typeof l.argument.value=="number")return l.operator==="-"?-l.argument.value:l.argument.value;if(l.type==="TemplateLiteral"&&l.expressions.length===0)return l.quasis[0].value.cooked;if(l.type==="MemberExpression"&&!l.computed&&l.object.type==="MemberExpression"&&!l.object.computed&&l.object.object.name==="process"&&l.object.property.name==="env")return process.env[l.property.name];if(l.type==="LogicalExpression"&&["||","??"].includes(l.operator)){let m=h(l.left,p+1);return l.operator==="||"?m||h(l.right,p+1):m??h(l.right,p+1)}throw $e()}return{config:h(o),expression:o}}Fa.exports={parseStaticConfig:mf,propertyName:Va}});var ja=C((rd,qa)=>{var{DEFAULT_API_URL:xf}=St();function gf(){try{return Ii().readCredentials()?.ffApiUrl||null}catch{return null}}function Da(i=process.cwd()){try{let{findFileUpward:r}=Ra(),{parseStaticConfig:n}=$a(),{readFileSafe:o}=At(),h=r("frontfriend.config.js",i);return h?n(o(h)).config:null}catch{return null}}function vf({flag:i,config:r,startDir:n,env:o=process.env,loginUrl:h=gf}={}){r===void 0&&!i&&(r=Da(n));let l=i||r?.["api-url"]||r?.apiUrl||o.FF_API_URL||(typeof h=="function"?h():h)||xf;return String(l).replace(/\/+$/,"")}qa.exports={resolveApiUrl:vf,nearestConfig:Da}});var Ga=C((sd,Ma)=>{var{toRuntimeComponentConfig:yf}=da(),Ua='FrontFriend components configuration not found. Run "npx frontfriend init" or "npx frontfriend sync".',Ef="FrontFriend components configuration was not returned by the SaaS app. The cache was not updated.";function _i(i){return i!==null&&typeof i=="object"&&!Array.isArray(i)}function Ba(i,r=Ua){if(!_i(i)||Object.keys(i).length===0)throw new Error(r);for(let[n,o]of Object.entries(i))yf(o,n);return i}var Rt=class extends Error{constructor(r){super(r),this.name="Frontfriend",this.code="FF_SETUP_REQUIRED",this.stack=`${this.name}: ${r}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.stack}};function bf(){try{let i=Ii().signedInAccount();return!!(i&&!i.expired)}catch{return!1}}function wf(i=process.cwd()){let{cliCommand:r,loginCommand:n}=_t(),o=`\`${r("init",i)}\``,h="The design system is not installed in this project yet.";if(bf())return`${h} Run ${o}, then start the app again.`;let l;try{l=ja().resolveApiUrl({startDir:i})}catch{l=void 0}return`${h} Sign in with \`${n(l,i)}\`, run ${o}, then start the app again.`}function Ai(i){return new Rt(wf(i))}function Sf(i){let r=i.appRoot||process.cwd();if(!i.exists())throw Ai(r);let n=i.load(),o=n?.componentsConfig;if(!_i(o)||Object.keys(o).length===0)throw Ai(r);return{componentsConfig:Ba(o),icons:_i(n.icons)?n.icons:{}}}Ma.exports={CACHE_ERROR_MESSAGE:Ua,SAAS_ERROR_MESSAGE:Ef,assertComponentsConfig:Ba,loadCachedComponents:Sf,SetupRequiredError:Rt,setupRequiredError:Ai}});var Ja=C((nd,Ya)=>{var{createHash:Cf,createPublicKey:If,sign:kf,verify:_f}=require("node:crypto"),{assertComponentsConfig:Af}=Ga(),Ha=16*1024*1024;function Ye(i){let r=new URL(i).origin;return r==="https://app.v4.frontfriend.dev"?"https://app.frontfriend.dev":r}function Ni(i){return Cf("sha256").update(i).digest("hex")}function Se(i){if(typeof i!="string"||!/^[a-zA-Z0-9_-][a-zA-Z0-9_.-]{0,199}$/.test(i))throw new Error("Invalid token artifact identity.");return i}function Je(i){return`sdk/1/${Se(i)}`}function Nf(i,r){return`${Je(i)}/releases/${Se(r)}.json`}function Tf(i,r){return`${Je(i)}/tags/${Se(r)}.json`}function Wa(i,r){if(!i||typeof i!="object"||Array.isArray(i))throw new Error("Invalid token payload.");if(r==="shadcn"){if(i.base!=="shadcn"||!i.nativeTokens||typeof i.nativeCss!="string"||!i.nativeCss.trim())throw new Error("The selected Release has no native shadcn token artifact.")}else if(r==="frontfriend"){Af(i.componentsConfig);for(let n of["tokens","variables","semanticVariables","semanticDarkVariables"])if(!i[n]||typeof i[n]!="object"||Array.isArray(i[n]))throw new Error(`Missing token field: ${n}.`)}else throw new Error("Unsupported token base library.")}function za(i,r={}){if(!i||i.schemaVersion!==1||i.runtime!=="sdk"||i.colorFormat!=="oklch"||!["frontfriend","shadcn"].includes(i.baseLibrary)||!/^[a-f0-9]{64}$/.test(i.digest)||!Number.isSafeInteger(i.bytes)||i.bytes<=0||i.bytes>Ha||!Number.isFinite(Date.parse(i.publishedAt))||typeof i.processorVersion!="string")throw new Error("Invalid token manifest.");if(Se(i.ffId),Se(i.releaseId),Se(i.tokenVersionId),new URL(i.apiOrigin).origin!==i.apiOrigin)throw new Error("Invalid token API origin.");if(i.artifactKey!==`${Je(i.ffId)}/artifacts/${i.digest}.json`)throw new Error("Invalid token artifact path.");for(let n of["apiOrigin","ffId","releaseId","tokenVersionId","baseLibrary"]){let o=n==="apiOrigin"&&r[n]?Ye(r[n]):r[n];if(o&&i[n]!==o)throw new Error(`Token manifest does not match ${n}.`)}return i}function Xa(i,r,n){if(za(i,n),r.length!==i.bytes||Ni(r)!==i.digest)throw new Error("Token artifact digest or size mismatch.");let o=JSON.parse(r.toString("utf8"));if(Wa(o,i.baseLibrary),o.metadata?.ffId!==i.ffId)throw new Error("Token payload belongs to another Design System.");return o}function Rf(i,r){Wa(r,i.baseLibrary);let n=Buffer.from(JSON.stringify(r)),o=Ni(n),h={schemaVersion:1,runtime:"sdk",colorFormat:"oklch",apiOrigin:Ye(i.apiOrigin),ffId:i.ffId,releaseId:i.releaseId,tokenVersionId:i.tokenVersionId,baseLibrary:i.baseLibrary,processorVersion:i.processorVersion,publishedAt:i.publishedAt,digest:o,bytes:n.length,artifactKey:`${Je(i.ffId)}/artifacts/${o}.json`};return Xa(h,n),{manifest:h,bytes:n}}var Ka={"https://app.frontfriend.dev":"MCowBQYDK2VwAyEAQNi4QA/eGZeq4jNgL4HfvlzuF6pTTOjsJYWYOmT9RMc=","https://app.dev.frontfriend.dev":"MCowBQYDK2VwAyEAEFTW/bfHgmUqTT1D12GkWv5uvDvo/Xl4+rbFrUTWy90="};function Pf(i,r){let n=Buffer.from(JSON.stringify({schemaVersion:1,capability:"tokens.offline",...i,apiOrigin:Ye(i.apiOrigin)}));return{payload:n.toString("base64"),signature:kf(null,n,r).toString("base64")}}function Lf(i,r,n){if(r[i])return r[i];let{hostname:o}=new URL(i);return["localhost","127.0.0.1","[::1]"].includes(o)?n.FF_OFFLINE_LICENSE_LOCAL_KEY:void 0}function Of(i,r,n=Ka,o=process.env){let h=Ye(r.apiOrigin),l=Lf(h,n,o);if(!l)throw new Error("This Frontfriend platform issues no offline licenses.");if(typeof i?.payload!="string"||typeof i?.signature!="string")throw new Error("Malformed offline license.");let p=Buffer.from(i.payload,"base64"),m=If({key:Buffer.from(l,"base64"),format:"der",type:"spki"});if(!_f(null,p,m,Buffer.from(i.signature,"base64")))throw new Error("The offline license signature is invalid.");let g=JSON.parse(p.toString("utf8"));if(g.schemaVersion!==1||g.capability!=="tokens.offline"||g.ffId!==r.ffId||g.apiOrigin!==h)throw new Error("The offline license belongs to another Design System or platform.");return g}Ya.exports={OFFLINE_LICENSE_KEYS:Ka,signOfflineLicense:Pf,verifyOfflineLicense:Of,tokenApiOrigin:Ye,MAX_ARTIFACT_BYTES:Ha,digest:Ni,segment:Se,prefix:Je,releaseKey:Nf,tagKey:Tf,assertManifest:za,validateArtifact:Xa,makeArtifact:Rf}});var Ce=require("node:fs"),De=require("node:path"),Vf=require("node:http"),Ff=require("node:https"),{randomUUID:$f}=require("node:crypto"),{loginCommand:Za}=_t(),{MAX_ARTIFACT_BYTES:eo,tokenApiOrigin:to,digest:Ti,releaseKey:Ri,tagKey:Df,assertManifest:Pt,validateArtifact:qf,OFFLINE_LICENSE_KEYS:jf,verifyOfflineLicense:Qa}=Ja();function Uf(i,r={},n=process.env){let o=r["token-cdn-url"]??n.FF_TOKEN_CDN_URL;if(o===!1||o==="disabled")return null;if(o)return String(o).replace(/\/+$/,"");let h=to(i);return h==="https://app.frontfriend.dev"?"https://tokens.frontfriend.dev":h==="https://app.dev.frontfriend.dev"?"https://tokens.dev.frontfriend.dev":null}function Li(i){let r=new URL(i);if(r.username||r.password||r.hash||r.protocol!=="https:"&&!(r.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(r.hostname)))throw new Error("Token delivery requires HTTPS (HTTP is allowed only on localhost).");return r}function io(i,{timeoutMs:r=5e3,maxBytes:n=eo,authToken:o}={}){let h=Li(i);return new Promise((l,p)=>{let m=(h.protocol==="https:"?Ff:Vf).get(h,{headers:{accept:"application/json",...o?{authorization:`Bearer ${o}`}:{}}},x=>{if(x.statusCode!==200){x.resume();let b=Object.assign(new Error(x.statusCode===401?`Sign in with \`${Za(h.origin)}\`, then run init again. For Docker/CI, ask a workspace owner/admin for an API key with components:read and set FF_AUTH_TOKEN. --no-register does not authenticate.`:x.statusCode===403?"You don't have access to this design system yet. Ask a workspace admin to invite you, accept the invitation from your email, then run init again.":`Token delivery returned HTTP ${x.statusCode}.`),{statusCode:x.statusCode,url:h.toString()});p(b),m.destroy();return}let S=0,v=[];x.on("data",b=>{S+=b.length,S>n?(p(new Error("Token response exceeds the size limit.")),m.destroy()):v.push(b)}),x.on("end",()=>l(Buffer.concat(v))),x.on("error",p),x.on("aborted",()=>p(Object.assign(new Error("Token response was interrupted."),{code:"ECONNRESET"})))}),g=setTimeout(()=>m.destroy(Object.assign(new Error("Token delivery timed out."),{code:"ETIMEDOUT"})),r);m.on("error",p),m.on("close",()=>clearTimeout(g))})}function ro(i){return Object.assign(new Error(`Sign in with \`${Za(i)}\`, then run init again. Tokens are delivered only to accounts with access to this Design System.`),{statusCode:401})}function Bf(i){return Object.assign(new Error(`${i} Offline tokens are not enabled for this Workspace: ask your Frontfriend contact to enable them, then run init online once.`),{code:"FF_OFFLINE_TOKENS_UNAVAILABLE"})}function so(i,r){return r==="cdn"&&i.statusCode===404?!0:i.statusCode?i.statusCode===408||i.statusCode>=500:["ECONNREFUSED","ECONNRESET","ETIMEDOUT","ENOTFOUND","EAI_AGAIN","EHOSTUNREACH","ENETUNREACH","EPIPE"].includes(i.code)}function Pi(i,r){Ce.mkdirSync(De.dirname(i),{recursive:!0});let n=`${i}.${$f()}.tmp`;try{Ce.writeFileSync(n,JSON.stringify(r),{flag:"wx"}),Ce.renameSync(n,i)}finally{Ce.rmSync(n,{force:!0})}}var Oi=class{constructor({ffId:r,apiUrl:n,cdnUrl:o,appRoot:h=process.cwd(),authToken:l,licenseKeys:p=jf,read:m=io,studioTimeoutMs:g=3e3,cdnTimeoutMs:x=5e3}){this.ffId=r,this.apiUrl=Li(n).origin,this.apiOrigin=to(this.apiUrl),this.cdnUrl=Li(o).toString().replace(/\/+$/,""),this.appRoot=h,this.authToken=l,this.licenseKeys=p,this.root=De.join(h,".frontfriend","artifacts",Ti(`${this.apiOrigin}/${r}`)),this.licenseFile=De.join(this.root,"offline-license.json"),this.read=m,this.studioTimeoutMs=g,this.cdnTimeoutMs=x}offlineLicense(){try{return Qa(JSON.parse(Ce.readFileSync(this.licenseFile,"utf8")),{ffId:this.ffId,apiOrigin:this.apiOrigin},this.licenseKeys)}catch{return null}}acceptLicense(r){try{Qa(r,{ffId:this.ffId,apiOrigin:this.apiOrigin},this.licenseKeys)}catch{Ce.rmSync(this.licenseFile,{force:!0});return}Pi(this.licenseFile,r)}async fetch(r={}){if(r.offline){if(!this.offlineLicense())throw Bf("Offline token restore needs an offline license.")}else if(!this.authToken)throw ro(this.apiUrl);if(!r.release&&!r.tag)throw new Error("Choose a Release or tag for token delivery.");let n={ffId:this.ffId,apiOrigin:this.apiOrigin,releaseId:r.release,tokenVersionId:r.version,baseLibrary:r.baseLibrary},o=r.release?Ri(this.ffId,r.release):Df(this.ffId,r.tag),h=De.join(this.root,`${Ti(o)}.json`),l=[],p,m=g=>{let x=Pt(g.manifest,n);if(p&&x.digest!==p.digest)throw new Error("Local tokens do not match the selected artifact.");let S=Buffer.from(g.payload,"base64");return{manifest:x,payload:qf(x,S,n)}};if(!r.offline){let g=this.offlineLicense()?["studio","cdn"]:["studio"];for(let x of g)try{let S;if(x==="studio"){let b=new URL(`/api/design-systems/${encodeURIComponent(this.ffId)}/token-artifact`,this.apiUrl);b.searchParams.set(r.release?"release":"tag",r.release||r.tag),S=JSON.parse((await this.read(b.toString(),{timeoutMs:this.studioTimeoutMs,maxBytes:eo*2,authToken:this.authToken})).toString("utf8")),p=Pt(S.manifest,n),n.releaseId=p.releaseId}else{let b=Date.now(),E=JSON.parse((await this.read(`${this.cdnUrl}/${o}`,{timeoutMs:this.cdnTimeoutMs,maxBytes:65536})).toString("utf8"));if(E.unavailable)throw Object.assign(new Error("The selected token release or tag is unavailable."),{statusCode:410});if(Pt(E,n),p=E,n.releaseId=E.releaseId,!r.release){let G=this.cdnTimeoutMs-(Date.now()-b);if(G<=0)throw Object.assign(new Error("Token delivery timed out."),{code:"ETIMEDOUT"});if(E=JSON.parse((await this.read(`${this.cdnUrl}/${Ri(this.ffId,E.releaseId)}`,{timeoutMs:G,maxBytes:65536})).toString("utf8")),E.unavailable)throw Object.assign(new Error("The selected token release is unavailable."),{statusCode:410});Pt(E,n)}let N=this.cdnTimeoutMs-(Date.now()-b);if(N<=0)throw Object.assign(new Error("Token delivery timed out."),{code:"ETIMEDOUT"});let q=await this.read(`${this.cdnUrl}/${E.artifactKey}`,{timeoutMs:N});S={manifest:E,payload:q.toString("base64")}}let v=m(S);return x==="studio"&&this.acceptLicense(S.offlineLicense),Pi(h,S),r.release||Pi(De.join(De.dirname(h),`${Ti(Ri(this.ffId,v.manifest.releaseId))}.json`),S),this.result(v,x,l)}catch(S){if(!so(S,x))throw S;l.push(`${x}: ${S.message}`)}}try{return this.result(m(JSON.parse(Ce.readFileSync(h,"utf8"))),"local",l)}catch(g){throw new Error(`Selected token artifact unavailable. ${[...l,`local: ${g.message}`].join(" ")}`)}}result({manifest:r,payload:n},o,h){return{...n,versionMetadata:{...n.versionMetadata,versionId:r.tokenVersionId,releaseId:r.releaseId},tokenDelivery:{source:o,manifest:r,warnings:h,remoteWorkPending:!0}}}};module.exports={TokenArtifactClient:Oi,cdnUrlFor:Uf,readPublicBytes:io,canFallback:so,signInError:ro};
|