@frontfriend/sdk 1.2.4 → 1.2.5
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/README.md +13 -3
- package/dist/cli.js +156 -156
- package/dist/lib/core/adoption.js +1 -1
- package/dist/lib/core/api-client.js +6 -6
- package/dist/lib/core/application-adoption.js +1 -1
- package/dist/lib/core/cached-components-config.js +4 -4
- package/dist/lib/core/credentials.js +6 -6
- package/dist/lib/core/token-artifact-client.js +4 -4
- package/dist/mcp.cjs +83 -83
- package/dist/next.js +4 -4
- package/dist/package.json +1 -1
- package/dist/vite.js +9 -9
- package/package.json +2 -2
package/dist/vite.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
var C=(r,i)=>()=>(i||r((i={exports:{}}).exports,i),i.exports);var Er=C((
|
|
2
|
-
`,{mode:384}),j.renameSync(n,r);try{j.chmodSync(r,384)}catch{}}finally{j.rmSync(n,{force:!0})}}async function Jo(r,i,n){j.mkdirSync(require("path").dirname(r),{recursive:!0,mode:448});let o=`${r}.lock`,l=Date.now()+2e4,h;for(;h===void 0;)try{h=j.openSync(o,"wx",384),j.writeFileSync(h,String(process.pid))}catch(f){if(f.code!=="EEXIST")throw f;try{let m=Number(j.readFileSync(o,"utf8"));if(Number.isInteger(m)&&m>0)try{process.kill(m,0)}catch(y){if(y.code==="ESRCH"){j.unlinkSync(o);continue}}}catch(m){if(m.code==="ENOENT")continue}if(Date.now()>=l)throw n();await new Promise(m=>setTimeout(m,50))}try{return await i()}finally{j.closeSync(h),j.unlinkSync(o)}}Ir.exports={writePrivateJsonFileAtomic:Yo,withPrivateFileLock:Jo,readJsonFileSafe:Bo,readFileSafe:Uo,writeJsonFile:Mo,writeTextFile:Go,writeModuleExportsFile:Ho,fileExists:Wo,ensureDirectoryExists:zo,removeDirectory:Xo,removeFile:Ko}});var Ht=C((Bf,kr)=>{var Qo="classes.txt",Zo="classes.css";kr.exports={CLASSES_SOURCE_FILE:Qo,CSS_CLASSES_SOURCE_FILE:Zo}});var Lr=C((Uf,Tr)=>{var Q=require("path"),{CACHE_DIR_NAME:eu,CACHE_TTL_MS:tu,CACHE_FILES:Ar}=Ge(),{CacheError:Wt}=_r(),{readJsonFileSafe:ht,readFileSafe:iu,writeJsonFile:Nr,writeTextFile:Rr,writeModuleExportsFile:Pr,fileExists:zt,ensureDirectoryExists:ru,removeDirectory:su,removeFile:nu}=He(),{CLASSES_SOURCE_FILE:au,CSS_CLASSES_SOURCE_FILE:ou}=Ht(),Xt=class r{constructor(i=process.cwd()){this.appRoot=i,this.cacheDir=Q.join(i,"node_modules",eu),this.metadataFile=Q.join(this.cacheDir,"metadata.json"),this.maxAge=tu}getCacheDir(){return this.cacheDir}isLocalOnly(){return ht(this.metadataFile)?.version==="local-components"}getIconLibrary(){let i=Q.join(this.cacheDir,"iconLibrary.json");return zt(i)?ht(i):null}exists(){return zt(this.cacheDir)}isValid(){if(!this.exists())return!1;try{let i=ht(this.metadataFile);if(!i)return!1;let n=new Date(i.timestamp).getTime();return Date.now()-n<this.maxAge}catch{return!1}}load(){if(!this.exists())return null;try{let i={};for(let n of Ar.JS){let o=Q.join(this.cacheDir,n);if(zt(o)){let l=n.replace(".js","");try{let h=iu(o);if(h!==null){let f={},m={exports:f};new Function("module","exports",h)(m,f),i[l]=m.exports}}catch(h){console.warn(`[Frontfriend] Failed to load ${n}: ${h.message}`),(h.message.includes("Unexpected token")||h.message.includes("Invalid character"))&&console.warn("[Frontfriend] This might be a BOM or encoding issue. Try deleting node_modules/.cache/frontfriend and running `npx frontfriend init` again.")}}}for(let n of Ar.JSON){let o=Q.join(this.cacheDir,n),l=n.replace(".json",""),h=ht(o);h!==null&&(i[l]=h)}return i["components-config"]&&(i.componentsConfig=i["components-config"],delete i["components-config"]),i.cls&&!i.safelist&&(i.safelist=i.cls,delete i.cls),i}catch(i){throw new Wt(`Failed to load cache: ${i.message}`,"read")}}save(i){try{ru(this.cacheDir);let n={timestamp:new Date().toISOString(),version:i.metadata?.version||"2.0.0",ffId:i.metadata?.ffId},o=["tokens","variables","semanticVariables","semanticDarkVariables","keyframes","animations","safelist","custom"];for(let h of o)if(i[h]!==void 0){let f=Q.join(this.cacheDir,`${h}.js`);Pr(f,i[h])}if(i.safelist&&Array.isArray(i.safelist)){let h=Q.join(this.cacheDir,"safelist.js");Pr(h,i.safelist)}let l={fonts:i.fonts,icons:i.icons||i.iconSet,"components-config":i.componentsConfig,iconLibrary:i.iconLibrary,version:i.version,versionMetadata:i.versionMetadata,base:i.base,nativeTokens:i.nativeTokens};for(let[h,f]of Object.entries(l))if(f!==void 0){let m=Q.join(this.cacheDir,`${h}.json`);Nr(m,f)}i.themeCSS!==void 0&&Rr(Q.join(this.cacheDir,"theme.css"),i.themeCSS),i.classesContent!==void 0&&(Rr(Q.join(this.cacheDir,au),i.classesContent),nu(Q.join(this.cacheDir,ou))),Nr(this.metadataFile,n)}catch(n){throw new Wt(`Failed to save cache: ${n.message}`,"write")}}saveAtomic(i,n=()=>{}){let o=require("node:fs"),{randomUUID:l}=require("node:crypto");o.mkdirSync(Q.dirname(this.cacheDir),{recursive:!0});let h=`${this.cacheDir}.write-lock`,f;try{f=o.openSync(h,"wx")}catch(x){if(x.code!=="EEXIST")throw x;let w=Number(o.readFileSync(h,"utf8")),g=!0;if(w>0)try{process.kill(w,0)}catch(S){g=S.code!=="ESRCH"}if(g)throw new Wt("Another process is installing tokens. Retry after it completes.","write");o.unlinkSync(h),f=o.openSync(h,"wx")}let m=`${this.cacheDir}.previous`,y=`${this.cacheDir}.${l()}.pending`;try{o.writeFileSync(f,String(process.pid)),!o.existsSync(this.cacheDir)&&o.existsSync(m)&&o.renameSync(m,this.cacheDir);let x=new r(this.appRoot);x.cacheDir=y,x.metadataFile=Q.join(y,"metadata.json"),x.save(i),o.existsSync(m)&&o.rmSync(m,{recursive:!0}),o.existsSync(this.cacheDir)&&o.renameSync(this.cacheDir,m);try{o.renameSync(y,this.cacheDir),n()}catch(w){throw o.rmSync(this.cacheDir,{recursive:!0,force:!0}),o.existsSync(m)&&o.renameSync(m,this.cacheDir),w}o.rmSync(m,{recursive:!0,force:!0})}finally{o.rmSync(y,{recursive:!0,force:!0}),o.closeSync(f),o.rmSync(h,{force:!0})}}clear(){this.exists()&&su(this.cacheDir)}};Tr.exports=Xt});var Dr=C((Mf,Vr)=>{function de(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)}function Kt(r,i){if(!de(r)||!de(i))return i===void 0?r:i;let n={...r};for(let[o,l]of Object.entries(i))n[o]=o in n?Kt(n[o],l):l;return n}function Yt(r,i,n=[],o=[]){if(r===void 0||i===void 0)return o;if(!de(r)||!de(i))return o.push(n.join(".")),o;for(let l of Object.keys(r))l in i&&Yt(r[l],i[l],[...n,l],o);return o}function Or(r){return de(r)&&("styles"in r||"behavior"in r)}function Fr(r,i="component"){if(!Or(r)||!de(r.styles)||r.behavior!==void 0&&!de(r.behavior)||Object.keys(r).some(o=>!["styles","behavior"].includes(o)))throw new TypeError(`Component ${i} must use the styles/behavior envelope`);let n=Yt(r.styles,r.behavior,[i]);if(n.length>0)throw new Error(`Component config styles/behavior conflict at ${n.join(", ")}`);return Kt(r.styles||{},r.behavior||{})}function uu(r){if(!de(r))return r;let i=!1,n={};for(let[o,l]of Object.entries(r))n[o]=Fr(l,o),n[o]!==l&&(i=!0);return i?n:r}Vr.exports={isPlainObject:de,deepMerge:Kt,findTreeConflicts:Yt,isComponentEnvelope:Or,toRuntimeComponentConfig:Fr,toRuntimeComponentsConfig:uu}});var Ur=C((Gf,Br)=>{Br.exports=jr;jr.sync=hu;var $r=require("fs");function cu(r,i){var n=i.pathExt!==void 0?i.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var o=0;o<n.length;o++){var l=n[o].toLowerCase();if(l&&r.substr(-l.length).toLowerCase()===l)return!0}return!1}function qr(r,i,n){return!r.isSymbolicLink()&&!r.isFile()?!1:cu(i,n)}function jr(r,i,n){$r.stat(r,function(o,l){n(o,o?!1:qr(l,r,i))})}function hu(r,i){return qr($r.statSync(r),r,i)}});var zr=C((Hf,Wr)=>{Wr.exports=Gr;Gr.sync=lu;var Mr=require("fs");function Gr(r,i,n){Mr.stat(r,function(o,l){n(o,o?!1:Hr(l,i))})}function lu(r,i){return Hr(Mr.statSync(r),i)}function Hr(r,i){return r.isFile()&&fu(r,i)}function fu(r,i){var n=r.mode,o=r.uid,l=r.gid,h=i.uid!==void 0?i.uid:process.getuid&&process.getuid(),f=i.gid!==void 0?i.gid:process.getgid&&process.getgid(),m=parseInt("100",8),y=parseInt("010",8),x=parseInt("001",8),w=m|y,g=n&x||n&y&&l===f||n&m&&o===h||n&w&&h===0;return g}});var Kr=C((zf,Xr)=>{var Wf=require("fs"),lt;process.platform==="win32"||global.TESTING_WINDOWS?lt=Ur():lt=zr();Xr.exports=Jt;Jt.sync=pu;function Jt(r,i,n){if(typeof i=="function"&&(n=i,i={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(o,l){Jt(r,i||{},function(h,f){h?l(h):o(f)})})}lt(r,i||{},function(o,l){o&&(o.code==="EACCES"||i&&i.ignoreErrors)&&(o=null,l=!1),n(o,l)})}function pu(r,i){try{return lt.sync(r,i||{})}catch(n){if(i&&i.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var is=C((Xf,ts)=>{var Pe=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Yr=require("path"),du=Pe?";":":",Jr=Kr(),Qr=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),Zr=(r,i)=>{let n=i.colon||du,o=r.match(/\//)||Pe&&r.match(/\\/)?[""]:[...Pe?[process.cwd()]:[],...(i.path||process.env.PATH||"").split(n)],l=Pe?i.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",h=Pe?l.split(n):[""];return Pe&&r.indexOf(".")!==-1&&h[0]!==""&&h.unshift(""),{pathEnv:o,pathExt:h,pathExtExe:l}},es=(r,i,n)=>{typeof i=="function"&&(n=i,i={}),i||(i={});let{pathEnv:o,pathExt:l,pathExtExe:h}=Zr(r,i),f=[],m=x=>new Promise((w,g)=>{if(x===o.length)return i.all&&f.length?w(f):g(Qr(r));let S=o[x],E=/^".*"$/.test(S)?S.slice(1,-1):S,k=Yr.join(E,r),B=!E&&/^\.[\\\/]/.test(r)?r.slice(0,2)+k:k;w(y(B,x,0))}),y=(x,w,g)=>new Promise((S,E)=>{if(g===l.length)return S(m(w+1));let k=l[g];Jr(x+k,{pathExt:h},(B,Y)=>{if(!B&&Y)if(i.all)f.push(x+k);else return S(x+k);return S(y(x,w,g+1))})});return n?m(0).then(x=>n(null,x),n):m(0)},mu=(r,i)=>{i=i||{};let{pathEnv:n,pathExt:o,pathExtExe:l}=Zr(r,i),h=[];for(let f=0;f<n.length;f++){let m=n[f],y=/^".*"$/.test(m)?m.slice(1,-1):m,x=Yr.join(y,r),w=!y&&/^\.[\\\/]/.test(r)?r.slice(0,2)+x:x;for(let g=0;g<o.length;g++){let S=w+o[g];try{if(Jr.sync(S,{pathExt:l}))if(i.all)h.push(S);else return S}catch{}}}if(i.all&&h.length)return h;if(i.nothrow)return null;throw Qr(r)};ts.exports=es;es.sync=mu});var ss=C((Kf,Qt)=>{"use strict";var rs=(r={})=>{let i=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(i).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"};Qt.exports=rs;Qt.exports.default=rs});var us=C((Yf,os)=>{"use strict";var ns=require("path"),xu=is(),gu=ss();function as(r,i){let n=r.options.env||process.env,o=process.cwd(),l=r.options.cwd!=null,h=l&&process.chdir!==void 0&&!process.chdir.disabled;if(h)try{process.chdir(r.options.cwd)}catch{}let f;try{f=xu.sync(r.command,{path:n[gu({env:n})],pathExt:i?ns.delimiter:void 0})}catch{}finally{h&&process.chdir(o)}return f&&(f=ns.resolve(l?r.options.cwd:"",f)),f}function vu(r){return as(r)||as(r,!0)}os.exports=vu});var cs=C((Jf,ei)=>{"use strict";var Zt=/([()\][%!^"`<>&|;, *?])/g;function yu(r){return r=r.replace(Zt,"^$1"),r}function Eu(r,i){return r=`${r}`,r=r.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),r=r.replace(/(?=(\\+?)?)\1$/,"$1$1"),r=`"${r}"`,r=r.replace(Zt,"^$1"),i&&(r=r.replace(Zt,"^$1")),r}ei.exports.command=yu;ei.exports.argument=Eu});var ls=C((Qf,hs)=>{"use strict";hs.exports=/^#!(.*)/});var ps=C((Zf,fs)=>{"use strict";var bu=ls();fs.exports=(r="")=>{let i=r.match(bu);if(!i)return null;let[n,o]=i[0].replace(/#! ?/,"").split(" "),l=n.split("/").pop();return l==="env"?o:o?`${l} ${o}`:l}});var ms=C((ep,ds)=>{"use strict";var ti=require("fs"),Su=ps();function wu(r){let n=Buffer.alloc(150),o;try{o=ti.openSync(r,"r"),ti.readSync(o,n,0,150,0),ti.closeSync(o)}catch{}return Su(n.toString())}ds.exports=wu});var ys=C((tp,vs)=>{"use strict";var Cu=require("path"),xs=us(),gs=cs(),_u=ms(),Iu=process.platform==="win32",ku=/\.(?:com|exe)$/i,Au=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Nu(r){r.file=xs(r);let i=r.file&&_u(r.file);return i?(r.args.unshift(r.file),r.command=i,xs(r)):r.file}function Ru(r){if(!Iu)return r;let i=Nu(r),n=!ku.test(i);if(r.options.forceShell||n){let o=Au.test(i);r.command=Cu.normalize(r.command),r.command=gs.command(r.command),r.args=r.args.map(h=>gs.argument(h,o));let l=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${l}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function Pu(r,i,n){i&&!Array.isArray(i)&&(n=i,i=null),i=i?i.slice(0):[],n=Object.assign({},n);let o={command:r,args:i,options:n,file:void 0,original:{command:r,args:i}};return n.shell?o:Ru(o)}vs.exports=Pu});var Ss=C((ip,bs)=>{"use strict";var ii=process.platform==="win32";function ri(r,i){return Object.assign(new Error(`${i} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${i} ${r.command}`,path:r.command,spawnargs:r.args})}function Tu(r,i){if(!ii)return;let n=r.emit;r.emit=function(o,l){if(o==="exit"){let h=Es(l,i);if(h)return n.call(r,"error",h)}return n.apply(r,arguments)}}function Es(r,i){return ii&&r===1&&!i.file?ri(i.original,"spawn"):null}function Lu(r,i){return ii&&r===1&&!i.file?ri(i.original,"spawnSync"):null}bs.exports={hookChildProcess:Tu,verifyENOENT:Es,verifyENOENTSync:Lu,notFoundError:ri}});var _s=C((rp,Te)=>{"use strict";var ws=require("child_process"),si=ys(),ni=Ss();function Cs(r,i,n){let o=si(r,i,n),l=ws.spawn(o.command,o.args,o.options);return ni.hookChildProcess(l,o),l}function Ou(r,i,n){let o=si(r,i,n),l=ws.spawnSync(o.command,o.args,o.options);return l.error=l.error||ni.verifyENOENTSync(l.status,o),l}Te.exports=Cs;Te.exports.spawn=Cs;Te.exports.sync=Ou;Te.exports._parse=si;Te.exports._enoent=ni});var Le=C((sp,Is)=>{"use strict";var Fu="2.0.0",Vu=Number.MAX_SAFE_INTEGER||9007199254740991,Du=16,$u=250,qu=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Is.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Du,MAX_SAFE_BUILD_LENGTH:$u,MAX_SAFE_INTEGER:Vu,RELEASE_TYPES:qu,SEMVER_SPEC_VERSION:Fu,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var We=C((np,ks)=>{"use strict";var ju=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};ks.exports=ju});var Oe=C((ce,As)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ai,MAX_SAFE_BUILD_LENGTH:Bu,MAX_LENGTH:Uu}=Le(),Mu=We();ce=As.exports={};var Gu=ce.re=[],Hu=ce.safeRe=[],_=ce.src=[],Wu=ce.safeSrc=[],I=ce.t={},zu=0,oi="[a-zA-Z0-9-]",Xu=[["\\s",1],["\\d",Uu],[oi,Bu]],Ku=r=>{for(let[i,n]of Xu)r=r.split(`${i}*`).join(`${i}{0,${n}}`).split(`${i}+`).join(`${i}{1,${n}}`);return r},T=(r,i,n)=>{let o=Ku(i),l=zu++;Mu(r,l,i),I[r]=l,_[l]=i,Wu[l]=o,Gu[l]=new RegExp(i,n?"g":void 0),Hu[l]=new RegExp(o,n?"g":void 0)};T("NUMERICIDENTIFIER","0|[1-9]\\d*");T("NUMERICIDENTIFIERLOOSE","\\d+");T("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${oi}*`);T("MAINVERSION",`(${_[I.NUMERICIDENTIFIER]})\\.(${_[I.NUMERICIDENTIFIER]})\\.(${_[I.NUMERICIDENTIFIER]})`);T("MAINVERSIONLOOSE",`(${_[I.NUMERICIDENTIFIERLOOSE]})\\.(${_[I.NUMERICIDENTIFIERLOOSE]})\\.(${_[I.NUMERICIDENTIFIERLOOSE]})`);T("PRERELEASEIDENTIFIER",`(?:${_[I.NONNUMERICIDENTIFIER]}|${_[I.NUMERICIDENTIFIER]})`);T("PRERELEASEIDENTIFIERLOOSE",`(?:${_[I.NONNUMERICIDENTIFIER]}|${_[I.NUMERICIDENTIFIERLOOSE]})`);T("PRERELEASE",`(?:-(${_[I.PRERELEASEIDENTIFIER]}(?:\\.${_[I.PRERELEASEIDENTIFIER]})*))`);T("PRERELEASELOOSE",`(?:-?(${_[I.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_[I.PRERELEASEIDENTIFIERLOOSE]})*))`);T("BUILDIDENTIFIER",`${oi}+`);T("BUILD",`(?:\\+(${_[I.BUILDIDENTIFIER]}(?:\\.${_[I.BUILDIDENTIFIER]})*))`);T("FULLPLAIN",`v?${_[I.MAINVERSION]}${_[I.PRERELEASE]}?${_[I.BUILD]}?`);T("FULL",`^${_[I.FULLPLAIN]}$`);T("LOOSEPLAIN",`[v=\\s]*${_[I.MAINVERSIONLOOSE]}${_[I.PRERELEASELOOSE]}?${_[I.BUILD]}?`);T("LOOSE",`^${_[I.LOOSEPLAIN]}$`);T("GTLT","((?:<|>)?=?)");T("XRANGEIDENTIFIERLOOSE",`${_[I.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);T("XRANGEIDENTIFIER",`${_[I.NUMERICIDENTIFIER]}|x|X|\\*`);T("XRANGEPLAIN",`[v=\\s]*(${_[I.XRANGEIDENTIFIER]})(?:\\.(${_[I.XRANGEIDENTIFIER]})(?:\\.(${_[I.XRANGEIDENTIFIER]})(?:${_[I.PRERELEASE]})?${_[I.BUILD]}?)?)?`);T("XRANGEPLAINLOOSE",`[v=\\s]*(${_[I.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[I.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[I.XRANGEIDENTIFIERLOOSE]})(?:${_[I.PRERELEASELOOSE]})?${_[I.BUILD]}?)?)?`);T("XRANGE",`^${_[I.GTLT]}\\s*${_[I.XRANGEPLAIN]}$`);T("XRANGELOOSE",`^${_[I.GTLT]}\\s*${_[I.XRANGEPLAINLOOSE]}$`);T("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ai}})(?:\\.(\\d{1,${ai}}))?(?:\\.(\\d{1,${ai}}))?`);T("COERCE",`${_[I.COERCEPLAIN]}(?:$|[^\\d])`);T("COERCEFULL",_[I.COERCEPLAIN]+`(?:${_[I.PRERELEASE]})?(?:${_[I.BUILD]})?(?:$|[^\\d])`);T("COERCERTL",_[I.COERCE],!0);T("COERCERTLFULL",_[I.COERCEFULL],!0);T("LONETILDE","(?:~>?)");T("TILDETRIM",`(\\s*)${_[I.LONETILDE]}\\s+`,!0);ce.tildeTrimReplace="$1~";T("TILDE",`^${_[I.LONETILDE]}${_[I.XRANGEPLAIN]}$`);T("TILDELOOSE",`^${_[I.LONETILDE]}${_[I.XRANGEPLAINLOOSE]}$`);T("LONECARET","(?:\\^)");T("CARETTRIM",`(\\s*)${_[I.LONECARET]}\\s+`,!0);ce.caretTrimReplace="$1^";T("CARET",`^${_[I.LONECARET]}${_[I.XRANGEPLAIN]}$`);T("CARETLOOSE",`^${_[I.LONECARET]}${_[I.XRANGEPLAINLOOSE]}$`);T("COMPARATORLOOSE",`^${_[I.GTLT]}\\s*(${_[I.LOOSEPLAIN]})$|^$`);T("COMPARATOR",`^${_[I.GTLT]}\\s*(${_[I.FULLPLAIN]})$|^$`);T("COMPARATORTRIM",`(\\s*)${_[I.GTLT]}\\s*(${_[I.LOOSEPLAIN]}|${_[I.XRANGEPLAIN]})`,!0);ce.comparatorTrimReplace="$1$2$3";T("HYPHENRANGE",`^\\s*(${_[I.XRANGEPLAIN]})\\s+-\\s+(${_[I.XRANGEPLAIN]})\\s*$`);T("HYPHENRANGELOOSE",`^\\s*(${_[I.XRANGEPLAINLOOSE]})\\s+-\\s+(${_[I.XRANGEPLAINLOOSE]})\\s*$`);T("STAR","(<|>)?=?\\s*\\*");T("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");T("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var ft=C((ap,Ns)=>{"use strict";var Yu=Object.freeze({loose:!0}),Ju=Object.freeze({}),Qu=r=>r?typeof r!="object"?Yu:r:Ju;Ns.exports=Qu});var ui=C((op,Ts)=>{"use strict";var Rs=/^[0-9]+$/,Ps=(r,i)=>{if(typeof r=="number"&&typeof i=="number")return r===i?0:r<i?-1:1;let n=Rs.test(r),o=Rs.test(i);return n&&o&&(r=+r,i=+i),r===i?0:n&&!o?-1:o&&!n?1:r<i?-1:1},Zu=(r,i)=>Ps(i,r);Ts.exports={compareIdentifiers:Ps,rcompareIdentifiers:Zu}});var G=C((up,Os)=>{"use strict";var pt=We(),{MAX_LENGTH:Ls,MAX_SAFE_INTEGER:dt}=Le(),{safeRe:mt,t:xt}=Oe(),ec=ft(),{compareIdentifiers:ci}=ui(),tc=(r,i)=>{let n=i.split(".");if(n.length>r.length)return!1;for(let o=0;o<n.length;o++)if(ci(r[o],n[o])!==0)return!1;return!0},hi=class r{constructor(i,n){if(n=ec(n),i instanceof r){if(i.loose===!!n.loose&&i.includePrerelease===!!n.includePrerelease)return i;i=i.version}else if(typeof i!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof i}".`);if(i.length>Ls)throw new TypeError(`version is longer than ${Ls} characters`);pt("SemVer",i,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let o=i.trim().match(n.loose?mt[xt.LOOSE]:mt[xt.FULL]);if(!o)throw new TypeError(`Invalid Version: ${i}`);if(this.raw=i,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>dt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>dt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>dt||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(l=>{if(/^[0-9]+$/.test(l)){let h=+l;if(h>=0&&h<dt)return h}return l}):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(i){if(pt("SemVer.compare",this.version,this.options,i),!(i instanceof r)){if(typeof i=="string"&&i===this.version)return 0;i=new r(i,this.options)}return i.version===this.version?0:this.compareMain(i)||this.comparePre(i)}compareMain(i){return i instanceof r||(i=new r(i,this.options)),this.major<i.major?-1:this.major>i.major?1:this.minor<i.minor?-1:this.minor>i.minor?1:this.patch<i.patch?-1:this.patch>i.patch?1:0}comparePre(i){if(i instanceof r||(i=new r(i,this.options)),this.prerelease.length&&!i.prerelease.length)return-1;if(!this.prerelease.length&&i.prerelease.length)return 1;if(!this.prerelease.length&&!i.prerelease.length)return 0;let n=0;do{let o=this.prerelease[n],l=i.prerelease[n];if(pt("prerelease compare",n,o,l),o===void 0&&l===void 0)return 0;if(l===void 0)return 1;if(o===void 0)return-1;if(o===l)continue;return ci(o,l)}while(++n)}compareBuild(i){i instanceof r||(i=new r(i,this.options));let n=0;do{let o=this.build[n],l=i.build[n];if(pt("build compare",n,o,l),o===void 0&&l===void 0)return 0;if(l===void 0)return 1;if(o===void 0)return-1;if(o===l)continue;return ci(o,l)}while(++n)}inc(i,n,o){if(i.startsWith("pre")){if(!n&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let l=`-${n}`.match(this.options.loose?mt[xt.PRERELEASELOOSE]:mt[xt.PRERELEASE]);if(!l||l[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(i){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 l=Number(o)?1:0;if(this.prerelease.length===0)this.prerelease=[l];else{let h=this.prerelease.length;for(;--h>=0;)typeof this.prerelease[h]=="number"&&(this.prerelease[h]++,h=-2);if(h===-1){if(n===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(l)}}if(n){let h=[n,l];if(o===!1&&(h=[n]),tc(this.prerelease,n)){let f=this.prerelease[n.split(".").length];isNaN(f)&&(this.prerelease=h)}else this.prerelease=h}break}default:throw new Error(`invalid increment argument: ${i}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Os.exports=hi});var ve=C((cp,Vs)=>{"use strict";var Fs=G(),ic=(r,i,n=!1)=>{if(r instanceof Fs)return r;try{return new Fs(r,i)}catch(o){if(!n)return null;throw o}};Vs.exports=ic});var $s=C((hp,Ds)=>{"use strict";var rc=ve(),sc=(r,i)=>{let n=rc(r,i);return n?n.version:null};Ds.exports=sc});var js=C((lp,qs)=>{"use strict";var nc=ve(),ac=(r,i)=>{let n=nc(r.trim().replace(/^[=v]+/,""),i);return n?n.version:null};qs.exports=ac});var Ms=C((fp,Us)=>{"use strict";var Bs=G(),oc=(r,i,n,o,l)=>{typeof n=="string"&&(l=o,o=n,n=void 0);try{return new Bs(r instanceof Bs?r.version:r,n).inc(i,o,l).version}catch{return null}};Us.exports=oc});var Ws=C((pp,Hs)=>{"use strict";var Gs=ve(),uc=(r,i)=>{let n=Gs(r,null,!0),o=Gs(i,null,!0),l=n.compare(o);if(l===0)return null;let h=l>0,f=h?n:o,m=h?o:n,y=!!f.prerelease.length;if(!!m.prerelease.length&&!y){if(!m.patch&&!m.minor)return"major";if(m.compareMain(f)===0)return m.minor&&!m.patch?"minor":"patch"}let w=y?"pre":"";return n.major!==o.major?w+"major":n.minor!==o.minor?w+"minor":n.patch!==o.patch?w+"patch":"prerelease"};Hs.exports=uc});var Xs=C((dp,zs)=>{"use strict";var cc=G(),hc=(r,i)=>new cc(r,i).major;zs.exports=hc});var Ys=C((mp,Ks)=>{"use strict";var lc=G(),fc=(r,i)=>new lc(r,i).minor;Ks.exports=fc});var Qs=C((xp,Js)=>{"use strict";var pc=G(),dc=(r,i)=>new pc(r,i).patch;Js.exports=dc});var en=C((gp,Zs)=>{"use strict";var mc=ve(),xc=(r,i)=>{let n=mc(r,i);return n&&n.prerelease.length?n.prerelease:null};Zs.exports=xc});var re=C((vp,rn)=>{"use strict";var tn=G(),gc=(r,i,n)=>new tn(r,n).compare(new tn(i,n));rn.exports=gc});var nn=C((yp,sn)=>{"use strict";var vc=re(),yc=(r,i,n)=>vc(i,r,n);sn.exports=yc});var on=C((Ep,an)=>{"use strict";var Ec=re(),bc=(r,i)=>Ec(r,i,!0);an.exports=bc});var gt=C((bp,cn)=>{"use strict";var un=G(),Sc=(r,i,n)=>{let o=new un(r,n),l=new un(i,n);return o.compare(l)||o.compareBuild(l)};cn.exports=Sc});var ln=C((Sp,hn)=>{"use strict";var wc=gt(),Cc=(r,i)=>r.sort((n,o)=>wc(n,o,i));hn.exports=Cc});var pn=C((wp,fn)=>{"use strict";var _c=gt(),Ic=(r,i)=>r.sort((n,o)=>_c(o,n,i));fn.exports=Ic});var ze=C((Cp,dn)=>{"use strict";var kc=re(),Ac=(r,i,n)=>kc(r,i,n)>0;dn.exports=Ac});var vt=C((_p,mn)=>{"use strict";var Nc=re(),Rc=(r,i,n)=>Nc(r,i,n)<0;mn.exports=Rc});var li=C((Ip,xn)=>{"use strict";var Pc=re(),Tc=(r,i,n)=>Pc(r,i,n)===0;xn.exports=Tc});var fi=C((kp,gn)=>{"use strict";var Lc=re(),Oc=(r,i,n)=>Lc(r,i,n)!==0;gn.exports=Oc});var yt=C((Ap,vn)=>{"use strict";var Fc=re(),Vc=(r,i,n)=>Fc(r,i,n)>=0;vn.exports=Vc});var Et=C((Np,yn)=>{"use strict";var Dc=re(),$c=(r,i,n)=>Dc(r,i,n)<=0;yn.exports=$c});var pi=C((Rp,En)=>{"use strict";var qc=li(),jc=fi(),Bc=ze(),Uc=yt(),Mc=vt(),Gc=Et(),Hc=(r,i,n,o)=>{switch(i){case"===":return typeof r=="object"&&(r=r.version),typeof n=="object"&&(n=n.version),r===n;case"!==":return typeof r=="object"&&(r=r.version),typeof n=="object"&&(n=n.version),r!==n;case"":case"=":case"==":return qc(r,n,o);case"!=":return jc(r,n,o);case">":return Bc(r,n,o);case">=":return Uc(r,n,o);case"<":return Mc(r,n,o);case"<=":return Gc(r,n,o);default:throw new TypeError(`Invalid operator: ${i}`)}};En.exports=Hc});var Sn=C((Pp,bn)=>{"use strict";var Wc=G(),zc=ve(),{safeRe:bt,t:St}=Oe(),Xc=(r,i)=>{if(r instanceof Wc)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;i=i||{};let n=null;if(!i.rtl)n=r.match(i.includePrerelease?bt[St.COERCEFULL]:bt[St.COERCE]);else{let y=i.includePrerelease?bt[St.COERCERTLFULL]:bt[St.COERCERTL],x;for(;(x=y.exec(r))&&(!n||n.index+n[0].length!==r.length);)(!n||x.index+x[0].length!==n.index+n[0].length)&&(n=x),y.lastIndex=x.index+x[1].length+x[2].length;y.lastIndex=-1}if(n===null)return null;let o=n[2],l=n[3]||"0",h=n[4]||"0",f=i.includePrerelease&&n[5]?`-${n[5]}`:"",m=i.includePrerelease&&n[6]?`+${n[6]}`:"";return zc(`${o}.${l}.${h}${f}${m}`,i)};bn.exports=Xc});var Cn=C((Tp,wn)=>{"use strict";var Kc=ve(),Yc=Le(),Jc=G(),Qc=(r,i,n)=>{if(!Yc.RELEASE_TYPES.includes(i))return null;let o=Zc(r,n);return o&&eh(o,i)},Zc=(r,i)=>{let n=r instanceof Jc?r.version:r;return Kc(n,i)},eh=(r,i)=>{if(th(i))return r.version;switch(r.prerelease=[],i){case"major":r.minor=0,r.patch=0;break;case"minor":r.patch=0;break}return r.format()},th=r=>r.startsWith("pre");wn.exports=Qc});var In=C((Lp,_n)=>{"use strict";var di=class{constructor(){this.max=1e3,this.map=new Map}get(i){let n=this.map.get(i);if(n!==void 0)return this.map.delete(i),this.map.set(i,n),n}delete(i){return this.map.delete(i)}set(i,n){if(!this.delete(i)&&n!==void 0){if(this.map.size>=this.max){let l=this.map.keys().next().value;this.delete(l)}this.map.set(i,n)}return this}};_n.exports=di});var se=C((Op,Rn)=>{"use strict";var ih=/\s+/g,mi=class r{constructor(i,n){if(n=sh(n),i instanceof r)return i.loose===!!n.loose&&i.includePrerelease===!!n.includePrerelease?i:new r(i.raw,n);if(i instanceof xi)return this.raw=i.value,this.set=[[i]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=i.trim().replace(ih," "),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(l=>!An(l[0])),this.set.length===0)this.set=[o];else if(this.set.length>1){for(let l of this.set)if(l.length===1&&ph(l[0])){this.set=[l];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let i=0;i<this.set.length;i++){i>0&&(this.formatted+="||");let n=this.set[i];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(i){i=i.replace(fh,"");let o=((this.options.includePrerelease&&hh)|(this.options.loose&&lh))+":"+i,l=kn.get(o);if(l)return l;let h=this.options.loose,f=h?K[H.HYPHENRANGELOOSE]:K[H.HYPHENRANGE];i=i.replace(f,Ch(this.options.includePrerelease)),$("hyphen replace",i),i=i.replace(K[H.COMPARATORTRIM],oh),$("comparator trim",i),i=i.replace(K[H.TILDETRIM],uh),$("tilde trim",i),i=i.replace(K[H.CARETTRIM],ch),$("caret trim",i);let m=i.split(" ").map(g=>dh(g,this.options)).join(" ").split(/\s+/).map(g=>wh(g,this.options));h&&(m=m.filter(g=>($("loose invalid filter",g,this.options),!!g.match(K[H.COMPARATORLOOSE])))),$("range list",m);let y=new Map,x=m.map(g=>new xi(g,this.options));for(let g of x){if(An(g))return[g];y.set(g.value,g)}y.size>1&&y.has("")&&y.delete("");let w=[...y.values()];return kn.set(o,w),w}intersects(i,n){if(!(i instanceof r))throw new TypeError("a Range is required");return this.set.some(o=>Nn(o,n)&&i.set.some(l=>Nn(l,n)&&o.every(h=>l.every(f=>h.intersects(f,n)))))}test(i){if(!i)return!1;if(typeof i=="string")try{i=new nh(i,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(_h(this.set[n],i,this.options))return!0;return!1}};Rn.exports=mi;var rh=In(),kn=new rh,sh=ft(),xi=Xe(),$=We(),nh=G(),{safeRe:K,src:ah,t:H,comparatorTrimReplace:oh,tildeTrimReplace:uh,caretTrimReplace:ch}=Oe(),{FLAG_INCLUDE_PRERELEASE:hh,FLAG_LOOSE:lh}=Le(),fh=new RegExp(ah[H.BUILD],"g"),An=r=>r.value==="<0.0.0-0",ph=r=>r.value==="",Nn=(r,i)=>{let n=!0,o=r.slice(),l=o.pop();for(;n&&o.length;)n=o.every(h=>l.intersects(h,i)),l=o.pop();return n},dh=(r,i)=>(r=r.replace(K[H.BUILD],""),$("comp",r,i),r=vh(r,i),$("caret",r),r=xh(r,i),$("tildes",r),r=Eh(r,i),$("xrange",r),r=Sh(r,i),$("stars",r),r),U=r=>!r||r.toLowerCase()==="x"||r==="*",mh=(r,i,n)=>U(r)&&!U(i)||U(i)&&n&&!U(n),xh=(r,i)=>r.trim().split(/\s+/).map(n=>gh(n,i)).join(" "),gh=(r,i)=>{let n=i.loose?K[H.TILDELOOSE]:K[H.TILDE],o=i.includePrerelease?"-0":"";return r.replace(n,(l,h,f,m,y)=>{$("tilde",r,l,h,f,m,y);let x;return U(h)?x="":U(f)?x=`>=${h}.0.0${o} <${+h+1}.0.0-0`:U(m)?x=`>=${h}.${f}.0${o} <${h}.${+f+1}.0-0`:y?($("replaceTilde pr",y),x=`>=${h}.${f}.${m}-${y} <${h}.${+f+1}.0-0`):x=`>=${h}.${f}.${m} <${h}.${+f+1}.0-0`,$("tilde return",x),x})},vh=(r,i)=>r.trim().split(/\s+/).map(n=>yh(n,i)).join(" "),yh=(r,i)=>{$("caret",r,i);let n=i.loose?K[H.CARETLOOSE]:K[H.CARET],o=i.includePrerelease?"-0":"";return r.replace(n,(l,h,f,m,y)=>{$("caret",r,l,h,f,m,y);let x;return U(h)?x="":U(f)?x=`>=${h}.0.0${o} <${+h+1}.0.0-0`:U(m)?h==="0"?x=`>=${h}.${f}.0${o} <${h}.${+f+1}.0-0`:x=`>=${h}.${f}.0${o} <${+h+1}.0.0-0`:y?($("replaceCaret pr",y),h==="0"?f==="0"?x=`>=${h}.${f}.${m}-${y} <${h}.${f}.${+m+1}-0`:x=`>=${h}.${f}.${m}-${y} <${h}.${+f+1}.0-0`:x=`>=${h}.${f}.${m}-${y} <${+h+1}.0.0-0`):($("no pr"),h==="0"?f==="0"?x=`>=${h}.${f}.${m} <${h}.${f}.${+m+1}-0`:x=`>=${h}.${f}.${m} <${h}.${+f+1}.0-0`:x=`>=${h}.${f}.${m} <${+h+1}.0.0-0`),$("caret return",x),x})},Eh=(r,i)=>($("replaceXRanges",r,i),r.split(/\s+/).map(n=>bh(n,i)).join(" ")),bh=(r,i)=>{r=r.trim();let n=i.loose?K[H.XRANGELOOSE]:K[H.XRANGE];return r.replace(n,(o,l,h,f,m,y)=>{if($("xRange",r,o,l,h,f,m,y),mh(h,f,m))return r;let x=U(h),w=x||U(f),g=w||U(m),S=g;return l==="="&&S&&(l=""),y=i.includePrerelease?"-0":"",x?l===">"||l==="<"?o="<0.0.0-0":o="*":l&&S?(w&&(f=0),m=0,l===">"?(l=">=",w?(h=+h+1,f=0,m=0):(f=+f+1,m=0)):l==="<="&&(l="<",w?h=+h+1:f=+f+1),l==="<"&&(y="-0"),o=`${l+h}.${f}.${m}${y}`):w?o=`>=${h}.0.0${y} <${+h+1}.0.0-0`:g&&(o=`>=${h}.${f}.0${y} <${h}.${+f+1}.0-0`),$("xRange return",o),o})},Sh=(r,i)=>($("replaceStars",r,i),r.trim().replace(K[H.STAR],"")),wh=(r,i)=>($("replaceGTE0",r,i),r.trim().replace(K[i.includePrerelease?H.GTE0PRE:H.GTE0],"")),Ch=r=>(i,n,o,l,h,f,m,y,x,w,g,S)=>(U(o)?n="":U(l)?n=`>=${o}.0.0${r?"-0":""}`:U(h)?n=`>=${o}.${l}.0${r?"-0":""}`:f?n=`>=${n}`:n=`>=${n}${r?"-0":""}`,U(x)?y="":U(w)?y=`<${+x+1}.0.0-0`:U(g)?y=`<${x}.${+w+1}.0-0`:S?y=`<=${x}.${w}.${g}-${S}`:r?y=`<${x}.${w}.${+g+1}-0`:y=`<=${y}`,`${n} ${y}`.trim()),_h=(r,i,n)=>{for(let o=0;o<r.length;o++)if(!r[o].test(i))return!1;if(i.prerelease.length&&!n.includePrerelease){for(let o=0;o<r.length;o++)if($(r[o].semver),r[o].semver!==xi.ANY&&r[o].semver.prerelease.length>0){let l=r[o].semver;if(l.major===i.major&&l.minor===i.minor&&l.patch===i.patch)return!0}return!1}return!0}});var Xe=C((Fp,Vn)=>{"use strict";var Ke=Symbol("SemVer ANY"),yi=class r{static get ANY(){return Ke}constructor(i,n){if(n=Pn(n),i instanceof r){if(i.loose===!!n.loose)return i;i=i.value}i=i.trim().split(/\s+/).join(" "),vi("comparator",i,n),this.options=n,this.loose=!!n.loose,this.parse(i),this.semver===Ke?this.value="":this.value=this.operator+this.semver.version,vi("comp",this)}parse(i){let n=this.options.loose?Tn[Ln.COMPARATORLOOSE]:Tn[Ln.COMPARATOR],o=i.match(n);if(!o)throw new TypeError(`Invalid comparator: ${i}`);this.operator=o[1]!==void 0?o[1]:"",this.operator==="="&&(this.operator=""),o[2]?this.semver=new On(o[2],this.options.loose):this.semver=Ke}toString(){return this.value}test(i){if(vi("Comparator.test",i,this.options.loose),this.semver===Ke||i===Ke)return!0;if(typeof i=="string")try{i=new On(i,this.options)}catch{return!1}return gi(i,this.operator,this.semver,this.options)}intersects(i,n){if(!(i instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Fn(i.value,n).test(this.value):i.operator===""?i.value===""?!0:new Fn(this.value,n).test(i.semver):(n=Pn(n),n.includePrerelease&&(this.value==="<0.0.0-0"||i.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||i.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&i.operator.startsWith(">")||this.operator.startsWith("<")&&i.operator.startsWith("<")||this.semver.version===i.semver.version&&this.operator.includes("=")&&i.operator.includes("=")||gi(this.semver,"<",i.semver,n)&&this.operator.startsWith(">")&&i.operator.startsWith("<")||gi(this.semver,">",i.semver,n)&&this.operator.startsWith("<")&&i.operator.startsWith(">")))}};Vn.exports=yi;var Pn=ft(),{safeRe:Tn,t:Ln}=Oe(),gi=pi(),vi=We(),On=G(),Fn=se()});var Ye=C((Vp,Dn)=>{"use strict";var Ih=se(),kh=(r,i,n)=>{try{i=new Ih(i,n)}catch{return!1}return i.test(r)};Dn.exports=kh});var qn=C((Dp,$n)=>{"use strict";var Ah=se(),Nh=(r,i)=>new Ah(r,i).set.map(n=>n.map(o=>o.value).join(" ").trim().split(" "));$n.exports=Nh});var Bn=C(($p,jn)=>{"use strict";var Rh=G(),Ph=se(),Th=(r,i,n)=>{let o=null,l=null,h=null;try{h=new Ph(i,n)}catch{return null}return r.forEach(f=>{h.test(f)&&(!o||l.compare(f)===-1)&&(o=f,l=new Rh(o,n))}),o};jn.exports=Th});var Mn=C((qp,Un)=>{"use strict";var Lh=G(),Oh=se(),Fh=(r,i,n)=>{let o=null,l=null,h=null;try{h=new Oh(i,n)}catch{return null}return r.forEach(f=>{h.test(f)&&(!o||l.compare(f)===1)&&(o=f,l=new Lh(o,n))}),o};Un.exports=Fh});var Wn=C((jp,Hn)=>{"use strict";var Ei=G(),Vh=se(),Gn=ze(),Dh=(r,i)=>{r=new Vh(r,i);let n=new Ei("0.0.0");if(r.test(n)||(n=new Ei("0.0.0-0"),r.test(n)))return n;n=null;for(let o=0;o<r.set.length;++o){let l=r.set[o],h=null;l.forEach(f=>{let m=new Ei(f.semver.version);switch(f.operator){case">":m.prerelease.length===0?m.patch++:m.prerelease.push(0),m.raw=m.format();case"":case">=":(!h||Gn(m,h))&&(h=m);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${f.operator}`)}}),h&&(!n||Gn(n,h))&&(n=h)}return n&&r.test(n)?n:null};Hn.exports=Dh});var Xn=C((Bp,zn)=>{"use strict";var $h=se(),qh=(r,i)=>{try{return new $h(r,i).range||"*"}catch{return null}};zn.exports=qh});var wt=C((Up,Qn)=>{"use strict";var jh=G(),Jn=Xe(),{ANY:Bh}=Jn,Uh=se(),Mh=Ye(),Kn=ze(),Yn=vt(),Gh=Et(),Hh=yt(),Wh=(r,i,n,o)=>{r=new jh(r,o),i=new Uh(i,o);let l,h,f,m,y;switch(n){case">":l=Kn,h=Gh,f=Yn,m=">",y=">=";break;case"<":l=Yn,h=Hh,f=Kn,m="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Mh(r,i,o))return!1;for(let x=0;x<i.set.length;++x){let w=i.set[x],g=null,S=null;if(w.forEach(E=>{E.semver===Bh&&(E=new Jn(">=0.0.0")),g=g||E,S=S||E,l(E.semver,g.semver,o)?g=E:f(E.semver,S.semver,o)&&(S=E)}),g.operator===m||g.operator===y||(!S.operator||S.operator===m)&&h(r,S.semver))return!1;if(S.operator===y&&f(r,S.semver))return!1}return!0};Qn.exports=Wh});var ea=C((Mp,Zn)=>{"use strict";var zh=wt(),Xh=(r,i,n)=>zh(r,i,">",n);Zn.exports=Xh});var ia=C((Gp,ta)=>{"use strict";var Kh=wt(),Yh=(r,i,n)=>Kh(r,i,"<",n);ta.exports=Yh});var na=C((Hp,sa)=>{"use strict";var ra=se(),Jh=(r,i,n)=>(r=new ra(r,n),i=new ra(i,n),r.intersects(i,n));sa.exports=Jh});var oa=C((Wp,aa)=>{"use strict";var Qh=Ye(),Zh=re();aa.exports=(r,i,n)=>{let o=[],l=null,h=null,f=r.sort((w,g)=>Zh(w,g,n));for(let w of f)Qh(w,i,n)?(h=w,l||(l=w)):(h&&o.push([l,h]),h=null,l=null);l&&o.push([l,null]);let m=[];for(let[w,g]of o)w===g?m.push(w):!g&&w===f[0]?m.push("*"):g?w===f[0]?m.push(`<=${g}`):m.push(`${w} - ${g}`):m.push(`>=${w}`);let y=m.join(" || "),x=typeof i.raw=="string"?i.raw:String(i);return y.length<x.length?y:i}});var pa=C((zp,fa)=>{"use strict";var ua=se(),wi=Xe(),{ANY:bi}=wi,Si=Ye(),Ci=re(),el=(r,i,n={})=>{if(r===i)return!0;r=new ua(r,n),i=new ua(i,n);let o=!1;e:for(let l of r.set){for(let h of i.set){let f=il(l,h,n);if(o=o||f!==null,f)continue e}if(o)return!1}return!0},tl=[new wi(">=0.0.0-0")],ca=[new wi(">=0.0.0")],il=(r,i,n)=>{if(r===i)return!0;if(r.length===1&&r[0].semver===bi){if(i.length===1&&i[0].semver===bi)return!0;n.includePrerelease?r=tl:r=ca}if(i.length===1&&i[0].semver===bi){if(n.includePrerelease)return!0;i=ca}let o=new Set,l,h;for(let E of r)E.operator===">"||E.operator===">="?l=ha(l,E,n):E.operator==="<"||E.operator==="<="?h=la(h,E,n):o.add(E.semver);if(o.size>1)return null;let f;if(l&&h){if(f=Ci(l.semver,h.semver,n),f>0)return null;if(f===0&&(l.operator!==">="||h.operator!=="<="))return null}for(let E of o){if(l&&!Si(E,String(l),n)||h&&!Si(E,String(h),n))return null;for(let k of i)if(!Si(E,String(k),n))return!1;return!0}let m,y,x,w,g=h&&!n.includePrerelease&&h.semver.prerelease.length?h.semver:!1,S=l&&!n.includePrerelease&&l.semver.prerelease.length?l.semver:!1;g&&g.prerelease.length===1&&h.operator==="<"&&g.prerelease[0]===0&&(g=!1);for(let E of i){if(w=w||E.operator===">"||E.operator===">=",x=x||E.operator==="<"||E.operator==="<=",l){if(S&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===S.major&&E.semver.minor===S.minor&&E.semver.patch===S.patch&&(S=!1),E.operator===">"||E.operator===">="){if(m=ha(l,E,n),m===E&&m!==l)return!1}else if(l.operator===">="&&!E.test(l.semver))return!1}if(h){if(g&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===g.major&&E.semver.minor===g.minor&&E.semver.patch===g.patch&&(g=!1),E.operator==="<"||E.operator==="<="){if(y=la(h,E,n),y===E&&y!==h)return!1}else if(h.operator==="<="&&!E.test(h.semver))return!1}if(!E.operator&&(h||l)&&f!==0)return!1}return!(l&&x&&!h&&f!==0||h&&w&&!l&&f!==0||S||g)},ha=(r,i,n)=>{if(!r)return i;let o=Ci(r.semver,i.semver,n);return o>0?r:o<0||i.operator===">"&&r.operator===">="?i:r},la=(r,i,n)=>{if(!r)return i;let o=Ci(r.semver,i.semver,n);return o<0?r:o>0||i.operator==="<"&&r.operator==="<="?i:r};fa.exports=el});var ga=C((Xp,xa)=>{"use strict";var _i=Oe(),da=Le(),rl=G(),ma=ui(),sl=ve(),nl=$s(),al=js(),ol=Ms(),ul=Ws(),cl=Xs(),hl=Ys(),ll=Qs(),fl=en(),pl=re(),dl=nn(),ml=on(),xl=gt(),gl=ln(),vl=pn(),yl=ze(),El=vt(),bl=li(),Sl=fi(),wl=yt(),Cl=Et(),_l=pi(),Il=Sn(),kl=Cn(),Al=Xe(),Nl=se(),Rl=Ye(),Pl=qn(),Tl=Bn(),Ll=Mn(),Ol=Wn(),Fl=Xn(),Vl=wt(),Dl=ea(),$l=ia(),ql=na(),jl=oa(),Bl=pa();xa.exports={parse:sl,valid:nl,clean:al,inc:ol,diff:ul,major:cl,minor:hl,patch:ll,prerelease:fl,compare:pl,rcompare:dl,compareLoose:ml,compareBuild:xl,sort:gl,rsort:vl,gt:yl,lt:El,eq:bl,neq:Sl,gte:wl,lte:Cl,cmp:_l,coerce:Il,truncate:kl,Comparator:Al,Range:Nl,satisfies:Rl,toComparators:Pl,maxSatisfying:Tl,minSatisfying:Ll,minVersion:Ol,validRange:Fl,outside:Vl,gtr:Dl,ltr:$l,intersects:ql,simplifyRange:jl,subset:Bl,SemVer:rl,re:_i.re,src:_i.src,tokens:_i.t,SEMVER_SPEC_VERSION:da.SEMVER_SPEC_VERSION,RELEASE_TYPES:da.RELEASE_TYPES,compareIdentifiers:ma.compareIdentifiers,rcompareIdentifiers:ma.rcompareIdentifiers}});var Ni=C((Kp,Aa)=>{var ye=require("fs"),ne=require("path"),ya=_s(),ae=ga(),{DEFAULT_API_URL:Ul}=Ge(),Ea=["dependencies","devDependencies","optionalDependencies","peerDependencies"];function Ii(r){let i=typeof r=="string"&&r.match(/^((?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*)(?:@([^\r\n]+))?$/);if(!i)throw new Error(`Invalid npm dependency: ${String(r)}`);return{name:i[1],version:i[2]}}function ki(r){let i=new Map;for(let n of r){let{name:o,version:l}=Ii(n),h=i.get(o);i.set(o,h&&l?ba(o,h,l):l||h)}return i}function ba(r,i,n){if(i===n)return i;let o=ae.validRange(i),l=ae.validRange(n);if(o&&l)try{if(ae.subset(l,o))return n;if(ae.subset(o,l))return i}catch{}throw new Error(`Conflicting registry versions for ${r}: ${i} and ${n}`)}function Ml(r,i){let n=typeof r=="string"&&ae.validRange(r),o=ae.validRange(i);if(!n||!o)return!1;try{return ae.subset(n,o)}catch{return!1}}function _t(r,i){if(Ml(r,i))return"satisfied";let n=typeof r=="string"&&ae.validRange(r),o=ae.validRange(i);if(!n||!o)return"incomparable";try{let l=ae.minVersion(n),h=ae.minVersion(o);return!l||!h?"incomparable":ae.lt(l,h)?"lower":"newer"}catch{return"incomparable"}}function Ct(r,i){let n=Ea.find(o=>Object.hasOwn(r[o]||{},i));return n?{section:n,existing:r[n][i]}:null}function Sa(r,i){let n=ki(i);if(n.size===0)return;let o=ne.join(r,"package.json"),l=JSON.parse(ye.readFileSync(o,"utf8"));for(let[h,f]of n){let m=Ct(l,h),y=m?.section||"dependencies";l[y]||={};let x=m?.existing;l[y][h]=x===void 0?f||"latest":f&&_t(x,f)==="lower"?f:x}ye.writeFileSync(o,`${JSON.stringify(l,null,2)}
|
|
3
|
-
`)}function It(r){let i=[["pnpm-lock.yaml","pnpm"],["yarn.lock","yarn"],["bun.lock","bun"],["bun.lockb","bun"],["package-lock.json","npm"],["npm-shrinkwrap.json","npm"]];for(let n=ne.resolve(r);;n=ne.dirname(n)){let o=ne.join(n,"package.json");if(ye.existsSync(o)){let l=JSON.parse(ye.readFileSync(o,"utf8")),h=String(l.packageManager||"").split("@")[0];if(["npm","pnpm","yarn","bun"].includes(h))return h}for(let[l,h]of i)if(ye.existsSync(ne.join(n,l)))return h;if(ne.dirname(n)===n)return"npm"}}var va={npm:"npx",pnpm:"pnpm exec",yarn:"yarn",bun:"bunx"};function wa(r,i=process.cwd()){let n;try{n=It(i)}catch{n="npm"}return`${va[n]||va.npm} frontfriend ${r}`}function Gl(r,i=process.cwd()){let n=null;try{n=r?new URL(r).origin:null}catch{n=null}return wa(n&&n!==new URL(Ul).origin?`login --api-url ${n}`:"login",i)}function Ca(r){return JSON.parse(ye.readFileSync(ne.join(r,"package.json"),"utf8"))}function Ai(r,i){let n=ki(i);if(n.size===0)return[];let o=Ca(r),l=[];for(let[h,f]of n){let m=Ct(o,h);m&&(!f||_t(m.existing,f)!=="lower")||l.push(f?`${h}@${f}`:h)}return l}function Hl(r,i){let n=i.filter(g=>g.required),o=ki(n.flatMap(g=>g.dependencies)),l=(g,S)=>S.filter(E=>E.dependencies.some(k=>Ii(k).name===g)).map(E=>E.component).filter(Boolean),h=i.filter(g=>!g.required);if(o.size===0&&h.length===0)return{missing:[],kept:[],repair:[]};let f=Ca(r),m=[],y=[];for(let[g,S]of o){let E=Ct(f,g);if(!E){m.push(S?`${g}@${S}`:g);continue}if(!S)continue;let k=_t(E.existing,S);k==="lower"?m.push(`${g}@${S}`):k!=="satisfied"&&y.push({name:g,current:E.existing,declared:S,components:l(g,n)})}let x=new Map;for(let g of h.flatMap(S=>S.dependencies)){let{name:S,version:E}=Ii(g);if(o.has(S)||Ct(f,S))continue;let k=x.get(S),B=E||k?.version;if(k?.version&&E&&k.version!==E)try{B=ba(S,k.version,E)}catch{B=k.version}x.set(S,{version:B})}let w=[...x].map(([g,{version:S}])=>({request:S?`${g}@${S}`:g,components:l(g,h)}));return{missing:m,kept:y,repair:w}}function _a(r,i){return[r==="npm"?"install":"add",...i]}function Wl(r){return/^[\w@/.:^~=+-]+$/.test(r)?r:`'${r.replace(/'/g,"'\\''")}'`}function Ia(r,i){let n=It(r);return[n,..._a(n,i)].map(Wl).join(" ")}function ka(r,i,{stdio:n="inherit"}={}){let o=Ai(r,i);if(o.length===0)return;let l=It(r),h=ya.sync(l,_a(l,o),{cwd:r,stdio:n});if(h.error||h.status!==0)throw Sa(r,i),h.error||new Error(`${l} dependency installation failed with status ${h.status}. Dependencies were saved; run ${l} install.`)}function
|
|
1
|
+
var C=(r,i)=>()=>(i||r((i={exports:{}}).exports,i),i.exports);var Er=C(($f,Oo)=>{Oo.exports={name:"@frontfriend/sdk",version:"1.2.5"}});var Sr=C((qf,br)=>{var{name:Fo}=Er();br.exports={PACKAGE_NAME:Fo}});var Ge=C((jf,wr)=>{var Vo="https://app.frontfriend.dev",Do=".cache/frontfriend",$o={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"]},qo={FF_ID:"FF_ID",FF_API_URL:"FF_API_URL",FF_AUTH_TOKEN:"FF_AUTH_TOKEN",FF_MACHINE_TOKEN:"FRONTFRIEND_MACHINE_TOKEN"};function jo(r){if(!r)return null;try{let i=new URL(r);return i.hostname.startsWith("app.")?`${i.protocol}//${i.hostname.replace(/^app\./,"registry.")}`:null}catch{return null}}wr.exports={DEFAULT_API_URL:Vo,CACHE_DIR_NAME:Do,CACHE_TTL_DAYS:7,CACHE_TTL_MS:6048e5,CACHE_FILES:$o,ENV_VARS:qo,deriveRegistryFromApiUrl:jo}});var _r=C((Bf,Cr)=>{var Bt=class extends Error{constructor(i,n,o){super(i),this.name="APIError",this.statusCode=n,this.url=o,this.code=`API_${n}`}},Ut=class extends Error{constructor(i,n){super(i),this.name="CacheError",this.operation=n,this.code=`CACHE_${n.toUpperCase()}`}},Mt=class extends Error{constructor(i,n){super(i),this.name="ConfigError",this.field=n,this.code=n?`CONFIG_${String(n).toUpperCase()}`:"CONFIG_ERROR"}},Gt=class extends Error{constructor(i,n){super(i),this.name="ProcessingError",this.token=n,this.code="PROCESSING_ERROR"}};Cr.exports={APIError:Bt,CacheError:Ut,ConfigError:Mt,ProcessingError:Gt}});var He=C((Uf,Ir)=>{var j=require("fs");function Bo(r){try{let i=j.readFileSync(r,"utf8");return JSON.parse(i)}catch(i){if(i.code==="ENOENT")return null;throw i}}function Uo(r){try{return j.readFileSync(r,"utf8").replace(/^\uFEFF/,"")}catch(i){if(i.code==="ENOENT")return null;throw i}}function Mo(r,i,n=2){let o=JSON.stringify(i,null,n);j.writeFileSync(r,o,"utf8")}function Go(r,i){j.writeFileSync(r,i,"utf8")}function Ho(r,i){if(i==null||typeof i=="object"&&Object.keys(i).length===0||Array.isArray(i)&&i.length===0){let o=`module.exports = ${Array.isArray(i)?"[]":"{}"};`;j.writeFileSync(r,o,"utf8")}else{let n=`module.exports = ${JSON.stringify(i,null,2)};`;j.writeFileSync(r,n,"utf8")}}function Wo(r){return j.existsSync(r)}function Xo(r){j.mkdirSync(r,{recursive:!0})}function zo(r){j.rmSync(r,{recursive:!0,force:!0})}function Ko(r){j.rmSync(r,{force:!0})}function Yo(r,i){j.mkdirSync(require("path").dirname(r),{recursive:!0,mode:448});let n=`${r}.${process.pid}.${Date.now()}.tmp`;try{j.writeFileSync(n,`${JSON.stringify(i,null,2)}
|
|
2
|
+
`,{mode:384}),j.renameSync(n,r);try{j.chmodSync(r,384)}catch{}}finally{j.rmSync(n,{force:!0})}}async function Jo(r,i,n){j.mkdirSync(require("path").dirname(r),{recursive:!0,mode:448});let o=`${r}.lock`,l=Date.now()+2e4,h;for(;h===void 0;)try{h=j.openSync(o,"wx",384),j.writeFileSync(h,String(process.pid))}catch(f){if(f.code!=="EEXIST")throw f;try{let m=Number(j.readFileSync(o,"utf8"));if(Number.isInteger(m)&&m>0)try{process.kill(m,0)}catch(y){if(y.code==="ESRCH"){j.unlinkSync(o);continue}}}catch(m){if(m.code==="ENOENT")continue}if(Date.now()>=l)throw n();await new Promise(m=>setTimeout(m,50))}try{return await i()}finally{j.closeSync(h),j.unlinkSync(o)}}Ir.exports={writePrivateJsonFileAtomic:Yo,withPrivateFileLock:Jo,readJsonFileSafe:Bo,readFileSafe:Uo,writeJsonFile:Mo,writeTextFile:Go,writeModuleExportsFile:Ho,fileExists:Wo,ensureDirectoryExists:Xo,removeDirectory:zo,removeFile:Ko}});var Ht=C((Mf,kr)=>{var Qo="classes.txt",Zo="classes.css";kr.exports={CLASSES_SOURCE_FILE:Qo,CSS_CLASSES_SOURCE_FILE:Zo}});var Lr=C((Gf,Tr)=>{var Q=require("path"),{CACHE_DIR_NAME:eu,CACHE_TTL_MS:tu,CACHE_FILES:Ar}=Ge(),{CacheError:Wt}=_r(),{readJsonFileSafe:ht,readFileSafe:iu,writeJsonFile:Nr,writeTextFile:Rr,writeModuleExportsFile:Pr,fileExists:Xt,ensureDirectoryExists:ru,removeDirectory:su,removeFile:nu}=He(),{CLASSES_SOURCE_FILE:au,CSS_CLASSES_SOURCE_FILE:ou}=Ht(),zt=class r{constructor(i=process.cwd()){this.appRoot=i,this.cacheDir=Q.join(i,"node_modules",eu),this.metadataFile=Q.join(this.cacheDir,"metadata.json"),this.maxAge=tu}getCacheDir(){return this.cacheDir}isLocalOnly(){return ht(this.metadataFile)?.version==="local-components"}getIconLibrary(){let i=Q.join(this.cacheDir,"iconLibrary.json");return Xt(i)?ht(i):null}exists(){return Xt(this.cacheDir)}isValid(){if(!this.exists())return!1;try{let i=ht(this.metadataFile);if(!i)return!1;let n=new Date(i.timestamp).getTime();return Date.now()-n<this.maxAge}catch{return!1}}load(){if(!this.exists())return null;try{let i={};for(let n of Ar.JS){let o=Q.join(this.cacheDir,n);if(Xt(o)){let l=n.replace(".js","");try{let h=iu(o);if(h!==null){let f={},m={exports:f};new Function("module","exports",h)(m,f),i[l]=m.exports}}catch(h){console.warn(`[Frontfriend] Failed to load ${n}: ${h.message}`),(h.message.includes("Unexpected token")||h.message.includes("Invalid character"))&&console.warn("[Frontfriend] This might be a BOM or encoding issue. Try deleting node_modules/.cache/frontfriend and running `npx frontfriend init` again.")}}}for(let n of Ar.JSON){let o=Q.join(this.cacheDir,n),l=n.replace(".json",""),h=ht(o);h!==null&&(i[l]=h)}return i["components-config"]&&(i.componentsConfig=i["components-config"],delete i["components-config"]),i.cls&&!i.safelist&&(i.safelist=i.cls,delete i.cls),i}catch(i){throw new Wt(`Failed to load cache: ${i.message}`,"read")}}save(i){try{ru(this.cacheDir);let n={timestamp:new Date().toISOString(),version:i.metadata?.version||"2.0.0",ffId:i.metadata?.ffId},o=["tokens","variables","semanticVariables","semanticDarkVariables","keyframes","animations","safelist","custom"];for(let h of o)if(i[h]!==void 0){let f=Q.join(this.cacheDir,`${h}.js`);Pr(f,i[h])}if(i.safelist&&Array.isArray(i.safelist)){let h=Q.join(this.cacheDir,"safelist.js");Pr(h,i.safelist)}let l={fonts:i.fonts,icons:i.icons||i.iconSet,"components-config":i.componentsConfig,iconLibrary:i.iconLibrary,version:i.version,versionMetadata:i.versionMetadata,base:i.base,nativeTokens:i.nativeTokens};for(let[h,f]of Object.entries(l))if(f!==void 0){let m=Q.join(this.cacheDir,`${h}.json`);Nr(m,f)}i.themeCSS!==void 0&&Rr(Q.join(this.cacheDir,"theme.css"),i.themeCSS),i.classesContent!==void 0&&(Rr(Q.join(this.cacheDir,au),i.classesContent),nu(Q.join(this.cacheDir,ou))),Nr(this.metadataFile,n)}catch(n){throw new Wt(`Failed to save cache: ${n.message}`,"write")}}saveAtomic(i,n=()=>{}){let o=require("node:fs"),{randomUUID:l}=require("node:crypto");o.mkdirSync(Q.dirname(this.cacheDir),{recursive:!0});let h=`${this.cacheDir}.write-lock`,f;try{f=o.openSync(h,"wx")}catch(x){if(x.code!=="EEXIST")throw x;let w=Number(o.readFileSync(h,"utf8")),g=!0;if(w>0)try{process.kill(w,0)}catch(S){g=S.code!=="ESRCH"}if(g)throw new Wt("Another process is installing tokens. Retry after it completes.","write");o.unlinkSync(h),f=o.openSync(h,"wx")}let m=`${this.cacheDir}.previous`,y=`${this.cacheDir}.${l()}.pending`;try{o.writeFileSync(f,String(process.pid)),!o.existsSync(this.cacheDir)&&o.existsSync(m)&&o.renameSync(m,this.cacheDir);let x=new r(this.appRoot);x.cacheDir=y,x.metadataFile=Q.join(y,"metadata.json"),x.save(i),o.existsSync(m)&&o.rmSync(m,{recursive:!0}),o.existsSync(this.cacheDir)&&o.renameSync(this.cacheDir,m);try{o.renameSync(y,this.cacheDir),n()}catch(w){throw o.rmSync(this.cacheDir,{recursive:!0,force:!0}),o.existsSync(m)&&o.renameSync(m,this.cacheDir),w}o.rmSync(m,{recursive:!0,force:!0})}finally{o.rmSync(y,{recursive:!0,force:!0}),o.closeSync(f),o.rmSync(h,{force:!0})}}clear(){this.exists()&&su(this.cacheDir)}};Tr.exports=zt});var Dr=C((Hf,Vr)=>{function de(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)}function Kt(r,i){if(!de(r)||!de(i))return i===void 0?r:i;let n={...r};for(let[o,l]of Object.entries(i))n[o]=o in n?Kt(n[o],l):l;return n}function Yt(r,i,n=[],o=[]){if(r===void 0||i===void 0)return o;if(!de(r)||!de(i))return o.push(n.join(".")),o;for(let l of Object.keys(r))l in i&&Yt(r[l],i[l],[...n,l],o);return o}function Or(r){return de(r)&&("styles"in r||"behavior"in r)}function Fr(r,i="component"){if(!Or(r)||!de(r.styles)||r.behavior!==void 0&&!de(r.behavior)||Object.keys(r).some(o=>!["styles","behavior"].includes(o)))throw new TypeError(`Component ${i} must use the styles/behavior envelope`);let n=Yt(r.styles,r.behavior,[i]);if(n.length>0)throw new Error(`Component config styles/behavior conflict at ${n.join(", ")}`);return Kt(r.styles||{},r.behavior||{})}function uu(r){if(!de(r))return r;let i=!1,n={};for(let[o,l]of Object.entries(r))n[o]=Fr(l,o),n[o]!==l&&(i=!0);return i?n:r}Vr.exports={isPlainObject:de,deepMerge:Kt,findTreeConflicts:Yt,isComponentEnvelope:Or,toRuntimeComponentConfig:Fr,toRuntimeComponentsConfig:uu}});var Ur=C((Wf,Br)=>{Br.exports=jr;jr.sync=hu;var $r=require("fs");function cu(r,i){var n=i.pathExt!==void 0?i.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var o=0;o<n.length;o++){var l=n[o].toLowerCase();if(l&&r.substr(-l.length).toLowerCase()===l)return!0}return!1}function qr(r,i,n){return!r.isSymbolicLink()&&!r.isFile()?!1:cu(i,n)}function jr(r,i,n){$r.stat(r,function(o,l){n(o,o?!1:qr(l,r,i))})}function hu(r,i){return qr($r.statSync(r),r,i)}});var Xr=C((Xf,Wr)=>{Wr.exports=Gr;Gr.sync=lu;var Mr=require("fs");function Gr(r,i,n){Mr.stat(r,function(o,l){n(o,o?!1:Hr(l,i))})}function lu(r,i){return Hr(Mr.statSync(r),i)}function Hr(r,i){return r.isFile()&&fu(r,i)}function fu(r,i){var n=r.mode,o=r.uid,l=r.gid,h=i.uid!==void 0?i.uid:process.getuid&&process.getuid(),f=i.gid!==void 0?i.gid:process.getgid&&process.getgid(),m=parseInt("100",8),y=parseInt("010",8),x=parseInt("001",8),w=m|y,g=n&x||n&y&&l===f||n&m&&o===h||n&w&&h===0;return g}});var Kr=C((Kf,zr)=>{var zf=require("fs"),lt;process.platform==="win32"||global.TESTING_WINDOWS?lt=Ur():lt=Xr();zr.exports=Jt;Jt.sync=pu;function Jt(r,i,n){if(typeof i=="function"&&(n=i,i={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(o,l){Jt(r,i||{},function(h,f){h?l(h):o(f)})})}lt(r,i||{},function(o,l){o&&(o.code==="EACCES"||i&&i.ignoreErrors)&&(o=null,l=!1),n(o,l)})}function pu(r,i){try{return lt.sync(r,i||{})}catch(n){if(i&&i.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var is=C((Yf,ts)=>{var Pe=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Yr=require("path"),du=Pe?";":":",Jr=Kr(),Qr=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),Zr=(r,i)=>{let n=i.colon||du,o=r.match(/\//)||Pe&&r.match(/\\/)?[""]:[...Pe?[process.cwd()]:[],...(i.path||process.env.PATH||"").split(n)],l=Pe?i.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",h=Pe?l.split(n):[""];return Pe&&r.indexOf(".")!==-1&&h[0]!==""&&h.unshift(""),{pathEnv:o,pathExt:h,pathExtExe:l}},es=(r,i,n)=>{typeof i=="function"&&(n=i,i={}),i||(i={});let{pathEnv:o,pathExt:l,pathExtExe:h}=Zr(r,i),f=[],m=x=>new Promise((w,g)=>{if(x===o.length)return i.all&&f.length?w(f):g(Qr(r));let S=o[x],E=/^".*"$/.test(S)?S.slice(1,-1):S,k=Yr.join(E,r),B=!E&&/^\.[\\\/]/.test(r)?r.slice(0,2)+k:k;w(y(B,x,0))}),y=(x,w,g)=>new Promise((S,E)=>{if(g===l.length)return S(m(w+1));let k=l[g];Jr(x+k,{pathExt:h},(B,Y)=>{if(!B&&Y)if(i.all)f.push(x+k);else return S(x+k);return S(y(x,w,g+1))})});return n?m(0).then(x=>n(null,x),n):m(0)},mu=(r,i)=>{i=i||{};let{pathEnv:n,pathExt:o,pathExtExe:l}=Zr(r,i),h=[];for(let f=0;f<n.length;f++){let m=n[f],y=/^".*"$/.test(m)?m.slice(1,-1):m,x=Yr.join(y,r),w=!y&&/^\.[\\\/]/.test(r)?r.slice(0,2)+x:x;for(let g=0;g<o.length;g++){let S=w+o[g];try{if(Jr.sync(S,{pathExt:l}))if(i.all)h.push(S);else return S}catch{}}}if(i.all&&h.length)return h;if(i.nothrow)return null;throw Qr(r)};ts.exports=es;es.sync=mu});var ss=C((Jf,Qt)=>{"use strict";var rs=(r={})=>{let i=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(i).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"};Qt.exports=rs;Qt.exports.default=rs});var us=C((Qf,os)=>{"use strict";var ns=require("path"),xu=is(),gu=ss();function as(r,i){let n=r.options.env||process.env,o=process.cwd(),l=r.options.cwd!=null,h=l&&process.chdir!==void 0&&!process.chdir.disabled;if(h)try{process.chdir(r.options.cwd)}catch{}let f;try{f=xu.sync(r.command,{path:n[gu({env:n})],pathExt:i?ns.delimiter:void 0})}catch{}finally{h&&process.chdir(o)}return f&&(f=ns.resolve(l?r.options.cwd:"",f)),f}function vu(r){return as(r)||as(r,!0)}os.exports=vu});var cs=C((Zf,ei)=>{"use strict";var Zt=/([()\][%!^"`<>&|;, *?])/g;function yu(r){return r=r.replace(Zt,"^$1"),r}function Eu(r,i){return r=`${r}`,r=r.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),r=r.replace(/(?=(\\+?)?)\1$/,"$1$1"),r=`"${r}"`,r=r.replace(Zt,"^$1"),i&&(r=r.replace(Zt,"^$1")),r}ei.exports.command=yu;ei.exports.argument=Eu});var ls=C((ep,hs)=>{"use strict";hs.exports=/^#!(.*)/});var ps=C((tp,fs)=>{"use strict";var bu=ls();fs.exports=(r="")=>{let i=r.match(bu);if(!i)return null;let[n,o]=i[0].replace(/#! ?/,"").split(" "),l=n.split("/").pop();return l==="env"?o:o?`${l} ${o}`:l}});var ms=C((ip,ds)=>{"use strict";var ti=require("fs"),Su=ps();function wu(r){let n=Buffer.alloc(150),o;try{o=ti.openSync(r,"r"),ti.readSync(o,n,0,150,0),ti.closeSync(o)}catch{}return Su(n.toString())}ds.exports=wu});var ys=C((rp,vs)=>{"use strict";var Cu=require("path"),xs=us(),gs=cs(),_u=ms(),Iu=process.platform==="win32",ku=/\.(?:com|exe)$/i,Au=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Nu(r){r.file=xs(r);let i=r.file&&_u(r.file);return i?(r.args.unshift(r.file),r.command=i,xs(r)):r.file}function Ru(r){if(!Iu)return r;let i=Nu(r),n=!ku.test(i);if(r.options.forceShell||n){let o=Au.test(i);r.command=Cu.normalize(r.command),r.command=gs.command(r.command),r.args=r.args.map(h=>gs.argument(h,o));let l=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${l}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function Pu(r,i,n){i&&!Array.isArray(i)&&(n=i,i=null),i=i?i.slice(0):[],n=Object.assign({},n);let o={command:r,args:i,options:n,file:void 0,original:{command:r,args:i}};return n.shell?o:Ru(o)}vs.exports=Pu});var Ss=C((sp,bs)=>{"use strict";var ii=process.platform==="win32";function ri(r,i){return Object.assign(new Error(`${i} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${i} ${r.command}`,path:r.command,spawnargs:r.args})}function Tu(r,i){if(!ii)return;let n=r.emit;r.emit=function(o,l){if(o==="exit"){let h=Es(l,i);if(h)return n.call(r,"error",h)}return n.apply(r,arguments)}}function Es(r,i){return ii&&r===1&&!i.file?ri(i.original,"spawn"):null}function Lu(r,i){return ii&&r===1&&!i.file?ri(i.original,"spawnSync"):null}bs.exports={hookChildProcess:Tu,verifyENOENT:Es,verifyENOENTSync:Lu,notFoundError:ri}});var _s=C((np,Te)=>{"use strict";var ws=require("child_process"),si=ys(),ni=Ss();function Cs(r,i,n){let o=si(r,i,n),l=ws.spawn(o.command,o.args,o.options);return ni.hookChildProcess(l,o),l}function Ou(r,i,n){let o=si(r,i,n),l=ws.spawnSync(o.command,o.args,o.options);return l.error=l.error||ni.verifyENOENTSync(l.status,o),l}Te.exports=Cs;Te.exports.spawn=Cs;Te.exports.sync=Ou;Te.exports._parse=si;Te.exports._enoent=ni});var Le=C((ap,Is)=>{"use strict";var Fu="2.0.0",Vu=Number.MAX_SAFE_INTEGER||9007199254740991,Du=16,$u=250,qu=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Is.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Du,MAX_SAFE_BUILD_LENGTH:$u,MAX_SAFE_INTEGER:Vu,RELEASE_TYPES:qu,SEMVER_SPEC_VERSION:Fu,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var We=C((op,ks)=>{"use strict";var ju=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};ks.exports=ju});var Oe=C((ce,As)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ai,MAX_SAFE_BUILD_LENGTH:Bu,MAX_LENGTH:Uu}=Le(),Mu=We();ce=As.exports={};var Gu=ce.re=[],Hu=ce.safeRe=[],_=ce.src=[],Wu=ce.safeSrc=[],I=ce.t={},Xu=0,oi="[a-zA-Z0-9-]",zu=[["\\s",1],["\\d",Uu],[oi,Bu]],Ku=r=>{for(let[i,n]of zu)r=r.split(`${i}*`).join(`${i}{0,${n}}`).split(`${i}+`).join(`${i}{1,${n}}`);return r},T=(r,i,n)=>{let o=Ku(i),l=Xu++;Mu(r,l,i),I[r]=l,_[l]=i,Wu[l]=o,Gu[l]=new RegExp(i,n?"g":void 0),Hu[l]=new RegExp(o,n?"g":void 0)};T("NUMERICIDENTIFIER","0|[1-9]\\d*");T("NUMERICIDENTIFIERLOOSE","\\d+");T("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${oi}*`);T("MAINVERSION",`(${_[I.NUMERICIDENTIFIER]})\\.(${_[I.NUMERICIDENTIFIER]})\\.(${_[I.NUMERICIDENTIFIER]})`);T("MAINVERSIONLOOSE",`(${_[I.NUMERICIDENTIFIERLOOSE]})\\.(${_[I.NUMERICIDENTIFIERLOOSE]})\\.(${_[I.NUMERICIDENTIFIERLOOSE]})`);T("PRERELEASEIDENTIFIER",`(?:${_[I.NONNUMERICIDENTIFIER]}|${_[I.NUMERICIDENTIFIER]})`);T("PRERELEASEIDENTIFIERLOOSE",`(?:${_[I.NONNUMERICIDENTIFIER]}|${_[I.NUMERICIDENTIFIERLOOSE]})`);T("PRERELEASE",`(?:-(${_[I.PRERELEASEIDENTIFIER]}(?:\\.${_[I.PRERELEASEIDENTIFIER]})*))`);T("PRERELEASELOOSE",`(?:-?(${_[I.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_[I.PRERELEASEIDENTIFIERLOOSE]})*))`);T("BUILDIDENTIFIER",`${oi}+`);T("BUILD",`(?:\\+(${_[I.BUILDIDENTIFIER]}(?:\\.${_[I.BUILDIDENTIFIER]})*))`);T("FULLPLAIN",`v?${_[I.MAINVERSION]}${_[I.PRERELEASE]}?${_[I.BUILD]}?`);T("FULL",`^${_[I.FULLPLAIN]}$`);T("LOOSEPLAIN",`[v=\\s]*${_[I.MAINVERSIONLOOSE]}${_[I.PRERELEASELOOSE]}?${_[I.BUILD]}?`);T("LOOSE",`^${_[I.LOOSEPLAIN]}$`);T("GTLT","((?:<|>)?=?)");T("XRANGEIDENTIFIERLOOSE",`${_[I.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);T("XRANGEIDENTIFIER",`${_[I.NUMERICIDENTIFIER]}|x|X|\\*`);T("XRANGEPLAIN",`[v=\\s]*(${_[I.XRANGEIDENTIFIER]})(?:\\.(${_[I.XRANGEIDENTIFIER]})(?:\\.(${_[I.XRANGEIDENTIFIER]})(?:${_[I.PRERELEASE]})?${_[I.BUILD]}?)?)?`);T("XRANGEPLAINLOOSE",`[v=\\s]*(${_[I.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[I.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[I.XRANGEIDENTIFIERLOOSE]})(?:${_[I.PRERELEASELOOSE]})?${_[I.BUILD]}?)?)?`);T("XRANGE",`^${_[I.GTLT]}\\s*${_[I.XRANGEPLAIN]}$`);T("XRANGELOOSE",`^${_[I.GTLT]}\\s*${_[I.XRANGEPLAINLOOSE]}$`);T("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ai}})(?:\\.(\\d{1,${ai}}))?(?:\\.(\\d{1,${ai}}))?`);T("COERCE",`${_[I.COERCEPLAIN]}(?:$|[^\\d])`);T("COERCEFULL",_[I.COERCEPLAIN]+`(?:${_[I.PRERELEASE]})?(?:${_[I.BUILD]})?(?:$|[^\\d])`);T("COERCERTL",_[I.COERCE],!0);T("COERCERTLFULL",_[I.COERCEFULL],!0);T("LONETILDE","(?:~>?)");T("TILDETRIM",`(\\s*)${_[I.LONETILDE]}\\s+`,!0);ce.tildeTrimReplace="$1~";T("TILDE",`^${_[I.LONETILDE]}${_[I.XRANGEPLAIN]}$`);T("TILDELOOSE",`^${_[I.LONETILDE]}${_[I.XRANGEPLAINLOOSE]}$`);T("LONECARET","(?:\\^)");T("CARETTRIM",`(\\s*)${_[I.LONECARET]}\\s+`,!0);ce.caretTrimReplace="$1^";T("CARET",`^${_[I.LONECARET]}${_[I.XRANGEPLAIN]}$`);T("CARETLOOSE",`^${_[I.LONECARET]}${_[I.XRANGEPLAINLOOSE]}$`);T("COMPARATORLOOSE",`^${_[I.GTLT]}\\s*(${_[I.LOOSEPLAIN]})$|^$`);T("COMPARATOR",`^${_[I.GTLT]}\\s*(${_[I.FULLPLAIN]})$|^$`);T("COMPARATORTRIM",`(\\s*)${_[I.GTLT]}\\s*(${_[I.LOOSEPLAIN]}|${_[I.XRANGEPLAIN]})`,!0);ce.comparatorTrimReplace="$1$2$3";T("HYPHENRANGE",`^\\s*(${_[I.XRANGEPLAIN]})\\s+-\\s+(${_[I.XRANGEPLAIN]})\\s*$`);T("HYPHENRANGELOOSE",`^\\s*(${_[I.XRANGEPLAINLOOSE]})\\s+-\\s+(${_[I.XRANGEPLAINLOOSE]})\\s*$`);T("STAR","(<|>)?=?\\s*\\*");T("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");T("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var ft=C((up,Ns)=>{"use strict";var Yu=Object.freeze({loose:!0}),Ju=Object.freeze({}),Qu=r=>r?typeof r!="object"?Yu:r:Ju;Ns.exports=Qu});var ui=C((cp,Ts)=>{"use strict";var Rs=/^[0-9]+$/,Ps=(r,i)=>{if(typeof r=="number"&&typeof i=="number")return r===i?0:r<i?-1:1;let n=Rs.test(r),o=Rs.test(i);return n&&o&&(r=+r,i=+i),r===i?0:n&&!o?-1:o&&!n?1:r<i?-1:1},Zu=(r,i)=>Ps(i,r);Ts.exports={compareIdentifiers:Ps,rcompareIdentifiers:Zu}});var G=C((hp,Os)=>{"use strict";var pt=We(),{MAX_LENGTH:Ls,MAX_SAFE_INTEGER:dt}=Le(),{safeRe:mt,t:xt}=Oe(),ec=ft(),{compareIdentifiers:ci}=ui(),tc=(r,i)=>{let n=i.split(".");if(n.length>r.length)return!1;for(let o=0;o<n.length;o++)if(ci(r[o],n[o])!==0)return!1;return!0},hi=class r{constructor(i,n){if(n=ec(n),i instanceof r){if(i.loose===!!n.loose&&i.includePrerelease===!!n.includePrerelease)return i;i=i.version}else if(typeof i!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof i}".`);if(i.length>Ls)throw new TypeError(`version is longer than ${Ls} characters`);pt("SemVer",i,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let o=i.trim().match(n.loose?mt[xt.LOOSE]:mt[xt.FULL]);if(!o)throw new TypeError(`Invalid Version: ${i}`);if(this.raw=i,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>dt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>dt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>dt||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(l=>{if(/^[0-9]+$/.test(l)){let h=+l;if(h>=0&&h<dt)return h}return l}):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(i){if(pt("SemVer.compare",this.version,this.options,i),!(i instanceof r)){if(typeof i=="string"&&i===this.version)return 0;i=new r(i,this.options)}return i.version===this.version?0:this.compareMain(i)||this.comparePre(i)}compareMain(i){return i instanceof r||(i=new r(i,this.options)),this.major<i.major?-1:this.major>i.major?1:this.minor<i.minor?-1:this.minor>i.minor?1:this.patch<i.patch?-1:this.patch>i.patch?1:0}comparePre(i){if(i instanceof r||(i=new r(i,this.options)),this.prerelease.length&&!i.prerelease.length)return-1;if(!this.prerelease.length&&i.prerelease.length)return 1;if(!this.prerelease.length&&!i.prerelease.length)return 0;let n=0;do{let o=this.prerelease[n],l=i.prerelease[n];if(pt("prerelease compare",n,o,l),o===void 0&&l===void 0)return 0;if(l===void 0)return 1;if(o===void 0)return-1;if(o===l)continue;return ci(o,l)}while(++n)}compareBuild(i){i instanceof r||(i=new r(i,this.options));let n=0;do{let o=this.build[n],l=i.build[n];if(pt("build compare",n,o,l),o===void 0&&l===void 0)return 0;if(l===void 0)return 1;if(o===void 0)return-1;if(o===l)continue;return ci(o,l)}while(++n)}inc(i,n,o){if(i.startsWith("pre")){if(!n&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let l=`-${n}`.match(this.options.loose?mt[xt.PRERELEASELOOSE]:mt[xt.PRERELEASE]);if(!l||l[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(i){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 l=Number(o)?1:0;if(this.prerelease.length===0)this.prerelease=[l];else{let h=this.prerelease.length;for(;--h>=0;)typeof this.prerelease[h]=="number"&&(this.prerelease[h]++,h=-2);if(h===-1){if(n===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(l)}}if(n){let h=[n,l];if(o===!1&&(h=[n]),tc(this.prerelease,n)){let f=this.prerelease[n.split(".").length];isNaN(f)&&(this.prerelease=h)}else this.prerelease=h}break}default:throw new Error(`invalid increment argument: ${i}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Os.exports=hi});var ve=C((lp,Vs)=>{"use strict";var Fs=G(),ic=(r,i,n=!1)=>{if(r instanceof Fs)return r;try{return new Fs(r,i)}catch(o){if(!n)return null;throw o}};Vs.exports=ic});var $s=C((fp,Ds)=>{"use strict";var rc=ve(),sc=(r,i)=>{let n=rc(r,i);return n?n.version:null};Ds.exports=sc});var js=C((pp,qs)=>{"use strict";var nc=ve(),ac=(r,i)=>{let n=nc(r.trim().replace(/^[=v]+/,""),i);return n?n.version:null};qs.exports=ac});var Ms=C((dp,Us)=>{"use strict";var Bs=G(),oc=(r,i,n,o,l)=>{typeof n=="string"&&(l=o,o=n,n=void 0);try{return new Bs(r instanceof Bs?r.version:r,n).inc(i,o,l).version}catch{return null}};Us.exports=oc});var Ws=C((mp,Hs)=>{"use strict";var Gs=ve(),uc=(r,i)=>{let n=Gs(r,null,!0),o=Gs(i,null,!0),l=n.compare(o);if(l===0)return null;let h=l>0,f=h?n:o,m=h?o:n,y=!!f.prerelease.length;if(!!m.prerelease.length&&!y){if(!m.patch&&!m.minor)return"major";if(m.compareMain(f)===0)return m.minor&&!m.patch?"minor":"patch"}let w=y?"pre":"";return n.major!==o.major?w+"major":n.minor!==o.minor?w+"minor":n.patch!==o.patch?w+"patch":"prerelease"};Hs.exports=uc});var zs=C((xp,Xs)=>{"use strict";var cc=G(),hc=(r,i)=>new cc(r,i).major;Xs.exports=hc});var Ys=C((gp,Ks)=>{"use strict";var lc=G(),fc=(r,i)=>new lc(r,i).minor;Ks.exports=fc});var Qs=C((vp,Js)=>{"use strict";var pc=G(),dc=(r,i)=>new pc(r,i).patch;Js.exports=dc});var en=C((yp,Zs)=>{"use strict";var mc=ve(),xc=(r,i)=>{let n=mc(r,i);return n&&n.prerelease.length?n.prerelease:null};Zs.exports=xc});var re=C((Ep,rn)=>{"use strict";var tn=G(),gc=(r,i,n)=>new tn(r,n).compare(new tn(i,n));rn.exports=gc});var nn=C((bp,sn)=>{"use strict";var vc=re(),yc=(r,i,n)=>vc(i,r,n);sn.exports=yc});var on=C((Sp,an)=>{"use strict";var Ec=re(),bc=(r,i)=>Ec(r,i,!0);an.exports=bc});var gt=C((wp,cn)=>{"use strict";var un=G(),Sc=(r,i,n)=>{let o=new un(r,n),l=new un(i,n);return o.compare(l)||o.compareBuild(l)};cn.exports=Sc});var ln=C((Cp,hn)=>{"use strict";var wc=gt(),Cc=(r,i)=>r.sort((n,o)=>wc(n,o,i));hn.exports=Cc});var pn=C((_p,fn)=>{"use strict";var _c=gt(),Ic=(r,i)=>r.sort((n,o)=>_c(o,n,i));fn.exports=Ic});var Xe=C((Ip,dn)=>{"use strict";var kc=re(),Ac=(r,i,n)=>kc(r,i,n)>0;dn.exports=Ac});var vt=C((kp,mn)=>{"use strict";var Nc=re(),Rc=(r,i,n)=>Nc(r,i,n)<0;mn.exports=Rc});var li=C((Ap,xn)=>{"use strict";var Pc=re(),Tc=(r,i,n)=>Pc(r,i,n)===0;xn.exports=Tc});var fi=C((Np,gn)=>{"use strict";var Lc=re(),Oc=(r,i,n)=>Lc(r,i,n)!==0;gn.exports=Oc});var yt=C((Rp,vn)=>{"use strict";var Fc=re(),Vc=(r,i,n)=>Fc(r,i,n)>=0;vn.exports=Vc});var Et=C((Pp,yn)=>{"use strict";var Dc=re(),$c=(r,i,n)=>Dc(r,i,n)<=0;yn.exports=$c});var pi=C((Tp,En)=>{"use strict";var qc=li(),jc=fi(),Bc=Xe(),Uc=yt(),Mc=vt(),Gc=Et(),Hc=(r,i,n,o)=>{switch(i){case"===":return typeof r=="object"&&(r=r.version),typeof n=="object"&&(n=n.version),r===n;case"!==":return typeof r=="object"&&(r=r.version),typeof n=="object"&&(n=n.version),r!==n;case"":case"=":case"==":return qc(r,n,o);case"!=":return jc(r,n,o);case">":return Bc(r,n,o);case">=":return Uc(r,n,o);case"<":return Mc(r,n,o);case"<=":return Gc(r,n,o);default:throw new TypeError(`Invalid operator: ${i}`)}};En.exports=Hc});var Sn=C((Lp,bn)=>{"use strict";var Wc=G(),Xc=ve(),{safeRe:bt,t:St}=Oe(),zc=(r,i)=>{if(r instanceof Wc)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;i=i||{};let n=null;if(!i.rtl)n=r.match(i.includePrerelease?bt[St.COERCEFULL]:bt[St.COERCE]);else{let y=i.includePrerelease?bt[St.COERCERTLFULL]:bt[St.COERCERTL],x;for(;(x=y.exec(r))&&(!n||n.index+n[0].length!==r.length);)(!n||x.index+x[0].length!==n.index+n[0].length)&&(n=x),y.lastIndex=x.index+x[1].length+x[2].length;y.lastIndex=-1}if(n===null)return null;let o=n[2],l=n[3]||"0",h=n[4]||"0",f=i.includePrerelease&&n[5]?`-${n[5]}`:"",m=i.includePrerelease&&n[6]?`+${n[6]}`:"";return Xc(`${o}.${l}.${h}${f}${m}`,i)};bn.exports=zc});var Cn=C((Op,wn)=>{"use strict";var Kc=ve(),Yc=Le(),Jc=G(),Qc=(r,i,n)=>{if(!Yc.RELEASE_TYPES.includes(i))return null;let o=Zc(r,n);return o&&eh(o,i)},Zc=(r,i)=>{let n=r instanceof Jc?r.version:r;return Kc(n,i)},eh=(r,i)=>{if(th(i))return r.version;switch(r.prerelease=[],i){case"major":r.minor=0,r.patch=0;break;case"minor":r.patch=0;break}return r.format()},th=r=>r.startsWith("pre");wn.exports=Qc});var In=C((Fp,_n)=>{"use strict";var di=class{constructor(){this.max=1e3,this.map=new Map}get(i){let n=this.map.get(i);if(n!==void 0)return this.map.delete(i),this.map.set(i,n),n}delete(i){return this.map.delete(i)}set(i,n){if(!this.delete(i)&&n!==void 0){if(this.map.size>=this.max){let l=this.map.keys().next().value;this.delete(l)}this.map.set(i,n)}return this}};_n.exports=di});var se=C((Vp,Rn)=>{"use strict";var ih=/\s+/g,mi=class r{constructor(i,n){if(n=sh(n),i instanceof r)return i.loose===!!n.loose&&i.includePrerelease===!!n.includePrerelease?i:new r(i.raw,n);if(i instanceof xi)return this.raw=i.value,this.set=[[i]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=i.trim().replace(ih," "),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(l=>!An(l[0])),this.set.length===0)this.set=[o];else if(this.set.length>1){for(let l of this.set)if(l.length===1&&ph(l[0])){this.set=[l];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let i=0;i<this.set.length;i++){i>0&&(this.formatted+="||");let n=this.set[i];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(i){i=i.replace(fh,"");let o=((this.options.includePrerelease&&hh)|(this.options.loose&&lh))+":"+i,l=kn.get(o);if(l)return l;let h=this.options.loose,f=h?K[H.HYPHENRANGELOOSE]:K[H.HYPHENRANGE];i=i.replace(f,Ch(this.options.includePrerelease)),$("hyphen replace",i),i=i.replace(K[H.COMPARATORTRIM],oh),$("comparator trim",i),i=i.replace(K[H.TILDETRIM],uh),$("tilde trim",i),i=i.replace(K[H.CARETTRIM],ch),$("caret trim",i);let m=i.split(" ").map(g=>dh(g,this.options)).join(" ").split(/\s+/).map(g=>wh(g,this.options));h&&(m=m.filter(g=>($("loose invalid filter",g,this.options),!!g.match(K[H.COMPARATORLOOSE])))),$("range list",m);let y=new Map,x=m.map(g=>new xi(g,this.options));for(let g of x){if(An(g))return[g];y.set(g.value,g)}y.size>1&&y.has("")&&y.delete("");let w=[...y.values()];return kn.set(o,w),w}intersects(i,n){if(!(i instanceof r))throw new TypeError("a Range is required");return this.set.some(o=>Nn(o,n)&&i.set.some(l=>Nn(l,n)&&o.every(h=>l.every(f=>h.intersects(f,n)))))}test(i){if(!i)return!1;if(typeof i=="string")try{i=new nh(i,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(_h(this.set[n],i,this.options))return!0;return!1}};Rn.exports=mi;var rh=In(),kn=new rh,sh=ft(),xi=ze(),$=We(),nh=G(),{safeRe:K,src:ah,t:H,comparatorTrimReplace:oh,tildeTrimReplace:uh,caretTrimReplace:ch}=Oe(),{FLAG_INCLUDE_PRERELEASE:hh,FLAG_LOOSE:lh}=Le(),fh=new RegExp(ah[H.BUILD],"g"),An=r=>r.value==="<0.0.0-0",ph=r=>r.value==="",Nn=(r,i)=>{let n=!0,o=r.slice(),l=o.pop();for(;n&&o.length;)n=o.every(h=>l.intersects(h,i)),l=o.pop();return n},dh=(r,i)=>(r=r.replace(K[H.BUILD],""),$("comp",r,i),r=vh(r,i),$("caret",r),r=xh(r,i),$("tildes",r),r=Eh(r,i),$("xrange",r),r=Sh(r,i),$("stars",r),r),U=r=>!r||r.toLowerCase()==="x"||r==="*",mh=(r,i,n)=>U(r)&&!U(i)||U(i)&&n&&!U(n),xh=(r,i)=>r.trim().split(/\s+/).map(n=>gh(n,i)).join(" "),gh=(r,i)=>{let n=i.loose?K[H.TILDELOOSE]:K[H.TILDE],o=i.includePrerelease?"-0":"";return r.replace(n,(l,h,f,m,y)=>{$("tilde",r,l,h,f,m,y);let x;return U(h)?x="":U(f)?x=`>=${h}.0.0${o} <${+h+1}.0.0-0`:U(m)?x=`>=${h}.${f}.0${o} <${h}.${+f+1}.0-0`:y?($("replaceTilde pr",y),x=`>=${h}.${f}.${m}-${y} <${h}.${+f+1}.0-0`):x=`>=${h}.${f}.${m} <${h}.${+f+1}.0-0`,$("tilde return",x),x})},vh=(r,i)=>r.trim().split(/\s+/).map(n=>yh(n,i)).join(" "),yh=(r,i)=>{$("caret",r,i);let n=i.loose?K[H.CARETLOOSE]:K[H.CARET],o=i.includePrerelease?"-0":"";return r.replace(n,(l,h,f,m,y)=>{$("caret",r,l,h,f,m,y);let x;return U(h)?x="":U(f)?x=`>=${h}.0.0${o} <${+h+1}.0.0-0`:U(m)?h==="0"?x=`>=${h}.${f}.0${o} <${h}.${+f+1}.0-0`:x=`>=${h}.${f}.0${o} <${+h+1}.0.0-0`:y?($("replaceCaret pr",y),h==="0"?f==="0"?x=`>=${h}.${f}.${m}-${y} <${h}.${f}.${+m+1}-0`:x=`>=${h}.${f}.${m}-${y} <${h}.${+f+1}.0-0`:x=`>=${h}.${f}.${m}-${y} <${+h+1}.0.0-0`):($("no pr"),h==="0"?f==="0"?x=`>=${h}.${f}.${m} <${h}.${f}.${+m+1}-0`:x=`>=${h}.${f}.${m} <${h}.${+f+1}.0-0`:x=`>=${h}.${f}.${m} <${+h+1}.0.0-0`),$("caret return",x),x})},Eh=(r,i)=>($("replaceXRanges",r,i),r.split(/\s+/).map(n=>bh(n,i)).join(" ")),bh=(r,i)=>{r=r.trim();let n=i.loose?K[H.XRANGELOOSE]:K[H.XRANGE];return r.replace(n,(o,l,h,f,m,y)=>{if($("xRange",r,o,l,h,f,m,y),mh(h,f,m))return r;let x=U(h),w=x||U(f),g=w||U(m),S=g;return l==="="&&S&&(l=""),y=i.includePrerelease?"-0":"",x?l===">"||l==="<"?o="<0.0.0-0":o="*":l&&S?(w&&(f=0),m=0,l===">"?(l=">=",w?(h=+h+1,f=0,m=0):(f=+f+1,m=0)):l==="<="&&(l="<",w?h=+h+1:f=+f+1),l==="<"&&(y="-0"),o=`${l+h}.${f}.${m}${y}`):w?o=`>=${h}.0.0${y} <${+h+1}.0.0-0`:g&&(o=`>=${h}.${f}.0${y} <${h}.${+f+1}.0-0`),$("xRange return",o),o})},Sh=(r,i)=>($("replaceStars",r,i),r.trim().replace(K[H.STAR],"")),wh=(r,i)=>($("replaceGTE0",r,i),r.trim().replace(K[i.includePrerelease?H.GTE0PRE:H.GTE0],"")),Ch=r=>(i,n,o,l,h,f,m,y,x,w,g,S)=>(U(o)?n="":U(l)?n=`>=${o}.0.0${r?"-0":""}`:U(h)?n=`>=${o}.${l}.0${r?"-0":""}`:f?n=`>=${n}`:n=`>=${n}${r?"-0":""}`,U(x)?y="":U(w)?y=`<${+x+1}.0.0-0`:U(g)?y=`<${x}.${+w+1}.0-0`:S?y=`<=${x}.${w}.${g}-${S}`:r?y=`<${x}.${w}.${+g+1}-0`:y=`<=${y}`,`${n} ${y}`.trim()),_h=(r,i,n)=>{for(let o=0;o<r.length;o++)if(!r[o].test(i))return!1;if(i.prerelease.length&&!n.includePrerelease){for(let o=0;o<r.length;o++)if($(r[o].semver),r[o].semver!==xi.ANY&&r[o].semver.prerelease.length>0){let l=r[o].semver;if(l.major===i.major&&l.minor===i.minor&&l.patch===i.patch)return!0}return!1}return!0}});var ze=C((Dp,Vn)=>{"use strict";var Ke=Symbol("SemVer ANY"),yi=class r{static get ANY(){return Ke}constructor(i,n){if(n=Pn(n),i instanceof r){if(i.loose===!!n.loose)return i;i=i.value}i=i.trim().split(/\s+/).join(" "),vi("comparator",i,n),this.options=n,this.loose=!!n.loose,this.parse(i),this.semver===Ke?this.value="":this.value=this.operator+this.semver.version,vi("comp",this)}parse(i){let n=this.options.loose?Tn[Ln.COMPARATORLOOSE]:Tn[Ln.COMPARATOR],o=i.match(n);if(!o)throw new TypeError(`Invalid comparator: ${i}`);this.operator=o[1]!==void 0?o[1]:"",this.operator==="="&&(this.operator=""),o[2]?this.semver=new On(o[2],this.options.loose):this.semver=Ke}toString(){return this.value}test(i){if(vi("Comparator.test",i,this.options.loose),this.semver===Ke||i===Ke)return!0;if(typeof i=="string")try{i=new On(i,this.options)}catch{return!1}return gi(i,this.operator,this.semver,this.options)}intersects(i,n){if(!(i instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Fn(i.value,n).test(this.value):i.operator===""?i.value===""?!0:new Fn(this.value,n).test(i.semver):(n=Pn(n),n.includePrerelease&&(this.value==="<0.0.0-0"||i.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||i.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&i.operator.startsWith(">")||this.operator.startsWith("<")&&i.operator.startsWith("<")||this.semver.version===i.semver.version&&this.operator.includes("=")&&i.operator.includes("=")||gi(this.semver,"<",i.semver,n)&&this.operator.startsWith(">")&&i.operator.startsWith("<")||gi(this.semver,">",i.semver,n)&&this.operator.startsWith("<")&&i.operator.startsWith(">")))}};Vn.exports=yi;var Pn=ft(),{safeRe:Tn,t:Ln}=Oe(),gi=pi(),vi=We(),On=G(),Fn=se()});var Ye=C(($p,Dn)=>{"use strict";var Ih=se(),kh=(r,i,n)=>{try{i=new Ih(i,n)}catch{return!1}return i.test(r)};Dn.exports=kh});var qn=C((qp,$n)=>{"use strict";var Ah=se(),Nh=(r,i)=>new Ah(r,i).set.map(n=>n.map(o=>o.value).join(" ").trim().split(" "));$n.exports=Nh});var Bn=C((jp,jn)=>{"use strict";var Rh=G(),Ph=se(),Th=(r,i,n)=>{let o=null,l=null,h=null;try{h=new Ph(i,n)}catch{return null}return r.forEach(f=>{h.test(f)&&(!o||l.compare(f)===-1)&&(o=f,l=new Rh(o,n))}),o};jn.exports=Th});var Mn=C((Bp,Un)=>{"use strict";var Lh=G(),Oh=se(),Fh=(r,i,n)=>{let o=null,l=null,h=null;try{h=new Oh(i,n)}catch{return null}return r.forEach(f=>{h.test(f)&&(!o||l.compare(f)===1)&&(o=f,l=new Lh(o,n))}),o};Un.exports=Fh});var Wn=C((Up,Hn)=>{"use strict";var Ei=G(),Vh=se(),Gn=Xe(),Dh=(r,i)=>{r=new Vh(r,i);let n=new Ei("0.0.0");if(r.test(n)||(n=new Ei("0.0.0-0"),r.test(n)))return n;n=null;for(let o=0;o<r.set.length;++o){let l=r.set[o],h=null;l.forEach(f=>{let m=new Ei(f.semver.version);switch(f.operator){case">":m.prerelease.length===0?m.patch++:m.prerelease.push(0),m.raw=m.format();case"":case">=":(!h||Gn(m,h))&&(h=m);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${f.operator}`)}}),h&&(!n||Gn(n,h))&&(n=h)}return n&&r.test(n)?n:null};Hn.exports=Dh});var zn=C((Mp,Xn)=>{"use strict";var $h=se(),qh=(r,i)=>{try{return new $h(r,i).range||"*"}catch{return null}};Xn.exports=qh});var wt=C((Gp,Qn)=>{"use strict";var jh=G(),Jn=ze(),{ANY:Bh}=Jn,Uh=se(),Mh=Ye(),Kn=Xe(),Yn=vt(),Gh=Et(),Hh=yt(),Wh=(r,i,n,o)=>{r=new jh(r,o),i=new Uh(i,o);let l,h,f,m,y;switch(n){case">":l=Kn,h=Gh,f=Yn,m=">",y=">=";break;case"<":l=Yn,h=Hh,f=Kn,m="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Mh(r,i,o))return!1;for(let x=0;x<i.set.length;++x){let w=i.set[x],g=null,S=null;if(w.forEach(E=>{E.semver===Bh&&(E=new Jn(">=0.0.0")),g=g||E,S=S||E,l(E.semver,g.semver,o)?g=E:f(E.semver,S.semver,o)&&(S=E)}),g.operator===m||g.operator===y||(!S.operator||S.operator===m)&&h(r,S.semver))return!1;if(S.operator===y&&f(r,S.semver))return!1}return!0};Qn.exports=Wh});var ea=C((Hp,Zn)=>{"use strict";var Xh=wt(),zh=(r,i,n)=>Xh(r,i,">",n);Zn.exports=zh});var ia=C((Wp,ta)=>{"use strict";var Kh=wt(),Yh=(r,i,n)=>Kh(r,i,"<",n);ta.exports=Yh});var na=C((Xp,sa)=>{"use strict";var ra=se(),Jh=(r,i,n)=>(r=new ra(r,n),i=new ra(i,n),r.intersects(i,n));sa.exports=Jh});var oa=C((zp,aa)=>{"use strict";var Qh=Ye(),Zh=re();aa.exports=(r,i,n)=>{let o=[],l=null,h=null,f=r.sort((w,g)=>Zh(w,g,n));for(let w of f)Qh(w,i,n)?(h=w,l||(l=w)):(h&&o.push([l,h]),h=null,l=null);l&&o.push([l,null]);let m=[];for(let[w,g]of o)w===g?m.push(w):!g&&w===f[0]?m.push("*"):g?w===f[0]?m.push(`<=${g}`):m.push(`${w} - ${g}`):m.push(`>=${w}`);let y=m.join(" || "),x=typeof i.raw=="string"?i.raw:String(i);return y.length<x.length?y:i}});var pa=C((Kp,fa)=>{"use strict";var ua=se(),wi=ze(),{ANY:bi}=wi,Si=Ye(),Ci=re(),el=(r,i,n={})=>{if(r===i)return!0;r=new ua(r,n),i=new ua(i,n);let o=!1;e:for(let l of r.set){for(let h of i.set){let f=il(l,h,n);if(o=o||f!==null,f)continue e}if(o)return!1}return!0},tl=[new wi(">=0.0.0-0")],ca=[new wi(">=0.0.0")],il=(r,i,n)=>{if(r===i)return!0;if(r.length===1&&r[0].semver===bi){if(i.length===1&&i[0].semver===bi)return!0;n.includePrerelease?r=tl:r=ca}if(i.length===1&&i[0].semver===bi){if(n.includePrerelease)return!0;i=ca}let o=new Set,l,h;for(let E of r)E.operator===">"||E.operator===">="?l=ha(l,E,n):E.operator==="<"||E.operator==="<="?h=la(h,E,n):o.add(E.semver);if(o.size>1)return null;let f;if(l&&h){if(f=Ci(l.semver,h.semver,n),f>0)return null;if(f===0&&(l.operator!==">="||h.operator!=="<="))return null}for(let E of o){if(l&&!Si(E,String(l),n)||h&&!Si(E,String(h),n))return null;for(let k of i)if(!Si(E,String(k),n))return!1;return!0}let m,y,x,w,g=h&&!n.includePrerelease&&h.semver.prerelease.length?h.semver:!1,S=l&&!n.includePrerelease&&l.semver.prerelease.length?l.semver:!1;g&&g.prerelease.length===1&&h.operator==="<"&&g.prerelease[0]===0&&(g=!1);for(let E of i){if(w=w||E.operator===">"||E.operator===">=",x=x||E.operator==="<"||E.operator==="<=",l){if(S&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===S.major&&E.semver.minor===S.minor&&E.semver.patch===S.patch&&(S=!1),E.operator===">"||E.operator===">="){if(m=ha(l,E,n),m===E&&m!==l)return!1}else if(l.operator===">="&&!E.test(l.semver))return!1}if(h){if(g&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===g.major&&E.semver.minor===g.minor&&E.semver.patch===g.patch&&(g=!1),E.operator==="<"||E.operator==="<="){if(y=la(h,E,n),y===E&&y!==h)return!1}else if(h.operator==="<="&&!E.test(h.semver))return!1}if(!E.operator&&(h||l)&&f!==0)return!1}return!(l&&x&&!h&&f!==0||h&&w&&!l&&f!==0||S||g)},ha=(r,i,n)=>{if(!r)return i;let o=Ci(r.semver,i.semver,n);return o>0?r:o<0||i.operator===">"&&r.operator===">="?i:r},la=(r,i,n)=>{if(!r)return i;let o=Ci(r.semver,i.semver,n);return o<0?r:o>0||i.operator==="<"&&r.operator==="<="?i:r};fa.exports=el});var ga=C((Yp,xa)=>{"use strict";var _i=Oe(),da=Le(),rl=G(),ma=ui(),sl=ve(),nl=$s(),al=js(),ol=Ms(),ul=Ws(),cl=zs(),hl=Ys(),ll=Qs(),fl=en(),pl=re(),dl=nn(),ml=on(),xl=gt(),gl=ln(),vl=pn(),yl=Xe(),El=vt(),bl=li(),Sl=fi(),wl=yt(),Cl=Et(),_l=pi(),Il=Sn(),kl=Cn(),Al=ze(),Nl=se(),Rl=Ye(),Pl=qn(),Tl=Bn(),Ll=Mn(),Ol=Wn(),Fl=zn(),Vl=wt(),Dl=ea(),$l=ia(),ql=na(),jl=oa(),Bl=pa();xa.exports={parse:sl,valid:nl,clean:al,inc:ol,diff:ul,major:cl,minor:hl,patch:ll,prerelease:fl,compare:pl,rcompare:dl,compareLoose:ml,compareBuild:xl,sort:gl,rsort:vl,gt:yl,lt:El,eq:bl,neq:Sl,gte:wl,lte:Cl,cmp:_l,coerce:Il,truncate:kl,Comparator:Al,Range:Nl,satisfies:Rl,toComparators:Pl,maxSatisfying:Tl,minSatisfying:Ll,minVersion:Ol,validRange:Fl,outside:Vl,gtr:Dl,ltr:$l,intersects:ql,simplifyRange:jl,subset:Bl,SemVer:rl,re:_i.re,src:_i.src,tokens:_i.t,SEMVER_SPEC_VERSION:da.SEMVER_SPEC_VERSION,RELEASE_TYPES:da.RELEASE_TYPES,compareIdentifiers:ma.compareIdentifiers,rcompareIdentifiers:ma.rcompareIdentifiers}});var Ni=C((Jp,Aa)=>{var ye=require("fs"),ne=require("path"),ya=_s(),ae=ga(),{DEFAULT_API_URL:Ul}=Ge(),Ea=["dependencies","devDependencies","optionalDependencies","peerDependencies"];function Ii(r){let i=typeof r=="string"&&r.match(/^((?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*)(?:@([^\r\n]+))?$/);if(!i)throw new Error(`Invalid npm dependency: ${String(r)}`);return{name:i[1],version:i[2]}}function ki(r){let i=new Map;for(let n of r){let{name:o,version:l}=Ii(n),h=i.get(o);i.set(o,h&&l?ba(o,h,l):l||h)}return i}function ba(r,i,n){if(i===n)return i;let o=ae.validRange(i),l=ae.validRange(n);if(o&&l)try{if(ae.subset(l,o))return n;if(ae.subset(o,l))return i}catch{}throw new Error(`Conflicting registry versions for ${r}: ${i} and ${n}`)}function Ml(r,i){let n=typeof r=="string"&&ae.validRange(r),o=ae.validRange(i);if(!n||!o)return!1;try{return ae.subset(n,o)}catch{return!1}}function _t(r,i){if(Ml(r,i))return"satisfied";let n=typeof r=="string"&&ae.validRange(r),o=ae.validRange(i);if(!n||!o)return"incomparable";try{let l=ae.minVersion(n),h=ae.minVersion(o);return!l||!h?"incomparable":ae.lt(l,h)?"lower":"newer"}catch{return"incomparable"}}function Ct(r,i){let n=Ea.find(o=>Object.hasOwn(r[o]||{},i));return n?{section:n,existing:r[n][i]}:null}function Sa(r,i){let n=ki(i);if(n.size===0)return;let o=ne.join(r,"package.json"),l=JSON.parse(ye.readFileSync(o,"utf8"));for(let[h,f]of n){let m=Ct(l,h),y=m?.section||"dependencies";l[y]||={};let x=m?.existing;l[y][h]=x===void 0?f||"latest":f&&_t(x,f)==="lower"?f:x}ye.writeFileSync(o,`${JSON.stringify(l,null,2)}
|
|
3
|
+
`)}function It(r){let i=[["pnpm-lock.yaml","pnpm"],["yarn.lock","yarn"],["bun.lock","bun"],["bun.lockb","bun"],["package-lock.json","npm"],["npm-shrinkwrap.json","npm"]];for(let n=ne.resolve(r);;n=ne.dirname(n)){let o=ne.join(n,"package.json");if(ye.existsSync(o)){let l=JSON.parse(ye.readFileSync(o,"utf8")),h=String(l.packageManager||"").split("@")[0];if(["npm","pnpm","yarn","bun"].includes(h))return h}for(let[l,h]of i)if(ye.existsSync(ne.join(n,l)))return h;if(ne.dirname(n)===n)return"npm"}}var va={npm:"npx",pnpm:"pnpm exec",yarn:"yarn",bun:"bunx"};function wa(r,i=process.cwd()){let n;try{n=It(i)}catch{n="npm"}return`${va[n]||va.npm} frontfriend ${r}`}function Gl(r,i=process.cwd()){let n=null;try{n=r?new URL(r).origin:null}catch{n=null}return wa(n&&n!==new URL(Ul).origin?`login --api-url ${n}`:"login",i)}function Ca(r){return JSON.parse(ye.readFileSync(ne.join(r,"package.json"),"utf8"))}function Ai(r,i){let n=ki(i);if(n.size===0)return[];let o=Ca(r),l=[];for(let[h,f]of n){let m=Ct(o,h);m&&(!f||_t(m.existing,f)!=="lower")||l.push(f?`${h}@${f}`:h)}return l}function Hl(r,i){let n=i.filter(g=>g.required),o=ki(n.flatMap(g=>g.dependencies)),l=(g,S)=>S.filter(E=>E.dependencies.some(k=>Ii(k).name===g)).map(E=>E.component).filter(Boolean),h=i.filter(g=>!g.required);if(o.size===0&&h.length===0)return{missing:[],kept:[],repair:[]};let f=Ca(r),m=[],y=[];for(let[g,S]of o){let E=Ct(f,g);if(!E){m.push(S?`${g}@${S}`:g);continue}if(!S)continue;let k=_t(E.existing,S);k==="lower"?m.push(`${g}@${S}`):k!=="satisfied"&&y.push({name:g,current:E.existing,declared:S,components:l(g,n)})}let x=new Map;for(let g of h.flatMap(S=>S.dependencies)){let{name:S,version:E}=Ii(g);if(o.has(S)||Ct(f,S))continue;let k=x.get(S),B=E||k?.version;if(k?.version&&E&&k.version!==E)try{B=ba(S,k.version,E)}catch{B=k.version}x.set(S,{version:B})}let w=[...x].map(([g,{version:S}])=>({request:S?`${g}@${S}`:g,components:l(g,h)}));return{missing:m,kept:y,repair:w}}function _a(r,i){return[r==="npm"?"install":"add",...i]}function Wl(r){return/^[\w@/.:^~=+-]+$/.test(r)?r:`'${r.replace(/'/g,"'\\''")}'`}function Ia(r,i){let n=It(r);return[n,..._a(n,i)].map(Wl).join(" ")}function ka(r,i,{stdio:n="inherit"}={}){let o=Ai(r,i);if(o.length===0)return;let l=It(r),h=ya.sync(l,_a(l,o),{cwd:r,stdio:n});if(h.error||h.status!==0)throw Sa(r,i),h.error||new Error(`${l} dependency installation failed with status ${h.status}. Dependencies were saved; run ${l} install.`)}function Xl(r,i,{install:n=!0,stdio:o="inherit",log:l=console.log}={}){let h=Ai(r,i);if(h.length===0)return{missing:h,command:null,installed:!1};let f=Ia(r,h);if(!n)return l(`\u{1F4E6} Component dependencies missing from package.json. Install them with:
|
|
4
4
|
${f}`),{missing:h,command:f,installed:!1};l(`\u{1F4E6} Installing component dependencies: ${f}`);try{return ka(r,h,{stdio:o}),{missing:h,command:f,installed:!0}}catch(m){return l(`\u26A0\uFE0F Component dependencies were not installed: ${m.message}
|
|
5
5
|
Install them with:
|
|
6
|
-
${f}`),{missing:h,command:f,installed:!1,error:m.message}}}function
|
|
6
|
+
${f}`),{missing:h,command:f,installed:!1,error:m.message}}}function zl(r,i){for(let n=ne.resolve(r);;n=ne.dirname(n)){if(ye.existsSync(ne.join(n,"node_modules",i,"package.json")))return!0;if(ne.dirname(n)===n)return!1}}function Kl(r,i,{install:n=!0,stdio:o="inherit",log:l=console.log}={}){let h=JSON.parse(ye.readFileSync(ne.join(r,"package.json"),"utf8"));if(!Ea.some(g=>Object.hasOwn(h[g]||{},i))||zl(r,i))return{installed:!1,command:null};let m=It(r),y=`${m} install`;if(!n)return l(`\u{1F4E6} ${i} is in package.json but not installed. Install it with:
|
|
7
7
|
${y}`),{installed:!1,command:y};l(`\u{1F4E6} Installing ${i}: ${y}`);let x=ya.sync(m,["install"],{cwd:r,stdio:o});if(!x.error&&x.status===0)return{installed:!0,command:y};let w=x.error?x.error.message:`${m} install failed with status ${x.status}`;return l(`\u26A0\uFE0F ${i} was not installed: ${w}
|
|
8
8
|
Install it with:
|
|
9
|
-
${y}`),{installed:!1,command:y,error:w}}Aa.exports={cliCommand:wa,loginCommand:Gl,installDeclaredPackage:Kl,saveNpmDependencies:Sa,installNpmDependencies:ka,installMissingNpmDependencies:zl,missingNpmDependencies:Ai,npmInstallCommand:Ia,planNpmDependencies:Hl,requirementStatus:_t}});var Pi=C((Yp,Va)=>{var{fileExists:Yl,readJsonFileSafe:Jl,removeFile:Ql,writePrivateJsonFileAtomic:Zl,withPrivateFileLock:ef}=He(),Na=require("path"),tf=require("os"),rf=require("https"),sf=require("http"),{URL:me}=require("url"),{DEFAULT_API_URL:Ce}=Ge(),{cliCommand:Ra,loginCommand:nf}=Ni(),af=Na.join(tf.homedir(),".frontfriend"),Ve=Na.join(af,"credentials");function of(){return Ve}function kt(){try{return Jl(Ve)}catch{return null}}function Pa(r){try{let i=JSON.parse(Buffer.from(String(r).split(".")[1],"base64url").toString("utf8"));return typeof i.email=="string"?i.email:null}catch{return null}}function uf(){let r=kt();if(!r||!r.accessToken)return null;let i=Number(r.refreshExpiresAt)||0;return{email:Pa(r.accessToken),apiUrl:r.ffApiUrl||null,expired:i>0&&i<Date.now()}}function Ta(r){Zl(Ve,r)}function cf(){return Yl(Ve)?(Ql(Ve),!0):!1}function Ri(r,i=60*1e3){return!r?.accessToken||!r.expiresAt||Date.now()+i>=r.expiresAt}function Fe(r,{apiUrl:i,login:n,next:o}={}){let l=o||`Run \`${n||nf(i)}\` to sign in, then run the command again.`,h=new Error(`${r}. ${l}`);return h.code="FF_AUTH_REFRESH_FAILED",h}function La(r,i,n){return new Promise((o,l)=>{let h=new me(r);if(h.protocol!=="https:"&&!(h.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(h.hostname))){l(new Error("Frontfriend API URLs require HTTPS except on localhost"));return}let f=h.protocol==="https:"?rf:sf,m=JSON.stringify(i||{}),y=f.request({hostname:h.hostname,port:h.port,path:`${h.pathname}${h.search}`,method:"POST",headers:{"content-type":"application/json","content-length":Buffer.byteLength(m),...n?{authorization:`Bearer ${n}`}:{}}},x=>{let w="";x.on("data",g=>{w+=g}),x.on("end",()=>{if(x.statusCode>=300&&x.statusCode<400){let S=x.headers.location?` to ${x.headers.location}`:"",E=new Error(`HTTP ${x.statusCode}: redirected${S}`);E.statusCode=x.statusCode,E.body=w,l(E);return}let g=null;try{g=w?JSON.parse(w):null}catch{let E=x.headers["content-type"]||"unknown content-type",k=new Error(`Expected JSON from FrontFriend API at ${r}, but received ${E} (HTTP ${x.statusCode}). Check FF_API_URL or pass --api-url with the FrontFriend app URL.`);if(k.statusCode=x.statusCode,k.body=w,x.statusCode>=400){l(k);return}l(k);return}if(x.statusCode>=400){let S=new Error(g?.error_description||g?.error||`HTTP ${x.statusCode}`);S.statusCode=x.statusCode,S.body=g,l(S);return}o(g)})});y.setTimeout(15e3,()=>y.destroy(Object.assign(new Error("Frontfriend API request timed out"),{code:"ETIMEDOUT"}))),y.on("error",l),y.write(m),y.end()})}function Oa(r,i){let n=new me(r?.ffApiUrl||Ce).origin,o=new me(i).origin;return Fe(`You are signed in to ${n}, but this command uses ${o}`,{login:Ra(`login --api-url ${o}`)})}async function hf(r){return ef(Ve,r,()=>Fe("Another Frontfriend command is renewing your sign-in",{next:"Wait for it to finish, then run the command again."}))}async function Fa(r,i=Ce){return hf(async()=>{let n=kt();if(n&&new me(n.ffApiUrl||Ce).origin===new me(i).origin){if(!Ri(n))return n;r=n}return lf(r,i)})}async function lf(r,i=Ce){if(new me(i).origin!==new me(r.ffApiUrl||Ce).origin)throw Oa(r,i);if(!r?.refreshToken||!r?.deviceId)throw Fe("Your Frontfriend sign-in has expired",{apiUrl:i});let n;try{n=await La(`${i}/api/plugin/token`,{grant_type:"refresh_token",refresh_token:r.refreshToken,device_id:r.deviceId})}catch(l){throw Object.assign(Fe(l?.message?`Could not renew your Frontfriend sign-in (${l.message})`:"Could not renew your Frontfriend sign-in",{apiUrl:i}),{cause:l})}if(!n?.access_token||!n?.refresh_token)throw Fe("Could not renew your Frontfriend sign-in",{apiUrl:i});let o={accessToken:n.access_token,refreshToken:n.refresh_token,deviceId:n.device_id||r.deviceId,expiresAt:Date.now()+(n.expires_in||900)*1e3,refreshExpiresAt:Date.now()+(n.refresh_expires_in||604800)*1e3,ffApiUrl:i};return Ta(o),o}async function ff(r={}){if(r.envToken)return r.envToken;if(!r.skipCredentials){let i=kt();if(i?.accessToken||i?.refreshToken){let n=r.baseURL||i.ffApiUrl||Ce;if(new me(n).origin!==new me(i.ffApiUrl||Ce).origin)throw Oa(i,n);return i.accessToken&&!Ri(i)?i.accessToken:(await Fa(i,n)).accessToken}}return r.configuredToken?(r.silent||console.warn(`\u26A0\uFE0F auth-token in frontfriend.config.js is deprecated. Run \`${Ra("login")}\` to keep your sign-in outside the repository.`),r.configuredToken):null}Va.exports={accountEmail:Pa,signedInAccount:uf,getCredentialsPath:of,readCredentials:kt,writeCredentials:Ta,deleteCredentials:cf,isExpired:Ri,postJson:La,refreshCredentials:Fa,resolveAuthToken:ff,createAuthRefreshError:Fe}});var qa=C((Jp,$a)=>{var he=require("path"),{fileExists:Ti}=He();function Da(r,i=process.cwd()){let n=i;for(;n!==he.parse(n).root;){let o=he.join(n,r);if(Ti(o))return o;n=he.dirname(n)}return null}function pf(r,i=process.cwd(),n=null){let o=[],l=i,h=10;for(let f=0;f<h;f++){o.push(he.join(l,r)),f<3&&o.push(he.join(l,"../".repeat(f+1)+r));let m=he.dirname(l);if(m===l)break;l=m}o.push(he.join(__dirname,"../../../",r));for(let f of o)if(Ti(f)&&(!n||n(f)))return f;return null}function df(r,i=process.cwd()){let n=r.map(o=>he.isAbsolute(o)?o:he.join(i,o));for(let o of n)if(Ti(o))return o;return null}function mf(r=process.cwd()){let i=Da("frontfriend.config.js",r);return i?he.dirname(i):r}$a.exports={findFileUpward:Da,findDirectoryUpward:pf,findDirectoryWithPaths:df,resolveProjectRoot:mf}});var Ba=C((At,ja)=>{(function(r,i){typeof At=="object"&&typeof ja<"u"?i(At):typeof define=="function"&&define.amd?define(["exports"],i):(r=typeof globalThis<"u"?globalThis:r||self,i(r.acorn={}))})(At,function(r){"use strict";var i=[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",l="\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",h={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"},f="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:f,"5module":f+" export import",6:f+" const class extends export import super"},y=/^in(stanceof)?$/,x=new RegExp("["+l+"]"),w=new RegExp("["+l+o+"]");function g(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 S(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:g(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&&w.test(String.fromCharCode(e)):t===!1?!1:g(e,n)||g(e,i)}var k=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 B(e,t){return new k(e,{beforeExpr:!0,binop:t})}var Y={beforeExpr:!0},J={startsExpr:!0},Qe={};function F(e,t){return t===void 0&&(t={}),t.keyword=e,Qe[e]=new k(e,t)}var u={num:new k("num",J),regexp:new k("regexp",J),string:new k("string",J),name:new k("name",J),privateId:new k("privateId",J),eof:new k("eof"),bracketL:new k("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new k("]"),braceL:new k("{",{beforeExpr:!0,startsExpr:!0}),braceR:new k("}"),parenL:new k("(",{beforeExpr:!0,startsExpr:!0}),parenR:new k(")"),comma:new k(",",Y),semi:new k(";",Y),colon:new k(":",Y),dot:new k("."),question:new k("?",Y),questionDot:new k("?."),arrow:new k("=>",Y),template:new k("template"),invalidTemplate:new k("invalidTemplate"),ellipsis:new k("...",Y),backQuote:new k("`",J),dollarBraceL:new k("${",{beforeExpr:!0,startsExpr:!0}),eq:new k("=",{beforeExpr:!0,isAssign:!0}),assign:new k("_=",{beforeExpr:!0,isAssign:!0}),incDec:new k("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new k("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:B("||",1),logicalAND:B("&&",2),bitwiseOR:B("|",3),bitwiseXOR:B("^",4),bitwiseAND:B("&",5),equality:B("==/!=/===/!==",6),relational:B("</>/<=/>=",7),bitShift:B("<</>>/>>>",8),plusMin:new k("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:B("%",10),star:B("*",10),slash:B("/",10),starstar:new k("**",{beforeExpr:!0}),coalesce:B("??",1),_break:F("break"),_case:F("case",Y),_catch:F("catch"),_continue:F("continue"),_debugger:F("debugger"),_default:F("default",Y),_do:F("do",{isLoop:!0,beforeExpr:!0}),_else:F("else",Y),_finally:F("finally"),_for:F("for",{isLoop:!0}),_function:F("function",J),_if:F("if"),_return:F("return",Y),_switch:F("switch"),_throw:F("throw",Y),_try:F("try"),_var:F("var"),_const:F("const"),_while:F("while",{isLoop:!0}),_with:F("with"),_new:F("new",{beforeExpr:!0,startsExpr:!0}),_this:F("this",J),_super:F("super",J),_class:F("class",J),_extends:F("extends",Y),_export:F("export"),_import:F("import",J),_null:F("null",J),_true:F("true",J),_false:F("false",J),_in:F("in",{beforeExpr:!0,binop:7}),_instanceof:F("instanceof",{beforeExpr:!0,binop:7}),_typeof:F("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:F("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:F("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},X=/\r\n?|\n|\u2028|\u2029/,Fi=new RegExp(X.source,"g");function Ee(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(Ee(c))return a<s-1&&c===13&&e.charCodeAt(a+1)===10?a+2:a+1}return-1}var Pt=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,M=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Di=Object.prototype,Za=Di.hasOwnProperty,eo=Di.toString,_e=Object.hasOwn||function(e,t){return Za.call(e,t)},$i=Array.isArray||function(e){return eo.call(e)==="[object Array]"},qi=Object.create(null);function xe(e){return qi[e]||(qi[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function le(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var to=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Ie=function(t,s){this.line=t,this.column=s};Ie.prototype.offset=function(t){return new Ie(this.line,this.column+t)};var $e=function(t,s,a){this.start=s,this.end=a,t.sourceFile!==null&&(this.source=t.sourceFile)};function Tt(e,t){for(var s=1,a=0;;){var c=Vi(e,a,t);if(c<0)return new Ie(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 io(e){var t={};for(var s in Ze)t[s]=e&&_e(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),$i(t.onToken)){var a=t.onToken;t.onToken=function(c){return a.push(c)}}if($i(t.onComment)&&(t.onComment=ro(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function ro(e,t){return function(s,a,c,p,d,v){var b={type:s?"Block":"Line",value:a,start:c,end:p};e.locations&&(b.loc=new $e(this,d,v)),e.ranges&&(b.range=[c,p]),t.push(b)}}var be=1,Se=2,Lt=4,Bi=8,Ot=16,Ui=32,et=64,Mi=128,we=256,qe=512,Gi=1024,tt=be|Se|we;function Ft(e,t){return Se|(e?Lt:0)|(t?Bi:0)}var it=0,Vt=1,fe=2,Hi=3,Wi=4,
|
|
11
|
-
`,a-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(X).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"?Se:be),this.regexpState=null,this.privateNameStack=[]},Z={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}};q.prototype.parse=function(){var t=this,s=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(s)})},Z.inFunction.get=function(){return(this.currentVarScope().flags&Se)>0},Z.inGenerator.get=function(){return(this.currentVarScope().flags&Bi)>0},Z.inAsync.get=function(){return(this.currentVarScope().flags&Lt)>0},Z.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],s=t.flags;if(s&(we|qe))return!1;if(s&Se)return(s&Lt)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Z.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&be)},Z.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&et)>0||this.options.allowSuperOutsideMethod},Z.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Mi)>0},Z.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Z.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],s=t.flags;if(s&(we|qe)||s&Se&&!(s&Ot))return!0}return!1},Z.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&Gi||!this.inModule&&t&be)},Z.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&we)>0},q.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},q.parse=function(t,s){return new this(s,t).parse()},q.parseExpressionAt=function(t,s,a){var c=new this(a,t,s);return c.nextToken(),c.parseExpression()},q.tokenizer=function(t,s){return new this(s,t)},Object.defineProperties(q.prototype,Z);var W=q.prototype,so=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;W.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){M.lastIndex=e,e+=M.exec(this.input)[0].length;var t=so.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==="}"||X.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++}},W.eat=function(e){return this.type===e?(this.next(),!0):!1},W.isContextual=function(e){return this.type===u.name&&this.value===e&&!this.containsEsc},W.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},W.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}},W.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},W.canInsertSemicolon=function(){return this.type===u.eof||this.type===u.braceR||X.test(this.input.slice(this.lastTokEnd,this.start))},W.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},W.semicolon=function(){!this.eat(u.semi)&&!this.insertSemicolon()&&this.unexpected()},W.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},W.expect=function(e){this.eat(e)||this.unexpected()},W.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var rt=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};W.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")}},W.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")},W.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")},W.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var N=q.prototype;N.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 p=c[a];this.raiseRecoverable(this.undefinedExports[p].start,"Export '"+p+"' 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 Dt={kind:"loop"},no={kind:"switch"};N.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(S(a)){var c=s;do s+=a<=65535?1:2;while(E(a=this.fullCharCodeAt(s)));if(a===92)return!0;var p=this.input.slice(c,s);if(!y.test(p))return!0}return!1},N.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!X.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))},N.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(X.test(this.input.slice(this.pos,a)))return!1;if(e){var c=a+5,p;if(this.input.slice(a,c)!=="using"||c===this.input.length||E(p=this.fullCharCodeAt(c))||p===92)return!1;M.lastIndex=c;var d=M.exec(this.input);if(a=c+d[0].length,d&&X.test(this.input.slice(c,a)))return!1}var v=this.fullCharCodeAt(a);if(!S(v)&&v!==92)return!1;var b=a;do a+=v<=65535?1:2;while(E(v=this.fullCharCodeAt(a)));if(v===92)return!0;var R=this.input.slice(b,a);if(y.test(R))return!1;if(t&&!e&&R==="of"){M.lastIndex=a;var L=M.exec(this.input);if(a=a+L[0].length,this.input.charCodeAt(a)!==61||(v=this.input.charCodeAt(a+1))===61||v===62)return!1}return!0},N.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},N.isUsing=function(e){return this.isUsingKeyword(!1,e)},N.parseStatement=function(e,t,s){var a=this.type,c=this.startNode(),p;switch(this.isLet(e)&&(a=u._var,p="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 p=p||this.value,e&&p!=="var"&&this.unexpected(),this.parseVarStatement(c,p);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),v=this.pos+d[0].length,b=this.input.charCodeAt(v);if(b===40||b===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 R=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(R)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"),R==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(c,!1,R),this.semicolon(),this.finishNode(c,"VariableDeclaration");var L=this.value,D=this.parseExpression();return a===u.name&&D.type==="Identifier"&&this.eat(u.colon)?this.parseLabeledStatement(c,L,D,e):this.parseExpressionStatement(c,D)}},N.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")},N.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},N.parseDoStatement=function(e){return this.next(),this.labels.push(Dt),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")},N.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Dt),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 p=this.isContextual("let"),d=!1,v=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(v){var b=this.startNode();return this.next(),v==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(b,!0,v),this.finishNode(b,"VariableDeclaration"),this.parseForAfterInit(e,b,t)}var R=this.containsEsc,L=new rt,D=this.start,z=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&&(z.start===D&&!R&&z.type==="Identifier"&&z.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),p&&d&&this.raise(z.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(z,!1,L),this.checkLValPattern(z),this.parseForIn(e,z)):(this.checkExpressionErrors(L,!0),t>-1&&this.unexpected(t),this.parseFor(e,z))},N.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))},N.parseFunctionStatement=function(e,t,s){return this.next(),this.parseFunction(e,je|(s?0:$t),!1,t)},N.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")},N.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")},N.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(u.braceL),this.labels.push(no),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")},N.parseThrowStatement=function(e){return this.next(),X.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 ao=[];N.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Ui:0),this.checkLValPattern(e,t?Wi:fe),this.expect(u.parenR),e},N.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")},N.parseVarStatement=function(e,t,s){return this.next(),this.parseVar(e,!1,t,s),this.semicolon(),this.finishNode(e,"VariableDeclaration")},N.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Dt),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},N.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")},N.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},N.parseLabeledStatement=function(e,t,s,a){for(var c=0,p=this.labels;c<p.length;c+=1){var d=p[c];d.name===t&&this.raise(s.start,"Label '"+t+"' is already declared")}for(var v=this.type.isLoop?"loop":this.type===u._switch?"switch":null,b=this.labels.length-1;b>=0;b--){var R=this.labels[b];if(R.statementStart===e.start)R.statementStart=this.start,R.kind=v;else break}return this.labels.push({name:t,kind:v,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")},N.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},N.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")},N.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")},N.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")},N.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},N.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Vt:fe,!1)};var je=1,$t=2,Xi=4;N.parseFunction=function(e,t,s,a,c){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!a)&&(this.type===u.star&&t&$t&&this.unexpected(),e.generator=this.eat(u.star)),this.options.ecmaVersion>=8&&(e.async=!!a),t&je&&(e.id=t&Xi&&this.type!==u.name?null:this.parseIdent(),e.id&&!(t&$t)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Vt:fe:Hi));var p=this.yieldPos,d=this.awaitPos,v=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ft(e.async,e.generator)),t&je||(e.id=this.type===u.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,s,!1,c),this.yieldPos=p,this.awaitPos=d,this.awaitIdentPos=v,this.finishNode(e,t&je?"FunctionDeclaration":"FunctionExpression")},N.parseFunctionParams=function(e){this.expect(u.parenL),e.params=this.parseBindingList(u.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},N.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(),p=!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"?(p&&this.raiseRecoverable(d.start,"Duplicate constructor in the same class"),p=!0):d.key&&d.key.type==="PrivateIdentifier"&&oo(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")},N.parseClassElement=function(e){if(this.eat(u.semi))return null;var t=this.options.ecmaVersion,s=this.startNode(),a="",c=!1,p=!1,d="method",v=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(u.braceL))return this.parseClassStaticBlock(s),s;this.isClassElementNameStart()||this.type===u.star?v=!0:a="static"}if(s.static=v,!a&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===u.star)&&!this.canInsertSemicolon()?p=!0:a="async"),!a&&(t>=9||!p)&&this.eat(u.star)&&(c=!0),!a&&!p&&!c){var b=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?d=b:a=b)}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||p){var R=!s.static&&st(s,"constructor"),L=R&&e;R&&d!=="method"&&this.raise(s.key.start,"Constructor can't have get/set modifier"),s.kind=R?"constructor":d,this.parseClassMethod(s,c,p,L)}else this.parseClassField(s);return s},N.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},N.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)},N.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 p=e.value=this.parseMethod(t,s,a);return e.kind==="get"&&p.params.length!==0&&this.raiseRecoverable(p.start,"getter should have no params"),e.kind==="set"&&p.params.length!==1&&this.raiseRecoverable(p.start,"setter should have exactly one param"),e.kind==="set"&&p.params[0].type==="RestElement"&&this.raiseRecoverable(p.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},N.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(qe|et),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")},N.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(we|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")},N.parseClassId=function(e,t){this.type===u.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,fe,!1)):(t===!0&&this.unexpected(),e.id=null)},N.parseClassSuper=function(e){e.superClass=this.eat(u._extends)?this.parseExprSubscripts(null,!1):null},N.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},N.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],p=0;p<s.length;++p){var d=s[p];_e(t,d.name)||(c?c.used.push(d):this.raiseRecoverable(d.start,"Private field '#"+d.name+"' must be declared in an enclosing class"))}};function oo(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)}N.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")},N.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")},N.parseExportDeclaration=function(e){return this.parseStatement(null)},N.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,je|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}},N.checkExport=function(e,t,s){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),_e(e,t)&&this.raiseRecoverable(s,"Duplicate export '"+t+"'"),e[t]=!0)},N.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 p=c[a];this.checkPatternExport(e,p)}else if(s==="ArrayPattern")for(var d=0,v=t.elements;d<v.length;d+=1){var b=v[d];b&&this.checkPatternExport(e,b)}else s==="Property"?this.checkPatternExport(e,t.value):s==="AssignmentPattern"?this.checkPatternExport(e,t.left):s==="RestElement"&&this.checkPatternExport(e,t.argument)},N.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)}},N.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},N.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")},N.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},N.parseImport=function(e){return this.next(),this.type===u.string?(e.specifiers=ao,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")},N.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,fe),this.finishNode(e,"ImportSpecifier")},N.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,fe),this.finishNode(e,"ImportDefaultSpecifier")},N.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,fe),this.finishNode(e,"ImportNamespaceSpecifier")},N.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},N.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;_e(t,c)&&this.raiseRecoverable(a.key.start,"Duplicate attribute key '"+c+"'"),t[c]=!0,e.push(a)}return e},N.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")},N.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===u.string){var e=this.parseLiteral(this.value);return to.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},N.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)},N.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 ee=q.prototype;ee.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 p=c[a];this.toAssignable(p,t),p.type==="RestElement"&&(p.argument.type==="ArrayPattern"||p.argument.type==="ObjectPattern")&&this.raise(p.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},ee.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 p=e[s-1];this.options.ecmaVersion===6&&t&&p&&p.type==="RestElement"&&p.argument.type!=="Identifier"&&this.unexpected(p.argument.start)}return e},ee.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},ee.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")},ee.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()},ee.parseBindingList=function(e,t,s,a){for(var c=[],p=!0;!this.eat(e);)if(p?p=!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},ee.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},ee.parseBindingListItem=function(e){return e},ee.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")},ee.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===fe&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),s&&(_e(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")}},ee.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 p=c[a];this.checkLValInnerPattern(p,t,s)}break;case"ArrayPattern":for(var d=0,v=e.elements;d<v.length;d+=1){var b=v[d];b&&this.checkLValInnerPattern(b,t,s)}break;default:this.checkLValSimple(e,t,s)}},ee.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 te=function(t,s,a,c,p){this.token=t,this.isExpr=!!s,this.preserveSpace=!!a,this.override=c,this.generator=!!p},V={b_stat:new te("{",!1),b_expr:new te("{",!0),b_tmpl:new te("${",!1),p_stat:new te("(",!1),p_expr:new te("(",!0),q_tmpl:new te("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new te("function",!1),f_expr:new te("function",!0),f_expr_gen:new te("function",!0,!1,null,!0),f_gen:new te("function",!1,!1,null,!0)},ke=q.prototype;ke.initialContext=function(){return[V.b_stat]},ke.curContext=function(){return this.context[this.context.length-1]},ke.braceIsBlock=function(e){var t=this.curContext();return t===V.f_expr||t===V.f_stat?!0:e===u.colon&&(t===V.b_stat||t===V.b_expr)?!t.isExpr:e===u._return||e===u.name&&this.exprAllowed?X.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===V.b_stat:e===u._var||e===u._const||e===u.name?!1:!this.exprAllowed},ke.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},ke.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},ke.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===V.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)?V.b_stat:V.b_expr),this.exprAllowed=!0},u.dollarBraceL.updateContext=function(){this.context.push(V.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?V.p_stat:V.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()!==V.p_stat)&&!(e===u._return&&X.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===u.colon||e===u.braceL)&&this.curContext()===V.b_stat)?this.context.push(V.f_expr):this.context.push(V.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()===V.q_tmpl?this.context.pop():this.context.push(V.q_tmpl),this.exprAllowed=!1},u.star.updateContext=function(e){if(e===u._function){var t=this.context.length-1;this.context[t]===V.f_expr?this.context[t]=V.f_expr_gen:this.context[t]=V.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 P=q.prototype;P.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 p=e.kind;if(this.options.ecmaVersion>=6){c==="__proto__"&&p==="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 v;p==="init"?v=this.strict&&d.init||d.get||d.set:v=d.init||d[p],v&&this.raiseRecoverable(a.start,"Redefinition of property")}else d=t[c]={init:!1,get:!1,set:!1};d[p]=!0}},P.parseExpression=function(e,t){var s=this;return this.catchStackOverflow(function(){var a=s.start,c=s.startLoc,p=s.parseMaybeAssign(e,t);if(s.type===u.comma){var d=s.startNodeAt(a,c);for(d.expressions=[p];s.eat(u.comma);)d.expressions.push(s.parseMaybeAssign(e,t));return s.finishNode(d,"SequenceExpression")}return p})},P.parseMaybeAssign=function(e,t,s){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var a=!1,c=-1,p=-1,d=-1;t?(c=t.parenthesizedAssign,p=t.trailingComma,d=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new rt,a=!0);var v=this.start,b=this.startLoc;(this.type===u.parenL||this.type===u.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var R=this.parseMaybeConditional(e,t);if(s&&(R=s.call(this,R,v,b)),this.type.isAssign){var L=this.startNodeAt(v,b);return L.operator=this.value,this.type===u.eq&&(R=this.toAssignable(R,!1,t)),a||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=R.start&&(t.shorthandAssign=-1),this.type===u.eq?this.checkLValPattern(R):this.checkLValSimple(R),L.left=R,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),p>-1&&(t.trailingComma=p),R},P.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 p=this.startNodeAt(s,a);return p.test=c,p.consequent=this.parseMaybeAssign(),this.expect(u.colon),p.alternate=this.parseMaybeAssign(e),this.finishNode(p,"ConditionalExpression")}return c},P.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)},P.parseExprOp=function(e,t,s,a,c){var p=this.type.binop;if(p!=null&&(!c||this.type!==u._in)&&p>a){var d=this.type===u.logicalOR||this.type===u.logicalAND,v=this.type===u.coalesce;v&&(p=u.logicalAND.binop);var b=this.value;this.next();var R=this.start,L=this.startLoc,D=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,c),R,L,p,c),z=this.buildBinary(t,s,e,D,b,d||v);return(d&&this.type===u.coalesce||v&&(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(z,t,s,a,c)}return e},P.buildBinary=function(e,t,s,a,c,p){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,p?"LogicalExpression":"BinaryExpression")},P.parseMaybeUnary=function(e,t,s,a){var c=this.start,p=this.startLoc,d;if(this.isContextual("await")&&this.canAwait)d=this.parseAwait(a),t=!0;else if(this.type.prefix){var v=this.startNode(),b=this.type===u.incDec;v.operator=this.value,v.prefix=!0,this.next(),v.argument=this.parseMaybeUnary(null,!0,b,a),this.checkExpressionErrors(e,!0),b?this.checkLValSimple(v.argument):this.strict&&v.operator==="delete"&&Ki(v.argument)?this.raiseRecoverable(v.start,"Deleting local variable in strict mode"):v.operator==="delete"&&qt(v.argument)?this.raiseRecoverable(v.start,"Private fields can not be deleted"):t=!0,d=this.finishNode(v,b?"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 R=this.startNodeAt(c,p);R.operator=this.value,R.prefix=!1,R.argument=d,this.checkLValSimple(d),this.next(),d=this.finishNode(R,"UpdateExpression")}}if(!s&&this.eat(u.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(c,p,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 qt(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&qt(e.expression)||e.type==="ParenthesizedExpression"&&qt(e.expression)}P.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 p=this.parseSubscripts(c,s,a,!1,t);return e&&p.type==="MemberExpression"&&(e.parenthesizedAssign>=p.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=p.start&&(e.parenthesizedBind=-1),e.trailingComma>=p.start&&(e.trailingComma=-1)),p},P.parseSubscripts=function(e,t,s,a,c){for(var p=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 v=this.parseSubscript(e,t,s,a,p,d,c);if(v.optional&&(d=!0),v===e||v.type==="ArrowFunctionExpression"){if(d){var b=this.startNodeAt(t,s);b.expression=v,v=this.finishNode(b,"ChainExpression")}return v}e=v}},P.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(u.arrow)},P.parseSubscriptAsyncArrow=function(e,t,s,a){return this.parseArrowExpression(this.startNodeAt(e,t),s,!0,a)},P.parseSubscript=function(e,t,s,a,c,p,d){var v=this.options.ecmaVersion>=11,b=v&&this.eat(u.questionDot);a&&b&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var R=this.eat(u.bracketL);if(R||b&&this.type!==u.parenL&&this.type!==u.backQuote||this.eat(u.dot)){var L=this.startNodeAt(t,s);L.object=e,R?(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=!!R,v&&(L.optional=b),e=this.finishNode(L,"MemberExpression")}else if(!a&&this.eat(u.parenL)){var D=new rt,z=this.yieldPos,Me=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,D);if(c&&!b&&this.shouldParseAsyncArrow())return this.checkPatternErrors(D,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=z,this.awaitPos=Me,this.awaitIdentPos=Ae,this.parseSubscriptAsyncArrow(t,s,ct,d);this.checkExpressionErrors(D,!0),this.yieldPos=z||this.yieldPos,this.awaitPos=Me||this.awaitPos,this.awaitIdentPos=Ae||this.awaitIdentPos;var Ne=this.startNodeAt(t,s);Ne.callee=e,Ne.arguments=ct,v&&(Ne.optional=b),e=this.finishNode(Ne,"CallExpression")}else if(this.type===u.backQuote){(b||p)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Re=this.startNodeAt(t,s);Re.tag=e,Re.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(Re,"TaggedTemplateExpression")}return e},P.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 p=this.start,d=this.startLoc,v=this.containsEsc,b=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!v&&b.name==="async"&&!this.canInsertSemicolon()&&this.eat(u._function))return this.overrideContext(V.f_expr),this.parseFunction(this.startNodeAt(p,d),0,!1,!0,t);if(c&&!this.canInsertSemicolon()){if(this.eat(u.arrow))return this.parseArrowExpression(this.startNodeAt(p,d),[b],!1,t);if(this.options.ecmaVersion>=8&&b.name==="async"&&this.type===u.name&&!v&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return b=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(u.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(p,d),[b],!0,t)}return b;case u.regexp:var R=this.value;return a=this.parseLiteral(R.value),a.regex={pattern:R.pattern,flags:R.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,D=this.parseParenAndDistinguishExpression(c,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(D)&&(e.parenthesizedAssign=L),e.parenthesizedBind<0&&(e.parenthesizedBind=L)),D;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(V.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()}},P.parseExprAtomDefault=function(){this.unexpected()},P.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()},P.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")},P.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")},P.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")},P.parseParenExpression=function(){this.expect(u.parenL);var e=this.parseExpression();return this.expect(u.parenR),e},P.shouldParseArrow=function(e){return!this.canInsertSemicolon()},P.parseParenAndDistinguishExpression=function(e,t){var s=this.start,a=this.startLoc,c,p=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var d=this.start,v=this.startLoc,b=[],R=!0,L=!1,D=new rt,z=this.yieldPos,Me=this.awaitPos,Ae;for(this.yieldPos=0,this.awaitPos=0;this.type!==u.parenR;)if(R?R=!1:this.expect(u.comma),p&&this.afterTrailingComma(u.parenR,!0)){L=!0;break}else if(this.type===u.ellipsis){Ae=this.start,b.push(this.parseParenItem(this.parseRestBinding())),this.type===u.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else b.push(this.parseMaybeAssign(!1,D,this.parseParenItem));var ct=this.lastTokEnd,Ne=this.lastTokEndLoc;if(this.expect(u.parenR),e&&this.shouldParseArrow(b)&&this.eat(u.arrow))return this.checkPatternErrors(D,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=z,this.awaitPos=Me,this.parseParenArrowList(s,a,b,t);(!b.length||L)&&this.unexpected(this.lastTokStart),Ae&&this.unexpected(Ae),this.checkExpressionErrors(D,!0),this.yieldPos=z||this.yieldPos,this.awaitPos=Me||this.awaitPos,b.length>1?(c=this.startNodeAt(d,v),c.expressions=b,this.finishNodeAt(c,"SequenceExpression",ct,Ne)):c=b[0]}else c=this.parseParenExpression();if(this.options.preserveParens){var Re=this.startNodeAt(s,a);return Re.expression=c,this.finishNode(Re,"ParenthesizedExpression")}else return c},P.parseParenItem=function(e){return e},P.parseParenArrowList=function(e,t,s,a){return this.parseArrowExpression(this.startNodeAt(e,t),s,!1,a)};var uo=[];P.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=uo,this.finishNode(e,"NewExpression")},P.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,`
|
|
9
|
+
${y}`),{installed:!1,command:y,error:w}}Aa.exports={cliCommand:wa,loginCommand:Gl,installDeclaredPackage:Kl,saveNpmDependencies:Sa,installNpmDependencies:ka,installMissingNpmDependencies:Xl,missingNpmDependencies:Ai,npmInstallCommand:Ia,planNpmDependencies:Hl,requirementStatus:_t}});var Pi=C((Qp,Va)=>{var{fileExists:Yl,readJsonFileSafe:Jl,removeFile:Ql,writePrivateJsonFileAtomic:Zl,withPrivateFileLock:ef}=He(),Na=require("path"),tf=require("os"),rf=require("https"),sf=require("http"),{URL:me}=require("url"),{DEFAULT_API_URL:Ce}=Ge(),{cliCommand:Ra,loginCommand:nf}=Ni(),af=Na.join(tf.homedir(),".frontfriend"),Ve=Na.join(af,"credentials");function of(){return Ve}function kt(){try{return Jl(Ve)}catch{return null}}function Pa(r){try{let i=JSON.parse(Buffer.from(String(r).split(".")[1],"base64url").toString("utf8"));return typeof i.email=="string"?i.email:null}catch{return null}}function uf(){let r=kt();if(!r||!r.accessToken)return null;let i=Number(r.refreshExpiresAt)||0;return{email:Pa(r.accessToken),apiUrl:r.ffApiUrl||null,expired:i>0&&i<Date.now()}}function Ta(r){Zl(Ve,r)}function cf(){return Yl(Ve)?(Ql(Ve),!0):!1}function Ri(r,i=60*1e3){return!r?.accessToken||!r.expiresAt||Date.now()+i>=r.expiresAt}function Fe(r,{apiUrl:i,login:n,next:o}={}){let l=o||`Run \`${n||nf(i)}\` to sign in, then run the command again.`,h=new Error(`${r}. ${l}`);return h.code="FF_AUTH_REFRESH_FAILED",h}function La(r,i,n){return new Promise((o,l)=>{let h=new me(r);if(h.protocol!=="https:"&&!(h.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(h.hostname))){l(new Error("Frontfriend API URLs require HTTPS except on localhost"));return}let f=h.protocol==="https:"?rf:sf,m=JSON.stringify(i||{}),y=f.request({hostname:h.hostname,port:h.port,path:`${h.pathname}${h.search}`,method:"POST",headers:{"content-type":"application/json","content-length":Buffer.byteLength(m),...n?{authorization:`Bearer ${n}`}:{}}},x=>{let w="";x.on("data",g=>{w+=g}),x.on("end",()=>{if(x.statusCode>=300&&x.statusCode<400){let S=x.headers.location?` to ${x.headers.location}`:"",E=new Error(`HTTP ${x.statusCode}: redirected${S}`);E.statusCode=x.statusCode,E.body=w,l(E);return}let g=null;try{g=w?JSON.parse(w):null}catch{let E=x.headers["content-type"]||"unknown content-type",k=new Error(`Expected JSON from FrontFriend API at ${r}, but received ${E} (HTTP ${x.statusCode}). Check FF_API_URL or pass --api-url with the FrontFriend app URL.`);if(k.statusCode=x.statusCode,k.body=w,x.statusCode>=400){l(k);return}l(k);return}if(x.statusCode>=400){let S=new Error(g?.error_description||g?.error||`HTTP ${x.statusCode}`);S.statusCode=x.statusCode,S.body=g,l(S);return}o(g)})});y.setTimeout(15e3,()=>y.destroy(Object.assign(new Error("Frontfriend API request timed out"),{code:"ETIMEDOUT"}))),y.on("error",l),y.write(m),y.end()})}function Oa(r,i){let n=new me(r?.ffApiUrl||Ce).origin,o=new me(i).origin;return Fe(`You are signed in to ${n}, but this command uses ${o}`,{login:Ra(`login --api-url ${o}`)})}async function hf(r){return ef(Ve,r,()=>Fe("Another Frontfriend command is renewing your sign-in",{next:"Wait for it to finish, then run the command again."}))}async function Fa(r,i=Ce){return hf(async()=>{let n=kt();if(n&&new me(n.ffApiUrl||Ce).origin===new me(i).origin){if(!Ri(n))return n;r=n}return lf(r,i)})}async function lf(r,i=Ce){if(new me(i).origin!==new me(r.ffApiUrl||Ce).origin)throw Oa(r,i);if(!r?.refreshToken||!r?.deviceId)throw Fe("Your Frontfriend sign-in has expired",{apiUrl:i});let n;try{n=await La(`${i}/api/plugin/token`,{grant_type:"refresh_token",refresh_token:r.refreshToken,device_id:r.deviceId})}catch(l){throw Object.assign(Fe(l?.message?`Could not renew your Frontfriend sign-in (${l.message})`:"Could not renew your Frontfriend sign-in",{apiUrl:i}),{cause:l})}if(!n?.access_token||!n?.refresh_token)throw Fe("Could not renew your Frontfriend sign-in",{apiUrl:i});let o={accessToken:n.access_token,refreshToken:n.refresh_token,deviceId:n.device_id||r.deviceId,expiresAt:Date.now()+(n.expires_in||900)*1e3,refreshExpiresAt:Date.now()+(n.refresh_expires_in||604800)*1e3,ffApiUrl:i};return Ta(o),o}var ff="ffm_";function pf(r){return typeof r=="string"&&r.startsWith(ff)}async function df(r={}){if(r.envToken)return r.envToken;if(!r.skipCredentials){let i=kt();if(i?.accessToken||i?.refreshToken){let n=r.baseURL||i.ffApiUrl||Ce;if(new me(n).origin!==new me(i.ffApiUrl||Ce).origin)throw Oa(i,n);return i.accessToken&&!Ri(i)?i.accessToken:(await Fa(i,n)).accessToken}}return r.configuredToken?(r.silent||console.warn(`\u26A0\uFE0F auth-token in frontfriend.config.js is deprecated. Run \`${Ra("login")}\` to keep your sign-in outside the repository.`),r.configuredToken):null}Va.exports={isMachineCredential:pf,accountEmail:Pa,signedInAccount:uf,getCredentialsPath:of,readCredentials:kt,writeCredentials:Ta,deleteCredentials:cf,isExpired:Ri,postJson:La,refreshCredentials:Fa,resolveAuthToken:df,createAuthRefreshError:Fe}});var qa=C((Zp,$a)=>{var he=require("path"),{fileExists:Ti}=He();function Da(r,i=process.cwd()){let n=i;for(;n!==he.parse(n).root;){let o=he.join(n,r);if(Ti(o))return o;n=he.dirname(n)}return null}function mf(r,i=process.cwd(),n=null){let o=[],l=i,h=10;for(let f=0;f<h;f++){o.push(he.join(l,r)),f<3&&o.push(he.join(l,"../".repeat(f+1)+r));let m=he.dirname(l);if(m===l)break;l=m}o.push(he.join(__dirname,"../../../",r));for(let f of o)if(Ti(f)&&(!n||n(f)))return f;return null}function xf(r,i=process.cwd()){let n=r.map(o=>he.isAbsolute(o)?o:he.join(i,o));for(let o of n)if(Ti(o))return o;return null}function gf(r=process.cwd()){let i=Da("frontfriend.config.js",r);return i?he.dirname(i):r}$a.exports={findFileUpward:Da,findDirectoryUpward:mf,findDirectoryWithPaths:xf,resolveProjectRoot:gf}});var Ba=C((At,ja)=>{(function(r,i){typeof At=="object"&&typeof ja<"u"?i(At):typeof define=="function"&&define.amd?define(["exports"],i):(r=typeof globalThis<"u"?globalThis:r||self,i(r.acorn={}))})(At,function(r){"use strict";var i=[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",l="\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",h={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"},f="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:f,"5module":f+" export import",6:f+" const class extends export import super"},y=/^in(stanceof)?$/,x=new RegExp("["+l+"]"),w=new RegExp("["+l+o+"]");function g(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 S(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:g(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&&w.test(String.fromCharCode(e)):t===!1?!1:g(e,n)||g(e,i)}var k=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 B(e,t){return new k(e,{beforeExpr:!0,binop:t})}var Y={beforeExpr:!0},J={startsExpr:!0},Qe={};function F(e,t){return t===void 0&&(t={}),t.keyword=e,Qe[e]=new k(e,t)}var u={num:new k("num",J),regexp:new k("regexp",J),string:new k("string",J),name:new k("name",J),privateId:new k("privateId",J),eof:new k("eof"),bracketL:new k("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new k("]"),braceL:new k("{",{beforeExpr:!0,startsExpr:!0}),braceR:new k("}"),parenL:new k("(",{beforeExpr:!0,startsExpr:!0}),parenR:new k(")"),comma:new k(",",Y),semi:new k(";",Y),colon:new k(":",Y),dot:new k("."),question:new k("?",Y),questionDot:new k("?."),arrow:new k("=>",Y),template:new k("template"),invalidTemplate:new k("invalidTemplate"),ellipsis:new k("...",Y),backQuote:new k("`",J),dollarBraceL:new k("${",{beforeExpr:!0,startsExpr:!0}),eq:new k("=",{beforeExpr:!0,isAssign:!0}),assign:new k("_=",{beforeExpr:!0,isAssign:!0}),incDec:new k("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new k("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:B("||",1),logicalAND:B("&&",2),bitwiseOR:B("|",3),bitwiseXOR:B("^",4),bitwiseAND:B("&",5),equality:B("==/!=/===/!==",6),relational:B("</>/<=/>=",7),bitShift:B("<</>>/>>>",8),plusMin:new k("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:B("%",10),star:B("*",10),slash:B("/",10),starstar:new k("**",{beforeExpr:!0}),coalesce:B("??",1),_break:F("break"),_case:F("case",Y),_catch:F("catch"),_continue:F("continue"),_debugger:F("debugger"),_default:F("default",Y),_do:F("do",{isLoop:!0,beforeExpr:!0}),_else:F("else",Y),_finally:F("finally"),_for:F("for",{isLoop:!0}),_function:F("function",J),_if:F("if"),_return:F("return",Y),_switch:F("switch"),_throw:F("throw",Y),_try:F("try"),_var:F("var"),_const:F("const"),_while:F("while",{isLoop:!0}),_with:F("with"),_new:F("new",{beforeExpr:!0,startsExpr:!0}),_this:F("this",J),_super:F("super",J),_class:F("class",J),_extends:F("extends",Y),_export:F("export"),_import:F("import",J),_null:F("null",J),_true:F("true",J),_false:F("false",J),_in:F("in",{beforeExpr:!0,binop:7}),_instanceof:F("instanceof",{beforeExpr:!0,binop:7}),_typeof:F("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:F("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:F("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},z=/\r\n?|\n|\u2028|\u2029/,Fi=new RegExp(z.source,"g");function Ee(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(Ee(c))return a<s-1&&c===13&&e.charCodeAt(a+1)===10?a+2:a+1}return-1}var Pt=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,M=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Di=Object.prototype,Za=Di.hasOwnProperty,eo=Di.toString,_e=Object.hasOwn||function(e,t){return Za.call(e,t)},$i=Array.isArray||function(e){return eo.call(e)==="[object Array]"},qi=Object.create(null);function xe(e){return qi[e]||(qi[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function le(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var to=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Ie=function(t,s){this.line=t,this.column=s};Ie.prototype.offset=function(t){return new Ie(this.line,this.column+t)};var $e=function(t,s,a){this.start=s,this.end=a,t.sourceFile!==null&&(this.source=t.sourceFile)};function Tt(e,t){for(var s=1,a=0;;){var c=Vi(e,a,t);if(c<0)return new Ie(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 io(e){var t={};for(var s in Ze)t[s]=e&&_e(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),$i(t.onToken)){var a=t.onToken;t.onToken=function(c){return a.push(c)}}if($i(t.onComment)&&(t.onComment=ro(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function ro(e,t){return function(s,a,c,p,d,v){var b={type:s?"Block":"Line",value:a,start:c,end:p};e.locations&&(b.loc=new $e(this,d,v)),e.ranges&&(b.range=[c,p]),t.push(b)}}var be=1,Se=2,Lt=4,Bi=8,Ot=16,Ui=32,et=64,Mi=128,we=256,qe=512,Gi=1024,tt=be|Se|we;function Ft(e,t){return Se|(e?Lt:0)|(t?Bi:0)}var it=0,Vt=1,fe=2,Hi=3,Wi=4,Xi=5,q=function(t,s,a){this.options=t=io(t),this.sourceFile=t.sourceFile,this.keywords=xe(m[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var c="";t.allowReserved!==!0&&(c=h[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(c+=" await")),this.reservedWords=xe(c);var p=(c?c+" ":"")+h.strict;this.reservedWordsStrict=xe(p),this.reservedWordsStrictBind=xe(p+" "+h.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(z).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"?Se:be),this.regexpState=null,this.privateNameStack=[]},Z={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}};q.prototype.parse=function(){var t=this,s=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(s)})},Z.inFunction.get=function(){return(this.currentVarScope().flags&Se)>0},Z.inGenerator.get=function(){return(this.currentVarScope().flags&Bi)>0},Z.inAsync.get=function(){return(this.currentVarScope().flags&Lt)>0},Z.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],s=t.flags;if(s&(we|qe))return!1;if(s&Se)return(s&Lt)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Z.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&be)},Z.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&et)>0||this.options.allowSuperOutsideMethod},Z.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Mi)>0},Z.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Z.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],s=t.flags;if(s&(we|qe)||s&Se&&!(s&Ot))return!0}return!1},Z.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&Gi||!this.inModule&&t&be)},Z.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&we)>0},q.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},q.parse=function(t,s){return new this(s,t).parse()},q.parseExpressionAt=function(t,s,a){var c=new this(a,t,s);return c.nextToken(),c.parseExpression()},q.tokenizer=function(t,s){return new this(s,t)},Object.defineProperties(q.prototype,Z);var W=q.prototype,so=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;W.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){M.lastIndex=e,e+=M.exec(this.input)[0].length;var t=so.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==="}"||z.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++}},W.eat=function(e){return this.type===e?(this.next(),!0):!1},W.isContextual=function(e){return this.type===u.name&&this.value===e&&!this.containsEsc},W.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},W.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}},W.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},W.canInsertSemicolon=function(){return this.type===u.eof||this.type===u.braceR||z.test(this.input.slice(this.lastTokEnd,this.start))},W.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},W.semicolon=function(){!this.eat(u.semi)&&!this.insertSemicolon()&&this.unexpected()},W.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},W.expect=function(e){this.eat(e)||this.unexpected()},W.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var rt=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};W.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")}},W.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")},W.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")},W.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var N=q.prototype;N.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 p=c[a];this.raiseRecoverable(this.undefinedExports[p].start,"Export '"+p+"' 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 Dt={kind:"loop"},no={kind:"switch"};N.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(S(a)){var c=s;do s+=a<=65535?1:2;while(E(a=this.fullCharCodeAt(s)));if(a===92)return!0;var p=this.input.slice(c,s);if(!y.test(p))return!0}return!1},N.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!z.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))},N.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(z.test(this.input.slice(this.pos,a)))return!1;if(e){var c=a+5,p;if(this.input.slice(a,c)!=="using"||c===this.input.length||E(p=this.fullCharCodeAt(c))||p===92)return!1;M.lastIndex=c;var d=M.exec(this.input);if(a=c+d[0].length,d&&z.test(this.input.slice(c,a)))return!1}var v=this.fullCharCodeAt(a);if(!S(v)&&v!==92)return!1;var b=a;do a+=v<=65535?1:2;while(E(v=this.fullCharCodeAt(a)));if(v===92)return!0;var R=this.input.slice(b,a);if(y.test(R))return!1;if(t&&!e&&R==="of"){M.lastIndex=a;var L=M.exec(this.input);if(a=a+L[0].length,this.input.charCodeAt(a)!==61||(v=this.input.charCodeAt(a+1))===61||v===62)return!1}return!0},N.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},N.isUsing=function(e){return this.isUsingKeyword(!1,e)},N.parseStatement=function(e,t,s){var a=this.type,c=this.startNode(),p;switch(this.isLet(e)&&(a=u._var,p="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 p=p||this.value,e&&p!=="var"&&this.unexpected(),this.parseVarStatement(c,p);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),v=this.pos+d[0].length,b=this.input.charCodeAt(v);if(b===40||b===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 R=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(R)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"),R==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(c,!1,R),this.semicolon(),this.finishNode(c,"VariableDeclaration");var L=this.value,D=this.parseExpression();return a===u.name&&D.type==="Identifier"&&this.eat(u.colon)?this.parseLabeledStatement(c,L,D,e):this.parseExpressionStatement(c,D)}},N.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")},N.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},N.parseDoStatement=function(e){return this.next(),this.labels.push(Dt),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")},N.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Dt),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 p=this.isContextual("let"),d=!1,v=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(v){var b=this.startNode();return this.next(),v==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(b,!0,v),this.finishNode(b,"VariableDeclaration"),this.parseForAfterInit(e,b,t)}var R=this.containsEsc,L=new rt,D=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===D&&!R&&X.type==="Identifier"&&X.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),p&&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))},N.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))},N.parseFunctionStatement=function(e,t,s){return this.next(),this.parseFunction(e,je|(s?0:$t),!1,t)},N.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")},N.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")},N.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(u.braceL),this.labels.push(no),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")},N.parseThrowStatement=function(e){return this.next(),z.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 ao=[];N.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Ui:0),this.checkLValPattern(e,t?Wi:fe),this.expect(u.parenR),e},N.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")},N.parseVarStatement=function(e,t,s){return this.next(),this.parseVar(e,!1,t,s),this.semicolon(),this.finishNode(e,"VariableDeclaration")},N.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Dt),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},N.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")},N.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},N.parseLabeledStatement=function(e,t,s,a){for(var c=0,p=this.labels;c<p.length;c+=1){var d=p[c];d.name===t&&this.raise(s.start,"Label '"+t+"' is already declared")}for(var v=this.type.isLoop?"loop":this.type===u._switch?"switch":null,b=this.labels.length-1;b>=0;b--){var R=this.labels[b];if(R.statementStart===e.start)R.statementStart=this.start,R.kind=v;else break}return this.labels.push({name:t,kind:v,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")},N.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},N.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")},N.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")},N.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")},N.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},N.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Vt:fe,!1)};var je=1,$t=2,zi=4;N.parseFunction=function(e,t,s,a,c){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!a)&&(this.type===u.star&&t&$t&&this.unexpected(),e.generator=this.eat(u.star)),this.options.ecmaVersion>=8&&(e.async=!!a),t&je&&(e.id=t&zi&&this.type!==u.name?null:this.parseIdent(),e.id&&!(t&$t)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Vt:fe:Hi));var p=this.yieldPos,d=this.awaitPos,v=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ft(e.async,e.generator)),t&je||(e.id=this.type===u.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,s,!1,c),this.yieldPos=p,this.awaitPos=d,this.awaitIdentPos=v,this.finishNode(e,t&je?"FunctionDeclaration":"FunctionExpression")},N.parseFunctionParams=function(e){this.expect(u.parenL),e.params=this.parseBindingList(u.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},N.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(),p=!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"?(p&&this.raiseRecoverable(d.start,"Duplicate constructor in the same class"),p=!0):d.key&&d.key.type==="PrivateIdentifier"&&oo(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")},N.parseClassElement=function(e){if(this.eat(u.semi))return null;var t=this.options.ecmaVersion,s=this.startNode(),a="",c=!1,p=!1,d="method",v=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(u.braceL))return this.parseClassStaticBlock(s),s;this.isClassElementNameStart()||this.type===u.star?v=!0:a="static"}if(s.static=v,!a&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===u.star)&&!this.canInsertSemicolon()?p=!0:a="async"),!a&&(t>=9||!p)&&this.eat(u.star)&&(c=!0),!a&&!p&&!c){var b=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?d=b:a=b)}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||p){var R=!s.static&&st(s,"constructor"),L=R&&e;R&&d!=="method"&&this.raise(s.key.start,"Constructor can't have get/set modifier"),s.kind=R?"constructor":d,this.parseClassMethod(s,c,p,L)}else this.parseClassField(s);return s},N.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},N.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)},N.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 p=e.value=this.parseMethod(t,s,a);return e.kind==="get"&&p.params.length!==0&&this.raiseRecoverable(p.start,"getter should have no params"),e.kind==="set"&&p.params.length!==1&&this.raiseRecoverable(p.start,"setter should have exactly one param"),e.kind==="set"&&p.params[0].type==="RestElement"&&this.raiseRecoverable(p.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},N.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(qe|et),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")},N.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(we|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")},N.parseClassId=function(e,t){this.type===u.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,fe,!1)):(t===!0&&this.unexpected(),e.id=null)},N.parseClassSuper=function(e){e.superClass=this.eat(u._extends)?this.parseExprSubscripts(null,!1):null},N.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},N.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],p=0;p<s.length;++p){var d=s[p];_e(t,d.name)||(c?c.used.push(d):this.raiseRecoverable(d.start,"Private field '#"+d.name+"' must be declared in an enclosing class"))}};function oo(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)}N.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")},N.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")},N.parseExportDeclaration=function(e){return this.parseStatement(null)},N.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,je|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}},N.checkExport=function(e,t,s){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),_e(e,t)&&this.raiseRecoverable(s,"Duplicate export '"+t+"'"),e[t]=!0)},N.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 p=c[a];this.checkPatternExport(e,p)}else if(s==="ArrayPattern")for(var d=0,v=t.elements;d<v.length;d+=1){var b=v[d];b&&this.checkPatternExport(e,b)}else s==="Property"?this.checkPatternExport(e,t.value):s==="AssignmentPattern"?this.checkPatternExport(e,t.left):s==="RestElement"&&this.checkPatternExport(e,t.argument)},N.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)}},N.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},N.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")},N.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},N.parseImport=function(e){return this.next(),this.type===u.string?(e.specifiers=ao,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")},N.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,fe),this.finishNode(e,"ImportSpecifier")},N.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,fe),this.finishNode(e,"ImportDefaultSpecifier")},N.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,fe),this.finishNode(e,"ImportNamespaceSpecifier")},N.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},N.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;_e(t,c)&&this.raiseRecoverable(a.key.start,"Duplicate attribute key '"+c+"'"),t[c]=!0,e.push(a)}return e},N.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")},N.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===u.string){var e=this.parseLiteral(this.value);return to.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},N.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)},N.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 ee=q.prototype;ee.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 p=c[a];this.toAssignable(p,t),p.type==="RestElement"&&(p.argument.type==="ArrayPattern"||p.argument.type==="ObjectPattern")&&this.raise(p.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},ee.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 p=e[s-1];this.options.ecmaVersion===6&&t&&p&&p.type==="RestElement"&&p.argument.type!=="Identifier"&&this.unexpected(p.argument.start)}return e},ee.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},ee.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")},ee.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()},ee.parseBindingList=function(e,t,s,a){for(var c=[],p=!0;!this.eat(e);)if(p?p=!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},ee.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},ee.parseBindingListItem=function(e){return e},ee.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")},ee.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===fe&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),s&&(_e(s,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),s[e.name]=!0),t!==Xi&&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")}},ee.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 p=c[a];this.checkLValInnerPattern(p,t,s)}break;case"ArrayPattern":for(var d=0,v=e.elements;d<v.length;d+=1){var b=v[d];b&&this.checkLValInnerPattern(b,t,s)}break;default:this.checkLValSimple(e,t,s)}},ee.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 te=function(t,s,a,c,p){this.token=t,this.isExpr=!!s,this.preserveSpace=!!a,this.override=c,this.generator=!!p},V={b_stat:new te("{",!1),b_expr:new te("{",!0),b_tmpl:new te("${",!1),p_stat:new te("(",!1),p_expr:new te("(",!0),q_tmpl:new te("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new te("function",!1),f_expr:new te("function",!0),f_expr_gen:new te("function",!0,!1,null,!0),f_gen:new te("function",!1,!1,null,!0)},ke=q.prototype;ke.initialContext=function(){return[V.b_stat]},ke.curContext=function(){return this.context[this.context.length-1]},ke.braceIsBlock=function(e){var t=this.curContext();return t===V.f_expr||t===V.f_stat?!0:e===u.colon&&(t===V.b_stat||t===V.b_expr)?!t.isExpr:e===u._return||e===u.name&&this.exprAllowed?z.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===V.b_stat:e===u._var||e===u._const||e===u.name?!1:!this.exprAllowed},ke.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},ke.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},ke.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===V.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)?V.b_stat:V.b_expr),this.exprAllowed=!0},u.dollarBraceL.updateContext=function(){this.context.push(V.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?V.p_stat:V.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()!==V.p_stat)&&!(e===u._return&&z.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===u.colon||e===u.braceL)&&this.curContext()===V.b_stat)?this.context.push(V.f_expr):this.context.push(V.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()===V.q_tmpl?this.context.pop():this.context.push(V.q_tmpl),this.exprAllowed=!1},u.star.updateContext=function(e){if(e===u._function){var t=this.context.length-1;this.context[t]===V.f_expr?this.context[t]=V.f_expr_gen:this.context[t]=V.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 P=q.prototype;P.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 p=e.kind;if(this.options.ecmaVersion>=6){c==="__proto__"&&p==="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 v;p==="init"?v=this.strict&&d.init||d.get||d.set:v=d.init||d[p],v&&this.raiseRecoverable(a.start,"Redefinition of property")}else d=t[c]={init:!1,get:!1,set:!1};d[p]=!0}},P.parseExpression=function(e,t){var s=this;return this.catchStackOverflow(function(){var a=s.start,c=s.startLoc,p=s.parseMaybeAssign(e,t);if(s.type===u.comma){var d=s.startNodeAt(a,c);for(d.expressions=[p];s.eat(u.comma);)d.expressions.push(s.parseMaybeAssign(e,t));return s.finishNode(d,"SequenceExpression")}return p})},P.parseMaybeAssign=function(e,t,s){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var a=!1,c=-1,p=-1,d=-1;t?(c=t.parenthesizedAssign,p=t.trailingComma,d=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new rt,a=!0);var v=this.start,b=this.startLoc;(this.type===u.parenL||this.type===u.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var R=this.parseMaybeConditional(e,t);if(s&&(R=s.call(this,R,v,b)),this.type.isAssign){var L=this.startNodeAt(v,b);return L.operator=this.value,this.type===u.eq&&(R=this.toAssignable(R,!1,t)),a||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=R.start&&(t.shorthandAssign=-1),this.type===u.eq?this.checkLValPattern(R):this.checkLValSimple(R),L.left=R,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),p>-1&&(t.trailingComma=p),R},P.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 p=this.startNodeAt(s,a);return p.test=c,p.consequent=this.parseMaybeAssign(),this.expect(u.colon),p.alternate=this.parseMaybeAssign(e),this.finishNode(p,"ConditionalExpression")}return c},P.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)},P.parseExprOp=function(e,t,s,a,c){var p=this.type.binop;if(p!=null&&(!c||this.type!==u._in)&&p>a){var d=this.type===u.logicalOR||this.type===u.logicalAND,v=this.type===u.coalesce;v&&(p=u.logicalAND.binop);var b=this.value;this.next();var R=this.start,L=this.startLoc,D=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,c),R,L,p,c),X=this.buildBinary(t,s,e,D,b,d||v);return(d&&this.type===u.coalesce||v&&(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},P.buildBinary=function(e,t,s,a,c,p){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,p?"LogicalExpression":"BinaryExpression")},P.parseMaybeUnary=function(e,t,s,a){var c=this.start,p=this.startLoc,d;if(this.isContextual("await")&&this.canAwait)d=this.parseAwait(a),t=!0;else if(this.type.prefix){var v=this.startNode(),b=this.type===u.incDec;v.operator=this.value,v.prefix=!0,this.next(),v.argument=this.parseMaybeUnary(null,!0,b,a),this.checkExpressionErrors(e,!0),b?this.checkLValSimple(v.argument):this.strict&&v.operator==="delete"&&Ki(v.argument)?this.raiseRecoverable(v.start,"Deleting local variable in strict mode"):v.operator==="delete"&&qt(v.argument)?this.raiseRecoverable(v.start,"Private fields can not be deleted"):t=!0,d=this.finishNode(v,b?"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 R=this.startNodeAt(c,p);R.operator=this.value,R.prefix=!1,R.argument=d,this.checkLValSimple(d),this.next(),d=this.finishNode(R,"UpdateExpression")}}if(!s&&this.eat(u.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(c,p,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 qt(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&qt(e.expression)||e.type==="ParenthesizedExpression"&&qt(e.expression)}P.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 p=this.parseSubscripts(c,s,a,!1,t);return e&&p.type==="MemberExpression"&&(e.parenthesizedAssign>=p.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=p.start&&(e.parenthesizedBind=-1),e.trailingComma>=p.start&&(e.trailingComma=-1)),p},P.parseSubscripts=function(e,t,s,a,c){for(var p=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 v=this.parseSubscript(e,t,s,a,p,d,c);if(v.optional&&(d=!0),v===e||v.type==="ArrowFunctionExpression"){if(d){var b=this.startNodeAt(t,s);b.expression=v,v=this.finishNode(b,"ChainExpression")}return v}e=v}},P.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(u.arrow)},P.parseSubscriptAsyncArrow=function(e,t,s,a){return this.parseArrowExpression(this.startNodeAt(e,t),s,!0,a)},P.parseSubscript=function(e,t,s,a,c,p,d){var v=this.options.ecmaVersion>=11,b=v&&this.eat(u.questionDot);a&&b&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var R=this.eat(u.bracketL);if(R||b&&this.type!==u.parenL&&this.type!==u.backQuote||this.eat(u.dot)){var L=this.startNodeAt(t,s);L.object=e,R?(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=!!R,v&&(L.optional=b),e=this.finishNode(L,"MemberExpression")}else if(!a&&this.eat(u.parenL)){var D=new rt,X=this.yieldPos,Me=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,D);if(c&&!b&&this.shouldParseAsyncArrow())return this.checkPatternErrors(D,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=X,this.awaitPos=Me,this.awaitIdentPos=Ae,this.parseSubscriptAsyncArrow(t,s,ct,d);this.checkExpressionErrors(D,!0),this.yieldPos=X||this.yieldPos,this.awaitPos=Me||this.awaitPos,this.awaitIdentPos=Ae||this.awaitIdentPos;var Ne=this.startNodeAt(t,s);Ne.callee=e,Ne.arguments=ct,v&&(Ne.optional=b),e=this.finishNode(Ne,"CallExpression")}else if(this.type===u.backQuote){(b||p)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Re=this.startNodeAt(t,s);Re.tag=e,Re.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(Re,"TaggedTemplateExpression")}return e},P.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 p=this.start,d=this.startLoc,v=this.containsEsc,b=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!v&&b.name==="async"&&!this.canInsertSemicolon()&&this.eat(u._function))return this.overrideContext(V.f_expr),this.parseFunction(this.startNodeAt(p,d),0,!1,!0,t);if(c&&!this.canInsertSemicolon()){if(this.eat(u.arrow))return this.parseArrowExpression(this.startNodeAt(p,d),[b],!1,t);if(this.options.ecmaVersion>=8&&b.name==="async"&&this.type===u.name&&!v&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return b=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(u.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(p,d),[b],!0,t)}return b;case u.regexp:var R=this.value;return a=this.parseLiteral(R.value),a.regex={pattern:R.pattern,flags:R.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,D=this.parseParenAndDistinguishExpression(c,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(D)&&(e.parenthesizedAssign=L),e.parenthesizedBind<0&&(e.parenthesizedBind=L)),D;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(V.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()}},P.parseExprAtomDefault=function(){this.unexpected()},P.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()},P.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")},P.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")},P.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")},P.parseParenExpression=function(){this.expect(u.parenL);var e=this.parseExpression();return this.expect(u.parenR),e},P.shouldParseArrow=function(e){return!this.canInsertSemicolon()},P.parseParenAndDistinguishExpression=function(e,t){var s=this.start,a=this.startLoc,c,p=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var d=this.start,v=this.startLoc,b=[],R=!0,L=!1,D=new rt,X=this.yieldPos,Me=this.awaitPos,Ae;for(this.yieldPos=0,this.awaitPos=0;this.type!==u.parenR;)if(R?R=!1:this.expect(u.comma),p&&this.afterTrailingComma(u.parenR,!0)){L=!0;break}else if(this.type===u.ellipsis){Ae=this.start,b.push(this.parseParenItem(this.parseRestBinding())),this.type===u.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else b.push(this.parseMaybeAssign(!1,D,this.parseParenItem));var ct=this.lastTokEnd,Ne=this.lastTokEndLoc;if(this.expect(u.parenR),e&&this.shouldParseArrow(b)&&this.eat(u.arrow))return this.checkPatternErrors(D,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=X,this.awaitPos=Me,this.parseParenArrowList(s,a,b,t);(!b.length||L)&&this.unexpected(this.lastTokStart),Ae&&this.unexpected(Ae),this.checkExpressionErrors(D,!0),this.yieldPos=X||this.yieldPos,this.awaitPos=Me||this.awaitPos,b.length>1?(c=this.startNodeAt(d,v),c.expressions=b,this.finishNodeAt(c,"SequenceExpression",ct,Ne)):c=b[0]}else c=this.parseParenExpression();if(this.options.preserveParens){var Re=this.startNodeAt(s,a);return Re.expression=c,this.finishNode(Re,"ParenthesizedExpression")}else return c},P.parseParenItem=function(e){return e},P.parseParenArrowList=function(e,t,s,a){return this.parseArrowExpression(this.startNodeAt(e,t),s,!1,a)};var uo=[];P.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=uo,this.finishNode(e,"NewExpression")},P.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")},P.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")},P.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)&&!X.test(this.input.slice(this.lastTokEnd,this.start))},P.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 p=this.parseProperty(e,t);e||this.checkPropClash(p,c,t),s.properties.push(p)}return this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},P.parseProperty=function(e,t){var s=this.startNode(),a,c,p,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)&&(p=this.start,d=this.startLoc),e||(a=this.eat(u.star)));var v=this.containsEsc;return this.parsePropertyName(s),!e&&!v&&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,p,d,t,v),this.finishNode(s,"Property")},P.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")},P.parsePropertyValue=function(e,t,s,a,c,p,d,v){(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&&!v&&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,p,this.copyNode(e.key)):this.type===u.eq&&d?(d.shorthandAssign<0&&(d.shorthandAssign=this.start),e.value=this.parseMaybeDefault(c,p,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()},P.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")},P.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},P.parseMethod=function(e,t,s){var a=this.startNode(),c=this.yieldPos,p=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(Ft(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=p,this.awaitIdentPos=d,this.finishNode(a,"FunctionExpression")},P.parseArrowExpression=function(e,t,s,a){var c=this.yieldPos,p=this.awaitPos,d=this.awaitIdentPos;return this.enterScope(Ft(s,!1)|Ot),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=p,this.awaitIdentPos=d,this.finishNode(e,"ArrowFunctionExpression")},P.parseFunctionBody=function(e,t,s,a){var c=t&&this.type!==u.braceL,p=this.strict,d=!1;if(c)e.body=this.parseMaybeAssign(a),e.expression=!0,this.checkParams(e,!1);else{var v=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!p||v)&&(d=this.strictDirective(this.end),d&&v&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var b=this.labels;this.labels=[],d&&(this.strict=!0),this.checkParams(e,!p&&!d&&!t&&!s&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,zi),e.body=this.parseBlock(!1,void 0,d&&!p),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=b}this.exitScope()},P.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},P.checkParams=function(e,t){for(var s=Object.create(null),a=0,c=e.params;a<c.length;a+=1){var p=c[a];this.checkLValInnerPattern(p,Vt,t?null:s)}},P.parseExprList=function(e,t,s,a){for(var c=[],p=!0;!this.eat(e);){if(p)p=!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},P.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"))}},P.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},P.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},P.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},P.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")},P.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=q.prototype;nt.raise=function(e,t){var s=Tt(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 Ie(this.curLine,this.pos-this.lineStart)};var ge=q.prototype,co=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};ge.enterScope=function(e){this.scopeStack.push(new co(e))},ge.exitScope=function(){this.scopeStack.pop()},ge.treatFunctionsAsVarInScope=function(e){return e.flags&Se||!this.inModule&&e.flags&be},ge.declareName=function(e,t,s){var a=!1;if(t===fe){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&be&&delete this.undefinedExports[e]}else if(t===Wi){var p=this.currentScope();p.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 v=this.scopeStack.length-1;v>=0;--v){var b=this.scopeStack[v];if(b.lexical.indexOf(e)>-1&&!(b.flags&Ui&&b.lexical[0]===e)||!this.treatFunctionsAsVarInScope(b)&&b.functions.indexOf(e)>-1){a=!0;break}if(b.var.push(e),this.inModule&&b.flags&be&&delete this.undefinedExports[e],b.flags&tt)break}a&&this.raiseRecoverable(s,"Identifier '"+e+"' has already been declared")},ge.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},ge.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},ge.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(tt|qe|we))return t}},ge.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(tt|qe|we)&&!(t.flags&Ot))return t}};var Be=function(t,s,a){this.type="",this.start=s,this.end=0,t.options.locations&&(this.loc=new $e(t,a)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[s,0])},Ue=q.prototype;Ue.startNode=function(){return new Be(this,this.start,this.startLoc)},Ue.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}Ue.finishNode=function(e,t){return Yi.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Ue.finishNodeAt=function(e,t,s,a){return Yi.call(this,e,t,s,a)},Ue.copyNode=function(e){var t=new Be(this,e.start,this.startLoc);for(var s in e)t[s]=e[s];return t};var ho="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,lo=tr,fo={9:Ji,10:Qi,11:Zi,12:er,13:tr,14:lo},po="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",mo={9:"",10:"",11:"",12:"",13:"",14:po},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",xo=or+" "+ho,go={9:rr,10:sr,11:nr,12:ar,13:or,14:xo},ur={};function vo(e){var t=ur[e]={binary:xe(fo[e]+" "+ir),binaryOfStrings:xe(mo[e]),nonBinary:{General_Category:xe(ir),Script:xe(go[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 jt=0,cr=[9,10,11,12,13,14];jt<cr.length;jt+=1){var yo=cr[jt];vo(yo)}var A=q.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 ue=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};ue.prototype.reset=function(t,s,a){var c=a.indexOf("v")!==-1,p=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=p&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=p&&this.parser.options.ecmaVersion>=9)},ue.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},ue.prototype.at=function(t,s){s===void 0&&(s=!1);var a=this.source,c=a.length;if(t>=c)return-1;var p=a.charCodeAt(t);if(!(s||this.switchU)||p<=55295||p>=57344||t+1>=c)return p;var d=a.charCodeAt(t+1);return d>=56320&&d<=57343?(p<<10)+d-56613888:p},ue.prototype.nextIndex=function(t,s){s===void 0&&(s=!1);var a=this.source,c=a.length;if(t>=c)return c;var p=a.charCodeAt(t),d;return!(s||this.switchU)||p<=55295||p>=57344||t+1>=c||(d=a.charCodeAt(t+1))<56320||d>57343?t+1:t+2},ue.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)},ue.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},ue.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)},ue.prototype.eat=function(t,s){return s===void 0&&(s=!1),this.current(s)===t?(this.advance(s),!0):!1},ue.prototype.eatChars=function(t,s){s===void 0&&(s=!1);for(var a=this.pos,c=0,p=t;c<p.length;c+=1){var d=p[c],v=this.at(a,s);if(v===-1||v!==d)return!1;a=this.nextIndex(a,s)}return this.pos=a,!0},A.validateRegExpFlags=function(e){for(var t=e.validFlags,s=e.flags,a=!1,c=!1,p=0;p<s.length;p++){var d=s.charAt(p);t.indexOf(d)===-1&&this.raise(e.start,"Invalid regular expression flag"),s.indexOf(d,p+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 Eo(e){for(var t in e)return!0;return!1}A.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Eo(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},A.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")}},A.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")},A.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},A.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},A.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},A.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1},A.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},A.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},A.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)},A.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},A.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 p=s.charAt(c);s.indexOf(p,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 v=0;v<d.length;v++){var b=d.charAt(v);(d.indexOf(b,v+1)>-1||s.indexOf(b)>-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},A.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},A.regexp_eatModifiers=function(e){for(var t="",s=0;(s=e.current())!==-1&&bo(s);)t+=le(s),e.advance();return t};function bo(e){return e===105||e===109||e===115}A.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)},A.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},A.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}A.regexp_eatPatternCharacters=function(e){for(var t=e.pos,s=0;(s=e.current())!==-1&&!hr(s);)e.advance();return e.pos!==t},A.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},A.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 p=c[a];p.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}},A.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},A.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=le(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=le(e.lastIntValue);return!0}return!1},A.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 S(e,!0)||e===36||e===95}A.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),wo(a)?(e.lastIntValue=a,!0):(e.pos=t,!1)};function wo(e){return E(e,!0)||e===36||e===95||e===8204||e===8205}A.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)},A.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},A.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},A.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)},A.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},A.regexp_eatZero=function(e){return e.current()===48&&!ot(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1},A.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},A.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}A.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 p=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=p,e.lastIntValue=c}return!0}if(a&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Co(e.lastIntValue))return!0;a&&e.raise("Invalid unicode escape"),e.pos=s}return!1};function Co(e){return e>=0&&e<=1114111}A.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},A.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,pe=1,ie=2;A.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(_o(t))return e.lastIntValue=-1,e.advance(),pe;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===ie&&e.raise("Invalid property name"),a;e.raise("Invalid property name")}return fr};function _o(e){return e===100||e===68||e===115||e===83||e===119||e===87}A.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),pe}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var c=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,c)}return fr},A.regexp_validateUnicodePropertyNameAndValue=function(e,t,s){_e(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(s)||e.raise("Invalid property value")},A.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return pe;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return ie;e.raise("Invalid property name")},A.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";pr(t=e.current());)e.lastStringValue+=le(t),e.advance();return e.lastStringValue!==""};function pr(e){return lr(e)||e===95}A.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Io(t=e.current());)e.lastStringValue+=le(t),e.advance();return e.lastStringValue!==""};function Io(e){return pr(e)||ot(e)}A.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},A.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===ie&&e.raise("Negated character class may contain strings"),!0}return!1},A.regexp_classContents=function(e){return e.current()===93?pe:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),pe)},A.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")}}},A.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},A.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)},A.regexp_classSetExpression=function(e){var t=pe,s;if(!this.regexp_eatClassSetRange(e))if(s=this.regexp_eatClassSetOperand(e)){s===ie&&(t=ie);for(var a=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(s=this.regexp_eatClassSetOperand(e))){s!==ie&&(t=pe);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===ie&&(t=ie)}},A.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},A.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?pe:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},A.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===ie&&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},A.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},A.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===ie&&(t=ie);return t},A.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?pe:ie},A.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()&&ko(s)||Ao(s)?!1:(e.advance(),e.lastIntValue=s,!0)};function ko(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 Ao(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}A.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return No(t)?(e.lastIntValue=t,e.advance(),!0):!1};function No(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}A.regexp_eatClassControlLetter=function(e){var t=e.current();return ot(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1},A.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},A.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}A.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}A.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},A.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}A.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 $e(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},O=q.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 S(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&&!Ee(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&&Pt.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||X.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(),S(t,!0)||t===92))return this.finishToken(u.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+le(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 '"+le(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(X.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 p=this.pos,d=this.readWord1();this.containsEsc&&this.unexpected(p);var v=this.regexpState||(this.regexpState=new ue(this));v.reset(s,c,d),this.validateRegExpFlags(v),this.validateRegExpPattern(v);var b=null;try{b=new RegExp(c,d)}catch{}return this.finishToken(u.regexp,{pattern:c,flags:d,value:b})},O.readInt=function(e,t,s){for(var a=this.options.ecmaVersion>=12&&t===void 0,c=s&&this.input.charCodeAt(this.pos)===48,p=this.pos,d=0,v=0,b=0,R=t??1/0;b<R;++b,++this.pos){var L=this.input.charCodeAt(this.pos),D=void 0;if(a&&L===95){c&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),v===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),b===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),v=L;continue}if(L>=97?D=L-97+10:L>=65?D=L-65+10:L>=48&&L<=57?D=L-48:D=1/0,D>=e)break;v=L,d=d*e+D}return a&&v===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===p||t!=null&&this.pos-p!==t?null:d};function Ro(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):S(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,S(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")),S(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var p=Ro(this.input.slice(t,this.pos),s);return this.finishToken(u.num,p)},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)):(Ee(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(Ee(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")},P.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")},P.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)&&!z.test(this.input.slice(this.lastTokEnd,this.start))},P.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 p=this.parseProperty(e,t);e||this.checkPropClash(p,c,t),s.properties.push(p)}return this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},P.parseProperty=function(e,t){var s=this.startNode(),a,c,p,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)&&(p=this.start,d=this.startLoc),e||(a=this.eat(u.star)));var v=this.containsEsc;return this.parsePropertyName(s),!e&&!v&&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,p,d,t,v),this.finishNode(s,"Property")},P.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")},P.parsePropertyValue=function(e,t,s,a,c,p,d,v){(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&&!v&&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,p,this.copyNode(e.key)):this.type===u.eq&&d?(d.shorthandAssign<0&&(d.shorthandAssign=this.start),e.value=this.parseMaybeDefault(c,p,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()},P.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")},P.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},P.parseMethod=function(e,t,s){var a=this.startNode(),c=this.yieldPos,p=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(Ft(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=p,this.awaitIdentPos=d,this.finishNode(a,"FunctionExpression")},P.parseArrowExpression=function(e,t,s,a){var c=this.yieldPos,p=this.awaitPos,d=this.awaitIdentPos;return this.enterScope(Ft(s,!1)|Ot),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=p,this.awaitIdentPos=d,this.finishNode(e,"ArrowFunctionExpression")},P.parseFunctionBody=function(e,t,s,a){var c=t&&this.type!==u.braceL,p=this.strict,d=!1;if(c)e.body=this.parseMaybeAssign(a),e.expression=!0,this.checkParams(e,!1);else{var v=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!p||v)&&(d=this.strictDirective(this.end),d&&v&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var b=this.labels;this.labels=[],d&&(this.strict=!0),this.checkParams(e,!p&&!d&&!t&&!s&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Xi),e.body=this.parseBlock(!1,void 0,d&&!p),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=b}this.exitScope()},P.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},P.checkParams=function(e,t){for(var s=Object.create(null),a=0,c=e.params;a<c.length;a+=1){var p=c[a];this.checkLValInnerPattern(p,Vt,t?null:s)}},P.parseExprList=function(e,t,s,a){for(var c=[],p=!0;!this.eat(e);){if(p)p=!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},P.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"))}},P.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},P.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},P.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},P.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")},P.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=q.prototype;nt.raise=function(e,t){var s=Tt(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 Ie(this.curLine,this.pos-this.lineStart)};var ge=q.prototype,co=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};ge.enterScope=function(e){this.scopeStack.push(new co(e))},ge.exitScope=function(){this.scopeStack.pop()},ge.treatFunctionsAsVarInScope=function(e){return e.flags&Se||!this.inModule&&e.flags&be},ge.declareName=function(e,t,s){var a=!1;if(t===fe){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&be&&delete this.undefinedExports[e]}else if(t===Wi){var p=this.currentScope();p.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 v=this.scopeStack.length-1;v>=0;--v){var b=this.scopeStack[v];if(b.lexical.indexOf(e)>-1&&!(b.flags&Ui&&b.lexical[0]===e)||!this.treatFunctionsAsVarInScope(b)&&b.functions.indexOf(e)>-1){a=!0;break}if(b.var.push(e),this.inModule&&b.flags&be&&delete this.undefinedExports[e],b.flags&tt)break}a&&this.raiseRecoverable(s,"Identifier '"+e+"' has already been declared")},ge.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},ge.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},ge.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(tt|qe|we))return t}},ge.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(tt|qe|we)&&!(t.flags&Ot))return t}};var Be=function(t,s,a){this.type="",this.start=s,this.end=0,t.options.locations&&(this.loc=new $e(t,a)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[s,0])},Ue=q.prototype;Ue.startNode=function(){return new Be(this,this.start,this.startLoc)},Ue.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}Ue.finishNode=function(e,t){return Yi.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},Ue.finishNodeAt=function(e,t,s,a){return Yi.call(this,e,t,s,a)},Ue.copyNode=function(e){var t=new Be(this,e.start,this.startLoc);for(var s in e)t[s]=e[s];return t};var ho="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,lo=tr,fo={9:Ji,10:Qi,11:Zi,12:er,13:tr,14:lo},po="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",mo={9:"",10:"",11:"",12:"",13:"",14:po},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",xo=or+" "+ho,go={9:rr,10:sr,11:nr,12:ar,13:or,14:xo},ur={};function vo(e){var t=ur[e]={binary:xe(fo[e]+" "+ir),binaryOfStrings:xe(mo[e]),nonBinary:{General_Category:xe(ir),Script:xe(go[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 jt=0,cr=[9,10,11,12,13,14];jt<cr.length;jt+=1){var yo=cr[jt];vo(yo)}var A=q.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 ue=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};ue.prototype.reset=function(t,s,a){var c=a.indexOf("v")!==-1,p=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=p&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=p&&this.parser.options.ecmaVersion>=9)},ue.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},ue.prototype.at=function(t,s){s===void 0&&(s=!1);var a=this.source,c=a.length;if(t>=c)return-1;var p=a.charCodeAt(t);if(!(s||this.switchU)||p<=55295||p>=57344||t+1>=c)return p;var d=a.charCodeAt(t+1);return d>=56320&&d<=57343?(p<<10)+d-56613888:p},ue.prototype.nextIndex=function(t,s){s===void 0&&(s=!1);var a=this.source,c=a.length;if(t>=c)return c;var p=a.charCodeAt(t),d;return!(s||this.switchU)||p<=55295||p>=57344||t+1>=c||(d=a.charCodeAt(t+1))<56320||d>57343?t+1:t+2},ue.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)},ue.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},ue.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)},ue.prototype.eat=function(t,s){return s===void 0&&(s=!1),this.current(s)===t?(this.advance(s),!0):!1},ue.prototype.eatChars=function(t,s){s===void 0&&(s=!1);for(var a=this.pos,c=0,p=t;c<p.length;c+=1){var d=p[c],v=this.at(a,s);if(v===-1||v!==d)return!1;a=this.nextIndex(a,s)}return this.pos=a,!0},A.validateRegExpFlags=function(e){for(var t=e.validFlags,s=e.flags,a=!1,c=!1,p=0;p<s.length;p++){var d=s.charAt(p);t.indexOf(d)===-1&&this.raise(e.start,"Invalid regular expression flag"),s.indexOf(d,p+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 Eo(e){for(var t in e)return!0;return!1}A.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Eo(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},A.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")}},A.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")},A.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},A.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},A.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},A.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1},A.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},A.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},A.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)},A.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},A.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 p=s.charAt(c);s.indexOf(p,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 v=0;v<d.length;v++){var b=d.charAt(v);(d.indexOf(b,v+1)>-1||s.indexOf(b)>-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},A.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},A.regexp_eatModifiers=function(e){for(var t="",s=0;(s=e.current())!==-1&&bo(s);)t+=le(s),e.advance();return t};function bo(e){return e===105||e===109||e===115}A.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)},A.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},A.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}A.regexp_eatPatternCharacters=function(e){for(var t=e.pos,s=0;(s=e.current())!==-1&&!hr(s);)e.advance();return e.pos!==t},A.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},A.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 p=c[a];p.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}},A.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},A.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=le(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=le(e.lastIntValue);return!0}return!1},A.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 S(e,!0)||e===36||e===95}A.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),wo(a)?(e.lastIntValue=a,!0):(e.pos=t,!1)};function wo(e){return E(e,!0)||e===36||e===95||e===8204||e===8205}A.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)},A.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},A.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},A.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)},A.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},A.regexp_eatZero=function(e){return e.current()===48&&!ot(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1},A.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},A.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}A.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 p=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=p,e.lastIntValue=c}return!0}if(a&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Co(e.lastIntValue))return!0;a&&e.raise("Invalid unicode escape"),e.pos=s}return!1};function Co(e){return e>=0&&e<=1114111}A.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},A.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,pe=1,ie=2;A.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(_o(t))return e.lastIntValue=-1,e.advance(),pe;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===ie&&e.raise("Invalid property name"),a;e.raise("Invalid property name")}return fr};function _o(e){return e===100||e===68||e===115||e===83||e===119||e===87}A.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),pe}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var c=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,c)}return fr},A.regexp_validateUnicodePropertyNameAndValue=function(e,t,s){_e(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(s)||e.raise("Invalid property value")},A.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return pe;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return ie;e.raise("Invalid property name")},A.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";pr(t=e.current());)e.lastStringValue+=le(t),e.advance();return e.lastStringValue!==""};function pr(e){return lr(e)||e===95}A.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Io(t=e.current());)e.lastStringValue+=le(t),e.advance();return e.lastStringValue!==""};function Io(e){return pr(e)||ot(e)}A.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},A.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===ie&&e.raise("Negated character class may contain strings"),!0}return!1},A.regexp_classContents=function(e){return e.current()===93?pe:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),pe)},A.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")}}},A.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},A.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)},A.regexp_classSetExpression=function(e){var t=pe,s;if(!this.regexp_eatClassSetRange(e))if(s=this.regexp_eatClassSetOperand(e)){s===ie&&(t=ie);for(var a=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(s=this.regexp_eatClassSetOperand(e))){s!==ie&&(t=pe);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===ie&&(t=ie)}},A.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},A.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?pe:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},A.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===ie&&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},A.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},A.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===ie&&(t=ie);return t},A.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?pe:ie},A.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()&&ko(s)||Ao(s)?!1:(e.advance(),e.lastIntValue=s,!0)};function ko(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 Ao(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}A.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return No(t)?(e.lastIntValue=t,e.advance(),!0):!1};function No(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}A.regexp_eatClassControlLetter=function(e){var t=e.current();return ot(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1},A.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},A.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}A.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}A.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},A.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}A.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 $e(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},O=q.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 S(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&&!Ee(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&&Pt.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||z.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(),S(t,!0)||t===92))return this.finishToken(u.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+le(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 '"+le(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(z.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 p=this.pos,d=this.readWord1();this.containsEsc&&this.unexpected(p);var v=this.regexpState||(this.regexpState=new ue(this));v.reset(s,c,d),this.validateRegExpFlags(v),this.validateRegExpPattern(v);var b=null;try{b=new RegExp(c,d)}catch{}return this.finishToken(u.regexp,{pattern:c,flags:d,value:b})},O.readInt=function(e,t,s){for(var a=this.options.ecmaVersion>=12&&t===void 0,c=s&&this.input.charCodeAt(this.pos)===48,p=this.pos,d=0,v=0,b=0,R=t??1/0;b<R;++b,++this.pos){var L=this.input.charCodeAt(this.pos),D=void 0;if(a&&L===95){c&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),v===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),b===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),v=L;continue}if(L>=97?D=L-97+10:L>=65?D=L-65+10:L>=48&&L<=57?D=L-48:D=1/0,D>=e)break;v=L,d=d*e+D}return a&&v===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===p||t!=null&&this.pos-p!==t?null:d};function Ro(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):S(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,S(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")),S(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var p=Ro(this.input.slice(t,this.pos),s);return this.finishToken(u.num,p)},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)):(Ee(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(Ee(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 le(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 Ee(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 p=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var d=this.readCodePoint();(t?S:E)(d,a)||this.invalidStringToken(p,"Invalid Unicode escape"),e+=le(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";q.acorn={Parser:q,version:yr,defaultOptions:Ze,Position:Ie,SourceLocation:$e,getLineInfo:Tt,Node:Be,TokenType:k,tokTypes:u,keywordTypes:Qe,TokContext:te,tokContexts:V,isIdentifierChar:E,isIdentifierStart:S,Token:ut,isNewLine:Ee,lineBreak:
|
|
17
|
+
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return le(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 Ee(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 p=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var d=this.readCodePoint();(t?S:E)(d,a)||this.invalidStringToken(p,"Invalid Unicode escape"),e+=le(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";q.acorn={Parser:q,version:yr,defaultOptions:Ze,Position:Ie,SourceLocation:$e,getLineInfo:Tt,Node:Be,TokenType:k,tokTypes:u,keywordTypes:Qe,TokContext:te,tokContexts:V,isIdentifierChar:E,isIdentifierStart:S,Token:ut,isNewLine:Ee,lineBreak:z,lineBreakG:Fi,nonASCIIwhitespace:Pt};function Po(e,t){return q.parse(e,t)}function To(e,t,s){return q.parseExpressionAt(e,t,s)}function Lo(e,t){return q.tokenizer(e,t)}r.Node=Be,r.Parser=q,r.Position=Ie,r.SourceLocation=$e,r.TokContext=te,r.Token=ut,r.TokenType=k,r.defaultOptions=Ze,r.getLineInfo=Tt,r.isIdentifierChar=E,r.isIdentifierStart=S,r.isNewLine=Ee,r.keywordTypes=Qe,r.lineBreak=z,r.lineBreakG=Fi,r.nonASCIIwhitespace=Pt,r.parse=Po,r.parseExpressionAt=To,r.tokContexts=V,r.tokTypes=u,r.tokenizer=Lo,r.version=yr})});var Ha=C((ed,Ga)=>{var{parse:vf}=Ba();function De(){let r=new Error("Configuration reads require a data-only object export. Remove executable statements from frontfriend.config.js.");return r.code="FRONTFRIEND_CONFIG_VALIDATION",r}function Ma(r){if(r.type!=="Property"||r.computed||r.method||r.kind!=="init")throw De();let i=r.key.type==="Identifier"?r.key.name:r.key.value;if(typeof i!="string"||["__proto__","constructor","prototype"].includes(i))throw De();return i}function Ua(r){if(r.type==="ExportDefaultDeclaration")return r.declaration;let i=r.type==="ExpressionStatement"?r.expression:null;return i?.type==="AssignmentExpression"&&i.operator==="="&&i.left.type==="MemberExpression"&&!i.left.computed&&i.left.object.name==="module"&&i.left.property.name==="exports"?i.right:null}function yf(r,i){if(r.type!=="VariableDeclaration"||r.declarations.length!==1)return null;let[n]=r.declarations;return n.id.type!=="Identifier"||i?.type!=="Identifier"||i.name!==n.id.name?null:n.init}function Ef(r){let n=vf(r,{ecmaVersion:"latest",sourceType:"module"}).body.filter(h=>h.type!=="EmptyStatement"&&!h.directive),o=n.length===1?Ua(n[0]):n.length===2?yf(n[0],Ua(n[1])):null;if(o?.type!=="ObjectExpression")throw De();function l(h,f=0){if(f>64)throw De();if(h.type==="Literal"&&(h.value===null||["string","number","boolean"].includes(typeof h.value)))return h.value;if(h.type==="ArrayExpression")return h.elements.map(m=>{if(!m)throw De();return l(m,f+1)});if(h.type==="ObjectExpression")return Object.fromEntries(h.properties.map(m=>[Ma(m),l(m.value,f+1)]));if(h.type==="UnaryExpression"&&["-","+"].includes(h.operator)&&h.argument.type==="Literal"&&typeof h.argument.value=="number")return h.operator==="-"?-h.argument.value:h.argument.value;if(h.type==="TemplateLiteral"&&h.expressions.length===0)return h.quasis[0].value.cooked;if(h.type==="MemberExpression"&&!h.computed&&h.object.type==="MemberExpression"&&!h.object.computed&&h.object.object.name==="process"&&h.object.property.name==="env")return process.env[h.property.name];if(h.type==="LogicalExpression"&&["||","??"].includes(h.operator)){let m=l(h.left,f+1);return h.operator==="||"?m||l(h.right,f+1):m??l(h.right,f+1)}throw De()}return{config:l(o),expression:o}}Ga.exports={parseStaticConfig:Ef,propertyName:Ma}});var za=C((td,Xa)=>{var{DEFAULT_API_URL:bf}=Ge();function Sf(){try{return Pi().readCredentials()?.ffApiUrl||null}catch{return null}}function Wa(r=process.cwd()){try{let{findFileUpward:i}=qa(),{parseStaticConfig:n}=Ha(),{readFileSafe:o}=He(),l=i("frontfriend.config.js",r);return l?n(o(l)).config:null}catch{return null}}function wf({flag:r,config:i,startDir:n,env:o=process.env,loginUrl:l=Sf}={}){i===void 0&&!r&&(i=Wa(n));let h=r||i?.["api-url"]||i?.apiUrl||o.FF_API_URL||(typeof l=="function"?l():l)||bf;return String(h).replace(/\/+$/,"")}Xa.exports={resolveApiUrl:wf,nearestConfig:Wa}});var Qa=C((id,Ja)=>{var{toRuntimeComponentConfig:Cf}=Dr(),Ka='FrontFriend components configuration not found. Run "npx frontfriend init" or "npx frontfriend sync".',_f="FrontFriend components configuration was not returned by the SaaS app. The cache was not updated.";function Li(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)}function Ya(r,i=Ka){if(!Li(r)||Object.keys(r).length===0)throw new Error(i);for(let[n,o]of Object.entries(r))Cf(o,n);return r}var Nt=class extends Error{constructor(i){super(i),this.name="Frontfriend",this.code="FF_SETUP_REQUIRED",this.stack=`${this.name}: ${i}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.stack}};function If(){try{let r=Pi().signedInAccount();return!!(r&&!r.expired)}catch{return!1}}function kf(r=process.cwd()){let{cliCommand:i,loginCommand:n}=Ni(),o=`\`${i("init",r)}\``,l="The design system is not installed in this project yet.";if(If())return`${l} Run ${o}, then start the app again.`;let h;try{h=za().resolveApiUrl({startDir:r})}catch{h=void 0}return`${l} Sign in with \`${n(h,r)}\`, run ${o}, then start the app again.`}function Oi(r){return new Nt(kf(r))}function Af(r){let i=r.appRoot||process.cwd();if(!r.exists())throw Oi(i);let n=r.load(),o=n?.componentsConfig;if(!Li(o)||Object.keys(o).length===0)throw Oi(i);return{componentsConfig:Ya(o),icons:Li(n.icons)?n.icons:{}}}Ja.exports={CACHE_ERROR_MESSAGE:Ka,SAAS_ERROR_MESSAGE:_f,assertComponentsConfig:Ya,loadCachedComponents:Af,SetupRequiredError:Nt,setupRequiredError:Oi}});var{PACKAGE_NAME:Rt}=Sr(),Je=require("fs"),oe=require("path"),Nf=Lr(),{loadCachedComponents:Rf,setupRequiredError:Pf}=Qa(),{CLASSES_SOURCE_FILE:Tf}=Ht();function Lf(r){return r.split(oe.sep).join("/")}function Of(r,i){let n=Lf(oe.relative(oe.dirname(r),i));return n.startsWith(".")||(n=`./${n}`),`@source "${n}";`}function Ff(r){let i=r.replace(/\/\*[\s\S]*?\*\//g,"");return/@tailwind\s+utilities\b/.test(i)||/@import\s+(?:url\(\s*)?["']tailwindcss(?:\/(?:index|utilities)(?:\.css)?)?["']/.test(i)||/@import\s+url\(\s*tailwindcss(?:\/(?:index|utilities)(?:\.css)?)?\s*\)/.test(i)}function Vf(r,i,n){let o=oe.join(r,"metadata.json"),l=null,h=(f,m)=>{f.mtimeMs!==m.mtimeMs&&(clearTimeout(l),l=setTimeout(n,100))};return Je.watchFile(o,{interval:i,persistent:!1},h),()=>{clearTimeout(l),Je.unwatchFile(o,h)}}module.exports=function(i={}){let n=i.fixture===!0,o,l,h,f,m;function y(x){if(n)return f={componentsConfig:{fixture:{styles:{}}},icons:{}},f;let w=x||process.cwd(),g=new Nf(w);return l=typeof g.getCacheDir=="function"?g.getCacheDir():oe.join(w,"node_modules",".cache","frontfriend"),f=Rf(g),f}return{name:Rt.slice(1).replace("/","-"),enforce:"pre",config(x={}){let{componentsConfig:w,icons:g}=y(x.root||process.cwd());if(h=n?[oe.join(__dirname,"src","theme.css"),oe.join(__dirname,"..","src","theme.css"),oe.join(__dirname,"theme.css")].find(k=>Je.existsSync(k)):oe.join(l,"theme.css"),!h)throw new Error("FrontFriend fixture theme.css not found.");let S=[`${Rt}/theme.css`,`${Rt}/theme`].map(k=>({find:k,replacement:h,...!Je.existsSync(h)&&{customResolver(){throw Pf(x.root||process.cwd())}}})),E=oe.join(__dirname,"browser.mjs");return{define:{__FF_CONFIG__:JSON.stringify(w),__FF_ICONS__:JSON.stringify(g)},resolve:{alias:[{find:new RegExp(`^${Rt}$`),replacement:E},...S]}}},configResolved(x){o=x,l=l||oe.join(x?.root||process.cwd(),"node_modules",".cache","frontfriend")},configureServer(x){n||!l||(m?.(),m=Vf(l,i.cacheWatchInterval??500,()=>{let w="[FrontFriend Vite] Design System cache changed: reloading with the new tokens and component config.";x.config?.logger?.info?x.config.logger.info(w,{timestamp:!0}):console.log(w),typeof x.restart=="function"?Promise.resolve(x.restart()).catch(g=>console.error(`[FrontFriend Vite] Restart failed: ${g.message}`)):x.ws?.send({type:"full-reload"})}),x.httpServer?.once("close",()=>m?.()))},closeBundle(){m?.(),m=void 0},transform(x,w){let[g,S=""]=w.split("?");if(!g.endsWith(".css")||/(?:^|&)(?:url|raw|inline)(?:&|=|$)/.test(S)||n||!Ff(x))return null;let E=oe.join(l||process.cwd(),Tf);if(!Je.existsSync(E))return null;let k=Of(g,E);return x.includes(k)?null:{code:`${x}
|
|
18
18
|
|
|
19
19
|
/* Frontfriend Tailwind v4 registry source */
|
|
20
20
|
${k}
|