builder.io 1.6.0 → 1.6.2

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/core/index.cjs CHANGED
@@ -974,4 +974,4 @@ module.exports = nextConfig
974
974
  `,n+=` }
975
975
  `,n+=` }
976
976
  `,n+=`})();
977
- `,n}catch(t){return console.error(`Failed to create devtools client script: ${t.message||t}`),""}}var It="1.6.0";
977
+ `,n}catch(t){return console.error(`Failed to create devtools client script: ${t.message||t}`),""}}var It="1.6.2";
package/core/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
1
2
  var si=Object.create;var Mn=Object.defineProperty;var ui=Object.getOwnPropertyDescriptor;var pi=Object.getOwnPropertyNames;var li=Object.getPrototypeOf,ci=Object.prototype.hasOwnProperty;var Ie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var mi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of pi(t))!ci.call(e,o)&&o!==r&&Mn(e,o,{get:()=>t[o],enumerable:!(n=ui(t,o))||n.enumerable});return e};var Un=(e,t,r)=>(r=e!=null?si(li(e)):{},mi(t||!e||!e.__esModule?Mn(r,"default",{value:e,enumerable:!0}):r,e));var Jn=Ie(($u,qn)=>{"use strict";qn.exports=function(){if(process.env.npm_config_user_agent)return di(process.env.npm_config_user_agent)};function di(e){let t=e.split(" ")[0],r=t.lastIndexOf("/"),n=t.substring(0,r);return{name:n==="npminstall"?"cnpm":n,version:t.substring(r+1)}}});var wn=Ie(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});function vo(e){return Object.prototype.toString.call(e)}qt.getType=vo;function Zs(e){throw new TypeError("unsupported data type: "+vo(e))}qt.throwUnknownDataType=Zs});var Rn=Ie(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});var ke="";for(let e=0;e<10;e++){let t=String.fromCharCode(48+e);ke+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(65+e);ke+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(97+e);ke+=t}var lt=ke.length,bn={};for(let e=0;e<lt;e++){let t=ke[e];bn[t]=e}function vn(e){let t=0,r=1;for(let n=e.length-1;n>=0;n--){let o=e[n],i=bn[o];i*=r,t+=i,r*=lt}return t}Le.s_to_int=vn;function Io(e){let t=BigInt(0),r=BigInt(1),n=BigInt(lt);for(let o=e.length-1;o>=0;o--){let i=e[o],a=BigInt(bn[i]);a*=r,t+=a,r*=n}return t}Le.s_to_big_int=Io;function In(e){if(e===0)return ke[0];let t=[];for(;e!==0;){let r=e%lt,n=ke[r];t.push(n),e-=r,e/=lt}return t.reverse().join("")}Le.int_to_s=In;function Ro(e){let t=BigInt(0),r=BigInt(lt);if(e===t)return ke[0];let n=[];for(;e!==t;){let o=e%r,i=ke[Number(o)];n.push(i),e-=o,e/=r}return n.reverse().join("")}Le.big_int_to_s=Ro;function Qt(e){return e.split("").reverse().join("")}function No(e){if(e<0)return"-"+No(-e);let[t,r]=e.toString().split(".");if(!r)return In(e);let n;r&&([r,n]=r.split("e")),t=Jt(t),r=Qt(r),r=Jt(r);let o=t+"."+r;if(n){switch(o+=".",n[0]){case"+":n=n.slice(1);break;case"-":o+="-",n=n.slice(1);break}n=Qt(n),n=Jt(n),o+=n}return o}Le.num_to_s=No;function Jt(e){let t=+e;return t.toString()===e?In(t):":"+Ro(BigInt(e))}Le.int_str_to_s=Jt;function Tn(e){return e[0]===":"?Io(e.substring(1)).toString():vn(e).toString()}function Bo(e){if(e[0]==="-")return-Bo(e.substr(1));let[t,r,n]=e.split(".");if(!r)return vn(t);t=Tn(t),r=Tn(r),r=Qt(r);let o=t+"."+r;if(n){o+="e";let i=!1;n[0]==="-"&&(i=!0,n=n.slice(1)),n=Tn(n),n=Qt(n),o+=i?-n:+n}return+o}Le.s_to_num=Bo});var Bn=Ie(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});var Nn=Rn();function eu(e){return"n|"+Nn.num_to_s(e)}_e.encodeNum=eu;function tu(e){return e=e.replace("n|",""),Nn.s_to_num(e)}_e.decodeNum=tu;function nu(e){return typeof e=="number"?e:Nn.s_to_int(e)}_e.decodeKey=nu;function ru(e){return e?"b|T":"b|F"}_e.encodeBool=ru;function ou(e){switch(e){case"b|T":return!0;case"b|F":return!1}return!!e}_e.decodeBool=ou;function iu(e){switch(e[0]+e[1]){case"b|":case"o|":case"n|":case"a|":case"s|":e="s|"+e}return e}_e.encodeStr=iu;function au(e){return e[0]+e[1]==="s|"?e.substr(2):e}_e.decodeStr=au});var Oo=Ie(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.config={sort_key:!1}});var Ln=Ie(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});var su=Oo(),uu=wn(),kn=Bn(),pu=Rn();function lu(e){return e.store.toArray()}Xe.memToValues=lu;function ko(){let e=[];return{forEach(t){for(let r=0;r<e.length;r++)if(t(e[r])==="break")return},add(t){e.push(t)},toArray(){return e}}}Xe.makeInMemoryStore=ko;function Lo(){let e=Object.create(null),t=Object.create(null);return{getValue(r){return e[r]},getSchema(r){return t[r]},forEachValue(r){for(let[n,o]of Object.entries(e))if(r(n,o)==="break")return},forEachSchema(r){for(let[n,o]of Object.entries(t))if(r(n,o)==="break")return},setValue(r,n){e[r]=n},setSchema(r,n){t[r]=n},hasValue(r){return r in e},hasSchema(r){return r in t}}}Xe.makeInMemoryCache=Lo;function cu(){return{store:ko(),cache:Lo(),keyCount:0}}Xe.makeInMemoryMemory=cu;function He(e,t){if(e.cache.hasValue(t))return e.cache.getValue(t);let r=e.keyCount++,n=pu.num_to_s(r);return e.store.add(t),e.cache.setValue(t,n),n}function mu(e,t){su.config.sort_key&&t.sort();let r=t.join(",");if(e.cache.hasSchema(r))return e.cache.getSchema(r);let n=Tt(e,t,void 0);return e.cache.setSchema(r,n),n}function Tt(e,t,r){if(t===null)return"";switch(typeof t){case"undefined":if(Array.isArray(r))return Tt(e,null,r);break;case"object":if(t===null)return He(e,null);if(Array.isArray(t)){let n="a";for(let o=0;o<t.length;o++){let i=t[o],a=i===null?"_":Tt(e,i,t);n+="|"+a}return n==="a"&&(n="a|"),He(e,n)}else{let n=Object.keys(t);if(n.length===0)return He(e,"o|");let o="o",i=mu(e,n);o+="|"+i;for(let a of n){let s=t[a],u=Tt(e,s,t);o+="|"+u}return He(e,o)}case"boolean":return He(e,kn.encodeBool(t));case"number":return He(e,kn.encodeNum(t));case"string":return He(e,kn.encodeStr(t))}return uu.throwUnknownDataType(t)}Xe.addValue=Tt});var jn=Ie(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});var fu=wn(),Wt=Bn(),_n=Ln();function du(e){let t=_n.makeInMemoryMemory(),r=_n.addValue(t,e,void 0);return[_n.memToValues(t),r]}vt.compress=du;function gu(e,t){if(t==="o|")return{};let r={},n=t.split("|"),o=n[1],i=bt(e,o),a=n.length;a-2===1&&!Array.isArray(i)&&(i=[i]);for(let s=2;s<a;s++){let u=i[s-2],p=n[s];p=bt(e,p),r[u]=p}return r}function Du(e,t){if(t==="a|")return[];let r=t.split("|"),n=r.length-1,o=new Array(n);for(let i=0;i<n;i++){let a=r[i+1];a=bt(e,a),o[i]=a}return o}function bt(e,t){if(t===""||t==="_")return null;let r=Wt.decodeKey(t),n=e[r];if(n===null)return n;switch(typeof n){case"undefined":return n;case"number":return n;case"string":switch(n[0]+n[1]){case"b|":return Wt.decodeBool(n);case"o|":return gu(e,n);case"n|":return Wt.decodeNum(n);case"a|":return Du(e,n);default:return Wt.decodeStr(n)}}return fu.throwUnknownDataType(n)}vt.decode=bt;function Cu(e){let[t,r]=e;return bt(t,r)}vt.decompress=Cu});var jo=Ie(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});function xu(e){for(let t in e)e[t]===void 0&&delete e[t]}Yt.trimUndefined=xu;function hu(e){_o(e,new Set)}Yt.trimUndefinedRecursively=hu;function _o(e,t){t.add(e);for(let r in e)if(e[r]===void 0)delete e[r];else{let n=e[r];n&&typeof n=="object"&&!t.has(n)&&_o(n,t)}}});var Ko=Ie(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});var Vo=jn();Ue.compress=Vo.compress;Ue.decompress=Vo.decompress;var Eu=jn();Ue.decode=Eu.decode;var Su=Ln();Ue.addValue=Su.addValue;var $o=jo();Ue.trimUndefined=$o.trimUndefined;Ue.trimUndefinedRecursively=$o.trimUndefinedRecursively});function re(e){let t=e.join(e.getAppRootDir(),"tsconfig.json");return e.exists(t)}var fi=["node_modules","dist","build","public"];async function ae(e,t){async function r(o,i){if(i>10)return;let a=await e.readdir(o);for(let s of a){if(fi.includes(s))continue;let u=e.join(o,s),p=await e.stat(u);if(p){if(p.isFile()&&s.startsWith("builder-registry."))return u;if(p.isDirectory()){let m=await r(u,i+1);if(m)return m}}}}let n=await r(e.getAppRootDir(),0);if(!n){let i=`builder-registry.${await re(e)?"ts":"js"}`;return e.join(t,i)}return n}async function ct(e,t){let r=e.resolve("/");for(let n=0;n<20;n++){let o=e.join(t,"package.json"),i=await e.readFile(o);if(i)return JSON.parse(i);if(t===r)break;t=e.dirname(t)}return null}async function zn(e,t){for(let r=0;r<20;r++){let n=e.dirname(t),o=e.join(n,"node_modules");if(await e.exists(o))return o;if(t===e.getAppRootDir())break;t=e.dirname(t)}return e.join(e.getAppRootDir(),"node_modules")}async function mt(e,t,r){let n=await e.readdir(t);return n.includes(r)?e.join(t,r):(await Promise.all(n.map(async i=>{if(i.startsWith(".")||i==="node_modules")return;let a=e.join(t,i);if((await e.stat(a)).isDirectory()){let u=await mt(e,a,r);if(u)return u}}))).find(i=>typeof i=="string")}var Wn=Un(Jn(),1);function ge(e){return e.endsWith(".mapper.tsx")||e.endsWith(".mapper.jsx")||e.endsWith(".mapper.ts")||e.endsWith(".mapper.js")||e.endsWith(".mapper.mjs")}function B(e,t,r){t=ce(t),r=ce(r),t=e.dirname(t);let n=e.basename(r,e.extname(r));r=e.dirname(r);let o;return n==="index"?o=e.relative(t,r):o=e.relative(t,e.join(r,n)),o=ce(e.normalize(o)),o.startsWith(".")||(o="./"+o),o}function ce(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}function qe(e,t){let r=e.extname(t),n=e.basename(t,r).split(/[\/\\]/),o=n[n.length-1];return Qn(o==="index"?e.basename(e.dirname(t)):o)}function Qn(e){return K(e).replace(/ /g,"")}function se(e,t){let r=e.extname(t),n=ce(e.basename(t,r)).split("/").pop();return K(n==="index"?e.basename(e.dirname(t)):n)}function V(e,t){let r=ce(e.relative(e.getAppRootDir(),t));r=r.split("/").filter(o=>o!=="."&&o!==".."&&o!=="").join("/"),r.endsWith(".tsx")||r.endsWith(".jsx")?r=r.slice(0,-4):(r.endsWith(".ts")||r.endsWith(".js"))&&(r=r.slice(0,-3));let n=e.getFrameworks();return r.startsWith("src/")&&(r=r.slice(4)),n.some(o=>o.name.includes("next"))?"@/"+r:"~/"+r}function k(e,t){let r=t,n=[];for(let o=0;o<2;o++){let i=e.basename(r);if(!i||i==="components")break;n.unshift(i),r=e.dirname(r)}return n.join("/")}function K(e){for(e=e.replace(/([A-Z])/g," $1").replace(/\./g," ").replace(/_/g," ").replace(/-/g," ").replace(/\s/g," ").trim();e.includes(" ");)e=e.replace(/ /g," ");return e.split(" ").map(t=>t.length>2?t[0].toUpperCase()+t.slice(1):t).join("").trim()}function te(e){return e.sort((t,r)=>t.name.toLocaleLowerCase().localeCompare(r.name.toLocaleLowerCase()))}async function $(e,t,r,n){if(typeof r!="string"||r==="")throw new Error(`getComponentId(), exportName must be a non-empty string, received: ${r}, ${t}`);return n&&(t=n),t=e.normalize(t),(await e.hash(t+"#"+r)).substring(0,8)}function ft(e){return typeof e=="number"}function Ze(e){return typeof e=="boolean"}function Z(e){return typeof e=="string"}function et(e){return typeof e=="string"?/^[A-Z][A-Za-z0-9]*$/.test(e):!1}function oe(e){return JSON.parse(JSON.stringify(e))}function It(e,t,r){for(let n of t)if(e.dirname(r).includes(n))return!0;return!1}function Yn(){try{let e=(0,Wn.default)();if(e?.name)return e.name}catch{}return"npm"}async function Je(e){let t=[],r=await ct(e,e.getRepoRootDir());if(r){let n=await Xn(r,e);t.push(...n)}return t}async function Hn(e){let t=await ct(e,e.getRepoRootDir());return t?.scripts?.dev?t.scripts.dev.includes("--turbopack"):!1}async function Xn(e,t){let r=[];if(e&&typeof e=="object"){let n=new Set(Object.keys({...e.dependencies,...e.devDependencies}));for(let o of gi)if(n.has(o)&&!r.some(i=>i.name===o)){let i={name:o};Gn.has(o)&&(i.version=await Gn.get(o)(t)),r.push(i)}}return r}function Xt(e){let t=parseInt(e);return Number.isNaN(t)?void 0:t}var Gn=new Map([["next",async e=>{if(!e.spawnSync)return;let t=Yn(),r=t==="npm"?"npx":t,{stdout:n}=e.spawnSync(r,["next","-v"],{encoding:"utf8"});if(!n)return;let o=n.match(/(Next.js v)([\d.]+)/g);if(!o)return;let i=o[0].split("Next.js v")[1],[a,s,u]=i.split(".");return{major:Xt(a),minor:Xt(s),patch:Xt(u)}}]]),gi=["@shopify/remix-oxygen","@shopify/hydrogen","@builder.io/qwik-city","@remix-run/react","@sveltejs/kit","astro","gatsby","next","nuxt","@builder.io/qwik","@angular/core","react","solid-js","svelte","vue"];async function De(e){let t=Zn(e),r=await e.readFile(t);return typeof r=="string"?JSON.parse(r):{}}async function Ce(e,t){t=typeof t=="object"&&t!=null?t:{};let r=Zn(e);await e.writeFile(r,JSON.stringify(t??{},null,2))}function Zn(e){let t=e.getAppRootDir();return e.join(t,"node_modules",".builder","builder-cache.json")}async function je(e,t,r){let n={envKey:r,envValue:null,file:""};for(let o of t){let i=e.join(e.getAppRootDir(),o),a=await Di(e,i);if(a){let s=a[r];if(typeof s=="string"&&s.length>0&&s!=="YOUR_API_KEY")return n.envValue=s,n.file=i,n}}return n.file=e.join(e.getAppRootDir(),t[t.length-1]),n}async function Di(e,t){let r=await e.readFile(t);return typeof r=="string"?er(r):null}function er(e){let t={},r=e.replace(/\r\n?/gm,`
2
3
  `),n;for(;(n=Ci.exec(r))!=null;){let o=n[1],i=n[2]||"";i=i.trim();let a=i[0];i=i.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),a==='"'&&(i=i.replace(/\\n/g,`
3
4
  `),i=i.replace(/\\r/g,"\r")),t[o]=i}return t}var Ci=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;async function Ve(e,t,r,n){let o="# https://www.builder.io/c/docs/using-your-api-key",i=await e.readFile(t);if(i)if(i.includes(r))if(i.includes(n))e.debug(`"${r}" with "${n}" already set in ${t}`);else return e.debug(`Replace "${r}" in ${t}`),i=i.replace(new RegExp(`${r}=.*`),`${r}=${n}`),await e.writeFile(t,i),"update";else return e.debug(`Append "${r}" to ${t}`),i+=`
@@ -974,4 +975,4 @@ module.exports = nextConfig
974
975
  `,n+=` }
975
976
  `,n+=` }
976
977
  `,n+=`})();
977
- `,n}catch(t){return console.error(`Failed to create devtools client script: ${t.message||t}`),""}}var Ht="1.6.0";export{Pu as createDevTools,yu as createDevToolsSys,Je as detectFrameworks,Xn as detectFrameworksFromPackageJson,Lu as ensureConfigPlugin,ii as findBuildToolConfig,_u as getClientScript,er as parseDotEnvContent,Ht as version};
978
+ `,n}catch(t){return console.error(`Failed to create devtools client script: ${t.message||t}`),""}}var Ht="1.6.2";export{Pu as createDevTools,yu as createDevToolsSys,Je as detectFrameworks,Xn as detectFrameworksFromPackageJson,Lu as ensureConfigPlugin,ii as findBuildToolConfig,_u as getClientScript,er as parseDotEnvContent,Ht as version};
package/figma/index.mjs CHANGED
@@ -1 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
1
2
  function i(e){}function a(e){return e===!1?!1:e}function t(e,...n){}export{a as explicitFalse,i as figmaMapping,t as html};
package/node/index.cjs CHANGED
@@ -101,6 +101,6 @@ ${" ".repeat(6+r)}^`),c));s+=`
101
101
  ${l.join(`
