@rizom/brain 0.2.0-alpha.237 → 0.2.0-alpha.239

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/site.js CHANGED
@@ -184,24 +184,24 @@ Stack:
184
184
  `)u=!1,o+=i(l,t,$),t=$;else if(!u&&b+d==="/*"){o+=l.slice(t,$),t=$,u=Dd,$++;continue}else if(u===Dd&&b+d==="*/"){$++,u=!1,o+=i(l,t,$+1),t=$+1;continue}else if(f&&!u){if(v!==-1){if(b==="}"||b==="]")o+=l.slice(t,$),w+=i(o,0,1)+o.slice(1),o="",t=$,v=-1;else if(b!==" "&&b!=="\t"&&b!=="\r"&&b!==`
185
185
  `)o+=l.slice(t,$),t=$,v=-1}else if(b===",")w+=o+l.slice(t,$),o="",t=$,v=$}}let k=u===$h?i(l,t,l.length):l.slice(t);return w+o+k}xd.exports=QR});var Cd=j((GR,sd)=>{var BR=jd(),Ed=new WeakMap;function HR(l,r,f,i){let{stripComments:n=!1}=f,{readJson:u}=l;if(u&&!n){u(r,(t,o)=>{if(t)return i(t);i(null,o)});return}l.readFile(r,(t,o)=>{if(t)return i(t);let w=o;if(n){let k=Ed.get(w);if(k!==void 0)return i(null,k)}let v;try{let k=w.toString(),$=n?BR(k,{trailingCommas:!0,whitespace:!0}):k;v=JSON.parse($)}catch(k){return i(k)}if(n)Ed.set(w,v);i(null,v)})}GR.readJson=HR});var E3=j((rn0,ug)=>{var{aliasResolveHandler:aR,compileAliasOptions:FR}=Y3(),{modulesResolveHandler:NR}=H3(),{readJson:RR}=Cd(),{PathType:ln0,isSubPath:TR,normalize:D3}=Z1(),ed=Symbol("NULL_CONTEXT"),lg=new WeakMap,LR={stripComments:!0},rg=/[/\\]\*$/;function fg(l){let r=l.indexOf("*");if(r===-1)return l.length;return r}function PR(l){return[...l].sort((r,f)=>fg(f)-fg(r))}function x3(l,r){return l=l||{},r=r||{},{...l,...r,compilerOptions:{...l.compilerOptions,...r.compilerOptions}}}function j3(l,r){if(!l.includes("${configDir}"))return l;return l.replace(/\$\{configDir\}/g,r)}function ig(l,r,f,i){let n=!i?l:f.join(l,i),u=PR(Object.keys(r)),t=[],o=[];for(let w of u){let k=r[w].map(($)=>{let b=j3($,l);return f.join(n,b)});if(k.length>0)if(w==="*")for(let $=0;$<k.length;$++){let b=k[$];if(rg.test(b))o.push(b.replace(rg,""))}else t.push({name:w,alias:k})}if(i&&n&&!o.includes(n))o.push(n);return{alias:FR(f,t),modules:o}}function pR(l,r,f){return!f?l:r.join(l,f)}function ng(l,r,f,i){let n={[r]:l,...f},u=Object.keys(n);return{main:l,mainContext:r,refs:f,allContexts:n,contextList:u,fileDependencies:i}}ug.exports=class{constructor(r){if(typeof r==="object"&&r!==null){let{configFile:f}=r;if(this.isAutoConfigFile=typeof f!=="string",this.configFile=this.isAutoConfigFile?"tsconfig.json":f,Array.isArray(r.references))this.references=r.references.map((i)=>({path:i}));else if(r.references==="auto")this.references="auto";else this.references=[];this.baseUrl=r.baseUrl}else this.isAutoConfigFile=r===!0,this.configFile=this.isAutoConfigFile?"tsconfig.json":r,this.references=[],this.baseUrl=void 0}apply(r){let f=r.ensureHook("internal-resolve"),i=r.ensureHook("module");r.getHook("raw-resolve").tapAsync("TsconfigPathsPlugin",(n,u,t)=>{this._getTsconfigPathsMap(r,n,u,(o,w)=>{if(o)return t(o);if(!w)return t();let v=this._selectPathsDataForContext(n.path,w);if(!v)return t();aR(r,v.alias,f,n,u,(k,$)=>{if(k)return t(k);if($)return t(null,$);return t()})})}),r.getHook("raw-module").tapAsync("TsconfigPathsPlugin",(n,u,t)=>{this._getTsconfigPathsMap(r,n,u,(o,w)=>{if(o)return t(o);if(!w)return t();let v=this._selectPathsDataForContext(n.path,w);if(!v)return t();NR(r,v.modules,i,n,u,t)})})}_getTsconfigPathsMap(r,f,i,n){if(typeof f.tsconfigPathsMap<"u"){let t=f.tsconfigPathsMap;if(!t)return n(null,null);if(i.fileDependencies)for(let o of t.fileDependencies)i.fileDependencies.add(o);return n(null,t)}if(this.isAutoConfigFile){this._findTsconfigUpward(r,f.path||process.cwd(),(t,o)=>{if(t)return f.tsconfigPathsMap=null,n(t);if(!o)return f.tsconfigPathsMap=null,n(null,null);let w=o;if(f.tsconfigPathsMap=w,i.fileDependencies)for(let v of w.fileDependencies)i.fileDependencies.add(v);n(null,w)});return}let u=r.join(f.path||process.cwd(),this.configFile);this._loadTsconfigPathsMap(r,u,(t,o)=>{if(t)return f.tsconfigPathsMap=null,n(t);let w=o;if(f.tsconfigPathsMap=w,i.fileDependencies)for(let v of w.fileDependencies)i.fileDependencies.add(v);n(null,w)})}_findTsconfigUpward(r,f,i){let{fileSystem:n}=r,u=this.configFile,t=(o)=>{let w=r.join(o,u);n.stat(w,(v)=>{if(!v){this._loadTsconfigPathsMap(r,w,($,b)=>{if($)return i($);i(null,b)});return}let k=r.dirname(o);if(k===o)return i(null,null);t(k)})};t(f)}_loadTsconfigPathsMap(r,f,i){let n=new Set;this._loadTsconfig(r,f,n,void 0,(u,t)=>{if(u)return i(u);let o=t,w=o.compilerOptions||{},v=r.dirname(f),k=this.baseUrl!==void 0?this.baseUrl:w.baseUrl,$=ig(v,w.paths||{},r,k),b={},d=null;if(this.references==="auto")d=o.references;else if(Array.isArray(this.references))d=this.references;if(!Array.isArray(d))return i(null,ng($,v,b,n));this._loadTsconfigReferences(r,v,d,n,b,(A)=>{if(A)return i(A);i(null,ng($,v,b,n))})})}_selectPathsDataForContext(r,f){let{main:i,allContexts:n,contextList:u}=f;if(!r)return i;let t;if(u.length>=2)if(t=lg.get(f),t!==void 0){let k=t.get(r);if(k!==void 0)return k===ed?null:k}else t=new Map,lg.set(f,t);let o=null,w=0;for(let k=0;k<u.length;k++){let $=u[k];if($===r){let b=n[$];if(t!==void 0)t.set(r,b);return b}if($.length>w&&TR($,r))o=$,w=$.length}let v=o===null?null:n[o];if(t!==void 0)t.set(r,v===null?ed:v);return v}_loadTsconfigFromExtends(r,f,i,n,u,t){let{fileSystem:o}=r,w=r.dirname(f);i=j3(i,w);let v=i;if(typeof i==="string"&&!i.includes(".json"))i+=".json";let k=r.join(w,i);o.stat(k,($)=>{let b=k;if($){if(typeof v==="string"&&v.startsWith("@")&&v.split("/").length===2)b=r.join(w,D3(`node_modules/${v}/tsconfig.json`));else if(i.includes("/"))b=r.join(w,D3(`node_modules/${i}`));else if(!v.startsWith(".")&&!v.startsWith("/"))b=r.join(w,D3(`node_modules/${v}/tsconfig.json`))}this._loadTsconfig(r,b,n,u,(d,A)=>{if(d)return t(d);let Y=A,z=Y.compilerOptions||{baseUrl:void 0};if(z.baseUrl){let R=r.dirname(b);z.baseUrl=pR(R,r,z.baseUrl)}delete Y.references,t(null,Y)})})}_loadTsconfigReferences(r,f,i,n,u,t,o){if(i.length===0)return t(null);let w=o||new Set,v=i.length,k=()=>{if(--v===0)t(null)};for(let $ of i){let b=j3($.path,f),d=r.join(r.join(f,b),"tsconfig.json");if(w.has(d)){k();continue}w.add(d),this._loadTsconfig(r,d,n,void 0,(A,Y)=>{if(A)return k();let z=Y;if(z.compilerOptions&&z.compilerOptions.paths){let R=r.dirname(d);u[R]=ig(R,z.compilerOptions.paths||{},r,z.compilerOptions.baseUrl)}if(this.references==="auto"&&Array.isArray(z.references))this._loadTsconfigReferences(r,r.dirname(d),z.references,n,u,k,w);else k()})}}_loadTsconfig(r,f,i,n,u){let t=n||new Set;if(t.has(f))return u(null,{});t.add(f),RR(r.fileSystem,f,LR,(o,w)=>{if(o)return u(o);let v=w;i.add(f);let k=v.extends;if(!k)return u(null,v);if(!Array.isArray(k)){this._loadTsconfigFromExtends(r,f,k,i,t,(A,Y)=>{if(A)return u(A);u(null,x3(Y,v))});return}let $={},b=0,d=()=>{if(b>=k.length)return u(null,x3($,v));this._loadTsconfigFromExtends(r,f,k[b++],i,t,(A,Y)=>{if(A)return u(A);$=x3($,Y),d()})};d()})}}});var og=j((fn0,hg)=>{var{isRelativeRequest:tg}=Z1();function MR(l,r,f){let i=f.join(l,r);return tg(i)?i:`./${i}`}function VR(l){if(l.descriptionFileRoot&&!l.module)return l.descriptionFileRoot;return l.path}function IR(l,r){let f=l.request;if(!f||!l.relativePath||!tg(f))return f;return MR(l.relativePath,f,r)}function qR(l,r,f,i){return JSON.stringify({type:l,context:f?r.context:"",path:VR(r),query:r.query,fragment:r.fragment,request:IR(r,i)})}hg.exports=class{constructor(r,f,i,n,u){this.source=r,this.filterPredicate=f,this.withContext=n,this.cache=i,this.target=u}apply(r){let f=r.ensureHook(this.target);r.getHook(this.source).tapAsync("UnsafeCachePlugin",(i,n,u)=>{if(!this.filterPredicate(i))return r.doResolve(f,i,null,n,u);let t=typeof n.yield==="function",o=qR(t?"yield":"default",i,this.withContext,r),w=this.cache[o];if(w){if(t){let b=n.yield;if(Array.isArray(w))for(let d of w)b(d);else b(w);return u(null,null)}return u(null,w)}let v,k,$=[];if(t)v=n.yield,k=(b)=>{$.push(b)};r.doResolve(f,i,null,k?{...n,yield:k}:n,(b,d)=>{if(b)return u(b);if(t){if(d)$.push(d);for(let A of $)v(A);return this.cache[o]=$,u(null,null)}if(d)return u(null,this.cache[o]=d);u()})})}}});var vg=j((in0,wg)=>{wg.exports=class{constructor(r,f,i){this.source=r,this.filename=f,this.target=i}apply(r){let f=r.ensureHook(this.target);r.getHook(this.source).tapAsync("UseFilePlugin",(i,n,u)=>{let t=r.join(i.path,this.filename),o={...i,path:t,relativePath:i.relativePath&&r.join(i.relativePath,this.filename)};r.doResolve(f,o,`using path: ${t}`,n,u)})}}});var gg=j((yT,dg)=>{var{versions:_R}=P0("process"),mg=Ab(),s3=Ob(),SR=Yb(),$n=zb(),au=Hb(),kg=Ub(),DR=jb(),C3=sb(),xR=eb(),jR=ry(),ER=iy(),bh=uy(),sR=wy(),e3=yy(),CR=gy(),Hr=Ay(),eR=Wy(),lT=Oy(),rT=Bd(),fT=Gd(),iT=ad(),nT=Rd(),uT=Pd(),tT=Vd(),hT=qd(),oT=Sd(),wT=E3(),vT=og(),$g=vg(),{PathType:bg,getType:mT}=Z1();function kT(l){if(l===void 0&&_R.pnp){let r=P0("module").findPnpApi;if(r)return{resolveToUnqualified(f,i,n){let u=r(i);if(!u)return null;return u.resolveToUnqualified(f,i,n)}}}return l||null}function yg(l){return typeof l==="object"&&!Array.isArray(l)&&l!==null?Object.keys(l).map((r)=>{let f={name:r,onlyModule:!1,alias:l[r]};if(/\$$/.test(r))f.onlyModule=!0,f.name=r.slice(0,-1);return f}):l||[]}function $T(l,r){let f=[],i=new Set(l);for(let n of i)if(r(n)){let u=f.length>0?f[f.length-1]:void 0;if(Array.isArray(u))u.push(n);else f.push([n])}else f.push(n);return f}function bT(l){let r=new Set(l.mainFields||["main"]),f=[];for(let i of r)if(typeof i==="string")f.push({name:[i],forceRelative:!0});else if(Array.isArray(i))f.push({name:i,forceRelative:!0});else f.push({name:Array.isArray(i.name)?i.name:[i.name],forceRelative:i.forceRelative});return{alias:yg(l.alias),fallback:yg(l.fallback),aliasFields:new Set(l.aliasFields),cachePredicate:l.cachePredicate||function(){return!0},cacheWithContext:typeof l.cacheWithContext<"u"?l.cacheWithContext:!0,exportsFields:new Set(l.exportsFields||["exports"]),importsFields:new Set(l.importsFields||["imports"]),conditionNames:new Set(l.conditionNames),descriptionFiles:[...new Set(l.descriptionFiles||["package.json"])],enforceExtension:l.enforceExtension===void 0?Boolean(l.extensions&&l.extensions.includes("")):l.enforceExtension,extensions:new Set(l.extensions||[".js",".json",".node"]),extensionAlias:l.extensionAlias?Object.keys(l.extensionAlias).map((i)=>({extension:i,alias:l.extensionAlias[i]})):[],extensionAliasForExports:l.extensionAliasForExports||!1,fileSystem:l.useSyncFileSystemCalls?new hT(l.fileSystem):l.fileSystem,unsafeCache:l.unsafeCache&&typeof l.unsafeCache!=="object"?{}:l.unsafeCache||!1,symlinks:typeof l.symlinks<"u"?l.symlinks:!0,resolver:l.resolver,modules:$T(Array.isArray(l.modules)?l.modules:l.modules?[l.modules]:["node_modules"],(i)=>{let n=mT(i);return n===bg.Normal||n===bg.Relative}),mainFields:f,mainFiles:new Set(l.mainFiles||["index"]),plugins:l.plugins||[],pnpApi:kT(l.pnpApi),roots:new Set(l.roots||void 0),fullySpecified:l.fullySpecified||!1,resolveToContext:l.resolveToContext||!1,preferRelative:l.preferRelative||!1,preferAbsolute:l.preferAbsolute||!1,restrictions:new Set(l.restrictions),tsconfig:typeof l.tsconfig>"u"?!1:l.tsconfig}}yT.createResolver=function(r){let f=bT(r),{alias:i,fallback:n,aliasFields:u,extensionAliasForExports:t,cachePredicate:o,cacheWithContext:w,conditionNames:v,descriptionFiles:k,enforceExtension:$,exportsFields:b,extensionAlias:d,importsFields:A,extensions:Y,fileSystem:z,fullySpecified:R,mainFields:H,mainFiles:G,modules:p,plugins:I,pnpApi:M,resolveToContext:X,preferRelative:P,preferAbsolute:_,symlinks:l0,unsafeCache:r0,resolver:u0,restrictions:N,roots:g,tsconfig:Z}=f,O=[...I],Q=u0||new rT(z,f);if(Q.ensureHook("resolve"),Q.ensureHook("internalResolve"),Q.ensureHook("newInternalResolve"),Q.ensureHook("importsResolve"),Q.ensureHook("parsedResolve"),Q.ensureHook("describedResolve"),Q.ensureHook("rawResolve"),Q.ensureHook("normalResolve"),Q.ensureHook("internal"),Q.ensureHook("rawModule"),Q.ensureHook("alternateRawModule"),Q.ensureHook("module"),Q.ensureHook("resolveAsModule"),Q.ensureHook("undescribedResolveInPackage"),Q.ensureHook("resolveInPackage"),Q.ensureHook("resolveInExistingDirectory"),Q.ensureHook("importsFieldRelative"),t)Q.ensureHook("exportsFieldRelative");Q.ensureHook("relative"),Q.ensureHook("describedRelative"),Q.ensureHook("directory"),Q.ensureHook("undescribedExistingDirectory"),Q.ensureHook("existingDirectory"),Q.ensureHook("undescribedRawFile"),Q.ensureHook("rawFile"),Q.ensureHook("file"),Q.ensureHook("finalFile"),Q.ensureHook("existingFile"),Q.ensureHook("resolved"),Q.hooks.newInteralResolve=Q.hooks.newInternalResolve;for(let{source:V,resolveOptions:x}of[{source:"resolve",resolveOptions:{fullySpecified:R}},{source:"internal-resolve",resolveOptions:{fullySpecified:!1}},{source:"imports-resolve",resolveOptions:{fullySpecified:!1,internal:!1}}])O.push(new eR(V,x,"parsed-resolve"));if(O.push(new au("parsed-resolve",k,!1,"described-resolve")),O.push(new Hr("after-parsed-resolve","described-resolve")),r0)O.push(new vT("described-resolve",o,r0,w,"raw-resolve"));else O.push(new Hr("described-resolve","raw-resolve"));if(n.length>0)O.push(new s3("described-resolve",n,"internal-resolve"));if(i.length>0)O.push(new s3("raw-resolve",i,"internal-resolve"));if(Z)O.push(new wT(Z));for(let V of u)O.push(new mg("raw-resolve",V,"internal-resolve"));for(let V of d)O.push(new C3("raw-resolve",V,"normal-resolve"));if(O.push(new Hr("raw-resolve","normal-resolve")),P)O.push(new bh("after-normal-resolve","relative"));if(O.push(new $n("after-normal-resolve",{module:!0},"resolve as module",!1,"raw-module")),O.push(new $n("after-normal-resolve",{internal:!0},"resolve as internal import",!1,"internal")),_)O.push(new bh("after-normal-resolve","relative"));if(g.size>0)O.push(new nT("after-normal-resolve",g,"relative"));if(!P&&!_)O.push(new bh("after-normal-resolve","relative"));for(let V of A)O.push(new jR("internal",v,V,"imports-field-relative","imports-resolve"));for(let V of d)O.push(new C3("imports-field-relative",V,"relative"));O.push(new Hr("imports-field-relative","relative"));for(let V of b)O.push(new uT("raw-module",V,"resolve-as-module"));for(let V of p)if(Array.isArray(V))if(V.includes("node_modules")&&M)O.push(new e3("raw-module",V.filter((x)=>x!=="node_modules"),"module")),O.push(new lT("raw-module",M,"undescribed-resolve-in-package","alternate-raw-module")),O.push(new e3("alternate-raw-module",["node_modules"],"module"));else O.push(new e3("raw-module",V,"module"));else O.push(new CR("raw-module",V,"module"));if(O.push(new ER("module","resolve-as-module")),!X)O.push(new $n("resolve-as-module",{directory:!1,request:"."},"single file module",!0,"undescribed-raw-file"));O.push(new kg("resolve-as-module","undescribed-resolve-in-package")),O.push(new au("undescribed-resolve-in-package",k,!1,"resolve-in-package")),O.push(new Hr("after-undescribed-resolve-in-package","resolve-in-package"));let U=t?"exports-field-relative":"relative";for(let V of b)O.push(new DR("resolve-in-package",v,V,U));if(O.push(new Hr("resolve-in-package","resolve-in-existing-directory")),t){for(let V of d)O.push(new C3("exports-field-relative",V,"relative"));O.push(new Hr("exports-field-relative","relative"))}if(O.push(new bh("resolve-in-existing-directory","relative")),O.push(new au("relative",k,!0,"described-relative")),O.push(new Hr("after-relative","described-relative")),X)O.push(new Hr("described-relative","directory"));else O.push(new $n("described-relative",{directory:!1},null,!0,"raw-file")),O.push(new $n("described-relative",{fullySpecified:!1},"as directory",!0,"directory"));if(O.push(new kg("directory","undescribed-existing-directory")),X)O.push(new Hr("undescribed-existing-directory","resolved"));else{O.push(new au("undescribed-existing-directory",k,!1,"existing-directory"));for(let V of G)O.push(new $g("undescribed-existing-directory",V,"undescribed-raw-file"));for(let V of H)O.push(new sR("existing-directory",V,"resolve-in-existing-directory"));for(let V of G)O.push(new $g("existing-directory",V,"undescribed-raw-file"));if(O.push(new au("undescribed-raw-file",k,!0,"raw-file")),O.push(new Hr("after-undescribed-raw-file","raw-file")),O.push(new $n("raw-file",{fullySpecified:!0},null,!1,"file")),!$)O.push(new oT("raw-file","no extension","file"));for(let V of Y)O.push(new SR("raw-file",V,"file"));if(i.length>0)O.push(new s3("file",i,"internal-resolve"));for(let V of u)O.push(new mg("file",V,"internal-resolve"));if(O.push(new Hr("file","final-file")),O.push(new xR("final-file","existing-file")),l0)O.push(new tT("existing-file","existing-file"));O.push(new Hr("existing-file","resolved"))}let{resolved:q}=Q.hooks;if(N.size>0)O.push(new fT(q,N));O.push(new iT(q));for(let V of O)if(typeof V==="function")V.call(Q,Q);else if(V)V.apply(Q);return Q}});var Ag=j((nn0,cg)=>{cg.exports=class{constructor(r,f){this.source=r,this.target=f}apply(r){let f=r.ensureHook(this.target);r.getHook(this.source).tapAsync("CloneBasenamePlugin",(i,n,u)=>{let t=i.path,o=r.basename(t),w=r.join(t,o),v={...i,path:w,relativePath:i.relativePath&&r.join(i.relativePath,o)};r.doResolve(f,v,`using path: ${w}`,n,u)})}}});var Wg=j((un0,Kg)=>{Kg.exports=class{constructor(r){this.source=r}apply(r){let{source:f}=this;r.getHook(this.source).tapAsync("LogInfoPlugin",(i,n,u)=>{if(!n.log)return u();let{log:t}=n,o=`[${f}] `;if(i.path)t(`${o}Resolving in directory: ${i.path}`);if(i.request)t(`${o}Resolving request: ${i.request}`);if(i.module)t(`${o}Request is an module request.`);if(i.directory)t(`${o}Request is a directory request.`);if(i.query)t(`${o}Resolving request query: ${i.query}`);if(i.fragment)t(`${o}Resolving request fragment: ${i.fragment}`);if(i.descriptionFilePath)t(`${o}Has description data from ${i.descriptionFilePath}`);if(i.relativePath)t(`${o}Relative path from description file is: ${i.relativePath}`);u()})}}});var Jg=j((tn0,Yg)=>{var bn=c3(),Og=bn(()=>e$()),Fu=bn(()=>{let l=wb();return new(Og())(l,4000)}),yn=bn(()=>({environments:["node+es3+es5+process+native"]})),dn=bn(()=>gg()),Xg=bn(()=>dn().createResolver({conditionNames:["node"],extensions:[".js",".json",".node"],fileSystem:Fu()})),gT=(l,r,f,i,n)=>{if(typeof l==="string")n=i,i=f,f=r,r=l,l=yn();if(typeof n!=="function")n=i;Xg().resolve(l,r,f,i,n)},cT=bn(()=>dn().createResolver({conditionNames:["node"],extensions:[".js",".json",".node"],useSyncFileSystemCalls:!0,fileSystem:Fu()})),AT=(l,r,f,i)=>{if(typeof l==="string")i=f,f=r,r=l,l=yn();return cT().resolveSync(l,r,f,i)},KT=(l,r,f,i)=>{if(typeof l==="string")i=f,f=r,r=l,l=yn();return Xg().resolvePromise(l,r,f,i)};function WT(l){let r=dn().createResolver({fileSystem:Fu(),...l});return function(i,n,u,t,o){if(typeof i==="string")o=t,t=u,u=n,n=i,i=yn();if(typeof o!=="function")o=t;r.resolve(i,n,u,t,o)}}function ZT(l){let r=dn().createResolver({useSyncFileSystemCalls:!0,fileSystem:Fu(),...l});return function(i,n,u,t){if(typeof i==="string")t=u,u=n,n=i,i=yn();return r.resolveSync(i,n,u,t)}}function OT(l){let r=dn().createResolver({fileSystem:Fu(),...l});return function(i,n,u,t){if(typeof i==="string")t=u,u=n,n=i,i=yn();return r.resolvePromise(i,n,u,t)}}var Zg=(l,r)=>{let f=Object.getOwnPropertyDescriptors(r);return Object.defineProperties(l,f),Object.freeze(l)};Yg.exports=Zg(gT,{get sync(){return AT},get promise(){return KT},create:Zg(WT,{get sync(){return ZT},get promise(){return OT}}),get ResolverFactory(){return dn()},get CachedInputFileSystem(){return Og()},get CloneBasenamePlugin(){return Ag()},get LogInfoPlugin(){return Wg()},get TsconfigPathsPlugin(){return E3()},get forEachBail(){return W1()}})});var Qg=j((hn0,zg)=>{(()=>{var l={"./node_modules/.pnpm/mlly@1.8.2/node_modules/mlly/dist lazy recursive"(n){function u(t){return Promise.resolve().then(function(){var o=Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o})}u.keys=()=>[],u.resolve=u,u.id="./node_modules/.pnpm/mlly@1.8.2/node_modules/mlly/dist lazy recursive",n.exports=u},fs(n){n.exports=P0("fs")},"node:fs"(n){n.exports=P0("fs")},"node:module"(n){n.exports=P0("module")},"node:path"(n){n.exports=P0("path")},os(n){n.exports=P0("os")},path(n){n.exports=P0("path")},"./node_modules/.pnpm/get-tsconfig@4.14.0/node_modules/get-tsconfig/dist/index.cjs"(n,u,t){var o=Object.defineProperty,w=(B,S)=>o(B,"name",{value:S,configurable:!0}),v=t("node:path"),k=t("node:fs"),$=t("node:module"),b=t("./node_modules/.pnpm/resolve-pkg-maps@1.0.0/node_modules/resolve-pkg-maps/dist/index.cjs"),d=t("fs"),A=t("os"),Y=t("path");function z(B){return B.startsWith("\\\\?\\")?B:B.replace(/\\/g,"/")}w(z,"slash");let R=w((B)=>{let S=k[B];return(f0,...L)=>{let o0=`${B}:${L.join(":")}`,n0=f0==null?void 0:f0.get(o0);return n0===void 0&&(n0=Reflect.apply(S,k,L),f0==null||f0.set(o0,n0)),n0}},"cacheFs"),H=R("existsSync"),G=R("readFileSync"),p=R("statSync"),I=w((B,S,f0)=>{for(;;){let L=v.posix.join(B,S);if(H(f0,L))return L;let o0=v.dirname(B);if(o0===B)return;B=o0}},"findUp"),M=/^\.{1,2}(\/.*)?$/,X=w((B)=>{let S=z(B);return M.test(S)?S:`./${S}`},"normalizeRelativePath");function P(B,S=!1){let f0=B.length,L=0,o0="",n0=0,E=16,b0=0,K0=0,B0=0,ll=0,E0=0;function cl(k0,Nl){let sl=0,j0=0;for(;sl<k0;){let O0=B.charCodeAt(L);if(O0>=48&&O0<=57)j0=16*j0+O0-48;else if(O0>=65&&O0<=70)j0=16*j0+O0-65+10;else{if(!(O0>=97&&O0<=102))break;j0=16*j0+O0-97+10}L++,sl++}return sl<k0&&(j0=-1),j0}function hl(k0){L=k0,o0="",n0=0,E=16,E0=0}function ol(){let k0=L;if(B.charCodeAt(L)===48)L++;else for(L++;L<B.length&&r0(B.charCodeAt(L));)L++;if(L<B.length&&B.charCodeAt(L)===46){if(L++,!(L<B.length&&r0(B.charCodeAt(L))))return E0=3,B.substring(k0,L);for(L++;L<B.length&&r0(B.charCodeAt(L));)L++}let Nl=L;if(L<B.length&&(B.charCodeAt(L)===69||B.charCodeAt(L)===101))if(L++,(L<B.length&&B.charCodeAt(L)===43||B.charCodeAt(L)===45)&&L++,L<B.length&&r0(B.charCodeAt(L))){for(L++;L<B.length&&r0(B.charCodeAt(L));)L++;Nl=L}else E0=3;return B.substring(k0,Nl)}function wl(){let k0="",Nl=L;for(;;){if(L>=f0){k0+=B.substring(Nl,L),E0=2;break}let sl=B.charCodeAt(L);if(sl===34){k0+=B.substring(Nl,L),L++;break}if(sl!==92){if(sl>=0&&sl<=31){if(l0(sl)){k0+=B.substring(Nl,L),E0=2;break}E0=6}L++}else{if(k0+=B.substring(Nl,L),L++,L>=f0){E0=2;break}switch(B.charCodeAt(L++)){case 34:k0+='"';break;case 92:k0+="\\";break;case 47:k0+="/";break;case 98:k0+="\b";break;case 102:k0+="\f";break;case 110:k0+=`
186
186
  `;break;case 114:k0+="\r";break;case 116:k0+="\t";break;case 117:let j0=cl(4);j0>=0?k0+=String.fromCharCode(j0):E0=4;break;default:E0=5}Nl=L}}return k0}function Zl(){if(o0="",E0=0,n0=L,K0=b0,ll=B0,L>=f0)return n0=f0,E=17;let k0=B.charCodeAt(L);if(_(k0)){do L++,o0+=String.fromCharCode(k0),k0=B.charCodeAt(L);while(_(k0));return E=15}if(l0(k0))return L++,o0+=String.fromCharCode(k0),k0===13&&B.charCodeAt(L)===10&&(L++,o0+=`
187
- `),b0++,B0=L,E=14;switch(k0){case 123:return L++,E=1;case 125:return L++,E=2;case 91:return L++,E=3;case 93:return L++,E=4;case 58:return L++,E=6;case 44:return L++,E=5;case 34:return L++,o0=wl(),E=10;case 47:let Nl=L-1;if(B.charCodeAt(L+1)===47){for(L+=2;L<f0&&!l0(B.charCodeAt(L));)L++;return o0=B.substring(Nl,L),E=12}if(B.charCodeAt(L+1)===42){L+=2;let sl=f0-1,j0=!1;for(;L<sl;){let O0=B.charCodeAt(L);if(O0===42&&B.charCodeAt(L+1)===47){L+=2,j0=!0;break}L++,l0(O0)&&(O0===13&&B.charCodeAt(L)===10&&L++,b0++,B0=L)}return j0||(L++,E0=1),o0=B.substring(Nl,L),E=13}return o0+=String.fromCharCode(k0),L++,E=16;case 45:if(o0+=String.fromCharCode(k0),L++,L===f0||!r0(B.charCodeAt(L)))return E=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o0+=ol(),E=11;default:for(;L<f0&&Or(k0);)L++,k0=B.charCodeAt(L);if(n0!==L){switch(o0=B.substring(n0,L),o0){case"true":return E=8;case"false":return E=9;case"null":return E=7}return E=16}return o0+=String.fromCharCode(k0),L++,E=16}}function Or(k0){if(_(k0)||l0(k0))return!1;switch(k0){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function h1(){let k0;do k0=Zl();while(k0>=12&&k0<=15);return k0}return w(cl,"scanHexDigits"),w(hl,"setPosition"),w(ol,"scanNumber"),w(wl,"scanString"),w(Zl,"scanNext"),w(Or,"isUnknownContentCharacter"),w(h1,"scanNextNonTrivia"),{setPosition:hl,getPosition:w(()=>L,"getPosition"),scan:S?h1:Zl,getToken:w(()=>E,"getToken"),getTokenValue:w(()=>o0,"getTokenValue"),getTokenOffset:w(()=>n0,"getTokenOffset"),getTokenLength:w(()=>L-n0,"getTokenLength"),getTokenStartLine:w(()=>K0,"getTokenStartLine"),getTokenStartCharacter:w(()=>n0-ll,"getTokenStartCharacter"),getTokenError:w(()=>E0,"getTokenError")}}function _(B){return B===32||B===9}function l0(B){return B===10||B===13}function r0(B){return B>=48&&B<=57}var u0,N;w(P,"createScanner"),w(_,"isWhiteSpace"),w(l0,"isLineBreak"),w(r0,"isDigit"),(N=u0||(u0={}))[N.lineFeed=10]="lineFeed",N[N.carriageReturn=13]="carriageReturn",N[N.space=32]="space",N[N._0=48]="_0",N[N._1=49]="_1",N[N._2=50]="_2",N[N._3=51]="_3",N[N._4=52]="_4",N[N._5=53]="_5",N[N._6=54]="_6",N[N._7=55]="_7",N[N._8=56]="_8",N[N._9=57]="_9",N[N.a=97]="a",N[N.b=98]="b",N[N.c=99]="c",N[N.d=100]="d",N[N.e=101]="e",N[N.f=102]="f",N[N.g=103]="g",N[N.h=104]="h",N[N.i=105]="i",N[N.j=106]="j",N[N.k=107]="k",N[N.l=108]="l",N[N.m=109]="m",N[N.n=110]="n",N[N.o=111]="o",N[N.p=112]="p",N[N.q=113]="q",N[N.r=114]="r",N[N.s=115]="s",N[N.t=116]="t",N[N.u=117]="u",N[N.v=118]="v",N[N.w=119]="w",N[N.x=120]="x",N[N.y=121]="y",N[N.z=122]="z",N[N.A=65]="A",N[N.B=66]="B",N[N.C=67]="C",N[N.D=68]="D",N[N.E=69]="E",N[N.F=70]="F",N[N.G=71]="G",N[N.H=72]="H",N[N.I=73]="I",N[N.J=74]="J",N[N.K=75]="K",N[N.L=76]="L",N[N.M=77]="M",N[N.N=78]="N",N[N.O=79]="O",N[N.P=80]="P",N[N.Q=81]="Q",N[N.R=82]="R",N[N.S=83]="S",N[N.T=84]="T",N[N.U=85]="U",N[N.V=86]="V",N[N.W=87]="W",N[N.X=88]="X",N[N.Y=89]="Y",N[N.Z=90]="Z",N[N.asterisk=42]="asterisk",N[N.backslash=92]="backslash",N[N.closeBrace=125]="closeBrace",N[N.closeBracket=93]="closeBracket",N[N.colon=58]="colon",N[N.comma=44]="comma",N[N.dot=46]="dot",N[N.doubleQuote=34]="doubleQuote",N[N.minus=45]="minus",N[N.openBrace=123]="openBrace",N[N.openBracket=91]="openBracket",N[N.plus=43]="plus",N[N.slash=47]="slash",N[N.formFeed=12]="formFeed",N[N.tab=9]="tab",Array(20).fill(0).map((B,S)=>" ".repeat(S));let g=200;var Z,O,Q;function U(B,S=[],f0=Z.DEFAULT){let L=null,o0=[],n0=[];function E(b0){Array.isArray(o0)?o0.push(b0):L!==null&&(o0[L]=b0)}return w(E,"onValue"),q(B,{onObjectBegin:w(()=>{let b0={};E(b0),n0.push(o0),o0=b0,L=null},"onObjectBegin"),onObjectProperty:w((b0)=>{L=b0},"onObjectProperty"),onObjectEnd:w(()=>{o0=n0.pop()},"onObjectEnd"),onArrayBegin:w(()=>{let b0=[];E(b0),n0.push(o0),o0=b0,L=null},"onArrayBegin"),onArrayEnd:w(()=>{o0=n0.pop()},"onArrayEnd"),onLiteralValue:E,onError:w((b0,K0,B0)=>{S.push({error:b0,offset:K0,length:B0})},"onError")},f0),o0[0]}function q(B,S,f0=Z.DEFAULT){let L=P(B,!1),o0=[],n0=0;function E(rl){return rl?()=>n0===0&&rl(L.getTokenOffset(),L.getTokenLength(),L.getTokenStartLine(),L.getTokenStartCharacter()):()=>!0}function b0(rl){return rl?(Ol)=>n0===0&&rl(Ol,L.getTokenOffset(),L.getTokenLength(),L.getTokenStartLine(),L.getTokenStartCharacter()):()=>!0}function K0(rl){return rl?(Ol)=>n0===0&&rl(Ol,L.getTokenOffset(),L.getTokenLength(),L.getTokenStartLine(),L.getTokenStartCharacter(),()=>o0.slice()):()=>!0}function B0(rl){return rl?()=>{n0>0?n0++:rl(L.getTokenOffset(),L.getTokenLength(),L.getTokenStartLine(),L.getTokenStartCharacter(),()=>o0.slice())===!1&&(n0=1)}:()=>!0}function ll(rl){return rl?()=>{n0>0&&n0--,n0===0&&rl(L.getTokenOffset(),L.getTokenLength(),L.getTokenStartLine(),L.getTokenStartCharacter())}:()=>!0}w(E,"toNoArgVisit"),w(b0,"toOneArgVisit"),w(K0,"toOneArgVisitWithPath"),w(B0,"toBeginVisit"),w(ll,"toEndVisit");let E0=B0(S.onObjectBegin),cl=K0(S.onObjectProperty),hl=ll(S.onObjectEnd),ol=B0(S.onArrayBegin),wl=ll(S.onArrayEnd),Zl=K0(S.onLiteralValue),Or=b0(S.onSeparator),h1=E(S.onComment),k0=b0(S.onError),Nl=f0&&f0.disallowComments,sl=f0&&f0.allowTrailingComma;function j0(){for(;;){let rl=L.scan();switch(L.getTokenError()){case 4:O0(14);break;case 5:O0(15);break;case 3:O0(13);break;case 1:Nl||O0(11);break;case 2:O0(12);break;case 6:O0(16)}switch(rl){case 12:case 13:Nl?O0(10):h1();break;case 16:O0(1);break;case 15:case 14:break;default:return rl}}}function O0(rl,Ol=[],Ut=[]){if(k0(rl),Ol.length+Ut.length>0){let Ji=L.getToken();for(;Ji!==17;){if(Ol.indexOf(Ji)!==-1){j0();break}if(Ut.indexOf(Ji)!==-1)break;Ji=j0()}}}function an(rl){let Ol=L.getTokenValue();return rl?Zl(Ol):(cl(Ol),o0.push(Ol)),j0(),!0}function Qt(){switch(L.getToken()){case 11:let rl=L.getTokenValue(),Ol=Number(rl);isNaN(Ol)&&(O0(2),Ol=0),Zl(Ol);break;case 7:Zl(null);break;case 8:Zl(!0);break;case 9:Zl(!1);break;default:return!1}return j0(),!0}function Bt(){return L.getToken()!==10?(O0(3,[],[2,5]),!1):(an(!1),L.getToken()===6?(Or(":"),j0(),Rf()||O0(4,[],[2,5])):O0(5,[],[2,5]),o0.pop(),!0)}function Ht(){E0(),j0();let rl=!1;for(;L.getToken()!==2&&L.getToken()!==17;){if(L.getToken()===5){if(rl||O0(4,[],[]),Or(","),j0(),L.getToken()===2&&sl)break}else rl&&O0(6,[],[]);Bt()||O0(4,[],[2,5]),rl=!0}return hl(),L.getToken()!==2?O0(7,[2],[]):j0(),!0}function Gt(){ol(),j0();let rl=!0,Ol=!1;for(;L.getToken()!==4&&L.getToken()!==17;){if(L.getToken()===5){if(Ol||O0(4,[],[]),Or(","),j0(),L.getToken()===4&&sl)break}else Ol&&O0(6,[],[]);rl?(o0.push(0),rl=!1):o0[o0.length-1]++,Rf()||O0(4,[],[4,5]),Ol=!0}return wl(),rl||o0.pop(),L.getToken()!==4?O0(8,[4],[]):j0(),!0}function Rf(){switch(L.getToken()){case 3:return Gt();case 1:return Ht();case 10:return an(!0);default:return Qt()}}return w(j0,"scanNext"),w(O0,"handleError"),w(an,"parseString"),w(Qt,"parseLiteral"),w(Bt,"parseProperty"),w(Ht,"parseObject"),w(Gt,"parseArray"),w(Rf,"parseValue"),j0(),L.getToken()===17?!!f0.allowEmptyContent||(O0(4,[],[]),!1):Rf()?(L.getToken()!==17&&O0(9,[],[]),!0):(O0(4,[],[]),!1)}Array(g).fill(0).map((B,S)=>`
187
+ `),b0++,B0=L,E=14;switch(k0){case 123:return L++,E=1;case 125:return L++,E=2;case 91:return L++,E=3;case 93:return L++,E=4;case 58:return L++,E=6;case 44:return L++,E=5;case 34:return L++,o0=wl(),E=10;case 47:let Nl=L-1;if(B.charCodeAt(L+1)===47){for(L+=2;L<f0&&!l0(B.charCodeAt(L));)L++;return o0=B.substring(Nl,L),E=12}if(B.charCodeAt(L+1)===42){L+=2;let sl=f0-1,j0=!1;for(;L<sl;){let O0=B.charCodeAt(L);if(O0===42&&B.charCodeAt(L+1)===47){L+=2,j0=!0;break}L++,l0(O0)&&(O0===13&&B.charCodeAt(L)===10&&L++,b0++,B0=L)}return j0||(L++,E0=1),o0=B.substring(Nl,L),E=13}return o0+=String.fromCharCode(k0),L++,E=16;case 45:if(o0+=String.fromCharCode(k0),L++,L===f0||!r0(B.charCodeAt(L)))return E=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o0+=ol(),E=11;default:for(;L<f0&&Or(k0);)L++,k0=B.charCodeAt(L);if(n0!==L){switch(o0=B.substring(n0,L),o0){case"true":return E=8;case"false":return E=9;case"null":return E=7}return E=16}return o0+=String.fromCharCode(k0),L++,E=16}}function Or(k0){if(_(k0)||l0(k0))return!1;switch(k0){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function h1(){let k0;do k0=Zl();while(k0>=12&&k0<=15);return k0}return w(cl,"scanHexDigits"),w(hl,"setPosition"),w(ol,"scanNumber"),w(wl,"scanString"),w(Zl,"scanNext"),w(Or,"isUnknownContentCharacter"),w(h1,"scanNextNonTrivia"),{setPosition:hl,getPosition:w(()=>L,"getPosition"),scan:S?h1:Zl,getToken:w(()=>E,"getToken"),getTokenValue:w(()=>o0,"getTokenValue"),getTokenOffset:w(()=>n0,"getTokenOffset"),getTokenLength:w(()=>L-n0,"getTokenLength"),getTokenStartLine:w(()=>K0,"getTokenStartLine"),getTokenStartCharacter:w(()=>n0-ll,"getTokenStartCharacter"),getTokenError:w(()=>E0,"getTokenError")}}function _(B){return B===32||B===9}function l0(B){return B===10||B===13}function r0(B){return B>=48&&B<=57}var u0,N;w(P,"createScanner"),w(_,"isWhiteSpace"),w(l0,"isLineBreak"),w(r0,"isDigit"),(N=u0||(u0={}))[N.lineFeed=10]="lineFeed",N[N.carriageReturn=13]="carriageReturn",N[N.space=32]="space",N[N._0=48]="_0",N[N._1=49]="_1",N[N._2=50]="_2",N[N._3=51]="_3",N[N._4=52]="_4",N[N._5=53]="_5",N[N._6=54]="_6",N[N._7=55]="_7",N[N._8=56]="_8",N[N._9=57]="_9",N[N.a=97]="a",N[N.b=98]="b",N[N.c=99]="c",N[N.d=100]="d",N[N.e=101]="e",N[N.f=102]="f",N[N.g=103]="g",N[N.h=104]="h",N[N.i=105]="i",N[N.j=106]="j",N[N.k=107]="k",N[N.l=108]="l",N[N.m=109]="m",N[N.n=110]="n",N[N.o=111]="o",N[N.p=112]="p",N[N.q=113]="q",N[N.r=114]="r",N[N.s=115]="s",N[N.t=116]="t",N[N.u=117]="u",N[N.v=118]="v",N[N.w=119]="w",N[N.x=120]="x",N[N.y=121]="y",N[N.z=122]="z",N[N.A=65]="A",N[N.B=66]="B",N[N.C=67]="C",N[N.D=68]="D",N[N.E=69]="E",N[N.F=70]="F",N[N.G=71]="G",N[N.H=72]="H",N[N.I=73]="I",N[N.J=74]="J",N[N.K=75]="K",N[N.L=76]="L",N[N.M=77]="M",N[N.N=78]="N",N[N.O=79]="O",N[N.P=80]="P",N[N.Q=81]="Q",N[N.R=82]="R",N[N.S=83]="S",N[N.T=84]="T",N[N.U=85]="U",N[N.V=86]="V",N[N.W=87]="W",N[N.X=88]="X",N[N.Y=89]="Y",N[N.Z=90]="Z",N[N.asterisk=42]="asterisk",N[N.backslash=92]="backslash",N[N.closeBrace=125]="closeBrace",N[N.closeBracket=93]="closeBracket",N[N.colon=58]="colon",N[N.comma=44]="comma",N[N.dot=46]="dot",N[N.doubleQuote=34]="doubleQuote",N[N.minus=45]="minus",N[N.openBrace=123]="openBrace",N[N.openBracket=91]="openBracket",N[N.plus=43]="plus",N[N.slash=47]="slash",N[N.formFeed=12]="formFeed",N[N.tab=9]="tab",Array(20).fill(0).map((B,S)=>" ".repeat(S));let g=200;var Z,O,Q;function U(B,S=[],f0=Z.DEFAULT){let L=null,o0=[],n0=[];function E(b0){Array.isArray(o0)?o0.push(b0):L!==null&&(o0[L]=b0)}return w(E,"onValue"),q(B,{onObjectBegin:w(()=>{let b0={};E(b0),n0.push(o0),o0=b0,L=null},"onObjectBegin"),onObjectProperty:w((b0)=>{L=b0},"onObjectProperty"),onObjectEnd:w(()=>{o0=n0.pop()},"onObjectEnd"),onArrayBegin:w(()=>{let b0=[];E(b0),n0.push(o0),o0=b0,L=null},"onArrayBegin"),onArrayEnd:w(()=>{o0=n0.pop()},"onArrayEnd"),onLiteralValue:E,onError:w((b0,K0,B0)=>{S.push({error:b0,offset:K0,length:B0})},"onError")},f0),o0[0]}function q(B,S,f0=Z.DEFAULT){let L=P(B,!1),o0=[],n0=0;function E(rl){return rl?()=>n0===0&&rl(L.getTokenOffset(),L.getTokenLength(),L.getTokenStartLine(),L.getTokenStartCharacter()):()=>!0}function b0(rl){return rl?(Ol)=>n0===0&&rl(Ol,L.getTokenOffset(),L.getTokenLength(),L.getTokenStartLine(),L.getTokenStartCharacter()):()=>!0}function K0(rl){return rl?(Ol)=>n0===0&&rl(Ol,L.getTokenOffset(),L.getTokenLength(),L.getTokenStartLine(),L.getTokenStartCharacter(),()=>o0.slice()):()=>!0}function B0(rl){return rl?()=>{n0>0?n0++:rl(L.getTokenOffset(),L.getTokenLength(),L.getTokenStartLine(),L.getTokenStartCharacter(),()=>o0.slice())===!1&&(n0=1)}:()=>!0}function ll(rl){return rl?()=>{n0>0&&n0--,n0===0&&rl(L.getTokenOffset(),L.getTokenLength(),L.getTokenStartLine(),L.getTokenStartCharacter())}:()=>!0}w(E,"toNoArgVisit"),w(b0,"toOneArgVisit"),w(K0,"toOneArgVisitWithPath"),w(B0,"toBeginVisit"),w(ll,"toEndVisit");let E0=B0(S.onObjectBegin),cl=K0(S.onObjectProperty),hl=ll(S.onObjectEnd),ol=B0(S.onArrayBegin),wl=ll(S.onArrayEnd),Zl=K0(S.onLiteralValue),Or=b0(S.onSeparator),h1=E(S.onComment),k0=b0(S.onError),Nl=f0&&f0.disallowComments,sl=f0&&f0.allowTrailingComma;function j0(){for(;;){let rl=L.scan();switch(L.getTokenError()){case 4:O0(14);break;case 5:O0(15);break;case 3:O0(13);break;case 1:Nl||O0(11);break;case 2:O0(12);break;case 6:O0(16)}switch(rl){case 12:case 13:Nl?O0(10):h1();break;case 16:O0(1);break;case 15:case 14:break;default:return rl}}}function O0(rl,Ol=[],Gt=[]){if(k0(rl),Ol.length+Gt.length>0){let Ji=L.getToken();for(;Ji!==17;){if(Ol.indexOf(Ji)!==-1){j0();break}if(Gt.indexOf(Ji)!==-1)break;Ji=j0()}}}function an(rl){let Ol=L.getTokenValue();return rl?Zl(Ol):(cl(Ol),o0.push(Ol)),j0(),!0}function zt(){switch(L.getToken()){case 11:let rl=L.getTokenValue(),Ol=Number(rl);isNaN(Ol)&&(O0(2),Ol=0),Zl(Ol);break;case 7:Zl(null);break;case 8:Zl(!0);break;case 9:Zl(!1);break;default:return!1}return j0(),!0}function Qt(){return L.getToken()!==10?(O0(3,[],[2,5]),!1):(an(!1),L.getToken()===6?(Or(":"),j0(),Tf()||O0(4,[],[2,5])):O0(5,[],[2,5]),o0.pop(),!0)}function Bt(){E0(),j0();let rl=!1;for(;L.getToken()!==2&&L.getToken()!==17;){if(L.getToken()===5){if(rl||O0(4,[],[]),Or(","),j0(),L.getToken()===2&&sl)break}else rl&&O0(6,[],[]);Qt()||O0(4,[],[2,5]),rl=!0}return hl(),L.getToken()!==2?O0(7,[2],[]):j0(),!0}function Ht(){ol(),j0();let rl=!0,Ol=!1;for(;L.getToken()!==4&&L.getToken()!==17;){if(L.getToken()===5){if(Ol||O0(4,[],[]),Or(","),j0(),L.getToken()===4&&sl)break}else Ol&&O0(6,[],[]);rl?(o0.push(0),rl=!1):o0[o0.length-1]++,Tf()||O0(4,[],[4,5]),Ol=!0}return wl(),rl||o0.pop(),L.getToken()!==4?O0(8,[4],[]):j0(),!0}function Tf(){switch(L.getToken()){case 3:return Ht();case 1:return Bt();case 10:return an(!0);default:return zt()}}return w(j0,"scanNext"),w(O0,"handleError"),w(an,"parseString"),w(zt,"parseLiteral"),w(Qt,"parseProperty"),w(Bt,"parseObject"),w(Ht,"parseArray"),w(Tf,"parseValue"),j0(),L.getToken()===17?!!f0.allowEmptyContent||(O0(4,[],[]),!1):Tf()?(L.getToken()!==17&&O0(9,[],[]),!0):(O0(4,[],[]),!1)}Array(g).fill(0).map((B,S)=>`
188
188
  `+" ".repeat(S)),Array(g).fill(0).map((B,S)=>"\r"+" ".repeat(S)),Array(g).fill(0).map((B,S)=>`\r
189
189
  `+" ".repeat(S)),Array(g).fill(0).map((B,S)=>`
190
190
  `+"\t".repeat(S)),Array(g).fill(0).map((B,S)=>"\r"+"\t".repeat(S)),Array(g).fill(0).map((B,S)=>`\r
191
- `+"\t".repeat(S)),function(B){B.DEFAULT={allowTrailingComma:!1}}(Z||(Z={})),w(U,"parse$1"),w(q,"visit"),function(B){B[B.None=0]="None",B[B.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",B[B.UnexpectedEndOfString=2]="UnexpectedEndOfString",B[B.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",B[B.InvalidUnicode=4]="InvalidUnicode",B[B.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",B[B.InvalidCharacter=6]="InvalidCharacter"}(O||(O={})),function(B){B[B.OpenBraceToken=1]="OpenBraceToken",B[B.CloseBraceToken=2]="CloseBraceToken",B[B.OpenBracketToken=3]="OpenBracketToken",B[B.CloseBracketToken=4]="CloseBracketToken",B[B.CommaToken=5]="CommaToken",B[B.ColonToken=6]="ColonToken",B[B.NullKeyword=7]="NullKeyword",B[B.TrueKeyword=8]="TrueKeyword",B[B.FalseKeyword=9]="FalseKeyword",B[B.StringLiteral=10]="StringLiteral",B[B.NumericLiteral=11]="NumericLiteral",B[B.LineCommentTrivia=12]="LineCommentTrivia",B[B.BlockCommentTrivia=13]="BlockCommentTrivia",B[B.LineBreakTrivia=14]="LineBreakTrivia",B[B.Trivia=15]="Trivia",B[B.Unknown=16]="Unknown",B[B.EOF=17]="EOF"}(Q||(Q={}));let V=U;var x;(function(B){B[B.InvalidSymbol=1]="InvalidSymbol",B[B.InvalidNumberFormat=2]="InvalidNumberFormat",B[B.PropertyNameExpected=3]="PropertyNameExpected",B[B.ValueExpected=4]="ValueExpected",B[B.ColonExpected=5]="ColonExpected",B[B.CommaExpected=6]="CommaExpected",B[B.CloseBraceExpected=7]="CloseBraceExpected",B[B.CloseBracketExpected=8]="CloseBracketExpected",B[B.EndOfFileExpected=9]="EndOfFileExpected",B[B.InvalidCommentToken=10]="InvalidCommentToken",B[B.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",B[B.UnexpectedEndOfString=12]="UnexpectedEndOfString",B[B.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",B[B.InvalidUnicode=14]="InvalidUnicode",B[B.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",B[B.InvalidCharacter=16]="InvalidCharacter"})(x||(x={}));let e=w((B,S)=>V(G(S,B,"utf8")),"readJsonc"),h0=Symbol("implicitBaseUrl"),y0="${configDir}",nl=w(()=>{let{findPnpApi:B}=$;return B&&B(process.cwd())},"getPnpApi"),Z0=w((B,S,f0,L)=>{let o0=`resolveFromPackageJsonPath:${B}:${S}:${f0}`;if(L!=null&&L.has(o0))return L.get(o0);let n0=e(B,L);if(!n0)return;let E=S||"tsconfig.json";if(!f0&&n0.exports)try{let[b0]=b.resolveExports(n0.exports,S,["require","types"]);E=b0}catch{return!1}else!S&&n0.tsconfig&&(E=n0.tsconfig);return E=v.join(B,"..",E),L==null||L.set(o0,E),E},"resolveFromPackageJsonPath"),U0="package.json",tl="tsconfig.json",R0=w((B,S,f0)=>{let L=B;if(B===".."&&(L=v.join(L,tl)),B[0]==="."&&(L=v.resolve(S,L)),v.isAbsolute(L)){if(H(f0,L)){if(p(f0,L).isFile())return L}else if(!L.endsWith(".json")){let hl=`${L}.json`;if(H(f0,hl))return hl}return}let[o0,...n0]=B.split("/"),E=o0[0]==="@"?`${o0}/${n0.shift()}`:o0,b0=n0.join("/"),K0=nl();if(K0){let{resolveRequest:hl}=K0;try{if(E===B){let ol=hl(v.join(E,U0),S);if(ol){let wl=Z0(ol,b0,!1,f0);if(wl&&H(f0,wl))return wl}}else{let ol;try{ol=hl(B,S,{extensions:[".json"]})}catch{ol=hl(v.join(B,tl),S)}if(ol)return ol}}catch{}}let B0=I(v.resolve(S),v.join("node_modules",E),f0);if(!B0||!p(f0,B0).isDirectory())return;let ll=v.join(B0,U0);if(H(f0,ll)){let hl=Z0(ll,b0,!1,f0);if(hl===!1)return;if(hl&&H(f0,hl)&&p(f0,hl).isFile())return hl}let E0=v.join(B0,b0),cl=E0.endsWith(".json");if(!cl){let hl=`${E0}.json`;if(H(f0,hl))return hl}if(H(f0,E0)){if(p(f0,E0).isDirectory()){let hl=v.join(E0,U0);if(H(f0,hl)){let wl=Z0(hl,"",!0,f0);if(wl&&H(f0,wl))return wl}let ol=v.join(E0,tl);if(H(f0,ol))return ol}else if(cl)return E0}},"resolveExtendsPath"),gl=w((B,S)=>X(v.relative(B,S)),"pathRelative"),Sl=["files","include","exclude"],e0=w((B,S,f0)=>{let L=v.join(S,f0);return z(v.relative(B,L))||"./"},"resolveAndRelativize"),Ll=w((B,S,f0)=>{let L=v.relative(B,S);if(!L)return f0;return z(`${L}/${f0.startsWith("./")?f0.slice(2):f0}`)},"prefixPattern"),Gl=w((B,S,f0,L)=>{let o0=R0(B,S,L);if(!o0)throw Error(`File '${B}' not found.`);if(f0.has(o0))throw Error(`Circularity detected while resolving configuration: ${o0}`);f0.add(o0);let n0=v.dirname(o0),E=Ff(o0,L,f0);delete E.references;let{compilerOptions:b0}=E;if(b0){let{baseUrl:K0}=b0;K0&&!K0.startsWith(y0)&&(b0.baseUrl=e0(S,n0,K0));let{outDir:B0}=b0;B0&&!B0.startsWith(y0)&&(b0.outDir=e0(S,n0,B0));let{declarationDir:ll}=b0;ll&&!ll.startsWith(y0)&&(b0.declarationDir=e0(S,n0,ll));let{rootDir:E0}=b0;E0&&!E0.startsWith(y0)&&(b0.rootDir=e0(S,n0,E0));let{rootDirs:cl}=b0;cl&&(b0.rootDirs=cl.map((ol)=>ol.startsWith(y0)?ol:e0(S,n0,ol)));let{typeRoots:hl}=b0;hl&&(b0.typeRoots=hl.map((ol)=>ol.startsWith(y0)?ol:e0(S,n0,ol)))}for(let K0 of Sl){let B0=E[K0];B0&&(E[K0]=B0.map((ll)=>ll.startsWith(y0)?ll:Ll(S,n0,ll)))}return E},"resolveExtends"),gt=["outDir","declarationDir"],Ff=w((B,S,f0=new Set)=>{let L;try{L=e(B,S)||{}}catch{throw Error(`Cannot resolve tsconfig at path: ${B}`)}if(typeof L!="object")throw SyntaxError(`Failed to parse tsconfig at: ${B}`);let o0=v.dirname(B);if(L.compilerOptions){let{compilerOptions:n0}=L;n0.paths&&!n0.baseUrl&&(n0[h0]=o0)}if(L.extends){let n0=Array.isArray(L.extends)?L.extends:[L.extends];delete L.extends;for(let E of n0.reverse()){let b0=Gl(E,o0,new Set(f0),S),K0={...b0,...L,compilerOptions:{...b0.compilerOptions,...L.compilerOptions}};b0.watchOptions&&(K0.watchOptions={...b0.watchOptions,...L.watchOptions}),L=K0}}if(L.compilerOptions){let{compilerOptions:n0}=L,E=["baseUrl","rootDir"];for(let b0 of E){let K0=n0[b0];if(K0&&!K0.startsWith(y0)){let B0=v.resolve(o0,K0),ll=gl(o0,B0);n0[b0]=ll}}for(let b0 of gt){let K0=n0[b0];K0&&(Array.isArray(L.exclude)||(L.exclude=gt.map((B0)=>n0[B0]).filter(Boolean)),K0.startsWith(y0)||(K0=X(K0)),n0[b0]=K0)}}else L.compilerOptions={};if(L.include&&(L.include=L.include.map(z)),L.files&&(L.files=L.files.map((n0)=>n0.startsWith(y0)?n0:X(n0))),L.watchOptions){let{watchOptions:n0}=L;n0.excludeDirectories&&(n0.excludeDirectories=n0.excludeDirectories.map((E)=>z(v.resolve(o0,E)))),n0.excludeFiles&&(n0.excludeFiles=n0.excludeFiles.map((E)=>z(v.resolve(o0,E)))),n0.watchFile&&(n0.watchFile=n0.watchFile.toLowerCase()),n0.watchDirectory&&(n0.watchDirectory=n0.watchDirectory.toLowerCase()),n0.fallbackPolling&&(n0.fallbackPolling=n0.fallbackPolling.toLowerCase())}return L},"_parseTsconfig"),g0=w((B,S)=>{if(B.startsWith(y0))return z(v.join(S,B.slice(12)))},"interpolateConfigDir"),Qn=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],J5=w((B)=>{if(B.strict){let S=["noImplicitAny","noImplicitThis","strictNullChecks","strictFunctionTypes","strictBindCallApply","strictPropertyInitialization","strictBuiltinIteratorReturn","alwaysStrict","useUnknownInCatchVariables"];for(let f0 of S)B[f0]===void 0&&(B[f0]=!0)}if(B.composite&&(B.declaration!=null||(B.declaration=!0),B.incremental!=null||(B.incremental=!0)),B.target){let S=B.target.toLowerCase();S==="es2015"&&(S="es6"),B.target=S,S==="esnext"&&(B.module!=null||(B.module="es6"),B.useDefineForClassFields!=null||(B.useDefineForClassFields=!0)),(S==="es6"||S==="es2016"||S==="es2017"||S==="es2018"||S==="es2019"||S==="es2020"||S==="es2021"||S==="es2022"||S==="es2023"||S==="es2024")&&(B.module!=null||(B.module="es6")),(S==="es2022"||S==="es2023"||S==="es2024")&&(B.useDefineForClassFields!=null||(B.useDefineForClassFields=!0))}if(B.module){let S=B.module.toLowerCase();if(S==="es2015"&&(S="es6"),B.module=S,(S==="es6"||S==="es2020"||S==="es2022"||S==="esnext"||S==="none"||S==="system"||S==="umd"||S==="amd")&&(B.moduleResolution!=null||(B.moduleResolution="classic")),S==="system"&&(B.allowSyntheticDefaultImports!=null||(B.allowSyntheticDefaultImports=!0)),(S==="node16"||S==="node18"||S==="node20"||S==="nodenext"||S==="preserve")&&(B.esModuleInterop!=null||(B.esModuleInterop=!0),B.allowSyntheticDefaultImports!=null||(B.allowSyntheticDefaultImports=!0)),(S==="node16"||S==="node18"||S==="node20"||S==="nodenext")&&(B.moduleDetection!=null||(B.moduleDetection="force")),S==="node16"&&(B.target!=null||(B.target="es2022"),B.moduleResolution!=null||(B.moduleResolution="node16")),S==="node18"&&(B.target!=null||(B.target="es2022"),B.moduleResolution!=null||(B.moduleResolution="node16")),S==="node20"&&(B.target!=null||(B.target="es2023"),B.moduleResolution!=null||(B.moduleResolution="node16"),B.resolveJsonModule!=null||(B.resolveJsonModule=!0)),S==="nodenext"&&(B.target!=null||(B.target="esnext"),B.moduleResolution!=null||(B.moduleResolution="nodenext"),B.resolveJsonModule!=null||(B.resolveJsonModule=!0)),S==="node16"||S==="node18"||S==="node20"||S==="nodenext"){let f0=B.target;(f0==="es3"||f0==="es2022"||f0==="es2023"||f0==="es2024"||f0==="esnext")&&(B.useDefineForClassFields!=null||(B.useDefineForClassFields=!0))}S==="preserve"&&(B.moduleResolution!=null||(B.moduleResolution="bundler"))}if(B.moduleResolution){let S=B.moduleResolution.toLowerCase();S==="node"&&(S="node10"),B.moduleResolution=S,(S==="node16"||S==="nodenext"||S==="bundler")&&(B.resolvePackageJsonExports!=null||(B.resolvePackageJsonExports=!0),B.resolvePackageJsonImports!=null||(B.resolvePackageJsonImports=!0)),S==="bundler"&&(B.allowSyntheticDefaultImports!=null||(B.allowSyntheticDefaultImports=!0),B.resolveJsonModule!=null||(B.resolveJsonModule=!0))}B.jsx&&(B.jsx=B.jsx.toLowerCase()),B.moduleDetection&&(B.moduleDetection=B.moduleDetection.toLowerCase()),B.importsNotUsedAsValues&&(B.importsNotUsedAsValues=B.importsNotUsedAsValues.toLowerCase()),B.newLine&&(B.newLine=B.newLine.toLowerCase()),B.esModuleInterop&&(B.allowSyntheticDefaultImports!=null||(B.allowSyntheticDefaultImports=!0)),B.verbatimModuleSyntax&&(B.isolatedModules!=null||(B.isolatedModules=!0),B.preserveConstEnums!=null||(B.preserveConstEnums=!0)),B.isolatedModules&&(B.preserveConstEnums!=null||(B.preserveConstEnums=!0)),B.rewriteRelativeImportExtensions&&(B.allowImportingTsExtensions!=null||(B.allowImportingTsExtensions=!0)),B.lib&&(B.lib=B.lib.map((S)=>S.toLowerCase())),B.checkJs&&(B.allowJs!=null||(B.allowJs=!0))},"normalizeCompilerOptions"),ct=w((B,S=new Map)=>{let f0=v.resolve(B),L=Ff(f0,S),o0=v.dirname(f0),{compilerOptions:n0}=L;if(n0){for(let b0 of Qn){let K0=n0[b0];if(K0){let B0=g0(K0,o0);n0[b0]=B0?gl(o0,B0):K0}}for(let b0 of["rootDirs","typeRoots"]){let K0=n0[b0];K0&&(n0[b0]=K0.map((B0)=>{let ll=g0(B0,o0);return ll?gl(o0,ll):X(B0)}))}let{paths:E}=n0;if(E)for(let b0 of Object.keys(E))E[b0]=E[b0].map((K0)=>{var B0;return(B0=g0(K0,o0))!=null?B0:K0});J5(n0)}for(let E of Sl){let b0=L[E];b0&&(L[E]=b0.map((K0)=>{var B0;return(B0=g0(K0,o0))!=null?B0:K0}))}return L},"parseTsconfig");var Nf=Object.defineProperty,rf=w((B,S)=>Nf(B,"name",{value:S,configurable:!0}),"s");let At=rf((B)=>{let S="";for(let f0=0;f0<B.length;f0+=1){let L=B[f0],o0=L.toUpperCase();S+=L===o0?L.toLowerCase():o0}return S},"invertCase"),ff=new Map,br=rf((B,S)=>{let f0=Y.join(B,`.is-fs-case-sensitive-test-${process.pid}`);try{return S.writeFileSync(f0,""),!S.existsSync(At(f0))}finally{try{S.unlinkSync(f0)}catch{}}},"checkDirectoryCaseWithWrite"),Zr=rf((B,S,f0)=>{try{return br(B,f0)}catch(L){if(S===void 0)return br(A.tmpdir(),f0);throw L}},"checkDirectoryCaseWithFallback"),Wl=rf((B,S=d,f0=!0)=>{let L=B!=null?B:process.cwd();if(f0&&ff.has(L))return ff.get(L);let o0,n0=At(L);return o0=n0!==L&&S.existsSync(L)?!S.existsSync(n0):Zr(L,B,S),f0&&ff.set(L,o0),o0},"isFsCaseSensitive"),{join:J1}=v.posix,G0={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},Kt=w((B)=>{let S=[...G0.ts],f0=[...G0.cts],L=[...G0.mts];return B!=null&&B.allowJs&&(S.push(".js",".jsx"),f0.push(".cjs"),L.push(".mjs")),[...S,...f0,...L]},"getSupportedExtensions"),Bn=w((B)=>{let S=[];if(!B)return S;let{outDir:f0,declarationDir:L}=B;return f0&&S.push(f0),L&&S.push(L),S},"getDefaultExcludeSpec"),Wt=w((B)=>B.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),nf=`(?!(${["node_modules","bower_components","jspm_packages"].join("|")})(/|$))`,u1=/(?:^|\/)[^.*?]+$/,Zt="**/*",t1="[^/]",z1="[^./]",Hn=process.platform==="win32",Ot=w(({config:B,path:S},f0=Wl())=>{if("extends"in B)throw Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!v.isAbsolute(S))throw Error("The tsconfig path must be absolute");Hn&&(S=z(S));let L=v.dirname(S),{files:o0,include:n0,exclude:E,compilerOptions:b0}=B,K0=w((wl)=>v.isAbsolute(wl)?wl:J1(L,wl),"resolvePattern"),B0=o0==null?void 0:o0.map(K0),ll=Kt(b0),E0=f0?"":"i",cl=(E||Bn(b0)).map((wl)=>{let Zl=K0(wl),Or=Wt(Zl).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${t1}*`).replaceAll(String.raw`\?`,t1);return new RegExp(`^${Or}($|/)`,E0)}),hl=o0||n0?n0:[Zt],ol=hl?hl.map((wl)=>{let Zl=K0(wl);u1.test(Zl)&&(Zl=J1(Zl,Zt));let Or=Wt(Zl).replaceAll(String.raw`/\*\*`,`(/${nf}${z1}${t1}*)*?`).replaceAll(/(\/)?\\\*/g,(h1,k0)=>{let Nl=`(${z1}|(\\.(?!min\\.js$))?)*`;return k0?`/${nf}${z1}${Nl}`:Nl}).replaceAll(/(\/)?\\\?/g,(h1,k0)=>k0?`/${nf}${t1}`:t1);return new RegExp(`^${Or}$`,E0)}):void 0;return(wl)=>{if(!v.isAbsolute(wl))throw Error("filePath must be absolute");return Hn&&(wl=z(wl)),B0!=null&&B0.includes(wl)||ll.some((Zl)=>wl.endsWith(Zl))&&!cl.some((Zl)=>Zl.test(wl))&&ol&&ol.some((Zl)=>Zl.test(wl))?B:void 0}},"createFilesMatcher"),Yi=w((B,S,f0)=>{let L=v.resolve(B),o0=z(B);for(;;){let n0=I(o0,S,f0);if(!n0)return;let E=v.resolve(n0),b0=ct(E,f0),K0={path:z(E),config:b0};if(Ot(K0)(L))return K0;let B0=v.dirname(n0),ll=v.dirname(B0);if(ll===B0)return;o0=ll}},"findConfigApplicable"),Gn=w((B=process.cwd(),S="tsconfig.json",f0=new Map,L=!1)=>{var o0;return L?(o0=Yi(B,S,f0))==null?void 0:o0.path:I(z(B),S,f0)},"findTsconfig"),z5=w((B=process.cwd(),S="tsconfig.json",f0=new Map,L=!1)=>{var o0;if(!L){let n0=Gn(B,S,f0);if(!n0)return null;return{path:n0,config:ct(n0,f0)}}return(o0=Yi(B,S,f0))!=null?o0:null},"getTsconfig"),Q5=/\*/g,Un=w((B,S)=>{let f0=B.match(Q5);if(f0&&f0.length>1)throw Error(S)},"assertStarCount"),Xt=w((B)=>{if(B.includes("*")){let[S,f0]=B.split("*");return{prefix:S,suffix:f0}}return B},"parsePattern"),Yt=w(({prefix:B,suffix:S},f0)=>f0.startsWith(B)&&f0.endsWith(S),"isPatternMatch"),Jt=w((B,S,f0)=>Object.entries(B).map(([L,o0])=>(Un(L,`Pattern '${L}' can have at most one '*' character.`),{pattern:Xt(L),substitutions:o0.map((n0)=>{if(Un(n0,`Substitution '${n0}' in pattern '${L}' can have at most one '*' character.`),!S&&!M.test(n0)&&!v.isAbsolute(n0))throw Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return v.resolve(f0,n0)})})),"parsePaths"),zt=w((B)=>{let{compilerOptions:S}=B.config;if(!S)return null;let{baseUrl:f0,paths:L}=S;if(!f0&&!L)return null;let o0=h0 in S&&S[h0],n0=v.resolve(v.dirname(B.path),f0||o0||"."),E=L?Jt(L,f0,n0):[];return(b0)=>{if(M.test(b0))return[];let K0=[];for(let cl of E){if(cl.pattern===b0)return cl.substitutions.map(z);typeof cl.pattern!="string"&&K0.push(cl)}let B0,ll=-1;for(let cl of K0)Yt(cl.pattern,b0)&&cl.pattern.prefix.length>ll&&(ll=cl.pattern.prefix.length,B0=cl);if(!B0)return f0?[z(v.join(n0,b0))]:[];let E0=b0.slice(B0.pattern.prefix.length,b0.length-B0.pattern.suffix.length);return B0.substitutions.map((cl)=>z(cl.replace("*",E0)))}},"createPathsMatcher");u.createPathsMatcher=zt,u.getTsconfig=z5},"./node_modules/.pnpm/resolve-pkg-maps@1.0.0/node_modules/resolve-pkg-maps/dist/index.cjs"(n,u){Object.defineProperty(u,"__esModule",{value:!0});let t=(p)=>p!==null&&typeof p=="object",o=(p,I)=>Object.assign(Error(`[${p}]: ${I}`),{code:p}),w="ERR_INVALID_PACKAGE_CONFIG",v="ERR_INVALID_PACKAGE_TARGET",k=/^\d+$/,$=/^(\.{1,2}|node_modules)$/i,b=/\/|\\/;var d,A=((d=A||{}).Export="exports",d.Import="imports",d);let Y=(p,I,M,X,P)=>{if(I==null)return[];if(typeof I=="string"){let[_,...l0]=I.split(b);if(_===".."||l0.some((r0)=>$.test(r0)))throw o(v,`Invalid "${p}" target "${I}" defined in the package config`);return[P?I.replace(/\*/g,P):I]}if(Array.isArray(I))return I.flatMap((_)=>Y(p,_,M,X,P));if(t(I)){for(let _ of Object.keys(I)){if(k.test(_))throw o(w,"Cannot contain numeric property keys");if(_==="default"||X.includes(_))return Y(p,I[_],M,X,P)}return[]}throw o(v,`Invalid "${p}" target "${I}"`)},z="*",R=(p,I)=>{let M=p.indexOf(z),X=I.indexOf(z);return M===X?I.length>p.length:X>M};function H(p,I){if(!I.includes(z)&&p.hasOwnProperty(I))return[I];let M,X;for(let P of Object.keys(p))if(P.includes(z)){let[_,l0,r0]=P.split(z);if(r0===void 0&&I.startsWith(_)&&I.endsWith(l0)){let u0=I.slice(_.length,-l0.length||void 0);u0&&(!M||R(M,P))&&(M=P,X=u0)}}return[M,X]}let G=/^\w+:/;u.resolveExports=(p,I,M)=>{if(!p)throw Error('"exports" is required');I=I===""?".":`./${I}`,(typeof p=="string"||Array.isArray(p)||t(p)&&((l0)=>Object.keys(l0).reduce((r0,u0)=>{let N=u0===""||u0[0]!==".";if(r0===void 0||r0===N)return N;throw o(w,'"exports" cannot contain some keys starting with "." and some not')},void 0))(p))&&(p={".":p});let[X,P]=H(p,I),_=Y(A.Export,p[X],I,M,P);if(_.length===0)throw o("ERR_PACKAGE_PATH_NOT_EXPORTED",I==="."?'No "exports" main defined':`Package subpath '${I}' is not defined by "exports"`);for(let l0 of _)if(!l0.startsWith("./")&&!G.test(l0))throw o(v,`Invalid "exports" target "${l0}" defined in the package config`);return _},u.resolveImports=(p,I,M)=>{if(!p)throw Error('"imports" is required');let[X,P]=H(p,I),_=Y(A.Import,p[X],I,M,P);if(_.length===0)throw o("ERR_PACKAGE_IMPORT_NOT_DEFINED",`Package import specifier "${I}" is not defined in package`);return _}}},r={};function f(n){var u=r[n];if(u!==void 0)return u.exports;var t=r[n]={exports:{}};return l[n](t,t.exports,f),t.exports}f.n=(n)=>{var u=n&&n.__esModule?()=>n.default:()=>n;return f.d(u,{a:u}),u},f.d=(n,u)=>{for(var t in u)f.o(u,t)&&!f.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:u[t]})},f.o=(n,u)=>Object.prototype.hasOwnProperty.call(n,u);var i={};(()=>{f.d(i,{default:()=>Uv});let n=P0("os");var u=[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],t=[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="\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",w={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"},v="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",k={5:v,"5module":v+" export import",6:v+" const class extends export import super"},$=/^in(stanceof)?$/,b=new RegExp("["+o+"]"),d=new RegExp("["+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]");function A(h,m){for(var y=65536,W=0;W<m.length;W+=2){if((y+=m[W])>h)return!1;if((y+=m[W+1])>=h)return!0}return!1}function Y(h,m){return h<65?h===36:h<91||(h<97?h===95:h<123||(h<=65535?h>=170&&b.test(String.fromCharCode(h)):m!==!1&&A(h,t)))}function z(h,m){return h<48?h===36:h<58||!(h<65)&&(h<91||(h<97?h===95:h<123||(h<=65535?h>=170&&d.test(String.fromCharCode(h)):m!==!1&&(A(h,t)||A(h,u)))))}var R=function(h,m){m===void 0&&(m={}),this.label=h,this.keyword=m.keyword,this.beforeExpr=!!m.beforeExpr,this.startsExpr=!!m.startsExpr,this.isLoop=!!m.isLoop,this.isAssign=!!m.isAssign,this.prefix=!!m.prefix,this.postfix=!!m.postfix,this.binop=m.binop||null,this.updateContext=null};function H(h,m){return new R(h,{beforeExpr:!0,binop:m})}var G={beforeExpr:!0},p={startsExpr:!0},I={};function M(h,m){return m===void 0&&(m={}),m.keyword=h,I[h]=new R(h,m)}var X={num:new R("num",p),regexp:new R("regexp",p),string:new R("string",p),name:new R("name",p),privateId:new R("privateId",p),eof:new R("eof"),bracketL:new R("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new R("]"),braceL:new R("{",{beforeExpr:!0,startsExpr:!0}),braceR:new R("}"),parenL:new R("(",{beforeExpr:!0,startsExpr:!0}),parenR:new R(")"),comma:new R(",",G),semi:new R(";",G),colon:new R(":",G),dot:new R("."),question:new R("?",G),questionDot:new R("?."),arrow:new R("=>",G),template:new R("template"),invalidTemplate:new R("invalidTemplate"),ellipsis:new R("...",G),backQuote:new R("`",p),dollarBraceL:new R("${",{beforeExpr:!0,startsExpr:!0}),eq:new R("=",{beforeExpr:!0,isAssign:!0}),assign:new R("_=",{beforeExpr:!0,isAssign:!0}),incDec:new R("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new R("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:H("||",1),logicalAND:H("&&",2),bitwiseOR:H("|",3),bitwiseXOR:H("^",4),bitwiseAND:H("&",5),equality:H("==/!=/===/!==",6),relational:H("</>/<=/>=",7),bitShift:H("<</>>/>>>",8),plusMin:new R("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:H("%",10),star:H("*",10),slash:H("/",10),starstar:new R("**",{beforeExpr:!0}),coalesce:H("??",1),_break:M("break"),_case:M("case",G),_catch:M("catch"),_continue:M("continue"),_debugger:M("debugger"),_default:M("default",G),_do:M("do",{isLoop:!0,beforeExpr:!0}),_else:M("else",G),_finally:M("finally"),_for:M("for",{isLoop:!0}),_function:M("function",p),_if:M("if"),_return:M("return",G),_switch:M("switch"),_throw:M("throw",G),_try:M("try"),_var:M("var"),_const:M("const"),_while:M("while",{isLoop:!0}),_with:M("with"),_new:M("new",{beforeExpr:!0,startsExpr:!0}),_this:M("this",p),_super:M("super",p),_class:M("class",p),_extends:M("extends",G),_export:M("export"),_import:M("import",p),_null:M("null",p),_true:M("true",p),_false:M("false",p),_in:M("in",{beforeExpr:!0,binop:7}),_instanceof:M("instanceof",{beforeExpr:!0,binop:7}),_typeof:M("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:M("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:M("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},P=/\r\n?|\n|\u2028|\u2029/,_=new RegExp(P.source,"g");function l0(h){return h===10||h===13||h===8232||h===8233}function r0(h,m,y){y===void 0&&(y=h.length);for(var W=m;W<y;W++){var J=h.charCodeAt(W);if(l0(J))return W<y-1&&J===13&&h.charCodeAt(W+1)===10?W+2:W+1}return-1}var u0=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,N=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,g=Object.prototype,Z=g.hasOwnProperty,O=g.toString,Q=Object.hasOwn||function(h,m){return Z.call(h,m)},U=Array.isArray||function(h){return O.call(h)==="[object Array]"},q=Object.create(null);function V(h){return q[h]||(q[h]=new RegExp("^(?:"+h.replace(/ /g,"|")+")$"))}function x(h){return h<=65535?String.fromCharCode(h):(h-=65536,String.fromCharCode(55296+(h>>10),56320+(1023&h)))}var e=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,h0=function(h,m){this.line=h,this.column=m};h0.prototype.offset=function(h){return new h0(this.line,this.column+h)};var y0=function(h,m,y){this.start=m,this.end=y,h.sourceFile!==null&&(this.source=h.sourceFile)};function nl(h,m){for(var y=1,W=0;;){var J=r0(h,W,m);if(J<0)return new h0(y,m-W);++y,W=J}}var Z0={ecmaVersion:null,sourceType:"script",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},U0=!1;function tl(h){var m={};for(var y in Z0)m[y]=h&&Q(h,y)?h[y]:Z0[y];if(m.ecmaVersion==="latest"?m.ecmaVersion=1e8:m.ecmaVersion==null?(!U0&&typeof console=="object"&&console.warn&&(U0=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
191
+ `+"\t".repeat(S)),function(B){B.DEFAULT={allowTrailingComma:!1}}(Z||(Z={})),w(U,"parse$1"),w(q,"visit"),function(B){B[B.None=0]="None",B[B.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",B[B.UnexpectedEndOfString=2]="UnexpectedEndOfString",B[B.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",B[B.InvalidUnicode=4]="InvalidUnicode",B[B.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",B[B.InvalidCharacter=6]="InvalidCharacter"}(O||(O={})),function(B){B[B.OpenBraceToken=1]="OpenBraceToken",B[B.CloseBraceToken=2]="CloseBraceToken",B[B.OpenBracketToken=3]="OpenBracketToken",B[B.CloseBracketToken=4]="CloseBracketToken",B[B.CommaToken=5]="CommaToken",B[B.ColonToken=6]="ColonToken",B[B.NullKeyword=7]="NullKeyword",B[B.TrueKeyword=8]="TrueKeyword",B[B.FalseKeyword=9]="FalseKeyword",B[B.StringLiteral=10]="StringLiteral",B[B.NumericLiteral=11]="NumericLiteral",B[B.LineCommentTrivia=12]="LineCommentTrivia",B[B.BlockCommentTrivia=13]="BlockCommentTrivia",B[B.LineBreakTrivia=14]="LineBreakTrivia",B[B.Trivia=15]="Trivia",B[B.Unknown=16]="Unknown",B[B.EOF=17]="EOF"}(Q||(Q={}));let V=U;var x;(function(B){B[B.InvalidSymbol=1]="InvalidSymbol",B[B.InvalidNumberFormat=2]="InvalidNumberFormat",B[B.PropertyNameExpected=3]="PropertyNameExpected",B[B.ValueExpected=4]="ValueExpected",B[B.ColonExpected=5]="ColonExpected",B[B.CommaExpected=6]="CommaExpected",B[B.CloseBraceExpected=7]="CloseBraceExpected",B[B.CloseBracketExpected=8]="CloseBracketExpected",B[B.EndOfFileExpected=9]="EndOfFileExpected",B[B.InvalidCommentToken=10]="InvalidCommentToken",B[B.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",B[B.UnexpectedEndOfString=12]="UnexpectedEndOfString",B[B.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",B[B.InvalidUnicode=14]="InvalidUnicode",B[B.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",B[B.InvalidCharacter=16]="InvalidCharacter"})(x||(x={}));let e=w((B,S)=>V(G(S,B,"utf8")),"readJsonc"),h0=Symbol("implicitBaseUrl"),y0="${configDir}",nl=w(()=>{let{findPnpApi:B}=$;return B&&B(process.cwd())},"getPnpApi"),Z0=w((B,S,f0,L)=>{let o0=`resolveFromPackageJsonPath:${B}:${S}:${f0}`;if(L!=null&&L.has(o0))return L.get(o0);let n0=e(B,L);if(!n0)return;let E=S||"tsconfig.json";if(!f0&&n0.exports)try{let[b0]=b.resolveExports(n0.exports,S,["require","types"]);E=b0}catch{return!1}else!S&&n0.tsconfig&&(E=n0.tsconfig);return E=v.join(B,"..",E),L==null||L.set(o0,E),E},"resolveFromPackageJsonPath"),U0="package.json",tl="tsconfig.json",R0=w((B,S,f0)=>{let L=B;if(B===".."&&(L=v.join(L,tl)),B[0]==="."&&(L=v.resolve(S,L)),v.isAbsolute(L)){if(H(f0,L)){if(p(f0,L).isFile())return L}else if(!L.endsWith(".json")){let hl=`${L}.json`;if(H(f0,hl))return hl}return}let[o0,...n0]=B.split("/"),E=o0[0]==="@"?`${o0}/${n0.shift()}`:o0,b0=n0.join("/"),K0=nl();if(K0){let{resolveRequest:hl}=K0;try{if(E===B){let ol=hl(v.join(E,U0),S);if(ol){let wl=Z0(ol,b0,!1,f0);if(wl&&H(f0,wl))return wl}}else{let ol;try{ol=hl(B,S,{extensions:[".json"]})}catch{ol=hl(v.join(B,tl),S)}if(ol)return ol}}catch{}}let B0=I(v.resolve(S),v.join("node_modules",E),f0);if(!B0||!p(f0,B0).isDirectory())return;let ll=v.join(B0,U0);if(H(f0,ll)){let hl=Z0(ll,b0,!1,f0);if(hl===!1)return;if(hl&&H(f0,hl)&&p(f0,hl).isFile())return hl}let E0=v.join(B0,b0),cl=E0.endsWith(".json");if(!cl){let hl=`${E0}.json`;if(H(f0,hl))return hl}if(H(f0,E0)){if(p(f0,E0).isDirectory()){let hl=v.join(E0,U0);if(H(f0,hl)){let wl=Z0(hl,"",!0,f0);if(wl&&H(f0,wl))return wl}let ol=v.join(E0,tl);if(H(f0,ol))return ol}else if(cl)return E0}},"resolveExtendsPath"),gl=w((B,S)=>X(v.relative(B,S)),"pathRelative"),Sl=["files","include","exclude"],e0=w((B,S,f0)=>{let L=v.join(S,f0);return z(v.relative(B,L))||"./"},"resolveAndRelativize"),Ll=w((B,S,f0)=>{let L=v.relative(B,S);if(!L)return f0;return z(`${L}/${f0.startsWith("./")?f0.slice(2):f0}`)},"prefixPattern"),Gl=w((B,S,f0,L)=>{let o0=R0(B,S,L);if(!o0)throw Error(`File '${B}' not found.`);if(f0.has(o0))throw Error(`Circularity detected while resolving configuration: ${o0}`);f0.add(o0);let n0=v.dirname(o0),E=Nf(o0,L,f0);delete E.references;let{compilerOptions:b0}=E;if(b0){let{baseUrl:K0}=b0;K0&&!K0.startsWith(y0)&&(b0.baseUrl=e0(S,n0,K0));let{outDir:B0}=b0;B0&&!B0.startsWith(y0)&&(b0.outDir=e0(S,n0,B0));let{declarationDir:ll}=b0;ll&&!ll.startsWith(y0)&&(b0.declarationDir=e0(S,n0,ll));let{rootDir:E0}=b0;E0&&!E0.startsWith(y0)&&(b0.rootDir=e0(S,n0,E0));let{rootDirs:cl}=b0;cl&&(b0.rootDirs=cl.map((ol)=>ol.startsWith(y0)?ol:e0(S,n0,ol)));let{typeRoots:hl}=b0;hl&&(b0.typeRoots=hl.map((ol)=>ol.startsWith(y0)?ol:e0(S,n0,ol)))}for(let K0 of Sl){let B0=E[K0];B0&&(E[K0]=B0.map((ll)=>ll.startsWith(y0)?ll:Ll(S,n0,ll)))}return E},"resolveExtends"),dt=["outDir","declarationDir"],Nf=w((B,S,f0=new Set)=>{let L;try{L=e(B,S)||{}}catch{throw Error(`Cannot resolve tsconfig at path: ${B}`)}if(typeof L!="object")throw SyntaxError(`Failed to parse tsconfig at: ${B}`);let o0=v.dirname(B);if(L.compilerOptions){let{compilerOptions:n0}=L;n0.paths&&!n0.baseUrl&&(n0[h0]=o0)}if(L.extends){let n0=Array.isArray(L.extends)?L.extends:[L.extends];delete L.extends;for(let E of n0.reverse()){let b0=Gl(E,o0,new Set(f0),S),K0={...b0,...L,compilerOptions:{...b0.compilerOptions,...L.compilerOptions}};b0.watchOptions&&(K0.watchOptions={...b0.watchOptions,...L.watchOptions}),L=K0}}if(L.compilerOptions){let{compilerOptions:n0}=L,E=["baseUrl","rootDir"];for(let b0 of E){let K0=n0[b0];if(K0&&!K0.startsWith(y0)){let B0=v.resolve(o0,K0),ll=gl(o0,B0);n0[b0]=ll}}for(let b0 of dt){let K0=n0[b0];K0&&(Array.isArray(L.exclude)||(L.exclude=dt.map((B0)=>n0[B0]).filter(Boolean)),K0.startsWith(y0)||(K0=X(K0)),n0[b0]=K0)}}else L.compilerOptions={};if(L.include&&(L.include=L.include.map(z)),L.files&&(L.files=L.files.map((n0)=>n0.startsWith(y0)?n0:X(n0))),L.watchOptions){let{watchOptions:n0}=L;n0.excludeDirectories&&(n0.excludeDirectories=n0.excludeDirectories.map((E)=>z(v.resolve(o0,E)))),n0.excludeFiles&&(n0.excludeFiles=n0.excludeFiles.map((E)=>z(v.resolve(o0,E)))),n0.watchFile&&(n0.watchFile=n0.watchFile.toLowerCase()),n0.watchDirectory&&(n0.watchDirectory=n0.watchDirectory.toLowerCase()),n0.fallbackPolling&&(n0.fallbackPolling=n0.fallbackPolling.toLowerCase())}return L},"_parseTsconfig"),g0=w((B,S)=>{if(B.startsWith(y0))return z(v.join(S,B.slice(12)))},"interpolateConfigDir"),Qn=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],J5=w((B)=>{if(B.strict){let S=["noImplicitAny","noImplicitThis","strictNullChecks","strictFunctionTypes","strictBindCallApply","strictPropertyInitialization","strictBuiltinIteratorReturn","alwaysStrict","useUnknownInCatchVariables"];for(let f0 of S)B[f0]===void 0&&(B[f0]=!0)}if(B.composite&&(B.declaration!=null||(B.declaration=!0),B.incremental!=null||(B.incremental=!0)),B.target){let S=B.target.toLowerCase();S==="es2015"&&(S="es6"),B.target=S,S==="esnext"&&(B.module!=null||(B.module="es6"),B.useDefineForClassFields!=null||(B.useDefineForClassFields=!0)),(S==="es6"||S==="es2016"||S==="es2017"||S==="es2018"||S==="es2019"||S==="es2020"||S==="es2021"||S==="es2022"||S==="es2023"||S==="es2024")&&(B.module!=null||(B.module="es6")),(S==="es2022"||S==="es2023"||S==="es2024")&&(B.useDefineForClassFields!=null||(B.useDefineForClassFields=!0))}if(B.module){let S=B.module.toLowerCase();if(S==="es2015"&&(S="es6"),B.module=S,(S==="es6"||S==="es2020"||S==="es2022"||S==="esnext"||S==="none"||S==="system"||S==="umd"||S==="amd")&&(B.moduleResolution!=null||(B.moduleResolution="classic")),S==="system"&&(B.allowSyntheticDefaultImports!=null||(B.allowSyntheticDefaultImports=!0)),(S==="node16"||S==="node18"||S==="node20"||S==="nodenext"||S==="preserve")&&(B.esModuleInterop!=null||(B.esModuleInterop=!0),B.allowSyntheticDefaultImports!=null||(B.allowSyntheticDefaultImports=!0)),(S==="node16"||S==="node18"||S==="node20"||S==="nodenext")&&(B.moduleDetection!=null||(B.moduleDetection="force")),S==="node16"&&(B.target!=null||(B.target="es2022"),B.moduleResolution!=null||(B.moduleResolution="node16")),S==="node18"&&(B.target!=null||(B.target="es2022"),B.moduleResolution!=null||(B.moduleResolution="node16")),S==="node20"&&(B.target!=null||(B.target="es2023"),B.moduleResolution!=null||(B.moduleResolution="node16"),B.resolveJsonModule!=null||(B.resolveJsonModule=!0)),S==="nodenext"&&(B.target!=null||(B.target="esnext"),B.moduleResolution!=null||(B.moduleResolution="nodenext"),B.resolveJsonModule!=null||(B.resolveJsonModule=!0)),S==="node16"||S==="node18"||S==="node20"||S==="nodenext"){let f0=B.target;(f0==="es3"||f0==="es2022"||f0==="es2023"||f0==="es2024"||f0==="esnext")&&(B.useDefineForClassFields!=null||(B.useDefineForClassFields=!0))}S==="preserve"&&(B.moduleResolution!=null||(B.moduleResolution="bundler"))}if(B.moduleResolution){let S=B.moduleResolution.toLowerCase();S==="node"&&(S="node10"),B.moduleResolution=S,(S==="node16"||S==="nodenext"||S==="bundler")&&(B.resolvePackageJsonExports!=null||(B.resolvePackageJsonExports=!0),B.resolvePackageJsonImports!=null||(B.resolvePackageJsonImports=!0)),S==="bundler"&&(B.allowSyntheticDefaultImports!=null||(B.allowSyntheticDefaultImports=!0),B.resolveJsonModule!=null||(B.resolveJsonModule=!0))}B.jsx&&(B.jsx=B.jsx.toLowerCase()),B.moduleDetection&&(B.moduleDetection=B.moduleDetection.toLowerCase()),B.importsNotUsedAsValues&&(B.importsNotUsedAsValues=B.importsNotUsedAsValues.toLowerCase()),B.newLine&&(B.newLine=B.newLine.toLowerCase()),B.esModuleInterop&&(B.allowSyntheticDefaultImports!=null||(B.allowSyntheticDefaultImports=!0)),B.verbatimModuleSyntax&&(B.isolatedModules!=null||(B.isolatedModules=!0),B.preserveConstEnums!=null||(B.preserveConstEnums=!0)),B.isolatedModules&&(B.preserveConstEnums!=null||(B.preserveConstEnums=!0)),B.rewriteRelativeImportExtensions&&(B.allowImportingTsExtensions!=null||(B.allowImportingTsExtensions=!0)),B.lib&&(B.lib=B.lib.map((S)=>S.toLowerCase())),B.checkJs&&(B.allowJs!=null||(B.allowJs=!0))},"normalizeCompilerOptions"),gt=w((B,S=new Map)=>{let f0=v.resolve(B),L=Nf(f0,S),o0=v.dirname(f0),{compilerOptions:n0}=L;if(n0){for(let b0 of Qn){let K0=n0[b0];if(K0){let B0=g0(K0,o0);n0[b0]=B0?gl(o0,B0):K0}}for(let b0 of["rootDirs","typeRoots"]){let K0=n0[b0];K0&&(n0[b0]=K0.map((B0)=>{let ll=g0(B0,o0);return ll?gl(o0,ll):X(B0)}))}let{paths:E}=n0;if(E)for(let b0 of Object.keys(E))E[b0]=E[b0].map((K0)=>{var B0;return(B0=g0(K0,o0))!=null?B0:K0});J5(n0)}for(let E of Sl){let b0=L[E];b0&&(L[E]=b0.map((K0)=>{var B0;return(B0=g0(K0,o0))!=null?B0:K0}))}return L},"parseTsconfig");var Rf=Object.defineProperty,rf=w((B,S)=>Rf(B,"name",{value:S,configurable:!0}),"s");let ct=rf((B)=>{let S="";for(let f0=0;f0<B.length;f0+=1){let L=B[f0],o0=L.toUpperCase();S+=L===o0?L.toLowerCase():o0}return S},"invertCase"),ff=new Map,br=rf((B,S)=>{let f0=Y.join(B,`.is-fs-case-sensitive-test-${process.pid}`);try{return S.writeFileSync(f0,""),!S.existsSync(ct(f0))}finally{try{S.unlinkSync(f0)}catch{}}},"checkDirectoryCaseWithWrite"),Zr=rf((B,S,f0)=>{try{return br(B,f0)}catch(L){if(S===void 0)return br(A.tmpdir(),f0);throw L}},"checkDirectoryCaseWithFallback"),Wl=rf((B,S=d,f0=!0)=>{let L=B!=null?B:process.cwd();if(f0&&ff.has(L))return ff.get(L);let o0,n0=ct(L);return o0=n0!==L&&S.existsSync(L)?!S.existsSync(n0):Zr(L,B,S),f0&&ff.set(L,o0),o0},"isFsCaseSensitive"),{join:J1}=v.posix,G0={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},At=w((B)=>{let S=[...G0.ts],f0=[...G0.cts],L=[...G0.mts];return B!=null&&B.allowJs&&(S.push(".js",".jsx"),f0.push(".cjs"),L.push(".mjs")),[...S,...f0,...L]},"getSupportedExtensions"),Bn=w((B)=>{let S=[];if(!B)return S;let{outDir:f0,declarationDir:L}=B;return f0&&S.push(f0),L&&S.push(L),S},"getDefaultExcludeSpec"),Kt=w((B)=>B.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),nf=`(?!(${["node_modules","bower_components","jspm_packages"].join("|")})(/|$))`,u1=/(?:^|\/)[^.*?]+$/,Wt="**/*",t1="[^/]",z1="[^./]",Hn=process.platform==="win32",Zt=w(({config:B,path:S},f0=Wl())=>{if("extends"in B)throw Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!v.isAbsolute(S))throw Error("The tsconfig path must be absolute");Hn&&(S=z(S));let L=v.dirname(S),{files:o0,include:n0,exclude:E,compilerOptions:b0}=B,K0=w((wl)=>v.isAbsolute(wl)?wl:J1(L,wl),"resolvePattern"),B0=o0==null?void 0:o0.map(K0),ll=At(b0),E0=f0?"":"i",cl=(E||Bn(b0)).map((wl)=>{let Zl=K0(wl),Or=Kt(Zl).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${t1}*`).replaceAll(String.raw`\?`,t1);return new RegExp(`^${Or}($|/)`,E0)}),hl=o0||n0?n0:[Wt],ol=hl?hl.map((wl)=>{let Zl=K0(wl);u1.test(Zl)&&(Zl=J1(Zl,Wt));let Or=Kt(Zl).replaceAll(String.raw`/\*\*`,`(/${nf}${z1}${t1}*)*?`).replaceAll(/(\/)?\\\*/g,(h1,k0)=>{let Nl=`(${z1}|(\\.(?!min\\.js$))?)*`;return k0?`/${nf}${z1}${Nl}`:Nl}).replaceAll(/(\/)?\\\?/g,(h1,k0)=>k0?`/${nf}${t1}`:t1);return new RegExp(`^${Or}$`,E0)}):void 0;return(wl)=>{if(!v.isAbsolute(wl))throw Error("filePath must be absolute");return Hn&&(wl=z(wl)),B0!=null&&B0.includes(wl)||ll.some((Zl)=>wl.endsWith(Zl))&&!cl.some((Zl)=>Zl.test(wl))&&ol&&ol.some((Zl)=>Zl.test(wl))?B:void 0}},"createFilesMatcher"),Yi=w((B,S,f0)=>{let L=v.resolve(B),o0=z(B);for(;;){let n0=I(o0,S,f0);if(!n0)return;let E=v.resolve(n0),b0=gt(E,f0),K0={path:z(E),config:b0};if(Zt(K0)(L))return K0;let B0=v.dirname(n0),ll=v.dirname(B0);if(ll===B0)return;o0=ll}},"findConfigApplicable"),Gn=w((B=process.cwd(),S="tsconfig.json",f0=new Map,L=!1)=>{var o0;return L?(o0=Yi(B,S,f0))==null?void 0:o0.path:I(z(B),S,f0)},"findTsconfig"),z5=w((B=process.cwd(),S="tsconfig.json",f0=new Map,L=!1)=>{var o0;if(!L){let n0=Gn(B,S,f0);if(!n0)return null;return{path:n0,config:gt(n0,f0)}}return(o0=Yi(B,S,f0))!=null?o0:null},"getTsconfig"),Q5=/\*/g,Un=w((B,S)=>{let f0=B.match(Q5);if(f0&&f0.length>1)throw Error(S)},"assertStarCount"),Ot=w((B)=>{if(B.includes("*")){let[S,f0]=B.split("*");return{prefix:S,suffix:f0}}return B},"parsePattern"),Xt=w(({prefix:B,suffix:S},f0)=>f0.startsWith(B)&&f0.endsWith(S),"isPatternMatch"),Yt=w((B,S,f0)=>Object.entries(B).map(([L,o0])=>(Un(L,`Pattern '${L}' can have at most one '*' character.`),{pattern:Ot(L),substitutions:o0.map((n0)=>{if(Un(n0,`Substitution '${n0}' in pattern '${L}' can have at most one '*' character.`),!S&&!M.test(n0)&&!v.isAbsolute(n0))throw Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return v.resolve(f0,n0)})})),"parsePaths"),Jt=w((B)=>{let{compilerOptions:S}=B.config;if(!S)return null;let{baseUrl:f0,paths:L}=S;if(!f0&&!L)return null;let o0=h0 in S&&S[h0],n0=v.resolve(v.dirname(B.path),f0||o0||"."),E=L?Yt(L,f0,n0):[];return(b0)=>{if(M.test(b0))return[];let K0=[];for(let cl of E){if(cl.pattern===b0)return cl.substitutions.map(z);typeof cl.pattern!="string"&&K0.push(cl)}let B0,ll=-1;for(let cl of K0)Xt(cl.pattern,b0)&&cl.pattern.prefix.length>ll&&(ll=cl.pattern.prefix.length,B0=cl);if(!B0)return f0?[z(v.join(n0,b0))]:[];let E0=b0.slice(B0.pattern.prefix.length,b0.length-B0.pattern.suffix.length);return B0.substitutions.map((cl)=>z(cl.replace("*",E0)))}},"createPathsMatcher");u.createPathsMatcher=Jt,u.getTsconfig=z5},"./node_modules/.pnpm/resolve-pkg-maps@1.0.0/node_modules/resolve-pkg-maps/dist/index.cjs"(n,u){Object.defineProperty(u,"__esModule",{value:!0});let t=(p)=>p!==null&&typeof p=="object",o=(p,I)=>Object.assign(Error(`[${p}]: ${I}`),{code:p}),w="ERR_INVALID_PACKAGE_CONFIG",v="ERR_INVALID_PACKAGE_TARGET",k=/^\d+$/,$=/^(\.{1,2}|node_modules)$/i,b=/\/|\\/;var d,A=((d=A||{}).Export="exports",d.Import="imports",d);let Y=(p,I,M,X,P)=>{if(I==null)return[];if(typeof I=="string"){let[_,...l0]=I.split(b);if(_===".."||l0.some((r0)=>$.test(r0)))throw o(v,`Invalid "${p}" target "${I}" defined in the package config`);return[P?I.replace(/\*/g,P):I]}if(Array.isArray(I))return I.flatMap((_)=>Y(p,_,M,X,P));if(t(I)){for(let _ of Object.keys(I)){if(k.test(_))throw o(w,"Cannot contain numeric property keys");if(_==="default"||X.includes(_))return Y(p,I[_],M,X,P)}return[]}throw o(v,`Invalid "${p}" target "${I}"`)},z="*",R=(p,I)=>{let M=p.indexOf(z),X=I.indexOf(z);return M===X?I.length>p.length:X>M};function H(p,I){if(!I.includes(z)&&p.hasOwnProperty(I))return[I];let M,X;for(let P of Object.keys(p))if(P.includes(z)){let[_,l0,r0]=P.split(z);if(r0===void 0&&I.startsWith(_)&&I.endsWith(l0)){let u0=I.slice(_.length,-l0.length||void 0);u0&&(!M||R(M,P))&&(M=P,X=u0)}}return[M,X]}let G=/^\w+:/;u.resolveExports=(p,I,M)=>{if(!p)throw Error('"exports" is required');I=I===""?".":`./${I}`,(typeof p=="string"||Array.isArray(p)||t(p)&&((l0)=>Object.keys(l0).reduce((r0,u0)=>{let N=u0===""||u0[0]!==".";if(r0===void 0||r0===N)return N;throw o(w,'"exports" cannot contain some keys starting with "." and some not')},void 0))(p))&&(p={".":p});let[X,P]=H(p,I),_=Y(A.Export,p[X],I,M,P);if(_.length===0)throw o("ERR_PACKAGE_PATH_NOT_EXPORTED",I==="."?'No "exports" main defined':`Package subpath '${I}' is not defined by "exports"`);for(let l0 of _)if(!l0.startsWith("./")&&!G.test(l0))throw o(v,`Invalid "exports" target "${l0}" defined in the package config`);return _},u.resolveImports=(p,I,M)=>{if(!p)throw Error('"imports" is required');let[X,P]=H(p,I),_=Y(A.Import,p[X],I,M,P);if(_.length===0)throw o("ERR_PACKAGE_IMPORT_NOT_DEFINED",`Package import specifier "${I}" is not defined in package`);return _}}},r={};function f(n){var u=r[n];if(u!==void 0)return u.exports;var t=r[n]={exports:{}};return l[n](t,t.exports,f),t.exports}f.n=(n)=>{var u=n&&n.__esModule?()=>n.default:()=>n;return f.d(u,{a:u}),u},f.d=(n,u)=>{for(var t in u)f.o(u,t)&&!f.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:u[t]})},f.o=(n,u)=>Object.prototype.hasOwnProperty.call(n,u);var i={};(()=>{f.d(i,{default:()=>Uv});let n=P0("os");var u=[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],t=[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="\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",w={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"},v="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",k={5:v,"5module":v+" export import",6:v+" const class extends export import super"},$=/^in(stanceof)?$/,b=new RegExp("["+o+"]"),d=new RegExp("["+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]");function A(h,m){for(var y=65536,W=0;W<m.length;W+=2){if((y+=m[W])>h)return!1;if((y+=m[W+1])>=h)return!0}return!1}function Y(h,m){return h<65?h===36:h<91||(h<97?h===95:h<123||(h<=65535?h>=170&&b.test(String.fromCharCode(h)):m!==!1&&A(h,t)))}function z(h,m){return h<48?h===36:h<58||!(h<65)&&(h<91||(h<97?h===95:h<123||(h<=65535?h>=170&&d.test(String.fromCharCode(h)):m!==!1&&(A(h,t)||A(h,u)))))}var R=function(h,m){m===void 0&&(m={}),this.label=h,this.keyword=m.keyword,this.beforeExpr=!!m.beforeExpr,this.startsExpr=!!m.startsExpr,this.isLoop=!!m.isLoop,this.isAssign=!!m.isAssign,this.prefix=!!m.prefix,this.postfix=!!m.postfix,this.binop=m.binop||null,this.updateContext=null};function H(h,m){return new R(h,{beforeExpr:!0,binop:m})}var G={beforeExpr:!0},p={startsExpr:!0},I={};function M(h,m){return m===void 0&&(m={}),m.keyword=h,I[h]=new R(h,m)}var X={num:new R("num",p),regexp:new R("regexp",p),string:new R("string",p),name:new R("name",p),privateId:new R("privateId",p),eof:new R("eof"),bracketL:new R("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new R("]"),braceL:new R("{",{beforeExpr:!0,startsExpr:!0}),braceR:new R("}"),parenL:new R("(",{beforeExpr:!0,startsExpr:!0}),parenR:new R(")"),comma:new R(",",G),semi:new R(";",G),colon:new R(":",G),dot:new R("."),question:new R("?",G),questionDot:new R("?."),arrow:new R("=>",G),template:new R("template"),invalidTemplate:new R("invalidTemplate"),ellipsis:new R("...",G),backQuote:new R("`",p),dollarBraceL:new R("${",{beforeExpr:!0,startsExpr:!0}),eq:new R("=",{beforeExpr:!0,isAssign:!0}),assign:new R("_=",{beforeExpr:!0,isAssign:!0}),incDec:new R("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new R("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:H("||",1),logicalAND:H("&&",2),bitwiseOR:H("|",3),bitwiseXOR:H("^",4),bitwiseAND:H("&",5),equality:H("==/!=/===/!==",6),relational:H("</>/<=/>=",7),bitShift:H("<</>>/>>>",8),plusMin:new R("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:H("%",10),star:H("*",10),slash:H("/",10),starstar:new R("**",{beforeExpr:!0}),coalesce:H("??",1),_break:M("break"),_case:M("case",G),_catch:M("catch"),_continue:M("continue"),_debugger:M("debugger"),_default:M("default",G),_do:M("do",{isLoop:!0,beforeExpr:!0}),_else:M("else",G),_finally:M("finally"),_for:M("for",{isLoop:!0}),_function:M("function",p),_if:M("if"),_return:M("return",G),_switch:M("switch"),_throw:M("throw",G),_try:M("try"),_var:M("var"),_const:M("const"),_while:M("while",{isLoop:!0}),_with:M("with"),_new:M("new",{beforeExpr:!0,startsExpr:!0}),_this:M("this",p),_super:M("super",p),_class:M("class",p),_extends:M("extends",G),_export:M("export"),_import:M("import",p),_null:M("null",p),_true:M("true",p),_false:M("false",p),_in:M("in",{beforeExpr:!0,binop:7}),_instanceof:M("instanceof",{beforeExpr:!0,binop:7}),_typeof:M("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:M("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:M("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},P=/\r\n?|\n|\u2028|\u2029/,_=new RegExp(P.source,"g");function l0(h){return h===10||h===13||h===8232||h===8233}function r0(h,m,y){y===void 0&&(y=h.length);for(var W=m;W<y;W++){var J=h.charCodeAt(W);if(l0(J))return W<y-1&&J===13&&h.charCodeAt(W+1)===10?W+2:W+1}return-1}var u0=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,N=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,g=Object.prototype,Z=g.hasOwnProperty,O=g.toString,Q=Object.hasOwn||function(h,m){return Z.call(h,m)},U=Array.isArray||function(h){return O.call(h)==="[object Array]"},q=Object.create(null);function V(h){return q[h]||(q[h]=new RegExp("^(?:"+h.replace(/ /g,"|")+")$"))}function x(h){return h<=65535?String.fromCharCode(h):(h-=65536,String.fromCharCode(55296+(h>>10),56320+(1023&h)))}var e=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,h0=function(h,m){this.line=h,this.column=m};h0.prototype.offset=function(h){return new h0(this.line,this.column+h)};var y0=function(h,m,y){this.start=m,this.end=y,h.sourceFile!==null&&(this.source=h.sourceFile)};function nl(h,m){for(var y=1,W=0;;){var J=r0(h,W,m);if(J<0)return new h0(y,m-W);++y,W=J}}var Z0={ecmaVersion:null,sourceType:"script",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},U0=!1;function tl(h){var m={};for(var y in Z0)m[y]=h&&Q(h,y)?h[y]:Z0[y];if(m.ecmaVersion==="latest"?m.ecmaVersion=1e8:m.ecmaVersion==null?(!U0&&typeof console=="object"&&console.warn&&(U0=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
192
192
  Defaulting to 2020, but this will stop working in the future.`)),m.ecmaVersion=11):m.ecmaVersion>=2015&&(m.ecmaVersion-=2009),m.allowReserved==null&&(m.allowReserved=m.ecmaVersion<5),h&&h.allowHashBang!=null||(m.allowHashBang=m.ecmaVersion>=14),U(m.onToken)){var W=m.onToken;m.onToken=function(J){return W.push(J)}}if(U(m.onComment)&&(m.onComment=function(J,a){return function(F,T,D,i0,s,$0){var v0={type:F?"Block":"Line",value:T,start:D,end:i0};J.locations&&(v0.loc=new y0(this,s,$0)),J.ranges&&(v0.range=[D,i0]),a.push(v0)}}(m,m.onComment)),m.sourceType==="commonjs"&&m.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return m}var R0=256,gl=259;function Sl(h,m){return 2|(h?4:0)|(m?8:0)}var e0=function(h,m,y){this.options=h=tl(h),this.sourceFile=h.sourceFile,this.keywords=V(k[h.ecmaVersion>=6?6:h.sourceType==="module"?"5module":5]);var W="";h.allowReserved!==!0&&(W=w[h.ecmaVersion>=6?6:h.ecmaVersion===5?5:3],h.sourceType==="module"&&(W+=" await")),this.reservedWords=V(W);var J=(W?W+" ":"")+w.strict;this.reservedWordsStrict=V(J),this.reservedWordsStrictBind=V(J+" "+w.strictBind),this.input=String(m),this.containsEsc=!1,y?(this.pos=y,this.lineStart=this.input.lastIndexOf(`
193
- `,y-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(P).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=X.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=h.sourceType==="module",this.strict=this.inModule||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&&h.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?2:1),this.regexpState=null,this.privateNameStack=[]},Ll={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}};e0.prototype.parse=function(){var h=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(h)},Ll.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},Ll.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},Ll.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},Ll.canAwait.get=function(){for(var h=this.scopeStack.length-1;h>=0;h--){var m=this.scopeStack[h].flags;if(768&m)return!1;if(2&m)return(4&m)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Ll.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&1&this.currentVarScope().flags)},Ll.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},Ll.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Ll.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Ll.allowNewDotTarget.get=function(){for(var h=this.scopeStack.length-1;h>=0;h--){var m=this.scopeStack[h].flags;if(768&m||2&m&&!(16&m))return!0}return!1},Ll.allowUsing.get=function(){var h=this.currentScope().flags;return!(1024&h)&&!(!this.inModule&&1&h)},Ll.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&R0)>0},e0.extend=function(){for(var h=[],m=arguments.length;m--;)h[m]=arguments[m];for(var y=this,W=0;W<h.length;W++)y=h[W](y);return y},e0.parse=function(h,m){return new this(m,h).parse()},e0.parseExpressionAt=function(h,m,y){var W=new this(y,h,m);return W.nextToken(),W.parseExpression()},e0.tokenizer=function(h,m){return new this(m,h)},Object.defineProperties(e0.prototype,Ll);var Gl=e0.prototype,gt=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Gl.strictDirective=function(h){if(this.options.ecmaVersion<5)return!1;for(;;){N.lastIndex=h,h+=N.exec(this.input)[0].length;var m=gt.exec(this.input.slice(h));if(!m)return!1;if((m[1]||m[2])==="use strict"){N.lastIndex=h+m[0].length;var y=N.exec(this.input),W=y.index+y[0].length,J=this.input.charAt(W);return J===";"||J==="}"||P.test(y[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(J)||J==="!"&&this.input.charAt(W+1)==="=")}h+=m[0].length,N.lastIndex=h,h+=N.exec(this.input)[0].length,this.input[h]===";"&&h++}},Gl.eat=function(h){return this.type===h&&(this.next(),!0)},Gl.isContextual=function(h){return this.type===X.name&&this.value===h&&!this.containsEsc},Gl.eatContextual=function(h){return!!this.isContextual(h)&&(this.next(),!0)},Gl.expectContextual=function(h){this.eatContextual(h)||this.unexpected()},Gl.canInsertSemicolon=function(){return this.type===X.eof||this.type===X.braceR||P.test(this.input.slice(this.lastTokEnd,this.start))},Gl.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Gl.semicolon=function(){this.eat(X.semi)||this.insertSemicolon()||this.unexpected()},Gl.afterTrailingComma=function(h,m){if(this.type===h)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),m||this.next(),!0},Gl.expect=function(h){this.eat(h)||this.unexpected()},Gl.unexpected=function(h){this.raise(h!=null?h:this.start,"Unexpected token")};var Ff=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Gl.checkPatternErrors=function(h,m){if(h){h.trailingComma>-1&&this.raiseRecoverable(h.trailingComma,"Comma is not permitted after the rest element");var y=m?h.parenthesizedAssign:h.parenthesizedBind;y>-1&&this.raiseRecoverable(y,m?"Assigning to rvalue":"Parenthesized pattern")}},Gl.checkExpressionErrors=function(h,m){if(!h)return!1;var{shorthandAssign:y,doubleProto:W}=h;if(!m)return y>=0||W>=0;y>=0&&this.raise(y,"Shorthand property assignments are valid only in destructuring patterns"),W>=0&&this.raiseRecoverable(W,"Redefinition of __proto__ property")},Gl.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")},Gl.isSimpleAssignTarget=function(h){return h.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(h.expression):h.type==="Identifier"||h.type==="MemberExpression"};var g0=e0.prototype;g0.parseTopLevel=function(h){var m=Object.create(null);for(h.body||(h.body=[]);this.type!==X.eof;){var y=this.parseStatement(null,!0,m);h.body.push(y)}if(this.inModule)for(var W=0,J=Object.keys(this.undefinedExports);W<J.length;W+=1){var a=J[W];this.raiseRecoverable(this.undefinedExports[a].start,"Export '"+a+"' is not defined")}return this.adaptDirectivePrologue(h.body),this.next(),h.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(h,"Program")};var Qn={kind:"loop"},J5={kind:"switch"};g0.isLet=function(h){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;N.lastIndex=this.pos;var m=N.exec(this.input),y=this.pos+m[0].length,W=this.fullCharCodeAt(y);if(W===91||W===92)return!0;if(h)return!1;if(W===123)return!0;if(Y(W)){var J=y;do y+=W<=65535?1:2;while(z(W=this.fullCharCodeAt(y)));if(W===92)return!0;var a=this.input.slice(J,y);if(!$.test(a))return!0}return!1},g0.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;N.lastIndex=this.pos;var h,m=N.exec(this.input),y=this.pos+m[0].length;return!(P.test(this.input.slice(this.pos,y))||this.input.slice(y,y+8)!=="function"||y+8!==this.input.length&&(z(h=this.fullCharCodeAt(y+8))||h===92))},g0.isUsingKeyword=function(h,m){if(this.options.ecmaVersion<17||!this.isContextual(h?"await":"using"))return!1;N.lastIndex=this.pos;var y=N.exec(this.input),W=this.pos+y[0].length;if(P.test(this.input.slice(this.pos,W)))return!1;if(h){var J,a=W+5;if(this.input.slice(W,a)!=="using"||a===this.input.length||z(J=this.fullCharCodeAt(a))||J===92)return!1;N.lastIndex=a;var F=N.exec(this.input);if(W=a+F[0].length,F&&P.test(this.input.slice(a,W)))return!1}var T=this.fullCharCodeAt(W);if(!Y(T)&&T!==92)return!1;var D=W;do W+=T<=65535?1:2;while(z(T=this.fullCharCodeAt(W)));if(T===92)return!0;var i0=this.input.slice(D,W);return!($.test(i0)||m&&i0==="of")},g0.isAwaitUsing=function(h){return this.isUsingKeyword(!0,h)},g0.isUsing=function(h){return this.isUsingKeyword(!1,h)},g0.parseStatement=function(h,m,y){var W,J=this.type,a=this.startNode();switch(this.isLet(h)&&(J=X._var,W="let"),J){case X._break:case X._continue:return this.parseBreakContinueStatement(a,J.keyword);case X._debugger:return this.parseDebuggerStatement(a);case X._do:return this.parseDoStatement(a);case X._for:return this.parseForStatement(a);case X._function:return h&&(this.strict||h!=="if"&&h!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(a,!1,!h);case X._class:return h&&this.unexpected(),this.parseClass(a,!0);case X._if:return this.parseIfStatement(a);case X._return:return this.parseReturnStatement(a);case X._switch:return this.parseSwitchStatement(a);case X._throw:return this.parseThrowStatement(a);case X._try:return this.parseTryStatement(a);case X._const:case X._var:return W=W||this.value,h&&W!=="var"&&this.unexpected(),this.parseVarStatement(a,W);case X._while:return this.parseWhileStatement(a);case X._with:return this.parseWithStatement(a);case X.braceL:return this.parseBlock(!0,a);case X.semi:return this.parseEmptyStatement(a);case X._export:case X._import:if(this.options.ecmaVersion>10&&J===X._import){N.lastIndex=this.pos;var F=N.exec(this.input),T=this.pos+F[0].length,D=this.input.charCodeAt(T);if(D===40||D===46)return this.parseExpressionStatement(a,this.parseExpression())}return this.options.allowImportExportEverywhere||(m||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'")),J===X._import?this.parseImport(a):this.parseExport(a,y);default:if(this.isAsyncFunction())return h&&this.unexpected(),this.next(),this.parseFunctionStatement(a,!0,!h);var i0=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(i0)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"),i0==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(a,!1,i0),this.semicolon(),this.finishNode(a,"VariableDeclaration");var s=this.value,$0=this.parseExpression();return J===X.name&&$0.type==="Identifier"&&this.eat(X.colon)?this.parseLabeledStatement(a,s,$0,h):this.parseExpressionStatement(a,$0)}},g0.parseBreakContinueStatement=function(h,m){var y=m==="break";this.next(),this.eat(X.semi)||this.insertSemicolon()?h.label=null:this.type!==X.name?this.unexpected():(h.label=this.parseIdent(),this.semicolon());for(var W=0;W<this.labels.length;++W){var J=this.labels[W];if(h.label==null||J.name===h.label.name){if(J.kind!=null&&(y||J.kind==="loop"))break;if(h.label&&y)break}}return W===this.labels.length&&this.raise(h.start,"Unsyntactic "+m),this.finishNode(h,y?"BreakStatement":"ContinueStatement")},g0.parseDebuggerStatement=function(h){return this.next(),this.semicolon(),this.finishNode(h,"DebuggerStatement")},g0.parseDoStatement=function(h){return this.next(),this.labels.push(Qn),h.body=this.parseStatement("do"),this.labels.pop(),this.expect(X._while),h.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(X.semi):this.semicolon(),this.finishNode(h,"DoWhileStatement")},g0.parseForStatement=function(h){this.next();var m=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Qn),this.enterScope(0),this.expect(X.parenL),this.type===X.semi)return m>-1&&this.unexpected(m),this.parseFor(h,null);var y=this.isLet();if(this.type===X._var||this.type===X._const||y){var W=this.startNode(),J=y?"let":this.value;return this.next(),this.parseVar(W,!0,J),this.finishNode(W,"VariableDeclaration"),this.parseForAfterInit(h,W,m)}var a=this.isContextual("let"),F=!1,T=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(T){var D=this.startNode();return this.next(),T==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(D,!0,T),this.finishNode(D,"VariableDeclaration"),this.parseForAfterInit(h,D,m)}var i0=this.containsEsc,s=new Ff,$0=this.start,v0=m>-1?this.parseExprSubscripts(s,"await"):this.parseExpression(!0,s);return this.type===X._in||(F=this.options.ecmaVersion>=6&&this.isContextual("of"))?(m>-1?(this.type===X._in&&this.unexpected(m),h.await=!0):F&&this.options.ecmaVersion>=8&&(v0.start!==$0||i0||v0.type!=="Identifier"||v0.name!=="async"?this.options.ecmaVersion>=9&&(h.await=!1):this.unexpected()),a&&F&&this.raise(v0.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(v0,!1,s),this.checkLValPattern(v0),this.parseForIn(h,v0)):(this.checkExpressionErrors(s,!0),m>-1&&this.unexpected(m),this.parseFor(h,v0))},g0.parseForAfterInit=function(h,m,y){return(this.type===X._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&m.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===X._in?y>-1&&this.unexpected(y):h.await=y>-1),this.parseForIn(h,m)):(y>-1&&this.unexpected(y),this.parseFor(h,m))},g0.parseFunctionStatement=function(h,m,y){return this.next(),this.parseFunction(h,Nf|(y?0:rf),!1,m)},g0.parseIfStatement=function(h){return this.next(),h.test=this.parseParenExpression(),h.consequent=this.parseStatement("if"),h.alternate=this.eat(X._else)?this.parseStatement("if"):null,this.finishNode(h,"IfStatement")},g0.parseReturnStatement=function(h){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(X.semi)||this.insertSemicolon()?h.argument=null:(h.argument=this.parseExpression(),this.semicolon()),this.finishNode(h,"ReturnStatement")},g0.parseSwitchStatement=function(h){var m;this.next(),h.discriminant=this.parseParenExpression(),h.cases=[],this.expect(X.braceL),this.labels.push(J5),this.enterScope(1024);for(var y=!1;this.type!==X.braceR;)if(this.type===X._case||this.type===X._default){var W=this.type===X._case;m&&this.finishNode(m,"SwitchCase"),h.cases.push(m=this.startNode()),m.consequent=[],this.next(),W?m.test=this.parseExpression():(y&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),y=!0,m.test=null),this.expect(X.colon)}else m||this.unexpected(),m.consequent.push(this.parseStatement(null));return this.exitScope(),m&&this.finishNode(m,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(h,"SwitchStatement")},g0.parseThrowStatement=function(h){return this.next(),P.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),h.argument=this.parseExpression(),this.semicolon(),this.finishNode(h,"ThrowStatement")};var ct=[];g0.parseCatchClauseParam=function(){var h=this.parseBindingAtom(),m=h.type==="Identifier";return this.enterScope(m?32:0),this.checkLValPattern(h,m?4:2),this.expect(X.parenR),h},g0.parseTryStatement=function(h){if(this.next(),h.block=this.parseBlock(),h.handler=null,this.type===X._catch){var m=this.startNode();this.next(),this.eat(X.parenL)?m.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),m.param=null,this.enterScope(0)),m.body=this.parseBlock(!1),this.exitScope(),h.handler=this.finishNode(m,"CatchClause")}return h.finalizer=this.eat(X._finally)?this.parseBlock():null,h.handler||h.finalizer||this.raise(h.start,"Missing catch or finally clause"),this.finishNode(h,"TryStatement")},g0.parseVarStatement=function(h,m,y){return this.next(),this.parseVar(h,!1,m,y),this.semicolon(),this.finishNode(h,"VariableDeclaration")},g0.parseWhileStatement=function(h){return this.next(),h.test=this.parseParenExpression(),this.labels.push(Qn),h.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(h,"WhileStatement")},g0.parseWithStatement=function(h){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),h.object=this.parseParenExpression(),h.body=this.parseStatement("with"),this.finishNode(h,"WithStatement")},g0.parseEmptyStatement=function(h){return this.next(),this.finishNode(h,"EmptyStatement")},g0.parseLabeledStatement=function(h,m,y,W){for(var J=0,a=this.labels;J<a.length;J+=1)a[J].name===m&&this.raise(y.start,"Label '"+m+"' is already declared");for(var F=this.type.isLoop?"loop":this.type===X._switch?"switch":null,T=this.labels.length-1;T>=0;T--){var D=this.labels[T];if(D.statementStart!==h.start)break;D.statementStart=this.start,D.kind=F}return this.labels.push({name:m,kind:F,statementStart:this.start}),h.body=this.parseStatement(W?W.indexOf("label")===-1?W+"label":W:"label"),this.labels.pop(),h.label=y,this.finishNode(h,"LabeledStatement")},g0.parseExpressionStatement=function(h,m){return h.expression=m,this.semicolon(),this.finishNode(h,"ExpressionStatement")},g0.parseBlock=function(h,m,y){for(h===void 0&&(h=!0),m===void 0&&(m=this.startNode()),m.body=[],this.expect(X.braceL),h&&this.enterScope(0);this.type!==X.braceR;){var W=this.parseStatement(null);m.body.push(W)}return y&&(this.strict=!1),this.next(),h&&this.exitScope(),this.finishNode(m,"BlockStatement")},g0.parseFor=function(h,m){return h.init=m,this.expect(X.semi),h.test=this.type===X.semi?null:this.parseExpression(),this.expect(X.semi),h.update=this.type===X.parenR?null:this.parseExpression(),this.expect(X.parenR),h.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(h,"ForStatement")},g0.parseForIn=function(h,m){var y=this.type===X._in;return this.next(),m.type==="VariableDeclaration"&&m.declarations[0].init!=null&&(!y||this.options.ecmaVersion<8||this.strict||m.kind!=="var"||m.declarations[0].id.type!=="Identifier")&&this.raise(m.start,(y?"for-in":"for-of")+" loop variable declaration may not have an initializer"),h.left=m,h.right=y?this.parseExpression():this.parseMaybeAssign(),this.expect(X.parenR),h.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(h,y?"ForInStatement":"ForOfStatement")},g0.parseVar=function(h,m,y,W){for(h.declarations=[],h.kind=y;;){var J=this.startNode();if(this.parseVarId(J,y),this.eat(X.eq)?J.init=this.parseMaybeAssign(m):W||y!=="const"||this.type===X._in||this.options.ecmaVersion>=6&&this.isContextual("of")?W||y!=="using"&&y!=="await using"||!(this.options.ecmaVersion>=17)||this.type===X._in||this.isContextual("of")?W||J.id.type==="Identifier"||m&&(this.type===X._in||this.isContextual("of"))?J.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+y+" declaration"):this.unexpected(),h.declarations.push(this.finishNode(J,"VariableDeclarator")),!this.eat(X.comma))break}return h},g0.parseVarId=function(h,m){h.id=m==="using"||m==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(h.id,m==="var"?1:2,!1)};var Nf=1,rf=2;function At(h,m){var y=m.key.name,W=h[y],J="true";return m.type!=="MethodDefinition"||m.kind!=="get"&&m.kind!=="set"||(J=(m.static?"s":"i")+m.kind),W==="iget"&&J==="iset"||W==="iset"&&J==="iget"||W==="sget"&&J==="sset"||W==="sset"&&J==="sget"?(h[y]="true",!1):!!W||(h[y]=J,!1)}function ff(h,m){var{computed:y,key:W}=h;return!y&&(W.type==="Identifier"&&W.name===m||W.type==="Literal"&&W.value===m)}g0.parseFunction=function(h,m,y,W,J){this.initFunction(h),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!W)&&(this.type===X.star&&m&rf&&this.unexpected(),h.generator=this.eat(X.star)),this.options.ecmaVersion>=8&&(h.async=!!W),m&Nf&&(h.id=4&m&&this.type!==X.name?null:this.parseIdent(),!h.id||m&rf||this.checkLValSimple(h.id,this.strict||h.generator||h.async?this.treatFunctionsAsVar?1:2:3));var a=this.yieldPos,F=this.awaitPos,T=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Sl(h.async,h.generator)),m&Nf||(h.id=this.type===X.name?this.parseIdent():null),this.parseFunctionParams(h),this.parseFunctionBody(h,y,!1,J),this.yieldPos=a,this.awaitPos=F,this.awaitIdentPos=T,this.finishNode(h,m&Nf?"FunctionDeclaration":"FunctionExpression")},g0.parseFunctionParams=function(h){this.expect(X.parenL),h.params=this.parseBindingList(X.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},g0.parseClass=function(h,m){this.next();var y=this.strict;this.strict=!0,this.parseClassId(h,m),this.parseClassSuper(h);var W=this.enterClassBody(),J=this.startNode(),a=!1;for(J.body=[],this.expect(X.braceL);this.type!==X.braceR;){var F=this.parseClassElement(h.superClass!==null);F&&(J.body.push(F),F.type==="MethodDefinition"&&F.kind==="constructor"?(a&&this.raiseRecoverable(F.start,"Duplicate constructor in the same class"),a=!0):F.key&&F.key.type==="PrivateIdentifier"&&At(W,F)&&this.raiseRecoverable(F.key.start,"Identifier '#"+F.key.name+"' has already been declared"))}return this.strict=y,this.next(),h.body=this.finishNode(J,"ClassBody"),this.exitClassBody(),this.finishNode(h,m?"ClassDeclaration":"ClassExpression")},g0.parseClassElement=function(h){if(this.eat(X.semi))return null;var m=this.options.ecmaVersion,y=this.startNode(),W="",J=!1,a=!1,F="method",T=!1;if(this.eatContextual("static")){if(m>=13&&this.eat(X.braceL))return this.parseClassStaticBlock(y),y;this.isClassElementNameStart()||this.type===X.star?T=!0:W="static"}if(y.static=T,!W&&m>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==X.star||this.canInsertSemicolon()?W="async":a=!0),!W&&(m>=9||!a)&&this.eat(X.star)&&(J=!0),!W&&!a&&!J){var D=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?F=D:W=D)}if(W?(y.computed=!1,y.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),y.key.name=W,this.finishNode(y.key,"Identifier")):this.parseClassElementName(y),m<13||this.type===X.parenL||F!=="method"||J||a){var i0=!y.static&&ff(y,"constructor"),s=i0&&h;i0&&F!=="method"&&this.raise(y.key.start,"Constructor can't have get/set modifier"),y.kind=i0?"constructor":F,this.parseClassMethod(y,J,a,s)}else this.parseClassField(y);return y},g0.isClassElementNameStart=function(){return this.type===X.name||this.type===X.privateId||this.type===X.num||this.type===X.string||this.type===X.bracketL||this.type.keyword},g0.parseClassElementName=function(h){this.type===X.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),h.computed=!1,h.key=this.parsePrivateIdent()):this.parsePropertyName(h)},g0.parseClassMethod=function(h,m,y,W){var J=h.key;h.kind==="constructor"?(m&&this.raise(J.start,"Constructor can't be a generator"),y&&this.raise(J.start,"Constructor can't be an async method")):h.static&&ff(h,"prototype")&&this.raise(J.start,"Classes may not have a static property named prototype");var a=h.value=this.parseMethod(m,y,W);return h.kind==="get"&&a.params.length!==0&&this.raiseRecoverable(a.start,"getter should have no params"),h.kind==="set"&&a.params.length!==1&&this.raiseRecoverable(a.start,"setter should have exactly one param"),h.kind==="set"&&a.params[0].type==="RestElement"&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(h,"MethodDefinition")},g0.parseClassField=function(h){return ff(h,"constructor")?this.raise(h.key.start,"Classes can't have a field named 'constructor'"):h.static&&ff(h,"prototype")&&this.raise(h.key.start,"Classes can't have a static field named 'prototype'"),this.eat(X.eq)?(this.enterScope(576),h.value=this.parseMaybeAssign(),this.exitScope()):h.value=null,this.semicolon(),this.finishNode(h,"PropertyDefinition")},g0.parseClassStaticBlock=function(h){h.body=[];var m=this.labels;for(this.labels=[],this.enterScope(320);this.type!==X.braceR;){var y=this.parseStatement(null);h.body.push(y)}return this.next(),this.exitScope(),this.labels=m,this.finishNode(h,"StaticBlock")},g0.parseClassId=function(h,m){this.type===X.name?(h.id=this.parseIdent(),m&&this.checkLValSimple(h.id,2,!1)):(m===!0&&this.unexpected(),h.id=null)},g0.parseClassSuper=function(h){h.superClass=this.eat(X._extends)?this.parseExprSubscripts(null,!1):null},g0.enterClassBody=function(){var h={declared:Object.create(null),used:[]};return this.privateNameStack.push(h),h.declared},g0.exitClassBody=function(){var h=this.privateNameStack.pop(),m=h.declared,y=h.used;if(this.options.checkPrivateFields)for(var W=this.privateNameStack.length,J=W===0?null:this.privateNameStack[W-1],a=0;a<y.length;++a){var F=y[a];Q(m,F.name)||(J?J.used.push(F):this.raiseRecoverable(F.start,"Private field '#"+F.name+"' must be declared in an enclosing class"))}},g0.parseExportAllDeclaration=function(h,m){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(h.exported=this.parseModuleExportName(),this.checkExport(m,h.exported,this.lastTokStart)):h.exported=null),this.expectContextual("from"),this.type!==X.string&&this.unexpected(),h.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(h.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(h,"ExportAllDeclaration")},g0.parseExport=function(h,m){if(this.next(),this.eat(X.star))return this.parseExportAllDeclaration(h,m);if(this.eat(X._default))return this.checkExport(m,"default",this.lastTokStart),h.declaration=this.parseExportDefaultDeclaration(),this.finishNode(h,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())h.declaration=this.parseExportDeclaration(h),h.declaration.type==="VariableDeclaration"?this.checkVariableExport(m,h.declaration.declarations):this.checkExport(m,h.declaration.id,h.declaration.id.start),h.specifiers=[],h.source=null,this.options.ecmaVersion>=16&&(h.attributes=[]);else{if(h.declaration=null,h.specifiers=this.parseExportSpecifiers(m),this.eatContextual("from"))this.type!==X.string&&this.unexpected(),h.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(h.attributes=this.parseWithClause());else{for(var y=0,W=h.specifiers;y<W.length;y+=1){var J=W[y];this.checkUnreserved(J.local),this.checkLocalExport(J.local),J.local.type==="Literal"&&this.raise(J.local.start,"A string literal cannot be used as an exported binding without `from`.")}h.source=null,this.options.ecmaVersion>=16&&(h.attributes=[])}this.semicolon()}return this.finishNode(h,"ExportNamedDeclaration")},g0.parseExportDeclaration=function(h){return this.parseStatement(null)},g0.parseExportDefaultDeclaration=function(){var h;if(this.type===X._function||(h=this.isAsyncFunction())){var m=this.startNode();return this.next(),h&&this.next(),this.parseFunction(m,4|Nf,!1,h)}if(this.type===X._class){var y=this.startNode();return this.parseClass(y,"nullableID")}var W=this.parseMaybeAssign();return this.semicolon(),W},g0.checkExport=function(h,m,y){h&&(typeof m!="string"&&(m=m.type==="Identifier"?m.name:m.value),Q(h,m)&&this.raiseRecoverable(y,"Duplicate export '"+m+"'"),h[m]=!0)},g0.checkPatternExport=function(h,m){var y=m.type;if(y==="Identifier")this.checkExport(h,m,m.start);else if(y==="ObjectPattern")for(var W=0,J=m.properties;W<J.length;W+=1){var a=J[W];this.checkPatternExport(h,a)}else if(y==="ArrayPattern")for(var F=0,T=m.elements;F<T.length;F+=1){var D=T[F];D&&this.checkPatternExport(h,D)}else y==="Property"?this.checkPatternExport(h,m.value):y==="AssignmentPattern"?this.checkPatternExport(h,m.left):y==="RestElement"&&this.checkPatternExport(h,m.argument)},g0.checkVariableExport=function(h,m){if(h)for(var y=0,W=m;y<W.length;y+=1){var J=W[y];this.checkPatternExport(h,J.id)}},g0.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},g0.parseExportSpecifier=function(h){var m=this.startNode();return m.local=this.parseModuleExportName(),m.exported=this.eatContextual("as")?this.parseModuleExportName():m.local,this.checkExport(h,m.exported,m.exported.start),this.finishNode(m,"ExportSpecifier")},g0.parseExportSpecifiers=function(h){var m=[],y=!0;for(this.expect(X.braceL);!this.eat(X.braceR);){if(y)y=!1;else if(this.expect(X.comma),this.afterTrailingComma(X.braceR))break;m.push(this.parseExportSpecifier(h))}return m},g0.parseImport=function(h){return this.next(),this.type===X.string?(h.specifiers=ct,h.source=this.parseExprAtom()):(h.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),h.source=this.type===X.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(h.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(h,"ImportDeclaration")},g0.parseImportSpecifier=function(){var h=this.startNode();return h.imported=this.parseModuleExportName(),this.eatContextual("as")?h.local=this.parseIdent():(this.checkUnreserved(h.imported),h.local=h.imported),this.checkLValSimple(h.local,2),this.finishNode(h,"ImportSpecifier")},g0.parseImportDefaultSpecifier=function(){var h=this.startNode();return h.local=this.parseIdent(),this.checkLValSimple(h.local,2),this.finishNode(h,"ImportDefaultSpecifier")},g0.parseImportNamespaceSpecifier=function(){var h=this.startNode();return this.next(),this.expectContextual("as"),h.local=this.parseIdent(),this.checkLValSimple(h.local,2),this.finishNode(h,"ImportNamespaceSpecifier")},g0.parseImportSpecifiers=function(){var h=[],m=!0;if(this.type===X.name&&(h.push(this.parseImportDefaultSpecifier()),!this.eat(X.comma)))return h;if(this.type===X.star)return h.push(this.parseImportNamespaceSpecifier()),h;for(this.expect(X.braceL);!this.eat(X.braceR);){if(m)m=!1;else if(this.expect(X.comma),this.afterTrailingComma(X.braceR))break;h.push(this.parseImportSpecifier())}return h},g0.parseWithClause=function(){var h=[];if(!this.eat(X._with))return h;this.expect(X.braceL);for(var m={},y=!0;!this.eat(X.braceR);){if(y)y=!1;else if(this.expect(X.comma),this.afterTrailingComma(X.braceR))break;var W=this.parseImportAttribute(),J=W.key.type==="Identifier"?W.key.name:W.key.value;Q(m,J)&&this.raiseRecoverable(W.key.start,"Duplicate attribute key '"+J+"'"),m[J]=!0,h.push(W)}return h},g0.parseImportAttribute=function(){var h=this.startNode();return h.key=this.type===X.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(X.colon),this.type!==X.string&&this.unexpected(),h.value=this.parseExprAtom(),this.finishNode(h,"ImportAttribute")},g0.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===X.string){var h=this.parseLiteral(this.value);return e.test(h.value)&&this.raise(h.start,"An export name cannot include a lone surrogate."),h}return this.parseIdent(!0)},g0.adaptDirectivePrologue=function(h){for(var m=0;m<h.length&&this.isDirectiveCandidate(h[m]);++m)h[m].directive=h[m].expression.raw.slice(1,-1)},g0.isDirectiveCandidate=function(h){return this.options.ecmaVersion>=5&&h.type==="ExpressionStatement"&&h.expression.type==="Literal"&&typeof h.expression.value=="string"&&(this.input[h.start]==='"'||this.input[h.start]==="'")};var br=e0.prototype;br.toAssignable=function(h,m,y){if(this.options.ecmaVersion>=6&&h)switch(h.type){case"Identifier":this.inAsync&&h.name==="await"&&this.raise(h.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":h.type="ObjectPattern",y&&this.checkPatternErrors(y,!0);for(var W=0,J=h.properties;W<J.length;W+=1){var a=J[W];this.toAssignable(a,m),a.type!=="RestElement"||a.argument.type!=="ArrayPattern"&&a.argument.type!=="ObjectPattern"||this.raise(a.argument.start,"Unexpected token")}break;case"Property":h.kind!=="init"&&this.raise(h.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(h.value,m);break;case"ArrayExpression":h.type="ArrayPattern",y&&this.checkPatternErrors(y,!0),this.toAssignableList(h.elements,m);break;case"SpreadElement":h.type="RestElement",this.toAssignable(h.argument,m),h.argument.type==="AssignmentPattern"&&this.raise(h.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":h.operator!=="="&&this.raise(h.left.end,"Only '=' operator can be used for specifying default value."),h.type="AssignmentPattern",delete h.operator,this.toAssignable(h.left,m);break;case"ParenthesizedExpression":this.toAssignable(h.expression,m,y);break;case"ChainExpression":this.raiseRecoverable(h.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!m)break;default:this.raise(h.start,"Assigning to rvalue")}else y&&this.checkPatternErrors(y,!0);return h},br.toAssignableList=function(h,m){for(var y=h.length,W=0;W<y;W++){var J=h[W];J&&this.toAssignable(J,m)}if(y){var a=h[y-1];this.options.ecmaVersion===6&&m&&a&&a.type==="RestElement"&&a.argument.type!=="Identifier"&&this.unexpected(a.argument.start)}return h},br.parseSpread=function(h){var m=this.startNode();return this.next(),m.argument=this.parseMaybeAssign(!1,h),this.finishNode(m,"SpreadElement")},br.parseRestBinding=function(){var h=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==X.name&&this.unexpected(),h.argument=this.parseBindingAtom(),this.finishNode(h,"RestElement")},br.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case X.bracketL:var h=this.startNode();return this.next(),h.elements=this.parseBindingList(X.bracketR,!0,!0),this.finishNode(h,"ArrayPattern");case X.braceL:return this.parseObj(!0)}return this.parseIdent()},br.parseBindingList=function(h,m,y,W){for(var J=[],a=!0;!this.eat(h);)if(a?a=!1:this.expect(X.comma),m&&this.type===X.comma)J.push(null);else{if(y&&this.afterTrailingComma(h))break;if(this.type===X.ellipsis){var F=this.parseRestBinding();this.parseBindingListItem(F),J.push(F),this.type===X.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(h);break}J.push(this.parseAssignableListItem(W))}return J},br.parseAssignableListItem=function(h){var m=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(m),m},br.parseBindingListItem=function(h){return h},br.parseMaybeDefault=function(h,m,y){if(y=y||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(X.eq))return y;var W=this.startNodeAt(h,m);return W.left=y,W.right=this.parseMaybeAssign(),this.finishNode(W,"AssignmentPattern")},br.checkLValSimple=function(h,m,y){m===void 0&&(m=0);var W=m!==0;switch(h.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(h.name)&&this.raiseRecoverable(h.start,(W?"Binding ":"Assigning to ")+h.name+" in strict mode"),W&&(m===2&&h.name==="let"&&this.raiseRecoverable(h.start,"let is disallowed as a lexically bound name"),y&&(Q(y,h.name)&&this.raiseRecoverable(h.start,"Argument name clash"),y[h.name]=!0),m!==5&&this.declareName(h.name,m,h.start));break;case"ChainExpression":this.raiseRecoverable(h.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":W&&this.raiseRecoverable(h.start,"Binding member expression");break;case"ParenthesizedExpression":return W&&this.raiseRecoverable(h.start,"Binding parenthesized expression"),this.checkLValSimple(h.expression,m,y);default:this.raise(h.start,(W?"Binding":"Assigning to")+" rvalue")}},br.checkLValPattern=function(h,m,y){switch(m===void 0&&(m=0),h.type){case"ObjectPattern":for(var W=0,J=h.properties;W<J.length;W+=1){var a=J[W];this.checkLValInnerPattern(a,m,y)}break;case"ArrayPattern":for(var F=0,T=h.elements;F<T.length;F+=1){var D=T[F];D&&this.checkLValInnerPattern(D,m,y)}break;default:this.checkLValSimple(h,m,y)}},br.checkLValInnerPattern=function(h,m,y){switch(m===void 0&&(m=0),h.type){case"Property":this.checkLValInnerPattern(h.value,m,y);break;case"AssignmentPattern":this.checkLValPattern(h.left,m,y);break;case"RestElement":this.checkLValPattern(h.argument,m,y);break;default:this.checkLValPattern(h,m,y)}};var Zr=function(h,m,y,W,J){this.token=h,this.isExpr=!!m,this.preserveSpace=!!y,this.override=W,this.generator=!!J},Wl={b_stat:new Zr("{",!1),b_expr:new Zr("{",!0),b_tmpl:new Zr("${",!1),p_stat:new Zr("(",!1),p_expr:new Zr("(",!0),q_tmpl:new Zr("`",!0,!0,function(h){return h.tryReadTemplateToken()}),f_stat:new Zr("function",!1),f_expr:new Zr("function",!0),f_expr_gen:new Zr("function",!0,!1,null,!0),f_gen:new Zr("function",!1,!1,null,!0)},J1=e0.prototype;J1.initialContext=function(){return[Wl.b_stat]},J1.curContext=function(){return this.context[this.context.length-1]},J1.braceIsBlock=function(h){var m=this.curContext();return m===Wl.f_expr||m===Wl.f_stat||(h!==X.colon||m!==Wl.b_stat&&m!==Wl.b_expr?h===X._return||h===X.name&&this.exprAllowed?P.test(this.input.slice(this.lastTokEnd,this.start)):h===X._else||h===X.semi||h===X.eof||h===X.parenR||h===X.arrow||(h===X.braceL?m===Wl.b_stat:h!==X._var&&h!==X._const&&h!==X.name&&!this.exprAllowed):!m.isExpr)},J1.inGeneratorContext=function(){for(var h=this.context.length-1;h>=1;h--){var m=this.context[h];if(m.token==="function")return m.generator}return!1},J1.updateContext=function(h){var m,y=this.type;y.keyword&&h===X.dot?this.exprAllowed=!1:(m=y.updateContext)?m.call(this,h):this.exprAllowed=y.beforeExpr},J1.overrideContext=function(h){this.curContext()!==h&&(this.context[this.context.length-1]=h)},X.parenR.updateContext=X.braceR.updateContext=function(){if(this.context.length!==1){var h=this.context.pop();h===Wl.b_stat&&this.curContext().token==="function"&&(h=this.context.pop()),this.exprAllowed=!h.isExpr}else this.exprAllowed=!0},X.braceL.updateContext=function(h){this.context.push(this.braceIsBlock(h)?Wl.b_stat:Wl.b_expr),this.exprAllowed=!0},X.dollarBraceL.updateContext=function(){this.context.push(Wl.b_tmpl),this.exprAllowed=!0},X.parenL.updateContext=function(h){var m=h===X._if||h===X._for||h===X._with||h===X._while;this.context.push(m?Wl.p_stat:Wl.p_expr),this.exprAllowed=!0},X.incDec.updateContext=function(){},X._function.updateContext=X._class.updateContext=function(h){!h.beforeExpr||h===X._else||h===X.semi&&this.curContext()!==Wl.p_stat||h===X._return&&P.test(this.input.slice(this.lastTokEnd,this.start))||(h===X.colon||h===X.braceL)&&this.curContext()===Wl.b_stat?this.context.push(Wl.f_stat):this.context.push(Wl.f_expr),this.exprAllowed=!1},X.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},X.backQuote.updateContext=function(){this.curContext()===Wl.q_tmpl?this.context.pop():this.context.push(Wl.q_tmpl),this.exprAllowed=!1},X.star.updateContext=function(h){if(h===X._function){var m=this.context.length-1;this.context[m]===Wl.f_expr?this.context[m]=Wl.f_expr_gen:this.context[m]=Wl.f_gen}this.exprAllowed=!0},X.name.updateContext=function(h){var m=!1;this.options.ecmaVersion>=6&&h!==X.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(m=!0),this.exprAllowed=m};var G0=e0.prototype;function Kt(h){return h.type==="Identifier"||h.type==="ParenthesizedExpression"&&Kt(h.expression)}function Bn(h){return h.type==="MemberExpression"&&h.property.type==="PrivateIdentifier"||h.type==="ChainExpression"&&Bn(h.expression)||h.type==="ParenthesizedExpression"&&Bn(h.expression)}G0.checkPropClash=function(h,m,y){if(!(this.options.ecmaVersion>=9&&h.type==="SpreadElement"||this.options.ecmaVersion>=6&&(h.computed||h.method||h.shorthand))){var W,J=h.key;switch(J.type){case"Identifier":W=J.name;break;case"Literal":W=String(J.value);break;default:return}var a=h.kind;if(this.options.ecmaVersion>=6)W==="__proto__"&&a==="init"&&(m.proto&&(y?y.doubleProto<0&&(y.doubleProto=J.start):this.raiseRecoverable(J.start,"Redefinition of __proto__ property")),m.proto=!0);else{var F=m[W="$"+W];if(F)(a==="init"?this.strict&&F.init||F.get||F.set:F.init||F[a])&&this.raiseRecoverable(J.start,"Redefinition of property");else F=m[W]={init:!1,get:!1,set:!1};F[a]=!0}}},G0.parseExpression=function(h,m){var y=this.start,W=this.startLoc,J=this.parseMaybeAssign(h,m);if(this.type===X.comma){var a=this.startNodeAt(y,W);for(a.expressions=[J];this.eat(X.comma);)a.expressions.push(this.parseMaybeAssign(h,m));return this.finishNode(a,"SequenceExpression")}return J},G0.parseMaybeAssign=function(h,m,y){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(h);this.exprAllowed=!1}var W=!1,J=-1,a=-1,F=-1;m?(J=m.parenthesizedAssign,a=m.trailingComma,F=m.doubleProto,m.parenthesizedAssign=m.trailingComma=-1):(m=new Ff,W=!0);var T=this.start,D=this.startLoc;this.type!==X.parenL&&this.type!==X.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=h==="await");var i0=this.parseMaybeConditional(h,m);if(y&&(i0=y.call(this,i0,T,D)),this.type.isAssign){var s=this.startNodeAt(T,D);return s.operator=this.value,this.type===X.eq&&(i0=this.toAssignable(i0,!1,m)),W||(m.parenthesizedAssign=m.trailingComma=m.doubleProto=-1),m.shorthandAssign>=i0.start&&(m.shorthandAssign=-1),this.type===X.eq?this.checkLValPattern(i0):this.checkLValSimple(i0),s.left=i0,this.next(),s.right=this.parseMaybeAssign(h),F>-1&&(m.doubleProto=F),this.finishNode(s,"AssignmentExpression")}return W&&this.checkExpressionErrors(m,!0),J>-1&&(m.parenthesizedAssign=J),a>-1&&(m.trailingComma=a),i0},G0.parseMaybeConditional=function(h,m){var y=this.start,W=this.startLoc,J=this.parseExprOps(h,m);if(this.checkExpressionErrors(m))return J;if(this.eat(X.question)){var a=this.startNodeAt(y,W);return a.test=J,a.consequent=this.parseMaybeAssign(),this.expect(X.colon),a.alternate=this.parseMaybeAssign(h),this.finishNode(a,"ConditionalExpression")}return J},G0.parseExprOps=function(h,m){var y=this.start,W=this.startLoc,J=this.parseMaybeUnary(m,!1,!1,h);return this.checkExpressionErrors(m)||J.start===y&&J.type==="ArrowFunctionExpression"?J:this.parseExprOp(J,y,W,-1,h)},G0.parseExprOp=function(h,m,y,W,J){var a=this.type.binop;if(a!=null&&(!J||this.type!==X._in)&&a>W){var F=this.type===X.logicalOR||this.type===X.logicalAND,T=this.type===X.coalesce;T&&(a=X.logicalAND.binop);var D=this.value;this.next();var i0=this.start,s=this.startLoc,$0=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,J),i0,s,a,J),v0=this.buildBinary(m,y,h,$0,D,F||T);return(F&&this.type===X.coalesce||T&&(this.type===X.logicalOR||this.type===X.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(v0,m,y,W,J)}return h},G0.buildBinary=function(h,m,y,W,J,a){W.type==="PrivateIdentifier"&&this.raise(W.start,"Private identifier can only be left side of binary expression");var F=this.startNodeAt(h,m);return F.left=y,F.operator=J,F.right=W,this.finishNode(F,a?"LogicalExpression":"BinaryExpression")},G0.parseMaybeUnary=function(h,m,y,W){var J,a=this.start,F=this.startLoc;if(this.isContextual("await")&&this.canAwait)J=this.parseAwait(W),m=!0;else if(this.type.prefix){var T=this.startNode(),D=this.type===X.incDec;T.operator=this.value,T.prefix=!0,this.next(),T.argument=this.parseMaybeUnary(null,!0,D,W),this.checkExpressionErrors(h,!0),D?this.checkLValSimple(T.argument):this.strict&&T.operator==="delete"&&Kt(T.argument)?this.raiseRecoverable(T.start,"Deleting local variable in strict mode"):T.operator==="delete"&&Bn(T.argument)?this.raiseRecoverable(T.start,"Private fields can not be deleted"):m=!0,J=this.finishNode(T,D?"UpdateExpression":"UnaryExpression")}else if(m||this.type!==X.privateId){if(J=this.parseExprSubscripts(h,W),this.checkExpressionErrors(h))return J;for(;this.type.postfix&&!this.canInsertSemicolon();){var i0=this.startNodeAt(a,F);i0.operator=this.value,i0.prefix=!1,i0.argument=J,this.checkLValSimple(J),this.next(),J=this.finishNode(i0,"UpdateExpression")}}else(W||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),J=this.parsePrivateIdent(),this.type!==X._in&&this.unexpected();return y||!this.eat(X.starstar)?J:m?void this.unexpected(this.lastTokStart):this.buildBinary(a,F,J,this.parseMaybeUnary(null,!1,!1,W),"**",!1)},G0.parseExprSubscripts=function(h,m){var y=this.start,W=this.startLoc,J=this.parseExprAtom(h,m);if(J.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return J;var a=this.parseSubscripts(J,y,W,!1,m);return h&&a.type==="MemberExpression"&&(h.parenthesizedAssign>=a.start&&(h.parenthesizedAssign=-1),h.parenthesizedBind>=a.start&&(h.parenthesizedBind=-1),h.trailingComma>=a.start&&(h.trailingComma=-1)),a},G0.parseSubscripts=function(h,m,y,W,J){for(var a=this.options.ecmaVersion>=8&&h.type==="Identifier"&&h.name==="async"&&this.lastTokEnd===h.end&&!this.canInsertSemicolon()&&h.end-h.start===5&&this.potentialArrowAt===h.start,F=!1;;){var T=this.parseSubscript(h,m,y,W,a,F,J);if(T.optional&&(F=!0),T===h||T.type==="ArrowFunctionExpression"){if(F){var D=this.startNodeAt(m,y);D.expression=T,T=this.finishNode(D,"ChainExpression")}return T}h=T}},G0.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(X.arrow)},G0.parseSubscriptAsyncArrow=function(h,m,y,W){return this.parseArrowExpression(this.startNodeAt(h,m),y,!0,W)},G0.parseSubscript=function(h,m,y,W,J,a,F){var T=this.options.ecmaVersion>=11,D=T&&this.eat(X.questionDot);W&&D&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var i0=this.eat(X.bracketL);if(i0||D&&this.type!==X.parenL&&this.type!==X.backQuote||this.eat(X.dot)){var s=this.startNodeAt(m,y);s.object=h,i0?(s.property=this.parseExpression(),this.expect(X.bracketR)):this.type===X.privateId&&h.type!=="Super"?s.property=this.parsePrivateIdent():s.property=this.parseIdent(this.options.allowReserved!=="never"),s.computed=!!i0,T&&(s.optional=D),h=this.finishNode(s,"MemberExpression")}else if(!W&&this.eat(X.parenL)){var $0=new Ff,v0=this.yieldPos,Y0=this.awaitPos,fl=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var Il=this.parseExprList(X.parenR,this.options.ecmaVersion>=8,!1,$0);if(J&&!D&&this.shouldParseAsyncArrow())return this.checkPatternErrors($0,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=v0,this.awaitPos=Y0,this.awaitIdentPos=fl,this.parseSubscriptAsyncArrow(m,y,Il,F);this.checkExpressionErrors($0,!0),this.yieldPos=v0||this.yieldPos,this.awaitPos=Y0||this.awaitPos,this.awaitIdentPos=fl||this.awaitIdentPos;var L0=this.startNodeAt(m,y);L0.callee=h,L0.arguments=Il,T&&(L0.optional=D),h=this.finishNode(L0,"CallExpression")}else if(this.type===X.backQuote){(D||a)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var il=this.startNodeAt(m,y);il.tag=h,il.quasi=this.parseTemplate({isTagged:!0}),h=this.finishNode(il,"TaggedTemplateExpression")}return h},G0.parseExprAtom=function(h,m,y){this.type===X.slash&&this.readRegexp();var W,J=this.potentialArrowAt===this.start;switch(this.type){case X._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),W=this.startNode(),this.next(),this.type!==X.parenL||this.allowDirectSuper||this.raise(W.start,"super() call outside constructor of a subclass"),this.type!==X.dot&&this.type!==X.bracketL&&this.type!==X.parenL&&this.unexpected(),this.finishNode(W,"Super");case X._this:return W=this.startNode(),this.next(),this.finishNode(W,"ThisExpression");case X.name:var a=this.start,F=this.startLoc,T=this.containsEsc,D=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!T&&D.name==="async"&&!this.canInsertSemicolon()&&this.eat(X._function))return this.overrideContext(Wl.f_expr),this.parseFunction(this.startNodeAt(a,F),0,!1,!0,m);if(J&&!this.canInsertSemicolon()){if(this.eat(X.arrow))return this.parseArrowExpression(this.startNodeAt(a,F),[D],!1,m);if(this.options.ecmaVersion>=8&&D.name==="async"&&this.type===X.name&&!T&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return D=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(X.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,F),[D],!0,m)}return D;case X.regexp:var i0=this.value;return(W=this.parseLiteral(i0.value)).regex={pattern:i0.pattern,flags:i0.flags},W;case X.num:case X.string:return this.parseLiteral(this.value);case X._null:case X._true:case X._false:return(W=this.startNode()).value=this.type===X._null?null:this.type===X._true,W.raw=this.type.keyword,this.next(),this.finishNode(W,"Literal");case X.parenL:var s=this.start,$0=this.parseParenAndDistinguishExpression(J,m);return h&&(h.parenthesizedAssign<0&&!this.isSimpleAssignTarget($0)&&(h.parenthesizedAssign=s),h.parenthesizedBind<0&&(h.parenthesizedBind=s)),$0;case X.bracketL:return W=this.startNode(),this.next(),W.elements=this.parseExprList(X.bracketR,!0,!0,h),this.finishNode(W,"ArrayExpression");case X.braceL:return this.overrideContext(Wl.b_expr),this.parseObj(!1,h);case X._function:return W=this.startNode(),this.next(),this.parseFunction(W,0);case X._class:return this.parseClass(this.startNode(),!1);case X._new:return this.parseNew();case X.backQuote:return this.parseTemplate();case X._import:return this.options.ecmaVersion>=11?this.parseExprImport(y):this.unexpected();default:return this.parseExprAtomDefault()}},G0.parseExprAtomDefault=function(){this.unexpected()},G0.parseExprImport=function(h){var m=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===X.parenL&&!h)return this.parseDynamicImport(m);if(this.type===X.dot){var y=this.startNodeAt(m.start,m.loc&&m.loc.start);return y.name="import",m.meta=this.finishNode(y,"Identifier"),this.parseImportMeta(m)}this.unexpected()},G0.parseDynamicImport=function(h){if(this.next(),h.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(X.parenR)?h.options=null:(this.expect(X.comma),this.afterTrailingComma(X.parenR)?h.options=null:(h.options=this.parseMaybeAssign(),this.eat(X.parenR)||(this.expect(X.comma),this.afterTrailingComma(X.parenR)||this.unexpected())));else if(!this.eat(X.parenR)){var m=this.start;this.eat(X.comma)&&this.eat(X.parenR)?this.raiseRecoverable(m,"Trailing comma is not allowed in import()"):this.unexpected(m)}return this.finishNode(h,"ImportExpression")},G0.parseImportMeta=function(h){this.next();var m=this.containsEsc;return h.property=this.parseIdent(!0),h.property.name!=="meta"&&this.raiseRecoverable(h.property.start,"The only valid meta property for import is 'import.meta'"),m&&this.raiseRecoverable(h.start,"'import.meta' must not contain escaped characters"),this.options.sourceType==="module"||this.options.allowImportExportEverywhere||this.raiseRecoverable(h.start,"Cannot use 'import.meta' outside a module"),this.finishNode(h,"MetaProperty")},G0.parseLiteral=function(h){var m=this.startNode();return m.value=h,m.raw=this.input.slice(this.start,this.end),m.raw.charCodeAt(m.raw.length-1)===110&&(m.bigint=m.value!=null?m.value.toString():m.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(m,"Literal")},G0.parseParenExpression=function(){this.expect(X.parenL);var h=this.parseExpression();return this.expect(X.parenR),h},G0.shouldParseArrow=function(h){return!this.canInsertSemicolon()},G0.parseParenAndDistinguishExpression=function(h,m){var y,W=this.start,J=this.startLoc,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var F,T=this.start,D=this.startLoc,i0=[],s=!0,$0=!1,v0=new Ff,Y0=this.yieldPos,fl=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==X.parenR;){if(s?s=!1:this.expect(X.comma),a&&this.afterTrailingComma(X.parenR,!0)){$0=!0;break}if(this.type===X.ellipsis){F=this.start,i0.push(this.parseParenItem(this.parseRestBinding())),this.type===X.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}i0.push(this.parseMaybeAssign(!1,v0,this.parseParenItem))}var Il=this.lastTokEnd,L0=this.lastTokEndLoc;if(this.expect(X.parenR),h&&this.shouldParseArrow(i0)&&this.eat(X.arrow))return this.checkPatternErrors(v0,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Y0,this.awaitPos=fl,this.parseParenArrowList(W,J,i0,m);i0.length&&!$0||this.unexpected(this.lastTokStart),F&&this.unexpected(F),this.checkExpressionErrors(v0,!0),this.yieldPos=Y0||this.yieldPos,this.awaitPos=fl||this.awaitPos,i0.length>1?((y=this.startNodeAt(T,D)).expressions=i0,this.finishNodeAt(y,"SequenceExpression",Il,L0)):y=i0[0]}else y=this.parseParenExpression();if(this.options.preserveParens){var il=this.startNodeAt(W,J);return il.expression=y,this.finishNode(il,"ParenthesizedExpression")}return y},G0.parseParenItem=function(h){return h},G0.parseParenArrowList=function(h,m,y,W){return this.parseArrowExpression(this.startNodeAt(h,m),y,!1,W)};var Wt=[];G0.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var h=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===X.dot){var m=this.startNodeAt(h.start,h.loc&&h.loc.start);m.name="new",h.meta=this.finishNode(m,"Identifier"),this.next();var y=this.containsEsc;return h.property=this.parseIdent(!0),h.property.name!=="target"&&this.raiseRecoverable(h.property.start,"The only valid meta property for new is 'new.target'"),y&&this.raiseRecoverable(h.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(h.start,"'new.target' can only be used in functions and class static block"),this.finishNode(h,"MetaProperty")}var W=this.start,J=this.startLoc;return h.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),W,J,!0,!1),this.eat(X.parenL)?h.arguments=this.parseExprList(X.parenR,this.options.ecmaVersion>=8,!1):h.arguments=Wt,this.finishNode(h,"NewExpression")},G0.parseTemplateElement=function(h){var m=h.isTagged,y=this.startNode();return this.type===X.invalidTemplate?(m||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),y.value={raw:this.value.replace(/\r\n?/g,`
193
+ `,y-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(P).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=X.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=h.sourceType==="module",this.strict=this.inModule||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&&h.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?2:1),this.regexpState=null,this.privateNameStack=[]},Ll={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}};e0.prototype.parse=function(){var h=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(h)},Ll.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},Ll.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},Ll.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},Ll.canAwait.get=function(){for(var h=this.scopeStack.length-1;h>=0;h--){var m=this.scopeStack[h].flags;if(768&m)return!1;if(2&m)return(4&m)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Ll.allowReturn.get=function(){return!!this.inFunction||!!(this.options.allowReturnOutsideFunction&&1&this.currentVarScope().flags)},Ll.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},Ll.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Ll.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Ll.allowNewDotTarget.get=function(){for(var h=this.scopeStack.length-1;h>=0;h--){var m=this.scopeStack[h].flags;if(768&m||2&m&&!(16&m))return!0}return!1},Ll.allowUsing.get=function(){var h=this.currentScope().flags;return!(1024&h)&&!(!this.inModule&&1&h)},Ll.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&R0)>0},e0.extend=function(){for(var h=[],m=arguments.length;m--;)h[m]=arguments[m];for(var y=this,W=0;W<h.length;W++)y=h[W](y);return y},e0.parse=function(h,m){return new this(m,h).parse()},e0.parseExpressionAt=function(h,m,y){var W=new this(y,h,m);return W.nextToken(),W.parseExpression()},e0.tokenizer=function(h,m){return new this(m,h)},Object.defineProperties(e0.prototype,Ll);var Gl=e0.prototype,dt=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Gl.strictDirective=function(h){if(this.options.ecmaVersion<5)return!1;for(;;){N.lastIndex=h,h+=N.exec(this.input)[0].length;var m=dt.exec(this.input.slice(h));if(!m)return!1;if((m[1]||m[2])==="use strict"){N.lastIndex=h+m[0].length;var y=N.exec(this.input),W=y.index+y[0].length,J=this.input.charAt(W);return J===";"||J==="}"||P.test(y[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(J)||J==="!"&&this.input.charAt(W+1)==="=")}h+=m[0].length,N.lastIndex=h,h+=N.exec(this.input)[0].length,this.input[h]===";"&&h++}},Gl.eat=function(h){return this.type===h&&(this.next(),!0)},Gl.isContextual=function(h){return this.type===X.name&&this.value===h&&!this.containsEsc},Gl.eatContextual=function(h){return!!this.isContextual(h)&&(this.next(),!0)},Gl.expectContextual=function(h){this.eatContextual(h)||this.unexpected()},Gl.canInsertSemicolon=function(){return this.type===X.eof||this.type===X.braceR||P.test(this.input.slice(this.lastTokEnd,this.start))},Gl.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Gl.semicolon=function(){this.eat(X.semi)||this.insertSemicolon()||this.unexpected()},Gl.afterTrailingComma=function(h,m){if(this.type===h)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),m||this.next(),!0},Gl.expect=function(h){this.eat(h)||this.unexpected()},Gl.unexpected=function(h){this.raise(h!=null?h:this.start,"Unexpected token")};var Nf=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Gl.checkPatternErrors=function(h,m){if(h){h.trailingComma>-1&&this.raiseRecoverable(h.trailingComma,"Comma is not permitted after the rest element");var y=m?h.parenthesizedAssign:h.parenthesizedBind;y>-1&&this.raiseRecoverable(y,m?"Assigning to rvalue":"Parenthesized pattern")}},Gl.checkExpressionErrors=function(h,m){if(!h)return!1;var{shorthandAssign:y,doubleProto:W}=h;if(!m)return y>=0||W>=0;y>=0&&this.raise(y,"Shorthand property assignments are valid only in destructuring patterns"),W>=0&&this.raiseRecoverable(W,"Redefinition of __proto__ property")},Gl.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")},Gl.isSimpleAssignTarget=function(h){return h.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(h.expression):h.type==="Identifier"||h.type==="MemberExpression"};var g0=e0.prototype;g0.parseTopLevel=function(h){var m=Object.create(null);for(h.body||(h.body=[]);this.type!==X.eof;){var y=this.parseStatement(null,!0,m);h.body.push(y)}if(this.inModule)for(var W=0,J=Object.keys(this.undefinedExports);W<J.length;W+=1){var a=J[W];this.raiseRecoverable(this.undefinedExports[a].start,"Export '"+a+"' is not defined")}return this.adaptDirectivePrologue(h.body),this.next(),h.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(h,"Program")};var Qn={kind:"loop"},J5={kind:"switch"};g0.isLet=function(h){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;N.lastIndex=this.pos;var m=N.exec(this.input),y=this.pos+m[0].length,W=this.fullCharCodeAt(y);if(W===91||W===92)return!0;if(h)return!1;if(W===123)return!0;if(Y(W)){var J=y;do y+=W<=65535?1:2;while(z(W=this.fullCharCodeAt(y)));if(W===92)return!0;var a=this.input.slice(J,y);if(!$.test(a))return!0}return!1},g0.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;N.lastIndex=this.pos;var h,m=N.exec(this.input),y=this.pos+m[0].length;return!(P.test(this.input.slice(this.pos,y))||this.input.slice(y,y+8)!=="function"||y+8!==this.input.length&&(z(h=this.fullCharCodeAt(y+8))||h===92))},g0.isUsingKeyword=function(h,m){if(this.options.ecmaVersion<17||!this.isContextual(h?"await":"using"))return!1;N.lastIndex=this.pos;var y=N.exec(this.input),W=this.pos+y[0].length;if(P.test(this.input.slice(this.pos,W)))return!1;if(h){var J,a=W+5;if(this.input.slice(W,a)!=="using"||a===this.input.length||z(J=this.fullCharCodeAt(a))||J===92)return!1;N.lastIndex=a;var F=N.exec(this.input);if(W=a+F[0].length,F&&P.test(this.input.slice(a,W)))return!1}var T=this.fullCharCodeAt(W);if(!Y(T)&&T!==92)return!1;var D=W;do W+=T<=65535?1:2;while(z(T=this.fullCharCodeAt(W)));if(T===92)return!0;var i0=this.input.slice(D,W);return!($.test(i0)||m&&i0==="of")},g0.isAwaitUsing=function(h){return this.isUsingKeyword(!0,h)},g0.isUsing=function(h){return this.isUsingKeyword(!1,h)},g0.parseStatement=function(h,m,y){var W,J=this.type,a=this.startNode();switch(this.isLet(h)&&(J=X._var,W="let"),J){case X._break:case X._continue:return this.parseBreakContinueStatement(a,J.keyword);case X._debugger:return this.parseDebuggerStatement(a);case X._do:return this.parseDoStatement(a);case X._for:return this.parseForStatement(a);case X._function:return h&&(this.strict||h!=="if"&&h!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(a,!1,!h);case X._class:return h&&this.unexpected(),this.parseClass(a,!0);case X._if:return this.parseIfStatement(a);case X._return:return this.parseReturnStatement(a);case X._switch:return this.parseSwitchStatement(a);case X._throw:return this.parseThrowStatement(a);case X._try:return this.parseTryStatement(a);case X._const:case X._var:return W=W||this.value,h&&W!=="var"&&this.unexpected(),this.parseVarStatement(a,W);case X._while:return this.parseWhileStatement(a);case X._with:return this.parseWithStatement(a);case X.braceL:return this.parseBlock(!0,a);case X.semi:return this.parseEmptyStatement(a);case X._export:case X._import:if(this.options.ecmaVersion>10&&J===X._import){N.lastIndex=this.pos;var F=N.exec(this.input),T=this.pos+F[0].length,D=this.input.charCodeAt(T);if(D===40||D===46)return this.parseExpressionStatement(a,this.parseExpression())}return this.options.allowImportExportEverywhere||(m||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'")),J===X._import?this.parseImport(a):this.parseExport(a,y);default:if(this.isAsyncFunction())return h&&this.unexpected(),this.next(),this.parseFunctionStatement(a,!0,!h);var i0=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(i0)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"),i0==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(a,!1,i0),this.semicolon(),this.finishNode(a,"VariableDeclaration");var s=this.value,$0=this.parseExpression();return J===X.name&&$0.type==="Identifier"&&this.eat(X.colon)?this.parseLabeledStatement(a,s,$0,h):this.parseExpressionStatement(a,$0)}},g0.parseBreakContinueStatement=function(h,m){var y=m==="break";this.next(),this.eat(X.semi)||this.insertSemicolon()?h.label=null:this.type!==X.name?this.unexpected():(h.label=this.parseIdent(),this.semicolon());for(var W=0;W<this.labels.length;++W){var J=this.labels[W];if(h.label==null||J.name===h.label.name){if(J.kind!=null&&(y||J.kind==="loop"))break;if(h.label&&y)break}}return W===this.labels.length&&this.raise(h.start,"Unsyntactic "+m),this.finishNode(h,y?"BreakStatement":"ContinueStatement")},g0.parseDebuggerStatement=function(h){return this.next(),this.semicolon(),this.finishNode(h,"DebuggerStatement")},g0.parseDoStatement=function(h){return this.next(),this.labels.push(Qn),h.body=this.parseStatement("do"),this.labels.pop(),this.expect(X._while),h.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(X.semi):this.semicolon(),this.finishNode(h,"DoWhileStatement")},g0.parseForStatement=function(h){this.next();var m=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Qn),this.enterScope(0),this.expect(X.parenL),this.type===X.semi)return m>-1&&this.unexpected(m),this.parseFor(h,null);var y=this.isLet();if(this.type===X._var||this.type===X._const||y){var W=this.startNode(),J=y?"let":this.value;return this.next(),this.parseVar(W,!0,J),this.finishNode(W,"VariableDeclaration"),this.parseForAfterInit(h,W,m)}var a=this.isContextual("let"),F=!1,T=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(T){var D=this.startNode();return this.next(),T==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(D,!0,T),this.finishNode(D,"VariableDeclaration"),this.parseForAfterInit(h,D,m)}var i0=this.containsEsc,s=new Nf,$0=this.start,v0=m>-1?this.parseExprSubscripts(s,"await"):this.parseExpression(!0,s);return this.type===X._in||(F=this.options.ecmaVersion>=6&&this.isContextual("of"))?(m>-1?(this.type===X._in&&this.unexpected(m),h.await=!0):F&&this.options.ecmaVersion>=8&&(v0.start!==$0||i0||v0.type!=="Identifier"||v0.name!=="async"?this.options.ecmaVersion>=9&&(h.await=!1):this.unexpected()),a&&F&&this.raise(v0.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(v0,!1,s),this.checkLValPattern(v0),this.parseForIn(h,v0)):(this.checkExpressionErrors(s,!0),m>-1&&this.unexpected(m),this.parseFor(h,v0))},g0.parseForAfterInit=function(h,m,y){return(this.type===X._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&m.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===X._in?y>-1&&this.unexpected(y):h.await=y>-1),this.parseForIn(h,m)):(y>-1&&this.unexpected(y),this.parseFor(h,m))},g0.parseFunctionStatement=function(h,m,y){return this.next(),this.parseFunction(h,Rf|(y?0:rf),!1,m)},g0.parseIfStatement=function(h){return this.next(),h.test=this.parseParenExpression(),h.consequent=this.parseStatement("if"),h.alternate=this.eat(X._else)?this.parseStatement("if"):null,this.finishNode(h,"IfStatement")},g0.parseReturnStatement=function(h){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(X.semi)||this.insertSemicolon()?h.argument=null:(h.argument=this.parseExpression(),this.semicolon()),this.finishNode(h,"ReturnStatement")},g0.parseSwitchStatement=function(h){var m;this.next(),h.discriminant=this.parseParenExpression(),h.cases=[],this.expect(X.braceL),this.labels.push(J5),this.enterScope(1024);for(var y=!1;this.type!==X.braceR;)if(this.type===X._case||this.type===X._default){var W=this.type===X._case;m&&this.finishNode(m,"SwitchCase"),h.cases.push(m=this.startNode()),m.consequent=[],this.next(),W?m.test=this.parseExpression():(y&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),y=!0,m.test=null),this.expect(X.colon)}else m||this.unexpected(),m.consequent.push(this.parseStatement(null));return this.exitScope(),m&&this.finishNode(m,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(h,"SwitchStatement")},g0.parseThrowStatement=function(h){return this.next(),P.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),h.argument=this.parseExpression(),this.semicolon(),this.finishNode(h,"ThrowStatement")};var gt=[];g0.parseCatchClauseParam=function(){var h=this.parseBindingAtom(),m=h.type==="Identifier";return this.enterScope(m?32:0),this.checkLValPattern(h,m?4:2),this.expect(X.parenR),h},g0.parseTryStatement=function(h){if(this.next(),h.block=this.parseBlock(),h.handler=null,this.type===X._catch){var m=this.startNode();this.next(),this.eat(X.parenL)?m.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),m.param=null,this.enterScope(0)),m.body=this.parseBlock(!1),this.exitScope(),h.handler=this.finishNode(m,"CatchClause")}return h.finalizer=this.eat(X._finally)?this.parseBlock():null,h.handler||h.finalizer||this.raise(h.start,"Missing catch or finally clause"),this.finishNode(h,"TryStatement")},g0.parseVarStatement=function(h,m,y){return this.next(),this.parseVar(h,!1,m,y),this.semicolon(),this.finishNode(h,"VariableDeclaration")},g0.parseWhileStatement=function(h){return this.next(),h.test=this.parseParenExpression(),this.labels.push(Qn),h.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(h,"WhileStatement")},g0.parseWithStatement=function(h){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),h.object=this.parseParenExpression(),h.body=this.parseStatement("with"),this.finishNode(h,"WithStatement")},g0.parseEmptyStatement=function(h){return this.next(),this.finishNode(h,"EmptyStatement")},g0.parseLabeledStatement=function(h,m,y,W){for(var J=0,a=this.labels;J<a.length;J+=1)a[J].name===m&&this.raise(y.start,"Label '"+m+"' is already declared");for(var F=this.type.isLoop?"loop":this.type===X._switch?"switch":null,T=this.labels.length-1;T>=0;T--){var D=this.labels[T];if(D.statementStart!==h.start)break;D.statementStart=this.start,D.kind=F}return this.labels.push({name:m,kind:F,statementStart:this.start}),h.body=this.parseStatement(W?W.indexOf("label")===-1?W+"label":W:"label"),this.labels.pop(),h.label=y,this.finishNode(h,"LabeledStatement")},g0.parseExpressionStatement=function(h,m){return h.expression=m,this.semicolon(),this.finishNode(h,"ExpressionStatement")},g0.parseBlock=function(h,m,y){for(h===void 0&&(h=!0),m===void 0&&(m=this.startNode()),m.body=[],this.expect(X.braceL),h&&this.enterScope(0);this.type!==X.braceR;){var W=this.parseStatement(null);m.body.push(W)}return y&&(this.strict=!1),this.next(),h&&this.exitScope(),this.finishNode(m,"BlockStatement")},g0.parseFor=function(h,m){return h.init=m,this.expect(X.semi),h.test=this.type===X.semi?null:this.parseExpression(),this.expect(X.semi),h.update=this.type===X.parenR?null:this.parseExpression(),this.expect(X.parenR),h.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(h,"ForStatement")},g0.parseForIn=function(h,m){var y=this.type===X._in;return this.next(),m.type==="VariableDeclaration"&&m.declarations[0].init!=null&&(!y||this.options.ecmaVersion<8||this.strict||m.kind!=="var"||m.declarations[0].id.type!=="Identifier")&&this.raise(m.start,(y?"for-in":"for-of")+" loop variable declaration may not have an initializer"),h.left=m,h.right=y?this.parseExpression():this.parseMaybeAssign(),this.expect(X.parenR),h.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(h,y?"ForInStatement":"ForOfStatement")},g0.parseVar=function(h,m,y,W){for(h.declarations=[],h.kind=y;;){var J=this.startNode();if(this.parseVarId(J,y),this.eat(X.eq)?J.init=this.parseMaybeAssign(m):W||y!=="const"||this.type===X._in||this.options.ecmaVersion>=6&&this.isContextual("of")?W||y!=="using"&&y!=="await using"||!(this.options.ecmaVersion>=17)||this.type===X._in||this.isContextual("of")?W||J.id.type==="Identifier"||m&&(this.type===X._in||this.isContextual("of"))?J.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+y+" declaration"):this.unexpected(),h.declarations.push(this.finishNode(J,"VariableDeclarator")),!this.eat(X.comma))break}return h},g0.parseVarId=function(h,m){h.id=m==="using"||m==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(h.id,m==="var"?1:2,!1)};var Rf=1,rf=2;function ct(h,m){var y=m.key.name,W=h[y],J="true";return m.type!=="MethodDefinition"||m.kind!=="get"&&m.kind!=="set"||(J=(m.static?"s":"i")+m.kind),W==="iget"&&J==="iset"||W==="iset"&&J==="iget"||W==="sget"&&J==="sset"||W==="sset"&&J==="sget"?(h[y]="true",!1):!!W||(h[y]=J,!1)}function ff(h,m){var{computed:y,key:W}=h;return!y&&(W.type==="Identifier"&&W.name===m||W.type==="Literal"&&W.value===m)}g0.parseFunction=function(h,m,y,W,J){this.initFunction(h),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!W)&&(this.type===X.star&&m&rf&&this.unexpected(),h.generator=this.eat(X.star)),this.options.ecmaVersion>=8&&(h.async=!!W),m&Rf&&(h.id=4&m&&this.type!==X.name?null:this.parseIdent(),!h.id||m&rf||this.checkLValSimple(h.id,this.strict||h.generator||h.async?this.treatFunctionsAsVar?1:2:3));var a=this.yieldPos,F=this.awaitPos,T=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Sl(h.async,h.generator)),m&Rf||(h.id=this.type===X.name?this.parseIdent():null),this.parseFunctionParams(h),this.parseFunctionBody(h,y,!1,J),this.yieldPos=a,this.awaitPos=F,this.awaitIdentPos=T,this.finishNode(h,m&Rf?"FunctionDeclaration":"FunctionExpression")},g0.parseFunctionParams=function(h){this.expect(X.parenL),h.params=this.parseBindingList(X.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},g0.parseClass=function(h,m){this.next();var y=this.strict;this.strict=!0,this.parseClassId(h,m),this.parseClassSuper(h);var W=this.enterClassBody(),J=this.startNode(),a=!1;for(J.body=[],this.expect(X.braceL);this.type!==X.braceR;){var F=this.parseClassElement(h.superClass!==null);F&&(J.body.push(F),F.type==="MethodDefinition"&&F.kind==="constructor"?(a&&this.raiseRecoverable(F.start,"Duplicate constructor in the same class"),a=!0):F.key&&F.key.type==="PrivateIdentifier"&&ct(W,F)&&this.raiseRecoverable(F.key.start,"Identifier '#"+F.key.name+"' has already been declared"))}return this.strict=y,this.next(),h.body=this.finishNode(J,"ClassBody"),this.exitClassBody(),this.finishNode(h,m?"ClassDeclaration":"ClassExpression")},g0.parseClassElement=function(h){if(this.eat(X.semi))return null;var m=this.options.ecmaVersion,y=this.startNode(),W="",J=!1,a=!1,F="method",T=!1;if(this.eatContextual("static")){if(m>=13&&this.eat(X.braceL))return this.parseClassStaticBlock(y),y;this.isClassElementNameStart()||this.type===X.star?T=!0:W="static"}if(y.static=T,!W&&m>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==X.star||this.canInsertSemicolon()?W="async":a=!0),!W&&(m>=9||!a)&&this.eat(X.star)&&(J=!0),!W&&!a&&!J){var D=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?F=D:W=D)}if(W?(y.computed=!1,y.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),y.key.name=W,this.finishNode(y.key,"Identifier")):this.parseClassElementName(y),m<13||this.type===X.parenL||F!=="method"||J||a){var i0=!y.static&&ff(y,"constructor"),s=i0&&h;i0&&F!=="method"&&this.raise(y.key.start,"Constructor can't have get/set modifier"),y.kind=i0?"constructor":F,this.parseClassMethod(y,J,a,s)}else this.parseClassField(y);return y},g0.isClassElementNameStart=function(){return this.type===X.name||this.type===X.privateId||this.type===X.num||this.type===X.string||this.type===X.bracketL||this.type.keyword},g0.parseClassElementName=function(h){this.type===X.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),h.computed=!1,h.key=this.parsePrivateIdent()):this.parsePropertyName(h)},g0.parseClassMethod=function(h,m,y,W){var J=h.key;h.kind==="constructor"?(m&&this.raise(J.start,"Constructor can't be a generator"),y&&this.raise(J.start,"Constructor can't be an async method")):h.static&&ff(h,"prototype")&&this.raise(J.start,"Classes may not have a static property named prototype");var a=h.value=this.parseMethod(m,y,W);return h.kind==="get"&&a.params.length!==0&&this.raiseRecoverable(a.start,"getter should have no params"),h.kind==="set"&&a.params.length!==1&&this.raiseRecoverable(a.start,"setter should have exactly one param"),h.kind==="set"&&a.params[0].type==="RestElement"&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(h,"MethodDefinition")},g0.parseClassField=function(h){return ff(h,"constructor")?this.raise(h.key.start,"Classes can't have a field named 'constructor'"):h.static&&ff(h,"prototype")&&this.raise(h.key.start,"Classes can't have a static field named 'prototype'"),this.eat(X.eq)?(this.enterScope(576),h.value=this.parseMaybeAssign(),this.exitScope()):h.value=null,this.semicolon(),this.finishNode(h,"PropertyDefinition")},g0.parseClassStaticBlock=function(h){h.body=[];var m=this.labels;for(this.labels=[],this.enterScope(320);this.type!==X.braceR;){var y=this.parseStatement(null);h.body.push(y)}return this.next(),this.exitScope(),this.labels=m,this.finishNode(h,"StaticBlock")},g0.parseClassId=function(h,m){this.type===X.name?(h.id=this.parseIdent(),m&&this.checkLValSimple(h.id,2,!1)):(m===!0&&this.unexpected(),h.id=null)},g0.parseClassSuper=function(h){h.superClass=this.eat(X._extends)?this.parseExprSubscripts(null,!1):null},g0.enterClassBody=function(){var h={declared:Object.create(null),used:[]};return this.privateNameStack.push(h),h.declared},g0.exitClassBody=function(){var h=this.privateNameStack.pop(),m=h.declared,y=h.used;if(this.options.checkPrivateFields)for(var W=this.privateNameStack.length,J=W===0?null:this.privateNameStack[W-1],a=0;a<y.length;++a){var F=y[a];Q(m,F.name)||(J?J.used.push(F):this.raiseRecoverable(F.start,"Private field '#"+F.name+"' must be declared in an enclosing class"))}},g0.parseExportAllDeclaration=function(h,m){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(h.exported=this.parseModuleExportName(),this.checkExport(m,h.exported,this.lastTokStart)):h.exported=null),this.expectContextual("from"),this.type!==X.string&&this.unexpected(),h.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(h.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(h,"ExportAllDeclaration")},g0.parseExport=function(h,m){if(this.next(),this.eat(X.star))return this.parseExportAllDeclaration(h,m);if(this.eat(X._default))return this.checkExport(m,"default",this.lastTokStart),h.declaration=this.parseExportDefaultDeclaration(),this.finishNode(h,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())h.declaration=this.parseExportDeclaration(h),h.declaration.type==="VariableDeclaration"?this.checkVariableExport(m,h.declaration.declarations):this.checkExport(m,h.declaration.id,h.declaration.id.start),h.specifiers=[],h.source=null,this.options.ecmaVersion>=16&&(h.attributes=[]);else{if(h.declaration=null,h.specifiers=this.parseExportSpecifiers(m),this.eatContextual("from"))this.type!==X.string&&this.unexpected(),h.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(h.attributes=this.parseWithClause());else{for(var y=0,W=h.specifiers;y<W.length;y+=1){var J=W[y];this.checkUnreserved(J.local),this.checkLocalExport(J.local),J.local.type==="Literal"&&this.raise(J.local.start,"A string literal cannot be used as an exported binding without `from`.")}h.source=null,this.options.ecmaVersion>=16&&(h.attributes=[])}this.semicolon()}return this.finishNode(h,"ExportNamedDeclaration")},g0.parseExportDeclaration=function(h){return this.parseStatement(null)},g0.parseExportDefaultDeclaration=function(){var h;if(this.type===X._function||(h=this.isAsyncFunction())){var m=this.startNode();return this.next(),h&&this.next(),this.parseFunction(m,4|Rf,!1,h)}if(this.type===X._class){var y=this.startNode();return this.parseClass(y,"nullableID")}var W=this.parseMaybeAssign();return this.semicolon(),W},g0.checkExport=function(h,m,y){h&&(typeof m!="string"&&(m=m.type==="Identifier"?m.name:m.value),Q(h,m)&&this.raiseRecoverable(y,"Duplicate export '"+m+"'"),h[m]=!0)},g0.checkPatternExport=function(h,m){var y=m.type;if(y==="Identifier")this.checkExport(h,m,m.start);else if(y==="ObjectPattern")for(var W=0,J=m.properties;W<J.length;W+=1){var a=J[W];this.checkPatternExport(h,a)}else if(y==="ArrayPattern")for(var F=0,T=m.elements;F<T.length;F+=1){var D=T[F];D&&this.checkPatternExport(h,D)}else y==="Property"?this.checkPatternExport(h,m.value):y==="AssignmentPattern"?this.checkPatternExport(h,m.left):y==="RestElement"&&this.checkPatternExport(h,m.argument)},g0.checkVariableExport=function(h,m){if(h)for(var y=0,W=m;y<W.length;y+=1){var J=W[y];this.checkPatternExport(h,J.id)}},g0.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},g0.parseExportSpecifier=function(h){var m=this.startNode();return m.local=this.parseModuleExportName(),m.exported=this.eatContextual("as")?this.parseModuleExportName():m.local,this.checkExport(h,m.exported,m.exported.start),this.finishNode(m,"ExportSpecifier")},g0.parseExportSpecifiers=function(h){var m=[],y=!0;for(this.expect(X.braceL);!this.eat(X.braceR);){if(y)y=!1;else if(this.expect(X.comma),this.afterTrailingComma(X.braceR))break;m.push(this.parseExportSpecifier(h))}return m},g0.parseImport=function(h){return this.next(),this.type===X.string?(h.specifiers=gt,h.source=this.parseExprAtom()):(h.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),h.source=this.type===X.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(h.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(h,"ImportDeclaration")},g0.parseImportSpecifier=function(){var h=this.startNode();return h.imported=this.parseModuleExportName(),this.eatContextual("as")?h.local=this.parseIdent():(this.checkUnreserved(h.imported),h.local=h.imported),this.checkLValSimple(h.local,2),this.finishNode(h,"ImportSpecifier")},g0.parseImportDefaultSpecifier=function(){var h=this.startNode();return h.local=this.parseIdent(),this.checkLValSimple(h.local,2),this.finishNode(h,"ImportDefaultSpecifier")},g0.parseImportNamespaceSpecifier=function(){var h=this.startNode();return this.next(),this.expectContextual("as"),h.local=this.parseIdent(),this.checkLValSimple(h.local,2),this.finishNode(h,"ImportNamespaceSpecifier")},g0.parseImportSpecifiers=function(){var h=[],m=!0;if(this.type===X.name&&(h.push(this.parseImportDefaultSpecifier()),!this.eat(X.comma)))return h;if(this.type===X.star)return h.push(this.parseImportNamespaceSpecifier()),h;for(this.expect(X.braceL);!this.eat(X.braceR);){if(m)m=!1;else if(this.expect(X.comma),this.afterTrailingComma(X.braceR))break;h.push(this.parseImportSpecifier())}return h},g0.parseWithClause=function(){var h=[];if(!this.eat(X._with))return h;this.expect(X.braceL);for(var m={},y=!0;!this.eat(X.braceR);){if(y)y=!1;else if(this.expect(X.comma),this.afterTrailingComma(X.braceR))break;var W=this.parseImportAttribute(),J=W.key.type==="Identifier"?W.key.name:W.key.value;Q(m,J)&&this.raiseRecoverable(W.key.start,"Duplicate attribute key '"+J+"'"),m[J]=!0,h.push(W)}return h},g0.parseImportAttribute=function(){var h=this.startNode();return h.key=this.type===X.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(X.colon),this.type!==X.string&&this.unexpected(),h.value=this.parseExprAtom(),this.finishNode(h,"ImportAttribute")},g0.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===X.string){var h=this.parseLiteral(this.value);return e.test(h.value)&&this.raise(h.start,"An export name cannot include a lone surrogate."),h}return this.parseIdent(!0)},g0.adaptDirectivePrologue=function(h){for(var m=0;m<h.length&&this.isDirectiveCandidate(h[m]);++m)h[m].directive=h[m].expression.raw.slice(1,-1)},g0.isDirectiveCandidate=function(h){return this.options.ecmaVersion>=5&&h.type==="ExpressionStatement"&&h.expression.type==="Literal"&&typeof h.expression.value=="string"&&(this.input[h.start]==='"'||this.input[h.start]==="'")};var br=e0.prototype;br.toAssignable=function(h,m,y){if(this.options.ecmaVersion>=6&&h)switch(h.type){case"Identifier":this.inAsync&&h.name==="await"&&this.raise(h.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":h.type="ObjectPattern",y&&this.checkPatternErrors(y,!0);for(var W=0,J=h.properties;W<J.length;W+=1){var a=J[W];this.toAssignable(a,m),a.type!=="RestElement"||a.argument.type!=="ArrayPattern"&&a.argument.type!=="ObjectPattern"||this.raise(a.argument.start,"Unexpected token")}break;case"Property":h.kind!=="init"&&this.raise(h.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(h.value,m);break;case"ArrayExpression":h.type="ArrayPattern",y&&this.checkPatternErrors(y,!0),this.toAssignableList(h.elements,m);break;case"SpreadElement":h.type="RestElement",this.toAssignable(h.argument,m),h.argument.type==="AssignmentPattern"&&this.raise(h.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":h.operator!=="="&&this.raise(h.left.end,"Only '=' operator can be used for specifying default value."),h.type="AssignmentPattern",delete h.operator,this.toAssignable(h.left,m);break;case"ParenthesizedExpression":this.toAssignable(h.expression,m,y);break;case"ChainExpression":this.raiseRecoverable(h.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!m)break;default:this.raise(h.start,"Assigning to rvalue")}else y&&this.checkPatternErrors(y,!0);return h},br.toAssignableList=function(h,m){for(var y=h.length,W=0;W<y;W++){var J=h[W];J&&this.toAssignable(J,m)}if(y){var a=h[y-1];this.options.ecmaVersion===6&&m&&a&&a.type==="RestElement"&&a.argument.type!=="Identifier"&&this.unexpected(a.argument.start)}return h},br.parseSpread=function(h){var m=this.startNode();return this.next(),m.argument=this.parseMaybeAssign(!1,h),this.finishNode(m,"SpreadElement")},br.parseRestBinding=function(){var h=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==X.name&&this.unexpected(),h.argument=this.parseBindingAtom(),this.finishNode(h,"RestElement")},br.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case X.bracketL:var h=this.startNode();return this.next(),h.elements=this.parseBindingList(X.bracketR,!0,!0),this.finishNode(h,"ArrayPattern");case X.braceL:return this.parseObj(!0)}return this.parseIdent()},br.parseBindingList=function(h,m,y,W){for(var J=[],a=!0;!this.eat(h);)if(a?a=!1:this.expect(X.comma),m&&this.type===X.comma)J.push(null);else{if(y&&this.afterTrailingComma(h))break;if(this.type===X.ellipsis){var F=this.parseRestBinding();this.parseBindingListItem(F),J.push(F),this.type===X.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(h);break}J.push(this.parseAssignableListItem(W))}return J},br.parseAssignableListItem=function(h){var m=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(m),m},br.parseBindingListItem=function(h){return h},br.parseMaybeDefault=function(h,m,y){if(y=y||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(X.eq))return y;var W=this.startNodeAt(h,m);return W.left=y,W.right=this.parseMaybeAssign(),this.finishNode(W,"AssignmentPattern")},br.checkLValSimple=function(h,m,y){m===void 0&&(m=0);var W=m!==0;switch(h.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(h.name)&&this.raiseRecoverable(h.start,(W?"Binding ":"Assigning to ")+h.name+" in strict mode"),W&&(m===2&&h.name==="let"&&this.raiseRecoverable(h.start,"let is disallowed as a lexically bound name"),y&&(Q(y,h.name)&&this.raiseRecoverable(h.start,"Argument name clash"),y[h.name]=!0),m!==5&&this.declareName(h.name,m,h.start));break;case"ChainExpression":this.raiseRecoverable(h.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":W&&this.raiseRecoverable(h.start,"Binding member expression");break;case"ParenthesizedExpression":return W&&this.raiseRecoverable(h.start,"Binding parenthesized expression"),this.checkLValSimple(h.expression,m,y);default:this.raise(h.start,(W?"Binding":"Assigning to")+" rvalue")}},br.checkLValPattern=function(h,m,y){switch(m===void 0&&(m=0),h.type){case"ObjectPattern":for(var W=0,J=h.properties;W<J.length;W+=1){var a=J[W];this.checkLValInnerPattern(a,m,y)}break;case"ArrayPattern":for(var F=0,T=h.elements;F<T.length;F+=1){var D=T[F];D&&this.checkLValInnerPattern(D,m,y)}break;default:this.checkLValSimple(h,m,y)}},br.checkLValInnerPattern=function(h,m,y){switch(m===void 0&&(m=0),h.type){case"Property":this.checkLValInnerPattern(h.value,m,y);break;case"AssignmentPattern":this.checkLValPattern(h.left,m,y);break;case"RestElement":this.checkLValPattern(h.argument,m,y);break;default:this.checkLValPattern(h,m,y)}};var Zr=function(h,m,y,W,J){this.token=h,this.isExpr=!!m,this.preserveSpace=!!y,this.override=W,this.generator=!!J},Wl={b_stat:new Zr("{",!1),b_expr:new Zr("{",!0),b_tmpl:new Zr("${",!1),p_stat:new Zr("(",!1),p_expr:new Zr("(",!0),q_tmpl:new Zr("`",!0,!0,function(h){return h.tryReadTemplateToken()}),f_stat:new Zr("function",!1),f_expr:new Zr("function",!0),f_expr_gen:new Zr("function",!0,!1,null,!0),f_gen:new Zr("function",!1,!1,null,!0)},J1=e0.prototype;J1.initialContext=function(){return[Wl.b_stat]},J1.curContext=function(){return this.context[this.context.length-1]},J1.braceIsBlock=function(h){var m=this.curContext();return m===Wl.f_expr||m===Wl.f_stat||(h!==X.colon||m!==Wl.b_stat&&m!==Wl.b_expr?h===X._return||h===X.name&&this.exprAllowed?P.test(this.input.slice(this.lastTokEnd,this.start)):h===X._else||h===X.semi||h===X.eof||h===X.parenR||h===X.arrow||(h===X.braceL?m===Wl.b_stat:h!==X._var&&h!==X._const&&h!==X.name&&!this.exprAllowed):!m.isExpr)},J1.inGeneratorContext=function(){for(var h=this.context.length-1;h>=1;h--){var m=this.context[h];if(m.token==="function")return m.generator}return!1},J1.updateContext=function(h){var m,y=this.type;y.keyword&&h===X.dot?this.exprAllowed=!1:(m=y.updateContext)?m.call(this,h):this.exprAllowed=y.beforeExpr},J1.overrideContext=function(h){this.curContext()!==h&&(this.context[this.context.length-1]=h)},X.parenR.updateContext=X.braceR.updateContext=function(){if(this.context.length!==1){var h=this.context.pop();h===Wl.b_stat&&this.curContext().token==="function"&&(h=this.context.pop()),this.exprAllowed=!h.isExpr}else this.exprAllowed=!0},X.braceL.updateContext=function(h){this.context.push(this.braceIsBlock(h)?Wl.b_stat:Wl.b_expr),this.exprAllowed=!0},X.dollarBraceL.updateContext=function(){this.context.push(Wl.b_tmpl),this.exprAllowed=!0},X.parenL.updateContext=function(h){var m=h===X._if||h===X._for||h===X._with||h===X._while;this.context.push(m?Wl.p_stat:Wl.p_expr),this.exprAllowed=!0},X.incDec.updateContext=function(){},X._function.updateContext=X._class.updateContext=function(h){!h.beforeExpr||h===X._else||h===X.semi&&this.curContext()!==Wl.p_stat||h===X._return&&P.test(this.input.slice(this.lastTokEnd,this.start))||(h===X.colon||h===X.braceL)&&this.curContext()===Wl.b_stat?this.context.push(Wl.f_stat):this.context.push(Wl.f_expr),this.exprAllowed=!1},X.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},X.backQuote.updateContext=function(){this.curContext()===Wl.q_tmpl?this.context.pop():this.context.push(Wl.q_tmpl),this.exprAllowed=!1},X.star.updateContext=function(h){if(h===X._function){var m=this.context.length-1;this.context[m]===Wl.f_expr?this.context[m]=Wl.f_expr_gen:this.context[m]=Wl.f_gen}this.exprAllowed=!0},X.name.updateContext=function(h){var m=!1;this.options.ecmaVersion>=6&&h!==X.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(m=!0),this.exprAllowed=m};var G0=e0.prototype;function At(h){return h.type==="Identifier"||h.type==="ParenthesizedExpression"&&At(h.expression)}function Bn(h){return h.type==="MemberExpression"&&h.property.type==="PrivateIdentifier"||h.type==="ChainExpression"&&Bn(h.expression)||h.type==="ParenthesizedExpression"&&Bn(h.expression)}G0.checkPropClash=function(h,m,y){if(!(this.options.ecmaVersion>=9&&h.type==="SpreadElement"||this.options.ecmaVersion>=6&&(h.computed||h.method||h.shorthand))){var W,J=h.key;switch(J.type){case"Identifier":W=J.name;break;case"Literal":W=String(J.value);break;default:return}var a=h.kind;if(this.options.ecmaVersion>=6)W==="__proto__"&&a==="init"&&(m.proto&&(y?y.doubleProto<0&&(y.doubleProto=J.start):this.raiseRecoverable(J.start,"Redefinition of __proto__ property")),m.proto=!0);else{var F=m[W="$"+W];if(F)(a==="init"?this.strict&&F.init||F.get||F.set:F.init||F[a])&&this.raiseRecoverable(J.start,"Redefinition of property");else F=m[W]={init:!1,get:!1,set:!1};F[a]=!0}}},G0.parseExpression=function(h,m){var y=this.start,W=this.startLoc,J=this.parseMaybeAssign(h,m);if(this.type===X.comma){var a=this.startNodeAt(y,W);for(a.expressions=[J];this.eat(X.comma);)a.expressions.push(this.parseMaybeAssign(h,m));return this.finishNode(a,"SequenceExpression")}return J},G0.parseMaybeAssign=function(h,m,y){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(h);this.exprAllowed=!1}var W=!1,J=-1,a=-1,F=-1;m?(J=m.parenthesizedAssign,a=m.trailingComma,F=m.doubleProto,m.parenthesizedAssign=m.trailingComma=-1):(m=new Nf,W=!0);var T=this.start,D=this.startLoc;this.type!==X.parenL&&this.type!==X.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=h==="await");var i0=this.parseMaybeConditional(h,m);if(y&&(i0=y.call(this,i0,T,D)),this.type.isAssign){var s=this.startNodeAt(T,D);return s.operator=this.value,this.type===X.eq&&(i0=this.toAssignable(i0,!1,m)),W||(m.parenthesizedAssign=m.trailingComma=m.doubleProto=-1),m.shorthandAssign>=i0.start&&(m.shorthandAssign=-1),this.type===X.eq?this.checkLValPattern(i0):this.checkLValSimple(i0),s.left=i0,this.next(),s.right=this.parseMaybeAssign(h),F>-1&&(m.doubleProto=F),this.finishNode(s,"AssignmentExpression")}return W&&this.checkExpressionErrors(m,!0),J>-1&&(m.parenthesizedAssign=J),a>-1&&(m.trailingComma=a),i0},G0.parseMaybeConditional=function(h,m){var y=this.start,W=this.startLoc,J=this.parseExprOps(h,m);if(this.checkExpressionErrors(m))return J;if(this.eat(X.question)){var a=this.startNodeAt(y,W);return a.test=J,a.consequent=this.parseMaybeAssign(),this.expect(X.colon),a.alternate=this.parseMaybeAssign(h),this.finishNode(a,"ConditionalExpression")}return J},G0.parseExprOps=function(h,m){var y=this.start,W=this.startLoc,J=this.parseMaybeUnary(m,!1,!1,h);return this.checkExpressionErrors(m)||J.start===y&&J.type==="ArrowFunctionExpression"?J:this.parseExprOp(J,y,W,-1,h)},G0.parseExprOp=function(h,m,y,W,J){var a=this.type.binop;if(a!=null&&(!J||this.type!==X._in)&&a>W){var F=this.type===X.logicalOR||this.type===X.logicalAND,T=this.type===X.coalesce;T&&(a=X.logicalAND.binop);var D=this.value;this.next();var i0=this.start,s=this.startLoc,$0=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,J),i0,s,a,J),v0=this.buildBinary(m,y,h,$0,D,F||T);return(F&&this.type===X.coalesce||T&&(this.type===X.logicalOR||this.type===X.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(v0,m,y,W,J)}return h},G0.buildBinary=function(h,m,y,W,J,a){W.type==="PrivateIdentifier"&&this.raise(W.start,"Private identifier can only be left side of binary expression");var F=this.startNodeAt(h,m);return F.left=y,F.operator=J,F.right=W,this.finishNode(F,a?"LogicalExpression":"BinaryExpression")},G0.parseMaybeUnary=function(h,m,y,W){var J,a=this.start,F=this.startLoc;if(this.isContextual("await")&&this.canAwait)J=this.parseAwait(W),m=!0;else if(this.type.prefix){var T=this.startNode(),D=this.type===X.incDec;T.operator=this.value,T.prefix=!0,this.next(),T.argument=this.parseMaybeUnary(null,!0,D,W),this.checkExpressionErrors(h,!0),D?this.checkLValSimple(T.argument):this.strict&&T.operator==="delete"&&At(T.argument)?this.raiseRecoverable(T.start,"Deleting local variable in strict mode"):T.operator==="delete"&&Bn(T.argument)?this.raiseRecoverable(T.start,"Private fields can not be deleted"):m=!0,J=this.finishNode(T,D?"UpdateExpression":"UnaryExpression")}else if(m||this.type!==X.privateId){if(J=this.parseExprSubscripts(h,W),this.checkExpressionErrors(h))return J;for(;this.type.postfix&&!this.canInsertSemicolon();){var i0=this.startNodeAt(a,F);i0.operator=this.value,i0.prefix=!1,i0.argument=J,this.checkLValSimple(J),this.next(),J=this.finishNode(i0,"UpdateExpression")}}else(W||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),J=this.parsePrivateIdent(),this.type!==X._in&&this.unexpected();return y||!this.eat(X.starstar)?J:m?void this.unexpected(this.lastTokStart):this.buildBinary(a,F,J,this.parseMaybeUnary(null,!1,!1,W),"**",!1)},G0.parseExprSubscripts=function(h,m){var y=this.start,W=this.startLoc,J=this.parseExprAtom(h,m);if(J.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return J;var a=this.parseSubscripts(J,y,W,!1,m);return h&&a.type==="MemberExpression"&&(h.parenthesizedAssign>=a.start&&(h.parenthesizedAssign=-1),h.parenthesizedBind>=a.start&&(h.parenthesizedBind=-1),h.trailingComma>=a.start&&(h.trailingComma=-1)),a},G0.parseSubscripts=function(h,m,y,W,J){for(var a=this.options.ecmaVersion>=8&&h.type==="Identifier"&&h.name==="async"&&this.lastTokEnd===h.end&&!this.canInsertSemicolon()&&h.end-h.start===5&&this.potentialArrowAt===h.start,F=!1;;){var T=this.parseSubscript(h,m,y,W,a,F,J);if(T.optional&&(F=!0),T===h||T.type==="ArrowFunctionExpression"){if(F){var D=this.startNodeAt(m,y);D.expression=T,T=this.finishNode(D,"ChainExpression")}return T}h=T}},G0.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(X.arrow)},G0.parseSubscriptAsyncArrow=function(h,m,y,W){return this.parseArrowExpression(this.startNodeAt(h,m),y,!0,W)},G0.parseSubscript=function(h,m,y,W,J,a,F){var T=this.options.ecmaVersion>=11,D=T&&this.eat(X.questionDot);W&&D&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var i0=this.eat(X.bracketL);if(i0||D&&this.type!==X.parenL&&this.type!==X.backQuote||this.eat(X.dot)){var s=this.startNodeAt(m,y);s.object=h,i0?(s.property=this.parseExpression(),this.expect(X.bracketR)):this.type===X.privateId&&h.type!=="Super"?s.property=this.parsePrivateIdent():s.property=this.parseIdent(this.options.allowReserved!=="never"),s.computed=!!i0,T&&(s.optional=D),h=this.finishNode(s,"MemberExpression")}else if(!W&&this.eat(X.parenL)){var $0=new Nf,v0=this.yieldPos,Y0=this.awaitPos,fl=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var Il=this.parseExprList(X.parenR,this.options.ecmaVersion>=8,!1,$0);if(J&&!D&&this.shouldParseAsyncArrow())return this.checkPatternErrors($0,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=v0,this.awaitPos=Y0,this.awaitIdentPos=fl,this.parseSubscriptAsyncArrow(m,y,Il,F);this.checkExpressionErrors($0,!0),this.yieldPos=v0||this.yieldPos,this.awaitPos=Y0||this.awaitPos,this.awaitIdentPos=fl||this.awaitIdentPos;var L0=this.startNodeAt(m,y);L0.callee=h,L0.arguments=Il,T&&(L0.optional=D),h=this.finishNode(L0,"CallExpression")}else if(this.type===X.backQuote){(D||a)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var il=this.startNodeAt(m,y);il.tag=h,il.quasi=this.parseTemplate({isTagged:!0}),h=this.finishNode(il,"TaggedTemplateExpression")}return h},G0.parseExprAtom=function(h,m,y){this.type===X.slash&&this.readRegexp();var W,J=this.potentialArrowAt===this.start;switch(this.type){case X._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),W=this.startNode(),this.next(),this.type!==X.parenL||this.allowDirectSuper||this.raise(W.start,"super() call outside constructor of a subclass"),this.type!==X.dot&&this.type!==X.bracketL&&this.type!==X.parenL&&this.unexpected(),this.finishNode(W,"Super");case X._this:return W=this.startNode(),this.next(),this.finishNode(W,"ThisExpression");case X.name:var a=this.start,F=this.startLoc,T=this.containsEsc,D=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!T&&D.name==="async"&&!this.canInsertSemicolon()&&this.eat(X._function))return this.overrideContext(Wl.f_expr),this.parseFunction(this.startNodeAt(a,F),0,!1,!0,m);if(J&&!this.canInsertSemicolon()){if(this.eat(X.arrow))return this.parseArrowExpression(this.startNodeAt(a,F),[D],!1,m);if(this.options.ecmaVersion>=8&&D.name==="async"&&this.type===X.name&&!T&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return D=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(X.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,F),[D],!0,m)}return D;case X.regexp:var i0=this.value;return(W=this.parseLiteral(i0.value)).regex={pattern:i0.pattern,flags:i0.flags},W;case X.num:case X.string:return this.parseLiteral(this.value);case X._null:case X._true:case X._false:return(W=this.startNode()).value=this.type===X._null?null:this.type===X._true,W.raw=this.type.keyword,this.next(),this.finishNode(W,"Literal");case X.parenL:var s=this.start,$0=this.parseParenAndDistinguishExpression(J,m);return h&&(h.parenthesizedAssign<0&&!this.isSimpleAssignTarget($0)&&(h.parenthesizedAssign=s),h.parenthesizedBind<0&&(h.parenthesizedBind=s)),$0;case X.bracketL:return W=this.startNode(),this.next(),W.elements=this.parseExprList(X.bracketR,!0,!0,h),this.finishNode(W,"ArrayExpression");case X.braceL:return this.overrideContext(Wl.b_expr),this.parseObj(!1,h);case X._function:return W=this.startNode(),this.next(),this.parseFunction(W,0);case X._class:return this.parseClass(this.startNode(),!1);case X._new:return this.parseNew();case X.backQuote:return this.parseTemplate();case X._import:return this.options.ecmaVersion>=11?this.parseExprImport(y):this.unexpected();default:return this.parseExprAtomDefault()}},G0.parseExprAtomDefault=function(){this.unexpected()},G0.parseExprImport=function(h){var m=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===X.parenL&&!h)return this.parseDynamicImport(m);if(this.type===X.dot){var y=this.startNodeAt(m.start,m.loc&&m.loc.start);return y.name="import",m.meta=this.finishNode(y,"Identifier"),this.parseImportMeta(m)}this.unexpected()},G0.parseDynamicImport=function(h){if(this.next(),h.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(X.parenR)?h.options=null:(this.expect(X.comma),this.afterTrailingComma(X.parenR)?h.options=null:(h.options=this.parseMaybeAssign(),this.eat(X.parenR)||(this.expect(X.comma),this.afterTrailingComma(X.parenR)||this.unexpected())));else if(!this.eat(X.parenR)){var m=this.start;this.eat(X.comma)&&this.eat(X.parenR)?this.raiseRecoverable(m,"Trailing comma is not allowed in import()"):this.unexpected(m)}return this.finishNode(h,"ImportExpression")},G0.parseImportMeta=function(h){this.next();var m=this.containsEsc;return h.property=this.parseIdent(!0),h.property.name!=="meta"&&this.raiseRecoverable(h.property.start,"The only valid meta property for import is 'import.meta'"),m&&this.raiseRecoverable(h.start,"'import.meta' must not contain escaped characters"),this.options.sourceType==="module"||this.options.allowImportExportEverywhere||this.raiseRecoverable(h.start,"Cannot use 'import.meta' outside a module"),this.finishNode(h,"MetaProperty")},G0.parseLiteral=function(h){var m=this.startNode();return m.value=h,m.raw=this.input.slice(this.start,this.end),m.raw.charCodeAt(m.raw.length-1)===110&&(m.bigint=m.value!=null?m.value.toString():m.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(m,"Literal")},G0.parseParenExpression=function(){this.expect(X.parenL);var h=this.parseExpression();return this.expect(X.parenR),h},G0.shouldParseArrow=function(h){return!this.canInsertSemicolon()},G0.parseParenAndDistinguishExpression=function(h,m){var y,W=this.start,J=this.startLoc,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var F,T=this.start,D=this.startLoc,i0=[],s=!0,$0=!1,v0=new Nf,Y0=this.yieldPos,fl=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==X.parenR;){if(s?s=!1:this.expect(X.comma),a&&this.afterTrailingComma(X.parenR,!0)){$0=!0;break}if(this.type===X.ellipsis){F=this.start,i0.push(this.parseParenItem(this.parseRestBinding())),this.type===X.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}i0.push(this.parseMaybeAssign(!1,v0,this.parseParenItem))}var Il=this.lastTokEnd,L0=this.lastTokEndLoc;if(this.expect(X.parenR),h&&this.shouldParseArrow(i0)&&this.eat(X.arrow))return this.checkPatternErrors(v0,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Y0,this.awaitPos=fl,this.parseParenArrowList(W,J,i0,m);i0.length&&!$0||this.unexpected(this.lastTokStart),F&&this.unexpected(F),this.checkExpressionErrors(v0,!0),this.yieldPos=Y0||this.yieldPos,this.awaitPos=fl||this.awaitPos,i0.length>1?((y=this.startNodeAt(T,D)).expressions=i0,this.finishNodeAt(y,"SequenceExpression",Il,L0)):y=i0[0]}else y=this.parseParenExpression();if(this.options.preserveParens){var il=this.startNodeAt(W,J);return il.expression=y,this.finishNode(il,"ParenthesizedExpression")}return y},G0.parseParenItem=function(h){return h},G0.parseParenArrowList=function(h,m,y,W){return this.parseArrowExpression(this.startNodeAt(h,m),y,!1,W)};var Kt=[];G0.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var h=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===X.dot){var m=this.startNodeAt(h.start,h.loc&&h.loc.start);m.name="new",h.meta=this.finishNode(m,"Identifier"),this.next();var y=this.containsEsc;return h.property=this.parseIdent(!0),h.property.name!=="target"&&this.raiseRecoverable(h.property.start,"The only valid meta property for new is 'new.target'"),y&&this.raiseRecoverable(h.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(h.start,"'new.target' can only be used in functions and class static block"),this.finishNode(h,"MetaProperty")}var W=this.start,J=this.startLoc;return h.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),W,J,!0,!1),this.eat(X.parenL)?h.arguments=this.parseExprList(X.parenR,this.options.ecmaVersion>=8,!1):h.arguments=Kt,this.finishNode(h,"NewExpression")},G0.parseTemplateElement=function(h){var m=h.isTagged,y=this.startNode();return this.type===X.invalidTemplate?(m||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),y.value={raw:this.value.replace(/\r\n?/g,`
194
194
  `),cooked:null}):y.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
195
- `),cooked:this.value},this.next(),y.tail=this.type===X.backQuote,this.finishNode(y,"TemplateElement")},G0.parseTemplate=function(h){h===void 0&&(h={});var m=h.isTagged;m===void 0&&(m=!1);var y=this.startNode();this.next(),y.expressions=[];var W=this.parseTemplateElement({isTagged:m});for(y.quasis=[W];!W.tail;)this.type===X.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(X.dollarBraceL),y.expressions.push(this.parseExpression()),this.expect(X.braceR),y.quasis.push(W=this.parseTemplateElement({isTagged:m}));return this.next(),this.finishNode(y,"TemplateLiteral")},G0.isAsyncProp=function(h){return!h.computed&&h.key.type==="Identifier"&&h.key.name==="async"&&(this.type===X.name||this.type===X.num||this.type===X.string||this.type===X.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===X.star)&&!P.test(this.input.slice(this.lastTokEnd,this.start))},G0.parseObj=function(h,m){var y=this.startNode(),W=!0,J={};for(y.properties=[],this.next();!this.eat(X.braceR);){if(W)W=!1;else if(this.expect(X.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(X.braceR))break;var a=this.parseProperty(h,m);h||this.checkPropClash(a,J,m),y.properties.push(a)}return this.finishNode(y,h?"ObjectPattern":"ObjectExpression")},G0.parseProperty=function(h,m){var y,W,J,a,F=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(X.ellipsis))return h?(F.argument=this.parseIdent(!1),this.type===X.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(F,"RestElement")):(F.argument=this.parseMaybeAssign(!1,m),this.type===X.comma&&m&&m.trailingComma<0&&(m.trailingComma=this.start),this.finishNode(F,"SpreadElement"));this.options.ecmaVersion>=6&&(F.method=!1,F.shorthand=!1,(h||m)&&(J=this.start,a=this.startLoc),h||(y=this.eat(X.star)));var T=this.containsEsc;return this.parsePropertyName(F),!h&&!T&&this.options.ecmaVersion>=8&&!y&&this.isAsyncProp(F)?(W=!0,y=this.options.ecmaVersion>=9&&this.eat(X.star),this.parsePropertyName(F)):W=!1,this.parsePropertyValue(F,h,y,W,J,a,m,T),this.finishNode(F,"Property")},G0.parseGetterSetter=function(h){var m=h.key.name;this.parsePropertyName(h),h.value=this.parseMethod(!1),h.kind=m;var y=h.kind==="get"?0:1;if(h.value.params.length!==y){var W=h.value.start;h.kind==="get"?this.raiseRecoverable(W,"getter should have no params"):this.raiseRecoverable(W,"setter should have exactly one param")}else h.kind==="set"&&h.value.params[0].type==="RestElement"&&this.raiseRecoverable(h.value.params[0].start,"Setter cannot use rest params")},G0.parsePropertyValue=function(h,m,y,W,J,a,F,T){(y||W)&&this.type===X.colon&&this.unexpected(),this.eat(X.colon)?(h.value=m?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,F),h.kind="init"):this.options.ecmaVersion>=6&&this.type===X.parenL?(m&&this.unexpected(),h.method=!0,h.value=this.parseMethod(y,W),h.kind="init"):m||T||!(this.options.ecmaVersion>=5)||h.computed||h.key.type!=="Identifier"||h.key.name!=="get"&&h.key.name!=="set"||this.type===X.comma||this.type===X.braceR||this.type===X.eq?this.options.ecmaVersion>=6&&!h.computed&&h.key.type==="Identifier"?((y||W)&&this.unexpected(),this.checkUnreserved(h.key),h.key.name!=="await"||this.awaitIdentPos||(this.awaitIdentPos=J),m?h.value=this.parseMaybeDefault(J,a,this.copyNode(h.key)):this.type===X.eq&&F?(F.shorthandAssign<0&&(F.shorthandAssign=this.start),h.value=this.parseMaybeDefault(J,a,this.copyNode(h.key))):h.value=this.copyNode(h.key),h.kind="init",h.shorthand=!0):this.unexpected():((y||W)&&this.unexpected(),this.parseGetterSetter(h))},G0.parsePropertyName=function(h){if(this.options.ecmaVersion>=6){if(this.eat(X.bracketL))return h.computed=!0,h.key=this.parseMaybeAssign(),this.expect(X.bracketR),h.key;h.computed=!1}return h.key=this.type===X.num||this.type===X.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},G0.initFunction=function(h){h.id=null,this.options.ecmaVersion>=6&&(h.generator=h.expression=!1),this.options.ecmaVersion>=8&&(h.async=!1)},G0.parseMethod=function(h,m,y){var W=this.startNode(),J=this.yieldPos,a=this.awaitPos,F=this.awaitIdentPos;return this.initFunction(W),this.options.ecmaVersion>=6&&(W.generator=h),this.options.ecmaVersion>=8&&(W.async=!!m),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|Sl(m,W.generator)|(y?128:0)),this.expect(X.parenL),W.params=this.parseBindingList(X.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(W,!1,!0,!1),this.yieldPos=J,this.awaitPos=a,this.awaitIdentPos=F,this.finishNode(W,"FunctionExpression")},G0.parseArrowExpression=function(h,m,y,W){var J=this.yieldPos,a=this.awaitPos,F=this.awaitIdentPos;return this.enterScope(16|Sl(y,!1)),this.initFunction(h),this.options.ecmaVersion>=8&&(h.async=!!y),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,h.params=this.toAssignableList(m,!0),this.parseFunctionBody(h,!0,!1,W),this.yieldPos=J,this.awaitPos=a,this.awaitIdentPos=F,this.finishNode(h,"ArrowFunctionExpression")},G0.parseFunctionBody=function(h,m,y,W){var J=m&&this.type!==X.braceL,a=this.strict,F=!1;if(J)h.body=this.parseMaybeAssign(W),h.expression=!0,this.checkParams(h,!1);else{var T=this.options.ecmaVersion>=7&&!this.isSimpleParamList(h.params);a&&!T||(F=this.strictDirective(this.end))&&T&&this.raiseRecoverable(h.start,"Illegal 'use strict' directive in function with non-simple parameter list");var D=this.labels;this.labels=[],F&&(this.strict=!0),this.checkParams(h,!a&&!F&&!m&&!y&&this.isSimpleParamList(h.params)),this.strict&&h.id&&this.checkLValSimple(h.id,5),h.body=this.parseBlock(!1,void 0,F&&!a),h.expression=!1,this.adaptDirectivePrologue(h.body.body),this.labels=D}this.exitScope()},G0.isSimpleParamList=function(h){for(var m=0,y=h;m<y.length;m+=1)if(y[m].type!=="Identifier")return!1;return!0},G0.checkParams=function(h,m){for(var y=Object.create(null),W=0,J=h.params;W<J.length;W+=1){var a=J[W];this.checkLValInnerPattern(a,1,m?null:y)}},G0.parseExprList=function(h,m,y,W){for(var J=[],a=!0;!this.eat(h);){if(a)a=!1;else if(this.expect(X.comma),m&&this.afterTrailingComma(h))break;var F=void 0;y&&this.type===X.comma?F=null:this.type===X.ellipsis?(F=this.parseSpread(W),W&&this.type===X.comma&&W.trailingComma<0&&(W.trailingComma=this.start)):F=this.parseMaybeAssign(!1,W),J.push(F)}return J},G0.checkUnreserved=function(h){var{start:m,end:y,name:W}=h;(this.inGenerator&&W==="yield"&&this.raiseRecoverable(m,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&W==="await"&&this.raiseRecoverable(m,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().flags&gl||W!=="arguments"||this.raiseRecoverable(m,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||W!=="arguments"&&W!=="await"||this.raise(m,"Cannot use "+W+" in class static initialization block"),this.keywords.test(W)&&this.raise(m,"Unexpected keyword '"+W+"'"),this.options.ecmaVersion<6&&this.input.slice(m,y).indexOf("\\")!==-1)||(this.strict?this.reservedWordsStrict:this.reservedWords).test(W)&&(this.inAsync||W!=="await"||this.raiseRecoverable(m,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(m,"The keyword '"+W+"' is reserved"))},G0.parseIdent=function(h){var m=this.parseIdentNode();return this.next(!!h),this.finishNode(m,"Identifier"),h||(this.checkUnreserved(m),m.name!=="await"||this.awaitIdentPos||(this.awaitIdentPos=m.start)),m},G0.parseIdentNode=function(){var h=this.startNode();return this.type===X.name?h.name=this.value:this.type.keyword?(h.name=this.type.keyword,h.name!=="class"&&h.name!=="function"||this.lastTokEnd===this.lastTokStart+1&&this.input.charCodeAt(this.lastTokStart)===46||this.context.pop(),this.type=X.name):this.unexpected(),h},G0.parsePrivateIdent=function(){var h=this.startNode();return this.type===X.privateId?h.name=this.value:this.unexpected(),this.next(),this.finishNode(h,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(h.start,"Private field '#"+h.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(h)),h},G0.parseYield=function(h){this.yieldPos||(this.yieldPos=this.start);var m=this.startNode();return this.next(),this.type===X.semi||this.canInsertSemicolon()||this.type!==X.star&&!this.type.startsExpr?(m.delegate=!1,m.argument=null):(m.delegate=this.eat(X.star),m.argument=this.parseMaybeAssign(h)),this.finishNode(m,"YieldExpression")},G0.parseAwait=function(h){this.awaitPos||(this.awaitPos=this.start);var m=this.startNode();return this.next(),m.argument=this.parseMaybeUnary(null,!0,!1,h),this.finishNode(m,"AwaitExpression")};var nf=e0.prototype;nf.raise=function(h,m){var y=nl(this.input,h);m+=" ("+y.line+":"+y.column+")",this.sourceFile&&(m+=" in "+this.sourceFile);var W=SyntaxError(m);throw W.pos=h,W.loc=y,W.raisedAt=this.pos,W},nf.raiseRecoverable=nf.raise,nf.curPosition=function(){if(this.options.locations)return new h0(this.curLine,this.pos-this.lineStart)};var u1=e0.prototype,Zt=function(h){this.flags=h,this.var=[],this.lexical=[],this.functions=[]};u1.enterScope=function(h){this.scopeStack.push(new Zt(h))},u1.exitScope=function(){this.scopeStack.pop()},u1.treatFunctionsAsVarInScope=function(h){return 2&h.flags||!this.inModule&&1&h.flags},u1.declareName=function(h,m,y){var W=!1;if(m===2){var J=this.currentScope();W=J.lexical.indexOf(h)>-1||J.functions.indexOf(h)>-1||J.var.indexOf(h)>-1,J.lexical.push(h),this.inModule&&1&J.flags&&delete this.undefinedExports[h]}else if(m===4)this.currentScope().lexical.push(h);else if(m===3){var a=this.currentScope();W=this.treatFunctionsAsVar?a.lexical.indexOf(h)>-1:a.lexical.indexOf(h)>-1||a.var.indexOf(h)>-1,a.functions.push(h)}else for(var F=this.scopeStack.length-1;F>=0;--F){var T=this.scopeStack[F];if(T.lexical.indexOf(h)>-1&&!(32&T.flags&&T.lexical[0]===h)||!this.treatFunctionsAsVarInScope(T)&&T.functions.indexOf(h)>-1){W=!0;break}if(T.var.push(h),this.inModule&&1&T.flags&&delete this.undefinedExports[h],T.flags&gl)break}W&&this.raiseRecoverable(y,"Identifier '"+h+"' has already been declared")},u1.checkLocalExport=function(h){this.scopeStack[0].lexical.indexOf(h.name)===-1&&this.scopeStack[0].var.indexOf(h.name)===-1&&(this.undefinedExports[h.name]=h)},u1.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},u1.currentVarScope=function(){for(var h=this.scopeStack.length-1;;h--){var m=this.scopeStack[h];if(771&m.flags)return m}},u1.currentThisScope=function(){for(var h=this.scopeStack.length-1;;h--){var m=this.scopeStack[h];if(771&m.flags&&!(16&m.flags))return m}};var t1=function(h,m,y){this.type="",this.start=m,this.end=0,h.options.locations&&(this.loc=new y0(h,y)),h.options.directSourceFile&&(this.sourceFile=h.options.directSourceFile),h.options.ranges&&(this.range=[m,0])},z1=e0.prototype;function Hn(h,m,y,W){return h.type=m,h.end=y,this.options.locations&&(h.loc.end=W),this.options.ranges&&(h.range[1]=y),h}z1.startNode=function(){return new t1(this,this.start,this.startLoc)},z1.startNodeAt=function(h,m){return new t1(this,h,m)},z1.finishNode=function(h,m){return Hn.call(this,h,m,this.lastTokEnd,this.lastTokEndLoc)},z1.finishNodeAt=function(h,m,y,W){return Hn.call(this,h,m,y,W)},z1.copyNode=function(h){var m=new t1(this,h.start,this.startLoc);for(var y in h)m[y]=h[y];return m};var Ot="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",Yi=Ot+" Extended_Pictographic",Gn=Yi+" EBase EComp EMod EPres ExtPict",z5={9:Ot,10:Yi,11:Yi,12:Gn,13:Gn,14:Gn},Q5={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},Un="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",Xt="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",Yt=Xt+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Jt=Yt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",zt=Jt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",B=zt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",S={9:Xt,10:Yt,11:Jt,12:zt,13:B,14:B+" 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"},f0={};function L(h){var m=f0[h]={binary:V(z5[h]+" "+Un),binaryOfStrings:V(Q5[h]),nonBinary:{General_Category:V(Un),Script:V(S[h])}};m.nonBinary.Script_Extensions=m.nonBinary.Script,m.nonBinary.gc=m.nonBinary.General_Category,m.nonBinary.sc=m.nonBinary.Script,m.nonBinary.scx=m.nonBinary.Script_Extensions}for(var o0=0,n0=[9,10,11,12,13,14];o0<n0.length;o0+=1)L(n0[o0]);var E=e0.prototype,b0=function(h,m){this.parent=h,this.base=m||this};b0.prototype.separatedFrom=function(h){for(var m=this;m;m=m.parent)for(var y=h;y;y=y.parent)if(m.base===y.base&&m!==y)return!0;return!1},b0.prototype.sibling=function(){return new b0(this.parent,this.base)};var K0=function(h){this.parser=h,this.validFlags="gim"+(h.options.ecmaVersion>=6?"uy":"")+(h.options.ecmaVersion>=9?"s":"")+(h.options.ecmaVersion>=13?"d":"")+(h.options.ecmaVersion>=15?"v":""),this.unicodeProperties=f0[h.options.ecmaVersion>=14?14:h.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};function B0(h){return h===105||h===109||h===115}function ll(h){return h===36||h>=40&&h<=43||h===46||h===63||h>=91&&h<=94||h>=123&&h<=125}function E0(h){return h>=65&&h<=90||h>=97&&h<=122}K0.prototype.reset=function(h,m,y){var W=y.indexOf("v")!==-1,J=y.indexOf("u")!==-1;this.start=0|h,this.source=m+"",this.flags=y,W&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=J&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=J&&this.parser.options.ecmaVersion>=9)},K0.prototype.raise=function(h){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+h)},K0.prototype.at=function(h,m){m===void 0&&(m=!1);var y=this.source,W=y.length;if(h>=W)return-1;var J=y.charCodeAt(h);if(!m&&!this.switchU||J<=55295||J>=57344||h+1>=W)return J;var a=y.charCodeAt(h+1);return a>=56320&&a<=57343?(J<<10)+a-56613888:J},K0.prototype.nextIndex=function(h,m){m===void 0&&(m=!1);var y=this.source,W=y.length;if(h>=W)return W;var J,a=y.charCodeAt(h);return!m&&!this.switchU||a<=55295||a>=57344||h+1>=W||(J=y.charCodeAt(h+1))<56320||J>57343?h+1:h+2},K0.prototype.current=function(h){return h===void 0&&(h=!1),this.at(this.pos,h)},K0.prototype.lookahead=function(h){return h===void 0&&(h=!1),this.at(this.nextIndex(this.pos,h),h)},K0.prototype.advance=function(h){h===void 0&&(h=!1),this.pos=this.nextIndex(this.pos,h)},K0.prototype.eat=function(h,m){return m===void 0&&(m=!1),this.current(m)===h&&(this.advance(m),!0)},K0.prototype.eatChars=function(h,m){m===void 0&&(m=!1);for(var y=this.pos,W=0,J=h;W<J.length;W+=1){var a=J[W],F=this.at(y,m);if(F===-1||F!==a)return!1;y=this.nextIndex(y,m)}return this.pos=y,!0},E.validateRegExpFlags=function(h){for(var{validFlags:m,flags:y}=h,W=!1,J=!1,a=0;a<y.length;a++){var F=y.charAt(a);m.indexOf(F)===-1&&this.raise(h.start,"Invalid regular expression flag"),y.indexOf(F,a+1)>-1&&this.raise(h.start,"Duplicate regular expression flag"),F==="u"&&(W=!0),F==="v"&&(J=!0)}this.options.ecmaVersion>=15&&W&&J&&this.raise(h.start,"Invalid regular expression flag")},E.validateRegExpPattern=function(h){this.regexp_pattern(h),!h.switchN&&this.options.ecmaVersion>=9&&function(m){for(var y in m)return!0;return!1}(h.groupNames)&&(h.switchN=!0,this.regexp_pattern(h))},E.regexp_pattern=function(h){h.pos=0,h.lastIntValue=0,h.lastStringValue="",h.lastAssertionIsQuantifiable=!1,h.numCapturingParens=0,h.maxBackReference=0,h.groupNames=Object.create(null),h.backReferenceNames.length=0,h.branchID=null,this.regexp_disjunction(h),h.pos!==h.source.length&&(h.eat(41)&&h.raise("Unmatched ')'"),(h.eat(93)||h.eat(125))&&h.raise("Lone quantifier brackets")),h.maxBackReference>h.numCapturingParens&&h.raise("Invalid escape");for(var m=0,y=h.backReferenceNames;m<y.length;m+=1){var W=y[m];h.groupNames[W]||h.raise("Invalid named capture referenced")}},E.regexp_disjunction=function(h){var m=this.options.ecmaVersion>=16;for(m&&(h.branchID=new b0(h.branchID,null)),this.regexp_alternative(h);h.eat(124);)m&&(h.branchID=h.branchID.sibling()),this.regexp_alternative(h);m&&(h.branchID=h.branchID.parent),this.regexp_eatQuantifier(h,!0)&&h.raise("Nothing to repeat"),h.eat(123)&&h.raise("Lone quantifier brackets")},E.regexp_alternative=function(h){for(;h.pos<h.source.length&&this.regexp_eatTerm(h););},E.regexp_eatTerm=function(h){return this.regexp_eatAssertion(h)?(h.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(h)&&h.switchU&&h.raise("Invalid quantifier"),!0):!!(h.switchU?this.regexp_eatAtom(h):this.regexp_eatExtendedAtom(h))&&(this.regexp_eatQuantifier(h),!0)},E.regexp_eatAssertion=function(h){var m=h.pos;if(h.lastAssertionIsQuantifiable=!1,h.eat(94)||h.eat(36))return!0;if(h.eat(92)){if(h.eat(66)||h.eat(98))return!0;h.pos=m}if(h.eat(40)&&h.eat(63)){var y=!1;if(this.options.ecmaVersion>=9&&(y=h.eat(60)),h.eat(61)||h.eat(33))return this.regexp_disjunction(h),h.eat(41)||h.raise("Unterminated group"),h.lastAssertionIsQuantifiable=!y,!0}return h.pos=m,!1},E.regexp_eatQuantifier=function(h,m){return m===void 0&&(m=!1),!!this.regexp_eatQuantifierPrefix(h,m)&&(h.eat(63),!0)},E.regexp_eatQuantifierPrefix=function(h,m){return h.eat(42)||h.eat(43)||h.eat(63)||this.regexp_eatBracedQuantifier(h,m)},E.regexp_eatBracedQuantifier=function(h,m){var y=h.pos;if(h.eat(123)){var W=0,J=-1;if(this.regexp_eatDecimalDigits(h)&&(W=h.lastIntValue,h.eat(44)&&this.regexp_eatDecimalDigits(h)&&(J=h.lastIntValue),h.eat(125)))return J!==-1&&J<W&&!m&&h.raise("numbers out of order in {} quantifier"),!0;h.switchU&&!m&&h.raise("Incomplete quantifier"),h.pos=y}return!1},E.regexp_eatAtom=function(h){return this.regexp_eatPatternCharacters(h)||h.eat(46)||this.regexp_eatReverseSolidusAtomEscape(h)||this.regexp_eatCharacterClass(h)||this.regexp_eatUncapturingGroup(h)||this.regexp_eatCapturingGroup(h)},E.regexp_eatReverseSolidusAtomEscape=function(h){var m=h.pos;if(h.eat(92)){if(this.regexp_eatAtomEscape(h))return!0;h.pos=m}return!1},E.regexp_eatUncapturingGroup=function(h){var m=h.pos;if(h.eat(40)){if(h.eat(63)){if(this.options.ecmaVersion>=16){var y=this.regexp_eatModifiers(h),W=h.eat(45);if(y||W){for(var J=0;J<y.length;J++){var a=y.charAt(J);y.indexOf(a,J+1)>-1&&h.raise("Duplicate regular expression modifiers")}if(W){var F=this.regexp_eatModifiers(h);y||F||h.current()!==58||h.raise("Invalid regular expression modifiers");for(var T=0;T<F.length;T++){var D=F.charAt(T);(F.indexOf(D,T+1)>-1||y.indexOf(D)>-1)&&h.raise("Duplicate regular expression modifiers")}}}}if(h.eat(58)){if(this.regexp_disjunction(h),h.eat(41))return!0;h.raise("Unterminated group")}}h.pos=m}return!1},E.regexp_eatCapturingGroup=function(h){if(h.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(h):h.current()===63&&h.raise("Invalid group"),this.regexp_disjunction(h),h.eat(41))return h.numCapturingParens+=1,!0;h.raise("Unterminated group")}return!1},E.regexp_eatModifiers=function(h){for(var m="",y=0;(y=h.current())!==-1&&B0(y);)m+=x(y),h.advance();return m},E.regexp_eatExtendedAtom=function(h){return h.eat(46)||this.regexp_eatReverseSolidusAtomEscape(h)||this.regexp_eatCharacterClass(h)||this.regexp_eatUncapturingGroup(h)||this.regexp_eatCapturingGroup(h)||this.regexp_eatInvalidBracedQuantifier(h)||this.regexp_eatExtendedPatternCharacter(h)},E.regexp_eatInvalidBracedQuantifier=function(h){return this.regexp_eatBracedQuantifier(h,!0)&&h.raise("Nothing to repeat"),!1},E.regexp_eatSyntaxCharacter=function(h){var m=h.current();return!!ll(m)&&(h.lastIntValue=m,h.advance(),!0)},E.regexp_eatPatternCharacters=function(h){for(var m=h.pos,y=0;(y=h.current())!==-1&&!ll(y);)h.advance();return h.pos!==m},E.regexp_eatExtendedPatternCharacter=function(h){var m=h.current();return!(m===-1||m===36||m>=40&&m<=43||m===46||m===63||m===91||m===94||m===124)&&(h.advance(),!0)},E.regexp_groupSpecifier=function(h){if(h.eat(63)){this.regexp_eatGroupName(h)||h.raise("Invalid group");var m=this.options.ecmaVersion>=16,y=h.groupNames[h.lastStringValue];if(y)if(m)for(var W=0,J=y;W<J.length;W+=1)J[W].separatedFrom(h.branchID)||h.raise("Duplicate capture group name");else h.raise("Duplicate capture group name");m?(y||(h.groupNames[h.lastStringValue]=[])).push(h.branchID):h.groupNames[h.lastStringValue]=!0}},E.regexp_eatGroupName=function(h){if(h.lastStringValue="",h.eat(60)){if(this.regexp_eatRegExpIdentifierName(h)&&h.eat(62))return!0;h.raise("Invalid capture group name")}return!1},E.regexp_eatRegExpIdentifierName=function(h){if(h.lastStringValue="",this.regexp_eatRegExpIdentifierStart(h)){for(h.lastStringValue+=x(h.lastIntValue);this.regexp_eatRegExpIdentifierPart(h);)h.lastStringValue+=x(h.lastIntValue);return!0}return!1},E.regexp_eatRegExpIdentifierStart=function(h){var m=h.pos,y=this.options.ecmaVersion>=11,W=h.current(y);return h.advance(y),W===92&&this.regexp_eatRegExpUnicodeEscapeSequence(h,y)&&(W=h.lastIntValue),function(J){return Y(J,!0)||J===36||J===95}(W)?(h.lastIntValue=W,!0):(h.pos=m,!1)},E.regexp_eatRegExpIdentifierPart=function(h){var m=h.pos,y=this.options.ecmaVersion>=11,W=h.current(y);return h.advance(y),W===92&&this.regexp_eatRegExpUnicodeEscapeSequence(h,y)&&(W=h.lastIntValue),function(J){return z(J,!0)||J===36||J===95||J===8204||J===8205}(W)?(h.lastIntValue=W,!0):(h.pos=m,!1)},E.regexp_eatAtomEscape=function(h){return!!(this.regexp_eatBackReference(h)||this.regexp_eatCharacterClassEscape(h)||this.regexp_eatCharacterEscape(h)||h.switchN&&this.regexp_eatKGroupName(h))||(h.switchU&&(h.current()===99&&h.raise("Invalid unicode escape"),h.raise("Invalid escape")),!1)},E.regexp_eatBackReference=function(h){var m=h.pos;if(this.regexp_eatDecimalEscape(h)){var y=h.lastIntValue;if(h.switchU)return y>h.maxBackReference&&(h.maxBackReference=y),!0;if(y<=h.numCapturingParens)return!0;h.pos=m}return!1},E.regexp_eatKGroupName=function(h){if(h.eat(107)){if(this.regexp_eatGroupName(h))return h.backReferenceNames.push(h.lastStringValue),!0;h.raise("Invalid named reference")}return!1},E.regexp_eatCharacterEscape=function(h){return this.regexp_eatControlEscape(h)||this.regexp_eatCControlLetter(h)||this.regexp_eatZero(h)||this.regexp_eatHexEscapeSequence(h)||this.regexp_eatRegExpUnicodeEscapeSequence(h,!1)||!h.switchU&&this.regexp_eatLegacyOctalEscapeSequence(h)||this.regexp_eatIdentityEscape(h)},E.regexp_eatCControlLetter=function(h){var m=h.pos;if(h.eat(99)){if(this.regexp_eatControlLetter(h))return!0;h.pos=m}return!1},E.regexp_eatZero=function(h){return h.current()===48&&!ol(h.lookahead())&&(h.lastIntValue=0,h.advance(),!0)},E.regexp_eatControlEscape=function(h){var m=h.current();return m===116?(h.lastIntValue=9,h.advance(),!0):m===110?(h.lastIntValue=10,h.advance(),!0):m===118?(h.lastIntValue=11,h.advance(),!0):m===102?(h.lastIntValue=12,h.advance(),!0):m===114&&(h.lastIntValue=13,h.advance(),!0)},E.regexp_eatControlLetter=function(h){var m=h.current();return!!E0(m)&&(h.lastIntValue=m%32,h.advance(),!0)},E.regexp_eatRegExpUnicodeEscapeSequence=function(h,m){m===void 0&&(m=!1);var y,W=h.pos,J=m||h.switchU;if(h.eat(117)){if(this.regexp_eatFixedHexDigits(h,4)){var a=h.lastIntValue;if(J&&a>=55296&&a<=56319){var F=h.pos;if(h.eat(92)&&h.eat(117)&&this.regexp_eatFixedHexDigits(h,4)){var T=h.lastIntValue;if(T>=56320&&T<=57343)return h.lastIntValue=1024*(a-55296)+(T-56320)+65536,!0}h.pos=F,h.lastIntValue=a}return!0}if(J&&h.eat(123)&&this.regexp_eatHexDigits(h)&&h.eat(125)&&((y=h.lastIntValue)>=0&&y<=1114111))return!0;J&&h.raise("Invalid unicode escape"),h.pos=W}return!1},E.regexp_eatIdentityEscape=function(h){if(h.switchU)return!!this.regexp_eatSyntaxCharacter(h)||!!h.eat(47)&&(h.lastIntValue=47,!0);var m=h.current();return!(m===99||h.switchN&&m===107)&&(h.lastIntValue=m,h.advance(),!0)},E.regexp_eatDecimalEscape=function(h){h.lastIntValue=0;var m=h.current();if(m>=49&&m<=57){do h.lastIntValue=10*h.lastIntValue+(m-48),h.advance();while((m=h.current())>=48&&m<=57);return!0}return!1};function cl(h){return E0(h)||h===95}function hl(h){return cl(h)||ol(h)}function ol(h){return h>=48&&h<=57}function wl(h){return h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102}function Zl(h){return h>=65&&h<=70?h-65+10:h>=97&&h<=102?h-97+10:h-48}function Or(h){return h>=48&&h<=55}E.regexp_eatCharacterClassEscape=function(h){var m=h.current();if(function(J){return J===100||J===68||J===115||J===83||J===119||J===87}(m))return h.lastIntValue=-1,h.advance(),1;var y=!1;if(h.switchU&&this.options.ecmaVersion>=9&&((y=m===80)||m===112)){var W;if(h.lastIntValue=-1,h.advance(),h.eat(123)&&(W=this.regexp_eatUnicodePropertyValueExpression(h))&&h.eat(125))return y&&W===2&&h.raise("Invalid property name"),W;h.raise("Invalid property name")}return 0},E.regexp_eatUnicodePropertyValueExpression=function(h){var m=h.pos;if(this.regexp_eatUnicodePropertyName(h)&&h.eat(61)){var y=h.lastStringValue;if(this.regexp_eatUnicodePropertyValue(h)){var W=h.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(h,y,W),1}}if(h.pos=m,this.regexp_eatLoneUnicodePropertyNameOrValue(h)){var J=h.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(h,J)}return 0},E.regexp_validateUnicodePropertyNameAndValue=function(h,m,y){Q(h.unicodeProperties.nonBinary,m)||h.raise("Invalid property name"),h.unicodeProperties.nonBinary[m].test(y)||h.raise("Invalid property value")},E.regexp_validateUnicodePropertyNameOrValue=function(h,m){return h.unicodeProperties.binary.test(m)?1:h.switchV&&h.unicodeProperties.binaryOfStrings.test(m)?2:void h.raise("Invalid property name")},E.regexp_eatUnicodePropertyName=function(h){var m=0;for(h.lastStringValue="";cl(m=h.current());)h.lastStringValue+=x(m),h.advance();return h.lastStringValue!==""},E.regexp_eatUnicodePropertyValue=function(h){var m=0;for(h.lastStringValue="";hl(m=h.current());)h.lastStringValue+=x(m),h.advance();return h.lastStringValue!==""},E.regexp_eatLoneUnicodePropertyNameOrValue=function(h){return this.regexp_eatUnicodePropertyValue(h)},E.regexp_eatCharacterClass=function(h){if(h.eat(91)){var m=h.eat(94),y=this.regexp_classContents(h);return h.eat(93)||h.raise("Unterminated character class"),m&&y===2&&h.raise("Negated character class may contain strings"),!0}return!1},E.regexp_classContents=function(h){return h.current()===93?1:h.switchV?this.regexp_classSetExpression(h):(this.regexp_nonEmptyClassRanges(h),1)},E.regexp_nonEmptyClassRanges=function(h){for(;this.regexp_eatClassAtom(h);){var m=h.lastIntValue;if(h.eat(45)&&this.regexp_eatClassAtom(h)){var y=h.lastIntValue;!h.switchU||m!==-1&&y!==-1||h.raise("Invalid character class"),m!==-1&&y!==-1&&m>y&&h.raise("Range out of order in character class")}}},E.regexp_eatClassAtom=function(h){var m=h.pos;if(h.eat(92)){if(this.regexp_eatClassEscape(h))return!0;if(h.switchU){var y=h.current();(y===99||Or(y))&&h.raise("Invalid class escape"),h.raise("Invalid escape")}h.pos=m}var W=h.current();return W!==93&&(h.lastIntValue=W,h.advance(),!0)},E.regexp_eatClassEscape=function(h){var m=h.pos;if(h.eat(98))return h.lastIntValue=8,!0;if(h.switchU&&h.eat(45))return h.lastIntValue=45,!0;if(!h.switchU&&h.eat(99)){if(this.regexp_eatClassControlLetter(h))return!0;h.pos=m}return this.regexp_eatCharacterClassEscape(h)||this.regexp_eatCharacterEscape(h)},E.regexp_classSetExpression=function(h){var m,y=1;if(this.regexp_eatClassSetRange(h));else if(m=this.regexp_eatClassSetOperand(h)){m===2&&(y=2);for(var W=h.pos;h.eatChars([38,38]);)h.current()!==38&&(m=this.regexp_eatClassSetOperand(h))?m!==2&&(y=1):h.raise("Invalid character in character class");if(W!==h.pos)return y;for(;h.eatChars([45,45]);)this.regexp_eatClassSetOperand(h)||h.raise("Invalid character in character class");if(W!==h.pos)return y}else h.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(h)){if(!(m=this.regexp_eatClassSetOperand(h)))return y;m===2&&(y=2)}},E.regexp_eatClassSetRange=function(h){var m=h.pos;if(this.regexp_eatClassSetCharacter(h)){var y=h.lastIntValue;if(h.eat(45)&&this.regexp_eatClassSetCharacter(h)){var W=h.lastIntValue;return y!==-1&&W!==-1&&y>W&&h.raise("Range out of order in character class"),!0}h.pos=m}return!1},E.regexp_eatClassSetOperand=function(h){return this.regexp_eatClassSetCharacter(h)?1:this.regexp_eatClassStringDisjunction(h)||this.regexp_eatNestedClass(h)},E.regexp_eatNestedClass=function(h){var m=h.pos;if(h.eat(91)){var y=h.eat(94),W=this.regexp_classContents(h);if(h.eat(93))return y&&W===2&&h.raise("Negated character class may contain strings"),W;h.pos=m}if(h.eat(92)){var J=this.regexp_eatCharacterClassEscape(h);if(J)return J;h.pos=m}return null},E.regexp_eatClassStringDisjunction=function(h){var m=h.pos;if(h.eatChars([92,113])){if(h.eat(123)){var y=this.regexp_classStringDisjunctionContents(h);if(h.eat(125))return y}else h.raise("Invalid escape");h.pos=m}return null},E.regexp_classStringDisjunctionContents=function(h){for(var m=this.regexp_classString(h);h.eat(124);)this.regexp_classString(h)===2&&(m=2);return m},E.regexp_classString=function(h){for(var m=0;this.regexp_eatClassSetCharacter(h);)m++;return m===1?1:2},E.regexp_eatClassSetCharacter=function(h){var m=h.pos;if(h.eat(92))return!(!this.regexp_eatCharacterEscape(h)&&!this.regexp_eatClassSetReservedPunctuator(h))||(h.eat(98)?(h.lastIntValue=8,!0):(h.pos=m,!1));var y=h.current();return!(y<0||y===h.lookahead()&&function(W){return W===33||W>=35&&W<=38||W>=42&&W<=44||W===46||W>=58&&W<=64||W===94||W===96||W===126}(y))&&(!function(W){return W===40||W===41||W===45||W===47||W>=91&&W<=93||W>=123&&W<=125}(y)&&(h.advance(),h.lastIntValue=y,!0))},E.regexp_eatClassSetReservedPunctuator=function(h){var m=h.current();return!!function(y){return y===33||y===35||y===37||y===38||y===44||y===45||y>=58&&y<=62||y===64||y===96||y===126}(m)&&(h.lastIntValue=m,h.advance(),!0)},E.regexp_eatClassControlLetter=function(h){var m=h.current();return!(!ol(m)&&m!==95)&&(h.lastIntValue=m%32,h.advance(),!0)},E.regexp_eatHexEscapeSequence=function(h){var m=h.pos;if(h.eat(120)){if(this.regexp_eatFixedHexDigits(h,2))return!0;h.switchU&&h.raise("Invalid escape"),h.pos=m}return!1},E.regexp_eatDecimalDigits=function(h){var m=h.pos,y=0;for(h.lastIntValue=0;ol(y=h.current());)h.lastIntValue=10*h.lastIntValue+(y-48),h.advance();return h.pos!==m},E.regexp_eatHexDigits=function(h){var m=h.pos,y=0;for(h.lastIntValue=0;wl(y=h.current());)h.lastIntValue=16*h.lastIntValue+Zl(y),h.advance();return h.pos!==m},E.regexp_eatLegacyOctalEscapeSequence=function(h){if(this.regexp_eatOctalDigit(h)){var m=h.lastIntValue;if(this.regexp_eatOctalDigit(h)){var y=h.lastIntValue;m<=3&&this.regexp_eatOctalDigit(h)?h.lastIntValue=64*m+8*y+h.lastIntValue:h.lastIntValue=8*m+y}else h.lastIntValue=m;return!0}return!1},E.regexp_eatOctalDigit=function(h){var m=h.current();return Or(m)?(h.lastIntValue=m-48,h.advance(),!0):(h.lastIntValue=0,!1)},E.regexp_eatFixedHexDigits=function(h,m){var y=h.pos;h.lastIntValue=0;for(var W=0;W<m;++W){var J=h.current();if(!wl(J))return h.pos=y,!1;h.lastIntValue=16*h.lastIntValue+Zl(J),h.advance()}return!0};var h1=function(h){this.type=h.type,this.value=h.value,this.start=h.start,this.end=h.end,h.options.locations&&(this.loc=new y0(h,h.startLoc,h.endLoc)),h.options.ranges&&(this.range=[h.start,h.end])},k0=e0.prototype;function Nl(h){return typeof BigInt!="function"?null:BigInt(h.replace(/_/g,""))}k0.next=function(h){!h&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new h1(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},k0.getToken=function(){return this.next(),new h1(this)},typeof Symbol<"u"&&(k0[Symbol.iterator]=function(){var h=this;return{next:function(){var m=h.getToken();return{done:m.type===X.eof,value:m}}}}),k0.nextToken=function(){var h=this.curContext();return h&&h.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(X.eof):h.override?h.override(this):void this.readToken(this.fullCharCodeAtPos())},k0.readToken=function(h){return Y(h,this.options.ecmaVersion>=6)||h===92?this.readWord():this.getTokenFromCode(h)},k0.fullCharCodeAt=function(h){var m=this.input.charCodeAt(h);if(m<=55295||m>=56320)return m;var y=this.input.charCodeAt(h+1);return y<=56319||y>=57344?m:(m<<10)+y-56613888},k0.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},k0.skipBlockComment=function(){var h=this.options.onComment&&this.curPosition(),m=this.pos,y=this.input.indexOf("*/",this.pos+=2);if(y===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=y+2,this.options.locations)for(var W=void 0,J=m;(W=r0(this.input,J,this.pos))>-1;)++this.curLine,J=this.lineStart=W;this.options.onComment&&this.options.onComment(!0,this.input.slice(m+2,y),m,this.pos,h,this.curPosition())},k0.skipLineComment=function(h){for(var m=this.pos,y=this.options.onComment&&this.curPosition(),W=this.input.charCodeAt(this.pos+=h);this.pos<this.input.length&&!l0(W);)W=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(m+h,this.pos),m,this.pos,y,this.curPosition())},k0.skipSpace=function(){l:for(;this.pos<this.input.length;){var h=this.input.charCodeAt(this.pos);switch(h){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 l}break;default:if(!(h>8&&h<14||h>=5760&&u0.test(String.fromCharCode(h))))break l;++this.pos}}},k0.finishToken=function(h,m){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var y=this.type;this.type=h,this.value=m,this.updateContext(y)},k0.readToken_dot=function(){var h=this.input.charCodeAt(this.pos+1);if(h>=48&&h<=57)return this.readNumber(!0);var m=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&h===46&&m===46?(this.pos+=3,this.finishToken(X.ellipsis)):(++this.pos,this.finishToken(X.dot))},k0.readToken_slash=function(){var h=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):h===61?this.finishOp(X.assign,2):this.finishOp(X.slash,1)},k0.readToken_mult_modulo_exp=function(h){var m=this.input.charCodeAt(this.pos+1),y=1,W=h===42?X.star:X.modulo;return this.options.ecmaVersion>=7&&h===42&&m===42&&(++y,W=X.starstar,m=this.input.charCodeAt(this.pos+2)),m===61?this.finishOp(X.assign,y+1):this.finishOp(W,y)},k0.readToken_pipe_amp=function(h){var m=this.input.charCodeAt(this.pos+1);if(m===h){if(this.options.ecmaVersion>=12){if(this.input.charCodeAt(this.pos+2)===61)return this.finishOp(X.assign,3)}return this.finishOp(h===124?X.logicalOR:X.logicalAND,2)}return m===61?this.finishOp(X.assign,2):this.finishOp(h===124?X.bitwiseOR:X.bitwiseAND,1)},k0.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(X.assign,2):this.finishOp(X.bitwiseXOR,1)},k0.readToken_plus_min=function(h){var m=this.input.charCodeAt(this.pos+1);return m===h?m!==45||this.inModule||this.input.charCodeAt(this.pos+2)!==62||this.lastTokEnd!==0&&!P.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(X.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):m===61?this.finishOp(X.assign,2):this.finishOp(X.plusMin,1)},k0.readToken_lt_gt=function(h){var m=this.input.charCodeAt(this.pos+1),y=1;return m===h?(y=h===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+y)===61?this.finishOp(X.assign,y+1):this.finishOp(X.bitShift,y)):m!==33||h!==60||this.inModule||this.input.charCodeAt(this.pos+2)!==45||this.input.charCodeAt(this.pos+3)!==45?(m===61&&(y=2),this.finishOp(X.relational,y)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},k0.readToken_eq_excl=function(h){var m=this.input.charCodeAt(this.pos+1);return m===61?this.finishOp(X.equality,this.input.charCodeAt(this.pos+2)===61?3:2):h===61&&m===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(X.arrow)):this.finishOp(h===61?X.eq:X.prefix,1)},k0.readToken_question=function(){var h=this.options.ecmaVersion;if(h>=11){var m=this.input.charCodeAt(this.pos+1);if(m===46){var y=this.input.charCodeAt(this.pos+2);if(y<48||y>57)return this.finishOp(X.questionDot,2)}if(m===63){if(h>=12){if(this.input.charCodeAt(this.pos+2)===61)return this.finishOp(X.assign,3)}return this.finishOp(X.coalesce,2)}}return this.finishOp(X.question,1)},k0.readToken_numberSign=function(){var h=35;if(this.options.ecmaVersion>=13&&(++this.pos,Y(h=this.fullCharCodeAtPos(),!0)||h===92))return this.finishToken(X.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+x(h)+"'")},k0.getTokenFromCode=function(h){switch(h){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(X.parenL);case 41:return++this.pos,this.finishToken(X.parenR);case 59:return++this.pos,this.finishToken(X.semi);case 44:return++this.pos,this.finishToken(X.comma);case 91:return++this.pos,this.finishToken(X.bracketL);case 93:return++this.pos,this.finishToken(X.bracketR);case 123:return++this.pos,this.finishToken(X.braceL);case 125:return++this.pos,this.finishToken(X.braceR);case 58:return++this.pos,this.finishToken(X.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(X.backQuote);case 48:var m=this.input.charCodeAt(this.pos+1);if(m===120||m===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(m===111||m===79)return this.readRadixNumber(8);if(m===98||m===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(h);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(h);case 124:case 38:return this.readToken_pipe_amp(h);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(h);case 60:case 62:return this.readToken_lt_gt(h);case 61:case 33:return this.readToken_eq_excl(h);case 63:return this.readToken_question();case 126:return this.finishOp(X.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+x(h)+"'")},k0.finishOp=function(h,m){var y=this.input.slice(this.pos,this.pos+m);return this.pos+=m,this.finishToken(h,y)},k0.readRegexp=function(){for(var h,m,y=this.pos;;){this.pos>=this.input.length&&this.raise(y,"Unterminated regular expression");var W=this.input.charAt(this.pos);if(P.test(W)&&this.raise(y,"Unterminated regular expression"),h)h=!1;else{if(W==="[")m=!0;else if(W==="]"&&m)m=!1;else if(W==="/"&&!m)break;h=W==="\\"}++this.pos}var J=this.input.slice(y,this.pos);++this.pos;var a=this.pos,F=this.readWord1();this.containsEsc&&this.unexpected(a);var T=this.regexpState||(this.regexpState=new K0(this));T.reset(y,J,F),this.validateRegExpFlags(T),this.validateRegExpPattern(T);var D=null;try{D=new RegExp(J,F)}catch(i0){}return this.finishToken(X.regexp,{pattern:J,flags:F,value:D})},k0.readInt=function(h,m,y){for(var W=this.options.ecmaVersion>=12&&m===void 0,J=y&&this.input.charCodeAt(this.pos)===48,a=this.pos,F=0,T=0,D=0,i0=m==null?1/0:m;D<i0;++D,++this.pos){var s=this.input.charCodeAt(this.pos),$0=void 0;if(W&&s===95)J&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),T===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),D===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),T=s;else{if(($0=s>=97?s-97+10:s>=65?s-65+10:s>=48&&s<=57?s-48:1/0)>=h)break;T=s,F=F*h+$0}}return W&&T===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||m!=null&&this.pos-a!==m?null:F},k0.readRadixNumber=function(h){var m=this.pos;this.pos+=2;var y=this.readInt(h);return y==null&&this.raise(this.start+2,"Expected number in radix "+h),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(y=Nl(this.input.slice(m,this.pos)),++this.pos):Y(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(X.num,y)},k0.readNumber=function(h){var m=this.pos;h||this.readInt(10,void 0,!0)!==null||this.raise(m,"Invalid number");var y=this.pos-m>=2&&this.input.charCodeAt(m)===48;y&&this.strict&&this.raise(m,"Invalid number");var W=this.input.charCodeAt(this.pos);if(!y&&!h&&this.options.ecmaVersion>=11&&W===110){var J=Nl(this.input.slice(m,this.pos));return++this.pos,Y(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(X.num,J)}y&&/[89]/.test(this.input.slice(m,this.pos))&&(y=!1),W!==46||y||(++this.pos,this.readInt(10),W=this.input.charCodeAt(this.pos)),W!==69&&W!==101||y||((W=this.input.charCodeAt(++this.pos))!==43&&W!==45||++this.pos,this.readInt(10)===null&&this.raise(m,"Invalid number")),Y(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a,F=(a=this.input.slice(m,this.pos),y?parseInt(a,8):parseFloat(a.replace(/_/g,"")));return this.finishToken(X.num,F)},k0.readCodePoint=function(){var h;if(this.input.charCodeAt(this.pos)===123){this.options.ecmaVersion<6&&this.unexpected();var m=++this.pos;h=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,h>1114111&&this.invalidStringToken(m,"Code point out of bounds")}else h=this.readHexChar(4);return h},k0.readString=function(h){for(var m="",y=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var W=this.input.charCodeAt(this.pos);if(W===h)break;W===92?(m+=this.input.slice(y,this.pos),m+=this.readEscapedChar(!1),y=this.pos):W===8232||W===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(l0(W)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return m+=this.input.slice(y,this.pos++),this.finishToken(X.string,m)};var sl={};k0.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(h){if(h!==sl)throw h;this.readInvalidTemplateToken()}this.inTemplateElement=!1},k0.invalidStringToken=function(h,m){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw sl;this.raise(h,m)},k0.readTmplToken=function(){for(var h="",m=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var y=this.input.charCodeAt(this.pos);if(y===96||y===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos!==this.start||this.type!==X.template&&this.type!==X.invalidTemplate?(h+=this.input.slice(m,this.pos),this.finishToken(X.template,h)):y===36?(this.pos+=2,this.finishToken(X.dollarBraceL)):(++this.pos,this.finishToken(X.backQuote));if(y===92)h+=this.input.slice(m,this.pos),h+=this.readEscapedChar(!0),m=this.pos;else if(l0(y)){switch(h+=this.input.slice(m,this.pos),++this.pos,y){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:h+=`
195
+ `),cooked:this.value},this.next(),y.tail=this.type===X.backQuote,this.finishNode(y,"TemplateElement")},G0.parseTemplate=function(h){h===void 0&&(h={});var m=h.isTagged;m===void 0&&(m=!1);var y=this.startNode();this.next(),y.expressions=[];var W=this.parseTemplateElement({isTagged:m});for(y.quasis=[W];!W.tail;)this.type===X.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(X.dollarBraceL),y.expressions.push(this.parseExpression()),this.expect(X.braceR),y.quasis.push(W=this.parseTemplateElement({isTagged:m}));return this.next(),this.finishNode(y,"TemplateLiteral")},G0.isAsyncProp=function(h){return!h.computed&&h.key.type==="Identifier"&&h.key.name==="async"&&(this.type===X.name||this.type===X.num||this.type===X.string||this.type===X.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===X.star)&&!P.test(this.input.slice(this.lastTokEnd,this.start))},G0.parseObj=function(h,m){var y=this.startNode(),W=!0,J={};for(y.properties=[],this.next();!this.eat(X.braceR);){if(W)W=!1;else if(this.expect(X.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(X.braceR))break;var a=this.parseProperty(h,m);h||this.checkPropClash(a,J,m),y.properties.push(a)}return this.finishNode(y,h?"ObjectPattern":"ObjectExpression")},G0.parseProperty=function(h,m){var y,W,J,a,F=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(X.ellipsis))return h?(F.argument=this.parseIdent(!1),this.type===X.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(F,"RestElement")):(F.argument=this.parseMaybeAssign(!1,m),this.type===X.comma&&m&&m.trailingComma<0&&(m.trailingComma=this.start),this.finishNode(F,"SpreadElement"));this.options.ecmaVersion>=6&&(F.method=!1,F.shorthand=!1,(h||m)&&(J=this.start,a=this.startLoc),h||(y=this.eat(X.star)));var T=this.containsEsc;return this.parsePropertyName(F),!h&&!T&&this.options.ecmaVersion>=8&&!y&&this.isAsyncProp(F)?(W=!0,y=this.options.ecmaVersion>=9&&this.eat(X.star),this.parsePropertyName(F)):W=!1,this.parsePropertyValue(F,h,y,W,J,a,m,T),this.finishNode(F,"Property")},G0.parseGetterSetter=function(h){var m=h.key.name;this.parsePropertyName(h),h.value=this.parseMethod(!1),h.kind=m;var y=h.kind==="get"?0:1;if(h.value.params.length!==y){var W=h.value.start;h.kind==="get"?this.raiseRecoverable(W,"getter should have no params"):this.raiseRecoverable(W,"setter should have exactly one param")}else h.kind==="set"&&h.value.params[0].type==="RestElement"&&this.raiseRecoverable(h.value.params[0].start,"Setter cannot use rest params")},G0.parsePropertyValue=function(h,m,y,W,J,a,F,T){(y||W)&&this.type===X.colon&&this.unexpected(),this.eat(X.colon)?(h.value=m?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,F),h.kind="init"):this.options.ecmaVersion>=6&&this.type===X.parenL?(m&&this.unexpected(),h.method=!0,h.value=this.parseMethod(y,W),h.kind="init"):m||T||!(this.options.ecmaVersion>=5)||h.computed||h.key.type!=="Identifier"||h.key.name!=="get"&&h.key.name!=="set"||this.type===X.comma||this.type===X.braceR||this.type===X.eq?this.options.ecmaVersion>=6&&!h.computed&&h.key.type==="Identifier"?((y||W)&&this.unexpected(),this.checkUnreserved(h.key),h.key.name!=="await"||this.awaitIdentPos||(this.awaitIdentPos=J),m?h.value=this.parseMaybeDefault(J,a,this.copyNode(h.key)):this.type===X.eq&&F?(F.shorthandAssign<0&&(F.shorthandAssign=this.start),h.value=this.parseMaybeDefault(J,a,this.copyNode(h.key))):h.value=this.copyNode(h.key),h.kind="init",h.shorthand=!0):this.unexpected():((y||W)&&this.unexpected(),this.parseGetterSetter(h))},G0.parsePropertyName=function(h){if(this.options.ecmaVersion>=6){if(this.eat(X.bracketL))return h.computed=!0,h.key=this.parseMaybeAssign(),this.expect(X.bracketR),h.key;h.computed=!1}return h.key=this.type===X.num||this.type===X.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},G0.initFunction=function(h){h.id=null,this.options.ecmaVersion>=6&&(h.generator=h.expression=!1),this.options.ecmaVersion>=8&&(h.async=!1)},G0.parseMethod=function(h,m,y){var W=this.startNode(),J=this.yieldPos,a=this.awaitPos,F=this.awaitIdentPos;return this.initFunction(W),this.options.ecmaVersion>=6&&(W.generator=h),this.options.ecmaVersion>=8&&(W.async=!!m),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|Sl(m,W.generator)|(y?128:0)),this.expect(X.parenL),W.params=this.parseBindingList(X.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(W,!1,!0,!1),this.yieldPos=J,this.awaitPos=a,this.awaitIdentPos=F,this.finishNode(W,"FunctionExpression")},G0.parseArrowExpression=function(h,m,y,W){var J=this.yieldPos,a=this.awaitPos,F=this.awaitIdentPos;return this.enterScope(16|Sl(y,!1)),this.initFunction(h),this.options.ecmaVersion>=8&&(h.async=!!y),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,h.params=this.toAssignableList(m,!0),this.parseFunctionBody(h,!0,!1,W),this.yieldPos=J,this.awaitPos=a,this.awaitIdentPos=F,this.finishNode(h,"ArrowFunctionExpression")},G0.parseFunctionBody=function(h,m,y,W){var J=m&&this.type!==X.braceL,a=this.strict,F=!1;if(J)h.body=this.parseMaybeAssign(W),h.expression=!0,this.checkParams(h,!1);else{var T=this.options.ecmaVersion>=7&&!this.isSimpleParamList(h.params);a&&!T||(F=this.strictDirective(this.end))&&T&&this.raiseRecoverable(h.start,"Illegal 'use strict' directive in function with non-simple parameter list");var D=this.labels;this.labels=[],F&&(this.strict=!0),this.checkParams(h,!a&&!F&&!m&&!y&&this.isSimpleParamList(h.params)),this.strict&&h.id&&this.checkLValSimple(h.id,5),h.body=this.parseBlock(!1,void 0,F&&!a),h.expression=!1,this.adaptDirectivePrologue(h.body.body),this.labels=D}this.exitScope()},G0.isSimpleParamList=function(h){for(var m=0,y=h;m<y.length;m+=1)if(y[m].type!=="Identifier")return!1;return!0},G0.checkParams=function(h,m){for(var y=Object.create(null),W=0,J=h.params;W<J.length;W+=1){var a=J[W];this.checkLValInnerPattern(a,1,m?null:y)}},G0.parseExprList=function(h,m,y,W){for(var J=[],a=!0;!this.eat(h);){if(a)a=!1;else if(this.expect(X.comma),m&&this.afterTrailingComma(h))break;var F=void 0;y&&this.type===X.comma?F=null:this.type===X.ellipsis?(F=this.parseSpread(W),W&&this.type===X.comma&&W.trailingComma<0&&(W.trailingComma=this.start)):F=this.parseMaybeAssign(!1,W),J.push(F)}return J},G0.checkUnreserved=function(h){var{start:m,end:y,name:W}=h;(this.inGenerator&&W==="yield"&&this.raiseRecoverable(m,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&W==="await"&&this.raiseRecoverable(m,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().flags&gl||W!=="arguments"||this.raiseRecoverable(m,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||W!=="arguments"&&W!=="await"||this.raise(m,"Cannot use "+W+" in class static initialization block"),this.keywords.test(W)&&this.raise(m,"Unexpected keyword '"+W+"'"),this.options.ecmaVersion<6&&this.input.slice(m,y).indexOf("\\")!==-1)||(this.strict?this.reservedWordsStrict:this.reservedWords).test(W)&&(this.inAsync||W!=="await"||this.raiseRecoverable(m,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(m,"The keyword '"+W+"' is reserved"))},G0.parseIdent=function(h){var m=this.parseIdentNode();return this.next(!!h),this.finishNode(m,"Identifier"),h||(this.checkUnreserved(m),m.name!=="await"||this.awaitIdentPos||(this.awaitIdentPos=m.start)),m},G0.parseIdentNode=function(){var h=this.startNode();return this.type===X.name?h.name=this.value:this.type.keyword?(h.name=this.type.keyword,h.name!=="class"&&h.name!=="function"||this.lastTokEnd===this.lastTokStart+1&&this.input.charCodeAt(this.lastTokStart)===46||this.context.pop(),this.type=X.name):this.unexpected(),h},G0.parsePrivateIdent=function(){var h=this.startNode();return this.type===X.privateId?h.name=this.value:this.unexpected(),this.next(),this.finishNode(h,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(h.start,"Private field '#"+h.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(h)),h},G0.parseYield=function(h){this.yieldPos||(this.yieldPos=this.start);var m=this.startNode();return this.next(),this.type===X.semi||this.canInsertSemicolon()||this.type!==X.star&&!this.type.startsExpr?(m.delegate=!1,m.argument=null):(m.delegate=this.eat(X.star),m.argument=this.parseMaybeAssign(h)),this.finishNode(m,"YieldExpression")},G0.parseAwait=function(h){this.awaitPos||(this.awaitPos=this.start);var m=this.startNode();return this.next(),m.argument=this.parseMaybeUnary(null,!0,!1,h),this.finishNode(m,"AwaitExpression")};var nf=e0.prototype;nf.raise=function(h,m){var y=nl(this.input,h);m+=" ("+y.line+":"+y.column+")",this.sourceFile&&(m+=" in "+this.sourceFile);var W=SyntaxError(m);throw W.pos=h,W.loc=y,W.raisedAt=this.pos,W},nf.raiseRecoverable=nf.raise,nf.curPosition=function(){if(this.options.locations)return new h0(this.curLine,this.pos-this.lineStart)};var u1=e0.prototype,Wt=function(h){this.flags=h,this.var=[],this.lexical=[],this.functions=[]};u1.enterScope=function(h){this.scopeStack.push(new Wt(h))},u1.exitScope=function(){this.scopeStack.pop()},u1.treatFunctionsAsVarInScope=function(h){return 2&h.flags||!this.inModule&&1&h.flags},u1.declareName=function(h,m,y){var W=!1;if(m===2){var J=this.currentScope();W=J.lexical.indexOf(h)>-1||J.functions.indexOf(h)>-1||J.var.indexOf(h)>-1,J.lexical.push(h),this.inModule&&1&J.flags&&delete this.undefinedExports[h]}else if(m===4)this.currentScope().lexical.push(h);else if(m===3){var a=this.currentScope();W=this.treatFunctionsAsVar?a.lexical.indexOf(h)>-1:a.lexical.indexOf(h)>-1||a.var.indexOf(h)>-1,a.functions.push(h)}else for(var F=this.scopeStack.length-1;F>=0;--F){var T=this.scopeStack[F];if(T.lexical.indexOf(h)>-1&&!(32&T.flags&&T.lexical[0]===h)||!this.treatFunctionsAsVarInScope(T)&&T.functions.indexOf(h)>-1){W=!0;break}if(T.var.push(h),this.inModule&&1&T.flags&&delete this.undefinedExports[h],T.flags&gl)break}W&&this.raiseRecoverable(y,"Identifier '"+h+"' has already been declared")},u1.checkLocalExport=function(h){this.scopeStack[0].lexical.indexOf(h.name)===-1&&this.scopeStack[0].var.indexOf(h.name)===-1&&(this.undefinedExports[h.name]=h)},u1.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},u1.currentVarScope=function(){for(var h=this.scopeStack.length-1;;h--){var m=this.scopeStack[h];if(771&m.flags)return m}},u1.currentThisScope=function(){for(var h=this.scopeStack.length-1;;h--){var m=this.scopeStack[h];if(771&m.flags&&!(16&m.flags))return m}};var t1=function(h,m,y){this.type="",this.start=m,this.end=0,h.options.locations&&(this.loc=new y0(h,y)),h.options.directSourceFile&&(this.sourceFile=h.options.directSourceFile),h.options.ranges&&(this.range=[m,0])},z1=e0.prototype;function Hn(h,m,y,W){return h.type=m,h.end=y,this.options.locations&&(h.loc.end=W),this.options.ranges&&(h.range[1]=y),h}z1.startNode=function(){return new t1(this,this.start,this.startLoc)},z1.startNodeAt=function(h,m){return new t1(this,h,m)},z1.finishNode=function(h,m){return Hn.call(this,h,m,this.lastTokEnd,this.lastTokEndLoc)},z1.finishNodeAt=function(h,m,y,W){return Hn.call(this,h,m,y,W)},z1.copyNode=function(h){var m=new t1(this,h.start,this.startLoc);for(var y in h)m[y]=h[y];return m};var Zt="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",Yi=Zt+" Extended_Pictographic",Gn=Yi+" EBase EComp EMod EPres ExtPict",z5={9:Zt,10:Yi,11:Yi,12:Gn,13:Gn,14:Gn},Q5={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},Un="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",Ot="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",Xt=Ot+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Yt=Xt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Jt=Yt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",B=Jt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",S={9:Ot,10:Xt,11:Yt,12:Jt,13:B,14:B+" 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"},f0={};function L(h){var m=f0[h]={binary:V(z5[h]+" "+Un),binaryOfStrings:V(Q5[h]),nonBinary:{General_Category:V(Un),Script:V(S[h])}};m.nonBinary.Script_Extensions=m.nonBinary.Script,m.nonBinary.gc=m.nonBinary.General_Category,m.nonBinary.sc=m.nonBinary.Script,m.nonBinary.scx=m.nonBinary.Script_Extensions}for(var o0=0,n0=[9,10,11,12,13,14];o0<n0.length;o0+=1)L(n0[o0]);var E=e0.prototype,b0=function(h,m){this.parent=h,this.base=m||this};b0.prototype.separatedFrom=function(h){for(var m=this;m;m=m.parent)for(var y=h;y;y=y.parent)if(m.base===y.base&&m!==y)return!0;return!1},b0.prototype.sibling=function(){return new b0(this.parent,this.base)};var K0=function(h){this.parser=h,this.validFlags="gim"+(h.options.ecmaVersion>=6?"uy":"")+(h.options.ecmaVersion>=9?"s":"")+(h.options.ecmaVersion>=13?"d":"")+(h.options.ecmaVersion>=15?"v":""),this.unicodeProperties=f0[h.options.ecmaVersion>=14?14:h.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};function B0(h){return h===105||h===109||h===115}function ll(h){return h===36||h>=40&&h<=43||h===46||h===63||h>=91&&h<=94||h>=123&&h<=125}function E0(h){return h>=65&&h<=90||h>=97&&h<=122}K0.prototype.reset=function(h,m,y){var W=y.indexOf("v")!==-1,J=y.indexOf("u")!==-1;this.start=0|h,this.source=m+"",this.flags=y,W&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=J&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=J&&this.parser.options.ecmaVersion>=9)},K0.prototype.raise=function(h){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+h)},K0.prototype.at=function(h,m){m===void 0&&(m=!1);var y=this.source,W=y.length;if(h>=W)return-1;var J=y.charCodeAt(h);if(!m&&!this.switchU||J<=55295||J>=57344||h+1>=W)return J;var a=y.charCodeAt(h+1);return a>=56320&&a<=57343?(J<<10)+a-56613888:J},K0.prototype.nextIndex=function(h,m){m===void 0&&(m=!1);var y=this.source,W=y.length;if(h>=W)return W;var J,a=y.charCodeAt(h);return!m&&!this.switchU||a<=55295||a>=57344||h+1>=W||(J=y.charCodeAt(h+1))<56320||J>57343?h+1:h+2},K0.prototype.current=function(h){return h===void 0&&(h=!1),this.at(this.pos,h)},K0.prototype.lookahead=function(h){return h===void 0&&(h=!1),this.at(this.nextIndex(this.pos,h),h)},K0.prototype.advance=function(h){h===void 0&&(h=!1),this.pos=this.nextIndex(this.pos,h)},K0.prototype.eat=function(h,m){return m===void 0&&(m=!1),this.current(m)===h&&(this.advance(m),!0)},K0.prototype.eatChars=function(h,m){m===void 0&&(m=!1);for(var y=this.pos,W=0,J=h;W<J.length;W+=1){var a=J[W],F=this.at(y,m);if(F===-1||F!==a)return!1;y=this.nextIndex(y,m)}return this.pos=y,!0},E.validateRegExpFlags=function(h){for(var{validFlags:m,flags:y}=h,W=!1,J=!1,a=0;a<y.length;a++){var F=y.charAt(a);m.indexOf(F)===-1&&this.raise(h.start,"Invalid regular expression flag"),y.indexOf(F,a+1)>-1&&this.raise(h.start,"Duplicate regular expression flag"),F==="u"&&(W=!0),F==="v"&&(J=!0)}this.options.ecmaVersion>=15&&W&&J&&this.raise(h.start,"Invalid regular expression flag")},E.validateRegExpPattern=function(h){this.regexp_pattern(h),!h.switchN&&this.options.ecmaVersion>=9&&function(m){for(var y in m)return!0;return!1}(h.groupNames)&&(h.switchN=!0,this.regexp_pattern(h))},E.regexp_pattern=function(h){h.pos=0,h.lastIntValue=0,h.lastStringValue="",h.lastAssertionIsQuantifiable=!1,h.numCapturingParens=0,h.maxBackReference=0,h.groupNames=Object.create(null),h.backReferenceNames.length=0,h.branchID=null,this.regexp_disjunction(h),h.pos!==h.source.length&&(h.eat(41)&&h.raise("Unmatched ')'"),(h.eat(93)||h.eat(125))&&h.raise("Lone quantifier brackets")),h.maxBackReference>h.numCapturingParens&&h.raise("Invalid escape");for(var m=0,y=h.backReferenceNames;m<y.length;m+=1){var W=y[m];h.groupNames[W]||h.raise("Invalid named capture referenced")}},E.regexp_disjunction=function(h){var m=this.options.ecmaVersion>=16;for(m&&(h.branchID=new b0(h.branchID,null)),this.regexp_alternative(h);h.eat(124);)m&&(h.branchID=h.branchID.sibling()),this.regexp_alternative(h);m&&(h.branchID=h.branchID.parent),this.regexp_eatQuantifier(h,!0)&&h.raise("Nothing to repeat"),h.eat(123)&&h.raise("Lone quantifier brackets")},E.regexp_alternative=function(h){for(;h.pos<h.source.length&&this.regexp_eatTerm(h););},E.regexp_eatTerm=function(h){return this.regexp_eatAssertion(h)?(h.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(h)&&h.switchU&&h.raise("Invalid quantifier"),!0):!!(h.switchU?this.regexp_eatAtom(h):this.regexp_eatExtendedAtom(h))&&(this.regexp_eatQuantifier(h),!0)},E.regexp_eatAssertion=function(h){var m=h.pos;if(h.lastAssertionIsQuantifiable=!1,h.eat(94)||h.eat(36))return!0;if(h.eat(92)){if(h.eat(66)||h.eat(98))return!0;h.pos=m}if(h.eat(40)&&h.eat(63)){var y=!1;if(this.options.ecmaVersion>=9&&(y=h.eat(60)),h.eat(61)||h.eat(33))return this.regexp_disjunction(h),h.eat(41)||h.raise("Unterminated group"),h.lastAssertionIsQuantifiable=!y,!0}return h.pos=m,!1},E.regexp_eatQuantifier=function(h,m){return m===void 0&&(m=!1),!!this.regexp_eatQuantifierPrefix(h,m)&&(h.eat(63),!0)},E.regexp_eatQuantifierPrefix=function(h,m){return h.eat(42)||h.eat(43)||h.eat(63)||this.regexp_eatBracedQuantifier(h,m)},E.regexp_eatBracedQuantifier=function(h,m){var y=h.pos;if(h.eat(123)){var W=0,J=-1;if(this.regexp_eatDecimalDigits(h)&&(W=h.lastIntValue,h.eat(44)&&this.regexp_eatDecimalDigits(h)&&(J=h.lastIntValue),h.eat(125)))return J!==-1&&J<W&&!m&&h.raise("numbers out of order in {} quantifier"),!0;h.switchU&&!m&&h.raise("Incomplete quantifier"),h.pos=y}return!1},E.regexp_eatAtom=function(h){return this.regexp_eatPatternCharacters(h)||h.eat(46)||this.regexp_eatReverseSolidusAtomEscape(h)||this.regexp_eatCharacterClass(h)||this.regexp_eatUncapturingGroup(h)||this.regexp_eatCapturingGroup(h)},E.regexp_eatReverseSolidusAtomEscape=function(h){var m=h.pos;if(h.eat(92)){if(this.regexp_eatAtomEscape(h))return!0;h.pos=m}return!1},E.regexp_eatUncapturingGroup=function(h){var m=h.pos;if(h.eat(40)){if(h.eat(63)){if(this.options.ecmaVersion>=16){var y=this.regexp_eatModifiers(h),W=h.eat(45);if(y||W){for(var J=0;J<y.length;J++){var a=y.charAt(J);y.indexOf(a,J+1)>-1&&h.raise("Duplicate regular expression modifiers")}if(W){var F=this.regexp_eatModifiers(h);y||F||h.current()!==58||h.raise("Invalid regular expression modifiers");for(var T=0;T<F.length;T++){var D=F.charAt(T);(F.indexOf(D,T+1)>-1||y.indexOf(D)>-1)&&h.raise("Duplicate regular expression modifiers")}}}}if(h.eat(58)){if(this.regexp_disjunction(h),h.eat(41))return!0;h.raise("Unterminated group")}}h.pos=m}return!1},E.regexp_eatCapturingGroup=function(h){if(h.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(h):h.current()===63&&h.raise("Invalid group"),this.regexp_disjunction(h),h.eat(41))return h.numCapturingParens+=1,!0;h.raise("Unterminated group")}return!1},E.regexp_eatModifiers=function(h){for(var m="",y=0;(y=h.current())!==-1&&B0(y);)m+=x(y),h.advance();return m},E.regexp_eatExtendedAtom=function(h){return h.eat(46)||this.regexp_eatReverseSolidusAtomEscape(h)||this.regexp_eatCharacterClass(h)||this.regexp_eatUncapturingGroup(h)||this.regexp_eatCapturingGroup(h)||this.regexp_eatInvalidBracedQuantifier(h)||this.regexp_eatExtendedPatternCharacter(h)},E.regexp_eatInvalidBracedQuantifier=function(h){return this.regexp_eatBracedQuantifier(h,!0)&&h.raise("Nothing to repeat"),!1},E.regexp_eatSyntaxCharacter=function(h){var m=h.current();return!!ll(m)&&(h.lastIntValue=m,h.advance(),!0)},E.regexp_eatPatternCharacters=function(h){for(var m=h.pos,y=0;(y=h.current())!==-1&&!ll(y);)h.advance();return h.pos!==m},E.regexp_eatExtendedPatternCharacter=function(h){var m=h.current();return!(m===-1||m===36||m>=40&&m<=43||m===46||m===63||m===91||m===94||m===124)&&(h.advance(),!0)},E.regexp_groupSpecifier=function(h){if(h.eat(63)){this.regexp_eatGroupName(h)||h.raise("Invalid group");var m=this.options.ecmaVersion>=16,y=h.groupNames[h.lastStringValue];if(y)if(m)for(var W=0,J=y;W<J.length;W+=1)J[W].separatedFrom(h.branchID)||h.raise("Duplicate capture group name");else h.raise("Duplicate capture group name");m?(y||(h.groupNames[h.lastStringValue]=[])).push(h.branchID):h.groupNames[h.lastStringValue]=!0}},E.regexp_eatGroupName=function(h){if(h.lastStringValue="",h.eat(60)){if(this.regexp_eatRegExpIdentifierName(h)&&h.eat(62))return!0;h.raise("Invalid capture group name")}return!1},E.regexp_eatRegExpIdentifierName=function(h){if(h.lastStringValue="",this.regexp_eatRegExpIdentifierStart(h)){for(h.lastStringValue+=x(h.lastIntValue);this.regexp_eatRegExpIdentifierPart(h);)h.lastStringValue+=x(h.lastIntValue);return!0}return!1},E.regexp_eatRegExpIdentifierStart=function(h){var m=h.pos,y=this.options.ecmaVersion>=11,W=h.current(y);return h.advance(y),W===92&&this.regexp_eatRegExpUnicodeEscapeSequence(h,y)&&(W=h.lastIntValue),function(J){return Y(J,!0)||J===36||J===95}(W)?(h.lastIntValue=W,!0):(h.pos=m,!1)},E.regexp_eatRegExpIdentifierPart=function(h){var m=h.pos,y=this.options.ecmaVersion>=11,W=h.current(y);return h.advance(y),W===92&&this.regexp_eatRegExpUnicodeEscapeSequence(h,y)&&(W=h.lastIntValue),function(J){return z(J,!0)||J===36||J===95||J===8204||J===8205}(W)?(h.lastIntValue=W,!0):(h.pos=m,!1)},E.regexp_eatAtomEscape=function(h){return!!(this.regexp_eatBackReference(h)||this.regexp_eatCharacterClassEscape(h)||this.regexp_eatCharacterEscape(h)||h.switchN&&this.regexp_eatKGroupName(h))||(h.switchU&&(h.current()===99&&h.raise("Invalid unicode escape"),h.raise("Invalid escape")),!1)},E.regexp_eatBackReference=function(h){var m=h.pos;if(this.regexp_eatDecimalEscape(h)){var y=h.lastIntValue;if(h.switchU)return y>h.maxBackReference&&(h.maxBackReference=y),!0;if(y<=h.numCapturingParens)return!0;h.pos=m}return!1},E.regexp_eatKGroupName=function(h){if(h.eat(107)){if(this.regexp_eatGroupName(h))return h.backReferenceNames.push(h.lastStringValue),!0;h.raise("Invalid named reference")}return!1},E.regexp_eatCharacterEscape=function(h){return this.regexp_eatControlEscape(h)||this.regexp_eatCControlLetter(h)||this.regexp_eatZero(h)||this.regexp_eatHexEscapeSequence(h)||this.regexp_eatRegExpUnicodeEscapeSequence(h,!1)||!h.switchU&&this.regexp_eatLegacyOctalEscapeSequence(h)||this.regexp_eatIdentityEscape(h)},E.regexp_eatCControlLetter=function(h){var m=h.pos;if(h.eat(99)){if(this.regexp_eatControlLetter(h))return!0;h.pos=m}return!1},E.regexp_eatZero=function(h){return h.current()===48&&!ol(h.lookahead())&&(h.lastIntValue=0,h.advance(),!0)},E.regexp_eatControlEscape=function(h){var m=h.current();return m===116?(h.lastIntValue=9,h.advance(),!0):m===110?(h.lastIntValue=10,h.advance(),!0):m===118?(h.lastIntValue=11,h.advance(),!0):m===102?(h.lastIntValue=12,h.advance(),!0):m===114&&(h.lastIntValue=13,h.advance(),!0)},E.regexp_eatControlLetter=function(h){var m=h.current();return!!E0(m)&&(h.lastIntValue=m%32,h.advance(),!0)},E.regexp_eatRegExpUnicodeEscapeSequence=function(h,m){m===void 0&&(m=!1);var y,W=h.pos,J=m||h.switchU;if(h.eat(117)){if(this.regexp_eatFixedHexDigits(h,4)){var a=h.lastIntValue;if(J&&a>=55296&&a<=56319){var F=h.pos;if(h.eat(92)&&h.eat(117)&&this.regexp_eatFixedHexDigits(h,4)){var T=h.lastIntValue;if(T>=56320&&T<=57343)return h.lastIntValue=1024*(a-55296)+(T-56320)+65536,!0}h.pos=F,h.lastIntValue=a}return!0}if(J&&h.eat(123)&&this.regexp_eatHexDigits(h)&&h.eat(125)&&((y=h.lastIntValue)>=0&&y<=1114111))return!0;J&&h.raise("Invalid unicode escape"),h.pos=W}return!1},E.regexp_eatIdentityEscape=function(h){if(h.switchU)return!!this.regexp_eatSyntaxCharacter(h)||!!h.eat(47)&&(h.lastIntValue=47,!0);var m=h.current();return!(m===99||h.switchN&&m===107)&&(h.lastIntValue=m,h.advance(),!0)},E.regexp_eatDecimalEscape=function(h){h.lastIntValue=0;var m=h.current();if(m>=49&&m<=57){do h.lastIntValue=10*h.lastIntValue+(m-48),h.advance();while((m=h.current())>=48&&m<=57);return!0}return!1};function cl(h){return E0(h)||h===95}function hl(h){return cl(h)||ol(h)}function ol(h){return h>=48&&h<=57}function wl(h){return h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102}function Zl(h){return h>=65&&h<=70?h-65+10:h>=97&&h<=102?h-97+10:h-48}function Or(h){return h>=48&&h<=55}E.regexp_eatCharacterClassEscape=function(h){var m=h.current();if(function(J){return J===100||J===68||J===115||J===83||J===119||J===87}(m))return h.lastIntValue=-1,h.advance(),1;var y=!1;if(h.switchU&&this.options.ecmaVersion>=9&&((y=m===80)||m===112)){var W;if(h.lastIntValue=-1,h.advance(),h.eat(123)&&(W=this.regexp_eatUnicodePropertyValueExpression(h))&&h.eat(125))return y&&W===2&&h.raise("Invalid property name"),W;h.raise("Invalid property name")}return 0},E.regexp_eatUnicodePropertyValueExpression=function(h){var m=h.pos;if(this.regexp_eatUnicodePropertyName(h)&&h.eat(61)){var y=h.lastStringValue;if(this.regexp_eatUnicodePropertyValue(h)){var W=h.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(h,y,W),1}}if(h.pos=m,this.regexp_eatLoneUnicodePropertyNameOrValue(h)){var J=h.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(h,J)}return 0},E.regexp_validateUnicodePropertyNameAndValue=function(h,m,y){Q(h.unicodeProperties.nonBinary,m)||h.raise("Invalid property name"),h.unicodeProperties.nonBinary[m].test(y)||h.raise("Invalid property value")},E.regexp_validateUnicodePropertyNameOrValue=function(h,m){return h.unicodeProperties.binary.test(m)?1:h.switchV&&h.unicodeProperties.binaryOfStrings.test(m)?2:void h.raise("Invalid property name")},E.regexp_eatUnicodePropertyName=function(h){var m=0;for(h.lastStringValue="";cl(m=h.current());)h.lastStringValue+=x(m),h.advance();return h.lastStringValue!==""},E.regexp_eatUnicodePropertyValue=function(h){var m=0;for(h.lastStringValue="";hl(m=h.current());)h.lastStringValue+=x(m),h.advance();return h.lastStringValue!==""},E.regexp_eatLoneUnicodePropertyNameOrValue=function(h){return this.regexp_eatUnicodePropertyValue(h)},E.regexp_eatCharacterClass=function(h){if(h.eat(91)){var m=h.eat(94),y=this.regexp_classContents(h);return h.eat(93)||h.raise("Unterminated character class"),m&&y===2&&h.raise("Negated character class may contain strings"),!0}return!1},E.regexp_classContents=function(h){return h.current()===93?1:h.switchV?this.regexp_classSetExpression(h):(this.regexp_nonEmptyClassRanges(h),1)},E.regexp_nonEmptyClassRanges=function(h){for(;this.regexp_eatClassAtom(h);){var m=h.lastIntValue;if(h.eat(45)&&this.regexp_eatClassAtom(h)){var y=h.lastIntValue;!h.switchU||m!==-1&&y!==-1||h.raise("Invalid character class"),m!==-1&&y!==-1&&m>y&&h.raise("Range out of order in character class")}}},E.regexp_eatClassAtom=function(h){var m=h.pos;if(h.eat(92)){if(this.regexp_eatClassEscape(h))return!0;if(h.switchU){var y=h.current();(y===99||Or(y))&&h.raise("Invalid class escape"),h.raise("Invalid escape")}h.pos=m}var W=h.current();return W!==93&&(h.lastIntValue=W,h.advance(),!0)},E.regexp_eatClassEscape=function(h){var m=h.pos;if(h.eat(98))return h.lastIntValue=8,!0;if(h.switchU&&h.eat(45))return h.lastIntValue=45,!0;if(!h.switchU&&h.eat(99)){if(this.regexp_eatClassControlLetter(h))return!0;h.pos=m}return this.regexp_eatCharacterClassEscape(h)||this.regexp_eatCharacterEscape(h)},E.regexp_classSetExpression=function(h){var m,y=1;if(this.regexp_eatClassSetRange(h));else if(m=this.regexp_eatClassSetOperand(h)){m===2&&(y=2);for(var W=h.pos;h.eatChars([38,38]);)h.current()!==38&&(m=this.regexp_eatClassSetOperand(h))?m!==2&&(y=1):h.raise("Invalid character in character class");if(W!==h.pos)return y;for(;h.eatChars([45,45]);)this.regexp_eatClassSetOperand(h)||h.raise("Invalid character in character class");if(W!==h.pos)return y}else h.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(h)){if(!(m=this.regexp_eatClassSetOperand(h)))return y;m===2&&(y=2)}},E.regexp_eatClassSetRange=function(h){var m=h.pos;if(this.regexp_eatClassSetCharacter(h)){var y=h.lastIntValue;if(h.eat(45)&&this.regexp_eatClassSetCharacter(h)){var W=h.lastIntValue;return y!==-1&&W!==-1&&y>W&&h.raise("Range out of order in character class"),!0}h.pos=m}return!1},E.regexp_eatClassSetOperand=function(h){return this.regexp_eatClassSetCharacter(h)?1:this.regexp_eatClassStringDisjunction(h)||this.regexp_eatNestedClass(h)},E.regexp_eatNestedClass=function(h){var m=h.pos;if(h.eat(91)){var y=h.eat(94),W=this.regexp_classContents(h);if(h.eat(93))return y&&W===2&&h.raise("Negated character class may contain strings"),W;h.pos=m}if(h.eat(92)){var J=this.regexp_eatCharacterClassEscape(h);if(J)return J;h.pos=m}return null},E.regexp_eatClassStringDisjunction=function(h){var m=h.pos;if(h.eatChars([92,113])){if(h.eat(123)){var y=this.regexp_classStringDisjunctionContents(h);if(h.eat(125))return y}else h.raise("Invalid escape");h.pos=m}return null},E.regexp_classStringDisjunctionContents=function(h){for(var m=this.regexp_classString(h);h.eat(124);)this.regexp_classString(h)===2&&(m=2);return m},E.regexp_classString=function(h){for(var m=0;this.regexp_eatClassSetCharacter(h);)m++;return m===1?1:2},E.regexp_eatClassSetCharacter=function(h){var m=h.pos;if(h.eat(92))return!(!this.regexp_eatCharacterEscape(h)&&!this.regexp_eatClassSetReservedPunctuator(h))||(h.eat(98)?(h.lastIntValue=8,!0):(h.pos=m,!1));var y=h.current();return!(y<0||y===h.lookahead()&&function(W){return W===33||W>=35&&W<=38||W>=42&&W<=44||W===46||W>=58&&W<=64||W===94||W===96||W===126}(y))&&(!function(W){return W===40||W===41||W===45||W===47||W>=91&&W<=93||W>=123&&W<=125}(y)&&(h.advance(),h.lastIntValue=y,!0))},E.regexp_eatClassSetReservedPunctuator=function(h){var m=h.current();return!!function(y){return y===33||y===35||y===37||y===38||y===44||y===45||y>=58&&y<=62||y===64||y===96||y===126}(m)&&(h.lastIntValue=m,h.advance(),!0)},E.regexp_eatClassControlLetter=function(h){var m=h.current();return!(!ol(m)&&m!==95)&&(h.lastIntValue=m%32,h.advance(),!0)},E.regexp_eatHexEscapeSequence=function(h){var m=h.pos;if(h.eat(120)){if(this.regexp_eatFixedHexDigits(h,2))return!0;h.switchU&&h.raise("Invalid escape"),h.pos=m}return!1},E.regexp_eatDecimalDigits=function(h){var m=h.pos,y=0;for(h.lastIntValue=0;ol(y=h.current());)h.lastIntValue=10*h.lastIntValue+(y-48),h.advance();return h.pos!==m},E.regexp_eatHexDigits=function(h){var m=h.pos,y=0;for(h.lastIntValue=0;wl(y=h.current());)h.lastIntValue=16*h.lastIntValue+Zl(y),h.advance();return h.pos!==m},E.regexp_eatLegacyOctalEscapeSequence=function(h){if(this.regexp_eatOctalDigit(h)){var m=h.lastIntValue;if(this.regexp_eatOctalDigit(h)){var y=h.lastIntValue;m<=3&&this.regexp_eatOctalDigit(h)?h.lastIntValue=64*m+8*y+h.lastIntValue:h.lastIntValue=8*m+y}else h.lastIntValue=m;return!0}return!1},E.regexp_eatOctalDigit=function(h){var m=h.current();return Or(m)?(h.lastIntValue=m-48,h.advance(),!0):(h.lastIntValue=0,!1)},E.regexp_eatFixedHexDigits=function(h,m){var y=h.pos;h.lastIntValue=0;for(var W=0;W<m;++W){var J=h.current();if(!wl(J))return h.pos=y,!1;h.lastIntValue=16*h.lastIntValue+Zl(J),h.advance()}return!0};var h1=function(h){this.type=h.type,this.value=h.value,this.start=h.start,this.end=h.end,h.options.locations&&(this.loc=new y0(h,h.startLoc,h.endLoc)),h.options.ranges&&(this.range=[h.start,h.end])},k0=e0.prototype;function Nl(h){return typeof BigInt!="function"?null:BigInt(h.replace(/_/g,""))}k0.next=function(h){!h&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new h1(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},k0.getToken=function(){return this.next(),new h1(this)},typeof Symbol<"u"&&(k0[Symbol.iterator]=function(){var h=this;return{next:function(){var m=h.getToken();return{done:m.type===X.eof,value:m}}}}),k0.nextToken=function(){var h=this.curContext();return h&&h.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(X.eof):h.override?h.override(this):void this.readToken(this.fullCharCodeAtPos())},k0.readToken=function(h){return Y(h,this.options.ecmaVersion>=6)||h===92?this.readWord():this.getTokenFromCode(h)},k0.fullCharCodeAt=function(h){var m=this.input.charCodeAt(h);if(m<=55295||m>=56320)return m;var y=this.input.charCodeAt(h+1);return y<=56319||y>=57344?m:(m<<10)+y-56613888},k0.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},k0.skipBlockComment=function(){var h=this.options.onComment&&this.curPosition(),m=this.pos,y=this.input.indexOf("*/",this.pos+=2);if(y===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=y+2,this.options.locations)for(var W=void 0,J=m;(W=r0(this.input,J,this.pos))>-1;)++this.curLine,J=this.lineStart=W;this.options.onComment&&this.options.onComment(!0,this.input.slice(m+2,y),m,this.pos,h,this.curPosition())},k0.skipLineComment=function(h){for(var m=this.pos,y=this.options.onComment&&this.curPosition(),W=this.input.charCodeAt(this.pos+=h);this.pos<this.input.length&&!l0(W);)W=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(m+h,this.pos),m,this.pos,y,this.curPosition())},k0.skipSpace=function(){l:for(;this.pos<this.input.length;){var h=this.input.charCodeAt(this.pos);switch(h){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 l}break;default:if(!(h>8&&h<14||h>=5760&&u0.test(String.fromCharCode(h))))break l;++this.pos}}},k0.finishToken=function(h,m){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var y=this.type;this.type=h,this.value=m,this.updateContext(y)},k0.readToken_dot=function(){var h=this.input.charCodeAt(this.pos+1);if(h>=48&&h<=57)return this.readNumber(!0);var m=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&h===46&&m===46?(this.pos+=3,this.finishToken(X.ellipsis)):(++this.pos,this.finishToken(X.dot))},k0.readToken_slash=function(){var h=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):h===61?this.finishOp(X.assign,2):this.finishOp(X.slash,1)},k0.readToken_mult_modulo_exp=function(h){var m=this.input.charCodeAt(this.pos+1),y=1,W=h===42?X.star:X.modulo;return this.options.ecmaVersion>=7&&h===42&&m===42&&(++y,W=X.starstar,m=this.input.charCodeAt(this.pos+2)),m===61?this.finishOp(X.assign,y+1):this.finishOp(W,y)},k0.readToken_pipe_amp=function(h){var m=this.input.charCodeAt(this.pos+1);if(m===h){if(this.options.ecmaVersion>=12){if(this.input.charCodeAt(this.pos+2)===61)return this.finishOp(X.assign,3)}return this.finishOp(h===124?X.logicalOR:X.logicalAND,2)}return m===61?this.finishOp(X.assign,2):this.finishOp(h===124?X.bitwiseOR:X.bitwiseAND,1)},k0.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(X.assign,2):this.finishOp(X.bitwiseXOR,1)},k0.readToken_plus_min=function(h){var m=this.input.charCodeAt(this.pos+1);return m===h?m!==45||this.inModule||this.input.charCodeAt(this.pos+2)!==62||this.lastTokEnd!==0&&!P.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(X.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):m===61?this.finishOp(X.assign,2):this.finishOp(X.plusMin,1)},k0.readToken_lt_gt=function(h){var m=this.input.charCodeAt(this.pos+1),y=1;return m===h?(y=h===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+y)===61?this.finishOp(X.assign,y+1):this.finishOp(X.bitShift,y)):m!==33||h!==60||this.inModule||this.input.charCodeAt(this.pos+2)!==45||this.input.charCodeAt(this.pos+3)!==45?(m===61&&(y=2),this.finishOp(X.relational,y)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},k0.readToken_eq_excl=function(h){var m=this.input.charCodeAt(this.pos+1);return m===61?this.finishOp(X.equality,this.input.charCodeAt(this.pos+2)===61?3:2):h===61&&m===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(X.arrow)):this.finishOp(h===61?X.eq:X.prefix,1)},k0.readToken_question=function(){var h=this.options.ecmaVersion;if(h>=11){var m=this.input.charCodeAt(this.pos+1);if(m===46){var y=this.input.charCodeAt(this.pos+2);if(y<48||y>57)return this.finishOp(X.questionDot,2)}if(m===63){if(h>=12){if(this.input.charCodeAt(this.pos+2)===61)return this.finishOp(X.assign,3)}return this.finishOp(X.coalesce,2)}}return this.finishOp(X.question,1)},k0.readToken_numberSign=function(){var h=35;if(this.options.ecmaVersion>=13&&(++this.pos,Y(h=this.fullCharCodeAtPos(),!0)||h===92))return this.finishToken(X.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+x(h)+"'")},k0.getTokenFromCode=function(h){switch(h){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(X.parenL);case 41:return++this.pos,this.finishToken(X.parenR);case 59:return++this.pos,this.finishToken(X.semi);case 44:return++this.pos,this.finishToken(X.comma);case 91:return++this.pos,this.finishToken(X.bracketL);case 93:return++this.pos,this.finishToken(X.bracketR);case 123:return++this.pos,this.finishToken(X.braceL);case 125:return++this.pos,this.finishToken(X.braceR);case 58:return++this.pos,this.finishToken(X.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(X.backQuote);case 48:var m=this.input.charCodeAt(this.pos+1);if(m===120||m===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(m===111||m===79)return this.readRadixNumber(8);if(m===98||m===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(h);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(h);case 124:case 38:return this.readToken_pipe_amp(h);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(h);case 60:case 62:return this.readToken_lt_gt(h);case 61:case 33:return this.readToken_eq_excl(h);case 63:return this.readToken_question();case 126:return this.finishOp(X.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+x(h)+"'")},k0.finishOp=function(h,m){var y=this.input.slice(this.pos,this.pos+m);return this.pos+=m,this.finishToken(h,y)},k0.readRegexp=function(){for(var h,m,y=this.pos;;){this.pos>=this.input.length&&this.raise(y,"Unterminated regular expression");var W=this.input.charAt(this.pos);if(P.test(W)&&this.raise(y,"Unterminated regular expression"),h)h=!1;else{if(W==="[")m=!0;else if(W==="]"&&m)m=!1;else if(W==="/"&&!m)break;h=W==="\\"}++this.pos}var J=this.input.slice(y,this.pos);++this.pos;var a=this.pos,F=this.readWord1();this.containsEsc&&this.unexpected(a);var T=this.regexpState||(this.regexpState=new K0(this));T.reset(y,J,F),this.validateRegExpFlags(T),this.validateRegExpPattern(T);var D=null;try{D=new RegExp(J,F)}catch(i0){}return this.finishToken(X.regexp,{pattern:J,flags:F,value:D})},k0.readInt=function(h,m,y){for(var W=this.options.ecmaVersion>=12&&m===void 0,J=y&&this.input.charCodeAt(this.pos)===48,a=this.pos,F=0,T=0,D=0,i0=m==null?1/0:m;D<i0;++D,++this.pos){var s=this.input.charCodeAt(this.pos),$0=void 0;if(W&&s===95)J&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),T===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),D===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),T=s;else{if(($0=s>=97?s-97+10:s>=65?s-65+10:s>=48&&s<=57?s-48:1/0)>=h)break;T=s,F=F*h+$0}}return W&&T===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||m!=null&&this.pos-a!==m?null:F},k0.readRadixNumber=function(h){var m=this.pos;this.pos+=2;var y=this.readInt(h);return y==null&&this.raise(this.start+2,"Expected number in radix "+h),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(y=Nl(this.input.slice(m,this.pos)),++this.pos):Y(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(X.num,y)},k0.readNumber=function(h){var m=this.pos;h||this.readInt(10,void 0,!0)!==null||this.raise(m,"Invalid number");var y=this.pos-m>=2&&this.input.charCodeAt(m)===48;y&&this.strict&&this.raise(m,"Invalid number");var W=this.input.charCodeAt(this.pos);if(!y&&!h&&this.options.ecmaVersion>=11&&W===110){var J=Nl(this.input.slice(m,this.pos));return++this.pos,Y(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(X.num,J)}y&&/[89]/.test(this.input.slice(m,this.pos))&&(y=!1),W!==46||y||(++this.pos,this.readInt(10),W=this.input.charCodeAt(this.pos)),W!==69&&W!==101||y||((W=this.input.charCodeAt(++this.pos))!==43&&W!==45||++this.pos,this.readInt(10)===null&&this.raise(m,"Invalid number")),Y(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a,F=(a=this.input.slice(m,this.pos),y?parseInt(a,8):parseFloat(a.replace(/_/g,"")));return this.finishToken(X.num,F)},k0.readCodePoint=function(){var h;if(this.input.charCodeAt(this.pos)===123){this.options.ecmaVersion<6&&this.unexpected();var m=++this.pos;h=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,h>1114111&&this.invalidStringToken(m,"Code point out of bounds")}else h=this.readHexChar(4);return h},k0.readString=function(h){for(var m="",y=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var W=this.input.charCodeAt(this.pos);if(W===h)break;W===92?(m+=this.input.slice(y,this.pos),m+=this.readEscapedChar(!1),y=this.pos):W===8232||W===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(l0(W)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return m+=this.input.slice(y,this.pos++),this.finishToken(X.string,m)};var sl={};k0.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(h){if(h!==sl)throw h;this.readInvalidTemplateToken()}this.inTemplateElement=!1},k0.invalidStringToken=function(h,m){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw sl;this.raise(h,m)},k0.readTmplToken=function(){for(var h="",m=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var y=this.input.charCodeAt(this.pos);if(y===96||y===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos!==this.start||this.type!==X.template&&this.type!==X.invalidTemplate?(h+=this.input.slice(m,this.pos),this.finishToken(X.template,h)):y===36?(this.pos+=2,this.finishToken(X.dollarBraceL)):(++this.pos,this.finishToken(X.backQuote));if(y===92)h+=this.input.slice(m,this.pos),h+=this.readEscapedChar(!0),m=this.pos;else if(l0(y)){switch(h+=this.input.slice(m,this.pos),++this.pos,y){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:h+=`
196
196
  `;break;default:h+=String.fromCharCode(y)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),m=this.pos}else++this.pos}},k0.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(X.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
197
197
  `&&++this.pos;case`
198
198
  `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},k0.readEscapedChar=function(h){var m=this.input.charCodeAt(++this.pos);switch(++this.pos,m){case 110:return`
199
- `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return x(this.readCodePoint());case 116:return"\t";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"),h){var y=this.pos-1;this.invalidStringToken(y,"Invalid escape sequence in template string")}default:if(m>=48&&m<=55){var W=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],J=parseInt(W,8);return J>255&&(W=W.slice(0,-1),J=parseInt(W,8)),this.pos+=W.length-1,m=this.input.charCodeAt(this.pos),W==="0"&&m!==56&&m!==57||!this.strict&&!h||this.invalidStringToken(this.pos-1-W.length,h?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(J)}return l0(m)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(m)}},k0.readHexChar=function(h){var m=this.pos,y=this.readInt(16,h);return y===null&&this.invalidStringToken(m,"Bad character escape sequence"),y},k0.readWord1=function(){this.containsEsc=!1;for(var h="",m=!0,y=this.pos,W=this.options.ecmaVersion>=6;this.pos<this.input.length;){var J=this.fullCharCodeAtPos();if(z(J,W))this.pos+=J<=65535?1:2;else{if(J!==92)break;this.containsEsc=!0,h+=this.input.slice(y,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var F=this.readCodePoint();(m?Y:z)(F,W)||this.invalidStringToken(a,"Invalid Unicode escape"),h+=x(F),y=this.pos}m=!1}return h+this.input.slice(y,this.pos)},k0.readWord=function(){var h=this.readWord1(),m=X.name;return this.keywords.test(h)&&(m=I[h]),this.finishToken(m,h)},e0.acorn={Parser:e0,version:"8.16.0",defaultOptions:Z0,Position:h0,SourceLocation:y0,getLineInfo:nl,Node:t1,TokenType:R,tokTypes:X,keywordTypes:I,TokContext:Zr,tokContexts:Wl,isIdentifierChar:z,isIdentifierStart:Y,Token:h1,isNewLine:l0,lineBreak:P,lineBreakG:_,nonASCIIwhitespace:u0};var j0=f("node:module"),O0=f("node:fs");String.fromCharCode;let an=/\/$|\/\?|\/#/,Qt=/^\.?\//;function Bt(h="",m){return m?an.test(h):h.endsWith("/")}function Ht(h="",m){if(!m)return h.endsWith("/")?h:h+"/";if(Bt(h,!0))return h||"/";let y=h,W="",J=h.indexOf("#");if(J!==-1&&(y=h.slice(0,J),W=h.slice(J),!y))return W;let[a,...F]=y.split("?");return a+"/"+(F.length>0?`?${F.join("?")}`:"")+W}function Gt(h){return h&&h!=="/"}function Rf(h,...m){let y=h||"";for(let W of m.filter((J)=>Gt(J)))if(y){let J=W.replace(Qt,"");y=Ht(y)+J}else y=W;return y}let rl=/^[A-Za-z]:\//;function Ol(h=""){return h?h.replace(/\\/g,"/").replace(rl,(m)=>m.toUpperCase()):h}let Ut=/^[/\\]{2}/,Ji=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,D4=/^[A-Za-z]:$/,DW=/.(\.[^./]+|\.)$/,xW=function(h){if(h.length===0)return".";let m=(h=Ol(h)).match(Ut),y=Tf(h),W=h[h.length-1]==="/";return(h=x4(h,!y)).length===0?y?"/":W?"./":".":(W&&(h+="/"),D4.test(h)&&(h+="/"),m?y?`//${h}`:`//./${h}`:y&&!Tf(h)?`/${h}`:h)},o1=function(...h){let m="";for(let y of h)if(y)if(m.length>0){let W=m[m.length-1]==="/",J=y[0]==="/";m+=W&&J?y.slice(1):W||J?y:`/${y}`}else m+=y;return xW(m)};function jW(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}let EW=function(...h){let m="",y=!1;for(let W=(h=h.map((J)=>Ol(J))).length-1;W>=-1&&!y;W--){let J=W>=0?h[W]:jW();J&&J.length!==0&&(m=`${J}/${m}`,y=Tf(J))}return m=x4(m,!y),y&&!Tf(m)?`/${m}`:m.length>0?m:"."};function x4(h,m){let y="",W=0,J=-1,a=0,F=null;for(let T=0;T<=h.length;++T){if(T<h.length)F=h[T];else{if(F==="/")break;F="/"}if(F==="/"){if(J===T-1||a===1);else if(a===2){if(y.length<2||W!==2||y[y.length-1]!=="."||y[y.length-2]!=="."){if(y.length>2){let D=y.lastIndexOf("/");D===-1?(y="",W=0):(y=y.slice(0,D),W=y.length-1-y.lastIndexOf("/")),J=T,a=0;continue}if(y.length>0){y="",W=0,J=T,a=0;continue}}m&&(y+=y.length>0?"/..":"..",W=2)}else y.length>0?y+=`/${h.slice(J+1,T)}`:y=h.slice(J+1,T),W=T-J-1;J=T,a=0}else F==="."&&a!==-1?++a:a=-1}return y}let Tf=function(h){return Ji.test(h)},B5=function(h){if(h==="..")return"";let m=DW.exec(Ol(h));return m&&m[1]||""},Fn=function(h){let m=Ol(h).replace(/\/$/,"").split("/").slice(0,-1);return m.length===1&&D4.test(m[0])&&(m[0]+="/"),m.join("/")||(Tf(h)?"/":".")},H5=function(h,m){let y=Ol(h).split("/"),W="";for(let J=y.length-1;J>=0;J--){let a=y[J];if(a){W=a;break}}return m&&W.endsWith(m)?W.slice(0,-m.length):W},D0=P0("url"),uf=P0("assert"),Lf=P0("process");var G5=f("node:path");let sW=P0("v8"),at=P0("util"),j4=new Set(j0.builtinModules);function U5(h){return h.replace(/\\/g,"/")}let CW={}.hasOwnProperty,eW=/^([A-Z][a-z\d]*)+$/,lZ=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),yr={};function a5(h,m="and"){return h.length<3?h.join(` ${m} `):`${h.slice(0,-1).join(", ")}, ${m} ${h[h.length-1]}`}let E4=new Map,s4;function Tr(h,m,y){return E4.set(h,m),function(W,J){return a;function a(...F){let T=Error.stackTraceLimit;F5()&&(Error.stackTraceLimit=0);let D=new W;F5()&&(Error.stackTraceLimit=T);let i0=function(s,$0,v0){let Y0=E4.get(s);if(uf.ok(Y0!==void 0,"expected `message` to be found"),typeof Y0=="function")return uf.ok(Y0.length<=$0.length,`Code: ${s}; The provided arguments length (${$0.length}) does not match the required ones (${Y0.length}).`),Reflect.apply(Y0,v0,$0);let fl=/%[dfijoOs]/g,Il=0;for(;fl.exec(Y0)!==null;)Il++;return uf.ok(Il===$0.length,`Code: ${s}; The provided arguments length (${$0.length}) does not match the required ones (${Il}).`),$0.length===0?Y0:($0.unshift(Y0),Reflect.apply(at.format,null,$0))}(J,F,D);return Object.defineProperties(D,{message:{value:i0,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${J}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),rZ(D),D.code=J,D}}(y,h)}function F5(){try{if(sW.startupSnapshot.isBuildingSnapshot())return!1}catch{}let h=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return h===void 0?Object.isExtensible(Error):CW.call(h,"writable")&&h.writable!==void 0?h.writable:h.set!==void 0}yr.ERR_INVALID_ARG_TYPE=Tr("ERR_INVALID_ARG_TYPE",(h,m,y)=>{uf.ok(typeof h=="string","'name' must be a string"),Array.isArray(m)||(m=[m]);let W="The ";if(h.endsWith(" argument"))W+=`${h} `;else{let T=h.includes(".")?"property":"argument";W+=`"${h}" ${T} `}W+="must be ";let J=[],a=[],F=[];for(let T of m)uf.ok(typeof T=="string","All expected entries have to be of type string"),lZ.has(T)?J.push(T.toLowerCase()):eW.exec(T)===null?(uf.ok(T!=="object",'The value "object" should be written as "Object"'),F.push(T)):a.push(T);if(a.length>0){let T=J.indexOf("object");T!==-1&&(J.slice(T,1),a.push("Object"))}return J.length>0&&(W+=`${J.length>1?"one of type":"of type"} ${a5(J,"or")}`,(a.length>0||F.length>0)&&(W+=" or ")),a.length>0&&(W+=`an instance of ${a5(a,"or")}`,F.length>0&&(W+=" or ")),F.length>0&&(F.length>1?W+=`one of ${a5(F,"or")}`:(F[0].toLowerCase()!==F[0]&&(W+="an "),W+=`${F[0]}`)),W+=`. Received ${function(T){if(T==null)return String(T);if(typeof T=="function"&&T.name)return`function ${T.name}`;if(typeof T=="object")return T.constructor&&T.constructor.name?`an instance of ${T.constructor.name}`:`${(0,at.inspect)(T,{depth:-1})}`;let D=(0,at.inspect)(T,{colors:!1});return D.length>28&&(D=`${D.slice(0,25)}...`),`type ${typeof T} (${D})`}(y)}`,W},TypeError),yr.ERR_INVALID_MODULE_SPECIFIER=Tr("ERR_INVALID_MODULE_SPECIFIER",(h,m,y=void 0)=>`Invalid module "${h}" ${m}${y?` imported from ${y}`:""}`,TypeError),yr.ERR_INVALID_PACKAGE_CONFIG=Tr("ERR_INVALID_PACKAGE_CONFIG",(h,m,y)=>`Invalid package config ${h}${m?` while importing ${m}`:""}${y?`. ${y}`:""}`,Error),yr.ERR_INVALID_PACKAGE_TARGET=Tr("ERR_INVALID_PACKAGE_TARGET",(h,m,y,W=!1,J=void 0)=>{let a=typeof y=="string"&&!W&&y.length>0&&!y.startsWith("./");return m==="."?(uf.ok(W===!1),`Invalid "exports" main target ${JSON.stringify(y)} defined in the package config ${h}package.json${J?` imported from ${J}`:""}${a?'; targets must start with "./"':""}`):`Invalid "${W?"imports":"exports"}" target ${JSON.stringify(y)} defined for '${m}' in the package config ${h}package.json${J?` imported from ${J}`:""}${a?'; targets must start with "./"':""}`},Error),yr.ERR_MODULE_NOT_FOUND=Tr("ERR_MODULE_NOT_FOUND",(h,m,y=!1)=>`Cannot find ${y?"module":"package"} '${h}' imported from ${m}`,Error),yr.ERR_NETWORK_IMPORT_DISALLOWED=Tr("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error),yr.ERR_PACKAGE_IMPORT_NOT_DEFINED=Tr("ERR_PACKAGE_IMPORT_NOT_DEFINED",(h,m,y)=>`Package import specifier "${h}" is not defined${m?` in package ${m}package.json`:""} imported from ${y}`,TypeError),yr.ERR_PACKAGE_PATH_NOT_EXPORTED=Tr("ERR_PACKAGE_PATH_NOT_EXPORTED",(h,m,y=void 0)=>m==="."?`No "exports" main defined in ${h}package.json${y?` imported from ${y}`:""}`:`Package subpath '${m}' is not defined by "exports" in ${h}package.json${y?` imported from ${y}`:""}`,Error),yr.ERR_UNSUPPORTED_DIR_IMPORT=Tr("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error),yr.ERR_UNSUPPORTED_RESOLVE_REQUEST=Tr("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError),yr.ERR_UNKNOWN_FILE_EXTENSION=Tr("ERR_UNKNOWN_FILE_EXTENSION",(h,m)=>`Unknown file extension "${h}" for ${m}`,TypeError),yr.ERR_INVALID_ARG_VALUE=Tr("ERR_INVALID_ARG_VALUE",(h,m,y="is invalid")=>{let W=(0,at.inspect)(m);return W.length>128&&(W=`${W.slice(0,128)}...`),`The ${h.includes(".")?"property":"argument"} '${h}' ${y}. Received ${W}`},TypeError);let rZ=function(h){let m="__node_internal_"+h.name;return Object.defineProperty(h,"name",{value:m}),h}(function(h){let m=F5();return m&&(s4=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(h),m&&(Error.stackTraceLimit=s4),h}),Nn={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:fZ}=yr,C4=new Map;function e4(h,{base:m,specifier:y}){let W=C4.get(h);if(W)return W;let J;try{J=O0.readFileSync(G5.toNamespacedPath(h),"utf8")}catch(F){let T=F;if(T.code!=="ENOENT")throw T}let a={exists:!1,pjsonPath:h,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(J!==void 0){let F;try{F=JSON.parse(J)}catch(T){let D=T,i0=new fZ(h,(m?`"${y}" from `:"")+(0,D0.fileURLToPath)(m||y),D.message);throw i0.cause=D,i0}a.exists=!0,Nn.call(F,"name")&&typeof F.name=="string"&&(a.name=F.name),Nn.call(F,"main")&&typeof F.main=="string"&&(a.main=F.main),Nn.call(F,"exports")&&(a.exports=F.exports),Nn.call(F,"imports")&&(a.imports=F.imports),!Nn.call(F,"type")||F.type!=="commonjs"&&F.type!=="module"||(a.type=F.type)}return C4.set(h,a),a}function N5(h){let m=new URL("package.json",h);for(;;){if(m.pathname.endsWith("node_modules/package.json"))break;let y=e4((0,D0.fileURLToPath)(m),{specifier:h});if(y.exists)return y;let W=m;if(m=new URL("../package.json",m),m.pathname===W.pathname)break}return{pjsonPath:(0,D0.fileURLToPath)(m),exists:!1,type:"none"}}function lv(h){return N5(h).type}let{ERR_UNKNOWN_FILE_EXTENSION:iZ}=yr,nZ={}.hasOwnProperty,uZ={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"},rv={__proto__:null,"data:":function(h){let{1:m}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(h.pathname)||[null,null,null];return function(y){return y&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(y)?"module":y==="application/json"?"json":null}(m)},"file:":function(h,m,y){let W=function(F){let T=F.pathname,D=T.length;for(;D--;){let i0=T.codePointAt(D);if(i0===47)return"";if(i0===46)return T.codePointAt(D-1)===47?"":T.slice(D)}return""}(h);if(W===".js"){let F=lv(h);return F!=="none"?F:"commonjs"}if(W===""){let F=lv(h);return F==="none"||F==="commonjs"?"commonjs":"module"}let J=uZ[W];if(J)return J;if(y)return;let a=(0,D0.fileURLToPath)(h);throw new iZ(W,a)},"http:":fv,"https:":fv,"node:":()=>"builtin"};function fv(){}let tZ=Object.freeze(["node","import"]),hZ=new Set(tZ);function oZ(h){return hZ}let Ft=RegExp.prototype[Symbol.replace],{ERR_INVALID_MODULE_SPECIFIER:Nt,ERR_INVALID_PACKAGE_CONFIG:iv,ERR_INVALID_PACKAGE_TARGET:wZ,ERR_MODULE_NOT_FOUND:nv,ERR_PACKAGE_IMPORT_NOT_DEFINED:vZ,ERR_PACKAGE_PATH_NOT_EXPORTED:mZ,ERR_UNSUPPORTED_DIR_IMPORT:kZ,ERR_UNSUPPORTED_RESOLVE_REQUEST:uv}=yr,tv={}.hasOwnProperty,hv=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,ov=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,$Z=/^\.|%|\\/,Rt=/\*/g,bZ=/%2f|%5c/i,wv=new Set,yZ=/[/\\]{2}/;function vv(h,m,y,W,J,a,F){if(Lf.noDeprecation)return;let T=(0,D0.fileURLToPath)(W),D=yZ.exec(F?h:m)!==null;Lf.emitWarning(`Use of deprecated ${D?"double slash":"leading or trailing slash matching"} resolving "${h}" for module request "${m}" ${m===y?"":`matched to "${y}" `}in the "${J?"imports":"exports"}" field module resolution of the package at ${T}${a?` imported from ${(0,D0.fileURLToPath)(a)}`:""}.`,"DeprecationWarning","DEP0166")}function mv(h,m,y,W){if(Lf.noDeprecation)return;if(function(D,i0){let s=D.protocol;return nZ.call(rv,s)&&rv[s](D,i0,!0)||null}(h,{parentURL:y.href})!=="module")return;let a=(0,D0.fileURLToPath)(h.href),F=(0,D0.fileURLToPath)(new URL(".",m)),T=(0,D0.fileURLToPath)(y);W?G5.resolve(F,W)!==a&&Lf.emitWarning(`Package ${F} has a "main" field set to "${W}", excluding the full filename and extension to the resolved file at "${a.slice(F.length)}", imported from ${T}.
200
- Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):Lf.emitWarning(`No "main" or "exports" field defined in the package.json for ${F} resolving the main entry point "${a.slice(F.length)}", imported from ${T}.
201
- Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function kv(h){try{return(0,O0.statSync)(h)}catch{}}function R5(h){let m=(0,O0.statSync)(h,{throwIfNoEntry:!1}),y=m?m.isFile():void 0;return y!=null&&y}function dZ(h,m,y){let W;if(m.main!==void 0){if(W=new URL(m.main,h),R5(W))return W;let F=[`./${m.main}.js`,`./${m.main}.json`,`./${m.main}.node`,`./${m.main}/index.js`,`./${m.main}/index.json`,`./${m.main}/index.node`],T=-1;for(;++T<F.length&&(W=new URL(F[T],h),!R5(W));)W=void 0;if(W)return mv(W,h,y,m.main),W}let J=["./index.js","./index.json","./index.node"],a=-1;for(;++a<J.length&&(W=new URL(J[a],h),!R5(W));)W=void 0;if(W)return mv(W,h,y,m.main),W;throw new nv((0,D0.fileURLToPath)(new URL(".",h)),(0,D0.fileURLToPath)(y))}function T5(h,m,y){return new mZ((0,D0.fileURLToPath)(new URL(".",m)),h,y&&(0,D0.fileURLToPath)(y))}function Rn(h,m,y,W,J){return m=typeof m=="object"&&m!==null?JSON.stringify(m,null,""):`${m}`,new wZ((0,D0.fileURLToPath)(new URL(".",y)),h,m,W,J&&(0,D0.fileURLToPath)(J))}function gZ(h,m,y,W,J,a,F,T,D){if(m!==""&&!a&&h[h.length-1]!=="/")throw Rn(y,h,W,F,J);if(!h.startsWith("./")){if(F&&!h.startsWith("../")&&!h.startsWith("/")){let v0=!1;try{new URL(h),v0=!0}catch{}if(!v0)return yv(a?Ft.call(Rt,h,()=>m):h+m,W,D)}throw Rn(y,h,W,F,J)}if(hv.exec(h.slice(2))!==null){if(ov.exec(h.slice(2))!==null)throw Rn(y,h,W,F,J);if(!T){let v0=a?y.replace("*",()=>m):y+m;vv(a?Ft.call(Rt,h,()=>m):h,v0,y,W,F,J,!0)}}let i0=new URL(h,W),s=i0.pathname,$0=new URL(".",W).pathname;if(!s.startsWith($0))throw Rn(y,h,W,F,J);if(m==="")return i0;if(hv.exec(m)!==null){let v0=a?y.replace("*",()=>m):y+m;if(ov.exec(m)===null){if(!T)vv(a?Ft.call(Rt,h,()=>m):h,v0,y,W,F,J,!1)}else(function(Y0,fl,Il,L0,il){let F0=`request is not a valid match in pattern "${fl}" for the "${L0?"imports":"exports"}" resolution of ${(0,D0.fileURLToPath)(Il)}`;throw new Nt(Y0,F0,il&&(0,D0.fileURLToPath)(il))})(v0,y,W,F,J)}return a?new URL(Ft.call(Rt,i0.href,()=>m)):new URL(m,i0)}function cZ(h){let m=Number(h);return`${m}`===h&&(m>=0&&m<4294967295)}function zi(h,m,y,W,J,a,F,T,D){if(typeof m=="string")return gZ(m,y,W,h,J,a,F,T,D);if(Array.isArray(m)){let i0=m;if(i0.length===0)return null;let s,$0=-1;for(;++$0<i0.length;){let v0=i0[$0],Y0;try{Y0=zi(h,v0,y,W,J,a,F,T,D)}catch(fl){if(s=fl,fl.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw fl}if(Y0!==void 0){if(Y0!==null)return Y0;s=null}}if(s==null)return null;throw s}if(typeof m=="object"&&m!==null){let i0=Object.getOwnPropertyNames(m),s=-1;for(;++s<i0.length;)if(cZ(i0[s]))throw new iv((0,D0.fileURLToPath)(h),J,'"exports" cannot contain numeric property keys.');for(s=-1;++s<i0.length;){let $0=i0[s];if($0==="default"||D&&D.has($0)){let v0=zi(h,m[$0],y,W,J,a,F,T,D);if(v0===void 0)continue;return v0}}return null}if(m===null)return null;throw Rn(W,m,h,F,J)}function AZ(h,m,y){if(Lf.noDeprecation)return;let W=(0,D0.fileURLToPath)(m);wv.has(W+"|"+h)||(wv.add(W+"|"+h),Lf.emitWarning(`Use of deprecated trailing slash pattern mapping "${h}" in the "exports" field module resolution of the package at ${W}${y?` imported from ${(0,D0.fileURLToPath)(y)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function $v(h,m,y,W,J){let a=y.exports;if(function(s,$0,v0){if(typeof s=="string"||Array.isArray(s))return!0;if(typeof s!="object"||s===null)return!1;let Y0=Object.getOwnPropertyNames(s),fl=!1,Il=0,L0=-1;for(;++L0<Y0.length;){let il=Y0[L0],F0=il===""||il[0]!==".";if(Il++===0)fl=F0;else if(fl!==F0)throw new iv((0,D0.fileURLToPath)($0),v0,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return fl}(a,h,W)&&(a={".":a}),tv.call(a,m)&&!m.includes("*")&&!m.endsWith("/")){let s=zi(h,a[m],"",m,W,!1,!1,!1,J);if(s==null)throw T5(m,h,W);return s}let F="",T="",D=Object.getOwnPropertyNames(a),i0=-1;for(;++i0<D.length;){let s=D[i0],$0=s.indexOf("*");if($0!==-1&&m.startsWith(s.slice(0,$0))){m.endsWith("/")&&AZ(m,h,W);let v0=s.slice($0+1);m.length>=s.length&&m.endsWith(v0)&&bv(F,s)===1&&s.lastIndexOf("*")===$0&&(F=s,T=m.slice($0,m.length-v0.length))}}if(F){let s=zi(h,a[F],T,F,W,!0,!1,m.endsWith("/"),J);if(s==null)throw T5(m,h,W);return s}throw T5(m,h,W)}function bv(h,m){let y=h.indexOf("*"),W=m.indexOf("*"),J=y===-1?h.length:y+1,a=W===-1?m.length:W+1;return J>a?-1:a>J||y===-1?1:W===-1||h.length>m.length?-1:m.length>h.length?1:0}function KZ(h,m,y){if(h==="#"||h.startsWith("#/")||h.endsWith("/"))throw new Nt(h,"is not a valid internal imports specifier name",(0,D0.fileURLToPath)(m));let W,J=N5(m);if(J.exists){W=(0,D0.pathToFileURL)(J.pjsonPath);let a=J.imports;if(a)if(tv.call(a,h)&&!h.includes("*")){let F=zi(W,a[h],"",h,m,!1,!0,!1,y);if(F!=null)return F}else{let F="",T="",D=Object.getOwnPropertyNames(a),i0=-1;for(;++i0<D.length;){let s=D[i0],$0=s.indexOf("*");if($0!==-1&&h.startsWith(s.slice(0,-1))){let v0=s.slice($0+1);h.length>=s.length&&h.endsWith(v0)&&bv(F,s)===1&&s.lastIndexOf("*")===$0&&(F=s,T=h.slice($0,h.length-v0.length))}}if(F){let s=zi(W,a[F],T,F,m,!0,!0,!1,y);if(s!=null)return s}}}throw function(a,F,T){return new vZ(a,F&&(0,D0.fileURLToPath)(new URL(".",F)),(0,D0.fileURLToPath)(T))}(h,W,m)}function yv(h,m,y){if(j0.builtinModules.includes(h))return new URL("node:"+h);let{packageName:W,packageSubpath:J,isScoped:a}=function(s,$0){let v0=s.indexOf("/"),Y0=!0,fl=!1;s[0]==="@"&&(fl=!0,v0===-1||s.length===0?Y0=!1:v0=s.indexOf("/",v0+1));let Il=v0===-1?s:s.slice(0,v0);if($Z.exec(Il)!==null&&(Y0=!1),!Y0)throw new Nt(s,"is not a valid package name",(0,D0.fileURLToPath)($0));return{packageName:Il,packageSubpath:"."+(v0===-1?"":s.slice(v0)),isScoped:fl}}(h,m),F=N5(m);if(F.exists){let s=(0,D0.pathToFileURL)(F.pjsonPath);if(F.name===W&&F.exports!==void 0&&F.exports!==null)return $v(s,J,F,m,y)}let T,D=new URL("./node_modules/"+W+"/package.json",m),i0=(0,D0.fileURLToPath)(D);do{let s=kv(i0.slice(0,-13));if(!s||!s.isDirectory()){T=i0,D=new URL((a?"../../../../node_modules/":"../../../node_modules/")+W+"/package.json",D),i0=(0,D0.fileURLToPath)(D);continue}let $0=e4(i0,{base:m,specifier:h});return $0.exports!==void 0&&$0.exports!==null?$v(D,J,$0,m,y):J==="."?dZ(D,$0,m):new URL(J,D)}while(i0.length!==T.length)}function WZ(h,m,y,W){y===void 0&&(y=oZ());let J=m.protocol,a=J==="data:"||J==="http:"||J==="https:",F;if(function(T){return T!==""&&(T[0]==="/"||function(D){if(D[0]==="."){if(D.length===1||D[1]==="/")return!0;if(D[1]==="."&&(D.length===2||D[2]==="/"))return!0}return!1}(T))}(h))try{F=new URL(h,m)}catch(T){let D=new uv(h,m);throw D.cause=T,D}else if(J==="file:"&&h[0]==="#")F=KZ(h,m,y);else try{F=new URL(h)}catch(T){if(a&&!j0.builtinModules.includes(h)){let D=new uv(h,m);throw D.cause=T,D}F=yv(h,m,y)}return uf.ok(F!==void 0,"expected to be defined"),F.protocol!=="file:"?F:function(T,D){if(bZ.exec(T.pathname)!==null)throw new Nt(T.pathname,'must not include encoded "/" or "\\" characters',(0,D0.fileURLToPath)(D));let i0;try{i0=(0,D0.fileURLToPath)(T)}catch($0){let v0=$0;throw Object.defineProperty(v0,"input",{value:String(T)}),Object.defineProperty(v0,"module",{value:String(D)}),v0}let s=kv(i0.endsWith("/")?i0.slice(-1):i0);if(s&&s.isDirectory()){let $0=new kZ(i0,(0,D0.fileURLToPath)(D));throw $0.url=String(T),$0}if(!s||!s.isFile()){let $0=new nv(i0||T.pathname,D&&(0,D0.fileURLToPath)(D),!0);throw $0.url=String(T),$0}{let $0=(0,O0.realpathSync)(i0),{search:v0,hash:Y0}=T;(T=(0,D0.pathToFileURL)($0+(i0.endsWith(G5.sep)?"/":""))).search=v0,T.hash=Y0}return T}(F,m)}function Qi(h){return typeof h!="string"||h.startsWith("file://")?U5((0,D0.fileURLToPath)(h)):U5(h)}function Pf(h){return(0,D0.pathToFileURL)(Qi(h)).toString()}let ZZ=new Set(["node","import"]),OZ=[".mjs",".cjs",".js",".json"],XZ=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function dv(h,m,y){try{return WZ(h,m,y)}catch(W){if(!XZ.has(W?.code))throw W}}function YZ(h,m={}){if(typeof h!="string"){if(!(h instanceof URL))throw TypeError("input must be a `string` or `URL`");h=Qi(h)}if(/(?:node|data|http|https):/.test(h))return h;if(j4.has(h))return"node:"+h;if(h.startsWith("file://")&&(h=Qi(h)),Tf(h))try{if((0,O0.statSync)(h).isFile())return Pf(h)}catch(F){if(F?.code!=="ENOENT")throw F}let y=m.conditions?new Set(m.conditions):ZZ,W=(Array.isArray(m.url)?m.url:[m.url]).filter(Boolean).map((F)=>new URL(function(T){return typeof T!="string"&&(T=T.toString()),/(?:node|data|http|https|file):/.test(T)?T:j4.has(T)?"node:"+T:"file://"+encodeURI(U5(T))}(F.toString())));W.length===0&&W.push(new URL(Pf(process.cwd())));let J=[...W];for(let F of W)F.protocol==="file:"&&J.push(new URL("./",F),new URL(Rf(F.pathname,"_index.js"),F),new URL("node_modules",F));let a;for(let F of J){if(a=dv(h,F,y),a)break;for(let T of["","/index"]){for(let D of m.extensions||OZ)if(a=dv(Rf(h,T)+D,F,y),a)break;if(a)break}if(a)break}if(!a){let F=Error(`Cannot find module ${h} imported from ${J.join(", ")}`);throw F.code="ERR_MODULE_NOT_FOUND",F}return Pf(a)}function JZ(h,m){return YZ(h,m)}function zZ(h,m){return Qi(JZ(h,m))}let QZ=/(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m,BZ=/\/\*.+?\*\/|\/\/.*(?=[nr])/g;function HZ(h,m={}){return m.stripComments&&(h=h.replace(BZ,"")),QZ.test(h)}function gv(h){if(typeof h!="string")throw TypeError("Expected a string");return h.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}let GZ=new Set(["/","\\",void 0]),cv=Symbol.for("pathe:normalizedAlias"),UZ=/[/\\]/;function Av(h){if(h[cv])return h;let m=Object.fromEntries(Object.entries(h).sort(([y],[W])=>function(J,a){return a.split("/").length-J.split("/").length}(y,W)));for(let y in m)for(let W in m)W===y||y.startsWith(W)||m[y]?.startsWith(W)&&GZ.has(m[y][W.length])&&(m[y]=m[W]+m[y].slice(W.length));return Object.defineProperty(m,cv,{value:!0,enumerable:!1}),m}function Kv(h="/"){let m=h[h.length-1];return m==="/"||m==="\\"}var aZ={rE:"2.6.1"};let FZ=P0("crypto");var L5=f.n(FZ);let dr=globalThis.process?.env||Object.create(null),tf=globalThis.process||{env:dr},Tt=tf!==void 0&&tf.env&&tf.env.NODE_ENV||void 0,NZ=[["claude",["CLAUDECODE","CLAUDE_CODE"]],["replit",["REPL_ID"]],["gemini",["GEMINI_CLI"]],["codex",["CODEX_SANDBOX","CODEX_THREAD_ID"]],["opencode",["OPENCODE"]],["pi",[P5("PATH",/\.pi[\\/]agent/)]],["auggie",["AUGMENT_AGENT"]],["goose",["GOOSE_PROVIDER"]],["devin",[P5("EDITOR",/devin/)]],["cursor",["CURSOR_AGENT"]],["kiro",[P5("TERM_PROGRAM",/kiro/)]]];function P5(h,m){return()=>{let y=dr[h];return!!y&&m.test(y)}}let Wv=function(){let h=dr.AI_AGENT;if(h)return{name:h.toLowerCase()};for(let[m,y]of NZ)for(let W of y)if(typeof W=="string"?dr[W]:W())return{name:m};return{}}(),RZ=(Wv.name,Wv.name,[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CLOUDFLARE_WORKERS","WORKERS_CI",{ci:!0}],["GOOGLE_CLOUDRUN","K_SERVICE"],["GOOGLE_CLOUDRUN_JOB","CLOUD_RUN_JOB"],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["JENKINS","JENKINS_URL"],["HUDSON","HUDSON_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOY"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}],["EDGEONE_PAGES","EO_PAGES_CI",{ci:!0}]]),Zv=function(){for(let h of RZ)if(dr[h[1]||h[0]])return{name:h[0].toLowerCase(),...h[2]};return dr.SHELL==="/bin/jsh"&&tf.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}(),p5=(Zv.name,tf.platform||""),$S=!!dr.CI||Zv.ci!==!1,TZ=!!tf.stdout?.isTTY,bS=(dr.DEBUG,Tt==="test"||!!dr.TEST),Ov=(Tt==="production"||dr.MODE,Tt==="dev"||Tt==="development"||dr.MODE,dr.MINIMAL,/^win/i.test(p5)),LZ=(/^linux/i.test(p5),/^darwin/i.test(p5),!dr.NO_COLOR&&(!!dr.FORCE_COLOR||(TZ||Ov)&&dr.TERM),(tf.versions?.node||"").replace(/^v/,"")||null),PZ=(Number(LZ?.split(".")[0]),!!tf?.versions?.node),pZ="Bun"in globalThis,MZ="Deno"in globalThis,VZ="fastly"in globalThis,IZ=[["Netlify"in globalThis,"netlify"],["EdgeRuntime"in globalThis,"edge-light"],[globalThis.navigator?.userAgent==="Cloudflare-Workers","workerd"],[VZ,"fastly"],[MZ,"deno"],[pZ,"bun"],[PZ,"node"]];(function(){let h=IZ.find((m)=>m[0]);if(h)h[1]})();let qZ=P0("tty"),_Z=qZ?.WriteStream?.prototype?.hasColors?.()??!1,T0=(h,m)=>{if(!_Z)return(J)=>J;let y=`\x1B[${h}m`,W=`\x1B[${m}m`;return(J)=>{let a=J+"",F=a.indexOf(W);if(F===-1)return y+a+W;let T=y,D=0,i0=(m===22?W:"")+y;for(;F!==-1;)T+=a.slice(D,F)+i0,D=F+W.length,F=a.indexOf(W,D);return T+=a.slice(D)+W,T}},Xv=(T0(0,0),T0(1,22),T0(2,22),T0(3,23),T0(4,24),T0(53,55),T0(7,27),T0(8,28),T0(9,29),T0(30,39),T0(31,39)),Bi=T0(32,39),Lt=T0(33,39),Yv=T0(34,39),SZ=(T0(35,39),T0(36,39)),DZ=(T0(37,39),T0(90,39));T0(40,49),T0(41,49),T0(42,49),T0(43,49),T0(44,49),T0(45,49),T0(46,49),T0(47,49),T0(100,49),T0(91,39),T0(92,39),T0(93,39),T0(94,39),T0(95,39),T0(96,39),T0(97,39),T0(101,49),T0(102,49),T0(103,49),T0(104,49),T0(105,49),T0(106,49),T0(107,49);function Jv(h){if(typeof h!="string"||h.startsWith("file://"))return!1;try{return(0,O0.lstatSync)(h).isDirectory()}catch{return!1}}function zv(h,m=8){return(function(){if(Hi!==void 0)return Hi;try{return Hi=!!L5().getFips?.(),Hi}catch{return Hi=!1,Hi}}()?L5().createHash("sha256"):L5().createHash("md5")).update(h).digest("hex").slice(0,m)}let Qv={true:Bi("true"),false:Lt("false"),"[rebuild]":Lt("[rebuild]"),"[esm]":Yv("[esm]"),"[cjs]":Bi("[cjs]"),"[import]":Yv("[import]"),"[require]":Bi("[require]"),"[native]":SZ("[native]"),"[transpile]":Lt("[transpile]"),"[fallback]":Xv("[fallback]"),"[unknown]":Xv("[unknown]"),"[hit]":Bi("[hit]"),"[miss]":Lt("[miss]"),"[json]":Bi("[json]"),"[data]":Bi("[data]")};function Ul(h,...m){if(!h.opts.debug)return;let y=process.cwd();console.log(DZ(["[jiti]",...m.map((W)=>(W in Qv)?Qv[W]:typeof W!="string"?JSON.stringify(W):W.replace(y,"."))].join(" ")))}function Q1(h,m){return h.opts.interopDefault?function(y){let W=typeof y;if(y===null||W!=="object"&&W!=="function")return y;let J=y.default,a=typeof J,F=J==null,T=a==="object"||a==="function";if(F&&y instanceof Promise)return y;let D=a==="function"&&W!=="function",i0=T&&!(J instanceof Promise),s=new Map;return new Proxy(y,{get($0,v0){if(s.has(v0))return s.get(v0);let Y0;return v0==="__esModule"?Y0=!0:v0==="default"?Y0=F?y:typeof J?.default=="function"&&y.__esModule?J.default:J:(v0 in $0)?Y0=$0[v0]:i0&&(Y0=J[v0],typeof Y0=="function"&&(Y0=Y0.bind(J))),s.set(v0,Y0),Y0},apply:D?($0,v0,Y0)=>Reflect.apply(J,v0,Y0):void 0})}(m):m}let Hi;function w1(h,m){let y=pf(h,m);return Boolean(y)}function pf(h,m,y){let W=process.env[h];if(!(h in process.env))return m;try{return JSON.parse(W)}catch{return y?W:m}}let Bv=/\.(c|m)?j(sx?)$/,Hv=/\.(c|m)?t(sx?)$/;function Gi(h,m,y){let W,J;if(h.isNativeRe.test(m))return m;if(h.resolveTsConfigPaths&&!y.skipTsConfigPaths){let T=h.resolveTsConfigPaths(m);for(let D of T){let i0=Gi(h,D,{...y,try:!0,skipTsConfigPaths:!0});if(i0)return i0}}h.alias&&(m=function(T,D){let i0=Ol(T);D=Av(D);for(let[s,$0]of Object.entries(D)){if(!i0.startsWith(s))continue;let v0=Kv(s)?s.slice(0,-1):s;if(Kv(i0[v0.length]))return o1($0,i0.slice(s.length))}return i0}(m,h.alias));let a=y?.parentURL||h.url;Jv(a)&&(a=o1(a,"_index.js"));let F=((y?.async)?[y?.conditions,["node","import"],["node","require"]]:[y?.conditions,["node","require"],["node","import"]]).filter(Boolean);for(let T of F){try{W=zZ(m,{url:a,conditions:T,extensions:h.opts.extensions})}catch(D){J=D}if(W)return W}try{return h.nativeRequire.resolve(m,{paths:y.paths})}catch(T){J=T}for(let T of h.additionalExts){if(W=M5(h,m+T,a,y)||M5(h,m+"/index"+T,a,y),W)return W;if((Hv.test(h.filename)||Hv.test(h.parentModule?.filename||"")||Bv.test(m))&&(W=M5(h,m.replace(Bv,".$1t$2"),a,y),W))return W}if(!y?.try)throw J}function M5(h,m,y,W){try{return h.nativeRequire.resolve(m,{...W,paths:[Fn(Qi(y)),...W?.paths||[]]})}catch{}}let xZ=P0("fs/promises"),Gv=P0("perf_hooks"),jZ=P0("vm");var EZ=f.n(jZ);function Pt(h,m,y){let W=h.parentCache||{};if(m.startsWith("node:"))return Mf(h,m,y.async);if(m.startsWith("file:"))m=(0,D0.fileURLToPath)(m);else if(m.startsWith("data:")){if(!y.async)throw Error("`data:` URLs are only supported in ESM context. Use `import` or `jiti.import` instead.");return Ul(h,"[native]","[data]","[import]",m),Mf(h,m,!0)}if(j0.builtinModules.includes(m)||m===".pnp.js")return Mf(h,m,y.async);if(h.opts.virtualModules&&m in h.opts.virtualModules){Ul(h,"[virtual]",m);let T=h.opts.virtualModules[m];return y.async?Promise.resolve(Q1(h,T)):Q1(h,T)}if(h.opts.tryNative&&!h.opts.transformOptions)try{if(!(m=Gi(h,m,y))&&y.try)return;if(Ul(h,"[try-native]",y.async&&h.nativeImport?"[import]":"[require]",m),y.async&&h.nativeImport)return h.nativeImport(m).then((T)=>(h.opts.moduleCache===!1&&delete h.nativeRequire.cache[m],Q1(h,T))).catch((T)=>(Ul(h,`[try-native] Using fallback for ${m} because of an error:`,T),Pt({...h,opts:{...h.opts,tryNative:!1}},m,y)));{let T=h.nativeRequire(m);return h.opts.moduleCache===!1&&delete h.nativeRequire.cache[m],Q1(h,T)}}catch(T){Ul(h,`[try-native] Using fallback for ${m} because of an error:`,T)}let J=Gi(h,m,y);if(!J&&y.try)return;let a=B5(J);if(a===".json"){Ul(h,"[json]",J);let T=h.nativeRequire(J);return T&&!("default"in T)&&Object.defineProperty(T,"default",{value:T,enumerable:!1}),T}if(a&&!h.opts.extensions.includes(a))return Ul(h,"[native]","[unknown]",y.async?"[import]":"[require]",J),Mf(h,J,y.async);if(h.isNativeRe.test(J))return Ul(h,"[native]",y.async?"[import]":"[require]",J),Mf(h,J,y.async);if(W[J])return Q1(h,W[J]?.exports);if(h.opts.moduleCache){let T=h.nativeRequire.cache[J];if(T?.loaded)return Q1(h,T.exports)}let F=(0,O0.readFileSync)(J,"utf8");return I5(h,F,{id:m,filename:J,ext:a,cache:W,async:y.async})}function Mf(h,m,y){return y&&h.nativeImport?h.nativeImport(function(W){return Ov&&Tf(W)?Pf(W):W}(m)).then((W)=>Q1(h,W)):Q1(h,h.nativeRequire(m))}let sZ="9";function CZ(h,m,y){if(!h.opts.fsCache||!m.filename)return y();let W=` /* v${sZ}-${zv(m.source,16)} */
202
- `,J=`${H5(Fn(m.filename))}-${function(D){let i0=D.split(UZ).pop();if(!i0)return;let s=i0.lastIndexOf(".");return s<=0?i0:i0.slice(0,s)}(m.filename)}`+(h.opts.sourceMaps?"+map":"")+(m.interopDefault?".i":"")+`.${zv(m.filename)}`+(m.async?".mjs":".cjs");m.jsx&&m.filename.endsWith("x")&&(J+="x");let a=h.opts.fsCache,F=o1(a,J);if(!h.opts.rebuildFsCache&&(0,O0.existsSync)(F)){let D=(0,O0.readFileSync)(F,"utf8");if(D.endsWith(W))return Ul(h,"[cache]","[hit]",m.filename,"~>",F),D}Ul(h,"[cache]","[miss]",m.filename);let T=y();return T.includes("__JITI_ERROR__")||((0,O0.writeFileSync)(F,T+W,"utf8"),Ul(h,"[cache]","[store]",m.filename,"~>",F)),T}function eZ(h){if(h.opts.fsCache===!0&&(h.opts.fsCache=function(m){let y=m.filename&&EW(m.filename,"../node_modules");if(y&&(0,O0.existsSync)(y))return o1(y,".cache/jiti");let W=(0,n.tmpdir)();if(process.env.TMPDIR&&W===process.cwd()&&!process.env.JITI_RESPECT_TMPDIR_ENV){let J=process.env.TMPDIR;delete process.env.TMPDIR,W=(0,n.tmpdir)(),process.env.TMPDIR=J}return o1(W,"jiti")}(h)),h.opts.fsCache)try{if((0,O0.mkdirSync)(h.opts.fsCache,{recursive:!0}),!function(m){try{return(0,O0.accessSync)(m,O0.constants.W_OK),!0}catch{return!1}}(h.opts.fsCache))throw Error("directory is not writable!")}catch(m){Ul(h,"Error creating cache directory at ",h.opts.fsCache,m),h.opts.fsCache=!1}}function V5(h,m){let y=CZ(h,m,()=>{let W=h.opts.transform({...h.opts.transformOptions,babel:{...h.opts.sourceMaps?{sourceFileName:m.filename,sourceMaps:"inline"}:{},...h.opts.transformOptions?.babel},interopDefault:h.opts.interopDefault,...m});return W.error&&h.opts.debug&&Ul(h,W.error),W.code});return y.startsWith("#!")&&(y="// "+y),y}function I5(h,m,y={}){let W=y.id||(y.filename?H5(y.filename):`_jitiEval.${y.ext||(y.async?"mjs":"js")}`),J=y.filename||Gi(h,W,{async:y.async}),a=y.ext||B5(J),F=y.cache||h.parentCache||{},T=/\.[cm]?tsx?$/.test(a),D=a===".mjs"||a===".js"&&function(F0){for(;F0&&F0!=="."&&F0!=="/";){F0=o1(F0,"..");try{let Vf=(0,O0.readFileSync)(o1(F0,"package.json"),"utf8");try{return JSON.parse(Vf)}catch{}break}catch{}}}(J)?.type==="module",i0=a===".cjs",s=y.forceTranspile??(!i0&&!(D&&y.async)&&(T||D||h.isTransformRe.test(J)||HZ(m))),$0=Gv.performance.now();if(s){m=V5(h,{filename:J,source:m,ts:T,async:y.async??!1,jsx:h.opts.jsx});let F0=Math.round(1000*(Gv.performance.now()-$0))/1000;Ul(h,"[transpile]",y.async?"[esm]":"[cjs]",J,`(${F0}ms)`)}else{if(Ul(h,"[native]",y.async?"[import]":"[require]",J),y.async)return Promise.resolve(Mf(h,J,y.async)).catch((F0)=>(Ul(h,"Native import error:",F0),Ul(h,"[fallback]",J),I5(h,m,{...y,forceTranspile:!0})));try{return Mf(h,J,y.async)}catch(F0){Ul(h,"Native require error:",F0),Ul(h,"[fallback]",J),m=V5(h,{filename:J,source:m,ts:T,async:y.async??!1,jsx:h.opts.jsx})}}let v0=new j0.Module(J);v0.filename=J,h.parentModule&&(v0.parent=h.parentModule,Array.isArray(h.parentModule.children)&&!h.parentModule.children.includes(v0)&&h.parentModule.children.push(v0));let Y0=Uv(J,h.opts,{parentModule:v0,parentCache:F,nativeImport:h.nativeImport,onError:h.onError,createRequire:h.createRequire},!0),fl;v0.require=Y0,v0.path=Fn(J),v0.paths=j0.Module._nodeModulePaths(v0.path),F[J]=v0,h.opts.moduleCache&&(h.nativeRequire.cache[J]=v0);let Il=function(F0,Vf){return`(${Vf?.async?"async ":""}function (exports, require, module, __filename, __dirname, jitiImport, jitiESMResolve) { ${F0}
203
- });`}(m,{async:y.async});try{fl=EZ().runInThisContext(Il,{filename:J,lineOffset:0,displayErrors:!1})}catch(F0){F0.name==="SyntaxError"&&y.async&&h.nativeImport?(Ul(h,"[esm]","[import]","[fallback]",J),fl=function(Vf,q5,_5,pt,Mt){let av=`export default ${q5}`,Fv=Mt?void 0:`data:text/javascript;base64,${Buffer.from(av).toString("base64")}`;return(...rO)=>{let Tn,Nv=()=>(Tn=function(Ui,Rv){let Tv=o1((0,n.tmpdir)(),"jiti-esm");try{(0,O0.mkdirSync)(Tv,{recursive:!0})}catch{}let Lv=o1(Tv,`${H5(Rv,B5(Rv))}-${Date.now()}-${Math.random().toString(36).slice(2)}.mjs`);return(0,O0.writeFileSync)(Lv,Ui),Lv}(av,_5),Ul(Vf,"[esm]","[tempfile]",Tn),pt(Pf(Tn)));return(Fv?pt(Fv).catch((Ui)=>{if(Ui?.code!=="ENAMETOOLONG")throw Ui;return Nv()}):Nv()).then((Ui)=>Ui.default(...rO)).finally(()=>{Tn&&(0,xZ.unlink)(Tn).catch(()=>{})})}}(h,Il,J,h.nativeImport,h.opts.esmEvalTempFile)):(h.opts.moduleCache&&delete h.nativeRequire.cache[J],h.onError(F0))}let L0;try{L0=fl(v0.exports,v0.require,v0,v0.filename,Fn(v0.filename),Y0.import,Y0.esmResolve)}catch(F0){h.opts.moduleCache&&delete h.nativeRequire.cache[J],h.onError(F0)}function il(){if(v0.exports&&v0.exports.__JITI_ERROR__){let{filename:F0,line:Vf,column:q5,code:_5,message:pt}=v0.exports.__JITI_ERROR__,Mt=Error(`${_5}: ${pt}
204
- ${`${F0}:${Vf}:${q5}`}`);Error.captureStackTrace(Mt,Pt),h.onError(Mt)}return v0.loaded=!0,Q1(h,v0.exports)}return y.async?Promise.resolve(L0).then(il):il()}let lO=(0,n.platform)()==="win32";function Uv(h,m={},y,W=!1){let J=W?m:function(L0){let il={fsCache:w1("JITI_FS_CACHE",w1("JITI_CACHE",!0)),rebuildFsCache:w1("JITI_REBUILD_FS_CACHE",!1),moduleCache:w1("JITI_MODULE_CACHE",w1("JITI_REQUIRE_CACHE",!0)),debug:w1("JITI_DEBUG",!1),sourceMaps:w1("JITI_SOURCE_MAPS",!1),interopDefault:w1("JITI_INTEROP_DEFAULT",!0),extensions:pf("JITI_EXTENSIONS",[".js",".mjs",".cjs",".ts",".tsx",".mts",".cts",".mtsx",".ctsx"]),alias:pf("JITI_ALIAS",{}),nativeModules:pf("JITI_NATIVE_MODULES",[]),transformModules:pf("JITI_TRANSFORM_MODULES",[]),tryNative:pf("JITI_TRY_NATIVE","Bun"in globalThis),esmEvalTempFile:w1("JITI_ESM_EVAL_TEMP_FILE",!1),jsx:w1("JITI_JSX",!1),tsconfigPaths:pf("JITI_TSCONFIG_PATHS",!1,!0)};il.jsx&&il.extensions.push(".jsx",".tsx");let F0={};return L0.cache!==void 0&&(F0.fsCache=L0.cache),L0.requireCache!==void 0&&(F0.moduleCache=L0.requireCache),{...il,...F0,...L0}}(m);typeof h=="string"&&h.startsWith("file://")&&(h=Qi(h));let a=J.alias&&Object.keys(J.alias).length>0?Av(J.alias||{}):void 0,F;if(J.tsconfigPaths){let{getTsconfig:L0,createPathsMatcher:il}=f("./node_modules/.pnpm/get-tsconfig@4.14.0/node_modules/get-tsconfig/dist/index.cjs"),F0=L0(typeof J.tsconfigPaths=="string"?J.tsconfigPaths:Fn(h));F0&&(F=il(F0))}let T=["typescript","jiti",...J.nativeModules||[]],D=new RegExp(`node_modules/(${T.map((L0)=>gv(L0)).join("|")})/`),i0=[...J.transformModules||[]],s=new RegExp(`node_modules/(${i0.map((L0)=>gv(L0)).join("|")})/`);h||(h=process.cwd()),!W&&Jv(h)&&(h=o1(h,"_index.js"));let $0=Pf(h),v0=[...J.extensions].filter((L0)=>L0!==".js"),Y0=y.createRequire(lO?h.replace(/\//g,"\\"):h),fl={filename:h,url:$0,opts:J,alias:a,resolveTsConfigPaths:F,nativeModules:T,transformModules:i0,isNativeRe:D,isTransformRe:s,additionalExts:v0,nativeRequire:Y0,onError:y.onError,parentModule:y.parentModule,parentCache:y.parentCache,nativeImport:y.nativeImport,createRequire:y.createRequire};return W||Ul(fl,"[init]",...[["version:",aZ.rE],["module-cache:",J.moduleCache],["fs-cache:",J.fsCache],["rebuild-fs-cache:",J.rebuildFsCache],["interop-defaults:",J.interopDefault]].flat()),W||eZ(fl),Object.assign(function(L0){return Pt(fl,L0,{async:!1})},{cache:J.moduleCache?Y0.cache:Object.create(null),extensions:Y0.extensions,main:Y0.main,options:J,resolve:Object.assign(function(L0,il){return Gi(fl,L0,{...il,async:!1})},{paths:Y0.resolve.paths}),transform:(L0)=>V5(fl,L0),evalModule:(L0,il)=>I5(fl,L0,il),async import(L0,il){let F0=await Pt(fl,L0,{...il,async:!0});return il?.default?F0?.default??F0:F0},esmResolve(L0,il){typeof il=="string"&&(il={parentURL:il});let F0=Gi(fl,L0,{parentURL:$0,...il,async:!0});return!F0||typeof F0!="string"||F0.startsWith("file://")?F0:Pf(F0)}})}})(),zg.exports=i.default})()});var NK=j((Zu0,FK)=>{var{defineProperty:s6,getOwnPropertyDescriptor:kI,getOwnPropertyNames:$I}=Object,bI=Object.prototype.hasOwnProperty,yI=(l,r)=>{for(var f in r)s6(l,f,{get:r[f],enumerable:!0})},dI=(l,r,f,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of $I(r))!bI.call(l,n)&&n!==f&&s6(l,n,{get:()=>r[n],enumerable:!(i=kI(r,n))||i.enumerable});return l},gI=(l)=>dI(s6({},"__esModule",{value:!0}),l),aK={};yI(aK,{clearRequireCache:()=>cI});FK.exports=gI(aK);function cI(l){for(let r of l)delete P0.cache[r]}});var B1=c.object({tagline:c.string().optional().describe("Short public profile tagline"),intro:c.string().optional().describe("Longer public profile introduction"),story:c.string().optional().describe("Extended profile narrative sourced from the markdown body"),audience:c.string().optional().describe("Primary audience or community served")}),Pv=c.object({tagline:B1.shape.tagline,intro:B1.shape.intro,audience:B1.shape.audience}),S5=c.object({role:c.string().optional().describe("Professional role or working identity"),expertise:c.array(c.string()).optional().describe("Skills, domains, and areas of focus"),currentFocus:c.string().optional().describe("What the professional is currently working on"),availability:c.string().optional().describe("Work, speaking, or collaboration availability")}),Vt=B1.extend(S5.shape),pv=c.object({purpose:c.string().optional().describe("Team purpose"),focusAreas:c.array(c.string()).optional().describe("Team focus areas"),capabilities:c.array(c.string()).optional().describe("Team capabilities"),workingPrinciples:c.array(c.string()).optional().describe("Principles guiding how the team works")}),Mv=B1.extend(pv.shape),Vv=c.object({mission:c.string().optional().describe("Organization mission"),focusAreas:c.array(c.string()).optional().describe("Organization focus areas"),offerings:c.array(c.string()).optional().describe("Organization products, services, or programs"),values:c.array(c.string()).optional().describe("Organization values")}),Iv=B1.extend(Vv.shape),If=Ln.extend(Vt.shape).strict(),fO=Ln.extend(Mv.shape).strict(),iO=Ln.extend(Iv.shape).strict(),It=Ln.extend(B1.shape).loose(),D5=It.extend(S5.shape).loose();var KS=c.record(c.string(),c.unknown());var XS=c.record(c.string(),c.unknown());var nO=c.string().trim().min(3).max(80).refine((l)=>l.split(/\s+/u).length>=2&&l.split(/\s+/u).length<=6,"Role must contain between two and six words").refine((l)=>!/[.!?]$/u.test(l),"Role must be a phrase"),uO=c.string().trim().min(12).max(240).refine((l)=>!/[\r\n]/u.test(l),"Purpose must be one line"),tO=c.string().trim().min(2).max(60).refine((l)=>l.split(/\s+/u).length<=5,"Values must contain at most five words"),hO=c.object({role:nO,purpose:uO,values:c.array(tO).length(3)}).refine(({values:l})=>new Set(l.map((r)=>r.toLowerCase())).size===l.length,{message:"Values must be distinct",path:["values"]});var BS=c.record(c.string(),c.unknown());var bO=c.object({enabled:c.boolean().default(!0)}),LS=c.object({starterIdentity:bO.default({enabled:!0})});async function qv(l){let f=(await l.listEntities({entityType:"anchor-profile",options:{limit:1}}))[0];if(!f)throw Error("Profile not found \u2014 create an anchor-profile entity");return f.content}async function H1(l,r){let f=await qv(l),{metadata:i,content:n}=Rl(f,c.record(c.string(),c.unknown()));return r.parse(n?{...i,story:n}:i)}var yO=c.object({}),dO=c.object({}),qt=hf.extend({id:c.literal("site-info"),entityType:c.literal("site-info"),metadata:dO});var gO=_v.omit({url:!0,analyticsScript:!0}),ai=gO.extend({title:c.string().optional().describe("Optional site title override"),description:c.string().optional().describe("Optional site description override")});var cO=c.record(c.string(),c.unknown());class G1 extends Fi{constructor(){super({entityType:"site-info",purpose:"Singleton configuration describing the published site.",schema:qt,frontmatterSchema:ai,isSingleton:!0,hasBody:!1})}createSiteInfoContent(l){let r=ai.parse(l);return this.buildMarkdown("",r)}parseSiteInfoBody(l){return this.parseFrontmatter(l)}fromMarkdown(l){return{content:l,entityType:"site-info"}}extractMetadata(l){return{}}generateFrontMatter(l){let r=this.parseFrontmatter(l.content);return this.buildMarkdown("",cO.parse(r))}}var gD=new G1;var UD=new G1;var ZO=new G1;async function _f(l){let f=(await l.listEntities({entityType:"site-info",options:{limit:1}}))[0];if(!f)throw Error("Site info not found \u2014 create a site-info entity");return ZO.parseSiteInfoBody(f.content)}function Sv(l,r){let f=l.metadata.publishedAt??l.created,i=r.metadata.publishedAt??r.created;return new Date(i).getTime()-new Date(f).getTime()}async function Ri(l,r){return(await l.listEntities({entityType:r.entityType,options:{limit:20}})).sort(Sv).slice(0,r.count).map(r.parse)}function pn(l){if(!l)throw Error("CTA not configured in site-info");return l}var Dv=c.object({label:c.string(),href:c.string(),priority:c.number()}),OO=c.object({primary:c.array(Dv),secondary:c.array(Dv)}),XO=c.object({platform:c.enum(["github","instagram","linkedin","email","website"]).describe("Social media platform"),url:c.string().describe("Profile or contact URL"),label:c.string().optional().describe("Optional display label")}),YO=ai.extend({title:c.string(),description:c.string(),navigation:OO,copyright:c.string(),socialLinks:c.array(XO).optional().describe("Social media links composed by a site integration")});var Mn=It;var xv={lexicon:1,id:"ai.rizom.brain.card",defs:{main:{type:"record",description:"Public discovery card for a Rizom brain. The operational A2A Agent Card is conventionally served at /.well-known/agent-card.json under siteUrl.",key:"literal:self",record:{type:"object",required:["siteUrl","brain","anchor","skills","model","version","createdAt"],properties:{siteUrl:{type:"string",format:"uri",description:"Public site URL. Consumers derive the A2A Agent Card URL from this base."},brain:{type:"ref",ref:"#brain",description:"Brain identity described by this discovery card."},anchor:{type:"ref",ref:"#anchor",description:"Minimal Anchor snapshot for discovery grouping and display."},skills:{type:"array",description:"User-facing skills this brain advertises for discovery.",items:{type:"ref",ref:"#skill"},maxLength:100},model:{type:"string",description:"Rizom brain model identifier."},version:{type:"string",description:"Brain runtime/model implementation version."},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}},brain:{type:"object",description:"Brain identity described by this discovery card.",required:["did","name","role","purpose","values"],properties:{did:{type:"string",description:"Public DID for the brain identity."},name:{type:"string",maxLength:200,description:"Human-readable brain name."},role:{type:"string",maxLength:500,description:"Brain role or persona."},purpose:{type:"string",maxLength:2000,description:"Short public description of what this brain is for."},values:{type:"array",description:"Public values or principles for this brain.",items:{type:"string",maxLength:200},maxLength:50}}},anchor:{type:"object",description:"Minimal Anchor snapshot for discovery grouping and display.",required:["did","name","category","kind"],properties:{did:{type:"string",description:"Public DID for the Anchor identity."},name:{type:"string",maxLength:200,description:"Human-readable anchor name."},category:{type:"string",knownValues:["person","team","organization"],description:"Stable structural category for discovery and grouping."},kind:{type:"string",maxLength:200,description:"Open semantic profile kind selected by the publishing brain."}}},skill:{type:"object",description:"User-facing skill this brain advertises for discovery.",required:["id","name","description"],properties:{id:{type:"string",maxLength:200},name:{type:"string",maxLength:200},description:{type:"string",maxLength:2000},tags:{type:"array",items:{type:"string"},maxLength:50},examples:{type:"array",items:{type:"string"},maxLength:20}}}}};var jv={lexicon:1,id:"ai.rizom.brain.deck",defs:{main:{type:"record",description:"Public presentation deck from a Rizom brain.",key:"any",record:{type:"object",required:["title","body","createdAt"],properties:{title:{type:"string",maxLength:300},slug:{type:"string"},description:{type:"string",maxLength:2000},body:{type:"string",maxLength:1e5},format:{type:"string",knownValues:["text/markdown"]},author:{type:"string"},event:{type:"string"},publishedAt:{type:"string",format:"datetime"},brainDid:{type:"string"},anchorDid:{type:"string"},sourceEntityType:{type:"string"},sourceEntityId:{type:"string"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}}};var Ev={lexicon:1,id:"ai.rizom.brain.link",defs:{main:{type:"record",description:"Public curated link from a Rizom brain.",key:"any",record:{type:"object",required:["title","url","createdAt"],properties:{title:{type:"string",maxLength:500},url:{type:"string",format:"uri"},description:{type:"string",maxLength:2000},summary:{type:"string",maxLength:1e5},domain:{type:"string"},capturedAt:{type:"string",format:"datetime"},source:{type:"ref",ref:"#source"},brainDid:{type:"string"},anchorDid:{type:"string"},sourceEntityType:{type:"string"},sourceEntityId:{type:"string"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}},source:{type:"object",description:"Attribution for where this link was captured.",required:["ref","label"],properties:{ref:{type:"string"},label:{type:"string"}}}}};var sv={lexicon:1,id:"ai.rizom.brain.note",defs:{main:{type:"record",description:"Public knowledge note from a Rizom brain.",key:"any",record:{type:"object",required:["title","body","createdAt"],properties:{title:{type:"string",maxLength:300},body:{type:"string",maxLength:1e5},format:{type:"string",knownValues:["text/markdown"]},brainDid:{type:"string"},anchorDid:{type:"string"},sourceEntityType:{type:"string"},sourceEntityId:{type:"string"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}}};var Cv={lexicon:1,id:"ai.rizom.brain.post",defs:{main:{type:"record",description:"Markdown blog post distributed by a Rizom brain.",key:"any",record:{type:"object",required:["title","body","createdAt"],properties:{title:{type:"string",maxLength:300},summary:{type:"string",maxLength:2000},body:{type:"string",maxLength:1e5},format:{type:"string",knownValues:["text/markdown"]},brainDid:{type:"string"},anchorDid:{type:"string"},canonicalUrl:{type:"string",format:"uri"},topics:{type:"array",items:{type:"string"},maxLength:50},coverImage:{type:"ref",ref:"#coverImage"},series:{type:"string",maxLength:200},seriesIndex:{type:"integer"},sourceEntityType:{type:"string",knownValues:["post"]},sourceEntityId:{type:"string"},createdAt:{type:"string",format:"datetime"},publishedAt:{type:"string",format:"datetime"}}}},coverImage:{type:"object",description:"Cover image attached to the post.",required:["blob"],properties:{blob:{type:"blob"},alt:{type:"string",maxLength:1000},width:{type:"integer"},height:{type:"integer"}}}}};var ev={lexicon:1,id:"ai.rizom.brain.project",defs:{main:{type:"record",description:"Public project or case study from a Rizom brain.",key:"any",record:{type:"object",required:["title","body","year","createdAt"],properties:{title:{type:"string",maxLength:300},slug:{type:"string"},description:{type:"string",maxLength:2000},body:{type:"string",maxLength:1e5},format:{type:"string",knownValues:["text/markdown"]},year:{type:"integer"},url:{type:"string",format:"uri"},publishedAt:{type:"string",format:"datetime"},brainDid:{type:"string"},anchorDid:{type:"string"},sourceEntityType:{type:"string"},sourceEntityId:{type:"string"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}}};var l9={lexicon:1,id:"ai.rizom.brain.series",defs:{main:{type:"record",description:"Public content series from a Rizom brain.",key:"any",record:{type:"object",required:["title","createdAt"],properties:{title:{type:"string",maxLength:300},slug:{type:"string"},description:{type:"string",maxLength:1e4},brainDid:{type:"string"},anchorDid:{type:"string"},sourceEntityType:{type:"string"},sourceEntityId:{type:"string"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}}};var r9={lexicon:1,id:"ai.rizom.brain.socialPost",defs:{main:{type:"record",description:"Semantic local social-post entity from a Rizom brain; not a Bluesky feed post.",key:"any",record:{type:"object",required:["title","platform","body","createdAt"],properties:{title:{type:"string",maxLength:300},platform:{type:"string"},body:{type:"string",maxLength:1e5},format:{type:"string",knownValues:["text/markdown"]},status:{type:"string"},publishedAt:{type:"string",format:"datetime"},platformPostId:{type:"string"},sourceLocalEntityType:{type:"string"},sourceLocalEntityId:{type:"string"},brainDid:{type:"string"},anchorDid:{type:"string"},sourceEntityType:{type:"string"},sourceEntityId:{type:"string"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}}};var f9={lexicon:1,id:"ai.rizom.brain.topic",defs:{main:{type:"record",description:"Public topic page from a Rizom brain.",key:"any",record:{type:"object",required:["title","body","createdAt"],properties:{title:{type:"string",maxLength:300},body:{type:"string",maxLength:1e5},format:{type:"string",knownValues:["text/markdown"]},brainDid:{type:"string"},anchorDid:{type:"string"},sourceEntityType:{type:"string"},sourceEntityId:{type:"string"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}}};var i9=c.object({type:c.string()}).catchall(c.unknown()),NO=c.object({type:c.literal("object"),description:c.string().optional(),required:c.array(c.string()).optional(),properties:c.record(c.string(),i9)}),RO=c.object({lexicon:c.literal(1),id:c.string(),defs:c.object({main:c.object({type:c.literal("record"),key:c.string().min(1),description:c.string().optional(),record:c.object({type:c.literal("object"),required:c.array(c.string()).optional(),properties:c.record(c.string(),i9)})})}).catchall(NO)});function v1(l){return RO.parse(l)}var gr={"ai.rizom.brain.card":v1(xv),"ai.rizom.brain.deck":v1(jv),"ai.rizom.brain.link":v1(Ev),"ai.rizom.brain.note":v1(sv),"ai.rizom.brain.post":v1(Cv),"ai.rizom.brain.project":v1(ev),"ai.rizom.brain.series":v1(l9),"ai.rizom.brain.socialPost":v1(r9),"ai.rizom.brain.topic":v1(f9)},TO="Additive optional fields are compatible; required-field, type, or constraint changes require a migration plan or new NSID.";function U1(l){return{status:"approved",version:"1.0.0",revision:1,owner:"Rizom",steward:"Rizom protocol registry",projectionPackage:l,compatibility:TO}}var LO={"ai.rizom.brain.card":U1("@brains/atproto"),"ai.rizom.brain.deck":U1("@brains/decks"),"ai.rizom.brain.link":U1("@brains/link"),"ai.rizom.brain.note":U1("@brains/note"),"ai.rizom.brain.post":U1("@brains/blog"),"ai.rizom.brain.project":U1("@brains/portfolio"),"ai.rizom.brain.series":U1("@brains/series"),"ai.rizom.brain.socialPost":U1("@brains/social-media"),"ai.rizom.brain.topic":U1("@brains/topics")};function E5(l){return typeof l==="object"&&l!==null&&!Array.isArray(l)}var PO=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/;function pO(l){let r=c.string(),f=l.maxLength!==void 0?r.max(l.maxLength):r;if(l.knownValues)f=f.refine((i)=>l.knownValues?.includes(i),{message:`expected one of ${l.knownValues.join(", ")}`});if(l.format==="datetime")f=f.refine((i)=>PO.test(i)&&!Number.isNaN(Date.parse(i)),{message:"expected datetime"});if(l.format==="uri")f=f.refine((i)=>{try{return new URL(i),!0}catch{return!1}},{message:"expected uri"});return f}function MO(l,r){if(typeof l!=="string"||!l.startsWith("#"))return;let f=r[l.slice(1)];return f?.type==="object"?f:void 0}function u9(l,r){switch(l.type){case"string":return pO(l);case"integer":return c.number().int();case"boolean":return c.boolean();case"array":{let f=l.items?u9(l.items,r):c.unknown(),i=c.array(f);if(l.maxLength!==void 0)i=i.max(l.maxLength);return i}case"object":return n9(l,r);case"ref":{let f=MO(l.ref,r);if(!f)return c.custom(()=>!1,{message:`unresolvable lexicon ref ${String(l.ref)}`});return c.lazy(()=>n9(f,r))}case"blob":return c.custom(E5,{message:"expected blob"});default:return c.unknown()}}function t9(l,r){let f=new Set(l.required??[]),i={};for(let[n,u]of Object.entries(l.properties??{})){let t=u9(u,r);i[n]=f.has(n)?t:t.optional()}return i}function n9(l,r){return c.object(t9(l,r)).passthrough()}function j5(l,r,f,i=[]){let n=Object.keys(l).filter((u)=>!r.has(u));if(n.length===0)return;f.addIssue({code:c.ZodIssueCode.custom,path:i,message:`unrecognized field(s): ${n.join(", ")}`})}function VO(l,r){if(j5(l,new Set(["$type","siteUrl","brain","anchor","skills","model","version","createdAt","updatedAt"]),r),E5(l.brain))j5(l.brain,new Set(["did","name","role","purpose","values"]),r,["brain"]);if(E5(l.anchor))j5(l.anchor,new Set(["did","name","category","kind"]),r,["anchor"])}function m1(l){let r=c.object({...t9(l.defs.main.record,l.defs),$type:c.literal(l.id).optional()}).passthrough();return l.id==="ai.rizom.brain.card"?r.superRefine(VO):r}var s5={"ai.rizom.brain.card":m1(gr["ai.rizom.brain.card"]),"ai.rizom.brain.deck":m1(gr["ai.rizom.brain.deck"]),"ai.rizom.brain.link":m1(gr["ai.rizom.brain.link"]),"ai.rizom.brain.note":m1(gr["ai.rizom.brain.note"]),"ai.rizom.brain.post":m1(gr["ai.rizom.brain.post"]),"ai.rizom.brain.project":m1(gr["ai.rizom.brain.project"]),"ai.rizom.brain.series":m1(gr["ai.rizom.brain.series"]),"ai.rizom.brain.socialPost":m1(gr["ai.rizom.brain.socialPost"]),"ai.rizom.brain.topic":m1(gr["ai.rizom.brain.topic"])};var IO=c.custom((l)=>s5["ai.rizom.brain.card"].safeParse(l).success),qO=c.object({repoDid:c.string().min(1),uri:c.string().min(1),cid:c.string().min(1),record:IO}).strict(),_O=c.object({agentId:c.string().min(1),name:c.string().min(1),url:c.string().url(),status:c.enum(["discovered","approved","archived"]),repoDid:c.string().min(1).optional(),brainDid:c.string().min(1).optional(),anchorDid:c.string().min(1).optional(),cardUri:c.string().min(1).optional(),cardCid:c.string().min(1).optional()}).strict(),SO=c.object({repoDid:c.string().startsWith("did:plc:"),observedAt:c.string().datetime(),staleAfter:c.string().datetime().optional(),reason:c.enum(["deleted","refresh-failed"]),error:c.string().min(1).optional()}).strict(),DO=c.object({domain:c.string().min(1),existingRepoDid:c.string().min(1).optional(),candidateRepoDid:c.string().startsWith("did:plc:"),observedAt:c.string().datetime(),reason:c.string().min(1)}).strict(),xO=c.object({previousCursorTimeUs:c.number().int().nonnegative(),clampedCursorTimeUs:c.number().int().nonnegative(),observedAt:c.string().datetime()}).strict();class of{static instance;projections=new Map;static getInstance(){return this.instance??=new of,this.instance}static createFresh(){return new of}static resetInstance(){this.instance=void 0}register(l){this.validateProjection(l);let r=this.get(l.entityType);if(r&&!this.isEquivalentProjection(r,l))throw Error(`AT Protocol projection already registered for entity type ${l.entityType}`);let f=this.projections.get(l.entityType)??[];return f.push(l),this.projections.set(l.entityType,f),this.createUnregister(l.entityType,l)}get(l){let r=this.projections.get(l);return r?.[r.length-1]}has(l){return this.get(l)!==void 0}list(){let l=[];for(let r of this.projections.keys()){let f=this.get(r);if(f)l.push(f)}return l}listLexicons(){return this.list().map((l)=>l.lexicon)}createUnregister(l,r){let f=!0;return()=>{if(!f)return;f=!1;let i=this.projections.get(l);if(!i)return;let n=i.lastIndexOf(r);if(n!==-1)i.splice(n,1);if(i.length===0)this.projections.delete(l)}}isEquivalentProjection(l,r){return l.entityType===r.entityType&&l.collection===r.collection&&l.lexicon.id===r.lexicon.id&&l.validate===r.validate}validateProjection(l){if(l.collection!==l.lexicon.id)throw Error(`AT Protocol projection collection must match lexicon id: ${l.collection} !== ${l.lexicon.id}`);if(!l.lexicon.defs.main.key)throw Error(`AT Protocol projection lexicon must define a record key: ${l.collection}`)}}var C5=c.object({defaultPrompt:c.string().default("Write a blog post about my recent work and insights"),paginate:c.boolean().default(!0),pageSize:c.number().default(10)});var h9=c.object({audiences:c.array(c.string()).optional(),positioning:c.string().optional()}),o9=c.object({summary:c.string().optional(),traits:c.array(c.string()).optional(),principles:c.array(c.string()).optional(),preferredTerms:c.array(c.string()).optional(),avoid:c.array(c.string()).optional()}),w9=c.object({artDirection:c.string().optional(),palette:c.array(c.string()).optional(),composition:c.string().optional(),mood:c.string().optional(),preferred:c.array(c.string()).optional(),avoid:c.array(c.string()).optional()}),Vn=c.object({name:c.string().describe("Style guide name"),messaging:h9.optional(),voice:o9.optional(),visual:w9.optional()}),jO=c.object({}),St=hf.extend({id:c.literal("style-guide"),entityType:c.literal("style-guide"),metadata:jO});class e5 extends Fi{constructor(){super({entityType:"style-guide",purpose:"Singleton messaging, voice, and visual guidance for generated artifacts.",schema:St,frontmatterSchema:Vn,isSingleton:!0,hasBody:!0})}createStyleGuideContent(l,r=""){return this.buildMarkdown(r,Vn.parse(l))}parseStyleGuide(l){let r=Rl(l,Vn);return{...r.metadata,guidance:r.content}}fromMarkdown(l){return{content:l,entityType:"style-guide"}}extractMetadata(l){return{}}}var Dt=new e5;var m9={name:"Default style guide",guidance:""};async function a1(l){let r=await l.getEntity({entityType:"style-guide",id:"style-guide"});return r?.id==="style-guide"?Dt.parseStyleGuide(r.content):m9}function wf(l,r,f){if(f&&f.length>0)l.push(`${r}: ${f.join(", ")}`)}function EO(l){let r=[],{messaging:f,voice:i}=l;if(wf(r,"Audiences",f?.audiences),f?.positioning)r.push(`Positioning: ${f.positioning}`);if(i?.summary)r.push(`Voice: ${i.summary}`);return wf(r,"Voice traits",i?.traits),wf(r,"Voice principles",i?.principles),wf(r,"Preferred terms",i?.preferredTerms),wf(r,"Avoid",i?.avoid),r.join(`
199
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return x(this.readCodePoint());case 116:return"\t";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"),h){var y=this.pos-1;this.invalidStringToken(y,"Invalid escape sequence in template string")}default:if(m>=48&&m<=55){var W=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],J=parseInt(W,8);return J>255&&(W=W.slice(0,-1),J=parseInt(W,8)),this.pos+=W.length-1,m=this.input.charCodeAt(this.pos),W==="0"&&m!==56&&m!==57||!this.strict&&!h||this.invalidStringToken(this.pos-1-W.length,h?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(J)}return l0(m)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(m)}},k0.readHexChar=function(h){var m=this.pos,y=this.readInt(16,h);return y===null&&this.invalidStringToken(m,"Bad character escape sequence"),y},k0.readWord1=function(){this.containsEsc=!1;for(var h="",m=!0,y=this.pos,W=this.options.ecmaVersion>=6;this.pos<this.input.length;){var J=this.fullCharCodeAtPos();if(z(J,W))this.pos+=J<=65535?1:2;else{if(J!==92)break;this.containsEsc=!0,h+=this.input.slice(y,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var F=this.readCodePoint();(m?Y:z)(F,W)||this.invalidStringToken(a,"Invalid Unicode escape"),h+=x(F),y=this.pos}m=!1}return h+this.input.slice(y,this.pos)},k0.readWord=function(){var h=this.readWord1(),m=X.name;return this.keywords.test(h)&&(m=I[h]),this.finishToken(m,h)},e0.acorn={Parser:e0,version:"8.16.0",defaultOptions:Z0,Position:h0,SourceLocation:y0,getLineInfo:nl,Node:t1,TokenType:R,tokTypes:X,keywordTypes:I,TokContext:Zr,tokContexts:Wl,isIdentifierChar:z,isIdentifierStart:Y,Token:h1,isNewLine:l0,lineBreak:P,lineBreakG:_,nonASCIIwhitespace:u0};var j0=f("node:module"),O0=f("node:fs");String.fromCharCode;let an=/\/$|\/\?|\/#/,zt=/^\.?\//;function Qt(h="",m){return m?an.test(h):h.endsWith("/")}function Bt(h="",m){if(!m)return h.endsWith("/")?h:h+"/";if(Qt(h,!0))return h||"/";let y=h,W="",J=h.indexOf("#");if(J!==-1&&(y=h.slice(0,J),W=h.slice(J),!y))return W;let[a,...F]=y.split("?");return a+"/"+(F.length>0?`?${F.join("?")}`:"")+W}function Ht(h){return h&&h!=="/"}function Tf(h,...m){let y=h||"";for(let W of m.filter((J)=>Ht(J)))if(y){let J=W.replace(zt,"");y=Bt(y)+J}else y=W;return y}let rl=/^[A-Za-z]:\//;function Ol(h=""){return h?h.replace(/\\/g,"/").replace(rl,(m)=>m.toUpperCase()):h}let Gt=/^[/\\]{2}/,Ji=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,D4=/^[A-Za-z]:$/,DW=/.(\.[^./]+|\.)$/,xW=function(h){if(h.length===0)return".";let m=(h=Ol(h)).match(Gt),y=Lf(h),W=h[h.length-1]==="/";return(h=x4(h,!y)).length===0?y?"/":W?"./":".":(W&&(h+="/"),D4.test(h)&&(h+="/"),m?y?`//${h}`:`//./${h}`:y&&!Lf(h)?`/${h}`:h)},o1=function(...h){let m="";for(let y of h)if(y)if(m.length>0){let W=m[m.length-1]==="/",J=y[0]==="/";m+=W&&J?y.slice(1):W||J?y:`/${y}`}else m+=y;return xW(m)};function jW(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}let EW=function(...h){let m="",y=!1;for(let W=(h=h.map((J)=>Ol(J))).length-1;W>=-1&&!y;W--){let J=W>=0?h[W]:jW();J&&J.length!==0&&(m=`${J}/${m}`,y=Lf(J))}return m=x4(m,!y),y&&!Lf(m)?`/${m}`:m.length>0?m:"."};function x4(h,m){let y="",W=0,J=-1,a=0,F=null;for(let T=0;T<=h.length;++T){if(T<h.length)F=h[T];else{if(F==="/")break;F="/"}if(F==="/"){if(J===T-1||a===1);else if(a===2){if(y.length<2||W!==2||y[y.length-1]!=="."||y[y.length-2]!=="."){if(y.length>2){let D=y.lastIndexOf("/");D===-1?(y="",W=0):(y=y.slice(0,D),W=y.length-1-y.lastIndexOf("/")),J=T,a=0;continue}if(y.length>0){y="",W=0,J=T,a=0;continue}}m&&(y+=y.length>0?"/..":"..",W=2)}else y.length>0?y+=`/${h.slice(J+1,T)}`:y=h.slice(J+1,T),W=T-J-1;J=T,a=0}else F==="."&&a!==-1?++a:a=-1}return y}let Lf=function(h){return Ji.test(h)},B5=function(h){if(h==="..")return"";let m=DW.exec(Ol(h));return m&&m[1]||""},Fn=function(h){let m=Ol(h).replace(/\/$/,"").split("/").slice(0,-1);return m.length===1&&D4.test(m[0])&&(m[0]+="/"),m.join("/")||(Lf(h)?"/":".")},H5=function(h,m){let y=Ol(h).split("/"),W="";for(let J=y.length-1;J>=0;J--){let a=y[J];if(a){W=a;break}}return m&&W.endsWith(m)?W.slice(0,-m.length):W},D0=P0("url"),uf=P0("assert"),Pf=P0("process");var G5=f("node:path");let sW=P0("v8"),Ut=P0("util"),j4=new Set(j0.builtinModules);function U5(h){return h.replace(/\\/g,"/")}let CW={}.hasOwnProperty,eW=/^([A-Z][a-z\d]*)+$/,lZ=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),yr={};function a5(h,m="and"){return h.length<3?h.join(` ${m} `):`${h.slice(0,-1).join(", ")}, ${m} ${h[h.length-1]}`}let E4=new Map,s4;function Tr(h,m,y){return E4.set(h,m),function(W,J){return a;function a(...F){let T=Error.stackTraceLimit;F5()&&(Error.stackTraceLimit=0);let D=new W;F5()&&(Error.stackTraceLimit=T);let i0=function(s,$0,v0){let Y0=E4.get(s);if(uf.ok(Y0!==void 0,"expected `message` to be found"),typeof Y0=="function")return uf.ok(Y0.length<=$0.length,`Code: ${s}; The provided arguments length (${$0.length}) does not match the required ones (${Y0.length}).`),Reflect.apply(Y0,v0,$0);let fl=/%[dfijoOs]/g,Il=0;for(;fl.exec(Y0)!==null;)Il++;return uf.ok(Il===$0.length,`Code: ${s}; The provided arguments length (${$0.length}) does not match the required ones (${Il}).`),$0.length===0?Y0:($0.unshift(Y0),Reflect.apply(Ut.format,null,$0))}(J,F,D);return Object.defineProperties(D,{message:{value:i0,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${J}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),rZ(D),D.code=J,D}}(y,h)}function F5(){try{if(sW.startupSnapshot.isBuildingSnapshot())return!1}catch{}let h=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return h===void 0?Object.isExtensible(Error):CW.call(h,"writable")&&h.writable!==void 0?h.writable:h.set!==void 0}yr.ERR_INVALID_ARG_TYPE=Tr("ERR_INVALID_ARG_TYPE",(h,m,y)=>{uf.ok(typeof h=="string","'name' must be a string"),Array.isArray(m)||(m=[m]);let W="The ";if(h.endsWith(" argument"))W+=`${h} `;else{let T=h.includes(".")?"property":"argument";W+=`"${h}" ${T} `}W+="must be ";let J=[],a=[],F=[];for(let T of m)uf.ok(typeof T=="string","All expected entries have to be of type string"),lZ.has(T)?J.push(T.toLowerCase()):eW.exec(T)===null?(uf.ok(T!=="object",'The value "object" should be written as "Object"'),F.push(T)):a.push(T);if(a.length>0){let T=J.indexOf("object");T!==-1&&(J.slice(T,1),a.push("Object"))}return J.length>0&&(W+=`${J.length>1?"one of type":"of type"} ${a5(J,"or")}`,(a.length>0||F.length>0)&&(W+=" or ")),a.length>0&&(W+=`an instance of ${a5(a,"or")}`,F.length>0&&(W+=" or ")),F.length>0&&(F.length>1?W+=`one of ${a5(F,"or")}`:(F[0].toLowerCase()!==F[0]&&(W+="an "),W+=`${F[0]}`)),W+=`. Received ${function(T){if(T==null)return String(T);if(typeof T=="function"&&T.name)return`function ${T.name}`;if(typeof T=="object")return T.constructor&&T.constructor.name?`an instance of ${T.constructor.name}`:`${(0,Ut.inspect)(T,{depth:-1})}`;let D=(0,Ut.inspect)(T,{colors:!1});return D.length>28&&(D=`${D.slice(0,25)}...`),`type ${typeof T} (${D})`}(y)}`,W},TypeError),yr.ERR_INVALID_MODULE_SPECIFIER=Tr("ERR_INVALID_MODULE_SPECIFIER",(h,m,y=void 0)=>`Invalid module "${h}" ${m}${y?` imported from ${y}`:""}`,TypeError),yr.ERR_INVALID_PACKAGE_CONFIG=Tr("ERR_INVALID_PACKAGE_CONFIG",(h,m,y)=>`Invalid package config ${h}${m?` while importing ${m}`:""}${y?`. ${y}`:""}`,Error),yr.ERR_INVALID_PACKAGE_TARGET=Tr("ERR_INVALID_PACKAGE_TARGET",(h,m,y,W=!1,J=void 0)=>{let a=typeof y=="string"&&!W&&y.length>0&&!y.startsWith("./");return m==="."?(uf.ok(W===!1),`Invalid "exports" main target ${JSON.stringify(y)} defined in the package config ${h}package.json${J?` imported from ${J}`:""}${a?'; targets must start with "./"':""}`):`Invalid "${W?"imports":"exports"}" target ${JSON.stringify(y)} defined for '${m}' in the package config ${h}package.json${J?` imported from ${J}`:""}${a?'; targets must start with "./"':""}`},Error),yr.ERR_MODULE_NOT_FOUND=Tr("ERR_MODULE_NOT_FOUND",(h,m,y=!1)=>`Cannot find ${y?"module":"package"} '${h}' imported from ${m}`,Error),yr.ERR_NETWORK_IMPORT_DISALLOWED=Tr("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error),yr.ERR_PACKAGE_IMPORT_NOT_DEFINED=Tr("ERR_PACKAGE_IMPORT_NOT_DEFINED",(h,m,y)=>`Package import specifier "${h}" is not defined${m?` in package ${m}package.json`:""} imported from ${y}`,TypeError),yr.ERR_PACKAGE_PATH_NOT_EXPORTED=Tr("ERR_PACKAGE_PATH_NOT_EXPORTED",(h,m,y=void 0)=>m==="."?`No "exports" main defined in ${h}package.json${y?` imported from ${y}`:""}`:`Package subpath '${m}' is not defined by "exports" in ${h}package.json${y?` imported from ${y}`:""}`,Error),yr.ERR_UNSUPPORTED_DIR_IMPORT=Tr("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error),yr.ERR_UNSUPPORTED_RESOLVE_REQUEST=Tr("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError),yr.ERR_UNKNOWN_FILE_EXTENSION=Tr("ERR_UNKNOWN_FILE_EXTENSION",(h,m)=>`Unknown file extension "${h}" for ${m}`,TypeError),yr.ERR_INVALID_ARG_VALUE=Tr("ERR_INVALID_ARG_VALUE",(h,m,y="is invalid")=>{let W=(0,Ut.inspect)(m);return W.length>128&&(W=`${W.slice(0,128)}...`),`The ${h.includes(".")?"property":"argument"} '${h}' ${y}. Received ${W}`},TypeError);let rZ=function(h){let m="__node_internal_"+h.name;return Object.defineProperty(h,"name",{value:m}),h}(function(h){let m=F5();return m&&(s4=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(h),m&&(Error.stackTraceLimit=s4),h}),Nn={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:fZ}=yr,C4=new Map;function e4(h,{base:m,specifier:y}){let W=C4.get(h);if(W)return W;let J;try{J=O0.readFileSync(G5.toNamespacedPath(h),"utf8")}catch(F){let T=F;if(T.code!=="ENOENT")throw T}let a={exists:!1,pjsonPath:h,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(J!==void 0){let F;try{F=JSON.parse(J)}catch(T){let D=T,i0=new fZ(h,(m?`"${y}" from `:"")+(0,D0.fileURLToPath)(m||y),D.message);throw i0.cause=D,i0}a.exists=!0,Nn.call(F,"name")&&typeof F.name=="string"&&(a.name=F.name),Nn.call(F,"main")&&typeof F.main=="string"&&(a.main=F.main),Nn.call(F,"exports")&&(a.exports=F.exports),Nn.call(F,"imports")&&(a.imports=F.imports),!Nn.call(F,"type")||F.type!=="commonjs"&&F.type!=="module"||(a.type=F.type)}return C4.set(h,a),a}function N5(h){let m=new URL("package.json",h);for(;;){if(m.pathname.endsWith("node_modules/package.json"))break;let y=e4((0,D0.fileURLToPath)(m),{specifier:h});if(y.exists)return y;let W=m;if(m=new URL("../package.json",m),m.pathname===W.pathname)break}return{pjsonPath:(0,D0.fileURLToPath)(m),exists:!1,type:"none"}}function lv(h){return N5(h).type}let{ERR_UNKNOWN_FILE_EXTENSION:iZ}=yr,nZ={}.hasOwnProperty,uZ={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"},rv={__proto__:null,"data:":function(h){let{1:m}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(h.pathname)||[null,null,null];return function(y){return y&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(y)?"module":y==="application/json"?"json":null}(m)},"file:":function(h,m,y){let W=function(F){let T=F.pathname,D=T.length;for(;D--;){let i0=T.codePointAt(D);if(i0===47)return"";if(i0===46)return T.codePointAt(D-1)===47?"":T.slice(D)}return""}(h);if(W===".js"){let F=lv(h);return F!=="none"?F:"commonjs"}if(W===""){let F=lv(h);return F==="none"||F==="commonjs"?"commonjs":"module"}let J=uZ[W];if(J)return J;if(y)return;let a=(0,D0.fileURLToPath)(h);throw new iZ(W,a)},"http:":fv,"https:":fv,"node:":()=>"builtin"};function fv(){}let tZ=Object.freeze(["node","import"]),hZ=new Set(tZ);function oZ(h){return hZ}let at=RegExp.prototype[Symbol.replace],{ERR_INVALID_MODULE_SPECIFIER:Ft,ERR_INVALID_PACKAGE_CONFIG:iv,ERR_INVALID_PACKAGE_TARGET:wZ,ERR_MODULE_NOT_FOUND:nv,ERR_PACKAGE_IMPORT_NOT_DEFINED:vZ,ERR_PACKAGE_PATH_NOT_EXPORTED:mZ,ERR_UNSUPPORTED_DIR_IMPORT:kZ,ERR_UNSUPPORTED_RESOLVE_REQUEST:uv}=yr,tv={}.hasOwnProperty,hv=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,ov=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,$Z=/^\.|%|\\/,Nt=/\*/g,bZ=/%2f|%5c/i,wv=new Set,yZ=/[/\\]{2}/;function vv(h,m,y,W,J,a,F){if(Pf.noDeprecation)return;let T=(0,D0.fileURLToPath)(W),D=yZ.exec(F?h:m)!==null;Pf.emitWarning(`Use of deprecated ${D?"double slash":"leading or trailing slash matching"} resolving "${h}" for module request "${m}" ${m===y?"":`matched to "${y}" `}in the "${J?"imports":"exports"}" field module resolution of the package at ${T}${a?` imported from ${(0,D0.fileURLToPath)(a)}`:""}.`,"DeprecationWarning","DEP0166")}function mv(h,m,y,W){if(Pf.noDeprecation)return;if(function(D,i0){let s=D.protocol;return nZ.call(rv,s)&&rv[s](D,i0,!0)||null}(h,{parentURL:y.href})!=="module")return;let a=(0,D0.fileURLToPath)(h.href),F=(0,D0.fileURLToPath)(new URL(".",m)),T=(0,D0.fileURLToPath)(y);W?G5.resolve(F,W)!==a&&Pf.emitWarning(`Package ${F} has a "main" field set to "${W}", excluding the full filename and extension to the resolved file at "${a.slice(F.length)}", imported from ${T}.
200
+ Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):Pf.emitWarning(`No "main" or "exports" field defined in the package.json for ${F} resolving the main entry point "${a.slice(F.length)}", imported from ${T}.
201
+ Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function kv(h){try{return(0,O0.statSync)(h)}catch{}}function R5(h){let m=(0,O0.statSync)(h,{throwIfNoEntry:!1}),y=m?m.isFile():void 0;return y!=null&&y}function dZ(h,m,y){let W;if(m.main!==void 0){if(W=new URL(m.main,h),R5(W))return W;let F=[`./${m.main}.js`,`./${m.main}.json`,`./${m.main}.node`,`./${m.main}/index.js`,`./${m.main}/index.json`,`./${m.main}/index.node`],T=-1;for(;++T<F.length&&(W=new URL(F[T],h),!R5(W));)W=void 0;if(W)return mv(W,h,y,m.main),W}let J=["./index.js","./index.json","./index.node"],a=-1;for(;++a<J.length&&(W=new URL(J[a],h),!R5(W));)W=void 0;if(W)return mv(W,h,y,m.main),W;throw new nv((0,D0.fileURLToPath)(new URL(".",h)),(0,D0.fileURLToPath)(y))}function T5(h,m,y){return new mZ((0,D0.fileURLToPath)(new URL(".",m)),h,y&&(0,D0.fileURLToPath)(y))}function Rn(h,m,y,W,J){return m=typeof m=="object"&&m!==null?JSON.stringify(m,null,""):`${m}`,new wZ((0,D0.fileURLToPath)(new URL(".",y)),h,m,W,J&&(0,D0.fileURLToPath)(J))}function gZ(h,m,y,W,J,a,F,T,D){if(m!==""&&!a&&h[h.length-1]!=="/")throw Rn(y,h,W,F,J);if(!h.startsWith("./")){if(F&&!h.startsWith("../")&&!h.startsWith("/")){let v0=!1;try{new URL(h),v0=!0}catch{}if(!v0)return yv(a?at.call(Nt,h,()=>m):h+m,W,D)}throw Rn(y,h,W,F,J)}if(hv.exec(h.slice(2))!==null){if(ov.exec(h.slice(2))!==null)throw Rn(y,h,W,F,J);if(!T){let v0=a?y.replace("*",()=>m):y+m;vv(a?at.call(Nt,h,()=>m):h,v0,y,W,F,J,!0)}}let i0=new URL(h,W),s=i0.pathname,$0=new URL(".",W).pathname;if(!s.startsWith($0))throw Rn(y,h,W,F,J);if(m==="")return i0;if(hv.exec(m)!==null){let v0=a?y.replace("*",()=>m):y+m;if(ov.exec(m)===null){if(!T)vv(a?at.call(Nt,h,()=>m):h,v0,y,W,F,J,!1)}else(function(Y0,fl,Il,L0,il){let F0=`request is not a valid match in pattern "${fl}" for the "${L0?"imports":"exports"}" resolution of ${(0,D0.fileURLToPath)(Il)}`;throw new Ft(Y0,F0,il&&(0,D0.fileURLToPath)(il))})(v0,y,W,F,J)}return a?new URL(at.call(Nt,i0.href,()=>m)):new URL(m,i0)}function cZ(h){let m=Number(h);return`${m}`===h&&(m>=0&&m<4294967295)}function zi(h,m,y,W,J,a,F,T,D){if(typeof m=="string")return gZ(m,y,W,h,J,a,F,T,D);if(Array.isArray(m)){let i0=m;if(i0.length===0)return null;let s,$0=-1;for(;++$0<i0.length;){let v0=i0[$0],Y0;try{Y0=zi(h,v0,y,W,J,a,F,T,D)}catch(fl){if(s=fl,fl.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw fl}if(Y0!==void 0){if(Y0!==null)return Y0;s=null}}if(s==null)return null;throw s}if(typeof m=="object"&&m!==null){let i0=Object.getOwnPropertyNames(m),s=-1;for(;++s<i0.length;)if(cZ(i0[s]))throw new iv((0,D0.fileURLToPath)(h),J,'"exports" cannot contain numeric property keys.');for(s=-1;++s<i0.length;){let $0=i0[s];if($0==="default"||D&&D.has($0)){let v0=zi(h,m[$0],y,W,J,a,F,T,D);if(v0===void 0)continue;return v0}}return null}if(m===null)return null;throw Rn(W,m,h,F,J)}function AZ(h,m,y){if(Pf.noDeprecation)return;let W=(0,D0.fileURLToPath)(m);wv.has(W+"|"+h)||(wv.add(W+"|"+h),Pf.emitWarning(`Use of deprecated trailing slash pattern mapping "${h}" in the "exports" field module resolution of the package at ${W}${y?` imported from ${(0,D0.fileURLToPath)(y)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function $v(h,m,y,W,J){let a=y.exports;if(function(s,$0,v0){if(typeof s=="string"||Array.isArray(s))return!0;if(typeof s!="object"||s===null)return!1;let Y0=Object.getOwnPropertyNames(s),fl=!1,Il=0,L0=-1;for(;++L0<Y0.length;){let il=Y0[L0],F0=il===""||il[0]!==".";if(Il++===0)fl=F0;else if(fl!==F0)throw new iv((0,D0.fileURLToPath)($0),v0,`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return fl}(a,h,W)&&(a={".":a}),tv.call(a,m)&&!m.includes("*")&&!m.endsWith("/")){let s=zi(h,a[m],"",m,W,!1,!1,!1,J);if(s==null)throw T5(m,h,W);return s}let F="",T="",D=Object.getOwnPropertyNames(a),i0=-1;for(;++i0<D.length;){let s=D[i0],$0=s.indexOf("*");if($0!==-1&&m.startsWith(s.slice(0,$0))){m.endsWith("/")&&AZ(m,h,W);let v0=s.slice($0+1);m.length>=s.length&&m.endsWith(v0)&&bv(F,s)===1&&s.lastIndexOf("*")===$0&&(F=s,T=m.slice($0,m.length-v0.length))}}if(F){let s=zi(h,a[F],T,F,W,!0,!1,m.endsWith("/"),J);if(s==null)throw T5(m,h,W);return s}throw T5(m,h,W)}function bv(h,m){let y=h.indexOf("*"),W=m.indexOf("*"),J=y===-1?h.length:y+1,a=W===-1?m.length:W+1;return J>a?-1:a>J||y===-1?1:W===-1||h.length>m.length?-1:m.length>h.length?1:0}function KZ(h,m,y){if(h==="#"||h.startsWith("#/")||h.endsWith("/"))throw new Ft(h,"is not a valid internal imports specifier name",(0,D0.fileURLToPath)(m));let W,J=N5(m);if(J.exists){W=(0,D0.pathToFileURL)(J.pjsonPath);let a=J.imports;if(a)if(tv.call(a,h)&&!h.includes("*")){let F=zi(W,a[h],"",h,m,!1,!0,!1,y);if(F!=null)return F}else{let F="",T="",D=Object.getOwnPropertyNames(a),i0=-1;for(;++i0<D.length;){let s=D[i0],$0=s.indexOf("*");if($0!==-1&&h.startsWith(s.slice(0,-1))){let v0=s.slice($0+1);h.length>=s.length&&h.endsWith(v0)&&bv(F,s)===1&&s.lastIndexOf("*")===$0&&(F=s,T=h.slice($0,h.length-v0.length))}}if(F){let s=zi(W,a[F],T,F,m,!0,!0,!1,y);if(s!=null)return s}}}throw function(a,F,T){return new vZ(a,F&&(0,D0.fileURLToPath)(new URL(".",F)),(0,D0.fileURLToPath)(T))}(h,W,m)}function yv(h,m,y){if(j0.builtinModules.includes(h))return new URL("node:"+h);let{packageName:W,packageSubpath:J,isScoped:a}=function(s,$0){let v0=s.indexOf("/"),Y0=!0,fl=!1;s[0]==="@"&&(fl=!0,v0===-1||s.length===0?Y0=!1:v0=s.indexOf("/",v0+1));let Il=v0===-1?s:s.slice(0,v0);if($Z.exec(Il)!==null&&(Y0=!1),!Y0)throw new Ft(s,"is not a valid package name",(0,D0.fileURLToPath)($0));return{packageName:Il,packageSubpath:"."+(v0===-1?"":s.slice(v0)),isScoped:fl}}(h,m),F=N5(m);if(F.exists){let s=(0,D0.pathToFileURL)(F.pjsonPath);if(F.name===W&&F.exports!==void 0&&F.exports!==null)return $v(s,J,F,m,y)}let T,D=new URL("./node_modules/"+W+"/package.json",m),i0=(0,D0.fileURLToPath)(D);do{let s=kv(i0.slice(0,-13));if(!s||!s.isDirectory()){T=i0,D=new URL((a?"../../../../node_modules/":"../../../node_modules/")+W+"/package.json",D),i0=(0,D0.fileURLToPath)(D);continue}let $0=e4(i0,{base:m,specifier:h});return $0.exports!==void 0&&$0.exports!==null?$v(D,J,$0,m,y):J==="."?dZ(D,$0,m):new URL(J,D)}while(i0.length!==T.length)}function WZ(h,m,y,W){y===void 0&&(y=oZ());let J=m.protocol,a=J==="data:"||J==="http:"||J==="https:",F;if(function(T){return T!==""&&(T[0]==="/"||function(D){if(D[0]==="."){if(D.length===1||D[1]==="/")return!0;if(D[1]==="."&&(D.length===2||D[2]==="/"))return!0}return!1}(T))}(h))try{F=new URL(h,m)}catch(T){let D=new uv(h,m);throw D.cause=T,D}else if(J==="file:"&&h[0]==="#")F=KZ(h,m,y);else try{F=new URL(h)}catch(T){if(a&&!j0.builtinModules.includes(h)){let D=new uv(h,m);throw D.cause=T,D}F=yv(h,m,y)}return uf.ok(F!==void 0,"expected to be defined"),F.protocol!=="file:"?F:function(T,D){if(bZ.exec(T.pathname)!==null)throw new Ft(T.pathname,'must not include encoded "/" or "\\" characters',(0,D0.fileURLToPath)(D));let i0;try{i0=(0,D0.fileURLToPath)(T)}catch($0){let v0=$0;throw Object.defineProperty(v0,"input",{value:String(T)}),Object.defineProperty(v0,"module",{value:String(D)}),v0}let s=kv(i0.endsWith("/")?i0.slice(-1):i0);if(s&&s.isDirectory()){let $0=new kZ(i0,(0,D0.fileURLToPath)(D));throw $0.url=String(T),$0}if(!s||!s.isFile()){let $0=new nv(i0||T.pathname,D&&(0,D0.fileURLToPath)(D),!0);throw $0.url=String(T),$0}{let $0=(0,O0.realpathSync)(i0),{search:v0,hash:Y0}=T;(T=(0,D0.pathToFileURL)($0+(i0.endsWith(G5.sep)?"/":""))).search=v0,T.hash=Y0}return T}(F,m)}function Qi(h){return typeof h!="string"||h.startsWith("file://")?U5((0,D0.fileURLToPath)(h)):U5(h)}function pf(h){return(0,D0.pathToFileURL)(Qi(h)).toString()}let ZZ=new Set(["node","import"]),OZ=[".mjs",".cjs",".js",".json"],XZ=new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function dv(h,m,y){try{return WZ(h,m,y)}catch(W){if(!XZ.has(W?.code))throw W}}function YZ(h,m={}){if(typeof h!="string"){if(!(h instanceof URL))throw TypeError("input must be a `string` or `URL`");h=Qi(h)}if(/(?:node|data|http|https):/.test(h))return h;if(j4.has(h))return"node:"+h;if(h.startsWith("file://")&&(h=Qi(h)),Lf(h))try{if((0,O0.statSync)(h).isFile())return pf(h)}catch(F){if(F?.code!=="ENOENT")throw F}let y=m.conditions?new Set(m.conditions):ZZ,W=(Array.isArray(m.url)?m.url:[m.url]).filter(Boolean).map((F)=>new URL(function(T){return typeof T!="string"&&(T=T.toString()),/(?:node|data|http|https|file):/.test(T)?T:j4.has(T)?"node:"+T:"file://"+encodeURI(U5(T))}(F.toString())));W.length===0&&W.push(new URL(pf(process.cwd())));let J=[...W];for(let F of W)F.protocol==="file:"&&J.push(new URL("./",F),new URL(Tf(F.pathname,"_index.js"),F),new URL("node_modules",F));let a;for(let F of J){if(a=dv(h,F,y),a)break;for(let T of["","/index"]){for(let D of m.extensions||OZ)if(a=dv(Tf(h,T)+D,F,y),a)break;if(a)break}if(a)break}if(!a){let F=Error(`Cannot find module ${h} imported from ${J.join(", ")}`);throw F.code="ERR_MODULE_NOT_FOUND",F}return pf(a)}function JZ(h,m){return YZ(h,m)}function zZ(h,m){return Qi(JZ(h,m))}let QZ=/(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m,BZ=/\/\*.+?\*\/|\/\/.*(?=[nr])/g;function HZ(h,m={}){return m.stripComments&&(h=h.replace(BZ,"")),QZ.test(h)}function gv(h){if(typeof h!="string")throw TypeError("Expected a string");return h.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}let GZ=new Set(["/","\\",void 0]),cv=Symbol.for("pathe:normalizedAlias"),UZ=/[/\\]/;function Av(h){if(h[cv])return h;let m=Object.fromEntries(Object.entries(h).sort(([y],[W])=>function(J,a){return a.split("/").length-J.split("/").length}(y,W)));for(let y in m)for(let W in m)W===y||y.startsWith(W)||m[y]?.startsWith(W)&&GZ.has(m[y][W.length])&&(m[y]=m[W]+m[y].slice(W.length));return Object.defineProperty(m,cv,{value:!0,enumerable:!1}),m}function Kv(h="/"){let m=h[h.length-1];return m==="/"||m==="\\"}var aZ={rE:"2.6.1"};let FZ=P0("crypto");var L5=f.n(FZ);let dr=globalThis.process?.env||Object.create(null),tf=globalThis.process||{env:dr},Rt=tf!==void 0&&tf.env&&tf.env.NODE_ENV||void 0,NZ=[["claude",["CLAUDECODE","CLAUDE_CODE"]],["replit",["REPL_ID"]],["gemini",["GEMINI_CLI"]],["codex",["CODEX_SANDBOX","CODEX_THREAD_ID"]],["opencode",["OPENCODE"]],["pi",[P5("PATH",/\.pi[\\/]agent/)]],["auggie",["AUGMENT_AGENT"]],["goose",["GOOSE_PROVIDER"]],["devin",[P5("EDITOR",/devin/)]],["cursor",["CURSOR_AGENT"]],["kiro",[P5("TERM_PROGRAM",/kiro/)]]];function P5(h,m){return()=>{let y=dr[h];return!!y&&m.test(y)}}let Wv=function(){let h=dr.AI_AGENT;if(h)return{name:h.toLowerCase()};for(let[m,y]of NZ)for(let W of y)if(typeof W=="string"?dr[W]:W())return{name:m};return{}}(),RZ=(Wv.name,Wv.name,[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CLOUDFLARE_WORKERS","WORKERS_CI",{ci:!0}],["GOOGLE_CLOUDRUN","K_SERVICE"],["GOOGLE_CLOUDRUN_JOB","CLOUD_RUN_JOB"],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["JENKINS","JENKINS_URL"],["HUDSON","HUDSON_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOY"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}],["EDGEONE_PAGES","EO_PAGES_CI",{ci:!0}]]),Zv=function(){for(let h of RZ)if(dr[h[1]||h[0]])return{name:h[0].toLowerCase(),...h[2]};return dr.SHELL==="/bin/jsh"&&tf.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}(),p5=(Zv.name,tf.platform||""),$S=!!dr.CI||Zv.ci!==!1,TZ=!!tf.stdout?.isTTY,bS=(dr.DEBUG,Rt==="test"||!!dr.TEST),Ov=(Rt==="production"||dr.MODE,Rt==="dev"||Rt==="development"||dr.MODE,dr.MINIMAL,/^win/i.test(p5)),LZ=(/^linux/i.test(p5),/^darwin/i.test(p5),!dr.NO_COLOR&&(!!dr.FORCE_COLOR||(TZ||Ov)&&dr.TERM),(tf.versions?.node||"").replace(/^v/,"")||null),PZ=(Number(LZ?.split(".")[0]),!!tf?.versions?.node),pZ="Bun"in globalThis,MZ="Deno"in globalThis,VZ="fastly"in globalThis,IZ=[["Netlify"in globalThis,"netlify"],["EdgeRuntime"in globalThis,"edge-light"],[globalThis.navigator?.userAgent==="Cloudflare-Workers","workerd"],[VZ,"fastly"],[MZ,"deno"],[pZ,"bun"],[PZ,"node"]];(function(){let h=IZ.find((m)=>m[0]);if(h)h[1]})();let qZ=P0("tty"),_Z=qZ?.WriteStream?.prototype?.hasColors?.()??!1,T0=(h,m)=>{if(!_Z)return(J)=>J;let y=`\x1B[${h}m`,W=`\x1B[${m}m`;return(J)=>{let a=J+"",F=a.indexOf(W);if(F===-1)return y+a+W;let T=y,D=0,i0=(m===22?W:"")+y;for(;F!==-1;)T+=a.slice(D,F)+i0,D=F+W.length,F=a.indexOf(W,D);return T+=a.slice(D)+W,T}},Xv=(T0(0,0),T0(1,22),T0(2,22),T0(3,23),T0(4,24),T0(53,55),T0(7,27),T0(8,28),T0(9,29),T0(30,39),T0(31,39)),Bi=T0(32,39),Tt=T0(33,39),Yv=T0(34,39),SZ=(T0(35,39),T0(36,39)),DZ=(T0(37,39),T0(90,39));T0(40,49),T0(41,49),T0(42,49),T0(43,49),T0(44,49),T0(45,49),T0(46,49),T0(47,49),T0(100,49),T0(91,39),T0(92,39),T0(93,39),T0(94,39),T0(95,39),T0(96,39),T0(97,39),T0(101,49),T0(102,49),T0(103,49),T0(104,49),T0(105,49),T0(106,49),T0(107,49);function Jv(h){if(typeof h!="string"||h.startsWith("file://"))return!1;try{return(0,O0.lstatSync)(h).isDirectory()}catch{return!1}}function zv(h,m=8){return(function(){if(Hi!==void 0)return Hi;try{return Hi=!!L5().getFips?.(),Hi}catch{return Hi=!1,Hi}}()?L5().createHash("sha256"):L5().createHash("md5")).update(h).digest("hex").slice(0,m)}let Qv={true:Bi("true"),false:Tt("false"),"[rebuild]":Tt("[rebuild]"),"[esm]":Yv("[esm]"),"[cjs]":Bi("[cjs]"),"[import]":Yv("[import]"),"[require]":Bi("[require]"),"[native]":SZ("[native]"),"[transpile]":Tt("[transpile]"),"[fallback]":Xv("[fallback]"),"[unknown]":Xv("[unknown]"),"[hit]":Bi("[hit]"),"[miss]":Tt("[miss]"),"[json]":Bi("[json]"),"[data]":Bi("[data]")};function Ul(h,...m){if(!h.opts.debug)return;let y=process.cwd();console.log(DZ(["[jiti]",...m.map((W)=>(W in Qv)?Qv[W]:typeof W!="string"?JSON.stringify(W):W.replace(y,"."))].join(" ")))}function Q1(h,m){return h.opts.interopDefault?function(y){let W=typeof y;if(y===null||W!=="object"&&W!=="function")return y;let J=y.default,a=typeof J,F=J==null,T=a==="object"||a==="function";if(F&&y instanceof Promise)return y;let D=a==="function"&&W!=="function",i0=T&&!(J instanceof Promise),s=new Map;return new Proxy(y,{get($0,v0){if(s.has(v0))return s.get(v0);let Y0;return v0==="__esModule"?Y0=!0:v0==="default"?Y0=F?y:typeof J?.default=="function"&&y.__esModule?J.default:J:(v0 in $0)?Y0=$0[v0]:i0&&(Y0=J[v0],typeof Y0=="function"&&(Y0=Y0.bind(J))),s.set(v0,Y0),Y0},apply:D?($0,v0,Y0)=>Reflect.apply(J,v0,Y0):void 0})}(m):m}let Hi;function w1(h,m){let y=Mf(h,m);return Boolean(y)}function Mf(h,m,y){let W=process.env[h];if(!(h in process.env))return m;try{return JSON.parse(W)}catch{return y?W:m}}let Bv=/\.(c|m)?j(sx?)$/,Hv=/\.(c|m)?t(sx?)$/;function Gi(h,m,y){let W,J;if(h.isNativeRe.test(m))return m;if(h.resolveTsConfigPaths&&!y.skipTsConfigPaths){let T=h.resolveTsConfigPaths(m);for(let D of T){let i0=Gi(h,D,{...y,try:!0,skipTsConfigPaths:!0});if(i0)return i0}}h.alias&&(m=function(T,D){let i0=Ol(T);D=Av(D);for(let[s,$0]of Object.entries(D)){if(!i0.startsWith(s))continue;let v0=Kv(s)?s.slice(0,-1):s;if(Kv(i0[v0.length]))return o1($0,i0.slice(s.length))}return i0}(m,h.alias));let a=y?.parentURL||h.url;Jv(a)&&(a=o1(a,"_index.js"));let F=((y?.async)?[y?.conditions,["node","import"],["node","require"]]:[y?.conditions,["node","require"],["node","import"]]).filter(Boolean);for(let T of F){try{W=zZ(m,{url:a,conditions:T,extensions:h.opts.extensions})}catch(D){J=D}if(W)return W}try{return h.nativeRequire.resolve(m,{paths:y.paths})}catch(T){J=T}for(let T of h.additionalExts){if(W=M5(h,m+T,a,y)||M5(h,m+"/index"+T,a,y),W)return W;if((Hv.test(h.filename)||Hv.test(h.parentModule?.filename||"")||Bv.test(m))&&(W=M5(h,m.replace(Bv,".$1t$2"),a,y),W))return W}if(!y?.try)throw J}function M5(h,m,y,W){try{return h.nativeRequire.resolve(m,{...W,paths:[Fn(Qi(y)),...W?.paths||[]]})}catch{}}let xZ=P0("fs/promises"),Gv=P0("perf_hooks"),jZ=P0("vm");var EZ=f.n(jZ);function Lt(h,m,y){let W=h.parentCache||{};if(m.startsWith("node:"))return Vf(h,m,y.async);if(m.startsWith("file:"))m=(0,D0.fileURLToPath)(m);else if(m.startsWith("data:")){if(!y.async)throw Error("`data:` URLs are only supported in ESM context. Use `import` or `jiti.import` instead.");return Ul(h,"[native]","[data]","[import]",m),Vf(h,m,!0)}if(j0.builtinModules.includes(m)||m===".pnp.js")return Vf(h,m,y.async);if(h.opts.virtualModules&&m in h.opts.virtualModules){Ul(h,"[virtual]",m);let T=h.opts.virtualModules[m];return y.async?Promise.resolve(Q1(h,T)):Q1(h,T)}if(h.opts.tryNative&&!h.opts.transformOptions)try{if(!(m=Gi(h,m,y))&&y.try)return;if(Ul(h,"[try-native]",y.async&&h.nativeImport?"[import]":"[require]",m),y.async&&h.nativeImport)return h.nativeImport(m).then((T)=>(h.opts.moduleCache===!1&&delete h.nativeRequire.cache[m],Q1(h,T))).catch((T)=>(Ul(h,`[try-native] Using fallback for ${m} because of an error:`,T),Lt({...h,opts:{...h.opts,tryNative:!1}},m,y)));{let T=h.nativeRequire(m);return h.opts.moduleCache===!1&&delete h.nativeRequire.cache[m],Q1(h,T)}}catch(T){Ul(h,`[try-native] Using fallback for ${m} because of an error:`,T)}let J=Gi(h,m,y);if(!J&&y.try)return;let a=B5(J);if(a===".json"){Ul(h,"[json]",J);let T=h.nativeRequire(J);return T&&!("default"in T)&&Object.defineProperty(T,"default",{value:T,enumerable:!1}),T}if(a&&!h.opts.extensions.includes(a))return Ul(h,"[native]","[unknown]",y.async?"[import]":"[require]",J),Vf(h,J,y.async);if(h.isNativeRe.test(J))return Ul(h,"[native]",y.async?"[import]":"[require]",J),Vf(h,J,y.async);if(W[J])return Q1(h,W[J]?.exports);if(h.opts.moduleCache){let T=h.nativeRequire.cache[J];if(T?.loaded)return Q1(h,T.exports)}let F=(0,O0.readFileSync)(J,"utf8");return I5(h,F,{id:m,filename:J,ext:a,cache:W,async:y.async})}function Vf(h,m,y){return y&&h.nativeImport?h.nativeImport(function(W){return Ov&&Lf(W)?pf(W):W}(m)).then((W)=>Q1(h,W)):Q1(h,h.nativeRequire(m))}let sZ="9";function CZ(h,m,y){if(!h.opts.fsCache||!m.filename)return y();let W=` /* v${sZ}-${zv(m.source,16)} */
202
+ `,J=`${H5(Fn(m.filename))}-${function(D){let i0=D.split(UZ).pop();if(!i0)return;let s=i0.lastIndexOf(".");return s<=0?i0:i0.slice(0,s)}(m.filename)}`+(h.opts.sourceMaps?"+map":"")+(m.interopDefault?".i":"")+`.${zv(m.filename)}`+(m.async?".mjs":".cjs");m.jsx&&m.filename.endsWith("x")&&(J+="x");let a=h.opts.fsCache,F=o1(a,J);if(!h.opts.rebuildFsCache&&(0,O0.existsSync)(F)){let D=(0,O0.readFileSync)(F,"utf8");if(D.endsWith(W))return Ul(h,"[cache]","[hit]",m.filename,"~>",F),D}Ul(h,"[cache]","[miss]",m.filename);let T=y();return T.includes("__JITI_ERROR__")||((0,O0.writeFileSync)(F,T+W,"utf8"),Ul(h,"[cache]","[store]",m.filename,"~>",F)),T}function eZ(h){if(h.opts.fsCache===!0&&(h.opts.fsCache=function(m){let y=m.filename&&EW(m.filename,"../node_modules");if(y&&(0,O0.existsSync)(y))return o1(y,".cache/jiti");let W=(0,n.tmpdir)();if(process.env.TMPDIR&&W===process.cwd()&&!process.env.JITI_RESPECT_TMPDIR_ENV){let J=process.env.TMPDIR;delete process.env.TMPDIR,W=(0,n.tmpdir)(),process.env.TMPDIR=J}return o1(W,"jiti")}(h)),h.opts.fsCache)try{if((0,O0.mkdirSync)(h.opts.fsCache,{recursive:!0}),!function(m){try{return(0,O0.accessSync)(m,O0.constants.W_OK),!0}catch{return!1}}(h.opts.fsCache))throw Error("directory is not writable!")}catch(m){Ul(h,"Error creating cache directory at ",h.opts.fsCache,m),h.opts.fsCache=!1}}function V5(h,m){let y=CZ(h,m,()=>{let W=h.opts.transform({...h.opts.transformOptions,babel:{...h.opts.sourceMaps?{sourceFileName:m.filename,sourceMaps:"inline"}:{},...h.opts.transformOptions?.babel},interopDefault:h.opts.interopDefault,...m});return W.error&&h.opts.debug&&Ul(h,W.error),W.code});return y.startsWith("#!")&&(y="// "+y),y}function I5(h,m,y={}){let W=y.id||(y.filename?H5(y.filename):`_jitiEval.${y.ext||(y.async?"mjs":"js")}`),J=y.filename||Gi(h,W,{async:y.async}),a=y.ext||B5(J),F=y.cache||h.parentCache||{},T=/\.[cm]?tsx?$/.test(a),D=a===".mjs"||a===".js"&&function(F0){for(;F0&&F0!=="."&&F0!=="/";){F0=o1(F0,"..");try{let If=(0,O0.readFileSync)(o1(F0,"package.json"),"utf8");try{return JSON.parse(If)}catch{}break}catch{}}}(J)?.type==="module",i0=a===".cjs",s=y.forceTranspile??(!i0&&!(D&&y.async)&&(T||D||h.isTransformRe.test(J)||HZ(m))),$0=Gv.performance.now();if(s){m=V5(h,{filename:J,source:m,ts:T,async:y.async??!1,jsx:h.opts.jsx});let F0=Math.round(1000*(Gv.performance.now()-$0))/1000;Ul(h,"[transpile]",y.async?"[esm]":"[cjs]",J,`(${F0}ms)`)}else{if(Ul(h,"[native]",y.async?"[import]":"[require]",J),y.async)return Promise.resolve(Vf(h,J,y.async)).catch((F0)=>(Ul(h,"Native import error:",F0),Ul(h,"[fallback]",J),I5(h,m,{...y,forceTranspile:!0})));try{return Vf(h,J,y.async)}catch(F0){Ul(h,"Native require error:",F0),Ul(h,"[fallback]",J),m=V5(h,{filename:J,source:m,ts:T,async:y.async??!1,jsx:h.opts.jsx})}}let v0=new j0.Module(J);v0.filename=J,h.parentModule&&(v0.parent=h.parentModule,Array.isArray(h.parentModule.children)&&!h.parentModule.children.includes(v0)&&h.parentModule.children.push(v0));let Y0=Uv(J,h.opts,{parentModule:v0,parentCache:F,nativeImport:h.nativeImport,onError:h.onError,createRequire:h.createRequire},!0),fl;v0.require=Y0,v0.path=Fn(J),v0.paths=j0.Module._nodeModulePaths(v0.path),F[J]=v0,h.opts.moduleCache&&(h.nativeRequire.cache[J]=v0);let Il=function(F0,If){return`(${If?.async?"async ":""}function (exports, require, module, __filename, __dirname, jitiImport, jitiESMResolve) { ${F0}
203
+ });`}(m,{async:y.async});try{fl=EZ().runInThisContext(Il,{filename:J,lineOffset:0,displayErrors:!1})}catch(F0){F0.name==="SyntaxError"&&y.async&&h.nativeImport?(Ul(h,"[esm]","[import]","[fallback]",J),fl=function(If,q5,_5,Pt,pt){let av=`export default ${q5}`,Fv=pt?void 0:`data:text/javascript;base64,${Buffer.from(av).toString("base64")}`;return(...rO)=>{let Tn,Nv=()=>(Tn=function(Ui,Rv){let Tv=o1((0,n.tmpdir)(),"jiti-esm");try{(0,O0.mkdirSync)(Tv,{recursive:!0})}catch{}let Lv=o1(Tv,`${H5(Rv,B5(Rv))}-${Date.now()}-${Math.random().toString(36).slice(2)}.mjs`);return(0,O0.writeFileSync)(Lv,Ui),Lv}(av,_5),Ul(If,"[esm]","[tempfile]",Tn),Pt(pf(Tn)));return(Fv?Pt(Fv).catch((Ui)=>{if(Ui?.code!=="ENAMETOOLONG")throw Ui;return Nv()}):Nv()).then((Ui)=>Ui.default(...rO)).finally(()=>{Tn&&(0,xZ.unlink)(Tn).catch(()=>{})})}}(h,Il,J,h.nativeImport,h.opts.esmEvalTempFile)):(h.opts.moduleCache&&delete h.nativeRequire.cache[J],h.onError(F0))}let L0;try{L0=fl(v0.exports,v0.require,v0,v0.filename,Fn(v0.filename),Y0.import,Y0.esmResolve)}catch(F0){h.opts.moduleCache&&delete h.nativeRequire.cache[J],h.onError(F0)}function il(){if(v0.exports&&v0.exports.__JITI_ERROR__){let{filename:F0,line:If,column:q5,code:_5,message:Pt}=v0.exports.__JITI_ERROR__,pt=Error(`${_5}: ${Pt}
204
+ ${`${F0}:${If}:${q5}`}`);Error.captureStackTrace(pt,Lt),h.onError(pt)}return v0.loaded=!0,Q1(h,v0.exports)}return y.async?Promise.resolve(L0).then(il):il()}let lO=(0,n.platform)()==="win32";function Uv(h,m={},y,W=!1){let J=W?m:function(L0){let il={fsCache:w1("JITI_FS_CACHE",w1("JITI_CACHE",!0)),rebuildFsCache:w1("JITI_REBUILD_FS_CACHE",!1),moduleCache:w1("JITI_MODULE_CACHE",w1("JITI_REQUIRE_CACHE",!0)),debug:w1("JITI_DEBUG",!1),sourceMaps:w1("JITI_SOURCE_MAPS",!1),interopDefault:w1("JITI_INTEROP_DEFAULT",!0),extensions:Mf("JITI_EXTENSIONS",[".js",".mjs",".cjs",".ts",".tsx",".mts",".cts",".mtsx",".ctsx"]),alias:Mf("JITI_ALIAS",{}),nativeModules:Mf("JITI_NATIVE_MODULES",[]),transformModules:Mf("JITI_TRANSFORM_MODULES",[]),tryNative:Mf("JITI_TRY_NATIVE","Bun"in globalThis),esmEvalTempFile:w1("JITI_ESM_EVAL_TEMP_FILE",!1),jsx:w1("JITI_JSX",!1),tsconfigPaths:Mf("JITI_TSCONFIG_PATHS",!1,!0)};il.jsx&&il.extensions.push(".jsx",".tsx");let F0={};return L0.cache!==void 0&&(F0.fsCache=L0.cache),L0.requireCache!==void 0&&(F0.moduleCache=L0.requireCache),{...il,...F0,...L0}}(m);typeof h=="string"&&h.startsWith("file://")&&(h=Qi(h));let a=J.alias&&Object.keys(J.alias).length>0?Av(J.alias||{}):void 0,F;if(J.tsconfigPaths){let{getTsconfig:L0,createPathsMatcher:il}=f("./node_modules/.pnpm/get-tsconfig@4.14.0/node_modules/get-tsconfig/dist/index.cjs"),F0=L0(typeof J.tsconfigPaths=="string"?J.tsconfigPaths:Fn(h));F0&&(F=il(F0))}let T=["typescript","jiti",...J.nativeModules||[]],D=new RegExp(`node_modules/(${T.map((L0)=>gv(L0)).join("|")})/`),i0=[...J.transformModules||[]],s=new RegExp(`node_modules/(${i0.map((L0)=>gv(L0)).join("|")})/`);h||(h=process.cwd()),!W&&Jv(h)&&(h=o1(h,"_index.js"));let $0=pf(h),v0=[...J.extensions].filter((L0)=>L0!==".js"),Y0=y.createRequire(lO?h.replace(/\//g,"\\"):h),fl={filename:h,url:$0,opts:J,alias:a,resolveTsConfigPaths:F,nativeModules:T,transformModules:i0,isNativeRe:D,isTransformRe:s,additionalExts:v0,nativeRequire:Y0,onError:y.onError,parentModule:y.parentModule,parentCache:y.parentCache,nativeImport:y.nativeImport,createRequire:y.createRequire};return W||Ul(fl,"[init]",...[["version:",aZ.rE],["module-cache:",J.moduleCache],["fs-cache:",J.fsCache],["rebuild-fs-cache:",J.rebuildFsCache],["interop-defaults:",J.interopDefault]].flat()),W||eZ(fl),Object.assign(function(L0){return Lt(fl,L0,{async:!1})},{cache:J.moduleCache?Y0.cache:Object.create(null),extensions:Y0.extensions,main:Y0.main,options:J,resolve:Object.assign(function(L0,il){return Gi(fl,L0,{...il,async:!1})},{paths:Y0.resolve.paths}),transform:(L0)=>V5(fl,L0),evalModule:(L0,il)=>I5(fl,L0,il),async import(L0,il){let F0=await Lt(fl,L0,{...il,async:!0});return il?.default?F0?.default??F0:F0},esmResolve(L0,il){typeof il=="string"&&(il={parentURL:il});let F0=Gi(fl,L0,{parentURL:$0,...il,async:!0});return!F0||typeof F0!="string"||F0.startsWith("file://")?F0:pf(F0)}})}})(),zg.exports=i.default})()});var NK=j((Zu0,FK)=>{var{defineProperty:s6,getOwnPropertyDescriptor:kI,getOwnPropertyNames:$I}=Object,bI=Object.prototype.hasOwnProperty,yI=(l,r)=>{for(var f in r)s6(l,f,{get:r[f],enumerable:!0})},dI=(l,r,f,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of $I(r))!bI.call(l,n)&&n!==f&&s6(l,n,{get:()=>r[n],enumerable:!(i=kI(r,n))||i.enumerable});return l},gI=(l)=>dI(s6({},"__esModule",{value:!0}),l),aK={};yI(aK,{clearRequireCache:()=>cI});FK.exports=gI(aK);function cI(l){for(let r of l)delete P0.cache[r]}});var B1=c.object({tagline:c.string().optional().describe("Short public profile tagline"),intro:c.string().optional().describe("Longer public profile introduction"),story:c.string().optional().describe("Extended profile narrative sourced from the markdown body"),audience:c.string().optional().describe("Primary audience or community served")}),Pv=c.object({tagline:B1.shape.tagline,intro:B1.shape.intro,audience:B1.shape.audience}),S5=c.object({role:c.string().optional().describe("Professional role or working identity"),expertise:c.array(c.string()).optional().describe("Skills, domains, and areas of focus"),currentFocus:c.string().optional().describe("What the professional is currently working on"),availability:c.string().optional().describe("Work, speaking, or collaboration availability")}),Mt=B1.extend(S5.shape),pv=c.object({purpose:c.string().optional().describe("Team purpose"),focusAreas:c.array(c.string()).optional().describe("Team focus areas"),capabilities:c.array(c.string()).optional().describe("Team capabilities"),workingPrinciples:c.array(c.string()).optional().describe("Principles guiding how the team works")}),Mv=B1.extend(pv.shape),Vv=c.object({mission:c.string().optional().describe("Organization mission"),focusAreas:c.array(c.string()).optional().describe("Organization focus areas"),offerings:c.array(c.string()).optional().describe("Organization products, services, or programs"),values:c.array(c.string()).optional().describe("Organization values")}),Iv=B1.extend(Vv.shape),Vt=Ln.extend(Mt.shape).strict(),fO=Ln.extend(Mv.shape).strict(),iO=Ln.extend(Iv.shape).strict(),It=Ln.extend(B1.shape).loose(),D5=It.extend(S5.shape).loose();var KS=c.record(c.string(),c.unknown());var XS=c.record(c.string(),c.unknown());var nO=c.string().trim().min(3).max(80).refine((l)=>l.split(/\s+/u).length>=2&&l.split(/\s+/u).length<=6,"Role must contain between two and six words").refine((l)=>!/[.!?]$/u.test(l),"Role must be a phrase"),uO=c.string().trim().min(12).max(240).refine((l)=>!/[\r\n]/u.test(l),"Purpose must be one line"),tO=c.string().trim().min(2).max(60).refine((l)=>l.split(/\s+/u).length<=5,"Values must contain at most five words"),hO=c.object({role:nO,purpose:uO,values:c.array(tO).length(3)}).refine(({values:l})=>new Set(l.map((r)=>r.toLowerCase())).size===l.length,{message:"Values must be distinct",path:["values"]});var BS=c.record(c.string(),c.unknown());var bO=c.object({enabled:c.boolean().default(!0)}),LS=c.object({starterIdentity:bO.default({enabled:!0})});async function qv(l){let f=(await l.listEntities({entityType:"anchor-profile",options:{limit:1}}))[0];if(!f)throw Error("Profile not found \u2014 create an anchor-profile entity");return f.content}async function H1(l,r){let f=await qv(l),{metadata:i,content:n}=Rl(f,c.record(c.string(),c.unknown()));return r.parse(n?{...i,story:n}:i)}var yO=c.object({}),dO=c.object({}),qt=hf.extend({id:c.literal("site-info"),entityType:c.literal("site-info"),metadata:dO});var gO=_v.omit({url:!0,analyticsScript:!0}),ai=gO.extend({title:c.string().optional().describe("Optional site title override"),description:c.string().optional().describe("Optional site description override")});var cO=c.record(c.string(),c.unknown());class G1 extends Fi{constructor(){super({entityType:"site-info",purpose:"Singleton configuration describing the published site.",schema:qt,frontmatterSchema:ai,isSingleton:!0,hasBody:!1})}createSiteInfoContent(l){let r=ai.parse(l);return this.buildMarkdown("",r)}parseSiteInfoBody(l){return this.parseFrontmatter(l)}fromMarkdown(l){return{content:l,entityType:"site-info"}}extractMetadata(l){return{}}generateFrontMatter(l){let r=this.parseFrontmatter(l.content);return this.buildMarkdown("",cO.parse(r))}}var gD=new G1;var UD=new G1;var ZO=new G1;async function _f(l){let f=(await l.listEntities({entityType:"site-info",options:{limit:1}}))[0];if(!f)throw Error("Site info not found \u2014 create a site-info entity");return ZO.parseSiteInfoBody(f.content)}function Sv(l,r){let f=l.metadata.publishedAt??l.created,i=r.metadata.publishedAt??r.created;return new Date(i).getTime()-new Date(f).getTime()}async function Ri(l,r){return(await l.listEntities({entityType:r.entityType,options:{limit:20}})).sort(Sv).slice(0,r.count).map(r.parse)}function pn(l){if(!l)throw Error("CTA not configured in site-info");return l}var Dv=c.object({label:c.string(),href:c.string(),priority:c.number()}),OO=c.object({primary:c.array(Dv),secondary:c.array(Dv)}),XO=c.object({platform:c.enum(["github","instagram","linkedin","email","website"]).describe("Social media platform"),url:c.string().describe("Profile or contact URL"),label:c.string().optional().describe("Optional display label")}),YO=ai.extend({title:c.string(),description:c.string(),navigation:OO,copyright:c.string(),socialLinks:c.array(XO).optional().describe("Social media links composed by a site integration")});var Mn=It;var xv={lexicon:1,id:"ai.rizom.brain.card",defs:{main:{type:"record",description:"Public discovery card for a Rizom brain. The operational A2A Agent Card is conventionally served at /.well-known/agent-card.json under siteUrl.",key:"literal:self",record:{type:"object",required:["siteUrl","brain","anchor","skills","model","version","createdAt"],properties:{siteUrl:{type:"string",format:"uri",description:"Public site URL. Consumers derive the A2A Agent Card URL from this base."},brain:{type:"ref",ref:"#brain",description:"Brain identity described by this discovery card."},anchor:{type:"ref",ref:"#anchor",description:"Minimal Anchor snapshot for discovery grouping and display."},skills:{type:"array",description:"User-facing skills this brain advertises for discovery.",items:{type:"ref",ref:"#skill"},maxLength:100},model:{type:"string",description:"Rizom brain model identifier."},version:{type:"string",description:"Brain runtime/model implementation version."},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}},brain:{type:"object",description:"Brain identity described by this discovery card.",required:["did","name","role","purpose","values"],properties:{did:{type:"string",description:"Public DID for the brain identity."},name:{type:"string",maxLength:200,description:"Human-readable brain name."},role:{type:"string",maxLength:500,description:"Brain role or persona."},purpose:{type:"string",maxLength:2000,description:"Short public description of what this brain is for."},values:{type:"array",description:"Public values or principles for this brain.",items:{type:"string",maxLength:200},maxLength:50}}},anchor:{type:"object",description:"Minimal Anchor snapshot for discovery grouping and display.",required:["did","name","category","kind"],properties:{did:{type:"string",description:"Public DID for the Anchor identity."},name:{type:"string",maxLength:200,description:"Human-readable anchor name."},category:{type:"string",knownValues:["person","team","organization"],description:"Stable structural category for discovery and grouping."},kind:{type:"string",maxLength:200,description:"Open semantic profile kind selected by the publishing brain."}}},skill:{type:"object",description:"User-facing skill this brain advertises for discovery.",required:["id","name","description"],properties:{id:{type:"string",maxLength:200},name:{type:"string",maxLength:200},description:{type:"string",maxLength:2000},tags:{type:"array",items:{type:"string"},maxLength:50},examples:{type:"array",items:{type:"string"},maxLength:20}}}}};var jv={lexicon:1,id:"ai.rizom.brain.deck",defs:{main:{type:"record",description:"Public presentation deck from a Rizom brain.",key:"any",record:{type:"object",required:["title","body","createdAt"],properties:{title:{type:"string",maxLength:300},slug:{type:"string"},description:{type:"string",maxLength:2000},body:{type:"string",maxLength:1e5},format:{type:"string",knownValues:["text/markdown"]},author:{type:"string"},event:{type:"string"},publishedAt:{type:"string",format:"datetime"},brainDid:{type:"string"},anchorDid:{type:"string"},sourceEntityType:{type:"string"},sourceEntityId:{type:"string"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}}};var Ev={lexicon:1,id:"ai.rizom.brain.link",defs:{main:{type:"record",description:"Public curated link from a Rizom brain.",key:"any",record:{type:"object",required:["title","url","createdAt"],properties:{title:{type:"string",maxLength:500},url:{type:"string",format:"uri"},description:{type:"string",maxLength:2000},summary:{type:"string",maxLength:1e5},domain:{type:"string"},capturedAt:{type:"string",format:"datetime"},source:{type:"ref",ref:"#source"},brainDid:{type:"string"},anchorDid:{type:"string"},sourceEntityType:{type:"string"},sourceEntityId:{type:"string"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}},source:{type:"object",description:"Attribution for where this link was captured.",required:["ref","label"],properties:{ref:{type:"string"},label:{type:"string"}}}}};var sv={lexicon:1,id:"ai.rizom.brain.note",defs:{main:{type:"record",description:"Public knowledge note from a Rizom brain.",key:"any",record:{type:"object",required:["title","body","createdAt"],properties:{title:{type:"string",maxLength:300},body:{type:"string",maxLength:1e5},format:{type:"string",knownValues:["text/markdown"]},brainDid:{type:"string"},anchorDid:{type:"string"},sourceEntityType:{type:"string"},sourceEntityId:{type:"string"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}}};var Cv={lexicon:1,id:"ai.rizom.brain.post",defs:{main:{type:"record",description:"Markdown blog post distributed by a Rizom brain.",key:"any",record:{type:"object",required:["title","body","createdAt"],properties:{title:{type:"string",maxLength:300},summary:{type:"string",maxLength:2000},body:{type:"string",maxLength:1e5},format:{type:"string",knownValues:["text/markdown"]},brainDid:{type:"string"},anchorDid:{type:"string"},canonicalUrl:{type:"string",format:"uri"},topics:{type:"array",items:{type:"string"},maxLength:50},coverImage:{type:"ref",ref:"#coverImage"},series:{type:"string",maxLength:200},seriesIndex:{type:"integer"},sourceEntityType:{type:"string",knownValues:["post"]},sourceEntityId:{type:"string"},createdAt:{type:"string",format:"datetime"},publishedAt:{type:"string",format:"datetime"}}}},coverImage:{type:"object",description:"Cover image attached to the post.",required:["blob"],properties:{blob:{type:"blob"},alt:{type:"string",maxLength:1000},width:{type:"integer"},height:{type:"integer"}}}}};var ev={lexicon:1,id:"ai.rizom.brain.project",defs:{main:{type:"record",description:"Public project or case study from a Rizom brain.",key:"any",record:{type:"object",required:["title","body","year","createdAt"],properties:{title:{type:"string",maxLength:300},slug:{type:"string"},description:{type:"string",maxLength:2000},body:{type:"string",maxLength:1e5},format:{type:"string",knownValues:["text/markdown"]},year:{type:"integer"},url:{type:"string",format:"uri"},publishedAt:{type:"string",format:"datetime"},brainDid:{type:"string"},anchorDid:{type:"string"},sourceEntityType:{type:"string"},sourceEntityId:{type:"string"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}}};var l9={lexicon:1,id:"ai.rizom.brain.series",defs:{main:{type:"record",description:"Public content series from a Rizom brain.",key:"any",record:{type:"object",required:["title","createdAt"],properties:{title:{type:"string",maxLength:300},slug:{type:"string"},description:{type:"string",maxLength:1e4},brainDid:{type:"string"},anchorDid:{type:"string"},sourceEntityType:{type:"string"},sourceEntityId:{type:"string"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}}};var r9={lexicon:1,id:"ai.rizom.brain.socialPost",defs:{main:{type:"record",description:"Semantic local social-post entity from a Rizom brain; not a Bluesky feed post.",key:"any",record:{type:"object",required:["title","platform","body","createdAt"],properties:{title:{type:"string",maxLength:300},platform:{type:"string"},body:{type:"string",maxLength:1e5},format:{type:"string",knownValues:["text/markdown"]},status:{type:"string"},publishedAt:{type:"string",format:"datetime"},platformPostId:{type:"string"},sourceLocalEntityType:{type:"string"},sourceLocalEntityId:{type:"string"},brainDid:{type:"string"},anchorDid:{type:"string"},sourceEntityType:{type:"string"},sourceEntityId:{type:"string"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}}};var f9={lexicon:1,id:"ai.rizom.brain.topic",defs:{main:{type:"record",description:"Public topic page from a Rizom brain.",key:"any",record:{type:"object",required:["title","body","createdAt"],properties:{title:{type:"string",maxLength:300},body:{type:"string",maxLength:1e5},format:{type:"string",knownValues:["text/markdown"]},brainDid:{type:"string"},anchorDid:{type:"string"},sourceEntityType:{type:"string"},sourceEntityId:{type:"string"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}}};var i9=c.object({type:c.string()}).catchall(c.unknown()),NO=c.object({type:c.literal("object"),description:c.string().optional(),required:c.array(c.string()).optional(),properties:c.record(c.string(),i9)}),RO=c.object({lexicon:c.literal(1),id:c.string(),defs:c.object({main:c.object({type:c.literal("record"),key:c.string().min(1),description:c.string().optional(),record:c.object({type:c.literal("object"),required:c.array(c.string()).optional(),properties:c.record(c.string(),i9)})})}).catchall(NO)});function v1(l){return RO.parse(l)}var gr={"ai.rizom.brain.card":v1(xv),"ai.rizom.brain.deck":v1(jv),"ai.rizom.brain.link":v1(Ev),"ai.rizom.brain.note":v1(sv),"ai.rizom.brain.post":v1(Cv),"ai.rizom.brain.project":v1(ev),"ai.rizom.brain.series":v1(l9),"ai.rizom.brain.socialPost":v1(r9),"ai.rizom.brain.topic":v1(f9)},TO="Additive optional fields are compatible; required-field, type, or constraint changes require a migration plan or new NSID.";function U1(l){return{status:"approved",version:"1.0.0",revision:1,owner:"Rizom",steward:"Rizom protocol registry",projectionPackage:l,compatibility:TO}}var LO={"ai.rizom.brain.card":U1("@brains/atproto"),"ai.rizom.brain.deck":U1("@brains/decks"),"ai.rizom.brain.link":U1("@brains/link"),"ai.rizom.brain.note":U1("@brains/note"),"ai.rizom.brain.post":U1("@brains/blog"),"ai.rizom.brain.project":U1("@brains/portfolio"),"ai.rizom.brain.series":U1("@brains/series"),"ai.rizom.brain.socialPost":U1("@brains/social-media"),"ai.rizom.brain.topic":U1("@brains/topics")};function E5(l){return typeof l==="object"&&l!==null&&!Array.isArray(l)}var PO=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/;function pO(l){let r=c.string(),f=l.maxLength!==void 0?r.max(l.maxLength):r;if(l.knownValues)f=f.refine((i)=>l.knownValues?.includes(i),{message:`expected one of ${l.knownValues.join(", ")}`});if(l.format==="datetime")f=f.refine((i)=>PO.test(i)&&!Number.isNaN(Date.parse(i)),{message:"expected datetime"});if(l.format==="uri")f=f.refine((i)=>{try{return new URL(i),!0}catch{return!1}},{message:"expected uri"});return f}function MO(l,r){if(typeof l!=="string"||!l.startsWith("#"))return;let f=r[l.slice(1)];return f?.type==="object"?f:void 0}function u9(l,r){switch(l.type){case"string":return pO(l);case"integer":return c.number().int();case"boolean":return c.boolean();case"array":{let f=l.items?u9(l.items,r):c.unknown(),i=c.array(f);if(l.maxLength!==void 0)i=i.max(l.maxLength);return i}case"object":return n9(l,r);case"ref":{let f=MO(l.ref,r);if(!f)return c.custom(()=>!1,{message:`unresolvable lexicon ref ${String(l.ref)}`});return c.lazy(()=>n9(f,r))}case"blob":return c.custom(E5,{message:"expected blob"});default:return c.unknown()}}function t9(l,r){let f=new Set(l.required??[]),i={};for(let[n,u]of Object.entries(l.properties??{})){let t=u9(u,r);i[n]=f.has(n)?t:t.optional()}return i}function n9(l,r){return c.object(t9(l,r)).passthrough()}function j5(l,r,f,i=[]){let n=Object.keys(l).filter((u)=>!r.has(u));if(n.length===0)return;f.addIssue({code:c.ZodIssueCode.custom,path:i,message:`unrecognized field(s): ${n.join(", ")}`})}function VO(l,r){if(j5(l,new Set(["$type","siteUrl","brain","anchor","skills","model","version","createdAt","updatedAt"]),r),E5(l.brain))j5(l.brain,new Set(["did","name","role","purpose","values"]),r,["brain"]);if(E5(l.anchor))j5(l.anchor,new Set(["did","name","category","kind"]),r,["anchor"])}function m1(l){let r=c.object({...t9(l.defs.main.record,l.defs),$type:c.literal(l.id).optional()}).passthrough();return l.id==="ai.rizom.brain.card"?r.superRefine(VO):r}var s5={"ai.rizom.brain.card":m1(gr["ai.rizom.brain.card"]),"ai.rizom.brain.deck":m1(gr["ai.rizom.brain.deck"]),"ai.rizom.brain.link":m1(gr["ai.rizom.brain.link"]),"ai.rizom.brain.note":m1(gr["ai.rizom.brain.note"]),"ai.rizom.brain.post":m1(gr["ai.rizom.brain.post"]),"ai.rizom.brain.project":m1(gr["ai.rizom.brain.project"]),"ai.rizom.brain.series":m1(gr["ai.rizom.brain.series"]),"ai.rizom.brain.socialPost":m1(gr["ai.rizom.brain.socialPost"]),"ai.rizom.brain.topic":m1(gr["ai.rizom.brain.topic"])};var IO=c.custom((l)=>s5["ai.rizom.brain.card"].safeParse(l).success),qO=c.object({repoDid:c.string().min(1),uri:c.string().min(1),cid:c.string().min(1),record:IO}).strict(),_O=c.object({agentId:c.string().min(1),name:c.string().min(1),url:c.string().url(),status:c.enum(["discovered","approved","archived"]),repoDid:c.string().min(1).optional(),brainDid:c.string().min(1).optional(),anchorDid:c.string().min(1).optional(),cardUri:c.string().min(1).optional(),cardCid:c.string().min(1).optional()}).strict(),SO=c.object({repoDid:c.string().startsWith("did:plc:"),observedAt:c.string().datetime(),staleAfter:c.string().datetime().optional(),reason:c.enum(["deleted","refresh-failed"]),error:c.string().min(1).optional()}).strict(),DO=c.object({domain:c.string().min(1),existingRepoDid:c.string().min(1).optional(),candidateRepoDid:c.string().startsWith("did:plc:"),observedAt:c.string().datetime(),reason:c.string().min(1)}).strict(),xO=c.object({previousCursorTimeUs:c.number().int().nonnegative(),clampedCursorTimeUs:c.number().int().nonnegative(),observedAt:c.string().datetime()}).strict();class of{static instance;projections=new Map;static getInstance(){return this.instance??=new of,this.instance}static createFresh(){return new of}static resetInstance(){this.instance=void 0}register(l){this.validateProjection(l);let r=this.get(l.entityType);if(r&&!this.isEquivalentProjection(r,l))throw Error(`AT Protocol projection already registered for entity type ${l.entityType}`);let f=this.projections.get(l.entityType)??[];return f.push(l),this.projections.set(l.entityType,f),this.createUnregister(l.entityType,l)}get(l){let r=this.projections.get(l);return r?.[r.length-1]}has(l){return this.get(l)!==void 0}list(){let l=[];for(let r of this.projections.keys()){let f=this.get(r);if(f)l.push(f)}return l}listLexicons(){return this.list().map((l)=>l.lexicon)}createUnregister(l,r){let f=!0;return()=>{if(!f)return;f=!1;let i=this.projections.get(l);if(!i)return;let n=i.lastIndexOf(r);if(n!==-1)i.splice(n,1);if(i.length===0)this.projections.delete(l)}}isEquivalentProjection(l,r){return l.entityType===r.entityType&&l.collection===r.collection&&l.lexicon.id===r.lexicon.id&&l.validate===r.validate}validateProjection(l){if(l.collection!==l.lexicon.id)throw Error(`AT Protocol projection collection must match lexicon id: ${l.collection} !== ${l.lexicon.id}`);if(!l.lexicon.defs.main.key)throw Error(`AT Protocol projection lexicon must define a record key: ${l.collection}`)}}var C5=c.object({defaultPrompt:c.string().default("Write a blog post about my recent work and insights"),paginate:c.boolean().default(!0),pageSize:c.number().default(10)});var h9=c.object({audiences:c.array(c.string()).optional(),positioning:c.string().optional()}),o9=c.object({summary:c.string().optional(),traits:c.array(c.string()).optional(),principles:c.array(c.string()).optional(),preferredTerms:c.array(c.string()).optional(),avoid:c.array(c.string()).optional()}),w9=c.object({artDirection:c.string().optional(),palette:c.array(c.string()).optional(),composition:c.string().optional(),mood:c.string().optional(),preferred:c.array(c.string()).optional(),avoid:c.array(c.string()).optional()}),Vn=c.object({name:c.string().describe("Style guide name"),messaging:h9.optional(),voice:o9.optional(),visual:w9.optional()}),jO=c.object({}),St=hf.extend({id:c.literal("style-guide"),entityType:c.literal("style-guide"),metadata:jO});class e5 extends Fi{constructor(){super({entityType:"style-guide",purpose:"Singleton messaging, voice, and visual guidance for generated artifacts.",schema:St,frontmatterSchema:Vn,isSingleton:!0,hasBody:!0})}createStyleGuideContent(l,r=""){return this.buildMarkdown(r,Vn.parse(l))}parseStyleGuide(l){let r=Rl(l,Vn);return{...r.metadata,guidance:r.content}}fromMarkdown(l){return{content:l,entityType:"style-guide"}}extractMetadata(l){return{}}}var Dt=new e5;var m9={name:"Default style guide",guidance:""};async function a1(l){let r=await l.getEntity({entityType:"style-guide",id:"style-guide"});return r?.id==="style-guide"?Dt.parseStyleGuide(r.content):m9}function wf(l,r,f){if(f&&f.length>0)l.push(`${r}: ${f.join(", ")}`)}function EO(l){let r=[],{messaging:f,voice:i}=l;if(wf(r,"Audiences",f?.audiences),f?.positioning)r.push(`Positioning: ${f.positioning}`);if(i?.summary)r.push(`Voice: ${i.summary}`);return wf(r,"Voice traits",i?.traits),wf(r,"Voice principles",i?.principles),wf(r,"Preferred terms",i?.preferredTerms),wf(r,"Avoid",i?.avoid),r.join(`
205
205
  `)}function sO(l){let r=[],{visual:f}=l;if(f?.artDirection)r.push(`Art direction: ${f.artDirection}`);if(wf(r,"Palette",f?.palette),f?.composition)r.push(`Composition: ${f.composition}`);if(f?.mood)r.push(`Mood: ${f.mood}`);return wf(r,"Prefer",f?.preferred),wf(r,"Avoid",f?.avoid),r.join(`
206
206
  `)}function v9(l,r){return[l,r].filter(Boolean).join(`
207
207
  `)}function k9(l,r){let f=r==="voice"||r==="both"?EO(l):"",i=r==="visual"||r==="both"?sO(l):"";if(l.guidance)if(r==="voice"||r==="both")f=v9(f,l.guidance);else i=v9(i,l.guidance);return{...f&&{voice:f},...i&&{visual:i}}}function F1(l){return k9(l,"voice").voice??""}var CO=c.object({prompt:c.string().optional(),title:c.string().optional(),content:c.string().optional(),excerpt:c.string().optional(),coverImageId:c.string().optional(),seriesName:c.string().optional(),seriesIndex:c.number().optional(),skipAi:c.boolean().optional()}),zj=xt.extend({title:c.string().optional(),slug:c.string().optional()});class lo extends jt{constructor(l,r){super(l,r,{schema:CO,jobTypeName:"blog-generation",entityType:"post"})}async generate(l,r){let{prompt:f,coverImageId:i,seriesName:n,seriesIndex:u,skipAi:t}=l,{title:o,content:w,excerpt:v}=l;if(t){if(!o)this.failEarly("Title is required when skipAi is true");w=w??`## Introduction
@@ -1371,8 +1371,8 @@ ${r.join(`
1371
1371
  letter-spacing: 0.02em;
1372
1372
  }
1373
1373
  .printable-footer a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
1374
- `}},void 0,!1,void 0,this),ur("header",{className:"printable-hero",children:[ur("div",{className:"printable-masthead",children:r.brandLabel&&ur("p",{className:"printable-kicker",children:r.brandLabel},void 0,!1,void 0,this)},void 0,!1,void 0,this),ur("div",{children:[ur("h1",{className:"printable-title",children:r.title},void 0,!1,void 0,this),r.excerpt&&ur("p",{className:"printable-excerpt",children:r.excerpt},void 0,!1,void 0,this),ur("div",{className:"printable-meta",children:[r.author&&ur("span",{children:["By ",r.author]},void 0,!0,void 0,this),f&&ur("span",{children:f},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),r.coverImageUrl&&ur("figure",{className:"printable-cover-wrap",children:ur("img",{className:"printable-cover",src:r.coverImageUrl,alt:""},void 0,!1,void 0,this)},void 0,!1,void 0,this),ur(q1,{markdown:r.body,className:"printable-body"},void 0,!1,void 0,this),(Boolean(r.canonicalUrl)||Boolean(r.brandLabel))&&ur("footer",{className:"printable-footer",children:[ur("span",{children:r.brandLabel??"Printable PDF"},void 0,!1,void 0,this),r.canonicalUrl&&ur("a",{href:r.canonicalUrl,children:r.canonicalUrl},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var Cq=26214400,eq=60000;class v4{metadata={outputEntityType:"document"};context;renderPdf;constructor(l,r={}){this.context=l,this.renderPdf=r.renderPdf??zu}async resolve(l){if(l.sourceEntityType!=="post"||l.attachmentType!==y5)return;let r=await this.context.entityService.getEntity({entityType:"post",id:l.sourceEntityId});if(!r)return;let f=l_(r,{brandLabel:this.resolveBrandLabel(),coverImageUrl:await this.resolveCoverImageUrl(r)}),i=await xq(sq(Eq(),"brain-blog-printable-"));try{let n=await e1({outputDir:i,mediaPath:`/_media/printable/post/${r.id}`,template:kW,format:"pdf",content:f,siteConfig:{title:f.title,themeMode:"light"},themeCSS:this.context.themeCSS}),u=await lf({rootDir:i});try{return{type:"document",data:await this.renderPdf(u.urlFor(n.urlPath),{maxBytes:Cq,timeoutMs:eq,printBackground:!0,preferCSSPageSize:!0}),mimeType:"application/pdf",filename:`${r_(r)}-printable.pdf`}}finally{await u.close()}}finally{await jq(i,{recursive:!0,force:!0})}}resolveBrandLabel(){let l=this.context.domain?.trim();if(l&&l.length>0)return l;let r=this.context.identity.getProfile().name.trim();return r.length>0?r:void 0}async resolveCoverImageUrl(l){let{frontmatter:r}=X1(l.content),f=el.parse(r);if(!f.coverImageId)return;let i=await this.context.entityService.getEntity({entityType:"image",id:f.coverImageId});return i?.content.startsWith("data:image/")?i.content:void 0}}function l_(l,r={}){let{frontmatter:f,content:i}=X1(l.content),n=el.parse(f);return{title:n.title,body:i,...n.excerpt?{excerpt:n.excerpt}:{},...n.author?{author:n.author}:{},...n.publishedAt?{publishedAt:n.publishedAt}:{},...n.canonicalUrl?{canonicalUrl:n.canonicalUrl}:{},...r.coverImageUrl?{coverImageUrl:r.coverImageUrl}:{},...r.brandLabel?{brandLabel:r.brandLabel}:{}}}function r_(l){let r=l.metadata.slug;return r.length>0?r:Cl(l.metadata.title)}import{mkdtemp as t_,rm as h_}from"fs/promises";import{tmpdir as o_}from"os";import{join as w_}from"path";import{jsxDEV as u_}from"preact/jsx-dev-runtime";var kt="og-image",f_="blog:og-image",$W=c.object({title:c.string().min(1),excerpt:c.string().optional(),author:c.string().optional(),publishedAt:c.string().optional(),brandLabel:c.string().optional(),coverImageUrl:c.string().optional()}),bW={name:f_,pluginId:"blog",schema:$W,renderers:{image:n_}};function i_(l){if(!l)return;let r=new Date(l);if(Number.isNaN(r.getTime()))return;return r.toLocaleDateString("en-GB",{year:"numeric",month:"short",day:"2-digit"})}function n_(l){let r=$W.parse(l);return u_(Au,{brandLabel:r.brandLabel??r.title,eyebrow:"Journal",title:r.title,subtitle:r.excerpt,meta:[r.author],tag:i_(r.publishedAt)},void 0,!1,void 0,this)}var v_={width:1200,height:630},m_=60000;class m4{metadata={outputEntityType:"image",targetField:"ogImageId"};context;screenshotPng;constructor(l,r={}){this.context=l,this.screenshotPng=r.screenshotPng??Ju}async resolve(l){if(l.sourceEntityType!=="post"||l.attachmentType!==kt)return;let r=await this.context.entityService.getEntity({entityType:"post",id:l.sourceEntityId});if(!r)return;let f=k_(r,{brandLabel:this.resolveBrandLabel(),coverImageUrl:await this.resolveCoverImageUrl(r)}),i=await t_(w_(o_(),"brain-blog-og-image-"));try{let n=await e1({outputDir:i,mediaPath:`/_media/og/post/${r.id}`,template:bW,format:"image",content:f,siteConfig:{title:f.title,themeMode:"light"},themeCSS:this.context.themeCSS}),u=await lf({rootDir:i});try{return{type:"image",data:await this.screenshotPng(u.urlFor(n.urlPath),v_,{timeoutMs:m_,fullPage:!1,omitBackground:!1}),mimeType:"image/png",filename:`${$_(r)}-og.png`}}finally{await u.close()}}finally{await h_(i,{recursive:!0,force:!0})}}resolveBrandLabel(){let l=this.context.domain?.trim();if(l&&l.length>0)return l;let r=this.context.identity.getProfile().name.trim();return r.length>0?r:void 0}async resolveCoverImageUrl(l){let{frontmatter:r}=X1(l.content),f=el.parse(r);if(!f.coverImageId)return;let i=await this.context.entityService.getEntity({entityType:"image",id:f.coverImageId});return i?.content.startsWith("data:image/")?i.content:void 0}}function k_(l,r={}){let{frontmatter:f}=X1(l.content),i=el.parse(f);return{title:i.title,...i.excerpt?{excerpt:i.excerpt}:{},...i.author?{author:i.author}:{},...i.publishedAt?{publishedAt:i.publishedAt}:{},...r.coverImageUrl?{coverImageUrl:r.coverImageUrl}:{},...r.brandLabel?{brandLabel:r.brandLabel}:{}}}function $_(l){let r=l.metadata.slug;return r.length>0?r:Cl(l.metadata.title)}var yW={name:"@brains/blog",version:"0.2.0-alpha.237",description:"AI-powered blog post generation from existing brain content",dependencies:{"@brains/atproto-contracts":"workspace:*","@brains/contracts":"workspace:*","@brains/media-page-composer":"workspace:*","@brains/media-renderer":"workspace:*","@brains/plugins":"workspace:*","@brains/style-guide":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*"},devDependencies:{"@brains/app":"workspace:*","@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"^1.3.14","bun-types":"^1.3.14",eslint:"^10.5.0",typescript:"^7.0.2"},exports:{".":"./src/index.ts"},private:!0,scripts:{eval:"cd evals && bun run brain-eval",lint:"eslint . --max-warnings 0","lint:fix":"eslint . --max-warnings 0 --fix",test:"bun test",typecheck:"tsc --noEmit"},type:"module"};class gW extends Ni{entityType=Wf.entityType;schema=k4;adapter=Wf;unregisterAtprotoProjection;unregisterPrintableAttachmentProvider;unregisterOgImageAttachmentProvider;constructor(l={}){super("blog",yW,l,C5)}getEntityTypeConfig(){return{weight:2,projectionSourceRole:"primary",publish:{publishStatuses:["queued","published"]}}}createGenerationHandler(l){return new lo(this.logger.child("BlogGenerationJobHandler"),l)}getTemplates(){return U$()}getDataSources(){return[new io(this.logger.child("BlogDataSource"))]}async onRegister(l){let{RSSDataSource:r}=await import("./chunks/rss-datasource-9j87n822.js");l.entities.registerDataSource(new r(this.logger.child("RSSDataSource"))),a$(l,this.logger),F$(l,this.logger),T$(l,this.logger),L$(l),this.unregisterPrintableAttachmentProvider=l.attachments.register("post",y5,new v4(l)),this.unregisterOgImageAttachmentProvider=l.attachments.register("post",kt,new m4(l)),this.deferPublishAssetRegistration(l),this.unregisterAtprotoProjection=of.getInstance().register($3()),this.logger.info("Blog plugin registered (routes auto-generated at /posts/)")}deferPublishAssetRegistration(l){l.messaging.subscribe(qf.pluginsRegistered,async()=>{return await l.messaging.send({type:dW.register,payload:{entityType:"post",attachmentType:kt,mediaEntityType:"image",targetEntityField:{location:"frontmatter",field:"ogImageId"},requiredWhen:{status:"published"},autoGenerate:!0,jobType:"image:image-render-source"}}),{success:!0}})}async onShutdown(){this.unregisterPrintableAttachmentProvider?.(),this.unregisterPrintableAttachmentProvider=void 0,this.unregisterOgImageAttachmentProvider?.(),this.unregisterOgImageAttachmentProvider=void 0,this.unregisterAtprotoProjection?.(),this.unregisterAtprotoProjection=void 0}}class d5{postsListUrl;id="personal:homepage";name="Personal Homepage DataSource";description="Fetches profile and blog posts for a personal homepage";constructor(l){this.postsListUrl=l}async fetch(l,r,f){let i=f.entityService,[n,u,t]=await Promise.all([H1(i,Mn),Ri(i,{entityType:"post",count:6,parse:Sf}),_f(i)]),o={profile:n,posts:u,postsListUrl:this.postsListUrl,cta:pn(t.cta)};return r.parse(o)}}class g5{id="personal:about";name="About Page DataSource";description="Fetches full profile data for the about page";async fetch(l,r,f){let n={profile:await H1(f.entityService,Mn)};return r.parse(n)}}import{jsxDEV as _0,Fragment as cW}from"preact/jsx-dev-runtime";function y_(l){return new Date(l).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function d_(l){return l.split(/(\*[^*]+\*)/).map((r,f)=>{if(r.startsWith("*")&&r.endsWith("*")&&r.length>2)return _0("em",{className:"font-sans italic font-medium text-theme-inverse tracking-[-0.015em] [font-variation-settings:'opsz'_72]",children:r.slice(1,-1)},f,!1,void 0,this);return r})}var $4=({profile:l,posts:r,postsListUrl:f,cta:i})=>{let n=l.tagline??l.description,u=l.name.split(" ")[0];return _0(cW,{children:[_0(Pl,{title:l.name,description:l.description??n??"Personal site",ogType:"website"},void 0,!1,void 0,this),_0("header",{className:"hero-decor bg-brand text-theme-inverse relative flex flex-col items-center justify-center px-6 md:px-12 pt-32 pb-24 gap-7",children:_0("div",{className:"w-full max-w-[1100px] mx-auto text-center flex flex-col items-center gap-7",children:[n&&_0("h1",{className:"font-heading font-bold text-[clamp(2.5rem,6vw,5rem)] leading-[1.05] tracking-[-0.035em] text-theme-inverse text-balance m-0 [font-variation-settings:'wdth'_90,'opsz'_96]",children:d_(n)},void 0,!1,void 0,this),l.description&&_0("p",{className:"text-[clamp(1.0625rem,1.4vw,1.3125rem)] leading-[1.5] text-theme-inverse opacity-95 max-w-[600px] mx-auto m-0",children:l.description},void 0,!1,void 0,this),_0("div",{className:"flex flex-wrap justify-center gap-3.5 mt-2",children:[_0("a",{href:f,className:"inline-flex items-center gap-2 rounded-full py-3.5 px-7 bg-theme text-brand border-2 border-theme font-heading font-semibold text-[15px] hover:bg-theme-subtle hover:-translate-y-0.5 transition-all [font-variation-settings:'wdth'_92,'opsz'_18]",children:["Read the Blog ",_0("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_0("a",{href:"/about",className:"rounded-full py-3.5 px-7 border-2 border-theme-light text-theme-inverse font-heading font-semibold text-[15px] hover:bg-brand-dark hover:border-theme hover:-translate-y-0.5 transition-all [font-variation-settings:'wdth'_92,'opsz'_18]",children:["About ",u]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),r.length>0&&_0("section",{className:"flex flex-col py-24 px-6 md:px-12 gap-11 bg-theme-subtle",children:[_0("div",{className:"flex justify-between items-end max-w-layout mx-auto w-full gap-6 flex-wrap",children:[_0("div",{children:[_0("span",{className:"block font-heading font-semibold text-[13px] uppercase tracking-[0.22em] text-brand mb-3 [font-variation-settings:'wdth'_85,'opsz'_12]",children:"The Archive"},void 0,!1,void 0,this),_0("h2",{className:"font-heading font-bold text-[clamp(2.25rem,5vw,3.75rem)] leading-none tracking-[-0.03em] text-heading m-0 [font-variation-settings:'wdth'_92,'opsz'_64]",children:["Recent"," ",_0("em",{className:"font-sans italic font-medium text-brand [font-variation-settings:'opsz'_60]",children:"posts"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),_0("a",{href:f,className:"font-heading font-semibold text-[15px] text-brand inline-flex items-center gap-1.5 pb-1.5 border-b-2 border-current hover:text-brand-dark transition-colors [font-variation-settings:'wdth'_88,'opsz'_16]",children:["View the whole archive ",_0("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),_0("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(min(100%,320px),1fr))] gap-8 max-w-layout mx-auto w-full",children:r.map((t)=>_0("a",{href:t.url,className:"group flex flex-col bg-theme border border-theme rounded-md overflow-hidden hover:-translate-y-1 hover:border-brand/50 transition-all no-underline shadow-sm hover:shadow-lg",children:[t.coverImageUrl?_0("img",{src:t.coverImageUrl,alt:t.metadata.title,className:"w-full aspect-[16/10] object-cover bg-theme-muted"},void 0,!1,void 0,this):_0("div",{className:"w-full aspect-[16/10] bg-gradient-to-br from-brand to-accent","aria-hidden":"true"},void 0,!1,void 0,this),_0("div",{className:"flex flex-col gap-4 p-7 flex-1",children:[_0("div",{className:"flex flex-wrap items-center gap-3.5 font-heading text-[11px] font-semibold uppercase tracking-[0.18em] text-theme-muted [font-variation-settings:'wdth'_85,'opsz'_11]",children:[t.frontmatter.seriesName&&_0(cW,{children:[_0("span",{className:"text-brand",children:t.frontmatter.seriesName},void 0,!1,void 0,this),_0("span",{className:"w-[3px] h-[3px] rounded-full bg-current opacity-50","aria-hidden":"true"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_0("time",{children:y_(t.metadata.publishedAt??t.created)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_0("h3",{className:"font-sans font-semibold text-[clamp(1.375rem,1.8vw,1.625rem)] leading-[1.18] tracking-[-0.012em] text-heading m-0 text-balance",children:t.metadata.title},void 0,!1,void 0,this),t.frontmatter.excerpt&&_0("p",{className:"text-base leading-[1.55] text-theme-muted m-0 flex-1",children:t.frontmatter.excerpt},void 0,!1,void 0,this),_0("span",{className:"inline-flex items-center gap-1.5 font-heading font-semibold text-[13px] uppercase tracking-[0.14em] text-brand mt-1 [font-variation-settings:'wdth'_88,'opsz'_14]",children:["Read the post"," ",_0("span",{"aria-hidden":"true",className:"transition-transform group-hover:translate-x-1",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},t.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_0("section",{className:"cta-decor bg-theme-dark text-theme-on-dark flex-grow flex flex-col items-center justify-center py-24 px-6 md:px-12 gap-5",children:[_0("span",{className:"font-heading font-medium text-xs uppercase tracking-[0.24em] text-accent [font-variation-settings:'wdth'_85,'opsz'_12]",children:"Get in touch"},void 0,!1,void 0,this),_0("h2",{className:"text-center font-heading font-bold text-[clamp(2rem,4vw,3rem)] leading-none tracking-[-0.03em] text-theme-on-dark m-0 [font-variation-settings:'wdth'_90,'opsz'_64]",children:i.heading},void 0,!1,void 0,this),i.subtitle&&_0("p",{className:"text-center text-base leading-[1.55] text-theme-on-dark opacity-80 max-w-[480px] m-0",children:i.subtitle},void 0,!1,void 0,this),_0("a",{href:i.buttonLink,className:"inline-flex items-center gap-2 rounded-full py-3.5 px-7 bg-brand text-theme-inverse border-2 border-brand font-heading font-semibold text-[15px] hover:bg-brand-dark hover:-translate-y-0.5 transition-all mt-2 [font-variation-settings:'wdth'_92,'opsz'_18]",children:[i.buttonText," ",_0("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as tr,Fragment as g_}from"preact/jsx-dev-runtime";var b4=({profile:l})=>{let r=`About ${l.name}`,f=l.description??l.intro??"About page",i=Boolean(l.email??l.website);return tr(g_,{children:[tr(Pl,{title:r,description:f,ogType:"profile"},void 0,!1,void 0,this),tr("section",{className:"hero-decor bg-brand text-theme-inverse relative flex flex-col px-6 md:px-12 pt-32 pb-24",children:tr("div",{className:"w-full max-w-3xl mx-auto flex flex-col gap-6",children:[tr("h1",{className:"font-heading font-bold text-[clamp(2.5rem,6vw,4.5rem)] leading-[1.05] tracking-[-0.035em] text-theme-inverse text-balance m-0 [font-variation-settings:'wdth'_90,'opsz'_96]",children:l.name},void 0,!1,void 0,this),l.description&&tr("p",{className:"text-[clamp(1.0625rem,1.4vw,1.25rem)] leading-[1.55] text-theme-inverse opacity-95 max-w-2xl m-0",children:l.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),l.story&&tr("section",{className:`py-24 px-6 md:px-12 bg-theme-subtle${i?"":" flex-grow"}`,children:tr("div",{className:"max-w-3xl mx-auto",children:tr(q1,{markdown:l.story},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),i&&tr("section",{className:"cta-decor bg-theme-dark text-theme-on-dark flex-grow flex flex-col items-center justify-center py-24 px-6 md:px-12 gap-5",children:[tr("span",{className:"font-heading font-medium text-xs uppercase tracking-[0.24em] text-accent [font-variation-settings:'wdth'_85,'opsz'_12]",children:"Get in touch"},void 0,!1,void 0,this),tr("h2",{className:"text-center font-heading font-bold text-[clamp(2rem,4vw,3rem)] leading-none tracking-[-0.03em] text-theme-on-dark m-0 [font-variation-settings:'wdth'_90,'opsz'_64]",children:["Say"," ",tr("em",{className:"font-sans italic font-medium text-accent [font-variation-settings:'opsz'_72]",children:"hi."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),tr("div",{className:"flex flex-wrap justify-center gap-3.5 mt-2",children:[l.email&&tr("a",{href:`mailto:${l.email}`,className:"inline-flex items-center gap-2 rounded-full py-3.5 px-7 bg-brand text-theme-inverse border-2 border-brand font-heading font-semibold text-[15px] hover:bg-brand-dark hover:-translate-y-0.5 transition-all [font-variation-settings:'wdth'_92,'opsz'_18]",children:["Get in Touch ",tr("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.website&&tr("a",{href:l.website,className:"rounded-full py-3.5 px-7 border-2 border-theme-light text-theme-on-dark font-heading font-semibold text-[15px] hover:bg-brand-dark hover:border-theme hover:-translate-y-0.5 transition-all [font-variation-settings:'wdth'_92,'opsz'_18]",children:"Website"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};var AW={name:"@brains/site-personal",version:"0.2.0-alpha.237",description:"Personal site composition package",dependencies:{"@brains/blog":"workspace:*","@brains/plugins":"workspace:*","@brains/profile":"workspace:*","@brains/site-composition":"workspace:*","@brains/site-engine":"workspace:*","@brains/site-info":"workspace:*","@brains/templates":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*",preact:"^10.27.2"},devDependencies:{"@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"^1.3.14","bun-types":"^1.3.14",eslint:"^10.5.0",typescript:"^7.0.2"},exports:{".":"./src/index.ts"},files:["src"],private:!0,scripts:{lint:"eslint . --max-warnings 0","lint:fix":"eslint . --max-warnings 0 --fix",typecheck:"tsc --noEmit"},type:"module"};var A_=c.object({entityDisplay:c.object({post:c.object({label:c.string().default("Post"),pluralName:c.string().optional()}).default({label:"Post"})}).default({post:{label:"Post"}})}),K_=c.object({heading:c.string(),buttonText:c.string(),buttonLink:c.string(),subtitle:c.string().optional()}),W_=c.looseObject({id:c.string(),entityType:c.literal("post"),content:c.string(),created:c.string(),updated:c.string(),contentHash:c.string(),metadata:c.looseObject({title:c.string(),publishedAt:c.string().optional()}),frontmatter:c.looseObject({excerpt:c.string(),seriesName:c.string().optional(),seriesIndex:c.number().optional()}),body:c.string(),url:c.string().optional(),typeLabel:c.string().optional(),listUrl:c.string().optional(),listLabel:c.string().optional(),seriesUrl:c.string().optional(),coverImageUrl:c.string().optional(),ogImageUrl:c.string().optional(),coverImageWidth:c.number().optional(),coverImageHeight:c.number().optional(),coverImageSrcset:c.string().optional(),coverImageSizes:c.string().optional()});class y4 extends Pn{dependencies=["blog"];constructor(l={}){super("personal-site",AW,l,A_)}async onRegister(l){let r=this.config.entityDisplay.post,f=`/${r.pluralName??r.label.toLowerCase()+"s"}`,i=new d5(f);l.entities.registerDataSource(i);let n=new g5;l.entities.registerDataSource(n);let u=c.object({profile:If,posts:c.array(W_),postsListUrl:c.string(),cta:K_}),t=c.object({profile:If});l.templates.register({homepage:Jl({name:"homepage",description:"Personal homepage with recent blog posts",schema:u,dataSourceId:"personal:homepage",requiredPermission:"public",layout:{component:$4}}),about:Jl({name:"about",description:"About page with profile",schema:t,dataSourceId:"personal:about",requiredPermission:"public",layout:{component:b4}})}),this.logger.info("Personal site plugin registered successfully")}async getTools(){return[]}async getResources(){return[]}}function d4(l){return new y4(l??{})}var g4=[{id:"home",path:"/",title:"Home",description:"Personal site homepage",layout:"default",navigation:{show:!0,label:"Home",slot:"secondary",priority:10},sections:[{id:"homepage",template:"personal-site:homepage",dataQuery:{}}]},{id:"about",path:"/about",title:"About",description:"About page",layout:"default",navigation:{show:!0,label:"About",slot:"primary",priority:90},sections:[{id:"about",template:"personal-site:about",dataQuery:{}}]}];import{jsxDEV as Rr}from"preact/jsx-dev-runtime";function c4({sections:l,siteInfo:r}){let f=[...r.navigation.primary,...r.navigation.secondary].filter((i)=>i.label!=="Home");return Rr("div",{className:"flex flex-col min-h-screen bg-theme overflow-x-clip",children:[Rr(cu,{title:r.title,titleClassName:"font-heading font-bold text-2xl",navigation:r.navigation.primary,showThemeToggle:!0,themeToggleClassName:"bg-theme-toggle text-theme-toggle-icon hover:bg-theme-toggle-hover rounded-[10px]",...r.logo!==void 0?{logo:r.logo}:{}},void 0,!1,void 0,this),Rr("main",{className:"flex-grow flex flex-col",children:l},void 0,!1,void 0,this),Rr("footer",{className:"bg-footer text-footer border-t border-theme",children:Rr("div",{className:"max-w-layout mx-auto flex flex-col md:flex-row justify-between items-center py-8 px-6 md:px-8",children:[Rr("div",{className:"flex flex-col gap-1 mb-4 md:mb-0",children:[Rr("span",{className:"text-brand font-heading font-bold text-lg",children:r.title},void 0,!1,void 0,this),r.description&&Rr("span",{className:"text-theme-muted text-xs",children:r.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Rr("nav",{className:"flex flex-wrap justify-center gap-x-6 gap-y-2 mb-4 md:mb-0",children:f.map((i)=>Rr("a",{href:i.href,className:"text-theme-muted text-[13px] hover:text-brand transition-colors",children:i.label},i.href,!1,void 0,this))},void 0,!1,void 0,this),Rr("div",{className:"flex items-center gap-4",children:[r.copyright&&Rr("span",{className:"text-theme-light text-[11px]",children:r.copyright},void 0,!1,void 0,this),Rr(kf,{variant:"footer",size:"sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var $t=D5;var KW=c.enum(["generating","draft","queued","published","failed"]),WW=c.enum(["generating","draft","queued","published","failed"]),A4="publishedAt is required when deck status is published",K4=(l)=>l.status==="published"&&!l.publishedAt,W4=(l)=>{if(K4(l))throw Error(A4)},Y1=c.object({title:c.string(),slug:c.string().optional(),description:c.string().optional(),author:c.string().optional(),status:KW,publishedAt:c.string().datetime().optional(),event:c.string().optional(),coverImageId:c.string().optional(),ogImageId:c.string().optional()}),g50=c.object({title:c.string(),description:c.string().optional(),status:KW,publishedAt:c.string().datetime().optional(),coverImageId:c.string().optional(),slug:c.string(),error:c.string().optional()}).superRefine((l,r)=>{if(!K4(l))return;r.addIssue({code:c.ZodIssueCode.custom,path:["publishedAt"],message:A4})}),Z_=c.object({title:c.string(),description:c.string().optional(),status:WW,publishedAt:c.string().datetime().optional(),coverImageId:c.string().optional(),slug:c.string(),error:c.string().optional()}).superRefine((l,r)=>{if(!K4(l))return;r.addIssue({code:"custom",path:["publishedAt"],message:A4})}),O_=c.object({title:c.string(),slug:c.string().optional(),description:c.string().optional(),author:c.string().optional(),status:WW,publishedAt:c.string().datetime().optional(),event:c.string().optional(),coverImageId:c.string().optional(),ogImageId:c.string().optional()}),zn=hf.extend({entityType:c.literal("deck"),metadata:Z_}),c5=zn.extend({frontmatter:O_,body:c.string(),ogImageUrl:c.string().optional()}),bt=c5.extend({url:c.string().optional(),typeLabel:c.string().optional(),listUrl:c.string().optional(),listLabel:c.string().optional(),coverImageUrl:c.string().optional(),ogImageUrl:c.string().optional(),coverImageWidth:c.number().optional(),coverImageHeight:c.number().optional()});class Z4 extends Fi{constructor(){super({entityType:"deck",purpose:"A slide-deck presentation.",schema:zn,frontmatterSchema:Y1,supportsCoverImage:!0})}validateSlideStructure(l){if(!/^---$/gm.test(l))throw Error("Invalid deck: markdown must contain slide separators (---) to be a valid presentation")}toMarkdown(l){let r=this.extractBody(l.content);this.validateSlideStructure(r);let f=this.parseFrontMatter(l.content,Y1);W4(f);let i={...f,slug:f.slug??l.metadata.slug};return this.buildMarkdown(r,i)}fromMarkdown(l){let r=this.parseFrontmatter(l),f=this.extractBody(l);W4(r),this.validateSlideStructure(f);let i=r.slug??Cl(r.title),n=r.status;return{entityType:"deck",content:l,metadata:{slug:i,title:r.title,description:r.description,status:n,publishedAt:r.publishedAt,coverImageId:r.coverImageId}}}generateTitle(l){return l.metadata.title}generateSummary(l){if(l.metadata.description)return l.metadata.description;return`Presentation: ${l.metadata.title}`}generateFrontMatter(l){return this.toMarkdown(l)}buildStub(l){let r={title:l.title,slug:l.id,status:"generating"};return{content:this.buildMarkdown(`---
1375
- `,r),metadata:{title:l.title,slug:l.id,status:"generating"}}}}var yt=new Z4;var X_=c.object({markdown:c.string().describe("Markdown content with slide separators (---)"),deck:bt.optional()}),O4=Jl({name:"deck-detail",description:"Render a presentation deck as Reveal.js slides",schema:X_,dataSourceId:"decks:entities",requiredPermission:"public",layout:{component:jw,fullscreen:!0}});var X4=c.object({decks:c.array(c5)}),Y4=c.object({decks:c.array(bt),pageTitle:c.string().optional(),pageLabel:c.string().optional()});import{jsxDEV as J4}from"preact/jsx-dev-runtime";var Y_="Presentations",z4=({decks:l,pageLabel:r})=>{let f=l.map((n)=>({id:n.id,url:n.url,title:n.frontmatter.title,date:n.frontmatter.publishedAt??n.created,description:n.frontmatter.description}));return J4("div",{className:"deck-list bg-theme",children:J4("div",{className:"container mx-auto max-w-[1100px] px-6 py-16 md:px-12 md:py-24",children:J4(Ku,{label:r&&r!=="Decks"?r:Y_,items:f},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)};class A5 extends ZW{constructor(){super(X4,{title:"Deck List",mappings:[{key:"decks",label:"Decks",type:"array",itemType:"object"}]})}}var Q4=Jl({name:"deck-list",description:"List view of all presentation decks",schema:Y4,dataSourceId:"decks:entities",requiredPermission:"public",formatter:new A5,layout:{component:z4}});var J_=c.object({title:c.string().max(80).describe("A short, punchy title (2-5 words) that's memorable and evocative"),content:c.string().describe("Full slide deck content in markdown format with slide separators (---). Each slide should have a header and focused content."),description:c.string().describe("A concise 1-2 sentence summary that captures the essence of the talk")}),OW=Jl({name:"decks:generation",description:"Template for AI to generate complete slide decks from prompts",schema:J_,dataSourceId:"shell:ai-content",requiredPermission:"public",useKnowledgeContext:!0,basePrompt:`Generate a complete slide deck based on the user's prompt.
1374
+ `}},void 0,!1,void 0,this),ur("header",{className:"printable-hero",children:[ur("div",{className:"printable-masthead",children:r.brandLabel&&ur("p",{className:"printable-kicker",children:r.brandLabel},void 0,!1,void 0,this)},void 0,!1,void 0,this),ur("div",{children:[ur("h1",{className:"printable-title",children:r.title},void 0,!1,void 0,this),r.excerpt&&ur("p",{className:"printable-excerpt",children:r.excerpt},void 0,!1,void 0,this),ur("div",{className:"printable-meta",children:[r.author&&ur("span",{children:["By ",r.author]},void 0,!0,void 0,this),f&&ur("span",{children:f},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),r.coverImageUrl&&ur("figure",{className:"printable-cover-wrap",children:ur("img",{className:"printable-cover",src:r.coverImageUrl,alt:""},void 0,!1,void 0,this)},void 0,!1,void 0,this),ur(q1,{markdown:r.body,className:"printable-body"},void 0,!1,void 0,this),(Boolean(r.canonicalUrl)||Boolean(r.brandLabel))&&ur("footer",{className:"printable-footer",children:[ur("span",{children:r.brandLabel??"Printable PDF"},void 0,!1,void 0,this),r.canonicalUrl&&ur("a",{href:r.canonicalUrl,children:r.canonicalUrl},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var Cq=26214400,eq=60000;class v4{metadata={outputEntityType:"document"};context;renderPdf;constructor(l,r={}){this.context=l,this.renderPdf=r.renderPdf??zu}async resolve(l){if(l.sourceEntityType!=="post"||l.attachmentType!==y5)return;let r=await this.context.entityService.getEntity({entityType:"post",id:l.sourceEntityId});if(!r)return;let f=l_(r,{brandLabel:this.resolveBrandLabel(),coverImageUrl:await this.resolveCoverImageUrl(r)}),i=await xq(sq(Eq(),"brain-blog-printable-"));try{let n=await e1({outputDir:i,mediaPath:`/_media/printable/post/${r.id}`,template:kW,format:"pdf",content:f,siteConfig:{title:f.title,themeMode:"light"},themeCSS:this.context.themeCSS}),u=await lf({rootDir:i});try{return{type:"document",data:await this.renderPdf(u.urlFor(n.urlPath),{maxBytes:Cq,timeoutMs:eq,printBackground:!0,preferCSSPageSize:!0}),mimeType:"application/pdf",filename:`${r_(r)}-printable.pdf`}}finally{await u.close()}}finally{await jq(i,{recursive:!0,force:!0})}}resolveBrandLabel(){let l=this.context.domain?.trim();if(l&&l.length>0)return l;let r=this.context.identity.getProfile().name.trim();return r.length>0?r:void 0}async resolveCoverImageUrl(l){let{frontmatter:r}=X1(l.content),f=el.parse(r);if(!f.coverImageId)return;let i=await this.context.entityService.getEntity({entityType:"image",id:f.coverImageId});return i?.content.startsWith("data:image/")?i.content:void 0}}function l_(l,r={}){let{frontmatter:f,content:i}=X1(l.content),n=el.parse(f);return{title:n.title,body:i,...n.excerpt?{excerpt:n.excerpt}:{},...n.author?{author:n.author}:{},...n.publishedAt?{publishedAt:n.publishedAt}:{},...n.canonicalUrl?{canonicalUrl:n.canonicalUrl}:{},...r.coverImageUrl?{coverImageUrl:r.coverImageUrl}:{},...r.brandLabel?{brandLabel:r.brandLabel}:{}}}function r_(l){let r=l.metadata.slug;return r.length>0?r:Cl(l.metadata.title)}import{mkdtemp as t_,rm as h_}from"fs/promises";import{tmpdir as o_}from"os";import{join as w_}from"path";import{jsxDEV as u_}from"preact/jsx-dev-runtime";var kt="og-image",f_="blog:og-image",$W=c.object({title:c.string().min(1),excerpt:c.string().optional(),author:c.string().optional(),publishedAt:c.string().optional(),brandLabel:c.string().optional(),coverImageUrl:c.string().optional()}),bW={name:f_,pluginId:"blog",schema:$W,renderers:{image:n_}};function i_(l){if(!l)return;let r=new Date(l);if(Number.isNaN(r.getTime()))return;return r.toLocaleDateString("en-GB",{year:"numeric",month:"short",day:"2-digit"})}function n_(l){let r=$W.parse(l);return u_(Au,{brandLabel:r.brandLabel??r.title,eyebrow:"Journal",title:r.title,subtitle:r.excerpt,meta:[r.author],tag:i_(r.publishedAt)},void 0,!1,void 0,this)}var v_={width:1200,height:630},m_=60000;class m4{metadata={outputEntityType:"image",targetField:"ogImageId"};context;screenshotPng;constructor(l,r={}){this.context=l,this.screenshotPng=r.screenshotPng??Ju}async resolve(l){if(l.sourceEntityType!=="post"||l.attachmentType!==kt)return;let r=await this.context.entityService.getEntity({entityType:"post",id:l.sourceEntityId});if(!r)return;let f=k_(r,{brandLabel:this.resolveBrandLabel(),coverImageUrl:await this.resolveCoverImageUrl(r)}),i=await t_(w_(o_(),"brain-blog-og-image-"));try{let n=await e1({outputDir:i,mediaPath:`/_media/og/post/${r.id}`,template:bW,format:"image",content:f,siteConfig:{title:f.title,themeMode:"light"},themeCSS:this.context.themeCSS}),u=await lf({rootDir:i});try{return{type:"image",data:await this.screenshotPng(u.urlFor(n.urlPath),v_,{timeoutMs:m_,fullPage:!1,omitBackground:!1}),mimeType:"image/png",filename:`${$_(r)}-og.png`}}finally{await u.close()}}finally{await h_(i,{recursive:!0,force:!0})}}resolveBrandLabel(){let l=this.context.domain?.trim();if(l&&l.length>0)return l;let r=this.context.identity.getProfile().name.trim();return r.length>0?r:void 0}async resolveCoverImageUrl(l){let{frontmatter:r}=X1(l.content),f=el.parse(r);if(!f.coverImageId)return;let i=await this.context.entityService.getEntity({entityType:"image",id:f.coverImageId});return i?.content.startsWith("data:image/")?i.content:void 0}}function k_(l,r={}){let{frontmatter:f}=X1(l.content),i=el.parse(f);return{title:i.title,...i.excerpt?{excerpt:i.excerpt}:{},...i.author?{author:i.author}:{},...i.publishedAt?{publishedAt:i.publishedAt}:{},...r.coverImageUrl?{coverImageUrl:r.coverImageUrl}:{},...r.brandLabel?{brandLabel:r.brandLabel}:{}}}function $_(l){let r=l.metadata.slug;return r.length>0?r:Cl(l.metadata.title)}var yW={name:"@brains/blog",version:"0.2.0-alpha.239",description:"AI-powered blog post generation from existing brain content",dependencies:{"@brains/atproto-contracts":"workspace:*","@brains/contracts":"workspace:*","@brains/media-page-composer":"workspace:*","@brains/media-renderer":"workspace:*","@brains/plugins":"workspace:*","@brains/style-guide":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*"},devDependencies:{"@brains/app":"workspace:*","@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"^1.3.14","bun-types":"^1.3.14",eslint:"^10.5.0",typescript:"^7.0.2"},exports:{".":"./src/index.ts"},private:!0,scripts:{eval:"cd evals && bun run brain-eval",lint:"eslint . --max-warnings 0","lint:fix":"eslint . --max-warnings 0 --fix",test:"bun test",typecheck:"tsc --noEmit"},type:"module"};class gW extends Ni{entityType=Wf.entityType;schema=k4;adapter=Wf;unregisterAtprotoProjection;unregisterPrintableAttachmentProvider;unregisterOgImageAttachmentProvider;constructor(l={}){super("blog",yW,l,C5)}getEntityTypeConfig(){return{weight:2,projectionSourceRole:"primary",publish:{publishStatuses:["queued","published"]}}}createGenerationHandler(l){return new lo(this.logger.child("BlogGenerationJobHandler"),l)}getTemplates(){return U$()}getDataSources(){return[new io(this.logger.child("BlogDataSource"))]}async onRegister(l){let{RSSDataSource:r}=await import("./chunks/rss-datasource-9j87n822.js");l.entities.registerDataSource(new r(this.logger.child("RSSDataSource"))),a$(l,this.logger),F$(l,this.logger),T$(l,this.logger),L$(l),this.unregisterPrintableAttachmentProvider=l.attachments.register("post",y5,new v4(l)),this.unregisterOgImageAttachmentProvider=l.attachments.register("post",kt,new m4(l)),this.deferPublishAssetRegistration(l),this.unregisterAtprotoProjection=of.getInstance().register($3()),this.logger.info("Blog plugin registered (routes auto-generated at /posts/)")}deferPublishAssetRegistration(l){l.messaging.subscribe(qf.pluginsRegistered,async()=>{return await l.messaging.send({type:dW.register,payload:{entityType:"post",attachmentType:kt,mediaEntityType:"image",targetEntityField:{location:"frontmatter",field:"ogImageId"},requiredWhen:{status:"published"},autoGenerate:!0,jobType:"image:image-render-source"}}),{success:!0}})}async onShutdown(){this.unregisterPrintableAttachmentProvider?.(),this.unregisterPrintableAttachmentProvider=void 0,this.unregisterOgImageAttachmentProvider?.(),this.unregisterOgImageAttachmentProvider=void 0,this.unregisterAtprotoProjection?.(),this.unregisterAtprotoProjection=void 0}}class d5{postsListUrl;id="personal:homepage";name="Personal Homepage DataSource";description="Fetches profile and blog posts for a personal homepage";constructor(l){this.postsListUrl=l}async fetch(l,r,f){let i=f.entityService,[n,u,t]=await Promise.all([H1(i,Mn),Ri(i,{entityType:"post",count:6,parse:Sf}),_f(i)]),o={profile:n,posts:u,postsListUrl:this.postsListUrl,cta:pn(t.cta)};return r.parse(o)}}class g5{id="personal:about";name="About Page DataSource";description="Fetches full profile data for the about page";async fetch(l,r,f){let n={profile:await H1(f.entityService,Mn)};return r.parse(n)}}import{jsxDEV as _0,Fragment as cW}from"preact/jsx-dev-runtime";function y_(l){return new Date(l).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function d_(l){return l.split(/(\*[^*]+\*)/).map((r,f)=>{if(r.startsWith("*")&&r.endsWith("*")&&r.length>2)return _0("em",{className:"font-sans italic font-medium text-theme-inverse tracking-[-0.015em] [font-variation-settings:'opsz'_72]",children:r.slice(1,-1)},f,!1,void 0,this);return r})}var $4=({profile:l,posts:r,postsListUrl:f,cta:i})=>{let n=l.tagline??l.description,u=l.name.split(" ")[0];return _0(cW,{children:[_0(Pl,{title:l.name,description:l.description??n??"Personal site",ogType:"website"},void 0,!1,void 0,this),_0("header",{className:"hero-decor bg-brand text-theme-inverse relative flex flex-col items-center justify-center px-6 md:px-12 pt-32 pb-24 gap-7",children:_0("div",{className:"w-full max-w-[1100px] mx-auto text-center flex flex-col items-center gap-7",children:[n&&_0("h1",{className:"font-heading font-bold text-[clamp(2.5rem,6vw,5rem)] leading-[1.05] tracking-[-0.035em] text-theme-inverse text-balance m-0 [font-variation-settings:'wdth'_90,'opsz'_96]",children:d_(n)},void 0,!1,void 0,this),l.description&&_0("p",{className:"text-[clamp(1.0625rem,1.4vw,1.3125rem)] leading-[1.5] text-theme-inverse opacity-95 max-w-[600px] mx-auto m-0",children:l.description},void 0,!1,void 0,this),_0("div",{className:"flex flex-wrap justify-center gap-3.5 mt-2",children:[_0("a",{href:f,className:"inline-flex items-center gap-2 rounded-full py-3.5 px-7 bg-theme text-brand border-2 border-theme font-heading font-semibold text-[15px] hover:bg-theme-subtle hover:-translate-y-0.5 transition-all [font-variation-settings:'wdth'_92,'opsz'_18]",children:["Read the Blog ",_0("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_0("a",{href:"/about",className:"rounded-full py-3.5 px-7 border-2 border-theme-light text-theme-inverse font-heading font-semibold text-[15px] hover:bg-brand-dark hover:border-theme hover:-translate-y-0.5 transition-all [font-variation-settings:'wdth'_92,'opsz'_18]",children:["About ",u]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),r.length>0&&_0("section",{className:"flex flex-col py-24 px-6 md:px-12 gap-11 bg-theme-subtle",children:[_0("div",{className:"flex justify-between items-end max-w-layout mx-auto w-full gap-6 flex-wrap",children:[_0("div",{children:[_0("span",{className:"block font-heading font-semibold text-[13px] uppercase tracking-[0.22em] text-brand mb-3 [font-variation-settings:'wdth'_85,'opsz'_12]",children:"The Archive"},void 0,!1,void 0,this),_0("h2",{className:"font-heading font-bold text-[clamp(2.25rem,5vw,3.75rem)] leading-none tracking-[-0.03em] text-heading m-0 [font-variation-settings:'wdth'_92,'opsz'_64]",children:["Recent"," ",_0("em",{className:"font-sans italic font-medium text-brand [font-variation-settings:'opsz'_60]",children:"posts"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),_0("a",{href:f,className:"font-heading font-semibold text-[15px] text-brand inline-flex items-center gap-1.5 pb-1.5 border-b-2 border-current hover:text-brand-dark transition-colors [font-variation-settings:'wdth'_88,'opsz'_16]",children:["View the whole archive ",_0("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),_0("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(min(100%,320px),1fr))] gap-8 max-w-layout mx-auto w-full",children:r.map((t)=>_0("a",{href:t.url,className:"group flex flex-col bg-theme border border-theme rounded-md overflow-hidden hover:-translate-y-1 hover:border-brand/50 transition-all no-underline shadow-sm hover:shadow-lg",children:[t.coverImageUrl?_0("img",{src:t.coverImageUrl,alt:t.metadata.title,className:"w-full aspect-[16/10] object-cover bg-theme-muted"},void 0,!1,void 0,this):_0("div",{className:"w-full aspect-[16/10] bg-gradient-to-br from-brand to-accent","aria-hidden":"true"},void 0,!1,void 0,this),_0("div",{className:"flex flex-col gap-4 p-7 flex-1",children:[_0("div",{className:"flex flex-wrap items-center gap-3.5 font-heading text-[11px] font-semibold uppercase tracking-[0.18em] text-theme-muted [font-variation-settings:'wdth'_85,'opsz'_11]",children:[t.frontmatter.seriesName&&_0(cW,{children:[_0("span",{className:"text-brand",children:t.frontmatter.seriesName},void 0,!1,void 0,this),_0("span",{className:"w-[3px] h-[3px] rounded-full bg-current opacity-50","aria-hidden":"true"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_0("time",{children:y_(t.metadata.publishedAt??t.created)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_0("h3",{className:"font-sans font-semibold text-[clamp(1.375rem,1.8vw,1.625rem)] leading-[1.18] tracking-[-0.012em] text-heading m-0 text-balance",children:t.metadata.title},void 0,!1,void 0,this),t.frontmatter.excerpt&&_0("p",{className:"text-base leading-[1.55] text-theme-muted m-0 flex-1",children:t.frontmatter.excerpt},void 0,!1,void 0,this),_0("span",{className:"inline-flex items-center gap-1.5 font-heading font-semibold text-[13px] uppercase tracking-[0.14em] text-brand mt-1 [font-variation-settings:'wdth'_88,'opsz'_14]",children:["Read the post"," ",_0("span",{"aria-hidden":"true",className:"transition-transform group-hover:translate-x-1",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},t.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_0("section",{className:"cta-decor bg-theme-dark text-theme-on-dark flex-grow flex flex-col items-center justify-center py-24 px-6 md:px-12 gap-5",children:[_0("span",{className:"font-heading font-medium text-xs uppercase tracking-[0.24em] text-accent [font-variation-settings:'wdth'_85,'opsz'_12]",children:"Get in touch"},void 0,!1,void 0,this),_0("h2",{className:"text-center font-heading font-bold text-[clamp(2rem,4vw,3rem)] leading-none tracking-[-0.03em] text-theme-on-dark m-0 [font-variation-settings:'wdth'_90,'opsz'_64]",children:i.heading},void 0,!1,void 0,this),i.subtitle&&_0("p",{className:"text-center text-base leading-[1.55] text-theme-on-dark opacity-80 max-w-[480px] m-0",children:i.subtitle},void 0,!1,void 0,this),_0("a",{href:i.buttonLink,className:"inline-flex items-center gap-2 rounded-full py-3.5 px-7 bg-brand text-theme-inverse border-2 border-brand font-heading font-semibold text-[15px] hover:bg-brand-dark hover:-translate-y-0.5 transition-all mt-2 [font-variation-settings:'wdth'_92,'opsz'_18]",children:[i.buttonText," ",_0("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as tr,Fragment as g_}from"preact/jsx-dev-runtime";var b4=({profile:l})=>{let r=`About ${l.name}`,f=l.description??l.intro??"About page",i=Boolean(l.email??l.website);return tr(g_,{children:[tr(Pl,{title:r,description:f,ogType:"profile"},void 0,!1,void 0,this),tr("section",{className:"hero-decor bg-brand text-theme-inverse relative flex flex-col px-6 md:px-12 pt-32 pb-24",children:tr("div",{className:"w-full max-w-3xl mx-auto flex flex-col gap-6",children:[tr("h1",{className:"font-heading font-bold text-[clamp(2.5rem,6vw,4.5rem)] leading-[1.05] tracking-[-0.035em] text-theme-inverse text-balance m-0 [font-variation-settings:'wdth'_90,'opsz'_96]",children:l.name},void 0,!1,void 0,this),l.description&&tr("p",{className:"text-[clamp(1.0625rem,1.4vw,1.25rem)] leading-[1.55] text-theme-inverse opacity-95 max-w-2xl m-0",children:l.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),l.story&&tr("section",{className:`py-24 px-6 md:px-12 bg-theme-subtle${i?"":" flex-grow"}`,children:tr("div",{className:"max-w-3xl mx-auto",children:tr(q1,{markdown:l.story},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),i&&tr("section",{className:"cta-decor bg-theme-dark text-theme-on-dark flex-grow flex flex-col items-center justify-center py-24 px-6 md:px-12 gap-5",children:[tr("span",{className:"font-heading font-medium text-xs uppercase tracking-[0.24em] text-accent [font-variation-settings:'wdth'_85,'opsz'_12]",children:"Get in touch"},void 0,!1,void 0,this),tr("h2",{className:"text-center font-heading font-bold text-[clamp(2rem,4vw,3rem)] leading-none tracking-[-0.03em] text-theme-on-dark m-0 [font-variation-settings:'wdth'_90,'opsz'_64]",children:["Say"," ",tr("em",{className:"font-sans italic font-medium text-accent [font-variation-settings:'opsz'_72]",children:"hi."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),tr("div",{className:"flex flex-wrap justify-center gap-3.5 mt-2",children:[l.email&&tr("a",{href:`mailto:${l.email}`,className:"inline-flex items-center gap-2 rounded-full py-3.5 px-7 bg-brand text-theme-inverse border-2 border-brand font-heading font-semibold text-[15px] hover:bg-brand-dark hover:-translate-y-0.5 transition-all [font-variation-settings:'wdth'_92,'opsz'_18]",children:["Get in Touch ",tr("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.website&&tr("a",{href:l.website,className:"rounded-full py-3.5 px-7 border-2 border-theme-light text-theme-on-dark font-heading font-semibold text-[15px] hover:bg-brand-dark hover:border-theme hover:-translate-y-0.5 transition-all [font-variation-settings:'wdth'_92,'opsz'_18]",children:"Website"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};var AW={name:"@brains/site-personal",version:"0.2.0-alpha.239",description:"Personal site composition package",dependencies:{"@brains/blog":"workspace:*","@brains/plugins":"workspace:*","@brains/profile":"workspace:*","@brains/site-composition":"workspace:*","@brains/site-engine":"workspace:*","@brains/site-info":"workspace:*","@brains/templates":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*",preact:"^10.27.2"},devDependencies:{"@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"^1.3.14","bun-types":"^1.3.14",eslint:"^10.5.0",typescript:"^7.0.2"},exports:{".":"./src/index.ts"},files:["src"],private:!0,scripts:{lint:"eslint . --max-warnings 0","lint:fix":"eslint . --max-warnings 0 --fix",typecheck:"tsc --noEmit"},type:"module"};var A_=c.object({entityDisplay:c.object({post:c.object({label:c.string().default("Post"),pluralName:c.string().optional()}).default({label:"Post"})}).default({post:{label:"Post"}})}),K_=c.object({heading:c.string(),buttonText:c.string(),buttonLink:c.string(),subtitle:c.string().optional()}),W_=c.looseObject({id:c.string(),entityType:c.literal("post"),content:c.string(),created:c.string(),updated:c.string(),contentHash:c.string(),metadata:c.looseObject({title:c.string(),publishedAt:c.string().optional()}),frontmatter:c.looseObject({excerpt:c.string(),seriesName:c.string().optional(),seriesIndex:c.number().optional()}),body:c.string(),url:c.string().optional(),typeLabel:c.string().optional(),listUrl:c.string().optional(),listLabel:c.string().optional(),seriesUrl:c.string().optional(),coverImageUrl:c.string().optional(),ogImageUrl:c.string().optional(),coverImageWidth:c.number().optional(),coverImageHeight:c.number().optional(),coverImageSrcset:c.string().optional(),coverImageSizes:c.string().optional()});class y4 extends Pn{dependencies=["blog"];constructor(l={}){super("personal-site",AW,l,A_)}async onRegister(l){let r=this.config.entityDisplay.post,f=`/${r.pluralName??r.label.toLowerCase()+"s"}`,i=new d5(f);l.entities.registerDataSource(i);let n=new g5;l.entities.registerDataSource(n);let u=c.object({profile:Vt,posts:c.array(W_),postsListUrl:c.string(),cta:K_}),t=c.object({profile:Vt});l.templates.register({homepage:Jl({name:"homepage",description:"Personal homepage with recent blog posts",schema:u,dataSourceId:"personal:homepage",requiredPermission:"public",layout:{component:$4}}),about:Jl({name:"about",description:"About page with profile",schema:t,dataSourceId:"personal:about",requiredPermission:"public",layout:{component:b4}})}),this.logger.info("Personal site plugin registered successfully")}async getTools(){return[]}async getResources(){return[]}}function d4(l){return new y4(l??{})}var g4=[{id:"home",path:"/",title:"Home",description:"Personal site homepage",layout:"default",navigation:{show:!0,label:"Home",slot:"secondary",priority:10},sections:[{id:"homepage",template:"personal-site:homepage",dataQuery:{}}]},{id:"about",path:"/about",title:"About",description:"About page",layout:"default",navigation:{show:!0,label:"About",slot:"primary",priority:90},sections:[{id:"about",template:"personal-site:about",dataQuery:{}}]}];import{jsxDEV as Rr}from"preact/jsx-dev-runtime";function c4({sections:l,siteInfo:r}){let f=[...r.navigation.primary,...r.navigation.secondary].filter((i)=>i.label!=="Home");return Rr("div",{className:"flex flex-col min-h-screen bg-theme overflow-x-clip",children:[Rr(cu,{title:r.title,titleClassName:"font-heading font-bold text-2xl",navigation:r.navigation.primary,showThemeToggle:!0,themeToggleClassName:"bg-theme-toggle text-theme-toggle-icon hover:bg-theme-toggle-hover rounded-[10px]",...r.logo!==void 0?{logo:r.logo}:{}},void 0,!1,void 0,this),Rr("main",{className:"flex-grow flex flex-col",children:l},void 0,!1,void 0,this),Rr("footer",{className:"bg-footer text-footer border-t border-theme",children:Rr("div",{className:"max-w-layout mx-auto flex flex-col md:flex-row justify-between items-center py-8 px-6 md:px-8",children:[Rr("div",{className:"flex flex-col gap-1 mb-4 md:mb-0",children:[Rr("span",{className:"text-brand font-heading font-bold text-lg",children:r.title},void 0,!1,void 0,this),r.description&&Rr("span",{className:"text-theme-muted text-xs",children:r.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Rr("nav",{className:"flex flex-wrap justify-center gap-x-6 gap-y-2 mb-4 md:mb-0",children:f.map((i)=>Rr("a",{href:i.href,className:"text-theme-muted text-[13px] hover:text-brand transition-colors",children:i.label},i.href,!1,void 0,this))},void 0,!1,void 0,this),Rr("div",{className:"flex items-center gap-4",children:[r.copyright&&Rr("span",{className:"text-theme-light text-[11px]",children:r.copyright},void 0,!1,void 0,this),Rr(kf,{variant:"footer",size:"sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Ff=D5;var KW=c.enum(["generating","draft","queued","published","failed"]),WW=c.enum(["generating","draft","queued","published","failed"]),A4="publishedAt is required when deck status is published",K4=(l)=>l.status==="published"&&!l.publishedAt,W4=(l)=>{if(K4(l))throw Error(A4)},Y1=c.object({title:c.string(),slug:c.string().optional(),description:c.string().optional(),author:c.string().optional(),status:KW,publishedAt:c.string().datetime().optional(),event:c.string().optional(),coverImageId:c.string().optional(),ogImageId:c.string().optional()}),g50=c.object({title:c.string(),description:c.string().optional(),status:KW,publishedAt:c.string().datetime().optional(),coverImageId:c.string().optional(),slug:c.string(),error:c.string().optional()}).superRefine((l,r)=>{if(!K4(l))return;r.addIssue({code:c.ZodIssueCode.custom,path:["publishedAt"],message:A4})}),Z_=c.object({title:c.string(),description:c.string().optional(),status:WW,publishedAt:c.string().datetime().optional(),coverImageId:c.string().optional(),slug:c.string(),error:c.string().optional()}).superRefine((l,r)=>{if(!K4(l))return;r.addIssue({code:"custom",path:["publishedAt"],message:A4})}),O_=c.object({title:c.string(),slug:c.string().optional(),description:c.string().optional(),author:c.string().optional(),status:WW,publishedAt:c.string().datetime().optional(),event:c.string().optional(),coverImageId:c.string().optional(),ogImageId:c.string().optional()}),zn=hf.extend({entityType:c.literal("deck"),metadata:Z_}),c5=zn.extend({frontmatter:O_,body:c.string(),ogImageUrl:c.string().optional()}),$t=c5.extend({url:c.string().optional(),typeLabel:c.string().optional(),listUrl:c.string().optional(),listLabel:c.string().optional(),coverImageUrl:c.string().optional(),ogImageUrl:c.string().optional(),coverImageWidth:c.number().optional(),coverImageHeight:c.number().optional()});class Z4 extends Fi{constructor(){super({entityType:"deck",purpose:"A slide-deck presentation.",schema:zn,frontmatterSchema:Y1,supportsCoverImage:!0})}validateSlideStructure(l){if(!/^---$/gm.test(l))throw Error("Invalid deck: markdown must contain slide separators (---) to be a valid presentation")}toMarkdown(l){let r=this.extractBody(l.content);this.validateSlideStructure(r);let f=this.parseFrontMatter(l.content,Y1);W4(f);let i={...f,slug:f.slug??l.metadata.slug};return this.buildMarkdown(r,i)}fromMarkdown(l){let r=this.parseFrontmatter(l),f=this.extractBody(l);W4(r),this.validateSlideStructure(f);let i=r.slug??Cl(r.title),n=r.status;return{entityType:"deck",content:l,metadata:{slug:i,title:r.title,description:r.description,status:n,publishedAt:r.publishedAt,coverImageId:r.coverImageId}}}generateTitle(l){return l.metadata.title}generateSummary(l){if(l.metadata.description)return l.metadata.description;return`Presentation: ${l.metadata.title}`}generateFrontMatter(l){return this.toMarkdown(l)}buildStub(l){let r={title:l.title,slug:l.id,status:"generating"};return{content:this.buildMarkdown(`---
1375
+ `,r),metadata:{title:l.title,slug:l.id,status:"generating"}}}}var bt=new Z4;var X_=c.object({markdown:c.string().describe("Markdown content with slide separators (---)"),deck:$t.optional()}),O4=Jl({name:"deck-detail",description:"Render a presentation deck as Reveal.js slides",schema:X_,dataSourceId:"decks:entities",requiredPermission:"public",layout:{component:jw,fullscreen:!0}});var X4=c.object({decks:c.array(c5)}),Y4=c.object({decks:c.array($t),pageTitle:c.string().optional(),pageLabel:c.string().optional()});import{jsxDEV as J4}from"preact/jsx-dev-runtime";var Y_="Presentations",z4=({decks:l,pageLabel:r})=>{let f=l.map((n)=>({id:n.id,url:n.url,title:n.frontmatter.title,date:n.frontmatter.publishedAt??n.created,description:n.frontmatter.description}));return J4("div",{className:"deck-list bg-theme",children:J4("div",{className:"container mx-auto max-w-[1100px] px-6 py-16 md:px-12 md:py-24",children:J4(Ku,{label:r&&r!=="Decks"?r:Y_,items:f},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)};class A5 extends ZW{constructor(){super(X4,{title:"Deck List",mappings:[{key:"decks",label:"Decks",type:"array",itemType:"object"}]})}}var Q4=Jl({name:"deck-list",description:"List view of all presentation decks",schema:Y4,dataSourceId:"decks:entities",requiredPermission:"public",formatter:new A5,layout:{component:z4}});var J_=c.object({title:c.string().max(80).describe("A short, punchy title (2-5 words) that's memorable and evocative"),content:c.string().describe("Full slide deck content in markdown format with slide separators (---). Each slide should have a header and focused content."),description:c.string().describe("A concise 1-2 sentence summary that captures the essence of the talk")}),OW=Jl({name:"decks:generation",description:"Template for AI to generate complete slide decks from prompts",schema:J_,dataSourceId:"shell:ai-content",requiredPermission:"public",useKnowledgeContext:!0,basePrompt:`Generate a complete slide deck based on the user's prompt.
1376
1376
 
1377
1377
  Content requirements:
1378
1378
  1. Title slide: use only a short title of 2-5 words and an optional subtitle.
@@ -1413,7 +1413,7 @@ Guidelines:
1413
1413
  4. Match the voice of the presentation - if it's opinionated, the description should be too
1414
1414
 
1415
1415
  Bad: "An exploration of modern web development practices and their implications"
1416
- Good: "Why most web frameworks are solving the wrong problems"`});var YW=c.enum(["png","jpg","jpeg","webp","gif","svg"]),JW=c.enum(["pending","draft","failed"]),zW=c.object({title:c.string().optional(),alt:c.string().optional(),format:YW,width:c.number(),height:c.number(),status:JW.optional(),processingJobId:c.string().optional(),processingError:c.string().optional(),sourceUrl:c.url().optional(),sourceEntityType:c.string().optional(),sourceEntityId:c.string().optional(),sourceUploadId:c.string().optional(),sourceFilename:c.string().optional(),sourceMediaType:c.string().optional(),attachmentType:c.string().optional(),dedupKey:c.string().optional()}),B4=hf.extend({entityType:c.literal("image"),metadata:zW}),Q_=c.object({url:c.string(),alt:c.string(),title:c.string(),width:c.number(),height:c.number()});function K5(l){let r=l.trim().match(/^data:image\/([a-z+]+);base64,(.+)$/i);if(!r?.[1]||!r[2])throw Error("Invalid image data URL");return{format:r[1].toLowerCase(),base64:r[2]}}var H_={png:"iVBORw",jpg:"/9j/",gif:"R0lGOD",webp:"UklGR"};function H4(l){for(let[r,f]of Object.entries(H_))if(l.startsWith(f))return r;return null}function W5(l){let r=Buffer.from(l,"base64");if(r[0]===137&&r[1]===80&&r[2]===78&&r[3]===71){let f=r.readUInt32BE(16),i=r.readUInt32BE(20);return{width:f,height:i}}if(r[0]===255&&r[1]===216){let f=2;while(f<r.length-8){if(r[f]!==255){f++;continue}let i=r[f+1];if(i===192||i===194){let u=r.readUInt16BE(f+5);return{width:r.readUInt16BE(f+7),height:u}}let n=r.readUInt16BE(f+2);f+=2+n}}if(r[0]===71&&r[1]===73&&r[2]===70){let f=r.readUInt16LE(6),i=r.readUInt16LE(8);return{width:f,height:i}}if(r.length>=30&&r[0]===82&&r[1]===73&&r[2]===70&&r[3]===70){if(r[12]===86&&r[13]===80&&r[14]===56){if(r[15]===32){let f=r[26]??0,i=r[27]??0,n=r[28]??0,u=r[29]??0,t=(f|i<<8)&16383,o=(n|u<<8)&16383;return{width:t,height:o}}if(r[15]===76&&r.length>=25){let f=r.readUInt32LE(21),i=(f&16383)+1,n=(f>>14&16383)+1;return{width:i,height:n}}}}return null}class G4{entityType="image";purpose="Image assets such as generated covers, social previews, and uploaded images.";schema=B4;toMarkdown(l){return l.content}fromMarkdown(l){let{format:r,base64:f}=K5(l),i=W5(f);return{entityType:"image",content:l,metadata:{format:r,width:i?.width??0,height:i?.height??0}}}extractMetadata(l){return l.metadata}parseFrontMatter(l,r){return r.parse({})}generateFrontMatter(l){return""}getBodyTemplate(){return""}createImageEntity(l){let{dataUrl:r,title:f,alt:i}=l,{format:n,base64:u}=K5(r),t=W5(u),w=H4(u)??n;return{entityType:"image",content:r,metadata:{title:f,alt:i??f,format:w,width:t?.width??0,height:t?.height??0,...l.status&&{status:l.status},...l.sourceUrl&&{sourceUrl:l.sourceUrl},...l.sourceEntityType&&{sourceEntityType:l.sourceEntityType},...l.sourceEntityId&&{sourceEntityId:l.sourceEntityId},...l.sourceUploadId&&{sourceUploadId:l.sourceUploadId},...l.sourceFilename&&{sourceFilename:l.sourceFilename},...l.sourceMediaType&&{sourceMediaType:l.sourceMediaType},...l.attachmentType&&{attachmentType:l.attachmentType},...l.dedupKey&&{dedupKey:l.dedupKey}}}}}var G_=new G4;function BW(l){return QW(l)}var U_=/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/,a_=c.record(c.string(),c.unknown());async function HW(l,r){let f=await r.getEntity({entityType:"image",id:l});if(!f)return;return{url:f.content,alt:f.metadata.alt??"",title:f.metadata.title??"",width:f.metadata.width,height:f.metadata.height}}function F_(l,r){let f=U_.exec(l.content);if(!f?.[1])return;try{let i=a_.safeParse(BW(f[1]));if(i.success){let n=i.data[r];return typeof n==="string"?n:void 0}}catch{return}return}function GW(l){return F_(l,"coverImageId")}async function U4(l,r){let f=GW(l);if(!f)return;return HW(f,r)}var do0=UW();function dt(l){let{metadata:r,content:f}=Rl(l.content,Y1);return{...l,frontmatter:r,body:f}}class a4 extends st{id="decks:entities";name="Deck Entity DataSource";description="Fetches and transforms deck entities for rendering";config={entityType:"deck",defaultSort:[{field:"publishedAt",direction:"desc"}],defaultLimit:100};constructor(l){super(l);this.logger.debug("DeckDataSource initialized")}transformEntity(l){return dt(l)}async fetchDetail(l,r){let f=await super.fetchDetail(l,r),i=await U4(f.item,r);if(i){let n=`<!-- .slide: data-background-image="${i.url}" data-background-opacity="0.4" -->`;f.item={...f.item,body:`${n}
1416
+ Good: "Why most web frameworks are solving the wrong problems"`});var YW=c.enum(["png","jpg","jpeg","webp","gif","svg"]),JW=c.enum(["pending","draft","failed"]),zW=c.object({title:c.string().optional(),alt:c.string().optional(),format:YW,width:c.number(),height:c.number(),status:JW.optional(),processingJobId:c.string().optional(),processingError:c.string().optional(),sourceUrl:c.url().optional(),sourceEntityType:c.string().optional(),sourceEntityId:c.string().optional(),sourceUploadId:c.string().optional(),sourceFilename:c.string().optional(),sourceMediaType:c.string().optional(),attachmentType:c.string().optional(),dedupKey:c.string().optional()}),B4=hf.extend({entityType:c.literal("image"),metadata:zW}),Q_=c.object({url:c.string(),alt:c.string(),title:c.string(),width:c.number(),height:c.number()});function K5(l){let r=l.trim().match(/^data:image\/([a-z+]+);base64,(.+)$/i);if(!r?.[1]||!r[2])throw Error("Invalid image data URL");return{format:r[1].toLowerCase(),base64:r[2]}}var H_={png:"iVBORw",jpg:"/9j/",gif:"R0lGOD",webp:"UklGR"};function H4(l){for(let[r,f]of Object.entries(H_))if(l.startsWith(f))return r;return null}function W5(l){let r=Buffer.from(l,"base64");if(r[0]===137&&r[1]===80&&r[2]===78&&r[3]===71){let f=r.readUInt32BE(16),i=r.readUInt32BE(20);return{width:f,height:i}}if(r[0]===255&&r[1]===216){let f=2;while(f<r.length-8){if(r[f]!==255){f++;continue}let i=r[f+1];if(i===192||i===194){let u=r.readUInt16BE(f+5);return{width:r.readUInt16BE(f+7),height:u}}let n=r.readUInt16BE(f+2);f+=2+n}}if(r[0]===71&&r[1]===73&&r[2]===70){let f=r.readUInt16LE(6),i=r.readUInt16LE(8);return{width:f,height:i}}if(r.length>=30&&r[0]===82&&r[1]===73&&r[2]===70&&r[3]===70){if(r[12]===86&&r[13]===80&&r[14]===56){if(r[15]===32){let f=r[26]??0,i=r[27]??0,n=r[28]??0,u=r[29]??0,t=(f|i<<8)&16383,o=(n|u<<8)&16383;return{width:t,height:o}}if(r[15]===76&&r.length>=25){let f=r.readUInt32LE(21),i=(f&16383)+1,n=(f>>14&16383)+1;return{width:i,height:n}}}}return null}class G4{entityType="image";purpose="Image assets such as generated covers, social previews, and uploaded images.";schema=B4;toMarkdown(l){return l.content}fromMarkdown(l){let{format:r,base64:f}=K5(l),i=W5(f);return{entityType:"image",content:l,metadata:{format:r,width:i?.width??0,height:i?.height??0}}}extractMetadata(l){return l.metadata}parseFrontMatter(l,r){return r.parse({})}generateFrontMatter(l){return""}getBodyTemplate(){return""}createImageEntity(l){let{dataUrl:r,title:f,alt:i}=l,{format:n,base64:u}=K5(r),t=W5(u),w=H4(u)??n;return{entityType:"image",content:r,metadata:{title:f,alt:i??f,format:w,width:t?.width??0,height:t?.height??0,...l.status&&{status:l.status},...l.sourceUrl&&{sourceUrl:l.sourceUrl},...l.sourceEntityType&&{sourceEntityType:l.sourceEntityType},...l.sourceEntityId&&{sourceEntityId:l.sourceEntityId},...l.sourceUploadId&&{sourceUploadId:l.sourceUploadId},...l.sourceFilename&&{sourceFilename:l.sourceFilename},...l.sourceMediaType&&{sourceMediaType:l.sourceMediaType},...l.attachmentType&&{attachmentType:l.attachmentType},...l.dedupKey&&{dedupKey:l.dedupKey}}}}}var G_=new G4;function BW(l){return QW(l)}var U_=/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/,a_=c.record(c.string(),c.unknown());async function HW(l,r){let f=await r.getEntity({entityType:"image",id:l});if(!f)return;return{url:f.content,alt:f.metadata.alt??"",title:f.metadata.title??"",width:f.metadata.width,height:f.metadata.height}}function F_(l,r){let f=U_.exec(l.content);if(!f?.[1])return;try{let i=a_.safeParse(BW(f[1]));if(i.success){let n=i.data[r];return typeof n==="string"?n:void 0}}catch{return}return}function GW(l){return F_(l,"coverImageId")}async function U4(l,r){let f=GW(l);if(!f)return;return HW(f,r)}var do0=UW();function yt(l){let{metadata:r,content:f}=Rl(l.content,Y1);return{...l,frontmatter:r,body:f}}class a4 extends st{id="decks:entities";name="Deck Entity DataSource";description="Fetches and transforms deck entities for rendering";config={entityType:"deck",defaultSort:[{field:"publishedAt",direction:"desc"}],defaultLimit:100};constructor(l){super(l);this.logger.debug("DeckDataSource initialized")}transformEntity(l){return yt(l)}async fetchDetail(l,r){let f=await super.fetchDetail(l,r),i=await U4(f.item,r);if(i){let n=`<!-- .slide: data-background-image="${i.url}" data-background-opacity="0.4" -->`;f.item={...f.item,body:`${n}
1417
1417
  ${f.item.body}`}}return f}buildDetailResult(l,r){return{markdown:l.body,deck:l}}buildListResult(l,r,f){return this.logger.debug("Creating deck list data",{deckCount:l.length,firstDeck:l[0]?.id}),{decks:l}}}var N_=c.object({prompt:c.string().optional(),title:c.string().optional(),content:c.string().optional(),description:c.string().optional(),author:c.string().optional(),event:c.string().optional(),skipAi:c.boolean().optional()}),Io0=xt.extend({title:c.string().optional(),slug:c.string().optional()});class F4 extends jt{constructor(l,r){super(l,r,{schema:N_,jobTypeName:"deck-generation",entityType:"deck"})}async generate(l,r){let{prompt:f,author:i,event:n,skipAi:u}=l,{title:t,content:o,description:w}=l;if(u){if(!t)this.failEarly("Title is required when skipAi is true");o=o??`# ${t}
1418
1418
 
1419
1419
  ---
@@ -1675,12 +1675,12 @@ ${o}`,templateName:"decks:description",representedIdentity:"none"})).description
1675
1675
  color: var(--carousel-accent);
1676
1676
  font-weight: 600;
1677
1677
  }
1678
- `}},void 0,!1,void 0,this),n.map((v,k)=>kr("section",{className:`deck-carousel-slide${k===0?" is-cover":""}`,children:[kr("header",{className:"deck-carousel-header",children:kr("span",{className:"deck-carousel-wordmark","aria-label":f??r,children:[kr("span",{className:"wm-primary",children:u.primary},void 0,!1,void 0,this),u.secondary!==void 0&&kr(P_,{children:[kr("span",{className:"wm-dot",children:"."},void 0,!1,void 0,this),kr("span",{className:"wm-secondary",children:u.secondary},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),kr("div",{className:"deck-carousel-body",children:kr("div",{className:"deck-carousel-content",dangerouslySetInnerHTML:{__html:w(v.markdown)}},void 0,!1,void 0,this)},void 0,!1,void 0,this),kr("footer",{className:"deck-carousel-footer",children:[kr("span",{className:"deck-carousel-footer-meta",children:i??r},void 0,!1,void 0,this),kr("span",{className:"deck-carousel-counter","aria-label":`Slide ${k+1} of ${t}`,children:[kr("span",{className:"deck-carousel-counter-current",children:String(k+1).padStart(2,"0")},void 0,!1,void 0,this)," / ",kr("span",{children:o},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},k,!0,void 0,this))]},void 0,!0,void 0,this)}import{mkdtemp as p_,rm as M_}from"fs/promises";import{tmpdir as V_}from"os";import{join as I_}from"path";var q_=26214400,__=60000,RW=20;class N4{metadata={outputEntityType:"document"};context;renderPdf;getThemeMode;constructor(l,r={}){this.context=l,this.renderPdf=r.renderPdf??zu,this.getThemeMode=r.getThemeMode??(async()=>"dark")}async resolve(l){if(l.sourceEntityType!=="deck")return;let r=await this.context.entityService.getEntity({entityType:"deck",id:l.sourceEntityId});if(!r)return;let f=S_(r,{brandLabel:this.resolveBrandLabel()});if(f.slides.length>RW)throw Error(`Refusing to render carousel with ${f.slides.length} slides; maxSlides=${RW}`);let i=await this.getThemeMode(),n=await p_(I_(V_(),"brain-deck-carousel-"));try{let u=await e1({outputDir:n,mediaPath:`/_media/carousel/${r.id}`,template:NW,format:"pdf",content:f,siteConfig:{title:f.title,themeMode:i},themeCSS:this.context.themeCSS}),t=await lf({rootDir:n});try{return{type:"document",data:await this.renderPdf(t.urlFor(u.urlPath),{maxBytes:q_,timeoutMs:__,printBackground:!0,preferCSSPageSize:!0}),mimeType:"application/pdf",filename:`${D_(r)}-carousel.pdf`}}finally{await t.close()}}finally{await M_(n,{recursive:!0,force:!0})}}resolveBrandLabel(){let l=this.context.domain?.trim();if(l&&l.length>0)return l;let r=this.context.identity.getProfile().name;return r.length>0?r:void 0}}function S_(l,r={}){let{frontmatter:f,content:i}=X1(l.content),n=typeof f.title==="string"?f.title:l.metadata.title,u=typeof f.event==="string"&&f.event.length>0?f.event:void 0,t=i.split(/^---$/gm).map((o)=>o.trim()).filter((o)=>o.length>0).map((o)=>({markdown:o}));return{title:n,slides:t,...r.brandLabel?{brandLabel:r.brandLabel}:{},...u?{eyebrow:u}:{}}}function D_(l){let r=l.metadata.slug;return r.length>0?r:Cl(l.metadata.title)}import{jsxDEV as E_}from"preact/jsx-dev-runtime";var Z5="og-image",x_="decks:og-image",TW=c.object({title:c.string().min(1),description:c.string().optional(),event:c.string().optional(),brandLabel:c.string().optional(),slideCount:c.number().int().positive().optional(),coverImageUrl:c.string().optional()}),LW={name:x_,pluginId:"decks",schema:TW,renderers:{image:j_}};function j_(l){let r=TW.parse(l),f=r.slideCount?`${r.slideCount} slide${r.slideCount===1?"":"s"}`:void 0;return E_(Au,{brandLabel:r.brandLabel??r.title,eyebrow:"Deck",title:r.title,subtitle:r.description,meta:[r.event],tag:f},void 0,!1,void 0,this)}class R4{metadata={outputEntityType:"image",targetField:"ogImageId"};context;deps;constructor(l,r={}){this.context=l,this.deps=r}async resolve(l){if(l.sourceEntityType!=="deck"||l.attachmentType!==Z5)return;let r=await this.context.entityService.getEntity({entityType:"deck",id:l.sourceEntityId});if(!r)return;let{frontmatter:f,content:i}=X1(r.content),n=Y1.parse(f),u=s_(i),t=this.resolveBrandLabel(),o=await this.resolveCoverImageUrl(n.coverImageId),w={title:n.title,...n.description?{description:n.description}:{},...n.event?{event:n.event}:{},...u?{slideCount:u}:{},...o?{coverImageUrl:o}:{},...t?{brandLabel:t}:{}};return{type:"image",data:await w4({mediaPath:`/_media/og/deck/${r.id}`,template:LW,content:w,title:w.title,themeMode:"dark",themeCSS:this.context.themeCSS,tmpPrefix:"brain-deck-og-image-",...this.deps.screenshotPng&&{screenshotPng:this.deps.screenshotPng}}),mimeType:"image/png",filename:`${C_(r)}-og.png`}}resolveBrandLabel(){let l=this.context.domain?.trim();if(l&&l.length>0)return l;let r=this.context.identity.getProfile().name.trim();return r.length>0?r:void 0}async resolveCoverImageUrl(l){if(!l)return;let r=await this.context.entityService.getEntity({entityType:"image",id:l});return r?.content.startsWith("data:image/")?r.content:void 0}}function s_(l){return l.split(/^---$/gm).map((r)=>r.trim()).filter((r)=>r.length>0).length}function C_(l){let r=l.metadata.slug;return r.length>0?r:Cl(l.metadata.title)}async function PW({entity:l,config:r}){let f=zn.parse(l),i=Rl(f.content,Y1),n=i.metadata;return{$type:"ai.rizom.brain.deck",title:n.title,...n.slug&&{slug:n.slug},...n.description&&{description:n.description},body:i.content,format:"text/markdown",...n.author&&{author:n.author},...n.event&&{event:n.event},...n.publishedAt&&{publishedAt:n.publishedAt},...r.brainDid&&{brainDid:r.brainDid},...r.anchorDid&&{anchorDid:r.anchorDid},sourceEntityType:"deck",sourceEntityId:f.id,createdAt:f.created,...f.updated&&{updatedAt:f.updated}}}function T4(){return{entityType:"deck",collection:"ai.rizom.brain.deck",lexicon:gr["ai.rizom.brain.deck"],validate:!1,buildRecord:PW}}var pW={name:"@brains/decks",version:"0.2.0-alpha.237",description:"Presentation decks plugin for creating and viewing slide presentations",dependencies:{"@brains/atproto-contracts":"workspace:*","@brains/content-formatters":"workspace:*","@brains/contracts":"workspace:*","@brains/image":"workspace:*","@brains/media-page-composer":"workspace:*","@brains/media-renderer":"workspace:*","@brains/plugins":"workspace:*","@brains/site-info":"workspace:*","@brains/style-guide":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*"},devDependencies:{"@brains/app":"workspace:*","@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"^1.3.14","bun-types":"^1.3.14",eslint:"^10.5.0",typescript:"^7.0.2"},exports:{".":"./src/index.ts"},private:!0,scripts:{eval:"cd evals && bun run brain-eval",lint:"eslint . --max-warnings 0","lint:fix":"eslint . --max-warnings 0 --fix",test:"bun test",typecheck:"tsc --noEmit"},type:"module"};var lS=c.object({prompt:c.string(),event:c.string().optional()}),rS=c.object({title:c.string(),content:c.string()});class MW extends Ni{deps;entityType=yt.entityType;schema=yt.schema;adapter=yt;unregisterCarouselAttachmentProvider;unregisterOgImageAttachmentProvider;unregisterAtprotoProjection;constructor(l={}){super("decks",pW,{},_t);this.deps=l}createGenerationHandler(l){return new F4(this.logger.child("DeckGenerationJobHandler"),l)}getTemplates(){return{"deck-detail":O4,"deck-list":Q4,generation:OW,description:XW}}getDataSources(){return[new a4(this.logger)]}getEntityTypeConfig(){return{weight:1.5,projectionSourceRole:"primary"}}async onRegister(l){this.deferPublishRegistration(l),this.subscribeToPublishExecute(l),this.registerCarouselAttachmentProvider(l),this.registerOgImageAttachmentProvider(l),this.registerEvalHandlers(l),this.unregisterAtprotoProjection=of.getInstance().register(T4()),this.logger.info("Decks plugin registered")}async onShutdown(){this.unregisterCarouselAttachmentProvider?.(),this.unregisterCarouselAttachmentProvider=void 0,this.unregisterOgImageAttachmentProvider?.(),this.unregisterOgImageAttachmentProvider=void 0,this.unregisterAtprotoProjection?.(),this.unregisterAtprotoProjection=void 0}deferPublishRegistration(l){l.messaging.subscribe(qf.pluginsRegistered,async()=>{return await l.messaging.send({type:pr.register,payload:{entityType:"deck",provider:{name:"internal",publish:async()=>({id:"internal"})},config:{executionMode:"provider"}}}),{success:!0}})}subscribeToPublishExecute(l){l.messaging.subscribe(pr.execute,async(r)=>{let{entityType:f,entityId:i}=r.payload;if(f!=="deck")return{success:!0};try{let n=await l.entityService.getEntity({entityType:"deck",id:i});if(!n)return await l.messaging.send({type:pr.reportFailure,payload:{entityType:f,entityId:i,error:`Deck not found: ${i}`}}),{success:!0};if(n.metadata.status==="published")return{success:!0};let u=new Date().toISOString(),t={...n,metadata:{...n.metadata,status:"published",publishedAt:u}};await l.entityService.updateEntity({entity:{...t,content:this.adapter.toMarkdown(t)}}),await l.messaging.send({type:pr.reportSuccess,payload:{entityType:f,entityId:i,result:{id:i}}})}catch(n){await l.messaging.send({type:pr.reportFailure,payload:{entityType:f,entityId:i,error:wn(n)}})}return{success:!0}})}registerCarouselAttachmentProvider(l){let r={...this.deps,getThemeMode:this.deps.getThemeMode??(async()=>{try{return(await _f(l.entityService)).themeMode??"dark"}catch{return"dark"}})};this.unregisterCarouselAttachmentProvider=l.attachments.register("deck",aW,new N4(l,r))}registerOgImageAttachmentProvider(l){this.unregisterOgImageAttachmentProvider=l.attachments.register("deck",Z5,new R4(l))}registerEvalHandlers(l){l.eval.registerHandler("generateDeck",async(r)=>{let f=lS.parse(r),i=F1(await a1(l.entityService));return l.ai.generate({prompt:`${f.prompt}${f.event?`
1678
+ `}},void 0,!1,void 0,this),n.map((v,k)=>kr("section",{className:`deck-carousel-slide${k===0?" is-cover":""}`,children:[kr("header",{className:"deck-carousel-header",children:kr("span",{className:"deck-carousel-wordmark","aria-label":f??r,children:[kr("span",{className:"wm-primary",children:u.primary},void 0,!1,void 0,this),u.secondary!==void 0&&kr(P_,{children:[kr("span",{className:"wm-dot",children:"."},void 0,!1,void 0,this),kr("span",{className:"wm-secondary",children:u.secondary},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),kr("div",{className:"deck-carousel-body",children:kr("div",{className:"deck-carousel-content",dangerouslySetInnerHTML:{__html:w(v.markdown)}},void 0,!1,void 0,this)},void 0,!1,void 0,this),kr("footer",{className:"deck-carousel-footer",children:[kr("span",{className:"deck-carousel-footer-meta",children:i??r},void 0,!1,void 0,this),kr("span",{className:"deck-carousel-counter","aria-label":`Slide ${k+1} of ${t}`,children:[kr("span",{className:"deck-carousel-counter-current",children:String(k+1).padStart(2,"0")},void 0,!1,void 0,this)," / ",kr("span",{children:o},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},k,!0,void 0,this))]},void 0,!0,void 0,this)}import{mkdtemp as p_,rm as M_}from"fs/promises";import{tmpdir as V_}from"os";import{join as I_}from"path";var q_=26214400,__=60000,RW=20;class N4{metadata={outputEntityType:"document"};context;renderPdf;getThemeMode;constructor(l,r={}){this.context=l,this.renderPdf=r.renderPdf??zu,this.getThemeMode=r.getThemeMode??(async()=>"dark")}async resolve(l){if(l.sourceEntityType!=="deck")return;let r=await this.context.entityService.getEntity({entityType:"deck",id:l.sourceEntityId});if(!r)return;let f=S_(r,{brandLabel:this.resolveBrandLabel()});if(f.slides.length>RW)throw Error(`Refusing to render carousel with ${f.slides.length} slides; maxSlides=${RW}`);let i=await this.getThemeMode(),n=await p_(I_(V_(),"brain-deck-carousel-"));try{let u=await e1({outputDir:n,mediaPath:`/_media/carousel/${r.id}`,template:NW,format:"pdf",content:f,siteConfig:{title:f.title,themeMode:i},themeCSS:this.context.themeCSS}),t=await lf({rootDir:n});try{return{type:"document",data:await this.renderPdf(t.urlFor(u.urlPath),{maxBytes:q_,timeoutMs:__,printBackground:!0,preferCSSPageSize:!0}),mimeType:"application/pdf",filename:`${D_(r)}-carousel.pdf`}}finally{await t.close()}}finally{await M_(n,{recursive:!0,force:!0})}}resolveBrandLabel(){let l=this.context.domain?.trim();if(l&&l.length>0)return l;let r=this.context.identity.getProfile().name;return r.length>0?r:void 0}}function S_(l,r={}){let{frontmatter:f,content:i}=X1(l.content),n=typeof f.title==="string"?f.title:l.metadata.title,u=typeof f.event==="string"&&f.event.length>0?f.event:void 0,t=i.split(/^---$/gm).map((o)=>o.trim()).filter((o)=>o.length>0).map((o)=>({markdown:o}));return{title:n,slides:t,...r.brandLabel?{brandLabel:r.brandLabel}:{},...u?{eyebrow:u}:{}}}function D_(l){let r=l.metadata.slug;return r.length>0?r:Cl(l.metadata.title)}import{jsxDEV as E_}from"preact/jsx-dev-runtime";var Z5="og-image",x_="decks:og-image",TW=c.object({title:c.string().min(1),description:c.string().optional(),event:c.string().optional(),brandLabel:c.string().optional(),slideCount:c.number().int().positive().optional(),coverImageUrl:c.string().optional()}),LW={name:x_,pluginId:"decks",schema:TW,renderers:{image:j_}};function j_(l){let r=TW.parse(l),f=r.slideCount?`${r.slideCount} slide${r.slideCount===1?"":"s"}`:void 0;return E_(Au,{brandLabel:r.brandLabel??r.title,eyebrow:"Deck",title:r.title,subtitle:r.description,meta:[r.event],tag:f},void 0,!1,void 0,this)}class R4{metadata={outputEntityType:"image",targetField:"ogImageId"};context;deps;constructor(l,r={}){this.context=l,this.deps=r}async resolve(l){if(l.sourceEntityType!=="deck"||l.attachmentType!==Z5)return;let r=await this.context.entityService.getEntity({entityType:"deck",id:l.sourceEntityId});if(!r)return;let{frontmatter:f,content:i}=X1(r.content),n=Y1.parse(f),u=s_(i),t=this.resolveBrandLabel(),o=await this.resolveCoverImageUrl(n.coverImageId),w={title:n.title,...n.description?{description:n.description}:{},...n.event?{event:n.event}:{},...u?{slideCount:u}:{},...o?{coverImageUrl:o}:{},...t?{brandLabel:t}:{}};return{type:"image",data:await w4({mediaPath:`/_media/og/deck/${r.id}`,template:LW,content:w,title:w.title,themeMode:"dark",themeCSS:this.context.themeCSS,tmpPrefix:"brain-deck-og-image-",...this.deps.screenshotPng&&{screenshotPng:this.deps.screenshotPng}}),mimeType:"image/png",filename:`${C_(r)}-og.png`}}resolveBrandLabel(){let l=this.context.domain?.trim();if(l&&l.length>0)return l;let r=this.context.identity.getProfile().name.trim();return r.length>0?r:void 0}async resolveCoverImageUrl(l){if(!l)return;let r=await this.context.entityService.getEntity({entityType:"image",id:l});return r?.content.startsWith("data:image/")?r.content:void 0}}function s_(l){return l.split(/^---$/gm).map((r)=>r.trim()).filter((r)=>r.length>0).length}function C_(l){let r=l.metadata.slug;return r.length>0?r:Cl(l.metadata.title)}async function PW({entity:l,config:r}){let f=zn.parse(l),i=Rl(f.content,Y1),n=i.metadata;return{$type:"ai.rizom.brain.deck",title:n.title,...n.slug&&{slug:n.slug},...n.description&&{description:n.description},body:i.content,format:"text/markdown",...n.author&&{author:n.author},...n.event&&{event:n.event},...n.publishedAt&&{publishedAt:n.publishedAt},...r.brainDid&&{brainDid:r.brainDid},...r.anchorDid&&{anchorDid:r.anchorDid},sourceEntityType:"deck",sourceEntityId:f.id,createdAt:f.created,...f.updated&&{updatedAt:f.updated}}}function T4(){return{entityType:"deck",collection:"ai.rizom.brain.deck",lexicon:gr["ai.rizom.brain.deck"],validate:!1,buildRecord:PW}}var pW={name:"@brains/decks",version:"0.2.0-alpha.239",description:"Presentation decks plugin for creating and viewing slide presentations",dependencies:{"@brains/atproto-contracts":"workspace:*","@brains/content-formatters":"workspace:*","@brains/contracts":"workspace:*","@brains/image":"workspace:*","@brains/media-page-composer":"workspace:*","@brains/media-renderer":"workspace:*","@brains/plugins":"workspace:*","@brains/site-info":"workspace:*","@brains/style-guide":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*"},devDependencies:{"@brains/app":"workspace:*","@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"^1.3.14","bun-types":"^1.3.14",eslint:"^10.5.0",typescript:"^7.0.2"},exports:{".":"./src/index.ts"},private:!0,scripts:{eval:"cd evals && bun run brain-eval",lint:"eslint . --max-warnings 0","lint:fix":"eslint . --max-warnings 0 --fix",test:"bun test",typecheck:"tsc --noEmit"},type:"module"};var lS=c.object({prompt:c.string(),event:c.string().optional()}),rS=c.object({title:c.string(),content:c.string()});class MW extends Ni{deps;entityType=bt.entityType;schema=bt.schema;adapter=bt;unregisterCarouselAttachmentProvider;unregisterOgImageAttachmentProvider;unregisterAtprotoProjection;constructor(l={}){super("decks",pW,{},_t);this.deps=l}createGenerationHandler(l){return new F4(this.logger.child("DeckGenerationJobHandler"),l)}getTemplates(){return{"deck-detail":O4,"deck-list":Q4,generation:OW,description:XW}}getDataSources(){return[new a4(this.logger)]}getEntityTypeConfig(){return{weight:1.5,projectionSourceRole:"primary"}}async onRegister(l){this.deferPublishRegistration(l),this.subscribeToPublishExecute(l),this.registerCarouselAttachmentProvider(l),this.registerOgImageAttachmentProvider(l),this.registerEvalHandlers(l),this.unregisterAtprotoProjection=of.getInstance().register(T4()),this.logger.info("Decks plugin registered")}async onShutdown(){this.unregisterCarouselAttachmentProvider?.(),this.unregisterCarouselAttachmentProvider=void 0,this.unregisterOgImageAttachmentProvider?.(),this.unregisterOgImageAttachmentProvider=void 0,this.unregisterAtprotoProjection?.(),this.unregisterAtprotoProjection=void 0}deferPublishRegistration(l){l.messaging.subscribe(qf.pluginsRegistered,async()=>{return await l.messaging.send({type:pr.register,payload:{entityType:"deck",provider:{name:"internal",publish:async()=>({id:"internal"})},config:{executionMode:"provider"}}}),{success:!0}})}subscribeToPublishExecute(l){l.messaging.subscribe(pr.execute,async(r)=>{let{entityType:f,entityId:i}=r.payload;if(f!=="deck")return{success:!0};try{let n=await l.entityService.getEntity({entityType:"deck",id:i});if(!n)return await l.messaging.send({type:pr.reportFailure,payload:{entityType:f,entityId:i,error:`Deck not found: ${i}`}}),{success:!0};if(n.metadata.status==="published")return{success:!0};let u=new Date().toISOString(),t={...n,metadata:{...n.metadata,status:"published",publishedAt:u}};await l.entityService.updateEntity({entity:{...t,content:this.adapter.toMarkdown(t)}}),await l.messaging.send({type:pr.reportSuccess,payload:{entityType:f,entityId:i,result:{id:i}}})}catch(n){await l.messaging.send({type:pr.reportFailure,payload:{entityType:f,entityId:i,error:wn(n)}})}return{success:!0}})}registerCarouselAttachmentProvider(l){let r={...this.deps,getThemeMode:this.deps.getThemeMode??(async()=>{try{return(await _f(l.entityService)).themeMode??"dark"}catch{return"dark"}})};this.unregisterCarouselAttachmentProvider=l.attachments.register("deck",aW,new N4(l,r))}registerOgImageAttachmentProvider(l){this.unregisterOgImageAttachmentProvider=l.attachments.register("deck",Z5,new R4(l))}registerEvalHandlers(l){l.eval.registerHandler("generateDeck",async(r)=>{let f=lS.parse(r),i=F1(await a1(l.entityService));return l.ai.generate({prompt:`${f.prompt}${f.event?`
1679
1679
 
1680
1680
  Note: This presentation is for "${f.event}".`:""}`,templateName:"decks:generation",representedIdentity:"anchor",...i&&{styleGuide:{voice:i}}})}),l.eval.registerHandler("generateDescription",async(r)=>{let f=rS.parse(r);return l.ai.generate({prompt:`Title: ${f.title}
1681
1681
 
1682
1682
  Content:
1683
- ${f.content}`,templateName:"decks:description",representedIdentity:"none"})})}}class O5{postsListUrl;decksListUrl;id="professional:homepage-list";name="Homepage List DataSource";description="Fetches profile, blog posts, and presentation decks for homepage";constructor(l,r){this.postsListUrl=l,this.decksListUrl=r}async fetch(l,r,f){let i=f.entityService,[n,u,t,o]=await Promise.all([H1(i,$t),Ri(i,{entityType:"post",count:3,parse:Sf}),Ri(i,{entityType:"deck",count:3,parse:dt}),_f(i)]),w={profile:n,posts:u,decks:t,postsListUrl:this.postsListUrl,decksListUrl:this.decksListUrl,cta:pn(o.cta),sections:o.sections??{}};return r.parse(w)}}class X5{id="professional:about";name="About Page DataSource";description="Fetches full profile data for the about page";async fetch(l,r,f){let n={profile:await H1(f.entityService,$t)};return r.parse(n)}}import{jsxDEV as Kl,Fragment as nS}from"preact/jsx-dev-runtime";var fS="grid md:grid-cols-[14rem_1px_1fr] gap-y-2 gap-x-0 md:gap-16 items-start",iS="border-t md:border-t-0 md:border-l border-rule-strong md:self-stretch",L4=({number:l,title:r,blurb:f,children:i})=>Kl("section",{className:"py-20 border-b border-rule px-6 md:px-12",children:Kl("div",{className:"max-w-6xl mx-auto",children:Kl("div",{className:fS,children:[Kl(h3,{title:r,number:l,blurb:f},void 0,!1,void 0,this),Kl("div",{className:iS,"aria-hidden":"true"},void 0,!1,void 0,this),Kl("div",{className:"mt-6 md:mt-0",children:i},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),P4=({profile:l,posts:r,decks:f,postsListUrl:i,decksListUrl:n,cta:u,sections:t})=>{let o=l.tagline?.length?l.tagline:l.description,w=r.map((d)=>({id:d.id,url:d.url,title:d.metadata.title,date:d.metadata.publishedAt??d.created,description:d.frontmatter.excerpt,series:d.frontmatter.seriesName&&d.frontmatter.seriesIndex?{name:d.frontmatter.seriesName,index:d.frontmatter.seriesIndex}:void 0})),v=f.map((d)=>({id:d.id,url:d.url,title:d.frontmatter.title||d.id,date:d.frontmatter.publishedAt??d.created,description:d.frontmatter.description})),k=l.name||"Home",$=[l.intro,l.description,o].find((d)=>d)??"Professional site",b=Boolean(l.description)||l.expertise!==void 0&&l.expertise.length>0;return Kl(nS,{children:[Kl(Pl,{title:k,description:$,ogType:"website"},void 0,!1,void 0,this),Kl("div",{className:"homepage-list bg-theme",children:[Kl("header",{className:"hero-bg-pattern relative w-full px-6 md:px-12 pt-28 pb-24 md:pt-28 md:pb-24 overflow-hidden border-b border-rule",children:Kl("div",{className:"relative z-10 max-w-6xl mx-auto w-full",children:[l.name&&Kl("div",{className:"flex items-center gap-[0.6rem] mb-6 font-mono text-[0.7rem] font-medium uppercase tracking-[0.22em] text-accent",children:[Kl("span",{className:"w-[18px] h-px bg-accent","aria-hidden":"true"},void 0,!1,void 0,this),Kl("span",{children:l.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this),o&&Kl("h1",{className:"font-heading text-[clamp(2.75rem,6.5vw,5.5rem)] font-normal text-heading leading-[1.02] tracking-[-0.025em] max-w-[18ch] [font-variation-settings:'opsz'_144,'SOFT'_30]",children:nh(o,"italic font-normal text-accent [font-variation-settings:'opsz'_144,'SOFT'_80]")},void 0,!1,void 0,this),l.intro&&Kl("p",{className:"font-heading font-light text-[clamp(1.1rem,1.8vw,1.4rem)] leading-[1.5] text-theme-muted max-w-[42ch] mt-8 [font-variation-settings:'opsz'_24]",children:nh(l.intro,"italic text-accent")},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),Kl(L4,{number:"01",title:"Essays",blurb:t.essays?.blurb,children:Kl(ih,{items:w,viewAllUrl:i,viewAllLabel:"View all essays"},void 0,!1,void 0,this)},void 0,!1,void 0,this),v.length>0&&Kl(L4,{number:"02",title:"Presentations",blurb:t.presentations?.blurb,children:Kl(ih,{items:v,viewAllUrl:n,viewAllLabel:"View all presentations"},void 0,!1,void 0,this)},void 0,!1,void 0,this),b&&Kl(L4,{number:"03",title:"About",blurb:t.about?.blurb,children:Kl("div",{className:"flex flex-col gap-8",children:[l.description&&Kl("p",{className:"font-heading font-light text-[1.25rem] leading-[1.55] text-theme max-w-[55ch] [font-variation-settings:'opsz'_24,'SOFT'_50]",children:l.description},void 0,!1,void 0,this),l.expertise&&l.expertise.length>0&&Kl(o3,{subjects:l.expertise},void 0,!1,void 0,this),Kl("a",{href:"/about",className:"mt-6 inline-flex items-center gap-2 font-mono text-[0.7rem] font-medium uppercase tracking-[0.18em] text-accent pb-1 relative before:content-[''] before:absolute before:left-0 before:right-full before:bottom-0 before:h-px before:bg-accent before:transition-[right] before:duration-300 hover:before:right-0",children:["Learn more",Kl("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),Kl(sw,{cta:u,variant:"editorial",socialLinks:l.socialLinks},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as kl,Fragment as uS}from"preact/jsx-dev-runtime";var p4=({profile:l})=>{let r=`About ${l.name||"Me"}`,f=[l.description,l.intro].find((n)=>n)??"About page",i=l.expertise!==void 0&&l.expertise.length>0||Boolean(l.currentFocus)||Boolean(l.availability)||Boolean(l.email)||Boolean(l.website)||l.socialLinks!==void 0&&l.socialLinks.length>0;return kl(uS,{children:[kl(Pl,{title:r,description:f,ogType:"profile"},void 0,!1,void 0,this),kl("div",{className:"about-page bg-theme",children:[kl("header",{className:"hero-bg-pattern relative w-full py-16 md:py-24 px-6 md:px-12 bg-theme overflow-hidden",children:kl("div",{className:"relative z-10 max-w-4xl mx-auto",children:[kl("h1",{className:"text-5xl md:text-6xl font-semibold mb-6 text-heading",children:["About ",l.name||"Me"]},void 0,!0,void 0,this),l.description&&kl("p",{className:"text-xl md:text-2xl text-theme-muted leading-relaxed",children:l.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),kl("div",{className:"container mx-auto px-6 md:px-12 max-w-4xl py-12 md:py-16",children:[l.story&&kl("section",{className:"content-section-reveal mb-20 md:mb-28",children:kl(q1,{markdown:l.story},void 0,!1,void 0,this)},void 0,!1,void 0,this),i&&kl("div",{className:"content-section-reveal grid md:grid-cols-2 gap-x-16 gap-y-12",children:[l.expertise&&l.expertise.length>0&&kl("section",{children:[kl("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Expertise"},void 0,!1,void 0,this),kl("ul",{className:"flex flex-wrap gap-3",children:l.expertise.map((n,u)=>kl("li",{className:i3({variant:"accent",size:"lg"}),children:n},u,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.currentFocus&&kl("section",{children:[kl("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Current Focus"},void 0,!1,void 0,this),kl("p",{className:"text-lg text-theme leading-relaxed",children:l.currentFocus},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.availability&&kl("section",{children:[kl("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Availability"},void 0,!1,void 0,this),kl("p",{className:"text-lg text-theme leading-relaxed",children:l.availability},void 0,!1,void 0,this)]},void 0,!0,void 0,this),(Boolean(l.email)||Boolean(l.website)||l.socialLinks!==void 0&&l.socialLinks.length>0)&&kl("section",{children:[kl("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Contact"},void 0,!1,void 0,this),kl("div",{className:"space-y-4",children:[l.email&&kl("p",{className:"text-lg",children:kl("a",{href:`mailto:${l.email}`,className:"text-brand hover:text-brand-dark transition-colors",children:l.email},void 0,!1,void 0,this)},void 0,!1,void 0,this),l.website&&kl("p",{className:"text-lg",children:kl("a",{href:l.website,target:"_blank",rel:"noopener noreferrer",className:"text-brand hover:text-brand-dark transition-colors",children:l.website},void 0,!1,void 0,this)},void 0,!1,void 0,this),l.socialLinks&&l.socialLinks.length>0&&kl("div",{className:"flex flex-wrap gap-4 mt-4",children:l.socialLinks.map((n,u)=>kl(Vr,{href:n.url,external:!0,variant:"secondary",size:"md",children:n.label?.length?n.label:n.platform},u,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as $r,Fragment as VW}from"preact/jsx-dev-runtime";var M4=()=>{return $r(VW,{children:[$r(Pl,{title:"Thanks for subscribing!",description:"You've successfully subscribed to the newsletter."},void 0,!1,void 0,this),$r("div",{className:"min-h-[60vh] flex items-center justify-center px-6",children:$r("div",{className:"text-center max-w-md",children:[$r("div",{className:"text-6xl mb-6",children:"\uD83C\uDF89"},void 0,!1,void 0,this),$r("h1",{className:"text-3xl font-semibold mb-4 text-heading",children:"Thanks for subscribing!"},void 0,!1,void 0,this),$r("p",{className:"text-lg text-theme-muted mb-8",children:"You'll receive a confirmation email shortly. Check your inbox to confirm your subscription."},void 0,!1,void 0,this),$r(Vr,{href:"/",variant:"primary",children:"Back to Home"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},V4=()=>{return $r(VW,{children:[$r(Pl,{title:"Subscription failed",description:"There was a problem with your subscription."},void 0,!1,void 0,this),$r("div",{className:"min-h-[60vh] flex items-center justify-center px-6",children:$r("div",{className:"text-center max-w-md",children:[$r("div",{className:"text-6xl mb-6",children:"\uD83D\uDE22"},void 0,!1,void 0,this),$r("h1",{className:"text-3xl font-semibold mb-4 text-heading",children:"Something went wrong"},void 0,!1,void 0,this),$r("p",{className:"text-lg text-theme-muted mb-8",children:"We couldn't process your subscription. Please try again or contact us if the problem persists."},void 0,!1,void 0,this),$r(Vr,{href:"/",variant:"primary",children:"Back to Home"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)};var IW=c.object({label:c.string().describe("Display label for entity type (e.g., 'Essay')"),pluralName:c.string().optional().describe("URL path segment (defaults to label.toLowerCase() + 's')")}),tS={post:{label:"Post"},deck:{label:"Deck"}},qW=c.object({entityDisplay:c.object({post:IW,deck:IW}).default(tS).describe("Display metadata for post and deck entity types used by the homepage")});var _W={name:"@brains/site-professional",version:"0.2.0-alpha.237",description:"Professional site composition package",dependencies:{"@brains/blog":"workspace:*","@brains/decks":"workspace:*","@brains/plugins":"workspace:*","@brains/profile":"workspace:*","@brains/site-composition":"workspace:*","@brains/site-engine":"workspace:*","@brains/site-info":"workspace:*","@brains/templates":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*",preact:"^10.27.2"},devDependencies:{"@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"^1.3.14","bun-types":"^1.3.14",eslint:"^10.5.0",typescript:"^7.0.2"},exports:{".":"./src/index.ts"},files:["src"],private:!0,scripts:{lint:"eslint . --max-warnings 0","lint:fix":"eslint . --max-warnings 0 --fix",typecheck:"tsc --noEmit"},type:"module"};var oS=c.object({blurb:c.string().optional().describe("Short italic subtitle under the section title")}),wS=c.object({heading:c.string(),buttonText:c.string(),buttonLink:c.string()}),vS=c.looseObject({id:c.string(),entityType:c.literal("post"),content:c.string(),created:c.string(),updated:c.string(),contentHash:c.string(),metadata:c.looseObject({title:c.string(),publishedAt:c.string().optional()}),frontmatter:c.looseObject({excerpt:c.string(),seriesName:c.string().optional(),seriesIndex:c.number().optional()}),body:c.string(),url:c.string().optional(),typeLabel:c.string().optional(),listUrl:c.string().optional(),listLabel:c.string().optional(),seriesUrl:c.string().optional(),coverImageUrl:c.string().optional(),ogImageUrl:c.string().optional(),coverImageWidth:c.number().optional(),coverImageHeight:c.number().optional(),coverImageSrcset:c.string().optional(),coverImageSizes:c.string().optional()}),mS=c.looseObject({id:c.string(),entityType:c.literal("deck"),content:c.string(),created:c.string(),updated:c.string(),contentHash:c.string(),metadata:c.looseObject({title:c.string(),publishedAt:c.string().optional()}),frontmatter:c.looseObject({title:c.string(),description:c.string().optional(),publishedAt:c.string().optional()}),body:c.string(),url:c.string().optional(),typeLabel:c.string().optional(),listUrl:c.string().optional(),listLabel:c.string().optional(),coverImageUrl:c.string().optional(),ogImageUrl:c.string().optional(),coverImageWidth:c.number().optional(),coverImageHeight:c.number().optional()});class I4 extends Pn{dependencies=["blog","decks"];constructor(l){super("professional-site",_W,l,qW)}async onRegister(l){let r=this.config.entityDisplay.post,f=this.config.entityDisplay.deck,i=`/${r.pluralName??r.label.toLowerCase()+"s"}`,n=`/${f.pluralName??f.label.toLowerCase()+"s"}`,u=new O5(i,n);l.entities.registerDataSource(u);let t=new X5;l.entities.registerDataSource(t);let o=c.object({profile:If,posts:c.array(vS),decks:c.array(mS),postsListUrl:c.string(),decksListUrl:c.string(),cta:wS,sections:c.record(c.string(),oS)}),w=c.object({profile:If}),v=c.object({});l.templates.register({"homepage-list":Jl({name:"homepage-list",description:"Professional homepage with essays and presentations",schema:o,dataSourceId:"professional:homepage-list",requiredPermission:"public",layout:{component:P4}}),about:Jl({name:"about",description:"About page with full profile information",schema:w,dataSourceId:"professional:about",requiredPermission:"public",layout:{component:p4}}),"subscribe-thanks":Jl({name:"subscribe-thanks",description:"Newsletter subscription success page",schema:v,requiredPermission:"public",layout:{component:M4}}),"subscribe-error":Jl({name:"subscribe-error",description:"Newsletter subscription error page",schema:v,requiredPermission:"public",layout:{component:V4}})}),this.logger.info("Professional site plugin registered successfully")}async getTools(){return[]}async getResources(){return[]}}function q4(l){return new I4(l??{})}var _4=[{id:"home",path:"/",title:"Home",description:"Professional site homepage",layout:"default",navigation:{show:!0,label:"Home",slot:"secondary",priority:10},sections:[{id:"homepage",template:"professional-site:homepage-list",dataQuery:{}}]},{id:"about",path:"/about",title:"About",description:"About page",layout:"default",navigation:{show:!0,label:"About",slot:"primary",priority:90},sections:[{id:"about",template:"professional-site:about",dataQuery:{}}]},{id:"subscribe-thanks",path:"/subscribe/thanks",title:"Thanks for subscribing",description:"Newsletter subscription confirmation",layout:"default",navigation:{show:!1},sections:[{id:"subscribe-thanks",template:"professional-site:subscribe-thanks",dataQuery:{},content:{}}]},{id:"subscribe-error",path:"/subscribe/error",title:"Subscription failed",description:"Newsletter subscription error",layout:"default",navigation:{show:!1},sections:[{id:"subscribe-error",template:"professional-site:subscribe-error",dataQuery:{},content:{}}]}];import{jsxDEV as Y5}from"preact/jsx-dev-runtime";function S4({sections:l,siteInfo:r,slots:f,wordmark:i}){return Y5("div",{className:"flex flex-col min-h-screen bg-theme overflow-x-clip",children:[Y5(cu,{title:r.title,navigation:r.navigation.primary,showThemeToggle:!0,...r.logo!==void 0?{logo:r.logo}:{},...i!==void 0?{wordmark:i}:{}},void 0,!1,void 0,this),Y5("main",{className:"flex-grow flex flex-col bg-theme",children:l},void 0,!1,void 0,this),Y5(l3,{primaryNavigation:r.navigation.primary,secondaryNavigation:r.navigation.secondary,copyright:r.copyright,socialLinks:r.socialLinks,title:r.title,tagline:r.description,children:f?.getSlot("footer-top").map((n)=>n.render())},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function SW(l){return l}var I30=c4;function q30(l){return SW(d4(l))}var kS=g4,_30=kS,S30=S4;function D30(l){return SW(q4(l))}var x30=_4;export{kS as routes,D30 as professionalSitePlugin,x30 as professionalRoutes,q30 as personalSitePlugin,_30 as personalRoutes,S30 as ProfessionalLayout,I30 as PersonalLayout};
1683
+ ${f.content}`,templateName:"decks:description",representedIdentity:"none"})})}}class O5{postsListUrl;decksListUrl;id="professional:homepage-list";name="Homepage List DataSource";description="Fetches profile, blog posts, and presentation decks for homepage";constructor(l,r){this.postsListUrl=l,this.decksListUrl=r}async fetch(l,r,f){let i=f.entityService,[n,u,t,o]=await Promise.all([H1(i,Ff),Ri(i,{entityType:"post",count:3,parse:Sf}),Ri(i,{entityType:"deck",count:3,parse:yt}),_f(i)]),w={profile:n,posts:u,decks:t,postsListUrl:this.postsListUrl,decksListUrl:this.decksListUrl,cta:pn(o.cta),sections:o.sections??{}};return r.parse(w)}}class X5{id="professional:about";name="About Page DataSource";description="Fetches full profile data for the about page";async fetch(l,r,f){let n={profile:await H1(f.entityService,Ff)};return r.parse(n)}}import{jsxDEV as Kl,Fragment as nS}from"preact/jsx-dev-runtime";var fS="grid md:grid-cols-[14rem_1px_1fr] gap-y-2 gap-x-0 md:gap-16 items-start",iS="border-t md:border-t-0 md:border-l border-rule-strong md:self-stretch",L4=({number:l,title:r,blurb:f,children:i})=>Kl("section",{className:"py-20 border-b border-rule px-6 md:px-12",children:Kl("div",{className:"max-w-6xl mx-auto",children:Kl("div",{className:fS,children:[Kl(h3,{title:r,number:l,blurb:f},void 0,!1,void 0,this),Kl("div",{className:iS,"aria-hidden":"true"},void 0,!1,void 0,this),Kl("div",{className:"mt-6 md:mt-0",children:i},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),P4=({profile:l,posts:r,decks:f,postsListUrl:i,decksListUrl:n,cta:u,sections:t})=>{let o=l.tagline?.length?l.tagline:l.description,w=r.map((d)=>({id:d.id,url:d.url,title:d.metadata.title,date:d.metadata.publishedAt??d.created,description:d.frontmatter.excerpt,series:d.frontmatter.seriesName&&d.frontmatter.seriesIndex?{name:d.frontmatter.seriesName,index:d.frontmatter.seriesIndex}:void 0})),v=f.map((d)=>({id:d.id,url:d.url,title:d.frontmatter.title||d.id,date:d.frontmatter.publishedAt??d.created,description:d.frontmatter.description})),k=l.name||"Home",$=[l.intro,l.description,o].find((d)=>d)??"Professional site",b=Boolean(l.description)||l.expertise!==void 0&&l.expertise.length>0;return Kl(nS,{children:[Kl(Pl,{title:k,description:$,ogType:"website"},void 0,!1,void 0,this),Kl("div",{className:"homepage-list bg-theme",children:[Kl("header",{className:"hero-bg-pattern relative w-full px-6 md:px-12 pt-28 pb-24 md:pt-28 md:pb-24 overflow-hidden border-b border-rule",children:Kl("div",{className:"relative z-10 max-w-6xl mx-auto w-full",children:[l.name&&Kl("div",{className:"flex items-center gap-[0.6rem] mb-6 font-mono text-[0.7rem] font-medium uppercase tracking-[0.22em] text-accent",children:[Kl("span",{className:"w-[18px] h-px bg-accent","aria-hidden":"true"},void 0,!1,void 0,this),Kl("span",{children:l.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this),o&&Kl("h1",{className:"font-heading text-[clamp(2.75rem,6.5vw,5.5rem)] font-normal text-heading leading-[1.02] tracking-[-0.025em] max-w-[18ch] [font-variation-settings:'opsz'_144,'SOFT'_30]",children:nh(o,"italic font-normal text-accent [font-variation-settings:'opsz'_144,'SOFT'_80]")},void 0,!1,void 0,this),l.intro&&Kl("p",{className:"font-heading font-light text-[clamp(1.1rem,1.8vw,1.4rem)] leading-[1.5] text-theme-muted max-w-[42ch] mt-8 [font-variation-settings:'opsz'_24]",children:nh(l.intro,"italic text-accent")},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),Kl(L4,{number:"01",title:"Essays",blurb:t.essays?.blurb,children:Kl(ih,{items:w,viewAllUrl:i,viewAllLabel:"View all essays"},void 0,!1,void 0,this)},void 0,!1,void 0,this),v.length>0&&Kl(L4,{number:"02",title:"Presentations",blurb:t.presentations?.blurb,children:Kl(ih,{items:v,viewAllUrl:n,viewAllLabel:"View all presentations"},void 0,!1,void 0,this)},void 0,!1,void 0,this),b&&Kl(L4,{number:"03",title:"About",blurb:t.about?.blurb,children:Kl("div",{className:"flex flex-col gap-8",children:[l.description&&Kl("p",{className:"font-heading font-light text-[1.25rem] leading-[1.55] text-theme max-w-[55ch] [font-variation-settings:'opsz'_24,'SOFT'_50]",children:l.description},void 0,!1,void 0,this),l.expertise&&l.expertise.length>0&&Kl(o3,{subjects:l.expertise},void 0,!1,void 0,this),Kl("a",{href:"/about",className:"mt-6 inline-flex items-center gap-2 font-mono text-[0.7rem] font-medium uppercase tracking-[0.18em] text-accent pb-1 relative before:content-[''] before:absolute before:left-0 before:right-full before:bottom-0 before:h-px before:bg-accent before:transition-[right] before:duration-300 hover:before:right-0",children:["Learn more",Kl("span",{"aria-hidden":"true",children:"\u2192"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),Kl(sw,{cta:u,variant:"editorial",socialLinks:l.socialLinks},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as kl,Fragment as uS}from"preact/jsx-dev-runtime";var p4=({profile:l})=>{let r=`About ${l.name||"Me"}`,f=[l.description,l.intro].find((n)=>n)??"About page",i=l.expertise!==void 0&&l.expertise.length>0||Boolean(l.currentFocus)||Boolean(l.availability)||Boolean(l.email)||Boolean(l.website)||l.socialLinks!==void 0&&l.socialLinks.length>0;return kl(uS,{children:[kl(Pl,{title:r,description:f,ogType:"profile"},void 0,!1,void 0,this),kl("div",{className:"about-page bg-theme",children:[kl("header",{className:"hero-bg-pattern relative w-full py-16 md:py-24 px-6 md:px-12 bg-theme overflow-hidden",children:kl("div",{className:"relative z-10 max-w-4xl mx-auto",children:[kl("h1",{className:"text-5xl md:text-6xl font-semibold mb-6 text-heading",children:["About ",l.name||"Me"]},void 0,!0,void 0,this),l.description&&kl("p",{className:"text-xl md:text-2xl text-theme-muted leading-relaxed",children:l.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),kl("div",{className:"container mx-auto px-6 md:px-12 max-w-4xl py-12 md:py-16",children:[l.story&&kl("section",{className:"content-section-reveal mb-20 md:mb-28",children:kl(q1,{markdown:l.story},void 0,!1,void 0,this)},void 0,!1,void 0,this),i&&kl("div",{className:"content-section-reveal grid md:grid-cols-2 gap-x-16 gap-y-12",children:[l.expertise&&l.expertise.length>0&&kl("section",{children:[kl("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Expertise"},void 0,!1,void 0,this),kl("ul",{className:"flex flex-wrap gap-3",children:l.expertise.map((n,u)=>kl("li",{className:i3({variant:"accent",size:"lg"}),children:n},u,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.currentFocus&&kl("section",{children:[kl("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Current Focus"},void 0,!1,void 0,this),kl("p",{className:"text-lg text-theme leading-relaxed",children:l.currentFocus},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l.availability&&kl("section",{children:[kl("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Availability"},void 0,!1,void 0,this),kl("p",{className:"text-lg text-theme leading-relaxed",children:l.availability},void 0,!1,void 0,this)]},void 0,!0,void 0,this),(Boolean(l.email)||Boolean(l.website)||l.socialLinks!==void 0&&l.socialLinks.length>0)&&kl("section",{children:[kl("h2",{className:"text-sm tracking-widest uppercase text-theme-muted mb-6",children:"Contact"},void 0,!1,void 0,this),kl("div",{className:"space-y-4",children:[l.email&&kl("p",{className:"text-lg",children:kl("a",{href:`mailto:${l.email}`,className:"text-brand hover:text-brand-dark transition-colors",children:l.email},void 0,!1,void 0,this)},void 0,!1,void 0,this),l.website&&kl("p",{className:"text-lg",children:kl("a",{href:l.website,target:"_blank",rel:"noopener noreferrer",className:"text-brand hover:text-brand-dark transition-colors",children:l.website},void 0,!1,void 0,this)},void 0,!1,void 0,this),l.socialLinks&&l.socialLinks.length>0&&kl("div",{className:"flex flex-wrap gap-4 mt-4",children:l.socialLinks.map((n,u)=>kl(Vr,{href:n.url,external:!0,variant:"secondary",size:"md",children:n.label?.length?n.label:n.platform},u,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)};import{jsxDEV as $r,Fragment as VW}from"preact/jsx-dev-runtime";var M4=()=>{return $r(VW,{children:[$r(Pl,{title:"Thanks for subscribing!",description:"You've successfully subscribed to the newsletter."},void 0,!1,void 0,this),$r("div",{className:"min-h-[60vh] flex items-center justify-center px-6",children:$r("div",{className:"text-center max-w-md",children:[$r("div",{className:"text-6xl mb-6",children:"\uD83C\uDF89"},void 0,!1,void 0,this),$r("h1",{className:"text-3xl font-semibold mb-4 text-heading",children:"Thanks for subscribing!"},void 0,!1,void 0,this),$r("p",{className:"text-lg text-theme-muted mb-8",children:"You'll receive a confirmation email shortly. Check your inbox to confirm your subscription."},void 0,!1,void 0,this),$r(Vr,{href:"/",variant:"primary",children:"Back to Home"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},V4=()=>{return $r(VW,{children:[$r(Pl,{title:"Subscription failed",description:"There was a problem with your subscription."},void 0,!1,void 0,this),$r("div",{className:"min-h-[60vh] flex items-center justify-center px-6",children:$r("div",{className:"text-center max-w-md",children:[$r("div",{className:"text-6xl mb-6",children:"\uD83D\uDE22"},void 0,!1,void 0,this),$r("h1",{className:"text-3xl font-semibold mb-4 text-heading",children:"Something went wrong"},void 0,!1,void 0,this),$r("p",{className:"text-lg text-theme-muted mb-8",children:"We couldn't process your subscription. Please try again or contact us if the problem persists."},void 0,!1,void 0,this),$r(Vr,{href:"/",variant:"primary",children:"Back to Home"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)};var IW=c.object({label:c.string().describe("Display label for entity type (e.g., 'Essay')"),pluralName:c.string().optional().describe("URL path segment (defaults to label.toLowerCase() + 's')")}),tS={post:{label:"Post"},deck:{label:"Deck"}},qW=c.object({entityDisplay:c.object({post:IW,deck:IW}).default(tS).describe("Display metadata for post and deck entity types used by the homepage")});var _W={name:"@brains/site-professional",version:"0.2.0-alpha.239",description:"Professional site composition package",dependencies:{"@brains/blog":"workspace:*","@brains/decks":"workspace:*","@brains/plugins":"workspace:*","@brains/profile":"workspace:*","@brains/site-composition":"workspace:*","@brains/site-engine":"workspace:*","@brains/site-info":"workspace:*","@brains/templates":"workspace:*","@brains/ui-library":"workspace:*","@brains/utils":"workspace:*",preact:"^10.27.2"},devDependencies:{"@brains/eslint-config":"workspace:*","@brains/typescript-config":"workspace:*","@types/bun":"^1.3.14","bun-types":"^1.3.14",eslint:"^10.5.0",typescript:"^7.0.2"},exports:{".":"./src/index.ts"},files:["src"],private:!0,scripts:{lint:"eslint . --max-warnings 0","lint:fix":"eslint . --max-warnings 0 --fix",typecheck:"tsc --noEmit"},type:"module"};var oS=c.object({blurb:c.string().optional().describe("Short italic subtitle under the section title")}),wS=c.object({heading:c.string(),buttonText:c.string(),buttonLink:c.string()}),vS=c.looseObject({id:c.string(),entityType:c.literal("post"),content:c.string(),created:c.string(),updated:c.string(),contentHash:c.string(),metadata:c.looseObject({title:c.string(),publishedAt:c.string().optional()}),frontmatter:c.looseObject({excerpt:c.string(),seriesName:c.string().optional(),seriesIndex:c.number().optional()}),body:c.string(),url:c.string().optional(),typeLabel:c.string().optional(),listUrl:c.string().optional(),listLabel:c.string().optional(),seriesUrl:c.string().optional(),coverImageUrl:c.string().optional(),ogImageUrl:c.string().optional(),coverImageWidth:c.number().optional(),coverImageHeight:c.number().optional(),coverImageSrcset:c.string().optional(),coverImageSizes:c.string().optional()}),mS=c.looseObject({id:c.string(),entityType:c.literal("deck"),content:c.string(),created:c.string(),updated:c.string(),contentHash:c.string(),metadata:c.looseObject({title:c.string(),publishedAt:c.string().optional()}),frontmatter:c.looseObject({title:c.string(),description:c.string().optional(),publishedAt:c.string().optional()}),body:c.string(),url:c.string().optional(),typeLabel:c.string().optional(),listUrl:c.string().optional(),listLabel:c.string().optional(),coverImageUrl:c.string().optional(),ogImageUrl:c.string().optional(),coverImageWidth:c.number().optional(),coverImageHeight:c.number().optional()});class I4 extends Pn{dependencies=["blog","decks"];constructor(l){super("professional-site",_W,l,qW)}async onRegister(l){let r=this.config.entityDisplay.post,f=this.config.entityDisplay.deck,i=`/${r.pluralName??r.label.toLowerCase()+"s"}`,n=`/${f.pluralName??f.label.toLowerCase()+"s"}`,u=new O5(i,n);l.entities.registerDataSource(u);let t=new X5;l.entities.registerDataSource(t);let o=c.object({profile:Ff,posts:c.array(vS),decks:c.array(mS),postsListUrl:c.string(),decksListUrl:c.string(),cta:wS,sections:c.record(c.string(),oS)}),w=c.object({profile:Ff}),v=c.object({});l.templates.register({"homepage-list":Jl({name:"homepage-list",description:"Professional homepage with essays and presentations",schema:o,dataSourceId:"professional:homepage-list",requiredPermission:"public",layout:{component:P4}}),about:Jl({name:"about",description:"About page with full profile information",schema:w,dataSourceId:"professional:about",requiredPermission:"public",layout:{component:p4}}),"subscribe-thanks":Jl({name:"subscribe-thanks",description:"Newsletter subscription success page",schema:v,requiredPermission:"public",layout:{component:M4}}),"subscribe-error":Jl({name:"subscribe-error",description:"Newsletter subscription error page",schema:v,requiredPermission:"public",layout:{component:V4}})}),this.logger.info("Professional site plugin registered successfully")}async getTools(){return[]}async getResources(){return[]}}function q4(l){return new I4(l??{})}var _4=[{id:"home",path:"/",title:"Home",description:"Professional site homepage",layout:"default",navigation:{show:!0,label:"Home",slot:"secondary",priority:10},sections:[{id:"homepage",template:"professional-site:homepage-list",dataQuery:{}}]},{id:"about",path:"/about",title:"About",description:"About page",layout:"default",navigation:{show:!0,label:"About",slot:"primary",priority:90},sections:[{id:"about",template:"professional-site:about",dataQuery:{}}]},{id:"subscribe-thanks",path:"/subscribe/thanks",title:"Thanks for subscribing",description:"Newsletter subscription confirmation",layout:"default",navigation:{show:!1},sections:[{id:"subscribe-thanks",template:"professional-site:subscribe-thanks",dataQuery:{},content:{}}]},{id:"subscribe-error",path:"/subscribe/error",title:"Subscription failed",description:"Newsletter subscription error",layout:"default",navigation:{show:!1},sections:[{id:"subscribe-error",template:"professional-site:subscribe-error",dataQuery:{},content:{}}]}];import{jsxDEV as Y5}from"preact/jsx-dev-runtime";function S4({sections:l,siteInfo:r,slots:f,wordmark:i}){return Y5("div",{className:"flex flex-col min-h-screen bg-theme overflow-x-clip",children:[Y5(cu,{title:r.title,navigation:r.navigation.primary,showThemeToggle:!0,...r.logo!==void 0?{logo:r.logo}:{},...i!==void 0?{wordmark:i}:{}},void 0,!1,void 0,this),Y5("main",{className:"flex-grow flex flex-col bg-theme",children:l},void 0,!1,void 0,this),Y5(l3,{primaryNavigation:r.navigation.primary,secondaryNavigation:r.navigation.secondary,copyright:r.copyright,socialLinks:r.socialLinks,title:r.title,tagline:r.description,children:f?.getSlot("footer-top").map((n)=>n.render())},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function SW(l){return l}var I30=c4;function q30(l){return SW(d4(l))}var kS=g4,_30=kS,S30=S4;function D30(l){return SW(q4(l))}var x30=_4;export{kS as routes,D30 as professionalSitePlugin,x30 as professionalRoutes,q30 as personalSitePlugin,_30 as personalRoutes,S30 as ProfessionalLayout,I30 as PersonalLayout};
1684
1684
 
1685
- //# debugId=05AAB2685035D1AF64756E2164756E21
1685
+ //# debugId=2B772A61845E4E1664756E2164756E21
1686
1686
  //# sourceMappingURL=site.js.map