@pandacss/language-server 0.0.0-dev-20230712222223 → 0.0.0-dev-20230713091113
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/index.js +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -21116,7 +21116,7 @@ ${tn}`}vn.exports={isPragma:en,hasPragma:V,insertPragma:P}}}),Zp=Ca({"src/langua
|
|
|
21116
21116
|
${i.type!=="rule"&&o>0?`
|
|
21117
21117
|
`:""}${" ".repeat(e)}`),Kvn(r,e+1)})}function tqe(){return i=>{Kvn(i),i.first&&(i.first.raws.before="")}}tqe.postcssPlugin="panda-prettify";var Crr=[":link",":visited",":focus-within",":focus",":focus-visible",":hover",":active"],Nvn=i=>Crr.findIndex(r=>i.trim().includes(r))+1;function qRt(){let i=e=>{let r=[],o=[],u=[];e.each(d=>{switch(d.type){case"rule":{d.first?.type==="atrule"?u.push(d):o.push(d);break}case"atrule":{u.push(d);break}default:r.push(d)}}),o.sort((d,h)=>{let v=d.selectors.length?d.selectors[0]:d.selector,S=h.selectors.length?h.selectors[0]:h.selector;return Nvn(v)-Nvn(S)}),e.nodes=[...r,...o,...u],e.nodes.forEach(d=>{"nodes"in d&&i(d)})};return i}qRt.postcssPlugin="panda-sort-css";var Xvn=/(!?\(\s*min(-device-)?-width)(.|\n)+\(\s*max(-device)?-width/i,vrr=/\(\s*min(-device)?-width/i,Yvn=/(!?\(\s*max(-device)?-width)(.|\n)+\(\s*min(-device)?-width/i,brr=/\(\s*max(-device)?-width/i,MRt=lmt(Xvn,Yvn,vrr),Lvn=lmt(Yvn,Xvn,brr),Qvn=/(!?\(\s*min(-device)?-height)(.|\n)+\(\s*max(-device)?-height/i,Srr=/\(\s*min(-device)?-height/i,$vn=/(!?\(\s*max(-device)?-height)(.|\n)+\(\s*min(-device)?-height/i,xrr=/\(\s*max(-device)?-height/i,GRt=lmt(Qvn,$vn,Srr),Fvn=lmt($vn,Qvn,xrr),Ovn=/print/i,Rvn=/^print$/i,ZJe=Number.MAX_VALUE;function Mvn(i){let e=/(-?\d*\.?\d+)(ch|em|ex|px|rem)/.exec(i);if(e===null&&(MRt(i)||GRt(i))&&(e=/(\d)/.exec(i)),e==="0")return 0;if(e===null)return ZJe;let r=e[1];switch(e[2]){case"ch":r=parseFloat(r)*8.8984375;break;case"em":case"rem":r=parseFloat(r)*16;break;case"ex":r=parseFloat(r)*8.296875;break;case"px":r=parseFloat(r);break}return+r}function lmt(i,e,r){return function(o){return i.test(o)?!0:e.test(o)?!1:r.test(o)}}function Err(i,e){let r=Ovn.test(i),o=Rvn.test(i),u=Ovn.test(e),d=Rvn.test(e);return r&&u?!o&&d?1:o&&!d?-1:i.localeCompare(e):r?1:u?-1:null}function Trr(i={}){let{unitlessMqAlwaysFirst:e}=i;return function(o,u){let d=Err(o,u);if(d!==null)return d;let h=MRt(o)||GRt(o),v=Lvn(o)||Fvn(o),S=MRt(u)||GRt(u),k=Lvn(u)||Fvn(u);if(e&&(!h&&!v||!S&&!k))return!h&&!v&&!S&&!k?o.localeCompare(u):!S&&!k?1:-1;{if(h&&k)return-1;if(v&&S)return 1;let L=Mvn(o),z=Mvn(u);return L===ZJe&&z===ZJe?o.localeCompare(u):L===ZJe?1:z===ZJe?-1:L>z?v?-1:1:L<z?v?1:-1:o.localeCompare(u)}}}var Drr=Trr();function KRt(){let i=e=>{e.nodes.sort((r,o)=>u0({a:r,b:o}).with({a:{type:"atrule",name:"media"},b:{type:"atrule",name:"media"}},({a:u,b:d})=>Drr(u.params,d.params)).with({a:{type:"atrule",name:"media"},b:vE.any},()=>1).with({a:vE.any,b:{type:"atrule",name:"media"}},()=>-1).otherwise(()=>0)),e.nodes.forEach(r=>{"nodes"in r&&i(r)})};return i}KRt.postcssPlugin="panda-sort-mq";function cmt(i,e={}){let{minify:r=!1}=e,{css:o}=Z0([(0,zRt.default)(),JRt(),KRt(),(0,HRt.default)(),(0,zvn.default)(),qRt(),(0,Hvn.default)(),r?(0,Jvn.default)():tqe()]).process(i);return o}function Arr(i,e={}){let{token:r}=e,{css:o}=Z0([yrr(r)]).process(i);return o}function umt(i){let{css:e}=Z0([JRt(),(0,HRt.default)(),KRt(),qRt(),tqe()]).process(i);return e}function Zvn(i){let{css:e}=Z0([(0,zRt.default)(),tqe()]).process(i);return e}function e1n(i){let{css:e}=Z0([tqe()]).process(i);return e}function fmt(i,e){let r=eqe(i),o=eqe(e),u=r.nodes.filter(aue({type:"atrule",name:"layer",params:"utilities"}));return o.walkAtRules("layer",d=>{d.params==="utilities"&&u.forEach(h=>{d.append(h.nodes)})}),umt(o)}var krr=i=>{let e=i.map(r=>typeof r=="string"?r:r.source).join("|");return new RegExp(`^${e}$`)},wU={classNames:new Map,styles:new Map,configs:new Map},XRt=class{constructor(i={},e){this.recipes=i,this.context=e,this.assignRules()}rules=new Map;getPropKey=(i,e,r)=>`${i} (${e} = ${r})`;get separator(){return this.context?.utility.separator??"_"}getClassName=(i,e,r)=>`${i}--${e}${this.separator}${r}`;save=()=>{for(let[i,e]of Object.entries(this.recipes))this.assignRecipe(i,this.normalize(e))};assignRecipe=(i,e)=>{let r=Object.keys(e.variants??{}),o=e.jsx??[iF(i)],u=krr(o);wU.configs.set(i,{...this.getNames(i),jsx:o,name:i,variantKeys:r,variantKeyMap:Object.fromEntries(Object.entries(e.variants??{}).map(([d,h])=>[d,Object.keys(h)])),match:u,config:e,splitProps:d=>QKt(d,r)})};assignRules=()=>{if(this.context)for(let i of Object.keys(this.recipes))this.rules.set(i,this.createRule(i))};isEmpty=()=>wU.configs.size===0;getNames=GI(i=>({upperName:iF(i),dashName:kdt(i),jsxName:iF(i)}));getRecipe=GI(i=>wU.configs.get(i));getConfig=GI(i=>this.recipes[i]);find=GI(i=>this.details.find(e=>e.match.test(i)));filter=GI(i=>this.details.filter(e=>e.match.test(i)));get details(){return Array.from(wU.configs.values())}get nodes(){return this.details.map(({upperName:i,variantKeys:e,name:r,jsx:o,match:u})=>({type:"recipe",name:i,props:e,baseName:r,jsx:o,match:u}))}splitProps=(i,e)=>{let r=this.find(i);return r?r.splitProps(e):[{},e]};normalize=i=>{let{name:e,jsx:r=[iF(e)],base:o={},variants:u={},defaultVariants:d={},description:h="",compoundVariants:v=[]}=i,S={jsx:r,name:e,description:h,base:{},variants:{},defaultVariants:d,compoundVariants:v};S.base=this.serialize(o),wU.styles.set(e,S.base),wU.classNames.set(e,e);for(let[k,L]of Object.entries(u))for(let[z,te]of Object.entries(L)){let _e=this.getPropKey(e,k,z),Ae=this.getClassName(e,k,z),Ie=this.serialize(te);wU.styles.set(_e,Ie),wU.classNames.set(_e,Ae),(0,t1n.default)(S.variants,{[k]:{[z]:Ie}})}return S};serialize=i=>{if(!this.context)return i;let{utility:e,conditions:r}=this.context;return VRt(i,{utility:e,conditions:r})};getTransform=i=>(e,r)=>{if(r==="__ignore__")return{layer:"_base",className:wU.classNames.get(i),styles:wU.styles.get(i)??{}};let o=this.getPropKey(i,e,r);return{className:wU.classNames.get(o),styles:wU.styles.get(o)??{}}};createRule=i=>{if(!this.context)throw new Error("Can't create a rule without a context");let e=new omt({...this.context,transform:this.getTransform(i)});return e.layer="recipes",e};process=(i,e)=>{let{styles:r}=e,o=this.getRecipe(i);if(!o)return;let{name:u,defaultVariants:d={},base:h={}}=o.config,v=Object.assign({[u]:"__ignore__"},d,r);if(Object.keys(v).length===1&&Object.keys(h).length===0)return;this.rules.get(u)?.process({styles:v})};toCss=()=>this.context?this.context.root.toString():""},wrr=/\s&/g;function r1n(i){let e=new Set;(0,n1n.default)(o=>{o.each(u=>{let d=RRt(u.toString());u0(d).with({type:"parent-nesting"},()=>{e.add(u.toString().replace(wrr,"").trim())}).otherwise(()=>{})})}).processSync(i);let r=Array.from(e).join(", ").trim();return e.size>1?`:where(${r})`:r}var jdi=smt(),Gvn=(i,e)=>i.breakpoints.includes(e)?e:`_${e}`;function i1n(i){let{css:e=[],recipes:r={}}=i,o={css:[],recipes:[]};return u=>(e.forEach(d=>{let h=d.conditions||[];d.responsive&&h.push(...u.breakpoints),Object.entries(d.properties).forEach(([v,S])=>{S.flatMap(L=>L==="*"?u.getPropertyKeys(v):L).forEach(L=>{let z=h.reduce((te,_e)=>({base:L,...te,[Gvn(u,_e)]:L}),{});o.css.push({[v]:h.length?z:L})})})}),Object.entries(r).forEach(([d,h])=>{h.forEach(v=>{let S=v;S==="*"&&(S={conditions:[],responsive:!0,...u.getRecipeKeys(d)});let{conditions:k,responsive:L,...z}=S,te=k||[];L&&te.push(...u.breakpoints),Object.entries(z).forEach(([_e,Ae])=>{if(!Array.isArray(Ae))return;Ae.flatMap(Xe=>Xe==="*"?u.getRecipeKeys(d)[_e]:Xe).forEach(Xe=>{let Ve=te.reduce((ze,Pt)=>({base:Xe,...ze,[Gvn(u,Pt)]:Xe}),{});o.recipes.push({[d]:{[_e]:te.length?Ve:Xe}})})})})}),o)}var s1n=class{constructor(i,e){this.context=i,this.options=e;let{recipes:r}=e??{};this.recipes=new XRt(r??{},i)}recipes;processGlobalCss=i=>{let{conditions:e,utility:r}=this.context,o=prr(i,{conditions:e,utility:r}),u=Z0.atRule({name:"layer",params:"base",nodes:[o]});this.context.root.append(u)};processSelectorObject(i,e){let r=IU(e),{nodes:o}=eqe(r);if(o.length===0)return;let u=Z0.rule({selector:i,nodes:r.root.nodes});this.context.root.append(u)}processObject(i){let r=IU(i).root;this.context.root.append(r)}processAtomic=(...i)=>{let e=new omt(this.context);i.forEach(r=>{r&&e.process({styles:r})})};processStyleProps=i=>{let{css:e,...r}=i;this.processAtomic(r,e)};processRecipe=(i,e)=>{this.recipes.process(i.name,{styles:e}),i.compoundVariants?.forEach(r=>{this.processAtomic(r.css)})};processAtomicRecipe=i=>{let{base:e={},variants:r={},compoundVariants:o=[]}=i;this.processAtomic(e);for(let u of Object.values(r))for(let d of Object.values(u))this.processAtomic(d);o.forEach(u=>{this.processAtomic(u.css)})};toCss=({optimize:i=!1,minify:e}={})=>{try{let{conditions:{breakpoints:r},utility:o}=this.context;r.expandScreenAtRule(this.context.root),Arr(this.context.root,{token:o.getToken});let u=this.context.root.toString();return i&&(u=cmt(u,{minify:e})),this.options?.content&&(u=`${this.options.content}
|
|
21118
21118
|
|
|
21119
|
-
${u}`),i?umt(u):u}catch(r){throw r instanceof XYt&&(Wd.error("sheet",r.message),r.plugin&&Wd.error("sheet",`By plugin: ${r.plugin}:`),r.source&&(Wd.error("sheet",`Line ${r.line}:${r.column}, in:`),Wd.error("sheet",r.source))),r}};append=(...i)=>{this.context.root.append(...i)};prepend=(...i)=>{this.context.root.prepend(...i)}},a1n=class{tokens;classNames=new Map;styles=new Map;shorthands=new Map;types=new Map;propertyKeys=new Map;config={};customValues=new Map;transforms=new Map;configs=new Map;separator="_";prefix="";constructor(i){let{tokens:e,config:r={},separator:o,prefix:u,shorthands:d}=i;this.tokens=e,this.config=r,o&&(this.separator=o),u&&(this.prefix=u),d&&this.assignShorthands(),this.assignColorPaletteProperty(),this.assignProperties(),this.assignPropertyTypes()}register=(i,e)=>{this.assignProperty(i,e),this.assignPropertyType(i,e),this.config[i]=e};assignShorthands=()=>{for(let[i,e]of Object.entries(this.config)){let{shorthand:r}=this.normalize(e)??{};if(!r)continue;(Array.isArray(r)?r:[r]).forEach(u=>{this.shorthands.set(u,i)})}};assignColorPaletteProperty=()=>{let i=this.tokens.colorPalettes;this.config.colorPalette={values:Object.keys(i),transform(e){return i[e]}}};resolveShorthand=i=>this.shorthands.get(i)??i;get hasShorthand(){return this.shorthands.size>0}get isEmpty(){return Object.keys(this.config).length===0}entries=()=>Object.entries(this.config).filter(([,e])=>!!e?.className).map(([e,r])=>[e,r.className]);getPropKey=(i,e)=>`(${i} = ${e})`;hash=(i,e)=>`${i}${this.separator}${e}`;getPropertyValues=(i,e)=>{let{values:r}=i,o=u=>{let d=e?.(u);return d?{[d]:d}:void 0};return MH(r)?o?.(r)??this.tokens.getValue(r)??{}:Array.isArray(r)?r.reduce((u,d)=>(u[d]=d,u),{}):jKt(r)?r(e?o:this.getToken.bind(this)):r};getToken=i=>this.tokens.get(i);normalize=i=>i;assignProperty=(i,e)=>{let r=this.normalize(e);if(this.setTransform(i,r?.transform),!r)return;this.configs.set(i,r);let o=this.getPropertyValues(r);if(o)for(let[u,d]of Object.entries(o)){let h=this.getPropKey(i,u);this.setStyles(i,d,u,h),this.setClassName(i,u)}};assignProperties=()=>{for(let[i,e]of Object.entries(this.config))e&&this.assignProperty(i,e)};getPropertyKeys=i=>{let e=this.propertyKeys.get(i);return e?Array.from(e):[]};assignPropertyType=(i,e)=>{let r=this.normalize(e);if(!r)return;let o=this.getPropertyValues(r,d=>`type:Tokens["${d}"]`);if(typeof o=="object"&&o.type){this.types.set(i,new Set([`type:${o.type}`]));return}if(o){let d=new Set(Object.keys(o));this.types.set(i,d),this.propertyKeys.set(i,d)}let u=this.types.get(i)??new Set;r.property&&this.types.set(i,u.add(`CssProperties["${r.property}"]`))};assignPropertyTypes=()=>{for(let[i,e]of Object.entries(this.config))e&&this.assignPropertyType(i,e)};getTypes=()=>{let i=new Map;for(let[e,r]of this.types.entries()){if(r.size===0){i.set(e,["string"]);continue}let o=Array.from(r).map(u=>u.startsWith("CssProperties")?u:u.startsWith("type:")?u.replace("type:",""):JSON.stringify(u));i.set(e,o)}return i};defaultTransform=GI((i,e)=>{if(e.startsWith("--")){let o=this.tokens.getTokenVar(i);i=typeof o=="string"?o:i}return{[e]:i}});setTransform=(i,e)=>{let o=e??(u=>this.defaultTransform(u,i));return this.transforms.set(i,o),this};setStyles=(i,e,r,o)=>{o=o??this.getPropKey(i,e);let u=v=>this.defaultTransform(v,i),h=(this.transforms.get(i)??u)(e,{token:this.getToken.bind(this),raw:r});return this.styles.set(o,h??{}),this};formatClassName=i=>[this.prefix,i].filter(Boolean).join("-");setClassName=(i,e)=>{let r=this.getPropKey(i,e),o=this.configs.get(i),u;return!o||!o.className?u=this.hash(n3e(i),e):u=this.hash(o.className,e),this.classNames.set(r,u),this};isProperty=i=>this.configs.has(i);getOrCreateClassName=(i,e)=>((o,u)=>{let d=this.getPropKey(o,u);return this.classNames.has(d)||(this.isProperty(o)&&this.customValues.set(o,u),this.setClassName(o,u)),this.classNames.get(d)})(i,e);getOrCreateStyle=(i,e)=>{let r=this.getPropKey(i,e);return this.styles.get(r)??this.setStyles(i,e,e,r),this.styles.get(r)};transform=(i,e)=>{if(e==null)return{className:"",styles:{}};let r=this.resolveShorthand(i);return ZPe({layer:this.configs.get(r)?.layer,className:this.getOrCreateClassName(r,Ndt(e)),styles:this.getOrCreateStyle(r,e)})};keys=()=>{let i=Array.from(this.shorthands.keys()),e=Object.keys(this.config);return[...i,...e]}};oe();oe();var Xqe=Km(eG(),1);var qd=Km(eG(),1);oe();var Dcr=Km(xEn(),1),tG=Km(TEn(),1);oe();var MU=Km(require("path"),1),AEn=Km(require("os"),1),acr=/(^\/\w:\/)|(^\/\w:\\)/,DEn=MU.default.parse(process.cwd()).root,kEn=/^\w:/,ocr=AEn.default.platform();function lcr(i){return/\\/.test(i)||kEn.test(i)}function wEn(i){let e=/^\\\\\?\\/.test(i),r=/[^\u0000-\u0080]+/.test(i);return e||r?i:i.replace(/\\/g,"/")}function ccr(i){let e=typeof i=="string"?i:i.pathname;return e.startsWith("file:")&&(e.startsWith("file://")&&(e=e.slice(7)),acr.test(e)&&(e=e.slice(1))),f9t(e)}function IEn(i){return[...i].some(e=>typeof e=="string"&&lcr(e))?MU.default.win32:MU.default}function Aue(i,e){return wEn(IEn(e)[i](...e))}function PEn(i,e){return MU.default.posix[i](...[...e].map(r=>typeof r=="string"?wEn(r):r))}function ucr(i){return PEn("parse",arguments)}function fcr(i){return PEn("extname",arguments)}function pcr(i){return IEn(arguments).isAbsolute(i)}function dcr(...i){return Aue("join",arguments)}function f9t(i){let e=Aue("normalize",arguments);return i.startsWith("./")&&!e.startsWith("./")?"./"+e:e}function _cr(i,e){return Aue("relative",arguments)}function mcr(...i){return Aue("resolve",arguments)}function hcr(i){return Aue("dirname",arguments)}function Bcr(i,e){return Aue("basename",arguments)}function gcr(i){return Aue("format",arguments)}function ycr(i){return Aue("toNamespacedPath",arguments)}function Ccr(i){return ocr!=="win32"||kEn.test(i)||i.startsWith(DEn)||!MU.default.win32.isAbsolute(MU.default.win32.normalize(i))?i:MU.default.win32.join(DEn,i)}var p9t={sep:MU.default.posix.sep,delimiter:MU.default.posix.delimiter,parse:ucr,isAbsolute:pcr,join:dcr,extname:fcr,normalize:f9t,relative:_cr,resolve:mcr,dirname:hcr,basename:Bcr,format:gcr,toNamespacedPath:ycr,get posix(){return this},get win32(){return NEn}},NEn={...MU.default.win32,get posix(){return p9t},get win32(){return this}},vcr=MU.default,KCe={...p9t,posix:p9t,win32:NEn,native:vcr,includeDriveLetter:Ccr,urlToFilename:ccr};var JEn=require("module"),qEn=require("util"),KEn=Km(GEn(),1),rCt=()=>{let i={Infinity:1/0,NaN:NaN,undefined:void 0,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Array,Boolean,Date,Error,EvalError,Number,Object,RangeError,ReferenceError,RegExp,String,SyntaxError,TypeError,URIError,JSON,Math,escape,unescape,eval,Function};try{i.AggregateError=AggregateError}catch{}try{i.FinalizationRegistry=FinalizationRegistry}catch{}try{i.WeakRef=WeakRef}catch{}try{i.BigInt=BigInt}catch{}try{i.Reflect=Reflect}catch{}try{i.WeakMap=WeakMap}catch{}try{i.WeakSet=WeakSet}catch{}try{i.Set=Set}catch{}try{i.Map=Map}catch{}try{i.Uint8Array=Uint8Array}catch{}try{i.BigUint64Array=BigUint64Array}catch{}try{i.BigInt64Array=BigInt64Array}catch{}try{i.Atomics=Atomics}catch{}try{i.SharedArrayBuffer=SharedArrayBuffer}catch{}try{i.WebAssembly=WebAssembly}catch{}try{i.Uint8ClampedArray=Uint8ClampedArray}catch{}try{i.Uint16Array=Uint16Array}catch{}try{i.Uint32Array=Uint32Array}catch{}try{i.Intl=Intl}catch{}try{i.Int8Array=Int8Array}catch{}try{i.Int16Array=Int16Array}catch{}try{i.Int32Array=Int32Array}catch{}try{i.Float32Array=Float32Array}catch{}try{i.Float64Array=Float64Array}catch{}try{i.ArrayBuffer=ArrayBuffer}catch{}try{i.DataView=DataView}catch{}try{i.isFinite=isFinite}catch{}try{i.Promise=Promise}catch{}try{i.Proxy=Proxy}catch{}try{i.Symbol=Symbol}catch{}return i};function wue(i,e,r){let o={};return[i,e??{},r??{}].forEach(h=>Object.defineProperties(o,Object.getOwnPropertyDescriptors(h))),o}function X0t(i,e){let r={};return Object.getOwnPropertyNames(i).forEach(o=>{o in e||Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(i,o))}),r}var XEn=(0,JEn.createRequire)(_t),Acr=()=>{let i=rCt(),e=wue(X0t(global,i),i,{require:XEn,process,__dirname:r=>KCe.native.normalize(KCe.native.dirname(r)),__filename:r=>KCe.native.normalize(r)});return Object.defineProperties(e,{global:{get(){return e}},globalThis:{get(){return e}}}),e};function kcr(i){let e=0;return{requestAnimationFrame:function(d){let h=new Date().getTime(),v=Math.max(0,16-(h-e)),S=i.setTimeout(function(){d(h+v)},v);return e=h+v,S},cancelAnimationFrame:function(d){clearTimeout(d)}}}var J0t;function wcr(i=!1){return J0t??(J0t=Icr("evaluate against a browser environment",i,"jsdom"))}function Icr(i,e,r=i){try{return XEn(r)}catch{if(e)throw new ReferenceError(`You must install the peer dependency '${r}' in order to ${i} with ts-evaluator`);return}}var Pcr=()=>{let{JSDOM:i}=wcr(!0),{window:e}=new i("",{url:"https://example.com"}),r=rCt(),o=kcr(e),u=wue(X0t(e,r),X0t(o,e),r);return Object.defineProperties(u,{window:{get(){return u}},globalThis:{get(){return u}}}),u},S2="[return]",aR="[break]",B7="[continue]",g7="this",XCe="super",Ncr=()=>{let i=rCt(),e=wue(X0t(global,i),i,{import:{meta:{url:r=>{let o=KCe.normalize(r);return`file:///${o.startsWith("/")?o.slice(1):o}`}}},process});return Object.defineProperties(e,{global:{get(){return e}},globalThis:{get(){return e}}}),e};function YEn(i,e){return e.isDeclaration(i)}function Lcr(i,e){return e.isPropertyAccessExpression(i)?!1:"name"in i&&i.name!=null}function QEn(i,e){return i.flags!==e.NodeFlags.Const&&i.flags!==e.NodeFlags.Let}var y7=class extends Error{constructor({node:e,environment:r,message:o}){super(o),Error.captureStackTrace(this,this.constructor),this.node=e,this.environment=r}};function _ne(i){return typeof i=="object"&&i!=null&&i instanceof y7}var Y0t=class extends y7{constructor({path:e,node:r,environment:o,message:u=`Module '${e}' could not be resolved'`}){super({message:u,environment:o,node:r}),this.path=e}},IN=class extends y7{constructor({node:e,environment:r,typescript:o,message:u=`Unexpected Node: '${o.SyntaxKind[e.kind]}'`}){super({message:u,node:e,environment:r})}};function Fcr(i){var e;let{node:r,evaluate:o,environment:u,typescript:d,throwError:h}=i,v=d.getNameOfDeclaration(r);if(v!=null)return d.isIdentifier(v)||!((e=d.isPrivateIdentifier)===null||e===void 0)&&e.call(d,v)||d.isStringLiteralLike(v)?v.text:d.isNumericLiteral(v)?Number(v.text):d.isComputedPropertyName(v)?o.expression(v.expression,i):h(new IN({node:v,environment:u,typescript:d}))}function $En(i,e){let{node:r,typescript:o}=e;if(!o.isExternalModuleNameRelative(i))return i;let u=r.getSourceFile().fileName;return KCe.join(KCe.dirname(u),i)}function Q0t(i){var e,r,o,u,d;let{node:h,typescript:v,throwError:S,environment:k}=i,L=Fcr(i);if(_ne(L))return L;if(L==null)return S(new IN({node:h,environment:k,typescript:v}));let z=Kk(h,i.environment,L);if(z!=null&&z.literal!=null)return z.literal;let te=Kk(h,i.environment,"require").literal,_e=v.isModuleDeclaration(h)?h:Ocr(h,v.SyntaxKind.ModuleDeclaration,v);if(_e==null)return S(new IN({node:h,environment:k,typescript:v}));let Ae=_e.name.text,Ie=$En(Ae,i);try{let Xe=(u=(r=(e=i.moduleOverrides)===null||e===void 0?void 0:e[Ae])!==null&&r!==void 0?r:(o=i.moduleOverrides)===null||o===void 0?void 0:o[Ie])!==null&&u!==void 0?u:te(Ie);return v.isModuleDeclaration(h)?Xe:(d=Xe[L])!==null&&d!==void 0?d:Xe}catch(Xe){return _ne(Xe)?Xe:S(new Y0t({node:_e,environment:k,path:Ie}))}}function q0t(i,e,r){var o,u,d,h,v,S;let{node:k,throwError:L,environment:z}=r,te=Kk(k,r.environment,"require").literal,_e=$En(e,r);try{let Ae=(h=(u=(o=r.moduleOverrides)===null||o===void 0?void 0:o[e])!==null&&u!==void 0?u:(d=r.moduleOverrides)===null||d===void 0?void 0:d[_e])!==null&&h!==void 0?h:te(_e);return(S=(v=Ae[i])!==null&&v!==void 0?v:Ae.default)!==null&&S!==void 0?S:Ae}catch(Ae){return _ne(Ae)?Ae:L(new Y0t({node:k,environment:z,path:_e}))}}function Ocr(i,e,r){let o=i;for(;;){if(o=o.parent,o==null)return;if(o.kind===e){let u=r.getCombinedNodeFlags(o);if(!((u&r.NodeFlags.Namespace)!==0||(u&r.NodeFlags.NestedNamespace)!==0))return o}if(r.isSourceFile(o))return}}function D9t(i,e,r,o=new WeakSet){let{typescript:u}=r,d;function h(S,k=0){var L,z,te,_e,Ae;if(o.has(S))return!1;if(o.add(S),u.isIdentifier(S)){if(S.text===e)return d=S,!0}else{if(u.isShorthandPropertyAssignment(S))return!1;if(u.isPropertyAssignment(S))return!1;if(u.isImportDeclaration(S)){if(S.importClause!=null){if(S.importClause.name!=null&&h(S.importClause.name)){let Ie=S.moduleSpecifier;if(Ie!=null&&u.isStringLiteralLike(Ie))return d=q0t(e,Ie.text,r),!0}else if(S.importClause.namedBindings!=null&&h(S.importClause.namedBindings))return!0}return!1}else if(u.isImportEqualsDeclaration(S)){if(S.name!=null&&h(S.name)){if(u.isIdentifier(S.moduleReference))return d=D9t(S.parent,S.moduleReference.text,r,o),d!=null;if(u.isQualifiedName(S.moduleReference))return!1;{let Ie=S.moduleReference.expression;if(Ie!=null&&u.isStringLiteralLike(Ie))return d=q0t(e,Ie.text,r),!0}}return!1}else if(u.isNamespaceImport(S)){if(h(S.name)){let Ie=(z=(L=S.parent)===null||L===void 0?void 0:L.parent)===null||z===void 0?void 0:z.moduleSpecifier;return Ie==null||!u.isStringLiteralLike(Ie)?!1:(d=q0t(e,Ie.text,r),!0)}}else if(u.isNamedImports(S)){for(let Ie of S.elements)if(h(Ie))return!0}else if(u.isImportSpecifier(S)){if(h(S.name)){let Ie=(Ae=(_e=(te=S.parent)===null||te===void 0?void 0:te.parent)===null||_e===void 0?void 0:_e.parent)===null||Ae===void 0?void 0:Ae.moduleSpecifier;return Ie==null||!u.isStringLiteralLike(Ie)?!1:(d=q0t(e,Ie.text,r),!0)}}else if(u.isSourceFile(S)){for(let Ie of S.statements)if(h(Ie))return!0}else if(u.isVariableStatement(S)){for(let Ie of S.declarationList.declarations)if(h(Ie)&&(QEn(S.declarationList,u)||k<1))return!0}else if(u.isBlock(S)){for(let Ie of S.statements)if(h(Ie,k+1))return!0}else if(Lcr(S,u)&&S.name!=null&&h(S.name))return d=S,!0}return!1}return u.findAncestor(i,S=>h(S))?d:void 0}function jEn(i,e){let r=i;for(;;){if(r=r.parent,r==null)return;if(YEn(r,e)||e.isSourceFile(r))return r}}function Rcr(i){return i!=null&&(typeof i=="function"||typeof i=="object")}function UEn(i){return Rcr(i)}function A9t(i,e){switch(i){case Function.prototype.bind:case Function.prototype.call:case Function.prototype.apply:return!0}if(e!=null){let r=Kk(void 0,e,"Function").literal;switch(i){case r.prototype.bind:case r.prototype.call:case r.prototype.apply:return!0}}return!1}var dne=class{constructor(e){this.intent=e}construct(e,r){return this.intent(e,r)}};function ZEn(i){return typeof i=="object"&&i!=null&&i instanceof dne}function iCt(i,e,r){return ZEn(r)?e.throwError(r.construct(i,e)):r}function m9t(i){return i.map(e=>typeof e=="symbol"?e.description:e).join(".")}function WEn({hook:i,item:e,scope:r,policy:o}){function u(d,h){let v=(S,k)=>{if(S!==!1)return ZEn(S)||_ne(S)?S:k()};return!UEn(h)||A9t(h)?h:new Proxy(h,{construct(S,k,L){return v(i({kind:"__$$_PROXY_CONSTRUCT",policy:o,newTarget:L,argArray:k,target:S,path:m9t(d)}),()=>Reflect.construct(S,k,L))},apply(S,k,L=[]){return v(i({kind:"__$$_PROXY_APPLY",policy:o,thisArg:k,argArray:L,target:S,path:m9t(d)}),()=>Reflect.apply(S,k,L))},get(S,k,L){let z=[...d,k];return v(i({kind:"__$$_PROXY_GET",policy:o,path:m9t(z),target:S}),()=>{let te=Reflect.get(S,k,L),_e=Reflect.getOwnPropertyDescriptor(h,k);return _e!=null&&_e.configurable===!1&&_e.writable===!1?h[k]:u(z,te)})}})}return UEn(e)?u([r],e):e}function VEn(i,e){switch(i){case"__$$_PROXY_GET":return`get ${e}`;case"__$$_PROXY_APPLY":return`${e}(...)`;case"__$$_PROXY_CONSTRUCT":return`new ${e}(...)`}}var eTn={"node:http2":"http2",http2:{connect:{__$$_PROXY_APPLY:!0},createSecureServer:{__$$_PROXY_APPLY:!0},createServer:{__$$_PROXY_APPLY:!0}},"node:https":"https",https:{createServer:{__$$_PROXY_APPLY:!0},request:{__$$_PROXY_APPLY:!0},get:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},globalAgent:{destroy:{__$$_PROXY_APPLY:!0}},Agent:{__$$_PROXY_CONSTRUCT:!0}},"node:http":"http",http:{createServer:{__$$_PROXY_APPLY:!0},request:{__$$_PROXY_APPLY:!0},get:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},ClientRequest:{__$$_PROXY_CONSTRUCT:!0},globalAgent:{destroy:{__$$_PROXY_APPLY:!0}},Agent:{__$$_PROXY_CONSTRUCT:!0}},"node:dgram":"dgram",dgram:{createSocket:{__$$_PROXY_APPLY:!0}},"node:dns":"dns",dns:{lookup:{__$$_PROXY_APPLY:!0},lookupService:{__$$_PROXY_APPLY:!0},resolve:{__$$_PROXY_APPLY:!0},resolve4:{__$$_PROXY_APPLY:!0},resolve6:{__$$_PROXY_APPLY:!0},resolveAny:{__$$_PROXY_APPLY:!0},resolveCname:{__$$_PROXY_APPLY:!0},resolveMx:{__$$_PROXY_APPLY:!0},resolveNaptr:{__$$_PROXY_APPLY:!0},resolveNs:{__$$_PROXY_APPLY:!0},resolvePtr:{__$$_PROXY_APPLY:!0},resolveSoa:{__$$_PROXY_APPLY:!0},resolveSrv:{__$$_PROXY_APPLY:!0},resolveTxt:{__$$_PROXY_APPLY:!0},reverse:{__$$_PROXY_APPLY:!0},Resolver:{__$$_PROXY_CONSTRUCT:!0}},"node:net":"net",net:{createServer:{__$$_PROXY_APPLY:!0},createConnection:{__$$_PROXY_APPLY:!0},connect:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0}},"node:tls":"tls",tls:{createServer:{__$$_PROXY_APPLY:!0},createSecureContext:{__$$_PROXY_APPLY:!0},connect:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},TLSSocket:{__$$_PROXY_CONSTRUCT:!0}}},Mcr={...eTn,Math:{random:{__$$_PROXY_APPLY:!0}},Date:{now:{__$$_PROXY_APPLY:!0},__$$_PROXY_CONSTRUCT:(...i)=>i.length===0&&!(i[0]instanceof Date)}};function Gcr(i,e){return typeof i==typeof e||typeof i=="function"}function jcr(i){return typeof i=="function"}function YCe(i,e,r){let o=r.path.split(".");return B9t(i,e,r,o)}function B9t(i,e,r,o){let[u,...d]=o;if(u==null)return!1;let h=i[u];if(h==null)return!1;if(typeof h=="string")return B9t(i,e,r,[h,...d]);if(Gcr(h,e))return HEn(h,e,r);{let v=h[r.kind];return v!=null?HEn(v,e,r):B9t(h,e,r,d)}}function HEn(i,e,r){if(jcr(i)){let o=r;return o.argArray!=null&&i(...o.argArray)===e}else return i===e}function Ucr(i){return YCe(Mcr,!0,i)}var Iue=class extends y7{constructor({violation:e,node:r,environment:o,message:u}){super({node:r,environment:o,message:`[${e}]: ${u}`}),this.violation=e}},g9t=class extends Iue{constructor({operation:e,node:r,environment:o,message:u=`The operation: '${e}' is nondeterministic. That is in violation of the policy`}){super({violation:"deterministic",message:u,node:r,environment:o}),this.operation=e}},tTn={"node:fs":"fs",fs:{readFile:{__$$_PROXY_APPLY:"read"},readFileSync:{__$$_PROXY_APPLY:"read"},readdir:{__$$_PROXY_APPLY:"read"},readdirSync:{__$$_PROXY_APPLY:"read"},read:{__$$_PROXY_APPLY:"read"},readSync:{__$$_PROXY_APPLY:"read"},exists:{__$$_PROXY_APPLY:"read"},existsSync:{__$$_PROXY_APPLY:"read"},access:{__$$_PROXY_APPLY:"read"},accessSync:{__$$_PROXY_APPLY:"read"},close:{__$$_PROXY_APPLY:"read"},closeSync:{__$$_PROXY_APPLY:"read"},createReadStream:{__$$_PROXY_APPLY:"read"},stat:{__$$_PROXY_APPLY:"read"},statSync:{__$$_PROXY_APPLY:"read"},watch:{__$$_PROXY_APPLY:"read"},watchFile:{__$$_PROXY_APPLY:"read"},unwatchFile:{__$$_PROXY_APPLY:"read"},realpath:{__$$_PROXY_APPLY:"read"},realpathSync:{__$$_PROXY_APPLY:"read"},fstat:{__$$_PROXY_APPLY:"read"},fstatSync:{__$$_PROXY_APPLY:"read"},createWriteStream:{__$$_PROXY_APPLY:"write"},copyFile:{__$$_PROXY_APPLY:"write"},copyFileSync:{__$$_PROXY_APPLY:"write"},unlink:{__$$_PROXY_APPLY:"write"},unlinkSync:{__$$_PROXY_APPLY:"write"},rmdir:{__$$_PROXY_APPLY:"write"},rmdirSync:{__$$_PROXY_APPLY:"write"},symlink:{__$$_PROXY_APPLY:"write"},symlinkSync:{__$$_PROXY_APPLY:"write"},truncate:{__$$_PROXY_APPLY:"write"},truncateSync:{__$$_PROXY_APPLY:"write"},utimes:{__$$_PROXY_APPLY:"write"},utimesSync:{__$$_PROXY_APPLY:"write"},appendFile:{__$$_PROXY_APPLY:"write"},appendFileSync:{__$$_PROXY_APPLY:"write"},write:{__$$_PROXY_APPLY:"write"},writeSync:{__$$_PROXY_APPLY:"write"},writeFile:{__$$_PROXY_APPLY:"write"},writeFileSync:{__$$_PROXY_APPLY:"write"},chmod:{__$$_PROXY_APPLY:"write"},chmodSync:{__$$_PROXY_APPLY:"write"},chown:{__$$_PROXY_APPLY:"write"},chownSync:{__$$_PROXY_APPLY:"write"},mkdir:{__$$_PROXY_APPLY:"write"},mkdirSync:{__$$_PROXY_APPLY:"write"},rename:{__$$_PROXY_APPLY:"write"},renameSync:{__$$_PROXY_APPLY:"write"},futimes:{__$$_PROXY_APPLY:"write"},futimesSync:{__$$_PROXY_APPLY:"write"},link:{__$$_PROXY_APPLY:"write"},linkSync:{__$$_PROXY_APPLY:"write"},mkdtemp:{__$$_PROXY_APPLY:"write"},open:{__$$_PROXY_APPLY:"write"},openSync:{__$$_PROXY_APPLY:"write"},fchmod:{__$$_PROXY_APPLY:"write"},fchmodSync:{__$$_PROXY_APPLY:"write"},fchown:{__$$_PROXY_APPLY:"write"},fchownSync:{__$$_PROXY_APPLY:"write"},ftruncate:{__$$_PROXY_APPLY:"write"},ftruncateSync:{__$$_PROXY_APPLY:"write"},fsync:{__$$_PROXY_APPLY:"write"},fsyncSync:{__$$_PROXY_APPLY:"write"},fdatasync:{__$$_PROXY_APPLY:"write"},fdatasyncSync:{__$$_PROXY_APPLY:"write"},lchmod:{__$$_PROXY_APPLY:"write"},lchmodSync:{__$$_PROXY_APPLY:"write"}}};function Wcr(i){return YCe(tTn,"read",i)}var $0t=class extends Iue{constructor({node:e,environment:r,kind:o,message:u=`${o} operations are in violation of the policy`}){super({violation:"io",message:u,environment:r,node:e}),this.kind=o}};function Vcr(i){return YCe(tTn,"write",i)}function Hcr(i){return YCe(eTn,!0,i)}var y9t=class extends Iue{constructor({operation:e,node:r,environment:o,message:u=`The operation: '${e}' is performing network activity. That is in violation of the policy`}){super({violation:"deterministic",message:u,node:r,environment:o}),this.operation=e}},nTn={"node:process":"process",process:{exit:{__$$_PROXY_APPLY:"exit"}},"node:child_process":"child_process",child_process:{__$$_PROXY_APPLY:"spawnChild"},"node:cluster":"cluster",cluster:{Worker:{__$$_PROXY_CONSTRUCT:"spawnChild"}}};function zcr(i){return YCe(nTn,"exit",i)}var Z0t=class extends Iue{constructor({kind:e,node:r,environment:o,message:u=`${e} operations are in violation of the policy`}){super({violation:"process",message:u,node:r,environment:o}),this.kind=e}};function Jcr(i){return YCe(nTn,"spawnChild",i)}var qcr={"node:console":"console",console:{__$$_PROXY_APPLY:!0}};function Kcr(i){return YCe(qcr,!0,i)}function Xcr({policy:i,env:e}){let r=h=>!i.console&&Kcr(h)?!1:!i.io.read&&Wcr(h)?new dne((v,S)=>new $0t({...S,node:v,kind:"read"})):!i.io.write&&Vcr(h)?new dne((v,S)=>new $0t({...S,node:v,kind:"write"})):!i.process.exit&&zcr(h)?new dne((v,S)=>new Z0t({...S,node:v,kind:"exit"})):!i.process.exit&&Jcr(h)?new dne((v,S)=>new Z0t({...S,node:v,kind:"spawnChild"})):!i.network&&Hcr(h)?new dne((v,S)=>new y9t({...S,node:v,operation:VEn(h.kind,h.path)})):i.deterministic&&Ucr(h)?new dne((v,S)=>new g9t({...S,node:v,operation:VEn(h.kind,h.path)})):!0,o=Object.entries(Object.getOwnPropertyDescriptors(e)),u=Object.assign({},...o.filter(([,h])=>!("value"in h)).map(([h,v])=>({[h]:v}))),d=Object.assign({},...o.filter(([,h])=>"value"in h).map(([h,v])=>({[h]:h==="require"?new Proxy(v.value,{apply(S,k,L=[]){let[z]=L;return WEn({policy:i,item:Reflect.apply(S,k,L),scope:z,hook:r})}}):WEn({policy:i,item:v.value,scope:h,hook:r})})));return Object.defineProperties(d,{...u})}function zqe(i,e){let[r]=e.split(".");if(tG.default.has(i.env,r))return i.env;if(i.parentEnv!=null)return zqe(i.parentEnv,e)}function C9t(i){return i.preset!=null?i.preset:i.parentEnv!=null?C9t(i.parentEnv):"NONE"}function rTn(i,e,r){let o=jEn(i.startingNode,r),u=jEn(e,r);if(o?.pos===u?.pos)return i;if(i.parentEnv!=null)return rTn(i.parentEnv,e,r)}function Kk(i,e,r){let[o]=r.split(".");if(tG.default.has(e.env,o)){let u=tG.default.get(e.env,r);switch(r){case"__dirname":case"__filename":{let d=C9t(e);return(d==="NODE"||d==="NODE_CJS")&&typeof u=="function"&&i!=null?{literal:u(i.getSourceFile().fileName)}:{literal:u}}case"import.meta":{let d=C9t(e);return(d==="NODE_ESM"||d==="BROWSER"||d==="ECMA")&&typeof u=="object"&&u!=null&&typeof u.url=="function"&&i!=null?{literal:{url:u.url(i.getSourceFile().fileName)}}:{literal:u}}default:return{literal:u}}}if(e.parentEnv!=null)return Kk(i,e.parentEnv,r)}function UT(i,e,r,...o){return o.some(u=>{let d=Kk(i,e,u);return d==null?!1:d.literal===r})}function h9t(i){switch(i){case S2:case aR:case B7:case g7:case XCe:return!0;default:return!1}}function PB({environment:i,path:e,value:r,reporting:o,node:u,newBinding:d=!1}){let[h]=e.split(".");if(tG.default.has(i.env,h)||d||i.parentEnv==null){if(tG.default.has(i.env,e)&&tG.default.get(i.env,e)===r)return;tG.default.set(i.env,e,r),o.reportBindings!=null&&!h9t(e)&&o.reportBindings({path:e,value:r,node:u})}else{let v=i.parentEnv;for(;v!=null;)if(tG.default.has(v.env,h)){if(tG.default.has(v.env,e)&&tG.default.get(v.env,e)===r)return;tG.default.set(v.env,e,r),o.reportBindings!=null&&!h9t(e)&&o.reportBindings({path:e,value:r,node:u});return}else v.parentEnv==null?(tG.default.set(v.env,e,r),o.reportBindings!=null&&!h9t(e)&&o.reportBindings({path:e,value:r,node:u})):v=v.parentEnv}}function Ycr({inputEnvironment:{extra:i,preset:e},startingNode:r,policy:o}){let u;switch(e){case"NONE":u=wue(i);break;case"ECMA":u=wue(rCt(),i);break;case"NODE":case"NODE_CJS":u=wue(Acr(),i);break;case"NODE_ESM":u=wue(Ncr(),i);break;case"BROWSER":u=wue(Pcr(),i);break;default:u={};break}return{parentEnv:void 0,preset:e,startingNode:r,env:Xcr({policy:o,env:u})}}function iTn(i,e){return i.kind===e.SyntaxKind.TrueKeyword||i.kind===e.SyntaxKind.FalseKeyword}function sTn(i,e){return i.kind===e.SyntaxKind.NullKeyword}function Qcr(i,e){var r;return e.isStringLiteralLike(i)?{success:!0,value:i.text}:iTn(i,e)?{success:!0,value:i.kind===e.SyntaxKind.TrueKeyword}:e.isRegularExpressionLiteral(i)?{success:!0,value:new Function(`return ${i.text}`)()}:e.isNumericLiteral(i)?{success:!0,value:Number(i.text)}:!((r=e.isBigIntLiteral)===null||r===void 0)&&r.call(e,i)?{success:!0,value:BigInt(i.text)}:e.isIdentifier(i)&&i.text==="Infinity"?{success:!0,value:1/0}:e.isIdentifier(i)&&i.text==="NaN"?{success:!0,value:NaN}:e.isIdentifier(i)&&i.text==="null"?{success:!0,value:null}:e.isIdentifier(i)&&i.text==="undefined"?{success:!0,value:void 0}:sTn(i,e)?{success:!0,value:null}:{success:!1}}var v9t=class extends Iue{constructor({ops:e,node:r,environment:o,message:u=`Maximum ops exceeded: ${e}`}){super({violation:"maxOps",message:u,node:r,environment:o}),this.ops=e}};function aTn(i,e){let{node:r,environment:o,evaluate:u,stack:d,typescript:h,throwError:v,getCurrentError:S}=i,k=e??(r.initializer==null?void 0:u.expression(r.initializer,i));if(S()==null){if(k==null&&!h.isIdentifier(r.name))return v(new y7({node:r,environment:o}));u.nodeWithArgument(r.name,k,i),S()==null&&d.push(k)}}function oTn(i,e){return i.kind===e.SyntaxKind.ThisKeyword}function sCt(i,e){return i.kind===e.SyntaxKind.SuperKeyword}function e6e(i){var e,r;let{node:o,evaluate:u,typescript:d}=i;if(d.isIdentifier(o))return o.text;if(!((e=d.isPrivateIdentifier)===null||e===void 0)&&e.call(d,o))return o.text;if(oTn(o,d))return g7;if(sCt(o,d))return XCe;if(d.isParenthesizedExpression(o))return e6e({...i,node:o.expression});if(!((r=d.isTypeAssertionExpression)===null||r===void 0)&&r.call(d,o)||!("isTypeAssertionExpression"in d)&&d.isTypeAssertion(o))return e6e({...i,node:o.expression});if(d.isPropertyAccessExpression(o)){let h=e6e({...i,node:o.expression});h==null&&(h=u.expression(o.expression,i));let v=e6e({...i,node:o.name});return v==null&&(v=u.expression(o.name,i)),h==null||v==null?void 0:`${h}.${v}`}else if(d.isElementAccessExpression(o)){let h=e6e({...i,node:o.expression});h==null&&(h=u.expression(o.expression,i));let v=u.expression(o.argumentExpression,i);return h==null||v==null?void 0:`${h}.${v}`}else if(d.isFunctionDeclaration(o))return o.name==null?void 0:o.name.text}var b9t=class extends y7{constructor({node:e,environment:r,message:o="'No leftValue could be determined'"}){super({message:o,environment:r,node:e})}};function K0t(i,e){var r;return e.isParenthesizedExpression(i)||e.isAsExpression(i)||!((r=e.isTypeAssertionExpression)===null||r===void 0)&&r.call(e,i)||!("isTypeAssertionExpression"in e)&&e.isTypeAssertion(i)?K0t(i.expression,e):i}function lTn(i){return i!=null&&typeof i=="object"&&"kind"in i&&"flags"in i&&"pos"in i&&"end"in i}function $cr(i){var e;let{node:r,environment:o,evaluate:u,logger:d,throwError:h,typeChecker:v,typescript:S,getCurrentError:k}=i,L=u.expression(r.left,i);if(k()!=null)return;let z=u.expression(r.right,i);if(k()!=null)return;let te=e6e({...i,node:r.left}),_e=r.operatorToken.kind;switch(_e){case S.SyntaxKind.AmpersandToken:return L&z;case S.SyntaxKind.AmpersandAmpersandToken:return L&&z;case S.SyntaxKind.AmpersandEqualsToken:case S.SyntaxKind.CaretEqualsToken:case S.SyntaxKind.BarEqualsToken:case S.SyntaxKind.MinusEqualsToken:case S.SyntaxKind.PlusEqualsToken:case S.SyntaxKind.PercentEqualsToken:case S.SyntaxKind.SlashEqualsToken:case S.SyntaxKind.AsteriskEqualsToken:case S.SyntaxKind.AsteriskAsteriskEqualsToken:case S.SyntaxKind.LessThanLessThanEqualsToken:case S.SyntaxKind.GreaterThanGreaterThanEqualsToken:case S.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken:case S.SyntaxKind.QuestionQuestionEqualsToken:case S.SyntaxKind.BarBarEqualsToken:case S.SyntaxKind.AmpersandAmpersandEqualsToken:{let Ae=L;switch(_e){case S.SyntaxKind.AmpersandEqualsToken:Ae&=z;break;case S.SyntaxKind.CaretEqualsToken:Ae^=z;break;case S.SyntaxKind.BarEqualsToken:Ae|=z;break;case S.SyntaxKind.AsteriskEqualsToken:Ae*=z;break;case S.SyntaxKind.AsteriskAsteriskEqualsToken:Ae**=z;break;case S.SyntaxKind.LessThanLessThanEqualsToken:Ae<<=z;break;case S.SyntaxKind.GreaterThanGreaterThanEqualsToken:Ae>>=z;break;case S.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken:Ae>>>=z;break;case S.SyntaxKind.MinusEqualsToken:Ae-=z;break;case S.SyntaxKind.PlusEqualsToken:Ae+=z;break;case S.SyntaxKind.PercentEqualsToken:Ae%=z;break;case S.SyntaxKind.SlashEqualsToken:Ae/=z;break;case S.SyntaxKind.QuestionQuestionEqualsToken:Ae=L??z;break;case S.SyntaxKind.BarBarEqualsToken:L||(Ae=z);break;case S.SyntaxKind.AmpersandAmpersandEqualsToken:L&&(Ae=z);break}return te!=null&&PB({...i,path:te,value:Ae}),Ae}case S.SyntaxKind.AsteriskToken:return L*z;case S.SyntaxKind.AsteriskAsteriskToken:return L**z;case S.SyntaxKind.BarToken:return L|z;case S.SyntaxKind.BarBarToken:return L||z;case S.SyntaxKind.CaretToken:return L^z;case S.SyntaxKind.CommaToken:return z;case S.SyntaxKind.MinusToken:return L-z;case S.SyntaxKind.PlusToken:return d.logResult(L+z,"BinaryExpression (PlusToken)"),L+z;case S.SyntaxKind.PercentToken:return L%z;case S.SyntaxKind.SlashToken:return L/z;case S.SyntaxKind.EqualsToken:{if(te!=null){let Ae=K0t(r.left,S),Ie=v?.getSymbolAtLocation(Ae),Xe=Ie?.valueDeclaration;if(Xe==null&&v==null&&S.isIdentifier(Ae)){let ze=D9t(Ae.parent,Ae.text,i);lTn(ze)&&(Xe=ze)}let Ve=Xe==null?o:(e=rTn(o,Xe,S))!==null&&e!==void 0?e:o;PB({...i,environment:Ve,path:te,value:z}),d.logBinding(te,z,"Assignment")}else return h(new b9t({node:r.left,environment:o}));return z}case S.SyntaxKind.EqualsEqualsToken:return L==z;case S.SyntaxKind.EqualsEqualsEqualsToken:return L===z;case S.SyntaxKind.ExclamationEqualsToken:return L!=z;case S.SyntaxKind.ExclamationEqualsEqualsToken:return L!==z;case S.SyntaxKind.GreaterThanToken:return L>z;case S.SyntaxKind.GreaterThanEqualsToken:return L>=z;case S.SyntaxKind.LessThanToken:return L<z;case S.SyntaxKind.LessThanEqualsToken:return L<=z;case S.SyntaxKind.InKeyword:return L in z;case S.SyntaxKind.QuestionQuestionToken:return L??z;case S.SyntaxKind.InstanceOfKeyword:return L instanceof z}return h(new IN({node:r.operatorToken,typescript:S,environment:o}))}var k9t="___lazyCallFlag";function Zcr(i){return i!=null&&typeof i=="object"&&k9t in i}function w9t(i){return i===void 0?"undefined":i===null?"null":typeof i=="string"?`"${i}"`:i.toString()}var eCt=class extends y7{constructor({value:e,node:r,environment:o,message:u=`${w9t(e)} is not a function'`}){super({message:u,environment:o,node:r}),this.value=e}};function kue(i,e){var r;return sCt(i,e)?!0:e.isPropertyAccessExpression(i)?kue(i.expression,e)||kue(i.name,e):e.isElementAccessExpression(i)?kue(i.expression,e)||kue(i.argumentExpression,e):e.isParenthesizedExpression(i)||e.isAsExpression(i)||!((r=e.isTypeAssertionExpression)===null||r===void 0)&&r.call(e,i)||!("isTypeAssertionExpression"in e)&&e.isTypeAssertion(i)?kue(i.expression,e):!1}function eur(i){let{node:e,environment:r,evaluate:o,throwError:u,typescript:d,logger:h,getCurrentError:v}=i,S=[];for(let L=0;L<e.arguments.length;L++)if(S[L]=o.expression(e.arguments[L],i),v()!=null)return;let k=o.expression(e.expression,i);if(v()==null)if(Zcr(k)){let L=kue(e.expression,d)?Kk(e,r,g7):void 0,z=k.invoke(L?.literal,...S);return v()!=null?void 0:(h.logResult(z,"CallExpression"),z)}else{if(e.questionDotToken==null&&typeof k!="function")return u(new eCt({value:k,node:e.expression,environment:r}));let L=typeof k!="function"?void 0:iCt(e,i,k(...S));return v()!=null?void 0:(h.logResult(L,"CallExpression"),L)}}function tur({node:i,evaluate:e,...r}){return e.expression(i.expression,r)}function b6(i,e){return{parentEnv:i,startingNode:e,env:{}}}function OX(i,e){let r=Array.isArray(i)?i:i.modifiers;return r!=null&&r.some(o=>o.kind===e)}function RX(i,e,r){let{node:o,evaluate:u,environment:d,typescript:h,getCurrentError:v}=i,S=o.filter(k=>!(h.isIdentifier(k.name)&&k.name.text==="this"));for(let k=0;k<S.length;k++){let L=S[k];if(L.dotDotDotToken!=null){if(u.nodeWithArgument(L,e.slice(k),i),v()!=null)return;break}else{if(u.nodeWithArgument(L,e[k],i),v()!=null)return;if(r!=null&&h.isIdentifier(L.name)&&(OX(L,h.SyntaxKind.PublicKeyword)||OX(L,h.SyntaxKind.ProtectedKeyword)||OX(L,h.SyntaxKind.PrivateKeyword))){let z=Kk(L,d,L.name.text);z!=null&&(r[L.name.text]=z.literal)}}}}function nur(i){let{node:e,environment:r,evaluate:o,stack:u,typescript:d,getCurrentError:h}=i,v=OX(e,d.SyntaxKind.AsyncKeyword)?async(...S)=>{let k=b6(r,e),L={...i,environment:k};if(PB({...L,path:S2,value:!1,newBinding:!0}),PB({...L,path:"arguments",value:arguments,newBinding:!0}),RX({...i,node:e.parameters,environment:k},S),h()==null)return d.isBlock(e.body)?(o.statement(e.body,L),h()!=null?void 0:UT(e,k,!0,S2)?u.pop():void 0):o.expression(e.body,L)}:(...S)=>{let k=b6(r,e),L={...i,environment:k};if(PB({...L,path:S2,value:!1,newBinding:!0}),PB({...L,path:"arguments",value:arguments,newBinding:!0}),RX({...i,node:e.parameters,environment:k},S),h()==null)return d.isBlock(e.body)?(o.statement(e.body,L),h()!=null?void 0:UT(e,k,!0,S2)?u.pop():void 0):o.expression(e.body,L)};return v.toString=()=>"[Function: anonymous]",Object.setPrototypeOf(v,Kk(e,r,"Function").literal),v}function rur({node:i}){return i.text}function iur({node:i}){return Number(i.text)}function sur({node:i,typescript:e}){return i.kind===e.SyntaxKind.TrueKeyword}function aur({node:i,environment:e}){let r=Kk(i,e,"Function").literal;return new r(`return ${i.text}`)()}function our(i){let{node:e,evaluate:r,environment:o,getCurrentError:u}=i,d=Kk(e,o,"Object").literal,h=d.create(d.prototype);PB({...i,path:g7,value:h,newBinding:!0});for(let v of e.properties)if(r.nodeWithArgument(v,h,i),u()!=null)return;return h}function lur(i){return i!=null&&i[Symbol.iterator]!=null}function cur(i){let{node:e,environment:r,evaluate:o,typescript:u,getCurrentError:d}=i,v=Kk(e,r,"Array").literal.of();for(let S of e.elements){let k=o.expression(S,i);if(d()!=null)return;u.isSpreadElement(S)&&lur(k)?v.push(...k):v.push(k)}return v}var tCt=class extends y7{constructor({node:e,environment:r,message:o=`'${e.text}' is not defined'`}){super({message:o,environment:r,node:e})}};function zEn(i){let{node:e,environment:r,typeChecker:o,evaluate:u,stack:d,logger:h,reporting:v,typescript:S,throwError:k,getCurrentError:L}=i,z=Kk(e,r,e.text);if(z!=null)return h.logBinding(e.text,z.literal,"Lexical Environment match"),z.literal;let te=S.isShorthandPropertyAssignment(e.parent)?o?.getShorthandAssignmentValueSymbol(e.parent):o?.getSymbolAtLocation(e),_e=te?.valueDeclaration;if(te!=null&&_e==null)try{let Ae=o?.getAliasedSymbol(te);_e=Ae?.valueDeclaration}catch{}if(_e==null){let Ae=D9t(e.parent,e.text,i);if(L()!=null)return;if(lTn(Ae)&&!S.isIdentifier(Ae))_e=Ae;else if(Ae!=null)return PB({...i,path:e.text,value:Ae}),h.logBinding(e.text,Ae,"Discovered declaration value"),Ae}if(_e!=null){if(_e.getSourceFile().isDeclarationFile){let Ie=Q0t({...i,node:_e});return L()!=null?void 0:(PB({environment:r,path:e.text,value:Ie,reporting:v,node:_e}),h.logBinding(e.text,Ie,`Discovered declaration value${_e.getSourceFile()===e.getSourceFile()?"":` (imported into '${e.getSourceFile().fileName}' from '${_e.getSourceFile().fileName}')`}`),Ie)}if(S.isVariableDeclaration(_e)&&_e.getSourceFile().fileName===e.getSourceFile().fileName&&_e.pos>e.pos)if(S.isVariableDeclarationList(_e.parent)&&QEn(_e.parent,S)){PB({...i,path:e.text,value:void 0,newBinding:!0,node:_e}),h.logBinding(e.text,void 0,"Hoisted var declaration");return}else return k(new tCt({node:e,environment:r}));if(u.declaration(_e,i),L()!=null)return;let Ae=d.pop();return PB({...i,path:e.text,value:Ae,node:_e}),h.logBinding(e.text,Ae,`Discovered declaration value${_e.getSourceFile()===e.getSourceFile()?"":` (imported into '${e.getSourceFile().fileName}' from '${_e.getSourceFile().fileName}')`}`),Ae}return k(new tCt({node:e,environment:r}))}function uur(i){let{node:e,environment:r,typescript:o,evaluate:u,getCurrentError:d}=i,h=b6(r,e);for(let v=0;v<e.statements.length;v++){let S=e.statements[v];if(!(o.isConstructorDeclaration(e.parent)&&v===0&&o.isExpressionStatement(S)&&o.isCallExpression(S.expression)&&sCt(S.expression.expression,o))&&(u.statement(S,{...i,environment:h}),d()!=null||UT(e,h,!0,aR,B7,S2)))break}}function fur({node:i,evaluate:e,stack:r,...o}){let{getCurrentError:u}=o;if(PB({...o,environment:o.environment,path:S2,value:!0,node:i}),i.expression==null)r.push(void 0);else{let d=e.expression(i.expression,o);if(u()!=null)return;r.push(d)}}function cTn({node:i,evaluate:e,...r}){for(let o of i.declarations)if(e.declaration(o,r),r.getCurrentError()!=null)return}function pur({node:i,...e}){cTn({node:i.declarationList,...e})}function dur(i){var e,r;let{node:o,environment:u,evaluate:d,reporting:h,typescript:v,throwError:S,getCurrentError:k}=i,L=d.expression(o.operand,i);if(k()==null)switch(o.operator){case v.SyntaxKind.PlusToken:return+L;case v.SyntaxKind.MinusToken:return-L;case v.SyntaxKind.TildeToken:return~L;case v.SyntaxKind.ExclamationToken:return!L;case v.SyntaxKind.PlusPlusToken:{if(!v.isIdentifier(o.operand)&&!(!((e=v.isPrivateIdentifier)===null||e===void 0)&&e.call(v,o.operand)))return S(new IN({node:o.operand,environment:u,typescript:v}));let z=zqe(u,o.operand.text),te=++z[o.operand.text];return h.reportBindings!=null&&h.reportBindings({path:o.operand.text,value:te,node:o}),te}case v.SyntaxKind.MinusMinusToken:{if(!v.isIdentifier(o.operand)&&!(!((r=v.isPrivateIdentifier)===null||r===void 0)&&r.call(v,o.operand)))return S(new IN({node:o.operand,environment:u,typescript:v}));let z=zqe(u,o.operand.text),te=--z[o.operand.text];return h.reportBindings!=null&&h.reportBindings({path:o.operand.text,value:te,node:o}),te}}}function _ur(i){let{evaluate:e,node:r,statementTraversalStack:o,environment:u,typescript:d,getCurrentError:h}=i,v=e.expression(r.expression,i);if(v==null||h()!=null)return;let S=r.questionDotToken!=null&&v==null?void 0:v[r.name.text];return typeof S=="function"&&o.includes(d.SyntaxKind.CallExpression)?{[k9t]:0,invoke:(k,...L)=>iCt(r,i,k!=null&&!A9t(S,u)?v[r.name.text].call(k,...L):v[r.name.text](...L))}:S}function mur(i){let{node:e,environment:r,evaluate:o,statementTraversalStack:u,typescript:d,getCurrentError:h}=i,v=o.expression(e.expression,i);if(h()!=null)return;let S=o.expression(e.argumentExpression,i);if(h()!=null)return;let k=e.questionDotToken!=null&&v==null?void 0:v[S];return typeof k=="function"&&u.includes(d.SyntaxKind.CallExpression)?{[k9t]:0,invoke:(L,...z)=>iCt(e,i,L!=null&&!A9t(k,r)?v[S].call(L,...z):v[S](...z))}:k}function hur({node:i,evaluate:e,...r}){return e.expression(i.expression,r)}function Bur(i){let{node:e,environment:r,evaluate:o,stack:u,typescript:d,getCurrentError:h}=i,v=e.name==null?void 0:e.name.text,S=OX(e,d.SyntaxKind.AsyncKeyword)?async function(...L){let z=b6(r,e),te={...i,environment:z};if(PB({...te,path:S2,value:!1,newBinding:!0}),PB({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&PB({...te,path:g7,value:this,newBinding:!0}),RX({...i,node:e.parameters,environment:z},L),h()!=null)return;let _e=e.getSourceFile();if(v!=null&&_e.isDeclarationFile)return Q0t(i)(...L);if(e.body!=null&&(o.statement(e.body,te),h()==null&&UT(e,z,!0,S2)))return u.pop()}:function(...L){let z=b6(r,e),te={...i,environment:z};if(PB({...te,path:S2,value:!1,newBinding:!0}),PB({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&PB({...te,path:g7,value:this,newBinding:!0}),RX({...te,node:e.parameters},L),h()!=null)return;let _e=e.getSourceFile();if(v!=null&&_e.isDeclarationFile)return Q0t(i)(...L);if(e.body!=null&&(o.statement(e.body,te),h()==null&&UT(e,z,!0,S2)))return u.pop()};v!=null&&PB({...i,path:v,value:S.bind(S)}),S.toString=()=>`[Function${v==null?"":`: ${v}`}]`,Object.setPrototypeOf(S,Kk(e,r,"Function").literal),u.push(S)}function gur({node:i,evaluate:e,...r}){let{getCurrentError:o}=r,u=e.expression(i.expression,r);if(o()==null){if(u){if(e.statement(i.thenStatement,r),o()!=null)return}else if(i.elseStatement!=null)return e.statement(i.elseStatement,r)}}function yur({node:i,evaluate:e,stack:r,...o}){let u=e.expression(i.expression,o);o.getCurrentError()==null&&r.push(u)}function Cur({node:i,evaluate:e,...r}){let o="";o+=i.head.text;for(let u of i.templateSpans){let d=e.expression(u.expression,r);if(r.getCurrentError()!=null)return;o+=d,o+=u.literal.text}return o}function vur({node:i,evaluate:e,...r}){return e.expression(i.expression,r)}function bur(i){var e,r;let{evaluate:o,node:u,environment:d,typescript:h,throwError:v,reporting:S}=i;switch(o.expression(u.operand,i),u.operator){case h.SyntaxKind.PlusPlusToken:{if(!h.isIdentifier(u.operand)&&!(!((e=h.isPrivateIdentifier)===null||e===void 0)&&e.call(h,u.operand)))return v(new IN({node:u.operand,environment:d,typescript:h}));let k=zqe(d,u.operand.text)[u.operand.text]++;return S.reportBindings!=null&&S.reportBindings({path:u.operand.text,value:k,node:u}),k}case h.SyntaxKind.MinusMinusToken:{if(!h.isIdentifier(u.operand)&&!(!((r=h.isPrivateIdentifier)===null||r===void 0)&&r.call(h,u.operand)))return v(new IN({node:u.operand,environment:d,typescript:h}));let k=zqe(d,u.operand.text)[u.operand.text]--;return S.reportBindings!=null&&S.reportBindings({path:u.operand.text,value:k,node:u}),k}}}function Sur({node:i,evaluate:e,...r}){let{getCurrentError:o}=r,u=[];if(i.arguments!=null){for(let h=0;h<i.arguments.length;h++)if(u[h]=e.expression(i.arguments[h],r),o()!=null)return}let d=e.expression(i.expression,r);if(o()==null)return typeof d=="function"&&PB({...r,node:i,path:"[[NewTarget]]",value:d,newBinding:!0}),iCt(i,r,new d(...u))}function xur({node:i,evaluate:e,...r}){return e.expression(i.expression,r)}function Eur({node:i,evaluate:e,...r}){return e.expression(i.expression,r)}function Tur({node:i,evaluate:e,...r}){let o=e.expression(i.expression,r);r.getCurrentError()==null&&e.nodeWithArgument(i.caseBlock,o,r)}var S9t=class extends y7{constructor({message:e="It is not possible to evaluate an async iterator'",typescript:r,environment:o}){var u,d;super({message:e,environment:o,node:(d=(u=r.factory)===null||u===void 0?void 0:u.createEmptyStatement())!==null&&d!==void 0?d:r.createEmptyStatement()})}};function Dur(i){let{node:e,environment:r,evaluate:o,logger:u,typescript:d,throwError:h,getCurrentError:v}=i,S=o.expression(e.expression,i);if(v()==null){if(d.isVariableDeclarationList(e.initializer)){if(e.initializer.declarations.length>1)return h(new IN({node:e.initializer.declarations[1],environment:r,typescript:d}))}else return h(new IN({node:e.initializer,environment:r,typescript:d}));if(e.awaitModifier!=null)return h(new S9t({typescript:d,environment:r}));for(let k of S){let L=b6(r,e),z={...i,environment:L};if(PB({...z,path:aR,value:!1,newBinding:!0}),PB({...z,path:B7,value:!1,newBinding:!0}),o.nodeWithArgument(e.initializer.declarations[0],k,z),v()!=null||(o.statement(e.statement,z),v()!=null))return;if(UT(e,L,!0,aR)){u.logBreak(e,d);break}else if(UT(e,L,!0,B7)){u.logContinue(e,d);continue}else if(UT(e,L,!0,S2)){u.logReturn(e,d);return}}}}function Aur({node:i,environment:e}){let r=Kk(i,e,g7);return r?.literal}function kur(i){PB({...i,path:aR,value:!0})}function wur(i){PB({...i,path:B7,value:!0})}function Iur({environment:i,evaluate:e,typescript:r,...o}){let{node:u,getCurrentError:d}=o,h=b6(i,u),v={...o,environment:h};if(u.initializer!==void 0){if(r.isVariableDeclarationList(u.initializer)){for(let S of u.initializer.declarations)if(e.declaration(S,v),d()!=null)return}else if(e.expression(u.initializer,v),d()!=null)return}for(;;){let S=b6(h,u),k={...o,environment:S};if(PB({...k,path:aR,value:!1,newBinding:!0}),PB({...k,path:B7,value:!1,newBinding:!0}),!(u.condition==null?!0:e.expression(u.condition,v))||d()!=null||(e.statement(u.statement,k),d()!=null))return;if(UT(u,S,!0,aR))break;if(UT(u,S,!0,S2))return;if(u.incrementor!=null){if(e.expression(u.incrementor,v),d()!=null)return}else if(UT(u,S,!0,B7))continue}}function Pur(i){let{node:e,environment:r,evaluate:o,logger:u,typescript:d,getCurrentError:h}=i,v=o.expression(e.expression,i);if(h()==null)for(;v;){let S=b6(r,e),k={...i,environment:S};if(PB({...k,path:aR,value:!1,newBinding:!0}),PB({...k,path:B7,value:!1,newBinding:!0}),o.statement(e.statement,k),h()!=null)return;if(UT(e,S,!0,aR)){u.logBreak(e,d);break}else if(UT(e,S,!0,S2)){u.logReturn(e,d);return}if(v=o.expression(e.expression,i),h()!=null)return;if(UT(e,S,!0,B7)){u.logContinue(e,d);continue}}}function Nur(i){let{node:e,environment:r,evaluate:o,logger:u,typescript:d,throwError:h,getCurrentError:v}=i,S=o.expression(e.expression,i);if(v()==null){if(d.isVariableDeclarationList(e.initializer)){if(e.initializer.declarations.length>1)return h(new IN({node:e.initializer.declarations[1],environment:r,typescript:d}))}else return h(new IN({node:e.initializer,environment:r,typescript:d}));for(let k in S){let L=b6(r,e),z={...i,environment:L};if(PB({...z,path:aR,value:!1,newBinding:!0}),PB({...z,path:B7,value:!1,newBinding:!0}),o.nodeWithArgument(e.initializer.declarations[0],k,z),v()!=null||(o.statement(e.statement,z),v()!=null))return;if(UT(e,L,!0,aR)){u.logBreak(e,d);break}else if(UT(e,L,!0,B7)){u.logContinue(e,d);continue}else if(UT(e,L,!0,S2)){u.logReturn(e,d);return}}}}function Lur(i){let{node:e,environment:r,evaluate:o,stack:u,typescript:d,getCurrentError:h}=i,v=e.name==null?void 0:e.name.text,S=OX(e,d.SyntaxKind.AsyncKeyword)?async function(...L){let z=b6(r,e),te={...i,environment:z};if(PB({...te,path:S2,value:!1,newBinding:!0}),PB({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&PB({...te,path:g7,value:this,newBinding:!0}),RX({...te,node:e.parameters},L),!(e.body==null||h()!=null)&&(o.statement(e.body,te),h()==null&&UT(e,z,!0,S2)))return u.pop()}:function(...L){let z=b6(r,e),te={...i,environment:z};if(PB({...te,path:S2,value:!1,newBinding:!0}),PB({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&PB({...te,path:g7,value:this,newBinding:!0}),RX({...te,node:e.parameters},L),!(e.body==null||h()!=null)&&(o.statement(e.body,te),h()==null&&UT(e,z,!0,S2)))return u.pop()};return v!=null&&PB({...i,path:v,value:S.bind(S)}),S.toString=()=>`[Function${v==null?"":`: ${v}`}]`,Object.setPrototypeOf(S,Kk(e,r,"Function").literal),S}var x9t=class extends y7{constructor({node:e,environment:r,message:o="Missing catch or finally after try"}){super({node:e,environment:r,message:o})}};function Fur(i){let{node:e,evaluate:r,environment:o,throwError:u}=i,d,h=()=>{try{return r.statement(e.tryBlock,{...i,throwError:k=>(d=k,k),getCurrentError:()=>d})}catch(k){d=k}},v=k=>{r.nodeWithArgument(e.catchClause,k,i)},S=()=>{let k;r.statement(e.finallyBlock,{...i,throwError:L=>(k=L,i.throwError(L),L),getCurrentError:()=>k})};if(e.catchClause==null&&e.finallyBlock==null)return u(new x9t({node:e,environment:o}));e.catchClause!=null&&e.finallyBlock==null?(h(),d!=null&&v(d)):e.catchClause!=null&&e.finallyBlock!=null?(h(),d!=null&&v(d),S()):e.catchClause==null&&e.finallyBlock!=null&&(h(),d!=null&&u(d),S())}function uTn({name:i,extendedType:e,ctor:r=()=>{}}){return e==null?new Function("ctor",`return class ${i??""} {constructor () {const ctorReturnValue = ctor.call(this, ...arguments); if (ctorReturnValue != null) return ctorReturnValue;}}`)(r):new Function("extendedType","ctor",`return class ${i??""} extends extendedType {constructor () {super(...arguments); const ctorReturnValue = ctor.call(this, ...arguments); if (ctorReturnValue != null) return ctorReturnValue;}}`)(e,r)}function Jqe(i,e){return"canHaveDecorators"in e?e.canHaveDecorators(i):!0}function qqe(i,e){var r;if("getDecorators"in e)return e.getDecorators(i);{let o="decorators"in i&&Array.isArray(i.decorators)?i.decorators:void 0,u=(r=i.modifiers)===null||r===void 0?void 0:r.filter(d=>"expression"in d);return[...o??[],...u??[]]}}function Our(i){var e;let{node:r,evaluate:o,stack:u,logger:d,typescript:h,getCurrentError:v}=i,S,k=r.members.find(h.isConstructorDeclaration),L=r.members.filter(Ae=>!h.isConstructorDeclaration(Ae)),z;if(k!=null){if(o.declaration(k,i),v()!=null)return;z=u.pop()}if(r.heritageClauses!=null){let Ae=r.heritageClauses.find(Ie=>Ie.token===h.SyntaxKind.ExtendsKeyword);if(Ae!=null){let[Ie]=Ae.types;if(Ie!=null&&(S=o.expression(Ie.expression,i),v()!=null))return}}let te=r.name==null?void 0:r.name.text,_e=uTn({name:te,extendedType:S,ctor:z});if(Jqe(r,h))for(let Ae of(e=qqe(r,h))!==null&&e!==void 0?e:[]){if(o.nodeWithArgument(Ae,[_e],i),v()!=null)return;_e=u.pop()}_e.toString=()=>`[Class${te==null?"":`: ${te}`}]`,te!=null&&PB({...i,path:te,value:_e,newBinding:!0});for(let Ae of L)if(o.nodeWithArgument(Ae,OX(Ae,h.SyntaxKind.StaticKeyword)?_e:_e.prototype,i),v()!=null)return;d.logHeritage(_e),u.push(_e),d.logStack(u)}function Rur(i){let{node:e,environment:r,evaluate:o,stack:u,getCurrentError:d}=i;function h(...v){let S=b6(r,e),k={...i,environment:S};if(PB({...k,path:S2,value:!1,newBinding:!0}),PB({...k,path:"arguments",value:arguments,newBinding:!0}),this!=null&&PB({...k,path:g7,value:this,newBinding:!0}),RX({...k,node:e.parameters},v,this),!(e.body==null||d()!=null)&&(o.statement(e.body,k),d()==null&&UT(e,S,!0,S2)))return u.pop()}h.toString=()=>"[Function: constructor]",u.push(h)}function Mur({node:i,environment:e}){let r=Kk(i,e,XCe);return r?.literal}function Gur({node:i,evaluate:e,...r}){return e.expression(i.expression,r)}function jur(i){var e;let{node:r,evaluate:o,stack:u,logger:d,typescript:h,getCurrentError:v}=i,S,k=r.members.find(h.isConstructorDeclaration),L=r.members.filter(Ae=>!h.isConstructorDeclaration(Ae)),z;if(k!=null){if(o.declaration(k,i),v()!=null)return;z=u.pop()}if(r.heritageClauses!=null){let Ae=r.heritageClauses.find(Ie=>Ie.token===h.SyntaxKind.ExtendsKeyword);if(Ae!=null){let[Ie]=Ae.types;if(Ie!=null&&(S=o.expression(Ie.expression,i),v()!=null))return}}let te=r.name==null?void 0:r.name.text,_e=uTn({name:te,extendedType:S,ctor:z});if(Jqe(r,h))for(let Ae of(e=qqe(r,h))!==null&&e!==void 0?e:[]){if(o.nodeWithArgument(Ae,[_e],i),v()!=null)return;_e=u.pop()}_e.toString=()=>`[Class${te==null?"":`: ${te}`}]`,te!=null&&PB({...i,path:te,value:_e,newBinding:!0});for(let Ae of L)if(o.nodeWithArgument(Ae,OX(Ae,h.SyntaxKind.StaticKeyword)?_e:_e.prototype,i),v()!=null)return;return d.logHeritage(_e),_e}function Uur(i){return null}function Wur({node:i,evaluate:e,...r}){e.expression(i.expression,r)}function Vur({evaluate:i,node:e,...r}){let o=i.expression(e.expression,r);if(r.getCurrentError()==null)return typeof o}function Hur({node:i,environment:e}){let r=Kk(i,e,"BigInt").literal;return r(i.text.endsWith("n")?i.text.slice(0,-1):i.text)}function zur(i){let{node:e,environment:r,evaluate:o,stack:u,getCurrentError:d}=i,h=Kk(e,r,"Object").literal,v=h.create(h.prototype),S=e.name.text;PB({...i,path:S,value:v,newBinding:!0});for(let k of e.members)if(o.nodeWithArgument(k,v,i),d()!=null)return;v.toString=()=>`[Enum: ${S}]`,u.push(v)}function Jur(i){let{node:e,evaluate:r,environment:o,typeChecker:u,stack:d,getCurrentError:h}=i,v=Kk(e,o,"Object").literal,S=v.create(v.prototype),k=u?.getSymbolAtLocation(e);if(k!=null){let L=k.exports;if(L!=null)for(let[z,te]of L.entries()){let _e=te.valueDeclaration;if(_e==null||(r.declaration(_e,i),h()!=null))return;S[z]=d.pop()}}d.push(S)}function qur(i){let{getCurrentError:e,stack:r}=i,o=Q0t(i);e()==null&&r.push(o)}function Kur({node:i,evaluate:e,...r}){i.importClause!=null&&e.declaration(i.importClause,r)}function Xur({node:i,evaluate:e,...r}){let{getCurrentError:o,throwError:u}=r,d=e.expression(i.expression,r);if(o()==null)return u(d)}var E9t=class extends Iue{constructor({duration:e,environment:r,node:o,message:u=`Maximum operation duration exceeded: ${e}`}){super({violation:"maxOpDuration",message:u,node:o,environment:r}),this.duration=e}};async function Yur(i){let{node:e,environment:r,evaluate:o,policy:u,throwError:d,getCurrentError:h}=i,v=u.maxOpDuration===1/0?void 0:setTimeout(()=>{d(new E9t({duration:u.maxOpDuration,node:e,environment:r}))},u.maxOpDuration),S=o.expression(e.expression,i);if(v!=null&&clearTimeout(v),h()==null)return S}function Qur({node:i,evaluate:e,...r}){let{getCurrentError:o}=r,u=e.expression(i.condition,r);if(o()==null)return u?e.expression(i.whenTrue,r):e.expression(i.whenFalse,r)}function aCt(i,e){let r=i;for(;r!=null&&!e.isSourceFile(r);){if(OX(r,e.SyntaxKind.StaticKeyword))return!0;r=r.parent}return!1}function fTn(i,e){var r,o;let{node:u,environment:d,evaluate:h,stack:v,typescript:S,getCurrentError:k}=i,L=h.nodeWithValue(u.name,i);if(k()!=null)return;let z=aCt(u,S);if(e==null){let _e;if(S.isClassLike(u.parent)){if(h.declaration(u.parent,i),k()!=null)return;_e=v.pop()}else if(_e=h.expression(u.parent,i),k()!=null)return;v.push(z?_e[L]:_e.prototype[L]);return}let te=OX(u,S.SyntaxKind.AsyncKeyword)?async function(...Ae){let Ie=b6(d,u),Xe={...i,environment:Ie};if(PB({...Xe,path:S2,value:!1,newBinding:!0}),PB({...Xe,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(PB({...Xe,path:g7,value:this,newBinding:!0}),PB({...Xe,path:XCe,value:z?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RX({...i,node:u.parameters,environment:Ie},Ae),!(u.body==null||k()!=null)&&(h.statement(u.body,Xe),k()==null&&UT(u,Ie,!0,S2)))return v.pop()}:function(...Ae){let Ie=b6(d,u),Xe={...i,environment:Ie};if(PB({...Xe,path:S2,value:!1,newBinding:!0}),PB({...Xe,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(PB({...Xe,path:g7,value:this,newBinding:!0}),PB({...Xe,path:XCe,value:z?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RX({...i,node:u.parameters,environment:Ie},Ae),!(u.body==null||k()!=null)&&(h.statement(u.body,Xe),k()==null&&UT(u,Ie,!0,S2)))return v.pop()};if(te.toString=()=>`[Method: ${L}]`,Object.setPrototypeOf(te,Kk(u,d,"Function").literal),e[L]=te,Jqe(u,S))for(let _e of(r=qqe(u,S))!==null&&r!==void 0?r:[]){if(h.nodeWithArgument(_e,[e,L],i),k()!=null)return;v.pop()}if(u.parameters!=null){let _e=u.parameters.filter(Ae=>!(S.isIdentifier(Ae.name)&&Ae.name.text==="this"));for(let Ae=0;Ae<_e.length;Ae++){let Ie=_e[Ae];if(Jqe(Ie,S))for(let Xe of(o=qqe(Ie,S))!==null&&o!==void 0?o:[]){if(h.nodeWithArgument(Xe,[e,L,Ae],i),k()!=null)return;v.pop()}}}}function pTn({node:i,evaluate:e,typescript:r,stack:o,...u},d){var h;let{getCurrentError:v}=u,S=e.nodeWithValue(i.name,u);if(v()==null){if(d==null){if(e.declaration(i.parent,u),v()!=null)return;let k=o.pop(),L=aCt(i,r);o.push(L?k[S]:k.prototype[S]);return}if(d[S]=i.initializer==null?void 0:e.expression(i.initializer,u),v()==null&&Jqe(i,r))for(let k of(h=qqe(i,r))!==null&&h!==void 0?h:[]){if(e.nodeWithArgument(k,[d,S],u),v()!=null)return;o.pop()}}}function dTn(i,e){let{node:r,environment:o,evaluate:u,stack:d,typescript:h,getCurrentError:v}=i;if(h.isTypeLiteralNode(r.parent)||h.isInterfaceDeclaration(r.parent))return;let S=u.nodeWithValue(r.name,i);if(v()!=null)return;let k=aCt(r,h);if(e==null){let te;if(h.isClassLike(r.parent)){if(u.declaration(r.parent,i),v()!=null)return;te=d.pop()}else if(te=u.expression(r.parent,i),v()!=null)return;d.push(k?te[S]:te.prototype[S]);return}function L(){let te=b6(o,r),_e={...i,environment:te};if(PB({..._e,path:S2,value:!1,newBinding:!0}),PB({..._e,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(PB({..._e,path:g7,value:this,newBinding:!0}),PB({..._e,path:XCe,value:k?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),r.body!=null&&(u.statement(r.body,_e),v()==null&&UT(r,te,!0,S2)))return d.pop()}L.toString=()=>`[Get: ${S}]`;let z=Object.getOwnPropertyDescriptor(e,S);z==null&&(z={}),Object.defineProperty(e,S,{...z,configurable:!0,get:L})}function $ur({node:i,evaluate:e,...r}){let{getCurrentError:o}=r;if(!(i.name!=null&&(e.declaration(i.name,r),o()!=null))&&i.namedBindings!=null)if("elements"in i.namedBindings){for(let u of i.namedBindings.elements)if(e.declaration(u,r),o()!=null)return}else e.declaration(i.namedBindings.name,r)}function Zur({node:i,evaluate:e,...r}){var o;e.declaration((o=i.propertyName)!==null&&o!==void 0?o:i.name,r)}function efr({node:i,evaluate:e,...r}){e.declaration(i.name,r)}var nCt=class extends y7{constructor({node:e,environment:r,message:o="'SyntaxError'"}){super({message:o,environment:r,node:e})}};function tfr({node:i,typescript:e,throwError:r,environment:o}){var u,d;switch(i.keywordToken){case e.SyntaxKind.NewKeyword:switch(i.name.text){case"target":return(u=Kk(i,o,"[[NewTarget]]"))===null||u===void 0?void 0:u.literal;default:return r(new nCt({node:i.name,environment:o}))}case e.SyntaxKind.ImportKeyword:switch(i.name.text){case"meta":return(d=Kk(i,o,"import.meta"))===null||d===void 0?void 0:d.literal;default:return r(new nCt({node:i.name,environment:o}))}}}function I9t({node:i,...e}){var r,o,u,d,h,v;return e.typescript.isIdentifier(i)?zEn({node:i,...e}):!((o=(r=e.typescript).isPrivateIdentifier)===null||o===void 0)&&o.call(r,i)?zEn({node:i,...e}):e.typescript.isStringLiteralLike(i)?rur({node:i,...e}):e.typescript.isNumericLiteral(i)?iur({node:i,...e}):iTn(i,e.typescript)?sur({node:i,...e}):e.typescript.isForOfStatement(i)?Dur({node:i,...e}):e.typescript.isForInStatement(i)?Nur({node:i,...e}):e.typescript.isForStatement(i)?Iur({node:i,...e}):e.typescript.isWhileStatement(i)?Pur({node:i,...e}):e.typescript.isRegularExpressionLiteral(i)?aur({node:i,...e}):e.typescript.isObjectLiteralExpression(i)?our({node:i,...e}):e.typescript.isAwaitExpression(i)?Yur({node:i,...e}):!((d=(u=e.typescript).isTypeAssertionExpression)===null||d===void 0)&&d.call(u,i)||!("isTypeAssertionExpression"in e.typescript)&&e.typescript.isTypeAssertion(i)?vur({node:i,...e}):e.typescript.isTemplateExpression(i)?Cur({node:i,...e}):e.typescript.isMethodDeclaration(i)?fTn({node:i,...e}):e.typescript.isPropertyDeclaration(i)?pTn({node:i,...e}):e.typescript.isGetAccessorDeclaration(i)?dTn({node:i,...e}):e.typescript.isArrayLiteralExpression(i)?cur({node:i,...e}):e.typescript.isSourceFile(i)?Jur({node:i,...e}):e.typescript.isModuleDeclaration(i)?qur({node:i,...e}):e.typescript.isPrefixUnaryExpression(i)?dur({node:i,...e}):e.typescript.isPostfixUnaryExpression(i)?bur({node:i,...e}):e.typescript.isVariableStatement(i)?pur({node:i,...e}):e.typescript.isComputedPropertyName(i)?hur({node:i,...e}):e.typescript.isVariableDeclarationList(i)?cTn({node:i,...e}):e.typescript.isImportDeclaration(i)?Kur({node:i,...e}):e.typescript.isImportClause(i)?$ur({node:i,...e}):e.typescript.isImportSpecifier(i)?Zur({node:i,...e}):e.typescript.isNamespaceImport(i)?efr({node:i,...e}):e.typescript.isImportEqualsDeclaration(i)?({...e},void 0):e.typescript.isMetaProperty(i)?tfr({node:i,...e}):e.typescript.isThrowStatement(i)?Xur({node:i,...e}):e.typescript.isVariableDeclaration(i)?aTn({node:i,...e}):e.typescript.isEnumDeclaration(i)?zur({node:i,...e}):e.typescript.isConstructorDeclaration(i)?Rur({node:i,...e}):e.typescript.isBinaryExpression(i)?$cr({node:i,...e}):e.typescript.isParenthesizedExpression(i)?tur({node:i,...e}):e.typescript.isExpressionStatement(i)?yur({node:i,...e}):e.typescript.isArrowFunction(i)?nur({node:i,...e}):e.typescript.isFunctionDeclaration(i)?Bur({node:i,...e}):e.typescript.isFunctionExpression(i)?Lur({node:i,...e}):e.typescript.isClassDeclaration(i)?Our({node:i,...e}):e.typescript.isIfStatement(i)?gur({node:i,...e}):e.typescript.isConditionalExpression(i)?Qur({node:i,...e}):e.typescript.isPropertyAccessExpression(i)?_ur({node:i,...e}):e.typescript.isElementAccessExpression(i)?mur({node:i,...e}):e.typescript.isCallExpression(i)?eur({node:i,...e}):e.typescript.isSwitchStatement(i)?Tur({node:i,...e}):e.typescript.isNewExpression(i)?Sur({node:i,...e}):e.typescript.isNonNullExpression(i)?xur({node:i,...e}):e.typescript.isAsExpression(i)?Eur({node:i,...e}):e.typescript.isBlock(i)?uur({node:i,...e}):e.typescript.isClassExpression(i)?jur({node:i,...e}):e.typescript.isSpreadElement(i)?Gur({node:i,...e}):e.typescript.isTryStatement(i)?Fur({node:i,...e}):e.typescript.isReturnStatement(i)?fur({node:i,...e}):oTn(i,e.typescript)?Aur({node:i,...e}):e.typescript.isVoidExpression(i)?Wur({node:i,...e}):e.typescript.isTypeOfExpression(i)?Vur({node:i,...e}):sCt(i,e.typescript)?Mur({node:i,...e}):sTn(i,e.typescript)?Uur({node:i,...e}):!((v=(h=e.typescript).isBigIntLiteral)===null||v===void 0)&&v.call(h,i)?Hur({node:i,...e}):e.typescript.isBreakStatement(i)?kur({node:i,...e}):e.typescript.isContinueStatement(i)?wur({node:i,...e}):e.typescript.isTypeAliasDeclaration(i)?({...e},void 0):e.typescript.isInterfaceDeclaration(i)?({...e},void 0):e.getCurrentError()!=null?void 0:e.throwError(new IN({node:i,environment:e.environment,typescript:e.typescript}))}function P9t(){return[]}function nfr(i){i.logger.logNode(i.node,i.typescript),i.statementTraversalStack=P9t(),I9t(i)}function rfr(i){let{getCurrentError:e}=i;i.logger.logNode(i.node,i.typescript);let r=I9t(i);if(e()==null)return i.reporting.reportIntermediateResults!=null&&i.reporting.reportIntermediateResults({node:i.node,value:r}),r}function ifr(i){i.logger.logNode(i.node,i.typescript),I9t(i)}function sfr({node:i,evaluate:e,typescript:r,logger:o,...u},d){var h;r.isIdentifier(i)||!((h=r.isPrivateIdentifier)===null||h===void 0)&&h.call(r,i)?(PB({...u,node:i,path:i.text,value:d,newBinding:!0}),o.logBinding(i.text,d,"evaluateBindingName")):e.nodeWithArgument(i,d,u)}function afr(i,e){let{node:r,environment:o,evaluate:u,typescript:d,getCurrentError:h}=i,v=u.nodeWithValue(r.name,i);if(h()!=null)return;let S=aCt(r,d);function k(...z){let te=b6(o,r),_e={...i,environment:te};PB({..._e,path:S2,value:!1,newBinding:!0}),PB({..._e,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(PB({..._e,path:g7,value:this,newBinding:!0}),PB({..._e,path:XCe,value:S?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RX({..._e,node:r.parameters},z),!(r.body==null||h()!=null)&&(u.statement(r.body,_e),h()==null)}k.toString=()=>`[Set: ${v}]`;let L=Object.getOwnPropertyDescriptor(e,v);L==null&&(L={}),Object.defineProperty(e,v,{...L,configurable:!0,set:k})}function ofr({node:i,evaluate:e,...r},o){let u=e.expression(i.initializer,r);if(r.getCurrentError()!=null)return;let d=e.nodeWithValue(i.name,r);r.getCurrentError()==null&&(o[d]=u)}function lfr({node:i,evaluate:e,logger:r,...o},u){let d=u!=null||i.initializer===void 0?u:e.expression(i.initializer,o);o.getCurrentError()==null&&(r.logBinding(i.name.getText(),d,"evaluateParameterDeclaration"),e.nodeWithArgument(i.name,d,o))}function cfr({node:i,evaluate:e,...r},o){let{getCurrentError:u}=r,d=i.name.text,h=e.expression(i.name,r);u()==null&&(o[d]=h)}function ufr({node:i,evaluate:e,...r},o){let u=e.expression(i.expression,r);r.getCurrentError()==null&&Object.assign(o,u)}function ffr({node:i,evaluate:e,...r},o){let u=o[Symbol.iterator](),d=0;for(;d<i.elements.length;){let{done:h,value:v}=u.next();if(h===!0)break;if(e.nodeWithArgument(i.elements[d++],v,r),r.getCurrentError()!=null)return}}function pfr(i,e){var r,o,u,d;let{node:h,evaluate:v,logger:S,typescript:k,getCurrentError:L}=i,z=h.initializer==null?void 0:v.expression(h.initializer,i);if(L()==null){if((k.isIdentifier(h.name)||!((r=k.isPrivateIdentifier)===null||r===void 0)&&r.call(k,h.name))&&h.propertyName!=null){let te=h.name.text,_e=v.nodeWithValue(h.propertyName,i);if(L()!=null)return;let Ae=k.isArrayBindingPattern(h.parent)?e:e[_e];PB({...i,path:te,value:Ae??z,newBinding:!0})}else if((k.isIdentifier(h.name)||!((o=k.isPrivateIdentifier)===null||o===void 0)&&o.call(k,h.name))&&h.propertyName==null){let te=h.name.text,_e=k.isArrayBindingPattern(h.parent)?e:e[te],Ae=_e??z;S.logBinding(h.name.text,Ae),PB({...i,path:h.name.text,value:Ae,newBinding:!0})}else if(!k.isIdentifier(h.name)&&!(!((u=k.isPrivateIdentifier)===null||u===void 0)&&u.call(k,h.name))&&h.propertyName!=null){let te=v.nodeWithValue(h.propertyName,i);if(L()!=null)return;let _e=k.isArrayBindingPattern(h.parent)?e:e[te],Ae=_e??z;if(v.nodeWithArgument(h.name,Ae,i),L()!=null)return}else if(!k.isIdentifier(h.name)&&!(!((d=k.isPrivateIdentifier)===null||d===void 0)&&d.call(k,h.name))&&h.propertyName==null){let te=e??z;if(v.nodeWithArgument(h.name,te,i),L()!=null)return}}}function dfr({node:i,evaluate:e,...r},o){for(let u of i.elements)if(e.nodeWithArgument(u,o,r),r.getCurrentError()!=null)return}function _fr(i,e){let{node:r,evaluate:o,environment:u,getCurrentError:d}=i,h=b6(u,r),v={...i,environment:h};PB({...v,path:aR,value:!1,newBinding:!0});for(let S of r.clauses){if(o.nodeWithArgument(S,e,v),d()!=null)return;if(UT(r,h,!0,aR,B7,S2))break}}function mfr({node:i,evaluate:e,...r},o){let{getCurrentError:u}=r;if(!(e.expression(i.expression,r)!==o||u()!=null))for(let h of i.statements){if(e.statement(h,r),u()!=null)return;if(UT(i,r.environment,!0,aR,B7,S2))break}}function hfr(i){let{node:e,evaluate:r,environment:o,getCurrentError:u}=i;for(let d of e.statements){if(r.statement(d,i),u()!=null)return;if(UT(e,o,!0,aR,B7,S2))break}}function Bfr(i,e){let{node:r,evaluate:o,environment:u,getCurrentError:d}=i,h=r.variableDeclaration==null?u:b6(u,r),v={...i,environment:h};r.variableDeclaration!=null&&(o.nodeWithArgument(r.variableDeclaration,e,v),d()!=null)||o.statement(r.block,v)}function gfr(i,e,r,o){let u=arguments.length,d=u<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,h;for(let v=i.length-1;v>=0;v--)(h=i[v])&&(d=(u<3?h(d):u>3?h(e,r,d):h(e,r))||d);return u>3&&d&&Object.defineProperty(e,r,d),d}function yfr(i,e){return function(r,o){e(r,o,i)}}function Cfr(i,[e,r,o]){let{node:u,evaluate:d,environment:h,throwError:v,stack:S,getCurrentError:k}=i,L=d.expression(u.expression,i);if(k()==null){if(typeof L!="function")return v(new eCt({node:u,environment:h,value:L,message:`${w9t(L)} is not a valid decorator implementation'`}));S.push(gfr([o!=null?yfr(o,L):L],e,r))}}function vfr(i,e){let{node:r,typeChecker:o,evaluate:u,getCurrentError:d}=i,h=o?.getConstantValue(r);if(h==null)if(r.initializer!=null){if(h=u.expression(r.initializer,i),d()!=null)return}else{let S=r.parent.members,k=S.findIndex(te=>te===r),L=S.slice(0,k),z=0;for(let te of[...L].reverse())if(z++,te.initializer!=null){let _e=u.expression(te.initializer,i);if(d()!=null)return;if(typeof _e=="number"){h=_e+z;break}}h==null&&(h=k)}let v=u.nodeWithValue(r.name,i);d()==null&&(typeof h=="string"?e[v]=h:e[e[v]=h??0]=v)}function bfr(i,e){i.logger.logNode(i.node,i.typescript,"nodeWithArgument");let{node:r,...o}=i;if(o.typescript.isGetAccessorDeclaration(r))dTn({node:r,...o},e);else if(o.typescript.isSetAccessorDeclaration(r))afr({node:r,...o},e);else if(o.typescript.isPropertyAssignment(r))ofr({node:r,...o},e);else if(o.typescript.isPropertyDeclaration(r))pTn({node:r,...o},e);else if(o.typescript.isParameter(r))lfr({node:r,...o},e);else if(o.typescript.isEnumMember(r))vfr({node:r,...o},e);else if(o.typescript.isShorthandPropertyAssignment(r))cfr({node:r,...o},e);else if(o.typescript.isDecorator(r))Cfr({node:r,...o},e);else if(o.typescript.isSpreadAssignment(r))ufr({node:r,...o},e);else if(o.typescript.isMethodDeclaration(r))fTn({node:r,...o},e);else if(o.typescript.isArrayBindingPattern(r))ffr({node:r,...o},e);else if(o.typescript.isBindingElement(r))pfr({node:r,...o},e);else if(o.typescript.isObjectBindingPattern(r))dfr({node:r,...o},e);else if(o.typescript.isVariableDeclaration(r))aTn({node:r,...o},e);else if(o.typescript.isCaseBlock(r))_fr({node:r,...o},e);else if(o.typescript.isCaseClause(r))mfr({node:r,...o},e);else if(o.typescript.isDefaultClause(r))hfr({node:r,...o});else if(o.typescript.isCatchClause(r))Bfr({node:r,...o},e);else if(o.typescript.isBindingName(r))sfr({node:r,...o},e);else if(o.typescript.isOmittedExpression(r))({...o});else{if(i.getCurrentError()!=null)return;o.throwError(new IN({node:r,environment:o.environment,typescript:o.typescript}))}}function Sfr({node:i,evaluate:e,typescript:r,...o}){var u;return r.isComputedPropertyName(i)?e.expression(i.expression,o):r.isIdentifier(i)||!((u=r.isPrivateIdentifier)===null||u===void 0)&&u.call(r,i)?i.text:e.expression(i,o)}function xfr(i){i.logger.logNode(i.node,i.typescript,"nodeWithValue");let{node:e,...r}=i;return i.typescript.isPropertyName(e)||i.typescript.isPrivateIdentifier(e)?Sfr({node:e,...r}):i.throwError(new IN({node:e,environment:i.environment,typescript:i.typescript}))}function Efr(i){let e=0,{policy:r,reporting:o}=i,u=(v,S)=>{let{environment:k=i.environment,statementTraversalStack:L=i.statementTraversalStack,getCurrentError:z=i.getCurrentError,throwError:te=i.throwError}=S??{},_e=z();if(_e!=null)return _e;if(e++,e>=r.maxOps)return te(new v9t({ops:e,environment:k,node:v}));L.push(v.kind),o.reportTraversal!=null&&o.reportTraversal({node:v})},d={statement:(v,S)=>{let k={...S,statementTraversalStack:P9t()},L=u(v,k);if(!_ne(L))return nfr(h(v,k))},declaration:(v,S)=>{let k=u(v,S);if(!_ne(k))return ifr(h(v,S))},nodeWithArgument:(v,S,k)=>{let L=u(v,k);if(!_ne(L))return bfr(h(v,k),S)},expression:(v,S)=>{let k=u(v,S);return _ne(k)?k:rfr(h(v,S))},nodeWithValue:(v,S)=>{let k=u(v,S);return _ne(k)?k:xfr(h(v,S))}};function h(v,S){return{...i,...S,evaluate:d,node:v}}return d}function Hqe(i,e){return i===e.SyntaxKind.NumericLiteral?"NumericLiteral":e.SyntaxKind[i]}var T9t=class{constructor(e={}){let{logLevel:r=0,color:{info:o="white",verbose:u="yellow",debug:d="magenta"}={}}=typeof e=="object"?e:{logLevel:e};this.options={logLevel:r,color:{info:o,verbose:u,debug:d}}}logInfo(e){this.options.logLevel<1||console.log(this.formatWithColor(this.options.color.info,e))}logVerbose(e){this.options.logLevel<2||console.log(this.formatWithColor(this.options.color.verbose,e))}logDebug(e){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,e))}logContinue(e,r){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"continue")} encountered within ${this.formatWithColor(this.options.color.debug,Hqe(e.kind,r))}`)}logBreak(e,r){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"break")} encountered within ${this.formatWithColor(this.options.color.debug,Hqe(e.kind,r))}`)}logReturn(e,r){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"return")} encountered within ${this.formatWithColor(this.options.color.debug,Hqe(e.kind,r))}`)}logResult(e,r){this.options.logLevel<1||(r!=null?console.log(this.formatWithColor(this.options.color.info,`(intermediate value from context '${r}'):`),this.formatWithColor(this.options.color.info,"[RESULT]:"),this.compactValue(e)):console.log(this.formatWithColor(this.options.color.info,"[RESULT]:"),e))}logNode(e,r,o){if(this.options.logLevel<3)return;let u=`[${Hqe(e.kind,r)}]`.padEnd(25);o!=null&&(u+=this.formatWithColor(this.options.color.debug,`(${o})`));let d=e.getText(),h=this.formatWithColor(this.options.color.debug,u),v=this.formatWithColor(this.options.color.debug,d);console.log(h),console.log(v)}logBinding(e,r,o){this.options.logLevel<2||console.log(`${o==null?"":this.formatWithColor(this.options.color.verbose,`(${o}): `)}${this.formatWithColor(this.options.color.verbose,`${e} ->`)}`,this.formatWithColor(this.options.color.verbose,this.compactValue(r)))}logHeritage(e){if(this.options.logLevel<3)return;let r=Object.getPrototypeOf(e);r.toString().includes("[Class")&&console.log(`${this.formatWithColor(this.options.color.debug,e.toString())} ${this.formatWithColor(this.options.color.debug,"extends")} ${this.formatWithColor(this.options.color.debug,r.toString())}`)}logStack(e){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,`Stack value: ${w9t(this.compactValue(e.lastItem))}`))}logStatementTraversalStack(e,r){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,`[${e.map(o=>Hqe(o,r)).join(", ")}]`))}compactValue(e){return(0,qEn.inspect)(e,{depth:0,colors:!0,compact:!0,maxArrayLength:5})}formatWithColor(e,r){return KEn.default[e](r)}};function Tfr(i,e){var r;return e.isExpressionNode(i)||e.isIdentifier(i)||((r=e.isPrivateIdentifier)===null||r===void 0?void 0:r.call(e,i))}function Dfr(i,e){return e.isStatementButNotDeclaration(i)}function Afr(){let i=[];return{[Symbol.iterator](){return i[Symbol.iterator]()},get length(){return i.length},get lastItem(){return i[i.length-1]},push(...e){return i.push(...e)},pop(){return i.pop()}}}function kfr(i,e,r){i.reportErrors!=null&&!i.reportedErrorSet.has(e)&&(i.reportedErrorSet.add(e),i.reportErrors({error:e,node:e instanceof y7?e.node:r}))}function wfr(){return new WeakSet}function _Tn({typeChecker:i,node:e,environment:{preset:r="NODE",extra:o={}}={},moduleOverrides:u={},typescript:d=Dcr,logLevel:h=0,policy:{deterministic:v=!1,network:S=!1,console:k=!1,maxOps:L=1/0,maxOpDuration:z=1/0,io:te={read:!0,write:!1},process:_e={exit:!1,spawnChild:!1}}={},reporting:Ae={}}){let Ie=Qcr(e,d);if(Ie.success)return Ie;let Xe={deterministic:v,maxOps:L,maxOpDuration:z,network:S,console:k,io:{read:typeof te=="boolean"?te:te.read,write:typeof te=="boolean"?te:te.write},process:{exit:typeof _e=="boolean"?_e:_e.exit,spawnChild:typeof _e=="boolean"?_e:_e.spawnChild}},Ve={...Ae,reportedErrorSet:wfr()},ze,Pt=new T9t(h),Zt=br=>(kfr(Ve,br,br.node),ze=br,ze),mn=Ycr({inputEnvironment:{preset:r,extra:o},startingNode:e,policy:Xe}),Jn=Afr(),wn=P9t(),Cn={policy:Xe,typeChecker:i,typescript:d,logger:Pt,stack:Jn,moduleOverrides:u,reporting:Ve,throwError:Zt,environment:mn,statementTraversalStack:wn,getCurrentError:()=>ze},$n=Efr(Cn);try{let br;return Tfr(e,d)?br=$n.expression(e,Cn):Dfr(e,d)?($n.statement(e,Cn),br=Jn.pop()):YEn(e,d)?($n.declaration(e,Cn),br=Jn.pop()):Zt(new IN({node:e,environment:mn,typescript:d})),ze!=null?{success:!1,reason:ze}:(Pt.logResult(br),{success:!0,value:br})}catch(br){return Zt(br),{success:!1,reason:br}}}var bTn=Km(eG(),1);var C7=Km(eG(),1);var Yqe=Km(eG(),1);var $Ce=Km(eG(),1);var GX=Km(eG(),1);var F9t=Km(eG(),1);var O9t=Km(eG(),1);var Ifr=i=>{if(Array.isArray(i))return"array";if(typeof i=="string")return"string";if(typeof i=="number")return"number";if(typeof i=="boolean")return"boolean";if(i===null)return"null";if(i===void 0)return"undefined";throw new Error(`Unexpected literal type: ${i}`)},VI=i=>i!=null,yTn=i=>i==null,CTn=i=>i!=null&&typeof i=="object",Pfr=i=>Array.isArray(i),Nfr=i=>{let e=typeof i;return e==="string"||e==="number"||e==="boolean"||i===null||i===void 0},x2=i=>Xqe.Node.isAsExpression(i)||Xqe.Node.isParenthesizedExpression(i)||Xqe.Node.isNonNullExpression(i)||Xqe.Node.isTypeAssertion(i)?x2(i.getExpression()):i,Lfr=i=>i.getTagNameNode().getText(),Ffr=/\s+/g,vTn=i=>i.replaceAll(Ffr," "),Ofr=i=>{let e=i.getSourceFile(),[r,o]=[i.getStart(),i.getEnd()],u=e.getLineAndColumnAtPos(r),d=e.getLineAndColumnAtPos(o);return{startPosition:r,startLineNumber:u.line,startColumn:u.column,endPosition:o,endLineNumber:d.line,endColumn:d.column}},Nue=class{type;stack=[];node;constructor(i){this.type=i.type,this.node=i.node,this.stack=[...i.stack??[]]}getNode(){return this.node}getStack(){return this.stack}getRange=()=>Ofr(this.node);toJSON(){let i=this.getRange();return{type:this.type,value:this.value,node:this.node.getKindName(),line:i.startLineNumber,column:i.startColumn}}toString(){return JSON.stringify(this.toJSON(),null,2)}},mTn=class extends Nue{value;isEmpty;constructor(i){super(i),this.value=i.value,this.isEmpty=i.isEmpty}},Rfr=class extends Nue{value;kind;constructor(i){super(i),this.value=i.value,this.kind=i.kind}},Mfr=class extends Nue{value;spreadConditions;constructor(i){super(i),this.value=i.value}},Gfr=class extends Nue{value;constructor(i){super(i),this.value=i.value}},jfr=class extends Nue{},Ufr=class extends Nue{whenTrue;whenFalse;constructor(i){super(i),this.whenTrue=i.whenTrue,this.whenFalse=i.whenFalse}},Wfr=class extends Nue{},t6e=i=>i instanceof Nue;function L9t(i,e,r){return u0(i).when(yTn,()=>{}).when(t6e,o=>o).when(CTn,o=>Of.object(o,e,r)).when(Pfr,o=>o.length===1?L9t(o[0],e,r):o.map(u=>L9t(u,e,r))).when(Nfr,o=>Of.literal(o,e,r)).otherwise(()=>{})}var Of={object(i,e,r){return new mTn({type:"object",value:i,node:e,stack:r})},literal(i,e,r){return new Rfr({type:"literal",value:i,kind:Ifr(i),node:e,stack:r})},map(i,e,r){return new Mfr({type:"map",value:i,node:e,stack:r})},array(i,e,r){return new Gfr({type:"array",value:i,node:e,stack:r})},conditional(i,e,r,o){return new Ufr({type:"conditional",whenTrue:i,whenFalse:e,node:r,stack:o})},from:L9t,emptyObject:(i,e)=>new mTn({type:"object",value:{},isEmpty:!0,node:i,stack:e}),emptyInitializer:(i,e)=>new Wfr({type:"empty-initializer",node:i,stack:e}),unresolvable:(i,e)=>new jfr({type:"unresolvable",node:i,stack:e}),isObject(i){return i?.type==="object"},isLiteral(i){return i?.type==="literal"},isMap(i){return i?.type==="map"},isArray(i){return i?.type==="array"},isUnresolvable(i){return i?.type==="unresolvable"},isConditional(i){return i?.type==="conditional"},isEmptyInitializer(i){return i?.type==="empty-initializer"},isNumberLiteral(i){return Of.isLiteral(i)&&i.kind==="number"},hasValue:i=>Of.isObject(i)||Of.isLiteral(i)||Of.isMap(i)||Of.isArray(i)},STn=Symbol("EvalError"),N9t=new WeakMap,Vfr=(i,e,r)=>{if(r.flags?.skipEvaluate||r.canEval&&!r.canEval?.(i,e))return;if(N9t.has(i))return N9t.get(i);let o=_Tn({node:i.compilerNode,typescript:bTn.ts,policy:{deterministic:!0,network:!1,console:!1,maxOps:Number.POSITIVE_INFINITY,maxOpDuration:1e3,io:{read:!0,write:!1},process:{exit:!1,spawnChild:!1}},...r.getEvaluateOptions?.(i,e)}),u=o.success?o.value:STn;return N9t.set(i,u),u},oCt=(i,e,r)=>{let o=Vfr(i,e,r);if(o!==STn)return o},lCt=K$t("findIdentifierValueDeclaration");function Hfr(i){return C7.Node.isFunctionDeclaration(i)||C7.Node.isFunctionExpression(i)||C7.Node.isArrowFunction(i)||C7.Node.isSourceFile(i)}function zfr(i,e,r){let o=i.getParent();if(!o)return;let u=[],d;if((C7.Node.isVariableDeclaration(o)||C7.Node.isParameterDeclaration(o)||C7.Node.isFunctionDeclaration(o)||C7.Node.isBindingElement(o))&&o.getNameNode()==i)Wd.debug(lCt("getDeclarationFor"),{isDeclarationLike:!0,kind:o.getKindName()}),u.push(o),d=o;else if(C7.Node.isImportSpecifier(o)&&o.getNameNode()==i){if(r.flags?.skipTraverseFiles)return;let h=kTn(o.getImportDeclaration());if(Wd.debug(lCt("getDeclarationFor"),{isImportDeclaration:!0,sourceFile:!!h}),h){let v=[o,h],S=ATn(i.getText(),h,v,r);Wd.debug(lCt("getDeclarationFor"),{from:h.getFilePath(),hasVar:!!S}),S&&(u.push(...v.concat(S)),d=S)}}return Wd.debug(lCt("getDeclarationFor"),{node:i.getKindName(),parent:o.getKindName(),declaration:d?.getKindName()}),d&&e.push(...u),d}var Jfr=i=>{let e=i.getParent();for(;e&&!Hfr(e);)e=e.getParent();return Wd.debug("getInnermostScope",{found:e?.getKindName()}),e};function pCt(i,e,r,o=new Map){let u=i,d,h=!1,v=0,S=[];do{if(u=Jfr(u),Wd.debug("find",{identifier:i.getText(),scope:u?.getKindName(),count:v++}),!u)return;let k=i.getText();if(u.forEachDescendant((L,z)=>{if(o.has(L)){z.skip(),S.push(...o.get(L));return}if(L!=i&&(o.set(L,S),C7.Node.isIdentifier(L)&&L.getText()==k)){let te=[L],_e=zfr(L,te,r);if(_e){if(C7.Node.isParameterDeclaration(_e)){let Ae=_e.getInitializer(),Ie=_e.getTypeNode();Ae?(S.push(...te.concat(Ae)),d=_e):Ie&&C7.Node.isTypeLiteral(Ie)?(S.push(...te.concat(Ie)),d=_e):h=!0,z.stop();return}S.push(...te),d=_e,z.stop()}}}),Wd.debug("find",{scope:u.getKindName(),foundNode:d?.getKindName(),isUnresolvable:h}),d||h)return d&&e.push(...S),d}while(u&&!C7.Node.isSourceFile(u)&&!d&&!h&&v<100);Wd.debug("find",{end:!0,count:v,scope:u?.getKindName(),isUnresolvable:h})}var qfr=(i,e,r)=>u0(i).when($Ce.Node.isPropertyAssignment,o=>{let u=x2(o.getNameNode());return u0(u).when($Ce.Node.isIdentifier,d=>Of.from(d.getText(),d,e)).when($Ce.Node.isComputedPropertyName,d=>{let h=d.getExpression();return e.push(h),jX(h,e,r)}).when(y6.or($Ce.Node.isStringLiteral,$Ce.Node.isNumericLiteral),d=>Of.from(d.getLiteralText(),d,e)).otherwise(()=>{})}).when($Ce.Node.isShorthandPropertyAssignment,o=>{let u=o.getName();if(u!=null)return Of.from(u,o,e)}).otherwise(()=>{}),Kfr=(i,e,r,o)=>{let u=i.getProperties();if(u.length===0)return Of.emptyObject(i,e);let d=[],h=[];u.forEach(k=>{let L=[...e];if(L.push(k),Yqe.Node.isPropertyAssignment(k)||Yqe.Node.isShorthandPropertyAssignment(k)){let z=qfr(k,L,r);if(!z)return;let te=z.value;if(yTn(te)||o&&!o?.({propName:te,propNode:k}))return;if(Yqe.Node.isShorthandPropertyAssignment(k)){let Xe=k.getNameNode();L.push(Xe);let Ve=Ux(Xe,L,r);if(Ve){d.push([te.toString(),Ve]);return}}let _e=k.getInitializer();if(!_e)return;let Ae=x2(_e);L.push(Ae),Wd.debug("prop",{propName:te,kind:Ae.getKindName()});let Ie=Ux(Ae,L,r);if(Wd.debug("prop-value",{propName:te,hasValue:!!Ie}),Ie){Wd.debug("prop-value",{propName:te,maybeValue:Ie}),d.push([te.toString(),Ie]);return}}if(Yqe.Node.isSpreadAssignment(k)){let z=x2(k.getExpression());L.push(z);let te=Ux(z,L,r,o);if(Wd.debug("isSpreadAssignment",{extracted:!!te}),!te)return;if(Of.isObject(te)){Object.entries(te.value).forEach(([_e,Ae])=>{let Ie=Of.from(Ae,z,L);Ie&&d.push([_e,Ie])});return}if(Of.isMap(te)){te.value.forEach((_e,Ae)=>{d.push([Ae,_e])});return}Of.isConditional(te)&&h.push(te)}});let v=new Map;d.forEach(([k,L])=>{v.has(k)&&v.delete(k),v.set(k,L)});let S=Of.map(v,i,e);return h.length>0&&(S.spreadConditions=h),S},R9t=new WeakMap,Xfr=i=>R9t.has(i),Yfr=i=>R9t.get(i),Qfr=i=>i===qd.ts.SyntaxKind.PlusToken,$fr=i=>i===qd.ts.SyntaxKind.BarBarToken||i===qd.ts.SyntaxKind.QuestionQuestionToken||i===qd.ts.SyntaxKind.AmpersandAmpersandToken||i===qd.ts.SyntaxKind.EqualsEqualsEqualsToken||i===qd.ts.SyntaxKind.EqualsEqualsToken||i===qd.ts.SyntaxKind.ExclamationEqualsEqualsToken||i===qd.ts.SyntaxKind.ExclamationEqualsToken||i===qd.ts.SyntaxKind.GreaterThanEqualsToken||i===qd.ts.SyntaxKind.GreaterThanToken||i===qd.ts.SyntaxKind.LessThanEqualsToken||i===qd.ts.SyntaxKind.LessThanToken||i===qd.ts.SyntaxKind.InstanceOfKeyword||i===qd.ts.SyntaxKind.InKeyword,Zfr=i=>i===qd.ts.SyntaxKind.AsteriskToken||i===qd.ts.SyntaxKind.SlashToken||i===qd.ts.SyntaxKind.PercentToken||i===qd.ts.SyntaxKind.AsteriskAsteriskToken||i===qd.ts.SyntaxKind.MinusToken,epr=i=>i===qd.ts.SyntaxKind.BarBarToken||i===qd.ts.SyntaxKind.QuestionQuestionToken;function Ux(i,e,r,o){let u=d=>(R9t.set(i,d),d);return u0(i).when(Xfr,Yfr).when(y6.or(qd.Node.isStringLiteral,qd.Node.isNoSubstitutionTemplateLiteral),d=>{let h=vTn(d.getLiteralValue());return u(Of.literal(h,d,e))}).when(qd.Node.isObjectLiteralExpression,d=>u(Kfr(d,e,r,o))).when(y6.or(qd.Node.isTrueLiteral,qd.Node.isFalseLiteral),d=>{let h=d.getLiteralValue();return u(Of.literal(h,d,e))}).when(qd.Node.isNumericLiteral,d=>{let h=d.getLiteralValue();return u(Of.literal(h,d,e))}).when(qd.Node.isNullLiteral,d=>u(Of.literal(null,d,e))).when(qd.Node.isPrefixUnaryExpression,d=>{let h=d.getOperand(),v=d.getOperatorToken(),S=Ux(h,e,r);if(Of.isNumberLiteral(S))return u(v===qd.ts.SyntaxKind.MinusToken?Of.literal(-Number(S.value),d,e):S)}).when(qd.Node.isArrayLiteralExpression,d=>{let h=d.getElements().map(v=>Ux(v,e,r)??u(Of.unresolvable(v,e)));return u(Of.array(h,d,e))}).when(qd.Node.isIdentifier,d=>u0(d.getText()).with("undefined",()=>u(Of.literal(void 0,d,e))).otherwise(()=>u(cpr(d,e,r)))).when(qd.Node.isTemplateHead,d=>u(Of.literal(d.getLiteralText(),d,e))).when(qd.Node.isTemplateExpression,d=>{let h=ETn(d,e,r);return u(Of.literal(h,d,e))}).when(qd.Node.isTaggedTemplateExpression,d=>u(Ux(d.getTemplate(),e,r))).when(qd.Node.isElementAccessExpression,d=>u(uCt(d,e,r))).when(qd.Node.isPropertyAccessExpression,d=>u(fCt(d,[],e,r))).when(qd.Node.isConditionalExpression,d=>{if(r.flags?.skipConditions)return u(Of.unresolvable(d,e));let h=x2(d.getCondition()),v=(qd.Node.isIdentifier(h)?Ux(h,[],r):oCt(h,e,r))??Of.unresolvable(h,e),S=t6e(v)?v:Of.from(v,d,e);if(Of.isEmptyInitializer(S))return;if(Of.isUnresolvable(S)||Of.isConditional(S)){let te=x2(d.getWhenTrue()),_e=x2(d.getWhenFalse());return u(hTn({whenTrueExpr:te,whenFalseExpr:_e,node:d,stack:e},r))}if(S.value){let te=x2(d.getWhenTrue()),_e=[...e],Ae=Ux(te,_e,r);return u(Ae??Of.unresolvable(te,e))}let k=x2(d.getWhenFalse()),L=[...e],z=Ux(k,L,r);return u(z??Of.unresolvable(d,e))}).when(qd.Node.isCallExpression,d=>{let h=oCt(d,e,r);if(h)return u(Of.from(h,d,e))}).when(qd.Node.isBinaryExpression,d=>{let h=d.getOperatorToken().getKind();return u0(h).when(Qfr,()=>{let v=wTn(d,e,r)??oCt(d,e,r);if(v)return u(Of.from(v,d,e))}).when($fr,v=>{let S=x2(d.getLeft()),k=x2(d.getRight()),L={whenTrueExpr:S,whenFalseExpr:k,node:d,stack:e,canReturnWhenTrue:epr(v)};return u(hTn(L,r))}).when(Zfr,()=>u(Of.literal(oCt(d,e,r),d,e))).otherwise(()=>{})}).otherwise(()=>{})}var xTn=i=>{if(i&&t6e(i)&&Of.isLiteral(i)&&typeof i.value=="string")return i},tpr=i=>{if(i&&t6e(i)&&Of.isLiteral(i)&&typeof i.value=="number")return i},npr=(i,e,r)=>xTn(Ux(i,e,r)),jX=(i,e,r)=>{Wd.debug("prop-name",i.getKindName());let o=Ux(i,e,r),u=xTn(o);if(u)return u;let d=tpr(o);if(d)return d},hTn=({whenTrueExpr:i,whenFalseExpr:e,node:r,stack:o,canReturnWhenTrue:u},d)=>{let h=Ux(i,o,d),v=Ux(e,o,d);if(Wd.debug("cond",{before:!0,whenTrueValue:h,whenFalseValue:v,canReturnWhenTrue:u}),u&&h&&!Of.isUnresolvable(h))return Wd.debug("cond",{earlyReturn:!0,whenTrueValue:h}),h;if(Wd.debug("cond",{after:!0,whenTrueValue:h,whenFalseValue:v}),qd.Node.isBinaryExpression(r)&&r.getOperatorToken().getKind()===qd.ts.SyntaxKind.AmpersandAmpersandToken&&h&&v&&Of.isLiteral(h)&&h.value===!0)return v;if(!h&&!v)return;if(h&&!v)return h;if(!h&&v)return v;let S=h,k=v;return Of.isLiteral(S)&&Of.isLiteral(k)&&S.value===k.value?S:Of.conditional(S,k,r,o)},rpr=(i,e,r,o)=>{let u=[...r];if(Wd.debug("find-prop",{propName:e,kind:i.getKindName()}),qd.Node.isPropertyAssignment(i)){let d=i.getNameNode();if(qd.Node.isIdentifier(d)&&d.getText()===e)return u.push(d),i;if(qd.Node.isStringLiteral(d)&&d.getLiteralText()===e)return u.push(d),d.getLiteralText();if(qd.Node.isComputedPropertyName(d)){let h=x2(d.getExpression()),v=jX(h,u,o);if(!v)return;if(String(v.value)===e)return u.push(d,h),i}}if(qd.Node.isShorthandPropertyAssignment(i)){let d=i.getNameNode();if(qd.Node.isIdentifier(d)&&d.getText()===e)return u.push(d),i}},M9t=(i,e,r,o)=>{let u=[...r],d=e.pop(),h=i.getProperty(d)??i.getProperties().find(v=>rpr(v,d,u,o));if(Wd.debug("get-prop",{propName:d,accessList:e,propertyKind:h?.getKindName(),initializerKind:i.getKindName()}),!!h){if(u.push(h),qd.Node.isPropertyAssignment(h)){let v=h.getInitializer();if(!v)return;if(Wd.debug("get-prop",{propAssignment:!0,propInitKind:v.getKindName()}),qd.Node.isObjectLiteralExpression(v))return e.length>0?M9t(v,e,u,o):Ux(v,u,o);let S=Ux(v,u,o);if(S)return S}if(qd.Node.isShorthandPropertyAssignment(h)){let v=h.getNameNode();if(Wd.debug("get-prop",{shorthand:!0,accessList:e,propInit:v.getText()}),e.length>0)return MX(v,e,u,o);let S=Ux(v,u,o);if(S)return S}}},ETn=(i,e,r)=>{let o=i.getHead(),u=i.getTemplateSpans(),d=npr(o,e,r);if(!d)return;let h=u.map(v=>{let S=v.getExpression(),k=jX(S,e,r);if(!k)return;let L=v.getLiteral();return k.value+L.getLiteralText()});if(h.every(VI))return d.value+h.join("")},TTn=(i,e,r,o)=>{let u=i.getParent();if(Wd.debug("id-def",{parent:u?.getKindName()}),!u)return;let d=u.getParent();if(Wd.debug("id-def",{grandParent:d?.getKindName()}),!!d){if(qd.Node.isArrayBindingPattern(u)){let h=u.getChildIndex();if(Number.isNaN(h))return;if(qd.Node.isVariableDeclaration(d)){let v=d.getInitializer();if(Wd.debug("id-def",{grandParentInit:v?.getKindName()}),!v)return;let S=x2(v);if(!qd.Node.isArrayLiteralExpression(S))return;let k=S.getElements()[h+1];if(Wd.debug("id-def",{index:h,propName:r,elementKind:k?.getKindName()}),!k)return;let L=[...e,S,k],z=Ux(k,L,o);if(!z)return;if(Of.isObject(z)){let _e=z.value[r];return Wd.debug("id-def",{propName:r,propValue:_e}),Of.from(_e,k,L)}if(!Of.isMap(z))return z;let te=z.value.get(r);return te?(Wd.debug("id-def",{propName:r,propValue:te}),te):void 0}}qd.Node.isObjectBindingPattern(u)}};function ipr(i,e,r,o){let u=e.at(-1);if(Wd.debug("maybe-prop-def-value",{propName:u,accessList:e,kind:i.getKindName()}),qd.Node.isVariableDeclaration(i)){let d=i.getInitializer();if(Wd.debug("maybe-prop-def-value",{kind:d?.getKindName(),propName:u}),!d){let k=i.getTypeNode();if(!k)return;if(qd.Node.isTypeLiteral(k)){if(Wd.debug("maybe-prop-def-value",{typeLiteral:!0}),e.length>0){let z=[...r];z.push(k);let te=e.pop(),_e=k.getProperty(te),Ae=_e?.getTypeNode();for(;_e&&e.length>0&&Ae&&qd.Node.isTypeLiteral(Ae);)z.push(_e,Ae),te=e.pop(),_e=Ae.getProperty(te),Ae=_e?.getTypeNode();if(!Ae)return;let Ie=G9t(Ae,z,o);return Wd.debug("maybe-prop-def-value",{propName:te,typeValue:!!Ie}),Of.from(Ie,Ae,z)}let L=DTn(k,u,r,o);return r.push(k),Of.from(L,k,r)}return}let h=x2(d);if(Wd.debug("maybe-prop-def-value",{kind:h.getKindName(),propName:u}),qd.Node.isObjectLiteralExpression(h)){let k=M9t(h,e,r,o);return k?(r.push(h),k):void 0}if(qd.Node.isArrayLiteralExpression(h)){let k=Number(u);if(Number.isNaN(k))return;let L=h.getElements()[k];if(!L)return;r.push(h);let z=Ux(L,r,o);if(z&&t6e(z)&&Of.isLiteral(z))return z}let v=[...r,h],S=Ux(h,v,o);if(S)return S}if(qd.Node.isBindingElement(i)){let d=TTn(i,r,u,o);if(d)return d}}var MX=(i,e,r,o)=>{let u=pCt(i,r,o);if(Wd.debug("maybePropIdentifierValue",{identifier:i.getText(),hasValueDeclaration:!!u}),!u)return Of.unresolvable(i,r);let d=x2(u);Wd.debug("maybePropIdentifierValue",{def:d.getKindName(),accessList:e});let h=ipr(u,e,r,o);return h||Of.unresolvable(i,r)},QCe=new WeakMap,DTn=(i,e,r,o)=>{if(QCe.has(i)){let h=QCe.get(i);if(Wd.debug("cached",{typeLiteralNodeProp:!0,kind:i.getKindName()}),h===null)return;if(h?.has(e))return h.get(e)}let d=i.getMembers().find(h=>qd.Node.isPropertySignature(h)&&h.getName()===e);if(qd.Node.isPropertySignature(d)&&d.isReadonly()){let h=d.getTypeNode();if(!h){QCe.set(i,null);return}let v=G9t(h,r,o);if(Wd.debug("type",{propName:e,hasPropValue:VI(v)}),VI(v))return QCe.has(i)||QCe.set(i,new Map),QCe.get(i).set(e,v),v}QCe.set(i,null)};function spr(i){return Wd.debug("literal",{name:i.getText(),kind:i.getKindName()}),qd.Node.isStringLiteral(i)?i.getLiteralText():i.getText()}var Kqe=new WeakMap,G9t=(i,e,r)=>{if(Kqe.has(i))return Wd.debug("cached",{typeNode:!0,kind:i.getKindName()}),Kqe.get(i);if(qd.Node.isLiteralTypeNode(i)){let o=i.getLiteral();if(qd.Node.isStringLiteral(o)){let u=o.getLiteralText();return Wd.debug("type-value",{result:u}),Kqe.set(i,u),u}}if(qd.Node.isTypeLiteral(i)){let o=i.getMembers();if(!o.some(u=>!qd.Node.isPropertySignature(u)||!u.isReadonly())){let d=o.map(v=>{let S=v.getNameNode(),k=S.getText(),L=spr(S);if(Wd.debug("isTypeLiteral",{nameNodeKind:S.getKindName(),name:L}),!L)return;let z=DTn(i,k,e,r);return[L,z]}).filter(VI),h=Object.fromEntries(d);return Kqe.set(i,h),h}}Kqe.set(i,void 0)},apr=(i,e,r)=>{if(Wd.debug("maybe-def-value",{kind:i.getKindName()}),qd.Node.isShorthandPropertyAssignment(i)){let o=i.getNameNode();return MX(o,[o.getText()],e,r)}if(qd.Node.isVariableDeclaration(i)){let o=i.getInitializer();if(Wd.debug("maybe-def-value",{varDeclaration:!0,kind:o?.getKindName()}),!o){let v=i.getTypeNode();if(!v)return;if(Wd.debug("maybe-def-value",{noInit:!0,kind:v.getKindName()}),qd.Node.isTypeLiteral(v)){e.push(v);let S=G9t(v,e,r);if(VI(S))return Of.from(S,i,e)}return Of.unresolvable(i,e)}let u=x2(o),d=[...e,u],h=Ux(u,d,r);if(h)return h}if(qd.Node.isBindingElement(i)){let o=i.getInitializer();if(!o){let v=i.getPropertyNameNode()??i.getNameNode(),S=v.getText(),k=[...e,v];Wd.debug("maybe-def-value",{bindingElement:!0,propName:S});let L=TTn(i,k,S,r);return L||Of.unresolvable(i,e)}let u=x2(o),d=[...e,u],h=Ux(u,d,r);if(h)return h}},ATn=(i,e,r,o)=>{let u=e.getVariableDeclaration(i);if(Wd.debug("getExportedVarDeclarationWithName",{varName:i,path:e.getFilePath(),hasVar:!!u}),u)return u;let d=lpr(i,e,r,o);if(Wd.debug("getExportedVarDeclarationWithName",{exportDeclaration:!!d}),!!d)return d},opr=(i,e)=>{let r=e.getNamedExports();if(r.length===0)return!0;for(let o of r){let u=o.getNameNode().getText();if(Wd.debug("export-declaration",{searching:i,exportedName:u}),u===i)return!0}},kTn=i=>{let e=i.getProject(),r=i.getModuleSpecifierValue();if(Wd.debug("getModuleSpecifierSourceFile",{moduleName:r}),!r)return;let o=i.getSourceFile().getFilePath(),u=qd.ts.resolveModuleName(r,o,e.getCompilerOptions(),e.getModuleResolutionHost());if(Wd.debug("getModuleSpecifierSourceFile",u),!u.resolvedModule)return;let d=e.addSourceFileAtPath(u.resolvedModule.resolvedFileName);return Wd.debug("getModuleSpecifierSourceFile",{found:!!d}),d};function lpr(i,e,r,o){for(let u of e.getExportDeclarations()){let d=[u];if(Wd.debug("resolveVarDeclarationFromExportWithName",{symbolName:i,exporDeclarationKind:u.getKindName()}),!opr(i,u))continue;let h=kTn(u);if(!h)continue;d.push(h);let v=ATn(i,h,r,o);if(v)return r.push(...d.concat(v)),v}}var cpr=(i,e,r)=>{let o=pCt(i,e,r);if(Wd.debug("id-ref",{identifier:i.getText(),hasValueDeclaration:!!o}),!o)return Of.unresolvable(i,e);let u=x2(o);Wd.debug("id-ref",{def:u.getKindName()});let d=[...e],h=apr(u,d,r);return h||Of.unresolvable(i,d)},wTn=(i,e,r)=>{let o=x2(i.getLeft()),u=x2(i.getRight()),d=jX(o,e,r),h=jX(u,e,r);if(!(!d||!h)&&(Wd.debug("tryComputingPlusTokenBinaryExpressionToString",{leftValue:d,rightValue:h}),VI(d.value)&&VI(h.value)))return Of.literal(String(d.value)+String(h.value),i,e)},uCt=(i,e,r)=>{let o=x2(i.getExpression()),u=i.getArgumentExpression();if(!u)return;let d=x2(u),h=[...e,o,d],v=jX(d,h,r);if(qd.Node.isIdentifier(o)&&v)return VI(v.value)?MX(o,[v.value.toString()],h,r):void 0;if(qd.Node.isBinaryExpression(d)){if(d.getOperatorToken().getKind()!==qd.ts.SyntaxKind.PlusToken)return;let S=wTn(d,h,r)??jX(d,h,r);if(S&&qd.Node.isIdentifier(o))return VI(S.value)?MX(o,[S.value.toString()],h,r):void 0}if(qd.Node.isTemplateExpression(d)){let S=ETn(d,h,r);if(S&&qd.Node.isIdentifier(o))return MX(o,[S],h,r)}if(qd.Node.isObjectLiteralExpression(o)&&v)return VI(v.value)?M9t(o,[v.value.toString()],h,r):void 0;if(qd.Node.isPropertyAccessExpression(d))return fCt(d,[],h,r);if(qd.Node.isPropertyAccessExpression(o)&&v&&VI(v.value)){let S=fCt(o,[],h,r);if(!S)return Of.unresolvable(o,h);let k=v.value.toString();if(Wd.debug("PropertyAccessExpression",{propRefValue:S,propName:k}),Of.isObject(S)){let L=S.value[k];return Of.from(L,d,h)}if(Of.isMap(S)){let L=S.value.get(k);return Of.from(L,d,h)}if(Of.isArray(S)){let L=S.value[Number(k)];return Of.from(L,d,h)}return Of.unresolvable(o,h)}if(qd.Node.isIdentifier(o)&&qd.Node.isElementAccessExpression(d)){let S=uCt(d,h,r);if(Wd.debug("element:access",{isArgElementAccessExpression:!0,propName:S}),typeof S=="string"&&VI(S))return MX(o,[S],h,r)}if(qd.Node.isElementAccessExpression(o)&&v&&VI(v.value)){let S=uCt(o,h,r);if(Wd.debug("element:access",{isElementAccessExpression:!0,identifier:S,argValue:v}),CTn(S)){let k=v.value.toString();if(Of.isMap(S)){let L=S.value.get(k);return Wd.debug("isMap",{isElementAccessExpression:!0,maybeValue:L}),L}if(Of.isObject(S)){let L=S.value[k];return Wd.debug("isObject",{isElementAccessExpression:!0,maybeLiteralValue:L}),L?Of.from(L,i,h):void 0}}}if(qd.Node.isArrayLiteralExpression(o)&&v)return upr(o,Number(v.value),h,r);if(qd.Node.isConditionalExpression(d)){if(r.flags?.skipConditions)return Of.unresolvable(d,h);let S=jX(d,h,r);if(Wd.debug("isConditional",{isConditionalExpression:!0,propName:S}),VI(S)&&VI(S.value)&&qd.Node.isIdentifier(o))return MX(o,[S.value.toString()],h,r);let k=x2(d.getWhenTrue()),L=x2(d.getWhenFalse()),z=jX(k,h,r),te=jX(L,h,r);if(qd.Node.isIdentifier(o)){let _e=z&&VI(z.value)?MX(o,[z.value.toString()],h,r):void 0,Ae=te&&VI(te.value)?MX(o,[te.value.toString()],h,r):void 0;return!_e&&!Ae?void 0:_e&&!Ae?_e:!_e&&Ae?Ae:Of.conditional(_e,Ae,d,h)}}},upr=(i,e,r,o)=>{let u=i.getElements()[e];if(!u)return;let d=Ux(u,r,o);if(Wd.debug("array:element",{arrayKind:i.getKindName(),elementKind:u.getKindName(),value:d}),VI(d))return d},fCt=(i,e,r,o)=>{let u=i.getName(),d=x2(i.getExpression()),h=e.concat(u);if(Wd.debug("prop-access-value",{propName:u,accessList:h,elementAccessedKind:d.getKindName()}),r.push(d),qd.Node.isIdentifier(d))return MX(d,h,r,o);if(qd.Node.isPropertyAccessExpression(d)){let v=fCt(d,h,r,o);return Wd.debug("prop-access-value",{propName:u,propValue:v}),v}if(qd.Node.isElementAccessExpression(d)){let v=uCt(d,r,o);if(!v)return;if(Wd.debug("prop-access-value",{propName:u,leftElementAccessed:v}),Of.isObject(v)){let S=v.value[u];return Of.from(S,i,r)}if(Of.isMap(v)){let S=v.value.get(u);return Of.from(S,i,r)}}},BTn=()=>!0,dCt=(i,e,r=BTn,o=BTn)=>{let u=i.getArguments(),d=i.getExpression().getText();return u.length===0?Of.array([],i,[]):Of.array(u.map((h,v)=>{let S=x2(h),k=[i,S];return u0(S).when(L=>o({fnNode:i,fnName:d,argNode:L,index:v}),L=>Ux(L,k,e,r)??Of.unresolvable(L,k)).otherwise(()=>Of.unresolvable(S,k))}),i,[])},_Ct=(i,e)=>{let r=i.getInitializer(),o=[i,r];return u0(r).with(vE.nullish,()=>{let u=i.getNameNode();return Of.emptyInitializer(u,o)}).when(F9t.Node.isStringLiteral,u=>{let d=u.getLiteralText();return Of.literal(vTn(d),u,o)}).when(F9t.Node.isJsxExpression,u=>{let d=u.getExpression();if(!d)return;let h=x2(d);if(!h)return;o.push(h);let v=Ux(h,o,e);if(v)return v}).otherwise(()=>{})},ITn=(i,e,r)=>{let o=x2(i.getExpression());return Ux(o,[],e,r)},gTn=(i,e)=>i?t6e(i)?Of.isUnresolvable(i)||Of.isConditional(i)?new Map:Of.isMap(i)?i.value:new Map(Object.entries(i.value).map(([r,o])=>{let u=Of.from(o,i.getNode()??e,i.getStack()??[]);return[r,u||null]}).filter(([,r])=>r!==null)):new Map(Object.entries(i)):new Map,fpr=y6.or(GX.Node.isImportDeclaration,GX.Node.isExportDeclaration),PTn=({ast:i,...e})=>{let{components:r,functions:o,taggedTemplates:u}=e,d=new Map,h=new Map,v,S,k,L,z;return i.forEachDescendant((te,_e)=>{if(fpr(te)){_e.skip();return}if(r){if(GX.Node.isJsxOpeningElement(te)||GX.Node.isJsxSelfClosingElement(te)){if(v=te,S=Lfr(v),k=S.includes("."),!r.matchTag({tagNode:v,tagName:S,isFactory:k})){v=void 0;return}d.has(S)||d.set(S,{kind:"component",nodesByProp:new Map,queryList:[]}),L=d.get(S).nodesByProp,h.has(v)||h.set(v,{name:S,props:new Map,conditionals:[]}),z=h.get(v)}if(GX.Node.isJsxSpreadAttribute(te)){if(!v||!z)return;let Ae=({propName:ze,propNode:Pt})=>r.matchProp({tagNode:v,tagName:S,propName:ze,propNode:Pt}),Ie=ITn(te,e,gX(Ae));if(!Ie)return;let Xe=ze=>{let Pt=gTn(ze,te),Zt=Of.isMap(ze),mn=Of.map(Pt,te,[v]);Zt&&ze.spreadConditions?.length&&(mn.spreadConditions=ze.spreadConditions),Pt.forEach((Jn,wn)=>{(Zt||Ae({propName:wn,propNode:te}))&&(z.props.set(wn,Jn),L.set(wn,(L.get(wn)??[]).concat(Jn)))})};(ze=>u0(ze).when(Of.isConditional,Pt=>{z.conditionals.push(Pt)}).when(y6.or(Of.isObject,Of.isMap),Pt=>Xe(Pt)).otherwise(D_t))(Ie);return}if(GX.Node.isJsxAttribute(te)){if(!v||!z)return;let Ae=te.getNameNode().getText();if(!r.matchProp({tagNode:v,tagName:S,propName:Ae,propNode:te}))return;TA(_Ct(te,e),HJe.fromNullable,HJe.tap(Ie=>{z.props.set(Ae,Ie),L.set(Ae,(L.get(Ae)??[]).concat(Ie))}))}}if(o&&GX.Node.isCallExpression(te)){let Ae=te.getExpression().getText();if(!o.matchFn({fnNode:te,fnName:Ae}))return;let Ie=({propName:mn,propNode:Jn})=>o.matchProp({fnNode:te,fnName:Ae,propName:mn,propNode:Jn});d.has(Ae)||d.set(Ae,{kind:"function",nodesByProp:new Map,queryList:[]});let Xe=d.get(Ae),Ve=Xe.nodesByProp,ze=dCt(te,e,Ie,o.matchArg),Pt=TA(ze.value,q9.map(mn=>u0(mn).when(y6.or(Of.isObject,Of.isMap),Jn=>{let wn=gTn(Jn,te),Cn=Of.isMap(Jn);wn.forEach((br,cn)=>{(Cn||Ie({propName:cn,propNode:te}))&&Ve.set(cn,(Ve.get(cn)??[]).concat(br))});let $n=Of.map(wn,te,Jn.getStack());return Of.isMap(Jn)&&Jn.spreadConditions?.length&&($n.spreadConditions=Jn.spreadConditions),$n}).otherwise(Jn=>Jn))),Zt={kind:"call-expression",name:Ae,box:Of.array(Pt,te,[])};Xe.queryList.push(Zt)}if(u&&GX.Node.isTaggedTemplateExpression(te)){let Ae=te.getTag(),Ie=GX.Node.isCallExpression(Ae)?Ae.getExpression().getText():Ae.getText();if(!u.matchTaggedTemplate({taggedTemplateNode:te,fnName:Ie}))return;d.has(Ie)||d.set(Ie,{kind:"function",nodesByProp:new Map,queryList:[]});let Xe=d.get(Ie),Ve={kind:"tagged-template",name:Ie,box:Ux(te,[],e)};Xe.queryList.push(Ve)}}),h.forEach((te,_e)=>{let Ae=h.get(_e);if(!Ae)return;let Ie=gX({name:te.name,box:Of.map(Ae.props,_e,[])});Ae.conditionals?.length&&(Ie.box.spreadConditions=Ae.conditionals);let Xe=te.name;d.get(Xe).queryList.push(Ie)}),d},ppr=y6.or(Of.isObject,Of.isMap),NTn=(i,e)=>{let r=i.getTagNameNode().getText(),o=i.getAttributes(),u=new Map;return o.forEach(d=>{if(O9t.Node.isJsxAttribute(d)){let h=d.getNameNode(),v=_Ct(d,e);if(!v)return;u.set(h.getText(),v);return}if(O9t.Node.isJsxSpreadAttribute(d)){let h=ITn(d,e,()=>!0);if(!ppr(h))return;Of.isMap(h)&&h.value.forEach((v,S)=>{u.set(S,v)}),Of.isObject(h)&&Object.entries(h.value).forEach(([v,S])=>{u.set(v,Of.literal(S,i,[]))})}}),{name:r,props:u}},cCt=(i,e)=>{if(!i.length)return e;let r={};return i.reduce((o,u,d)=>{let h=d===i.length-1;return o[u]=h?e:{},h?r:o[u]},r),r},Pue=(i,e)=>u0(i).with(vE.nullish,()=>{}).when(Of.isConditional,r=>{let o=e.path,u=Pue(r.whenTrue,Object.assign({},e,{path:o,parent:r})),d=Pue(r.whenFalse,Object.assign({},e,{path:o,parent:r}));u&&e.conditions.push(cCt(o,u)),d&&e.conditions.push(cCt(o,d))}).when(y6.or(Of.isLiteral,Of.isObject),r=>r.value).when(Of.isEmptyInitializer,()=>!0).when(Of.isMap,r=>{if(r.spreadConditions){let o=e.path;r.spreadConditions.forEach(u=>{let d=Pue(u.whenTrue,Object.assign({},e,{path:o,parent:r})),h=Pue(u.whenFalse,Object.assign({},e,{path:o,parent:r}));d&&e.spreadConditions.push(cCt(o,d)),h&&e.spreadConditions.push(cCt(o,h))})}return TA(q9.from(r.value.entries()),q9.map(([o,u])=>[o,Pue(u,Object.assign({},e,{path:e.path.concat(o),parent:r}))]),q9.filter(([,o])=>VI(o)),Object.fromEntries)}).when(Of.isArray,r=>{let o=0;return TA(r.value,q9.map(u=>Pue(u,Object.assign({},e,{path:e.path.concat(String(o++)),parent:r}))),q9.filter(VI),u=>u.flat())}).otherwise(()=>{}),dpr=new WeakMap,_pr=i=>({value:i,has:e=>i.has(e),get:e=>i.get(e),set:(e,r)=>i.set(e,r)}),UX=(i,e)=>{let r={cache:e?.cache??dpr,...e,path:[],parent:void 0,conditions:[],spreadConditions:[]},o=_pr(r.cache);return{raw:u0(i).with(vE.nullish,()=>{}).when(o.has,o.get).when(Array.isArray,d=>{let h=TA(d,q9.map(v=>Pue(v,r)),q9.filter(VI),q9.head);return o.set(d,h),h}).otherwise(d=>{let h=Pue(d,r);return o.set(d,h),h})??{},conditions:r.conditions,spreadConditions:r.spreadConditions}};oe();oe();oe();oe();function Qqe(i){return Object.prototype.toString.call(i).slice(8,-1)}function mpr(i){return Qqe(i)==="Undefined"}function hpr(i){return Qqe(i)==="Null"}function $qe(i){if(Qqe(i)!=="Object")return!1;let e=Object.getPrototypeOf(i);return e.constructor===Object&&e===Object.prototype}function j9t(i){return Qqe(i)==="Array"}function U9t(i){return Qqe(i)==="Symbol"}var igi=Bpr(hpr,mpr);function Bpr(i,e,r,o,u){return d=>i(d)||e(d)||!!r&&r(d)||!!o&&o(d)||!!u&&u(d)}function gpr(i,e){return j9t(i)&&j9t(e)?i.concat(e):e}function LTn(i,e,r,o){let u={}.propertyIsEnumerable.call(o,e)?"enumerable":"nonenumerable";u==="enumerable"&&(i[e]=r),u==="nonenumerable"&&Object.defineProperty(i,e,{value:r,enumerable:!1,writable:!0,configurable:!0})}function FTn(i,e,r){if(!$qe(e))return e;let o={};if($qe(i)){let v=Object.getOwnPropertyNames(i),S=Object.getOwnPropertySymbols(i);o=[...v,...S].reduce((k,L)=>{let z=i[L];return(!U9t(L)&&!Object.getOwnPropertyNames(e).includes(L)||U9t(L)&&!Object.getOwnPropertySymbols(e).includes(L))&<n(k,L,z,i),k},{})}let u=Object.getOwnPropertyNames(e),d=Object.getOwnPropertySymbols(e);return[...u,...d].reduce((v,S)=>{let k=e[S],L=$qe(i)?i[S]:void 0;L!==void 0&&$qe(k)&&(k=FTn(L,k,r));let z=r?r(L,k,S):k;return LTn(v,S,z,e),v},o)}function OTn(i,...e){return e.reduce((r,o)=>FTn(r,o,gpr),i)}var RTn=i=>Object.prototype.toString.call(i)==="[object Object]";function W9t(i,...e){let r=e.pop();for(let o of e)for(let u in o){let d=r(i[u],o[u]);d===void 0?RTn(i[u])&&RTn(o[u])?i[u]=W9t({},i[u],o[u],r):i[u]=o[u]:i[u]=d}return i}function MTn(i,...e){for(let r of e)for(let o in r)i?.hasOwnProperty?.(o)||(i[o]=r[o]);return i}function ypr(i){return i.reduce((e,{extend:r})=>r?W9t(e,r,(o,u)=>u===void 0?o??[]:o===void 0?[u]:Array.isArray(o)?[u,...o]:[u,o]):e,{})}function Cpr(i){return{...i.reduce((e,r)=>MTn(e,r),{}),extend:ypr(i)}}function Zqe(i){let{extend:e=[],...r}=Cpr(i);return W9t(r,e,(o,u)=>OTn({},o,...u))}var vpr=i=>typeof i=="object"&&Object.keys(i).length===0,bpr=i=>Object.keys(i).reduce((e,r)=>(i[r]!==void 0&&!vpr(i[r])&&(e[r]=i[r]),e),{});function GTn(i){let e=MTn({conditions:Zqe(i.map(r=>r.conditions??{})),theme:Zqe(i.map(r=>r.theme??{})),patterns:Zqe(i.map(r=>r.patterns??{})),utilities:Zqe(i.map(r=>r.utilities??{})),globalCss:Zqe(i.map(r=>r.globalCss??{}))},...i);return bpr(e)}oe();var n6e=require("path"),mCt=require("fs");function jTn(i,e){let r=(0,n6e.resolve)(".",i),o;for((0,mCt.statSync)(r).isDirectory()||(r=(0,n6e.dirname)(r));;){if(o=e(r,(0,mCt.readdirSync)(r)),o)return(0,n6e.resolve)(r,o);if(r=(0,n6e.dirname)(o=r),o===r)break}}var qTn=require("path"),eKe=Km(require("fs"),1),r6e=Km(require("path"),1),KTn=require("path");oe();var UTn=require("esbuild"),WTn=Km(require("path"),1),hCt=Km(require("fs"),1),WX=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+i+'" is not supported')});function Spr(i){let e=hCt.default.realpathSync(i);delete WX.cache[i];let r=WX(e);return{mod:r.default??r,dependencies:[e],code:hCt.default.readFileSync(e,"utf-8")}}async function xpr(i,e){let r=await(0,UTn.build)({absWorkingDir:e,entryPoints:[i],outfile:"out.js",write:!1,platform:"node",bundle:!0,format:"cjs",sourcemap:!1,metafile:!0,mainFields:["module","main"]}),{text:o}=r.outputFiles[0];return{code:o,dependencies:r.metafile?Object.keys(r.metafile.inputs):[]}}function Epr(i,e){let r=WTn.default.extname(i),o=hCt.default.realpathSync(i),u=WX.extensions[r];WX.extensions[r]=(v,S)=>{S===o?v._compile(e,S):u(v,S)},delete WX.cache[WX.resolve(i)];let d=WX(i),h=d.default??d;return WX.extensions[r]=u,h}async function VTn(i,e={}){let{cwd:r=process.cwd()}=e,o=WX.resolve(i,{paths:[r]});try{return Spr(o)}catch{let u=await xpr(o,r);try{u.mod=await Epr(o,u.code)}catch{u.mod=WX("node-eval")(u.code).default}return u}}oe();var HTn=class extends Error{code;hint;constructor(i,e,r){super(e),this.code=`ERR_PANDA_${i}`,this.hint=r?.hint}};var BCt=class extends HTn{constructor(){let i="Cannot find config file: panda.config.ts or panda.config.js/cjs/mjs. Did you forget to run `panda init`?";super("NO_CONFIG",i)}},zTn=class extends HTn{constructor(i){super("CONFIG_ERROR",i)}};var H9t=require("@pandacss/preset-base"),gCt=require("@pandacss/preset-panda"),Tpr=[".ts",".js",".mjs",".cjs"],Dpr=new RegExp(`panda.config(${Tpr.join("|")})$`),Apr=i=>Dpr.test(i);function kpr({cwd:i,file:e}){return e?(0,qTn.resolve)(i,e):jTn(i,(r,o)=>o.find(Apr))}function XTn(i,e){let r=Object.keys(i).sort((u,d)=>JTn(d)-JTn(u)),o=[];for(let u of r){let d=i[u];u=Ipr(u).replace(/\*/g,"(.+)"),o.push({pattern:new RegExp("^"+u+"$"),paths:d.map(h=>(0,KTn.resolve)(e,h))})}return o}var wpr=(i,e)=>{for(let r of i){let o=e.match(r.pattern);if(o)for(let u of r.paths){let d=0;return u.replace(/\*/g,()=>{let v=Math.min(++d,o.length-1);return o[v]})}}};function JTn(i){let e=i.indexOf("*");return i.substr(0,e).length}function Ipr(i){return i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Ppr=[".js",".cjs",".mjs"],Npr=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],Lpr=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];function Fpr(i,e){for(let r of e){let o=`${i}${r}`;if(eKe.default.existsSync(o)&&eKe.default.statSync(o).isFile())return o}for(let r of e){let o=`${i}/index${r}`;if(eKe.default.existsSync(o))return o}return null}var Opr=/import[\s\S]*?['"](.{3,}?)['"]/gi,Rpr=/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,Mpr=/require\(['"`](.+)['"`]\)/gi,Gpr=/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi;function V9t(i,e){let{filename:r,seen:o}=i,u=Fpr(r6e.default.resolve(i.cwd,r),Ppr.includes(i.ext)?Npr:Lpr);if(u===null||(e&&i.foundModuleAliases.set(e,u),o.size>1&&o.has(u)))return;o.add(u);let d=eKe.default.readFileSync(u,"utf-8"),h=[...d.matchAll(Opr),...d.matchAll(Rpr),...d.matchAll(Mpr),...d.matchAll(Gpr)];if(!h.length)return;let v={cwd:r6e.default.dirname(u),ext:r6e.default.extname(u),seen:o,baseUrl:i.baseUrl,pathMappings:i.pathMappings,foundModuleAliases:i.foundModuleAliases};h.forEach(S=>{let k=S[1];if(k[0]==="."){V9t(Object.assign({},v,{filename:k}));return}if(!i.pathMappings)return;let L=wpr(i.pathMappings,k);L&&V9t(Object.assign({},v,{filename:L}),k)})}function YTn(i,e={pathMappings:[]}){if(i===null)return{deps:new Set,aliases:new Map};let r=new Map,o=new Set;return o.add(i),V9t({filename:i,ext:r6e.default.extname(i),cwd:r6e.default.dirname(i),seen:o,baseUrl:e.baseUrl,pathMappings:e.pathMappings??[],foundModuleAliases:r}),{deps:o,aliases:r}}async function QTn(i,e){let{mod:r,dependencies:o}=await VTn(i,{cwd:e,interopDefault:!0});return{config:r?.default??r,dependencies:o}}async function jpr(i,e){let r=i.presets??[],o=[i];for(;r.length>0;){let u=await r.shift();if(typeof u=="string"){let d=await QTn(u,e);o.push(await d.config),r.unshift(...await d.config.presets??[])}else o.push(u),r.unshift(...u.presets??[])}return GTn(o)}var $Tn={"@pandacss/preset-base":H9t.preset,"@pandacss/preset-panda":gCt.preset,"@pandacss/dev/presets":gCt.preset},Upr=Object.keys($Tn),Wpr=i=>Upr.includes(i);async function ZTn(i){let e=await Hpr(i);return Vpr(e,i.cwd)}async function Vpr(i,e){let r=new Set;i.config.eject||r.add(H9t.preset),i.config.presets?i.config.presets.forEach(u=>{typeof u=="string"&&Wpr(u)?r.add($Tn[u]):r.add(u)}):i.config.eject||r.add(gCt.preset),i.config.presets=Array.from(r);let o=await jpr(i.config,e);return{...i,config:o}}async function Hpr(i){let{cwd:e,file:r}=i,o=kpr({cwd:e,file:r});if(!o)throw new BCt;Wd.debug("config:path",o);let u=await QTn(o,e);if(typeof u.config!="object")throw new zTn("\u{1F4A5} Config must export or return an object.");return{...u,config:u.config,path:o}}var qOn=require("fs"),PHt=Km(lGt(),1),NHt=require("path");oe();var l6e=require("path"),cGt=require("fs");var QAn=i=>i===(0,l6e.dirname)(i),Q_r=Symbol("stop"),$_r=i=>i===Q_r;var wCt=(i,e=process.cwd())=>{if(typeof i=="function"&&i(e)instanceof Promise)throw new Error("Async matcher can not be used in 'lookItUpSync'");if(typeof i=="string"){let o=(0,l6e.join)(e,i);return(0,cGt.existsSync)(o)?o:QAn(e)?null:wCt(i,(0,l6e.dirname)(e))}let r=i(e);return $_r(r)?null:r??(QAn(e)?null:wCt(i,(0,l6e.dirname)(e)))};oe();var c6e=Km(require("path"),1),skn=require("fs"),akn=Km(require("path"),1);var nz=Km(require("path"),1),lkn=require("fs"),_Gt=require("module"),Fw=Km(require("path"),1),ckn=require("fs");async function $An(i,e){let r=c6e.default.dirname(c6e.default.resolve(i)),o=e?.root?c6e.default.resolve(e.root):null;for(;r;){let u=await Z_r(r,e);if(u)return u;{if(o===r)break;let d=c6e.default.dirname(r);if(d===r)break;r=d}}throw new Error(`no tsconfig file found for ${i}`)}async function Z_r(i,e){let r=c6e.default.join(i,"tsconfig.json");if(e?.tsConfigPaths)return e.tsConfigPaths.has(r)?r:void 0;try{let o=await skn.promises.stat(r);if(o.isFile()||o.isFIFO())return r}catch(o){if(o.code!=="ENOENT")throw o}}var zyi=akn.default.sep;function emr(i){let e=tmr(nmr(rmr(i)));return e.trim()===""?"{}":e}function tmr(i){let e=!1,r=0,o="",u=null;for(let d=0;d<i.length;d++){let h=i[d];if(h==='"'&&(okn(i,d)||(e=!e)),e){u=null;continue}if(h===","){u=d;continue}u&&(h==="}"||h==="]"?(o+=i.slice(r,u)+" ",r=u+1,u=null):h.match(/\s/)||(u=null))}return o+i.substring(r)}function okn(i,e){let r=e-1,o=0;for(;i[r]==="\\";)r-=1,o+=1;return!!(o%2)}function ICt(i,e,r){return i.slice(e,r).replace(/\S/g," ")}var uGt=Symbol("singleComment"),ZAn=Symbol("multiComment");function nmr(i){let e=!1,r=!1,o=0,u="";for(let d=0;d<i.length;d++){let h=i[d],v=i[d+1];!r&&h==='"'&&(okn(i,d)||(e=!e)),!e&&(!r&&h+v==="//"?(u+=i.slice(o,d),o=d,r=uGt,d++):r===uGt&&h+v===`\r
|
|
21119
|
+
${u}`),i?umt(u):u}catch(r){throw r instanceof XYt&&(Wd.error("sheet",r.message),r.plugin&&Wd.error("sheet",`By plugin: ${r.plugin}:`),r.source&&(Wd.error("sheet",`Line ${r.line}:${r.column}, in:`),Wd.error("sheet",r.source))),r}};append=(...i)=>{this.context.root.append(...i)};prepend=(...i)=>{this.context.root.prepend(...i)}},a1n=class{tokens;classNames=new Map;styles=new Map;shorthands=new Map;types=new Map;propertyKeys=new Map;config={};customValues=new Map;transforms=new Map;configs=new Map;separator="_";prefix="";constructor(i){let{tokens:e,config:r={},separator:o,prefix:u,shorthands:d}=i;this.tokens=e,this.config=r,o&&(this.separator=o),u&&(this.prefix=u),d&&this.assignShorthands(),this.assignColorPaletteProperty(),this.assignProperties(),this.assignPropertyTypes()}register=(i,e)=>{this.assignProperty(i,e),this.assignPropertyType(i,e),this.config[i]=e};assignShorthands=()=>{for(let[i,e]of Object.entries(this.config)){let{shorthand:r}=this.normalize(e)??{};if(!r)continue;(Array.isArray(r)?r:[r]).forEach(u=>{this.shorthands.set(u,i)})}};assignColorPaletteProperty=()=>{let i=this.tokens.colorPalettes;this.config.colorPalette={values:Object.keys(i),transform(e){return i[e]}}};resolveShorthand=i=>this.shorthands.get(i)??i;get hasShorthand(){return this.shorthands.size>0}get isEmpty(){return Object.keys(this.config).length===0}entries=()=>Object.entries(this.config).filter(([,e])=>!!e?.className).map(([e,r])=>[e,r.className]);getPropKey=(i,e)=>`(${i} = ${e})`;hash=(i,e)=>`${i}${this.separator}${e}`;getPropertyValues=(i,e)=>{let{values:r}=i,o=u=>{let d=e?.(u);return d?{[d]:d}:void 0};return MH(r)?o?.(r)??this.tokens.getValue(r)??{}:Array.isArray(r)?r.reduce((u,d)=>(u[d]=d,u),{}):jKt(r)?r(e?o:this.getToken.bind(this)):r};getToken=i=>this.tokens.get(i);normalize=i=>i;assignProperty=(i,e)=>{let r=this.normalize(e);if(this.setTransform(i,r?.transform),!r)return;this.configs.set(i,r);let o=this.getPropertyValues(r);if(o)for(let[u,d]of Object.entries(o)){let h=this.getPropKey(i,u);this.setStyles(i,d,u,h),this.setClassName(i,u)}};assignProperties=()=>{for(let[i,e]of Object.entries(this.config))e&&this.assignProperty(i,e)};getPropertyKeys=i=>{let e=this.propertyKeys.get(i);return e?Array.from(e):[]};assignPropertyType=(i,e)=>{let r=this.normalize(e);if(!r)return;let o=this.getPropertyValues(r,d=>`type:Tokens["${d}"]`);if(typeof o=="object"&&o.type){this.types.set(i,new Set([`type:${o.type}`]));return}if(o){let d=new Set(Object.keys(o));this.types.set(i,d),this.propertyKeys.set(i,d)}let u=this.types.get(i)??new Set;r.property&&this.types.set(i,u.add(`CssProperties["${r.property}"]`))};assignPropertyTypes=()=>{for(let[i,e]of Object.entries(this.config))e&&this.assignPropertyType(i,e)};getTypes=()=>{let i=new Map;for(let[e,r]of this.types.entries()){if(r.size===0){i.set(e,["string"]);continue}let o=Array.from(r).map(u=>u.startsWith("CssProperties")?u:u.startsWith("type:")?u.replace("type:",""):JSON.stringify(u));i.set(e,o)}return i};defaultTransform=GI((i,e)=>{if(e.startsWith("--")){let o=this.tokens.getTokenVar(i);i=typeof o=="string"?o:i}return{[e]:i}});setTransform=(i,e)=>{let o=e??(u=>this.defaultTransform(u,i));return this.transforms.set(i,o),this};setStyles=(i,e,r,o)=>{o=o??this.getPropKey(i,e);let u=v=>this.defaultTransform(v,i),h=(this.transforms.get(i)??u)(e,{token:this.getToken.bind(this),raw:r});return this.styles.set(o,h??{}),this};formatClassName=i=>[this.prefix,i].filter(Boolean).join("-");setClassName=(i,e)=>{let r=this.getPropKey(i,e),o=this.configs.get(i),u;return!o||!o.className?u=this.hash(n3e(i),e):u=this.hash(o.className,e),this.classNames.set(r,u),this};isProperty=i=>this.configs.has(i);getOrCreateClassName=(i,e)=>((o,u)=>{let d=this.getPropKey(o,u);return this.classNames.has(d)||(this.isProperty(o)&&this.customValues.set(o,u),this.setClassName(o,u)),this.classNames.get(d)})(i,e);getOrCreateStyle=(i,e)=>{let r=this.getPropKey(i,e);return this.styles.get(r)??this.setStyles(i,e,e,r),this.styles.get(r)};transform=(i,e)=>{if(e==null)return{className:"",styles:{}};let r=this.resolveShorthand(i);return ZPe({layer:this.configs.get(r)?.layer,className:this.getOrCreateClassName(r,Ndt(e)),styles:this.getOrCreateStyle(r,e)})};keys=()=>{let i=Array.from(this.shorthands.keys()),e=Object.keys(this.config);return[...i,...e]}};oe();oe();var Xqe=Km(eG(),1);var qd=Km(eG(),1);oe();var Dcr=Km(xEn(),1),tG=Km(TEn(),1);oe();var MU=Km(require("path"),1),AEn=Km(require("os"),1),acr=/(^\/\w:\/)|(^\/\w:\\)/,DEn=MU.default.parse(process.cwd()).root,kEn=/^\w:/,ocr=AEn.default.platform();function lcr(i){return/\\/.test(i)||kEn.test(i)}function wEn(i){let e=/^\\\\\?\\/.test(i),r=/[^\u0000-\u0080]+/.test(i);return e||r?i:i.replace(/\\/g,"/")}function ccr(i){let e=typeof i=="string"?i:i.pathname;return e.startsWith("file:")&&(e.startsWith("file://")&&(e=e.slice(7)),acr.test(e)&&(e=e.slice(1))),f9t(e)}function IEn(i){return[...i].some(e=>typeof e=="string"&&lcr(e))?MU.default.win32:MU.default}function Aue(i,e){return wEn(IEn(e)[i](...e))}function PEn(i,e){return MU.default.posix[i](...[...e].map(r=>typeof r=="string"?wEn(r):r))}function ucr(i){return PEn("parse",arguments)}function fcr(i){return PEn("extname",arguments)}function pcr(i){return IEn(arguments).isAbsolute(i)}function dcr(...i){return Aue("join",arguments)}function f9t(i){let e=Aue("normalize",arguments);return i.startsWith("./")&&!e.startsWith("./")?"./"+e:e}function _cr(i,e){return Aue("relative",arguments)}function mcr(...i){return Aue("resolve",arguments)}function hcr(i){return Aue("dirname",arguments)}function Bcr(i,e){return Aue("basename",arguments)}function gcr(i){return Aue("format",arguments)}function ycr(i){return Aue("toNamespacedPath",arguments)}function Ccr(i){return ocr!=="win32"||kEn.test(i)||i.startsWith(DEn)||!MU.default.win32.isAbsolute(MU.default.win32.normalize(i))?i:MU.default.win32.join(DEn,i)}var p9t={sep:MU.default.posix.sep,delimiter:MU.default.posix.delimiter,parse:ucr,isAbsolute:pcr,join:dcr,extname:fcr,normalize:f9t,relative:_cr,resolve:mcr,dirname:hcr,basename:Bcr,format:gcr,toNamespacedPath:ycr,get posix(){return this},get win32(){return NEn}},NEn={...MU.default.win32,get posix(){return p9t},get win32(){return this}},vcr=MU.default,KCe={...p9t,posix:p9t,win32:NEn,native:vcr,includeDriveLetter:Ccr,urlToFilename:ccr};var JEn=require("module"),qEn=require("util"),KEn=Km(GEn(),1),rCt=()=>{let i={Infinity:1/0,NaN:NaN,undefined:void 0,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Array,Boolean,Date,Error,EvalError,Number,Object,RangeError,ReferenceError,RegExp,String,SyntaxError,TypeError,URIError,JSON,Math,escape,unescape,eval,Function};try{i.AggregateError=AggregateError}catch{}try{i.FinalizationRegistry=FinalizationRegistry}catch{}try{i.WeakRef=WeakRef}catch{}try{i.BigInt=BigInt}catch{}try{i.Reflect=Reflect}catch{}try{i.WeakMap=WeakMap}catch{}try{i.WeakSet=WeakSet}catch{}try{i.Set=Set}catch{}try{i.Map=Map}catch{}try{i.Uint8Array=Uint8Array}catch{}try{i.BigUint64Array=BigUint64Array}catch{}try{i.BigInt64Array=BigInt64Array}catch{}try{i.Atomics=Atomics}catch{}try{i.SharedArrayBuffer=SharedArrayBuffer}catch{}try{i.WebAssembly=WebAssembly}catch{}try{i.Uint8ClampedArray=Uint8ClampedArray}catch{}try{i.Uint16Array=Uint16Array}catch{}try{i.Uint32Array=Uint32Array}catch{}try{i.Intl=Intl}catch{}try{i.Int8Array=Int8Array}catch{}try{i.Int16Array=Int16Array}catch{}try{i.Int32Array=Int32Array}catch{}try{i.Float32Array=Float32Array}catch{}try{i.Float64Array=Float64Array}catch{}try{i.ArrayBuffer=ArrayBuffer}catch{}try{i.DataView=DataView}catch{}try{i.isFinite=isFinite}catch{}try{i.Promise=Promise}catch{}try{i.Proxy=Proxy}catch{}try{i.Symbol=Symbol}catch{}return i};function wue(i,e,r){let o={};return[i,e??{},r??{}].forEach(h=>Object.defineProperties(o,Object.getOwnPropertyDescriptors(h))),o}function X0t(i,e){let r={};return Object.getOwnPropertyNames(i).forEach(o=>{o in e||Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(i,o))}),r}var XEn=(0,JEn.createRequire)(_t),Acr=()=>{let i=rCt(),e=wue(X0t(global,i),i,{require:XEn,process,__dirname:r=>KCe.native.normalize(KCe.native.dirname(r)),__filename:r=>KCe.native.normalize(r)});return Object.defineProperties(e,{global:{get(){return e}},globalThis:{get(){return e}}}),e};function kcr(i){let e=0;return{requestAnimationFrame:function(d){let h=new Date().getTime(),v=Math.max(0,16-(h-e)),S=i.setTimeout(function(){d(h+v)},v);return e=h+v,S},cancelAnimationFrame:function(d){clearTimeout(d)}}}var J0t;function wcr(i=!1){return J0t??(J0t=Icr("evaluate against a browser environment",i,"jsdom"))}function Icr(i,e,r=i){try{return XEn(r)}catch{if(e)throw new ReferenceError(`You must install the peer dependency '${r}' in order to ${i} with ts-evaluator`);return}}var Pcr=()=>{let{JSDOM:i}=wcr(!0),{window:e}=new i("",{url:"https://example.com"}),r=rCt(),o=kcr(e),u=wue(X0t(e,r),X0t(o,e),r);return Object.defineProperties(u,{window:{get(){return u}},globalThis:{get(){return u}}}),u},S2="[return]",aR="[break]",B7="[continue]",g7="this",XCe="super",Ncr=()=>{let i=rCt(),e=wue(X0t(global,i),i,{import:{meta:{url:r=>{let o=KCe.normalize(r);return`file:///${o.startsWith("/")?o.slice(1):o}`}}},process});return Object.defineProperties(e,{global:{get(){return e}},globalThis:{get(){return e}}}),e};function YEn(i,e){return e.isDeclaration(i)}function Lcr(i,e){return e.isPropertyAccessExpression(i)?!1:"name"in i&&i.name!=null}function QEn(i,e){return i.flags!==e.NodeFlags.Const&&i.flags!==e.NodeFlags.Let}var y7=class extends Error{constructor({node:e,environment:r,message:o}){super(o),Error.captureStackTrace(this,this.constructor),this.node=e,this.environment=r}};function _ne(i){return typeof i=="object"&&i!=null&&i instanceof y7}var Y0t=class extends y7{constructor({path:e,node:r,environment:o,message:u=`Module '${e}' could not be resolved'`}){super({message:u,environment:o,node:r}),this.path=e}},IN=class extends y7{constructor({node:e,environment:r,typescript:o,message:u=`Unexpected Node: '${o.SyntaxKind[e.kind]}'`}){super({message:u,node:e,environment:r})}};function Fcr(i){var e;let{node:r,evaluate:o,environment:u,typescript:d,throwError:h}=i,v=d.getNameOfDeclaration(r);if(v!=null)return d.isIdentifier(v)||!((e=d.isPrivateIdentifier)===null||e===void 0)&&e.call(d,v)||d.isStringLiteralLike(v)?v.text:d.isNumericLiteral(v)?Number(v.text):d.isComputedPropertyName(v)?o.expression(v.expression,i):h(new IN({node:v,environment:u,typescript:d}))}function $En(i,e){let{node:r,typescript:o}=e;if(!o.isExternalModuleNameRelative(i))return i;let u=r.getSourceFile().fileName;return KCe.join(KCe.dirname(u),i)}function Q0t(i){var e,r,o,u,d;let{node:h,typescript:v,throwError:S,environment:k}=i,L=Fcr(i);if(_ne(L))return L;if(L==null)return S(new IN({node:h,environment:k,typescript:v}));let z=Kk(h,i.environment,L);if(z!=null&&z.literal!=null)return z.literal;let te=Kk(h,i.environment,"require").literal,_e=v.isModuleDeclaration(h)?h:Ocr(h,v.SyntaxKind.ModuleDeclaration,v);if(_e==null)return S(new IN({node:h,environment:k,typescript:v}));let Ae=_e.name.text,Ie=$En(Ae,i);try{let Xe=(u=(r=(e=i.moduleOverrides)===null||e===void 0?void 0:e[Ae])!==null&&r!==void 0?r:(o=i.moduleOverrides)===null||o===void 0?void 0:o[Ie])!==null&&u!==void 0?u:te(Ie);return v.isModuleDeclaration(h)?Xe:(d=Xe[L])!==null&&d!==void 0?d:Xe}catch(Xe){return _ne(Xe)?Xe:S(new Y0t({node:_e,environment:k,path:Ie}))}}function q0t(i,e,r){var o,u,d,h,v,S;let{node:k,throwError:L,environment:z}=r,te=Kk(k,r.environment,"require").literal,_e=$En(e,r);try{let Ae=(h=(u=(o=r.moduleOverrides)===null||o===void 0?void 0:o[e])!==null&&u!==void 0?u:(d=r.moduleOverrides)===null||d===void 0?void 0:d[_e])!==null&&h!==void 0?h:te(_e);return(S=(v=Ae[i])!==null&&v!==void 0?v:Ae.default)!==null&&S!==void 0?S:Ae}catch(Ae){return _ne(Ae)?Ae:L(new Y0t({node:k,environment:z,path:_e}))}}function Ocr(i,e,r){let o=i;for(;;){if(o=o.parent,o==null)return;if(o.kind===e){let u=r.getCombinedNodeFlags(o);if(!((u&r.NodeFlags.Namespace)!==0||(u&r.NodeFlags.NestedNamespace)!==0))return o}if(r.isSourceFile(o))return}}function D9t(i,e,r,o=new WeakSet){let{typescript:u}=r,d;function h(S,k=0){var L,z,te,_e,Ae;if(o.has(S))return!1;if(o.add(S),u.isIdentifier(S)){if(S.text===e)return d=S,!0}else{if(u.isShorthandPropertyAssignment(S))return!1;if(u.isPropertyAssignment(S))return!1;if(u.isImportDeclaration(S)){if(S.importClause!=null){if(S.importClause.name!=null&&h(S.importClause.name)){let Ie=S.moduleSpecifier;if(Ie!=null&&u.isStringLiteralLike(Ie))return d=q0t(e,Ie.text,r),!0}else if(S.importClause.namedBindings!=null&&h(S.importClause.namedBindings))return!0}return!1}else if(u.isImportEqualsDeclaration(S)){if(S.name!=null&&h(S.name)){if(u.isIdentifier(S.moduleReference))return d=D9t(S.parent,S.moduleReference.text,r,o),d!=null;if(u.isQualifiedName(S.moduleReference))return!1;{let Ie=S.moduleReference.expression;if(Ie!=null&&u.isStringLiteralLike(Ie))return d=q0t(e,Ie.text,r),!0}}return!1}else if(u.isNamespaceImport(S)){if(h(S.name)){let Ie=(z=(L=S.parent)===null||L===void 0?void 0:L.parent)===null||z===void 0?void 0:z.moduleSpecifier;return Ie==null||!u.isStringLiteralLike(Ie)?!1:(d=q0t(e,Ie.text,r),!0)}}else if(u.isNamedImports(S)){for(let Ie of S.elements)if(h(Ie))return!0}else if(u.isImportSpecifier(S)){if(h(S.name)){let Ie=(Ae=(_e=(te=S.parent)===null||te===void 0?void 0:te.parent)===null||_e===void 0?void 0:_e.parent)===null||Ae===void 0?void 0:Ae.moduleSpecifier;return Ie==null||!u.isStringLiteralLike(Ie)?!1:(d=q0t(e,Ie.text,r),!0)}}else if(u.isSourceFile(S)){for(let Ie of S.statements)if(h(Ie))return!0}else if(u.isVariableStatement(S)){for(let Ie of S.declarationList.declarations)if(h(Ie)&&(QEn(S.declarationList,u)||k<1))return!0}else if(u.isBlock(S)){for(let Ie of S.statements)if(h(Ie,k+1))return!0}else if(Lcr(S,u)&&S.name!=null&&h(S.name))return d=S,!0}return!1}return u.findAncestor(i,S=>h(S))?d:void 0}function jEn(i,e){let r=i;for(;;){if(r=r.parent,r==null)return;if(YEn(r,e)||e.isSourceFile(r))return r}}function Rcr(i){return i!=null&&(typeof i=="function"||typeof i=="object")}function UEn(i){return Rcr(i)}function A9t(i,e){switch(i){case Function.prototype.bind:case Function.prototype.call:case Function.prototype.apply:return!0}if(e!=null){let r=Kk(void 0,e,"Function").literal;switch(i){case r.prototype.bind:case r.prototype.call:case r.prototype.apply:return!0}}return!1}var dne=class{constructor(e){this.intent=e}construct(e,r){return this.intent(e,r)}};function ZEn(i){return typeof i=="object"&&i!=null&&i instanceof dne}function iCt(i,e,r){return ZEn(r)?e.throwError(r.construct(i,e)):r}function m9t(i){return i.map(e=>typeof e=="symbol"?e.description:e).join(".")}function WEn({hook:i,item:e,scope:r,policy:o}){function u(d,h){let v=(S,k)=>{if(S!==!1)return ZEn(S)||_ne(S)?S:k()};return!UEn(h)||A9t(h)?h:new Proxy(h,{construct(S,k,L){return v(i({kind:"__$$_PROXY_CONSTRUCT",policy:o,newTarget:L,argArray:k,target:S,path:m9t(d)}),()=>Reflect.construct(S,k,L))},apply(S,k,L=[]){return v(i({kind:"__$$_PROXY_APPLY",policy:o,thisArg:k,argArray:L,target:S,path:m9t(d)}),()=>Reflect.apply(S,k,L))},get(S,k,L){let z=[...d,k];return v(i({kind:"__$$_PROXY_GET",policy:o,path:m9t(z),target:S}),()=>{let te=Reflect.get(S,k,L),_e=Reflect.getOwnPropertyDescriptor(h,k);return _e!=null&&_e.configurable===!1&&_e.writable===!1?h[k]:u(z,te)})}})}return UEn(e)?u([r],e):e}function VEn(i,e){switch(i){case"__$$_PROXY_GET":return`get ${e}`;case"__$$_PROXY_APPLY":return`${e}(...)`;case"__$$_PROXY_CONSTRUCT":return`new ${e}(...)`}}var eTn={"node:http2":"http2",http2:{connect:{__$$_PROXY_APPLY:!0},createSecureServer:{__$$_PROXY_APPLY:!0},createServer:{__$$_PROXY_APPLY:!0}},"node:https":"https",https:{createServer:{__$$_PROXY_APPLY:!0},request:{__$$_PROXY_APPLY:!0},get:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},globalAgent:{destroy:{__$$_PROXY_APPLY:!0}},Agent:{__$$_PROXY_CONSTRUCT:!0}},"node:http":"http",http:{createServer:{__$$_PROXY_APPLY:!0},request:{__$$_PROXY_APPLY:!0},get:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},ClientRequest:{__$$_PROXY_CONSTRUCT:!0},globalAgent:{destroy:{__$$_PROXY_APPLY:!0}},Agent:{__$$_PROXY_CONSTRUCT:!0}},"node:dgram":"dgram",dgram:{createSocket:{__$$_PROXY_APPLY:!0}},"node:dns":"dns",dns:{lookup:{__$$_PROXY_APPLY:!0},lookupService:{__$$_PROXY_APPLY:!0},resolve:{__$$_PROXY_APPLY:!0},resolve4:{__$$_PROXY_APPLY:!0},resolve6:{__$$_PROXY_APPLY:!0},resolveAny:{__$$_PROXY_APPLY:!0},resolveCname:{__$$_PROXY_APPLY:!0},resolveMx:{__$$_PROXY_APPLY:!0},resolveNaptr:{__$$_PROXY_APPLY:!0},resolveNs:{__$$_PROXY_APPLY:!0},resolvePtr:{__$$_PROXY_APPLY:!0},resolveSoa:{__$$_PROXY_APPLY:!0},resolveSrv:{__$$_PROXY_APPLY:!0},resolveTxt:{__$$_PROXY_APPLY:!0},reverse:{__$$_PROXY_APPLY:!0},Resolver:{__$$_PROXY_CONSTRUCT:!0}},"node:net":"net",net:{createServer:{__$$_PROXY_APPLY:!0},createConnection:{__$$_PROXY_APPLY:!0},connect:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0}},"node:tls":"tls",tls:{createServer:{__$$_PROXY_APPLY:!0},createSecureContext:{__$$_PROXY_APPLY:!0},connect:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},TLSSocket:{__$$_PROXY_CONSTRUCT:!0}}},Mcr={...eTn,Math:{random:{__$$_PROXY_APPLY:!0}},Date:{now:{__$$_PROXY_APPLY:!0},__$$_PROXY_CONSTRUCT:(...i)=>i.length===0&&!(i[0]instanceof Date)}};function Gcr(i,e){return typeof i==typeof e||typeof i=="function"}function jcr(i){return typeof i=="function"}function YCe(i,e,r){let o=r.path.split(".");return B9t(i,e,r,o)}function B9t(i,e,r,o){let[u,...d]=o;if(u==null)return!1;let h=i[u];if(h==null)return!1;if(typeof h=="string")return B9t(i,e,r,[h,...d]);if(Gcr(h,e))return HEn(h,e,r);{let v=h[r.kind];return v!=null?HEn(v,e,r):B9t(h,e,r,d)}}function HEn(i,e,r){if(jcr(i)){let o=r;return o.argArray!=null&&i(...o.argArray)===e}else return i===e}function Ucr(i){return YCe(Mcr,!0,i)}var Iue=class extends y7{constructor({violation:e,node:r,environment:o,message:u}){super({node:r,environment:o,message:`[${e}]: ${u}`}),this.violation=e}},g9t=class extends Iue{constructor({operation:e,node:r,environment:o,message:u=`The operation: '${e}' is nondeterministic. That is in violation of the policy`}){super({violation:"deterministic",message:u,node:r,environment:o}),this.operation=e}},tTn={"node:fs":"fs",fs:{readFile:{__$$_PROXY_APPLY:"read"},readFileSync:{__$$_PROXY_APPLY:"read"},readdir:{__$$_PROXY_APPLY:"read"},readdirSync:{__$$_PROXY_APPLY:"read"},read:{__$$_PROXY_APPLY:"read"},readSync:{__$$_PROXY_APPLY:"read"},exists:{__$$_PROXY_APPLY:"read"},existsSync:{__$$_PROXY_APPLY:"read"},access:{__$$_PROXY_APPLY:"read"},accessSync:{__$$_PROXY_APPLY:"read"},close:{__$$_PROXY_APPLY:"read"},closeSync:{__$$_PROXY_APPLY:"read"},createReadStream:{__$$_PROXY_APPLY:"read"},stat:{__$$_PROXY_APPLY:"read"},statSync:{__$$_PROXY_APPLY:"read"},watch:{__$$_PROXY_APPLY:"read"},watchFile:{__$$_PROXY_APPLY:"read"},unwatchFile:{__$$_PROXY_APPLY:"read"},realpath:{__$$_PROXY_APPLY:"read"},realpathSync:{__$$_PROXY_APPLY:"read"},fstat:{__$$_PROXY_APPLY:"read"},fstatSync:{__$$_PROXY_APPLY:"read"},createWriteStream:{__$$_PROXY_APPLY:"write"},copyFile:{__$$_PROXY_APPLY:"write"},copyFileSync:{__$$_PROXY_APPLY:"write"},unlink:{__$$_PROXY_APPLY:"write"},unlinkSync:{__$$_PROXY_APPLY:"write"},rmdir:{__$$_PROXY_APPLY:"write"},rmdirSync:{__$$_PROXY_APPLY:"write"},symlink:{__$$_PROXY_APPLY:"write"},symlinkSync:{__$$_PROXY_APPLY:"write"},truncate:{__$$_PROXY_APPLY:"write"},truncateSync:{__$$_PROXY_APPLY:"write"},utimes:{__$$_PROXY_APPLY:"write"},utimesSync:{__$$_PROXY_APPLY:"write"},appendFile:{__$$_PROXY_APPLY:"write"},appendFileSync:{__$$_PROXY_APPLY:"write"},write:{__$$_PROXY_APPLY:"write"},writeSync:{__$$_PROXY_APPLY:"write"},writeFile:{__$$_PROXY_APPLY:"write"},writeFileSync:{__$$_PROXY_APPLY:"write"},chmod:{__$$_PROXY_APPLY:"write"},chmodSync:{__$$_PROXY_APPLY:"write"},chown:{__$$_PROXY_APPLY:"write"},chownSync:{__$$_PROXY_APPLY:"write"},mkdir:{__$$_PROXY_APPLY:"write"},mkdirSync:{__$$_PROXY_APPLY:"write"},rename:{__$$_PROXY_APPLY:"write"},renameSync:{__$$_PROXY_APPLY:"write"},futimes:{__$$_PROXY_APPLY:"write"},futimesSync:{__$$_PROXY_APPLY:"write"},link:{__$$_PROXY_APPLY:"write"},linkSync:{__$$_PROXY_APPLY:"write"},mkdtemp:{__$$_PROXY_APPLY:"write"},open:{__$$_PROXY_APPLY:"write"},openSync:{__$$_PROXY_APPLY:"write"},fchmod:{__$$_PROXY_APPLY:"write"},fchmodSync:{__$$_PROXY_APPLY:"write"},fchown:{__$$_PROXY_APPLY:"write"},fchownSync:{__$$_PROXY_APPLY:"write"},ftruncate:{__$$_PROXY_APPLY:"write"},ftruncateSync:{__$$_PROXY_APPLY:"write"},fsync:{__$$_PROXY_APPLY:"write"},fsyncSync:{__$$_PROXY_APPLY:"write"},fdatasync:{__$$_PROXY_APPLY:"write"},fdatasyncSync:{__$$_PROXY_APPLY:"write"},lchmod:{__$$_PROXY_APPLY:"write"},lchmodSync:{__$$_PROXY_APPLY:"write"}}};function Wcr(i){return YCe(tTn,"read",i)}var $0t=class extends Iue{constructor({node:e,environment:r,kind:o,message:u=`${o} operations are in violation of the policy`}){super({violation:"io",message:u,environment:r,node:e}),this.kind=o}};function Vcr(i){return YCe(tTn,"write",i)}function Hcr(i){return YCe(eTn,!0,i)}var y9t=class extends Iue{constructor({operation:e,node:r,environment:o,message:u=`The operation: '${e}' is performing network activity. That is in violation of the policy`}){super({violation:"deterministic",message:u,node:r,environment:o}),this.operation=e}},nTn={"node:process":"process",process:{exit:{__$$_PROXY_APPLY:"exit"}},"node:child_process":"child_process",child_process:{__$$_PROXY_APPLY:"spawnChild"},"node:cluster":"cluster",cluster:{Worker:{__$$_PROXY_CONSTRUCT:"spawnChild"}}};function zcr(i){return YCe(nTn,"exit",i)}var Z0t=class extends Iue{constructor({kind:e,node:r,environment:o,message:u=`${e} operations are in violation of the policy`}){super({violation:"process",message:u,node:r,environment:o}),this.kind=e}};function Jcr(i){return YCe(nTn,"spawnChild",i)}var qcr={"node:console":"console",console:{__$$_PROXY_APPLY:!0}};function Kcr(i){return YCe(qcr,!0,i)}function Xcr({policy:i,env:e}){let r=h=>!i.console&&Kcr(h)?!1:!i.io.read&&Wcr(h)?new dne((v,S)=>new $0t({...S,node:v,kind:"read"})):!i.io.write&&Vcr(h)?new dne((v,S)=>new $0t({...S,node:v,kind:"write"})):!i.process.exit&&zcr(h)?new dne((v,S)=>new Z0t({...S,node:v,kind:"exit"})):!i.process.exit&&Jcr(h)?new dne((v,S)=>new Z0t({...S,node:v,kind:"spawnChild"})):!i.network&&Hcr(h)?new dne((v,S)=>new y9t({...S,node:v,operation:VEn(h.kind,h.path)})):i.deterministic&&Ucr(h)?new dne((v,S)=>new g9t({...S,node:v,operation:VEn(h.kind,h.path)})):!0,o=Object.entries(Object.getOwnPropertyDescriptors(e)),u=Object.assign({},...o.filter(([,h])=>!("value"in h)).map(([h,v])=>({[h]:v}))),d=Object.assign({},...o.filter(([,h])=>"value"in h).map(([h,v])=>({[h]:h==="require"?new Proxy(v.value,{apply(S,k,L=[]){let[z]=L;return WEn({policy:i,item:Reflect.apply(S,k,L),scope:z,hook:r})}}):WEn({policy:i,item:v.value,scope:h,hook:r})})));return Object.defineProperties(d,{...u})}function zqe(i,e){let[r]=e.split(".");if(tG.default.has(i.env,r))return i.env;if(i.parentEnv!=null)return zqe(i.parentEnv,e)}function C9t(i){return i.preset!=null?i.preset:i.parentEnv!=null?C9t(i.parentEnv):"NONE"}function rTn(i,e,r){let o=jEn(i.startingNode,r),u=jEn(e,r);if(o?.pos===u?.pos)return i;if(i.parentEnv!=null)return rTn(i.parentEnv,e,r)}function Kk(i,e,r){let[o]=r.split(".");if(tG.default.has(e.env,o)){let u=tG.default.get(e.env,r);switch(r){case"__dirname":case"__filename":{let d=C9t(e);return(d==="NODE"||d==="NODE_CJS")&&typeof u=="function"&&i!=null?{literal:u(i.getSourceFile().fileName)}:{literal:u}}case"import.meta":{let d=C9t(e);return(d==="NODE_ESM"||d==="BROWSER"||d==="ECMA")&&typeof u=="object"&&u!=null&&typeof u.url=="function"&&i!=null?{literal:{url:u.url(i.getSourceFile().fileName)}}:{literal:u}}default:return{literal:u}}}if(e.parentEnv!=null)return Kk(i,e.parentEnv,r)}function UT(i,e,r,...o){return o.some(u=>{let d=Kk(i,e,u);return d==null?!1:d.literal===r})}function h9t(i){switch(i){case S2:case aR:case B7:case g7:case XCe:return!0;default:return!1}}function PB({environment:i,path:e,value:r,reporting:o,node:u,newBinding:d=!1}){let[h]=e.split(".");if(tG.default.has(i.env,h)||d||i.parentEnv==null){if(tG.default.has(i.env,e)&&tG.default.get(i.env,e)===r)return;tG.default.set(i.env,e,r),o.reportBindings!=null&&!h9t(e)&&o.reportBindings({path:e,value:r,node:u})}else{let v=i.parentEnv;for(;v!=null;)if(tG.default.has(v.env,h)){if(tG.default.has(v.env,e)&&tG.default.get(v.env,e)===r)return;tG.default.set(v.env,e,r),o.reportBindings!=null&&!h9t(e)&&o.reportBindings({path:e,value:r,node:u});return}else v.parentEnv==null?(tG.default.set(v.env,e,r),o.reportBindings!=null&&!h9t(e)&&o.reportBindings({path:e,value:r,node:u})):v=v.parentEnv}}function Ycr({inputEnvironment:{extra:i,preset:e},startingNode:r,policy:o}){let u;switch(e){case"NONE":u=wue(i);break;case"ECMA":u=wue(rCt(),i);break;case"NODE":case"NODE_CJS":u=wue(Acr(),i);break;case"NODE_ESM":u=wue(Ncr(),i);break;case"BROWSER":u=wue(Pcr(),i);break;default:u={};break}return{parentEnv:void 0,preset:e,startingNode:r,env:Xcr({policy:o,env:u})}}function iTn(i,e){return i.kind===e.SyntaxKind.TrueKeyword||i.kind===e.SyntaxKind.FalseKeyword}function sTn(i,e){return i.kind===e.SyntaxKind.NullKeyword}function Qcr(i,e){var r;return e.isStringLiteralLike(i)?{success:!0,value:i.text}:iTn(i,e)?{success:!0,value:i.kind===e.SyntaxKind.TrueKeyword}:e.isRegularExpressionLiteral(i)?{success:!0,value:new Function(`return ${i.text}`)()}:e.isNumericLiteral(i)?{success:!0,value:Number(i.text)}:!((r=e.isBigIntLiteral)===null||r===void 0)&&r.call(e,i)?{success:!0,value:BigInt(i.text)}:e.isIdentifier(i)&&i.text==="Infinity"?{success:!0,value:1/0}:e.isIdentifier(i)&&i.text==="NaN"?{success:!0,value:NaN}:e.isIdentifier(i)&&i.text==="null"?{success:!0,value:null}:e.isIdentifier(i)&&i.text==="undefined"?{success:!0,value:void 0}:sTn(i,e)?{success:!0,value:null}:{success:!1}}var v9t=class extends Iue{constructor({ops:e,node:r,environment:o,message:u=`Maximum ops exceeded: ${e}`}){super({violation:"maxOps",message:u,node:r,environment:o}),this.ops=e}};function aTn(i,e){let{node:r,environment:o,evaluate:u,stack:d,typescript:h,throwError:v,getCurrentError:S}=i,k=e??(r.initializer==null?void 0:u.expression(r.initializer,i));if(S()==null){if(k==null&&!h.isIdentifier(r.name))return v(new y7({node:r,environment:o}));u.nodeWithArgument(r.name,k,i),S()==null&&d.push(k)}}function oTn(i,e){return i.kind===e.SyntaxKind.ThisKeyword}function sCt(i,e){return i.kind===e.SyntaxKind.SuperKeyword}function e6e(i){var e,r;let{node:o,evaluate:u,typescript:d}=i;if(d.isIdentifier(o))return o.text;if(!((e=d.isPrivateIdentifier)===null||e===void 0)&&e.call(d,o))return o.text;if(oTn(o,d))return g7;if(sCt(o,d))return XCe;if(d.isParenthesizedExpression(o))return e6e({...i,node:o.expression});if(!((r=d.isTypeAssertionExpression)===null||r===void 0)&&r.call(d,o)||!("isTypeAssertionExpression"in d)&&d.isTypeAssertion(o))return e6e({...i,node:o.expression});if(d.isPropertyAccessExpression(o)){let h=e6e({...i,node:o.expression});h==null&&(h=u.expression(o.expression,i));let v=e6e({...i,node:o.name});return v==null&&(v=u.expression(o.name,i)),h==null||v==null?void 0:`${h}.${v}`}else if(d.isElementAccessExpression(o)){let h=e6e({...i,node:o.expression});h==null&&(h=u.expression(o.expression,i));let v=u.expression(o.argumentExpression,i);return h==null||v==null?void 0:`${h}.${v}`}else if(d.isFunctionDeclaration(o))return o.name==null?void 0:o.name.text}var b9t=class extends y7{constructor({node:e,environment:r,message:o="'No leftValue could be determined'"}){super({message:o,environment:r,node:e})}};function K0t(i,e){var r;return e.isParenthesizedExpression(i)||e.isAsExpression(i)||!((r=e.isTypeAssertionExpression)===null||r===void 0)&&r.call(e,i)||!("isTypeAssertionExpression"in e)&&e.isTypeAssertion(i)?K0t(i.expression,e):i}function lTn(i){return i!=null&&typeof i=="object"&&"kind"in i&&"flags"in i&&"pos"in i&&"end"in i}function $cr(i){var e;let{node:r,environment:o,evaluate:u,logger:d,throwError:h,typeChecker:v,typescript:S,getCurrentError:k}=i,L=u.expression(r.left,i);if(k()!=null)return;let z=u.expression(r.right,i);if(k()!=null)return;let te=e6e({...i,node:r.left}),_e=r.operatorToken.kind;switch(_e){case S.SyntaxKind.AmpersandToken:return L&z;case S.SyntaxKind.AmpersandAmpersandToken:return L&&z;case S.SyntaxKind.AmpersandEqualsToken:case S.SyntaxKind.CaretEqualsToken:case S.SyntaxKind.BarEqualsToken:case S.SyntaxKind.MinusEqualsToken:case S.SyntaxKind.PlusEqualsToken:case S.SyntaxKind.PercentEqualsToken:case S.SyntaxKind.SlashEqualsToken:case S.SyntaxKind.AsteriskEqualsToken:case S.SyntaxKind.AsteriskAsteriskEqualsToken:case S.SyntaxKind.LessThanLessThanEqualsToken:case S.SyntaxKind.GreaterThanGreaterThanEqualsToken:case S.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken:case S.SyntaxKind.QuestionQuestionEqualsToken:case S.SyntaxKind.BarBarEqualsToken:case S.SyntaxKind.AmpersandAmpersandEqualsToken:{let Ae=L;switch(_e){case S.SyntaxKind.AmpersandEqualsToken:Ae&=z;break;case S.SyntaxKind.CaretEqualsToken:Ae^=z;break;case S.SyntaxKind.BarEqualsToken:Ae|=z;break;case S.SyntaxKind.AsteriskEqualsToken:Ae*=z;break;case S.SyntaxKind.AsteriskAsteriskEqualsToken:Ae**=z;break;case S.SyntaxKind.LessThanLessThanEqualsToken:Ae<<=z;break;case S.SyntaxKind.GreaterThanGreaterThanEqualsToken:Ae>>=z;break;case S.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken:Ae>>>=z;break;case S.SyntaxKind.MinusEqualsToken:Ae-=z;break;case S.SyntaxKind.PlusEqualsToken:Ae+=z;break;case S.SyntaxKind.PercentEqualsToken:Ae%=z;break;case S.SyntaxKind.SlashEqualsToken:Ae/=z;break;case S.SyntaxKind.QuestionQuestionEqualsToken:Ae=L??z;break;case S.SyntaxKind.BarBarEqualsToken:L||(Ae=z);break;case S.SyntaxKind.AmpersandAmpersandEqualsToken:L&&(Ae=z);break}return te!=null&&PB({...i,path:te,value:Ae}),Ae}case S.SyntaxKind.AsteriskToken:return L*z;case S.SyntaxKind.AsteriskAsteriskToken:return L**z;case S.SyntaxKind.BarToken:return L|z;case S.SyntaxKind.BarBarToken:return L||z;case S.SyntaxKind.CaretToken:return L^z;case S.SyntaxKind.CommaToken:return z;case S.SyntaxKind.MinusToken:return L-z;case S.SyntaxKind.PlusToken:return d.logResult(L+z,"BinaryExpression (PlusToken)"),L+z;case S.SyntaxKind.PercentToken:return L%z;case S.SyntaxKind.SlashToken:return L/z;case S.SyntaxKind.EqualsToken:{if(te!=null){let Ae=K0t(r.left,S),Ie=v?.getSymbolAtLocation(Ae),Xe=Ie?.valueDeclaration;if(Xe==null&&v==null&&S.isIdentifier(Ae)){let ze=D9t(Ae.parent,Ae.text,i);lTn(ze)&&(Xe=ze)}let Ve=Xe==null?o:(e=rTn(o,Xe,S))!==null&&e!==void 0?e:o;PB({...i,environment:Ve,path:te,value:z}),d.logBinding(te,z,"Assignment")}else return h(new b9t({node:r.left,environment:o}));return z}case S.SyntaxKind.EqualsEqualsToken:return L==z;case S.SyntaxKind.EqualsEqualsEqualsToken:return L===z;case S.SyntaxKind.ExclamationEqualsToken:return L!=z;case S.SyntaxKind.ExclamationEqualsEqualsToken:return L!==z;case S.SyntaxKind.GreaterThanToken:return L>z;case S.SyntaxKind.GreaterThanEqualsToken:return L>=z;case S.SyntaxKind.LessThanToken:return L<z;case S.SyntaxKind.LessThanEqualsToken:return L<=z;case S.SyntaxKind.InKeyword:return L in z;case S.SyntaxKind.QuestionQuestionToken:return L??z;case S.SyntaxKind.InstanceOfKeyword:return L instanceof z}return h(new IN({node:r.operatorToken,typescript:S,environment:o}))}var k9t="___lazyCallFlag";function Zcr(i){return i!=null&&typeof i=="object"&&k9t in i}function w9t(i){return i===void 0?"undefined":i===null?"null":typeof i=="string"?`"${i}"`:i.toString()}var eCt=class extends y7{constructor({value:e,node:r,environment:o,message:u=`${w9t(e)} is not a function'`}){super({message:u,environment:o,node:r}),this.value=e}};function kue(i,e){var r;return sCt(i,e)?!0:e.isPropertyAccessExpression(i)?kue(i.expression,e)||kue(i.name,e):e.isElementAccessExpression(i)?kue(i.expression,e)||kue(i.argumentExpression,e):e.isParenthesizedExpression(i)||e.isAsExpression(i)||!((r=e.isTypeAssertionExpression)===null||r===void 0)&&r.call(e,i)||!("isTypeAssertionExpression"in e)&&e.isTypeAssertion(i)?kue(i.expression,e):!1}function eur(i){let{node:e,environment:r,evaluate:o,throwError:u,typescript:d,logger:h,getCurrentError:v}=i,S=[];for(let L=0;L<e.arguments.length;L++)if(S[L]=o.expression(e.arguments[L],i),v()!=null)return;let k=o.expression(e.expression,i);if(v()==null)if(Zcr(k)){let L=kue(e.expression,d)?Kk(e,r,g7):void 0,z=k.invoke(L?.literal,...S);return v()!=null?void 0:(h.logResult(z,"CallExpression"),z)}else{if(e.questionDotToken==null&&typeof k!="function")return u(new eCt({value:k,node:e.expression,environment:r}));let L=typeof k!="function"?void 0:iCt(e,i,k(...S));return v()!=null?void 0:(h.logResult(L,"CallExpression"),L)}}function tur({node:i,evaluate:e,...r}){return e.expression(i.expression,r)}function b6(i,e){return{parentEnv:i,startingNode:e,env:{}}}function OX(i,e){let r=Array.isArray(i)?i:i.modifiers;return r!=null&&r.some(o=>o.kind===e)}function RX(i,e,r){let{node:o,evaluate:u,environment:d,typescript:h,getCurrentError:v}=i,S=o.filter(k=>!(h.isIdentifier(k.name)&&k.name.text==="this"));for(let k=0;k<S.length;k++){let L=S[k];if(L.dotDotDotToken!=null){if(u.nodeWithArgument(L,e.slice(k),i),v()!=null)return;break}else{if(u.nodeWithArgument(L,e[k],i),v()!=null)return;if(r!=null&&h.isIdentifier(L.name)&&(OX(L,h.SyntaxKind.PublicKeyword)||OX(L,h.SyntaxKind.ProtectedKeyword)||OX(L,h.SyntaxKind.PrivateKeyword))){let z=Kk(L,d,L.name.text);z!=null&&(r[L.name.text]=z.literal)}}}}function nur(i){let{node:e,environment:r,evaluate:o,stack:u,typescript:d,getCurrentError:h}=i,v=OX(e,d.SyntaxKind.AsyncKeyword)?async(...S)=>{let k=b6(r,e),L={...i,environment:k};if(PB({...L,path:S2,value:!1,newBinding:!0}),PB({...L,path:"arguments",value:arguments,newBinding:!0}),RX({...i,node:e.parameters,environment:k},S),h()==null)return d.isBlock(e.body)?(o.statement(e.body,L),h()!=null?void 0:UT(e,k,!0,S2)?u.pop():void 0):o.expression(e.body,L)}:(...S)=>{let k=b6(r,e),L={...i,environment:k};if(PB({...L,path:S2,value:!1,newBinding:!0}),PB({...L,path:"arguments",value:arguments,newBinding:!0}),RX({...i,node:e.parameters,environment:k},S),h()==null)return d.isBlock(e.body)?(o.statement(e.body,L),h()!=null?void 0:UT(e,k,!0,S2)?u.pop():void 0):o.expression(e.body,L)};return v.toString=()=>"[Function: anonymous]",Object.setPrototypeOf(v,Kk(e,r,"Function").literal),v}function rur({node:i}){return i.text}function iur({node:i}){return Number(i.text)}function sur({node:i,typescript:e}){return i.kind===e.SyntaxKind.TrueKeyword}function aur({node:i,environment:e}){let r=Kk(i,e,"Function").literal;return new r(`return ${i.text}`)()}function our(i){let{node:e,evaluate:r,environment:o,getCurrentError:u}=i,d=Kk(e,o,"Object").literal,h=d.create(d.prototype);PB({...i,path:g7,value:h,newBinding:!0});for(let v of e.properties)if(r.nodeWithArgument(v,h,i),u()!=null)return;return h}function lur(i){return i!=null&&i[Symbol.iterator]!=null}function cur(i){let{node:e,environment:r,evaluate:o,typescript:u,getCurrentError:d}=i,v=Kk(e,r,"Array").literal.of();for(let S of e.elements){let k=o.expression(S,i);if(d()!=null)return;u.isSpreadElement(S)&&lur(k)?v.push(...k):v.push(k)}return v}var tCt=class extends y7{constructor({node:e,environment:r,message:o=`'${e.text}' is not defined'`}){super({message:o,environment:r,node:e})}};function zEn(i){let{node:e,environment:r,typeChecker:o,evaluate:u,stack:d,logger:h,reporting:v,typescript:S,throwError:k,getCurrentError:L}=i,z=Kk(e,r,e.text);if(z!=null)return h.logBinding(e.text,z.literal,"Lexical Environment match"),z.literal;let te=S.isShorthandPropertyAssignment(e.parent)?o?.getShorthandAssignmentValueSymbol(e.parent):o?.getSymbolAtLocation(e),_e=te?.valueDeclaration;if(te!=null&&_e==null)try{let Ae=o?.getAliasedSymbol(te);_e=Ae?.valueDeclaration}catch{}if(_e==null){let Ae=D9t(e.parent,e.text,i);if(L()!=null)return;if(lTn(Ae)&&!S.isIdentifier(Ae))_e=Ae;else if(Ae!=null)return PB({...i,path:e.text,value:Ae}),h.logBinding(e.text,Ae,"Discovered declaration value"),Ae}if(_e!=null){if(_e.getSourceFile().isDeclarationFile){let Ie=Q0t({...i,node:_e});return L()!=null?void 0:(PB({environment:r,path:e.text,value:Ie,reporting:v,node:_e}),h.logBinding(e.text,Ie,`Discovered declaration value${_e.getSourceFile()===e.getSourceFile()?"":` (imported into '${e.getSourceFile().fileName}' from '${_e.getSourceFile().fileName}')`}`),Ie)}if(S.isVariableDeclaration(_e)&&_e.getSourceFile().fileName===e.getSourceFile().fileName&&_e.pos>e.pos)if(S.isVariableDeclarationList(_e.parent)&&QEn(_e.parent,S)){PB({...i,path:e.text,value:void 0,newBinding:!0,node:_e}),h.logBinding(e.text,void 0,"Hoisted var declaration");return}else return k(new tCt({node:e,environment:r}));if(u.declaration(_e,i),L()!=null)return;let Ae=d.pop();return PB({...i,path:e.text,value:Ae,node:_e}),h.logBinding(e.text,Ae,`Discovered declaration value${_e.getSourceFile()===e.getSourceFile()?"":` (imported into '${e.getSourceFile().fileName}' from '${_e.getSourceFile().fileName}')`}`),Ae}return k(new tCt({node:e,environment:r}))}function uur(i){let{node:e,environment:r,typescript:o,evaluate:u,getCurrentError:d}=i,h=b6(r,e);for(let v=0;v<e.statements.length;v++){let S=e.statements[v];if(!(o.isConstructorDeclaration(e.parent)&&v===0&&o.isExpressionStatement(S)&&o.isCallExpression(S.expression)&&sCt(S.expression.expression,o))&&(u.statement(S,{...i,environment:h}),d()!=null||UT(e,h,!0,aR,B7,S2)))break}}function fur({node:i,evaluate:e,stack:r,...o}){let{getCurrentError:u}=o;if(PB({...o,environment:o.environment,path:S2,value:!0,node:i}),i.expression==null)r.push(void 0);else{let d=e.expression(i.expression,o);if(u()!=null)return;r.push(d)}}function cTn({node:i,evaluate:e,...r}){for(let o of i.declarations)if(e.declaration(o,r),r.getCurrentError()!=null)return}function pur({node:i,...e}){cTn({node:i.declarationList,...e})}function dur(i){var e,r;let{node:o,environment:u,evaluate:d,reporting:h,typescript:v,throwError:S,getCurrentError:k}=i,L=d.expression(o.operand,i);if(k()==null)switch(o.operator){case v.SyntaxKind.PlusToken:return+L;case v.SyntaxKind.MinusToken:return-L;case v.SyntaxKind.TildeToken:return~L;case v.SyntaxKind.ExclamationToken:return!L;case v.SyntaxKind.PlusPlusToken:{if(!v.isIdentifier(o.operand)&&!(!((e=v.isPrivateIdentifier)===null||e===void 0)&&e.call(v,o.operand)))return S(new IN({node:o.operand,environment:u,typescript:v}));let z=zqe(u,o.operand.text),te=++z[o.operand.text];return h.reportBindings!=null&&h.reportBindings({path:o.operand.text,value:te,node:o}),te}case v.SyntaxKind.MinusMinusToken:{if(!v.isIdentifier(o.operand)&&!(!((r=v.isPrivateIdentifier)===null||r===void 0)&&r.call(v,o.operand)))return S(new IN({node:o.operand,environment:u,typescript:v}));let z=zqe(u,o.operand.text),te=--z[o.operand.text];return h.reportBindings!=null&&h.reportBindings({path:o.operand.text,value:te,node:o}),te}}}function _ur(i){let{evaluate:e,node:r,statementTraversalStack:o,environment:u,typescript:d,getCurrentError:h}=i,v=e.expression(r.expression,i);if(v==null||h()!=null)return;let S=r.questionDotToken!=null&&v==null?void 0:v[r.name.text];return typeof S=="function"&&o.includes(d.SyntaxKind.CallExpression)?{[k9t]:0,invoke:(k,...L)=>iCt(r,i,k!=null&&!A9t(S,u)?v[r.name.text].call(k,...L):v[r.name.text](...L))}:S}function mur(i){let{node:e,environment:r,evaluate:o,statementTraversalStack:u,typescript:d,getCurrentError:h}=i,v=o.expression(e.expression,i);if(h()!=null)return;let S=o.expression(e.argumentExpression,i);if(h()!=null)return;let k=e.questionDotToken!=null&&v==null?void 0:v[S];return typeof k=="function"&&u.includes(d.SyntaxKind.CallExpression)?{[k9t]:0,invoke:(L,...z)=>iCt(e,i,L!=null&&!A9t(k,r)?v[S].call(L,...z):v[S](...z))}:k}function hur({node:i,evaluate:e,...r}){return e.expression(i.expression,r)}function Bur(i){let{node:e,environment:r,evaluate:o,stack:u,typescript:d,getCurrentError:h}=i,v=e.name==null?void 0:e.name.text,S=OX(e,d.SyntaxKind.AsyncKeyword)?async function(...L){let z=b6(r,e),te={...i,environment:z};if(PB({...te,path:S2,value:!1,newBinding:!0}),PB({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&PB({...te,path:g7,value:this,newBinding:!0}),RX({...i,node:e.parameters,environment:z},L),h()!=null)return;let _e=e.getSourceFile();if(v!=null&&_e.isDeclarationFile)return Q0t(i)(...L);if(e.body!=null&&(o.statement(e.body,te),h()==null&&UT(e,z,!0,S2)))return u.pop()}:function(...L){let z=b6(r,e),te={...i,environment:z};if(PB({...te,path:S2,value:!1,newBinding:!0}),PB({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&PB({...te,path:g7,value:this,newBinding:!0}),RX({...te,node:e.parameters},L),h()!=null)return;let _e=e.getSourceFile();if(v!=null&&_e.isDeclarationFile)return Q0t(i)(...L);if(e.body!=null&&(o.statement(e.body,te),h()==null&&UT(e,z,!0,S2)))return u.pop()};v!=null&&PB({...i,path:v,value:S.bind(S)}),S.toString=()=>`[Function${v==null?"":`: ${v}`}]`,Object.setPrototypeOf(S,Kk(e,r,"Function").literal),u.push(S)}function gur({node:i,evaluate:e,...r}){let{getCurrentError:o}=r,u=e.expression(i.expression,r);if(o()==null){if(u){if(e.statement(i.thenStatement,r),o()!=null)return}else if(i.elseStatement!=null)return e.statement(i.elseStatement,r)}}function yur({node:i,evaluate:e,stack:r,...o}){let u=e.expression(i.expression,o);o.getCurrentError()==null&&r.push(u)}function Cur({node:i,evaluate:e,...r}){let o="";o+=i.head.text;for(let u of i.templateSpans){let d=e.expression(u.expression,r);if(r.getCurrentError()!=null)return;o+=d,o+=u.literal.text}return o}function vur({node:i,evaluate:e,...r}){return e.expression(i.expression,r)}function bur(i){var e,r;let{evaluate:o,node:u,environment:d,typescript:h,throwError:v,reporting:S}=i;switch(o.expression(u.operand,i),u.operator){case h.SyntaxKind.PlusPlusToken:{if(!h.isIdentifier(u.operand)&&!(!((e=h.isPrivateIdentifier)===null||e===void 0)&&e.call(h,u.operand)))return v(new IN({node:u.operand,environment:d,typescript:h}));let k=zqe(d,u.operand.text)[u.operand.text]++;return S.reportBindings!=null&&S.reportBindings({path:u.operand.text,value:k,node:u}),k}case h.SyntaxKind.MinusMinusToken:{if(!h.isIdentifier(u.operand)&&!(!((r=h.isPrivateIdentifier)===null||r===void 0)&&r.call(h,u.operand)))return v(new IN({node:u.operand,environment:d,typescript:h}));let k=zqe(d,u.operand.text)[u.operand.text]--;return S.reportBindings!=null&&S.reportBindings({path:u.operand.text,value:k,node:u}),k}}}function Sur({node:i,evaluate:e,...r}){let{getCurrentError:o}=r,u=[];if(i.arguments!=null){for(let h=0;h<i.arguments.length;h++)if(u[h]=e.expression(i.arguments[h],r),o()!=null)return}let d=e.expression(i.expression,r);if(o()==null)return typeof d=="function"&&PB({...r,node:i,path:"[[NewTarget]]",value:d,newBinding:!0}),iCt(i,r,new d(...u))}function xur({node:i,evaluate:e,...r}){return e.expression(i.expression,r)}function Eur({node:i,evaluate:e,...r}){return e.expression(i.expression,r)}function Tur({node:i,evaluate:e,...r}){let o=e.expression(i.expression,r);r.getCurrentError()==null&&e.nodeWithArgument(i.caseBlock,o,r)}var S9t=class extends y7{constructor({message:e="It is not possible to evaluate an async iterator'",typescript:r,environment:o}){var u,d;super({message:e,environment:o,node:(d=(u=r.factory)===null||u===void 0?void 0:u.createEmptyStatement())!==null&&d!==void 0?d:r.createEmptyStatement()})}};function Dur(i){let{node:e,environment:r,evaluate:o,logger:u,typescript:d,throwError:h,getCurrentError:v}=i,S=o.expression(e.expression,i);if(v()==null){if(d.isVariableDeclarationList(e.initializer)){if(e.initializer.declarations.length>1)return h(new IN({node:e.initializer.declarations[1],environment:r,typescript:d}))}else return h(new IN({node:e.initializer,environment:r,typescript:d}));if(e.awaitModifier!=null)return h(new S9t({typescript:d,environment:r}));for(let k of S){let L=b6(r,e),z={...i,environment:L};if(PB({...z,path:aR,value:!1,newBinding:!0}),PB({...z,path:B7,value:!1,newBinding:!0}),o.nodeWithArgument(e.initializer.declarations[0],k,z),v()!=null||(o.statement(e.statement,z),v()!=null))return;if(UT(e,L,!0,aR)){u.logBreak(e,d);break}else if(UT(e,L,!0,B7)){u.logContinue(e,d);continue}else if(UT(e,L,!0,S2)){u.logReturn(e,d);return}}}}function Aur({node:i,environment:e}){let r=Kk(i,e,g7);return r?.literal}function kur(i){PB({...i,path:aR,value:!0})}function wur(i){PB({...i,path:B7,value:!0})}function Iur({environment:i,evaluate:e,typescript:r,...o}){let{node:u,getCurrentError:d}=o,h=b6(i,u),v={...o,environment:h};if(u.initializer!==void 0){if(r.isVariableDeclarationList(u.initializer)){for(let S of u.initializer.declarations)if(e.declaration(S,v),d()!=null)return}else if(e.expression(u.initializer,v),d()!=null)return}for(;;){let S=b6(h,u),k={...o,environment:S};if(PB({...k,path:aR,value:!1,newBinding:!0}),PB({...k,path:B7,value:!1,newBinding:!0}),!(u.condition==null?!0:e.expression(u.condition,v))||d()!=null||(e.statement(u.statement,k),d()!=null))return;if(UT(u,S,!0,aR))break;if(UT(u,S,!0,S2))return;if(u.incrementor!=null){if(e.expression(u.incrementor,v),d()!=null)return}else if(UT(u,S,!0,B7))continue}}function Pur(i){let{node:e,environment:r,evaluate:o,logger:u,typescript:d,getCurrentError:h}=i,v=o.expression(e.expression,i);if(h()==null)for(;v;){let S=b6(r,e),k={...i,environment:S};if(PB({...k,path:aR,value:!1,newBinding:!0}),PB({...k,path:B7,value:!1,newBinding:!0}),o.statement(e.statement,k),h()!=null)return;if(UT(e,S,!0,aR)){u.logBreak(e,d);break}else if(UT(e,S,!0,S2)){u.logReturn(e,d);return}if(v=o.expression(e.expression,i),h()!=null)return;if(UT(e,S,!0,B7)){u.logContinue(e,d);continue}}}function Nur(i){let{node:e,environment:r,evaluate:o,logger:u,typescript:d,throwError:h,getCurrentError:v}=i,S=o.expression(e.expression,i);if(v()==null){if(d.isVariableDeclarationList(e.initializer)){if(e.initializer.declarations.length>1)return h(new IN({node:e.initializer.declarations[1],environment:r,typescript:d}))}else return h(new IN({node:e.initializer,environment:r,typescript:d}));for(let k in S){let L=b6(r,e),z={...i,environment:L};if(PB({...z,path:aR,value:!1,newBinding:!0}),PB({...z,path:B7,value:!1,newBinding:!0}),o.nodeWithArgument(e.initializer.declarations[0],k,z),v()!=null||(o.statement(e.statement,z),v()!=null))return;if(UT(e,L,!0,aR)){u.logBreak(e,d);break}else if(UT(e,L,!0,B7)){u.logContinue(e,d);continue}else if(UT(e,L,!0,S2)){u.logReturn(e,d);return}}}}function Lur(i){let{node:e,environment:r,evaluate:o,stack:u,typescript:d,getCurrentError:h}=i,v=e.name==null?void 0:e.name.text,S=OX(e,d.SyntaxKind.AsyncKeyword)?async function(...L){let z=b6(r,e),te={...i,environment:z};if(PB({...te,path:S2,value:!1,newBinding:!0}),PB({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&PB({...te,path:g7,value:this,newBinding:!0}),RX({...te,node:e.parameters},L),!(e.body==null||h()!=null)&&(o.statement(e.body,te),h()==null&&UT(e,z,!0,S2)))return u.pop()}:function(...L){let z=b6(r,e),te={...i,environment:z};if(PB({...te,path:S2,value:!1,newBinding:!0}),PB({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&PB({...te,path:g7,value:this,newBinding:!0}),RX({...te,node:e.parameters},L),!(e.body==null||h()!=null)&&(o.statement(e.body,te),h()==null&&UT(e,z,!0,S2)))return u.pop()};return v!=null&&PB({...i,path:v,value:S.bind(S)}),S.toString=()=>`[Function${v==null?"":`: ${v}`}]`,Object.setPrototypeOf(S,Kk(e,r,"Function").literal),S}var x9t=class extends y7{constructor({node:e,environment:r,message:o="Missing catch or finally after try"}){super({node:e,environment:r,message:o})}};function Fur(i){let{node:e,evaluate:r,environment:o,throwError:u}=i,d,h=()=>{try{return r.statement(e.tryBlock,{...i,throwError:k=>(d=k,k),getCurrentError:()=>d})}catch(k){d=k}},v=k=>{r.nodeWithArgument(e.catchClause,k,i)},S=()=>{let k;r.statement(e.finallyBlock,{...i,throwError:L=>(k=L,i.throwError(L),L),getCurrentError:()=>k})};if(e.catchClause==null&&e.finallyBlock==null)return u(new x9t({node:e,environment:o}));e.catchClause!=null&&e.finallyBlock==null?(h(),d!=null&&v(d)):e.catchClause!=null&&e.finallyBlock!=null?(h(),d!=null&&v(d),S()):e.catchClause==null&&e.finallyBlock!=null&&(h(),d!=null&&u(d),S())}function uTn({name:i,extendedType:e,ctor:r=()=>{}}){return e==null?new Function("ctor",`return class ${i??""} {constructor () {const ctorReturnValue = ctor.call(this, ...arguments); if (ctorReturnValue != null) return ctorReturnValue;}}`)(r):new Function("extendedType","ctor",`return class ${i??""} extends extendedType {constructor () {super(...arguments); const ctorReturnValue = ctor.call(this, ...arguments); if (ctorReturnValue != null) return ctorReturnValue;}}`)(e,r)}function Jqe(i,e){return"canHaveDecorators"in e?e.canHaveDecorators(i):!0}function qqe(i,e){var r;if("getDecorators"in e)return e.getDecorators(i);{let o="decorators"in i&&Array.isArray(i.decorators)?i.decorators:void 0,u=(r=i.modifiers)===null||r===void 0?void 0:r.filter(d=>"expression"in d);return[...o??[],...u??[]]}}function Our(i){var e;let{node:r,evaluate:o,stack:u,logger:d,typescript:h,getCurrentError:v}=i,S,k=r.members.find(h.isConstructorDeclaration),L=r.members.filter(Ae=>!h.isConstructorDeclaration(Ae)),z;if(k!=null){if(o.declaration(k,i),v()!=null)return;z=u.pop()}if(r.heritageClauses!=null){let Ae=r.heritageClauses.find(Ie=>Ie.token===h.SyntaxKind.ExtendsKeyword);if(Ae!=null){let[Ie]=Ae.types;if(Ie!=null&&(S=o.expression(Ie.expression,i),v()!=null))return}}let te=r.name==null?void 0:r.name.text,_e=uTn({name:te,extendedType:S,ctor:z});if(Jqe(r,h))for(let Ae of(e=qqe(r,h))!==null&&e!==void 0?e:[]){if(o.nodeWithArgument(Ae,[_e],i),v()!=null)return;_e=u.pop()}_e.toString=()=>`[Class${te==null?"":`: ${te}`}]`,te!=null&&PB({...i,path:te,value:_e,newBinding:!0});for(let Ae of L)if(o.nodeWithArgument(Ae,OX(Ae,h.SyntaxKind.StaticKeyword)?_e:_e.prototype,i),v()!=null)return;d.logHeritage(_e),u.push(_e),d.logStack(u)}function Rur(i){let{node:e,environment:r,evaluate:o,stack:u,getCurrentError:d}=i;function h(...v){let S=b6(r,e),k={...i,environment:S};if(PB({...k,path:S2,value:!1,newBinding:!0}),PB({...k,path:"arguments",value:arguments,newBinding:!0}),this!=null&&PB({...k,path:g7,value:this,newBinding:!0}),RX({...k,node:e.parameters},v,this),!(e.body==null||d()!=null)&&(o.statement(e.body,k),d()==null&&UT(e,S,!0,S2)))return u.pop()}h.toString=()=>"[Function: constructor]",u.push(h)}function Mur({node:i,environment:e}){let r=Kk(i,e,XCe);return r?.literal}function Gur({node:i,evaluate:e,...r}){return e.expression(i.expression,r)}function jur(i){var e;let{node:r,evaluate:o,stack:u,logger:d,typescript:h,getCurrentError:v}=i,S,k=r.members.find(h.isConstructorDeclaration),L=r.members.filter(Ae=>!h.isConstructorDeclaration(Ae)),z;if(k!=null){if(o.declaration(k,i),v()!=null)return;z=u.pop()}if(r.heritageClauses!=null){let Ae=r.heritageClauses.find(Ie=>Ie.token===h.SyntaxKind.ExtendsKeyword);if(Ae!=null){let[Ie]=Ae.types;if(Ie!=null&&(S=o.expression(Ie.expression,i),v()!=null))return}}let te=r.name==null?void 0:r.name.text,_e=uTn({name:te,extendedType:S,ctor:z});if(Jqe(r,h))for(let Ae of(e=qqe(r,h))!==null&&e!==void 0?e:[]){if(o.nodeWithArgument(Ae,[_e],i),v()!=null)return;_e=u.pop()}_e.toString=()=>`[Class${te==null?"":`: ${te}`}]`,te!=null&&PB({...i,path:te,value:_e,newBinding:!0});for(let Ae of L)if(o.nodeWithArgument(Ae,OX(Ae,h.SyntaxKind.StaticKeyword)?_e:_e.prototype,i),v()!=null)return;return d.logHeritage(_e),_e}function Uur(i){return null}function Wur({node:i,evaluate:e,...r}){e.expression(i.expression,r)}function Vur({evaluate:i,node:e,...r}){let o=i.expression(e.expression,r);if(r.getCurrentError()==null)return typeof o}function Hur({node:i,environment:e}){let r=Kk(i,e,"BigInt").literal;return r(i.text.endsWith("n")?i.text.slice(0,-1):i.text)}function zur(i){let{node:e,environment:r,evaluate:o,stack:u,getCurrentError:d}=i,h=Kk(e,r,"Object").literal,v=h.create(h.prototype),S=e.name.text;PB({...i,path:S,value:v,newBinding:!0});for(let k of e.members)if(o.nodeWithArgument(k,v,i),d()!=null)return;v.toString=()=>`[Enum: ${S}]`,u.push(v)}function Jur(i){let{node:e,evaluate:r,environment:o,typeChecker:u,stack:d,getCurrentError:h}=i,v=Kk(e,o,"Object").literal,S=v.create(v.prototype),k=u?.getSymbolAtLocation(e);if(k!=null){let L=k.exports;if(L!=null)for(let[z,te]of L.entries()){let _e=te.valueDeclaration;if(_e==null||(r.declaration(_e,i),h()!=null))return;S[z]=d.pop()}}d.push(S)}function qur(i){let{getCurrentError:e,stack:r}=i,o=Q0t(i);e()==null&&r.push(o)}function Kur({node:i,evaluate:e,...r}){i.importClause!=null&&e.declaration(i.importClause,r)}function Xur({node:i,evaluate:e,...r}){let{getCurrentError:o,throwError:u}=r,d=e.expression(i.expression,r);if(o()==null)return u(d)}var E9t=class extends Iue{constructor({duration:e,environment:r,node:o,message:u=`Maximum operation duration exceeded: ${e}`}){super({violation:"maxOpDuration",message:u,node:o,environment:r}),this.duration=e}};async function Yur(i){let{node:e,environment:r,evaluate:o,policy:u,throwError:d,getCurrentError:h}=i,v=u.maxOpDuration===1/0?void 0:setTimeout(()=>{d(new E9t({duration:u.maxOpDuration,node:e,environment:r}))},u.maxOpDuration),S=o.expression(e.expression,i);if(v!=null&&clearTimeout(v),h()==null)return S}function Qur({node:i,evaluate:e,...r}){let{getCurrentError:o}=r,u=e.expression(i.condition,r);if(o()==null)return u?e.expression(i.whenTrue,r):e.expression(i.whenFalse,r)}function aCt(i,e){let r=i;for(;r!=null&&!e.isSourceFile(r);){if(OX(r,e.SyntaxKind.StaticKeyword))return!0;r=r.parent}return!1}function fTn(i,e){var r,o;let{node:u,environment:d,evaluate:h,stack:v,typescript:S,getCurrentError:k}=i,L=h.nodeWithValue(u.name,i);if(k()!=null)return;let z=aCt(u,S);if(e==null){let _e;if(S.isClassLike(u.parent)){if(h.declaration(u.parent,i),k()!=null)return;_e=v.pop()}else if(_e=h.expression(u.parent,i),k()!=null)return;v.push(z?_e[L]:_e.prototype[L]);return}let te=OX(u,S.SyntaxKind.AsyncKeyword)?async function(...Ae){let Ie=b6(d,u),Xe={...i,environment:Ie};if(PB({...Xe,path:S2,value:!1,newBinding:!0}),PB({...Xe,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(PB({...Xe,path:g7,value:this,newBinding:!0}),PB({...Xe,path:XCe,value:z?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RX({...i,node:u.parameters,environment:Ie},Ae),!(u.body==null||k()!=null)&&(h.statement(u.body,Xe),k()==null&&UT(u,Ie,!0,S2)))return v.pop()}:function(...Ae){let Ie=b6(d,u),Xe={...i,environment:Ie};if(PB({...Xe,path:S2,value:!1,newBinding:!0}),PB({...Xe,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(PB({...Xe,path:g7,value:this,newBinding:!0}),PB({...Xe,path:XCe,value:z?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RX({...i,node:u.parameters,environment:Ie},Ae),!(u.body==null||k()!=null)&&(h.statement(u.body,Xe),k()==null&&UT(u,Ie,!0,S2)))return v.pop()};if(te.toString=()=>`[Method: ${L}]`,Object.setPrototypeOf(te,Kk(u,d,"Function").literal),e[L]=te,Jqe(u,S))for(let _e of(r=qqe(u,S))!==null&&r!==void 0?r:[]){if(h.nodeWithArgument(_e,[e,L],i),k()!=null)return;v.pop()}if(u.parameters!=null){let _e=u.parameters.filter(Ae=>!(S.isIdentifier(Ae.name)&&Ae.name.text==="this"));for(let Ae=0;Ae<_e.length;Ae++){let Ie=_e[Ae];if(Jqe(Ie,S))for(let Xe of(o=qqe(Ie,S))!==null&&o!==void 0?o:[]){if(h.nodeWithArgument(Xe,[e,L,Ae],i),k()!=null)return;v.pop()}}}}function pTn({node:i,evaluate:e,typescript:r,stack:o,...u},d){var h;let{getCurrentError:v}=u,S=e.nodeWithValue(i.name,u);if(v()==null){if(d==null){if(e.declaration(i.parent,u),v()!=null)return;let k=o.pop(),L=aCt(i,r);o.push(L?k[S]:k.prototype[S]);return}if(d[S]=i.initializer==null?void 0:e.expression(i.initializer,u),v()==null&&Jqe(i,r))for(let k of(h=qqe(i,r))!==null&&h!==void 0?h:[]){if(e.nodeWithArgument(k,[d,S],u),v()!=null)return;o.pop()}}}function dTn(i,e){let{node:r,environment:o,evaluate:u,stack:d,typescript:h,getCurrentError:v}=i;if(h.isTypeLiteralNode(r.parent)||h.isInterfaceDeclaration(r.parent))return;let S=u.nodeWithValue(r.name,i);if(v()!=null)return;let k=aCt(r,h);if(e==null){let te;if(h.isClassLike(r.parent)){if(u.declaration(r.parent,i),v()!=null)return;te=d.pop()}else if(te=u.expression(r.parent,i),v()!=null)return;d.push(k?te[S]:te.prototype[S]);return}function L(){let te=b6(o,r),_e={...i,environment:te};if(PB({..._e,path:S2,value:!1,newBinding:!0}),PB({..._e,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(PB({..._e,path:g7,value:this,newBinding:!0}),PB({..._e,path:XCe,value:k?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),r.body!=null&&(u.statement(r.body,_e),v()==null&&UT(r,te,!0,S2)))return d.pop()}L.toString=()=>`[Get: ${S}]`;let z=Object.getOwnPropertyDescriptor(e,S);z==null&&(z={}),Object.defineProperty(e,S,{...z,configurable:!0,get:L})}function $ur({node:i,evaluate:e,...r}){let{getCurrentError:o}=r;if(!(i.name!=null&&(e.declaration(i.name,r),o()!=null))&&i.namedBindings!=null)if("elements"in i.namedBindings){for(let u of i.namedBindings.elements)if(e.declaration(u,r),o()!=null)return}else e.declaration(i.namedBindings.name,r)}function Zur({node:i,evaluate:e,...r}){var o;e.declaration((o=i.propertyName)!==null&&o!==void 0?o:i.name,r)}function efr({node:i,evaluate:e,...r}){e.declaration(i.name,r)}var nCt=class extends y7{constructor({node:e,environment:r,message:o="'SyntaxError'"}){super({message:o,environment:r,node:e})}};function tfr({node:i,typescript:e,throwError:r,environment:o}){var u,d;switch(i.keywordToken){case e.SyntaxKind.NewKeyword:switch(i.name.text){case"target":return(u=Kk(i,o,"[[NewTarget]]"))===null||u===void 0?void 0:u.literal;default:return r(new nCt({node:i.name,environment:o}))}case e.SyntaxKind.ImportKeyword:switch(i.name.text){case"meta":return(d=Kk(i,o,"import.meta"))===null||d===void 0?void 0:d.literal;default:return r(new nCt({node:i.name,environment:o}))}}}function I9t({node:i,...e}){var r,o,u,d,h,v;return e.typescript.isIdentifier(i)?zEn({node:i,...e}):!((o=(r=e.typescript).isPrivateIdentifier)===null||o===void 0)&&o.call(r,i)?zEn({node:i,...e}):e.typescript.isStringLiteralLike(i)?rur({node:i,...e}):e.typescript.isNumericLiteral(i)?iur({node:i,...e}):iTn(i,e.typescript)?sur({node:i,...e}):e.typescript.isForOfStatement(i)?Dur({node:i,...e}):e.typescript.isForInStatement(i)?Nur({node:i,...e}):e.typescript.isForStatement(i)?Iur({node:i,...e}):e.typescript.isWhileStatement(i)?Pur({node:i,...e}):e.typescript.isRegularExpressionLiteral(i)?aur({node:i,...e}):e.typescript.isObjectLiteralExpression(i)?our({node:i,...e}):e.typescript.isAwaitExpression(i)?Yur({node:i,...e}):!((d=(u=e.typescript).isTypeAssertionExpression)===null||d===void 0)&&d.call(u,i)||!("isTypeAssertionExpression"in e.typescript)&&e.typescript.isTypeAssertion(i)?vur({node:i,...e}):e.typescript.isTemplateExpression(i)?Cur({node:i,...e}):e.typescript.isMethodDeclaration(i)?fTn({node:i,...e}):e.typescript.isPropertyDeclaration(i)?pTn({node:i,...e}):e.typescript.isGetAccessorDeclaration(i)?dTn({node:i,...e}):e.typescript.isArrayLiteralExpression(i)?cur({node:i,...e}):e.typescript.isSourceFile(i)?Jur({node:i,...e}):e.typescript.isModuleDeclaration(i)?qur({node:i,...e}):e.typescript.isPrefixUnaryExpression(i)?dur({node:i,...e}):e.typescript.isPostfixUnaryExpression(i)?bur({node:i,...e}):e.typescript.isVariableStatement(i)?pur({node:i,...e}):e.typescript.isComputedPropertyName(i)?hur({node:i,...e}):e.typescript.isVariableDeclarationList(i)?cTn({node:i,...e}):e.typescript.isImportDeclaration(i)?Kur({node:i,...e}):e.typescript.isImportClause(i)?$ur({node:i,...e}):e.typescript.isImportSpecifier(i)?Zur({node:i,...e}):e.typescript.isNamespaceImport(i)?efr({node:i,...e}):e.typescript.isImportEqualsDeclaration(i)?({...e},void 0):e.typescript.isMetaProperty(i)?tfr({node:i,...e}):e.typescript.isThrowStatement(i)?Xur({node:i,...e}):e.typescript.isVariableDeclaration(i)?aTn({node:i,...e}):e.typescript.isEnumDeclaration(i)?zur({node:i,...e}):e.typescript.isConstructorDeclaration(i)?Rur({node:i,...e}):e.typescript.isBinaryExpression(i)?$cr({node:i,...e}):e.typescript.isParenthesizedExpression(i)?tur({node:i,...e}):e.typescript.isExpressionStatement(i)?yur({node:i,...e}):e.typescript.isArrowFunction(i)?nur({node:i,...e}):e.typescript.isFunctionDeclaration(i)?Bur({node:i,...e}):e.typescript.isFunctionExpression(i)?Lur({node:i,...e}):e.typescript.isClassDeclaration(i)?Our({node:i,...e}):e.typescript.isIfStatement(i)?gur({node:i,...e}):e.typescript.isConditionalExpression(i)?Qur({node:i,...e}):e.typescript.isPropertyAccessExpression(i)?_ur({node:i,...e}):e.typescript.isElementAccessExpression(i)?mur({node:i,...e}):e.typescript.isCallExpression(i)?eur({node:i,...e}):e.typescript.isSwitchStatement(i)?Tur({node:i,...e}):e.typescript.isNewExpression(i)?Sur({node:i,...e}):e.typescript.isNonNullExpression(i)?xur({node:i,...e}):e.typescript.isAsExpression(i)?Eur({node:i,...e}):e.typescript.isBlock(i)?uur({node:i,...e}):e.typescript.isClassExpression(i)?jur({node:i,...e}):e.typescript.isSpreadElement(i)?Gur({node:i,...e}):e.typescript.isTryStatement(i)?Fur({node:i,...e}):e.typescript.isReturnStatement(i)?fur({node:i,...e}):oTn(i,e.typescript)?Aur({node:i,...e}):e.typescript.isVoidExpression(i)?Wur({node:i,...e}):e.typescript.isTypeOfExpression(i)?Vur({node:i,...e}):sCt(i,e.typescript)?Mur({node:i,...e}):sTn(i,e.typescript)?Uur({node:i,...e}):!((v=(h=e.typescript).isBigIntLiteral)===null||v===void 0)&&v.call(h,i)?Hur({node:i,...e}):e.typescript.isBreakStatement(i)?kur({node:i,...e}):e.typescript.isContinueStatement(i)?wur({node:i,...e}):e.typescript.isTypeAliasDeclaration(i)?({...e},void 0):e.typescript.isInterfaceDeclaration(i)?({...e},void 0):e.getCurrentError()!=null?void 0:e.throwError(new IN({node:i,environment:e.environment,typescript:e.typescript}))}function P9t(){return[]}function nfr(i){i.logger.logNode(i.node,i.typescript),i.statementTraversalStack=P9t(),I9t(i)}function rfr(i){let{getCurrentError:e}=i;i.logger.logNode(i.node,i.typescript);let r=I9t(i);if(e()==null)return i.reporting.reportIntermediateResults!=null&&i.reporting.reportIntermediateResults({node:i.node,value:r}),r}function ifr(i){i.logger.logNode(i.node,i.typescript),I9t(i)}function sfr({node:i,evaluate:e,typescript:r,logger:o,...u},d){var h;r.isIdentifier(i)||!((h=r.isPrivateIdentifier)===null||h===void 0)&&h.call(r,i)?(PB({...u,node:i,path:i.text,value:d,newBinding:!0}),o.logBinding(i.text,d,"evaluateBindingName")):e.nodeWithArgument(i,d,u)}function afr(i,e){let{node:r,environment:o,evaluate:u,typescript:d,getCurrentError:h}=i,v=u.nodeWithValue(r.name,i);if(h()!=null)return;let S=aCt(r,d);function k(...z){let te=b6(o,r),_e={...i,environment:te};PB({..._e,path:S2,value:!1,newBinding:!0}),PB({..._e,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(PB({..._e,path:g7,value:this,newBinding:!0}),PB({..._e,path:XCe,value:S?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RX({..._e,node:r.parameters},z),!(r.body==null||h()!=null)&&(u.statement(r.body,_e),h()==null)}k.toString=()=>`[Set: ${v}]`;let L=Object.getOwnPropertyDescriptor(e,v);L==null&&(L={}),Object.defineProperty(e,v,{...L,configurable:!0,set:k})}function ofr({node:i,evaluate:e,...r},o){let u=e.expression(i.initializer,r);if(r.getCurrentError()!=null)return;let d=e.nodeWithValue(i.name,r);r.getCurrentError()==null&&(o[d]=u)}function lfr({node:i,evaluate:e,logger:r,...o},u){let d=u!=null||i.initializer===void 0?u:e.expression(i.initializer,o);o.getCurrentError()==null&&(r.logBinding(i.name.getText(),d,"evaluateParameterDeclaration"),e.nodeWithArgument(i.name,d,o))}function cfr({node:i,evaluate:e,...r},o){let{getCurrentError:u}=r,d=i.name.text,h=e.expression(i.name,r);u()==null&&(o[d]=h)}function ufr({node:i,evaluate:e,...r},o){let u=e.expression(i.expression,r);r.getCurrentError()==null&&Object.assign(o,u)}function ffr({node:i,evaluate:e,...r},o){let u=o[Symbol.iterator](),d=0;for(;d<i.elements.length;){let{done:h,value:v}=u.next();if(h===!0)break;if(e.nodeWithArgument(i.elements[d++],v,r),r.getCurrentError()!=null)return}}function pfr(i,e){var r,o,u,d;let{node:h,evaluate:v,logger:S,typescript:k,getCurrentError:L}=i,z=h.initializer==null?void 0:v.expression(h.initializer,i);if(L()==null){if((k.isIdentifier(h.name)||!((r=k.isPrivateIdentifier)===null||r===void 0)&&r.call(k,h.name))&&h.propertyName!=null){let te=h.name.text,_e=v.nodeWithValue(h.propertyName,i);if(L()!=null)return;let Ae=k.isArrayBindingPattern(h.parent)?e:e[_e];PB({...i,path:te,value:Ae??z,newBinding:!0})}else if((k.isIdentifier(h.name)||!((o=k.isPrivateIdentifier)===null||o===void 0)&&o.call(k,h.name))&&h.propertyName==null){let te=h.name.text,_e=k.isArrayBindingPattern(h.parent)?e:e[te],Ae=_e??z;S.logBinding(h.name.text,Ae),PB({...i,path:h.name.text,value:Ae,newBinding:!0})}else if(!k.isIdentifier(h.name)&&!(!((u=k.isPrivateIdentifier)===null||u===void 0)&&u.call(k,h.name))&&h.propertyName!=null){let te=v.nodeWithValue(h.propertyName,i);if(L()!=null)return;let _e=k.isArrayBindingPattern(h.parent)?e:e[te],Ae=_e??z;if(v.nodeWithArgument(h.name,Ae,i),L()!=null)return}else if(!k.isIdentifier(h.name)&&!(!((d=k.isPrivateIdentifier)===null||d===void 0)&&d.call(k,h.name))&&h.propertyName==null){let te=e??z;if(v.nodeWithArgument(h.name,te,i),L()!=null)return}}}function dfr({node:i,evaluate:e,...r},o){for(let u of i.elements)if(e.nodeWithArgument(u,o,r),r.getCurrentError()!=null)return}function _fr(i,e){let{node:r,evaluate:o,environment:u,getCurrentError:d}=i,h=b6(u,r),v={...i,environment:h};PB({...v,path:aR,value:!1,newBinding:!0});for(let S of r.clauses){if(o.nodeWithArgument(S,e,v),d()!=null)return;if(UT(r,h,!0,aR,B7,S2))break}}function mfr({node:i,evaluate:e,...r},o){let{getCurrentError:u}=r;if(!(e.expression(i.expression,r)!==o||u()!=null))for(let h of i.statements){if(e.statement(h,r),u()!=null)return;if(UT(i,r.environment,!0,aR,B7,S2))break}}function hfr(i){let{node:e,evaluate:r,environment:o,getCurrentError:u}=i;for(let d of e.statements){if(r.statement(d,i),u()!=null)return;if(UT(e,o,!0,aR,B7,S2))break}}function Bfr(i,e){let{node:r,evaluate:o,environment:u,getCurrentError:d}=i,h=r.variableDeclaration==null?u:b6(u,r),v={...i,environment:h};r.variableDeclaration!=null&&(o.nodeWithArgument(r.variableDeclaration,e,v),d()!=null)||o.statement(r.block,v)}function gfr(i,e,r,o){let u=arguments.length,d=u<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,h;for(let v=i.length-1;v>=0;v--)(h=i[v])&&(d=(u<3?h(d):u>3?h(e,r,d):h(e,r))||d);return u>3&&d&&Object.defineProperty(e,r,d),d}function yfr(i,e){return function(r,o){e(r,o,i)}}function Cfr(i,[e,r,o]){let{node:u,evaluate:d,environment:h,throwError:v,stack:S,getCurrentError:k}=i,L=d.expression(u.expression,i);if(k()==null){if(typeof L!="function")return v(new eCt({node:u,environment:h,value:L,message:`${w9t(L)} is not a valid decorator implementation'`}));S.push(gfr([o!=null?yfr(o,L):L],e,r))}}function vfr(i,e){let{node:r,typeChecker:o,evaluate:u,getCurrentError:d}=i,h=o?.getConstantValue(r);if(h==null)if(r.initializer!=null){if(h=u.expression(r.initializer,i),d()!=null)return}else{let S=r.parent.members,k=S.findIndex(te=>te===r),L=S.slice(0,k),z=0;for(let te of[...L].reverse())if(z++,te.initializer!=null){let _e=u.expression(te.initializer,i);if(d()!=null)return;if(typeof _e=="number"){h=_e+z;break}}h==null&&(h=k)}let v=u.nodeWithValue(r.name,i);d()==null&&(typeof h=="string"?e[v]=h:e[e[v]=h??0]=v)}function bfr(i,e){i.logger.logNode(i.node,i.typescript,"nodeWithArgument");let{node:r,...o}=i;if(o.typescript.isGetAccessorDeclaration(r))dTn({node:r,...o},e);else if(o.typescript.isSetAccessorDeclaration(r))afr({node:r,...o},e);else if(o.typescript.isPropertyAssignment(r))ofr({node:r,...o},e);else if(o.typescript.isPropertyDeclaration(r))pTn({node:r,...o},e);else if(o.typescript.isParameter(r))lfr({node:r,...o},e);else if(o.typescript.isEnumMember(r))vfr({node:r,...o},e);else if(o.typescript.isShorthandPropertyAssignment(r))cfr({node:r,...o},e);else if(o.typescript.isDecorator(r))Cfr({node:r,...o},e);else if(o.typescript.isSpreadAssignment(r))ufr({node:r,...o},e);else if(o.typescript.isMethodDeclaration(r))fTn({node:r,...o},e);else if(o.typescript.isArrayBindingPattern(r))ffr({node:r,...o},e);else if(o.typescript.isBindingElement(r))pfr({node:r,...o},e);else if(o.typescript.isObjectBindingPattern(r))dfr({node:r,...o},e);else if(o.typescript.isVariableDeclaration(r))aTn({node:r,...o},e);else if(o.typescript.isCaseBlock(r))_fr({node:r,...o},e);else if(o.typescript.isCaseClause(r))mfr({node:r,...o},e);else if(o.typescript.isDefaultClause(r))hfr({node:r,...o});else if(o.typescript.isCatchClause(r))Bfr({node:r,...o},e);else if(o.typescript.isBindingName(r))sfr({node:r,...o},e);else if(o.typescript.isOmittedExpression(r))({...o});else{if(i.getCurrentError()!=null)return;o.throwError(new IN({node:r,environment:o.environment,typescript:o.typescript}))}}function Sfr({node:i,evaluate:e,typescript:r,...o}){var u;return r.isComputedPropertyName(i)?e.expression(i.expression,o):r.isIdentifier(i)||!((u=r.isPrivateIdentifier)===null||u===void 0)&&u.call(r,i)?i.text:e.expression(i,o)}function xfr(i){i.logger.logNode(i.node,i.typescript,"nodeWithValue");let{node:e,...r}=i;return i.typescript.isPropertyName(e)||i.typescript.isPrivateIdentifier(e)?Sfr({node:e,...r}):i.throwError(new IN({node:e,environment:i.environment,typescript:i.typescript}))}function Efr(i){let e=0,{policy:r,reporting:o}=i,u=(v,S)=>{let{environment:k=i.environment,statementTraversalStack:L=i.statementTraversalStack,getCurrentError:z=i.getCurrentError,throwError:te=i.throwError}=S??{},_e=z();if(_e!=null)return _e;if(e++,e>=r.maxOps)return te(new v9t({ops:e,environment:k,node:v}));L.push(v.kind),o.reportTraversal!=null&&o.reportTraversal({node:v})},d={statement:(v,S)=>{let k={...S,statementTraversalStack:P9t()},L=u(v,k);if(!_ne(L))return nfr(h(v,k))},declaration:(v,S)=>{let k=u(v,S);if(!_ne(k))return ifr(h(v,S))},nodeWithArgument:(v,S,k)=>{let L=u(v,k);if(!_ne(L))return bfr(h(v,k),S)},expression:(v,S)=>{let k=u(v,S);return _ne(k)?k:rfr(h(v,S))},nodeWithValue:(v,S)=>{let k=u(v,S);return _ne(k)?k:xfr(h(v,S))}};function h(v,S){return{...i,...S,evaluate:d,node:v}}return d}function Hqe(i,e){return i===e.SyntaxKind.NumericLiteral?"NumericLiteral":e.SyntaxKind[i]}var T9t=class{constructor(e={}){let{logLevel:r=0,color:{info:o="white",verbose:u="yellow",debug:d="magenta"}={}}=typeof e=="object"?e:{logLevel:e};this.options={logLevel:r,color:{info:o,verbose:u,debug:d}}}logInfo(e){this.options.logLevel<1||console.log(this.formatWithColor(this.options.color.info,e))}logVerbose(e){this.options.logLevel<2||console.log(this.formatWithColor(this.options.color.verbose,e))}logDebug(e){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,e))}logContinue(e,r){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"continue")} encountered within ${this.formatWithColor(this.options.color.debug,Hqe(e.kind,r))}`)}logBreak(e,r){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"break")} encountered within ${this.formatWithColor(this.options.color.debug,Hqe(e.kind,r))}`)}logReturn(e,r){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"return")} encountered within ${this.formatWithColor(this.options.color.debug,Hqe(e.kind,r))}`)}logResult(e,r){this.options.logLevel<1||(r!=null?console.log(this.formatWithColor(this.options.color.info,`(intermediate value from context '${r}'):`),this.formatWithColor(this.options.color.info,"[RESULT]:"),this.compactValue(e)):console.log(this.formatWithColor(this.options.color.info,"[RESULT]:"),e))}logNode(e,r,o){if(this.options.logLevel<3)return;let u=`[${Hqe(e.kind,r)}]`.padEnd(25);o!=null&&(u+=this.formatWithColor(this.options.color.debug,`(${o})`));let d=e.getText(),h=this.formatWithColor(this.options.color.debug,u),v=this.formatWithColor(this.options.color.debug,d);console.log(h),console.log(v)}logBinding(e,r,o){this.options.logLevel<2||console.log(`${o==null?"":this.formatWithColor(this.options.color.verbose,`(${o}): `)}${this.formatWithColor(this.options.color.verbose,`${e} ->`)}`,this.formatWithColor(this.options.color.verbose,this.compactValue(r)))}logHeritage(e){if(this.options.logLevel<3)return;let r=Object.getPrototypeOf(e);r.toString().includes("[Class")&&console.log(`${this.formatWithColor(this.options.color.debug,e.toString())} ${this.formatWithColor(this.options.color.debug,"extends")} ${this.formatWithColor(this.options.color.debug,r.toString())}`)}logStack(e){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,`Stack value: ${w9t(this.compactValue(e.lastItem))}`))}logStatementTraversalStack(e,r){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,`[${e.map(o=>Hqe(o,r)).join(", ")}]`))}compactValue(e){return(0,qEn.inspect)(e,{depth:0,colors:!0,compact:!0,maxArrayLength:5})}formatWithColor(e,r){return KEn.default[e](r)}};function Tfr(i,e){var r;return e.isExpressionNode(i)||e.isIdentifier(i)||((r=e.isPrivateIdentifier)===null||r===void 0?void 0:r.call(e,i))}function Dfr(i,e){return e.isStatementButNotDeclaration(i)}function Afr(){let i=[];return{[Symbol.iterator](){return i[Symbol.iterator]()},get length(){return i.length},get lastItem(){return i[i.length-1]},push(...e){return i.push(...e)},pop(){return i.pop()}}}function kfr(i,e,r){i.reportErrors!=null&&!i.reportedErrorSet.has(e)&&(i.reportedErrorSet.add(e),i.reportErrors({error:e,node:e instanceof y7?e.node:r}))}function wfr(){return new WeakSet}function _Tn({typeChecker:i,node:e,environment:{preset:r="NODE",extra:o={}}={},moduleOverrides:u={},typescript:d=Dcr,logLevel:h=0,policy:{deterministic:v=!1,network:S=!1,console:k=!1,maxOps:L=1/0,maxOpDuration:z=1/0,io:te={read:!0,write:!1},process:_e={exit:!1,spawnChild:!1}}={},reporting:Ae={}}){let Ie=Qcr(e,d);if(Ie.success)return Ie;let Xe={deterministic:v,maxOps:L,maxOpDuration:z,network:S,console:k,io:{read:typeof te=="boolean"?te:te.read,write:typeof te=="boolean"?te:te.write},process:{exit:typeof _e=="boolean"?_e:_e.exit,spawnChild:typeof _e=="boolean"?_e:_e.spawnChild}},Ve={...Ae,reportedErrorSet:wfr()},ze,Pt=new T9t(h),Zt=br=>(kfr(Ve,br,br.node),ze=br,ze),mn=Ycr({inputEnvironment:{preset:r,extra:o},startingNode:e,policy:Xe}),Jn=Afr(),wn=P9t(),Cn={policy:Xe,typeChecker:i,typescript:d,logger:Pt,stack:Jn,moduleOverrides:u,reporting:Ve,throwError:Zt,environment:mn,statementTraversalStack:wn,getCurrentError:()=>ze},$n=Efr(Cn);try{let br;return Tfr(e,d)?br=$n.expression(e,Cn):Dfr(e,d)?($n.statement(e,Cn),br=Jn.pop()):YEn(e,d)?($n.declaration(e,Cn),br=Jn.pop()):Zt(new IN({node:e,environment:mn,typescript:d})),ze!=null?{success:!1,reason:ze}:(Pt.logResult(br),{success:!0,value:br})}catch(br){return Zt(br),{success:!1,reason:br}}}var bTn=Km(eG(),1);var C7=Km(eG(),1);var Yqe=Km(eG(),1);var $Ce=Km(eG(),1);var GX=Km(eG(),1);var F9t=Km(eG(),1);var O9t=Km(eG(),1);var Ifr=i=>{if(Array.isArray(i))return"array";if(typeof i=="string")return"string";if(typeof i=="number")return"number";if(typeof i=="boolean")return"boolean";if(i===null)return"null";if(i===void 0)return"undefined";throw new Error(`Unexpected literal type: ${i}`)},VI=i=>i!=null,yTn=i=>i==null,CTn=i=>i!=null&&typeof i=="object",Pfr=i=>Array.isArray(i),Nfr=i=>{let e=typeof i;return e==="string"||e==="number"||e==="boolean"||i===null||i===void 0},x2=i=>Xqe.Node.isAsExpression(i)||Xqe.Node.isParenthesizedExpression(i)||Xqe.Node.isNonNullExpression(i)||Xqe.Node.isTypeAssertion(i)?x2(i.getExpression()):i,Lfr=i=>i.getTagNameNode().getText(),Ffr=/\s+/g,vTn=i=>i.replaceAll(Ffr," "),Ofr=i=>{let e=i.getSourceFile(),[r,o]=[i.getStart(),i.getEnd()],u=e.getLineAndColumnAtPos(r),d=e.getLineAndColumnAtPos(o);return{startPosition:r,startLineNumber:u.line,startColumn:u.column,endPosition:o,endLineNumber:d.line,endColumn:d.column}},Nue=class{type;stack=[];node;constructor(i){this.type=i.type,this.node=i.node,this.stack=[...i.stack??[]]}getNode(){return this.node}getStack(){return this.stack}getRange=()=>Ofr(this.node);toJSON(){let i=this.getRange();return{type:this.type,value:this.value,node:this.node.getKindName(),line:i.startLineNumber,column:i.startColumn}}toString(){return JSON.stringify(this.toJSON(),null,2)}},mTn=class extends Nue{value;isEmpty;constructor(i){super(i),this.value=i.value,this.isEmpty=i.isEmpty}},Rfr=class extends Nue{value;kind;constructor(i){super(i),this.value=i.value,this.kind=i.kind}},Mfr=class extends Nue{value;spreadConditions;constructor(i){super(i),this.value=i.value}},Gfr=class extends Nue{value;constructor(i){super(i),this.value=i.value}},jfr=class extends Nue{},Ufr=class extends Nue{whenTrue;whenFalse;constructor(i){super(i),this.whenTrue=i.whenTrue,this.whenFalse=i.whenFalse}},Wfr=class extends Nue{},t6e=i=>i instanceof Nue;function L9t(i,e,r){return u0(i).when(yTn,()=>{}).when(t6e,o=>o).when(CTn,o=>Of.object(o,e,r)).when(Pfr,o=>o.length===1?L9t(o[0],e,r):o.map(u=>L9t(u,e,r))).when(Nfr,o=>Of.literal(o,e,r)).otherwise(()=>{})}var Of={object(i,e,r){return new mTn({type:"object",value:i,node:e,stack:r})},literal(i,e,r){return new Rfr({type:"literal",value:i,kind:Ifr(i),node:e,stack:r})},map(i,e,r){return new Mfr({type:"map",value:i,node:e,stack:r})},array(i,e,r){return new Gfr({type:"array",value:i,node:e,stack:r})},conditional(i,e,r,o){return new Ufr({type:"conditional",whenTrue:i,whenFalse:e,node:r,stack:o})},from:L9t,emptyObject:(i,e)=>new mTn({type:"object",value:{},isEmpty:!0,node:i,stack:e}),emptyInitializer:(i,e)=>new Wfr({type:"empty-initializer",node:i,stack:e}),unresolvable:(i,e)=>new jfr({type:"unresolvable",node:i,stack:e}),isObject(i){return i?.type==="object"},isLiteral(i){return i?.type==="literal"},isMap(i){return i?.type==="map"},isArray(i){return i?.type==="array"},isUnresolvable(i){return i?.type==="unresolvable"},isConditional(i){return i?.type==="conditional"},isEmptyInitializer(i){return i?.type==="empty-initializer"},isNumberLiteral(i){return Of.isLiteral(i)&&i.kind==="number"},hasValue:i=>Of.isObject(i)||Of.isLiteral(i)||Of.isMap(i)||Of.isArray(i)},STn=Symbol("EvalError"),N9t=new WeakMap,Vfr=(i,e,r)=>{if(r.flags?.skipEvaluate||r.canEval&&!r.canEval?.(i,e))return;if(N9t.has(i))return N9t.get(i);let o=_Tn({node:i.compilerNode,typescript:bTn.ts,policy:{deterministic:!0,network:!1,console:!1,maxOps:Number.POSITIVE_INFINITY,maxOpDuration:1e3,io:{read:!0,write:!1},process:{exit:!1,spawnChild:!1}},...r.getEvaluateOptions?.(i,e)}),u=o.success?o.value:STn;return N9t.set(i,u),u},oCt=(i,e,r)=>{let o=Vfr(i,e,r);if(o!==STn)return o},lCt=K$t("findIdentifierValueDeclaration");function Hfr(i){return C7.Node.isFunctionDeclaration(i)||C7.Node.isFunctionExpression(i)||C7.Node.isArrowFunction(i)||C7.Node.isSourceFile(i)}function zfr(i,e,r){let o=i.getParent();if(!o)return;let u=[],d;if((C7.Node.isVariableDeclaration(o)||C7.Node.isParameterDeclaration(o)||C7.Node.isFunctionDeclaration(o)||C7.Node.isBindingElement(o))&&o.getNameNode()==i)Wd.debug(lCt("getDeclarationFor"),{isDeclarationLike:!0,kind:o.getKindName()}),u.push(o),d=o;else if(C7.Node.isImportSpecifier(o)&&o.getNameNode()==i){if(r.flags?.skipTraverseFiles)return;let h=kTn(o.getImportDeclaration());if(Wd.debug(lCt("getDeclarationFor"),{isImportDeclaration:!0,sourceFile:!!h}),h){let v=[o,h],S=ATn(i.getText(),h,v,r);Wd.debug(lCt("getDeclarationFor"),{from:h.getFilePath(),hasVar:!!S}),S&&(u.push(...v.concat(S)),d=S)}}return Wd.debug(lCt("getDeclarationFor"),{node:i.getKindName(),parent:o.getKindName(),declaration:d?.getKindName()}),d&&e.push(...u),d}var Jfr=i=>{let e=i.getParent();for(;e&&!Hfr(e);)e=e.getParent();return Wd.debug("getInnermostScope",{found:e?.getKindName()}),e};function pCt(i,e,r,o=new Map){let u=i,d,h=!1,v=0,S=[];do{if(u=Jfr(u),Wd.debug("find",{identifier:i.getText(),scope:u?.getKindName(),count:v++}),!u)return;let k=i.getText();if(u.forEachDescendant((L,z)=>{if(o.has(L)){z.skip(),S.push(...o.get(L));return}if(L!=i&&(o.set(L,S),C7.Node.isIdentifier(L)&&L.getText()==k)){let te=[L],_e=zfr(L,te,r);if(_e){if(C7.Node.isParameterDeclaration(_e)){let Ae=_e.getInitializer(),Ie=_e.getTypeNode();Ae?(S.push(...te.concat(Ae)),d=_e):Ie&&C7.Node.isTypeLiteral(Ie)?(S.push(...te.concat(Ie)),d=_e):h=!0,z.stop();return}S.push(...te),d=_e,z.stop()}}}),Wd.debug("find",{scope:u.getKindName(),foundNode:d?.getKindName(),isUnresolvable:h}),d||h)return d&&e.push(...S),d}while(u&&!C7.Node.isSourceFile(u)&&!d&&!h&&v<100);Wd.debug("find",{end:!0,count:v,scope:u?.getKindName(),isUnresolvable:h})}var qfr=(i,e,r)=>u0(i).when($Ce.Node.isPropertyAssignment,o=>{let u=x2(o.getNameNode());return u0(u).when($Ce.Node.isIdentifier,d=>Of.from(d.getText(),d,e)).when($Ce.Node.isComputedPropertyName,d=>{let h=d.getExpression();return e.push(h),jX(h,e,r)}).when(y6.or($Ce.Node.isStringLiteral,$Ce.Node.isNumericLiteral),d=>Of.from(d.getLiteralText(),d,e)).otherwise(()=>{})}).when($Ce.Node.isShorthandPropertyAssignment,o=>{let u=o.getName();if(u!=null)return Of.from(u,o,e)}).otherwise(()=>{}),Kfr=(i,e,r,o)=>{let u=i.getProperties();if(u.length===0)return Of.emptyObject(i,e);let d=[],h=[];u.forEach(k=>{let L=[...e];if(L.push(k),Yqe.Node.isPropertyAssignment(k)||Yqe.Node.isShorthandPropertyAssignment(k)){let z=qfr(k,L,r);if(!z)return;let te=z.value;if(yTn(te)||o&&!o?.({propName:te,propNode:k}))return;if(Yqe.Node.isShorthandPropertyAssignment(k)){let Xe=k.getNameNode();L.push(Xe);let Ve=Ux(Xe,L,r);if(Ve){d.push([te.toString(),Ve]);return}}let _e=k.getInitializer();if(!_e)return;let Ae=x2(_e);L.push(Ae),Wd.debug("prop",{propName:te,kind:Ae.getKindName()});let Ie=Ux(Ae,L,r);if(Wd.debug("prop-value",{propName:te,hasValue:!!Ie}),Ie){Wd.debug("prop-value",{propName:te,maybeValue:Ie}),d.push([te.toString(),Ie]);return}}if(Yqe.Node.isSpreadAssignment(k)){let z=x2(k.getExpression());L.push(z);let te=Ux(z,L,r,o);if(Wd.debug("isSpreadAssignment",{extracted:!!te}),!te)return;if(Of.isObject(te)){Object.entries(te.value).forEach(([_e,Ae])=>{let Ie=Of.from(Ae,z,L);Ie&&d.push([_e,Ie])});return}if(Of.isMap(te)){te.value.forEach((_e,Ae)=>{d.push([Ae,_e])});return}Of.isConditional(te)&&h.push(te)}});let v=new Map;d.forEach(([k,L])=>{v.has(k)&&v.delete(k),v.set(k,L)});let S=Of.map(v,i,e);return h.length>0&&(S.spreadConditions=h),S},R9t=new WeakMap,Xfr=i=>R9t.has(i),Yfr=i=>R9t.get(i),Qfr=i=>i===qd.ts.SyntaxKind.PlusToken,$fr=i=>i===qd.ts.SyntaxKind.BarBarToken||i===qd.ts.SyntaxKind.QuestionQuestionToken||i===qd.ts.SyntaxKind.AmpersandAmpersandToken||i===qd.ts.SyntaxKind.EqualsEqualsEqualsToken||i===qd.ts.SyntaxKind.EqualsEqualsToken||i===qd.ts.SyntaxKind.ExclamationEqualsEqualsToken||i===qd.ts.SyntaxKind.ExclamationEqualsToken||i===qd.ts.SyntaxKind.GreaterThanEqualsToken||i===qd.ts.SyntaxKind.GreaterThanToken||i===qd.ts.SyntaxKind.LessThanEqualsToken||i===qd.ts.SyntaxKind.LessThanToken||i===qd.ts.SyntaxKind.InstanceOfKeyword||i===qd.ts.SyntaxKind.InKeyword,Zfr=i=>i===qd.ts.SyntaxKind.AsteriskToken||i===qd.ts.SyntaxKind.SlashToken||i===qd.ts.SyntaxKind.PercentToken||i===qd.ts.SyntaxKind.AsteriskAsteriskToken||i===qd.ts.SyntaxKind.MinusToken,epr=i=>i===qd.ts.SyntaxKind.BarBarToken||i===qd.ts.SyntaxKind.QuestionQuestionToken;function Ux(i,e,r,o){let u=d=>(R9t.set(i,d),d);return u0(i).when(Xfr,Yfr).when(y6.or(qd.Node.isStringLiteral,qd.Node.isNoSubstitutionTemplateLiteral),d=>{let h=vTn(d.getLiteralValue());return u(Of.literal(h,d,e))}).when(qd.Node.isObjectLiteralExpression,d=>u(Kfr(d,e,r,o))).when(y6.or(qd.Node.isTrueLiteral,qd.Node.isFalseLiteral),d=>{let h=d.getLiteralValue();return u(Of.literal(h,d,e))}).when(qd.Node.isNumericLiteral,d=>{let h=d.getLiteralValue();return u(Of.literal(h,d,e))}).when(qd.Node.isNullLiteral,d=>u(Of.literal(null,d,e))).when(qd.Node.isPrefixUnaryExpression,d=>{let h=d.getOperand(),v=d.getOperatorToken(),S=Ux(h,e,r);if(Of.isNumberLiteral(S))return u(v===qd.ts.SyntaxKind.MinusToken?Of.literal(-Number(S.value),d,e):S)}).when(qd.Node.isArrayLiteralExpression,d=>{let h=d.getElements().map(v=>Ux(v,e,r)??u(Of.unresolvable(v,e)));return u(Of.array(h,d,e))}).when(qd.Node.isIdentifier,d=>u0(d.getText()).with("undefined",()=>u(Of.literal(void 0,d,e))).otherwise(()=>u(cpr(d,e,r)))).when(qd.Node.isTemplateHead,d=>u(Of.literal(d.getLiteralText(),d,e))).when(qd.Node.isTemplateExpression,d=>{let h=ETn(d,e,r);return u(Of.literal(h,d,e))}).when(qd.Node.isTaggedTemplateExpression,d=>u(Ux(d.getTemplate(),e,r))).when(qd.Node.isElementAccessExpression,d=>u(uCt(d,e,r))).when(qd.Node.isPropertyAccessExpression,d=>u(fCt(d,[],e,r))).when(qd.Node.isConditionalExpression,d=>{if(r.flags?.skipConditions)return u(Of.unresolvable(d,e));let h=x2(d.getCondition()),v=(qd.Node.isIdentifier(h)?Ux(h,[],r):oCt(h,e,r))??Of.unresolvable(h,e),S=t6e(v)?v:Of.from(v,d,e);if(Of.isEmptyInitializer(S))return;if(Of.isUnresolvable(S)||Of.isConditional(S)){let te=x2(d.getWhenTrue()),_e=x2(d.getWhenFalse());return u(hTn({whenTrueExpr:te,whenFalseExpr:_e,node:d,stack:e},r))}if(S.value){let te=x2(d.getWhenTrue()),_e=[...e],Ae=Ux(te,_e,r);return u(Ae??Of.unresolvable(te,e))}let k=x2(d.getWhenFalse()),L=[...e],z=Ux(k,L,r);return u(z??Of.unresolvable(d,e))}).when(qd.Node.isCallExpression,d=>{let h=oCt(d,e,r);if(h)return u(Of.from(h,d,e))}).when(qd.Node.isBinaryExpression,d=>{let h=d.getOperatorToken().getKind();return u0(h).when(Qfr,()=>{let v=wTn(d,e,r)??oCt(d,e,r);if(v)return u(Of.from(v,d,e))}).when($fr,v=>{let S=x2(d.getLeft()),k=x2(d.getRight()),L={whenTrueExpr:S,whenFalseExpr:k,node:d,stack:e,canReturnWhenTrue:epr(v)};return u(hTn(L,r))}).when(Zfr,()=>u(Of.literal(oCt(d,e,r),d,e))).otherwise(()=>{})}).otherwise(()=>{})}var xTn=i=>{if(i&&t6e(i)&&Of.isLiteral(i)&&typeof i.value=="string")return i},tpr=i=>{if(i&&t6e(i)&&Of.isLiteral(i)&&typeof i.value=="number")return i},npr=(i,e,r)=>xTn(Ux(i,e,r)),jX=(i,e,r)=>{Wd.debug("prop-name",i.getKindName());let o=Ux(i,e,r),u=xTn(o);if(u)return u;let d=tpr(o);if(d)return d},hTn=({whenTrueExpr:i,whenFalseExpr:e,node:r,stack:o,canReturnWhenTrue:u},d)=>{let h=Ux(i,o,d),v=Ux(e,o,d);if(Wd.debug("cond",{before:!0,whenTrueValue:h,whenFalseValue:v,canReturnWhenTrue:u}),u&&h&&!Of.isUnresolvable(h))return Wd.debug("cond",{earlyReturn:!0,whenTrueValue:h}),h;if(Wd.debug("cond",{after:!0,whenTrueValue:h,whenFalseValue:v}),qd.Node.isBinaryExpression(r)&&r.getOperatorToken().getKind()===qd.ts.SyntaxKind.AmpersandAmpersandToken&&h&&v&&Of.isLiteral(h)&&h.value===!0)return v;if(!h&&!v)return;if(h&&!v)return h;if(!h&&v)return v;let S=h,k=v;return Of.isLiteral(S)&&Of.isLiteral(k)&&S.value===k.value?S:Of.conditional(S,k,r,o)},rpr=(i,e,r,o)=>{let u=[...r];if(Wd.debug("find-prop",{propName:e,kind:i.getKindName()}),qd.Node.isPropertyAssignment(i)){let d=i.getNameNode();if(qd.Node.isIdentifier(d)&&d.getText()===e)return u.push(d),i;if(qd.Node.isStringLiteral(d)&&d.getLiteralText()===e)return u.push(d),d.getLiteralText();if(qd.Node.isComputedPropertyName(d)){let h=x2(d.getExpression()),v=jX(h,u,o);if(!v)return;if(String(v.value)===e)return u.push(d,h),i}}if(qd.Node.isShorthandPropertyAssignment(i)){let d=i.getNameNode();if(qd.Node.isIdentifier(d)&&d.getText()===e)return u.push(d),i}},M9t=(i,e,r,o)=>{let u=[...r],d=e.pop(),h=i.getProperty(d)??i.getProperties().find(v=>rpr(v,d,u,o));if(Wd.debug("get-prop",{propName:d,accessList:e,propertyKind:h?.getKindName(),initializerKind:i.getKindName()}),!!h){if(u.push(h),qd.Node.isPropertyAssignment(h)){let v=h.getInitializer();if(!v)return;if(Wd.debug("get-prop",{propAssignment:!0,propInitKind:v.getKindName()}),qd.Node.isObjectLiteralExpression(v))return e.length>0?M9t(v,e,u,o):Ux(v,u,o);let S=Ux(v,u,o);if(S)return S}if(qd.Node.isShorthandPropertyAssignment(h)){let v=h.getNameNode();if(Wd.debug("get-prop",{shorthand:!0,accessList:e,propInit:v.getText()}),e.length>0)return MX(v,e,u,o);let S=Ux(v,u,o);if(S)return S}}},ETn=(i,e,r)=>{let o=i.getHead(),u=i.getTemplateSpans(),d=npr(o,e,r);if(!d)return;let h=u.map(v=>{let S=v.getExpression(),k=jX(S,e,r);if(!k)return;let L=v.getLiteral();return k.value+L.getLiteralText()});if(h.every(VI))return d.value+h.join("")},TTn=(i,e,r,o)=>{let u=i.getParent();if(Wd.debug("id-def",{parent:u?.getKindName()}),!u)return;let d=u.getParent();if(Wd.debug("id-def",{grandParent:d?.getKindName()}),!!d){if(qd.Node.isArrayBindingPattern(u)){let h=u.getChildIndex();if(Number.isNaN(h))return;if(qd.Node.isVariableDeclaration(d)){let v=d.getInitializer();if(Wd.debug("id-def",{grandParentInit:v?.getKindName()}),!v)return;let S=x2(v);if(!qd.Node.isArrayLiteralExpression(S))return;let k=S.getElements()[h+1];if(Wd.debug("id-def",{index:h,propName:r,elementKind:k?.getKindName()}),!k)return;let L=[...e,S,k],z=Ux(k,L,o);if(!z)return;if(Of.isObject(z)){let _e=z.value[r];return Wd.debug("id-def",{propName:r,propValue:_e}),Of.from(_e,k,L)}if(!Of.isMap(z))return z;let te=z.value.get(r);return te?(Wd.debug("id-def",{propName:r,propValue:te}),te):void 0}}qd.Node.isObjectBindingPattern(u)}};function ipr(i,e,r,o){let u=e.at(-1);if(Wd.debug("maybe-prop-def-value",{propName:u,accessList:e,kind:i.getKindName()}),qd.Node.isVariableDeclaration(i)){let d=i.getInitializer();if(Wd.debug("maybe-prop-def-value",{kind:d?.getKindName(),propName:u}),!d){let k=i.getTypeNode();if(!k)return;if(qd.Node.isTypeLiteral(k)){if(Wd.debug("maybe-prop-def-value",{typeLiteral:!0}),e.length>0){let z=[...r];z.push(k);let te=e.pop(),_e=k.getProperty(te),Ae=_e?.getTypeNode();for(;_e&&e.length>0&&Ae&&qd.Node.isTypeLiteral(Ae);)z.push(_e,Ae),te=e.pop(),_e=Ae.getProperty(te),Ae=_e?.getTypeNode();if(!Ae)return;let Ie=G9t(Ae,z,o);return Wd.debug("maybe-prop-def-value",{propName:te,typeValue:!!Ie}),Of.from(Ie,Ae,z)}let L=DTn(k,u,r,o);return r.push(k),Of.from(L,k,r)}return}let h=x2(d);if(Wd.debug("maybe-prop-def-value",{kind:h.getKindName(),propName:u}),qd.Node.isObjectLiteralExpression(h)){let k=M9t(h,e,r,o);return k?(r.push(h),k):void 0}if(qd.Node.isArrayLiteralExpression(h)){let k=Number(u);if(Number.isNaN(k))return;let L=h.getElements()[k];if(!L)return;r.push(h);let z=Ux(L,r,o);if(z&&t6e(z)&&Of.isLiteral(z))return z}let v=[...r,h],S=Ux(h,v,o);if(S)return S}if(qd.Node.isBindingElement(i)){let d=TTn(i,r,u,o);if(d)return d}}var MX=(i,e,r,o)=>{let u=pCt(i,r,o);if(Wd.debug("maybePropIdentifierValue",{identifier:i.getText(),hasValueDeclaration:!!u}),!u)return Of.unresolvable(i,r);let d=x2(u);Wd.debug("maybePropIdentifierValue",{def:d.getKindName(),accessList:e});let h=ipr(u,e,r,o);return h||Of.unresolvable(i,r)},QCe=new WeakMap,DTn=(i,e,r,o)=>{if(QCe.has(i)){let h=QCe.get(i);if(Wd.debug("cached",{typeLiteralNodeProp:!0,kind:i.getKindName()}),h===null)return;if(h?.has(e))return h.get(e)}let d=i.getMembers().find(h=>qd.Node.isPropertySignature(h)&&h.getName()===e);if(qd.Node.isPropertySignature(d)&&d.isReadonly()){let h=d.getTypeNode();if(!h){QCe.set(i,null);return}let v=G9t(h,r,o);if(Wd.debug("type",{propName:e,hasPropValue:VI(v)}),VI(v))return QCe.has(i)||QCe.set(i,new Map),QCe.get(i).set(e,v),v}QCe.set(i,null)};function spr(i){return Wd.debug("literal",{name:i.getText(),kind:i.getKindName()}),qd.Node.isStringLiteral(i)?i.getLiteralText():i.getText()}var Kqe=new WeakMap,G9t=(i,e,r)=>{if(Kqe.has(i))return Wd.debug("cached",{typeNode:!0,kind:i.getKindName()}),Kqe.get(i);if(qd.Node.isLiteralTypeNode(i)){let o=i.getLiteral();if(qd.Node.isStringLiteral(o)){let u=o.getLiteralText();return Wd.debug("type-value",{result:u}),Kqe.set(i,u),u}}if(qd.Node.isTypeLiteral(i)){let o=i.getMembers();if(!o.some(u=>!qd.Node.isPropertySignature(u)||!u.isReadonly())){let d=o.map(v=>{let S=v.getNameNode(),k=S.getText(),L=spr(S);if(Wd.debug("isTypeLiteral",{nameNodeKind:S.getKindName(),name:L}),!L)return;let z=DTn(i,k,e,r);return[L,z]}).filter(VI),h=Object.fromEntries(d);return Kqe.set(i,h),h}}Kqe.set(i,void 0)},apr=(i,e,r)=>{if(Wd.debug("maybe-def-value",{kind:i.getKindName()}),qd.Node.isShorthandPropertyAssignment(i)){let o=i.getNameNode();return MX(o,[o.getText()],e,r)}if(qd.Node.isVariableDeclaration(i)){let o=i.getInitializer();if(Wd.debug("maybe-def-value",{varDeclaration:!0,kind:o?.getKindName()}),!o){let v=i.getTypeNode();if(!v)return;if(Wd.debug("maybe-def-value",{noInit:!0,kind:v.getKindName()}),qd.Node.isTypeLiteral(v)){e.push(v);let S=G9t(v,e,r);if(VI(S))return Of.from(S,i,e)}return Of.unresolvable(i,e)}let u=x2(o),d=[...e,u],h=Ux(u,d,r);if(h)return h}if(qd.Node.isBindingElement(i)){let o=i.getInitializer();if(!o){let v=i.getPropertyNameNode()??i.getNameNode(),S=v.getText(),k=[...e,v];Wd.debug("maybe-def-value",{bindingElement:!0,propName:S});let L=TTn(i,k,S,r);return L||Of.unresolvable(i,e)}let u=x2(o),d=[...e,u],h=Ux(u,d,r);if(h)return h}},ATn=(i,e,r,o)=>{let u=e.getVariableDeclaration(i);if(Wd.debug("getExportedVarDeclarationWithName",{varName:i,path:e.getFilePath(),hasVar:!!u}),u)return u;let d=lpr(i,e,r,o);if(Wd.debug("getExportedVarDeclarationWithName",{exportDeclaration:!!d}),!!d)return d},opr=(i,e)=>{let r=e.getNamedExports();if(r.length===0)return!0;for(let o of r){let u=o.getNameNode().getText();if(Wd.debug("export-declaration",{searching:i,exportedName:u}),u===i)return!0}},kTn=i=>{let e=i.getProject(),r=i.getModuleSpecifierValue();if(Wd.debug("getModuleSpecifierSourceFile",{moduleName:r}),!r)return;let o=i.getSourceFile().getFilePath(),u=qd.ts.resolveModuleName(r,o,e.getCompilerOptions(),e.getModuleResolutionHost());if(Wd.debug("getModuleSpecifierSourceFile",u),!u.resolvedModule)return;let d=e.addSourceFileAtPath(u.resolvedModule.resolvedFileName);return Wd.debug("getModuleSpecifierSourceFile",{found:!!d}),d};function lpr(i,e,r,o){for(let u of e.getExportDeclarations()){let d=[u];if(Wd.debug("resolveVarDeclarationFromExportWithName",{symbolName:i,exporDeclarationKind:u.getKindName()}),!opr(i,u))continue;let h=kTn(u);if(!h)continue;d.push(h);let v=ATn(i,h,r,o);if(v)return r.push(...d.concat(v)),v}}var cpr=(i,e,r)=>{let o=pCt(i,e,r);if(Wd.debug("id-ref",{identifier:i.getText(),hasValueDeclaration:!!o}),!o)return Of.unresolvable(i,e);let u=x2(o);Wd.debug("id-ref",{def:u.getKindName()});let d=[...e],h=apr(u,d,r);return h||Of.unresolvable(i,d)},wTn=(i,e,r)=>{let o=x2(i.getLeft()),u=x2(i.getRight()),d=jX(o,e,r),h=jX(u,e,r);if(!(!d||!h)&&(Wd.debug("tryComputingPlusTokenBinaryExpressionToString",{leftValue:d,rightValue:h}),VI(d.value)&&VI(h.value)))return Of.literal(String(d.value)+String(h.value),i,e)},uCt=(i,e,r)=>{let o=x2(i.getExpression()),u=i.getArgumentExpression();if(!u)return;let d=x2(u),h=[...e,o,d],v=jX(d,h,r);if(qd.Node.isIdentifier(o)&&v)return VI(v.value)?MX(o,[v.value.toString()],h,r):void 0;if(qd.Node.isBinaryExpression(d)){if(d.getOperatorToken().getKind()!==qd.ts.SyntaxKind.PlusToken)return;let S=wTn(d,h,r)??jX(d,h,r);if(S&&qd.Node.isIdentifier(o))return VI(S.value)?MX(o,[S.value.toString()],h,r):void 0}if(qd.Node.isTemplateExpression(d)){let S=ETn(d,h,r);if(S&&qd.Node.isIdentifier(o))return MX(o,[S],h,r)}if(qd.Node.isObjectLiteralExpression(o)&&v)return VI(v.value)?M9t(o,[v.value.toString()],h,r):void 0;if(qd.Node.isPropertyAccessExpression(d))return fCt(d,[],h,r);if(qd.Node.isPropertyAccessExpression(o)&&v&&VI(v.value)){let S=fCt(o,[],h,r);if(!S)return Of.unresolvable(o,h);let k=v.value.toString();if(Wd.debug("PropertyAccessExpression",{propRefValue:S,propName:k}),Of.isObject(S)){let L=S.value[k];return Of.from(L,d,h)}if(Of.isMap(S)){let L=S.value.get(k);return Of.from(L,d,h)}if(Of.isArray(S)){let L=S.value[Number(k)];return Of.from(L,d,h)}return Of.unresolvable(o,h)}if(qd.Node.isIdentifier(o)&&qd.Node.isElementAccessExpression(d)){let S=uCt(d,h,r);if(Wd.debug("element:access",{isArgElementAccessExpression:!0,propName:S}),typeof S=="string"&&VI(S))return MX(o,[S],h,r)}if(qd.Node.isElementAccessExpression(o)&&v&&VI(v.value)){let S=uCt(o,h,r);if(Wd.debug("element:access",{isElementAccessExpression:!0,identifier:S,argValue:v}),CTn(S)){let k=v.value.toString();if(Of.isMap(S)){let L=S.value.get(k);return Wd.debug("isMap",{isElementAccessExpression:!0,maybeValue:L}),L}if(Of.isObject(S)){let L=S.value[k];return Wd.debug("isObject",{isElementAccessExpression:!0,maybeLiteralValue:L}),L?Of.from(L,i,h):void 0}}}if(qd.Node.isArrayLiteralExpression(o)&&v)return upr(o,Number(v.value),h,r);if(qd.Node.isConditionalExpression(d)){if(r.flags?.skipConditions)return Of.unresolvable(d,h);let S=jX(d,h,r);if(Wd.debug("isConditional",{isConditionalExpression:!0,propName:S}),VI(S)&&VI(S.value)&&qd.Node.isIdentifier(o))return MX(o,[S.value.toString()],h,r);let k=x2(d.getWhenTrue()),L=x2(d.getWhenFalse()),z=jX(k,h,r),te=jX(L,h,r);if(qd.Node.isIdentifier(o)){let _e=z&&VI(z.value)?MX(o,[z.value.toString()],h,r):void 0,Ae=te&&VI(te.value)?MX(o,[te.value.toString()],h,r):void 0;return!_e&&!Ae?void 0:_e&&!Ae?_e:!_e&&Ae?Ae:Of.conditional(_e,Ae,d,h)}}},upr=(i,e,r,o)=>{let u=i.getElements()[e];if(!u)return;let d=Ux(u,r,o);if(Wd.debug("array:element",{arrayKind:i.getKindName(),elementKind:u.getKindName(),value:d}),VI(d))return d},fCt=(i,e,r,o)=>{let u=i.getName(),d=x2(i.getExpression()),h=e.concat(u);if(Wd.debug("prop-access-value",{propName:u,accessList:h,elementAccessedKind:d.getKindName()}),r.push(d),qd.Node.isIdentifier(d))return MX(d,h,r,o);if(qd.Node.isPropertyAccessExpression(d)){let v=fCt(d,h,r,o);return Wd.debug("prop-access-value",{propName:u,propValue:v}),v}if(qd.Node.isElementAccessExpression(d)){let v=uCt(d,r,o);if(!v)return;if(Wd.debug("prop-access-value",{propName:u,leftElementAccessed:v}),Of.isObject(v)){let S=v.value[u];return Of.from(S,i,r)}if(Of.isMap(v)){let S=v.value.get(u);return Of.from(S,i,r)}}},BTn=()=>!0,dCt=(i,e,r=BTn,o=BTn)=>{let u=i.getArguments(),d=i.getExpression().getText();return u.length===0?Of.array([],i,[]):Of.array(u.map((h,v)=>{let S=x2(h),k=[i,S];return u0(S).when(L=>o({fnNode:i,fnName:d,argNode:L,index:v}),L=>Ux(L,k,e,r)??Of.unresolvable(L,k)).otherwise(()=>Of.unresolvable(S,k))}),i,[])},_Ct=(i,e)=>{let r=i.getInitializer(),o=[i,r];return u0(r).with(vE.nullish,()=>{let u=i.getNameNode();return Of.emptyInitializer(u,o)}).when(F9t.Node.isStringLiteral,u=>{let d=u.getLiteralText();return Of.literal(vTn(d),u,o)}).when(F9t.Node.isJsxExpression,u=>{let d=u.getExpression();if(!d)return;let h=x2(d);if(!h)return;o.push(h);let v=Ux(h,o,e);if(v)return v}).otherwise(()=>{})},ITn=(i,e,r)=>{let o=x2(i.getExpression());return Ux(o,[],e,r)},gTn=(i,e)=>i?t6e(i)?Of.isUnresolvable(i)||Of.isConditional(i)?new Map:Of.isMap(i)?i.value:new Map(Object.entries(i.value).map(([r,o])=>{let u=Of.from(o,i.getNode()??e,i.getStack()??[]);return[r,u||null]}).filter(([,r])=>r!==null)):new Map(Object.entries(i)):new Map,fpr=y6.or(GX.Node.isImportDeclaration,GX.Node.isExportDeclaration),PTn=({ast:i,...e})=>{let{components:r,functions:o,taggedTemplates:u}=e,d=new Map,h=new Map,v,S,k,L,z;return i.forEachDescendant((te,_e)=>{if(fpr(te)){_e.skip();return}if(r){if(GX.Node.isJsxOpeningElement(te)||GX.Node.isJsxSelfClosingElement(te)){if(v=te,S=Lfr(v),k=S.includes("."),!r.matchTag({tagNode:v,tagName:S,isFactory:k})){v=void 0;return}d.has(S)||d.set(S,{kind:"component",nodesByProp:new Map,queryList:[]}),L=d.get(S).nodesByProp,h.has(v)||h.set(v,{name:S,props:new Map,conditionals:[]}),z=h.get(v)}if(GX.Node.isJsxSpreadAttribute(te)){if(!v||!z)return;let Ae=({propName:ze,propNode:Pt})=>r.matchProp({tagNode:v,tagName:S,propName:ze,propNode:Pt}),Ie=ITn(te,e,gX(Ae));if(!Ie)return;let Xe=ze=>{let Pt=gTn(ze,te),Zt=Of.isMap(ze),mn=Of.map(Pt,te,[v]);Zt&&ze.spreadConditions?.length&&(mn.spreadConditions=ze.spreadConditions),Pt.forEach((Jn,wn)=>{Ae({propName:wn,propNode:te})&&(z.props.set(wn,Jn),L.set(wn,(L.get(wn)??[]).concat(Jn)))})};(ze=>u0(ze).when(Of.isConditional,Pt=>{z.conditionals.push(Pt)}).when(y6.or(Of.isObject,Of.isMap),Pt=>Xe(Pt)).otherwise(D_t))(Ie);return}if(GX.Node.isJsxAttribute(te)){if(!v||!z)return;let Ae=te.getNameNode().getText();if(!r.matchProp({tagNode:v,tagName:S,propName:Ae,propNode:te}))return;TA(_Ct(te,e),HJe.fromNullable,HJe.tap(Ie=>{z.props.set(Ae,Ie),L.set(Ae,(L.get(Ae)??[]).concat(Ie))}))}}if(o&&GX.Node.isCallExpression(te)){let Ae=te.getExpression().getText();if(!o.matchFn({fnNode:te,fnName:Ae}))return;let Ie=({propName:mn,propNode:Jn})=>o.matchProp({fnNode:te,fnName:Ae,propName:mn,propNode:Jn});d.has(Ae)||d.set(Ae,{kind:"function",nodesByProp:new Map,queryList:[]});let Xe=d.get(Ae),Ve=Xe.nodesByProp,ze=dCt(te,e,Ie,o.matchArg),Pt=TA(ze.value,q9.map(mn=>u0(mn).when(y6.or(Of.isObject,Of.isMap),Jn=>{let wn=gTn(Jn,te),Cn=Of.isMap(Jn);wn.forEach((br,cn)=>{(Cn||Ie({propName:cn,propNode:te}))&&Ve.set(cn,(Ve.get(cn)??[]).concat(br))});let $n=Of.map(wn,te,Jn.getStack());return Of.isMap(Jn)&&Jn.spreadConditions?.length&&($n.spreadConditions=Jn.spreadConditions),$n}).otherwise(Jn=>Jn))),Zt={kind:"call-expression",name:Ae,box:Of.array(Pt,te,[])};Xe.queryList.push(Zt)}if(u&&GX.Node.isTaggedTemplateExpression(te)){let Ae=te.getTag(),Ie=GX.Node.isCallExpression(Ae)?Ae.getExpression().getText():Ae.getText();if(!u.matchTaggedTemplate({taggedTemplateNode:te,fnName:Ie}))return;d.has(Ie)||d.set(Ie,{kind:"function",nodesByProp:new Map,queryList:[]});let Xe=d.get(Ie),Ve={kind:"tagged-template",name:Ie,box:Ux(te,[],e)};Xe.queryList.push(Ve)}}),h.forEach((te,_e)=>{let Ae=h.get(_e);if(!Ae)return;let Ie=gX({name:te.name,box:Of.map(Ae.props,_e,[])});Ae.conditionals?.length&&(Ie.box.spreadConditions=Ae.conditionals);let Xe=te.name;d.get(Xe).queryList.push(Ie)}),d},ppr=y6.or(Of.isObject,Of.isMap),NTn=(i,e)=>{let r=i.getTagNameNode().getText(),o=i.getAttributes(),u=new Map;return o.forEach(d=>{if(O9t.Node.isJsxAttribute(d)){let h=d.getNameNode(),v=_Ct(d,e);if(!v)return;u.set(h.getText(),v);return}if(O9t.Node.isJsxSpreadAttribute(d)){let h=ITn(d,e,()=>!0);if(!ppr(h))return;Of.isMap(h)&&h.value.forEach((v,S)=>{u.set(S,v)}),Of.isObject(h)&&Object.entries(h.value).forEach(([v,S])=>{u.set(v,Of.literal(S,i,[]))})}}),{name:r,props:u}},cCt=(i,e)=>{if(!i.length)return e;let r={};return i.reduce((o,u,d)=>{let h=d===i.length-1;return o[u]=h?e:{},h?r:o[u]},r),r},Pue=(i,e)=>u0(i).with(vE.nullish,()=>{}).when(Of.isConditional,r=>{let o=e.path,u=Pue(r.whenTrue,Object.assign({},e,{path:o,parent:r})),d=Pue(r.whenFalse,Object.assign({},e,{path:o,parent:r}));u&&e.conditions.push(cCt(o,u)),d&&e.conditions.push(cCt(o,d))}).when(y6.or(Of.isLiteral,Of.isObject),r=>r.value).when(Of.isEmptyInitializer,()=>!0).when(Of.isMap,r=>{if(r.spreadConditions){let o=e.path;r.spreadConditions.forEach(u=>{let d=Pue(u.whenTrue,Object.assign({},e,{path:o,parent:r})),h=Pue(u.whenFalse,Object.assign({},e,{path:o,parent:r}));d&&e.spreadConditions.push(cCt(o,d)),h&&e.spreadConditions.push(cCt(o,h))})}return TA(q9.from(r.value.entries()),q9.map(([o,u])=>[o,Pue(u,Object.assign({},e,{path:e.path.concat(o),parent:r}))]),q9.filter(([,o])=>VI(o)),Object.fromEntries)}).when(Of.isArray,r=>{let o=0;return TA(r.value,q9.map(u=>Pue(u,Object.assign({},e,{path:e.path.concat(String(o++)),parent:r}))),q9.filter(VI),u=>u.flat())}).otherwise(()=>{}),dpr=new WeakMap,_pr=i=>({value:i,has:e=>i.has(e),get:e=>i.get(e),set:(e,r)=>i.set(e,r)}),UX=(i,e)=>{let r={cache:e?.cache??dpr,...e,path:[],parent:void 0,conditions:[],spreadConditions:[]},o=_pr(r.cache);return{raw:u0(i).with(vE.nullish,()=>{}).when(o.has,o.get).when(Array.isArray,d=>{let h=TA(d,q9.map(v=>Pue(v,r)),q9.filter(VI),q9.head);return o.set(d,h),h}).otherwise(d=>{let h=Pue(d,r);return o.set(d,h),h})??{},conditions:r.conditions,spreadConditions:r.spreadConditions}};oe();oe();oe();oe();function Qqe(i){return Object.prototype.toString.call(i).slice(8,-1)}function mpr(i){return Qqe(i)==="Undefined"}function hpr(i){return Qqe(i)==="Null"}function $qe(i){if(Qqe(i)!=="Object")return!1;let e=Object.getPrototypeOf(i);return e.constructor===Object&&e===Object.prototype}function j9t(i){return Qqe(i)==="Array"}function U9t(i){return Qqe(i)==="Symbol"}var igi=Bpr(hpr,mpr);function Bpr(i,e,r,o,u){return d=>i(d)||e(d)||!!r&&r(d)||!!o&&o(d)||!!u&&u(d)}function gpr(i,e){return j9t(i)&&j9t(e)?i.concat(e):e}function LTn(i,e,r,o){let u={}.propertyIsEnumerable.call(o,e)?"enumerable":"nonenumerable";u==="enumerable"&&(i[e]=r),u==="nonenumerable"&&Object.defineProperty(i,e,{value:r,enumerable:!1,writable:!0,configurable:!0})}function FTn(i,e,r){if(!$qe(e))return e;let o={};if($qe(i)){let v=Object.getOwnPropertyNames(i),S=Object.getOwnPropertySymbols(i);o=[...v,...S].reduce((k,L)=>{let z=i[L];return(!U9t(L)&&!Object.getOwnPropertyNames(e).includes(L)||U9t(L)&&!Object.getOwnPropertySymbols(e).includes(L))&<n(k,L,z,i),k},{})}let u=Object.getOwnPropertyNames(e),d=Object.getOwnPropertySymbols(e);return[...u,...d].reduce((v,S)=>{let k=e[S],L=$qe(i)?i[S]:void 0;L!==void 0&&$qe(k)&&(k=FTn(L,k,r));let z=r?r(L,k,S):k;return LTn(v,S,z,e),v},o)}function OTn(i,...e){return e.reduce((r,o)=>FTn(r,o,gpr),i)}var RTn=i=>Object.prototype.toString.call(i)==="[object Object]";function W9t(i,...e){let r=e.pop();for(let o of e)for(let u in o){let d=r(i[u],o[u]);d===void 0?RTn(i[u])&&RTn(o[u])?i[u]=W9t({},i[u],o[u],r):i[u]=o[u]:i[u]=d}return i}function MTn(i,...e){for(let r of e)for(let o in r)i?.hasOwnProperty?.(o)||(i[o]=r[o]);return i}function ypr(i){return i.reduce((e,{extend:r})=>r?W9t(e,r,(o,u)=>u===void 0?o??[]:o===void 0?[u]:Array.isArray(o)?[u,...o]:[u,o]):e,{})}function Cpr(i){return{...i.reduce((e,r)=>MTn(e,r),{}),extend:ypr(i)}}function Zqe(i){let{extend:e=[],...r}=Cpr(i);return W9t(r,e,(o,u)=>OTn({},o,...u))}var vpr=i=>typeof i=="object"&&Object.keys(i).length===0,bpr=i=>Object.keys(i).reduce((e,r)=>(i[r]!==void 0&&!vpr(i[r])&&(e[r]=i[r]),e),{});function GTn(i){let e=MTn({conditions:Zqe(i.map(r=>r.conditions??{})),theme:Zqe(i.map(r=>r.theme??{})),patterns:Zqe(i.map(r=>r.patterns??{})),utilities:Zqe(i.map(r=>r.utilities??{})),globalCss:Zqe(i.map(r=>r.globalCss??{}))},...i);return bpr(e)}oe();var n6e=require("path"),mCt=require("fs");function jTn(i,e){let r=(0,n6e.resolve)(".",i),o;for((0,mCt.statSync)(r).isDirectory()||(r=(0,n6e.dirname)(r));;){if(o=e(r,(0,mCt.readdirSync)(r)),o)return(0,n6e.resolve)(r,o);if(r=(0,n6e.dirname)(o=r),o===r)break}}var qTn=require("path"),eKe=Km(require("fs"),1),r6e=Km(require("path"),1),KTn=require("path");oe();var UTn=require("esbuild"),WTn=Km(require("path"),1),hCt=Km(require("fs"),1),WX=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+i+'" is not supported')});function Spr(i){let e=hCt.default.realpathSync(i);delete WX.cache[i];let r=WX(e);return{mod:r.default??r,dependencies:[e],code:hCt.default.readFileSync(e,"utf-8")}}async function xpr(i,e){let r=await(0,UTn.build)({absWorkingDir:e,entryPoints:[i],outfile:"out.js",write:!1,platform:"node",bundle:!0,format:"cjs",sourcemap:!1,metafile:!0,mainFields:["module","main"]}),{text:o}=r.outputFiles[0];return{code:o,dependencies:r.metafile?Object.keys(r.metafile.inputs):[]}}function Epr(i,e){let r=WTn.default.extname(i),o=hCt.default.realpathSync(i),u=WX.extensions[r];WX.extensions[r]=(v,S)=>{S===o?v._compile(e,S):u(v,S)},delete WX.cache[WX.resolve(i)];let d=WX(i),h=d.default??d;return WX.extensions[r]=u,h}async function VTn(i,e={}){let{cwd:r=process.cwd()}=e,o=WX.resolve(i,{paths:[r]});try{return Spr(o)}catch{let u=await xpr(o,r);try{u.mod=await Epr(o,u.code)}catch{u.mod=WX("node-eval")(u.code).default}return u}}oe();var HTn=class extends Error{code;hint;constructor(i,e,r){super(e),this.code=`ERR_PANDA_${i}`,this.hint=r?.hint}};var BCt=class extends HTn{constructor(){let i="Cannot find config file: panda.config.ts or panda.config.js/cjs/mjs. Did you forget to run `panda init`?";super("NO_CONFIG",i)}},zTn=class extends HTn{constructor(i){super("CONFIG_ERROR",i)}};var H9t=require("@pandacss/preset-base"),gCt=require("@pandacss/preset-panda"),Tpr=[".ts",".js",".mjs",".cjs"],Dpr=new RegExp(`panda.config(${Tpr.join("|")})$`),Apr=i=>Dpr.test(i);function kpr({cwd:i,file:e}){return e?(0,qTn.resolve)(i,e):jTn(i,(r,o)=>o.find(Apr))}function XTn(i,e){let r=Object.keys(i).sort((u,d)=>JTn(d)-JTn(u)),o=[];for(let u of r){let d=i[u];u=Ipr(u).replace(/\*/g,"(.+)"),o.push({pattern:new RegExp("^"+u+"$"),paths:d.map(h=>(0,KTn.resolve)(e,h))})}return o}var wpr=(i,e)=>{for(let r of i){let o=e.match(r.pattern);if(o)for(let u of r.paths){let d=0;return u.replace(/\*/g,()=>{let v=Math.min(++d,o.length-1);return o[v]})}}};function JTn(i){let e=i.indexOf("*");return i.substr(0,e).length}function Ipr(i){return i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Ppr=[".js",".cjs",".mjs"],Npr=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],Lpr=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];function Fpr(i,e){for(let r of e){let o=`${i}${r}`;if(eKe.default.existsSync(o)&&eKe.default.statSync(o).isFile())return o}for(let r of e){let o=`${i}/index${r}`;if(eKe.default.existsSync(o))return o}return null}var Opr=/import[\s\S]*?['"](.{3,}?)['"]/gi,Rpr=/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,Mpr=/require\(['"`](.+)['"`]\)/gi,Gpr=/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi;function V9t(i,e){let{filename:r,seen:o}=i,u=Fpr(r6e.default.resolve(i.cwd,r),Ppr.includes(i.ext)?Npr:Lpr);if(u===null||(e&&i.foundModuleAliases.set(e,u),o.size>1&&o.has(u)))return;o.add(u);let d=eKe.default.readFileSync(u,"utf-8"),h=[...d.matchAll(Opr),...d.matchAll(Rpr),...d.matchAll(Mpr),...d.matchAll(Gpr)];if(!h.length)return;let v={cwd:r6e.default.dirname(u),ext:r6e.default.extname(u),seen:o,baseUrl:i.baseUrl,pathMappings:i.pathMappings,foundModuleAliases:i.foundModuleAliases};h.forEach(S=>{let k=S[1];if(k[0]==="."){V9t(Object.assign({},v,{filename:k}));return}if(!i.pathMappings)return;let L=wpr(i.pathMappings,k);L&&V9t(Object.assign({},v,{filename:L}),k)})}function YTn(i,e={pathMappings:[]}){if(i===null)return{deps:new Set,aliases:new Map};let r=new Map,o=new Set;return o.add(i),V9t({filename:i,ext:r6e.default.extname(i),cwd:r6e.default.dirname(i),seen:o,baseUrl:e.baseUrl,pathMappings:e.pathMappings??[],foundModuleAliases:r}),{deps:o,aliases:r}}async function QTn(i,e){let{mod:r,dependencies:o}=await VTn(i,{cwd:e,interopDefault:!0});return{config:r?.default??r,dependencies:o}}async function jpr(i,e){let r=i.presets??[],o=[i];for(;r.length>0;){let u=await r.shift();if(typeof u=="string"){let d=await QTn(u,e);o.push(await d.config),r.unshift(...await d.config.presets??[])}else o.push(u),r.unshift(...u.presets??[])}return GTn(o)}var $Tn={"@pandacss/preset-base":H9t.preset,"@pandacss/preset-panda":gCt.preset,"@pandacss/dev/presets":gCt.preset},Upr=Object.keys($Tn),Wpr=i=>Upr.includes(i);async function ZTn(i){let e=await Hpr(i);return Vpr(e,i.cwd)}async function Vpr(i,e){let r=new Set;i.config.eject||r.add(H9t.preset),i.config.presets?i.config.presets.forEach(u=>{typeof u=="string"&&Wpr(u)?r.add($Tn[u]):r.add(u)}):i.config.eject||r.add(gCt.preset),i.config.presets=Array.from(r);let o=await jpr(i.config,e);return{...i,config:o}}async function Hpr(i){let{cwd:e,file:r}=i,o=kpr({cwd:e,file:r});if(!o)throw new BCt;Wd.debug("config:path",o);let u=await QTn(o,e);if(typeof u.config!="object")throw new zTn("\u{1F4A5} Config must export or return an object.");return{...u,config:u.config,path:o}}var qOn=require("fs"),PHt=Km(lGt(),1),NHt=require("path");oe();var l6e=require("path"),cGt=require("fs");var QAn=i=>i===(0,l6e.dirname)(i),Q_r=Symbol("stop"),$_r=i=>i===Q_r;var wCt=(i,e=process.cwd())=>{if(typeof i=="function"&&i(e)instanceof Promise)throw new Error("Async matcher can not be used in 'lookItUpSync'");if(typeof i=="string"){let o=(0,l6e.join)(e,i);return(0,cGt.existsSync)(o)?o:QAn(e)?null:wCt(i,(0,l6e.dirname)(e))}let r=i(e);return $_r(r)?null:r??(QAn(e)?null:wCt(i,(0,l6e.dirname)(e)))};oe();var c6e=Km(require("path"),1),skn=require("fs"),akn=Km(require("path"),1);var nz=Km(require("path"),1),lkn=require("fs"),_Gt=require("module"),Fw=Km(require("path"),1),ckn=require("fs");async function $An(i,e){let r=c6e.default.dirname(c6e.default.resolve(i)),o=e?.root?c6e.default.resolve(e.root):null;for(;r;){let u=await Z_r(r,e);if(u)return u;{if(o===r)break;let d=c6e.default.dirname(r);if(d===r)break;r=d}}throw new Error(`no tsconfig file found for ${i}`)}async function Z_r(i,e){let r=c6e.default.join(i,"tsconfig.json");if(e?.tsConfigPaths)return e.tsConfigPaths.has(r)?r:void 0;try{let o=await skn.promises.stat(r);if(o.isFile()||o.isFIFO())return r}catch(o){if(o.code!=="ENOENT")throw o}}var zyi=akn.default.sep;function emr(i){let e=tmr(nmr(rmr(i)));return e.trim()===""?"{}":e}function tmr(i){let e=!1,r=0,o="",u=null;for(let d=0;d<i.length;d++){let h=i[d];if(h==='"'&&(okn(i,d)||(e=!e)),e){u=null;continue}if(h===","){u=d;continue}u&&(h==="}"||h==="]"?(o+=i.slice(r,u)+" ",r=u+1,u=null):h.match(/\s/)||(u=null))}return o+i.substring(r)}function okn(i,e){let r=e-1,o=0;for(;i[r]==="\\";)r-=1,o+=1;return!!(o%2)}function ICt(i,e,r){return i.slice(e,r).replace(/\S/g," ")}var uGt=Symbol("singleComment"),ZAn=Symbol("multiComment");function nmr(i){let e=!1,r=!1,o=0,u="";for(let d=0;d<i.length;d++){let h=i[d],v=i[d+1];!r&&h==='"'&&(okn(i,d)||(e=!e)),!e&&(!r&&h+v==="//"?(u+=i.slice(o,d),o=d,r=uGt,d++):r===uGt&&h+v===`\r
|
|
21120
21120
|
`?(d++,r=!1,u+=ICt(i,o,d),o=d):r===uGt&&h===`
|
|
21121
21121
|
`?(r=!1,u+=ICt(i,o,d),o=d):!r&&h+v==="/*"?(u+=i.slice(o,d),o=d,r=ZAn,d++):r===ZAn&&h+v==="*/"&&(d++,r=!1,u+=ICt(i,o,d+1),o=d+1))}return u+(r?ICt(i.slice(o)):i.slice(o))}function rmr(i){return i.charCodeAt(0)===65279?i.slice(1):i}var imr=new RegExp("\\"+Fw.default.posix.sep,"g"),smr=new RegExp("\\"+Fw.default.sep,"g"),fGt=new Map,ukn="**/*",mGt=[".ts",".tsx",".mts",".cts"],amr=`\\.(?:${mGt.map(i=>i.substring(1)).join("|")})`,Jyi=new Function("path","return import(path).then(m => m.default)");async function ekn(i){if(Fw.default.extname(i)!==".json")return;let e=Fw.default.resolve(i);try{let r=await ckn.promises.stat(e);if(r.isFile()||r.isFIFO())return e}catch(r){if(r.code!=="ENOENT")throw r}throw new Error(`no tsconfig file found for ${i}`)}function pGt(i){return Fw.default.posix.sep!==Fw.default.sep&&i.includes(Fw.default.posix.sep)?i.replace(imr,Fw.default.sep):i}function hGt(i){return Fw.default.posix.sep!==Fw.default.sep&&i.includes(Fw.default.sep)?i.replace(smr,Fw.default.posix.sep):i}function cKe(i,e){return Fw.default.sep===Fw.default.posix.sep?i?Fw.default.resolve(i,e):Fw.default.resolve(e):hGt(i?Fw.default.resolve(pGt(i),pGt(e)):Fw.default.resolve(pGt(e)))}function omr(i){let e=Fw.default.dirname(i.tsconfigFile);return i.tsconfig.references.map(r=>{let o=r.path.endsWith(".json")?r.path:Fw.default.join(r.path,"tsconfig.json");return cKe(e,o)})}function lmr(i,e){if(e.referenced&&mGt.some(r=>i.endsWith(r))&&!tkn(i,e)){let r=e.referenced.find(o=>tkn(i,o));if(r)return{...r,solution:e}}return e}function tkn(i,e){let r=hGt(Fw.default.dirname(e.tsconfigFile)),o=(e.tsconfig.files||[]).map(h=>cKe(r,h)),u=cKe(null,i);return o.includes(i)?!0:nkn(u,r,e.tsconfig.include||(e.tsconfig.files?[]:[ukn]))?!nkn(u,r,e.tsconfig.exclude||[]):!1}function nkn(i,e,r){return r.some(o=>{let u=o.length,d=!1;for(let k=o.length-1;k>-1;k--)if(o[k]==="*"||o[k]==="?"){u=k,d=!0;break}if(u<o.length-1&&!i.endsWith(o.slice(u+1))||o.endsWith("*")&&!mGt.some(k=>i.endsWith(k)))return!1;if(o===ukn)return i.startsWith(`${e}/`);let h=cKe(e,o),v=-1;for(let k=0;k<h.length;k++)if(h[k]==="*"||h[k]==="?"){v=k,d=!0;break}if(v>1&&!i.startsWith(h.slice(0,v-1)))return!1;if(!d)return i===h;if(fGt.has(h))return fGt.get(h).test(i);let S=cmr(h);return fGt.set(h,S),S.test(i)})}function cmr(i){let e="^";for(let r=0;r<i.length;r++){let o=i[r];if(o==="?"){e+="[^\\/]";continue}if(o==="*"){if(i[r+1]==="*"&&i[r+2]==="/"){r+=2,e+="(?:[^\\/]*\\/)*";continue}e+="[^\\/]*";continue}"/.+^${}()|[]\\".includes(o)&&(e+="\\"),e+=o}return i.endsWith("*")&&(e+=amr),e+="$",new RegExp(e)}async function fkn(i,e){let r=e?.cache;if(r?.has(i))return r.get(i);let o;if(e?.resolveWithEmptyIfConfigNotFound)try{o=await ekn(i)||await $An(i,e)}catch{let h={tsconfigFile:"no_tsconfig_file_found",tsconfig:{}};return r?.set(i,h),h}else o=await ekn(i)||await $An(i,e);let u;return r?.has(o)?u=r.get(o):(u=await BGt(o,r),await Promise.all([pkn(u,r),fmr(u,r)]),r?.set(o,u)),u=lmr(i,u),r?.set(i,u),u}async function BGt(i,e){if(e?.has(i))return e.get(i);try{let r=await lkn.promises.readFile(i,"utf-8"),o=emr(r),u={tsconfigFile:i,tsconfig:umr(JSON.parse(o),nz.default.dirname(i))};return e?.set(i,u),u}catch(r){throw new uKe(`parsing ${i} failed: ${r}`,"PARSE_FILE",i,r)}}function umr(i,e){var r;return(r=i.compilerOptions)!=null&&r.baseUrl&&!nz.default.isAbsolute(i.compilerOptions.baseUrl)&&(i.compilerOptions.baseUrl=cKe(e,i.compilerOptions.baseUrl)),i}async function fmr(i,e){if(!i.tsconfig.references)return;let r=omr(i),o=await Promise.all(r.map(u=>BGt(u,e)));await Promise.all(o.map(u=>pkn(u,e))),i.referenced=o}async function pkn(i,e){if(!i.tsconfig.extends)return;let r=[{tsconfigFile:i.tsconfigFile,tsconfig:JSON.parse(JSON.stringify(i.tsconfig))}],o=0,u=[],d=0;for(;o<r.length;){let h=r[o];if(u.push(h.tsconfigFile),h.tsconfig.extends){d+=1;let v;Array.isArray(h.tsconfig.extends)?v=h.tsconfig.extends.reverse().map(k=>rkn(k,h.tsconfigFile)):v=[rkn(h.tsconfig.extends,h.tsconfigFile)];let S=v.find(k=>u.includes(k));if(S){let k=u.concat([S]).join(" -> ");throw new uKe(`Circular dependency in "extends": ${k}`,"EXTENDS_CIRCULAR",i.tsconfigFile)}r.splice(o+1,0,...await Promise.all(v.map(k=>BGt(k,e))))}else u.splice(-d),d=0;o=o+1}i.extended=r;for(let h of i.extended.slice(1))dmr(i,h)}function rkn(i,e){let r;try{return(0,_Gt.createRequire)(e).resolve(i)}catch(o){r=o}if(!nz.default.isAbsolute(i)&&!i.startsWith("./")&&!i.startsWith("../"))try{let o=nz.default.join(i,"tsconfig.json");return(0,_Gt.createRequire)(e).resolve(o)}catch(o){r=o}throw new uKe(`failed to resolve "extends":"${i}" in ${e}`,"EXTENDS_RESOLVE",e,r)}var pmr=["compilerOptions","files","include","exclude","watchOptions","compileOnSave","typeAcquisition","buildOptions"];function dmr(i,e){let r=i.tsconfig,o=e.tsconfig,u=hGt(nz.default.relative(nz.default.dirname(i.tsconfigFile),nz.default.dirname(e.tsconfigFile)));for(let d of Object.keys(o).filter(h=>pmr.includes(h)))if(d==="compilerOptions"){r.compilerOptions||(r.compilerOptions={});for(let h of Object.keys(o.compilerOptions))Object.prototype.hasOwnProperty.call(r.compilerOptions,h)||(r.compilerOptions[h]=dGt(h,o.compilerOptions[h],u))}else if(r[d]===void 0)if(d==="watchOptions"){r.watchOptions={};for(let h of Object.keys(o.watchOptions))r.watchOptions[h]=dGt(h,o.watchOptions[h],u)}else r[d]=dGt(d,o[d],u)}var _mr=["files","include","exclude","baseUrl","rootDir","rootDirs","typeRoots","outDir","outFile","declarationDir","excludeDirectories","excludeFiles"];function dGt(i,e,r){return _mr.includes(i)?Array.isArray(e)?e.map(o=>ikn(o,r)):ikn(e,r):e}function ikn(i,e){return nz.default.isAbsolute(i)?i:nz.default.posix.normalize(nz.default.posix.join(e,i))}var uKe=class extends Error{constructor(i,e,r,o){super(i),Object.setPrototypeOf(this,uKe.prototype),this.name=uKe.name,this.code=e,this.cause=o,this.tsconfigFile=r}};oe();oe();function PCt(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e]}function dkn(){return typeof WeakMap<"u"?new WeakMap:mmr()}function mmr(){return{add:PCt,delete:PCt,get:PCt,set:PCt,has:function(i){return!1}}}var hmr=Object.prototype.hasOwnProperty,yGt=function(i,e){return hmr.call(i,e)};function gGt(i,e){for(var r in e)yGt(e,r)&&(i[r]=e[r]);return i}var Bmr=/^[ \t]*(?:\r\n|\r|\n)/,gmr=/(?:\r\n|\r|\n)[ \t]*$/,ymr=/^(?:[\r\n]|$)/,Cmr=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,vmr=/^[ \t]*[\r\n][ \t\r\n]*$/;function _kn(i,e,r){var o=0,u=i[0].match(Cmr);u&&(o=u[1].length);var d="(\\r\\n|\\r|\\n).{0,"+o+"}",h=new RegExp(d,"g");e&&(i=i.slice(1));var v=r.newline,S=r.trimLeadingNewline,k=r.trimTrailingNewline,L=typeof v=="string",z=i.length,te=i.map(function(_e,Ae){return _e=_e.replace(h,"$1"),Ae===0&&S&&(_e=_e.replace(Bmr,"")),Ae===z-1&&k&&(_e=_e.replace(gmr,"")),L&&(_e=_e.replace(/\r\n|\n|\r/g,function(Ie){return v})),_e});return te}function bmr(i,e){for(var r="",o=0,u=i.length;o<u;o++)r+=i[o],o<u-1&&(r+=e[o]);return r}function Smr(i){return yGt(i,"raw")&&yGt(i,"length")}function mkn(i){var e=dkn(),r=dkn();function o(d){for(var h=[],v=1;v<arguments.length;v++)h[v-1]=arguments[v];if(Smr(d)){var S=d,k=(h[0]===o||h[0]===Hf)&&vmr.test(S[0])&&ymr.test(S[1]),L=k?r:e,z=L.get(S);if(z||(z=_kn(S,k,i),L.set(S,z)),h.length===0)return z[0];var te=bmr(z,k?h.slice(1):h);return te}else return mkn(gGt(gGt({},i),d||{}))}var u=gGt(o,{string:function(d){return _kn([d],!1,i)[0]}});return u}var Hf=mkn({trimLeadingNewline:!0,trimTrailingNewline:!0}),WT=Hf;if(typeof module<"u")try{module.exports=Hf,Object.defineProperty(Hf,"__esModule",{value:!0}),Hf.default=Hf,Hf.outdent=Hf}catch{}var Xkn=Km(xkn(),1);oe();var Ymr=[],SGt=["MsAccelerator","MsBlockProgression","MsContentZoomChaining","MsContentZooming","MsContentZoomLimit","MsContentZoomLimitMax","MsContentZoomLimitMin","MsContentZoomSnap","MsContentZoomSnapPoints","MsContentZoomSnapType","MsFilter","MsFlowFrom","MsFlowInto","MsGridColumns","MsGridRows","MsHighContrastAdjust","MsHyphenateLimitChars","MsHyphenateLimitLines","MsHyphenateLimitZone","MsImeAlign","MsOverflowStyle","MsScrollbar3dlightColor","MsScrollbarArrowColor","MsScrollbarBaseColor","MsScrollbarDarkshadowColor","MsScrollbarFaceColor","MsScrollbarHighlightColor","MsScrollbarShadowColor","MsScrollbarTrackColor","MsScrollChaining","MsScrollLimit","MsScrollLimitXMax","MsScrollLimitXMin","MsScrollLimitYMax","MsScrollLimitYMin","MsScrollRails","MsScrollSnapPointsX","MsScrollSnapPointsY","MsScrollSnapType","MsScrollSnapX","MsScrollSnapY","MsScrollTranslation","MsTextAutospace","MsTouchSelect","MsUserSelect","MsWrapFlow","MsWrapMargin","MsWrapThrough","MozAppearance","MozBinding","MozBorderBottomColors","MozBorderLeftColors","MozBorderRightColors","MozBorderTopColors","MozContextProperties","MozFloatEdge","MozForceBrokenImageIcon","MozImageRegion","MozOrient","MozOutlineRadius","MozOutlineRadiusBottomleft","MozOutlineRadiusBottomright","MozOutlineRadiusTopleft","MozOutlineRadiusTopright","MozStackSizing","MozTextBlink","MozUserFocus","MozUserInput","MozUserModify","MozWindowDragging","MozWindowShadow","WebkitAppearance","WebkitBorderBefore","WebkitBorderBeforeColor","WebkitBorderBeforeStyle","WebkitBorderBeforeWidth","WebkitBoxReflect","WebkitLineClamp","WebkitMask","WebkitMaskAttachment","WebkitMaskClip","WebkitMaskComposite","WebkitMaskImage","WebkitMaskOrigin","WebkitMaskPosition","WebkitMaskPositionX","WebkitMaskPositionY","WebkitMaskRepeat","WebkitMaskRepeatX","WebkitMaskRepeatY","WebkitMaskSize","WebkitOverflowScrolling","WebkitTapHighlightColor","WebkitTextFillColor","WebkitTextStroke","WebkitTextStrokeColor","WebkitTextStrokeWidth","WebkitTouchCallout","WebkitUserModify","accentColor","alignContent","alignItems","alignSelf","alignTracks","all","animation","animationComposition","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","animationTimeline","appearance","aspectRatio","azimuth","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize","blockOverflow","blockSize","border","borderBlock","borderBlockColor","borderBlockStyle","borderBlockWidth","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderEndEndRadius","borderEndStartRadius","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderInline","borderInlineEnd","borderInlineColor","borderInlineStyle","borderInlineWidth","borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth","borderInlineStart","borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStartEndRadius","borderStartStartRadius","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxAlign","boxDecorationBreak","boxDirection","boxFlex","boxFlexGroup","boxLines","boxOrdinalGroup","boxOrient","boxPack","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caret","caretColor","caretShape","clear","clip","clipPath","color","colorScheme","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","containIntrinsicSize","containIntrinsicBlockSize","containIntrinsicHeight","containIntrinsicInlineSize","containIntrinsicWidth","container","containerName","containerType","content","contentVisibility","counterIncrement","counterReset","counterSet","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontOpticalSizing","fontPalette","fontVariationSettings","fontSize","fontSizeAdjust","fontSmooth","fontStretch","fontStyle","fontSynthesis","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantEmoji","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontWeight","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","hangingPunctuation","height","hyphenateCharacter","hyphenateLimitChars","hyphens","imageOrientation","imageRendering","imageResolution","imeMode","initialLetter","initialLetterAlign","inlineSize","inputSecurity","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","isolation","justifyContent","justifyItems","justifySelf","justifyTracks","left","letterSpacing","lineBreak","lineClamp","lineHeight","lineHeightStep","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBlock","marginBlockEnd","marginBlockStart","marginBottom","marginInline","marginInlineEnd","marginInlineStart","marginLeft","marginRight","marginTop","marginTrim","mask","maskBorder","maskBorderMode","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","masonryAutoFlow","mathDepth","mathShift","mathStyle","maxBlockSize","maxHeight","maxInlineSize","maxLines","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","offset","offsetAnchor","offsetDistance","offsetPath","offsetPosition","offsetRotate","opacity","order","orphans","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowBlock","overflowClipBox","overflowClipMargin","overflowInline","overflowWrap","overflowX","overflowY","overscrollBehavior","overscrollBehaviorBlock","overscrollBehaviorInline","overscrollBehaviorX","overscrollBehaviorY","padding","paddingBlock","paddingBlockEnd","paddingBlockStart","paddingBottom","paddingInline","paddingInlineEnd","paddingInlineStart","paddingLeft","paddingRight","paddingTop","page","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","printColorAdjust","quotes","resize","right","rotate","rowGap","rubyAlign","rubyMerge","rubyPosition","scale","scrollbarColor","scrollbarGutter","scrollbarWidth","scrollBehavior","scrollMargin","scrollMarginBlock","scrollMarginBlockStart","scrollMarginBlockEnd","scrollMarginBottom","scrollMarginInline","scrollMarginInlineStart","scrollMarginInlineEnd","scrollMarginLeft","scrollMarginRight","scrollMarginTop","scrollPadding","scrollPaddingBlock","scrollPaddingBlockStart","scrollPaddingBlockEnd","scrollPaddingBottom","scrollPaddingInline","scrollPaddingInlineStart","scrollPaddingInlineEnd","scrollPaddingLeft","scrollPaddingRight","scrollPaddingTop","scrollSnapAlign","scrollSnapCoordinate","scrollSnapDestination","scrollSnapPointsX","scrollSnapPointsY","scrollSnapStop","scrollSnapType","scrollSnapTypeX","scrollSnapTypeY","scrollTimeline","scrollTimelineAxis","scrollTimelineName","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textCombineUpright","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkip","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textEmphasis","textEmphasisColor","textEmphasisPosition","textEmphasisStyle","textIndent","textJustify","textOrientation","textOverflow","textRendering","textShadow","textSizeAdjust","textTransform","textUnderlineOffset","textUnderlinePosition","top","touchAction","transform","transformBox","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","unicodeBidi","userSelect","verticalAlign","viewTransitionName","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex","zoom",...Ymr],Qmr=new Map(SGt.map(i=>[i,!0]));function $mr(i){let e=Object.create(null);return r=>(e[r]===void 0&&(e[r]=i(r)),e[r])}var Zmr=/&|@/,Ekn=$mr(i=>Qmr.has(i)||i.startsWith("--")||Zmr.test(i));var Qkn=Km(Tkn(),1);oe();oe();var kkn=/(\$[^\s,]+\w)|({([^}]*)})/g,ehr=/[{}]/g;function kGt(i){if(typeof i!="string")return[];let e=i.match(kkn);return e?e.map(r=>r.replace(ehr,"")).map(r=>r.trim()):[]}function thr(i){return kkn.test(i)}function nhr(i){let e={};return i.forEach((r,o)=>{r instanceof Map?e[o]=Object.fromEntries(r):e[o]=r}),e}var DGt=i=>mX(i)&&"value"in i;function Dkn(i){if(!DGt(i))throw new Error(`Invalid token format: ${JSON.stringify(i)}`)}var MCt=class wkn{name;value;originalValue;path;type;description;extensions;constructor(e){this.name=e.name,this.value=e.value,this.originalValue=e.value,this.path=e.path??[],e.type&&(this.type=e.type),e.description&&(this.description=e.description),this.extensions=e.extensions??{},this.extensions.condition=e.extensions?.condition??"base",this.setType()}get id(){return Jze(`${this.name}-${this.extensions.condition}-${this.value}`)}get isConditional(){return!!this.extensions?.conditions}get hasReference(){return!!this.extensions?.references}get isComposite(){return mX(this.originalValue)||Array.isArray(this.originalValue)}expandReferences(){if(!this.hasReference)return this.value;let e=this.extensions.references??{};return this.value=Object.keys(e).reduce((r,o)=>{let u=e[o];if(u.isConditional)return r;let d=u.expandReferences();return r.replace(`{${o}}`,d)},this.value),delete this.extensions.references,this.value}get isReference(){return thr(this.originalValue)}get references(){return kGt(this.originalValue)}clone(){return new wkn({name:this.name,value:this.value,type:this.type,path:[...this.path],description:this.description,extensions:AGt(this.extensions)})}getConditionTokens(){if(!this.isConditional)return;let e=this.extensions.conditions??{},r=[];return sF(e,(o,u)=>{let d=u.filter(v=>!zze(v));if(!d.length)return;let h=this.clone();h.value=o,h.extensions.condition=d.join(":"),r.push(h)}),r}setExtensions(e){return this.extensions={...this.extensions,...e},this.setType(),this}setType(){this.type||this.extensions.category&&(this.type=rhr[this.extensions.category])}};function AGt(i){return i instanceof MCt?i.clone():Array.isArray(i)?i.map(e=>AGt(e)):typeof i=="object"&&i!==null?Object.fromEntries(Object.entries(i).map(([e,r])=>[e,AGt(r)])):i}var rhr={colors:"color",spacing:"dimension",sizing:"dimension",shadows:"shadow",fonts:"fontFamily",fontSizes:"fontSize",fontWeights:"fontWeight",letterSpacings:"letterSpacing",durations:"duration",transitions:"transition",radii:"borderRadius",gradients:"gradient",easings:"cubicBezier",borders:"border",components:"cti",assets:"asset"};function ihr(i){return i?{breakpoints:e3e(i,e=>({value:e})),sizes:Object.fromEntries(Object.entries(i).map(([e,r])=>[`breakpoint-${e}`,{value:r}]))}:{breakpoints:{},sizes:{}}}function Akn(i){return i[0]==="DEFAULT"?i:i.filter(e=>e!=="DEFAULT")}var shr=class{allTokens=[];prefix;hash;get allNames(){return Array.from(new Set(this.allTokens.map(i=>i.name)))}constructor(i){let{tokens:e={},semanticTokens:r={},breakpoints:o,prefix:u,hash:d}=i,h=ihr(o),v=ZPe({...e,breakpoints:h.breakpoints,sizes:{...e.sizes,...h.sizes}});this.prefix=u,this.hash=d,sF(v,(S,k)=>{k=Akn(k),Dkn(S);let L=k[0],z=k.join("."),te=new MCt({...S,name:z,path:k});te.setExtensions({category:L,prop:k.slice(1).join(".")}),this.allTokens.push(te)},{stop:DGt}),sF(r,(S,k)=>{k=Akn(k),Dkn(S);let L=k[0],z=k.join("."),te=MH(S.value)?{value:{base:S.value}}:S,{value:_e,...Ae}=te,Ie=new MCt({...Ae,name:z,value:_e.base||"",path:k});Ie.setExtensions({category:L,conditions:_e,prop:k.slice(1).join(".")}),this.allTokens.push(Ie)},{stop:DGt})}getByName=GI(i=>{for(let e of this.allTokens)if(e.name===i)return e});transforms=new Map;registerTransform(...i){return i.forEach(e=>{e.type||="value",e.enforce||="pre",this.transforms.set(e.name,e)}),this}execTransform(i){let e=this.transforms.get(i);e&&this.allTokens.forEach(r=>{if(r.extensions.hasReference||typeof e.match=="function"&&!e.match(r))return;let o=e.transform(r,{prefix:this.prefix,hash:this.hash});u0(e).with({type:"extensions"},()=>{r.setExtensions(o)}).with({type:"value"},()=>{r.value=o,r.isComposite&&(r.originalValue=o)}).otherwise(()=>{r[e.type]=o})})}transformTokens(i){return this.transforms.forEach(e=>{e.enforce===i&&this.execTransform(e.name)}),this}middlewares=[];registerMiddleware(...i){for(let e of i)e.enforce||="pre",this.middlewares.push(e);return this}applyMiddlewares(i){this.middlewares.forEach(e=>{e.enforce===i&&e.transform(this,{prefix:this.prefix})})}getReferences(i){return kGt(i).map(r=>this.getByName(r)).filter(Boolean)}usesReference(i){return MH(i)?this.getReferences(i).length>0:!1}addReferences(){return this.allTokens.forEach(i=>{if(!this.usesReference(i.value))return;let e=this.getReferences(i.value);i.setExtensions({references:e.reduce((r,o)=>(r[o.name]=o,r),{})})}),this}filter(i){let e=typeof i=="function"?i:aue(i);return this.allTokens.filter(e)}addConditionalTokens(){let i=[];return this.allTokens.forEach(e=>{i.push(e);let r=e.getConditionTokens();r&&r.length>0&&i.push(...r)}),this.allTokens=i,this}expandReferences(){return this.allTokens.forEach(i=>{i.expandReferences()}),this}build(){this.applyMiddlewares("pre"),this.transformTokens("pre"),this.addConditionalTokens(),this.addReferences(),this.expandReferences(),this.applyMiddlewares("post"),this.transformTokens("post")}get isEmpty(){return this.allTokens.length===0}},hne={groupByCondition(i){let e=new Map;return i.allTokens.forEach(r=>{let{condition:o}=r.extensions;o&&(e.get(o)||e.set(o,new Set),e.set(o,e.get(o).add(r)))}),e},groupByColorPalette(i){let e=new Map;return i.allTokens.forEach(r=>{let{colorPalette:o}=r.extensions;if(!o||r.extensions.isVirtual)return;e.get(o)||e.set(o,new Map);let u=r.name.replace(o,"colorPalette"),d=i.getByName(u);if(!d)return;let h=d.extensions.var;e.get(o).set(h,r.extensions.varRef)}),e},groupByCategory(i){let e=new Map;return i.allTokens.forEach(r=>{let{category:o,prop:u}=r.extensions;o&&(e.get(o)||e.set(o,new Map),e.set(o,e.get(o).set(u,r)))}),e},getFlattenedValues(i){let e=hne.groupByCategory(i),r=new Map;return e.forEach((o,u)=>{r.get(u)||r.set(u,new Map),o.forEach(d=>{let{prop:h,varRef:v,isNegative:S}=d.extensions,k=S?d.isConditional?d.originalValue:d.value:v;r.set(u,r.get(u).set(h,k))})}),r},getVars(i){let e=hne.groupByCondition(i),r=new Map;return e.forEach((o,u)=>{r.get(u)||r.set(u,new Map),o.forEach(d=>{d.extensions.isNegative||r.get(u).set(d.extensions.var,d.value)})}),r},createVarGetter(i){let e=nhr(hne.getFlattenedValues(i));return function(o,u){return Kze(e,o,u)}},getColorPaletteValues(i){let e=new Set;return i.allTokens.forEach(r=>{let{colorPalette:o}=r.extensions;!o||r.extensions.isVirtual||e.add(o)}),e}},ahr={enforce:"pre",transform(i,{prefix:e,hash:r}){i.filter({extensions:{category:"spacing"}}).forEach(u=>{let d=[...u.path],h=qze(d.join("-"),{prefix:e,hash:r});if(u.value==="0rem")return;let v=u.clone();v.setExtensions({isNegative:!0,prop:`-${u.extensions.prop}`,originalPath:d}),v.value=WKt.negate(h);let S=v.path.at(-1);S!=null&&(v.path[v.path.length-1]=`-${S}`),v.path&&(v.name=v.path.join(".")),i.allTokens.push(v)})}},ohr=new Set(["spacing","sizes","borderWidths","fontSizes","radii"]),lhr={enforce:"post",transform(i){i.filter(r=>ohr.has(r.extensions.category)&&!r.extensions.isNegative).forEach(r=>{r.setExtensions({pixelValue:t3e(r.value)})})}},chr={enforce:"post",transform(i){let e=i.filter({extensions:{category:"colors"}}),r=new Set,o=new Map;e.forEach(u=>{let{colorPalette:d}=u.extensions;if(!d)return;let h=o.get(d)||[];r.add(u.path.at(-1)),h.push(u),o.set(d,h)}),r.forEach(u=>{let d=new MCt({name:`colors.colorPalette.${u}`,value:`{colors.colorPalette.${u}}`,path:["colors","colorPalette",u]});d.setExtensions({category:"colors",prop:`colorPalette.${u}`,isVirtual:!0}),i.allTokens.push(d)}),i.transformTokens("pre")}},uhr={enforce:"post",transform(i){i.allTokens=i.allTokens.filter(e=>e.value!=="")}},fhr=[ahr,chr,uhr,lhr],TGt={aqua:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,azure:/#f0ffff(ff)?(?!\w)/gi,beige:/#f5f5dc(ff)?(?!\w)/gi,bisque:/#ffe4c4(ff)?(?!\w)/gi,black:/#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi,blue:/#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi,brown:/#a52a2a(ff)?(?!\w)/gi,coral:/#ff7f50(ff)?(?!\w)/gi,cornsilk:/#fff8dc(ff)?(?!\w)/gi,crimson:/#dc143c(ff)?(?!\w)/gi,cyan:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,darkblue:/#00008b(ff)?(?!\w)/gi,darkcyan:/#008b8b(ff)?(?!\w)/gi,darkgrey:/#a9a9a9(ff)?(?!\w)/gi,darkred:/#8b0000(ff)?(?!\w)/gi,deeppink:/#ff1493(ff)?(?!\w)/gi,dimgrey:/#696969(ff)?(?!\w)/gi,gold:/#ffd700(ff)?(?!\w)/gi,green:/#008000(ff)?(?!\w)/gi,grey:/#808080(ff)?(?!\w)/gi,honeydew:/#f0fff0(ff)?(?!\w)/gi,hotpink:/#ff69b4(ff)?(?!\w)/gi,indigo:/#4b0082(ff)?(?!\w)/gi,ivory:/#fffff0(ff)?(?!\w)/gi,khaki:/#f0e68c(ff)?(?!\w)/gi,lavender:/#e6e6fa(ff)?(?!\w)/gi,lime:/#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi,linen:/#faf0e6(ff)?(?!\w)/gi,maroon:/#800000(ff)?(?!\w)/gi,moccasin:/#ffe4b5(ff)?(?!\w)/gi,navy:/#000080(ff)?(?!\w)/gi,oldlace:/#fdf5e6(ff)?(?!\w)/gi,olive:/#808000(ff)?(?!\w)/gi,orange:/#ffa500(ff)?(?!\w)/gi,orchid:/#da70d6(ff)?(?!\w)/gi,peru:/#cd853f(ff)?(?!\w)/gi,pink:/#ffc0cb(ff)?(?!\w)/gi,plum:/#dda0dd(ff)?(?!\w)/gi,purple:/#800080(ff)?(?!\w)/gi,red:/#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi,salmon:/#fa8072(ff)?(?!\w)/gi,seagreen:/#2e8b57(ff)?(?!\w)/gi,seashell:/#fff5ee(ff)?(?!\w)/gi,sienna:/#a0522d(ff)?(?!\w)/gi,silver:/#c0c0c0(ff)?(?!\w)/gi,skyblue:/#87ceeb(ff)?(?!\w)/gi,snow:/#fffafa(ff)?(?!\w)/gi,tan:/#d2b48c(ff)?(?!\w)/gi,teal:/#008080(ff)?(?!\w)/gi,thistle:/#d8bfd8(ff)?(?!\w)/gi,tomato:/#ff6347(ff)?(?!\w)/gi,violet:/#ee82ee(ff)?(?!\w)/gi,wheat:/#f5deb3(ff)?(?!\w)/gi,white:/#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi},wGt={whitespace:/\s+/g,urlHexPairs:/%[\dA-F]{2}/g,quotes:/"/g};function phr(i){return i.trim().replace(wGt.whitespace," ")}function dhr(i){return encodeURIComponent(i).replace(wGt.urlHexPairs,mhr)}function _hr(i){return Bhr(TGt).forEach(e=>{TGt[e].test(i)&&(i=i.replace(TGt[e],e))}),i}function mhr(i){switch(i){case"%20":return" ";case"%3D":return"=";case"%3A":return":";case"%2F":return"/";default:return i.toLowerCase()}}function hhr(i){if(typeof i!="string")throw new TypeError("Expected a string, but received "+typeof i);i.charCodeAt(0)===65279&&(i=i.slice(1));let e=_hr(phr(i)).replace(wGt.quotes,"'");return"data:image/svg+xml,"+dhr(e)}var Bhr=i=>Object.keys(i),ghr=aue({inset:vE.optional(vE.boolean),offsetX:vE.number,offsetY:vE.number,blur:vE.number,spread:vE.number,color:vE.string}),yhr={name:"tokens/shadow",match:i=>i.extensions.category==="shadows",transform(i,{prefix:e}){if(MH(i.value))return i.value;if(Array.isArray(i.value))return i.value.map(r=>this.transform({value:r},{prefix:e})).join(", ");if(ghr(i.value)){let{offsetX:r,offsetY:o,blur:u,spread:d,color:h,inset:v}=i.value;return`${v?"inset ":""}${r}px ${o}px ${u}px ${d}px ${h}`}return i.value}},Chr=aue({type:vE.string,placement:vE.string,stops:vE.union(vE.array(vE.string),vE.array({color:vE.string,position:vE.number}))}),vhr={name:"tokens/gradient",match:i=>i.extensions.category==="gradients",transform(i){if(MH(i.value))return i.value;if(Chr(i.value)){let{type:e,stops:r,placement:o}=i.value,u=r.map(d=>{if(MH(d))return d;let{color:h,position:v}=d;return`${h} ${v}px`});return`${e}-gradient(${o}, ${u.join(", ")})`}return i.value}},bhr={name:"tokens/fonts",match:i=>i.extensions.category==="fonts",transform(i){return Array.isArray(i.value)?i.value.join(", "):i.value}},Shr={name:"tokens/easings",match:i=>i.extensions.category==="easings",transform(i){return MH(i.value)?i.value:`cubic-bezier(${i.value.join(", ")})`}},xhr={name:"tokens/borders",match:i=>i.extensions.category==="borders",transform(i){if(MH(i.value))return i.value;let{width:e,style:r,color:o}=i.value;return`${e}px ${r} ${o}`}},Ehr={name:"tokens/assets",match:i=>i.extensions.category==="assets",transform(i){let e=i.value;return u0(e).with(vE.string,r=>r).with({type:"url"},({value:r})=>`url(${r})`).with({type:"svg"},({value:r})=>`url(${hhr(r)})`).exhaustive()}},Thr={type:"extensions",name:"tokens/css-var",transform(i,{prefix:e,hash:r}){let{isNegative:o,originalPath:u}=i.extensions,d=o?u:i.path,h=qze(d.join("-"),{prefix:e,hash:r});return{var:h.var,varRef:h.ref}}},Dhr={enforce:"post",name:"tokens/conditionals",transform(i,{prefix:e,hash:r}){let o=kGt(i.value);return o.length&&o.forEach(u=>{let d=qze(u.split(".").join("-"),{prefix:e,hash:r}).ref;i.value=i.value.replace(`{${u}}`,d)}),i.value}};function Ahr(i){if(i.includes("colorPalette"))return"";let e=[...i];return e.pop(),e.shift(),e.join(".")}var khr={type:"extensions",name:"tokens/colors/colorPalette",match(i){return i.extensions.category==="colors"},transform(i){return{colorPalette:Ahr(i.path)}}},whr=[yhr,vhr,bhr,Shr,xhr,Ehr,Thr,Dhr,khr],Ikn=class extends shr{constructor(i){super(i),this.registerTransform(...whr),this.registerMiddleware(...fhr),this.build()}get get(){return hne.createVarGetter(this)}get conditionMap(){return hne.groupByCondition(this)}get categoryMap(){return hne.groupByCategory(this)}get values(){return hne.getFlattenedValues(this)}get colorPalettes(){return jLt(hne.groupByColorPalette(this))}get vars(){return hne.getVars(this)}getValue(i){let e=this.values.get(i);if(e!=null)return Object.fromEntries(e)}getTokenVar(i){let e=jLt(this.values);return Kze(e,i)}};var Ihr=Object.defineProperty,Phr=(i,e)=>{for(var r in e)Ihr(i,r,{get:e[r],enumerable:!0})},Nhr={};Phr(Nhr,{artifactsGenerated:()=>Lkn,buildComplete:()=>Ukn,codegenComplete:()=>Rkn,configExists:()=>Fkn,configWatch:()=>jkn,getMessages:()=>Wkn,noExtract:()=>Mkn,thankYou:()=>Okn,watch:()=>Gkn});var pKe=DN.green().bold("\u2714\uFE0F"),Lkn=i=>{let{config:{outdir:e},recipes:r,patterns:o,tokens:u,jsx:d}=i;return()=>[Hf`
|
|
21122
21122
|
${pKe} ${tne(e,"/css")}: the css function to author styles
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@pandacss/language-server",
|
|
3
3
|
"displayName": "Panda CSS",
|
|
4
4
|
"description": "🐼 The official Panda language server",
|
|
5
|
-
"version": "0.0.0-dev-
|
|
5
|
+
"version": "0.0.0-dev-20230713091113",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "https://github.com/chakra-ui/panda",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"vscode-languageserver": "^8.1.0",
|
|
33
33
|
"vscode-languageserver-textdocument": "^1.0.8",
|
|
34
34
|
"vscode-uri": "^3.0.7",
|
|
35
|
-
"@pandacss/core": "0.0.0-dev-
|
|
36
|
-
"@pandacss/extension-shared": "0.0.0-dev-
|
|
37
|
-
"@pandacss/extractor": "0.0.0-dev-
|
|
38
|
-
"@pandacss/node": "0.0.0-dev-
|
|
39
|
-
"@pandacss/parser": "0.0.0-dev-
|
|
40
|
-
"@pandacss/shared": "0.0.0-dev-
|
|
41
|
-
"@pandacss/token-dictionary": "0.0.0-dev-
|
|
42
|
-
"@pandacss/types": "0.0.0-dev-
|
|
35
|
+
"@pandacss/core": "0.0.0-dev-20230713091113",
|
|
36
|
+
"@pandacss/extension-shared": "0.0.0-dev-20230713091113",
|
|
37
|
+
"@pandacss/extractor": "0.0.0-dev-20230713091113",
|
|
38
|
+
"@pandacss/node": "0.0.0-dev-20230713091113",
|
|
39
|
+
"@pandacss/parser": "0.0.0-dev-20230713091113",
|
|
40
|
+
"@pandacss/shared": "0.0.0-dev-20230713091113",
|
|
41
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20230713091113",
|
|
42
|
+
"@pandacss/types": "0.0.0-dev-20230713091113"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"fast-glob": "^3.3.0"
|