102
102
  `)}
103
103
  `}this.message=s}},Cc=new Set(["Literal","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","RegExpLiteral","BigIntLiteral"]),Qn=new Set(["string","number","boolean","bigint","symbol","undefined"]),ee=gt;function Ic(i){return/^[$A-Z_a-z][\w$]*$/.test(i)}var $r="__magicast_proxy";function ce(i,s=new Set){if(i===void 0)return ee.identifier("undefined");if(i===null)return ee.literal(null);if(Qn.has(typeof i))return ee.literal(i);if(s.has(i))throw new re("Can not serialize circular reference");if(s.add(i),i[$r])return i.$ast;if(i instanceof RegExp){let e=ee.regExpLiteral(i.source,i.flags);return delete e.extra.raw,e}return i instanceof Set?ee.newExpression(ee.identifier("Set"),[ee.arrayExpression([...i].map(e=>ce(e,s)))]):i instanceof Date?ee.newExpression(ee.identifier("Date"),[ee.literal(i.toISOString())]):i instanceof Map?ee.newExpression(ee.identifier("Map"),[ee.arrayExpression([...i].map(([e,t])=>ee.arrayExpression([ce(e,s),ce(t,s)])))]):Array.isArray(i)?ee.arrayExpression(i.map(e=>ce(e,s))):typeof i=="object"?ee.objectExpression(Object.entries(i).map(([e,t])=>ee.property("init",/^[$A-Z_a-z][\w$]*$/g.test(e)?ee.identifier(e):ee.literal(e),ce(t,s)))):ee.literal(i)}function Nc(i,s={}){let e=s;return e[$r]=!0,e.$ast=i,e.$type||(e.$type="object"),e}var kc={enumerable:!0,configurable:!0};function be(i,s,e){let t=Nc(i,s);return new Proxy({},{ownKeys(){return Object.keys(t).filter(r=>r!==$r&&!r.startsWith("$"))},getOwnPropertyDescriptor(){return kc},has(r,n){return n in t},...e,get(r,n,a){if(n in t)return t[n];if(e.get)return e.get(r,n,a)},set(r,n,a,o){return n in t?(t[n]=a,!0):e.set?e.set(r,n,a,o):!1}})}var de=gt,Cr=new WeakMap;function Lc(i,s,e){if(Cr.has(s))return Cr.get(s);let t=be(s,{get $declaration(){return i},get imported(){return s.type==="ImportDefaultSpecifier"?"default":s.type==="ImportNamespaceSpecifier"?"*":s.imported.type==="Identifier"?s.imported.name:s.imported.value},set imported(r){if(s.type!=="ImportSpecifier")throw new re("Changing import name is not yet implemented");s.imported.type==="Identifier"?s.imported.name=r:s.imported.value=r},get local(){return s.local.name},set local(r){s.local.name=r},get from(){return i.source.value},set from(r){if(r===i.source.value)return;i.specifiers=i.specifiers.filter(a=>a!==s),i.specifiers.length===0&&(e.body=e.body.filter(a=>a!==i));let n=e.body.find(a=>a.type==="ImportDeclaration"&&a.source.value===r);n?n.specifiers.push(s):e.body.unshift(de.importDeclaration([s],de.stringLiteral(r)))},toJSON(){return{imported:this.imported,local:this.local,from:this.from}}},{ownKeys(){return["imported","local","from","toJSON"]}});return Cr.set(s,t),t}function Dc(i,s){let e=()=>{let a=[];for(let o of i.body)if(o.type==="ImportDeclaration")for(let l of o.specifiers)a.push(Lc(o,l,i));return a},t=(a,o,l)=>{let c=e(),u=c.find(p=>p.local===a),h=o.local||a;if(u)return u.imported=o.imported,u.local=h,u.from=o.from,!0;let f=o.imported==="default"?de.importDefaultSpecifier(de.identifier(h)):o.imported==="*"?de.importNamespaceSpecifier(de.identifier(h)):de.importSpecifier(de.identifier(o.imported),de.identifier(h)),d=c.find(p=>p.from===o.from)?.$declaration;if(d)d.specifiers.push(f);else if(l==="prepend"||c.length===0)i.body.unshift(de.importDeclaration([f],de.stringLiteral(o.from)));else{let p=c.at(-1).$declaration,g=i.body.indexOf(p);i.body.splice(g+1,0,de.importDeclaration([f],de.stringLiteral(o.from)))}return!0},r=a=>{let o=e().find(u=>u.local===a);if(!o)return!1;let l=o.$declaration,c=o.$ast;return l.specifiers=l.specifiers.filter(u=>u!==c),l.specifiers.length===0&&(i.body=i.body.filter(u=>u!==l)),!0};return be(i,{$type:"imports",$add(a){t(a.local||a.imported,a,"prepend")},$prepend(a){t(a.local||a.imported,a,"prepend")},$append(a){t(a.local||a.imported,a,"append")},get $items(){return e()},toJSON(){return e().reduce((a,o)=>(a[o.local]=o,a),{})}},{get(a,o){return e().find(l=>l.local===o)},set(a,o,l){return t(o,l,"prepend")},deleteProperty(a,o){return r(o)},ownKeys(){return e().map(a=>a.local)},has(a,o){return e().some(l=>l.local===o)}})}function Cs(i,s,e){let t=n=>s[n],r=(n,a)=>{s[n]=a};return be(i,{$type:"array",push(n){s.push(ce(n))},pop(){return le(s.pop(),e)},unshift(n){s.unshift(ce(n))},shift(){return le(s.shift(),e)},splice(n,a,...o){return s.splice(n,a,...o.map(c=>ce(c))).map(c=>le(c,e))},find(n){return s.map(a=>le(a,e)).find(n)},findIndex(n){return s.map(a=>le(a,e)).findIndex(n)},includes(n){return s.map(a=>le(a,e)).includes(n)},toJSON(){return s.map(n=>le(n,e))}},{get(n,a){if(a==="length")return s.length;if(a===Symbol.iterator)return function*(){for(let c of s)yield le(c,e)};if(typeof a=="symbol")return;let o=+a;if(Number.isNaN(o))return;let l=t(o);if(l)return le(l,e)},set(n,a,o){if(typeof a=="symbol")return!1;let l=+a;return Number.isNaN(l)?!1:(r(l,ce(o)),!0)},deleteProperty(n,a){if(typeof a=="symbol")return!1;let o=+a;return Number.isNaN(o)?!1:(s[o]=ce(void 0),!0)},ownKeys(){return["length",...s.map((n,a)=>a.toString())]}})}function Oc(i,s){if("elements"in i)return Cs(i,i.elements,s)}function Yn(i,s){if(i.type!=="CallExpression")throw new re("Not a function call");function e(r){if(r.type==="Identifier")return r.name;if(r.type==="MemberExpression")return`${e(r.object)}.${e(r.property)}`;throw new re("Not implemented")}let t=Cs(i,i.arguments,s);return be(i,{$type:"function-call",$callee:e(i.callee),$args:t},{})}function Mc(i,s){if(i.type!=="ArrowFunctionExpression")throw new re("Not an arrow function expression");let e=Cs(i,i.params,s);return be(i,{$type:"arrow-function-expression",$params:e,$body:le(i.body,s)},{})}var Fc=gt;function Bc(i,s){if(!("properties"in i))return;let e=n=>{for(let a of i.properties){if("key"in a&&"name"in a.key&&a.key.name===n)return a.value;if(a.type==="ObjectProperty"&&(a.key.type==="StringLiteral"||a.key.type==="NumericLiteral"||a.key.type==="BooleanLiteral")&&a.key.value.toString()===n)return a.value.value??a.value}},t=(n,a=!1)=>{if("key"in n&&"name"in n.key)return n.key.name;if(n.type==="ObjectProperty"&&(n.key.type==="StringLiteral"||n.key.type==="NumericLiteral"||n.key.type==="BooleanLiteral"))return n.key.value.toString();if(a)throw new re(`Casting "${n.type}" is not supported`,{ast:n,code:s?.$code})},r=(n,a)=>{let o=i.properties.find(l=>t(l)===n);o?o.value=a:Ic(n)?i.properties.push({type:"Property",key:{type:"Identifier",name:n},value:a}):i.properties.push({type:"ObjectProperty",key:Fc.stringLiteral(n),value:a})};return be(i,{$type:"object",toJSON(){return i.properties.reduce((n,a)=>("key"in a&&"name"in a.key&&(n[a.key.name]=le(a.value,s)),n),{})}},{get(n,a){let o=e(a);if(o)return le(o,s)},set(n,a,o){return typeof a!="string"&&(a=String(a)),r(a,ce(o)),!0},deleteProperty(n,a){typeof a!="string"&&(a=String(a));let o=i.properties.findIndex(l=>"key"in l&&"name"in l.key&&l.key.name===a);return o!==-1&&i.properties.splice(o,1),!0},ownKeys(){return i.properties.map(n=>t(n,!0)).filter(Boolean)}})}function Zn(i,s){if(i.type!=="NewExpression")throw new re("Not a new expression");function e(r){if(r.type==="Identifier")return r.name;if(r.type==="MemberExpression")return`${e(r.object)}.${e(r.property)}`;throw new re("Not implemented")}let t=Cs(i,i.arguments,s);return be(i,{$type:"new-expression",$callee:e(i.callee),$args:t},{})}function _c(i){if(i.type!=="Identifier")throw new re("Not an identifier");return be(i,{$type:"identifier",$name:i.name},{})}function jc(i){if(i.type!=="LogicalExpression")throw new re("Not a logical expression");return be(i,{$type:"logicalExpression"},{})}function Rc(i){if(i.type!=="MemberExpression")throw new re("Not a member expression");return be(i,{$type:"memberExpression"},{})}var Ir=new WeakMap;function le(i,s){if(Qn.has(typeof i))return i;if(Cc.has(i.type))return i.value;if(Ir.has(i))return Ir.get(i);let e;switch(i.type){case"ObjectExpression":{e=Bc(i,s);break}case"ArrayExpression":{e=Oc(i,s);break}case"CallExpression":{e=Yn(i,s);break}case"ArrowFunctionExpression":{e=Mc(i,s);break}case"NewExpression":{e=Zn(i,s);break}case"Identifier":{e=_c(i);break}case"LogicalExpression":{e=jc(i);break}case"MemberExpression":{e=Rc(i);break}case"TSAsExpression":case"TSSatisfiesExpression":{e=le(i.expression,s);break}default:throw new re(`Casting "${i.type}" is not supported`,{ast:i,code:s?.$code})}return Ir.set(i,e),e}var _t=gt;function Uc(i,s){let e=r=>{let n=r==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let a of i.body)if(a.type===n){if(r==="default")return a.declaration;if(a.declaration&&"declarations"in a.declaration){let o=a.declaration.declarations[0];if("name"in o.id&&o.id.name===r)return o.init}}},t=(r,n)=>{let a=r==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration",o=ce(n);for(let l of i.body)if(l.type===a){if(r==="default"){l.declaration=o;return}if(l.declaration&&"declarations"in l.declaration){let c=l.declaration.declarations[0];if("name"in c.id&&c.id.name===r){c.init=o;return}}}i.body.push(r==="default"?_t.exportDefaultDeclaration(o):_t.exportNamedDeclaration(_t.variableDeclaration("const",[_t.variableDeclarator(_t.identifier(r),o)])))};return be(i,{$type:"exports"},{get(r,n){let a=e(n);if(a)return le(a,s)},set(r,n,a){return t(n,a),!0},ownKeys(){return i.body.flatMap(r=>r.type==="ExportDefaultDeclaration"?["default"]:r.type==="ExportNamedDeclaration"&&r.declaration&&"declarations"in r.declaration?r.declaration.declarations.map(n=>"name"in n.id?n.id.name:""):[]).filter(Boolean)},deleteProperty(r,n){let a=n==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let o=0;o<i.body.length;o++){let l=i.body[o];if(l.type===a){if(n==="default")return i.body.splice(o,1),!0;if(l.declaration&&"declarations"in l.declaration){let c=l.declaration.declarations[0];if("name"in c.id&&c.id.name===n)return i.body.splice(o,1),!0}}}return!1}})}function Vc(i,s){let e=i.program;if(e.type!=="Program")throw new re(`Cannot proxify ${i.type} as module`);let t={$code:s,$type:"module"},r=be(e,t,{ownKeys(){return["imports","exports","generate"]}});return t.exports=Uc(e,r),t.imports=Dc(e),t.generate=n=>qr(r,n),r}function ea(i,s={}){let e={wrapColumn:s.wrapColumn===void 0,indent:s.tabWidth===void 0||s.useTabs===void 0,quote:s.quote===void 0,arrowParens:s.arrowParensAlways===void 0,trailingComma:s.trailingComma===void 0},t=2,r=0,n=0,a=0,o=0,l=/(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g,c={doubleQuote:0,singleQuote:0,singleParam:0,trailingComma:0},u=(i||"").split(`
104
- `),h=!1;for(let f of u){let d=f.trim();if(d.length!==0){if(e.wrapColumn&&f.length>a&&(a=f.length),e.indent){let p=f.match(/^\s+/)?.[0]||"";p.length>0&&(p.length>0&&p.length<t&&(t=p.length),p[0]===" "?r++:p.length>0&&r--)}if(d.at(-1)===";"?n++:d.length>0&&n--,e.quote||e.arrowParens){let p=d.matchAll(l);for(let g of p)if(g.groups)for(let m in c)g.groups[m]&&c[m]++}e.trailingComma&&((f.startsWith("}")||f.startsWith("]"))&&(h?o++:o--),h=d.endsWith(","))}}return{wrapColumn:a,useTabs:r>0,tabWidth:t,quote:c.singleQuote>c.doubleQuote?"single":"double",arrowParensAlways:c.singleParam>0,trailingComma:o>0||c.trailingComma>0,useSemi:n>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...s}}function ta(i,s){let e=Rn(i,{parser:s?.parser||Gn(),...s});return Vc(e,i)}function sa(i,s){let e=Rn("("+i+")",{parser:s?.parser||Gn(),...s}),t=e.program.body[0];t.type==="ExpressionStatement"&&(t=t.expression),t.extra?.parenthesized&&(t.extra.parenthesized=!1);let r={$ast:e,$code:" "+i+" ",$type:"module"};return le(t,r)}function qr(i,s={}){let e=i.$ast||i,t=s.format===!1||!("$code"in i)?{}:ea(i.$code,s.format),{code:r,map:n}=Ec(e,{...s,...t});return{code:r,map:n}}async function $c(i,s={}){let e=await ys.promises.readFile(i,"utf8");return s.sourceFileName=s.sourceFileName??i,ta(e,s)}async function qc(i,s,e){let t="$ast"in i?i.$ast:i,{code:r,map:n}=qr(t,e);await ys.promises.writeFile(s,r),n&&await ys.promises.writeFile(s+".map",n)}var fs=gt,zc={functionCall(i,...s){let e=fs.callExpression(fs.identifier(i),s.map(t=>ce(t)));return Yn(e)},newExpression(i,...s){let e=fs.newExpression(fs.identifier(i),s.map(t=>ce(t)));return Zn(e)},literal(i){return ce(i)},raw(i){return sa(i)}};var Wc=je(require("@sentry/node"),1);async function aa(i,s){let e=await(0,ue.readdir)(i,{withFileTypes:!0}),t=[];for(let r of e){let n=$.default.join(i,r.name);if(r.isDirectory()){if(!s.has(r.name)){let a=await aa(n,s);t.push(...a)}}else t.push(n)}return t}async function oa(i){let s=new Set,e=(...c)=>{if(process.env.DEBUG){let u=new Date,h=`${String(u.getMinutes()).padStart(2,"0")}:${String(u.getSeconds()).padStart(2,"0")}.${String(u.getMilliseconds()).padStart(3,"0")}`;console.debug(h,"[builder-dev-tools]",...c)}},t=async c=>{let u=(0,ra.createHash)("md5");return u.update(c),u.digest("hex")},r=$.default.normalize(i.cwd),n=Gc($.default.normalize(i.cwd))??r,a=Qc($.default.normalize(i.cwd))??n,o={...$.default,getCwdDir:()=>r,getRepoRootDir:()=>n,getAppRootDir:()=>a,cwd:()=>process.cwd(),exists:async c=>{try{return await(0,ue.access)(c),!0}catch{return!1}},magicast:zr,existsSync:c=>(0,G.existsSync)(c),readdir:async(c,u)=>{let h=await(0,ue.readdir)(c);return u?h.map(f=>$.default.join(c,f)):h},readdirRecursive:async(c,u)=>aa(c,new Set(u)),readdirSync:c=>(0,G.readdirSync)(c),readFile:async c=>{try{return await(0,ue.readFile)(c,"utf-8")}catch(u){if(u.code==="ENOENT")return null;throw e(u,c),u}},readFileSync(c){try{return(0,G.readFileSync)(c,"utf-8")}catch(u){if(u.code==="ENOENT")return null;throw e(u,c),u}},spawnSync:xt.spawnSync,stat:async c=>await(0,ue.stat)(c),statSync:c=>(0,G.statSync)(c),unlinkSync:c=>{(0,G.unlinkSync)(c)},unlink:async c=>{await(0,ue.unlink)(c)},writeFile:async(c,u)=>{c=$.default.normalize(c);let h={path:c,basename:$.default.basename(c),dirname:$.default.dirname(c),extname:$.default.extname(c)};await(0,ue.mkdir)($.default.dirname(c),{recursive:!0}),await(0,ue.writeFile)(c,u);for(let f of s)await f(h)},hash:t,getDeviceId:()=>t(`${(0,Is.hostname)()}:${(0,Is.homedir)()}`),formatCode:async(c,u)=>{let h=null;try{h=await Wr.default.resolveConfig(c)}catch{}try{return Wr.default.format(u,{...h,filepath:c})}catch{}return u},on:(c,u)=>{c==="change"&&s.add(u)},off:(c,u)=>{c==="change"&&s.delete(u)},debug:e,launchEditor:async c=>{try{let u=c.filePath;typeof c.line=="number"&&(u+=`:${c.line}`,typeof c.column=="number"&&(u+=`:${c.column}`)),(0,na.default)(u,"code",(h,f)=>{console.error(`Failed to launch editor for ${h}`),f&&console.error(f)})}catch(u){console.error(`Failed to launch editor for ${String(u.message||u)}`)}},platform:()=>({runtime:"node",os:process.platform}),getRepoInfo:async()=>{let c=$.default.normalize(i.cwd);return{remoteUrl:Jc(c),defaultBranch:Kc(c),commit:Hc(c),currentBranch:Xc(c)}},getFrameworks:()=>[],ts:ia.default,Sentry:Wc,version:"1.6.0",sdkVersion:null,ignoreMissingConfig:i.ignoreMissingConfig,kind:null},l=await ti(o);return o.getFrameworks=()=>l,o}function Jc(i){try{return((0,xt.spawnSync)("git",["config","--get","remote.origin.url"],{cwd:i}).stdout||"").toString().trim()}catch(s){return console.error("Error getting git remote URL:",s),""}}function Kc(i){let s="master";try{let e=(0,xt.spawnSync)("git",["branch","-r"],{cwd:i});return e.stdout&&e.stdout.toString().trim().split(`
104
+ `),h=!1;for(let f of u){let d=f.trim();if(d.length!==0){if(e.wrapColumn&&f.length>a&&(a=f.length),e.indent){let p=f.match(/^\s+/)?.[0]||"";p.length>0&&(p.length>0&&p.length<t&&(t=p.length),p[0]===" "?r++:p.length>0&&r--)}if(d.at(-1)===";"?n++:d.length>0&&n--,e.quote||e.arrowParens){let p=d.matchAll(l);for(let g of p)if(g.groups)for(let m in c)g.groups[m]&&c[m]++}e.trailingComma&&((f.startsWith("}")||f.startsWith("]"))&&(h?o++:o--),h=d.endsWith(","))}}return{wrapColumn:a,useTabs:r>0,tabWidth:t,quote:c.singleQuote>c.doubleQuote?"single":"double",arrowParensAlways:c.singleParam>0,trailingComma:o>0||c.trailingComma>0,useSemi:n>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...s}}function ta(i,s){let e=Rn(i,{parser:s?.parser||Gn(),...s});return Vc(e,i)}function sa(i,s){let e=Rn("("+i+")",{parser:s?.parser||Gn(),...s}),t=e.program.body[0];t.type==="ExpressionStatement"&&(t=t.expression),t.extra?.parenthesized&&(t.extra.parenthesized=!1);let r={$ast:e,$code:" "+i+" ",$type:"module"};return le(t,r)}function qr(i,s={}){let e=i.$ast||i,t=s.format===!1||!("$code"in i)?{}:ea(i.$code,s.format),{code:r,map:n}=Ec(e,{...s,...t});return{code:r,map:n}}async function $c(i,s={}){let e=await ys.promises.readFile(i,"utf8");return s.sourceFileName=s.sourceFileName??i,ta(e,s)}async function qc(i,s,e){let t="$ast"in i?i.$ast:i,{code:r,map:n}=qr(t,e);await ys.promises.writeFile(s,r),n&&await ys.promises.writeFile(s+".map",n)}var fs=gt,zc={functionCall(i,...s){let e=fs.callExpression(fs.identifier(i),s.map(t=>ce(t)));return Yn(e)},newExpression(i,...s){let e=fs.newExpression(fs.identifier(i),s.map(t=>ce(t)));return Zn(e)},literal(i){return ce(i)},raw(i){return sa(i)}};var Wc=je(require("@sentry/node"),1);async function aa(i,s){let e=await(0,ue.readdir)(i,{withFileTypes:!0}),t=[];for(let r of e){let n=$.default.join(i,r.name);if(r.isDirectory()){if(!s.has(r.name)){let a=await aa(n,s);t.push(...a)}}else t.push(n)}return t}async function oa(i){let s=new Set,e=(...c)=>{if(process.env.DEBUG){let u=new Date,h=`${String(u.getMinutes()).padStart(2,"0")}:${String(u.getSeconds()).padStart(2,"0")}.${String(u.getMilliseconds()).padStart(3,"0")}`;console.debug(h,"[builder-dev-tools]",...c)}},t=async c=>{let u=(0,ra.createHash)("md5");return u.update(c),u.digest("hex")},r=$.default.normalize(i.cwd),n=Gc($.default.normalize(i.cwd))??r,a=Qc($.default.normalize(i.cwd))??n,o={...$.default,getCwdDir:()=>r,getRepoRootDir:()=>n,getAppRootDir:()=>a,cwd:()=>process.cwd(),exists:async c=>{try{return await(0,ue.access)(c),!0}catch{return!1}},magicast:zr,existsSync:c=>(0,G.existsSync)(c),readdir:async(c,u)=>{let h=await(0,ue.readdir)(c);return u?h.map(f=>$.default.join(c,f)):h},readdirRecursive:async(c,u)=>aa(c,new Set(u)),readdirSync:c=>(0,G.readdirSync)(c),readFile:async c=>{try{return await(0,ue.readFile)(c,"utf-8")}catch(u){if(u.code==="ENOENT")return null;throw e(u,c),u}},readFileSync(c){try{return(0,G.readFileSync)(c,"utf-8")}catch(u){if(u.code==="ENOENT")return null;throw e(u,c),u}},spawnSync:xt.spawnSync,stat:async c=>await(0,ue.stat)(c),statSync:c=>(0,G.statSync)(c),unlinkSync:c=>{(0,G.unlinkSync)(c)},unlink:async c=>{await(0,ue.unlink)(c)},writeFile:async(c,u)=>{c=$.default.normalize(c);let h={path:c,basename:$.default.basename(c),dirname:$.default.dirname(c),extname:$.default.extname(c)};await(0,ue.mkdir)($.default.dirname(c),{recursive:!0}),await(0,ue.writeFile)(c,u);for(let f of s)await f(h)},hash:t,getDeviceId:()=>t(`${(0,Is.hostname)()}:${(0,Is.homedir)()}`),formatCode:async(c,u)=>{let h=null;try{h=await Wr.default.resolveConfig(c)}catch{}try{return Wr.default.format(u,{...h,filepath:c})}catch{}return u},on:(c,u)=>{c==="change"&&s.add(u)},off:(c,u)=>{c==="change"&&s.delete(u)},debug:e,launchEditor:async c=>{try{let u=c.filePath;typeof c.line=="number"&&(u+=`:${c.line}`,typeof c.column=="number"&&(u+=`:${c.column}`)),(0,na.default)(u,"code",(h,f)=>{console.error(`Failed to launch editor for ${h}`),f&&console.error(f)})}catch(u){console.error(`Failed to launch editor for ${String(u.message||u)}`)}},platform:()=>({runtime:"node",os:process.platform}),getRepoInfo:async()=>{let c=$.default.normalize(i.cwd);return{remoteUrl:Jc(c),defaultBranch:Kc(c),commit:Hc(c),currentBranch:Xc(c)}},getFrameworks:()=>[],ts:ia.default,Sentry:Wc,version:"1.6.2",sdkVersion:null,ignoreMissingConfig:i.ignoreMissingConfig,kind:null},l=await ti(o);return o.getFrameworks=()=>l,o}function Jc(i){try{return((0,xt.spawnSync)("git",["config","--get","remote.origin.url"],{cwd:i}).stdout||"").toString().trim()}catch(s){return console.error("Error getting git remote URL:",s),""}}function Kc(i){let s="master";try{let e=(0,xt.spawnSync)("git",["branch","-r"],{cwd:i});return e.stdout&&e.stdout.toString().trim().split(`
105
105
  `).map(r=>r.trim()).includes("origin/main")?"main":s}catch(e){return console.error("Error getting git default branch name:",e.toString().split(`
106
106
  `)[0]),s}}function Hc(i){try{return((0,xt.spawnSync)("git",["rev-parse","HEAD"],{cwd:i}).stdout||"").toString().trim()}catch(s){return console.error("Error getting git commit:",s),""}}function Xc(i){try{return((0,xt.spawnSync)("git",["branch","--show-current"],{cwd:i}).stdout||"").toString().trim()}catch(s){return console.error("Error getting current branch name:",s),""}}function Gc(i){let s=$.default.resolve("/");for(let e=0;e<20;e++){let t=$.default.join(i,"package.json");if((0,G.existsSync)(t))return i;if(i===s)break;i=$.default.dirname(i)}return null}function Qc(i){let s=$.default.resolve("/");for(let e=0;e<20;e++){if((0,G.existsSync)($.default.join(i,"package.json"))||(0,G.existsSync)($.default.join(i,"remix.config.js"))||(0,G.existsSync)($.default.join(i,"remix.config.mjs"))||(0,G.existsSync)($.default.join(i,"remix.config.ts"))||(0,G.existsSync)($.default.join(i,"vite.config.js"))||(0,G.existsSync)($.default.join(i,"vite.config.ts"))||(0,G.existsSync)($.default.join(i,"vite.config.mjs"))||(0,G.existsSync)($.default.join(i,"next.config.js"))||(0,G.existsSync)($.default.join(i,"next.config.ts"))||(0,G.existsSync)($.default.join(i,"angular.json"))||(0,G.existsSync)($.default.join(i,"project.json"))||(0,G.existsSync)($.default.join(i,"tsconfig.json")))return i;if(i===s)break;i=$.default.dirname(i)}return null}0&&(module.exports={createDevToolsNodeSys});
package/node/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
1
2
  var ca=Object.create;var Cs=Object.defineProperty;var ua=Object.getOwnPropertyDescriptor;var ha=Object.getOwnPropertyNames;var pa=Object.getPrototypeOf,fa=Object.prototype.hasOwnProperty;var he=(i,s)=>()=>(s||i((s={exports:{}}).exports,s),s.exports),da=(i,s)=>{for(var e in s)Cs(i,e,{get:s[e],enumerable:!0})},ma=(i,s,e,t)=>{if(s&&typeof s=="object"||typeof s=="function")for(let r of ha(s))!fa.call(i,r)&&r!==e&&Cs(i,r,{get:()=>s[r],enumerable:!(t=ua(s,r))||t.enumerable});return i};var Is=(i,s,e)=>(e=i!=null?ca(pa(i)):{},ma(s||!i||!i.__esModule?Cs(e,"default",{value:i,enumerable:!0}):e,i));var Jr=he((uu,Wr)=>{"use strict";Wr.exports=function(){if(process.env.npm_config_user_agent)return ya(process.env.npm_config_user_agent)};function ya(i){let s=i.split(" ")[0],e=s.lastIndexOf("/"),t=s.substring(0,e);return{name:t==="npminstall"?"cnpm":t,version:s.substring(e+1)}}});var Yr=he(ks=>{var Qr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ks.encode=function(i){if(0<=i&&i<Qr.length)return Qr[i];throw new TypeError("Must be between 0 and 63: "+i)};ks.decode=function(i){var s=65,e=90,t=97,r=122,n=48,a=57,o=43,l=47,c=26,u=52;return s<=i&&i<=e?i-s:t<=i&&i<=r?i-t+c:n<=i&&i<=a?i-n+u:i==o?62:i==l?63:-1}});var Os=he(Ds=>{var Zr=Yr(),Ls=5,ei=1<<Ls,ti=ei-1,si=ei;function ba(i){return i<0?(-i<<1)+1:(i<<1)+0}function Ta(i){var s=(i&1)===1,e=i>>1;return s?-e:e}Ds.encode=function(s){var e="",t,r=ba(s);do t=r&ti,r>>>=Ls,r>0&&(t|=si),e+=Zr.encode(t);while(r>0);return e};Ds.decode=function(s,e,t){var r=s.length,n=0,a=0,o,l;do{if(e>=r)throw new Error("Expected more digits in base 64 VLQ value.");if(l=Zr.decode(s.charCodeAt(e++)),l===-1)throw new Error("Invalid base64 digit: "+s.charAt(e-1));o=!!(l&si),l&=ti,n=n+(l<<a),a+=Ls}while(o);t.value=Ta(n),t.rest=e}});var Ye=he(ee=>{function Pa(i,s,e){if(s in i)return i[s];if(arguments.length===3)return e;throw new Error('"'+s+'" is a required argument.')}ee.getArg=Pa;var ri=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Sa=/^data:.+\,.+$/;function gt(i){var s=i.match(ri);return s?{scheme:s[1],auth:s[2],host:s[3],port:s[4],path:s[5]}:null}ee.urlParse=gt;function Qe(i){var s="";return i.scheme&&(s+=i.scheme+":"),s+="//",i.auth&&(s+=i.auth+"@"),i.host&&(s+=i.host),i.port&&(s+=":"+i.port),i.path&&(s+=i.path),s}ee.urlGenerate=Qe;var Ea=32;function Aa(i){var s=[];return function(e){for(var t=0;t<s.length;t++)if(s[t].input===e){var r=s[0];return s[0]=s[t],s[t]=r,s[0].result}var n=i(e);return s.unshift({input:e,result:n}),s.length>Ea&&s.pop(),n}}var Ms=Aa(function(s){var e=s,t=gt(s);if(t){if(!t.path)return s;e=t.path}for(var r=ee.isAbsolute(e),n=[],a=0,o=0;;)if(a=o,o=e.indexOf("/",a),o===-1){n.push(e.slice(a));break}else for(n.push(e.slice(a,o));o<e.length&&e[o]==="/";)o++;for(var l,c=0,o=n.length-1;o>=0;o--)l=n[o],l==="."?n.splice(o,1):l===".."?c++:c>0&&(l===""?(n.splice(o+1,c),c=0):(n.splice(o,2),c--));return e=n.join("/"),e===""&&(e=r?"/":"."),t?(t.path=e,Qe(t)):e});ee.normalize=Ms;function ii(i,s){i===""&&(i="."),s===""&&(s=".");var e=gt(s),t=gt(i);if(t&&(i=t.path||"/"),e&&!e.scheme)return t&&(e.scheme=t.scheme),Qe(e);if(e||s.match(Sa))return s;if(t&&!t.host&&!t.path)return t.host=s,Qe(t);var r=s.charAt(0)==="/"?s:Ms(i.replace(/\/+$/,"")+"/"+s);return t?(t.path=r,Qe(t)):r}ee.join=ii;ee.isAbsolute=function(i){return i.charAt(0)==="/"||ri.test(i)};function wa(i,s){i===""&&(i="."),i=i.replace(/\/$/,"");for(var e=0;s.indexOf(i+"/")!==0;){var t=i.lastIndexOf("/");if(t<0||(i=i.slice(0,t),i.match(/^([^\/]+:\/)?\/*$/)))return s;++e}return Array(e+1).join("../")+s.substr(i.length+1)}ee.relative=wa;var ni=function(){var i=Object.create(null);return!("__proto__"in i)}();function ai(i){return i}function va(i){return oi(i)?"$"+i:i}ee.toSetString=ni?ai:va;function Ca(i){return oi(i)?i.slice(1):i}ee.fromSetString=ni?ai:Ca;function oi(i){if(!i)return!1;var s=i.length;if(s<9||i.charCodeAt(s-1)!==95||i.charCodeAt(s-2)!==95||i.charCodeAt(s-3)!==111||i.charCodeAt(s-4)!==116||i.charCodeAt(s-5)!==111||i.charCodeAt(s-6)!==114||i.charCodeAt(s-7)!==112||i.charCodeAt(s-8)!==95||i.charCodeAt(s-9)!==95)return!1;for(var e=s-10;e>=0;e--)if(i.charCodeAt(e)!==36)return!1;return!0}function Ia(i,s,e){var t=Ne(i.source,s.source);return t!==0||(t=i.originalLine-s.originalLine,t!==0)||(t=i.originalColumn-s.originalColumn,t!==0||e)||(t=i.generatedColumn-s.generatedColumn,t!==0)||(t=i.generatedLine-s.generatedLine,t!==0)?t:Ne(i.name,s.name)}ee.compareByOriginalPositions=Ia;function Na(i,s,e){var t;return t=i.originalLine-s.originalLine,t!==0||(t=i.originalColumn-s.originalColumn,t!==0||e)||(t=i.generatedColumn-s.generatedColumn,t!==0)||(t=i.generatedLine-s.generatedLine,t!==0)?t:Ne(i.name,s.name)}ee.compareByOriginalPositionsNoSource=Na;function ka(i,s,e){var t=i.generatedLine-s.generatedLine;return t!==0||(t=i.generatedColumn-s.generatedColumn,t!==0||e)||(t=Ne(i.source,s.source),t!==0)||(t=i.originalLine-s.originalLine,t!==0)||(t=i.originalColumn-s.originalColumn,t!==0)?t:Ne(i.name,s.name)}ee.compareByGeneratedPositionsDeflated=ka;function La(i,s,e){var t=i.generatedColumn-s.generatedColumn;return t!==0||e||(t=Ne(i.source,s.source),t!==0)||(t=i.originalLine-s.originalLine,t!==0)||(t=i.originalColumn-s.originalColumn,t!==0)?t:Ne(i.name,s.name)}ee.compareByGeneratedPositionsDeflatedNoLine=La;function Ne(i,s){return i===s?0:i===null?1:s===null?-1:i>s?1:-1}function Da(i,s){var e=i.generatedLine-s.generatedLine;return e!==0||(e=i.generatedColumn-s.generatedColumn,e!==0)||(e=Ne(i.source,s.source),e!==0)||(e=i.originalLine-s.originalLine,e!==0)||(e=i.originalColumn-s.originalColumn,e!==0)?e:Ne(i.name,s.name)}ee.compareByGeneratedPositionsInflated=Da;function Oa(i){return JSON.parse(i.replace(/^\)]}'[^\n]*\n/,""))}ee.parseSourceMapInput=Oa;function Ma(i,s,e){if(s=s||"",i&&(i[i.length-1]!=="/"&&s[0]!=="/"&&(i+="/"),s=i+s),e){var t=gt(e);if(!t)throw new Error("sourceMapURL could not be parsed");if(t.path){var r=t.path.lastIndexOf("/");r>=0&&(t.path=t.path.substring(0,r+1))}s=ii(Qe(t),s)}return Ms(s)}ee.computeSourceURL=Ma});var _s=he(li=>{var Fs=Ye(),Bs=Object.prototype.hasOwnProperty,$e=typeof Map<"u";function ke(){this._array=[],this._set=$e?new Map:Object.create(null)}ke.fromArray=function(s,e){for(var t=new ke,r=0,n=s.length;r<n;r++)t.add(s[r],e);return t};ke.prototype.size=function(){return $e?this._set.size:Object.getOwnPropertyNames(this._set).length};ke.prototype.add=function(s,e){var t=$e?s:Fs.toSetString(s),r=$e?this.has(s):Bs.call(this._set,t),n=this._array.length;(!r||e)&&this._array.push(s),r||($e?this._set.set(s,n):this._set[t]=n)};ke.prototype.has=function(s){if($e)return this._set.has(s);var e=Fs.toSetString(s);return Bs.call(this._set,e)};ke.prototype.indexOf=function(s){if($e){var e=this._set.get(s);if(e>=0)return e}else{var t=Fs.toSetString(s);if(Bs.call(this._set,t))return this._set[t]}throw new Error('"'+s+'" is not in the set.')};ke.prototype.at=function(s){if(s>=0&&s<this._array.length)return this._array[s];throw new Error("No element indexed by "+s)};ke.prototype.toArray=function(){return this._array.slice()};li.ArraySet=ke});var hi=he(ui=>{var ci=Ye();function Fa(i,s){var e=i.generatedLine,t=s.generatedLine,r=i.generatedColumn,n=s.generatedColumn;return t>e||t==e&&n>=r||ci.compareByGeneratedPositionsInflated(i,s)<=0}function zt(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}zt.prototype.unsortedForEach=function(s,e){this._array.forEach(s,e)};zt.prototype.add=function(s){Fa(this._last,s)?(this._last=s,this._array.push(s)):(this._sorted=!1,this._array.push(s))};zt.prototype.toArray=function(){return this._sorted||(this._array.sort(ci.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};ui.MappingList=zt});var js=he(pi=>{var xt=Os(),Q=Ye(),Wt=_s().ArraySet,Ba=hi().MappingList;function ye(i){i||(i={}),this._file=Q.getArg(i,"file",null),this._sourceRoot=Q.getArg(i,"sourceRoot",null),this._skipValidation=Q.getArg(i,"skipValidation",!1),this._ignoreInvalidMapping=Q.getArg(i,"ignoreInvalidMapping",!1),this._sources=new Wt,this._names=new Wt,this._mappings=new Ba,this._sourcesContents=null}ye.prototype._version=3;ye.fromSourceMap=function(s,e){var t=s.sourceRoot,r=new ye(Object.assign(e||{},{file:s.file,sourceRoot:t}));return s.eachMapping(function(n){var a={generated:{line:n.generatedLine,column:n.generatedColumn}};n.source!=null&&(a.source=n.source,t!=null&&(a.source=Q.relative(t,a.source)),a.original={line:n.originalLine,column:n.originalColumn},n.name!=null&&(a.name=n.name)),r.addMapping(a)}),s.sources.forEach(function(n){var a=n;t!==null&&(a=Q.relative(t,n)),r._sources.has(a)||r._sources.add(a);var o=s.sourceContentFor(n);o!=null&&r.setSourceContent(n,o)}),r};ye.prototype.addMapping=function(s){var e=Q.getArg(s,"generated"),t=Q.getArg(s,"original",null),r=Q.getArg(s,"source",null),n=Q.getArg(s,"name",null);!this._skipValidation&&this._validateMapping(e,t,r,n)===!1||(r!=null&&(r=String(r),this._sources.has(r)||this._sources.add(r)),n!=null&&(n=String(n),this._names.has(n)||this._names.add(n)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:t!=null&&t.line,originalColumn:t!=null&&t.column,source:r,name:n}))};ye.prototype.setSourceContent=function(s,e){var t=s;this._sourceRoot!=null&&(t=Q.relative(this._sourceRoot,t)),e!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Q.toSetString(t)]=e):this._sourcesContents&&(delete this._sourcesContents[Q.toSetString(t)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};ye.prototype.applySourceMap=function(s,e,t){var r=e;if(e==null){if(s.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);r=s.file}var n=this._sourceRoot;n!=null&&(r=Q.relative(n,r));var a=new Wt,o=new Wt;this._mappings.unsortedForEach(function(l){if(l.source===r&&l.originalLine!=null){var c=s.originalPositionFor({line:l.originalLine,column:l.originalColumn});c.source!=null&&(l.source=c.source,t!=null&&(l.source=Q.join(t,l.source)),n!=null&&(l.source=Q.relative(n,l.source)),l.originalLine=c.line,l.originalColumn=c.column,c.name!=null&&(l.name=c.name))}var u=l.source;u!=null&&!a.has(u)&&a.add(u);var h=l.name;h!=null&&!o.has(h)&&o.add(h)},this),this._sources=a,this._names=o,s.sources.forEach(function(l){var c=s.sourceContentFor(l);c!=null&&(t!=null&&(l=Q.join(t,l)),n!=null&&(l=Q.relative(n,l)),this.setSourceContent(l,c))},this)};ye.prototype._validateMapping=function(s,e,t,r){if(e&&typeof e.line!="number"&&typeof e.column!="number"){var n="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(n),!1;throw new Error(n)}if(!(s&&"line"in s&&"column"in s&&s.line>0&&s.column>=0&&!e&&!t&&!r)){if(s&&"line"in s&&"column"in s&&e&&"line"in e&&"column"in e&&s.line>0&&s.column>=0&&e.line>0&&e.column>=0&&t)return;var n="Invalid mapping: "+JSON.stringify({generated:s,source:t,original:e,name:r});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(n),!1;throw new Error(n)}};ye.prototype._serializeMappings=function(){for(var s=0,e=1,t=0,r=0,n=0,a=0,o="",l,c,u,h,f=this._mappings.toArray(),d=0,p=f.length;d<p;d++){if(c=f[d],l="",c.generatedLine!==e)for(s=0;c.generatedLine!==e;)l+=";",e++;else if(d>0){if(!Q.compareByGeneratedPositionsInflated(c,f[d-1]))continue;l+=","}l+=xt.encode(c.generatedColumn-s),s=c.generatedColumn,c.source!=null&&(h=this._sources.indexOf(c.source),l+=xt.encode(h-a),a=h,l+=xt.encode(c.originalLine-1-r),r=c.originalLine-1,l+=xt.encode(c.originalColumn-t),t=c.originalColumn,c.name!=null&&(u=this._names.indexOf(c.name),l+=xt.encode(u-n),n=u)),o+=l}return o};ye.prototype._generateSourcesContent=function(s,e){return s.map(function(t){if(!this._sourcesContents)return null;e!=null&&(t=Q.relative(e,t));var r=Q.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)};ye.prototype.toJSON=function(){var s={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(s.file=this._file),this._sourceRoot!=null&&(s.sourceRoot=this._sourceRoot),this._sourcesContents&&(s.sourcesContent=this._generateSourcesContent(s.sources,s.sourceRoot)),s};ye.prototype.toString=function(){return JSON.stringify(this.toJSON())};pi.SourceMapGenerator=ye});var fi=he(qe=>{qe.GREATEST_LOWER_BOUND=1;qe.LEAST_UPPER_BOUND=2;function Rs(i,s,e,t,r,n){var a=Math.floor((s-i)/2)+i,o=r(e,t[a],!0);return o===0?a:o>0?s-a>1?Rs(a,s,e,t,r,n):n==qe.LEAST_UPPER_BOUND?s<t.length?s:-1:a:a-i>1?Rs(i,a,e,t,r,n):n==qe.LEAST_UPPER_BOUND?a:i<0?-1:i}qe.search=function(s,e,t,r){if(e.length===0)return-1;var n=Rs(-1,e.length,s,e,t,r||qe.GREATEST_LOWER_BOUND);if(n<0)return-1;for(;n-1>=0&&t(e[n],e[n-1],!0)===0;)--n;return n}});var yi=he(mi=>{function _a(i){function s(r,n,a){var o=r[n];r[n]=r[a],r[a]=o}function e(r,n){return Math.round(r+Math.random()*(n-r))}function t(r,n,a,o){if(a<o){var l=e(a,o),c=a-1;s(r,l,o);for(var u=r[o],h=a;h<o;h++)n(r[h],u,!1)<=0&&(c+=1,s(r,c,h));s(r,c+1,h);var f=c+1;t(r,n,a,f-1),t(r,n,f+1,o)}}return t}function ja(i){let s=_a.toString();return new Function(`return ${s}`)()(i)}var di=new WeakMap;mi.quickSort=function(i,s,e=0){let t=di.get(s);t===void 0&&(t=ja(s),di.set(s,t)),t(i,s,e,i.length-1)}});var bi=he(Jt=>{var N=Ye(),Vs=fi(),Ze=_s().ArraySet,Ra=Os(),bt=yi().quickSort;function K(i,s){var e=i;return typeof i=="string"&&(e=N.parseSourceMapInput(i)),e.sections!=null?new be(e,s):new te(e,s)}K.fromSourceMap=function(i,s){return te.fromSourceMap(i,s)};K.prototype._version=3;K.prototype.__generatedMappings=null;Object.defineProperty(K.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});K.prototype.__originalMappings=null;Object.defineProperty(K.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});K.prototype._charIsMappingSeparator=function(s,e){var t=s.charAt(e);return t===";"||t===","};K.prototype._parseMappings=function(s,e){throw new Error("Subclasses must implement _parseMappings")};K.GENERATED_ORDER=1;K.ORIGINAL_ORDER=2;K.GREATEST_LOWER_BOUND=1;K.LEAST_UPPER_BOUND=2;K.prototype.eachMapping=function(s,e,t){var r=e||null,n=t||K.GENERATED_ORDER,a;switch(n){case K.GENERATED_ORDER:a=this._generatedMappings;break;case K.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var o=this.sourceRoot,l=s.bind(r),c=this._names,u=this._sources,h=this._sourceMapURL,f=0,d=a.length;f<d;f++){var p=a[f],g=p.source===null?null:u.at(p.source);g!==null&&(g=N.computeSourceURL(o,g,h)),l({source:g,generatedLine:p.generatedLine,generatedColumn:p.generatedColumn,originalLine:p.originalLine,originalColumn:p.originalColumn,name:p.name===null?null:c.at(p.name)})}};K.prototype.allGeneratedPositionsFor=function(s){var e=N.getArg(s,"line"),t={source:N.getArg(s,"source"),originalLine:e,originalColumn:N.getArg(s,"column",0)};if(t.source=this._findSourceIndex(t.source),t.source<0)return[];var r=[],n=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",N.compareByOriginalPositions,Vs.LEAST_UPPER_BOUND);if(n>=0){var a=this._originalMappings[n];if(s.column===void 0)for(var o=a.originalLine;a&&a.originalLine===o;)r.push({line:N.getArg(a,"generatedLine",null),column:N.getArg(a,"generatedColumn",null),lastColumn:N.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++n];else for(var l=a.originalColumn;a&&a.originalLine===e&&a.originalColumn==l;)r.push({line:N.getArg(a,"generatedLine",null),column:N.getArg(a,"generatedColumn",null),lastColumn:N.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++n]}return r};Jt.SourceMapConsumer=K;function te(i,s){var e=i;typeof i=="string"&&(e=N.parseSourceMapInput(i));var t=N.getArg(e,"version"),r=N.getArg(e,"sources"),n=N.getArg(e,"names",[]),a=N.getArg(e,"sourceRoot",null),o=N.getArg(e,"sourcesContent",null),l=N.getArg(e,"mappings"),c=N.getArg(e,"file",null);if(t!=this._version)throw new Error("Unsupported version: "+t);a&&(a=N.normalize(a)),r=r.map(String).map(N.normalize).map(function(u){return a&&N.isAbsolute(a)&&N.isAbsolute(u)?N.relative(a,u):u}),this._names=Ze.fromArray(n.map(String),!0),this._sources=Ze.fromArray(r,!0),this._absoluteSources=this._sources.toArray().map(function(u){return N.computeSourceURL(a,u,s)}),this.sourceRoot=a,this.sourcesContent=o,this._mappings=l,this._sourceMapURL=s,this.file=c}te.prototype=Object.create(K.prototype);te.prototype.consumer=K;te.prototype._findSourceIndex=function(i){var s=i;if(this.sourceRoot!=null&&(s=N.relative(this.sourceRoot,s)),this._sources.has(s))return this._sources.indexOf(s);var e;for(e=0;e<this._absoluteSources.length;++e)if(this._absoluteSources[e]==i)return e;return-1};te.fromSourceMap=function(s,e){var t=Object.create(te.prototype),r=t._names=Ze.fromArray(s._names.toArray(),!0),n=t._sources=Ze.fromArray(s._sources.toArray(),!0);t.sourceRoot=s._sourceRoot,t.sourcesContent=s._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=s._file,t._sourceMapURL=e,t._absoluteSources=t._sources.toArray().map(function(d){return N.computeSourceURL(t.sourceRoot,d,e)});for(var a=s._mappings.toArray().slice(),o=t.__generatedMappings=[],l=t.__originalMappings=[],c=0,u=a.length;c<u;c++){var h=a[c],f=new xi;f.generatedLine=h.generatedLine,f.generatedColumn=h.generatedColumn,h.source&&(f.source=n.indexOf(h.source),f.originalLine=h.originalLine,f.originalColumn=h.originalColumn,h.name&&(f.name=r.indexOf(h.name)),l.push(f)),o.push(f)}return bt(t.__originalMappings,N.compareByOriginalPositions),t};te.prototype._version=3;Object.defineProperty(te.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function xi(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Us=N.compareByGeneratedPositionsDeflatedNoLine;function gi(i,s){let e=i.length,t=i.length-s;if(!(t<=1))if(t==2){let r=i[s],n=i[s+1];Us(r,n)>0&&(i[s]=n,i[s+1]=r)}else if(t<20)for(let r=s;r<e;r++)for(let n=r;n>s;n--){let a=i[n-1],o=i[n];if(Us(a,o)<=0)break;i[n-1]=o,i[n]=a}else bt(i,Us,s)}te.prototype._parseMappings=function(s,e){var t=1,r=0,n=0,a=0,o=0,l=0,c=s.length,u=0,h={},f={},d=[],p=[],g,m,b,P,k;let T=0;for(;u<c;)if(s.charAt(u)===";")t++,u++,r=0,gi(p,T),T=p.length;else if(s.charAt(u)===",")u++;else{for(g=new xi,g.generatedLine=t,P=u;P<c&&!this._charIsMappingSeparator(s,P);P++);for(m=s.slice(u,P),b=[];u<P;)Ra.decode(s,u,f),k=f.value,u=f.rest,b.push(k);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");if(g.generatedColumn=r+b[0],r=g.generatedColumn,b.length>1&&(g.source=o+b[1],o+=b[1],g.originalLine=n+b[2],n=g.originalLine,g.originalLine+=1,g.originalColumn=a+b[3],a=g.originalColumn,b.length>4&&(g.name=l+b[4],l+=b[4])),p.push(g),typeof g.originalLine=="number"){let A=g.source;for(;d.length<=A;)d.push(null);d[A]===null&&(d[A]=[]),d[A].push(g)}}gi(p,T),this.__generatedMappings=p;for(var E=0;E<d.length;E++)d[E]!=null&&bt(d[E],N.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...d)};te.prototype._findMapping=function(s,e,t,r,n,a){if(s[t]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+s[t]);if(s[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+s[r]);return Vs.search(s,e,n,a)};te.prototype.computeColumnSpans=function(){for(var s=0;s<this._generatedMappings.length;++s){var e=this._generatedMappings[s];if(s+1<this._generatedMappings.length){var t=this._generatedMappings[s+1];if(e.generatedLine===t.generatedLine){e.lastGeneratedColumn=t.generatedColumn-1;continue}}e.lastGeneratedColumn=1/0}};te.prototype.originalPositionFor=function(s){var e={generatedLine:N.getArg(s,"line"),generatedColumn:N.getArg(s,"column")},t=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",N.compareByGeneratedPositionsDeflated,N.getArg(s,"bias",K.GREATEST_LOWER_BOUND));if(t>=0){var r=this._generatedMappings[t];if(r.generatedLine===e.generatedLine){var n=N.getArg(r,"source",null);n!==null&&(n=this._sources.at(n),n=N.computeSourceURL(this.sourceRoot,n,this._sourceMapURL));var a=N.getArg(r,"name",null);return a!==null&&(a=this._names.at(a)),{source:n,line:N.getArg(r,"originalLine",null),column:N.getArg(r,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};te.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(s){return s==null}):!1};te.prototype.sourceContentFor=function(s,e){if(!this.sourcesContent)return null;var t=this._findSourceIndex(s);if(t>=0)return this.sourcesContent[t];var r=s;this.sourceRoot!=null&&(r=N.relative(this.sourceRoot,r));var n;if(this.sourceRoot!=null&&(n=N.urlParse(this.sourceRoot))){var a=r.replace(/^file:\/\//,"");if(n.scheme=="file"&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!n.path||n.path=="/")&&this._sources.has("/"+r))return this.sourcesContent[this._sources.indexOf("/"+r)]}if(e)return null;throw new Error('"'+r+'" is not in the SourceMap.')};te.prototype.generatedPositionFor=function(s){var e=N.getArg(s,"source");if(e=this._findSourceIndex(e),e<0)return{line:null,column:null,lastColumn:null};var t={source:e,originalLine:N.getArg(s,"line"),originalColumn:N.getArg(s,"column")},r=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",N.compareByOriginalPositions,N.getArg(s,"bias",K.GREATEST_LOWER_BOUND));if(r>=0){var n=this._originalMappings[r];if(n.source===t.source)return{line:N.getArg(n,"generatedLine",null),column:N.getArg(n,"generatedColumn",null),lastColumn:N.getArg(n,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Jt.BasicSourceMapConsumer=te;function be(i,s){var e=i;typeof i=="string"&&(e=N.parseSourceMapInput(i));var t=N.getArg(e,"version"),r=N.getArg(e,"sections");if(t!=this._version)throw new Error("Unsupported version: "+t);this._sources=new Ze,this._names=new Ze;var n={line:-1,column:0};this._sections=r.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var o=N.getArg(a,"offset"),l=N.getArg(o,"line"),c=N.getArg(o,"column");if(l<n.line||l===n.line&&c<n.column)throw new Error("Section offsets must be ordered and non-overlapping.");return n=o,{generatedOffset:{generatedLine:l+1,generatedColumn:c+1},consumer:new K(N.getArg(a,"map"),s)}})}be.prototype=Object.create(K.prototype);be.prototype.constructor=K;be.prototype._version=3;Object.defineProperty(be.prototype,"sources",{get:function(){for(var i=[],s=0;s<this._sections.length;s++)for(var e=0;e<this._sections[s].consumer.sources.length;e++)i.push(this._sections[s].consumer.sources[e]);return i}});be.prototype.originalPositionFor=function(s){var e={generatedLine:N.getArg(s,"line"),generatedColumn:N.getArg(s,"column")},t=Vs.search(e,this._sections,function(n,a){var o=n.generatedLine-a.generatedOffset.generatedLine;return o||n.generatedColumn-a.generatedOffset.generatedColumn}),r=this._sections[t];return r?r.consumer.originalPositionFor({line:e.generatedLine-(r.generatedOffset.generatedLine-1),column:e.generatedColumn-(r.generatedOffset.generatedLine===e.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:s.bias}):{source:null,line:null,column:null,name:null}};be.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(s){return s.consumer.hasContentsOfAllSources()})};be.prototype.sourceContentFor=function(s,e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t],n=r.consumer.sourceContentFor(s,!0);if(n||n==="")return n}if(e)return null;throw new Error('"'+s+'" is not in the SourceMap.')};be.prototype.generatedPositionFor=function(s){for(var e=0;e<this._sections.length;e++){var t=this._sections[e];if(t.consumer._findSourceIndex(N.getArg(s,"source"))!==-1){var r=t.consumer.generatedPositionFor(s);if(r){var n={line:r.line+(t.generatedOffset.generatedLine-1),column:r.column+(t.generatedOffset.generatedLine===r.line?t.generatedOffset.generatedColumn-1:0)};return n}}}return{line:null,column:null}};be.prototype._parseMappings=function(s,e){this.__generatedMappings=[],this.__originalMappings=[];for(var t=0;t<this._sections.length;t++)for(var r=this._sections[t],n=r.consumer._generatedMappings,a=0;a<n.length;a++){var o=n[a],l=r.consumer._sources.at(o.source);l!==null&&(l=N.computeSourceURL(r.consumer.sourceRoot,l,this._sourceMapURL)),this._sources.add(l),l=this._sources.indexOf(l);var c=null;o.name&&(c=r.consumer._names.at(o.name),this._names.add(c),c=this._names.indexOf(c));var u={source:l,generatedLine:o.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(r.generatedOffset.generatedLine===o.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:c};this.__generatedMappings.push(u),typeof u.originalLine=="number"&&this.__originalMappings.push(u)}bt(this.__generatedMappings,N.compareByGeneratedPositionsDeflated),bt(this.__originalMappings,N.compareByOriginalPositions)};Jt.IndexedSourceMapConsumer=be});var Pi=he(Ti=>{var Ua=js().SourceMapGenerator,Kt=Ye(),Va=/(\r?\n)/,$a=10,et="$$$isSourceNode$$$";function pe(i,s,e,t,r){this.children=[],this.sourceContents={},this.line=i??null,this.column=s??null,this.source=e??null,this.name=r??null,this[et]=!0,t!=null&&this.add(t)}pe.fromStringWithSourceMap=function(s,e,t){var r=new pe,n=s.split(Va),a=0,o=function(){var f=p(),d=p()||"";return f+d;function p(){return a<n.length?n[a++]:void 0}},l=1,c=0,u=null;return e.eachMapping(function(f){if(u!==null)if(l<f.generatedLine)h(u,o()),l++,c=0;else{var d=n[a]||"",p=d.substr(0,f.generatedColumn-c);n[a]=d.substr(f.generatedColumn-c),c=f.generatedColumn,h(u,p),u=f;return}for(;l<f.generatedLine;)r.add(o()),l++;if(c<f.generatedColumn){var d=n[a]||"";r.add(d.substr(0,f.generatedColumn)),n[a]=d.substr(f.generatedColumn),c=f.generatedColumn}u=f},this),a<n.length&&(u&&h(u,o()),r.add(n.splice(a).join(""))),e.sources.forEach(function(f){var d=e.sourceContentFor(f);d!=null&&(t!=null&&(f=Kt.join(t,f)),r.setSourceContent(f,d))}),r;function h(f,d){if(f===null||f.source===void 0)r.add(d);else{var p=t?Kt.join(t,f.source):f.source;r.add(new pe(f.originalLine,f.originalColumn,p,d,f.name))}}};pe.prototype.add=function(s){if(Array.isArray(s))s.forEach(function(e){this.add(e)},this);else if(s[et]||typeof s=="string")s&&this.children.push(s);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+s);return this};pe.prototype.prepend=function(s){if(Array.isArray(s))for(var e=s.length-1;e>=0;e--)this.prepend(s[e]);else if(s[et]||typeof s=="string")this.children.unshift(s);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+s);return this};pe.prototype.walk=function(s){for(var e,t=0,r=this.children.length;t<r;t++)e=this.children[t],e[et]?e.walk(s):e!==""&&s(e,{source:this.source,line:this.line,column:this.column,name:this.name})};pe.prototype.join=function(s){var e,t,r=this.children.length;if(r>0){for(e=[],t=0;t<r-1;t++)e.push(this.children[t]),e.push(s);e.push(this.children[t]),this.children=e}return this};pe.prototype.replaceRight=function(s,e){var t=this.children[this.children.length-1];return t[et]?t.replaceRight(s,e):typeof t=="string"?this.children[this.children.length-1]=t.replace(s,e):this.children.push("".replace(s,e)),this};pe.prototype.setSourceContent=function(s,e){this.sourceContents[Kt.toSetString(s)]=e};pe.prototype.walkSourceContents=function(s){for(var e=0,t=this.children.length;e<t;e++)this.children[e][et]&&this.children[e].walkSourceContents(s);for(var r=Object.keys(this.sourceContents),e=0,t=r.length;e<t;e++)s(Kt.fromSetString(r[e]),this.sourceContents[r[e]])};pe.prototype.toString=function(){var s="";return this.walk(function(e){s+=e}),s};pe.prototype.toStringWithSourceMap=function(s){var e={code:"",line:1,column:0},t=new Ua(s),r=!1,n=null,a=null,o=null,l=null;return this.walk(function(c,u){e.code+=c,u.source!==null&&u.line!==null&&u.column!==null?((n!==u.source||a!==u.line||o!==u.column||l!==u.name)&&t.addMapping({source:u.source,original:{line:u.line,column:u.column},generated:{line:e.line,column:e.column},name:u.name}),n=u.source,a=u.line,o=u.column,l=u.name,r=!0):r&&(t.addMapping({generated:{line:e.line,column:e.column}}),n=null,r=!1);for(var h=0,f=c.length;h<f;h++)c.charCodeAt(h)===$a?(e.line++,e.column=0,h+1===f?(n=null,r=!1):r&&t.addMapping({source:u.source,original:{line:u.line,column:u.column},generated:{line:e.line,column:e.column},name:u.name})):e.column++}),this.walkSourceContents(function(c,u){t.setSourceContent(c,u)}),{code:e.code,map:t}};Ti.SourceNode=pe});var Si=he(Ht=>{Ht.SourceMapGenerator=js().SourceMapGenerator;Ht.SourceMapConsumer=bi().SourceMapConsumer;Ht.SourceNode=Pi().SourceNode});var Zi=he(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});function qa(i,s){if(i==null)return{};var e={};for(var t in i)if({}.hasOwnProperty.call(i,t)){if(s.includes(t))continue;e[t]=i[t]}return e}var ve=class{constructor(s,e,t){this.line=void 0,this.column=void 0,this.index=void 0,this.line=s,this.column=e,this.index=t}},nt=class{constructor(s,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=s,this.end=e}};function ne(i,s){let{line:e,column:t,index:r}=i;return new ve(e,t+s,r+s)}var Ei="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",za={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Ei},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Ei}},Ai={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},Qt=i=>i.type==="UpdateExpression"?Ai.UpdateExpression[`${i.prefix}`]:Ai[i.type],Wa={AccessorIsGenerator:({kind:i})=>`A ${i}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:i})=>`Missing initializer in ${i} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:i})=>`\`${i}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:i})=>`'import.${i}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:i,exportName:s})=>`A string literal cannot be used as an exported binding without \`from\`.
2
3
  - Did you mean \`export { '${i}' as '${s}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:i})=>`'${i==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:i})=>`Unsyntactic ${i==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:i})=>`A string literal cannot be used as an imported binding.
3
4
  - Did you mean \`import { "${i}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:i})=>`Expected number in radix ${i}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:i})=>`Escape sequence in keyword ${i}.`,InvalidIdentifier:({identifierName:i})=>`Invalid identifier ${i}.`,InvalidLhs:({ancestor:i})=>`Invalid left-hand side in ${Qt(i)}.`,InvalidLhsBinding:({ancestor:i})=>`Binding invalid left-hand side in ${Qt(i)}.`,InvalidLhsOptionalChaining:({ancestor:i})=>`Invalid optional chaining in the left-hand side of ${Qt(i)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:i})=>`Unexpected character '${i}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:i})=>`Private name #${i} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:i})=>`Label '${i}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:i})=>`This experimental syntax requires enabling the parser plugin: ${i.map(s=>JSON.stringify(s)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:i})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${i.map(s=>JSON.stringify(s)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:i})=>`Duplicate key "${i}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:i})=>`An export name cannot include a lone surrogate, found '\\u${i.toString(16)}'.`,ModuleExportUndefined:({localName:i})=>`Export '${i}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:i})=>`Private names are only allowed in property accesses (\`obj.#${i}\`) or in \`in\` expressions (\`#${i} in obj\`).`,PrivateNameRedeclaration:({identifierName:i})=>`Duplicate private name #${i}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:i})=>`Unexpected keyword '${i}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:i})=>`Unexpected reserved word '${i}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:i,unexpected:s})=>`Unexpected token${s?` '${s}'.`:""}${i?`, expected "${i}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:i,onlyValidPropertyName:s})=>`The only valid meta property for ${i} is ${i}.${s}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:i})=>`Identifier '${i}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Ja={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:i})=>`Assigning to '${i}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:i})=>`Binding '${i}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},Ka=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),Ha=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:i})=>`Invalid topic token ${i}. In order to use ${i} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${i}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:i})=>`Hack-style pipe body cannot be an unparenthesized ${Qt({type:i})}; please wrap it in parentheses.`},{PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'}),Xa=["message"];function wi(i,s,e){Object.defineProperty(i,s,{enumerable:!1,configurable:!0,value:e})}function Ga({toMessage:i,code:s,reasonCode:e,syntaxPlugin:t}){let r=e==="MissingPlugin"||e==="MissingOneOfPlugins";{let n={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};n[e]&&(e=n[e])}return function n(a,o){let l=new SyntaxError;return l.code=s,l.reasonCode=e,l.loc=a,l.pos=a.index,l.syntaxPlugin=t,r&&(l.missingPlugin=o.missingPlugin),wi(l,"clone",function(u={}){var h;let{line:f,column:d,index:p}=(h=u.loc)!=null?h:a;return n(new ve(f,d,p),Object.assign({},o,u.details))}),wi(l,"details",o),Object.defineProperty(l,"message",{configurable:!0,get(){let c=`${i(o)} (${a.line}:${a.column})`;return this.message=c,c},set(c){Object.defineProperty(this,"message",{value:c,writable:!0})}}),l}}function Me(i,s){if(Array.isArray(i))return t=>Me(t,i[0]);let e={};for(let t of Object.keys(i)){let r=i[t],n=typeof r=="string"?{message:()=>r}:typeof r=="function"?{message:r}:r,{message:a}=n,o=qa(n,Xa),l=typeof a=="string"?()=>a:a;e[t]=Ga(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:t,toMessage:l},s?{syntaxPlugin:s}:{},o))}return e}var y=Object.assign({},Me(za),Me(Wa),Me(Ja),Me`pipelineOperator`(Ha));function Qa(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function Ya(i){let s=Qa();if(i==null)return s;if(i.annexB!=null&&i.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let e of Object.keys(s))i[e]!=null&&(s[e]=i[e]);if(s.startLine===1)i.startIndex==null&&s.startColumn>0?s.startIndex=s.startColumn:i.startColumn==null&&s.startIndex>0&&(s.startColumn=s.startIndex);else if((i.startColumn==null||i.startIndex==null)&&i.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");return s}var{defineProperty:Za}=Object,vi=(i,s)=>{i&&Za(i,s,{enumerable:!1,value:i[s]})};function Tt(i){return vi(i.loc.start,"index"),vi(i.loc.end,"index"),i}var eo=i=>class extends i{parse(){let e=Tt(super.parse());return this.optionFlags&128&&(e.tokens=e.tokens.map(Tt)),e}parseRegExpLiteral({pattern:e,flags:t}){let r=null;try{r=new RegExp(e,t)}catch{}let n=this.estreeParseLiteral(r);return n.regex={pattern:e,flags:t},n}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}let r=this.estreeParseLiteral(t);return r.bigint=String(r.value||e),r}parseDecimalLiteral(e){let r=this.estreeParseLiteral(null);return r.decimal=String(r.value||e),r}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){let t=e.value;delete e.value,t.type="Literal",t.raw=t.extra.raw,t.value=t.extra.expressionValue;let r=e;return r.type="ExpressionStatement",r.expression=t,r.directive=t.extra.rawValue,delete t.extra,r}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((t=e.expression.extra)!=null&&t.parenthesized)}parseBlockBody(e,t,r,n,a){super.parseBlockBody(e,t,r,n,a);let o=e.directives.map(l=>this.directiveToStmt(l));e.body=o.concat(e.body),delete e.directives}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let t=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=t,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?e.type==="PrivateIdentifier":super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){let r=super.parseLiteral(e,t);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(e,t,r=!1){super.parseFunctionBody(e,t,r),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,t,r,n,a,o,l=!1){let c=this.startNode();c.kind=e.kind,c=super.parseMethod(c,t,r,n,a,o,l),c.type="FunctionExpression",delete c.kind,e.value=c;let{typeParameters:u}=e;return u&&(delete e.typeParameters,c.typeParameters=u,this.resetStartLocationFromNode(c,u)),o==="ClassPrivateMethod"&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}nameIsConstructor(e){return e.type==="Literal"?e.value==="constructor":super.nameIsConstructor(e)}parseClassProperty(...e){let t=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition"),t}parseClassPrivateProperty(...e){let t=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition",t.computed=!1),t}parseObjectMethod(e,t,r,n,a){let o=super.parseObjectMethod(e,t,r,n,a);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(e,t,r,n){let a=super.parseObjectProperty(e,t,r,n);return a&&(a.kind="init",a.type="Property"),a}isValidLVal(e,t,r){return e==="Property"?"value":super.isValidLVal(e,t,r)}isAssignable(e,t){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(e!=null&&this.isObjectProperty(e)){let{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,r){e.type==="Property"&&(e.kind==="get"||e.kind==="set")?this.raise(y.PatternHasAccessor,e.key):e.type==="Property"&&e.method?this.raise(y.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,t,r)}finishCallExpression(e,t){let r=super.finishCallExpression(e,t);if(r.callee.type==="Import"){var n,a;r.type="ImportExpression",r.source=r.arguments[0],r.options=(n=r.arguments[1])!=null?n:null,r.attributes=(a=r.arguments[1])!=null?a:null,delete r.arguments,delete r.callee}return r}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,t){let r=this.state.lastTokStartLoc,n=super.parseExport(e,t);switch(n.type){case"ExportAllDeclaration":n.exported=null;break;case"ExportNamedDeclaration":n.specifiers.length===1&&n.specifiers[0].type==="ExportNamespaceSpecifier"&&(n.type="ExportAllDeclaration",n.exported=n.specifiers[0].exported,delete n.specifiers);case"ExportDefaultDeclaration":{var a;let{declaration:o}=n;o?.type==="ClassDeclaration"&&((a=o.decorators)==null?void 0:a.length)>0&&o.start===n.start&&this.resetStartLocation(n,r)}break}return n}parseSubscript(e,t,r,n){let a=super.parseSubscript(e,t,r,n);if(n.optionalChainMember){if((a.type==="OptionalMemberExpression"||a.type==="OptionalCallExpression")&&(a.type=a.type.substring(8)),n.stop){let o=this.startNodeAtNode(a);return o.expression=a,this.finishNode(o,"ChainExpression")}}else(a.type==="MemberExpression"||a.type==="CallExpression")&&(a.optional=!1);return a}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.type==="Property"&&(e.method||e.kind==="get"||e.kind==="set")}finishNodeAt(e,t,r){return Tt(super.finishNodeAt(e,t,r))}resetStartLocation(e,t){super.resetStartLocation(e,t),Tt(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),Tt(e)}},Je=class{constructor(s,e){this.token=void 0,this.preserveSpace=void 0,this.token=s,this.preserveSpace=!!e}},R={brace:new Je("{"),j_oTag:new Je("<tag"),j_cTag:new Je("</tag"),j_expr:new Je("<tag>...</tag>",!0)};R.template=new Je("`",!0);var _=!0,C=!0,$s=!0,Pt=!0,_e=!0,to=!0,es=class{constructor(s,e={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=s,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop!=null?e.binop:null,this.updateContext=null}},fr=new Map;function j(i,s={}){s.keyword=i;let e=D(i,s);return fr.set(i,e),e}function ie(i,s){return D(i,{beforeExpr:_,binop:s})}var At=-1,De=[],dr=[],mr=[],yr=[],gr=[],xr=[];function D(i,s={}){var e,t,r,n;return++At,dr.push(i),mr.push((e=s.binop)!=null?e:-1),yr.push((t=s.beforeExpr)!=null?t:!1),gr.push((r=s.startsExpr)!=null?r:!1),xr.push((n=s.prefix)!=null?n:!1),De.push(new es(i,s)),At}function B(i,s={}){var e,t,r,n;return++At,fr.set(i,At),dr.push(i),mr.push((e=s.binop)!=null?e:-1),yr.push((t=s.beforeExpr)!=null?t:!1),gr.push((r=s.startsExpr)!=null?r:!1),xr.push((n=s.prefix)!=null?n:!1),De.push(new es("name",s)),At}var so={bracketL:D("[",{beforeExpr:_,startsExpr:C}),bracketHashL:D("#[",{beforeExpr:_,startsExpr:C}),bracketBarL:D("[|",{beforeExpr:_,startsExpr:C}),bracketR:D("]"),bracketBarR:D("|]"),braceL:D("{",{beforeExpr:_,startsExpr:C}),braceBarL:D("{|",{beforeExpr:_,startsExpr:C}),braceHashL:D("#{",{beforeExpr:_,startsExpr:C}),braceR:D("}"),braceBarR:D("|}"),parenL:D("(",{beforeExpr:_,startsExpr:C}),parenR:D(")"),comma:D(",",{beforeExpr:_}),semi:D(";",{beforeExpr:_}),colon:D(":",{beforeExpr:_}),doubleColon:D("::",{beforeExpr:_}),dot:D("."),question:D("?",{beforeExpr:_}),questionDot:D("?."),arrow:D("=>",{beforeExpr:_}),template:D("template"),ellipsis:D("...",{beforeExpr:_}),backQuote:D("`",{startsExpr:C}),dollarBraceL:D("${",{beforeExpr:_,startsExpr:C}),templateTail:D("...`",{startsExpr:C}),templateNonTail:D("...${",{beforeExpr:_,startsExpr:C}),at:D("@"),hash:D("#",{startsExpr:C}),interpreterDirective:D("#!..."),eq:D("=",{beforeExpr:_,isAssign:Pt}),assign:D("_=",{beforeExpr:_,isAssign:Pt}),slashAssign:D("_=",{beforeExpr:_,isAssign:Pt}),xorAssign:D("_=",{beforeExpr:_,isAssign:Pt}),moduloAssign:D("_=",{beforeExpr:_,isAssign:Pt}),incDec:D("++/--",{prefix:_e,postfix:to,startsExpr:C}),bang:D("!",{beforeExpr:_,prefix:_e,startsExpr:C}),tilde:D("~",{beforeExpr:_,prefix:_e,startsExpr:C}),doubleCaret:D("^^",{startsExpr:C}),doubleAt:D("@@",{startsExpr:C}),pipeline:ie("|>",0),nullishCoalescing:ie("??",1),logicalOR:ie("||",1),logicalAND:ie("&&",2),bitwiseOR:ie("|",3),bitwiseXOR:ie("^",4),bitwiseAND:ie("&",5),equality:ie("==/!=/===/!==",6),lt:ie("</>/<=/>=",7),gt:ie("</>/<=/>=",7),relational:ie("</>/<=/>=",7),bitShift:ie("<</>>/>>>",8),bitShiftL:ie("<</>>/>>>",8),bitShiftR:ie("<</>>/>>>",8),plusMin:D("+/-",{beforeExpr:_,binop:9,prefix:_e,startsExpr:C}),modulo:D("%",{binop:10,startsExpr:C}),star:D("*",{binop:10}),slash:ie("/",10),exponent:D("**",{beforeExpr:_,binop:11,rightAssociative:!0}),_in:j("in",{beforeExpr:_,binop:7}),_instanceof:j("instanceof",{beforeExpr:_,binop:7}),_break:j("break"),_case:j("case",{beforeExpr:_}),_catch:j("catch"),_continue:j("continue"),_debugger:j("debugger"),_default:j("default",{beforeExpr:_}),_else:j("else",{beforeExpr:_}),_finally:j("finally"),_function:j("function",{startsExpr:C}),_if:j("if"),_return:j("return",{beforeExpr:_}),_switch:j("switch"),_throw:j("throw",{beforeExpr:_,prefix:_e,startsExpr:C}),_try:j("try"),_var:j("var"),_const:j("const"),_with:j("with"),_new:j("new",{beforeExpr:_,startsExpr:C}),_this:j("this",{startsExpr:C}),_super:j("super",{startsExpr:C}),_class:j("class",{startsExpr:C}),_extends:j("extends",{beforeExpr:_}),_export:j("export"),_import:j("import",{startsExpr:C}),_null:j("null",{startsExpr:C}),_true:j("true",{startsExpr:C}),_false:j("false",{startsExpr:C}),_typeof:j("typeof",{beforeExpr:_,prefix:_e,startsExpr:C}),_void:j("void",{beforeExpr:_,prefix:_e,startsExpr:C}),_delete:j("delete",{beforeExpr:_,prefix:_e,startsExpr:C}),_do:j("do",{isLoop:$s,beforeExpr:_}),_for:j("for",{isLoop:$s}),_while:j("while",{isLoop:$s}),_as:B("as",{startsExpr:C}),_assert:B("assert",{startsExpr:C}),_async:B("async",{startsExpr:C}),_await:B("await",{startsExpr:C}),_defer:B("defer",{startsExpr:C}),_from:B("from",{startsExpr:C}),_get:B("get",{startsExpr:C}),_let:B("let",{startsExpr:C}),_meta:B("meta",{startsExpr:C}),_of:B("of",{startsExpr:C}),_sent:B("sent",{startsExpr:C}),_set:B("set",{startsExpr:C}),_source:B("source",{startsExpr:C}),_static:B("static",{startsExpr:C}),_using:B("using",{startsExpr:C}),_yield:B("yield",{startsExpr:C}),_asserts:B("asserts",{startsExpr:C}),_checks:B("checks",{startsExpr:C}),_exports:B("exports",{startsExpr:C}),_global:B("global",{startsExpr:C}),_implements:B("implements",{startsExpr:C}),_intrinsic:B("intrinsic",{startsExpr:C}),_infer:B("infer",{startsExpr:C}),_is:B("is",{startsExpr:C}),_mixins:B("mixins",{startsExpr:C}),_proto:B("proto",{startsExpr:C}),_require:B("require",{startsExpr:C}),_satisfies:B("satisfies",{startsExpr:C}),_keyof:B("keyof",{startsExpr:C}),_readonly:B("readonly",{startsExpr:C}),_unique:B("unique",{startsExpr:C}),_abstract:B("abstract",{startsExpr:C}),_declare:B("declare",{startsExpr:C}),_enum:B("enum",{startsExpr:C}),_module:B("module",{startsExpr:C}),_namespace:B("namespace",{startsExpr:C}),_interface:B("interface",{startsExpr:C}),_type:B("type",{startsExpr:C}),_opaque:B("opaque",{startsExpr:C}),name:D("name",{startsExpr:C}),placeholder:D("%%",{startsExpr:!0}),string:D("string",{startsExpr:C}),num:D("num",{startsExpr:C}),bigint:D("bigint",{startsExpr:C}),decimal:D("decimal",{startsExpr:C}),regexp:D("regexp",{startsExpr:C}),privateName:D("#name",{startsExpr:C}),eof:D("eof"),jsxName:D("jsxName"),jsxText:D("jsxText",{beforeExpr:!0}),jsxTagStart:D("jsxTagStart",{startsExpr:!0}),jsxTagEnd:D("jsxTagEnd")};function U(i){return i>=93&&i<=133}function ro(i){return i<=92}function Te(i){return i>=58&&i<=133}function ji(i){return i>=58&&i<=137}function io(i){return yr[i]}function Ks(i){return gr[i]}function no(i){return i>=29&&i<=33}function Ci(i){return i>=129&&i<=131}function ao(i){return i>=90&&i<=92}function br(i){return i>=58&&i<=92}function oo(i){return i>=39&&i<=59}function lo(i){return i===34}function co(i){return xr[i]}function uo(i){return i>=121&&i<=123}function ho(i){return i>=124&&i<=130}function Re(i){return dr[i]}function Yt(i){return mr[i]}function po(i){return i===57}function ts(i){return i>=24&&i<=25}function Le(i){return De[i]}De[8].updateContext=i=>{i.pop()},De[5].updateContext=De[7].updateContext=De[23].updateContext=i=>{i.push(R.brace)},De[22].updateContext=i=>{i[i.length-1]===R.template?i.pop():i.push(R.template)},De[143].updateContext=i=>{i.push(R.j_expr,R.j_oTag)};var Tr="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Ri="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",fo=new RegExp("["+Tr+"]"),mo=new RegExp("["+Tr+Ri+"]");Tr=Ri=null;var Ui=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],yo=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];function Hs(i,s){let e=65536;for(let t=0,r=s.length;t<r;t+=2){if(e+=s[t],e>i)return!1;if(e+=s[t+1],e>=i)return!0}return!1}function Oe(i){return i<65?i===36:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&fo.test(String.fromCharCode(i)):Hs(i,Ui)}function st(i){return i<48?i===36:i<58?!0:i<65?!1:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&mo.test(String.fromCharCode(i)):Hs(i,Ui)||Hs(i,yo)}var Pr={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},go=new Set(Pr.keyword),xo=new Set(Pr.strict),bo=new Set(Pr.strictBind);function Vi(i,s){return s&&i==="await"||i==="enum"}function $i(i,s){return Vi(i,s)||xo.has(i)}function qi(i){return bo.has(i)}function zi(i,s){return $i(i,s)||qi(i)}function To(i){return go.has(i)}function Po(i,s,e){return i===64&&s===64&&Oe(e)}var So=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Eo(i){return So.has(i)}var wt=class{constructor(s){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=s}},vt=class{constructor(s,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=s,this.inModule=e}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let s=this.currentThisScopeFlags();return(s&64)>0&&(s&2)===0}get inStaticBlock(){for(let s=this.scopeStack.length-1;;s--){let{flags:e}=this.scopeStack[s];if(e&128)return!0;if(e&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(s){return new wt(s)}enter(s){this.scopeStack.push(this.createScope(s))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(s){return!!(s.flags&130||!this.parser.inModule&&s.flags&1)}declareName(s,e,t){let r=this.currentScope();if(e&8||e&16){this.checkRedeclarationInScope(r,s,e,t);let n=r.names.get(s)||0;e&16?n=n|4:(r.firstLexicalName||(r.firstLexicalName=s),n=n|2),r.names.set(s,n),e&8&&this.maybeExportDefined(r,s)}else if(e&4)for(let n=this.scopeStack.length-1;n>=0&&(r=this.scopeStack[n],this.checkRedeclarationInScope(r,s,e,t),r.names.set(s,(r.names.get(s)||0)|1),this.maybeExportDefined(r,s),!(r.flags&387));--n);this.parser.inModule&&r.flags&1&&this.undefinedExports.delete(s)}maybeExportDefined(s,e){this.parser.inModule&&s.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(s,e,t,r){this.isRedeclaredInScope(s,e,t)&&this.parser.raise(y.VarRedeclaration,r,{identifierName:e})}isRedeclaredInScope(s,e,t){if(!(t&1))return!1;if(t&8)return s.names.has(e);let r=s.names.get(e);return t&16?(r&2)>0||!this.treatFunctionsAsVarInScope(s)&&(r&1)>0:(r&2)>0&&!(s.flags&8&&s.firstLexicalName===e)||!this.treatFunctionsAsVarInScope(s)&&(r&4)>0}checkLocalExport(s){let{name:e}=s;this.scopeStack[0].names.has(e)||this.undefinedExports.set(e,s.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let s=this.scopeStack.length-1;;s--){let{flags:e}=this.scopeStack[s];if(e&387)return e}}currentThisScopeFlags(){for(let s=this.scopeStack.length-1;;s--){let{flags:e}=this.scopeStack[s];if(e&451&&!(e&4))return e}}},Xs=class extends wt{constructor(...s){super(...s),this.declareFunctions=new Set}},Gs=class extends vt{createScope(s){return new Xs(s)}declareName(s,e,t){let r=this.currentScope();if(e&2048){this.checkRedeclarationInScope(r,s,e,t),this.maybeExportDefined(r,s),r.declareFunctions.add(s);return}super.declareName(s,e,t)}isRedeclaredInScope(s,e,t){if(super.isRedeclaredInScope(s,e,t))return!0;if(t&2048&&!s.declareFunctions.has(e)){let r=s.names.get(e);return(r&4)>0||(r&2)>0}return!1}checkLocalExport(s){this.scopeStack[0].declareFunctions.has(s.name)||super.checkLocalExport(s)}},Qs=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(s){return s+this.startIndex}offsetToSourcePos(s){return s-this.startIndex}hasPlugin(s){if(typeof s=="string")return this.plugins.has(s);{let[e,t]=s;if(!this.hasPlugin(e))return!1;let r=this.plugins.get(e);for(let n of Object.keys(t))if(r?.[n]!==t[n])return!1;return!0}}getPluginOption(s,e){var t;return(t=this.plugins.get(s))==null?void 0:t[e]}};function Wi(i,s){i.trailingComments===void 0?i.trailingComments=s:i.trailingComments.unshift(...s)}function Ao(i,s){i.leadingComments===void 0?i.leadingComments=s:i.leadingComments.unshift(...s)}function Ct(i,s){i.innerComments===void 0?i.innerComments=s:i.innerComments.unshift(...s)}function ze(i,s,e){let t=null,r=s.length;for(;t===null&&r>0;)t=s[--r];t===null||t.start>e.start?Ct(i,e.comments):Wi(t,e.comments)}var Ys=class extends Qs{addComment(s){this.filename&&(s.loc.filename=this.filename);let{commentsLen:e}=this.state;this.comments.length!==e&&(this.comments.length=e),this.comments.push(s),this.state.commentsLen++}processComment(s){let{commentStack:e}=this.state,t=e.length;if(t===0)return;let r=t-1,n=e[r];n.start===s.end&&(n.leadingNode=s,r--);let{start:a}=s;for(;r>=0;r--){let o=e[r],l=o.end;if(l>a)o.containingNode=s,this.finalizeComment(o),e.splice(r,1);else{l===a&&(o.trailingNode=s);break}}}finalizeComment(s){let{comments:e}=s;if(s.leadingNode!==null||s.trailingNode!==null)s.leadingNode!==null&&Wi(s.leadingNode,e),s.trailingNode!==null&&Ao(s.trailingNode,e);else{let{containingNode:t,start:r}=s;if(this.input.charCodeAt(this.offsetToSourcePos(r)-1)===44)switch(t.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":ze(t,t.properties,s);break;case"CallExpression":case"OptionalCallExpression":ze(t,t.arguments,s);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":ze(t,t.params,s);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":ze(t,t.elements,s);break;case"ExportNamedDeclaration":case"ImportDeclaration":ze(t,t.specifiers,s);break;case"TSEnumDeclaration":ze(t,t.members,s);break;case"TSEnumBody":ze(t,t.members,s);break;default:Ct(t,e)}else Ct(t,e)}}finalizeRemainingComments(){let{commentStack:s}=this.state;for(let e=s.length-1;e>=0;e--)this.finalizeComment(s[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(s){let{commentStack:e}=this.state,{length:t}=e;if(t===0)return;let r=e[t-1];r.leadingNode===s&&(r.leadingNode=null)}resetPreviousIdentifierLeadingComments(s){let{commentStack:e}=this.state,{length:t}=e;t!==0&&(e[t-1].trailingNode===s?e[t-1].trailingNode=null:t>=2&&e[t-2].trailingNode===s&&(e[t-2].trailingNode=null))}takeSurroundingComments(s,e,t){let{commentStack:r}=this.state,n=r.length;if(n===0)return;let a=n-1;for(;a>=0;a--){let o=r[a],l=o.end;if(o.start===t)o.leadingNode=s;else if(l===e)o.trailingNode=s;else if(l<e)break}}},wo=/\r\n|[\r\n\u2028\u2029]/,Xt=new RegExp(wo.source,"g");function rt(i){switch(i){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function Ii(i,s,e){for(let t=s;t<e;t++)if(rt(i.charCodeAt(t)))return!0;return!1}var qs=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,zs=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function vo(i){switch(i){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var Zs=class i{constructor(){this.flags=1024,this.startIndex=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[R.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(s){s?this.flags|=1:this.flags&=-2}init({strictMode:s,sourceType:e,startIndex:t,startLine:r,startColumn:n}){this.strict=s===!1?!1:s===!0?!0:e==="module",this.startIndex=t,this.curLine=r,this.lineStart=-n,this.startLoc=this.endLoc=new ve(r,n,t)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(s){s?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(s){s?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(s){s?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(s){s?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(s){s?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(s){s?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(s){s?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(s){s?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(s){s?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(s){s?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(s){s?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(s){s?this.flags|=4096:this.flags&=-4097}curPosition(){return new ve(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let s=new i;return s.flags=this.flags,s.startIndex=this.startIndex,s.curLine=this.curLine,s.lineStart=this.lineStart,s.startLoc=this.startLoc,s.endLoc=this.endLoc,s.errors=this.errors.slice(),s.potentialArrowAt=this.potentialArrowAt,s.noArrowAt=this.noArrowAt.slice(),s.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),s.topicContext=this.topicContext,s.labels=this.labels.slice(),s.commentsLen=this.commentsLen,s.commentStack=this.commentStack.slice(),s.pos=this.pos,s.type=this.type,s.value=this.value,s.start=this.start,s.end=this.end,s.lastTokEndLoc=this.lastTokEndLoc,s.lastTokStartLoc=this.lastTokStartLoc,s.context=this.context.slice(),s.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,s.strictErrors=this.strictErrors,s.tokensLength=this.tokensLength,s}},Co=function(s){return s>=48&&s<=57},Ni={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Gt={bin:i=>i===48||i===49,oct:i=>i>=48&&i<=55,dec:i=>i>=48&&i<=57,hex:i=>i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102};function ki(i,s,e,t,r,n){let a=e,o=t,l=r,c="",u=null,h=e,{length:f}=s;for(;;){if(e>=f){n.unterminated(a,o,l),c+=s.slice(h,e);break}let d=s.charCodeAt(e);if(Io(i,d,s,e)){c+=s.slice(h,e);break}if(d===92){c+=s.slice(h,e);let p=No(s,e,t,r,i==="template",n);p.ch===null&&!u?u={pos:e,lineStart:t,curLine:r}:c+=p.ch,{pos:e,lineStart:t,curLine:r}=p,h=e}else d===8232||d===8233?(++e,++r,t=e):d===10||d===13?i==="template"?(c+=s.slice(h,e)+`
@@ -101,6 +102,6 @@ ${" ".repeat(6+r)}^`),c));s+=`
101
102
  ${l.join(`
102
103
  `)}
103
104
  `}this.message=s}},Pc=new Set(["Literal","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","RegExpLiteral","BigIntLiteral"]),Jn=new Set(["string","number","boolean","bigint","symbol","undefined"]),Z=mt;function Sc(i){return/^[$A-Z_a-z][\w$]*$/.test(i)}var Ur="__magicast_proxy";function le(i,s=new Set){if(i===void 0)return Z.identifier("undefined");if(i===null)return Z.literal(null);if(Jn.has(typeof i))return Z.literal(i);if(s.has(i))throw new se("Can not serialize circular reference");if(s.add(i),i[Ur])return i.$ast;if(i instanceof RegExp){let e=Z.regExpLiteral(i.source,i.flags);return delete e.extra.raw,e}return i instanceof Set?Z.newExpression(Z.identifier("Set"),[Z.arrayExpression([...i].map(e=>le(e,s)))]):i instanceof Date?Z.newExpression(Z.identifier("Date"),[Z.literal(i.toISOString())]):i instanceof Map?Z.newExpression(Z.identifier("Map"),[Z.arrayExpression([...i].map(([e,t])=>Z.arrayExpression([le(e,s),le(t,s)])))]):Array.isArray(i)?Z.arrayExpression(i.map(e=>le(e,s))):typeof i=="object"?Z.objectExpression(Object.entries(i).map(([e,t])=>Z.property("init",/^[$A-Z_a-z][\w$]*$/g.test(e)?Z.identifier(e):Z.literal(e),le(t,s)))):Z.literal(i)}function Ec(i,s={}){let e=s;return e[Ur]=!0,e.$ast=i,e.$type||(e.$type="object"),e}var Ac={enumerable:!0,configurable:!0};function xe(i,s,e){let t=Ec(i,s);return new Proxy({},{ownKeys(){return Object.keys(t).filter(r=>r!==Ur&&!r.startsWith("$"))},getOwnPropertyDescriptor(){return Ac},has(r,n){return n in t},...e,get(r,n,a){if(n in t)return t[n];if(e.get)return e.get(r,n,a)},set(r,n,a,o){return n in t?(t[n]=a,!0):e.set?e.set(r,n,a,o):!1}})}var fe=mt,Ar=new WeakMap;function wc(i,s,e){if(Ar.has(s))return Ar.get(s);let t=xe(s,{get $declaration(){return i},get imported(){return s.type==="ImportDefaultSpecifier"?"default":s.type==="ImportNamespaceSpecifier"?"*":s.imported.type==="Identifier"?s.imported.name:s.imported.value},set imported(r){if(s.type!=="ImportSpecifier")throw new se("Changing import name is not yet implemented");s.imported.type==="Identifier"?s.imported.name=r:s.imported.value=r},get local(){return s.local.name},set local(r){s.local.name=r},get from(){return i.source.value},set from(r){if(r===i.source.value)return;i.specifiers=i.specifiers.filter(a=>a!==s),i.specifiers.length===0&&(e.body=e.body.filter(a=>a!==i));let n=e.body.find(a=>a.type==="ImportDeclaration"&&a.source.value===r);n?n.specifiers.push(s):e.body.unshift(fe.importDeclaration([s],fe.stringLiteral(r)))},toJSON(){return{imported:this.imported,local:this.local,from:this.from}}},{ownKeys(){return["imported","local","from","toJSON"]}});return Ar.set(s,t),t}function vc(i,s){let e=()=>{let a=[];for(let o of i.body)if(o.type==="ImportDeclaration")for(let l of o.specifiers)a.push(wc(o,l,i));return a},t=(a,o,l)=>{let c=e(),u=c.find(p=>p.local===a),h=o.local||a;if(u)return u.imported=o.imported,u.local=h,u.from=o.from,!0;let f=o.imported==="default"?fe.importDefaultSpecifier(fe.identifier(h)):o.imported==="*"?fe.importNamespaceSpecifier(fe.identifier(h)):fe.importSpecifier(fe.identifier(o.imported),fe.identifier(h)),d=c.find(p=>p.from===o.from)?.$declaration;if(d)d.specifiers.push(f);else if(l==="prepend"||c.length===0)i.body.unshift(fe.importDeclaration([f],fe.stringLiteral(o.from)));else{let p=c.at(-1).$declaration,g=i.body.indexOf(p);i.body.splice(g+1,0,fe.importDeclaration([f],fe.stringLiteral(o.from)))}return!0},r=a=>{let o=e().find(u=>u.local===a);if(!o)return!1;let l=o.$declaration,c=o.$ast;return l.specifiers=l.specifiers.filter(u=>u!==c),l.specifiers.length===0&&(i.body=i.body.filter(u=>u!==l)),!0};return xe(i,{$type:"imports",$add(a){t(a.local||a.imported,a,"prepend")},$prepend(a){t(a.local||a.imported,a,"prepend")},$append(a){t(a.local||a.imported,a,"append")},get $items(){return e()},toJSON(){return e().reduce((a,o)=>(a[o.local]=o,a),{})}},{get(a,o){return e().find(l=>l.local===o)},set(a,o,l){return t(o,l,"prepend")},deleteProperty(a,o){return r(o)},ownKeys(){return e().map(a=>a.local)},has(a,o){return e().some(l=>l.local===o)}})}function Es(i,s,e){let t=n=>s[n],r=(n,a)=>{s[n]=a};return xe(i,{$type:"array",push(n){s.push(le(n))},pop(){return oe(s.pop(),e)},unshift(n){s.unshift(le(n))},shift(){return oe(s.shift(),e)},splice(n,a,...o){return s.splice(n,a,...o.map(c=>le(c))).map(c=>oe(c,e))},find(n){return s.map(a=>oe(a,e)).find(n)},findIndex(n){return s.map(a=>oe(a,e)).findIndex(n)},includes(n){return s.map(a=>oe(a,e)).includes(n)},toJSON(){return s.map(n=>oe(n,e))}},{get(n,a){if(a==="length")return s.length;if(a===Symbol.iterator)return function*(){for(let c of s)yield oe(c,e)};if(typeof a=="symbol")return;let o=+a;if(Number.isNaN(o))return;let l=t(o);if(l)return oe(l,e)},set(n,a,o){if(typeof a=="symbol")return!1;let l=+a;return Number.isNaN(l)?!1:(r(l,le(o)),!0)},deleteProperty(n,a){if(typeof a=="symbol")return!1;let o=+a;return Number.isNaN(o)?!1:(s[o]=le(void 0),!0)},ownKeys(){return["length",...s.map((n,a)=>a.toString())]}})}function Cc(i,s){if("elements"in i)return Es(i,i.elements,s)}function Kn(i,s){if(i.type!=="CallExpression")throw new se("Not a function call");function e(r){if(r.type==="Identifier")return r.name;if(r.type==="MemberExpression")return`${e(r.object)}.${e(r.property)}`;throw new se("Not implemented")}let t=Es(i,i.arguments,s);return xe(i,{$type:"function-call",$callee:e(i.callee),$args:t},{})}function Ic(i,s){if(i.type!=="ArrowFunctionExpression")throw new se("Not an arrow function expression");let e=Es(i,i.params,s);return xe(i,{$type:"arrow-function-expression",$params:e,$body:oe(i.body,s)},{})}var Nc=mt;function kc(i,s){if(!("properties"in i))return;let e=n=>{for(let a of i.properties){if("key"in a&&"name"in a.key&&a.key.name===n)return a.value;if(a.type==="ObjectProperty"&&(a.key.type==="StringLiteral"||a.key.type==="NumericLiteral"||a.key.type==="BooleanLiteral")&&a.key.value.toString()===n)return a.value.value??a.value}},t=(n,a=!1)=>{if("key"in n&&"name"in n.key)return n.key.name;if(n.type==="ObjectProperty"&&(n.key.type==="StringLiteral"||n.key.type==="NumericLiteral"||n.key.type==="BooleanLiteral"))return n.key.value.toString();if(a)throw new se(`Casting "${n.type}" is not supported`,{ast:n,code:s?.$code})},r=(n,a)=>{let o=i.properties.find(l=>t(l)===n);o?o.value=a:Sc(n)?i.properties.push({type:"Property",key:{type:"Identifier",name:n},value:a}):i.properties.push({type:"ObjectProperty",key:Nc.stringLiteral(n),value:a})};return xe(i,{$type:"object",toJSON(){return i.properties.reduce((n,a)=>("key"in a&&"name"in a.key&&(n[a.key.name]=oe(a.value,s)),n),{})}},{get(n,a){let o=e(a);if(o)return oe(o,s)},set(n,a,o){return typeof a!="string"&&(a=String(a)),r(a,le(o)),!0},deleteProperty(n,a){typeof a!="string"&&(a=String(a));let o=i.properties.findIndex(l=>"key"in l&&"name"in l.key&&l.key.name===a);return o!==-1&&i.properties.splice(o,1),!0},ownKeys(){return i.properties.map(n=>t(n,!0)).filter(Boolean)}})}function Hn(i,s){if(i.type!=="NewExpression")throw new se("Not a new expression");function e(r){if(r.type==="Identifier")return r.name;if(r.type==="MemberExpression")return`${e(r.object)}.${e(r.property)}`;throw new se("Not implemented")}let t=Es(i,i.arguments,s);return xe(i,{$type:"new-expression",$callee:e(i.callee),$args:t},{})}function Lc(i){if(i.type!=="Identifier")throw new se("Not an identifier");return xe(i,{$type:"identifier",$name:i.name},{})}function Dc(i){if(i.type!=="LogicalExpression")throw new se("Not a logical expression");return xe(i,{$type:"logicalExpression"},{})}function Oc(i){if(i.type!=="MemberExpression")throw new se("Not a member expression");return xe(i,{$type:"memberExpression"},{})}var wr=new WeakMap;function oe(i,s){if(Jn.has(typeof i))return i;if(Pc.has(i.type))return i.value;if(wr.has(i))return wr.get(i);let e;switch(i.type){case"ObjectExpression":{e=kc(i,s);break}case"ArrayExpression":{e=Cc(i,s);break}case"CallExpression":{e=Kn(i,s);break}case"ArrowFunctionExpression":{e=Ic(i,s);break}case"NewExpression":{e=Hn(i,s);break}case"Identifier":{e=Lc(i);break}case"LogicalExpression":{e=Dc(i);break}case"MemberExpression":{e=Oc(i);break}case"TSAsExpression":case"TSSatisfiesExpression":{e=oe(i.expression,s);break}default:throw new se(`Casting "${i.type}" is not supported`,{ast:i,code:s?.$code})}return wr.set(i,e),e}var Mt=mt;function Mc(i,s){let e=r=>{let n=r==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let a of i.body)if(a.type===n){if(r==="default")return a.declaration;if(a.declaration&&"declarations"in a.declaration){let o=a.declaration.declarations[0];if("name"in o.id&&o.id.name===r)return o.init}}},t=(r,n)=>{let a=r==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration",o=le(n);for(let l of i.body)if(l.type===a){if(r==="default"){l.declaration=o;return}if(l.declaration&&"declarations"in l.declaration){let c=l.declaration.declarations[0];if("name"in c.id&&c.id.name===r){c.init=o;return}}}i.body.push(r==="default"?Mt.exportDefaultDeclaration(o):Mt.exportNamedDeclaration(Mt.variableDeclaration("const",[Mt.variableDeclarator(Mt.identifier(r),o)])))};return xe(i,{$type:"exports"},{get(r,n){let a=e(n);if(a)return oe(a,s)},set(r,n,a){return t(n,a),!0},ownKeys(){return i.body.flatMap(r=>r.type==="ExportDefaultDeclaration"?["default"]:r.type==="ExportNamedDeclaration"&&r.declaration&&"declarations"in r.declaration?r.declaration.declarations.map(n=>"name"in n.id?n.id.name:""):[]).filter(Boolean)},deleteProperty(r,n){let a=n==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let o=0;o<i.body.length;o++){let l=i.body[o];if(l.type===a){if(n==="default")return i.body.splice(o,1),!0;if(l.declaration&&"declarations"in l.declaration){let c=l.declaration.declarations[0];if("name"in c.id&&c.id.name===n)return i.body.splice(o,1),!0}}}return!1}})}function Fc(i,s){let e=i.program;if(e.type!=="Program")throw new se(`Cannot proxify ${i.type} as module`);let t={$code:s,$type:"module"},r=xe(e,t,{ownKeys(){return["imports","exports","generate"]}});return t.exports=Mc(e,r),t.imports=vc(e),t.generate=n=>Vr(r,n),r}function Xn(i,s={}){let e={wrapColumn:s.wrapColumn===void 0,indent:s.tabWidth===void 0||s.useTabs===void 0,quote:s.quote===void 0,arrowParens:s.arrowParensAlways===void 0,trailingComma:s.trailingComma===void 0},t=2,r=0,n=0,a=0,o=0,l=/(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g,c={doubleQuote:0,singleQuote:0,singleParam:0,trailingComma:0},u=(i||"").split(`
104
- `),h=!1;for(let f of u){let d=f.trim();if(d.length!==0){if(e.wrapColumn&&f.length>a&&(a=f.length),e.indent){let p=f.match(/^\s+/)?.[0]||"";p.length>0&&(p.length>0&&p.length<t&&(t=p.length),p[0]===" "?r++:p.length>0&&r--)}if(d.at(-1)===";"?n++:d.length>0&&n--,e.quote||e.arrowParens){let p=d.matchAll(l);for(let g of p)if(g.groups)for(let m in c)g.groups[m]&&c[m]++}e.trailingComma&&((f.startsWith("}")||f.startsWith("]"))&&(h?o++:o--),h=d.endsWith(","))}}return{wrapColumn:a,useTabs:r>0,tabWidth:t,quote:c.singleQuote>c.doubleQuote?"single":"double",arrowParensAlways:c.singleParam>0,trailingComma:o>0||c.trailingComma>0,useSemi:n>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...s}}function Gn(i,s){let e=Mn(i,{parser:s?.parser||Wn(),...s});return Fc(e,i)}function Qn(i,s){let e=Mn("("+i+")",{parser:s?.parser||Wn(),...s}),t=e.program.body[0];t.type==="ExpressionStatement"&&(t=t.expression),t.extra?.parenthesized&&(t.extra.parenthesized=!1);let r={$ast:e,$code:" "+i+" ",$type:"module"};return oe(t,r)}function Vr(i,s={}){let e=i.$ast||i,t=s.format===!1||!("$code"in i)?{}:Xn(i.$code,s.format),{code:r,map:n}=gc(e,{...s,...t});return{code:r,map:n}}async function Bc(i,s={}){let e=await vr.readFile(i,"utf8");return s.sourceFileName=s.sourceFileName??i,Gn(e,s)}async function _c(i,s,e){let t="$ast"in i?i.$ast:i,{code:r,map:n}=Vr(t,e);await vr.writeFile(s,r),n&&await vr.writeFile(s+".map",n)}var us=mt,jc={functionCall(i,...s){let e=us.callExpression(us.identifier(i),s.map(t=>le(t)));return Kn(e)},newExpression(i,...s){let e=us.newExpression(us.identifier(i),s.map(t=>le(t)));return Hn(e)},literal(i){return le(i)},raw(i){return Qn(i)}};import*as eu from"@sentry/node";async function ea(i,s){let e=await Zn(i,{withFileTypes:!0}),t=[];for(let r of e){let n=$.join(i,r.name);if(r.isDirectory()){if(!s.has(r.name)){let a=await ea(n,s);t.push(...a)}}else t.push(n)}return t}async function tu(i){let s=new Set,e=(...c)=>{if(process.env.DEBUG){let u=new Date,h=`${String(u.getMinutes()).padStart(2,"0")}:${String(u.getSeconds()).padStart(2,"0")}.${String(u.getMilliseconds()).padStart(3,"0")}`;console.debug(h,"[builder-dev-tools]",...c)}},t=async c=>{let u=Wc("md5");return u.update(c),u.digest("hex")},r=$.normalize(i.cwd),n=au($.normalize(i.cwd))??r,a=ou($.normalize(i.cwd))??n,o={...$,getCwdDir:()=>r,getRepoRootDir:()=>n,getAppRootDir:()=>a,cwd:()=>process.cwd(),exists:async c=>{try{return await Rc(c),!0}catch{return!1}},magicast:$r,existsSync:c=>ce(c),readdir:async(c,u)=>{let h=await Zn(c);return u?h.map(f=>$.join(c,f)):h},readdirRecursive:async(c,u)=>ea(c,new Set(u)),readdirSync:c=>Jc(c),readFile:async c=>{try{return await Vc(c,"utf-8")}catch(u){if(u.code==="ENOENT")return null;throw e(u,c),u}},readFileSync(c){try{return Kc(c,"utf-8")}catch(u){if(u.code==="ENOENT")return null;throw e(u,c),u}},spawnSync:$t,stat:async c=>await $c(c),statSync:c=>Hc(c),unlinkSync:c=>{Xc(c)},unlink:async c=>{await qc(c)},writeFile:async(c,u)=>{c=$.normalize(c);let h={path:c,basename:$.basename(c),dirname:$.dirname(c),extname:$.extname(c)};await Uc($.dirname(c),{recursive:!0}),await zc(c,u);for(let f of s)await f(h)},hash:t,getDeviceId:()=>t(`${Qc()}:${Gc()}`),formatCode:async(c,u)=>{let h=null;try{h=await Yn.resolveConfig(c)}catch{}try{return Yn.format(u,{...h,filepath:c})}catch{}return u},on:(c,u)=>{c==="change"&&s.add(u)},off:(c,u)=>{c==="change"&&s.delete(u)},debug:e,launchEditor:async c=>{try{let u=c.filePath;typeof c.line=="number"&&(u+=`:${c.line}`,typeof c.column=="number"&&(u+=`:${c.column}`)),Zc(u,"code",(h,f)=>{console.error(`Failed to launch editor for ${h}`),f&&console.error(f)})}catch(u){console.error(`Failed to launch editor for ${String(u.message||u)}`)}},platform:()=>({runtime:"node",os:process.platform}),getRepoInfo:async()=>{let c=$.normalize(i.cwd);return{remoteUrl:su(c),defaultBranch:ru(c),commit:iu(c),currentBranch:nu(c)}},getFrameworks:()=>[],ts:Yc,Sentry:eu,version:"1.6.0",sdkVersion:null,ignoreMissingConfig:i.ignoreMissingConfig,kind:null},l=await Gr(o);return o.getFrameworks=()=>l,o}function su(i){try{return($t("git",["config","--get","remote.origin.url"],{cwd:i}).stdout||"").toString().trim()}catch(s){return console.error("Error getting git remote URL:",s),""}}function ru(i){let s="master";try{let e=$t("git",["branch","-r"],{cwd:i});return e.stdout&&e.stdout.toString().trim().split(`
105
+ `),h=!1;for(let f of u){let d=f.trim();if(d.length!==0){if(e.wrapColumn&&f.length>a&&(a=f.length),e.indent){let p=f.match(/^\s+/)?.[0]||"";p.length>0&&(p.length>0&&p.length<t&&(t=p.length),p[0]===" "?r++:p.length>0&&r--)}if(d.at(-1)===";"?n++:d.length>0&&n--,e.quote||e.arrowParens){let p=d.matchAll(l);for(let g of p)if(g.groups)for(let m in c)g.groups[m]&&c[m]++}e.trailingComma&&((f.startsWith("}")||f.startsWith("]"))&&(h?o++:o--),h=d.endsWith(","))}}return{wrapColumn:a,useTabs:r>0,tabWidth:t,quote:c.singleQuote>c.doubleQuote?"single":"double",arrowParensAlways:c.singleParam>0,trailingComma:o>0||c.trailingComma>0,useSemi:n>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...s}}function Gn(i,s){let e=Mn(i,{parser:s?.parser||Wn(),...s});return Fc(e,i)}function Qn(i,s){let e=Mn("("+i+")",{parser:s?.parser||Wn(),...s}),t=e.program.body[0];t.type==="ExpressionStatement"&&(t=t.expression),t.extra?.parenthesized&&(t.extra.parenthesized=!1);let r={$ast:e,$code:" "+i+" ",$type:"module"};return oe(t,r)}function Vr(i,s={}){let e=i.$ast||i,t=s.format===!1||!("$code"in i)?{}:Xn(i.$code,s.format),{code:r,map:n}=gc(e,{...s,...t});return{code:r,map:n}}async function Bc(i,s={}){let e=await vr.readFile(i,"utf8");return s.sourceFileName=s.sourceFileName??i,Gn(e,s)}async function _c(i,s,e){let t="$ast"in i?i.$ast:i,{code:r,map:n}=Vr(t,e);await vr.writeFile(s,r),n&&await vr.writeFile(s+".map",n)}var us=mt,jc={functionCall(i,...s){let e=us.callExpression(us.identifier(i),s.map(t=>le(t)));return Kn(e)},newExpression(i,...s){let e=us.newExpression(us.identifier(i),s.map(t=>le(t)));return Hn(e)},literal(i){return le(i)},raw(i){return Qn(i)}};import*as eu from"@sentry/node";async function ea(i,s){let e=await Zn(i,{withFileTypes:!0}),t=[];for(let r of e){let n=$.join(i,r.name);if(r.isDirectory()){if(!s.has(r.name)){let a=await ea(n,s);t.push(...a)}}else t.push(n)}return t}async function tu(i){let s=new Set,e=(...c)=>{if(process.env.DEBUG){let u=new Date,h=`${String(u.getMinutes()).padStart(2,"0")}:${String(u.getSeconds()).padStart(2,"0")}.${String(u.getMilliseconds()).padStart(3,"0")}`;console.debug(h,"[builder-dev-tools]",...c)}},t=async c=>{let u=Wc("md5");return u.update(c),u.digest("hex")},r=$.normalize(i.cwd),n=au($.normalize(i.cwd))??r,a=ou($.normalize(i.cwd))??n,o={...$,getCwdDir:()=>r,getRepoRootDir:()=>n,getAppRootDir:()=>a,cwd:()=>process.cwd(),exists:async c=>{try{return await Rc(c),!0}catch{return!1}},magicast:$r,existsSync:c=>ce(c),readdir:async(c,u)=>{let h=await Zn(c);return u?h.map(f=>$.join(c,f)):h},readdirRecursive:async(c,u)=>ea(c,new Set(u)),readdirSync:c=>Jc(c),readFile:async c=>{try{return await Vc(c,"utf-8")}catch(u){if(u.code==="ENOENT")return null;throw e(u,c),u}},readFileSync(c){try{return Kc(c,"utf-8")}catch(u){if(u.code==="ENOENT")return null;throw e(u,c),u}},spawnSync:$t,stat:async c=>await $c(c),statSync:c=>Hc(c),unlinkSync:c=>{Xc(c)},unlink:async c=>{await qc(c)},writeFile:async(c,u)=>{c=$.normalize(c);let h={path:c,basename:$.basename(c),dirname:$.dirname(c),extname:$.extname(c)};await Uc($.dirname(c),{recursive:!0}),await zc(c,u);for(let f of s)await f(h)},hash:t,getDeviceId:()=>t(`${Qc()}:${Gc()}`),formatCode:async(c,u)=>{let h=null;try{h=await Yn.resolveConfig(c)}catch{}try{return Yn.format(u,{...h,filepath:c})}catch{}return u},on:(c,u)=>{c==="change"&&s.add(u)},off:(c,u)=>{c==="change"&&s.delete(u)},debug:e,launchEditor:async c=>{try{let u=c.filePath;typeof c.line=="number"&&(u+=`:${c.line}`,typeof c.column=="number"&&(u+=`:${c.column}`)),Zc(u,"code",(h,f)=>{console.error(`Failed to launch editor for ${h}`),f&&console.error(f)})}catch(u){console.error(`Failed to launch editor for ${String(u.message||u)}`)}},platform:()=>({runtime:"node",os:process.platform}),getRepoInfo:async()=>{let c=$.normalize(i.cwd);return{remoteUrl:su(c),defaultBranch:ru(c),commit:iu(c),currentBranch:nu(c)}},getFrameworks:()=>[],ts:Yc,Sentry:eu,version:"1.6.2",sdkVersion:null,ignoreMissingConfig:i.ignoreMissingConfig,kind:null},l=await Gr(o);return o.getFrameworks=()=>l,o}function su(i){try{return($t("git",["config","--get","remote.origin.url"],{cwd:i}).stdout||"").toString().trim()}catch(s){return console.error("Error getting git remote URL:",s),""}}function ru(i){let s="master";try{let e=$t("git",["branch","-r"],{cwd:i});return e.stdout&&e.stdout.toString().trim().split(`
105
106
  `).map(r=>r.trim()).includes("origin/main")?"main":s}catch(e){return console.error("Error getting git default branch name:",e.toString().split(`
106
107
  `)[0]),s}}function iu(i){try{return($t("git",["rev-parse","HEAD"],{cwd:i}).stdout||"").toString().trim()}catch(s){return console.error("Error getting git commit:",s),""}}function nu(i){try{return($t("git",["branch","--show-current"],{cwd:i}).stdout||"").toString().trim()}catch(s){return console.error("Error getting current branch name:",s),""}}function au(i){let s=$.resolve("/");for(let e=0;e<20;e++){let t=$.join(i,"package.json");if(ce(t))return i;if(i===s)break;i=$.dirname(i)}return null}function ou(i){let s=$.resolve("/");for(let e=0;e<20;e++){if(ce($.join(i,"package.json"))||ce($.join(i,"remix.config.js"))||ce($.join(i,"remix.config.mjs"))||ce($.join(i,"remix.config.ts"))||ce($.join(i,"vite.config.js"))||ce($.join(i,"vite.config.ts"))||ce($.join(i,"vite.config.mjs"))||ce($.join(i,"next.config.js"))||ce($.join(i,"next.config.ts"))||ce($.join(i,"angular.json"))||ce($.join(i,"project.json"))||ce($.join(i,"tsconfig.json")))return i;if(i===s)break;i=$.dirname(i)}return null}export{tu as createDevToolsNodeSys};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "builder.io",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "Add and Sync Builder.io code snippets to an application",
5
5
  "type": "module",
6
6
  "bin": {
package/remix/index.mjs CHANGED
@@ -1 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
1
2
  import{createDevTools as b}from"../core/index.mjs";import{createDevToolsNodeSys as S}from"../node/index.mjs";import{createDevToolsServer as w}from"../server/index.mjs";import{dirname as i,join as d,resolve as h}from"node:path";import{existsSync as a,readFileSync as f,writeFileSync as p}from"node:fs";import{fileURLToPath as y}from"node:url";var L=(r={})=>e=>{if(r.enabled==null&&(r.enabled=process.env.NODE_ENV!=="production"),r.enabled===!1)return e;let n={...e},t=D(process.cwd()),m=i(t);process.env.BUILDER_REMIX_DEVTOOLS_URL="http://localhost:5273/",n.watchPaths=async()=>{let o=await S({cwd:m}),l=await b(o),s=await w({...l,getClientId:()=>"remix-builder-dev-tools",closeAppServer:async()=>{},restartAppServer:async()=>{o.debug("restart server");let u=f(t,"utf-8");p(t,u)},enableAppWatch:async u=>u,...o,...r});return process.env.BUILDER_REMIX_DEVTOOLS_URL=s.getUrl(),typeof e.watchPaths=="function"?e.watchPaths():e.watchPaths?e.watchPaths:[]};let v;v=i(y(import.meta.url));let c=d(v,"server-build","index.mjs");if(!a(c))return console.log(`Builder Devtools unable to run: "${c}" not found`),e;if(typeof e.server=="string"){let o=h(i(t),e.server);if(!a(o))return console.log(`Builder Devtools unable to run: "${o}" set from "${e.server}" server config not found`),e;let l=!1,s=f(o,"utf-8");for(;s.includes("@remix-run/dev/server-build");)s=s.replace("@remix-run/dev/server-build","@builder.io/dev-tools/remix/server-build"),l=!0;l&&p(o,s)}else n.server=c;return n};function D(r){let e=h("/");for(let n=0;n<20;n++){let t=d(r,"remix.config.js");if(a(t)||(t=d(r,"remix.config.ts"),a(t)))return t;if(r===e)break;r=i(r)}throw new Error("Could not find Remix config")}export{L as default};
@@ -1,3 +1,4 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
1
2
  import * as remixBuild from "@remix-run/dev/server-build";
2
3
  import * as React from "react";
3
4
  const assets = remixBuild.assets;