builder.io 1.15.2 → 1.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/index.cjs +13 -13
- package/cli/index.cjs.map +3 -3
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +1 -1
- package/server/index.cjs +3 -3
- package/server/index.mjs +3 -3
- package/types/cli/codegen.d.ts +1 -1
- package/types/tsconfig.tsbuildinfo +1 -1
package/cli/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var yee=Object.create;var Bh=Object.defineProperty;var vee=Object.getOwnPropertyDescriptor;var bee=Object.getOwnPropertyNames;var xee=Object.getPrototypeOf,Dee=Object.prototype.hasOwnProperty;var N=(t,e)=>()=>(t&&(e=t(t=0)),e);var S=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Mh=(t,e)=>{for(var r in e)Bh(t,r,{get:e[r],enumerable:!0})},IF=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of bee(e))!Dee.call(t,i)&&i!==r&&Bh(t,i,{get:()=>e[i],enumerable:!(n=vee(e,i))||n.enumerable});return t};var Y=(t,e,r)=>(r=t!=null?yee(xee(t)):{},IF(e||!t||!t.__esModule?Bh(r,"default",{value:t,enumerable:!0}):r,t)),Eee=t=>IF(Bh({},"__esModule",{value:!0}),t);var h=N(()=>{{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"
|
|
1
|
+
var yee=Object.create;var Bh=Object.defineProperty;var vee=Object.getOwnPropertyDescriptor;var bee=Object.getOwnPropertyNames;var xee=Object.getPrototypeOf,Dee=Object.prototype.hasOwnProperty;var N=(t,e)=>()=>(t&&(e=t(t=0)),e);var S=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Mh=(t,e)=>{for(var r in e)Bh(t,r,{get:e[r],enumerable:!0})},IF=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of bee(e))!Dee.call(t,i)&&i!==r&&Bh(t,i,{get:()=>e[i],enumerable:!(n=vee(e,i))||n.enumerable});return t};var Y=(t,e,r)=>(r=t!=null?yee(xee(t)):{},IF(e||!t||!t.__esModule?Bh(r,"default",{value:t,enumerable:!0}):r,t)),Eee=t=>IF(Bh({},"__esModule",{value:!0}),t);var h=N(()=>{{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"e8f4e82686493c1ae5753564e6be43754aaf8c4a"}}});var RF=S((LRe,NF)=>{h();function l0(t){return t==null?[]:Array.isArray(t)?t:[t]}function Cee(t,e,r,n){var i,s=t[e],o=~n.string.indexOf(e)?r==null||r===!0?"":String(r):typeof r=="boolean"?r:~n.boolean.indexOf(e)?r==="false"?!1:r==="true"||(t._.push((i=+r,i*0===0?i:r)),!!r):(i=+r,i*0===0?i:r);t[e]=s==null?o:Array.isArray(s)?s.concat(o):[s,o]}NF.exports=function(t,e){t=t||[],e=e||{};var r,n,i,s,o,a={_:[]},c=0,u=0,l=0,p=t.length;let d=e.alias!==void 0,f=e.unknown!==void 0,m=e.default!==void 0;if(e.alias=e.alias||{},e.string=l0(e.string),e.boolean=l0(e.boolean),d)for(r in e.alias)for(n=e.alias[r]=l0(e.alias[r]),c=0;c<n.length;c++)(e.alias[n[c]]=n.concat(r)).splice(c,1);for(c=e.boolean.length;c-- >0;)for(n=e.alias[e.boolean[c]]||[],u=n.length;u-- >0;)e.boolean.push(n[u]);for(c=e.string.length;c-- >0;)for(n=e.alias[e.string[c]]||[],u=n.length;u-- >0;)e.string.push(n[u]);if(m){for(r in e.default)if(s=typeof e.default[r],n=e.alias[r]=e.alias[r]||[],e[s]!==void 0)for(e[s].push(r),c=0;c<n.length;c++)e[s].push(n[c])}let g=f?Object.keys(e.alias):[];for(c=0;c<p;c++){if(i=t[c],i==="--"){a._=a._.concat(t.slice(++c));break}for(u=0;u<i.length&&i.charCodeAt(u)===45;u++);if(u===0)a._.push(i);else if(i.substring(u,u+3)==="no-"){if(s=i.substring(u+3),f&&!~g.indexOf(s))return e.unknown(i);a[s]=!1}else{for(l=u+1;l<i.length&&i.charCodeAt(l)!==61;l++);for(s=i.substring(u,l),o=i.substring(++l)||c+1===p||(""+t[c+1]).charCodeAt(0)===45||t[++c],n=u===2?[s]:s,l=0;l<n.length;l++){if(s=n[l],f&&!~g.indexOf(s))return e.unknown("-".repeat(u)+s);Cee(a,s,l+1<n.length||o,e)}}}if(m)for(r in e.default)a[r]===void 0&&(a[r]=e.default[r]);if(d)for(r in a)for(n=e.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}});function wee(t){let e=[],r=mc.default.dirname(t);for(;r!==mc.default.dirname(r);){let n=mc.default.join(r,".prettierignore");d0.default.existsSync(n)&&e.push(n);let i=mc.default.join(r,".git");if(d0.default.existsSync(i))break;r=mc.default.dirname(r)}return e}function See(t){if(!t)return p0.default;try{let r=(0,OF.createRequire)(t)("prettier");if(!r)throw new Error("Prettier not found");return r}catch{return p0.default}}async function ui(t,e,r,n){try{let i=mc.default.resolve(t,n??"file.tsx"),s=See(i);if(n){let a=wee(i);if((await s.getFileInfo(i,{ignorePath:a.length>0?a:void 0})).ignored)return e}let o=await s.resolveConfig(i);return o?await s.format(e,{...o,filepath:n,parser:r}):await s.format(e,{filepath:n,parser:r})}catch{return e}}var p0,OF,mc,d0,Td=N(()=>{"use strict";h();p0=Y(require("prettier"),1),OF=require("node:module"),mc=Y(require("node:path"),1),d0=Y(require("node:fs"),1)});var f0,rl,Lh,$h,BF,hc,m0,h0,gc,MF,nl=N(()=>{"use strict";h();f0="preview-url",rl="framework",Lh="platform",$h="node",BF="/~builder-connect",hc="/~builder-connected",m0="/~builder-dev-tools",h0="/~builder-dev-tools.js",gc="/~builder-dev-tools-close",MF="/mappings"});var jh=S((GRe,LF)=>{"use strict";h();var g0={to(t,e){return e?`\x1B[${e+1};${t+1}H`:`\x1B[${t+1}G`},move(t,e){let r="";return t<0?r+=`\x1B[${-t}D`:t>0&&(r+=`\x1B[${t}C`),e<0?r+=`\x1B[${-e}A`:e>0&&(r+=`\x1B[${e}B`),r},up:(t=1)=>`\x1B[${t}A`,down:(t=1)=>`\x1B[${t}B`,forward:(t=1)=>`\x1B[${t}C`,backward:(t=1)=>`\x1B[${t}D`,nextLine:(t=1)=>"\x1B[E".repeat(t),prevLine:(t=1)=>"\x1B[F".repeat(t),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},Tee={up:(t=1)=>"\x1B[S".repeat(t),down:(t=1)=>"\x1B[T".repeat(t)},Pee={screen:"\x1B[2J",up:(t=1)=>"\x1B[1J".repeat(t),down:(t=1)=>"\x1B[J".repeat(t),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(t){let e="";for(let r=0;r<t;r++)e+=this.line+(r<t-1?g0.up():"");return t&&(e+=g0.left),e}};LF.exports={cursor:g0,scroll:Tee,erase:Pee,beep:"\x07"}});var mr=S((VRe,y0)=>{h();var qh=process||{},$F=qh.argv||[],Uh=qh.env||{},Aee=!(Uh.NO_COLOR||$F.includes("--no-color"))&&(!!Uh.FORCE_COLOR||$F.includes("--color")||qh.platform==="win32"||(qh.stdout||{}).isTTY&&Uh.TERM!=="dumb"||!!Uh.CI),_ee=(t,e,r=t)=>n=>{let i=""+n,s=i.indexOf(e,t.length);return~s?t+Fee(i,e,r,s)+e:t+i+e},Fee=(t,e,r,n)=>{let i="",s=0;do i+=t.substring(s,n)+r,s=n+e.length,n=t.indexOf(e,s);while(~n);return i+t.substring(s)},jF=(t=Aee)=>{let e=t?_ee:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};y0.exports=jF();y0.exports.createColors=jF});function kee({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}function XF(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Iee,"")}function QF(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Pd(t,e={}){if(typeof t!="string"||t.length===0||(e={ambiguousIsNarrow:!0,...e},t=XF(t),t.length===0))return 0;t=t.replace(Bee()," ");let r=e.ambiguousIsNarrow?1:2,n=0;for(let i of t){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(Ree.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}function $ee(){let t=new Map;for(let[e,r]of Object.entries(sr)){for(let[n,i]of Object.entries(r))sr[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=sr[n],t.set(i[0],i[1]);Object.defineProperty(sr,e,{value:r,enumerable:!1})}return Object.defineProperty(sr,"codes",{value:t,enumerable:!1}),sr.color.close="\x1B[39m",sr.bgColor.close="\x1B[49m",sr.color.ansi=UF(),sr.color.ansi256=qF(),sr.color.ansi16m=zF(),sr.bgColor.ansi=UF(v0),sr.bgColor.ansi256=qF(v0),sr.bgColor.ansi16m=zF(v0),Object.defineProperties(sr,{rgbToAnsi256:{value:(e,r,n)=>e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>sr.rgbToAnsi256(...sr.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,i;if(e>=232)r=((e-232)*10+8)/255,n=r,i=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(r,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>sr.ansi256ToAnsi(sr.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>sr.ansi256ToAnsi(sr.hexToAnsi256(e)),enumerable:!1}}),sr}function VF(t,e,r){return String(t).normalize().replace(/\r\n/g,`
|
|
2
2
|
`).split(`
|
|
3
3
|
`).map(n=>Hee(n,e,r)).join(`
|
|
4
4
|
`)}function w0(t,e){if(typeof t=="string")return Gh.aliases.get(t)===e;for(let r of t)if(r!==void 0&&w0(r,e))return!0;return!1}function Kee(t,e){if(t===e)return;let r=t.split(`
|
|
@@ -65,7 +65,7 @@ ${sk}${n.trimStart()}`),r=3+(0,Jh.stripVTControlCharacters)(n.trimStart()).lengt
|
|
|
65
65
|
`),m(),i()};return{start:D,stop:E,message:(x="")=>{a=y(x??a)}}}});function mt(t,e=""){return t.ts.createSourceFile("module.tsx",typeof e=="string"?e:"",t.ts.ScriptTarget.Latest,void 0)}function eg(t,e=""){let r=mt(t,e?.trim());if(r.statements.length===0)throw new Error(`No statements found in code: ${e}`);return r.statements[0]}function $r(t,e,r){if(e){let n=t.ts.createPrinter({newLine:t.ts.NewLineKind.LineFeed,removeComments:r});return t.ts.isSourceFile(e)?n.printFile(e).trim()+`
|
|
66
66
|
`:n.printNode(t.ts.EmitHint.Unspecified,e,t.ts.createSourceFile("module.tsx","",t.ts.ScriptTarget.Latest)).trim()+`
|
|
67
67
|
`}return""}var dr=N(()=>{"use strict";h()});var fk=S((dOe,dk)=>{"use strict";h();dk.exports=function(){if(process.env.npm_config_user_agent)return ate(process.env.npm_config_user_agent)};function ate(t){let e=t.split(" ")[0],r=e.lastIndexOf("/"),n=e.substring(0,r);return{name:n==="npminstall"?"cnpm":n,version:e.substring(r+1)}}});function cn(t){return t.endsWith(".mapper.tsx")||t.endsWith(".mapper.jsx")||t.endsWith(".mapper.ts")||t.endsWith(".mapper.js")||t.endsWith(".mapper.mjs")}function ht(t,e,r){e=ls(e),r=ls(r),e=t.dirname(e);let n=t.basename(r,t.extname(r));r=t.dirname(r);let i;return n==="index"?i=t.relative(e,r):i=t.relative(e,t.join(r,n)),i=ls(t.normalize(i)),i.startsWith(".")||(i="./"+i),i}function ls(t){return t.startsWith("\\\\?\\")?t:t.replace(/\\/g,"/")}function yc(t,e){let r=t.extname(e),n=t.basename(e,r).split(/[\/\\]/),i=n[n.length-1];return mk(i==="index"?t.basename(t.dirname(e)):i)}function mk(t){return Ht(t).replace(/ /g,"")}function Fi(t,e){let r=t.extname(e),n=ls(t.basename(e,r)).split("/").pop();return Ht(n==="index"?t.basename(t.dirname(e)):n)}function Vt(t,e){let r=ls(t.relative(t.getAppRootDir(),e));r=r.split("/").filter(i=>i!=="."&&i!==".."&&i!=="").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=t.getFrameworks();return r.startsWith("src/")&&(r=r.slice(4)),n.some(i=>i.name.includes("next"))?"@/"+r:"~/"+r}function Ct(t,e){let r=e,n=[];for(let i=0;i<2;i++){let s=t.basename(r);if(!s||s==="components")break;n.unshift(s),r=t.dirname(r)}return n.join("/")}function Ht(t){for(t=t.replace(/([A-Z])/g," $1").replace(/\./g," ").replace(/_/g," ").replace(/-/g," ").replace(/\s/g," ").trim();t.includes(" ");)t=t.replace(/ /g," ");return t.split(" ").map(e=>e.length>2?e[0].toUpperCase()+e.slice(1):e).join("").trim()}function qn(t){return t.sort((e,r)=>e.name.toLocaleLowerCase().localeCompare(r.name.toLocaleLowerCase()))}async function Ut(t,e,r,n){if(typeof r!="string"||r==="")throw new Error(`getComponentId(), exportName must be a non-empty string, received: ${r}, ${e}`);return n&&(e=n),e=t.normalize(e),(await t.hash(e+"#"+r)).substring(0,8)}async function gk(t){return(await t.hash(t.getAppRootDir())).substring(0,8)}function Ad(t){return typeof t=="number"}function ol(t){return typeof t=="boolean"}function Cn(t){return typeof t=="string"}function al(t){return typeof t=="string"?/^[A-Z][A-Za-z0-9]*$/.test(t):!1}function pi(t){return JSON.parse(JSON.stringify(t))}function tg(t,e,r){for(let n of e)if(t.dirname(r).includes(n))return!0;return!1}function yk(){try{let t=(0,hk.default)();if(t?.name)return t.name}catch{}return"npm"}function cte(){return process.platform.startsWith("win")}function Ar(){return cte()?'"@builder.io/dev-tools"':"builder.io"}function F0(t){return t.replace(/[^a-zA-Z0-9-_]/g,"_")}var hk,at=N(()=>{"use strict";h();hk=Y(fk(),1)});function wn(t){let e=t.join(t.getAppRootDir(),"tsconfig.json");return t.exists(e)}async function zn(t,e){async function r(i,s){if(s>10)return;let o=await t.readdir(i);for(let a of o){if(ute.includes(a))continue;let c=t.join(i,a),u=await t.stat(c);if(u){if(u.isFile()&&a.startsWith("builder-registry."))return c;if(u.isDirectory()){let l=await r(c,s+1);if(l)return l}}}}let n=await r(t.getAppRootDir(),0);if(!n){let s=`builder-registry.${await wn(t)?"ts":"js"}`;return t.join(e,s)}return n}async function ps(t,e){let r=t.resolve("/");for(let n=0;n<20;n++){let i=t.join(e,"package.json"),s=await t.readFile(i);if(s)return JSON.parse(s);if(e===r)break;e=t.dirname(e)}return null}async function vk(t,e){for(let r=0;r<20;r++){let n=t.dirname(e),i=t.join(n,"node_modules");if(await t.exists(i))return i;if(e===t.getAppRootDir())break;e=t.dirname(e)}return t.join(t.getAppRootDir(),"node_modules")}async function _d(t,e,r){let n=await t.readdir(e);return n.includes(r)?t.join(e,r):(await Promise.all(n.map(async s=>{if(s.startsWith(".")||s==="node_modules")return;let o=t.join(e,s);if((await t.stat(o)).isDirectory()){let c=await _d(t,o,r);if(c)return c}}))).find(s=>typeof s=="string")}var ute,un=N(()=>{"use strict";h();ute=["node_modules","dist","build","public"]});async function Rr(t,e,r){if(!Array.isArray(e)||e.length===0)throw new Error(`createTsProgram() Invalid filePaths: ${e}`);let n=await vk(t,e[0]),i=t.join(n,"typescript","lib"),s=new Map,o={fileExists:a=>{if(a=t.normalize(a),a.includes("node_modules")){let c=Fd.get(a);if(!c){try{t.statSync(a).isFile()?c={exists:!0,content:t.readFileSync(a)}:c={exists:!1}}catch{c={exists:!1}}Fd.set(a,c)}return c.exists}if(!s.has(a))if(t.existsSync(a)){let u=t.statSync(a);s.set(a,u.isFile())}else s.set(a,!1);return s.get(a)},getCanonicalFileName:a=>t.normalize(a),getCurrentDirectory:()=>t.cwd(),getDefaultLibFileName:()=>t.join(i,"lib.d.ts"),getDefaultLibLocation:()=>i,getNewLine:()=>`
|
|
68
|
-
`,getSourceFile:a=>{if(a=t.normalize(a),a.includes("node_modules")){let u=Fd.get(a);if(u)return mt(t,u.content)}let c;try{c=t.readFileSync(a)}catch{console.error(`Could not read: ${a}`),c==null}if(c==null){let u=t.basename(a),l=t.extname(u).toLowerCase();if(a.startsWith(i)&&l===".ts"&&(c=xk.get(u),c==null&&typeof self<"u"&&typeof fetch=="function"))throw new ng(u)}return a.includes("node_modules")&&(c?Fd.set(a,{exists:!0,content:c}):Fd.set(a,{exists:!1})),mt(t,c)},readFile:a=>{let c=t.readFileSync(a);return typeof c=="string"?c:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return lte(t,o,e,r)}catch(a){if(a instanceof ng){await pte(t,a.libName);continue}throw t.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${e[0]}`,{cause:a})}}function lte(t,e,r,n){let i={rootNames:[...r],host:e,options:{}},s=t.ts.findConfigFile(t.dirname(r[0]),o=>t.existsSync(o));if(s){let o=bk.get(s);if(!o){let a=t.ts.readConfigFile(s,c=>{let u=t.readFileSync(c);return typeof u=="string"?u:void 0});a.error?t.Sentry?.captureException(new Error("Error reading tsconfig for createTsProgram"),{extra:{error:a.error,tsConfigPath:s}}):(o=t.ts.parseJsonConfigFileContent(a.config,t.ts.sys||{useCaseSensitiveFileNames:!1,readDirectory:(u,l)=>t.readdirSync(u),fileExists:u=>t.existsSync(u),readFile:u=>t.readFileSync(u)||void 0},t.dirname(s),void 0,s).options,bk.set(s,o))}o&&(i.options=pi(o))}return i.options.noEmit=!0,i.options.isolatedModules=!1,i.options.strict=!1,i.options.jsx=t.ts.JsxEmit.Preserve,i.options.allowJs=!0,Object.assign(i.options,n),t.ts.createProgram(i)}async function cl(t,e,r){r||(r=await Rr(t,[e]));let n=r.getSourceFile(e);if(!n)throw new Error(`getTypeChecker() Could not find source file: ${e}`);return{typeChecker:r.getTypeChecker(),sourceFile:n}}async function pte(t,e){let r=`https://cdn.jsdelivr.net/npm/typescript@${t.ts.version}/lib/${e}`;rg.has(e)||rg.set(e,fetch(r).then(n=>n.text()).then(n=>{xk.set(e,n)})),await rg.get(e),rg.delete(e)}async function Dk(t,e){let r=await t.readFile(e.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${e.filePath}`}],code:null,output:null}:k0(t,{code:r,filePath:e.filePath,compilerOptions:e.compilerOptions})}function k0(t,e){let r={diagnostics:[],code:e.code,output:null};try{let n=t.ts.transpileModule(e.code,{compilerOptions:e.compilerOptions,fileName:e.filePath??"module.tsx",reportDiagnostics:!0});n.diagnostics?.forEach(i=>{r.diagnostics.push({messageText:String(i.messageText)})}),r.output=n.outputText}catch(n){console.error("transpileModule",n),r.diagnostics.push({messageText:String(n)})}return r}var ng,xk,rg,Fd,bk,ki=N(()=>{"use strict";h();dr();at();un();ng=class{libName;constructor(e){this.libName=e}};xk=new Map,rg=new Map,Fd=new Map,bk=new Map});var dte,Xe,_r=N(()=>{"use strict";h();dte="1.
|
|
68
|
+
`,getSourceFile:a=>{if(a=t.normalize(a),a.includes("node_modules")){let u=Fd.get(a);if(u)return mt(t,u.content)}let c;try{c=t.readFileSync(a)}catch{console.error(`Could not read: ${a}`),c==null}if(c==null){let u=t.basename(a),l=t.extname(u).toLowerCase();if(a.startsWith(i)&&l===".ts"&&(c=xk.get(u),c==null&&typeof self<"u"&&typeof fetch=="function"))throw new ng(u)}return a.includes("node_modules")&&(c?Fd.set(a,{exists:!0,content:c}):Fd.set(a,{exists:!1})),mt(t,c)},readFile:a=>{let c=t.readFileSync(a);return typeof c=="string"?c:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return lte(t,o,e,r)}catch(a){if(a instanceof ng){await pte(t,a.libName);continue}throw t.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${e[0]}`,{cause:a})}}function lte(t,e,r,n){let i={rootNames:[...r],host:e,options:{}},s=t.ts.findConfigFile(t.dirname(r[0]),o=>t.existsSync(o));if(s){let o=bk.get(s);if(!o){let a=t.ts.readConfigFile(s,c=>{let u=t.readFileSync(c);return typeof u=="string"?u:void 0});a.error?t.Sentry?.captureException(new Error("Error reading tsconfig for createTsProgram"),{extra:{error:a.error,tsConfigPath:s}}):(o=t.ts.parseJsonConfigFileContent(a.config,t.ts.sys||{useCaseSensitiveFileNames:!1,readDirectory:(u,l)=>t.readdirSync(u),fileExists:u=>t.existsSync(u),readFile:u=>t.readFileSync(u)||void 0},t.dirname(s),void 0,s).options,bk.set(s,o))}o&&(i.options=pi(o))}return i.options.noEmit=!0,i.options.isolatedModules=!1,i.options.strict=!1,i.options.jsx=t.ts.JsxEmit.Preserve,i.options.allowJs=!0,Object.assign(i.options,n),t.ts.createProgram(i)}async function cl(t,e,r){r||(r=await Rr(t,[e]));let n=r.getSourceFile(e);if(!n)throw new Error(`getTypeChecker() Could not find source file: ${e}`);return{typeChecker:r.getTypeChecker(),sourceFile:n}}async function pte(t,e){let r=`https://cdn.jsdelivr.net/npm/typescript@${t.ts.version}/lib/${e}`;rg.has(e)||rg.set(e,fetch(r).then(n=>n.text()).then(n=>{xk.set(e,n)})),await rg.get(e),rg.delete(e)}async function Dk(t,e){let r=await t.readFile(e.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${e.filePath}`}],code:null,output:null}:k0(t,{code:r,filePath:e.filePath,compilerOptions:e.compilerOptions})}function k0(t,e){let r={diagnostics:[],code:e.code,output:null};try{let n=t.ts.transpileModule(e.code,{compilerOptions:e.compilerOptions,fileName:e.filePath??"module.tsx",reportDiagnostics:!0});n.diagnostics?.forEach(i=>{r.diagnostics.push({messageText:String(i.messageText)})}),r.output=n.outputText}catch(n){console.error("transpileModule",n),r.diagnostics.push({messageText:String(n)})}return r}var ng,xk,rg,Fd,bk,ki=N(()=>{"use strict";h();dr();at();un();ng=class{libName;constructor(e){this.libName=e}};xk=new Map,rg=new Map,Fd=new Map,bk=new Map});var dte,Xe,_r=N(()=>{"use strict";h();dte="1.16.1",Xe=process.env.OVERRIDE_VERSION??dte});async function vc(t){let e=[],r=await ps(t,t.getRepoRootDir());if(r){let n=await Ck(r,t);e.push(...n)}return e}async function Ck(t,e){let r=[];if(t&&typeof t=="object"){let n=new Set(Object.keys({...t.dependencies,...t.devDependencies}));for(let i of fte)if(n.has(i)&&!r.some(s=>s.name===i)){let s={name:i};Ek.has(i)&&(s.version=await Ek.get(i)(e)),r.push(s)}}return r}function I0(t){let e=parseInt(t);return Number.isNaN(e)?void 0:e}var Ek,fte,bc=N(()=>{"use strict";h();un();at();Ek=new Map([["next",async t=>{if(!t.spawnSync)return;let e=yk(),r=e==="npm"?"npx":e,{stdout:n}=t.spawnSync(r,["next","-v"],{encoding:"utf8"});if(!n)return;let i=n.match(/(Next.js v)([\d.]+)/g);if(!i)return;let s=i[0].split("Next.js v")[1],[o,a,c]=s.split(".");return{major:I0(o),minor:I0(a),patch:I0(c)}}]]),fte=["@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 Ii(t){let e=wk(t),r=await t.readFile(e);return typeof r=="string"?JSON.parse(r):{}}async function Ni(t,e){e=typeof e=="object"&&e!=null?e:{};let r=wk(t);await t.writeFile(r,JSON.stringify(e??{},null,2))}function wk(t){let e=t.getAppRootDir();return t.join(e,"node_modules",".builder","builder-cache.json")}var xc=N(()=>{"use strict";h()});async function Ms(t,e,r){let n={envKey:r,envValue:null,file:""};for(let i of e){let s=t.join(t.getAppRootDir(),i),o=await mte(t,s);if(o){let a=o[r];if(typeof a=="string"&&a.length>0&&a!=="YOUR_API_KEY")return n.envValue=a,n.file=s,n}}return n.file=t.join(t.getAppRootDir(),e[e.length-1]),n}async function mte(t,e){let r=await t.readFile(e);return typeof r=="string"?Sk(r):null}function Sk(t){let e={},r=t.replace(/\r\n?/gm,`
|
|
69
69
|
`),n;for(;(n=hte.exec(r))!=null;){let i=n[1],s=n[2]||"";s=s.trim();let o=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),o==='"'&&(s=s.replace(/\\n/g,`
|
|
70
70
|
`),s=s.replace(/\\r/g,"\r")),e[i]=s}return e}async function Ls(t,e,r,n){let i="# https://www.builder.io/c/docs/using-your-api-key",s=await t.readFile(e);try{if(s)if(s.includes(r))if(s.includes(n))t.debug(`"${r}" with "${n}" already set in ${e}`);else return t.debug(`Replace "${r}" in ${e}`),s=s.replace(new RegExp(`${r}=.*`),`${r}=${n}`),await t.writeFile(e,s),"update";else return t.debug(`Append "${r}" to ${e}`),s+=`
|
|
71
71
|
|
|
@@ -1098,7 +1098,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),K=$,j=G),Z===void 0&&(
|
|
|
1098
1098
|
`:`
|
|
1099
1099
|
`)+r,i=n+1,n=t.indexOf(`
|
|
1100
1100
|
`,i)}while(n!==-1);return s+=t.slice(i),s}var MO=N(()=>{h()});function rf(t){return UO(t)}var LO,$O,QD,Al,tf,jO,_l,ooe,Lg,UO,ZD,aoe,coe,eE,$g,uoe,$je,jje,qO=N(()=>{h();FO();RO();MO();({stdout:LO,stderr:$O}=NO),QD=Symbol("GENERATOR"),Al=Symbol("STYLER"),tf=Symbol("IS_EMPTY"),jO=["ansi","ansi","ansi256","ansi16m"],_l=Object.create(null),ooe=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=LO?LO.level:0;t.level=e.level===void 0?r:e.level},Lg=class{constructor(e){return UO(e)}},UO=t=>{let e=(...r)=>r.join(" ");return ooe(e,t),Object.setPrototypeOf(e,rf.prototype),e};Object.setPrototypeOf(rf.prototype,Function.prototype);for(let[t,e]of Object.entries(gs))_l[t]={get(){let r=$g(this,eE(e.open,e.close,this[Al]),this[tf]);return Object.defineProperty(this,t,{value:r}),r}};_l.visible={get(){let t=$g(this,this[Al],!0);return Object.defineProperty(this,"visible",{value:t}),t}};ZD=(t,e,r,...n)=>t==="rgb"?e==="ansi16m"?gs[r].ansi16m(...n):e==="ansi256"?gs[r].ansi256(gs.rgbToAnsi256(...n)):gs[r].ansi(gs.rgbToAnsi(...n)):t==="hex"?ZD("rgb",e,r,...gs.hexToRgb(...n)):gs[r][t](...n),aoe=["rgb","hex","ansi256"];for(let t of aoe){_l[t]={get(){let{level:r}=this;return function(...n){let i=eE(ZD(t,jO[r],"color",...n),gs.color.close,this[Al]);return $g(this,i,this[tf])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);_l[e]={get(){let{level:r}=this;return function(...n){let i=eE(ZD(t,jO[r],"bgColor",...n),gs.bgColor.close,this[Al]);return $g(this,i,this[tf])}}}}coe=Object.defineProperties(()=>{},{..._l,level:{enumerable:!0,get(){return this[QD].level},set(t){this[QD].level=t}}}),eE=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},$g=(t,e,r)=>{let n=(...i)=>uoe(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,coe),n[QD]=t,n[Al]=e,n[tf]=r,n},uoe=(t,e)=>{if(t.level<=0||!e)return t[tf]?"":e;let r=t[Al];if(r===void 0)return e;let{openAll:n,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=OO(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
|
|
1101
|
-
`);return s!==-1&&(e=BO(e,i,n,s)),n+e+i};Object.defineProperties(rf.prototype,_l);$je=rf(),jje=rf({level:$O?$O.level:0})});function nf(t){let e=JD(t);return{highlight:r,highlightAuto:n,listLanguages:e.listLanguages,register:e.register,registerAlias:e.registerAlias,registered:e.registered};function r(i,s,o){let a=e.highlight(i,s),c=a.data;return{language:c.language,relevance:c.relevance,value:tE(o||zO,a)}}function n(i,s){let o,a;if(s&&("subset"in s||"sheet"in s)){let l=s;a={subset:l.subset},o=l.sheet}else o=s;let c=e.highlightAuto(i,a),u=c.data;return{language:u.language,relevance:u.relevance,value:tE(o||zO,c)}}}function tE(t,e){let r=new Set(e.type==="element"&&Array.isArray(e.properties.className)?e.properties.className.map(function(a){return String(a).replace(/^hljs-/,"")}):[]),n={},i,s="",o;for(o in t)if(Object.hasOwn(t,o)){let a=o.split(" "),c=t[o];r.has(a[0])?a.length===1?i=c:n[a.slice(1).join(" ")]=c:n[o]=c}return"value"in e?s=e.value:"children"in e&&(s=loe(n,e.children)),i&&(s=i(s)),s}function loe(t,e){let r=[],n=-1;for(;++n<e.length;)r.push(tE(t,e[n]));return r.join("")}var ut,zO,GO=N(()=>{h();qO();YD();ut=new Lg({level:2}),zO={comment:ut.gray,quote:ut.gray,keyword:ut.green,"selector-tag":ut.green,addition:ut.green,number:ut.cyan,string:ut.cyan,"meta meta-string":ut.cyan,literal:ut.cyan,doctag:ut.cyan,regexp:ut.cyan,title:ut.blue,section:ut.blue,name:ut.blue,"selector-id":ut.blue,"selector-class":ut.blue,attribute:ut.yellow,attr:ut.yellow,variable:ut.yellow,"template-variable":ut.yellow,"class title":ut.yellow,type:ut.yellow,symbol:ut.magenta,bullet:ut.magenta,subst:ut.magenta,meta:ut.magenta,"meta keyword":ut.magenta,"selector-attr":ut.magenta,"selector-pseudo":ut.magenta,link:ut.magenta,built_in:ut.red,deletion:ut.red,emphasis:ut.italic,strong:ut.bold,formula:ut.inverse}});var rE=N(()=>{h();YD();GO()});async function xe(t){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([HO.flush(2e3),VO.flush().promise])}catch(e){console.error(e)}process.exit(t)}var HO,VO,Mi=N(()=>{"use strict";h();HO=Y(require("@sentry/node"),1),VO=Y(require("@amplitude/analytics-node"),1)});var rt,Pn=N(()=>{"use strict";h();rt=process.env.AIR_HOST||"https://api.builder.io"});var WO,KO=N(()=>{WO="1.15.2"});var YO=S(nE=>{h();var JO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");nE.encode=function(t){if(0<=t&&t<JO.length)return JO[t];throw new TypeError("Must be between 0 and 63: "+t)};nE.decode=function(t){var e=65,r=90,n=97,i=122,s=48,o=57,a=43,c=47,u=26,l=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+u:s<=t&&t<=o?t-s+l:t==a?62:t==c?63:-1}});var oE=S(sE=>{h();var XO=YO(),iE=5,QO=1<<iE,ZO=QO-1,eB=QO;function doe(t){return t<0?(-t<<1)+1:(t<<1)+0}function foe(t){var e=(t&1)===1,r=t>>1;return e?-r:r}sE.encode=function(e){var r="",n,i=doe(e);do n=i&ZO,i>>>=iE,i>0&&(n|=eB),r+=XO.encode(n);while(i>0);return r};sE.decode=function(e,r,n){var i=e.length,s=0,o=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=XO.decode(e.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(c&eB),c&=ZO,s=s+(c<<o),o+=iE}while(a);n.value=foe(s),n.rest=r}});var kl=S(zr=>{h();function moe(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}zr.getArg=moe;var tB=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,hoe=/^data:.+\,.+$/;function sf(t){var e=t.match(tB);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}zr.urlParse=sf;function Fl(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}zr.urlGenerate=Fl;var goe=32;function yoe(t){var e=[];return function(r){for(var n=0;n<e.length;n++)if(e[n].input===r){var i=e[0];return e[0]=e[n],e[n]=i,e[0].result}var s=t(r);return e.unshift({input:r,result:s}),e.length>goe&&e.pop(),s}}var aE=yoe(function(e){var r=e,n=sf(e);if(n){if(!n.path)return e;r=n.path}for(var i=zr.isAbsolute(r),s=[],o=0,a=0;;)if(o=a,a=r.indexOf("/",o),a===-1){s.push(r.slice(o));break}else for(s.push(r.slice(o,a));a<r.length&&r[a]==="/";)a++;for(var c,u=0,a=s.length-1;a>=0;a--)c=s[a],c==="."?s.splice(a,1):c===".."?u++:u>0&&(c===""?(s.splice(a+1,u),u=0):(s.splice(a,2),u--));return r=s.join("/"),r===""&&(r=i?"/":"."),n?(n.path=r,Fl(n)):r});zr.normalize=aE;function rB(t,e){t===""&&(t="."),e===""&&(e=".");var r=sf(e),n=sf(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Fl(r);if(r||e.match(hoe))return e;if(n&&!n.host&&!n.path)return n.host=e,Fl(n);var i=e.charAt(0)==="/"?e:aE(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Fl(n)):i}zr.join=rB;zr.isAbsolute=function(t){return t.charAt(0)==="/"||tB.test(t)};function voe(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}zr.relative=voe;var nB=(function(){var t=Object.create(null);return!("__proto__"in t)})();function iB(t){return t}function boe(t){return sB(t)?"$"+t:t}zr.toSetString=nB?iB:boe;function xoe(t){return sB(t)?t.slice(1):t}zr.fromSetString=nB?iB:xoe;function sB(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function Doe(t,e,r){var n=Bo(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:Bo(t.name,e.name)}zr.compareByOriginalPositions=Doe;function Eoe(t,e,r){var n;return n=t.originalLine-e.originalLine,n!==0||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:Bo(t.name,e.name)}zr.compareByOriginalPositionsNoSource=Eoe;function Coe(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=Bo(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Bo(t.name,e.name)}zr.compareByGeneratedPositionsDeflated=Coe;function woe(t,e,r){var n=t.generatedColumn-e.generatedColumn;return n!==0||r||(n=Bo(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Bo(t.name,e.name)}zr.compareByGeneratedPositionsDeflatedNoLine=woe;function Bo(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function Soe(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=Bo(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Bo(t.name,e.name)}zr.compareByGeneratedPositionsInflated=Soe;function Toe(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}zr.parseSourceMapInput=Toe;function Poe(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=sf(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=rB(Fl(n),e)}return aE(e)}zr.computeSourceURL=Poe});var lE=S(oB=>{h();var cE=kl(),uE=Object.prototype.hasOwnProperty,Ic=typeof Map<"u";function Mo(){this._array=[],this._set=Ic?new Map:Object.create(null)}Mo.fromArray=function(e,r){for(var n=new Mo,i=0,s=e.length;i<s;i++)n.add(e[i],r);return n};Mo.prototype.size=function(){return Ic?this._set.size:Object.getOwnPropertyNames(this._set).length};Mo.prototype.add=function(e,r){var n=Ic?e:cE.toSetString(e),i=Ic?this.has(e):uE.call(this._set,n),s=this._array.length;(!i||r)&&this._array.push(e),i||(Ic?this._set.set(e,s):this._set[n]=s)};Mo.prototype.has=function(e){if(Ic)return this._set.has(e);var r=cE.toSetString(e);return uE.call(this._set,r)};Mo.prototype.indexOf=function(e){if(Ic){var r=this._set.get(e);if(r>=0)return r}else{var n=cE.toSetString(e);if(uE.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};Mo.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Mo.prototype.toArray=function(){return this._array.slice()};oB.ArraySet=Mo});var uB=S(cB=>{h();var aB=kl();function Aoe(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,s=e.generatedColumn;return n>r||n==r&&s>=i||aB.compareByGeneratedPositionsInflated(t,e)<=0}function jg(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}jg.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};jg.prototype.add=function(e){Aoe(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};jg.prototype.toArray=function(){return this._sorted||(this._array.sort(aB.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};cB.MappingList=jg});var pE=S(lB=>{h();var of=oE(),Dr=kl(),Ug=lE().ArraySet,_oe=uB().MappingList;function Li(t){t||(t={}),this._file=Dr.getArg(t,"file",null),this._sourceRoot=Dr.getArg(t,"sourceRoot",null),this._skipValidation=Dr.getArg(t,"skipValidation",!1),this._ignoreInvalidMapping=Dr.getArg(t,"ignoreInvalidMapping",!1),this._sources=new Ug,this._names=new Ug,this._mappings=new _oe,this._sourcesContents=null}Li.prototype._version=3;Li.fromSourceMap=function(e,r){var n=e.sourceRoot,i=new Li(Object.assign(r||{},{file:e.file,sourceRoot:n}));return e.eachMapping(function(s){var o={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(o.source=s.source,n!=null&&(o.source=Dr.relative(n,o.source)),o.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(o.name=s.name)),i.addMapping(o)}),e.sources.forEach(function(s){var o=s;n!==null&&(o=Dr.relative(n,s)),i._sources.has(o)||i._sources.add(o);var a=e.sourceContentFor(s);a!=null&&i.setSourceContent(s,a)}),i};Li.prototype.addMapping=function(e){var r=Dr.getArg(e,"generated"),n=Dr.getArg(e,"original",null),i=Dr.getArg(e,"source",null),s=Dr.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(r,n,i,s)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:s}))};Li.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=Dr.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Dr.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Dr.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Li.prototype.applySourceMap=function(e,r,n){var i=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var s=this._sourceRoot;s!=null&&(i=Dr.relative(s,i));var o=new Ug,a=new Ug;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var u=e.originalPositionFor({line:c.originalLine,column:c.originalColumn});u.source!=null&&(c.source=u.source,n!=null&&(c.source=Dr.join(n,c.source)),s!=null&&(c.source=Dr.relative(s,c.source)),c.originalLine=u.line,c.originalColumn=u.column,u.name!=null&&(c.name=u.name))}var l=c.source;l!=null&&!o.has(l)&&o.add(l);var p=c.name;p!=null&&!a.has(p)&&a.add(p)},this),this._sources=o,this._names=a,e.sources.forEach(function(c){var u=e.sourceContentFor(c);u!=null&&(n!=null&&(c=Dr.join(n,c)),s!=null&&(c=Dr.relative(s,c)),this.setSourceContent(c,u))},this)};Li.prototype._validateMapping=function(e,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number"){var s="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(s),!1;throw new Error(s)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!i)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;var s="Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};Li.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,s=0,o=0,a="",c,u,l,p,d=this._mappings.toArray(),f=0,m=d.length;f<m;f++){if(u=d[f],c="",u.generatedLine!==r)for(e=0;u.generatedLine!==r;)c+=";",r++;else if(f>0){if(!Dr.compareByGeneratedPositionsInflated(u,d[f-1]))continue;c+=","}c+=of.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(p=this._sources.indexOf(u.source),c+=of.encode(p-o),o=p,c+=of.encode(u.originalLine-1-i),i=u.originalLine-1,c+=of.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(l=this._names.indexOf(u.name),c+=of.encode(l-s),s=l)),a+=c}return a};Li.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Dr.relative(r,n));var i=Dr.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Li.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};Li.prototype.toString=function(){return JSON.stringify(this.toJSON())};lB.SourceMapGenerator=Li});var pB=S(Nc=>{h();Nc.GREATEST_LOWER_BOUND=1;Nc.LEAST_UPPER_BOUND=2;function dE(t,e,r,n,i,s){var o=Math.floor((e-t)/2)+t,a=i(r,n[o],!0);return a===0?o:a>0?e-o>1?dE(o,e,r,n,i,s):s==Nc.LEAST_UPPER_BOUND?e<n.length?e:-1:o:o-t>1?dE(t,o,r,n,i,s):s==Nc.LEAST_UPPER_BOUND?o:t<0?-1:t}Nc.search=function(e,r,n,i){if(r.length===0)return-1;var s=dE(-1,r.length,e,r,n,i||Nc.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(r[s],r[s-1],!0)===0;)--s;return s}});var mB=S(fB=>{h();function Foe(t){function e(i,s,o){var a=i[s];i[s]=i[o],i[o]=a}function r(i,s){return Math.round(i+Math.random()*(s-i))}function n(i,s,o,a){if(o<a){var c=r(o,a),u=o-1;e(i,c,a);for(var l=i[a],p=o;p<a;p++)s(i[p],l,!1)<=0&&(u+=1,e(i,u,p));e(i,u+1,p);var d=u+1;n(i,s,o,d-1),n(i,s,d+1,a)}}return n}function koe(t){let e=Foe.toString();return new Function(`return ${e}`)()(t)}var dB=new WeakMap;fB.quickSort=function(t,e,r=0){let n=dB.get(e);n===void 0&&(n=koe(e),dB.set(e,n)),n(t,e,r,t.length-1)}});var yB=S(qg=>{h();var Ce=kl(),mE=pB(),Il=lE().ArraySet,Ioe=oE(),af=mB().quickSort;function Zt(t,e){var r=t;return typeof t=="string"&&(r=Ce.parseSourceMapInput(t)),r.sections!=null?new ys(r,e):new tn(r,e)}Zt.fromSourceMap=function(t,e){return tn.fromSourceMap(t,e)};Zt.prototype._version=3;Zt.prototype.__generatedMappings=null;Object.defineProperty(Zt.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});Zt.prototype.__originalMappings=null;Object.defineProperty(Zt.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});Zt.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};Zt.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};Zt.GENERATED_ORDER=1;Zt.ORIGINAL_ORDER=2;Zt.GREATEST_LOWER_BOUND=1;Zt.LEAST_UPPER_BOUND=2;Zt.prototype.eachMapping=function(e,r,n){var i=r||null,s=n||Zt.GENERATED_ORDER,o;switch(s){case Zt.GENERATED_ORDER:o=this._generatedMappings;break;case Zt.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var a=this.sourceRoot,c=e.bind(i),u=this._names,l=this._sources,p=this._sourceMapURL,d=0,f=o.length;d<f;d++){var m=o[d],g=m.source===null?null:l.at(m.source);g!==null&&(g=Ce.computeSourceURL(a,g,p)),c({source:g,generatedLine:m.generatedLine,generatedColumn:m.generatedColumn,originalLine:m.originalLine,originalColumn:m.originalColumn,name:m.name===null?null:u.at(m.name)})}};Zt.prototype.allGeneratedPositionsFor=function(e){var r=Ce.getArg(e,"line"),n={source:Ce.getArg(e,"source"),originalLine:r,originalColumn:Ce.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",Ce.compareByOriginalPositions,mE.LEAST_UPPER_BOUND);if(s>=0){var o=this._originalMappings[s];if(e.column===void 0)for(var a=o.originalLine;o&&o.originalLine===a;)i.push({line:Ce.getArg(o,"generatedLine",null),column:Ce.getArg(o,"generatedColumn",null),lastColumn:Ce.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s];else for(var c=o.originalColumn;o&&o.originalLine===r&&o.originalColumn==c;)i.push({line:Ce.getArg(o,"generatedLine",null),column:Ce.getArg(o,"generatedColumn",null),lastColumn:Ce.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return i};qg.SourceMapConsumer=Zt;function tn(t,e){var r=t;typeof t=="string"&&(r=Ce.parseSourceMapInput(t));var n=Ce.getArg(r,"version"),i=Ce.getArg(r,"sources"),s=Ce.getArg(r,"names",[]),o=Ce.getArg(r,"sourceRoot",null),a=Ce.getArg(r,"sourcesContent",null),c=Ce.getArg(r,"mappings"),u=Ce.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=Ce.normalize(o)),i=i.map(String).map(Ce.normalize).map(function(l){return o&&Ce.isAbsolute(o)&&Ce.isAbsolute(l)?Ce.relative(o,l):l}),this._names=Il.fromArray(s.map(String),!0),this._sources=Il.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(l){return Ce.computeSourceURL(o,l,e)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=u}tn.prototype=Object.create(Zt.prototype);tn.prototype.consumer=Zt;tn.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=Ce.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};tn.fromSourceMap=function(e,r){var n=Object.create(tn.prototype),i=n._names=Il.fromArray(e._names.toArray(),!0),s=n._sources=Il.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(f){return Ce.computeSourceURL(n.sourceRoot,f,r)});for(var o=e._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],u=0,l=o.length;u<l;u++){var p=o[u],d=new gB;d.generatedLine=p.generatedLine,d.generatedColumn=p.generatedColumn,p.source&&(d.source=s.indexOf(p.source),d.originalLine=p.originalLine,d.originalColumn=p.originalColumn,p.name&&(d.name=i.indexOf(p.name)),c.push(d)),a.push(d)}return af(n.__originalMappings,Ce.compareByOriginalPositions),n};tn.prototype._version=3;Object.defineProperty(tn.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function gB(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var fE=Ce.compareByGeneratedPositionsDeflatedNoLine;function hB(t,e){let r=t.length,n=t.length-e;if(!(n<=1))if(n==2){let i=t[e],s=t[e+1];fE(i,s)>0&&(t[e]=s,t[e+1]=i)}else if(n<20)for(let i=e;i<r;i++)for(let s=i;s>e;s--){let o=t[s-1],a=t[s];if(fE(o,a)<=0)break;t[s-1]=a,t[s]=o}else af(t,fE,e)}tn.prototype._parseMappings=function(e,r){var n=1,i=0,s=0,o=0,a=0,c=0,u=e.length,l=0,p={},d={},f=[],m=[],g,y,v,D,E;let x=0;for(;l<u;)if(e.charAt(l)===";")n++,l++,i=0,hB(m,x),x=m.length;else if(e.charAt(l)===",")l++;else{for(g=new gB,g.generatedLine=n,D=l;D<u&&!this._charIsMappingSeparator(e,D);D++);for(y=e.slice(l,D),v=[];l<D;)Ioe.decode(e,l,d),E=d.value,l=d.rest,v.push(E);if(v.length===2)throw new Error("Found a source, but no line and column");if(v.length===3)throw new Error("Found a source and line, but no column");if(g.generatedColumn=i+v[0],i=g.generatedColumn,v.length>1&&(g.source=a+v[1],a+=v[1],g.originalLine=s+v[2],s=g.originalLine,g.originalLine+=1,g.originalColumn=o+v[3],o=g.originalColumn,v.length>4&&(g.name=c+v[4],c+=v[4])),m.push(g),typeof g.originalLine=="number"){let C=g.source;for(;f.length<=C;)f.push(null);f[C]===null&&(f[C]=[]),f[C].push(g)}}hB(m,x),this.__generatedMappings=m;for(var b=0;b<f.length;b++)f[b]!=null&&af(f[b],Ce.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...f)};tn.prototype._findMapping=function(e,r,n,i,s,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return mE.search(e,r,s,o)};tn.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};tn.prototype.originalPositionFor=function(e){var r={generatedLine:Ce.getArg(e,"line"),generatedColumn:Ce.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",Ce.compareByGeneratedPositionsDeflated,Ce.getArg(e,"bias",Zt.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var s=Ce.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=Ce.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var o=Ce.getArg(i,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:Ce.getArg(i,"originalLine",null),column:Ce.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};tn.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};tn.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i=e;this.sourceRoot!=null&&(i=Ce.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=Ce.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!s.path||s.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};tn.prototype.generatedPositionFor=function(e){var r=Ce.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:Ce.getArg(e,"line"),originalColumn:Ce.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",Ce.compareByOriginalPositions,Ce.getArg(e,"bias",Zt.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:Ce.getArg(s,"generatedLine",null),column:Ce.getArg(s,"generatedColumn",null),lastColumn:Ce.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};qg.BasicSourceMapConsumer=tn;function ys(t,e){var r=t;typeof t=="string"&&(r=Ce.parseSourceMapInput(t));var n=Ce.getArg(r,"version"),i=Ce.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Il,this._names=new Il;var s={line:-1,column:0};this._sections=i.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var a=Ce.getArg(o,"offset"),c=Ce.getArg(a,"line"),u=Ce.getArg(a,"column");if(c<s.line||c===s.line&&u<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=a,{generatedOffset:{generatedLine:c+1,generatedColumn:u+1},consumer:new Zt(Ce.getArg(o,"map"),e)}})}ys.prototype=Object.create(Zt.prototype);ys.prototype.constructor=Zt;ys.prototype._version=3;Object.defineProperty(ys.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});ys.prototype.originalPositionFor=function(e){var r={generatedLine:Ce.getArg(e,"line"),generatedColumn:Ce.getArg(e,"column")},n=mE.search(r,this._sections,function(s,o){var a=s.generatedLine-o.generatedOffset.generatedLine;return a||s.generatedColumn-o.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};ys.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};ys.prototype.sourceContentFor=function(e,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],s=i.consumer.sourceContentFor(e,!0);if(s||s==="")return s}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};ys.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(Ce.getArg(e,"source"))!==-1){var i=n.consumer.generatedPositionFor(e);if(i){var s={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};ys.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],s=i.consumer._generatedMappings,o=0;o<s.length;o++){var a=s[o],c=i.consumer._sources.at(a.source);c!==null&&(c=Ce.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL)),this._sources.add(c),c=this._sources.indexOf(c);var u=null;a.name&&(u=i.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var l={source:c,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(l),typeof l.originalLine=="number"&&this.__originalMappings.push(l)}af(this.__generatedMappings,Ce.compareByGeneratedPositionsDeflated),af(this.__originalMappings,Ce.compareByOriginalPositions)};qg.IndexedSourceMapConsumer=ys});var bB=S(vB=>{h();var Noe=pE().SourceMapGenerator,zg=kl(),Roe=/(\r?\n)/,Ooe=10,Nl="$$$isSourceNode$$$";function fi(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=i??null,this[Nl]=!0,n!=null&&this.add(n)}fi.fromStringWithSourceMap=function(e,r,n){var i=new fi,s=e.split(Roe),o=0,a=function(){var d=m(),f=m()||"";return d+f;function m(){return o<s.length?s[o++]:void 0}},c=1,u=0,l=null;return r.eachMapping(function(d){if(l!==null)if(c<d.generatedLine)p(l,a()),c++,u=0;else{var f=s[o]||"",m=f.substr(0,d.generatedColumn-u);s[o]=f.substr(d.generatedColumn-u),u=d.generatedColumn,p(l,m),l=d;return}for(;c<d.generatedLine;)i.add(a()),c++;if(u<d.generatedColumn){var f=s[o]||"";i.add(f.substr(0,d.generatedColumn)),s[o]=f.substr(d.generatedColumn),u=d.generatedColumn}l=d},this),o<s.length&&(l&&p(l,a()),i.add(s.splice(o).join(""))),r.sources.forEach(function(d){var f=r.sourceContentFor(d);f!=null&&(n!=null&&(d=zg.join(n,d)),i.setSourceContent(d,f))}),i;function p(d,f){if(d===null||d.source===void 0)i.add(f);else{var m=n?zg.join(n,d.source):d.source;i.add(new fi(d.originalLine,d.originalColumn,m,f,d.name))}}};fi.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[Nl]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};fi.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[Nl]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};fi.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[Nl]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};fi.prototype.join=function(e){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this};fi.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[Nl]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};fi.prototype.setSourceContent=function(e,r){this.sourceContents[zg.toSetString(e)]=r};fi.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Nl]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(zg.fromSetString(i[r]),this.sourceContents[i[r]])};fi.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};fi.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new Noe(e),i=!1,s=null,o=null,a=null,c=null;return this.walk(function(u,l){r.code+=u,l.source!==null&&l.line!==null&&l.column!==null?((s!==l.source||o!==l.line||a!==l.column||c!==l.name)&&n.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name}),s=l.source,o=l.line,a=l.column,c=l.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),s=null,i=!1);for(var p=0,d=u.length;p<d;p++)u.charCodeAt(p)===Ooe?(r.line++,r.column=0,p+1===d?(s=null,i=!1):i&&n.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name})):r.column++}),this.walkSourceContents(function(u,l){n.setSourceContent(u,l)}),{code:r.code,map:n}};vB.SourceNode=fi});var xB=S(Gg=>{h();Gg.SourceMapGenerator=pE().SourceMapGenerator;Gg.SourceMapConsumer=yB().SourceMapConsumer;Gg.SourceNode=bB().SourceNode});var XB=S(yf=>{"use strict";h();Object.defineProperty(yf,"__esModule",{value:!0});function Boe(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}var Qs=class{constructor(e,r,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=r,this.index=n}},Ll=class{constructor(e,r){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=r}};function _n(t,e){let{line:r,column:n,index:i}=t;return new Qs(r,n+e,i+e)}var DB="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",Moe={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:DB},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:DB}},EB={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"},Kg=t=>t.type==="UpdateExpression"?EB.UpdateExpression[`${t.prefix}`]:EB[t.type],Loe={AccessorIsGenerator:({kind:t})=>`A ${t}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:t})=>`Missing initializer in ${t} 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:t})=>`\`${t}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:t})=>`'import.${t}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:t,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
1101
|
+
`);return s!==-1&&(e=BO(e,i,n,s)),n+e+i};Object.defineProperties(rf.prototype,_l);$je=rf(),jje=rf({level:$O?$O.level:0})});function nf(t){let e=JD(t);return{highlight:r,highlightAuto:n,listLanguages:e.listLanguages,register:e.register,registerAlias:e.registerAlias,registered:e.registered};function r(i,s,o){let a=e.highlight(i,s),c=a.data;return{language:c.language,relevance:c.relevance,value:tE(o||zO,a)}}function n(i,s){let o,a;if(s&&("subset"in s||"sheet"in s)){let l=s;a={subset:l.subset},o=l.sheet}else o=s;let c=e.highlightAuto(i,a),u=c.data;return{language:u.language,relevance:u.relevance,value:tE(o||zO,c)}}}function tE(t,e){let r=new Set(e.type==="element"&&Array.isArray(e.properties.className)?e.properties.className.map(function(a){return String(a).replace(/^hljs-/,"")}):[]),n={},i,s="",o;for(o in t)if(Object.hasOwn(t,o)){let a=o.split(" "),c=t[o];r.has(a[0])?a.length===1?i=c:n[a.slice(1).join(" ")]=c:n[o]=c}return"value"in e?s=e.value:"children"in e&&(s=loe(n,e.children)),i&&(s=i(s)),s}function loe(t,e){let r=[],n=-1;for(;++n<e.length;)r.push(tE(t,e[n]));return r.join("")}var ut,zO,GO=N(()=>{h();qO();YD();ut=new Lg({level:2}),zO={comment:ut.gray,quote:ut.gray,keyword:ut.green,"selector-tag":ut.green,addition:ut.green,number:ut.cyan,string:ut.cyan,"meta meta-string":ut.cyan,literal:ut.cyan,doctag:ut.cyan,regexp:ut.cyan,title:ut.blue,section:ut.blue,name:ut.blue,"selector-id":ut.blue,"selector-class":ut.blue,attribute:ut.yellow,attr:ut.yellow,variable:ut.yellow,"template-variable":ut.yellow,"class title":ut.yellow,type:ut.yellow,symbol:ut.magenta,bullet:ut.magenta,subst:ut.magenta,meta:ut.magenta,"meta keyword":ut.magenta,"selector-attr":ut.magenta,"selector-pseudo":ut.magenta,link:ut.magenta,built_in:ut.red,deletion:ut.red,emphasis:ut.italic,strong:ut.bold,formula:ut.inverse}});var rE=N(()=>{h();YD();GO()});async function xe(t){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([HO.flush(2e3),VO.flush().promise])}catch(e){console.error(e)}process.exit(t)}var HO,VO,Mi=N(()=>{"use strict";h();HO=Y(require("@sentry/node"),1),VO=Y(require("@amplitude/analytics-node"),1)});var rt,Pn=N(()=>{"use strict";h();rt=process.env.AIR_HOST||"https://api.builder.io"});var WO,KO=N(()=>{WO="1.16.1"});var YO=S(nE=>{h();var JO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");nE.encode=function(t){if(0<=t&&t<JO.length)return JO[t];throw new TypeError("Must be between 0 and 63: "+t)};nE.decode=function(t){var e=65,r=90,n=97,i=122,s=48,o=57,a=43,c=47,u=26,l=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+u:s<=t&&t<=o?t-s+l:t==a?62:t==c?63:-1}});var oE=S(sE=>{h();var XO=YO(),iE=5,QO=1<<iE,ZO=QO-1,eB=QO;function doe(t){return t<0?(-t<<1)+1:(t<<1)+0}function foe(t){var e=(t&1)===1,r=t>>1;return e?-r:r}sE.encode=function(e){var r="",n,i=doe(e);do n=i&ZO,i>>>=iE,i>0&&(n|=eB),r+=XO.encode(n);while(i>0);return r};sE.decode=function(e,r,n){var i=e.length,s=0,o=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=XO.decode(e.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(c&eB),c&=ZO,s=s+(c<<o),o+=iE}while(a);n.value=foe(s),n.rest=r}});var kl=S(zr=>{h();function moe(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}zr.getArg=moe;var tB=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,hoe=/^data:.+\,.+$/;function sf(t){var e=t.match(tB);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}zr.urlParse=sf;function Fl(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}zr.urlGenerate=Fl;var goe=32;function yoe(t){var e=[];return function(r){for(var n=0;n<e.length;n++)if(e[n].input===r){var i=e[0];return e[0]=e[n],e[n]=i,e[0].result}var s=t(r);return e.unshift({input:r,result:s}),e.length>goe&&e.pop(),s}}var aE=yoe(function(e){var r=e,n=sf(e);if(n){if(!n.path)return e;r=n.path}for(var i=zr.isAbsolute(r),s=[],o=0,a=0;;)if(o=a,a=r.indexOf("/",o),a===-1){s.push(r.slice(o));break}else for(s.push(r.slice(o,a));a<r.length&&r[a]==="/";)a++;for(var c,u=0,a=s.length-1;a>=0;a--)c=s[a],c==="."?s.splice(a,1):c===".."?u++:u>0&&(c===""?(s.splice(a+1,u),u=0):(s.splice(a,2),u--));return r=s.join("/"),r===""&&(r=i?"/":"."),n?(n.path=r,Fl(n)):r});zr.normalize=aE;function rB(t,e){t===""&&(t="."),e===""&&(e=".");var r=sf(e),n=sf(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Fl(r);if(r||e.match(hoe))return e;if(n&&!n.host&&!n.path)return n.host=e,Fl(n);var i=e.charAt(0)==="/"?e:aE(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Fl(n)):i}zr.join=rB;zr.isAbsolute=function(t){return t.charAt(0)==="/"||tB.test(t)};function voe(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}zr.relative=voe;var nB=(function(){var t=Object.create(null);return!("__proto__"in t)})();function iB(t){return t}function boe(t){return sB(t)?"$"+t:t}zr.toSetString=nB?iB:boe;function xoe(t){return sB(t)?t.slice(1):t}zr.fromSetString=nB?iB:xoe;function sB(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function Doe(t,e,r){var n=Bo(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:Bo(t.name,e.name)}zr.compareByOriginalPositions=Doe;function Eoe(t,e,r){var n;return n=t.originalLine-e.originalLine,n!==0||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:Bo(t.name,e.name)}zr.compareByOriginalPositionsNoSource=Eoe;function Coe(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=Bo(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Bo(t.name,e.name)}zr.compareByGeneratedPositionsDeflated=Coe;function woe(t,e,r){var n=t.generatedColumn-e.generatedColumn;return n!==0||r||(n=Bo(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Bo(t.name,e.name)}zr.compareByGeneratedPositionsDeflatedNoLine=woe;function Bo(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function Soe(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=Bo(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Bo(t.name,e.name)}zr.compareByGeneratedPositionsInflated=Soe;function Toe(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}zr.parseSourceMapInput=Toe;function Poe(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=sf(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=rB(Fl(n),e)}return aE(e)}zr.computeSourceURL=Poe});var lE=S(oB=>{h();var cE=kl(),uE=Object.prototype.hasOwnProperty,Ic=typeof Map<"u";function Mo(){this._array=[],this._set=Ic?new Map:Object.create(null)}Mo.fromArray=function(e,r){for(var n=new Mo,i=0,s=e.length;i<s;i++)n.add(e[i],r);return n};Mo.prototype.size=function(){return Ic?this._set.size:Object.getOwnPropertyNames(this._set).length};Mo.prototype.add=function(e,r){var n=Ic?e:cE.toSetString(e),i=Ic?this.has(e):uE.call(this._set,n),s=this._array.length;(!i||r)&&this._array.push(e),i||(Ic?this._set.set(e,s):this._set[n]=s)};Mo.prototype.has=function(e){if(Ic)return this._set.has(e);var r=cE.toSetString(e);return uE.call(this._set,r)};Mo.prototype.indexOf=function(e){if(Ic){var r=this._set.get(e);if(r>=0)return r}else{var n=cE.toSetString(e);if(uE.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};Mo.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Mo.prototype.toArray=function(){return this._array.slice()};oB.ArraySet=Mo});var uB=S(cB=>{h();var aB=kl();function Aoe(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,s=e.generatedColumn;return n>r||n==r&&s>=i||aB.compareByGeneratedPositionsInflated(t,e)<=0}function jg(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}jg.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};jg.prototype.add=function(e){Aoe(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};jg.prototype.toArray=function(){return this._sorted||(this._array.sort(aB.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};cB.MappingList=jg});var pE=S(lB=>{h();var of=oE(),Dr=kl(),Ug=lE().ArraySet,_oe=uB().MappingList;function Li(t){t||(t={}),this._file=Dr.getArg(t,"file",null),this._sourceRoot=Dr.getArg(t,"sourceRoot",null),this._skipValidation=Dr.getArg(t,"skipValidation",!1),this._ignoreInvalidMapping=Dr.getArg(t,"ignoreInvalidMapping",!1),this._sources=new Ug,this._names=new Ug,this._mappings=new _oe,this._sourcesContents=null}Li.prototype._version=3;Li.fromSourceMap=function(e,r){var n=e.sourceRoot,i=new Li(Object.assign(r||{},{file:e.file,sourceRoot:n}));return e.eachMapping(function(s){var o={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(o.source=s.source,n!=null&&(o.source=Dr.relative(n,o.source)),o.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(o.name=s.name)),i.addMapping(o)}),e.sources.forEach(function(s){var o=s;n!==null&&(o=Dr.relative(n,s)),i._sources.has(o)||i._sources.add(o);var a=e.sourceContentFor(s);a!=null&&i.setSourceContent(s,a)}),i};Li.prototype.addMapping=function(e){var r=Dr.getArg(e,"generated"),n=Dr.getArg(e,"original",null),i=Dr.getArg(e,"source",null),s=Dr.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(r,n,i,s)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:s}))};Li.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=Dr.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Dr.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Dr.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Li.prototype.applySourceMap=function(e,r,n){var i=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var s=this._sourceRoot;s!=null&&(i=Dr.relative(s,i));var o=new Ug,a=new Ug;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var u=e.originalPositionFor({line:c.originalLine,column:c.originalColumn});u.source!=null&&(c.source=u.source,n!=null&&(c.source=Dr.join(n,c.source)),s!=null&&(c.source=Dr.relative(s,c.source)),c.originalLine=u.line,c.originalColumn=u.column,u.name!=null&&(c.name=u.name))}var l=c.source;l!=null&&!o.has(l)&&o.add(l);var p=c.name;p!=null&&!a.has(p)&&a.add(p)},this),this._sources=o,this._names=a,e.sources.forEach(function(c){var u=e.sourceContentFor(c);u!=null&&(n!=null&&(c=Dr.join(n,c)),s!=null&&(c=Dr.relative(s,c)),this.setSourceContent(c,u))},this)};Li.prototype._validateMapping=function(e,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number"){var s="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(s),!1;throw new Error(s)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!i)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;var s="Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};Li.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,s=0,o=0,a="",c,u,l,p,d=this._mappings.toArray(),f=0,m=d.length;f<m;f++){if(u=d[f],c="",u.generatedLine!==r)for(e=0;u.generatedLine!==r;)c+=";",r++;else if(f>0){if(!Dr.compareByGeneratedPositionsInflated(u,d[f-1]))continue;c+=","}c+=of.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(p=this._sources.indexOf(u.source),c+=of.encode(p-o),o=p,c+=of.encode(u.originalLine-1-i),i=u.originalLine-1,c+=of.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(l=this._names.indexOf(u.name),c+=of.encode(l-s),s=l)),a+=c}return a};Li.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Dr.relative(r,n));var i=Dr.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Li.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};Li.prototype.toString=function(){return JSON.stringify(this.toJSON())};lB.SourceMapGenerator=Li});var pB=S(Nc=>{h();Nc.GREATEST_LOWER_BOUND=1;Nc.LEAST_UPPER_BOUND=2;function dE(t,e,r,n,i,s){var o=Math.floor((e-t)/2)+t,a=i(r,n[o],!0);return a===0?o:a>0?e-o>1?dE(o,e,r,n,i,s):s==Nc.LEAST_UPPER_BOUND?e<n.length?e:-1:o:o-t>1?dE(t,o,r,n,i,s):s==Nc.LEAST_UPPER_BOUND?o:t<0?-1:t}Nc.search=function(e,r,n,i){if(r.length===0)return-1;var s=dE(-1,r.length,e,r,n,i||Nc.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(r[s],r[s-1],!0)===0;)--s;return s}});var mB=S(fB=>{h();function Foe(t){function e(i,s,o){var a=i[s];i[s]=i[o],i[o]=a}function r(i,s){return Math.round(i+Math.random()*(s-i))}function n(i,s,o,a){if(o<a){var c=r(o,a),u=o-1;e(i,c,a);for(var l=i[a],p=o;p<a;p++)s(i[p],l,!1)<=0&&(u+=1,e(i,u,p));e(i,u+1,p);var d=u+1;n(i,s,o,d-1),n(i,s,d+1,a)}}return n}function koe(t){let e=Foe.toString();return new Function(`return ${e}`)()(t)}var dB=new WeakMap;fB.quickSort=function(t,e,r=0){let n=dB.get(e);n===void 0&&(n=koe(e),dB.set(e,n)),n(t,e,r,t.length-1)}});var yB=S(qg=>{h();var Ce=kl(),mE=pB(),Il=lE().ArraySet,Ioe=oE(),af=mB().quickSort;function Zt(t,e){var r=t;return typeof t=="string"&&(r=Ce.parseSourceMapInput(t)),r.sections!=null?new ys(r,e):new tn(r,e)}Zt.fromSourceMap=function(t,e){return tn.fromSourceMap(t,e)};Zt.prototype._version=3;Zt.prototype.__generatedMappings=null;Object.defineProperty(Zt.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});Zt.prototype.__originalMappings=null;Object.defineProperty(Zt.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});Zt.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};Zt.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};Zt.GENERATED_ORDER=1;Zt.ORIGINAL_ORDER=2;Zt.GREATEST_LOWER_BOUND=1;Zt.LEAST_UPPER_BOUND=2;Zt.prototype.eachMapping=function(e,r,n){var i=r||null,s=n||Zt.GENERATED_ORDER,o;switch(s){case Zt.GENERATED_ORDER:o=this._generatedMappings;break;case Zt.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var a=this.sourceRoot,c=e.bind(i),u=this._names,l=this._sources,p=this._sourceMapURL,d=0,f=o.length;d<f;d++){var m=o[d],g=m.source===null?null:l.at(m.source);g!==null&&(g=Ce.computeSourceURL(a,g,p)),c({source:g,generatedLine:m.generatedLine,generatedColumn:m.generatedColumn,originalLine:m.originalLine,originalColumn:m.originalColumn,name:m.name===null?null:u.at(m.name)})}};Zt.prototype.allGeneratedPositionsFor=function(e){var r=Ce.getArg(e,"line"),n={source:Ce.getArg(e,"source"),originalLine:r,originalColumn:Ce.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",Ce.compareByOriginalPositions,mE.LEAST_UPPER_BOUND);if(s>=0){var o=this._originalMappings[s];if(e.column===void 0)for(var a=o.originalLine;o&&o.originalLine===a;)i.push({line:Ce.getArg(o,"generatedLine",null),column:Ce.getArg(o,"generatedColumn",null),lastColumn:Ce.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s];else for(var c=o.originalColumn;o&&o.originalLine===r&&o.originalColumn==c;)i.push({line:Ce.getArg(o,"generatedLine",null),column:Ce.getArg(o,"generatedColumn",null),lastColumn:Ce.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return i};qg.SourceMapConsumer=Zt;function tn(t,e){var r=t;typeof t=="string"&&(r=Ce.parseSourceMapInput(t));var n=Ce.getArg(r,"version"),i=Ce.getArg(r,"sources"),s=Ce.getArg(r,"names",[]),o=Ce.getArg(r,"sourceRoot",null),a=Ce.getArg(r,"sourcesContent",null),c=Ce.getArg(r,"mappings"),u=Ce.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=Ce.normalize(o)),i=i.map(String).map(Ce.normalize).map(function(l){return o&&Ce.isAbsolute(o)&&Ce.isAbsolute(l)?Ce.relative(o,l):l}),this._names=Il.fromArray(s.map(String),!0),this._sources=Il.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(l){return Ce.computeSourceURL(o,l,e)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=u}tn.prototype=Object.create(Zt.prototype);tn.prototype.consumer=Zt;tn.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=Ce.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};tn.fromSourceMap=function(e,r){var n=Object.create(tn.prototype),i=n._names=Il.fromArray(e._names.toArray(),!0),s=n._sources=Il.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(f){return Ce.computeSourceURL(n.sourceRoot,f,r)});for(var o=e._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],u=0,l=o.length;u<l;u++){var p=o[u],d=new gB;d.generatedLine=p.generatedLine,d.generatedColumn=p.generatedColumn,p.source&&(d.source=s.indexOf(p.source),d.originalLine=p.originalLine,d.originalColumn=p.originalColumn,p.name&&(d.name=i.indexOf(p.name)),c.push(d)),a.push(d)}return af(n.__originalMappings,Ce.compareByOriginalPositions),n};tn.prototype._version=3;Object.defineProperty(tn.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function gB(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var fE=Ce.compareByGeneratedPositionsDeflatedNoLine;function hB(t,e){let r=t.length,n=t.length-e;if(!(n<=1))if(n==2){let i=t[e],s=t[e+1];fE(i,s)>0&&(t[e]=s,t[e+1]=i)}else if(n<20)for(let i=e;i<r;i++)for(let s=i;s>e;s--){let o=t[s-1],a=t[s];if(fE(o,a)<=0)break;t[s-1]=a,t[s]=o}else af(t,fE,e)}tn.prototype._parseMappings=function(e,r){var n=1,i=0,s=0,o=0,a=0,c=0,u=e.length,l=0,p={},d={},f=[],m=[],g,y,v,D,E;let x=0;for(;l<u;)if(e.charAt(l)===";")n++,l++,i=0,hB(m,x),x=m.length;else if(e.charAt(l)===",")l++;else{for(g=new gB,g.generatedLine=n,D=l;D<u&&!this._charIsMappingSeparator(e,D);D++);for(y=e.slice(l,D),v=[];l<D;)Ioe.decode(e,l,d),E=d.value,l=d.rest,v.push(E);if(v.length===2)throw new Error("Found a source, but no line and column");if(v.length===3)throw new Error("Found a source and line, but no column");if(g.generatedColumn=i+v[0],i=g.generatedColumn,v.length>1&&(g.source=a+v[1],a+=v[1],g.originalLine=s+v[2],s=g.originalLine,g.originalLine+=1,g.originalColumn=o+v[3],o=g.originalColumn,v.length>4&&(g.name=c+v[4],c+=v[4])),m.push(g),typeof g.originalLine=="number"){let C=g.source;for(;f.length<=C;)f.push(null);f[C]===null&&(f[C]=[]),f[C].push(g)}}hB(m,x),this.__generatedMappings=m;for(var b=0;b<f.length;b++)f[b]!=null&&af(f[b],Ce.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...f)};tn.prototype._findMapping=function(e,r,n,i,s,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return mE.search(e,r,s,o)};tn.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};tn.prototype.originalPositionFor=function(e){var r={generatedLine:Ce.getArg(e,"line"),generatedColumn:Ce.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",Ce.compareByGeneratedPositionsDeflated,Ce.getArg(e,"bias",Zt.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var s=Ce.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=Ce.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var o=Ce.getArg(i,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:Ce.getArg(i,"originalLine",null),column:Ce.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};tn.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};tn.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i=e;this.sourceRoot!=null&&(i=Ce.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=Ce.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!s.path||s.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};tn.prototype.generatedPositionFor=function(e){var r=Ce.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:Ce.getArg(e,"line"),originalColumn:Ce.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",Ce.compareByOriginalPositions,Ce.getArg(e,"bias",Zt.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:Ce.getArg(s,"generatedLine",null),column:Ce.getArg(s,"generatedColumn",null),lastColumn:Ce.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};qg.BasicSourceMapConsumer=tn;function ys(t,e){var r=t;typeof t=="string"&&(r=Ce.parseSourceMapInput(t));var n=Ce.getArg(r,"version"),i=Ce.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Il,this._names=new Il;var s={line:-1,column:0};this._sections=i.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var a=Ce.getArg(o,"offset"),c=Ce.getArg(a,"line"),u=Ce.getArg(a,"column");if(c<s.line||c===s.line&&u<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=a,{generatedOffset:{generatedLine:c+1,generatedColumn:u+1},consumer:new Zt(Ce.getArg(o,"map"),e)}})}ys.prototype=Object.create(Zt.prototype);ys.prototype.constructor=Zt;ys.prototype._version=3;Object.defineProperty(ys.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});ys.prototype.originalPositionFor=function(e){var r={generatedLine:Ce.getArg(e,"line"),generatedColumn:Ce.getArg(e,"column")},n=mE.search(r,this._sections,function(s,o){var a=s.generatedLine-o.generatedOffset.generatedLine;return a||s.generatedColumn-o.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};ys.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};ys.prototype.sourceContentFor=function(e,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],s=i.consumer.sourceContentFor(e,!0);if(s||s==="")return s}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};ys.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(Ce.getArg(e,"source"))!==-1){var i=n.consumer.generatedPositionFor(e);if(i){var s={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};ys.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],s=i.consumer._generatedMappings,o=0;o<s.length;o++){var a=s[o],c=i.consumer._sources.at(a.source);c!==null&&(c=Ce.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL)),this._sources.add(c),c=this._sources.indexOf(c);var u=null;a.name&&(u=i.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var l={source:c,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(l),typeof l.originalLine=="number"&&this.__originalMappings.push(l)}af(this.__generatedMappings,Ce.compareByGeneratedPositionsDeflated),af(this.__originalMappings,Ce.compareByOriginalPositions)};qg.IndexedSourceMapConsumer=ys});var bB=S(vB=>{h();var Noe=pE().SourceMapGenerator,zg=kl(),Roe=/(\r?\n)/,Ooe=10,Nl="$$$isSourceNode$$$";function fi(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=i??null,this[Nl]=!0,n!=null&&this.add(n)}fi.fromStringWithSourceMap=function(e,r,n){var i=new fi,s=e.split(Roe),o=0,a=function(){var d=m(),f=m()||"";return d+f;function m(){return o<s.length?s[o++]:void 0}},c=1,u=0,l=null;return r.eachMapping(function(d){if(l!==null)if(c<d.generatedLine)p(l,a()),c++,u=0;else{var f=s[o]||"",m=f.substr(0,d.generatedColumn-u);s[o]=f.substr(d.generatedColumn-u),u=d.generatedColumn,p(l,m),l=d;return}for(;c<d.generatedLine;)i.add(a()),c++;if(u<d.generatedColumn){var f=s[o]||"";i.add(f.substr(0,d.generatedColumn)),s[o]=f.substr(d.generatedColumn),u=d.generatedColumn}l=d},this),o<s.length&&(l&&p(l,a()),i.add(s.splice(o).join(""))),r.sources.forEach(function(d){var f=r.sourceContentFor(d);f!=null&&(n!=null&&(d=zg.join(n,d)),i.setSourceContent(d,f))}),i;function p(d,f){if(d===null||d.source===void 0)i.add(f);else{var m=n?zg.join(n,d.source):d.source;i.add(new fi(d.originalLine,d.originalColumn,m,f,d.name))}}};fi.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[Nl]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};fi.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[Nl]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};fi.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[Nl]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};fi.prototype.join=function(e){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this};fi.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[Nl]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};fi.prototype.setSourceContent=function(e,r){this.sourceContents[zg.toSetString(e)]=r};fi.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Nl]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(zg.fromSetString(i[r]),this.sourceContents[i[r]])};fi.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};fi.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new Noe(e),i=!1,s=null,o=null,a=null,c=null;return this.walk(function(u,l){r.code+=u,l.source!==null&&l.line!==null&&l.column!==null?((s!==l.source||o!==l.line||a!==l.column||c!==l.name)&&n.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name}),s=l.source,o=l.line,a=l.column,c=l.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),s=null,i=!1);for(var p=0,d=u.length;p<d;p++)u.charCodeAt(p)===Ooe?(r.line++,r.column=0,p+1===d?(s=null,i=!1):i&&n.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name})):r.column++}),this.walkSourceContents(function(u,l){n.setSourceContent(u,l)}),{code:r.code,map:n}};vB.SourceNode=fi});var xB=S(Gg=>{h();Gg.SourceMapGenerator=pE().SourceMapGenerator;Gg.SourceMapConsumer=yB().SourceMapConsumer;Gg.SourceNode=bB().SourceNode});var XB=S(yf=>{"use strict";h();Object.defineProperty(yf,"__esModule",{value:!0});function Boe(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}var Qs=class{constructor(e,r,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=r,this.index=n}},Ll=class{constructor(e,r){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=r}};function _n(t,e){let{line:r,column:n,index:i}=t;return new Qs(r,n+e,i+e)}var DB="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",Moe={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:DB},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:DB}},EB={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"},Kg=t=>t.type==="UpdateExpression"?EB.UpdateExpression[`${t.prefix}`]:EB[t.type],Loe={AccessorIsGenerator:({kind:t})=>`A ${t}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:t})=>`Missing initializer in ${t} 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:t})=>`\`${t}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:t})=>`'import.${t}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:t,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
1102
1102
|
- Did you mean \`export { '${t}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:t})=>`'${t==="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:t})=>`Unsyntactic ${t==="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 `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:t})=>`A string literal cannot be used as an imported binding.
|
|
1103
1103
|
- Did you mean \`import { "${t}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:t})=>`\`import()\` requires exactly ${t===1?"one argument":"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:t})=>`Expected number in radix ${t}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:t})=>`Escape sequence in keyword ${t}.`,InvalidIdentifier:({identifierName:t})=>`Invalid identifier ${t}.`,InvalidLhs:({ancestor:t})=>`Invalid left-hand side in ${Kg(t)}.`,InvalidLhsBinding:({ancestor:t})=>`Binding invalid left-hand side in ${Kg(t)}.`,InvalidLhsOptionalChaining:({ancestor:t})=>`Invalid optional chaining in the left-hand side of ${Kg(t)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:t})=>`Unexpected character '${t}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:t})=>`Private name #${t} 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:t})=>`Label '${t}' 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:t})=>`This experimental syntax requires enabling the parser plugin: ${t.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:t})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${t.map(e=>JSON.stringify(e)).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:t})=>`Duplicate key "${t}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:t})=>`An export name cannot include a lone surrogate, found '\\u${t.toString(16)}'.`,ModuleExportUndefined:({localName:t})=>`Export '${t}' 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:t})=>`Private names are only allowed in property accesses (\`obj.#${t}\`) or in \`in\` expressions (\`#${t} in obj\`).`,PrivateNameRedeclaration:({identifierName:t})=>`Duplicate private name #${t}.`,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:t})=>`Unexpected keyword '${t}'.`,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:t})=>`Unexpected reserved word '${t}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:t,unexpected:e})=>`Unexpected token${e?` '${e}'.`:""}${t?`, expected "${t}"`:""}`,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:t,onlyValidPropertyName:e})=>`The only valid meta property for ${t} is ${t}.${e}.`,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:t})=>`Identifier '${t}' 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."},$oe={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:t})=>`Assigning to '${t}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:t})=>`Binding '${t}' 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."},joe=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),Uoe={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:t})=>`Invalid topic token ${t}. In order to use ${t} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${t}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:t})=>`Hack-style pipe body cannot be an unparenthesized ${Kg({type:t})}; 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.'},qoe=["message"];function CB(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!0,value:r})}function zoe({toMessage:t,code:e,reasonCode:r,syntaxPlugin:n}){let i=r==="MissingPlugin"||r==="MissingOneOfPlugins";{let s={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};s[r]&&(r=s[r])}return function s(o,a){let c=new SyntaxError;return c.code=e,c.reasonCode=r,c.loc=o,c.pos=o.index,c.syntaxPlugin=n,i&&(c.missingPlugin=a.missingPlugin),CB(c,"clone",function(l={}){var p;let{line:d,column:f,index:m}=(p=l.loc)!=null?p:o;return s(new Qs(d,f,m),Object.assign({},a,l.details))}),CB(c,"details",a),Object.defineProperty(c,"message",{configurable:!0,get(){let u=`${t(a)} (${o.line}:${o.column})`;return this.message=u,u},set(u){Object.defineProperty(this,"message",{value:u,writable:!0})}}),c}}function Uo(t,e){if(Array.isArray(t))return n=>Uo(n,t[0]);let r={};for(let n of Object.keys(t)){let i=t[n],s=typeof i=="string"?{message:()=>i}:typeof i=="function"?{message:i}:i,{message:o}=s,a=Boe(s,qoe),c=typeof o=="string"?()=>o:o;r[n]=zoe(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:n,toMessage:c},e?{syntaxPlugin:e}:{},a))}return r}var R=Object.assign({},Uo(Moe),Uo(Loe),Uo($oe),Uo`pipelineOperator`(Uoe)),{defineProperty:Goe}=Object,wB=(t,e)=>{t&&Goe(t,e,{enumerable:!1,value:t[e]})};function cf(t){return wB(t.loc.start,"index"),wB(t.loc.end,"index"),t}var Hoe=t=>class extends t{parse(){let r=cf(super.parse());return this.options.tokens&&(r.tokens=r.tokens.map(cf)),r}parseRegExpLiteral({pattern:r,flags:n}){let i=null;try{i=new RegExp(r,n)}catch{}let s=this.estreeParseLiteral(i);return s.regex={pattern:r,flags:n},s}parseBigIntLiteral(r){let n;try{n=BigInt(r)}catch{n=null}let i=this.estreeParseLiteral(n);return i.bigint=String(i.value||r),i}parseDecimalLiteral(r){let i=this.estreeParseLiteral(null);return i.decimal=String(i.value||r),i}estreeParseLiteral(r){return this.parseLiteral(r,"Literal")}parseStringLiteral(r){return this.estreeParseLiteral(r)}parseNumericLiteral(r){return this.estreeParseLiteral(r)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(r){return this.estreeParseLiteral(r)}directiveToStmt(r){let n=r.value;delete r.value,n.type="Literal",n.raw=n.extra.raw,n.value=n.extra.expressionValue;let i=r;return i.type="ExpressionStatement",i.expression=n,i.directive=n.extra.rawValue,delete n.extra,i}initFunction(r,n){super.initFunction(r,n),r.expression=!1}checkDeclaration(r){r!=null&&this.isObjectProperty(r)?this.checkDeclaration(r.value):super.checkDeclaration(r)}getObjectOrClassMethodParams(r){return r.value.params}isValidDirective(r){var n;return r.type==="ExpressionStatement"&&r.expression.type==="Literal"&&typeof r.expression.value=="string"&&!((n=r.expression.extra)!=null&&n.parenthesized)}parseBlockBody(r,n,i,s,o){super.parseBlockBody(r,n,i,s,o);let a=r.directives.map(c=>this.directiveToStmt(c));r.body=a.concat(r.body),delete r.directives}pushClassMethod(r,n,i,s,o,a){this.parseMethod(n,i,s,o,a,"ClassMethod",!0),n.typeParameters&&(n.value.typeParameters=n.typeParameters,delete n.typeParameters),r.body.push(n)}parsePrivateName(){let r=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(r):r}convertPrivateNameToPrivateIdentifier(r){let n=super.getPrivateNameSV(r);return r=r,delete r.id,r.name=n,r.type="PrivateIdentifier",r}isPrivateName(r){return this.getPluginOption("estree","classFeatures")?r.type==="PrivateIdentifier":super.isPrivateName(r)}getPrivateNameSV(r){return this.getPluginOption("estree","classFeatures")?r.name:super.getPrivateNameSV(r)}parseLiteral(r,n){let i=super.parseLiteral(r,n);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(r,n,i=!1){super.parseFunctionBody(r,n,i),r.expression=r.body.type!=="BlockStatement"}parseMethod(r,n,i,s,o,a,c=!1){let u=this.startNode();return u.kind=r.kind,u=super.parseMethod(u,n,i,s,o,a,c),u.type="FunctionExpression",delete u.kind,r.value=u,a==="ClassPrivateMethod"&&(r.computed=!1),this.finishNode(r,"MethodDefinition")}nameIsConstructor(r){return r.type==="Literal"?r.value==="constructor":super.nameIsConstructor(r)}parseClassProperty(...r){let n=super.parseClassProperty(...r);return this.getPluginOption("estree","classFeatures")&&(n.type="PropertyDefinition"),n}parseClassPrivateProperty(...r){let n=super.parseClassPrivateProperty(...r);return this.getPluginOption("estree","classFeatures")&&(n.type="PropertyDefinition",n.computed=!1),n}parseObjectMethod(r,n,i,s,o){let a=super.parseObjectMethod(r,n,i,s,o);return a&&(a.type="Property",a.kind==="method"&&(a.kind="init"),a.shorthand=!1),a}parseObjectProperty(r,n,i,s){let o=super.parseObjectProperty(r,n,i,s);return o&&(o.kind="init",o.type="Property"),o}isValidLVal(r,n,i){return r==="Property"?"value":super.isValidLVal(r,n,i)}isAssignable(r,n){return r!=null&&this.isObjectProperty(r)?this.isAssignable(r.value,n):super.isAssignable(r,n)}toAssignable(r,n=!1){if(r!=null&&this.isObjectProperty(r)){let{key:i,value:s}=r;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(s,n)}else super.toAssignable(r,n)}toAssignableObjectExpressionProp(r,n,i){r.type==="Property"&&(r.kind==="get"||r.kind==="set")?this.raise(R.PatternHasAccessor,r.key):r.type==="Property"&&r.method?this.raise(R.PatternHasMethod,r.key):super.toAssignableObjectExpressionProp(r,n,i)}finishCallExpression(r,n){let i=super.finishCallExpression(r,n);if(i.callee.type==="Import"){if(i.type="ImportExpression",i.source=i.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var s,o;i.options=(s=i.arguments[1])!=null?s:null,i.attributes=(o=i.arguments[1])!=null?o:null}delete i.arguments,delete i.callee}return i}toReferencedArguments(r){r.type!=="ImportExpression"&&super.toReferencedArguments(r)}parseExport(r,n){let i=this.state.lastTokStartLoc,s=super.parseExport(r,n);switch(s.type){case"ExportAllDeclaration":s.exported=null;break;case"ExportNamedDeclaration":s.specifiers.length===1&&s.specifiers[0].type==="ExportNamespaceSpecifier"&&(s.type="ExportAllDeclaration",s.exported=s.specifiers[0].exported,delete s.specifiers);case"ExportDefaultDeclaration":{var o;let{declaration:a}=s;a?.type==="ClassDeclaration"&&((o=a.decorators)==null?void 0:o.length)>0&&a.start===s.start&&this.resetStartLocation(s,i)}break}return s}parseSubscript(r,n,i,s){let o=super.parseSubscript(r,n,i,s);if(s.optionalChainMember){if((o.type==="OptionalMemberExpression"||o.type==="OptionalCallExpression")&&(o.type=o.type.substring(8)),s.stop){let a=this.startNodeAtNode(o);return a.expression=o,this.finishNode(a,"ChainExpression")}}else(o.type==="MemberExpression"||o.type==="CallExpression")&&(o.optional=!1);return o}isOptionalMemberExpression(r){return r.type==="ChainExpression"?r.expression.type==="MemberExpression":super.isOptionalMemberExpression(r)}hasPropertyAsPrivateName(r){return r.type==="ChainExpression"&&(r=r.expression),super.hasPropertyAsPrivateName(r)}isObjectProperty(r){return r.type==="Property"&&r.kind==="init"&&!r.method}isObjectMethod(r){return r.type==="Property"&&(r.method||r.kind==="get"||r.kind==="set")}finishNodeAt(r,n,i){return cf(super.finishNodeAt(r,n,i))}resetStartLocation(r,n){super.resetStartLocation(r,n),cf(r)}resetEndLocation(r,n=this.state.lastTokEndLoc){super.resetEndLocation(r,n),cf(r)}},Oc=class{constructor(e,r){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!r}},Nt={brace:new Oc("{"),j_oTag:new Oc("<tag"),j_cTag:new Oc("</tag"),j_expr:new Oc("<tag>...</tag>",!0)};Nt.template=new Oc("`",!0);var tt=!0,me=!0,hE=!0,uf=!0,Ea=!0,Voe=!0,Yg=class{constructor(e,r={}){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=e,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop!=null?r.binop:null,this.updateContext=null}},UE=new Map;function lt(t,e={}){e.keyword=t;let r=Se(t,e);return UE.set(t,r),r}function An(t,e){return Se(t,{beforeExpr:tt,binop:e})}var ff=-1,$o=[],qE=[],zE=[],GE=[],HE=[],VE=[];function Se(t,e={}){var r,n,i,s;return++ff,qE.push(t),zE.push((r=e.binop)!=null?r:-1),GE.push((n=e.beforeExpr)!=null?n:!1),HE.push((i=e.startsExpr)!=null?i:!1),VE.push((s=e.prefix)!=null?s:!1),$o.push(new Yg(t,e)),ff}function et(t,e={}){var r,n,i,s;return++ff,UE.set(t,ff),qE.push(t),zE.push((r=e.binop)!=null?r:-1),GE.push((n=e.beforeExpr)!=null?n:!1),HE.push((i=e.startsExpr)!=null?i:!1),VE.push((s=e.prefix)!=null?s:!1),$o.push(new Yg("name",e)),ff}var Koe={bracketL:Se("[",{beforeExpr:tt,startsExpr:me}),bracketHashL:Se("#[",{beforeExpr:tt,startsExpr:me}),bracketBarL:Se("[|",{beforeExpr:tt,startsExpr:me}),bracketR:Se("]"),bracketBarR:Se("|]"),braceL:Se("{",{beforeExpr:tt,startsExpr:me}),braceBarL:Se("{|",{beforeExpr:tt,startsExpr:me}),braceHashL:Se("#{",{beforeExpr:tt,startsExpr:me}),braceR:Se("}"),braceBarR:Se("|}"),parenL:Se("(",{beforeExpr:tt,startsExpr:me}),parenR:Se(")"),comma:Se(",",{beforeExpr:tt}),semi:Se(";",{beforeExpr:tt}),colon:Se(":",{beforeExpr:tt}),doubleColon:Se("::",{beforeExpr:tt}),dot:Se("."),question:Se("?",{beforeExpr:tt}),questionDot:Se("?."),arrow:Se("=>",{beforeExpr:tt}),template:Se("template"),ellipsis:Se("...",{beforeExpr:tt}),backQuote:Se("`",{startsExpr:me}),dollarBraceL:Se("${",{beforeExpr:tt,startsExpr:me}),templateTail:Se("...`",{startsExpr:me}),templateNonTail:Se("...${",{beforeExpr:tt,startsExpr:me}),at:Se("@"),hash:Se("#",{startsExpr:me}),interpreterDirective:Se("#!..."),eq:Se("=",{beforeExpr:tt,isAssign:uf}),assign:Se("_=",{beforeExpr:tt,isAssign:uf}),slashAssign:Se("_=",{beforeExpr:tt,isAssign:uf}),xorAssign:Se("_=",{beforeExpr:tt,isAssign:uf}),moduloAssign:Se("_=",{beforeExpr:tt,isAssign:uf}),incDec:Se("++/--",{prefix:Ea,postfix:Voe,startsExpr:me}),bang:Se("!",{beforeExpr:tt,prefix:Ea,startsExpr:me}),tilde:Se("~",{beforeExpr:tt,prefix:Ea,startsExpr:me}),doubleCaret:Se("^^",{startsExpr:me}),doubleAt:Se("@@",{startsExpr:me}),pipeline:An("|>",0),nullishCoalescing:An("??",1),logicalOR:An("||",1),logicalAND:An("&&",2),bitwiseOR:An("|",3),bitwiseXOR:An("^",4),bitwiseAND:An("&",5),equality:An("==/!=/===/!==",6),lt:An("</>/<=/>=",7),gt:An("</>/<=/>=",7),relational:An("</>/<=/>=",7),bitShift:An("<</>>/>>>",8),bitShiftL:An("<</>>/>>>",8),bitShiftR:An("<</>>/>>>",8),plusMin:Se("+/-",{beforeExpr:tt,binop:9,prefix:Ea,startsExpr:me}),modulo:Se("%",{binop:10,startsExpr:me}),star:Se("*",{binop:10}),slash:An("/",10),exponent:Se("**",{beforeExpr:tt,binop:11,rightAssociative:!0}),_in:lt("in",{beforeExpr:tt,binop:7}),_instanceof:lt("instanceof",{beforeExpr:tt,binop:7}),_break:lt("break"),_case:lt("case",{beforeExpr:tt}),_catch:lt("catch"),_continue:lt("continue"),_debugger:lt("debugger"),_default:lt("default",{beforeExpr:tt}),_else:lt("else",{beforeExpr:tt}),_finally:lt("finally"),_function:lt("function",{startsExpr:me}),_if:lt("if"),_return:lt("return",{beforeExpr:tt}),_switch:lt("switch"),_throw:lt("throw",{beforeExpr:tt,prefix:Ea,startsExpr:me}),_try:lt("try"),_var:lt("var"),_const:lt("const"),_with:lt("with"),_new:lt("new",{beforeExpr:tt,startsExpr:me}),_this:lt("this",{startsExpr:me}),_super:lt("super",{startsExpr:me}),_class:lt("class",{startsExpr:me}),_extends:lt("extends",{beforeExpr:tt}),_export:lt("export"),_import:lt("import",{startsExpr:me}),_null:lt("null",{startsExpr:me}),_true:lt("true",{startsExpr:me}),_false:lt("false",{startsExpr:me}),_typeof:lt("typeof",{beforeExpr:tt,prefix:Ea,startsExpr:me}),_void:lt("void",{beforeExpr:tt,prefix:Ea,startsExpr:me}),_delete:lt("delete",{beforeExpr:tt,prefix:Ea,startsExpr:me}),_do:lt("do",{isLoop:hE,beforeExpr:tt}),_for:lt("for",{isLoop:hE}),_while:lt("while",{isLoop:hE}),_as:et("as",{startsExpr:me}),_assert:et("assert",{startsExpr:me}),_async:et("async",{startsExpr:me}),_await:et("await",{startsExpr:me}),_defer:et("defer",{startsExpr:me}),_from:et("from",{startsExpr:me}),_get:et("get",{startsExpr:me}),_let:et("let",{startsExpr:me}),_meta:et("meta",{startsExpr:me}),_of:et("of",{startsExpr:me}),_sent:et("sent",{startsExpr:me}),_set:et("set",{startsExpr:me}),_source:et("source",{startsExpr:me}),_static:et("static",{startsExpr:me}),_using:et("using",{startsExpr:me}),_yield:et("yield",{startsExpr:me}),_asserts:et("asserts",{startsExpr:me}),_checks:et("checks",{startsExpr:me}),_exports:et("exports",{startsExpr:me}),_global:et("global",{startsExpr:me}),_implements:et("implements",{startsExpr:me}),_intrinsic:et("intrinsic",{startsExpr:me}),_infer:et("infer",{startsExpr:me}),_is:et("is",{startsExpr:me}),_mixins:et("mixins",{startsExpr:me}),_proto:et("proto",{startsExpr:me}),_require:et("require",{startsExpr:me}),_satisfies:et("satisfies",{startsExpr:me}),_keyof:et("keyof",{startsExpr:me}),_readonly:et("readonly",{startsExpr:me}),_unique:et("unique",{startsExpr:me}),_abstract:et("abstract",{startsExpr:me}),_declare:et("declare",{startsExpr:me}),_enum:et("enum",{startsExpr:me}),_module:et("module",{startsExpr:me}),_namespace:et("namespace",{startsExpr:me}),_interface:et("interface",{startsExpr:me}),_type:et("type",{startsExpr:me}),_opaque:et("opaque",{startsExpr:me}),name:Se("name",{startsExpr:me}),string:Se("string",{startsExpr:me}),num:Se("num",{startsExpr:me}),bigint:Se("bigint",{startsExpr:me}),decimal:Se("decimal",{startsExpr:me}),regexp:Se("regexp",{startsExpr:me}),privateName:Se("#name",{startsExpr:me}),eof:Se("eof"),jsxName:Se("jsxName"),jsxText:Se("jsxText",{beforeExpr:!0}),jsxTagStart:Se("jsxTagStart",{startsExpr:!0}),jsxTagEnd:Se("jsxTagEnd"),placeholder:Se("%%",{startsExpr:!0})};function xt(t){return t>=93&&t<=132}function Woe(t){return t<=92}function vs(t){return t>=58&&t<=132}function BB(t){return t>=58&&t<=136}function Joe(t){return GE[t]}function DE(t){return HE[t]}function Yoe(t){return t>=29&&t<=33}function SB(t){return t>=129&&t<=131}function Xoe(t){return t>=90&&t<=92}function KE(t){return t>=58&&t<=92}function Qoe(t){return t>=39&&t<=59}function Zoe(t){return t===34}function eae(t){return VE[t]}function tae(t){return t>=121&&t<=123}function rae(t){return t>=124&&t<=130}function wa(t){return qE[t]}function Wg(t){return zE[t]}function nae(t){return t===57}function Xg(t){return t>=24&&t<=25}function Lo(t){return $o[t]}$o[8].updateContext=t=>{t.pop()},$o[5].updateContext=$o[7].updateContext=$o[23].updateContext=t=>{t.push(Nt.brace)},$o[22].updateContext=t=>{t[t.length-1]===Nt.template?t.pop():t.push(Nt.template)},$o[142].updateContext=t=>{t.push(Nt.j_expr,Nt.j_oTag)};var WE="\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-\u1C88\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-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\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",MB="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\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",iae=new RegExp("["+WE+"]"),sae=new RegExp("["+WE+MB+"]");WE=MB=null;var LB=[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,68,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,349,41,7,1,79,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,159,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,264,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,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,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,757,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],oae=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,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,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,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,406,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,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,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,983,6,110,6,6,9,4759,9,787719,239];function EE(t,e){let r=65536;for(let n=0,i=e.length;n<i;n+=2){if(r+=e[n],r>t)return!1;if(r+=e[n+1],r>=t)return!0}return!1}function jo(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&iae.test(String.fromCharCode(t)):EE(t,LB)}function Ol(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&sae.test(String.fromCharCode(t)):EE(t,LB)||EE(t,oae)}var JE={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"]},aae=new Set(JE.keyword),cae=new Set(JE.strict),uae=new Set(JE.strictBind);function $B(t,e){return e&&t==="await"||t==="enum"}function jB(t,e){return $B(t,e)||cae.has(t)}function UB(t){return uae.has(t)}function qB(t,e){return jB(t,e)||UB(t)}function lae(t){return aae.has(t)}function pae(t,e,r){return t===64&&e===64&&jo(r)}var dae=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 fae(t){return dae.has(t)}var mf=class{constructor(e){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=e}},hf=class{constructor(e,r){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=r}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 e=this.currentThisScopeFlags();return(e&64)>0&&(e&2)===0}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&128)return!0;if(r&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new mf(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,r,n){let i=this.currentScope();if(r&8||r&16){this.checkRedeclarationInScope(i,e,r,n);let s=i.names.get(e)||0;r&16?s=s|4:(i.firstLexicalName||(i.firstLexicalName=e),s=s|2),i.names.set(e,s),r&8&&this.maybeExportDefined(i,e)}else if(r&4)for(let s=this.scopeStack.length-1;s>=0&&(i=this.scopeStack[s],this.checkRedeclarationInScope(i,e,r,n),i.names.set(e,(i.names.get(e)||0)|1),this.maybeExportDefined(i,e),!(i.flags&387));--s);this.parser.inModule&&i.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,r){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(r)}checkRedeclarationInScope(e,r,n,i){this.isRedeclaredInScope(e,r,n)&&this.parser.raise(R.VarRedeclaration,i,{identifierName:r})}isRedeclaredInScope(e,r,n){if(!(n&1))return!1;if(n&8)return e.names.has(r);let i=e.names.get(r);return n&16?(i&2)>0||!this.treatFunctionsAsVarInScope(e)&&(i&1)>0:(i&2)>0&&!(e.flags&8&&e.firstLexicalName===r)||!this.treatFunctionsAsVarInScope(e)&&(i&4)>0}checkLocalExport(e){let{name:r}=e;this.scopeStack[0].names.has(r)||this.undefinedExports.set(r,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&387)return r}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&451&&!(r&4))return r}}},CE=class extends mf{constructor(...e){super(...e),this.declareFunctions=new Set}},wE=class extends hf{createScope(e){return new CE(e)}declareName(e,r,n){let i=this.currentScope();if(r&2048){this.checkRedeclarationInScope(i,e,r,n),this.maybeExportDefined(i,e),i.declareFunctions.add(e);return}super.declareName(e,r,n)}isRedeclaredInScope(e,r,n){if(super.isRedeclaredInScope(e,r,n))return!0;if(n&2048&&!e.declareFunctions.has(r)){let i=e.names.get(r);return(i&4)>0||(i&2)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},SE=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(e){if(typeof e=="string")return this.plugins.has(e);{let[r,n]=e;if(!this.hasPlugin(r))return!1;let i=this.plugins.get(r);for(let s of Object.keys(n))if(i?.[s]!==n[s])return!1;return!0}}getPluginOption(e,r){var n;return(n=this.plugins.get(e))==null?void 0:n[r]}};function zB(t,e){t.trailingComments===void 0?t.trailingComments=e:t.trailingComments.unshift(...e)}function mae(t,e){t.leadingComments===void 0?t.leadingComments=e:t.leadingComments.unshift(...e)}function gf(t,e){t.innerComments===void 0?t.innerComments=e:t.innerComments.unshift(...e)}function lf(t,e,r){let n=null,i=e.length;for(;n===null&&i>0;)n=e[--i];n===null||n.start>r.start?gf(t,r.comments):zB(n,r.comments)}var TE=class extends SE{addComment(e){this.filename&&(e.loc.filename=this.filename);let{commentsLen:r}=this.state;this.comments.length!==r&&(this.comments.length=r),this.comments.push(e),this.state.commentsLen++}processComment(e){let{commentStack:r}=this.state,n=r.length;if(n===0)return;let i=n-1,s=r[i];s.start===e.end&&(s.leadingNode=e,i--);let{start:o}=e;for(;i>=0;i--){let a=r[i],c=a.end;if(c>o)a.containingNode=e,this.finalizeComment(a),r.splice(i,1);else{c===o&&(a.trailingNode=e);break}}}finalizeComment(e){let{comments:r}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&zB(e.leadingNode,r),e.trailingNode!==null&&mae(e.trailingNode,r);else{let{containingNode:n,start:i}=e;if(this.input.charCodeAt(i-1)===44)switch(n.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":lf(n,n.properties,e);break;case"CallExpression":case"OptionalCallExpression":lf(n,n.arguments,e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":lf(n,n.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":lf(n,n.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":lf(n,n.specifiers,e);break;default:gf(n,r)}else gf(n,r)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let r=e.length-1;r>=0;r--)this.finalizeComment(e[r]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:r}=this.state,{length:n}=r;if(n===0)return;let i=r[n-1];i.leadingNode===e&&(i.leadingNode=null)}resetPreviousIdentifierLeadingComments(e){let{commentStack:r}=this.state,{length:n}=r;n!==0&&(r[n-1].trailingNode===e?r[n-1].trailingNode=null:n>=2&&r[n-2].trailingNode===e&&(r[n-2].trailingNode=null))}takeSurroundingComments(e,r,n){let{commentStack:i}=this.state,s=i.length;if(s===0)return;let o=s-1;for(;o>=0;o--){let a=i[o],c=a.end;if(a.start===n)a.leadingNode=e;else if(c===r)a.trailingNode=e;else if(c<r)break}}},hae=/\r\n|[\r\n\u2028\u2029]/,Hg=new RegExp(hae.source,"g");function Bl(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function TB(t,e,r){for(let n=e;n<r;n++)if(Bl(t.charCodeAt(n)))return!0;return!1}var gE=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,yE=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function gae(t){switch(t){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 PE=class t{constructor(){this.flags=1024,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=139,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[Nt.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(e){e?this.flags|=1:this.flags&=-2}init({strictMode:e,sourceType:r,startLine:n,startColumn:i}){this.strict=e===!1?!1:e===!0?!0:r==="module",this.curLine=n,this.lineStart=-i,this.startLoc=this.endLoc=new Qs(n,i,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(e){e?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}curPosition(){return new Qs(this.curLine,this.pos-this.lineStart,this.pos)}clone(){let e=new t;return e.flags=this.flags,e.curLine=this.curLine,e.lineStart=this.lineStart,e.startLoc=this.startLoc,e.endLoc=this.endLoc,e.errors=this.errors.slice(),e.potentialArrowAt=this.potentialArrowAt,e.noArrowAt=this.noArrowAt.slice(),e.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),e.topicContext=this.topicContext,e.labels=this.labels.slice(),e.commentsLen=this.commentsLen,e.commentStack=this.commentStack.slice(),e.pos=this.pos,e.type=this.type,e.value=this.value,e.start=this.start,e.end=this.end,e.lastTokEndLoc=this.lastTokEndLoc,e.lastTokStartLoc=this.lastTokStartLoc,e.context=this.context.slice(),e.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,e.strictErrors=this.strictErrors,e.tokensLength=this.tokensLength,e}},yae=function(e){return e>=48&&e<=57},PB={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Vg={bin:t=>t===48||t===49,oct:t=>t>=48&&t<=55,dec:t=>t>=48&&t<=57,hex:t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102};function AB(t,e,r,n,i,s){let o=r,a=n,c=i,u="",l=null,p=r,{length:d}=e;for(;;){if(r>=d){s.unterminated(o,a,c),u+=e.slice(p,r);break}let f=e.charCodeAt(r);if(vae(t,f,e,r)){u+=e.slice(p,r);break}if(f===92){u+=e.slice(p,r);let m=bae(e,r,n,i,t==="template",s);m.ch===null&&!l?l={pos:r,lineStart:n,curLine:i}:u+=m.ch,{pos:r,lineStart:n,curLine:i}=m,p=r}else f===8232||f===8233?(++r,++i,n=r):f===10||f===13?t==="template"?(u+=e.slice(p,r)+`
|
|
1104
1104
|
`,++r,f===13&&e.charCodeAt(r)===10&&++r,++i,p=n=r):s.unterminated(o,a,c):++r}return{pos:r,str:u,firstInvalidLoc:l,lineStart:n,curLine:i,containsInvalid:!!l}}function vae(t,e,r,n){return t==="template"?e===96||e===36&&r.charCodeAt(n+1)===123:e===(t==="double"?34:39)}function bae(t,e,r,n,i,s){let o=!i;e++;let a=u=>({pos:e,ch:u,lineStart:r,curLine:n}),c=t.charCodeAt(e++);switch(c){case 110:return a(`
|
|
@@ -1224,7 +1224,7 @@ The "grep_search" tool can be used to find the relevant part lines of a file.`)}
|
|
|
1224
1224
|
`+await o.text());let a=await o.json();if(!Array.isArray(a.figmaComponents))throw new Error("Invalid response from Figma API");return a.figmaComponents.map(c=>["",c])}function F3(t){return t.some(e=>!!Of(e))}async function k3(t,e,r,n,i){return(await Promise.all(i.map(async o=>{let a,c;if(o.match(Hue))try{if(r){let p;try{p=await ro(t,e,`components/${o}`,{auth:r}),a=p.meta.file_key,c=p.meta.node_id}catch{L.warning("Failed to fetch component from Figma API.")}}}catch(p){throw P3.captureException(p),p}if(!a||!c){let p=Of(o);if(!p)return Be(`Invalid Figma URL, use Cmd+L while selecting a figma component to get a link to selection.
|
|
1225
1225
|
Or make sure the command is copied correctly from the Figma plugin and the same builder space is being used.`),await xe(1);p&&({fileID:a,nodeId:c}=p)}if(!r)return[];let u=await A3(t,e,r,a,c),l=await Vue(u[c],c);return l?[[o,l]]:[]}))).flat().filter(Wue)}async function Vue(t,e){let r=t.document;if(r.type!=="COMPONENT"&&r.type!=="COMPONENT_SET"){let i=`Seems like the pasted URL points to a ${r.type} node, not a COMPONENT or COMPONENT_SET.`;return r.type==="INSTANCE"&&(i+=`
|
|
1226
1226
|
Double click and select "Go to main component", then copy the URL to the figma COMPONENT`),Be(i),await xe(1)}let n=t.components[e]?.key??t.componentSets[e]?.key;return n?(t.document.key=n,Rf(t,e)):(Be("Pasted URL does not correspond to a component or component set"),await xe(1))}async function Sy(t,e,r,n,i){if(i.length>0){let s=await Kue(t,e,r,i);for(let o of n)if(o.figmaUrl&&!o.figmaKey){let a=s[o.figmaUrl];a&&(o.figmaKey=a)}}}function Wue(t){return t!=null}var P3,Of,Gue,ro,A3,Hue,Kue,Ty=N(()=>{"use strict";h();Yt();Hr();Mi();P3=Y(require("@sentry/node"),1);Pn();nn();Uc();Of=t=>{try{let e=t.replace(/\\\(/g,"(").replace(/\\\)/g,")").replace(/\\\=/g,"=").replace(/\\\?/g,"?").replace(/\\\&/g,"&"),r=new URL(e);if(!r.hostname.includes("figma.com"))return console.log(`
|
|
1227
|
-
\u274C Not a Figma URL - hostname check failed`),null;let n=r.searchParams.get("node-id")?.replaceAll("-",":"),i=r.pathname.split("/")[2];return n&&i?{fileID:i,nodeId:n}:null}catch{return null}},Gue="https://api.figma.com/v1/",ro=async(t,e,r,{auth:n,params:i})=>{let s=new URL(`${Gue}${r}`),o={};if(n.oauth?o.Authorization=`Bearer ${n.access_token}`:o["X-FIGMA-TOKEN"]=n.access_token,i)for(let c in i)i[c]!=null&&s.searchParams.set(c,i[c].toString());let a=await He(s,{headers:o});if(!a.ok){if(a.status===401){L.error("Seems like figma auth is expired or it's invalid, let's try to");let c=await tr(t,e,{force:!0,figmaAuth:!0});return ro(t,e,r,{auth:c.figmaAuth,params:i})}throw new Error(`Figma REST ${a.statusText}: ${await a.text()}`)}return a.json()},A3=async(t,e,r,n,i,s)=>(await ro(t,e,`files/${n}/nodes`,{auth:r,params:{ids:i,depth:s}})).nodes,Hue=/^[a-f0-9]{40}$/;Kue=async(t,e,r,n)=>{if(!r)return{};let i=new Map,s={};return n.forEach(o=>{let a=Of(o);if(!a){t.Sentry?.captureException(new Error("Invalid Figma URL, use Cmd+L while selecting a figma component to get a link to selection"),{extra:{figmaUrl:o},level:"warning"});return}let c=i.get(a.fileID);c||(c=[],i.set(a.fileID,c)),c.includes(a.nodeId)||c.push(a.nodeId),s[o]=`${a.fileID}/${a.nodeId}`}),await Promise.all(Array.from(i.entries()).map(async([o,a])=>{let c=await A3(t,e,r,o,a.join(","),0);for(let u of a){let l=c[u],p=l.components[u]?.key??l.componentSets[u]?.key;p||t.Sentry?.withScope(f=>{f.addAttachment({data:JSON.stringify(c,null,2),filename:`${o}.json`}),t.Sentry?.captureException(new Error("Cannot resolve figma component key for NodeID"),{extra:{nodeId:u,fileID:o},level:"warning"})});let d=`${o}/${u}`;for(let f of n)s[f]===d&&(s[f]=p)}})),s}});function IC(t){if(!Array.isArray(t))throw new TypeError(`Expected an array, got \`${typeof t}\`.`);for(let i of t)_C(i);let e=t.some(({readableObjectMode:i})=>i),r=Jue(t,e),n=new AC({objectMode:e,writableHighWaterMark:r,readableHighWaterMark:r});for(let i of t)n.add(i);return t.length===0&&M3(n),n}var Ay,R3,kC,Jue,AC,Yue,Xue,Que,_C,Zue,O3,ele,tle,rle,B3,M3,FC,L3,nle,Py,I3,N3,$3=N(()=>{h();Ay=require("node:events"),R3=require("node:stream"),kC=require("node:stream/promises");Jue=(t,e)=>{if(t.length===0)return 16384;let r=t.filter(({readableObjectMode:n})=>n===e).map(({readableHighWaterMark:n})=>n);return Math.max(...r)},AC=class extends R3.PassThrough{#d=new Set([]);#h=new Set([]);#x=new Set([]);#c;add(e){_C(e),!this.#d.has(e)&&(this.#d.add(e),this.#c??=Yue(this,this.#d),Zue({passThroughStream:this,stream:e,streams:this.#d,ended:this.#h,aborted:this.#x,onFinished:this.#c}),e.pipe(this,{end:!1}))}remove(e){return _C(e),this.#d.has(e)?(e.unpipe(this),!0):!1}},Yue=async(t,e)=>{Py(t,I3);let r=new AbortController;try{await Promise.race([Xue(t,r),Que(t,e,r)])}finally{r.abort(),Py(t,-I3)}},Xue=async(t,{signal:e})=>{await(0,kC.finished)(t,{signal:e,cleanup:!0})},Que=async(t,e,{signal:r})=>{for await(let[n]of(0,Ay.on)(t,"unpipe",{signal:r}))e.has(n)&&n.emit(B3)},_C=t=>{if(typeof t?.pipe!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof t}\`.`)},Zue=async({passThroughStream:t,stream:e,streams:r,ended:n,aborted:i,onFinished:s})=>{Py(t,N3);let o=new AbortController;try{await Promise.race([ele(s,e),tle({passThroughStream:t,stream:e,streams:r,ended:n,aborted:i,controller:o}),rle({stream:e,streams:r,ended:n,aborted:i,controller:o})])}finally{o.abort(),Py(t,-N3)}r.size===n.size+i.size&&(n.size===0&&i.size>0?FC(t):M3(t))},O3=t=>t?.code==="ERR_STREAM_PREMATURE_CLOSE",ele=async(t,e)=>{try{await t,FC(e)}catch(r){O3(r)?FC(e):L3(e,r)}},tle=async({passThroughStream:t,stream:e,streams:r,ended:n,aborted:i,controller:{signal:s}})=>{try{await(0,kC.finished)(e,{signal:s,cleanup:!0,readable:!0,writable:!1}),r.has(e)&&n.add(e)}catch(o){if(s.aborted||!r.has(e))return;O3(o)?i.add(e):L3(t,o)}},rle=async({stream:t,streams:e,ended:r,aborted:n,controller:{signal:i}})=>{await(0,Ay.once)(t,B3,{signal:i}),e.delete(t),r.delete(t),n.delete(t)},B3=Symbol("unpipe"),M3=t=>{t.writable&&t.end()},FC=t=>{(t.readable||t.writable)&&t.destroy()},L3=(t,e)=>{t.destroyed||(t.once("error",nle),t.destroy(e))},nle=()=>{},Py=(t,e)=>{let r=t.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&t.setMaxListeners(r+e)},I3=2,N3=1});var j3=S(Yl=>{"use strict";h();Object.defineProperty(Yl,"__esModule",{value:!0});Yl.splitWhen=Yl.flatten=void 0;function ile(t){return t.reduce((e,r)=>[].concat(e,r),[])}Yl.flatten=ile;function sle(t,e){let r=[[]],n=0;for(let i of t)e(i)?(n++,r[n]=[]):r[n].push(i);return r}Yl.splitWhen=sle});var U3=S(_y=>{"use strict";h();Object.defineProperty(_y,"__esModule",{value:!0});_y.isEnoentCodeError=void 0;function ole(t){return t.code==="ENOENT"}_y.isEnoentCodeError=ole});var q3=S(Fy=>{"use strict";h();Object.defineProperty(Fy,"__esModule",{value:!0});Fy.createDirentFromStats=void 0;var NC=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function ale(t,e){return new NC(t,e)}Fy.createDirentFromStats=ale});var V3=S(Ir=>{"use strict";h();Object.defineProperty(Ir,"__esModule",{value:!0});Ir.convertPosixPathToPattern=Ir.convertWindowsPathToPattern=Ir.convertPathToPattern=Ir.escapePosixPath=Ir.escapeWindowsPath=Ir.escape=Ir.removeLeadingDotSegment=Ir.makeAbsolute=Ir.unixify=void 0;var cle=require("os"),ule=require("path"),z3=cle.platform()==="win32",lle=2,ple=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,dle=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,fle=/^\\\\([.?])/,mle=/\\(?![!()+@[\]{}])/g;function hle(t){return t.replace(/\\/g,"/")}Ir.unixify=hle;function gle(t,e){return ule.resolve(t,e)}Ir.makeAbsolute=gle;function yle(t){if(t.charAt(0)==="."){let e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(lle)}return t}Ir.removeLeadingDotSegment=yle;Ir.escape=z3?RC:OC;function RC(t){return t.replace(dle,"\\$2")}Ir.escapeWindowsPath=RC;function OC(t){return t.replace(ple,"\\$2")}Ir.escapePosixPath=OC;Ir.convertPathToPattern=z3?G3:H3;function G3(t){return RC(t).replace(fle,"//$1").replace(mle,"/")}Ir.convertWindowsPathToPattern=G3;function H3(t){return OC(t)}Ir.convertPosixPathToPattern=H3});var W3=S((KUe,K3)=>{h();K3.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var X3=S((JUe,Y3)=>{h();var vle=W3(),J3={"{":"}","(":")","[":"]"},ble=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,n=-2,i=-2,s=-2,o=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||n!==-1&&t[e]==="["&&t[e+1]!=="]"&&(n<e&&(n=t.indexOf("]",e)),n>e&&(o===-1||o>n||(o=t.indexOf("\\",e),o===-1||o>n)))||i!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(i=t.indexOf("}",e),i>e&&(o=t.indexOf("\\",e),o===-1||o>i))||s!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(s=t.indexOf(")",e),s>e&&(o=t.indexOf("\\",e),o===-1||o>s))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(s=t.indexOf(")",r),s>r&&(o=t.indexOf("\\",r),o===-1||o>s))))return!0;if(t[e]==="\\"){var a=t[e+1];e+=2;var c=J3[a];if(c){var u=t.indexOf(c,e);u!==-1&&(e=u+1)}if(t[e]==="!")return!0}else e++}return!1},xle=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var r=t[e+1];e+=2;var n=J3[r];if(n){var i=t.indexOf(n,e);i!==-1&&(e=i+1)}if(t[e]==="!")return!0}else e++}return!1};Y3.exports=function(e,r){if(typeof e!="string"||e==="")return!1;if(vle(e))return!0;var n=ble;return r&&r.strict===!1&&(n=xle),n(e)}});var Z3=S((XUe,Q3)=>{"use strict";h();var Dle=X3(),Ele=require("path").posix.dirname,Cle=require("os").platform()==="win32",BC="/",wle=/\\/g,Sle=/[\{\[].*[\}\]]$/,Tle=/(^|[^\\])([\{\[]|\([^\)]+$)/,Ple=/\\([\!\*\?\|\[\]\(\)\{\}])/g;Q3.exports=function(e,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&Cle&&e.indexOf(BC)<0&&(e=e.replace(wle,BC)),Sle.test(e)&&(e+=BC),e+="a";do e=Ele(e);while(Dle(e)||Tle.test(e));return e.replace(Ple,"$1")}});var ky=S(Ui=>{"use strict";h();Ui.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;Ui.find=(t,e)=>t.nodes.find(r=>r.type===e);Ui.exceedsLimit=(t,e,r=1,n)=>n===!1||!Ui.isInteger(t)||!Ui.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=n;Ui.escapeNode=(t,e=0,r)=>{let n=t.nodes[e];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};Ui.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1;Ui.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0===0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;Ui.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;Ui.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);Ui.flatten=(...t)=>{let e=[],r=n=>{for(let i=0;i<n.length;i++){let s=n[i];if(Array.isArray(s)){r(s);continue}s!==void 0&&e.push(s)}return e};return r(t),e}});var Iy=S((tqe,t8)=>{"use strict";h();var e8=ky();t8.exports=(t,e={})=>{let r=(n,i={})=>{let s=e.escapeInvalid&&e8.isInvalidBrace(i),o=n.invalid===!0&&e.escapeInvalid===!0,a="";if(n.value)return(s||o)&&e8.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let c of n.nodes)a+=r(c);return a};return r(t)}});var n8=S((nqe,r8)=>{"use strict";h();r8.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var d8=S((sqe,p8)=>{"use strict";h();var i8=n8(),qc=(t,e,r)=>{if(i8(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(i8(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let i=String(n.relaxZeros),s=String(n.shorthand),o=String(n.capture),a=String(n.wrap),c=t+":"+e+"="+i+s+o+a;if(qc.cache.hasOwnProperty(c))return qc.cache[c].result;let u=Math.min(t,e),l=Math.max(t,e);if(Math.abs(u-l)===1){let g=t+"|"+e;return n.capture?`(${g})`:n.wrap===!1?g:`(?:${g})`}let p=l8(t)||l8(e),d={min:t,max:e,a:u,b:l},f=[],m=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),u<0){let g=l<0?Math.abs(l):1;m=s8(g,Math.abs(u),d,n),u=d.a=0}return l>=0&&(f=s8(u,l,d,n)),d.negatives=m,d.positives=f,d.result=Ale(m,f,n),n.capture===!0?d.result=`(${d.result})`:n.wrap!==!1&&f.length+m.length>1&&(d.result=`(?:${d.result})`),qc.cache[c]=d,d.result};function Ale(t,e,r){let n=MC(t,e,"-",!1,r)||[],i=MC(e,t,"",!1,r)||[],s=MC(t,e,"-?",!0,r)||[];return n.concat(s).concat(i).join("|")}function _le(t,e){let r=1,n=1,i=a8(t,r),s=new Set([e]);for(;t<=i&&i<=e;)s.add(i),r+=1,i=a8(t,r);for(i=c8(e+1,n)-1;t<i&&i<=e;)s.add(i),n+=1,i=c8(e+1,n)-1;return s=[...s],s.sort(Ile),s}function Fle(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let n=kle(t,e),i=n.length,s="",o=0;for(let a=0;a<i;a++){let[c,u]=n[a];c===u?s+=c:c!=="0"||u!=="9"?s+=Nle(c,u,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:i}}function s8(t,e,r,n){let i=_le(t,e),s=[],o=t,a;for(let c=0;c<i.length;c++){let u=i[c],l=Fle(String(o),String(u),n),p="";if(!r.isPadded&&a&&a.pattern===l.pattern){a.count.length>1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+u8(a.count),o=u+1;continue}r.isPadded&&(p=Rle(u,r,n)),l.string=p+l.pattern+u8(l.count),s.push(l),o=u+1,a=l}return s}function MC(t,e,r,n,i){let s=[];for(let o of t){let{string:a}=o;!n&&!o8(e,"string",a)&&s.push(r+a),n&&o8(e,"string",a)&&s.push(r+a)}return s}function kle(t,e){let r=[];for(let n=0;n<t.length;n++)r.push([t[n],e[n]]);return r}function Ile(t,e){return t>e?1:e>t?-1:0}function o8(t,e,r){return t.some(n=>n[e]===r)}function a8(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function c8(t,e){return t-t%Math.pow(10,e)}function u8(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function Nle(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function l8(t){return/^-?(0+)\d/.test(t)}function Rle(t,e,r){if(!e.isPadded)return t;let n=Math.abs(e.maxLen-String(t).length),i=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${n}}`:`0{${n}}`}}qc.cache={};qc.clearCache=()=>qc.cache={};p8.exports=qc});var jC=S((aqe,b8)=>{"use strict";h();var Ole=require("util"),m8=d8(),f8=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),Ble=t=>e=>t===!0?Number(e):String(e),LC=t=>typeof t=="number"||typeof t=="string"&&t!=="",Bf=t=>Number.isInteger(+t),$C=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},Mle=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,Lle=(t,e,r)=>{if(e>0){let n=t[0]==="-"?"-":"";n&&(t=t.slice(1)),t=n+t.padStart(n?e-1:e,"0")}return r===!1?String(t):t},Ry=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},$le=(t,e,r)=>{t.negatives.sort((a,c)=>a<c?-1:a>c?1:0),t.positives.sort((a,c)=>a<c?-1:a>c?1:0);let n=e.capture?"":"?:",i="",s="",o;return t.positives.length&&(i=t.positives.map(a=>Ry(String(a),r)).join("|")),t.negatives.length&&(s=`-(${n}${t.negatives.map(a=>Ry(String(a),r)).join("|")})`),i&&s?o=`${i}|${s}`:o=i||s,e.wrap?`(${n}${o})`:o},h8=(t,e,r,n)=>{if(r)return m8(t,e,{wrap:!1,...n});let i=String.fromCharCode(t);if(t===e)return i;let s=String.fromCharCode(e);return`[${i}-${s}]`},g8=(t,e,r)=>{if(Array.isArray(t)){let n=r.wrap===!0,i=r.capture?"":"?:";return n?`(${i}${t.join("|")})`:t.join("|")}return m8(t,e,r)},y8=(...t)=>new RangeError("Invalid range arguments: "+Ole.inspect(...t)),v8=(t,e,r)=>{if(r.strictRanges===!0)throw y8([t,e]);return[]},jle=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},Ule=(t,e,r=1,n={})=>{let i=Number(t),s=Number(e);if(!Number.isInteger(i)||!Number.isInteger(s)){if(n.strictRanges===!0)throw y8([t,e]);return[]}i===0&&(i=0),s===0&&(s=0);let o=i>s,a=String(t),c=String(e),u=String(r);r=Math.max(Math.abs(r),1);let l=$C(a)||$C(c)||$C(u),p=l?Math.max(a.length,c.length,u.length):0,d=l===!1&&Mle(t,e,n)===!1,f=n.transform||Ble(d);if(n.toRegex&&r===1)return h8(Ry(t,p),Ry(e,p),!0,n);let m={negatives:[],positives:[]},g=D=>m[D<0?"negatives":"positives"].push(Math.abs(D)),y=[],v=0;for(;o?i>=s:i<=s;)n.toRegex===!0&&r>1?g(i):y.push(Lle(f(i,v),p,d)),i=o?i-r:i+r,v++;return n.toRegex===!0?r>1?$le(m,n,p):g8(y,null,{wrap:!1,...n}):y},qle=(t,e,r=1,n={})=>{if(!Bf(t)&&t.length>1||!Bf(e)&&e.length>1)return v8(t,e,n);let i=n.transform||(d=>String.fromCharCode(d)),s=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=s>o,c=Math.min(s,o),u=Math.max(s,o);if(n.toRegex&&r===1)return h8(c,u,!1,n);let l=[],p=0;for(;a?s>=o:s<=o;)l.push(i(s,p)),s=a?s-r:s+r,p++;return n.toRegex===!0?g8(l,null,{wrap:!1,options:n}):l},Ny=(t,e,r,n={})=>{if(e==null&&LC(t))return[t];if(!LC(t)||!LC(e))return v8(t,e,n);if(typeof r=="function")return Ny(t,e,1,{transform:r});if(f8(r))return Ny(t,e,0,r);let i={...n};return i.capture===!0&&(i.wrap=!0),r=r||i.step||1,Bf(r)?Bf(t)&&Bf(e)?Ule(t,e,r,i):qle(t,e,Math.max(Math.abs(r),1),i):r!=null&&!f8(r)?jle(r,i):Ny(t,e,1,r)};b8.exports=Ny});var E8=S((uqe,D8)=>{"use strict";h();var zle=jC(),x8=ky(),Gle=(t,e={})=>{let r=(n,i={})=>{let s=x8.isInvalidBrace(i),o=n.invalid===!0&&e.escapeInvalid===!0,a=s===!0||o===!0,c=e.escapeInvalid===!0?"\\":"",u="";if(n.isOpen===!0)return c+n.value;if(n.isClose===!0)return console.log("node.isClose",c,n.value),c+n.value;if(n.type==="open")return a?c+n.value:"(";if(n.type==="close")return a?c+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let l=x8.reduce(n.nodes),p=zle(...l,{...e,wrap:!1,toRegex:!0,strictZeros:!0});if(p.length!==0)return l.length>1&&p.length>1?`(${p})`:p}if(n.nodes)for(let l of n.nodes)u+=r(l,n);return u};return r(t)};D8.exports=Gle});var S8=S((pqe,w8)=>{"use strict";h();var Hle=jC(),C8=Iy(),Xl=ky(),zc=(t="",e="",r=!1)=>{let n=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?Xl.flatten(e).map(i=>`{${i}}`):e;for(let i of t)if(Array.isArray(i))for(let s of i)n.push(zc(s,e,r));else for(let s of e)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?zc(i,s,r):i+s);return Xl.flatten(n)},Vle=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,n=(i,s={})=>{i.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(i.invalid||i.dollar){a.push(zc(a.pop(),C8(i,e)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){a.push(zc(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let p=Xl.reduce(i.nodes);if(Xl.exceedsLimit(...p,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let d=Hle(...p,e);d.length===0&&(d=C8(i,e)),a.push(zc(a.pop(),d)),i.nodes=[];return}let c=Xl.encloseBrace(i),u=i.queue,l=i;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,u=l.queue;for(let p=0;p<i.nodes.length;p++){let d=i.nodes[p];if(d.type==="comma"&&i.type==="brace"){p===1&&u.push(""),u.push("");continue}if(d.type==="close"){a.push(zc(a.pop(),u,c));continue}if(d.value&&d.type!=="open"){u.push(zc(u.pop(),d.value));continue}d.nodes&&n(d,i)}return u};return Xl.flatten(n(t))};w8.exports=Vle});var P8=S((fqe,T8)=>{"use strict";h();T8.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
1227
|
+
\u274C Not a Figma URL - hostname check failed`),null;let n=r.searchParams.get("node-id")?.replaceAll("-",":"),i=r.pathname.split("/")[2];return n&&i?{fileID:i,nodeId:n}:null}catch{return null}},Gue="https://api.figma.com/v1/",ro=async(t,e,r,{auth:n,params:i})=>{let s=new URL(`${Gue}${r}`),o={};if(n.oauth?o.Authorization=`Bearer ${n.access_token}`:o["X-FIGMA-TOKEN"]=n.access_token,i)for(let c in i)i[c]!=null&&s.searchParams.set(c,i[c].toString());let a=await He(s,{headers:o});if(!a.ok){if(a.status===401){L.error("Seems like figma auth is expired or it's invalid, let's try to");let c=await tr(t,e,{force:!0,figmaAuth:!0});return ro(t,e,r,{auth:c.figmaAuth,params:i})}throw new Error(`Figma REST ${a.statusText}: ${await a.text()}`)}return a.json()},A3=async(t,e,r,n,i,s)=>(await ro(t,e,`files/${n}/nodes`,{auth:r,params:{ids:i,depth:s}})).nodes,Hue=/^[a-f0-9]{40}$/;Kue=async(t,e,r,n)=>{if(!r)return{};let i=new Map,s={};return n.forEach(o=>{let a=Of(o);if(!a){t.Sentry?.captureException(new Error("Invalid Figma URL, use Cmd+L while selecting a figma component to get a link to selection"),{extra:{figmaUrl:o},level:"warning"});return}let c=i.get(a.fileID);c||(c=[],i.set(a.fileID,c)),c.includes(a.nodeId)||c.push(a.nodeId),s[o]=`${a.fileID}/${a.nodeId}`}),await Promise.all(Array.from(i.entries()).map(async([o,a])=>{let c=await A3(t,e,r,o,a.join(","),0);for(let u of a){let l=c[u],p=l.components[u]?.key??l.componentSets[u]?.key;p||t.Sentry?.withScope(f=>{f.addAttachment({data:JSON.stringify(c,null,2),filename:`${o}.json`}),t.Sentry?.captureException(new Error("Cannot resolve figma component key for NodeID"),{extra:{nodeId:u,fileID:o},level:"warning"})});let d=`${o}/${u}`;for(let f of n)s[f]===d&&(s[f]=p)}})),s}});function IC(t){if(!Array.isArray(t))throw new TypeError(`Expected an array, got \`${typeof t}\`.`);for(let i of t)_C(i);let e=t.some(({readableObjectMode:i})=>i),r=Jue(t,e),n=new AC({objectMode:e,writableHighWaterMark:r,readableHighWaterMark:r});for(let i of t)n.add(i);return t.length===0&&M3(n),n}var Ay,R3,kC,Jue,AC,Yue,Xue,Que,_C,Zue,O3,ele,tle,rle,B3,M3,FC,L3,nle,Py,I3,N3,$3=N(()=>{h();Ay=require("node:events"),R3=require("node:stream"),kC=require("node:stream/promises");Jue=(t,e)=>{if(t.length===0)return 16384;let r=t.filter(({readableObjectMode:n})=>n===e).map(({readableHighWaterMark:n})=>n);return Math.max(...r)},AC=class extends R3.PassThrough{#p=new Set([]);#h=new Set([]);#x=new Set([]);#c;add(e){_C(e),!this.#p.has(e)&&(this.#p.add(e),this.#c??=Yue(this,this.#p),Zue({passThroughStream:this,stream:e,streams:this.#p,ended:this.#h,aborted:this.#x,onFinished:this.#c}),e.pipe(this,{end:!1}))}remove(e){return _C(e),this.#p.has(e)?(e.unpipe(this),!0):!1}},Yue=async(t,e)=>{Py(t,I3);let r=new AbortController;try{await Promise.race([Xue(t,r),Que(t,e,r)])}finally{r.abort(),Py(t,-I3)}},Xue=async(t,{signal:e})=>{await(0,kC.finished)(t,{signal:e,cleanup:!0})},Que=async(t,e,{signal:r})=>{for await(let[n]of(0,Ay.on)(t,"unpipe",{signal:r}))e.has(n)&&n.emit(B3)},_C=t=>{if(typeof t?.pipe!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof t}\`.`)},Zue=async({passThroughStream:t,stream:e,streams:r,ended:n,aborted:i,onFinished:s})=>{Py(t,N3);let o=new AbortController;try{await Promise.race([ele(s,e),tle({passThroughStream:t,stream:e,streams:r,ended:n,aborted:i,controller:o}),rle({stream:e,streams:r,ended:n,aborted:i,controller:o})])}finally{o.abort(),Py(t,-N3)}r.size===n.size+i.size&&(n.size===0&&i.size>0?FC(t):M3(t))},O3=t=>t?.code==="ERR_STREAM_PREMATURE_CLOSE",ele=async(t,e)=>{try{await t,FC(e)}catch(r){O3(r)?FC(e):L3(e,r)}},tle=async({passThroughStream:t,stream:e,streams:r,ended:n,aborted:i,controller:{signal:s}})=>{try{await(0,kC.finished)(e,{signal:s,cleanup:!0,readable:!0,writable:!1}),r.has(e)&&n.add(e)}catch(o){if(s.aborted||!r.has(e))return;O3(o)?i.add(e):L3(t,o)}},rle=async({stream:t,streams:e,ended:r,aborted:n,controller:{signal:i}})=>{await(0,Ay.once)(t,B3,{signal:i}),e.delete(t),r.delete(t),n.delete(t)},B3=Symbol("unpipe"),M3=t=>{t.writable&&t.end()},FC=t=>{(t.readable||t.writable)&&t.destroy()},L3=(t,e)=>{t.destroyed||(t.once("error",nle),t.destroy(e))},nle=()=>{},Py=(t,e)=>{let r=t.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&t.setMaxListeners(r+e)},I3=2,N3=1});var j3=S(Yl=>{"use strict";h();Object.defineProperty(Yl,"__esModule",{value:!0});Yl.splitWhen=Yl.flatten=void 0;function ile(t){return t.reduce((e,r)=>[].concat(e,r),[])}Yl.flatten=ile;function sle(t,e){let r=[[]],n=0;for(let i of t)e(i)?(n++,r[n]=[]):r[n].push(i);return r}Yl.splitWhen=sle});var U3=S(_y=>{"use strict";h();Object.defineProperty(_y,"__esModule",{value:!0});_y.isEnoentCodeError=void 0;function ole(t){return t.code==="ENOENT"}_y.isEnoentCodeError=ole});var q3=S(Fy=>{"use strict";h();Object.defineProperty(Fy,"__esModule",{value:!0});Fy.createDirentFromStats=void 0;var NC=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function ale(t,e){return new NC(t,e)}Fy.createDirentFromStats=ale});var V3=S(Ir=>{"use strict";h();Object.defineProperty(Ir,"__esModule",{value:!0});Ir.convertPosixPathToPattern=Ir.convertWindowsPathToPattern=Ir.convertPathToPattern=Ir.escapePosixPath=Ir.escapeWindowsPath=Ir.escape=Ir.removeLeadingDotSegment=Ir.makeAbsolute=Ir.unixify=void 0;var cle=require("os"),ule=require("path"),z3=cle.platform()==="win32",lle=2,ple=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,dle=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,fle=/^\\\\([.?])/,mle=/\\(?![!()+@[\]{}])/g;function hle(t){return t.replace(/\\/g,"/")}Ir.unixify=hle;function gle(t,e){return ule.resolve(t,e)}Ir.makeAbsolute=gle;function yle(t){if(t.charAt(0)==="."){let e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(lle)}return t}Ir.removeLeadingDotSegment=yle;Ir.escape=z3?RC:OC;function RC(t){return t.replace(dle,"\\$2")}Ir.escapeWindowsPath=RC;function OC(t){return t.replace(ple,"\\$2")}Ir.escapePosixPath=OC;Ir.convertPathToPattern=z3?G3:H3;function G3(t){return RC(t).replace(fle,"//$1").replace(mle,"/")}Ir.convertWindowsPathToPattern=G3;function H3(t){return OC(t)}Ir.convertPosixPathToPattern=H3});var W3=S((KUe,K3)=>{h();K3.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var X3=S((JUe,Y3)=>{h();var vle=W3(),J3={"{":"}","(":")","[":"]"},ble=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,n=-2,i=-2,s=-2,o=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||n!==-1&&t[e]==="["&&t[e+1]!=="]"&&(n<e&&(n=t.indexOf("]",e)),n>e&&(o===-1||o>n||(o=t.indexOf("\\",e),o===-1||o>n)))||i!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(i=t.indexOf("}",e),i>e&&(o=t.indexOf("\\",e),o===-1||o>i))||s!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(s=t.indexOf(")",e),s>e&&(o=t.indexOf("\\",e),o===-1||o>s))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(s=t.indexOf(")",r),s>r&&(o=t.indexOf("\\",r),o===-1||o>s))))return!0;if(t[e]==="\\"){var a=t[e+1];e+=2;var c=J3[a];if(c){var u=t.indexOf(c,e);u!==-1&&(e=u+1)}if(t[e]==="!")return!0}else e++}return!1},xle=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var r=t[e+1];e+=2;var n=J3[r];if(n){var i=t.indexOf(n,e);i!==-1&&(e=i+1)}if(t[e]==="!")return!0}else e++}return!1};Y3.exports=function(e,r){if(typeof e!="string"||e==="")return!1;if(vle(e))return!0;var n=ble;return r&&r.strict===!1&&(n=xle),n(e)}});var Z3=S((XUe,Q3)=>{"use strict";h();var Dle=X3(),Ele=require("path").posix.dirname,Cle=require("os").platform()==="win32",BC="/",wle=/\\/g,Sle=/[\{\[].*[\}\]]$/,Tle=/(^|[^\\])([\{\[]|\([^\)]+$)/,Ple=/\\([\!\*\?\|\[\]\(\)\{\}])/g;Q3.exports=function(e,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&Cle&&e.indexOf(BC)<0&&(e=e.replace(wle,BC)),Sle.test(e)&&(e+=BC),e+="a";do e=Ele(e);while(Dle(e)||Tle.test(e));return e.replace(Ple,"$1")}});var ky=S(Ui=>{"use strict";h();Ui.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;Ui.find=(t,e)=>t.nodes.find(r=>r.type===e);Ui.exceedsLimit=(t,e,r=1,n)=>n===!1||!Ui.isInteger(t)||!Ui.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=n;Ui.escapeNode=(t,e=0,r)=>{let n=t.nodes[e];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};Ui.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1;Ui.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0===0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;Ui.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;Ui.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);Ui.flatten=(...t)=>{let e=[],r=n=>{for(let i=0;i<n.length;i++){let s=n[i];if(Array.isArray(s)){r(s);continue}s!==void 0&&e.push(s)}return e};return r(t),e}});var Iy=S((tqe,t8)=>{"use strict";h();var e8=ky();t8.exports=(t,e={})=>{let r=(n,i={})=>{let s=e.escapeInvalid&&e8.isInvalidBrace(i),o=n.invalid===!0&&e.escapeInvalid===!0,a="";if(n.value)return(s||o)&&e8.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let c of n.nodes)a+=r(c);return a};return r(t)}});var n8=S((nqe,r8)=>{"use strict";h();r8.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var d8=S((sqe,p8)=>{"use strict";h();var i8=n8(),qc=(t,e,r)=>{if(i8(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(i8(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let i=String(n.relaxZeros),s=String(n.shorthand),o=String(n.capture),a=String(n.wrap),c=t+":"+e+"="+i+s+o+a;if(qc.cache.hasOwnProperty(c))return qc.cache[c].result;let u=Math.min(t,e),l=Math.max(t,e);if(Math.abs(u-l)===1){let g=t+"|"+e;return n.capture?`(${g})`:n.wrap===!1?g:`(?:${g})`}let p=l8(t)||l8(e),d={min:t,max:e,a:u,b:l},f=[],m=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),u<0){let g=l<0?Math.abs(l):1;m=s8(g,Math.abs(u),d,n),u=d.a=0}return l>=0&&(f=s8(u,l,d,n)),d.negatives=m,d.positives=f,d.result=Ale(m,f,n),n.capture===!0?d.result=`(${d.result})`:n.wrap!==!1&&f.length+m.length>1&&(d.result=`(?:${d.result})`),qc.cache[c]=d,d.result};function Ale(t,e,r){let n=MC(t,e,"-",!1,r)||[],i=MC(e,t,"",!1,r)||[],s=MC(t,e,"-?",!0,r)||[];return n.concat(s).concat(i).join("|")}function _le(t,e){let r=1,n=1,i=a8(t,r),s=new Set([e]);for(;t<=i&&i<=e;)s.add(i),r+=1,i=a8(t,r);for(i=c8(e+1,n)-1;t<i&&i<=e;)s.add(i),n+=1,i=c8(e+1,n)-1;return s=[...s],s.sort(Ile),s}function Fle(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let n=kle(t,e),i=n.length,s="",o=0;for(let a=0;a<i;a++){let[c,u]=n[a];c===u?s+=c:c!=="0"||u!=="9"?s+=Nle(c,u,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:i}}function s8(t,e,r,n){let i=_le(t,e),s=[],o=t,a;for(let c=0;c<i.length;c++){let u=i[c],l=Fle(String(o),String(u),n),p="";if(!r.isPadded&&a&&a.pattern===l.pattern){a.count.length>1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+u8(a.count),o=u+1;continue}r.isPadded&&(p=Rle(u,r,n)),l.string=p+l.pattern+u8(l.count),s.push(l),o=u+1,a=l}return s}function MC(t,e,r,n,i){let s=[];for(let o of t){let{string:a}=o;!n&&!o8(e,"string",a)&&s.push(r+a),n&&o8(e,"string",a)&&s.push(r+a)}return s}function kle(t,e){let r=[];for(let n=0;n<t.length;n++)r.push([t[n],e[n]]);return r}function Ile(t,e){return t>e?1:e>t?-1:0}function o8(t,e,r){return t.some(n=>n[e]===r)}function a8(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function c8(t,e){return t-t%Math.pow(10,e)}function u8(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function Nle(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function l8(t){return/^-?(0+)\d/.test(t)}function Rle(t,e,r){if(!e.isPadded)return t;let n=Math.abs(e.maxLen-String(t).length),i=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${n}}`:`0{${n}}`}}qc.cache={};qc.clearCache=()=>qc.cache={};p8.exports=qc});var jC=S((aqe,b8)=>{"use strict";h();var Ole=require("util"),m8=d8(),f8=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),Ble=t=>e=>t===!0?Number(e):String(e),LC=t=>typeof t=="number"||typeof t=="string"&&t!=="",Bf=t=>Number.isInteger(+t),$C=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},Mle=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,Lle=(t,e,r)=>{if(e>0){let n=t[0]==="-"?"-":"";n&&(t=t.slice(1)),t=n+t.padStart(n?e-1:e,"0")}return r===!1?String(t):t},Ry=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},$le=(t,e,r)=>{t.negatives.sort((a,c)=>a<c?-1:a>c?1:0),t.positives.sort((a,c)=>a<c?-1:a>c?1:0);let n=e.capture?"":"?:",i="",s="",o;return t.positives.length&&(i=t.positives.map(a=>Ry(String(a),r)).join("|")),t.negatives.length&&(s=`-(${n}${t.negatives.map(a=>Ry(String(a),r)).join("|")})`),i&&s?o=`${i}|${s}`:o=i||s,e.wrap?`(${n}${o})`:o},h8=(t,e,r,n)=>{if(r)return m8(t,e,{wrap:!1,...n});let i=String.fromCharCode(t);if(t===e)return i;let s=String.fromCharCode(e);return`[${i}-${s}]`},g8=(t,e,r)=>{if(Array.isArray(t)){let n=r.wrap===!0,i=r.capture?"":"?:";return n?`(${i}${t.join("|")})`:t.join("|")}return m8(t,e,r)},y8=(...t)=>new RangeError("Invalid range arguments: "+Ole.inspect(...t)),v8=(t,e,r)=>{if(r.strictRanges===!0)throw y8([t,e]);return[]},jle=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},Ule=(t,e,r=1,n={})=>{let i=Number(t),s=Number(e);if(!Number.isInteger(i)||!Number.isInteger(s)){if(n.strictRanges===!0)throw y8([t,e]);return[]}i===0&&(i=0),s===0&&(s=0);let o=i>s,a=String(t),c=String(e),u=String(r);r=Math.max(Math.abs(r),1);let l=$C(a)||$C(c)||$C(u),p=l?Math.max(a.length,c.length,u.length):0,d=l===!1&&Mle(t,e,n)===!1,f=n.transform||Ble(d);if(n.toRegex&&r===1)return h8(Ry(t,p),Ry(e,p),!0,n);let m={negatives:[],positives:[]},g=D=>m[D<0?"negatives":"positives"].push(Math.abs(D)),y=[],v=0;for(;o?i>=s:i<=s;)n.toRegex===!0&&r>1?g(i):y.push(Lle(f(i,v),p,d)),i=o?i-r:i+r,v++;return n.toRegex===!0?r>1?$le(m,n,p):g8(y,null,{wrap:!1,...n}):y},qle=(t,e,r=1,n={})=>{if(!Bf(t)&&t.length>1||!Bf(e)&&e.length>1)return v8(t,e,n);let i=n.transform||(d=>String.fromCharCode(d)),s=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=s>o,c=Math.min(s,o),u=Math.max(s,o);if(n.toRegex&&r===1)return h8(c,u,!1,n);let l=[],p=0;for(;a?s>=o:s<=o;)l.push(i(s,p)),s=a?s-r:s+r,p++;return n.toRegex===!0?g8(l,null,{wrap:!1,options:n}):l},Ny=(t,e,r,n={})=>{if(e==null&&LC(t))return[t];if(!LC(t)||!LC(e))return v8(t,e,n);if(typeof r=="function")return Ny(t,e,1,{transform:r});if(f8(r))return Ny(t,e,0,r);let i={...n};return i.capture===!0&&(i.wrap=!0),r=r||i.step||1,Bf(r)?Bf(t)&&Bf(e)?Ule(t,e,r,i):qle(t,e,Math.max(Math.abs(r),1),i):r!=null&&!f8(r)?jle(r,i):Ny(t,e,1,r)};b8.exports=Ny});var E8=S((uqe,D8)=>{"use strict";h();var zle=jC(),x8=ky(),Gle=(t,e={})=>{let r=(n,i={})=>{let s=x8.isInvalidBrace(i),o=n.invalid===!0&&e.escapeInvalid===!0,a=s===!0||o===!0,c=e.escapeInvalid===!0?"\\":"",u="";if(n.isOpen===!0)return c+n.value;if(n.isClose===!0)return console.log("node.isClose",c,n.value),c+n.value;if(n.type==="open")return a?c+n.value:"(";if(n.type==="close")return a?c+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let l=x8.reduce(n.nodes),p=zle(...l,{...e,wrap:!1,toRegex:!0,strictZeros:!0});if(p.length!==0)return l.length>1&&p.length>1?`(${p})`:p}if(n.nodes)for(let l of n.nodes)u+=r(l,n);return u};return r(t)};D8.exports=Gle});var S8=S((pqe,w8)=>{"use strict";h();var Hle=jC(),C8=Iy(),Xl=ky(),zc=(t="",e="",r=!1)=>{let n=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?Xl.flatten(e).map(i=>`{${i}}`):e;for(let i of t)if(Array.isArray(i))for(let s of i)n.push(zc(s,e,r));else for(let s of e)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?zc(i,s,r):i+s);return Xl.flatten(n)},Vle=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,n=(i,s={})=>{i.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(i.invalid||i.dollar){a.push(zc(a.pop(),C8(i,e)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){a.push(zc(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let p=Xl.reduce(i.nodes);if(Xl.exceedsLimit(...p,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let d=Hle(...p,e);d.length===0&&(d=C8(i,e)),a.push(zc(a.pop(),d)),i.nodes=[];return}let c=Xl.encloseBrace(i),u=i.queue,l=i;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,u=l.queue;for(let p=0;p<i.nodes.length;p++){let d=i.nodes[p];if(d.type==="comma"&&i.type==="brace"){p===1&&u.push(""),u.push("");continue}if(d.type==="close"){a.push(zc(a.pop(),u,c));continue}if(d.value&&d.type!=="open"){u.push(zc(u.pop(),d.value));continue}d.nodes&&n(d,i)}return u};return Xl.flatten(n(t))};w8.exports=Vle});var P8=S((fqe,T8)=>{"use strict";h();T8.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
1228
1228
|
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var I8=S((hqe,k8)=>{"use strict";h();var Kle=Iy(),{MAX_LENGTH:A8,CHAR_BACKSLASH:UC,CHAR_BACKTICK:Wle,CHAR_COMMA:Jle,CHAR_DOT:Yle,CHAR_LEFT_PARENTHESES:Xle,CHAR_RIGHT_PARENTHESES:Qle,CHAR_LEFT_CURLY_BRACE:Zle,CHAR_RIGHT_CURLY_BRACE:epe,CHAR_LEFT_SQUARE_BRACKET:_8,CHAR_RIGHT_SQUARE_BRACKET:F8,CHAR_DOUBLE_QUOTE:tpe,CHAR_SINGLE_QUOTE:rpe,CHAR_NO_BREAK_SPACE:npe,CHAR_ZERO_WIDTH_NOBREAK_SPACE:ipe}=P8(),spe=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},n=typeof r.maxLength=="number"?Math.min(A8,r.maxLength):A8;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);let i={type:"root",input:t,nodes:[]},s=[i],o=i,a=i,c=0,u=t.length,l=0,p=0,d,f=()=>t[l++],m=g=>{if(g.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&g.type==="text"){a.value+=g.value;return}return o.nodes.push(g),g.parent=o,g.prev=a,a=g,g};for(m({type:"bos"});l<u;)if(o=s[s.length-1],d=f(),!(d===ipe||d===npe)){if(d===UC){m({type:"text",value:(e.keepEscaping?d:"")+f()});continue}if(d===F8){m({type:"text",value:"\\"+d});continue}if(d===_8){c++;let g;for(;l<u&&(g=f());){if(d+=g,g===_8){c++;continue}if(g===UC){d+=f();continue}if(g===F8&&(c--,c===0))break}m({type:"text",value:d});continue}if(d===Xle){o=m({type:"paren",nodes:[]}),s.push(o),m({type:"text",value:d});continue}if(d===Qle){if(o.type!=="paren"){m({type:"text",value:d});continue}o=s.pop(),m({type:"text",value:d}),o=s[s.length-1];continue}if(d===tpe||d===rpe||d===Wle){let g=d,y;for(e.keepQuotes!==!0&&(d="");l<u&&(y=f());){if(y===UC){d+=y+f();continue}if(y===g){e.keepQuotes===!0&&(d+=y);break}d+=y}m({type:"text",value:d});continue}if(d===Zle){p++;let y={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:p,commas:0,ranges:0,nodes:[]};o=m(y),s.push(o),m({type:"open",value:d});continue}if(d===epe){if(o.type!=="brace"){m({type:"text",value:d});continue}let g="close";o=s.pop(),o.close=!0,m({type:g,value:d}),p--,o=s[s.length-1];continue}if(d===Jle&&p>0){if(o.ranges>0){o.ranges=0;let g=o.nodes.shift();o.nodes=[g,{type:"text",value:Kle(o)}]}m({type:"comma",value:d}),o.commas++;continue}if(d===Yle&&p>0&&o.commas===0){let g=o.nodes;if(p===0||g.length===0){m({type:"text",value:d});continue}if(a.type==="dot"){if(o.range=[],a.value+=d,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){g.pop();let y=g[g.length-1];y.value+=a.value+d,a=y,o.ranges--;continue}m({type:"dot",value:d});continue}m({type:"text",value:d})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(v=>{v.nodes||(v.type==="open"&&(v.isOpen=!0),v.type==="close"&&(v.isClose=!0),v.nodes||(v.type="text"),v.invalid=!0)});let g=s[s.length-1],y=g.nodes.indexOf(o);g.nodes.splice(y,1,...o.nodes)}while(s.length>0);return m({type:"eos"}),i};k8.exports=spe});var O8=S((yqe,R8)=>{"use strict";h();var N8=Iy(),ope=E8(),ape=S8(),cpe=I8(),vi=(t,e={})=>{let r=[];if(Array.isArray(t))for(let n of t){let i=vi.create(n,e);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(vi.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};vi.parse=(t,e={})=>cpe(t,e);vi.stringify=(t,e={})=>N8(typeof t=="string"?vi.parse(t,e):t,e);vi.compile=(t,e={})=>(typeof t=="string"&&(t=vi.parse(t,e)),ope(t,e));vi.expand=(t,e={})=>{typeof t=="string"&&(t=vi.parse(t,e));let r=ape(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};vi.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?vi.compile(t,e):vi.expand(t,e);R8.exports=vi});var Mf=S((bqe,j8)=>{"use strict";h();var upe=require("path"),no="\\\\/",B8=`[^${no}]`,Go="\\.",lpe="\\+",ppe="\\?",Oy="\\/",dpe="(?=.)",M8="[^/]",qC=`(?:${Oy}|$)`,L8=`(?:^|${Oy})`,zC=`${Go}{1,2}${qC}`,fpe=`(?!${Go})`,mpe=`(?!${L8}${zC})`,hpe=`(?!${Go}{0,1}${qC})`,gpe=`(?!${zC})`,ype=`[^.${Oy}]`,vpe=`${M8}*?`,$8={DOT_LITERAL:Go,PLUS_LITERAL:lpe,QMARK_LITERAL:ppe,SLASH_LITERAL:Oy,ONE_CHAR:dpe,QMARK:M8,END_ANCHOR:qC,DOTS_SLASH:zC,NO_DOT:fpe,NO_DOTS:mpe,NO_DOT_SLASH:hpe,NO_DOTS_SLASH:gpe,QMARK_NO_DOT:ype,STAR:vpe,START_ANCHOR:L8},bpe={...$8,SLASH_LITERAL:`[${no}]`,QMARK:B8,STAR:`${B8}*?`,DOTS_SLASH:`${Go}{1,2}(?:[${no}]|$)`,NO_DOT:`(?!${Go})`,NO_DOTS:`(?!(?:^|[${no}])${Go}{1,2}(?:[${no}]|$))`,NO_DOT_SLASH:`(?!${Go}{0,1}(?:[${no}]|$))`,NO_DOTS_SLASH:`(?!${Go}{1,2}(?:[${no}]|$))`,QMARK_NO_DOT:`[^.${no}]`,START_ANCHOR:`(?:^|[${no}])`,END_ANCHOR:`(?:[${no}]|$)`},xpe={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};j8.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:xpe,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:upe.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?bpe:$8}}});var Lf=S(Wn=>{"use strict";h();var Dpe=require("path"),Epe=process.platform==="win32",{REGEX_BACKSLASH:Cpe,REGEX_REMOVE_BACKSLASH:wpe,REGEX_SPECIAL_CHARS:Spe,REGEX_SPECIAL_CHARS_GLOBAL:Tpe}=Mf();Wn.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);Wn.hasRegexChars=t=>Spe.test(t);Wn.isRegexChar=t=>t.length===1&&Wn.hasRegexChars(t);Wn.escapeRegex=t=>t.replace(Tpe,"\\$1");Wn.toPosixSlashes=t=>t.replace(Cpe,"/");Wn.removeBackslashes=t=>t.replace(wpe,e=>e==="\\"?"":e);Wn.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};Wn.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:Epe===!0||Dpe.sep==="\\";Wn.escapeLast=(t,e,r)=>{let n=t.lastIndexOf(e,r);return n===-1?t:t[n-1]==="\\"?Wn.escapeLast(t,e,n-1):`${t.slice(0,n)}\\${t.slice(n)}`};Wn.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};Wn.wrapOutput=(t,e={},r={})=>{let n=r.contains?"":"^",i=r.contains?"":"$",s=`${n}(?:${t})${i}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var W8=S((Cqe,K8)=>{"use strict";h();var U8=Lf(),{CHAR_ASTERISK:GC,CHAR_AT:Ppe,CHAR_BACKWARD_SLASH:$f,CHAR_COMMA:Ape,CHAR_DOT:HC,CHAR_EXCLAMATION_MARK:VC,CHAR_FORWARD_SLASH:V8,CHAR_LEFT_CURLY_BRACE:KC,CHAR_LEFT_PARENTHESES:WC,CHAR_LEFT_SQUARE_BRACKET:_pe,CHAR_PLUS:Fpe,CHAR_QUESTION_MARK:q8,CHAR_RIGHT_CURLY_BRACE:kpe,CHAR_RIGHT_PARENTHESES:z8,CHAR_RIGHT_SQUARE_BRACKET:Ipe}=Mf(),G8=t=>t===V8||t===$f,H8=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},Npe=(t,e)=>{let r=e||{},n=t.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],c=t,u=-1,l=0,p=0,d=!1,f=!1,m=!1,g=!1,y=!1,v=!1,D=!1,E=!1,x=!1,b=!1,C=0,w,F,P={value:"",depth:0,isGlob:!1},_=()=>u>=n,A=()=>c.charCodeAt(u+1),q=()=>(w=F,c.charCodeAt(++u));for(;u<n;){F=q();let $;if(F===$f){D=P.backslashes=!0,F=q(),F===KC&&(v=!0);continue}if(v===!0||F===KC){for(C++;_()!==!0&&(F=q());){if(F===$f){D=P.backslashes=!0,q();continue}if(F===KC){C++;continue}if(v!==!0&&F===HC&&(F=q())===HC){if(d=P.isBrace=!0,m=P.isGlob=!0,b=!0,i===!0)continue;break}if(v!==!0&&F===Ape){if(d=P.isBrace=!0,m=P.isGlob=!0,b=!0,i===!0)continue;break}if(F===kpe&&(C--,C===0)){v=!1,d=P.isBrace=!0,b=!0;break}}if(i===!0)continue;break}if(F===V8){if(s.push(u),o.push(P),P={value:"",depth:0,isGlob:!1},b===!0)continue;if(w===HC&&u===l+1){l+=2;continue}p=u+1;continue}if(r.noext!==!0&&(F===Fpe||F===Ppe||F===GC||F===q8||F===VC)===!0&&A()===WC){if(m=P.isGlob=!0,g=P.isExtglob=!0,b=!0,F===VC&&u===l&&(x=!0),i===!0){for(;_()!==!0&&(F=q());){if(F===$f){D=P.backslashes=!0,F=q();continue}if(F===z8){m=P.isGlob=!0,b=!0;break}}continue}break}if(F===GC){if(w===GC&&(y=P.isGlobstar=!0),m=P.isGlob=!0,b=!0,i===!0)continue;break}if(F===q8){if(m=P.isGlob=!0,b=!0,i===!0)continue;break}if(F===_pe){for(;_()!==!0&&($=q());){if($===$f){D=P.backslashes=!0,q();continue}if($===Ipe){f=P.isBracket=!0,m=P.isGlob=!0,b=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&F===VC&&u===l){E=P.negated=!0,l++;continue}if(r.noparen!==!0&&F===WC){if(m=P.isGlob=!0,i===!0){for(;_()!==!0&&(F=q());){if(F===WC){D=P.backslashes=!0,F=q();continue}if(F===z8){b=!0;break}}continue}break}if(m===!0){if(b=!0,i===!0)continue;break}}r.noext===!0&&(g=!1,m=!1);let O=c,z="",k="";l>0&&(z=c.slice(0,l),c=c.slice(l),p-=l),O&&m===!0&&p>0?(O=c.slice(0,p),k=c.slice(p)):m===!0?(O="",k=c):O=c,O&&O!==""&&O!=="/"&&O!==c&&G8(O.charCodeAt(O.length-1))&&(O=O.slice(0,-1)),r.unescape===!0&&(k&&(k=U8.removeBackslashes(k)),O&&D===!0&&(O=U8.removeBackslashes(O)));let B={prefix:z,input:t,start:l,base:O,glob:k,isBrace:d,isBracket:f,isGlob:m,isExtglob:g,isGlobstar:y,negated:E,negatedExtglob:x};if(r.tokens===!0&&(B.maxDepth=0,G8(F)||o.push(P),B.tokens=o),r.parts===!0||r.tokens===!0){let $;for(let G=0;G<s.length;G++){let Z=$?$+1:l,j=s[G],K=t.slice(Z,j);r.tokens&&(G===0&&l!==0?(o[G].isPrefix=!0,o[G].value=z):o[G].value=K,H8(o[G]),B.maxDepth+=o[G].depth),(G!==0||K!=="")&&a.push(K),$=j}if($&&$+1<t.length){let G=t.slice($+1);a.push(G),r.tokens&&(o[o.length-1].value=G,H8(o[o.length-1]),B.maxDepth+=o[o.length-1].depth)}B.slashes=s,B.parts=a}return B};K8.exports=Npe});var X8=S((Sqe,Y8)=>{"use strict";h();var By=Mf(),bi=Lf(),{MAX_LENGTH:My,POSIX_REGEX_SOURCE:Rpe,REGEX_NON_SPECIAL_CHARS:Ope,REGEX_SPECIAL_CHARS_BACKREF:Bpe,REPLACEMENTS:J8}=By,Mpe=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(i=>bi.escapeRegex(i)).join("..")}return r},Ql=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,JC=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=J8[t]||t;let r={...e},n=typeof r.maxLength=="number"?Math.min(My,r.maxLength):My,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",c=bi.isWindows(e),u=By.globChars(c),l=By.extglobChars(u),{DOT_LITERAL:p,PLUS_LITERAL:d,SLASH_LITERAL:f,ONE_CHAR:m,DOTS_SLASH:g,NO_DOT:y,NO_DOT_SLASH:v,NO_DOTS_SLASH:D,QMARK:E,QMARK_NO_DOT:x,STAR:b,START_ANCHOR:C}=u,w=ae=>`(${a}(?:(?!${C}${ae.dot?g:p}).)*?)`,F=r.dot?"":y,P=r.dot?E:x,_=r.bash===!0?w(r):b;r.capture&&(_=`(${_})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let A={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=bi.removePrefix(t,A),i=t.length;let q=[],O=[],z=[],k=s,B,$=()=>A.index===i-1,G=A.peek=(ae=1)=>t[A.index+ae],Z=A.advance=()=>t[++A.index]||"",j=()=>t.slice(A.index+1),K=(ae="",Te=0)=>{A.consumed+=ae,A.index+=Te},Q=ae=>{A.output+=ae.output!=null?ae.output:ae.value,K(ae.value)},ue=()=>{let ae=1;for(;G()==="!"&&(G(2)!=="("||G(3)==="?");)Z(),A.start++,ae++;return ae%2===0?!1:(A.negated=!0,A.start++,!0)},fe=ae=>{A[ae]++,z.push(ae)},pe=ae=>{A[ae]--,z.pop()},oe=ae=>{if(k.type==="globstar"){let Te=A.braces>0&&(ae.type==="comma"||ae.type==="brace"),ne=ae.extglob===!0||q.length&&(ae.type==="pipe"||ae.type==="paren");ae.type!=="slash"&&ae.type!=="paren"&&!Te&&!ne&&(A.output=A.output.slice(0,-k.output.length),k.type="star",k.value="*",k.output=_,A.output+=k.output)}if(q.length&&ae.type!=="paren"&&(q[q.length-1].inner+=ae.value),(ae.value||ae.output)&&Q(ae),k&&k.type==="text"&&ae.type==="text"){k.value+=ae.value,k.output=(k.output||"")+ae.value;return}ae.prev=k,o.push(ae),k=ae},je=(ae,Te)=>{let ne={...l[Te],conditions:1,inner:""};ne.prev=k,ne.parens=A.parens,ne.output=A.output;let Pe=(r.capture?"(":"")+ne.open;fe("parens"),oe({type:ae,value:Te,output:A.output?"":m}),oe({type:"paren",extglob:!0,value:Z(),output:Pe}),q.push(ne)},dt=ae=>{let Te=ae.close+(r.capture?")":""),ne;if(ae.type==="negate"){let Pe=_;if(ae.inner&&ae.inner.length>1&&ae.inner.includes("/")&&(Pe=w(r)),(Pe!==_||$()||/^\)+$/.test(j()))&&(Te=ae.close=`)$))${Pe}`),ae.inner.includes("*")&&(ne=j())&&/^\.[^\\/.]+$/.test(ne)){let V=JC(ne,{...e,fastpaths:!1}).output;Te=ae.close=`)${V})${Pe})`}ae.prev.type==="bos"&&(A.negatedExtglob=!0)}oe({type:"paren",extglob:!0,value:B,output:Te}),pe("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let ae=!1,Te=t.replace(Bpe,(ne,Pe,V,re,de,ve)=>re==="\\"?(ae=!0,ne):re==="?"?Pe?Pe+re+(de?E.repeat(de.length):""):ve===0?P+(de?E.repeat(de.length):""):E.repeat(V.length):re==="."?p.repeat(V.length):re==="*"?Pe?Pe+re+(de?_:""):_:Pe?ne:`\\${ne}`);return ae===!0&&(r.unescape===!0?Te=Te.replace(/\\/g,""):Te=Te.replace(/\\+/g,ne=>ne.length%2===0?"\\\\":ne?"\\":"")),Te===t&&r.contains===!0?(A.output=t,A):(A.output=bi.wrapOutput(Te,A,e),A)}for(;!$();){if(B=Z(),B==="\0")continue;if(B==="\\"){let ne=G();if(ne==="/"&&r.bash!==!0||ne==="."||ne===";")continue;if(!ne){B+="\\",oe({type:"text",value:B});continue}let Pe=/^\\+/.exec(j()),V=0;if(Pe&&Pe[0].length>2&&(V=Pe[0].length,A.index+=V,V%2!==0&&(B+="\\")),r.unescape===!0?B=Z():B+=Z(),A.brackets===0){oe({type:"text",value:B});continue}}if(A.brackets>0&&(B!=="]"||k.value==="["||k.value==="[^")){if(r.posix!==!1&&B===":"){let ne=k.value.slice(1);if(ne.includes("[")&&(k.posix=!0,ne.includes(":"))){let Pe=k.value.lastIndexOf("["),V=k.value.slice(0,Pe),re=k.value.slice(Pe+2),de=Rpe[re];if(de){k.value=V+de,A.backtrack=!0,Z(),!s.output&&o.indexOf(k)===1&&(s.output=m);continue}}}(B==="["&&G()!==":"||B==="-"&&G()==="]")&&(B=`\\${B}`),B==="]"&&(k.value==="["||k.value==="[^")&&(B=`\\${B}`),r.posix===!0&&B==="!"&&k.value==="["&&(B="^"),k.value+=B,Q({value:B});continue}if(A.quotes===1&&B!=='"'){B=bi.escapeRegex(B),k.value+=B,Q({value:B});continue}if(B==='"'){A.quotes=A.quotes===1?0:1,r.keepQuotes===!0&&oe({type:"text",value:B});continue}if(B==="("){fe("parens"),oe({type:"paren",value:B});continue}if(B===")"){if(A.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Ql("opening","("));let ne=q[q.length-1];if(ne&&A.parens===ne.parens+1){dt(q.pop());continue}oe({type:"paren",value:B,output:A.parens?")":"\\)"}),pe("parens");continue}if(B==="["){if(r.nobracket===!0||!j().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Ql("closing","]"));B=`\\${B}`}else fe("brackets");oe({type:"bracket",value:B});continue}if(B==="]"){if(r.nobracket===!0||k&&k.type==="bracket"&&k.value.length===1){oe({type:"text",value:B,output:`\\${B}`});continue}if(A.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Ql("opening","["));oe({type:"text",value:B,output:`\\${B}`});continue}pe("brackets");let ne=k.value.slice(1);if(k.posix!==!0&&ne[0]==="^"&&!ne.includes("/")&&(B=`/${B}`),k.value+=B,Q({value:B}),r.literalBrackets===!1||bi.hasRegexChars(ne))continue;let Pe=bi.escapeRegex(k.value);if(A.output=A.output.slice(0,-k.value.length),r.literalBrackets===!0){A.output+=Pe,k.value=Pe;continue}k.value=`(${a}${Pe}|${k.value})`,A.output+=k.value;continue}if(B==="{"&&r.nobrace!==!0){fe("braces");let ne={type:"brace",value:B,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};O.push(ne),oe(ne);continue}if(B==="}"){let ne=O[O.length-1];if(r.nobrace===!0||!ne){oe({type:"text",value:B,output:B});continue}let Pe=")";if(ne.dots===!0){let V=o.slice(),re=[];for(let de=V.length-1;de>=0&&(o.pop(),V[de].type!=="brace");de--)V[de].type!=="dots"&&re.unshift(V[de].value);Pe=Mpe(re,r),A.backtrack=!0}if(ne.comma!==!0&&ne.dots!==!0){let V=A.output.slice(0,ne.outputIndex),re=A.tokens.slice(ne.tokensIndex);ne.value=ne.output="\\{",B=Pe="\\}",A.output=V;for(let de of re)A.output+=de.output||de.value}oe({type:"brace",value:B,output:Pe}),pe("braces"),O.pop();continue}if(B==="|"){q.length>0&&q[q.length-1].conditions++,oe({type:"text",value:B});continue}if(B===","){let ne=B,Pe=O[O.length-1];Pe&&z[z.length-1]==="braces"&&(Pe.comma=!0,ne="|"),oe({type:"comma",value:B,output:ne});continue}if(B==="/"){if(k.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",o.pop(),k=s;continue}oe({type:"slash",value:B,output:f});continue}if(B==="."){if(A.braces>0&&k.type==="dot"){k.value==="."&&(k.output=p);let ne=O[O.length-1];k.type="dots",k.output+=B,k.value+=B,ne.dots=!0;continue}if(A.braces+A.parens===0&&k.type!=="bos"&&k.type!=="slash"){oe({type:"text",value:B,output:p});continue}oe({type:"dot",value:B,output:p});continue}if(B==="?"){if(!(k&&k.value==="(")&&r.noextglob!==!0&&G()==="("&&G(2)!=="?"){je("qmark",B);continue}if(k&&k.type==="paren"){let Pe=G(),V=B;if(Pe==="<"&&!bi.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(k.value==="("&&!/[!=<:]/.test(Pe)||Pe==="<"&&!/<([!=]|\w+>)/.test(j()))&&(V=`\\${B}`),oe({type:"text",value:B,output:V});continue}if(r.dot!==!0&&(k.type==="slash"||k.type==="bos")){oe({type:"qmark",value:B,output:x});continue}oe({type:"qmark",value:B,output:E});continue}if(B==="!"){if(r.noextglob!==!0&&G()==="("&&(G(2)!=="?"||!/[!=<:]/.test(G(3)))){je("negate",B);continue}if(r.nonegate!==!0&&A.index===0){ue();continue}}if(B==="+"){if(r.noextglob!==!0&&G()==="("&&G(2)!=="?"){je("plus",B);continue}if(k&&k.value==="("||r.regex===!1){oe({type:"plus",value:B,output:d});continue}if(k&&(k.type==="bracket"||k.type==="paren"||k.type==="brace")||A.parens>0){oe({type:"plus",value:B});continue}oe({type:"plus",value:d});continue}if(B==="@"){if(r.noextglob!==!0&&G()==="("&&G(2)!=="?"){oe({type:"at",extglob:!0,value:B,output:""});continue}oe({type:"text",value:B});continue}if(B!=="*"){(B==="$"||B==="^")&&(B=`\\${B}`);let ne=Ope.exec(j());ne&&(B+=ne[0],A.index+=ne[0].length),oe({type:"text",value:B});continue}if(k&&(k.type==="globstar"||k.star===!0)){k.type="star",k.star=!0,k.value+=B,k.output=_,A.backtrack=!0,A.globstar=!0,K(B);continue}let ae=j();if(r.noextglob!==!0&&/^\([^?]/.test(ae)){je("star",B);continue}if(k.type==="star"){if(r.noglobstar===!0){K(B);continue}let ne=k.prev,Pe=ne.prev,V=ne.type==="slash"||ne.type==="bos",re=Pe&&(Pe.type==="star"||Pe.type==="globstar");if(r.bash===!0&&(!V||ae[0]&&ae[0]!=="/")){oe({type:"star",value:B,output:""});continue}let de=A.braces>0&&(ne.type==="comma"||ne.type==="brace"),ve=q.length&&(ne.type==="pipe"||ne.type==="paren");if(!V&&ne.type!=="paren"&&!de&&!ve){oe({type:"star",value:B,output:""});continue}for(;ae.slice(0,3)==="/**";){let Ae=t[A.index+4];if(Ae&&Ae!=="/")break;ae=ae.slice(3),K("/**",3)}if(ne.type==="bos"&&$()){k.type="globstar",k.value+=B,k.output=w(r),A.output=k.output,A.globstar=!0,K(B);continue}if(ne.type==="slash"&&ne.prev.type!=="bos"&&!re&&$()){A.output=A.output.slice(0,-(ne.output+k.output).length),ne.output=`(?:${ne.output}`,k.type="globstar",k.output=w(r)+(r.strictSlashes?")":"|$)"),k.value+=B,A.globstar=!0,A.output+=ne.output+k.output,K(B);continue}if(ne.type==="slash"&&ne.prev.type!=="bos"&&ae[0]==="/"){let Ae=ae[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(ne.output+k.output).length),ne.output=`(?:${ne.output}`,k.type="globstar",k.output=`${w(r)}${f}|${f}${Ae})`,k.value+=B,A.output+=ne.output+k.output,A.globstar=!0,K(B+Z()),oe({type:"slash",value:"/",output:""});continue}if(ne.type==="bos"&&ae[0]==="/"){k.type="globstar",k.value+=B,k.output=`(?:^|${f}|${w(r)}${f})`,A.output=k.output,A.globstar=!0,K(B+Z()),oe({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-k.output.length),k.type="globstar",k.output=w(r),k.value+=B,A.output+=k.output,A.globstar=!0,K(B);continue}let Te={type:"star",value:B,output:_};if(r.bash===!0){Te.output=".*?",(k.type==="bos"||k.type==="slash")&&(Te.output=F+Te.output),oe(Te);continue}if(k&&(k.type==="bracket"||k.type==="paren")&&r.regex===!0){Te.output=B,oe(Te);continue}(A.index===A.start||k.type==="slash"||k.type==="dot")&&(k.type==="dot"?(A.output+=v,k.output+=v):r.dot===!0?(A.output+=D,k.output+=D):(A.output+=F,k.output+=F),G()!=="*"&&(A.output+=m,k.output+=m)),oe(Te)}for(;A.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ql("closing","]"));A.output=bi.escapeLast(A.output,"["),pe("brackets")}for(;A.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ql("closing",")"));A.output=bi.escapeLast(A.output,"("),pe("parens")}for(;A.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ql("closing","}"));A.output=bi.escapeLast(A.output,"{"),pe("braces")}if(r.strictSlashes!==!0&&(k.type==="star"||k.type==="bracket")&&oe({type:"maybe_slash",value:"",output:`${f}?`}),A.backtrack===!0){A.output="";for(let ae of A.tokens)A.output+=ae.output!=null?ae.output:ae.value,ae.suffix&&(A.output+=ae.suffix)}return A};JC.fastpaths=(t,e)=>{let r={...e},n=typeof r.maxLength=="number"?Math.min(My,r.maxLength):My,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);t=J8[t]||t;let s=bi.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:c,DOTS_SLASH:u,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:f,START_ANCHOR:m}=By.globChars(s),g=r.dot?p:l,y=r.dot?d:l,v=r.capture?"":"?:",D={negated:!1,prefix:""},E=r.bash===!0?".*?":f;r.capture&&(E=`(${E})`);let x=F=>F.noglobstar===!0?E:`(${v}(?:(?!${m}${F.dot?u:o}).)*?)`,b=F=>{switch(F){case"*":return`${g}${c}${E}`;case".*":return`${o}${c}${E}`;case"*.*":return`${g}${E}${o}${c}${E}`;case"*/*":return`${g}${E}${a}${c}${y}${E}`;case"**":return g+x(r);case"**/*":return`(?:${g}${x(r)}${a})?${y}${c}${E}`;case"**/*.*":return`(?:${g}${x(r)}${a})?${y}${E}${o}${c}${E}`;case"**/.*":return`(?:${g}${x(r)}${a})?${o}${c}${E}`;default:{let P=/^(.*?)\.(\w+)$/.exec(F);if(!P)return;let _=b(P[1]);return _?_+o+P[2]:void 0}}},C=bi.removePrefix(t,D),w=b(C);return w&&r.strictSlashes!==!0&&(w+=`${a}?`),w};Y8.exports=JC});var Z8=S((Pqe,Q8)=>{"use strict";h();var Lpe=require("path"),$pe=W8(),YC=X8(),XC=Lf(),jpe=Mf(),Upe=t=>t&&typeof t=="object"&&!Array.isArray(t),Cr=(t,e,r=!1)=>{if(Array.isArray(t)){let l=t.map(d=>Cr(d,e,r));return d=>{for(let f of l){let m=f(d);if(m)return m}return!1}}let n=Upe(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},s=XC.isWindows(e),o=n?Cr.compileRe(t,e):Cr.makeRe(t,e,!1,!0),a=o.state;delete o.state;let c=()=>!1;if(i.ignore){let l={...e,ignore:null,onMatch:null,onResult:null};c=Cr(i.ignore,l,r)}let u=(l,p=!1)=>{let{isMatch:d,match:f,output:m}=Cr.test(l,o,e,{glob:t,posix:s}),g={glob:t,state:a,regex:o,posix:s,input:l,output:m,match:f,isMatch:d};return typeof i.onResult=="function"&&i.onResult(g),d===!1?(g.isMatch=!1,p?g:!1):c(l)?(typeof i.onIgnore=="function"&&i.onIgnore(g),g.isMatch=!1,p?g:!1):(typeof i.onMatch=="function"&&i.onMatch(g),p?g:!0)};return r&&(u.state=a),u};Cr.test=(t,e,r,{glob:n,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(i?XC.toPosixSlashes:null),a=t===n,c=a&&o?o(t):t;return a===!1&&(c=o?o(t):t,a=c===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=Cr.matchBase(t,e,r,i):a=e.exec(c)),{isMatch:!!a,match:a,output:c}};Cr.matchBase=(t,e,r,n=XC.isWindows(r))=>(e instanceof RegExp?e:Cr.makeRe(e,r)).test(Lpe.basename(t));Cr.isMatch=(t,e,r)=>Cr(e,r)(t);Cr.parse=(t,e)=>Array.isArray(t)?t.map(r=>Cr.parse(r,e)):YC(t,{...e,fastpaths:!1});Cr.scan=(t,e)=>$pe(t,e);Cr.compileRe=(t,e,r=!1,n=!1)=>{if(r===!0)return t.output;let i=e||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let c=Cr.toRegex(a,e);return n===!0&&(c.state=t),c};Cr.makeRe=(t,e={},r=!1,n=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(i.output=YC.fastpaths(t,e)),i.output||(i=YC(t,e)),Cr.compileRe(i,e,r,n)};Cr.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Cr.constants=jpe;Q8.exports=Cr});var tL=S((_qe,eL)=>{"use strict";h();eL.exports=Z8()});var Ly=S((kqe,oL)=>{"use strict";h();var nL=require("util"),iL=O8(),io=tL(),QC=Lf(),rL=t=>t===""||t==="./",sL=t=>{let e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},rr=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let n=new Set,i=new Set,s=new Set,o=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<e.length;l++){let p=io(String(e[l]),{...r,onResult:a},!0),d=p.state.negated||p.state.negatedExtglob;d&&o++;for(let f of t){let m=p(f,!0);(d?!m.isMatch:m.isMatch)&&(d?n.add(m.output):(n.delete(m.output),i.add(m.output)))}}let u=(o===e.length?[...s]:[...i]).filter(l=>!n.has(l));if(r&&u.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(l=>l.replace(/\\/g,"")):e}return u};rr.match=rr;rr.matcher=(t,e)=>io(t,e);rr.isMatch=(t,e,r)=>io(e,r)(t);rr.any=rr.isMatch;rr.not=(t,e,r={})=>{e=[].concat(e).map(String);let n=new Set,i=[],s=a=>{r.onResult&&r.onResult(a),i.push(a.output)},o=new Set(rr(t,e,{...r,onResult:s}));for(let a of i)o.has(a)||n.add(a);return[...n]};rr.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${nL.inspect(t)}"`);if(Array.isArray(e))return e.some(n=>rr.contains(t,n,r));if(typeof e=="string"){if(rL(t)||rL(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return rr.isMatch(t,e,{...r,contains:!0})};rr.matchKeys=(t,e,r)=>{if(!QC.isObject(t))throw new TypeError("Expected the first argument to be an object");let n=rr(Object.keys(t),e,r),i={};for(let s of n)i[s]=t[s];return i};rr.some=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=io(String(i),r);if(n.some(o=>s(o)))return!0}return!1};rr.every=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=io(String(i),r);if(!n.every(o=>s(o)))return!1}return!0};rr.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${nL.inspect(t)}"`);return[].concat(e).every(n=>io(n,r)(t))};rr.capture=(t,e,r)=>{let n=QC.isWindows(r),s=io.makeRe(String(t),{...r,capture:!0}).exec(n?QC.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};rr.makeRe=(...t)=>io.makeRe(...t);rr.scan=(...t)=>io.scan(...t);rr.parse=(t,e)=>{let r=[];for(let n of[].concat(t||[]))for(let i of iL(String(n),e))r.push(io.parse(i,e));return r};rr.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!sL(t)?[t]:iL(t,e)};rr.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return rr.braces(t,{...e,expand:!0})};rr.hasBraces=sL;oL.exports=rr});var gL=S(Me=>{"use strict";h();Object.defineProperty(Me,"__esModule",{value:!0});Me.isAbsolute=Me.partitionAbsoluteAndRelative=Me.removeDuplicateSlashes=Me.matchAny=Me.convertPatternsToRe=Me.makeRe=Me.getPatternParts=Me.expandBraceExpansion=Me.expandPatternsWithBraceExpansion=Me.isAffectDepthOfReadingPattern=Me.endsWithSlashGlobStar=Me.hasGlobStar=Me.getBaseDirectory=Me.isPatternRelatedToParentDirectory=Me.getPatternsOutsideCurrentDirectory=Me.getPatternsInsideCurrentDirectory=Me.getPositivePatterns=Me.getNegativePatterns=Me.isPositivePattern=Me.isNegativePattern=Me.convertToNegativePattern=Me.convertToPositivePattern=Me.isDynamicPattern=Me.isStaticPattern=void 0;var aL=require("path"),qpe=Z3(),ZC=Ly(),cL="**",zpe="\\",Gpe=/[*?]|^!/,Hpe=/\[[^[]*]/,Vpe=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,Kpe=/[!*+?@]\([^(]*\)/,Wpe=/,|\.\./,Jpe=/(?!^)\/{2,}/g;function uL(t,e={}){return!lL(t,e)}Me.isStaticPattern=uL;function lL(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(zpe)||Gpe.test(t)||Hpe.test(t)||Vpe.test(t)||e.extglob!==!1&&Kpe.test(t)||e.braceExpansion!==!1&&Ype(t))}Me.isDynamicPattern=lL;function Ype(t){let e=t.indexOf("{");if(e===-1)return!1;let r=t.indexOf("}",e+1);if(r===-1)return!1;let n=t.slice(e,r);return Wpe.test(n)}function Xpe(t){return $y(t)?t.slice(1):t}Me.convertToPositivePattern=Xpe;function Qpe(t){return"!"+t}Me.convertToNegativePattern=Qpe;function $y(t){return t.startsWith("!")&&t[1]!=="("}Me.isNegativePattern=$y;function pL(t){return!$y(t)}Me.isPositivePattern=pL;function Zpe(t){return t.filter($y)}Me.getNegativePatterns=Zpe;function ede(t){return t.filter(pL)}Me.getPositivePatterns=ede;function tde(t){return t.filter(e=>!ew(e))}Me.getPatternsInsideCurrentDirectory=tde;function rde(t){return t.filter(ew)}Me.getPatternsOutsideCurrentDirectory=rde;function ew(t){return t.startsWith("..")||t.startsWith("./..")}Me.isPatternRelatedToParentDirectory=ew;function nde(t){return qpe(t,{flipBackslashes:!1})}Me.getBaseDirectory=nde;function ide(t){return t.includes(cL)}Me.hasGlobStar=ide;function dL(t){return t.endsWith("/"+cL)}Me.endsWithSlashGlobStar=dL;function sde(t){let e=aL.basename(t);return dL(t)||uL(e)}Me.isAffectDepthOfReadingPattern=sde;function ode(t){return t.reduce((e,r)=>e.concat(fL(r)),[])}Me.expandPatternsWithBraceExpansion=ode;function fL(t){let e=ZC.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((r,n)=>r.length-n.length),e.filter(r=>r!=="")}Me.expandBraceExpansion=fL;function ade(t,e){let{parts:r}=ZC.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}Me.getPatternParts=ade;function mL(t,e){return ZC.makeRe(t,e)}Me.makeRe=mL;function cde(t,e){return t.map(r=>mL(r,e))}Me.convertPatternsToRe=cde;function ude(t,e){return e.some(r=>r.test(t))}Me.matchAny=ude;function lde(t){return t.replace(Jpe,"/")}Me.removeDuplicateSlashes=lde;function pde(t){let e=[],r=[];for(let n of t)hL(n)?e.push(n):r.push(n);return[e,r]}Me.partitionAbsoluteAndRelative=pde;function hL(t){return aL.isAbsolute(t)}Me.isAbsolute=hL});var xL=S((Oqe,bL)=>{"use strict";h();var dde=require("stream"),yL=dde.PassThrough,fde=Array.prototype.slice;bL.exports=mde;function mde(){let t=[],e=fde.call(arguments),r=!1,n=e[e.length-1];n&&!Array.isArray(n)&&n.pipe==null?e.pop():n={};let i=n.end!==!1,s=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);let o=yL(n);function a(){for(let l=0,p=arguments.length;l<p;l++)t.push(vL(arguments[l],n));return c(),this}function c(){if(r)return;r=!0;let l=t.shift();if(!l){process.nextTick(u);return}Array.isArray(l)||(l=[l]);let p=l.length+1;function d(){--p>0||(r=!1,c())}function f(m){function g(){m.removeListener("merge2UnpipeEnd",g),m.removeListener("end",g),s&&m.removeListener("error",y),d()}function y(v){o.emit("error",v)}if(m._readableState.endEmitted)return d();m.on("merge2UnpipeEnd",g),m.on("end",g),s&&m.on("error",y),m.pipe(o,{end:!1}),m.resume()}for(let m=0;m<l.length;m++)f(l[m]);d()}function u(){r=!1,o.emit("queueDrain"),i&&o.end()}return o.setMaxListeners(0),o.add=a,o.on("unpipe",function(l){l.emit("merge2UnpipeEnd")}),e.length&&a.apply(null,e),o}function vL(t,e){if(Array.isArray(t))for(let r=0,n=t.length;r<n;r++)t[r]=vL(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(yL(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}});var EL=S(jy=>{"use strict";h();Object.defineProperty(jy,"__esModule",{value:!0});jy.merge=void 0;var hde=xL();function gde(t){let e=hde(t);return t.forEach(r=>{r.once("error",n=>e.emit("error",n))}),e.once("close",()=>DL(t)),e.once("end",()=>DL(t)),e}jy.merge=gde;function DL(t){t.forEach(e=>e.emit("close"))}});var CL=S(Zl=>{"use strict";h();Object.defineProperty(Zl,"__esModule",{value:!0});Zl.isEmpty=Zl.isString=void 0;function yde(t){return typeof t=="string"}Zl.isString=yde;function vde(t){return t===""}Zl.isEmpty=vde});var Ho=S(gn=>{"use strict";h();Object.defineProperty(gn,"__esModule",{value:!0});gn.string=gn.stream=gn.pattern=gn.path=gn.fs=gn.errno=gn.array=void 0;var bde=j3();gn.array=bde;var xde=U3();gn.errno=xde;var Dde=q3();gn.fs=Dde;var Ede=V3();gn.path=Ede;var Cde=gL();gn.pattern=Cde;var wde=EL();gn.stream=wde;var Sde=CL();gn.string=Sde});var PL=S(yn=>{"use strict";h();Object.defineProperty(yn,"__esModule",{value:!0});yn.convertPatternGroupToTask=yn.convertPatternGroupsToTasks=yn.groupPatternsByBaseDirectory=yn.getNegativePatternsAsPositive=yn.getPositivePatterns=yn.convertPatternsToTasks=yn.generate=void 0;var ws=Ho();function Tde(t,e){let r=wL(t,e),n=wL(e.ignore,e),i=SL(r),s=TL(r,n),o=i.filter(l=>ws.pattern.isStaticPattern(l,e)),a=i.filter(l=>ws.pattern.isDynamicPattern(l,e)),c=tw(o,s,!1),u=tw(a,s,!0);return c.concat(u)}yn.generate=Tde;function wL(t,e){let r=t;return e.braceExpansion&&(r=ws.pattern.expandPatternsWithBraceExpansion(r)),e.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>ws.pattern.removeDuplicateSlashes(n))}function tw(t,e,r){let n=[],i=ws.pattern.getPatternsOutsideCurrentDirectory(t),s=ws.pattern.getPatternsInsideCurrentDirectory(t),o=rw(i),a=rw(s);return n.push(...nw(o,e,r)),"."in a?n.push(iw(".",s,e,r)):n.push(...nw(a,e,r)),n}yn.convertPatternsToTasks=tw;function SL(t){return ws.pattern.getPositivePatterns(t)}yn.getPositivePatterns=SL;function TL(t,e){return ws.pattern.getNegativePatterns(t).concat(e).map(ws.pattern.convertToPositivePattern)}yn.getNegativePatternsAsPositive=TL;function rw(t){let e={};return t.reduce((r,n)=>{let i=ws.pattern.getBaseDirectory(n);return i in r?r[i].push(n):r[i]=[n],r},e)}yn.groupPatternsByBaseDirectory=rw;function nw(t,e,r){return Object.keys(t).map(n=>iw(n,t[n],e,r))}yn.convertPatternGroupsToTasks=nw;function iw(t,e,r,n){return{dynamic:n,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(ws.pattern.convertToNegativePattern))}}yn.convertPatternGroupToTask=iw});var _L=S(Uy=>{"use strict";h();Object.defineProperty(Uy,"__esModule",{value:!0});Uy.read=void 0;function Pde(t,e,r){e.fs.lstat(t,(n,i)=>{if(n!==null){AL(r,n);return}if(!i.isSymbolicLink()||!e.followSymbolicLink){sw(r,i);return}e.fs.stat(t,(s,o)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){AL(r,s);return}sw(r,i);return}e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),sw(r,o)})})}Uy.read=Pde;function AL(t,e){t(e)}function sw(t,e){t(null,e)}});var FL=S(qy=>{"use strict";h();Object.defineProperty(qy,"__esModule",{value:!0});qy.read=void 0;function Ade(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let n=e.fs.statSync(t);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw n}}qy.read=Ade});var kL=S(Pa=>{"use strict";h();Object.defineProperty(Pa,"__esModule",{value:!0});Pa.createFileSystemAdapter=Pa.FILE_SYSTEM_ADAPTER=void 0;var zy=require("fs");Pa.FILE_SYSTEM_ADAPTER={lstat:zy.lstat,stat:zy.stat,lstatSync:zy.lstatSync,statSync:zy.statSync};function _de(t){return t===void 0?Pa.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Pa.FILE_SYSTEM_ADAPTER),t)}Pa.createFileSystemAdapter=_de});var IL=S(aw=>{"use strict";h();Object.defineProperty(aw,"__esModule",{value:!0});var Fde=kL(),ow=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Fde.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};aw.default=ow});var Gc=S(Aa=>{"use strict";h();Object.defineProperty(Aa,"__esModule",{value:!0});Aa.statSync=Aa.stat=Aa.Settings=void 0;var NL=_L(),kde=FL(),cw=IL();Aa.Settings=cw.default;function Ide(t,e,r){if(typeof e=="function"){NL.read(t,uw(),e);return}NL.read(t,uw(e),r)}Aa.stat=Ide;function Nde(t,e){let r=uw(e);return kde.read(t,r)}Aa.statSync=Nde;function uw(t={}){return t instanceof cw.default?t:new cw.default(t)}});var BL=S((tze,OL)=>{h();var RL;OL.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):t=>(RL||(RL=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var LL=S((nze,ML)=>{h();ML.exports=Ode;var Rde=BL();function Ode(t,e){let r,n,i,s=!0;Array.isArray(t)?(r=[],n=t.length):(i=Object.keys(t),r={},n=i.length);function o(c){function u(){e&&e(c,r),e=null}s?Rde(u):u()}function a(c,u,l){r[c]=l,(--n===0||u)&&o(u)}n?i?i.forEach(function(c){t[c](function(u,l){a(c,u,l)})}):t.forEach(function(c,u){c(function(l,p){a(u,l,p)})}):o(null),s=!1}});var lw=S(Hy=>{"use strict";h();Object.defineProperty(Hy,"__esModule",{value:!0});Hy.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var Gy=process.versions.node.split(".");if(Gy[0]===void 0||Gy[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var $L=Number.parseInt(Gy[0],10),Bde=Number.parseInt(Gy[1],10),jL=10,Mde=10,Lde=$L>jL,$de=$L===jL&&Bde>=Mde;Hy.IS_SUPPORT_READDIR_WITH_FILE_TYPES=Lde||$de});var UL=S(Vy=>{"use strict";h();Object.defineProperty(Vy,"__esModule",{value:!0});Vy.createDirentFromStats=void 0;var pw=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function jde(t,e){return new pw(t,e)}Vy.createDirentFromStats=jde});var dw=S(Ky=>{"use strict";h();Object.defineProperty(Ky,"__esModule",{value:!0});Ky.fs=void 0;var Ude=UL();Ky.fs=Ude});var fw=S(Wy=>{"use strict";h();Object.defineProperty(Wy,"__esModule",{value:!0});Wy.joinPathSegments=void 0;function qde(t,e,r){return t.endsWith(r)?t+e:t+r+e}Wy.joinPathSegments=qde});var KL=S(_a=>{"use strict";h();Object.defineProperty(_a,"__esModule",{value:!0});_a.readdir=_a.readdirWithFileTypes=_a.read=void 0;var zde=Gc(),qL=LL(),Gde=lw(),zL=dw(),GL=fw();function Hde(t,e,r){if(!e.stats&&Gde.IS_SUPPORT_READDIR_WITH_FILE_TYPES){HL(t,e,r);return}VL(t,e,r)}_a.read=Hde;function HL(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(n,i)=>{if(n!==null){Jy(r,n);return}let s=i.map(a=>({dirent:a,name:a.name,path:GL.joinPathSegments(t,a.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){mw(r,s);return}let o=s.map(a=>Vde(a,e));qL(o,(a,c)=>{if(a!==null){Jy(r,a);return}mw(r,c)})})}_a.readdirWithFileTypes=HL;function Vde(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(n,i)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,t);return}t.dirent=zL.fs.createDirentFromStats(t.name,i),r(null,t)})}}function VL(t,e,r){e.fs.readdir(t,(n,i)=>{if(n!==null){Jy(r,n);return}let s=i.map(o=>{let a=GL.joinPathSegments(t,o,e.pathSegmentSeparator);return c=>{zde.stat(a,e.fsStatSettings,(u,l)=>{if(u!==null){c(u);return}let p={name:o,path:a,dirent:zL.fs.createDirentFromStats(o,l)};e.stats&&(p.stats=l),c(null,p)})}});qL(s,(o,a)=>{if(o!==null){Jy(r,o);return}mw(r,a)})})}_a.readdir=VL;function Jy(t,e){t(e)}function mw(t,e){t(null,e)}});var QL=S(Fa=>{"use strict";h();Object.defineProperty(Fa,"__esModule",{value:!0});Fa.readdir=Fa.readdirWithFileTypes=Fa.read=void 0;var Kde=Gc(),Wde=lw(),WL=dw(),JL=fw();function Jde(t,e){return!e.stats&&Wde.IS_SUPPORT_READDIR_WITH_FILE_TYPES?YL(t,e):XL(t,e)}Fa.read=Jde;function YL(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(n=>{let i={dirent:n,name:n.name,path:JL.joinPathSegments(t,n.name,e.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let s=e.fs.statSync(i.path);i.dirent=WL.fs.createDirentFromStats(i.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return i})}Fa.readdirWithFileTypes=YL;function XL(t,e){return e.fs.readdirSync(t).map(n=>{let i=JL.joinPathSegments(t,n,e.pathSegmentSeparator),s=Kde.statSync(i,e.fsStatSettings),o={name:n,path:i,dirent:WL.fs.createDirentFromStats(n,s)};return e.stats&&(o.stats=s),o})}Fa.readdir=XL});var ZL=S(ka=>{"use strict";h();Object.defineProperty(ka,"__esModule",{value:!0});ka.createFileSystemAdapter=ka.FILE_SYSTEM_ADAPTER=void 0;var ep=require("fs");ka.FILE_SYSTEM_ADAPTER={lstat:ep.lstat,stat:ep.stat,lstatSync:ep.lstatSync,statSync:ep.statSync,readdir:ep.readdir,readdirSync:ep.readdirSync};function Yde(t){return t===void 0?ka.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},ka.FILE_SYSTEM_ADAPTER),t)}ka.createFileSystemAdapter=Yde});var e4=S(gw=>{"use strict";h();Object.defineProperty(gw,"__esModule",{value:!0});var Xde=require("path"),Qde=Gc(),Zde=ZL(),hw=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=Zde.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Xde.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new Qde.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};gw.default=hw});var Yy=S(Ia=>{"use strict";h();Object.defineProperty(Ia,"__esModule",{value:!0});Ia.Settings=Ia.scandirSync=Ia.scandir=void 0;var t4=KL(),efe=QL(),yw=e4();Ia.Settings=yw.default;function tfe(t,e,r){if(typeof e=="function"){t4.read(t,vw(),e);return}t4.read(t,vw(e),r)}Ia.scandir=tfe;function rfe(t,e){let r=vw(e);return efe.read(t,r)}Ia.scandirSync=rfe;function vw(t={}){return t instanceof yw.default?t:new yw.default(t)}});var n4=S((Cze,r4)=>{"use strict";h();function nfe(t){var e=new t,r=e;function n(){var s=e;return s.next?e=s.next:(e=new t,r=e),s.next=null,s}function i(s){r.next=s,r=s}return{get:n,release:i}}r4.exports=nfe});var s4=S((Sze,bw)=>{"use strict";h();var ife=n4();function i4(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var n=ife(sfe),i=null,s=null,o=0,a=null,c={push:g,drain:qi,saturated:qi,pause:l,paused:!1,get concurrency(){return r},set concurrency(b){if(!(b>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=b,!c.paused)for(;i&&o<r;)o++,v()},running:u,resume:f,idle:m,length:p,getQueue:d,unshift:y,empty:qi,kill:D,killAndDrain:E,error:x};return c;function u(){return o}function l(){c.paused=!0}function p(){for(var b=i,C=0;b;)b=b.next,C++;return C}function d(){for(var b=i,C=[];b;)C.push(b.value),b=b.next;return C}function f(){if(c.paused){if(c.paused=!1,i===null){o++,v();return}for(;i&&o<r;)o++,v()}}function m(){return o===0&&c.length()===0}function g(b,C){var w=n.get();w.context=t,w.release=v,w.value=b,w.callback=C||qi,w.errorHandler=a,o>=r||c.paused?s?(s.next=w,s=w):(i=w,s=w,c.saturated()):(o++,e.call(t,w.value,w.worked))}function y(b,C){var w=n.get();w.context=t,w.release=v,w.value=b,w.callback=C||qi,w.errorHandler=a,o>=r||c.paused?i?(w.next=i,i=w):(i=w,s=w,c.saturated()):(o++,e.call(t,w.value,w.worked))}function v(b){b&&n.release(b);var C=i;C&&o<=r?c.paused?o--:(s===i&&(s=null),i=C.next,C.next=null,e.call(t,C.value,C.worked),s===null&&c.empty()):--o===0&&c.drain()}function D(){i=null,s=null,c.drain=qi}function E(){i=null,s=null,c.drain(),c.drain=qi}function x(b){a=b}}function qi(){}function sfe(){this.value=null,this.callback=qi,this.next=null,this.release=qi,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,n){var i=t.callback,s=t.errorHandler,o=t.value;t.value=null,t.callback=qi,t.errorHandler&&s(r,o),i.call(t.context,r,n),t.release(t)}}function ofe(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function n(l,p){e.call(this,l).then(function(d){p(null,d)},p)}var i=i4(t,n,r),s=i.push,o=i.unshift;return i.push=a,i.unshift=c,i.drained=u,i;function a(l){var p=new Promise(function(d,f){s(l,function(m,g){if(m){f(m);return}d(g)})});return p.catch(qi),p}function c(l){var p=new Promise(function(d,f){o(l,function(m,g){if(m){f(m);return}d(g)})});return p.catch(qi),p}function u(){var l=new Promise(function(p){process.nextTick(function(){if(i.idle())p();else{var d=i.drain;i.drain=function(){typeof d=="function"&&d(),p(),i.drain=d}}})});return l}}bw.exports=i4;bw.exports.promise=ofe});var Xy=S(so=>{"use strict";h();Object.defineProperty(so,"__esModule",{value:!0});so.joinPathSegments=so.replacePathSegmentSeparator=so.isAppliedFilter=so.isFatalError=void 0;function afe(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}so.isFatalError=afe;function cfe(t,e){return t===null||t(e)}so.isAppliedFilter=cfe;function ufe(t,e){return t.split(/[/\\]/).join(e)}so.replacePathSegmentSeparator=ufe;function lfe(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}so.joinPathSegments=lfe});var Ew=S(Dw=>{"use strict";h();Object.defineProperty(Dw,"__esModule",{value:!0});var pfe=Xy(),xw=class{constructor(e,r){this._root=e,this._settings=r,this._root=pfe.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};Dw.default=xw});var Sw=S(ww=>{"use strict";h();Object.defineProperty(ww,"__esModule",{value:!0});var dfe=require("events"),ffe=Yy(),mfe=s4(),Qy=Xy(),hfe=Ew(),Cw=class extends hfe.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=ffe.scandir,this._emitter=new dfe.EventEmitter,this._queue=mfe(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){let n={directory:e,base:r};this._queue.push(n,i=>{i!==null&&this._handleError(i)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(n,i)=>{if(n!==null){r(n,void 0);return}for(let s of i)this._handleEntry(s,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!Qy.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let n=e.path;r!==void 0&&(e.path=Qy.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Qy.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&Qy.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};ww.default=Cw});var o4=S(Pw=>{"use strict";h();Object.defineProperty(Pw,"__esModule",{value:!0});var gfe=Sw(),Tw=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new gfe.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{yfe(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{vfe(e,this._storage)}),this._reader.read()}};Pw.default=Tw;function yfe(t,e){t(e)}function vfe(t,e){t(null,e)}});var a4=S(_w=>{"use strict";h();Object.defineProperty(_w,"__esModule",{value:!0});var bfe=require("stream"),xfe=Sw(),Aw=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new xfe.default(this._root,this._settings),this._stream=new bfe.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};_w.default=Aw});var c4=S(kw=>{"use strict";h();Object.defineProperty(kw,"__esModule",{value:!0});var Dfe=Yy(),Zy=Xy(),Efe=Ew(),Fw=class extends Efe.default{constructor(){super(...arguments),this._scandir=Dfe.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let n=this._scandir(e,this._settings.fsScandirSettings);for(let i of n)this._handleEntry(i,r)}catch(n){this._handleError(n)}}_handleError(e){if(Zy.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let n=e.path;r!==void 0&&(e.path=Zy.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Zy.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&Zy.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};kw.default=Fw});var u4=S(Nw=>{"use strict";h();Object.defineProperty(Nw,"__esModule",{value:!0});var Cfe=c4(),Iw=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Cfe.default(this._root,this._settings)}read(){return this._reader.read()}};Nw.default=Iw});var l4=S(Ow=>{"use strict";h();Object.defineProperty(Ow,"__esModule",{value:!0});var wfe=require("path"),Sfe=Yy(),Rw=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,wfe.sep),this.fsScandirSettings=new Sfe.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};Ow.default=Rw});var tv=S(oo=>{"use strict";h();Object.defineProperty(oo,"__esModule",{value:!0});oo.Settings=oo.walkStream=oo.walkSync=oo.walk=void 0;var p4=o4(),Tfe=a4(),Pfe=u4(),Bw=l4();oo.Settings=Bw.default;function Afe(t,e,r){if(typeof e=="function"){new p4.default(t,ev()).read(e);return}new p4.default(t,ev(e)).read(r)}oo.walk=Afe;function _fe(t,e){let r=ev(e);return new Pfe.default(t,r).read()}oo.walkSync=_fe;function Ffe(t,e){let r=ev(e);return new Tfe.default(t,r).read()}oo.walkStream=Ffe;function ev(t={}){return t instanceof Bw.default?t:new Bw.default(t)}});var rv=S(Lw=>{"use strict";h();Object.defineProperty(Lw,"__esModule",{value:!0});var kfe=require("path"),Ife=Gc(),d4=Ho(),Mw=class{constructor(e){this._settings=e,this._fsStatSettings=new Ife.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return kfe.resolve(this._settings.cwd,e)}_makeEntry(e,r){let n={name:r,path:r,dirent:d4.fs.createDirentFromStats(r,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!d4.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};Lw.default=Mw});var Uw=S(jw=>{"use strict";h();Object.defineProperty(jw,"__esModule",{value:!0});var Nfe=require("stream"),Rfe=Gc(),Ofe=tv(),Bfe=rv(),$w=class extends Bfe.default{constructor(){super(...arguments),this._walkStream=Ofe.walkStream,this._stat=Rfe.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let n=e.map(this._getFullEntryPath,this),i=new Nfe.PassThrough({objectMode:!0});i._write=(s,o,a)=>this._getEntry(n[s],e[s],r).then(c=>{c!==null&&r.entryFilter(c)&&i.push(c),s===n.length-1&&i.end(),a()}).catch(a);for(let s=0;s<n.length;s++)i.write(s);return i}_getEntry(e,r,n){return this._getStat(e).then(i=>this._makeEntry(i,r)).catch(i=>{if(n.errorFilter(i))return null;throw i})}_getStat(e){return new Promise((r,n)=>{this._stat(e,this._fsStatSettings,(i,s)=>i===null?r(s):n(i))})}};jw.default=$w});var f4=S(zw=>{"use strict";h();Object.defineProperty(zw,"__esModule",{value:!0});var Mfe=tv(),Lfe=rv(),$fe=Uw(),qw=class extends Lfe.default{constructor(){super(...arguments),this._walkAsync=Mfe.walk,this._readerStream=new $fe.default(this._settings)}dynamic(e,r){return new Promise((n,i)=>{this._walkAsync(e,r,(s,o)=>{s===null?n(o):i(s)})})}async static(e,r){let n=[],i=this._readerStream.static(e,r);return new Promise((s,o)=>{i.once("error",o),i.on("data",a=>n.push(a)),i.once("end",()=>s(n))})}};zw.default=qw});var m4=S(Hw=>{"use strict";h();Object.defineProperty(Hw,"__esModule",{value:!0});var jf=Ho(),Gw=class{constructor(e,r,n){this._patterns=e,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(let e of this._patterns){let r=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(r);this._storage.push({complete:n.length<=1,pattern:e,segments:r,sections:n})}}_getPatternSegments(e){return jf.pattern.getPatternParts(e,this._micromatchOptions).map(n=>jf.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:jf.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(e){return jf.array.splitWhen(e,r=>r.dynamic&&jf.pattern.hasGlobStar(r.pattern))}};Hw.default=Gw});var h4=S(Kw=>{"use strict";h();Object.defineProperty(Kw,"__esModule",{value:!0});var jfe=m4(),Vw=class extends jfe.default{match(e){let r=e.split("/"),n=r.length,i=this._storage.filter(s=>!s.complete||s.segments.length>n);for(let s of i){let o=s.sections[0];if(!s.complete&&n>o.length||r.every((c,u)=>{let l=s.segments[u];return!!(l.dynamic&&l.patternRe.test(c)||!l.dynamic&&l.pattern===c)}))return!0}return!1}};Kw.default=Vw});var g4=S(Jw=>{"use strict";h();Object.defineProperty(Jw,"__esModule",{value:!0});var nv=Ho(),Ufe=h4(),Ww=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,n){let i=this._getMatcher(r),s=this._getNegativePatternsRe(n);return o=>this._filter(e,o,i,s)}_getMatcher(e){return new Ufe.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(nv.pattern.isAffectDepthOfReadingPattern);return nv.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,n,i){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let s=nv.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(s,n)?!1:this._isSkippedByNegativePatterns(s,i)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let n=r.split("/").length;if(e==="")return n;let i=e.split("/").length;return n-i}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!nv.pattern.matchAny(e,r)}};Jw.default=Ww});var y4=S(Xw=>{"use strict";h();Object.defineProperty(Xw,"__esModule",{value:!0});var Na=Ho(),Yw=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let[n,i]=Na.pattern.partitionAbsoluteAndRelative(r),s={positive:{all:Na.pattern.convertPatternsToRe(e,this._micromatchOptions)},negative:{absolute:Na.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:Na.pattern.convertPatternsToRe(i,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return o=>this._filter(o,s)}_filter(e,r){let n=Na.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(n)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;let i=this._isMatchToPatternsSet(n,r,e.dirent.isDirectory());return this._settings.unique&&i&&this._createIndexRecord(n),i}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,r,n){return!(!this._isMatchToPatterns(e,r.positive.all,n)||this._isMatchToPatterns(e,r.negative.relative,n)||this._isMatchToAbsoluteNegative(e,r.negative.absolute,n))}_isMatchToAbsoluteNegative(e,r,n){if(r.length===0)return!1;let i=Na.path.makeAbsolute(this._settings.cwd,e);return this._isMatchToPatterns(i,r,n)}_isMatchToPatterns(e,r,n){if(r.length===0)return!1;let i=Na.pattern.matchAny(e,r);return!i&&n?Na.pattern.matchAny(e+"/",r):i}};Xw.default=Yw});var v4=S(Zw=>{"use strict";h();Object.defineProperty(Zw,"__esModule",{value:!0});var qfe=Ho(),Qw=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return qfe.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};Zw.default=Qw});var x4=S(tS=>{"use strict";h();Object.defineProperty(tS,"__esModule",{value:!0});var b4=Ho(),eS=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=b4.path.makeAbsolute(this._settings.cwd,r),r=b4.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};tS.default=eS});var iv=S(nS=>{"use strict";h();Object.defineProperty(nS,"__esModule",{value:!0});var zfe=require("path"),Gfe=g4(),Hfe=y4(),Vfe=v4(),Kfe=x4(),rS=class{constructor(e){this._settings=e,this.errorFilter=new Vfe.default(this._settings),this.entryFilter=new Hfe.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new Gfe.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new Kfe.default(this._settings)}_getRootDirectory(e){return zfe.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};nS.default=rS});var D4=S(sS=>{"use strict";h();Object.defineProperty(sS,"__esModule",{value:!0});var Wfe=f4(),Jfe=iv(),iS=class extends Jfe.default{constructor(){super(...arguments),this._reader=new Wfe.default(this._settings)}async read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(r,e,n)).map(s=>n.transform(s))}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};sS.default=iS});var E4=S(aS=>{"use strict";h();Object.defineProperty(aS,"__esModule",{value:!0});var Yfe=require("stream"),Xfe=Uw(),Qfe=iv(),oS=class extends Qfe.default{constructor(){super(...arguments),this._reader=new Xfe.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e),i=this.api(r,e,n),s=new Yfe.Readable({objectMode:!0,read:()=>{}});return i.once("error",o=>s.emit("error",o)).on("data",o=>s.emit("data",n.transform(o))).once("end",()=>s.emit("end")),s.once("close",()=>i.destroy()),s}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};aS.default=oS});var C4=S(uS=>{"use strict";h();Object.defineProperty(uS,"__esModule",{value:!0});var Zfe=Gc(),eme=tv(),tme=rv(),cS=class extends tme.default{constructor(){super(...arguments),this._walkSync=eme.walkSync,this._statSync=Zfe.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let n=[];for(let i of e){let s=this._getFullEntryPath(i),o=this._getEntry(s,i,r);o===null||!r.entryFilter(o)||n.push(o)}return n}_getEntry(e,r,n){try{let i=this._getStat(e);return this._makeEntry(i,r)}catch(i){if(n.errorFilter(i))return null;throw i}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};uS.default=cS});var w4=S(pS=>{"use strict";h();Object.defineProperty(pS,"__esModule",{value:!0});var rme=C4(),nme=iv(),lS=class extends nme.default{constructor(){super(...arguments),this._reader=new rme.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(r,e,n).map(n.transform)}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};pS.default=lS});var S4=S(rp=>{"use strict";h();Object.defineProperty(rp,"__esModule",{value:!0});rp.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var tp=require("fs"),ime=require("os"),sme=Math.max(ime.cpus().length,1);rp.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:tp.lstat,lstatSync:tp.lstatSync,stat:tp.stat,statSync:tp.statSync,readdir:tp.readdir,readdirSync:tp.readdirSync};var dS=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,sme),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},rp.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};rp.default=dS});var gS=S((DGe,P4)=>{"use strict";h();var T4=PL(),ome=D4(),ame=E4(),cme=w4(),fS=S4(),zi=Ho();async function mS(t,e){Ss(t);let r=hS(t,ome.default,e),n=await Promise.all(r);return zi.array.flatten(n)}(function(t){t.glob=t,t.globSync=e,t.globStream=r,t.async=t;function e(u,l){Ss(u);let p=hS(u,cme.default,l);return zi.array.flatten(p)}t.sync=e;function r(u,l){Ss(u);let p=hS(u,ame.default,l);return zi.stream.merge(p)}t.stream=r;function n(u,l){Ss(u);let p=[].concat(u),d=new fS.default(l);return T4.generate(p,d)}t.generateTasks=n;function i(u,l){Ss(u);let p=new fS.default(l);return zi.pattern.isDynamicPattern(u,p)}t.isDynamicPattern=i;function s(u){return Ss(u),zi.path.escape(u)}t.escapePath=s;function o(u){return Ss(u),zi.path.convertPathToPattern(u)}t.convertPathToPattern=o;let a;(function(u){function l(d){return Ss(d),zi.path.escapePosixPath(d)}u.escapePath=l;function p(d){return Ss(d),zi.path.convertPosixPathToPattern(d)}u.convertPathToPattern=p})(a=t.posix||(t.posix={}));let c;(function(u){function l(d){return Ss(d),zi.path.escapeWindowsPath(d)}u.escapePath=l;function p(d){return Ss(d),zi.path.convertWindowsPathToPattern(d)}u.convertPathToPattern=p})(c=t.win32||(t.win32={}))})(mS||(mS={}));function hS(t,e,r){let n=[].concat(t),i=new fS.default(r),s=T4.generate(n,i),o=new e(i);return s.map(o.read,o)}function Ss(t){if(![].concat(t).every(n=>zi.string.isString(n)&&!zi.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}P4.exports=mS});async function yS(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await _4.default[t](r))[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function vS(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return A4.default[t](r)[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var A4,_4,CGe,F4,wGe,SGe,k4,TGe,I4=N(()=>{h();A4=Y(require("node:fs"),1),_4=Y(require("node:fs/promises"),1);CGe=yS.bind(void 0,"stat","isFile"),F4=yS.bind(void 0,"stat","isDirectory"),wGe=yS.bind(void 0,"lstat","isSymbolicLink"),SGe=vS.bind(void 0,"statSync","isFile"),k4=vS.bind(void 0,"statSync","isDirectory"),TGe=vS.bind(void 0,"lstatSync","isSymbolicLink")});var N4=N(()=>{h()});function Uf(t){return t instanceof URL?(0,O4.fileURLToPath)(t):t}var R4,bS,O4,kGe,IGe,xS=N(()=>{h();R4=require("node:util"),bS=require("node:child_process"),O4=require("node:url");N4();kGe=(0,R4.promisify)(bS.execFile);IGe=10*1024*1024});function np(t){return t.startsWith("\\\\?\\")?t:t.replace(/\\/g,"/")}var B4=N(()=>{h()});var qf,DS=N(()=>{h();qf=t=>t[0]==="!"});var M4,L4,$4,Hc,ES,j4,ume,U4,q4,lme,pme,dme,z4,G4,H4,V4,K4=N(()=>{h();M4=Y(require("node:process"),1),L4=Y(require("node:fs"),1),$4=Y(require("node:fs/promises"),1),Hc=Y(require("node:path"),1),ES=Y(gS(),1),j4=Y(require("ignore"),1);B4();xS();DS();ume=["**/node_modules","**/flow-typed","**/coverage","**/.git"],U4={absolute:!0,dot:!0},q4="**/.gitignore",lme=(t,e)=>qf(t)?"!"+Hc.default.posix.join(e,t.slice(1)):Hc.default.posix.join(e,t),pme=(t,e)=>{let r=np(Hc.default.relative(e,Hc.default.dirname(t.filePath)));return t.content.split(/\r?\n/).filter(n=>n&&!n.startsWith("#")).map(n=>lme(n,r))},dme=(t,e)=>{if(e=np(e),Hc.default.isAbsolute(t)){if(np(t).startsWith(e))return Hc.default.relative(e,t);throw new Error(`Path ${t} is not in cwd ${e}`)}return t},z4=(t,e)=>{let r=t.flatMap(i=>pme(i,e)),n=(0,j4.default)().add(r);return i=>(i=Uf(i),i=dme(i,e),i?n.ignores(np(i)):!1)},G4=(t={})=>({cwd:Uf(t.cwd)??M4.default.cwd(),suppressErrors:!!t.suppressErrors,deep:typeof t.deep=="number"?t.deep:Number.POSITIVE_INFINITY,ignore:[...t.ignore??[],...ume]}),H4=async(t,e)=>{let{cwd:r,suppressErrors:n,deep:i,ignore:s}=G4(e),o=await(0,ES.default)(t,{cwd:r,suppressErrors:n,deep:i,ignore:s,...U4}),a=await Promise.all(o.map(async c=>({filePath:c,content:await $4.default.readFile(c,"utf8")})));return z4(a,r)},V4=(t,e)=>{let{cwd:r,suppressErrors:n,deep:i,ignore:s}=G4(e),a=ES.default.sync(t,{cwd:r,suppressErrors:n,deep:i,ignore:s,...U4}).map(c=>({filePath:c,content:L4.default.readFileSync(c,"utf8")}));return z4(a,r)}});var CS,Y4,Vc,ip,fme,X4,Q4,W4,J4,wS,mme,Z4,e6,sv,t6,hme,r6,n6,i6,s6,o6,a6,SS,TS,YGe,XGe,QGe,ZGe,eHe,tHe,c6=N(()=>{h();CS=Y(require("node:process"),1),Y4=Y(require("node:fs"),1),Vc=Y(require("node:path"),1);$3();ip=Y(gS(),1);I4();xS();K4();DS();fme=t=>{if(t.some(e=>typeof e!="string"))throw new TypeError("Patterns must be a string or an array of strings")},X4=(t,e)=>{let r=qf(t)?t.slice(1):t;return Vc.default.isAbsolute(r)?r:Vc.default.join(e,r)},Q4=({directoryPath:t,files:e,extensions:r})=>{let n=r?.length>0?`.${r.length>1?`{${r.join(",")}}`:r[0]}`:"";return e?e.map(i=>Vc.default.posix.join(t,`**/${Vc.default.extname(i)?i:`${i}${n}`}`)):[Vc.default.posix.join(t,`**${n?`/*${n}`:""}`)]},W4=async(t,{cwd:e=CS.default.cwd(),files:r,extensions:n}={})=>(await Promise.all(t.map(async s=>await F4(X4(s,e))?Q4({directoryPath:s,files:r,extensions:n}):s))).flat(),J4=(t,{cwd:e=CS.default.cwd(),files:r,extensions:n}={})=>t.flatMap(i=>k4(X4(i,e))?Q4({directoryPath:i,files:r,extensions:n}):i),wS=t=>(t=[...new Set([t].flat())],fme(t),t),mme=t=>{if(!t)return;let e;try{e=Y4.default.statSync(t)}catch{return}if(!e.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},Z4=(t={})=>(t={...t,ignore:t.ignore??[],expandDirectories:t.expandDirectories??!0,cwd:Uf(t.cwd)},mme(t.cwd),t),e6=t=>async(e,r)=>t(wS(e),Z4(r)),sv=t=>(e,r)=>t(wS(e),Z4(r)),t6=t=>{let{ignoreFiles:e,gitignore:r}=t,n=e?wS(e):[];return r&&n.push(q4),n},hme=async t=>{let e=t6(t);return n6(e.length>0&&await H4(e,t))},r6=t=>{let e=t6(t);return n6(e.length>0&&V4(e,t))},n6=t=>{let e=new Set;return r=>{let n=Vc.default.normalize(r.path??r);return e.has(n)||t&&t(n)?!1:(e.add(n),!0)}},i6=(t,e)=>t.flat().filter(r=>e(r)),s6=(t,e)=>{let r=[];for(;t.length>0;){let n=t.findIndex(s=>qf(s));if(n===-1){r.push({patterns:t,options:e});break}let i=t[n].slice(1);for(let s of r)s.options.ignore.push(i);n!==0&&r.push({patterns:t.slice(0,n),options:{...e,ignore:[...e.ignore,i]}}),t=t.slice(n+1)}return r},o6=(t,e)=>({...e?{cwd:e}:{},...Array.isArray(t)?{files:t}:t}),a6=async(t,e)=>{let r=s6(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let s=o6(i,n);return Promise.all(r.map(async o=>{let{patterns:a,options:c}=o;return[a,c.ignore]=await Promise.all([W4(a,s),W4(c.ignore,{cwd:n})]),{patterns:a,options:c}}))},SS=(t,e)=>{let r=s6(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let s=o6(i,n);return r.map(o=>{let{patterns:a,options:c}=o;return a=J4(a,s),c.ignore=J4(c.ignore,{cwd:n}),{patterns:a,options:c}})},TS=e6(async(t,e)=>{let[r,n]=await Promise.all([a6(t,e),hme(e)]),i=await Promise.all(r.map(s=>(0,ip.default)(s.patterns,s.options)));return i6(i,n)}),YGe=sv((t,e)=>{let r=SS(t,e),n=r6(e),i=r.map(s=>ip.default.sync(s.patterns,s.options));return i6(i,n)}),XGe=sv((t,e)=>{let r=SS(t,e),n=r6(e),i=r.map(o=>ip.default.stream(o.patterns,o.options));return IC(i).filter(o=>n(o))}),QGe=sv((t,e)=>t.some(r=>ip.default.isDynamicPattern(r,e))),ZGe=e6(a6),eHe=sv(SS),{convertPathToPattern:tHe}=ip.default});function sp(t){let e=Date.now();return new Promise((r,n)=>{let s=gme(t.url)({protocol:t.url.protocol,host:t.url.host,port:t.url.port,path:t.url.pathname+t.url.search,method:t.method,headers:t.headers},o=>{let a="";o.on("data",c=>{a+=c}),o.on("end",()=>{if((0,u6.debug)(`${t.method} ${t.url.href}, duration: ${Date.now()-e}ms`),typeof o.statusCode=="number"&&o.statusCode>=200&&o.statusCode<300)if(typeof o.headers["content-type"]!="string"||!o.headers["content-type"].includes("application/json"))n(`Response from ${t.url.href} content-type is ${o.headers["content-type"]}`);else try{r(JSON.parse(a))}catch(c){n(`Response from ${t.url.href} is not valid JSON: ${a}
|
|
1229
1229
|
${c}`)}else n(`Request to ${t.url.href} failed with status ${o.statusCode}: ${a}`)})}).on("error",o=>{n(`Error fetching ${t.url.href}, ${o}`)});t.body&&(s.setHeader("Content-Type","application/json"),s.write(t.body)),s.end()})}function gme(t){if(t.protocol==="https:")return p6.request;if(t.protocol==="http:")return l6.request;throw new Error(`Unsupported protocol ${t.protocol}`)}var u6,l6,p6,d6=N(()=>{"use strict";h();u6=require("node:console"),l6=require("node:http"),p6=require("node:https")});async function f6(t){let e=new URL(`https://cdn.builder.io/api/v3/query/${t.publicApiKey}/${t.model}`);return e.searchParams.set("omit","meta.componentsUsed"),e.searchParams.set("apiKey",t.publicApiKey),e.searchParams.set("userAttributes.urlPath",t.pageUrl),e.searchParams.set("options.page.model",`"${t.model}"`),e.searchParams.set("cachebust","true"),(await sp({url:e,method:"GET"}))[t.model]}async function m6(t,e){if(e.kind===Nd.VCP)return!0;let r=new URL("https://cdn.builder.io/api/v2/admin"),n={query:`query {
|
|
1230
1230
|
models {
|
|
@@ -1244,7 +1244,7 @@ Restarting server after Builder Devtools update...
|
|
|
1244
1244
|
<h3>How's Devtools working for you?</h3>
|
|
1245
1245
|
<p>We'd love your feedback!</p>
|
|
1246
1246
|
</div>
|
|
1247
|
-
\`,t.appendChild(e),setTimeout(()=>{e.classList.add("menu-toggle-tooltip-show"),e.addEventListener("click",()=>{e.classList.remove("menu-toggle-tooltip-show")})},1e3)};function ui(t){t.getElementById("go-to-builder").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(Nr(),"builder")}),t.getElementById("components-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();let u=t.querySelector(".nav-cmp-list .section-content");u.scrollTop=0,oe(t,"nav-cmp-list"),si(t)}),t.getElementById("settings-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),oe(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(je(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open("https://www.figma.com/community/plugin/747985167520967365/builder-io-ai-powered-figma-to-code-react-vue-tailwind-more")})}function ci(t){let e=t.getElementById("enable-edit");e.addEventListener("change",r=>{r.stopPropagation(),Ft(e.checked)}),e.checked=it(),Ft(e.checked)}var At=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=\`<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}.menu-toggle{position:absolute;right:0;bottom:0;pointer-events:auto;padding:8px;background:transparent;border:none;appearance:none}.menu-toggle div{position:relative;width:64px;height:64px;pointer-events:none;border-radius:50%;background:#000;border:1px solid white;box-shadow:#00000054 0 0 8px}.menu-toggle:hover div{background-color:var(--background-color);border:1px solid rgb(220,220,220)}.menu-toggle svg{position:absolute;top:15px;left:15px;width:33px;height:32px}div.highlight-bg{position:absolute;top:-1px;left:-1px;background-color:#1a1a1a;pointer-events:none;transition:all .4s ease-out;opacity:0}.menu-toggle-highlight-no-transition div.highlight-bg{transition:none}.menu-toggle-highlight div.highlight-bg{opacity:1}.menu-toggle-tooltip{position:absolute;bottom:0;right:0;width:382px;height:72px;padding:0;text-align:left;appearance:none;background-color:transparent;border:none;pointer-events:none;transform:translate3d(320px,0,0);opacity:0;transition:all .15s ease-in-out;color:#fff}.menu-toggle-tooltip.menu-toggle-tooltip-show{pointer-events:auto;opacity:1;transform:translateZ(0)}.menu-toggle-tooltip-content{position:absolute;inset:0 95px 10px 0;padding:8px 12px;background-color:var(--primary-color);box-shadow:#00000054 0 0 20px;border-radius:2px}.menu-toggle-tooltip-content:before{content:"";position:absolute;bottom:15px;right:-6px;width:30px;height:30px;background-color:var(--primary-color);transform:rotate(45deg)}.menu-toggle-tooltip:hover .menu-toggle-tooltip-content,.menu-toggle-tooltip:hover .menu-toggle-tooltip-content:before{background-color:var(--primary-color-highlight)}.menu-toggle-tooltip-content h3{margin:0;font-size:16px}.menu-toggle-tooltip-content p{margin:0;font-size:12px}section{position:absolute;display:grid;grid-template-rows:64px auto 64px;top:0;left:0;width:100%;height:100%;padding:0;pointer-events:none}.section-content{margin:0;padding:0 0 10px;font-weight:300;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;overflow-y:auto}.section-content .error{color:var(--error-color);font-weight:700}section a{text-decoration:none;color:var(--text-color)}section h3,section p{margin-left:16px;margin-right:16px}.info{font-size:12px}ul.list{list-style:none;padding:0;margin:0}ul.list li{display:block;padding:0;margin:0}ul.list a,ul.list button{display:grid;grid-template-columns:24px auto;grid-gap:16px;padding:12px;margin:8px 0;border:none;background:transparent;appearance:none;width:100%;font-weight:300;text-align:left;text-decoration:none;color:var(--text-color)}ul.list a:hover,ul.list button:hover{text-decoration:none;color:var(--text-color);background-color:var(--button-background-color-hover)}ul.list a span,ul.list button span{display:block;font-size:16px;font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header{position:relative;display:grid;grid-template-columns:44px 1fr;gap:8px;padding-left:8px;border-bottom:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}header>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-home header>div{margin-right:56px}header h2{margin:7px 0 0;font-size:18px;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p{margin:2px 0 0;font-size:12px;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button{display:block;margin:0;padding:0;width:100%;font-size:12px;font-weight:300;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button:hover{text-decoration:underline;color:var(--primary-color)}.builder-logo{margin:12px 0 0 8px}#close{display:block;position:absolute;appearance:none;background:transparent;border:none;border-radius:50%;margin:0;padding:0;right:4px;top:8px;width:48px;height:48px;z-index:1;opacity:.7}#close:hover{opacity:1;background-color:var(--button-background-color-hover)}#close svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}.back-button{position:relative;display:block;margin:7px 0 0 -2px;width:48px;height:48px;background:transparent;border:none;appearance:none;border-radius:50%}.back-button:hover{background-color:var(--button-background-color-hover)}.back-button svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}footer{border-top:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}section.nav-cmp-list{grid-template-rows:64px auto 120px}footer a{text-decoration:underline;color:var(--primary-color)}footer a:hover{color:var(--primary-color);text-decoration:none}.nav-list{padding:2px 0}.nav-loading{pointer-events:none}.nav-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.nav-loading .nav-loading-icon{opacity:.5}.nav-list h4{margin:8px 8px 8px 10px;font-size:14px;font-weight:600}.nav-list .nav-list-item+h4{margin-top:30px}.nav-list-item{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;margin:2px 0;padding:8px 28px 8px 46px;width:100%;font-size:14px;font-weight:300;text-align:left;border:none;background:transparent;appearance:none}.nav-list-item:hover{background-color:var(--button-background-color-hover)}.nav-list-item-icon{position:absolute;top:4px;left:10px;width:24px;height:24px;object-fit:contain;filter:invert(100%);background-size:24px 24px;background-repeat:no-repeat;background-position:center center}.nav-list-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.nav-list-item:after{display:block;position:absolute;content:"";background-image:url('data:image/svg+xml,<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L7 7L1 13" stroke="%23F2F2F2" stroke-opacity="0.5" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:12px 9px;top:0;right:0;width:32px;height:32px;pointer-events:none}.nav-list-item-note{opacity:0;font-size:12px;padding-top:1px;text-align:right}.nav-list-item:hover .nav-list-item-note{opacity:.5}.ui-select{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-select h3{margin:0;font-size:14px;font-weight:500}.ui-select p{margin:8px 0;font-size:12px;font-weight:300}.ui-select .select{position:relative;margin:8px 0;border-radius:4px;padding:0;line-height:1.1;overflow:hidden;border:1px solid var(--border-color)}.ui-select select{appearance:none;background-color:transparent;border:none;outline:none;padding:8px 32px 8px 8px;margin:0;width:100%;font-size:14px;cursor:pointer;text-overflow:ellipsis;opacity:.6;color:var(--text-color)}.ui-select .select:after{content:"";top:6px;right:5px;width:24px;height:24px;position:absolute;background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23F2F2F2" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg>');background-repeat:no-repeat;background-position:center;pointer-events:none;opacity:.6}.ui-select .select:hover{border-color:var(--primary-color-subdued)}.ui-text-input .select:focus-within{border-color:var(--primary-color)}.ui-text-input .select:focus-within select{opacity:1}.spinner:after{content:" ";display:block;width:32px;height:32px;margin:0 auto;pointer-events:auto;border-radius:50%;border:3px solid var(--text-color);border-color:var(--text-color) transparent var(--text-color) transparent;animation:spinner .75s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ui-switch{display:grid;grid-template-columns:auto 48px;grid-gap:20px;margin:8px 0 16px;padding:8px 0 8px 16px;cursor:pointer}.ui-switch>*{pointer-events:none}.ui-switch input{display:none;visibility:hidden}.ui-switch .switcher{display:inline-block;border-radius:100px;width:35px;height:14px;background-color:#ccc;position:relative;top:6px;vertical-align:middle;cursor:pointer}.ui-switch input[type=checkbox]:checked+.switcher{background-color:var(--primary-color-subdued)}.ui-switch .switcher:before{content:"";display:block;width:20px;height:20px;background-color:var(--text-color);box-shadow:0 1px 3px #0009;border-radius:50%;position:absolute;top:-3px;left:0;margin-right:0;transition:all .15s}.ui-switch input[type=checkbox]:checked+.switcher:before{left:100%;margin-left:-20px;background-color:var(--primary-color)}.ui-switch h3{margin:0;font-size:14px;font-weight:500}.ui-switch p{margin:4px 0 0;font-size:12px;font-weight:300}.ui-text-input{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-text-input h3{margin:0;font-size:14px;font-weight:500}.ui-text-input p{margin:8px 0;font-size:12px;font-weight:300}.ui-text-input .input{position:relative;margin:8px 0;border:1px solid var(--border-color);border-radius:4px;background:transparent;padding:2px;overflow:hidden}.ui-text-input input{display:block;width:235px;font-size:14px;border:none;background:transparent;padding:6px;appearance:none;color:var(--text-color);opacity:.6;outline:none}.ui-text-input .input:hover{border-color:var(--primary-color-subdued)}.ui-text-input .input:focus-within{border-color:var(--primary-color)}.ui-text-input .input:focus-within input{opacity:1}.ui-text-input .input:after{content:"";position:absolute;top:5px;right:14px;width:8px;height:17px;border:2px solid rgba(51,181,51,1);border-top:none;border-left:none;transform:rotate(45deg);opacity:0;transition:opacity 80ms ease-in-out;pointer-events:none}.ui-text-input.saved .input:after{opacity:1}.ui-toast{position:fixed;bottom:8px;left:8px;right:8px;padding:6px 12px;font-size:14px;border-radius:4px;transform:translate3d(0,150%,0);opacity:0;transition:all var(--transition-time) ease-in-out;background-color:var(--primary-color-subdued);color:var(--text-color);pointer-events:none}.ui-toast.ui-toast-show{transform:translateZ(0);opacity:1;pointer-events:auto}[data-view=nav-home] .nav-home .section-content,[data-view=nav-cmp-list] .nav-cmp-list .section-content,[data-view=nav-cmp-detail] .nav-cmp-detail .section-content,[data-view=nav-cmp-input] .nav-cmp-input .section-content,[data-view=nav-settings] .nav-settings .section-content{transform:translateZ(0);pointer-events:auto}[data-view=nav-home] .nav-home header,[data-view=nav-home] .nav-home footer,[data-view=nav-cmp-list] .nav-cmp-list header,[data-view=nav-cmp-list] .nav-cmp-list footer,[data-view=nav-cmp-detail] .nav-cmp-detail header,[data-view=nav-cmp-detail] .nav-cmp-detail footer,[data-view=nav-cmp-input] .nav-cmp-input header,[data-view=nav-cmp-input] .nav-cmp-input footer,[data-view=nav-settings] .nav-settings header,[data-view=nav-settings] .nav-settings footer{opacity:1;pointer-events:auto}[data-view=nav-cmp-list] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-home .section-content,[data-view=nav-cmp-input] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-cmp-detail .section-content,[data-view=nav-settings] .nav-home .section-content{transform:translate3d(-105%,0,0)}.cmp-item .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 16.809C20.94 16.561 21 16.289 21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L7.988 3.99001M5.441 5.44801L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L18.544 18.56" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.532 10.538L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.27002 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 3L21 21" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');opacity:.3}.cmp-item.registered .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>');opacity:.8}.search-highlight{background-color:var(--primary-color-alpha);padding:0 2px;border-radius:2px;font-weight:500}.search-container{position:sticky;top:0;z-index:10;padding:12px 16px;background:var(--background-color);border-bottom:1px solid var(--border-color)}.search-input-wrapper{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:12px;color:var(--text-color-secondary);pointer-events:none}.component-search-input{width:100%;height:36px;padding:8px 36px;border:1px solid var(--border-color);border-radius:6px;background:var(--input-background);color:var(--text-color);font-size:14px;transition:border-color .2s,box-shadow .2s}.component-search-input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color-alpha)}.component-search-input::placeholder{color:var(--text-color-tertiary)}.clear-search-button{position:absolute;right:8px;padding:4px;color:var(--text-color-secondary);border:none;background:transparent;border-radius:4px;cursor:pointer;opacity:0;transition:opacity .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.clear-search-button:hover{background-color:var(--hover-color)}.component-search-input:not(:placeholder-shown)+.clear-search-button{opacity:1}.no-results{padding:32px 16px;text-align:center;color:var(--text-color-secondary);font-size:14px}#cmp-detail{position:relative}.cmp-loading{pointer-events:none!important}.cmp-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.cmp-loading .cmp-loading-icon{opacity:.5}.cmp-cover{position:absolute;top:160px;left:0;width:100%;height:100vh;background:var(--background-color);transform:translateZ(0);pointer-events:none;display:none}[data-view=nav-cmp-detail] .cmp-cover{display:block;pointer-events:auto}.cmp-enabled .cmp-cover{transform:translate3d(0,105%,0);pointer-events:none}.section-ready .cmp-cover{transition:all var(--transition-time) ease-in-out}.cmp-detail-inputs-container{margin:8px 0 16px;padding:0}.cmp-detail-inputs-container h3{margin:0 0 6px;padding-left:16px;padding-right:8px;font-size:14px;font-weight:500;display:flex;justify-content:space-between;align-items:center}.cmp-detail-inputs-reload{font-weight:300;font-size:.9em;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmp-detail-inputs-reload:hover{text-decoration:underline;color:var(--primary-color)}.cmp-detail-inputs-container .cmp-inputs-empty{padding:0;margin-top:12px;font-size:12px;font-weight:300;opacity:.5;font-style:italic}.cmp-detail-inputs-container .nav-list-item-icon{opacity:.8;background-size:20px 20px;background-position:4px center}.input-icon{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path></svg>')}.input-icon-array{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-6a2 2 0 1 1 4 0v6"></path> <path d="M10 13h4"></path></svg>')}.input-icon-boolean{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16h2a2 2 0 1 0 0 -4h-2h2a2 2 0 1 0 0 -4h-2v8z"></path></svg>')}.input-icon-number{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-8l4 8v-8"></path></svg>')}.input-icon-object{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"></path></svg>')}.input-icon-string{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"></path></svg>')}.cmp-input-item-unregistered{opacity:.4}.cmp-input-item-unregistered .input-icon:after{content:"";position:absolute;top:11px;left:4px;width:20px;height:2px;background-color:#000;transform:rotate(-45deg)}.cmp-prop-info{border-bottom:1px solid var(--border-color)}.cmp-input-readonly{margin:16px 0;padding:0 16px;display:grid;grid-template-columns:50% 50%;gap:12px}.cmp-input-readonly h3{margin:0;font-size:14px;font-weight:500}.cmp-input-readonly span{margin-top:2px;font-size:12px;font-weight:300;opacity:.8}.cmp-input-detail{margin:16px 0}.cmp-input-detail a{color:var(--primary-color);text-decoration:none}.cmp-input-detail a:hover{text-decoration:underline}.input-cover{position:absolute;top:175px;left:0;width:100%;height:100%;background:var(--background-color);transform:translateZ(0);transition:all var(--transition-time) ease-in-out;pointer-events:auto}.input-enabled .input-cover{transform:translate3d(0,105%,0);pointer-events:none}.input-loading-icon{position:absolute;display:inline-block;top:190px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.input-loading .input-loading-icon{opacity:.5}:host{position:fixed;inset:0;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}aside{position:absolute;top:0;right:0;width:var(--menu-width);height:100%;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;background:var(--background-color);box-shadow:#000000c9 5px 0 20px;overflow:hidden;z-index:1}:host(.show-builder-menu) aside{pointer-events:auto;transform:translateZ(0)}#hit{position:absolute;inset:0;display:none}:host(.show-builder-menu) #hit{display:block;pointer-events:auto}#version{position:absolute;bottom:6px;right:6px;font-size:8px;color:#9b9b9b}</style><div id="hit"></div> <aside data-view="nav-home"> <section class="nav-home"> <header> <svg class="builder-logo" viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> <div> <h2 class="builder-home-title">Builder Devtools</h2> <p><button id="go-to-builder">Go to Builder</button></p> </div> <button id="close" aria-label="Close Menu"> <svg viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg> </button> </header> <div class="section-content"> <ul class="list"> <li> <button id="components-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Components</span> </button> </li> <li> <button id="settings-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M10.325 4.317C10.751 2.561 13.249 2.561 13.675 4.317C13.7389 4.5808 13.8642 4.82578 14.0407 5.032C14.2172 5.23822 14.4399 5.39985 14.6907 5.50375C14.9414 5.60764 15.2132 5.65085 15.4838 5.62987C15.7544 5.60889 16.0162 5.5243 16.248 5.383C17.791 4.443 19.558 6.209 18.618 7.753C18.4769 7.98466 18.3924 8.24634 18.3715 8.51677C18.3506 8.78721 18.3938 9.05877 18.4975 9.30938C18.6013 9.55999 18.7627 9.78258 18.9687 9.95905C19.1747 10.1355 19.4194 10.2609 19.683 10.325C21.439 10.751 21.439 13.249 19.683 13.675C19.4192 13.7389 19.1742 13.8642 18.968 14.0407C18.7618 14.2172 18.6001 14.4399 18.4963 14.6907C18.3924 14.9414 18.3491 15.2132 18.3701 15.4838C18.3911 15.7544 18.4757 16.0162 18.617 16.248C19.557 17.791 17.791 19.558 16.247 18.618C16.0153 18.4769 15.7537 18.3924 15.4832 18.3715C15.2128 18.3506 14.9412 18.3938 14.6906 18.4975C14.44 18.6013 14.2174 18.7627 14.0409 18.9687C13.8645 19.1747 13.7391 19.4194 13.675 19.683C13.249 21.439 10.751 21.439 10.325 19.683C10.2611 19.4192 10.1358 19.1742 9.95929 18.968C9.7828 18.7618 9.56011 18.6001 9.30935 18.4963C9.05859 18.3924 8.78683 18.3491 8.51621 18.3701C8.24559 18.3911 7.98375 18.4757 7.752 18.617C6.209 19.557 4.442 17.791 5.382 16.247C5.5231 16.0153 5.60755 15.7537 5.62848 15.4832C5.64942 15.2128 5.60624 14.9412 5.50247 14.6906C5.3987 14.44 5.23726 14.2174 5.03127 14.0409C4.82529 13.8645 4.58056 13.7391 4.317 13.675C2.561 13.249 2.561 10.751 4.317 10.325C4.5808 10.2611 4.82578 10.1358 5.032 9.95929C5.23822 9.7828 5.39985 9.56011 5.50375 9.30935C5.60764 9.05859 5.65085 8.78683 5.62987 8.51621C5.60889 8.24559 5.5243 7.98375 5.383 7.752C4.443 6.209 6.209 4.442 7.753 5.382C8.753 5.99 10.049 5.452 10.325 4.317Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Settings</span> </button> </li> <li> <button id="add-page-link"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /> <path d="M12 11l0 6" /> <path d="M9 14l6 0" /> </svg> <span>Add Builder Page</span> </button> </li> <li> <button id="import-from-figma"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-figma" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M15 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M6 3m0 3a3 3 0 0 1 3 -3h6a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-6a3 3 0 0 1 -3 -3z" /> <path d="M9 9a3 3 0 0 0 0 6h3m-3 0a3 3 0 1 0 3 3v-15" /> </svg> <span>Import From Figma</span> </button> </li> </ul> </div> <footer> <ul class="list"> <li> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdqZcJpRtm_Ia5DTHP6SDY9Xa6LID3KiTjRWkjMzWyJRUtSHw/viewform" target="_blank" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.013 17.0114L10.013 18.0114L2.513 10.5834C2.0183 10.102 1.62864 9.52342 1.36854 8.88404C1.10845 8.24466 0.983558 7.55836 1.00173 6.86834C1.01991 6.17832 1.18076 5.49954 1.47415 4.87474C1.76755 4.24994 2.18713 3.69266 2.70648 3.23799C3.22583 2.78331 3.8337 2.4411 4.49181 2.23289C5.14991 2.02468 5.844 1.95499 6.53036 2.02821C7.21673 2.10143 7.8805 2.31596 8.47987 2.65831C9.07925 3.00066 9.60124 3.46341 10.013 4.01741C10.8086 2.95654 11.9931 2.2552 13.3059 2.06766C14.6186 1.88012 15.9521 2.22176 17.013 3.01741C18.0739 3.81306 18.7752 4.99755 18.9627 6.3103C19.1503 7.62305 18.8086 8.95654 18.013 10.0174" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M18.2006 19.8175L16.0286 20.9555C15.9642 20.989 15.8917 21.004 15.8192 20.9987C15.7467 20.9934 15.6771 20.9681 15.6182 20.9256C15.5593 20.8831 15.5134 20.825 15.4855 20.7579C15.4577 20.6907 15.4491 20.6172 15.4606 20.5455L15.8756 18.1345L14.1186 16.4275C14.0662 16.3768 14.0291 16.3123 14.0115 16.2416C13.9939 16.1708 13.9966 16.0965 14.0192 16.0271C14.0418 15.9578 14.0835 15.8962 14.1394 15.8494C14.1954 15.8026 14.2634 15.7725 14.3356 15.7625L16.7636 15.4105L17.8496 13.2175C17.8821 13.1521 17.9322 13.0972 17.9942 13.0588C18.0562 13.0204 18.1277 13 18.2006 13C18.2736 13 18.3451 13.0204 18.4071 13.0588C18.4691 13.0972 18.5191 13.1521 18.5516 13.2175L19.6376 15.4105L22.0656 15.7625C22.1377 15.7728 22.2054 15.8031 22.2611 15.85C22.3168 15.8968 22.3583 15.9583 22.3809 16.0275C22.4034 16.0967 22.4062 16.1708 22.3888 16.2415C22.3715 16.3122 22.3347 16.3766 22.2826 16.4275L20.5256 18.1345L20.9396 20.5445C20.9521 20.6163 20.9441 20.6902 20.9166 20.7578C20.8891 20.8254 20.8433 20.8839 20.7842 20.9267C20.7252 20.9695 20.6553 20.9949 20.5825 21C20.5098 21.005 20.4371 20.9896 20.3726 20.9555L18.2006 19.8175Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Give Feedback</span> </a> </li> </ul> <div id="version"></div> </footer> </section> <section class="nav-cmp-list"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div class="search-container"> <div class="search-input-wrapper"> <svg class="search-icon" viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M15.5 15.5L20 20M10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17Z" /> </svg> <input type="text" id="component-search" class="component-search-input" placeholder="Search components..." autocomplete="off" spellcheck="false" /> <button id="clear-search" class="clear-search-button" type="button" aria-label="Clear search" > <svg viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M6 6l12 12M6 18L18 6" /> </svg> </button> </div> </div> <div> <h2>Custom Components</h2> <p> <button id="open-builder-registry"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-list" class="cmp-list nav-list"></div> </div> <div class="nav-loading-icon spinner"></div> <footer> <p class="info"> Expand on Builder's selection of built-in blocks by <a target="_blank" href="https://www.builder.io/c/docs/custom-components-intro" >registering components</a > from your codebase. This way, teammates can drag and drop your components within Builder's Visual Editor just like any other block. </p> </footer> </section> <section class="nav-cmp-detail"> <header> <button class="back-button" data-back="nav-cmp-list"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-detail-title"></h2> <p> <button id="cmp-open-source"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-error"></div> <label class="ui-switch"> <div> <h3>Register Component</h3> <p> Registers this component so it can be used within Builder Visual CMS </p> </div> <input type="checkbox" role="switch" id="cmp-register" /> <span class="switcher"></span> </label> <div id="cmp-detail"> <label class="ui-text-input"> <h3>Component Name</h3> <div class="input"> <input type="text" id="cmp-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="2" maxlength="30" required placeholder="e.g. My Counter" /> </div> <p> Unique name to identify this custom component within Builder. Press ESC to cancel </p> </label> <div class="cmp-detail-inputs-container"> <h3> <span>Builder Inputs (Props)</span> <button class="cmp-detail-inputs-reload" id="btn-inputs-reload"> Reload </button> </h3> <div id="cmp-detail-inputs"></div> </div> </div> </div> <div class="cmp-cover"></div> <div class="cmp-loading-icon spinner"></div> </section> <section class="nav-cmp-input"> <header> <button class="back-button" data-back="nav-cmp-detail"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-input-title"></h2> <p> <button id="input-open-source"></button> </p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable Input</h3> <p>Add this component prop as a Builder input</p> </div> <input type="checkbox" role="switch" id="input-register" /> <span class="switcher"></span> </label> <div class="cmp-prop-info"> <div class="cmp-input-readonly"> <h3>Prop Name</h3> <span id="cmp-prop-name"></span> </div> <div class="cmp-input-readonly"> <h3>Prop Type</h3> <span id="cmp-prop-type"></span> </div> </div> <div class="cmp-input-detail"> <label class="ui-text-input"> <h3>Builder Input Name</h3> <div class="input"> <input type="text" id="input-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="1" maxlength="30" required placeholder="e.g. Text" /> </div> <p> Friendly name to identify this component prop as a Builder input. Press ESC to cancel </p> </label> <label class="ui-select"> <h3>Builder Input Type</h3> <div class="select"> <select id="input-type"></select> </div> <p> Correlate to what editing UI is appropriate for this Builder input. <a href="https://www.builder.io/c/docs/custom-components-input-types" target="_blank" >Read more about input types.</a > </p> </label> </div> <div class="input-cover"></div> <div class="input-loading-icon spinner"></div> </div> </section> <section class="nav-settings"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2>Settings</h2> <p>Configure Builder's Devtools</p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable edit button in UI</h3> <p>Enables the edit button so you can edit content in Builder</p> </div> <input type="checkbox" role="switch" id="enable-edit" /> <span class="switcher"></span> </label> </div> </section> <div class="ui-toast" id="toast"></div> </aside> <button class="menu-toggle" aria-label="Toggle Builder Devtools"> <div> <div class="highlight-bg"></div> <svg viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> </div> </button>\`,ai(e),ui(e),oi(e),ri(e),ti(e),ci(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.15.2"}highlightOpener(){let e=this.shadowRoot.querySelector(".menu-toggle");e.classList.add("menu-toggle-highlight"),e.classList.add("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight")},20)},20)}};var lo=\`<style>*,*:before,*:after{box-sizing:border-box}html,body,:host{position:fixed;top:0;left:0;width:100%;height:100vh;z-index:2147483646;margin:0;padding:0;line-height:1.8;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";background-color:#252525;color:#fff;transition:opacity .25s ease-in-out}:host([aria-hidden="true"]){opacity:0;pointer-events:none}main{position:absolute;top:0;left:0;width:100%;height:100vh}h1{margin-top:0;font-size:24px;font-weight:300;line-height:1.4}p{margin:20px 0;font-weight:300}button{cursor:pointer}aside{position:absolute;top:0;left:0;width:350px;height:100vh;padding:60px 0 0 50px;background-color:#121212}aside ul{margin:30px 0 0;padding:0;list-style:none}aside li{position:relative;margin:0;padding:20px 10px;font-weight:300}aside li.highlight{color:#48a1ff}aside li.active{font-weight:700}aside li .circle{position:absolute;top:20px;left:10px;width:24px;height:24px;border:3px solid white;border-radius:50%;font-size:14px}aside li.highlight .circle{border-color:#48a1ff}aside li.active .circle:after{content:"";position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background-color:#48a1ff}aside li.completed .circle{background-color:#48a1ff}aside li.completed .circle:after{content:"";position:absolute;top:2px;left:6px;width:6px;height:13px;border:3px solid black;border-top:none;border-left:none;transform:rotate(45deg)}aside li .line{position:absolute;top:44px;left:21px;width:3px;height:45px;background-color:#fff}aside li.completed .line{background-color:#48a1ff}aside li span{display:block;margin-left:44px}nav{margin-top:30px}section{position:absolute;top:135px;left:350px;padding:0 80px 0 140px;transition:opacity .15s ease-in-out}section[aria-hidden=true]{pointer-events:none;opacity:0}section h1,section p{min-width:300px;max-width:600px}.button{position:relative;display:inline-block;color:#fff;background-color:#48a1ff;border-radius:4px;text-decoration:none;padding:10px 40px 10px 20px;white-space:nowrap}.button:hover{background-color:#48a1ffd9}#button-icon{position:absolute;top:1px;right:5px;bottom:0;width:30px;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="white" stroke-linecap="square" stroke-miterlimit="10" stroke-width="48" d="M184 112l144 144-144 144"/></svg>');background-repeat:no-repeat;background-position:center;background-size:24px 24px}.button[aria-disabled=true]{opacity:.9;background-color:#ffffff4d;pointer-events:none;padding-right:60px}.button[aria-disabled=true] #button-icon{top:21px;right:29px;width:8px;height:8px;border-radius:4px;background:#fff;color:#fff;animation:dot-flashing .5s infinite linear alternate;animation-delay:.25s}.button[aria-disabled=true] #button-icon:before,.button[aria-disabled=true] #button-icon:after{content:"";display:inline-block;position:absolute;top:0}.button[aria-disabled=true] #button-icon:before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:0s}.button[aria-disabled=true] #button-icon:after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:.5s}@keyframes dot-flashing{0%{background-color:#fff}50%,to{background-color:#ffffff4d}}.logo{margin-left:9px;background:url('data:image/svg+xml,<svg viewBox="0 0 150 32" fill="none" xmlns="http://www.w3.org/2000/svg" > <g clip-path="url(%23clip0_4_304)"> <path d="M27.9858 8.99927C27.9872 10.3415 27.688 11.667 27.1101 12.8783C26.5321 14.0896 25.6902 15.156 24.6462 15.9989V15.9989L0.634502 2.36355C0.542657 2.31119 0.457444 2.24796 0.380701 2.17523C0.260289 2.05715 0.164605 1.91624 0.0992389 1.76075C0.0338732 1.60525 0.000136546 1.43828 0 1.26959C0 0.932873 0.133698 0.609948 0.371683 0.371854C0.609667 0.13376 0.932443 0 1.269 0L18.9906 0C21.3763 0 23.6642 0.948135 25.3512 2.63583C27.0381 4.32352 27.9858 6.61252 27.9858 8.99927V8.99927Z" fill="%2318B4F4" /> <path d="M27.9858 22.9986C27.9861 24.1806 27.7536 25.351 27.3017 26.4431C26.8498 27.5352 26.1873 28.5275 25.352 29.3634C24.5167 30.1993 23.5249 30.8624 22.4335 31.3147C21.342 31.7671 20.1721 32 18.9907 32H1.26906C1.01802 31.9973 0.77343 31.9202 0.566221 31.7784C0.359012 31.6366 0.198499 31.4364 0.104989 31.2034C0.0114791 30.9703 -0.0108254 30.7147 0.0408974 30.4689C0.0926201 30.2231 0.216046 29.9982 0.395559 29.8226V29.8226C0.467112 29.7508 0.547407 29.6882 0.634555 29.6364L10.0844 24.2703L24.6441 16.001C25.688 16.8438 26.53 17.9097 27.1083 19.1206C27.6866 20.3315 27.9864 21.6566 27.9858 22.9986V22.9986Z" fill="%23FD6B3C" /> <path d="M24.6461 15.9989L10.0843 24.2703L0.634458 29.6365C0.54372 29.6868 0.459841 29.7487 0.384888 29.8205C3.98804 26.1233 6.00266 21.1627 5.99812 15.9989C6.0049 10.8346 3.99085 5.87268 0.387003 2.17523C0.463746 2.24796 0.548959 2.31119 0.640803 2.36355L24.6461 15.9989Z" fill="%23A97FF2" /> <path d="M47.6659 11.7352C51.8177 11.7352 54.1632 15.0531 54.1632 19.0714C54.1632 23.0896 51.8177 26.3821 47.6659 26.3821C45.5086 26.3821 43.8589 25.5188 42.9473 24.0545L42.5709 26.052H39.9736V6.77115H43.1884V13.8914C43.971 12.6959 45.5086 11.7352 47.6659 11.7352ZM47.0187 23.5488C49.4446 23.5488 50.9547 21.5809 50.9547 19.0714C50.9547 16.5089 49.4446 14.5664 47.0187 14.5664C44.5928 14.5664 43.0806 16.5047 43.0806 19.0714C43.0806 21.583 44.5653 23.5488 47.0187 23.5488V23.5488Z" fill="white" /> <path d="M65.4595 20.2859V12.0611H68.668V20.123C68.668 23.7202 67.0246 26.3821 62.4943 26.3821C57.9639 26.3821 56.3206 23.7117 56.3206 20.123V12.0611H59.529V20.2859C59.529 22.4696 60.5527 23.5488 62.49 23.5488C64.4274 23.5488 65.4595 22.4696 65.4595 20.2859Z" fill="white" /> <path d="M71.2355 7.74451C71.2247 7.46284 71.2724 7.18199 71.3755 6.91968C71.4787 6.65737 71.6351 6.41929 71.8348 6.22047C72.0345 6.02165 72.2732 5.8664 72.5359 5.76452C72.7986 5.66264 73.0796 5.61633 73.3611 5.62853C74.5793 5.62853 75.4571 6.50666 75.4571 7.75509C75.4571 9.00352 74.5793 9.8224 73.3611 9.8224C72.1428 9.8224 71.2355 8.9612 71.2355 7.74451Z" fill="white" /> <path d="M128.476 7.74451C128.465 7.46376 128.513 7.18383 128.615 6.92227C128.718 6.66071 128.873 6.42315 129.072 6.22449C129.27 6.02583 129.508 5.87035 129.769 5.7678C130.031 5.66524 130.31 5.61783 130.591 5.62852C131.809 5.62852 132.687 6.50666 132.687 7.75509C132.687 9.00352 131.809 9.8224 130.591 9.8224C129.373 9.8224 128.476 8.9612 128.476 7.74451Z" fill="white" /> <path d="M122.302 24.1031C122.291 23.8223 122.339 23.5422 122.441 23.2805C122.543 23.0188 122.699 22.7811 122.897 22.5824C123.096 22.3837 123.334 22.2282 123.595 22.1258C123.857 22.0233 124.137 21.9761 124.417 21.9872C125.636 21.9872 126.513 22.8653 126.513 24.1031C126.513 25.341 125.636 26.1726 124.417 26.1726C123.199 26.1726 122.302 25.3219 122.302 24.1031Z" fill="white" /> <path d="M74.9516 12.059H71.7432V26.0583H74.9516V12.059Z" fill="white" /> <path d="M78.16 26.0583V6.77115H81.3685V26.0626L78.16 26.0583Z" fill="white" /> <path d="M94.6063 6.77115H97.8148V26.0626H95.2239L94.8474 24.0651C93.9591 25.523 92.3094 26.3927 90.131 26.3927C86.0046 26.3927 83.6591 23.0748 83.6591 19.0819C83.6591 15.0891 86.0046 11.7458 90.131 11.7458C92.3137 11.7458 93.8238 12.7149 94.6063 13.902V6.77115ZM90.7993 14.5707C88.3734 14.5707 86.8633 16.5131 86.8633 19.0756C86.8633 21.5851 88.3734 23.553 90.7993 23.553C93.2252 23.553 94.7354 21.5851 94.7354 19.0756C94.7396 16.5047 93.257 14.5664 90.8036 14.5664L90.7993 14.5707Z" fill="white" /> <path d="M113.479 22.2284C112.482 24.7359 110.162 26.3821 107.117 26.3821C102.887 26.3821 100.137 23.225 100.137 19.0439C100.137 14.9706 102.942 11.7353 107.093 11.7353C111.245 11.7353 113.969 14.8902 113.969 18.991C113.982 19.3255 113.953 19.6604 113.883 19.9876H103.288C103.53 22.2009 104.959 23.6292 107.197 23.6292C108.735 23.6292 110.001 22.8738 110.594 21.473L113.479 22.2284ZM103.341 17.6156H110.784C110.513 15.6731 109.166 14.3506 107.089 14.3506C105.012 14.3506 103.665 15.7006 103.341 17.6156V17.6156Z" fill="white" /> <path d="M123.779 14.9452C123.538 14.9117 123.295 14.8933 123.051 14.8902C120.786 14.8902 119.439 16.0772 119.439 18.7751V26.0583H116.23V12.0611H118.821L119.195 14.0014C119.707 13.1127 120.887 11.9257 123.322 11.9257C123.455 11.9257 123.779 11.9532 123.779 11.9532V14.9452Z" fill="white" /> <path d="M132.192 12.059H128.984V26.0583H132.192V12.059Z" fill="white" /> <path d="M134.483 19.0714C134.483 15.1335 137.287 11.7353 141.735 11.7353C146.183 11.7353 149.015 15.1335 149.015 19.0714C149.015 23.0092 146.213 26.3821 141.735 26.3821C137.258 26.3821 134.483 23.0092 134.483 19.0714ZM141.735 23.5488C144.083 23.5488 145.806 21.7692 145.806 19.0714C145.806 16.3735 144.083 14.5664 141.735 14.5664C139.387 14.5664 137.687 16.346 137.687 19.0714C137.687 21.7968 139.417 23.5488 141.735 23.5488V23.5488Z" fill="white" /> </g> <defs> <clipPath id="clip0_4_304"> <rect width="149.015" height="32" fill="white" /> </clipPath> </defs> </svg>');background-repeat:no-repeat;width:150px;height:32px}@media (max-width: 840px){aside{width:250px;padding:60px 0 0 20px}section{left:250px;padding:0 80px}}@media (max-width: 590px){aside{width:230px;padding:60px 0 0 10px}section{left:230px;padding:0 40px}}#modified-files-message a{color:#cbcbcb;font-weight:300;text-decoration:underline}#modified-files-message a:hover{color:#fff;text-decoration:none}#restart-warning{border-radius:4px;padding:8px 16px;border:1px solid #fd6b3c;background:#fd6b3c1a}#react-router-steps{margin:0 0 5px;padding:0 20px}#need-help{color:#48a1ff;text-decoration:none}#router-message{border-radius:4px;padding:16px;border:1px solid #48a1ff}#router-finish-button{margin-top:12px}#router-checkbox-div{display:flex;align-items:center}#router-checkbox{margin-right:10px;width:15px;height:15px}#success-title{display:flex;align-items:center;gap:10px}#success-title .check-icon{display:inline-block;width:24px;height:24px;border:2px solid #28a745;border-radius:50%;position:relative}#success-title .check-icon:before{content:"";position:absolute;top:50%;left:50%;width:6px;height:12px;border:solid #28a745;border-width:0 2px 2px 0;transform:translate(-50%,-60%) rotate(45deg)}
|
|
1247
|
+
\`,t.appendChild(e),setTimeout(()=>{e.classList.add("menu-toggle-tooltip-show"),e.addEventListener("click",()=>{e.classList.remove("menu-toggle-tooltip-show")})},1e3)};function ui(t){t.getElementById("go-to-builder").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(Nr(),"builder")}),t.getElementById("components-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();let u=t.querySelector(".nav-cmp-list .section-content");u.scrollTop=0,oe(t,"nav-cmp-list"),si(t)}),t.getElementById("settings-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),oe(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(je(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open("https://www.figma.com/community/plugin/747985167520967365/builder-io-ai-powered-figma-to-code-react-vue-tailwind-more")})}function ci(t){let e=t.getElementById("enable-edit");e.addEventListener("change",r=>{r.stopPropagation(),Ft(e.checked)}),e.checked=it(),Ft(e.checked)}var At=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=\`<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}.menu-toggle{position:absolute;right:0;bottom:0;pointer-events:auto;padding:8px;background:transparent;border:none;appearance:none}.menu-toggle div{position:relative;width:64px;height:64px;pointer-events:none;border-radius:50%;background:#000;border:1px solid white;box-shadow:#00000054 0 0 8px}.menu-toggle:hover div{background-color:var(--background-color);border:1px solid rgb(220,220,220)}.menu-toggle svg{position:absolute;top:15px;left:15px;width:33px;height:32px}div.highlight-bg{position:absolute;top:-1px;left:-1px;background-color:#1a1a1a;pointer-events:none;transition:all .4s ease-out;opacity:0}.menu-toggle-highlight-no-transition div.highlight-bg{transition:none}.menu-toggle-highlight div.highlight-bg{opacity:1}.menu-toggle-tooltip{position:absolute;bottom:0;right:0;width:382px;height:72px;padding:0;text-align:left;appearance:none;background-color:transparent;border:none;pointer-events:none;transform:translate3d(320px,0,0);opacity:0;transition:all .15s ease-in-out;color:#fff}.menu-toggle-tooltip.menu-toggle-tooltip-show{pointer-events:auto;opacity:1;transform:translateZ(0)}.menu-toggle-tooltip-content{position:absolute;inset:0 95px 10px 0;padding:8px 12px;background-color:var(--primary-color);box-shadow:#00000054 0 0 20px;border-radius:2px}.menu-toggle-tooltip-content:before{content:"";position:absolute;bottom:15px;right:-6px;width:30px;height:30px;background-color:var(--primary-color);transform:rotate(45deg)}.menu-toggle-tooltip:hover .menu-toggle-tooltip-content,.menu-toggle-tooltip:hover .menu-toggle-tooltip-content:before{background-color:var(--primary-color-highlight)}.menu-toggle-tooltip-content h3{margin:0;font-size:16px}.menu-toggle-tooltip-content p{margin:0;font-size:12px}section{position:absolute;display:grid;grid-template-rows:64px auto 64px;top:0;left:0;width:100%;height:100%;padding:0;pointer-events:none}.section-content{margin:0;padding:0 0 10px;font-weight:300;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;overflow-y:auto}.section-content .error{color:var(--error-color);font-weight:700}section a{text-decoration:none;color:var(--text-color)}section h3,section p{margin-left:16px;margin-right:16px}.info{font-size:12px}ul.list{list-style:none;padding:0;margin:0}ul.list li{display:block;padding:0;margin:0}ul.list a,ul.list button{display:grid;grid-template-columns:24px auto;grid-gap:16px;padding:12px;margin:8px 0;border:none;background:transparent;appearance:none;width:100%;font-weight:300;text-align:left;text-decoration:none;color:var(--text-color)}ul.list a:hover,ul.list button:hover{text-decoration:none;color:var(--text-color);background-color:var(--button-background-color-hover)}ul.list a span,ul.list button span{display:block;font-size:16px;font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header{position:relative;display:grid;grid-template-columns:44px 1fr;gap:8px;padding-left:8px;border-bottom:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}header>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-home header>div{margin-right:56px}header h2{margin:7px 0 0;font-size:18px;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p{margin:2px 0 0;font-size:12px;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button{display:block;margin:0;padding:0;width:100%;font-size:12px;font-weight:300;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button:hover{text-decoration:underline;color:var(--primary-color)}.builder-logo{margin:12px 0 0 8px}#close{display:block;position:absolute;appearance:none;background:transparent;border:none;border-radius:50%;margin:0;padding:0;right:4px;top:8px;width:48px;height:48px;z-index:1;opacity:.7}#close:hover{opacity:1;background-color:var(--button-background-color-hover)}#close svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}.back-button{position:relative;display:block;margin:7px 0 0 -2px;width:48px;height:48px;background:transparent;border:none;appearance:none;border-radius:50%}.back-button:hover{background-color:var(--button-background-color-hover)}.back-button svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}footer{border-top:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}section.nav-cmp-list{grid-template-rows:64px auto 120px}footer a{text-decoration:underline;color:var(--primary-color)}footer a:hover{color:var(--primary-color);text-decoration:none}.nav-list{padding:2px 0}.nav-loading{pointer-events:none}.nav-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.nav-loading .nav-loading-icon{opacity:.5}.nav-list h4{margin:8px 8px 8px 10px;font-size:14px;font-weight:600}.nav-list .nav-list-item+h4{margin-top:30px}.nav-list-item{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;margin:2px 0;padding:8px 28px 8px 46px;width:100%;font-size:14px;font-weight:300;text-align:left;border:none;background:transparent;appearance:none}.nav-list-item:hover{background-color:var(--button-background-color-hover)}.nav-list-item-icon{position:absolute;top:4px;left:10px;width:24px;height:24px;object-fit:contain;filter:invert(100%);background-size:24px 24px;background-repeat:no-repeat;background-position:center center}.nav-list-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.nav-list-item:after{display:block;position:absolute;content:"";background-image:url('data:image/svg+xml,<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L7 7L1 13" stroke="%23F2F2F2" stroke-opacity="0.5" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:12px 9px;top:0;right:0;width:32px;height:32px;pointer-events:none}.nav-list-item-note{opacity:0;font-size:12px;padding-top:1px;text-align:right}.nav-list-item:hover .nav-list-item-note{opacity:.5}.ui-select{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-select h3{margin:0;font-size:14px;font-weight:500}.ui-select p{margin:8px 0;font-size:12px;font-weight:300}.ui-select .select{position:relative;margin:8px 0;border-radius:4px;padding:0;line-height:1.1;overflow:hidden;border:1px solid var(--border-color)}.ui-select select{appearance:none;background-color:transparent;border:none;outline:none;padding:8px 32px 8px 8px;margin:0;width:100%;font-size:14px;cursor:pointer;text-overflow:ellipsis;opacity:.6;color:var(--text-color)}.ui-select .select:after{content:"";top:6px;right:5px;width:24px;height:24px;position:absolute;background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23F2F2F2" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg>');background-repeat:no-repeat;background-position:center;pointer-events:none;opacity:.6}.ui-select .select:hover{border-color:var(--primary-color-subdued)}.ui-text-input .select:focus-within{border-color:var(--primary-color)}.ui-text-input .select:focus-within select{opacity:1}.spinner:after{content:" ";display:block;width:32px;height:32px;margin:0 auto;pointer-events:auto;border-radius:50%;border:3px solid var(--text-color);border-color:var(--text-color) transparent var(--text-color) transparent;animation:spinner .75s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ui-switch{display:grid;grid-template-columns:auto 48px;grid-gap:20px;margin:8px 0 16px;padding:8px 0 8px 16px;cursor:pointer}.ui-switch>*{pointer-events:none}.ui-switch input{display:none;visibility:hidden}.ui-switch .switcher{display:inline-block;border-radius:100px;width:35px;height:14px;background-color:#ccc;position:relative;top:6px;vertical-align:middle;cursor:pointer}.ui-switch input[type=checkbox]:checked+.switcher{background-color:var(--primary-color-subdued)}.ui-switch .switcher:before{content:"";display:block;width:20px;height:20px;background-color:var(--text-color);box-shadow:0 1px 3px #0009;border-radius:50%;position:absolute;top:-3px;left:0;margin-right:0;transition:all .15s}.ui-switch input[type=checkbox]:checked+.switcher:before{left:100%;margin-left:-20px;background-color:var(--primary-color)}.ui-switch h3{margin:0;font-size:14px;font-weight:500}.ui-switch p{margin:4px 0 0;font-size:12px;font-weight:300}.ui-text-input{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-text-input h3{margin:0;font-size:14px;font-weight:500}.ui-text-input p{margin:8px 0;font-size:12px;font-weight:300}.ui-text-input .input{position:relative;margin:8px 0;border:1px solid var(--border-color);border-radius:4px;background:transparent;padding:2px;overflow:hidden}.ui-text-input input{display:block;width:235px;font-size:14px;border:none;background:transparent;padding:6px;appearance:none;color:var(--text-color);opacity:.6;outline:none}.ui-text-input .input:hover{border-color:var(--primary-color-subdued)}.ui-text-input .input:focus-within{border-color:var(--primary-color)}.ui-text-input .input:focus-within input{opacity:1}.ui-text-input .input:after{content:"";position:absolute;top:5px;right:14px;width:8px;height:17px;border:2px solid rgba(51,181,51,1);border-top:none;border-left:none;transform:rotate(45deg);opacity:0;transition:opacity 80ms ease-in-out;pointer-events:none}.ui-text-input.saved .input:after{opacity:1}.ui-toast{position:fixed;bottom:8px;left:8px;right:8px;padding:6px 12px;font-size:14px;border-radius:4px;transform:translate3d(0,150%,0);opacity:0;transition:all var(--transition-time) ease-in-out;background-color:var(--primary-color-subdued);color:var(--text-color);pointer-events:none}.ui-toast.ui-toast-show{transform:translateZ(0);opacity:1;pointer-events:auto}[data-view=nav-home] .nav-home .section-content,[data-view=nav-cmp-list] .nav-cmp-list .section-content,[data-view=nav-cmp-detail] .nav-cmp-detail .section-content,[data-view=nav-cmp-input] .nav-cmp-input .section-content,[data-view=nav-settings] .nav-settings .section-content{transform:translateZ(0);pointer-events:auto}[data-view=nav-home] .nav-home header,[data-view=nav-home] .nav-home footer,[data-view=nav-cmp-list] .nav-cmp-list header,[data-view=nav-cmp-list] .nav-cmp-list footer,[data-view=nav-cmp-detail] .nav-cmp-detail header,[data-view=nav-cmp-detail] .nav-cmp-detail footer,[data-view=nav-cmp-input] .nav-cmp-input header,[data-view=nav-cmp-input] .nav-cmp-input footer,[data-view=nav-settings] .nav-settings header,[data-view=nav-settings] .nav-settings footer{opacity:1;pointer-events:auto}[data-view=nav-cmp-list] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-home .section-content,[data-view=nav-cmp-input] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-cmp-detail .section-content,[data-view=nav-settings] .nav-home .section-content{transform:translate3d(-105%,0,0)}.cmp-item .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 16.809C20.94 16.561 21 16.289 21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L7.988 3.99001M5.441 5.44801L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L18.544 18.56" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.532 10.538L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.27002 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 3L21 21" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');opacity:.3}.cmp-item.registered .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>');opacity:.8}.search-highlight{background-color:var(--primary-color-alpha);padding:0 2px;border-radius:2px;font-weight:500}.search-container{position:sticky;top:0;z-index:10;padding:12px 16px;background:var(--background-color);border-bottom:1px solid var(--border-color)}.search-input-wrapper{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:12px;color:var(--text-color-secondary);pointer-events:none}.component-search-input{width:100%;height:36px;padding:8px 36px;border:1px solid var(--border-color);border-radius:6px;background:var(--input-background);color:var(--text-color);font-size:14px;transition:border-color .2s,box-shadow .2s}.component-search-input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color-alpha)}.component-search-input::placeholder{color:var(--text-color-tertiary)}.clear-search-button{position:absolute;right:8px;padding:4px;color:var(--text-color-secondary);border:none;background:transparent;border-radius:4px;cursor:pointer;opacity:0;transition:opacity .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.clear-search-button:hover{background-color:var(--hover-color)}.component-search-input:not(:placeholder-shown)+.clear-search-button{opacity:1}.no-results{padding:32px 16px;text-align:center;color:var(--text-color-secondary);font-size:14px}#cmp-detail{position:relative}.cmp-loading{pointer-events:none!important}.cmp-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.cmp-loading .cmp-loading-icon{opacity:.5}.cmp-cover{position:absolute;top:160px;left:0;width:100%;height:100vh;background:var(--background-color);transform:translateZ(0);pointer-events:none;display:none}[data-view=nav-cmp-detail] .cmp-cover{display:block;pointer-events:auto}.cmp-enabled .cmp-cover{transform:translate3d(0,105%,0);pointer-events:none}.section-ready .cmp-cover{transition:all var(--transition-time) ease-in-out}.cmp-detail-inputs-container{margin:8px 0 16px;padding:0}.cmp-detail-inputs-container h3{margin:0 0 6px;padding-left:16px;padding-right:8px;font-size:14px;font-weight:500;display:flex;justify-content:space-between;align-items:center}.cmp-detail-inputs-reload{font-weight:300;font-size:.9em;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmp-detail-inputs-reload:hover{text-decoration:underline;color:var(--primary-color)}.cmp-detail-inputs-container .cmp-inputs-empty{padding:0;margin-top:12px;font-size:12px;font-weight:300;opacity:.5;font-style:italic}.cmp-detail-inputs-container .nav-list-item-icon{opacity:.8;background-size:20px 20px;background-position:4px center}.input-icon{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path></svg>')}.input-icon-array{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-6a2 2 0 1 1 4 0v6"></path> <path d="M10 13h4"></path></svg>')}.input-icon-boolean{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16h2a2 2 0 1 0 0 -4h-2h2a2 2 0 1 0 0 -4h-2v8z"></path></svg>')}.input-icon-number{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-8l4 8v-8"></path></svg>')}.input-icon-object{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"></path></svg>')}.input-icon-string{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"></path></svg>')}.cmp-input-item-unregistered{opacity:.4}.cmp-input-item-unregistered .input-icon:after{content:"";position:absolute;top:11px;left:4px;width:20px;height:2px;background-color:#000;transform:rotate(-45deg)}.cmp-prop-info{border-bottom:1px solid var(--border-color)}.cmp-input-readonly{margin:16px 0;padding:0 16px;display:grid;grid-template-columns:50% 50%;gap:12px}.cmp-input-readonly h3{margin:0;font-size:14px;font-weight:500}.cmp-input-readonly span{margin-top:2px;font-size:12px;font-weight:300;opacity:.8}.cmp-input-detail{margin:16px 0}.cmp-input-detail a{color:var(--primary-color);text-decoration:none}.cmp-input-detail a:hover{text-decoration:underline}.input-cover{position:absolute;top:175px;left:0;width:100%;height:100%;background:var(--background-color);transform:translateZ(0);transition:all var(--transition-time) ease-in-out;pointer-events:auto}.input-enabled .input-cover{transform:translate3d(0,105%,0);pointer-events:none}.input-loading-icon{position:absolute;display:inline-block;top:190px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.input-loading .input-loading-icon{opacity:.5}:host{position:fixed;inset:0;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}aside{position:absolute;top:0;right:0;width:var(--menu-width);height:100%;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;background:var(--background-color);box-shadow:#000000c9 5px 0 20px;overflow:hidden;z-index:1}:host(.show-builder-menu) aside{pointer-events:auto;transform:translateZ(0)}#hit{position:absolute;inset:0;display:none}:host(.show-builder-menu) #hit{display:block;pointer-events:auto}#version{position:absolute;bottom:6px;right:6px;font-size:8px;color:#9b9b9b}</style><div id="hit"></div> <aside data-view="nav-home"> <section class="nav-home"> <header> <svg class="builder-logo" viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> <div> <h2 class="builder-home-title">Builder Devtools</h2> <p><button id="go-to-builder">Go to Builder</button></p> </div> <button id="close" aria-label="Close Menu"> <svg viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg> </button> </header> <div class="section-content"> <ul class="list"> <li> <button id="components-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Components</span> </button> </li> <li> <button id="settings-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M10.325 4.317C10.751 2.561 13.249 2.561 13.675 4.317C13.7389 4.5808 13.8642 4.82578 14.0407 5.032C14.2172 5.23822 14.4399 5.39985 14.6907 5.50375C14.9414 5.60764 15.2132 5.65085 15.4838 5.62987C15.7544 5.60889 16.0162 5.5243 16.248 5.383C17.791 4.443 19.558 6.209 18.618 7.753C18.4769 7.98466 18.3924 8.24634 18.3715 8.51677C18.3506 8.78721 18.3938 9.05877 18.4975 9.30938C18.6013 9.55999 18.7627 9.78258 18.9687 9.95905C19.1747 10.1355 19.4194 10.2609 19.683 10.325C21.439 10.751 21.439 13.249 19.683 13.675C19.4192 13.7389 19.1742 13.8642 18.968 14.0407C18.7618 14.2172 18.6001 14.4399 18.4963 14.6907C18.3924 14.9414 18.3491 15.2132 18.3701 15.4838C18.3911 15.7544 18.4757 16.0162 18.617 16.248C19.557 17.791 17.791 19.558 16.247 18.618C16.0153 18.4769 15.7537 18.3924 15.4832 18.3715C15.2128 18.3506 14.9412 18.3938 14.6906 18.4975C14.44 18.6013 14.2174 18.7627 14.0409 18.9687C13.8645 19.1747 13.7391 19.4194 13.675 19.683C13.249 21.439 10.751 21.439 10.325 19.683C10.2611 19.4192 10.1358 19.1742 9.95929 18.968C9.7828 18.7618 9.56011 18.6001 9.30935 18.4963C9.05859 18.3924 8.78683 18.3491 8.51621 18.3701C8.24559 18.3911 7.98375 18.4757 7.752 18.617C6.209 19.557 4.442 17.791 5.382 16.247C5.5231 16.0153 5.60755 15.7537 5.62848 15.4832C5.64942 15.2128 5.60624 14.9412 5.50247 14.6906C5.3987 14.44 5.23726 14.2174 5.03127 14.0409C4.82529 13.8645 4.58056 13.7391 4.317 13.675C2.561 13.249 2.561 10.751 4.317 10.325C4.5808 10.2611 4.82578 10.1358 5.032 9.95929C5.23822 9.7828 5.39985 9.56011 5.50375 9.30935C5.60764 9.05859 5.65085 8.78683 5.62987 8.51621C5.60889 8.24559 5.5243 7.98375 5.383 7.752C4.443 6.209 6.209 4.442 7.753 5.382C8.753 5.99 10.049 5.452 10.325 4.317Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Settings</span> </button> </li> <li> <button id="add-page-link"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /> <path d="M12 11l0 6" /> <path d="M9 14l6 0" /> </svg> <span>Add Builder Page</span> </button> </li> <li> <button id="import-from-figma"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-figma" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M15 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M6 3m0 3a3 3 0 0 1 3 -3h6a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-6a3 3 0 0 1 -3 -3z" /> <path d="M9 9a3 3 0 0 0 0 6h3m-3 0a3 3 0 1 0 3 3v-15" /> </svg> <span>Import From Figma</span> </button> </li> </ul> </div> <footer> <ul class="list"> <li> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdqZcJpRtm_Ia5DTHP6SDY9Xa6LID3KiTjRWkjMzWyJRUtSHw/viewform" target="_blank" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.013 17.0114L10.013 18.0114L2.513 10.5834C2.0183 10.102 1.62864 9.52342 1.36854 8.88404C1.10845 8.24466 0.983558 7.55836 1.00173 6.86834C1.01991 6.17832 1.18076 5.49954 1.47415 4.87474C1.76755 4.24994 2.18713 3.69266 2.70648 3.23799C3.22583 2.78331 3.8337 2.4411 4.49181 2.23289C5.14991 2.02468 5.844 1.95499 6.53036 2.02821C7.21673 2.10143 7.8805 2.31596 8.47987 2.65831C9.07925 3.00066 9.60124 3.46341 10.013 4.01741C10.8086 2.95654 11.9931 2.2552 13.3059 2.06766C14.6186 1.88012 15.9521 2.22176 17.013 3.01741C18.0739 3.81306 18.7752 4.99755 18.9627 6.3103C19.1503 7.62305 18.8086 8.95654 18.013 10.0174" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M18.2006 19.8175L16.0286 20.9555C15.9642 20.989 15.8917 21.004 15.8192 20.9987C15.7467 20.9934 15.6771 20.9681 15.6182 20.9256C15.5593 20.8831 15.5134 20.825 15.4855 20.7579C15.4577 20.6907 15.4491 20.6172 15.4606 20.5455L15.8756 18.1345L14.1186 16.4275C14.0662 16.3768 14.0291 16.3123 14.0115 16.2416C13.9939 16.1708 13.9966 16.0965 14.0192 16.0271C14.0418 15.9578 14.0835 15.8962 14.1394 15.8494C14.1954 15.8026 14.2634 15.7725 14.3356 15.7625L16.7636 15.4105L17.8496 13.2175C17.8821 13.1521 17.9322 13.0972 17.9942 13.0588C18.0562 13.0204 18.1277 13 18.2006 13C18.2736 13 18.3451 13.0204 18.4071 13.0588C18.4691 13.0972 18.5191 13.1521 18.5516 13.2175L19.6376 15.4105L22.0656 15.7625C22.1377 15.7728 22.2054 15.8031 22.2611 15.85C22.3168 15.8968 22.3583 15.9583 22.3809 16.0275C22.4034 16.0967 22.4062 16.1708 22.3888 16.2415C22.3715 16.3122 22.3347 16.3766 22.2826 16.4275L20.5256 18.1345L20.9396 20.5445C20.9521 20.6163 20.9441 20.6902 20.9166 20.7578C20.8891 20.8254 20.8433 20.8839 20.7842 20.9267C20.7252 20.9695 20.6553 20.9949 20.5825 21C20.5098 21.005 20.4371 20.9896 20.3726 20.9555L18.2006 19.8175Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Give Feedback</span> </a> </li> </ul> <div id="version"></div> </footer> </section> <section class="nav-cmp-list"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div class="search-container"> <div class="search-input-wrapper"> <svg class="search-icon" viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M15.5 15.5L20 20M10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17Z" /> </svg> <input type="text" id="component-search" class="component-search-input" placeholder="Search components..." autocomplete="off" spellcheck="false" /> <button id="clear-search" class="clear-search-button" type="button" aria-label="Clear search" > <svg viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M6 6l12 12M6 18L18 6" /> </svg> </button> </div> </div> <div> <h2>Custom Components</h2> <p> <button id="open-builder-registry"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-list" class="cmp-list nav-list"></div> </div> <div class="nav-loading-icon spinner"></div> <footer> <p class="info"> Expand on Builder's selection of built-in blocks by <a target="_blank" href="https://www.builder.io/c/docs/custom-components-intro" >registering components</a > from your codebase. This way, teammates can drag and drop your components within Builder's Visual Editor just like any other block. </p> </footer> </section> <section class="nav-cmp-detail"> <header> <button class="back-button" data-back="nav-cmp-list"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-detail-title"></h2> <p> <button id="cmp-open-source"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-error"></div> <label class="ui-switch"> <div> <h3>Register Component</h3> <p> Registers this component so it can be used within Builder Visual CMS </p> </div> <input type="checkbox" role="switch" id="cmp-register" /> <span class="switcher"></span> </label> <div id="cmp-detail"> <label class="ui-text-input"> <h3>Component Name</h3> <div class="input"> <input type="text" id="cmp-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="2" maxlength="30" required placeholder="e.g. My Counter" /> </div> <p> Unique name to identify this custom component within Builder. Press ESC to cancel </p> </label> <div class="cmp-detail-inputs-container"> <h3> <span>Builder Inputs (Props)</span> <button class="cmp-detail-inputs-reload" id="btn-inputs-reload"> Reload </button> </h3> <div id="cmp-detail-inputs"></div> </div> </div> </div> <div class="cmp-cover"></div> <div class="cmp-loading-icon spinner"></div> </section> <section class="nav-cmp-input"> <header> <button class="back-button" data-back="nav-cmp-detail"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-input-title"></h2> <p> <button id="input-open-source"></button> </p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable Input</h3> <p>Add this component prop as a Builder input</p> </div> <input type="checkbox" role="switch" id="input-register" /> <span class="switcher"></span> </label> <div class="cmp-prop-info"> <div class="cmp-input-readonly"> <h3>Prop Name</h3> <span id="cmp-prop-name"></span> </div> <div class="cmp-input-readonly"> <h3>Prop Type</h3> <span id="cmp-prop-type"></span> </div> </div> <div class="cmp-input-detail"> <label class="ui-text-input"> <h3>Builder Input Name</h3> <div class="input"> <input type="text" id="input-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="1" maxlength="30" required placeholder="e.g. Text" /> </div> <p> Friendly name to identify this component prop as a Builder input. Press ESC to cancel </p> </label> <label class="ui-select"> <h3>Builder Input Type</h3> <div class="select"> <select id="input-type"></select> </div> <p> Correlate to what editing UI is appropriate for this Builder input. <a href="https://www.builder.io/c/docs/custom-components-input-types" target="_blank" >Read more about input types.</a > </p> </label> </div> <div class="input-cover"></div> <div class="input-loading-icon spinner"></div> </div> </section> <section class="nav-settings"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2>Settings</h2> <p>Configure Builder's Devtools</p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable edit button in UI</h3> <p>Enables the edit button so you can edit content in Builder</p> </div> <input type="checkbox" role="switch" id="enable-edit" /> <span class="switcher"></span> </label> </div> </section> <div class="ui-toast" id="toast"></div> </aside> <button class="menu-toggle" aria-label="Toggle Builder Devtools"> <div> <div class="highlight-bg"></div> <svg viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> </div> </button>\`,ai(e),ui(e),oi(e),ri(e),ti(e),ci(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.16.1"}highlightOpener(){let e=this.shadowRoot.querySelector(".menu-toggle");e.classList.add("menu-toggle-highlight"),e.classList.add("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight")},20)},20)}};var lo=\`<style>*,*:before,*:after{box-sizing:border-box}html,body,:host{position:fixed;top:0;left:0;width:100%;height:100vh;z-index:2147483646;margin:0;padding:0;line-height:1.8;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";background-color:#252525;color:#fff;transition:opacity .25s ease-in-out}:host([aria-hidden="true"]){opacity:0;pointer-events:none}main{position:absolute;top:0;left:0;width:100%;height:100vh}h1{margin-top:0;font-size:24px;font-weight:300;line-height:1.4}p{margin:20px 0;font-weight:300}button{cursor:pointer}aside{position:absolute;top:0;left:0;width:350px;height:100vh;padding:60px 0 0 50px;background-color:#121212}aside ul{margin:30px 0 0;padding:0;list-style:none}aside li{position:relative;margin:0;padding:20px 10px;font-weight:300}aside li.highlight{color:#48a1ff}aside li.active{font-weight:700}aside li .circle{position:absolute;top:20px;left:10px;width:24px;height:24px;border:3px solid white;border-radius:50%;font-size:14px}aside li.highlight .circle{border-color:#48a1ff}aside li.active .circle:after{content:"";position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background-color:#48a1ff}aside li.completed .circle{background-color:#48a1ff}aside li.completed .circle:after{content:"";position:absolute;top:2px;left:6px;width:6px;height:13px;border:3px solid black;border-top:none;border-left:none;transform:rotate(45deg)}aside li .line{position:absolute;top:44px;left:21px;width:3px;height:45px;background-color:#fff}aside li.completed .line{background-color:#48a1ff}aside li span{display:block;margin-left:44px}nav{margin-top:30px}section{position:absolute;top:135px;left:350px;padding:0 80px 0 140px;transition:opacity .15s ease-in-out}section[aria-hidden=true]{pointer-events:none;opacity:0}section h1,section p{min-width:300px;max-width:600px}.button{position:relative;display:inline-block;color:#fff;background-color:#48a1ff;border-radius:4px;text-decoration:none;padding:10px 40px 10px 20px;white-space:nowrap}.button:hover{background-color:#48a1ffd9}#button-icon{position:absolute;top:1px;right:5px;bottom:0;width:30px;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="white" stroke-linecap="square" stroke-miterlimit="10" stroke-width="48" d="M184 112l144 144-144 144"/></svg>');background-repeat:no-repeat;background-position:center;background-size:24px 24px}.button[aria-disabled=true]{opacity:.9;background-color:#ffffff4d;pointer-events:none;padding-right:60px}.button[aria-disabled=true] #button-icon{top:21px;right:29px;width:8px;height:8px;border-radius:4px;background:#fff;color:#fff;animation:dot-flashing .5s infinite linear alternate;animation-delay:.25s}.button[aria-disabled=true] #button-icon:before,.button[aria-disabled=true] #button-icon:after{content:"";display:inline-block;position:absolute;top:0}.button[aria-disabled=true] #button-icon:before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:0s}.button[aria-disabled=true] #button-icon:after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:.5s}@keyframes dot-flashing{0%{background-color:#fff}50%,to{background-color:#ffffff4d}}.logo{margin-left:9px;background:url('data:image/svg+xml,<svg viewBox="0 0 150 32" fill="none" xmlns="http://www.w3.org/2000/svg" > <g clip-path="url(%23clip0_4_304)"> <path d="M27.9858 8.99927C27.9872 10.3415 27.688 11.667 27.1101 12.8783C26.5321 14.0896 25.6902 15.156 24.6462 15.9989V15.9989L0.634502 2.36355C0.542657 2.31119 0.457444 2.24796 0.380701 2.17523C0.260289 2.05715 0.164605 1.91624 0.0992389 1.76075C0.0338732 1.60525 0.000136546 1.43828 0 1.26959C0 0.932873 0.133698 0.609948 0.371683 0.371854C0.609667 0.13376 0.932443 0 1.269 0L18.9906 0C21.3763 0 23.6642 0.948135 25.3512 2.63583C27.0381 4.32352 27.9858 6.61252 27.9858 8.99927V8.99927Z" fill="%2318B4F4" /> <path d="M27.9858 22.9986C27.9861 24.1806 27.7536 25.351 27.3017 26.4431C26.8498 27.5352 26.1873 28.5275 25.352 29.3634C24.5167 30.1993 23.5249 30.8624 22.4335 31.3147C21.342 31.7671 20.1721 32 18.9907 32H1.26906C1.01802 31.9973 0.77343 31.9202 0.566221 31.7784C0.359012 31.6366 0.198499 31.4364 0.104989 31.2034C0.0114791 30.9703 -0.0108254 30.7147 0.0408974 30.4689C0.0926201 30.2231 0.216046 29.9982 0.395559 29.8226V29.8226C0.467112 29.7508 0.547407 29.6882 0.634555 29.6364L10.0844 24.2703L24.6441 16.001C25.688 16.8438 26.53 17.9097 27.1083 19.1206C27.6866 20.3315 27.9864 21.6566 27.9858 22.9986V22.9986Z" fill="%23FD6B3C" /> <path d="M24.6461 15.9989L10.0843 24.2703L0.634458 29.6365C0.54372 29.6868 0.459841 29.7487 0.384888 29.8205C3.98804 26.1233 6.00266 21.1627 5.99812 15.9989C6.0049 10.8346 3.99085 5.87268 0.387003 2.17523C0.463746 2.24796 0.548959 2.31119 0.640803 2.36355L24.6461 15.9989Z" fill="%23A97FF2" /> <path d="M47.6659 11.7352C51.8177 11.7352 54.1632 15.0531 54.1632 19.0714C54.1632 23.0896 51.8177 26.3821 47.6659 26.3821C45.5086 26.3821 43.8589 25.5188 42.9473 24.0545L42.5709 26.052H39.9736V6.77115H43.1884V13.8914C43.971 12.6959 45.5086 11.7352 47.6659 11.7352ZM47.0187 23.5488C49.4446 23.5488 50.9547 21.5809 50.9547 19.0714C50.9547 16.5089 49.4446 14.5664 47.0187 14.5664C44.5928 14.5664 43.0806 16.5047 43.0806 19.0714C43.0806 21.583 44.5653 23.5488 47.0187 23.5488V23.5488Z" fill="white" /> <path d="M65.4595 20.2859V12.0611H68.668V20.123C68.668 23.7202 67.0246 26.3821 62.4943 26.3821C57.9639 26.3821 56.3206 23.7117 56.3206 20.123V12.0611H59.529V20.2859C59.529 22.4696 60.5527 23.5488 62.49 23.5488C64.4274 23.5488 65.4595 22.4696 65.4595 20.2859Z" fill="white" /> <path d="M71.2355 7.74451C71.2247 7.46284 71.2724 7.18199 71.3755 6.91968C71.4787 6.65737 71.6351 6.41929 71.8348 6.22047C72.0345 6.02165 72.2732 5.8664 72.5359 5.76452C72.7986 5.66264 73.0796 5.61633 73.3611 5.62853C74.5793 5.62853 75.4571 6.50666 75.4571 7.75509C75.4571 9.00352 74.5793 9.8224 73.3611 9.8224C72.1428 9.8224 71.2355 8.9612 71.2355 7.74451Z" fill="white" /> <path d="M128.476 7.74451C128.465 7.46376 128.513 7.18383 128.615 6.92227C128.718 6.66071 128.873 6.42315 129.072 6.22449C129.27 6.02583 129.508 5.87035 129.769 5.7678C130.031 5.66524 130.31 5.61783 130.591 5.62852C131.809 5.62852 132.687 6.50666 132.687 7.75509C132.687 9.00352 131.809 9.8224 130.591 9.8224C129.373 9.8224 128.476 8.9612 128.476 7.74451Z" fill="white" /> <path d="M122.302 24.1031C122.291 23.8223 122.339 23.5422 122.441 23.2805C122.543 23.0188 122.699 22.7811 122.897 22.5824C123.096 22.3837 123.334 22.2282 123.595 22.1258C123.857 22.0233 124.137 21.9761 124.417 21.9872C125.636 21.9872 126.513 22.8653 126.513 24.1031C126.513 25.341 125.636 26.1726 124.417 26.1726C123.199 26.1726 122.302 25.3219 122.302 24.1031Z" fill="white" /> <path d="M74.9516 12.059H71.7432V26.0583H74.9516V12.059Z" fill="white" /> <path d="M78.16 26.0583V6.77115H81.3685V26.0626L78.16 26.0583Z" fill="white" /> <path d="M94.6063 6.77115H97.8148V26.0626H95.2239L94.8474 24.0651C93.9591 25.523 92.3094 26.3927 90.131 26.3927C86.0046 26.3927 83.6591 23.0748 83.6591 19.0819C83.6591 15.0891 86.0046 11.7458 90.131 11.7458C92.3137 11.7458 93.8238 12.7149 94.6063 13.902V6.77115ZM90.7993 14.5707C88.3734 14.5707 86.8633 16.5131 86.8633 19.0756C86.8633 21.5851 88.3734 23.553 90.7993 23.553C93.2252 23.553 94.7354 21.5851 94.7354 19.0756C94.7396 16.5047 93.257 14.5664 90.8036 14.5664L90.7993 14.5707Z" fill="white" /> <path d="M113.479 22.2284C112.482 24.7359 110.162 26.3821 107.117 26.3821C102.887 26.3821 100.137 23.225 100.137 19.0439C100.137 14.9706 102.942 11.7353 107.093 11.7353C111.245 11.7353 113.969 14.8902 113.969 18.991C113.982 19.3255 113.953 19.6604 113.883 19.9876H103.288C103.53 22.2009 104.959 23.6292 107.197 23.6292C108.735 23.6292 110.001 22.8738 110.594 21.473L113.479 22.2284ZM103.341 17.6156H110.784C110.513 15.6731 109.166 14.3506 107.089 14.3506C105.012 14.3506 103.665 15.7006 103.341 17.6156V17.6156Z" fill="white" /> <path d="M123.779 14.9452C123.538 14.9117 123.295 14.8933 123.051 14.8902C120.786 14.8902 119.439 16.0772 119.439 18.7751V26.0583H116.23V12.0611H118.821L119.195 14.0014C119.707 13.1127 120.887 11.9257 123.322 11.9257C123.455 11.9257 123.779 11.9532 123.779 11.9532V14.9452Z" fill="white" /> <path d="M132.192 12.059H128.984V26.0583H132.192V12.059Z" fill="white" /> <path d="M134.483 19.0714C134.483 15.1335 137.287 11.7353 141.735 11.7353C146.183 11.7353 149.015 15.1335 149.015 19.0714C149.015 23.0092 146.213 26.3821 141.735 26.3821C137.258 26.3821 134.483 23.0092 134.483 19.0714ZM141.735 23.5488C144.083 23.5488 145.806 21.7692 145.806 19.0714C145.806 16.3735 144.083 14.5664 141.735 14.5664C139.387 14.5664 137.687 16.346 137.687 19.0714C137.687 21.7968 139.417 23.5488 141.735 23.5488V23.5488Z" fill="white" /> </g> <defs> <clipPath id="clip0_4_304"> <rect width="149.015" height="32" fill="white" /> </clipPath> </defs> </svg>');background-repeat:no-repeat;width:150px;height:32px}@media (max-width: 840px){aside{width:250px;padding:60px 0 0 20px}section{left:250px;padding:0 80px}}@media (max-width: 590px){aside{width:230px;padding:60px 0 0 10px}section{left:230px;padding:0 40px}}#modified-files-message a{color:#cbcbcb;font-weight:300;text-decoration:underline}#modified-files-message a:hover{color:#fff;text-decoration:none}#restart-warning{border-radius:4px;padding:8px 16px;border:1px solid #fd6b3c;background:#fd6b3c1a}#react-router-steps{margin:0 0 5px;padding:0 20px}#need-help{color:#48a1ff;text-decoration:none}#router-message{border-radius:4px;padding:16px;border:1px solid #48a1ff}#router-finish-button{margin-top:12px}#router-checkbox-div{display:flex;align-items:center}#router-checkbox{margin-right:10px;width:15px;height:15px}#success-title{display:flex;align-items:center;gap:10px}#success-title .check-icon{display:inline-block;width:24px;height:24px;border:2px solid #28a745;border-radius:50%;position:relative}#success-title .check-icon:before{content:"";position:absolute;top:50%;left:50%;width:6px;height:12px;border:solid #28a745;border-width:0 2px 2px 0;transform:translate(-50%,-60%) rotate(45deg)}
|
|
1248
1248
|
</style>\`,Dt=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=lo+\`<main>
|
|
1249
1249
|
<aside>
|
|
1250
1250
|
<div class="logo"></div>
|
|
@@ -1283,7 +1283,7 @@ Restarting server after Builder Devtools update...
|
|
|
1283
1283
|
</nav>
|
|
1284
1284
|
</section>
|
|
1285
1285
|
</main>
|
|
1286
|
-
\`,po();let r=new URL(Vr,ot);r.searchParams.set(Mr,location.href);let n=e.querySelectorAll(".next-step");for(let i of n)i.setAttribute("href",r.href);ye("overview step viewed")}},po=()=>{let t=document.head.querySelector("link[rel='icon'], link[rel='icon shortcut']");t?(t.href="https://cdn.builder.io/favicon.ico",t.removeAttribute("type")):(t=document.createElement("link"),t.rel="icon",t.href="https://cdn.builder.io/favicon.ico",document.head.appendChild(t))};var li=async()=>{(await qr()).isValid||fo()},fo=()=>{customElements.get("builder-dev-tools-overview")||customElements.define("builder-dev-tools-overview",Dt);let t=document.querySelector("builder-dev-tools-overview");t||(t=document.createElement("builder-dev-tools-overview"),t.setAttribute("aria-hidden","true"),document.body.appendChild(t)),setTimeout(()=>{t.removeAttribute("aria-hidden")},32)};var mo=()=>{try{customElements.get("builder-dev-tools-edit")||customElements.define("builder-dev-tools-edit",st),customElements.get("builder-dev-tools-menu")||customElements.define("builder-dev-tools-menu",At);let t=document.querySelector("builder-dev-tools-menu");t||(t=document.createElement("builder-dev-tools-menu"),t.setAttribute("data-version","1.
|
|
1286
|
+
\`,po();let r=new URL(Vr,ot);r.searchParams.set(Mr,location.href);let n=e.querySelectorAll(".next-step");for(let i of n)i.setAttribute("href",r.href);ye("overview step viewed")}},po=()=>{let t=document.head.querySelector("link[rel='icon'], link[rel='icon shortcut']");t?(t.href="https://cdn.builder.io/favicon.ico",t.removeAttribute("type")):(t=document.createElement("link"),t.rel="icon",t.href="https://cdn.builder.io/favicon.ico",document.head.appendChild(t))};var li=async()=>{(await qr()).isValid||fo()},fo=()=>{customElements.get("builder-dev-tools-overview")||customElements.define("builder-dev-tools-overview",Dt);let t=document.querySelector("builder-dev-tools-overview");t||(t=document.createElement("builder-dev-tools-overview"),t.setAttribute("aria-hidden","true"),document.body.appendChild(t)),setTimeout(()=>{t.removeAttribute("aria-hidden")},32)};var mo=()=>{try{customElements.get("builder-dev-tools-edit")||customElements.define("builder-dev-tools-edit",st),customElements.get("builder-dev-tools-menu")||customElements.define("builder-dev-tools-menu",At);let t=document.querySelector("builder-dev-tools-menu");t||(t=document.createElement("builder-dev-tools-menu"),t.setAttribute("data-version","1.16.1"),document.body.appendChild(t));let e=document.querySelector("builder-dev-tools-edit");e||(e=document.createElement("builder-dev-tools-edit"),document.body.appendChild(e));let r=document.getElementById("builder-dev-tools-style");r||(r=document.createElement("style"),r.id="builder-dev-tools-style",r.innerHTML=".builder-no-scroll{overflow:hidden !important}",document.head.appendChild(r)),li(),Jn()}catch(t){console.error("Builder Devtools:",t)}};window.location===window.parent.location&&(console.debug("Builder.io Devtools v1.16.1"),mo());})();`)}async function P6(t){return A6(t,`<!doctype html>
|
|
1287
1287
|
<html lang="en" dir="ltr">
|
|
1288
1288
|
<head>
|
|
1289
1289
|
<meta charset="utf-8" />
|
|
@@ -1858,9 +1858,9 @@ ${E.join(`
|
|
|
1858
1858
|
|
|
1859
1859
|
`+e.userPrompt,files:Array.from(new Set([...t.files??[],...e.files??[]])),includeBaseFiles:t.includeBaseFiles,skipSearch:e.skipSearch}}function wDe(){let t=setInterval(()=>{},1073741824);return()=>clearInterval(t)}function SDe(t){let e=t.trim().split(/\s+/).filter(Boolean),r=Number.parseInt(e[0]??"",10),n=Number.parseInt(e[1]??"",10);return{ahead:Number.isFinite(r)?r:0,behind:Number.isFinite(n)?n:0}}function TDe(t,e){let r=[];function n(i){let s=r.findIndex(o=>o.key===i.key);s>=0?r[s]=i:r.push(i)}for(let i of t)n(i);for(let i of e)n(i);return r}function PDe(t){return typeof t=="boolean"?{pullFirst:t}:t}function bm(t){if(t instanceof Error){let e=`${t.message}`;return t.cause instanceof Error&&(e+=`
|
|
1860
1860
|
=======
|
|
1861
|
-
`,e+=bm(t.cause)),e}return String(t)}var Eb,vm,hq,Cb,KT,gq,uq,fDe,uo,xDe,mp,Xc=N(()=>{"use strict";h();up();f$();nn();yi();Pn();Hr();Eb=Y(require("node:os"),1),vm=Y(require("node:fs"),1);h$();g$();gi();lv();mv();hq=Y(require("prettier"),1);i5();Yt();Cb=Y(require("node:events"),1);Td();Pv();KT=require("node:crypto");Rv();p5();o1();hv();wy();ZU();Xf();eq();gq=require("node:fs/promises");rq();HT();i1();kv();uq=["ask-to-continue","credits-limit-daily","credits-limit-monthly","credits-limit-other","invalid-last-message"],fDe=["initial-with-url","initial-without-url","success"],uo=class{#
|
|
1861
|
+
`,e+=bm(t.cause)),e}return String(t)}var Eb,vm,hq,Cb,KT,gq,uq,fDe,uo,xDe,mp,Xc=N(()=>{"use strict";h();up();f$();nn();yi();Pn();Hr();Eb=Y(require("node:os"),1),vm=Y(require("node:fs"),1);h$();g$();gi();lv();mv();hq=Y(require("prettier"),1);i5();Yt();Cb=Y(require("node:events"),1);Td();Pv();KT=require("node:crypto");Rv();p5();o1();hv();wy();ZU();Xf();eq();gq=require("node:fs/promises");rq();HT();i1();kv();uq=["ask-to-continue","credits-limit-daily","credits-limit-monthly","credits-limit-other","invalid-last-message"],fDe=["initial-with-url","initial-without-url","success"],uo=class{#p;#h;#x;#c;#g;#e;#u;#X;#U;#T;#o=!1;#r=new Cb.default;#q;#N;#R;#z=void 0;#Q=void 0;#re=Promise.resolve(void 0);#y=[];#D;#O;#G=new Map;#ne=[];#P;#me=0;#B;#v;#t;#Z;#M;#L=void 0;#ee;#s;#l;#f;#ie;#i;#se;#A;#H=0;#_;#a;#n;#E;#V;#oe;#K=!1;#W=!1;#ae=0;#F=0;#$=!1;#m=[];#j;#te=new Set;#d=new Map;constructor(e){if(this.#e=e.sys,this.#oe=e.modelOverride,this.#u=e.credentials,"initialUrl"in e){let n=xDe(e.initialUrl).id;n?this.#v=n:this.#X=e.initialUrl}"sessionOrCompletionId"in e?this.#v=e.sessionOrCompletionId:this.#v=e.fusionConfig?.sessionId;let r=e.workingDirectory??e.fusionConfig?.workingDirectory;if(this.#s=r?e.sys.resolve(e.sys.cwd(),r):e.sys.getCwdDir(),this.#U=e.position,this.#q=e.mode,this.#D=e.privacyMode,this.#t=e.fusionContext,this.#n=e.fusionConfig,this.#E=e.fusionConfig?.projectId,this.#V=e.fusionConfig?.branchName,this.#N=e.fusionConfig?.featureBranch,this.#R=e.fusionConfig?.aiBranch,e.enabledTools?this.#a=e.enabledTools:this.#q==="quality-v3"?(this.#a=["write_file","search_replace_file","view_path","get_rule","get_style_inspiration","grep_search","web_search","find_media"],process.platform==="win32"?this.#a.push("powershell"):this.#a.push("bash"),e.fusionContext?.devServerOrchestrator&&this.#a.push("dev_server_control")):this.#q==="quality-v4"&&(this.#a=["Write","Edit","Read","MultiEdit","Grep","Glob","ReadRule","WebSearch","Agent","TodoRead","TodoWrite","FindMedia","Memory"],process.platform==="win32"?this.#a.push("PowerShell"):this.#a.push("Bash"),Db("fusion-webfetch-tool")&&this.#a.push("WebFetch"),Db("fusion-disable-todo-tool")&&(this.#a=this.#a.filter(n=>n!=="TodoWrite"&&n!=="TodoRead")),Db("editor-ai-ask-user-tool")&&this.#a.push("AskUser"),e.fusionContext?.git&&(this.#a.push("GetScreenshot"),this.#a.push("Revert")),e.fusionContext?.devServerOrchestrator&&this.#a.push("DevServerControl")),this.#ie=e.maxTokens,this.#ee=e.builtInCustomInstructions??[],this.#i=e.fusionConfig?.workspace,this.#se=e.mcpServers??!1,this.#f=this.#s,this.#l=this.#s,this.#i?.folders.length){let n=this.#i.folders.filter(i=>i.enableGit);if(n.length===1){let i=n[0];this.#l=this.#e.resolve(this.#s,i.path);let s=i.backupMetadata?.check.backup;this.#j=Qf({version:s?.version,originalRepoUrl:s?.repoUrl,commitHash:s?.lastCommitHash})}else n.length>1&&this.#e.Sentry?.captureException(new Error("Multiple git enabled folders found"))}this.#i?.folders[0]&&this.#b()&&(this.#f=this.#e.resolve(this.#s,this.#i.folders[0].path))}get fusionConfig(){return this.#n}get gitEnabledFolder(){return this.#i?.folders.find(e=>e.enableGit)}get workingDirectory(){return this.#s}getSessionMode(){return this.#p?.sessionMode??"normal"}async switchSessionMode(e){let r=this.getSessionContext();r.sessionMode!==e&&(r.sessionMode=e,this.#$=!1,await this.#w())}async setPrivacyMode(e){e&&e.encrypt?!e.encryptKey&&!this.#O?this.#O=await tq():e.encryptKey&&(this.#O=e.encryptKey):this.#O=void 0,this.#D=e}async initializeSession(e={}){return this.#Z||(this.#Z=this.#ye(e)),await this.#Z}async loadHistory(){let e=this.getSessionContext(),r=await VT(this.#e,this.#u,e.sessionId,!1),n=new Set;for(let s of r.turns)s.beforeCommit&&n.add(s.beforeCommit),s.afterCommit&&n.add(s.afterCommit),s.lastCommit&&n.add(s.lastCommit);if(n.size>0)try{let o=(await this.git(["cat-file","--batch-check","--buffer"],{sys:this.#e,cwd:this.#l,stdin:Array.from(n).map(a=>`${a}^{commit}`).join(`
|
|
1862
1862
|
`)})).trim().split(`
|
|
1863
|
-
`);for(let a of o)if(a.includes("missing")){let c=a.split(/\s+/)[0].replace("^{commit}","");n.delete(c)}}catch(s){this.#e.Sentry?.captureException(s)}let i=r.turns.filter(s=>!(s.beforeCommit&&!n.has(s.beforeCommit)||s.afterCommit&&!n.has(s.afterCommit)||s.lastCommit&&!n.has(s.lastCommit)));return{sessionId:e.sessionId,title:e.title,beforeCommit:e.beforeCommit,createdUnixTime:e.createdUnixTime,updatedUnixTime:e.updatedUnixTime,turns:i}}async loadWholeSession(e={}){let{getAll:r=!0}=e,n=this.getSessionContext(),i=0;for(;n.canLoadMore&&n.canLoadMore;){let s=await this.loadMoreTurns();i+=s.length}return{sessionId:n.sessionId,title:n.title,beforeCommit:n.beforeCommit,createdUnixTime:n.createdUnixTime,updatedUnixTime:n.updatedUnixTime,addedTurns:i,turns:r?n.turns:n.turns.slice(0,i)}}async loadMoreTurns(){return this.#M||(this.#M=this.#he().then(e=>(this.#M=void 0,e))),this.#M}async#he(){let e=this.getSessionContext();if(e.canLoadMore){let r=e.turns[0]?.completionId,n=await VT(this.#e,this.#u,e.sessionId,!0,r);return n.turns.length>0&&e.turns.unshift(...n.turns),e.canLoadMore=n.canLoadMore,n.turns}return[]}async#ge(){try{let e=this.#e.join(this.#l,"file.tsx");return await hq.default.resolveConfig(this.#e.join(e,"file.tsx"))}catch{return null}}setCustomInstructions(e){this.#
|
|
1863
|
+
`);for(let a of o)if(a.includes("missing")){let c=a.split(/\s+/)[0].replace("^{commit}","");n.delete(c)}}catch(s){this.#e.Sentry?.captureException(s)}let i=r.turns.filter(s=>!(s.beforeCommit&&!n.has(s.beforeCommit)||s.afterCommit&&!n.has(s.afterCommit)||s.lastCommit&&!n.has(s.lastCommit)));return{sessionId:e.sessionId,title:e.title,beforeCommit:e.beforeCommit,createdUnixTime:e.createdUnixTime,updatedUnixTime:e.updatedUnixTime,turns:i}}async loadWholeSession(e={}){let{getAll:r=!0}=e,n=this.getSessionContext(),i=0;for(;n.canLoadMore&&n.canLoadMore;){let s=await this.loadMoreTurns();i+=s.length}return{sessionId:n.sessionId,title:n.title,beforeCommit:n.beforeCommit,createdUnixTime:n.createdUnixTime,updatedUnixTime:n.updatedUnixTime,addedTurns:i,turns:r?n.turns:n.turns.slice(0,i)}}async loadMoreTurns(){return this.#M||(this.#M=this.#he().then(e=>(this.#M=void 0,e))),this.#M}async#he(){let e=this.getSessionContext();if(e.canLoadMore){let r=e.turns[0]?.completionId,n=await VT(this.#e,this.#u,e.sessionId,!0,r);return n.turns.length>0&&e.turns.unshift(...n.turns),e.canLoadMore=n.canLoadMore,n.turns}return[]}async#ge(){try{let e=this.#e.join(this.#l,"file.tsx");return await hq.default.resolveConfig(this.#e.join(e,"file.tsx"))}catch{return null}}async setCustomInstructions(e){this.#ee=e,this.#p&&(this.#p.customInstructions=await this.#J())}async#J(){return[...await bDe({sys:this.#e,projectDir:this.#s,currentDir:this.#l,rootDir:"/"}),...this.#ee??[]]}async#ye(e){try{if(this.#W)throw new Error("Code session already closed");if(this.#p)throw new Error("Session context already initialized");this.#o&&console.log(`\u{1F4C1} Current AI working directory: ${this.#s}`),await this.setPrivacyMode(this.#D);let r=await this.#be(),n=await this.#ge(),i,s;this.#v||(this.#v=r?.sessionId),this.#v?e.skipSessionLoading?i=this.#v:(s=await VT(this.#e,this.#u,this.#v,!0),i=s.sessionId,this.#o&&console.log("SESSION recovered",i,s.turns.length)):i=(0,KT.randomUUID)(),this.#N||(this.#N=r?.featureBranch?.trim());let o={turns:s?.turns??[],sessionId:i,customInstructions:await this.#J(),title:s?.title,beforeCommit:s?.beforeCommit,createdUnixTime:s?.createdUnixTime??Date.now(),updatedUnixTime:s?.updatedUnixTime??Date.now(),userContext:await WT(this.#e,this.#l),prettierConfig:n,canLoadMore:s?.canLoadMore??!1,state:s?.turns.length?"success":this.#X?"initial-with-url":"initial-without-url",sessionMode:s?.sessionMode??"normal"};if(s){let c=Zo(s.turns);c?.completionId!==s.lastCompletionId&&this.#e.Sentry?.captureException(new Error("Last completion id mismatch"),{tags:{operation:"codegen-initialize-session"},extra:{lastTurn:c,sessionMetadata:s}})}this.#o&&this.#r.on("step",c=>{c.type!=="delta"&&console.log(`Event: ${JSON.stringify(c)}`)}),await this.#De(o),this.#p=o;try{let c=await QU(this.#e,this.#s,this.#n);if(c.length>0){this.#o&&console.log(`\u{1F50C} Initializing ${c.length} local MCP server(s)...`),this.#A=await XU(c,this.#e,this.#s);let u=this.#A.getStatus(),l=Object.values(u).filter(p=>p.status==="ok").length;this.#o&&console.log(`\u2713 Connected to ${l}/${c.length} local MCP server(s)`)}}catch(c){this.#e.Sentry?.captureException(c,{level:"warning",tags:{operation:"local-mcp-init"}}),this.#o&&console.error("Failed to initialize local MCP servers:",c)}let a=this.#t?.devServerOrchestrator;if(a){let c=g=>{this.#r.emit("step",{type:"dev-server",devServerState:a.devState,setupState:g,httpServerState:a.httpServerState,devCommand:a.devCommand,setupCommand:a.setupCommand,proxyServer:a.proxyTarget}),this.#w()},u=g=>{this.#r.emit("step",{type:"dev-server",devServerState:g,setupState:a.setupState,httpServerState:a.httpServerState,devCommand:a.devCommand,setupCommand:a.setupCommand,proxyServer:a.proxyTarget}),this.#w()},l=g=>{this.#r.emit("step",{type:"dev-server",devServerState:a.devState,setupState:a.setupState,httpServerState:g,devCommand:a.devCommand,setupCommand:a.setupCommand,proxyServer:a.proxyTarget}),g==="ok-2xx"&&this.requestRefresh(),this.#w()},p=g=>{this.#r.emit("step",{type:"stdio",id:"devServer",command:a.devCommand,stream:"stdout",source:"run-command",content:g})},d=g=>{this.#r.emit("step",{type:"stdio",id:"devServer",command:a.devCommand,stream:"stderr",source:"run-command",content:g})},f=g=>{this.#r.emit("step",{type:"stdio",id:"setupCommand",command:a.setupCommand??"",stream:"stdout",source:"setup-command",content:g})},m=g=>{this.#r.emit("step",{type:"stdio",id:"setupCommand",command:a.setupCommand??"",stream:"stderr",source:"setup-command",content:g})};a.emitter.on("setupState",c),a.emitter.on("devState",u),a.emitter.on("httpServerState",l),a.emitter.on("stdout",p),a.emitter.on("stderr",d),a.emitter.on("installStdout",f),a.emitter.on("installStderr",m),this.#ne.push(()=>{a.emitter.off("setupState",c),a.emitter.off("devState",u),a.emitter.off("httpServerState",l),a.emitter.off("stdout",p),a.emitter.off("stderr",d),a.emitter.off("installStdout",f),a.emitter.off("installStderr",m)})}}catch(r){throw console.error(r),this.#e.Sentry?.captureException(r,{tags:{operation:"codegen-initialize-session"}}),r}}async#ve(e){let r=this.#t?.devServerOrchestrator;if(!r)return;let n=r.setupState;if(n==="installing")return;await r.waitUntilIdle(500,500);let i=await this.#k(),s=r.devCommand,o=r.devState,a=r.state,c=r.setupCommand,u=await r.getOpenPorts(),l=r.proxyTarget,p=r.proxyPort,d=r.httpServerState,f=d==="error-fetch",m=!1;this.#t?.git&&(m=await this.getCurrentBranch()!==this.getAiBranch());let g=d==="error-5xx"||d==="error-4xx",y="",v=!1;a==="install-failed"||a==="install-aborted"?y=r.getSetupOutput():(y=r.getCheckpoints(1,o!=="running"?"err":"all"),v=CDe(y??""));let D="",E="",x="error",b="Try to fix",C="repair-unknown";if(a==="not-installed"||a==="install-failed"||a==="install-aborted"||a==="failed"||a==="unset"||m||f||g||v||i){if(m&&(C="repair-bad-branch",E+=`- The current branch is not the AI branch (${this.getAiBranch()}).
|
|
1864
1864
|
`,E+=`- Please switch to the AI branch using the 'git' tool.
|
|
1865
1865
|
`,D=`The current branch is not the AI branch (${this.getAiBranch()}).`),i){C="repair-merge-conflict",b="Resolve conflict",E="Merge conflict detected, please resolve the conflict before continuing",D="Merge conflict detected - changes from different sources need to be combined";try{let P=await this.git(["diff","--cc","--no-color","--unified=0","--no-ext-diff"]);y=P;let _=this.gitEnabledFolder;_&&!this.#b()&&(E=`Notice that all the relative paths in <merge_conflict>, are inside "${_.name}/", remember that when using Read/Write/Edit tools:
|
|
1866
1866
|
`),E+=`<merge_conflict>
|
|
@@ -1895,8 +1895,8 @@ ${r.getSetupOutput().slice(-8e3)}
|
|
|
1895
1895
|
<logs>
|
|
1896
1896
|
${y}
|
|
1897
1897
|
</logs>
|
|
1898
|
-
`);let w={devServerState:o,setupState:n,httpServerState:d,proxyServer:l,devCommand:s,setupCommand:c,hasMergeConflict:i,logs:y,prompt:E,message:D},F=!this.#c&&fDe.includes(e.state);return{actionButtonText:b,type:"build-error",level:x,canAutoApply:F,healthStatus:w,message:w.message,userMessage:{userPrompt:w.prompt,skipSearch:!0,repair:!0,category:C,displayPrompt:w.message}}}}async#be(){let e;if(this.#t?.git)try{if(L.info("\u{1F504} Initializing Fusion session for AI side-car branch workflow..."),e=await this.#e.getRepoInfo(this.#l),!e.hasGit)if(this.#t.gitAutoInit){L.warn("\u{1F6E0}\uFE0F No git repository detected. Initializing a new git repository...");try{await this.git(["init"]),await this.git(["add","."]),await this.git(["branch","-M","main"]),await this.git(["commit","--allow-empty","--quiet","--no-verify","-m","Initial commit for Fusion workflow"]),L.info("\u2705 Successfully initialized a new git repository")}catch(r){console.error("\u274C Failed to initialize git repository:",r);return}}else{L.error("\u274C Error: Not in a git repository. Fusion requires a git repository.");return}return await Nv({sys:this.#e,gitWorkingDirectory:this.#l,strict:!0})}catch(r){L.error(`\u274C Error initializing Fusion session: ${r}`);let n=new Error("Initialize Git failed",{cause:r});throw this.#e.Sentry?.captureException(n,{level:"fatal",tags:{operation:"codegen-initialize-session"},extra:{repoInfo:e}}),n}return{featureBranch:void 0,sessionId:void 0,currentCommitHash:void 0}}async#xe(e){try{await this.git(["checkout",e])}catch{await this.git(["checkout","-b",e])}}async#De(e){if(this.#t?.git){if(!this.#R){let o=c5(this.getFeatureBranch(),e.sessionId);this.#R=o}let r=await this.getCurrentBranch(),n=this.getAiBranch();r!==n&&await this.#xe(n);try{await this.git(["branch","--set-upstream-to",`refs/remotes/origin/${this.#J()}`])}catch{}let i=Zo(e.turns),s=i?.afterCommit??i?.lastCommit;if(s){let o=await this.getCurrentCommitHash();o!==s&&this.#e.Sentry?.captureException(new Error("Init: After commit mismatch"),{tags:{operation:"codegen-initialize-session"},extra:{sessionId:e.sessionId,targetCommit:s,lastTurn:i,currentCommitHash:o}})}if(e.beforeCommit)try{await this.git(["rev-parse","--quiet","--verify",e.beforeCommit])}catch(o){this.#e.Sentry?.captureException(new Error("Init: Before commit not found",{cause:o}),{tags:{operation:"codegen-initialize-session"},extra:{sessionId:e.sessionId,beforeCommit:e.beforeCommit,turnStates:e.turns.length,lastCompletionId:Zo(e.turns)?.completionId}})}}}async#Ee(e,r){let n;try{n=(await this.git(["remote","get-url","origin"],r)).trim()}catch{}try{new URL(e)}catch{throw this.#e.Sentry?.captureException(new Error("Provided remote url is invalid"),{tags:{operation:"codegen-git"},extra:{url:e,currentOriginUrl:n}}),new Error("Provided remote url is invalid")}n!==e&&(this.#j=void 0,n?await this.git(["remote","set-url","origin",e],r):await this.git(["remote","add","origin",e],r))}async pushRepoV2(e){return await this.pushChanges({pullFirst:!1,updateRepo:e,refreshRemote:!0})}async#ce(){let e;try{let r=this.gitEnabledFolder;if(!r)throw new Error("Main repo not found");if(r.initializationCommand||r.repoUrl?.startsWith("ssh://"))return{success:!0,message:"Git remote URLs update not needed"};if(!this.#E)throw new Error("Project ID is required to update git URLs");let i=await hp(this.#u,this.#E);if(!i.success)throw i.error;if(e=i.gitConfigs,!r.repoName)throw new Error("Main repo not found");let s=e?.[r.repoName];if(s?.url){let o=this.#e.resolve(this.#s,r.path);await this.#Ee(s.url,o)}return await this.emitGitStatus(),{success:!0,message:"Git remote URLs updated"}}catch(r){let n=`Failed to update git remote URLs: ${bm(r)}`;return this.#o&&console.error(n),this.#r.emit("step",{type:"error",message:n,code:"git-update-error"}),this.#e.Sentry?.captureException(r,{tags:{operation:"codegen-git",endpoint:"updateGitUrls"},extra:{projectId:this.#E,workspaceFolders:this.#i?.folders,gitConfigs:e}}),{success:!1,message:n,error:r instanceof Error?r:new Error(n)}}}async zipFolder(e){let{resolvedPath:r}=this.resolveWorkspacePath(e,!1),n=Date.now(),i=Math.random().toString(36).substring(2,8),s=`zip-${n}-${i}.zip`,o="/tmp",a=this.#e.join(o,s);return vm.default.mkdirSync(o,{recursive:!0}),await Ko("zip",["-r",a,".","-x","**/node_modules/**"],{cwd:r,debug:this.#o,sys:this.#e}),a}async archiveProject(){if(!this.#t?.git)throw new Error("Can not archive project in non git mode");try{let e=Date.now(),r=Math.random().toString(36).substring(2,8),n=`project-${e}-${r}.zip`,i="/tmp",s=this.#e.join(i,n);return vm.default.mkdirSync(i,{recursive:!0}),await this.git(["archive","--format=zip","-o",s,"HEAD"]),s}catch(e){throw new Error("Failed to archive project",{cause:e})}}isIdle(){let e=this.getSessionContext(),r=["generating","replay"];return!this.#_&&!r.includes(e.state)&&this.#m.length===0}async needsBackup(){if(!this.#t?.git||!this.#E||!this.#V)return!1;let e=await this.getCurrentCommitHash();if(!e)return!1;let r=this.gitEnabledFolder?.originalRepoUrl;if(!r)return!1;let n=Qf({version:"v2",originalRepoUrl:r,commitHash:e});return this.#j!==n}async uploadBackup(){try{let e=this.#E,r=this.#V;if(!this.#t?.git)throw new Error("Cannot upload backup in non-git mode");if(!e)throw new Error("Project ID is required for backup upload");if(!r)throw new Error("Branch ID is required for backup upload");let n=this.getAiBranch(),i=this.getFeatureBranch(),s=await this.#le(()=>fv({sys:this.#e,credentials:this.#u,projectId:e,branchName:r,repoPath:this.#l,aiBranch:n,featureBranch:i,workspace:this.#i,debug:this.#o,isConnectedToProvider:!0,forcedFullBackup:!1,canAbortMerge:this.#W}));return s.success&&(this.#j=s.backupRef),s}catch(e){if(console.error("Failed to upload backup",e),this.#j=void 0,this.#e.Sentry?.captureException(e,{tags:{operation:"codegen-backup",backupError:""}}),e instanceof Error&&e.message.includes("Commit(s) not found on remote"))throw e instanceof Error?e:new Error(String(e));return{success:!1,error:e instanceof Error?e:new Error(String(e))}}}getCommitMode(){return this.#n?.commitMode??"prs"}#J(){return this.getCommitMode()==="commits"?`${this.getFeatureBranch()}`:`${this.getAiBranch()}`}async#Ce(e){let r=this.getCommitMode(),n=this.#J(),i=await this.getCurrentBranch();return r==="commits"?["push","--no-verify","--set-upstream",...e?["-f"]:[],"origin",`${i}:${n}`]:["push","--no-verify","--set-upstream",...e?["-f"]:[],"origin",n]}async#we(){try{let e=this.getSessionContext(),r=Array.from(this.#ee);if(this.#ee.clear(),r.length===0||!e.prettierConfig)return!1;for(let n of r){let i=await this.#e.readFile(n);if(!i)continue;let s=await ui(this.#s,i,void 0,n);await this.#e.writeFile(n,s)}if(this.#t?.git){if(await this.isCleanWorkTree())return!1;await this.manualCommit({add:".",commitMessage:"Prettier format pending files"})}return!0}catch(e){return this.#e.Sentry?.captureException(new Error("Failed to format pending files",{cause:e})),!1}}async pushChanges(e){let{pullFirst:r,updateRepo:n,actor:i,refreshRemote:s,forcePush:o}=PDe(e);try{if(!this.#t?.git)throw new Error("Can not push changes in non-git mode");if(n){let u=this.#i?.folders.find(l=>l.enableGit);u&&(u.repoName=n.repoFullName,u.originalRepoUrl=n.repoUrl)}if(s||n){let u=await this.#ce();if(!u.success)throw u.error}if(await this.#k())throw await this.emitGitStatus(),new Error("Merge conflict detected, please resolve the conflict and try again");await this.#we(),r&&await this.pullLatestFromRemote();let a=await this.#Ce(o??!r);await this.git(a);let c=await this.emitGitStatus();return await this.#I({lastCommit:c?.currentCommit}),{success:!0}}catch(a){this.#e.Sentry?.captureException(a,{tags:{operation:"codegen-git",endpoint:"pushChanges",actor:i},extra:{pullFirst:r,commitMode:this.getCommitMode(),updateRepo:n,refreshRemote:s}});let c=bm(a);return{success:!1,message:c,error:a instanceof Error?a:new Error(c)}}}async pullLatestFromRemote(){let e=this.#J();return await this.#ue({branches:[e],allowUnrelatedHistory:!1,canPush:!1,noFastForward:this.getCommitMode()!=="commits"})}async abortMerge(e=!0){try{return await this.git(["merge","--abort"]),e&&await this.emitGitStatus(),this.requestRefresh(),{success:!0,message:"Merge aborted"}}catch(r){await this.emitGitStatus();let n=bm(r);return{success:!1,message:n,error:r instanceof Error?r:new Error(n)}}}async syncChangesFromRemote(){return await this.#ue({branches:[this.getAiBranch(),this.getFeatureBranch()],allowUnrelatedHistory:!0,canPush:!1,noFastForward:this.getCommitMode()!=="commits"})}async#k(){try{return await this.git(["rev-parse","-q","--verify","MERGE_HEAD"]),!0}catch{return!1}}async#ue({branches:e,allowUnrelatedHistory:r,canPush:n,noFastForward:i}){try{if(!this.#t?.git)throw new Error("Can not pull changes in non-git mode");if(!e.length)throw new Error("At least one branch name is required");let s=await this.getCurrentBranch(),o=this.getAiBranch();if(s!==o)throw new Error(`Sync failed, we are not in AI branch, current branch: ${s} != ${o}`);if(await this.#k())throw await this.emitGitStatus(),new Error("Merge conflict detected, please resolve the conflict and try again");await this.git(["fetch","origin","--prune"]);let a=await this.git(["for-each-ref","refs/remotes/origin"]),c=e.filter(u=>a.includes(`refs/remotes/origin/${u}`));for(let u of c)if(u!==o&&!u.startsWith("ai_")&&await this.git(["update-ref",`refs/heads/${u}`,`refs/remotes/origin/${u}`]),await this.git(["merge","--no-ff",...i?["--no-ff"]:[],...r?["--allow-unrelated-histories"]:[],`refs/remotes/origin/${u}`]),await this.#k())throw await this.emitGitStatus(),new Error("Merge conflict detected, please resolve the conflict and try again");if(n){let u=await this.pushChanges(!1);if(!u.success)throw u.error}else{let u=await this.emitGitStatus();await this.#I({lastCommit:u?.currentCommit})}return this.requestRefresh(),{success:!0,message:`Successfully merged ${e.join(", ")} into current branch`}}catch(s){await this.emitGitStatus(),this.#e.Sentry?.captureException(s,{tags:{operation:"codegen-git",endpoint:"syncChangesFromBranches"},extra:{branches:e,allowUnrelatedHistory:r}});let o=bm(s);return{success:!1,message:o,error:s instanceof Error?s:new Error(o)}}}async getCurrentCommitHash(e="HEAD"){if(this.#t?.git)try{return(await this.git(["rev-parse",e])).trim()}catch{return}}async getCurrentBranch(){return(await this.git(["branch","--show-current"])).trim()}getFeatureBranch(){if(!this.#N)throw new Error("Feature branch is missing");return this.#N}getAiBranch(){if(!this.#R)throw new Error("AI branch is missing");return this.#R}async git(e,r){if(!this.#t?.git)throw new Error("Can not execute git command in non-git mode.");let n=e[0],i=n==="push"||n==="fetch"||n==="pull",s=Date.now(),o=s-this.#ae,c=1e3*60;return i&&o>10*c&&(this.#ae=s,await this.#ce()),await this.#le(()=>this.#Se(e,r))}#le(e){let r=this.#re.then(()=>e());return this.#re=r.catch(()=>{}),r}async#Se(e,r){if(!this.#t?.git)throw new Error(`Can not execute git command in non-git mode: git ${e.join(" ")}`);let n=`git ${e.join(" ")}`;this.#_&&this.#e.Sentry?.captureException(new Error(`currentGitCommand is not finished yet. Current command: ${this.#_}, New command Received: ${n}`),{tags:{operation:"codegen-git"},extra:{oldCommand:this.#_,newCommand:n}});try{return this.#_=n,await Ko("git",e,{cwd:typeof r=="string"?r:this.#l,debug:this.#o,sys:this.#e,timeout:60*1e3,...typeof r=="object"?r:void 0})}finally{this.#_=void 0}}setDebug(e){this.#o=e}createTerminal(e){let r=e?.terminalId||`pty_${Date.now()}_${(0,KT.randomUUID)()}`,n=this.#p.get(r);if(n)return{title:n.title,cwd:n.cwd,createdAt:n.createdAt,lastWrittenAt:n.lastWrittenAt,createdBy:n.createdBy,readonly:n.readonly,terminalId:n.terminalId,builtIn:n.builtIn};let i=j1(this.#e);if(!i)throw new Error("Could not import node-pty");let s=e?.shell||(process.platform==="win32"?"powershell.exe":process.env.SHELL||"/bin/bash"),o=e?.cols??120,a=e?.rows??30,c={...process.env,...e?.env||{}},u=e?.cwd||this.#f,l=i.spawn(s,[],{name:"xterm-color",cwd:u,cols:o,rows:a,env:c}),p=new Set,d=new Set,f=[],m=x=>{for(let b of p)b(x)},g=l.onData(m);f.push(()=>{try{g?.dispose?.()}catch{}});let y=({exitCode:x})=>{for(let b of d)b(x);this.#p.delete(r),f.forEach(b=>b())},v=l.onExit(y);f.push(()=>{try{v?.dispose?.()}catch{}});let D=Date.now(),E={terminalId:r,title:e?.title||`Terminal ${this.#p.size+1}`,cwd:u,createdAt:D,lastWrittenAt:D,createdBy:e?.createdBy||"unknown",readonly:!1,builtIn:!1};return this.#p.set(r,{...E,pty:l,onDataListeners:p,onExitListeners:d,disposeFns:f}),this.emitTerminals(),E}#pe(){let e=this.getSessionContext(),r=Array.from(this.#p.values()).map(i=>({terminalId:i.terminalId,title:i.title,cwd:i.cwd,createdAt:i.createdAt,lastWrittenAt:i.lastWrittenAt,createdBy:i.createdBy,readonly:i.readonly,builtIn:i.builtIn}));this.#a?.includes("Bash")&&r.unshift({terminalId:"bash-tools",title:"Bash",cwd:this.#f,createdAt:e.createdUnixTime,lastWrittenAt:Date.now(),createdBy:"fusion",readonly:!0,builtIn:!0});let n=this.#t?.devServerOrchestrator;return n&&r.unshift({terminalId:"dev-command",title:"Dev Command",cwd:this.#f,createdAt:e.createdUnixTime,lastWrittenAt:Date.now(),createdBy:"fusion",readonly:!n.devCommandProcess?.write,builtIn:!0},{terminalId:"setup-command",title:"Setup Command",cwd:this.#f,createdAt:e.createdUnixTime,lastWrittenAt:Date.now(),createdBy:"fusion",readonly:!0,builtIn:!0}),r}emitTerminals(){this.#r.emit("step",{type:"terminals",terminals:this.#pe()})}updateTerminal({terminalId:e,cols:r,rows:n,title:i}){if(e==="dev-command"){if(r||n){let o=this.#t?.devServerOrchestrator;if(o?.devCommandProcess?.resize)return o.devCommandProcess.resize(r,n),!0}return!1}let s=this.#p.get(e);return s?((r||n)&&s.pty.resize(r??s.pty.cols,n??s.pty.rows),i&&(s.title=i,this.emitTerminals()),!0):!1}writeTerminal({terminalId:e,data:r}){if(e==="dev-command"){let i=this.#t?.devServerOrchestrator;return i?.devCommandProcess?.write?(i.devCommandProcess.write(r),!0):!1}let n=this.#p.get(e);return!n||n.readonly?!1:(n.pty.write(r),n.lastWrittenAt=Date.now(),!0)}signalTerminal({terminalId:e,signal:r}){if(e==="dev-command"){let i=this.#t?.devServerOrchestrator;return i?.devCommandProcess?.kill?(i.devCommandProcess.kill(r),!0):!1}let n=this.#p.get(e);if(!n||n.readonly)return!1;try{process.platform==="win32"?n.pty.kill():(r==="SIGINT"&&n.pty.write(""),n.pty.kill(r))}catch{}return!0}disposeTerminal({terminalId:e}){let r=this.#p.get(e);if(!r)return!1;try{r.pty.kill()}catch{}return r.disposeFns.forEach(n=>{try{n()}catch{}}),this.#p.delete(e),this.emitTerminals(),!0}subscribeTerminal({terminalId:e,onData:r,onExit:n}){if(e==="dev-command"){let s=this.#t?.devServerOrchestrator;if(s){let o=s.getDevWrite();o&&r(o)}return this.#r.on("step",o=>{o.type==="stdio"&&o.source==="run-command"&&r(o.content)}),!0}if(e==="setup-command"){let s=this.#t?.devServerOrchestrator;if(s){let o=s.getSetupOutput();o&&r(o)}return this.#r.on("step",o=>{o.type==="stdio"&&o.source==="setup-command"&&r(o.content)}),!0}if(e==="bash-tools")return this.#r.on("step",s=>{s.type==="stdio"&&s.source==="tool-command"&&r(s.content)}),!0;let i=this.#p.get(e);if(!i)throw new Error("Terminal not found");return i.onDataListeners.add(r),n&&i.onExitListeners.add(n),i.pty.write(`
|
|
1899
|
-
`),!0}async getAllFiles(e={}){let{getDotFiles:r=!1,globbyPattern:n="**/*",includePattern:i,gitignore:s}=e,o=this.#n?.accessControl,a=o?.entries?.filter(l=>l.action==="allow"&&l.permissions.includes("list")).map(l=>l.resource)??[];if(!this.#i?.folders?.length)return Ba({basePath:this.#s,globPattern:[i??n,...a],extraIgnorePatterns:s1(o).deny,dot:r,gitignore:s,sys:this.#e});let c=[],u=await this.#e.readdir(this.#s);for(let l of u)vq(l)&&c.push(l);!c.includes("AGENTS.md")&&this.#i.agentsMD&&c.push("AGENTS.md");for(let l of this.#i.folders){let p=this.#e.resolve(this.#s,l.path),d=await Ba({basePath:p,globPattern:[n,...a],dot:r,gitignore:s,sys:this.#e}),f=this.#b()?".":l.name||this.#e.basename(p);for(let m of d)f!=="."?c.push(this.#e.join(f,m)):c.push(m)}return tm({files:c,policy:o,filterPattern:i,getDotFiles:r})}async collectRepoMetrics(e={}){let{collectRepoMetrics:r}=await Promise.resolve().then(()=>(cq(),aq)),n=this.#l;return e.rootPath&&(n=this.#e.join(this.#l,e.rootPath)),r(this.#e,n)}getSessionId(){return this.getSessionContext().sessionId}getSpaceId(){return this.#u.builderPublicKey}async revertToCommitHash(e){await this.abortMerge(!1),await this.git(["revert","--no-commit",`${e}..HEAD`]),await this.git(["commit","--allow-empty","--quiet","--no-verify","-m","Revert changes"]);let n=(await this.emitGitStatus())?.currentCommit;if(!n){this.#e.Sentry?.captureException(new Error("Failed to get current commit hash after revert"),{tags:{operation:"codegen-git",endpoint:"revertToCommitHash"}});return}this.requestRefresh(),await this.#I({lastCommit:n})}async resetToCommitHash(e){if(await this.abortMerge(!1),await this.git(["reset","--quiet","--hard",e]),(await this.emitGitStatus())?.currentCommit!==e)throw new Error("Failed to reset commit hash");this.requestRefresh()}async restore({location:e,predicate:r,revert:n=!1,dryRun:i=!1,forceReplay:s=!1,debug:o}){let a=this.getSessionContext(),c=a.turns.length,u=null;for(let m=c-1;m>=-1;m--)if(r(m>=0?a.turns[m]:null,m)){u=m;break}if(u===null)return{undone:null,message:"Could not find the target to restore to, the completion id could be wrong"};n||await this.abort(!0);let l=new Map,p=!!this.#t?.git,d=a.turns,f=Math.max(0,e==="before"?u:u+1);for(let m=d.length-1;m>=f;m--){let g=d[m];for(let y of g.applyResults)l.set(y.filePath,y.oldContent??"")}if(!i){let m;if(p){u===-1?a.beforeCommit?m=a.beforeCommit:d.length>0&&(m=d[0].beforeCommit):u<d.length&&(e==="after"?(m=d[u].afterCommit,!m&&u+1<d.length&&(m=d[u+1].beforeCommit)):m=d[u].beforeCommit);let D={commitHash:m,sessionId:a.sessionId,sessionBeforeCommit:a.beforeCommit,turnsLength:d.length,targetIndex:u,currentTurn:d[d.length-1],targetTurn:d[u],targetTurnNext:d[u+1],location:e,forceReplay:s,dryRun:i,debug:o};if(!m)return this.#e.Sentry?.captureException(new Error("No commit hash found for restore"),{tags:{operation:"codegen-git",endpoint:"revertToCommitHash"},contexts:{restore:D}}),{undone:null,message:"Could not find the target to restore to, the git history is missing"};try{n?await this.revertToCommitHash(m):await this.resetToCommitHash(m)}catch(E){return this.#e.Sentry?.captureException(new Error("Error resetting git",{cause:E}),{tags:{operation:"codegen-git",endpoint:"resetToCommitHash"},contexts:{restore:D}}),{undone:null,message:"Failed to reset/restore, the file history is missing"}}}else for(let[D,E]of l.entries())try{E?await this.writeFile(D,E):await this.deleteFile(D)}catch{}if(n)return{undone:[],message:"The revert operation was successful"};let g=d.splice(f,d.length-f),y=Zo(d);y&&y?.afterCommit!==m&&(this.#e.Sentry?.captureException(new Error("Reset After commit hash mismatch"),{tags:{operation:"codegen-git",endpoint:"resetToCommitHash"},extra:{lastTurn:y,commitHash:m}}),y.lastCommit=m,await this.#I({completionId:y.completionId,lastCommit:m}));let v=y?.completionId;if(g.length>0&&(await fq(this.#e,this.#u,{lastCompletionId:v,sessionId:a.sessionId},!!this.#o),a.updatedUnixTime=Date.now()),s){let D=a.state;this.#r.emit("step",{type:"batch",steps:[{type:"state",newState:"replay",abortable:!1,previousState:D},...this.#de(),{type:"restore",files:Array.from(l.keys()),lastCompletionId:v,location:e},{type:"state",newState:D,abortable:!1,previousState:"replay"}]})}else g.length>0&&this.#r.emit("step",{type:"restore",files:Array.from(l.keys()),lastCompletionId:v,location:e})}return await this.#Te(),{undone:Array.from(l.keys()),message:"The restore operation was successful"}}async#Te(e){return await this.#t?.devServerOrchestrator?.ensureDevCommand(e)}async restoreFromCompletionId({location:e,completionId:r,forceReplay:n}){let i=this.getSessionContext();return i.turns.find(o=>o.completionId===r)?this.restore({location:e,predicate:o=>o?.completionId===r,forceReplay:n,debug:`restore to: ${r}`}):(await this.#M,i.turns=[],i.canLoadMore=!0,await fq(this.#e,this.#u,{sessionId:i.sessionId,lastCompletionId:r},!!this.#o),await this.loadMoreTurns(),this.restore({location:e,predicate:()=>!0,forceReplay:!0,debug:"restore after history"}))}async restoreBeforeCompletionId(e){return this.restoreFromCompletionId({location:"before",completionId:e,forceReplay:!1})}async undoLastUserMessage(e=!1){return this.restore({location:"before",predicate:r=>r?.user.role==="user",dryRun:e})}getLastUserCompletionId(){let e=this.getSessionContext();return mDe(e)?.completionId}getLastCompletionId(){let e=this.getSessionContext();return lq(e)?.completionId}getCurrentState(){return this.getSessionContext().state}getLastApplyResultsTurn(){let e=this.getSessionContext();return hDe(e)}getLastTurn(){let e=this.getSessionContext();return lq(e)}getNextUrl(){return this.getLastTurn()?.nextUrl}getScheduledMessage(){let e=this.#c;if(e)return this.#c=void 0,this.#g=e,e}getNextMessage(){let e=new Promise(r=>{this.#c?r():this.#x=r}).then(()=>{let r=this.#c;if(r)return!r.dropAbortedPrompt&&this.#g&&(r=mq(this.#g,r)),this.#c=void 0,this.#g=r,r});return{shouldWait:!this.#c,promise:e}}async sendFeedback(e){if(process.env.NODE_ENV==="test")return;nt("quality code feedback given",{spaceId:this.#u.builderPublicKey,sentiment:e.feedbackSentiment,mode:"cli"});let r=e.id??this.getLastCompletionId();r&&await this.#Pe({...e,id:r})}#I(e){let r=e.completionId;if(!r){let i=this.getLastTurn();i&&e.lastCommit&&(i.lastCommit=e.lastCommit),r=i?.completionId}let n=dq(this.#e,this.#u,"/codegen/finalize",{completionId:r,projectId:this.#n?.projectId,branchName:this.#n?.branchName,userCompletionId:this.getLastUserCompletionId(),sessionId:this.getSessionId(),...e});return this.#m.push(n),n.finally(()=>{let i=this.#m.indexOf(n);i!==-1&&this.#m.splice(i,1)}),n}#Pe(e){let r=dq(this.#e,this.#u,"/codegen/feedback",e);return this.#m.push(r),r.finally(()=>{let n=this.#m.indexOf(r);n!==-1&&this.#m.splice(n,1)}),r}async lastTurnHasChanges(){let e=await this.undoLastUserMessage(!0);return e.undone?e.undone.length>0:!1}#C(e){let r=this.getSessionContext(),n=r.state;n!==e&&(r.state=e,this.#r.emit("step",{type:"state",abortable:e==="generating",previousState:n,newState:e}))}waitUntilState(e,r=1e4){return new Promise(n=>{if(this.getSessionContext().state===e){n();return}let s,o=a=>{a.type==="state"&&a.newState===e&&(clearTimeout(s),this.#r.removeListener("step",o),n())};s=setTimeout(()=>{this.#r.removeListener("step",o),n()},r),this.#r.on("step",o)})}async clearSession(){let e=this.getSessionContext();e.turns=[],e.customInstructions=await this.#te(),this.#K=!0}async sendMessage(e){!e.dropAbortedPrompt&&this.#c&&(e=mq(this.#c,e)),this.#c=e,this.#$=!1,e.queue||await this.abort(),this.#x&&this.#x()}getTurns(){let e=this.getSessionContext();return structuredClone(e.turns)}getSessionContext(){if(!this.#d)throw new Error("Session context not initialized");return this.#d}async runSetupCommand(){return await this.#t?.devServerOrchestrator?.runSetupCommand()}abortSetupCommand(){this.#t?.devServerOrchestrator?.abortSetupCommand()}toolsRunning(){return this.#y.length>0}abortAllTools(){for(let e of this.#y)e.abortController.abort()}toolFullfilment(e,r){return typeof r=="string"&&(r={toolResult:r,isError:!1}),this.fulfillToolCall(e,r)}fulfillToolCall(e,r){let n=this.#G.get(e);return n?(n(r),this.#G.delete(e),!0):!1}abortToolCall(e){let r=this.#y.find(n=>n.id===e);if(r)return r.abortController.abort(),!0;if(this.#y.length===0){let n=new AbortController;return n.abort(),this.#y.push({id:e,abortController:n,input:{id:e},name:"bash"}),!0}return!1}async acceptCode(){if(this.#fe()){let e=this.getLinesStats();await this.sendFeedback({position:this.#U,acceptedLines:e.net,linesOfCodeAdded:e.added,linesOfCodeRemoved:e.removed})}}async abort(e=!1){return e&&(this.#g=void 0,this.#c=void 0),this.#F=0,this.#h?(this.#h.abort(),this.#h=void 0,!0):!1}async stopEventLoop(){await this.abort(!0),this.#T?.abort(),this.#T=void 0,this.#x&&this.#x()}requestRefresh(){this.#r.emit("step",{type:"builder-action",action:"refresh",metadata:{}})}async configureDevOrchestrator(e){let r=this.#t?.devServerOrchestrator,n={devCommand:!1,hosts:!1,setupCommand:!1,proxyServer:!1,env:!1,setupResult:void 0,devResult:void 0};if(r){let i=[];e.env&&(this.#K=!0,e.replaceEnvs&&r.clearEnvVariables(),Object.entries(e.env).forEach(([s,o])=>{r.setEnvVariable(s,o??void 0)&&(n.env=!0)})),e.proxyServer?i.push(r?.setProxyServer(e.proxyServer).then(s=>{n.proxyServer=s.updatedProxyServer,n.hosts=s.updatedHosts})):e.proxyPort&&i.push(r?.setPort(e.proxyPort).then(s=>n.proxyServer=s)),e.setupCommand!==void 0||e.setupDependencies!==void 0?i.push(r.setSetupCommand({setupDependencies:e.setupDependencies,setupCommand:e.setupCommand,forceRestart:e.forceSetupCommand}).then(s=>{n.setupCommand=!!s,n.setupResult=s??void 0})):(e.forceSetupCommand||n.env&&r.setupState!=="installed")&&i.push(r?.runSetupCommand().then(s=>{n.setupCommand=!!s,n.setupResult=s??void 0})),e.devCommand!==void 0?i.push(r.setDevCommand(e.devCommand??void 0,e.forceDevCommand).then(s=>{n.devCommand=s.status==="success",n.devResult=s??void 0})):(e.forceDevCommand||n.env)&&i.push(r?.restart().then(s=>{n.devCommand=!0,n.devResult=s??void 0})),e.autoDetectDevServer!==void 0&&i.push(r.setAutoDetectSettings(e.autoDetectDevServer,e.autoDetectDevServerPatterns).then(s=>n.proxyServer=n.proxyServer||s)),await Promise.allSettled(i)}return n}#Ae(){for(let e of Array.from(this.#p.keys()))try{this.disposeTerminal({terminalId:e})}catch{}this.#p.clear()}async close(e=!1){if(this.#W)return;if(this.#W=!0,this.#ne.forEach(n=>n()),this.#Ae(),this.#A)try{this.#o&&console.log("\u{1F50C} Cleaning up local MCP servers..."),await this.#A.cleanup()}catch(n){this.#e.Sentry?.captureException(n,{level:"warning",tags:{operation:"local-mcp-cleanup"}})}await this.stopEventLoop(),await this.waitUntilState("close",5e3),this.#r.removeAllListeners(),await Promise.allSettled(this.#m);let r=await this.needsBackup();this.#o&&console.log(`\u{1F50D} Closing code gen server: ${JSON.stringify({uploadGitBackup:e,needsBackup:r})}`),e&&r&&await this.uploadBackup()}async emitGitStatus(){let e=await this.#_e();return e&&(this.#z=e,this.#r.emit("step",e),e.hasMergeConflict?this.#w():this.#z.hasMergeConflict&&this.#w()),e}async manualCommit(e){await this.git(["add",e.add]),await this.git(["commit","--quiet","--no-verify","-m",e.commitMessage]);let r=await this.getCurrentCommitHash();await this.#I({lastCommit:r}),await this.emitGitStatus()}async#w(){let e=this.getSessionContext();if(e.state==="generating"||e.state==="close")return this.#B=void 0,!1;let r=await this.#ve(e);return this.#B=r,this.#r.emit("step",{type:"wait-for-input",state:e.state,suggestion:r,sessionMode:e.sessionMode,hasPlanToApply:this.#$}),!0}async#_e(){if(!this.#t?.git)return null;this.#H++;let e=this.#fe(),r=this.getCommitMode(),n=this.#J(),i=!1,s="",o=null;try{let d=await this.git(["rev-parse","--absolute-git-dir"]);o=this.#e.join(d,"FETCH_HEAD"),vm.default.existsSync(o)&&vm.default.unlinkSync(o)}catch(d){this.#e.Sentry?.captureException(d,{tags:{operation:"codegen-git",endpoint:"getGitStatus"},extra:{fetchHeadFilePath:o,isCheckingGitStatus:this.#H}}),o=null}try{s=await this.git(["fetch","--no-tags","origin",n]),i=!0}catch{i=!1}let a=await this.#e.getRepoInfo(this.#l),c=e?1:0,u=0;if(i)try{let d=SDe(await this.git(["rev-list","--left-right","--count","HEAD...FETCH_HEAD"]));c=d.ahead,u=d.behind}catch(d){let f=null;if(o)try{f=await this.#e.readFile(this.#e.join(this.#l,".git/FETCH_HEAD")),f=`FETCH_HEAD: ${f}`}catch(m){f=`FETCH_HEAD FAILED: ${String(m)}`}else f="FETCH_HEAD MISSING";this.#e.Sentry?.captureException(d,{tags:{operation:"codegen-git",endpoint:"getGitStatus"},extra:{fetchOutput:s,fetchHead:f,remoteBranch:n,currentBranch:a.currentBranch,currentCommit:a.commit,isCheckingGitStatus:this.#H}})}let l=await this.#k(),p=this.getSessionContext().beforeCommit;return this.#H--,{type:"git",remoteBranchExists:i,hasGeneratingPlaceholder:await this.#Be(),isSessionDirty:e||!!p&&p!==a.commit,canSync:(c>0||u>0)&&!l,canPush:(c>0||u>0)&&!l,canPull:u>0&&i,ahead:c,hasMergeConflict:l,commitMode:r,behind:u,currentCommit:a.commit,currentBranch:a.currentBranch,remoteBranch:n}}#de(){let e=this.getSessionContext(),r=e.turns,n=[];n.push({type:"session",title:e.title,beforeCommit:e.beforeCommit,createdUnixTime:e.createdUnixTime,updatedUnixTime:e.updatedUnixTime,turns:e.turns.length,id:e.sessionId,lastCompletionId:this.getLastCompletionId(),sessionMode:e.sessionMode});for(let i of r){n.push({type:"user",displayPrompt:i.userMessage?i.userMessage.displayPrompt??i.userMessage.userPrompt:void 0,attachments:i.userMessage?.attachments,id:i.completionId,user:i.user,role:i.user.role,compacting:!1});for(let s of i.actions)(s.type==="tool"||s.type==="text"||s.type==="thinking")&&(n.push({type:"start",name:s.type,content:"",id:s.id??"",filePath:s.filePath??"",title:s.actionTitle??s.artifactTitle??s.filePath??""}),n.push({type:"delta",name:s.type,delta:s.content}),s.type==="tool"?n.push({type:s.type,id:s.id,name:s.filePath,content:s.content}):s.type==="thinking"?n.push({type:"planning",content:s.content}):s.type==="text"&&n.push({type:"text",content:s.content}))}return n}connectToEventLoop(e,r){if(e){let n=[],i=this.getSessionContext();n.push({type:"state",newState:"replay",abortable:!1,previousState:i.state}),this.#X&&n.push(this.#X),this.#z&&n.push(this.#z),n.push(...this.#de());let s=this.#L?Zo(this.#L):void 0;if(s)switch(s.type){case"file":case"diff":case"text":case"thinking":case"suggestion":case"tool":n.push({type:"start",id:s.id,name:s.type,filePath:s.filePath??"",title:s.actionTitle??s.artifactTitle??"",content:""}),n.push({type:"delta",name:s.type,delta:s.content});break}n.push({type:"terminals",terminals:this.#pe()});let o=this.#t?.devServerOrchestrator;o?(n.push({type:"dev-server",devServerState:o.devState,setupState:o.setupState,httpServerState:o.httpServerState,devCommand:o.devCommand,setupCommand:o.setupCommand,proxyServer:o.proxyTarget}),o.setupState!=="installed"&&n.push({type:"stdio",id:"setupCommand",command:o.setupCommand??"",content:o.getSetupWrite(),source:"run-command",stream:"stdout"}),n.push({type:"stdio",id:"devServer",command:o.devCommand,content:o.getDevWrite(),source:"run-command",stream:"stdout"})):r({type:"dev-server",devServerState:"running",setupState:"installed",httpServerState:"ok-2xx",devCommand:this.#n?.devCommand,setupCommand:this.#n?.setupCommand,proxyServer:this.#n?.serverUrl}),n.push({type:"state",newState:i.state,abortable:i.state==="generating",previousState:"replay"}),this.#P&&i.state!=="generating"&&n.push({type:"wait-for-input",state:i.state,suggestion:this.#B,sessionMode:i.sessionMode,hasPlanToApply:this.#$}),r({type:"batch",steps:n})}return this.#r.on("step",r),this.waitForEventLoop(),()=>{this.#r.off("step",r)}}waitUntilIdle(){return this.waitForEventLoop(),(0,Cb.once)(this.#r,"idle").then(()=>Promise.allSettled(this.#m)).then(()=>{})}waitForEventLoop(){return this.#P?this.#P:this.#P=this.#Fe()}async#Fe(){if(this.#P||this.#T)throw new Error("Event loop already started");let e=wDe(),r=a=>{a.type==="error"&&this.#F>0&&(uq.includes(a.code)||(a.restoreCredits=this.#F,this.#F=0,yDe(this.#e,this.#u,s.sessionId,a.restoreCredits).catch(c=>{this.#e.Sentry?.captureException(c)}))),this.#r.emit("step",a)};this.#T=new AbortController;let n=this.#T.signal,i=this.#t?.devServerOrchestrator,s=this.getSessionContext(),o=()=>this.getLastCompletionId();this.#e.Sentry?.setContext("codeGen",{sessionId:s.sessionId,get completionId(){return o()}}),await this.emitGitStatus(),i?.setupState==="not-installed"&&this.runSetupCommand();try{for(;!n.aborted;){this.#h=void 0;let a=this.getNextMessage();a.shouldWait&&await this.#w()&&this.#r.emit("idle");let c=await a.promise;if(n.aborted)break;if(c){try{this.#B=void 0,c.logsCheckpoint&&i?.addCheckpoint(),this.#h=new AbortController;let u=ru([n,this.#h.signal]);if(u?.aborted)throw Iv();this.#C("generating"),c.sessionMode&&c.sessionMode!==s.sessionMode&&this.switchSessionMode(c.sessionMode),await this.#ke(c,u,r),this.#C("success"),(c.autoPush??"none")!=="none"&&await this.pushChanges({actor:"agent",pullFirst:c.autoPush==="merge-push",forcePush:c.autoPush==="force-push"}),this.#B=void 0}catch(u){u instanceof Error?u.name==="AbortError"?(r({type:"user-abort",hasContinueMessage:!!this.#c}),this.#C("abort")):u instanceof Cs?(this.#g=void 0,r({type:"error",code:u.code,message:u.message}),uq.includes(u.code)||this.#e.Sentry?.captureException(u,{tags:{operation:"codegen-stream"}}),this.#C("error")):(this.#g=void 0,r({type:"error",code:"cli-genetic-error",message:u.message,metadata:{error:u}}),this.#e.Sentry?.captureException(u,{tags:{operation:"codegen-stream"}}),this.#C("error")):this.#C("error")}this.#me++}}}catch(a){throw this.#e.Sentry?.captureException(a,{level:"fatal"}),a}finally{this.#T=void 0,this.#P=void 0,e()}this.#r.emit("idle"),this.#C("close")}async#ke(e,r,n){this.#F=0;let i=this.getSessionContext(),s=e.maxCompletions??25,o=0,a=0,c=0,u=!0,l=!1;for(;;){if(r?.aborted)throw Iv();try{let p=await this.#Re(e,u,r,n);if(u=!1,p.modelOverride=e.modelOverride,p.user.role==="user"){let d=p.files.filter(f=>(f.importance??0)>2.5&&f.content).map(f=>({filePath:f.filePath,size:f.content?.length??0,isCustomInstruction:!1,wasIncluded:f.wasIncluded}));i.customInstructions.forEach(f=>{f.filePath&&d.push({filePath:f.filePath,size:f.content?.length??0,isCustomInstruction:!0,wasIncluded:!0})}),n({type:"user-input",prompt:p.userMessage?.displayPrompt??p.userPrompt,files:d})}try{let{shouldContinue:d,completions:f,filesChanged:m}=await this.#Ie(i,p,r,n);a=0,o++,l||=m,c+=f,this.#g=void 0;let g=await this.emitGitStatus();if(g){let y=this.getAiBranch();if(g.currentBranch!==y){if(c-1>=s){n({type:"error",code:"ask-to-continue",message:"The agent has been working for a while. Do you want to continue?"});break}u=!0,e={userPrompt:`Seems like the current git branch is ${g.currentBranch}, however, this is a broken state in Fusion. Make sure to git checkout into "${y}", before finishing.`,displayPrompt:""};continue}}if(!d)break;if(!r.aborted){let y=this.getScheduledMessage();if(y){u=!0,e=y,c=0;continue}}if(c>=s){n({type:"error",code:"ask-to-continue",message:"The agent has been working for a while. Do you want to continue?"});break}}catch(d){throw await this.emitGitStatus(),d}}catch(p){if(a<2&&(p instanceof Cs&&p.code==="abrupt-end"||p instanceof Error&&p.name==="HTTPStreamBroke"||p instanceof Error&&p.name==="HTTPStreamHang")){a++;continue}throw p}finally{gDe(i.turns);let p=this.#n?.refreshPreview??!0;l&&p&&this.requestRefresh()}}}async#Ie(e,r,n,i){if(this.#L)throw new Error("generateCompletion already started");let s=this.getLastTurn()?.nextUrl??this.#Y,o=!1,a=0;i({type:"start",id:"",name:"thinking",title:"Thinking",content:""});try{let c=this.#L=[],u=await this.getCurrentCommitHash();!e.beforeCommit&&u&&(e.beforeCommit=u);let l=this.#se;l&&this.#D?.encrypt&&(l=!!this.#D.mcpServers);let p=r.userMessage?.uiContextPrompt;if(p&&!this.#b()){let v=this.#n?.workspace?.folders.find(D=>D.enableGit);v?.path&&(p=`Relative file paths are relative to: ${v.path}/`)}let d={url:s,position:this.#U,eventName:"cli code",maxPages:2,autoContinue:1,codeGenMode:this.#q,userContext:{...e.userContext,fullstoryUrl:r.userMessage?.metadata?.fullstoryUrl},files:r.files,maxTokens:this.#ie,aclPolicy:this.#n?.accessControl,repoIndexingConfig:this.#n?.repoIndexingConfig,recommendedRoot:this.#n?.workspace?.folders.find(v=>v.enableGit)?.recommendedRoot,attachments:r.attachments,customInstructions:e.customInstructions,sessionId:e.sessionId,userPrompt:r.userPrompt,ephemeralUserPrompt:r.userMessage?.ephemeralUserPrompt,uiContextPrompt:r.userMessage?.uiContextPrompt,displayUserPrompt:r.userMessage?.displayPrompt,isManualContinue:r.userMessage?.isManualContinue,sessionMode:r.userMessage?.sessionMode,projectId:this.#E,branchName:this.#V,pingEvents:!0,workingDirectory:this.#f,beforeCommit:u,toolResults:r.toolResults,role:r.user.role,user:r.user,repair:r.repair,category:r.category,enabledTools:this.#a,enabledMCPs:l?r.enabledMCPs:void 0,localMCPTools:this.#A?.listTools(),searchResponse:r.searchResponse,encryptKey:this.#O,maxAgentTiming:180*1e3,mcpServers:l,environmentVariables:TDe(this.#n?.environmentVariables??[],this.#t?.devServerOrchestrator?.environmentVariables??[]),dirtyEnvironmentVariables:this.#K&&r.user.role==="user",redactUserMessages:this.#D?.redactUserMessages,redactLLMMessages:this.#D?.redactLLMMessages,modelOverride:r.modelOverride??this.#oe,metadata:r.userMessage?.metadata};this.#o&&console.log("Starting completion stream");let f=vDe(this.#e,this.#u,d,n),m,g=!1,y=!1;for await(let v of f){let D=async b=>{if(b.type==="user"){let C=m={state:"running",unixTime:Date.now(),title:"",sentiment:void 0,userMessage:r.userMessage,afterCommit:u,beforeCommit:u,lastCommit:void 0,creditsUsed:0,actions:[],applyResults:[],completionId:b.id??"",nextUrl:void 0,user:b.user,autoContinue:!1};m=C,e.turns.push(C),b.compacting&&(e.customInstructions=await this.#te()),i({type:"user",displayPrompt:b.displayPrompt,id:b.id,user:b.user,role:b.user.role,compacting:b.compacting})}else if(b.type==="mcp-status")this.#X=b,i(b);else{if(b.type==="error")return y=!0,i(b),!0;if(b.type==="done"){a++,this.#F+=b.creditsUsed;let C=m=await this.#Oe(e,b,m,u);for(let A of b.actions??[])A.type==="tool_result"&&i({type:"tool_result",result:{content:A.content,tool_use_id:A.id,type:"tool_result",title:A.actionTitle,tool_name:A.filePath,is_error:!!A.errors?.length}});C.applyResults.length>0&&this.#t?.devServerOrchestrator?.addCheckpoint();let w=await this.#$e(this.#e,C),F=w.length>0,P=await this.commitWorkInProgress(C,w),_=!1;P?(F=!0,C.afterCommit=P,u=P):P===void 0&&(_=!0),F&&(o=!0),r.user.role==="user"&&(this.#K=!1),this.#I({completionId:C.completionId,beforeCommit:C.beforeCommit,afterCommit:C.afterCommit,commitFailed:_}),i({type:"done",stopReason:b.stopReason,id:b.id,applyResults:C.applyResults,actions:b.actions??[],creditsUsed:b.creditsUsed,sessionUsage:b.sessionUsage,model:b.model,usage:b.usage,url:b.nextUrl,promptVersion:b.promptVersion,hasChanges:F})}else{if(b.type==="continue")return g=b.autoContinue,y=!0,i({type:"continue",id:b.id,url:b.nextUrl,autoContinue:b.autoContinue}),!0;b.type==="thinking"&&(b.actionTitle="Planning"),"content"in b&&b.type!=="delta"&&i({type:"start",name:b.type,filePath:b.filePath??"",id:"id"in b?b.id:void 0,title:b.actionTitle??b.artifactTitle??b.filePath??"",content:b.content??""})}}return!1},E=async b=>{b.type==="thinking"&&i({type:"planning",content:b.content}),b.type==="server_tool_result"&&i({type:"server_tool_result",content:JSON.parse(b.content),title:b.actionTitle??b.artifactTitle??"Server Tool Result",id:b.id}),b.type==="file"&&b.filePath&&!b.synthetic&&i({type:"file",filePath:b.filePath,content:b.content,title:b.actionTitle??b.artifactTitle??"Created",id:b.id,errors:b.errors}),b.type==="diff"&&b.filePath&&!b.synthetic&&i({type:"diff",filePath:b.filePath,title:b.actionTitle??b.artifactTitle??"Updated",content:b.content,id:b.id,errors:b.errors}),b.type==="tool"&&b.filePath?i({type:"tool",name:b.filePath,id:b.id,content:b.content}):b.type==="text"&&i({type:"text",content:b.content})},x=async(b,C)=>{i({type:"delta",name:b.type,delta:C})};if(v.type==="ping"){this.#o&&console.log("generateCompletion: Ping");continue}if(v.type==="delta"){let b=v.content,C=Zo(c);C&&"content"in C&&(C.content+=b,await x(C,b))}else{let b=Zo(c);if(b&&"content"in b&&(b.incomplete=!1,await E(b)),c.push(v),await D(v))break}}if(!y)throw new Cs("Completion stream ended abruptly","abrupt-end");return m?{completions:a,filesChanged:o,shouldContinue:g||m.actions.some(v=>v.type==="tool")||m.autoContinue}:{completions:a,shouldContinue:!1,filesChanged:o}}finally{this.#L=void 0}}async commitWorkInProgress(e,r){if(!this.#t?.git)return!1;let n=await this.#k();if(n&&r.length===0||await this.isCleanWorkTree())return!1;try{n?await this.git(["add",...r]):await this.git(["add","."]);let s=`${e.title}
|
|
1898
|
+
`);let w={devServerState:o,setupState:n,httpServerState:d,proxyServer:l,devCommand:s,setupCommand:c,hasMergeConflict:i,logs:y,prompt:E,message:D},F=!this.#c&&fDe.includes(e.state);return{actionButtonText:b,type:"build-error",level:x,canAutoApply:F,healthStatus:w,message:w.message,userMessage:{userPrompt:w.prompt,skipSearch:!0,repair:!0,category:C,displayPrompt:w.message}}}}async#be(){let e;if(this.#t?.git)try{if(L.info("\u{1F504} Initializing Fusion session for AI side-car branch workflow..."),e=await this.#e.getRepoInfo(this.#l),!e.hasGit)if(this.#t.gitAutoInit){L.warn("\u{1F6E0}\uFE0F No git repository detected. Initializing a new git repository...");try{await this.git(["init"]),await this.git(["add","."]),await this.git(["branch","-M","main"]),await this.git(["commit","--allow-empty","--quiet","--no-verify","-m","Initial commit for Fusion workflow"]),L.info("\u2705 Successfully initialized a new git repository")}catch(r){console.error("\u274C Failed to initialize git repository:",r);return}}else{L.error("\u274C Error: Not in a git repository. Fusion requires a git repository.");return}return await Nv({sys:this.#e,gitWorkingDirectory:this.#l,strict:!0})}catch(r){L.error(`\u274C Error initializing Fusion session: ${r}`);let n=new Error("Initialize Git failed",{cause:r});throw this.#e.Sentry?.captureException(n,{level:"fatal",tags:{operation:"codegen-initialize-session"},extra:{repoInfo:e}}),n}return{featureBranch:void 0,sessionId:void 0,currentCommitHash:void 0}}async#xe(e){try{await this.git(["checkout",e])}catch{await this.git(["checkout","-b",e])}}async#De(e){if(this.#t?.git){if(!this.#R){let o=c5(this.getFeatureBranch(),e.sessionId);this.#R=o}let r=await this.getCurrentBranch(),n=this.getAiBranch();r!==n&&await this.#xe(n);try{await this.git(["branch","--set-upstream-to",`refs/remotes/origin/${this.#Y()}`])}catch{}let i=Zo(e.turns),s=i?.afterCommit??i?.lastCommit;if(s){let o=await this.getCurrentCommitHash();o!==s&&this.#e.Sentry?.captureException(new Error("Init: After commit mismatch"),{tags:{operation:"codegen-initialize-session"},extra:{sessionId:e.sessionId,targetCommit:s,lastTurn:i,currentCommitHash:o}})}if(e.beforeCommit)try{await this.git(["rev-parse","--quiet","--verify",e.beforeCommit])}catch(o){this.#e.Sentry?.captureException(new Error("Init: Before commit not found",{cause:o}),{tags:{operation:"codegen-initialize-session"},extra:{sessionId:e.sessionId,beforeCommit:e.beforeCommit,turnStates:e.turns.length,lastCompletionId:Zo(e.turns)?.completionId}})}}}async#Ee(e,r){let n;try{n=(await this.git(["remote","get-url","origin"],r)).trim()}catch{}try{new URL(e)}catch{throw this.#e.Sentry?.captureException(new Error("Provided remote url is invalid"),{tags:{operation:"codegen-git"},extra:{url:e,currentOriginUrl:n}}),new Error("Provided remote url is invalid")}n!==e&&(this.#j=void 0,n?await this.git(["remote","set-url","origin",e],r):await this.git(["remote","add","origin",e],r))}async pushRepoV2(e){return await this.pushChanges({pullFirst:!1,updateRepo:e,refreshRemote:!0})}async#ce(){let e;try{let r=this.gitEnabledFolder;if(!r)throw new Error("Main repo not found");if(r.initializationCommand||r.repoUrl?.startsWith("ssh://"))return{success:!0,message:"Git remote URLs update not needed"};if(!this.#E)throw new Error("Project ID is required to update git URLs");let i=await hp(this.#u,this.#E);if(!i.success)throw i.error;if(e=i.gitConfigs,!r.repoName)throw new Error("Main repo not found");let s=e?.[r.repoName];if(s?.url){let o=this.#e.resolve(this.#s,r.path);await this.#Ee(s.url,o)}return await this.emitGitStatus(),{success:!0,message:"Git remote URLs updated"}}catch(r){let n=`Failed to update git remote URLs: ${bm(r)}`;return this.#o&&console.error(n),this.#r.emit("step",{type:"error",message:n,code:"git-update-error"}),this.#e.Sentry?.captureException(r,{tags:{operation:"codegen-git",endpoint:"updateGitUrls"},extra:{projectId:this.#E,workspaceFolders:this.#i?.folders,gitConfigs:e}}),{success:!1,message:n,error:r instanceof Error?r:new Error(n)}}}async zipFolder(e){let{resolvedPath:r}=this.resolveWorkspacePath(e,!1),n=Date.now(),i=Math.random().toString(36).substring(2,8),s=`zip-${n}-${i}.zip`,o="/tmp",a=this.#e.join(o,s);return vm.default.mkdirSync(o,{recursive:!0}),await Ko("zip",["-r",a,".","-x","**/node_modules/**"],{cwd:r,debug:this.#o,sys:this.#e}),a}async archiveProject(){if(!this.#t?.git)throw new Error("Can not archive project in non git mode");try{let e=Date.now(),r=Math.random().toString(36).substring(2,8),n=`project-${e}-${r}.zip`,i="/tmp",s=this.#e.join(i,n);return vm.default.mkdirSync(i,{recursive:!0}),await this.git(["archive","--format=zip","-o",s,"HEAD"]),s}catch(e){throw new Error("Failed to archive project",{cause:e})}}isIdle(){let e=this.getSessionContext(),r=["generating","replay"];return!this.#_&&!r.includes(e.state)&&this.#m.length===0}async needsBackup(){if(!this.#t?.git||!this.#E||!this.#V)return!1;let e=await this.getCurrentCommitHash();if(!e)return!1;let r=this.gitEnabledFolder?.originalRepoUrl;if(!r)return!1;let n=Qf({version:"v2",originalRepoUrl:r,commitHash:e});return this.#j!==n}async uploadBackup(){try{let e=this.#E,r=this.#V;if(!this.#t?.git)throw new Error("Cannot upload backup in non-git mode");if(!e)throw new Error("Project ID is required for backup upload");if(!r)throw new Error("Branch ID is required for backup upload");let n=this.getAiBranch(),i=this.getFeatureBranch(),s=await this.#le(()=>fv({sys:this.#e,credentials:this.#u,projectId:e,branchName:r,repoPath:this.#l,aiBranch:n,featureBranch:i,workspace:this.#i,debug:this.#o,isConnectedToProvider:!0,forcedFullBackup:!1,canAbortMerge:this.#W}));return s.success&&(this.#j=s.backupRef),s}catch(e){if(console.error("Failed to upload backup",e),this.#j=void 0,this.#e.Sentry?.captureException(e,{tags:{operation:"codegen-backup",backupError:""}}),e instanceof Error&&e.message.includes("Commit(s) not found on remote"))throw e instanceof Error?e:new Error(String(e));return{success:!1,error:e instanceof Error?e:new Error(String(e))}}}getCommitMode(){return this.#n?.commitMode??"prs"}#Y(){return this.getCommitMode()==="commits"?`${this.getFeatureBranch()}`:`${this.getAiBranch()}`}async#Ce(e){let r=this.getCommitMode(),n=this.#Y(),i=await this.getCurrentBranch();return r==="commits"?["push","--no-verify","--set-upstream",...e?["-f"]:[],"origin",`${i}:${n}`]:["push","--no-verify","--set-upstream",...e?["-f"]:[],"origin",n]}async#we(){try{let e=this.getSessionContext(),r=Array.from(this.#te);if(this.#te.clear(),r.length===0||!e.prettierConfig)return!1;for(let n of r){let i=await this.#e.readFile(n);if(!i)continue;let s=await ui(this.#s,i,void 0,n);await this.#e.writeFile(n,s)}if(this.#t?.git){if(await this.isCleanWorkTree())return!1;await this.manualCommit({add:".",commitMessage:"Prettier format pending files"})}return!0}catch(e){return this.#e.Sentry?.captureException(new Error("Failed to format pending files",{cause:e})),!1}}async pushChanges(e){let{pullFirst:r,updateRepo:n,actor:i,refreshRemote:s,forcePush:o}=PDe(e);try{if(!this.#t?.git)throw new Error("Can not push changes in non-git mode");if(n){let u=this.#i?.folders.find(l=>l.enableGit);u&&(u.repoName=n.repoFullName,u.originalRepoUrl=n.repoUrl)}if(s||n){let u=await this.#ce();if(!u.success)throw u.error}if(await this.#k())throw await this.emitGitStatus(),new Error("Merge conflict detected, please resolve the conflict and try again");await this.#we(),r&&await this.pullLatestFromRemote();let a=await this.#Ce(o??!r);await this.git(a);let c=await this.emitGitStatus();return await this.#I({lastCommit:c?.currentCommit}),{success:!0}}catch(a){this.#e.Sentry?.captureException(a,{tags:{operation:"codegen-git",endpoint:"pushChanges",actor:i},extra:{pullFirst:r,commitMode:this.getCommitMode(),updateRepo:n,refreshRemote:s}});let c=bm(a);return{success:!1,message:c,error:a instanceof Error?a:new Error(c)}}}async pullLatestFromRemote(){let e=this.#Y();return await this.#ue({branches:[e],allowUnrelatedHistory:!1,canPush:!1,noFastForward:this.getCommitMode()!=="commits"})}async abortMerge(e=!0){try{return await this.git(["merge","--abort"]),e&&await this.emitGitStatus(),this.requestRefresh(),{success:!0,message:"Merge aborted"}}catch(r){await this.emitGitStatus();let n=bm(r);return{success:!1,message:n,error:r instanceof Error?r:new Error(n)}}}async syncChangesFromRemote(){return await this.#ue({branches:[this.getAiBranch(),this.getFeatureBranch()],allowUnrelatedHistory:!0,canPush:!1,noFastForward:this.getCommitMode()!=="commits"})}async#k(){try{return await this.git(["rev-parse","-q","--verify","MERGE_HEAD"]),!0}catch{return!1}}async#ue({branches:e,allowUnrelatedHistory:r,canPush:n,noFastForward:i}){try{if(!this.#t?.git)throw new Error("Can not pull changes in non-git mode");if(!e.length)throw new Error("At least one branch name is required");let s=await this.getCurrentBranch(),o=this.getAiBranch();if(s!==o)throw new Error(`Sync failed, we are not in AI branch, current branch: ${s} != ${o}`);if(await this.#k())throw await this.emitGitStatus(),new Error("Merge conflict detected, please resolve the conflict and try again");await this.git(["fetch","origin","--prune"]);let a=await this.git(["for-each-ref","refs/remotes/origin"]),c=e.filter(u=>a.includes(`refs/remotes/origin/${u}`));for(let u of c)if(u!==o&&!u.startsWith("ai_")&&await this.git(["update-ref",`refs/heads/${u}`,`refs/remotes/origin/${u}`]),await this.git(["merge","--no-ff",...i?["--no-ff"]:[],...r?["--allow-unrelated-histories"]:[],`refs/remotes/origin/${u}`]),await this.#k())throw await this.emitGitStatus(),new Error("Merge conflict detected, please resolve the conflict and try again");if(n){let u=await this.pushChanges(!1);if(!u.success)throw u.error}else{let u=await this.emitGitStatus();await this.#I({lastCommit:u?.currentCommit})}return this.requestRefresh(),{success:!0,message:`Successfully merged ${e.join(", ")} into current branch`}}catch(s){await this.emitGitStatus(),this.#e.Sentry?.captureException(s,{tags:{operation:"codegen-git",endpoint:"syncChangesFromBranches"},extra:{branches:e,allowUnrelatedHistory:r}});let o=bm(s);return{success:!1,message:o,error:s instanceof Error?s:new Error(o)}}}async getCurrentCommitHash(e="HEAD"){if(this.#t?.git)try{return(await this.git(["rev-parse",e])).trim()}catch{return}}async getCurrentBranch(){return(await this.git(["branch","--show-current"])).trim()}getFeatureBranch(){if(!this.#N)throw new Error("Feature branch is missing");return this.#N}getAiBranch(){if(!this.#R)throw new Error("AI branch is missing");return this.#R}async git(e,r){if(!this.#t?.git)throw new Error("Can not execute git command in non-git mode.");let n=e[0],i=n==="push"||n==="fetch"||n==="pull",s=Date.now(),o=s-this.#ae,c=1e3*60;return i&&o>10*c&&(this.#ae=s,await this.#ce()),await this.#le(()=>this.#Se(e,r))}#le(e){let r=this.#re.then(()=>e());return this.#re=r.catch(()=>{}),r}async#Se(e,r){if(!this.#t?.git)throw new Error(`Can not execute git command in non-git mode: git ${e.join(" ")}`);let n=`git ${e.join(" ")}`;this.#_&&this.#e.Sentry?.captureException(new Error(`currentGitCommand is not finished yet. Current command: ${this.#_}, New command Received: ${n}`),{tags:{operation:"codegen-git"},extra:{oldCommand:this.#_,newCommand:n}});try{return this.#_=n,await Ko("git",e,{cwd:typeof r=="string"?r:this.#l,debug:this.#o,sys:this.#e,timeout:60*1e3,...typeof r=="object"?r:void 0})}finally{this.#_=void 0}}setDebug(e){this.#o=e}createTerminal(e){let r=e?.terminalId||`pty_${Date.now()}_${(0,KT.randomUUID)()}`,n=this.#d.get(r);if(n)return{title:n.title,cwd:n.cwd,createdAt:n.createdAt,lastWrittenAt:n.lastWrittenAt,createdBy:n.createdBy,readonly:n.readonly,terminalId:n.terminalId,builtIn:n.builtIn};let i=j1(this.#e);if(!i)throw new Error("Could not import node-pty");let s=e?.shell||(process.platform==="win32"?"powershell.exe":process.env.SHELL||"/bin/bash"),o=e?.cols??120,a=e?.rows??30,c={...process.env,...e?.env||{}},u=e?.cwd||this.#f,l=i.spawn(s,[],{name:"xterm-color",cwd:u,cols:o,rows:a,env:c}),p=new Set,d=new Set,f=[],m=x=>{for(let b of p)b(x)},g=l.onData(m);f.push(()=>{try{g?.dispose?.()}catch{}});let y=({exitCode:x})=>{for(let b of d)b(x);this.#d.delete(r),f.forEach(b=>b())},v=l.onExit(y);f.push(()=>{try{v?.dispose?.()}catch{}});let D=Date.now(),E={terminalId:r,title:e?.title||`Terminal ${this.#d.size+1}`,cwd:u,createdAt:D,lastWrittenAt:D,createdBy:e?.createdBy||"unknown",readonly:!1,builtIn:!1};return this.#d.set(r,{...E,pty:l,onDataListeners:p,onExitListeners:d,disposeFns:f}),this.emitTerminals(),E}#pe(){let e=this.getSessionContext(),r=Array.from(this.#d.values()).map(i=>({terminalId:i.terminalId,title:i.title,cwd:i.cwd,createdAt:i.createdAt,lastWrittenAt:i.lastWrittenAt,createdBy:i.createdBy,readonly:i.readonly,builtIn:i.builtIn}));this.#a?.includes("Bash")&&r.unshift({terminalId:"bash-tools",title:"Bash",cwd:this.#f,createdAt:e.createdUnixTime,lastWrittenAt:Date.now(),createdBy:"fusion",readonly:!0,builtIn:!0});let n=this.#t?.devServerOrchestrator;return n&&r.unshift({terminalId:"dev-command",title:"Dev Command",cwd:this.#f,createdAt:e.createdUnixTime,lastWrittenAt:Date.now(),createdBy:"fusion",readonly:!n.devCommandProcess?.write,builtIn:!0},{terminalId:"setup-command",title:"Setup Command",cwd:this.#f,createdAt:e.createdUnixTime,lastWrittenAt:Date.now(),createdBy:"fusion",readonly:!0,builtIn:!0}),r}emitTerminals(){this.#r.emit("step",{type:"terminals",terminals:this.#pe()})}updateTerminal({terminalId:e,cols:r,rows:n,title:i}){if(e==="dev-command"){if(r||n){let o=this.#t?.devServerOrchestrator;if(o?.devCommandProcess?.resize)return o.devCommandProcess.resize(r,n),!0}return!1}let s=this.#d.get(e);return s?((r||n)&&s.pty.resize(r??s.pty.cols,n??s.pty.rows),i&&(s.title=i,this.emitTerminals()),!0):!1}writeTerminal({terminalId:e,data:r}){if(e==="dev-command"){let i=this.#t?.devServerOrchestrator;return i?.devCommandProcess?.write?(i.devCommandProcess.write(r),!0):!1}let n=this.#d.get(e);return!n||n.readonly?!1:(n.pty.write(r),n.lastWrittenAt=Date.now(),!0)}signalTerminal({terminalId:e,signal:r}){if(e==="dev-command"){let i=this.#t?.devServerOrchestrator;return i?.devCommandProcess?.kill?(i.devCommandProcess.kill(r),!0):!1}let n=this.#d.get(e);if(!n||n.readonly)return!1;try{process.platform==="win32"?n.pty.kill():(r==="SIGINT"&&n.pty.write(""),n.pty.kill(r))}catch{}return!0}disposeTerminal({terminalId:e}){let r=this.#d.get(e);if(!r)return!1;try{r.pty.kill()}catch{}return r.disposeFns.forEach(n=>{try{n()}catch{}}),this.#d.delete(e),this.emitTerminals(),!0}subscribeTerminal({terminalId:e,onData:r,onExit:n}){if(e==="dev-command"){let s=this.#t?.devServerOrchestrator;if(s){let o=s.getDevWrite();o&&r(o)}return this.#r.on("step",o=>{o.type==="stdio"&&o.source==="run-command"&&r(o.content)}),!0}if(e==="setup-command"){let s=this.#t?.devServerOrchestrator;if(s){let o=s.getSetupOutput();o&&r(o)}return this.#r.on("step",o=>{o.type==="stdio"&&o.source==="setup-command"&&r(o.content)}),!0}if(e==="bash-tools")return this.#r.on("step",s=>{s.type==="stdio"&&s.source==="tool-command"&&r(s.content)}),!0;let i=this.#d.get(e);if(!i)throw new Error("Terminal not found");return i.onDataListeners.add(r),n&&i.onExitListeners.add(n),i.pty.write(`
|
|
1899
|
+
`),!0}async getAllFiles(e={}){let{getDotFiles:r=!1,globbyPattern:n="**/*",includePattern:i,gitignore:s}=e,o=this.#n?.accessControl,a=o?.entries?.filter(l=>l.action==="allow"&&l.permissions.includes("list")).map(l=>l.resource)??[];if(!this.#i?.folders?.length)return Ba({basePath:this.#s,globPattern:[i??n,...a],extraIgnorePatterns:s1(o).deny,dot:r,gitignore:s,sys:this.#e});let c=[],u=await this.#e.readdir(this.#s);for(let l of u)vq(l)&&c.push(l);!c.includes("AGENTS.md")&&this.#i.agentsMD&&c.push("AGENTS.md");for(let l of this.#i.folders){let p=this.#e.resolve(this.#s,l.path),d=await Ba({basePath:p,globPattern:[n,...a],dot:r,gitignore:s,sys:this.#e}),f=this.#b()?".":l.name||this.#e.basename(p);for(let m of d)f!=="."?c.push(this.#e.join(f,m)):c.push(m)}return tm({files:c,policy:o,filterPattern:i,getDotFiles:r})}async collectRepoMetrics(e={}){let{collectRepoMetrics:r}=await Promise.resolve().then(()=>(cq(),aq)),n=this.#l;return e.rootPath&&(n=this.#e.join(this.#l,e.rootPath)),r(this.#e,n)}getSessionId(){return this.getSessionContext().sessionId}getSpaceId(){return this.#u.builderPublicKey}async revertToCommitHash(e){await this.abortMerge(!1),await this.git(["revert","--no-commit",`${e}..HEAD`]),await this.git(["commit","--allow-empty","--quiet","--no-verify","-m","Revert changes"]);let n=(await this.emitGitStatus())?.currentCommit;if(!n){this.#e.Sentry?.captureException(new Error("Failed to get current commit hash after revert"),{tags:{operation:"codegen-git",endpoint:"revertToCommitHash"}});return}this.requestRefresh(),await this.#I({lastCommit:n})}async resetToCommitHash(e){if(await this.abortMerge(!1),await this.git(["reset","--quiet","--hard",e]),(await this.emitGitStatus())?.currentCommit!==e)throw new Error("Failed to reset commit hash");this.requestRefresh()}async restore({location:e,predicate:r,revert:n=!1,dryRun:i=!1,forceReplay:s=!1,debug:o}){let a=this.getSessionContext(),c=a.turns.length,u=null;for(let m=c-1;m>=-1;m--)if(r(m>=0?a.turns[m]:null,m)){u=m;break}if(u===null)return{undone:null,message:"Could not find the target to restore to, the completion id could be wrong"};n||await this.abort(!0);let l=new Map,p=!!this.#t?.git,d=a.turns,f=Math.max(0,e==="before"?u:u+1);for(let m=d.length-1;m>=f;m--){let g=d[m];for(let y of g.applyResults)l.set(y.filePath,y.oldContent??"")}if(!i){let m;if(p){u===-1?a.beforeCommit?m=a.beforeCommit:d.length>0&&(m=d[0].beforeCommit):u<d.length&&(e==="after"?(m=d[u].afterCommit,!m&&u+1<d.length&&(m=d[u+1].beforeCommit)):m=d[u].beforeCommit);let D={commitHash:m,sessionId:a.sessionId,sessionBeforeCommit:a.beforeCommit,turnsLength:d.length,targetIndex:u,currentTurn:d[d.length-1],targetTurn:d[u],targetTurnNext:d[u+1],location:e,forceReplay:s,dryRun:i,debug:o};if(!m)return this.#e.Sentry?.captureException(new Error("No commit hash found for restore"),{tags:{operation:"codegen-git",endpoint:"revertToCommitHash"},contexts:{restore:D}}),{undone:null,message:"Could not find the target to restore to, the git history is missing"};try{n?await this.revertToCommitHash(m):await this.resetToCommitHash(m)}catch(E){return this.#e.Sentry?.captureException(new Error("Error resetting git",{cause:E}),{tags:{operation:"codegen-git",endpoint:"resetToCommitHash"},contexts:{restore:D}}),{undone:null,message:"Failed to reset/restore, the file history is missing"}}}else for(let[D,E]of l.entries())try{E?await this.writeFile(D,E):await this.deleteFile(D)}catch{}if(n)return{undone:[],message:"The revert operation was successful"};let g=d.splice(f,d.length-f),y=Zo(d);y&&y?.afterCommit!==m&&(this.#e.Sentry?.captureException(new Error("Reset After commit hash mismatch"),{tags:{operation:"codegen-git",endpoint:"resetToCommitHash"},extra:{lastTurn:y,commitHash:m}}),y.lastCommit=m,await this.#I({completionId:y.completionId,lastCommit:m}));let v=y?.completionId;if(g.length>0&&(await fq(this.#e,this.#u,{lastCompletionId:v,sessionId:a.sessionId},!!this.#o),a.updatedUnixTime=Date.now()),s){let D=a.state;this.#r.emit("step",{type:"batch",steps:[{type:"state",newState:"replay",abortable:!1,previousState:D},...this.#de(),{type:"restore",files:Array.from(l.keys()),lastCompletionId:v,location:e},{type:"state",newState:D,abortable:!1,previousState:"replay"}]})}else g.length>0&&this.#r.emit("step",{type:"restore",files:Array.from(l.keys()),lastCompletionId:v,location:e})}return await this.#Te(),{undone:Array.from(l.keys()),message:"The restore operation was successful"}}async#Te(e){return await this.#t?.devServerOrchestrator?.ensureDevCommand(e)}async restoreFromCompletionId({location:e,completionId:r,forceReplay:n}){let i=this.getSessionContext();return i.turns.find(o=>o.completionId===r)?this.restore({location:e,predicate:o=>o?.completionId===r,forceReplay:n,debug:`restore to: ${r}`}):(await this.#M,i.turns=[],i.canLoadMore=!0,await fq(this.#e,this.#u,{sessionId:i.sessionId,lastCompletionId:r},!!this.#o),await this.loadMoreTurns(),this.restore({location:e,predicate:()=>!0,forceReplay:!0,debug:"restore after history"}))}async restoreBeforeCompletionId(e){return this.restoreFromCompletionId({location:"before",completionId:e,forceReplay:!1})}async undoLastUserMessage(e=!1){return this.restore({location:"before",predicate:r=>r?.user.role==="user",dryRun:e})}getLastUserCompletionId(){let e=this.getSessionContext();return mDe(e)?.completionId}getLastCompletionId(){let e=this.getSessionContext();return lq(e)?.completionId}getCurrentState(){return this.getSessionContext().state}getLastApplyResultsTurn(){let e=this.getSessionContext();return hDe(e)}getLastTurn(){let e=this.getSessionContext();return lq(e)}getNextUrl(){return this.getLastTurn()?.nextUrl}getScheduledMessage(){let e=this.#c;if(e)return this.#c=void 0,this.#g=e,e}getNextMessage(){let e=new Promise(r=>{this.#c?r():this.#x=r}).then(()=>{let r=this.#c;if(r)return!r.dropAbortedPrompt&&this.#g&&(r=mq(this.#g,r)),this.#c=void 0,this.#g=r,r});return{shouldWait:!this.#c,promise:e}}async sendFeedback(e){if(process.env.NODE_ENV==="test")return;nt("quality code feedback given",{spaceId:this.#u.builderPublicKey,sentiment:e.feedbackSentiment,mode:"cli"});let r=e.id??this.getLastCompletionId();r&&await this.#Pe({...e,id:r})}#I(e){let r=e.completionId;if(!r){let i=this.getLastTurn();i&&e.lastCommit&&(i.lastCommit=e.lastCommit),r=i?.completionId}let n=dq(this.#e,this.#u,"/codegen/finalize",{completionId:r,projectId:this.#n?.projectId,branchName:this.#n?.branchName,userCompletionId:this.getLastUserCompletionId(),sessionId:this.getSessionId(),...e});return this.#m.push(n),n.finally(()=>{let i=this.#m.indexOf(n);i!==-1&&this.#m.splice(i,1)}),n}#Pe(e){let r=dq(this.#e,this.#u,"/codegen/feedback",e);return this.#m.push(r),r.finally(()=>{let n=this.#m.indexOf(r);n!==-1&&this.#m.splice(n,1)}),r}async lastTurnHasChanges(){let e=await this.undoLastUserMessage(!0);return e.undone?e.undone.length>0:!1}#C(e){let r=this.getSessionContext(),n=r.state;n!==e&&(r.state=e,this.#r.emit("step",{type:"state",abortable:e==="generating",previousState:n,newState:e}))}waitUntilState(e,r=1e4){return new Promise(n=>{if(this.getSessionContext().state===e){n();return}let s,o=a=>{a.type==="state"&&a.newState===e&&(clearTimeout(s),this.#r.removeListener("step",o),n())};s=setTimeout(()=>{this.#r.removeListener("step",o),n()},r),this.#r.on("step",o)})}async clearSession(){let e=this.getSessionContext();e.turns=[],e.customInstructions=await this.#J(),this.#K=!0}async sendMessage(e){!e.dropAbortedPrompt&&this.#c&&(e=mq(this.#c,e)),this.#c=e,this.#$=!1,e.queue||await this.abort(),this.#x&&this.#x()}getTurns(){let e=this.getSessionContext();return structuredClone(e.turns)}getSessionContext(){if(!this.#p)throw new Error("Session context not initialized");return this.#p}async runSetupCommand(){return await this.#t?.devServerOrchestrator?.runSetupCommand()}abortSetupCommand(){this.#t?.devServerOrchestrator?.abortSetupCommand()}toolsRunning(){return this.#y.length>0}abortAllTools(){for(let e of this.#y)e.abortController.abort()}toolFullfilment(e,r){return typeof r=="string"&&(r={toolResult:r,isError:!1}),this.fulfillToolCall(e,r)}fulfillToolCall(e,r){let n=this.#G.get(e);return n?(n(r),this.#G.delete(e),!0):!1}abortToolCall(e){let r=this.#y.find(n=>n.id===e);if(r)return r.abortController.abort(),!0;if(this.#y.length===0){let n=new AbortController;return n.abort(),this.#y.push({id:e,abortController:n,input:{id:e},name:"bash"}),!0}return!1}async acceptCode(){if(this.#fe()){let e=this.getLinesStats();await this.sendFeedback({position:this.#U,acceptedLines:e.net,linesOfCodeAdded:e.added,linesOfCodeRemoved:e.removed})}}async abort(e=!1){return e&&(this.#g=void 0,this.#c=void 0),this.#F=0,this.#h?(this.#h.abort(),this.#h=void 0,!0):!1}async stopEventLoop(){await this.abort(!0),this.#T?.abort(),this.#T=void 0,this.#x&&this.#x()}requestRefresh(){this.#r.emit("step",{type:"builder-action",action:"refresh",metadata:{}})}async configureDevOrchestrator(e){let r=this.#t?.devServerOrchestrator,n={devCommand:!1,hosts:!1,setupCommand:!1,proxyServer:!1,env:!1,setupResult:void 0,devResult:void 0};if(r){let i=[];e.env&&(this.#K=!0,e.replaceEnvs&&r.clearEnvVariables(),Object.entries(e.env).forEach(([s,o])=>{r.setEnvVariable(s,o??void 0)&&(n.env=!0)})),e.proxyServer?i.push(r?.setProxyServer(e.proxyServer).then(s=>{n.proxyServer=s.updatedProxyServer,n.hosts=s.updatedHosts})):e.proxyPort&&i.push(r?.setPort(e.proxyPort).then(s=>n.proxyServer=s)),e.setupCommand!==void 0||e.setupDependencies!==void 0?i.push(r.setSetupCommand({setupDependencies:e.setupDependencies,setupCommand:e.setupCommand,forceRestart:e.forceSetupCommand}).then(s=>{n.setupCommand=!!s,n.setupResult=s??void 0})):(e.forceSetupCommand||n.env&&r.setupState!=="installed")&&i.push(r?.runSetupCommand().then(s=>{n.setupCommand=!!s,n.setupResult=s??void 0})),e.devCommand!==void 0?i.push(r.setDevCommand(e.devCommand??void 0,e.forceDevCommand).then(s=>{n.devCommand=s.status==="success",n.devResult=s??void 0})):(e.forceDevCommand||n.env)&&i.push(r?.restart().then(s=>{n.devCommand=!0,n.devResult=s??void 0})),e.autoDetectDevServer!==void 0&&i.push(r.setAutoDetectSettings(e.autoDetectDevServer,e.autoDetectDevServerPatterns).then(s=>n.proxyServer=n.proxyServer||s)),await Promise.allSettled(i)}return n}#Ae(){for(let e of Array.from(this.#d.keys()))try{this.disposeTerminal({terminalId:e})}catch{}this.#d.clear()}async close(e=!1){if(this.#W)return;if(this.#W=!0,this.#ne.forEach(n=>n()),this.#Ae(),this.#A)try{this.#o&&console.log("\u{1F50C} Cleaning up local MCP servers..."),await this.#A.cleanup()}catch(n){this.#e.Sentry?.captureException(n,{level:"warning",tags:{operation:"local-mcp-cleanup"}})}await this.stopEventLoop(),await this.waitUntilState("close",5e3),this.#r.removeAllListeners(),await Promise.allSettled(this.#m);let r=await this.needsBackup();this.#o&&console.log(`\u{1F50D} Closing code gen server: ${JSON.stringify({uploadGitBackup:e,needsBackup:r})}`),e&&r&&await this.uploadBackup()}async emitGitStatus(){let e=await this.#_e();return e&&(this.#z=e,this.#r.emit("step",e),e.hasMergeConflict?this.#w():this.#z.hasMergeConflict&&this.#w()),e}async manualCommit(e){await this.git(["add",e.add]),await this.git(["commit","--quiet","--no-verify","-m",e.commitMessage]);let r=await this.getCurrentCommitHash();await this.#I({lastCommit:r}),await this.emitGitStatus()}async#w(){let e=this.getSessionContext();if(e.state==="generating"||e.state==="close")return this.#B=void 0,!1;let r=await this.#ve(e);return this.#B=r,this.#r.emit("step",{type:"wait-for-input",state:e.state,suggestion:r,sessionMode:e.sessionMode,hasPlanToApply:this.#$}),!0}async#_e(){if(!this.#t?.git)return null;this.#H++;let e=this.#fe(),r=this.getCommitMode(),n=this.#Y(),i=!1,s="",o=null;try{let d=await this.git(["rev-parse","--absolute-git-dir"]);o=this.#e.join(d,"FETCH_HEAD"),vm.default.existsSync(o)&&vm.default.unlinkSync(o)}catch(d){this.#e.Sentry?.captureException(d,{tags:{operation:"codegen-git",endpoint:"getGitStatus"},extra:{fetchHeadFilePath:o,isCheckingGitStatus:this.#H}}),o=null}try{s=await this.git(["fetch","--no-tags","origin",n]),i=!0}catch{i=!1}let a=await this.#e.getRepoInfo(this.#l),c=e?1:0,u=0;if(i)try{let d=SDe(await this.git(["rev-list","--left-right","--count","HEAD...FETCH_HEAD"]));c=d.ahead,u=d.behind}catch(d){let f=null;if(o)try{f=await this.#e.readFile(this.#e.join(this.#l,".git/FETCH_HEAD")),f=`FETCH_HEAD: ${f}`}catch(m){f=`FETCH_HEAD FAILED: ${String(m)}`}else f="FETCH_HEAD MISSING";this.#e.Sentry?.captureException(d,{tags:{operation:"codegen-git",endpoint:"getGitStatus"},extra:{fetchOutput:s,fetchHead:f,remoteBranch:n,currentBranch:a.currentBranch,currentCommit:a.commit,isCheckingGitStatus:this.#H}})}let l=await this.#k(),p=this.getSessionContext().beforeCommit;return this.#H--,{type:"git",remoteBranchExists:i,hasGeneratingPlaceholder:await this.#Be(),isSessionDirty:e||!!p&&p!==a.commit,canSync:(c>0||u>0)&&!l,canPush:(c>0||u>0)&&!l,canPull:u>0&&i,ahead:c,hasMergeConflict:l,commitMode:r,behind:u,currentCommit:a.commit,currentBranch:a.currentBranch,remoteBranch:n}}#de(){let e=this.getSessionContext(),r=e.turns,n=[];n.push({type:"session",title:e.title,beforeCommit:e.beforeCommit,createdUnixTime:e.createdUnixTime,updatedUnixTime:e.updatedUnixTime,turns:e.turns.length,id:e.sessionId,lastCompletionId:this.getLastCompletionId(),sessionMode:e.sessionMode});for(let i of r){n.push({type:"user",displayPrompt:i.userMessage?i.userMessage.displayPrompt??i.userMessage.userPrompt:void 0,attachments:i.userMessage?.attachments,id:i.completionId,user:i.user,role:i.user.role,compacting:!1});for(let s of i.actions)(s.type==="tool"||s.type==="text"||s.type==="thinking")&&(n.push({type:"start",name:s.type,content:"",id:s.id??"",filePath:s.filePath??"",title:s.actionTitle??s.artifactTitle??s.filePath??""}),n.push({type:"delta",name:s.type,delta:s.content}),s.type==="tool"?n.push({type:s.type,id:s.id,name:s.filePath,content:s.content}):s.type==="thinking"?n.push({type:"planning",content:s.content}):s.type==="text"&&n.push({type:"text",content:s.content}))}return n}connectToEventLoop(e,r){if(e){let n=[],i=this.getSessionContext();n.push({type:"state",newState:"replay",abortable:!1,previousState:i.state}),this.#Q&&n.push(this.#Q),this.#z&&n.push(this.#z),n.push(...this.#de());let s=this.#L?Zo(this.#L):void 0;if(s)switch(s.type){case"file":case"diff":case"text":case"thinking":case"suggestion":case"tool":n.push({type:"start",id:s.id,name:s.type,filePath:s.filePath??"",title:s.actionTitle??s.artifactTitle??"",content:""}),n.push({type:"delta",name:s.type,delta:s.content});break}n.push({type:"terminals",terminals:this.#pe()});let o=this.#t?.devServerOrchestrator;o?(n.push({type:"dev-server",devServerState:o.devState,setupState:o.setupState,httpServerState:o.httpServerState,devCommand:o.devCommand,setupCommand:o.setupCommand,proxyServer:o.proxyTarget}),o.setupState!=="installed"&&n.push({type:"stdio",id:"setupCommand",command:o.setupCommand??"",content:o.getSetupWrite(),source:"run-command",stream:"stdout"}),n.push({type:"stdio",id:"devServer",command:o.devCommand,content:o.getDevWrite(),source:"run-command",stream:"stdout"})):r({type:"dev-server",devServerState:"running",setupState:"installed",httpServerState:"ok-2xx",devCommand:this.#n?.devCommand,setupCommand:this.#n?.setupCommand,proxyServer:this.#n?.serverUrl}),n.push({type:"state",newState:i.state,abortable:i.state==="generating",previousState:"replay"}),this.#P&&i.state!=="generating"&&n.push({type:"wait-for-input",state:i.state,suggestion:this.#B,sessionMode:i.sessionMode,hasPlanToApply:this.#$}),r({type:"batch",steps:n})}return this.#r.on("step",r),this.waitForEventLoop(),()=>{this.#r.off("step",r)}}waitUntilIdle(){return this.waitForEventLoop(),(0,Cb.once)(this.#r,"idle").then(()=>Promise.allSettled(this.#m)).then(()=>{})}waitForEventLoop(){return this.#P?this.#P:this.#P=this.#Fe()}async#Fe(){if(this.#P||this.#T)throw new Error("Event loop already started");let e=wDe(),r=a=>{a.type==="error"&&this.#F>0&&(uq.includes(a.code)||(a.restoreCredits=this.#F,this.#F=0,yDe(this.#e,this.#u,s.sessionId,a.restoreCredits).catch(c=>{this.#e.Sentry?.captureException(c)}))),this.#r.emit("step",a)};this.#T=new AbortController;let n=this.#T.signal,i=this.#t?.devServerOrchestrator,s=this.getSessionContext(),o=()=>this.getLastCompletionId();this.#e.Sentry?.setContext("codeGen",{sessionId:s.sessionId,get completionId(){return o()}}),await this.emitGitStatus(),i?.setupState==="not-installed"&&this.runSetupCommand();try{for(;!n.aborted;){this.#h=void 0;let a=this.getNextMessage();a.shouldWait&&await this.#w()&&this.#r.emit("idle");let c=await a.promise;if(n.aborted)break;if(c){try{this.#B=void 0,c.logsCheckpoint&&i?.addCheckpoint(),this.#h=new AbortController;let u=ru([n,this.#h.signal]);if(u?.aborted)throw Iv();this.#C("generating"),c.sessionMode&&c.sessionMode!==s.sessionMode&&this.switchSessionMode(c.sessionMode),await this.#ke(c,u,r),this.#C("success"),(c.autoPush??"none")!=="none"&&await this.pushChanges({actor:"agent",pullFirst:c.autoPush==="merge-push",forcePush:c.autoPush==="force-push"}),this.#B=void 0}catch(u){u instanceof Error?u.name==="AbortError"?(r({type:"user-abort",hasContinueMessage:!!this.#c}),this.#C("abort")):u instanceof Cs?(this.#g=void 0,r({type:"error",code:u.code,message:u.message}),uq.includes(u.code)||this.#e.Sentry?.captureException(u,{tags:{operation:"codegen-stream"}}),this.#C("error")):(this.#g=void 0,r({type:"error",code:"cli-genetic-error",message:u.message,metadata:{error:u}}),this.#e.Sentry?.captureException(u,{tags:{operation:"codegen-stream"}}),this.#C("error")):this.#C("error")}this.#me++}}}catch(a){throw this.#e.Sentry?.captureException(a,{level:"fatal"}),a}finally{this.#T=void 0,this.#P=void 0,e()}this.#r.emit("idle"),this.#C("close")}async#ke(e,r,n){this.#F=0;let i=this.getSessionContext(),s=e.maxCompletions??25,o=0,a=0,c=0,u=!0,l=!1;for(;;){if(r?.aborted)throw Iv();try{let p=await this.#Re(e,u,r,n);if(u=!1,p.modelOverride=e.modelOverride,p.user.role==="user"){let d=p.files.filter(f=>(f.importance??0)>2.5&&f.content).map(f=>({filePath:f.filePath,size:f.content?.length??0,isCustomInstruction:!1,wasIncluded:f.wasIncluded}));i.customInstructions.forEach(f=>{f.filePath&&d.push({filePath:f.filePath,size:f.content?.length??0,isCustomInstruction:!0,wasIncluded:!0})}),n({type:"user-input",prompt:p.userMessage?.displayPrompt??p.userPrompt,files:d})}try{let{shouldContinue:d,completions:f,filesChanged:m}=await this.#Ie(i,p,r,n);a=0,o++,l||=m,c+=f,this.#g=void 0;let g=await this.emitGitStatus();if(g){let y=this.getAiBranch();if(g.currentBranch!==y){if(c-1>=s){n({type:"error",code:"ask-to-continue",message:"The agent has been working for a while. Do you want to continue?"});break}u=!0,e={userPrompt:`Seems like the current git branch is ${g.currentBranch}, however, this is a broken state in Fusion. Make sure to git checkout into "${y}", before finishing.`,displayPrompt:""};continue}}if(!d)break;if(!r.aborted){let y=this.getScheduledMessage();if(y){u=!0,e=y,c=0;continue}}if(c>=s){n({type:"error",code:"ask-to-continue",message:"The agent has been working for a while. Do you want to continue?"});break}}catch(d){throw await this.emitGitStatus(),d}}catch(p){if(a<2&&(p instanceof Cs&&p.code==="abrupt-end"||p instanceof Error&&p.name==="HTTPStreamBroke"||p instanceof Error&&p.name==="HTTPStreamHang")){a++;continue}throw p}finally{gDe(i.turns);let p=this.#n?.refreshPreview??!0;l&&p&&this.requestRefresh()}}}async#Ie(e,r,n,i){if(this.#L)throw new Error("generateCompletion already started");let s=this.getLastTurn()?.nextUrl??this.#X,o=!1,a=0;i({type:"start",id:"",name:"thinking",title:"Thinking",content:""});try{let c=this.#L=[],u=await this.getCurrentCommitHash();!e.beforeCommit&&u&&(e.beforeCommit=u);let l=this.#se;l&&this.#D?.encrypt&&(l=!!this.#D.mcpServers);let p=r.userMessage?.uiContextPrompt;if(p&&!this.#b()){let v=this.#n?.workspace?.folders.find(D=>D.enableGit);v?.path&&(p=`Relative file paths are relative to: ${v.path}/`)}let d={url:s,position:this.#U,eventName:"cli code",maxPages:2,autoContinue:1,codeGenMode:this.#q,userContext:{...e.userContext,fullstoryUrl:r.userMessage?.metadata?.fullstoryUrl},files:r.files,maxTokens:this.#ie,aclPolicy:this.#n?.accessControl,repoIndexingConfig:this.#n?.repoIndexingConfig,recommendedRoot:this.#n?.workspace?.folders.find(v=>v.enableGit)?.recommendedRoot,attachments:r.attachments,customInstructions:e.customInstructions,sessionId:e.sessionId,userPrompt:r.userPrompt,ephemeralUserPrompt:r.userMessage?.ephemeralUserPrompt,uiContextPrompt:r.userMessage?.uiContextPrompt,displayUserPrompt:r.userMessage?.displayPrompt,isManualContinue:r.userMessage?.isManualContinue,sessionMode:r.userMessage?.sessionMode,projectId:this.#E,branchName:this.#V,pingEvents:!0,workingDirectory:this.#f,beforeCommit:u,toolResults:r.toolResults,role:r.user.role,user:r.user,repair:r.repair,category:r.category,enabledTools:this.#a,enabledMCPs:l?r.enabledMCPs:void 0,localMCPTools:this.#A?.listTools(),searchResponse:r.searchResponse,encryptKey:this.#O,maxAgentTiming:180*1e3,mcpServers:l,environmentVariables:TDe(this.#n?.environmentVariables??[],this.#t?.devServerOrchestrator?.environmentVariables??[]),dirtyEnvironmentVariables:this.#K&&r.user.role==="user",redactUserMessages:this.#D?.redactUserMessages,redactLLMMessages:this.#D?.redactLLMMessages,modelOverride:r.modelOverride??this.#oe,metadata:r.userMessage?.metadata};this.#o&&console.log("Starting completion stream");let f=vDe(this.#e,this.#u,d,n),m,g=!1,y=!1;for await(let v of f){let D=async b=>{if(b.type==="user"){let C=m={state:"running",unixTime:Date.now(),title:"",sentiment:void 0,userMessage:r.userMessage,afterCommit:u,beforeCommit:u,lastCommit:void 0,creditsUsed:0,actions:[],applyResults:[],completionId:b.id??"",nextUrl:void 0,user:b.user,autoContinue:!1};m=C,e.turns.push(C),b.compacting&&(e.customInstructions=await this.#J()),i({type:"user",displayPrompt:b.displayPrompt,id:b.id,user:b.user,role:b.user.role,compacting:b.compacting})}else if(b.type==="mcp-status")this.#Q=b,i(b);else{if(b.type==="mcp-auth-required")return y=!0,i(b),!0;if(b.type==="error")return y=!0,i(b),!0;if(b.type==="done"){a++,this.#F+=b.creditsUsed;let C=m=await this.#Oe(e,b,m,u);for(let A of b.actions??[])A.type==="tool_result"&&i({type:"tool_result",result:{content:A.content,tool_use_id:A.id,type:"tool_result",title:A.actionTitle,tool_name:A.filePath,is_error:!!A.errors?.length}});C.applyResults.length>0&&this.#t?.devServerOrchestrator?.addCheckpoint();let w=await this.#$e(this.#e,C),F=w.length>0,P=await this.commitWorkInProgress(C,w),_=!1;P?(F=!0,C.afterCommit=P,u=P):P===void 0&&(_=!0),F&&(o=!0),r.user.role==="user"&&(this.#K=!1),this.#I({completionId:C.completionId,beforeCommit:C.beforeCommit,afterCommit:C.afterCommit,commitFailed:_}),i({type:"done",stopReason:b.stopReason,id:b.id,applyResults:C.applyResults,actions:b.actions??[],creditsUsed:b.creditsUsed,sessionUsage:b.sessionUsage,model:b.model,usage:b.usage,url:b.nextUrl,promptVersion:b.promptVersion,hasChanges:F})}else{if(b.type==="continue")return g=b.autoContinue,y=!0,i({type:"continue",id:b.id,url:b.nextUrl,autoContinue:b.autoContinue}),!0;b.type==="thinking"&&(b.actionTitle="Planning"),"content"in b&&b.type!=="delta"&&i({type:"start",name:b.type,filePath:b.filePath??"",id:"id"in b?b.id:void 0,title:b.actionTitle??b.artifactTitle??b.filePath??"",content:b.content??""})}}return!1},E=async b=>{b.type==="thinking"&&i({type:"planning",content:b.content}),b.type==="server_tool_result"&&i({type:"server_tool_result",content:JSON.parse(b.content),title:b.actionTitle??b.artifactTitle??"Server Tool Result",id:b.id}),b.type==="file"&&b.filePath&&!b.synthetic&&i({type:"file",filePath:b.filePath,content:b.content,title:b.actionTitle??b.artifactTitle??"Created",id:b.id,errors:b.errors}),b.type==="diff"&&b.filePath&&!b.synthetic&&i({type:"diff",filePath:b.filePath,title:b.actionTitle??b.artifactTitle??"Updated",content:b.content,id:b.id,errors:b.errors}),b.type==="tool"&&b.filePath?i({type:"tool",name:b.filePath,id:b.id,content:b.content}):b.type==="text"&&i({type:"text",content:b.content})},x=async(b,C)=>{i({type:"delta",name:b.type,delta:C})};if(v.type==="ping"){this.#o&&console.log("generateCompletion: Ping");continue}if(v.type==="delta"){let b=v.content,C=Zo(c);C&&"content"in C&&(C.content+=b,await x(C,b))}else{let b=Zo(c);if(b&&"content"in b&&(b.incomplete=!1,await E(b)),c.push(v),await D(v))break}}if(!y)throw new Cs("Completion stream ended abruptly","abrupt-end");return m?{completions:a,filesChanged:o,shouldContinue:g||m.actions.some(v=>v.type==="tool")||m.autoContinue}:{completions:a,shouldContinue:!1,filesChanged:o}}finally{this.#L=void 0}}async commitWorkInProgress(e,r){if(!this.#t?.git)return!1;let n=await this.#k();if(n&&r.length===0||await this.isCleanWorkTree())return!1;try{n?await this.git(["add",...r]):await this.git(["add","."]);let s=`${e.title}
|
|
1900
1900
|
${e.completionId}`.split(`
|
|
1901
1901
|
`).flatMap(a=>["-m",a]);return await this.git(["commit","--allow-empty","--quiet","--no-verify",...s]),await this.getCurrentCommitHash()}catch(i){n||this.#e.Sentry?.captureException(new Error("Error commiting work in progress",{cause:i}),{tags:{operation:"codegen-git"}})}}async#Ne(e,r,n,i){let s=r.actions.filter(o=>o.type==="tool"&&o.id).map(o=>{let a=o.content.trim(),c={};try{c=a?JSON.parse(a):{}}catch{c={}}return{id:o.id,name:o.filePath,input:c,abortController:this.#y.find(u=>u.id===o.id)?.abortController??new AbortController}})??[];if(s.length>0){this.#y=s;try{let o={sys:this.#e,credentials:this.#u,files:e.files,user:e.user,position:this.#U,fusionConfig:this.#n,signal:n,canCollapseWorkspace:this.#b(),emitter:this.#r,filterText:c=>(c=x3(c,this.#f),this.#n?.accessControl?.secrets&&(c=D3(c,this.#n.accessControl.secrets)),c),allowedCommands:O$(this.#n?.allowedCommands??[]),getAllFiles:c=>this.getAllFiles({getDotFiles:c.getDotFiles,includePattern:c.pattern,gitignore:!0}),workingDirectory:this.#s,bashWorkingDirectory:this.#f,workspaceFolders:this.#i?.folders??[],restore:c=>this.restore(c),patchFusionConfig:c=>{e.patchFusionConfig||(e.patchFusionConfig={});let u=e.patchFusionConfig.envVariables;Object.assign(e.patchFusionConfig,c),e.patchFusionConfig.envVariables={...u,...c.envVariables}},readFile:c=>this.readFile(c),writeFile:(c,u)=>this.writeFile(c,u),deleteFile:c=>this.deleteFile(c),fileExists:c=>this.fileExists(c),listDir:c=>this.listDir(c),evaluateAccess:(c,u)=>ao(c,u,this.#n?.accessControl,this.#S()),stat:c=>this.stat(c),localMCPManager:this.#A,passThrough:(c,u)=>{let l={toolResult:"Aborted by the user. So the task could not be completed.",isError:!0,title:"Aborted by the user."};return new Promise(p=>{let d=()=>{u.removeEventListener("abort",f),this.#G.delete(c.id)},f=()=>{d(),p(l)};if(u.aborted){f();return}u.addEventListener("abort",f,{once:!0}),this.#G.set(c.id,m=>{d(),p(m)}),this.#r.emit("step",{type:"tool-call-request",id:c.id,name:c.name,input:c.input})})},resolveWorkspacePath:(c,u)=>this.resolveWorkspacePath(c,u),absolutePathToWorkspaceUrl:c=>this.absolutePathToWorkspaceUrl(c),setHasPlanToApply:c=>{this.#$=c},...this.#t},a=await t5(o,s,r.cachedToolResults,i);if(r.cachedToolResults=a,o.signal?.aborted)throw Iv();e.patchFusionConfig&&this.#r.emit("step",{type:"fusion-config-patch",patch:e.patchFusionConfig}),e.files=o.files,e.toolResults=a}finally{this.#y=[]}}}async#Re(e,r,n,i){let s=this.getSessionContext(),o=Zo(s.turns),a=structuredClone(e.user??o?.user??{source:"agent",role:"agent"}),c={userMessage:void 0,userPrompt:"",files:[],attachments:[],searchResponse:null,rerankFiles:0,mostRelevantFile:null,toolResults:[],user:a,modelOverride:e.modelOverride,repair:e.repair,category:e.category,enabledMCPs:e.enabledMCPs},u=!!this.getLastTurn()?.nextUrl,l=s.turns.length<2||!u;if(r){let d=null;if(l){let D=function(x){return y&&EDe(x)?5:g.has(x)||v.some(b=>x.toLowerCase().startsWith(b.toLowerCase()))?2:0};var p=D;let f=W6(await this.getAllFiles({getDotFiles:!1,gitignore:!0})),m=new Set,g=new Set;if(e.files)for(let x of e.files)m.add(y3(x));let y=e.includeBaseFiles??s.turns.length===0,v=Array.from(m),E=n.aborted?[]:f.map(x=>{let b=D(x);if(b===0)return{filePath:x};let C=null;try{if(C=this.readFileSync(x),!C)return{filePath:x}}catch{return{filePath:x}}let w=C.length<3e4;return{filePath:x,content:C,importance:w?b:2}});c.files=E,c.attachments=e.attachments??[]}if(this.#t?.git){let f,m=await this.getChangesReport();if(m){for(let g of m.files)if(!c.files.some(y=>y.filePath===g))try{let y=await this.readFile(g);c.files.push({filePath:g,importance:0,content:y??void 0})}catch{c.files.push({filePath:g,importance:0})}m.diff.length<3e4?f=m.diff:f=m.files.map(g=>`- ${g}`).join(`
|
|
1902
1902
|
`).trim().slice(0,3e4),f&&(c.userPrompt=`
|
|
@@ -1909,7 +1909,7 @@ ${c.userPrompt}`)}}c.userMessage=e,c.userPrompt=e.userPrompt,c.attachments=e.att
|
|
|
1909
1909
|
`).length,content:"",oldContent:p});else{let f=d$(p,a.content);o.applyResults.push({action:"update",filePath:c,addedLines:f.filter(m=>m.added).reduce((m,g)=>m+(g.count??0),0),removedLines:f.filter(m=>m.removed).reduce((m,g)=>m+(g.count??0),0),content:a.content,oldContent:p})}else l&&!d?o.applyResults.push({action:"update",filePath:c,addedLines:0,removedLines:0,content:a.content,oldContent:void 0}):o.applyResults.push({action:"create",filePath:c,addedLines:a.content.split(`
|
|
1910
1910
|
`).length,removedLines:0,content:a.content,oldContent:""})}}return o}#fe(){let e=this.getSessionContext(),r=e.beforeCommit,n=e.turns.findLast(s=>s.afterCommit??s.beforeCommit),i=n?.afterCommit??n?.beforeCommit;return r&&i&&r!==i?!0:e.turns.some(s=>s.applyResults.length>0)}async#Be(){try{let e="{/* TODO: FUSION_GENERATION_APP_PLACEHOLDER replace everything here with the actual app! */}",r=await this.#e.readFile(this.resolveWorkspacePath("client/pages/Index.tsx",!0).resolvedPath);if((await this.#e.readFile(this.resolveWorkspacePath("client/App.tsx",!0).resolvedPath))?.includes('<Route path="/" element={<Index />} />')&&r&&r.includes(e))return!0}catch{}return!1}#Me(e){let r=e.toLowerCase(),n=[".next/","dist/","build/","out/","node_modules/",".cache/","coverage/","__pycache__/","target/","vendor/",".gradle/",".build/"],i=[".gz",".zip",".tar",".tgz",".7z",".rar",".pack",".bin",".exe",".dll",".so",".dylib",".o",".a",".jar",".class",".pyc",".pyo",".wasm",".png",".jpg",".jpeg",".gif",".ico",".webp",".svg",".mp4",".mp3",".wav",".pdf",".woff",".woff2",".ttf",".eot",".map",".min.js",".min.css",".bundle.js",".chunk.js",".tsbuildinfo"];for(let s of n)if(r.includes(s))return!0;for(let s of i)if(r.endsWith(s))return!0;return!!(r.endsWith("package-lock.json")||r.endsWith("yarn.lock")||r.endsWith("pnpm-lock.yaml")||r.endsWith(".lock"))}async getChangesReport(){if(this.#t?.git)try{let r=this.getSessionContext().turns.findLast(l=>l.actions.some(p=>p.type==="file"||p.type==="diff"))?.afterCommit;if(!r)return;let s=(await this.git(["--no-pager","diff","--name-only",r])).trim().split(`
|
|
1911
1911
|
`).map(l=>l.trim()).filter(l=>l).filter(l=>!this.#Me(l)),o=s.map(l=>this.absolutePathToWorkspaceUrl(this.#e.join(this.#l,l))).filter(l=>l!=null);if(s.length===0)return{files:[],diff:""};let a=await this.git(["--no-pager","diff","-U0","--no-color",r,"--",...s]).then(l=>l.trim()),c="",u=this.gitEnabledFolder;return u&&!this.#b()&&a.length>0&&(c=`Notice that all the relative paths, are inside "${u.name}/", remember that when using Read/Write/Edit tools:
|
|
1912
|
-
`),{files:o,diff:B$(`${c}${a}`,1e4)}}catch(e){this.#e.Sentry?.captureException(e,{tags:{operation:"codegen-git"}});return}}#Le(){return["status","--porcelain=v1","-z","--ignore-submodules=dirty"]}async isCleanWorkTree(){try{return(await this.git(this.#Le())).trim().length===0}catch{return!1}}async#$e(e,r){let n=r.applyResults,i=[];for(let s of n)try{if(s.action==="delete"){let o=await this.deleteFile(s.filePath);o&&i.push(o)}else if(s.content){let o=await this.writeFile(s.filePath,s.content);o&&(this.#
|
|
1912
|
+
`),{files:o,diff:B$(`${c}${a}`,1e4)}}catch(e){this.#e.Sentry?.captureException(e,{tags:{operation:"codegen-git"}});return}}#Le(){return["status","--porcelain=v1","-z","--ignore-submodules=dirty"]}async isCleanWorkTree(){try{return(await this.git(this.#Le())).trim().length===0}catch{return!1}}async#$e(e,r){let n=r.applyResults,i=[];for(let s of n)try{if(s.action==="delete"){let o=await this.deleteFile(s.filePath);o&&i.push(o)}else if(s.content){let o=await this.writeFile(s.filePath,s.content);o&&(this.#te.add(o),i.push(o))}}catch(o){e.Sentry?.captureException(o)}return i}#je(){return this.#i?.folders?.length===1&&this.#i.folders[0].name==="."}#b(){return this.#i?.folders?.length===1||!this.#i?.folders?.length}resolveWorkspacePath(e,r){return u5({filePath:e,forceWorkspace:r,workspace:this.#i,workingDirectory:this.#s,sys:this.#e,canCollapseWorkspace:this.#b()})}#S(){try{let e=this.getSessionContext();return Zo(e.turns)?.user.principals}catch{return}}absolutePathToWorkspaceUrl(e){return l5({absolutePath:e,workspace:this.#i,workingDirectory:this.#s,sys:this.#e,canCollapseWorkspace:this.#b()})}async readFile(e,r){if(!r){let n=ao(e,"read",this.#n?.accessControl,this.#S());if(!n.allowed)throw new Tt(`ACL denied: ${n.message}`)}try{if(e==="AGENTS.md"&&this.#i?.agentsMD)return this.#i.agentsMD;let{resolvedPath:n}=this.resolveWorkspacePath(e,!!r);if(await this.#e.exists(n))return await this.#e.readFile(n);if({resolvedPath:n}=this.resolveWorkspacePath(e,!0),await this.#e.exists(n))return await this.#e.readFile(n)}catch(n){this.#e.Sentry?.captureException(n,{extra:{filePath:e}})}return null}async fileExists(e){try{if(e==="AGENTS.md"&&this.#i?.agentsMD)return{absolutePath:e,recommendedPath:void 0,workspaceFolder:void 0,virtual:!0};let{resolvedPath:r,workspaceFolder:n}=this.resolveWorkspacePath(e,!1);return await this.#e.exists(r)?{absolutePath:r,recommendedPath:void 0,workspaceFolder:n,virtual:!1}:n?{absolutePath:void 0,recommendedPath:void 0,workspaceFolder:n,virtual:!1}:({resolvedPath:r,workspaceFolder:n}=this.resolveWorkspacePath(e,!0),await this.#e.exists(r)?{absolutePath:r,recommendedPath:r,workspaceFolder:n,virtual:!1}:{absolutePath:void 0,recommendedPath:r,workspaceFolder:n,virtual:!1})}catch(r){this.#e.Sentry?.captureException(r,{extra:{filePath:e}})}return{absolutePath:void 0,recommendedPath:void 0,workspaceFolder:void 0,virtual:!1}}readFileSync(e,r){if(!r){let n=ao(e,"read",this.#n?.accessControl,this.#S());if(!n.allowed)throw new Tt(`ACL denied: ${n.message}`)}try{if(e==="AGENTS.md"&&this.#i?.agentsMD)return this.#i.agentsMD;let{resolvedPath:n}=this.resolveWorkspacePath(e,!1);if(this.#e.existsSync(n))return this.#e.readFileSync(n);if({resolvedPath:n}=this.resolveWorkspacePath(e,!0),this.#e.existsSync(n))return this.#e.readFileSync(n)}catch(n){this.#e.Sentry?.captureException(n,{extra:{filePath:e}})}return null}async writeFile(e,r,n){if(!n){let i=ao(e,"write",this.#n?.accessControl,this.#S());if(!i.allowed)throw new Tt(`ACL denied: ${i.message}`)}try{let{resolvedPath:i}=this.resolveWorkspacePath(e,!!n);return await this.#e.writeFile(i,r),i}catch(i){return this.#e.Sentry?.captureException(i,{extra:{filePath:e}}),null}}async listDir(e){let r=ao(e,"list",this.#n?.accessControl,this.#S());if(!r.allowed)throw new Tt(`ACL denied: ${r.message}`);try{let{resolvedPath:n,workspaceFolder:i}=this.resolveWorkspacePath(e,!1);if(!await this.#e.exists(n))return[];let o=(await(0,gq.readdir)(n,{withFileTypes:!0})).map(a=>a.name+(a.isDirectory()?"/":""));if(this.#je())return tm({files:o.map(a=>this.#e.join(e,a).replace(/^\.\//,"")),policy:this.#n?.accessControl});if(i&&this.#i?.folders){let a=i.name||i.path;return tm({files:o.map(c=>`${a}/${this.#e.join(e,c).replace(/^\.\//,"")}`),policy:this.#n?.accessControl})}return tm({files:o,policy:this.#n?.accessControl})}catch(n){return this.#e.Sentry?.captureException(n,{extra:{dirPath:e}}),[]}}async stat(e,r){if(!r){let n=ao(e,"read",this.#n?.accessControl,this.#S());if(!n.allowed)throw new Tt(`ACL denied: ${n.message}`)}try{let{resolvedPath:n}=this.resolveWorkspacePath(e,!1);if(await this.#e.exists(n))return await this.#e.stat(n)}catch(n){this.#e.Sentry?.captureException(n,{extra:{filePath:e}})}return null}async deleteFile(e,r){if(!r){let n=ao(e,"write",this.#n?.accessControl,this.#S());if(!n.allowed)throw new Tt(`ACL denied: ${n.message}`)}try{let{resolvedPath:n}=this.resolveWorkspacePath(e,!!r);return await this.#e.exists(n)?(await this.#e.unlink(n),n):null}catch(n){return this.#e.Sentry?.captureException(n,{extra:{filePath:e}}),null}}getLinesStats(){let e=this.#p?.turns.reduce((r,n)=>{let i=n.applyResults.reduce((s,o)=>({added:s.added+o.addedLines,removed:s.removed+o.removedLines}),{added:0,removed:0});return{added:r.added+i.added,removed:r.removed+i.removed}},{added:0,removed:0})??{added:0,removed:0};return{...e,net:e.added-e.removed}}async getDiffFromRemote({numberOfContextLines:e,includeFilesOnly:r,filePaths:n}){if(!this.#t?.git)return[];try{let i=(await this.git(["branch","--show-current"])).trim();if(!i)throw new Error("Could not determine current branch");let s=!1;try{s=(await this.git(["remote"])).includes("origin")}catch(l){throw console.warn("No git remotes configured, cannot get diff from remote"),l}if(!s){console.warn("Origin remote not found, trying to get diff from main branch");try{return await this.getDiffFromParentBranch({numberOfContextLines:e,includeFilesOnly:r,filePaths:n})}catch(l){throw console.warn("Failed to get diff from main branch:",l),l}}let o=!1,a;try{let l=`origin/${i}`;if(o=(await this.git(["ls-remote","--heads","origin",i])).trim().length>0,o)a=l;else return await this.getDiffFromParentBranch({numberOfContextLines:e,includeFilesOnly:r,filePaths:n})}catch(l){throw console.warn("Failed to check remote branches:",l),l}let c=["diff",a];r?c.push("--name-status"):e!==void 0&&c.push(`-U${e}`),c.push("--"),n&&n.length>0&&c.push(...n);let u=await this.git(c);return!u||u.trim()===""?[]:GT(u,r)}catch(i){throw console.error("getDiffFromRemote error:",i),i}}async getDiff({mode:e="remote-parent-branch",numberOfContextLines:r,includeFilesOnly:n,filePaths:i}){if(!this.#t?.git)return{state:"error",error:new Error("Git not configured")};try{switch(e){case"remote-parent-branch":return{state:"success",diff:await this.getDiffFromParentBranch({numberOfContextLines:r,includeFilesOnly:n,filePaths:i})};case"remote-current-branch":return{state:"success",diff:await this.getDiffFromRemote({numberOfContextLines:r,includeFilesOnly:n,filePaths:i})};default:throw new Error(`Unknown diff mode: ${e}`)}}catch(s){return console.error(`getDiff error for mode '${e}':`,s),this.#e.Sentry?.captureException(s),{state:"error",error:s instanceof Error?s:new Error(String(s))}}}async getDefaultBranch(){try{let r=(await this.git(["remote","show","origin"])).match(/HEAD branch: (.+)/);if(r)return`origin/${r[1].trim()}`}catch{}try{if((await this.git(["ls-remote","--heads","origin","main"])).trim().length>0)return"origin/main"}catch{}try{if((await this.git(["ls-remote","--heads","origin","master"])).trim().length>0)return"origin/master"}catch{}try{let r=(await this.git(["ls-remote","--heads","origin"])).trim().split(`
|
|
1913
1913
|
`).map(n=>n.split(" ")[1]).filter(n=>n&&!n.includes("HEAD"));if(r.length>0)return`origin/${r[0].replace("refs/heads/","")}`}catch{}throw new Error("Could not determine default branch. No remote branches found.")}async getDiffFromParentBranch({numberOfContextLines:e,includeFilesOnly:r,filePaths:n}){try{if(!(await this.git(["branch","--show-current"])).trim())throw new Error("Could not determine current branch");let s=await this.getDefaultBranch();if(!s)throw new Error("Could not find parent branch (main/master)");try{await this.git(["fetch",...s.split("/")])}catch(c){throw console.warn(`Failed to fetch remote ${s}:`,c),c}let o=["diff",s];r?o.push("--name-status"):e!==void 0&&o.push(`-U${e}`),o.push("--"),n&&n.length>0&&o.push(...n);let a=await this.git(o);return!a||a.trim()===""?[]:GT(a,r)}catch(i){throw console.error("getDiffFromParentBranch error:",i),i}}};xDe=t=>{if(!t)return{id:void 0,isInitial:!0};let e=new URL(t);return e.protocol==="cgen:"?{isInitial:!1,id:e.pathname.slice(1)}:{isInitial:!0,id:void 0}};mp=class extends Error{code;stdout;stderr;command;constructor(e,r,n,i,s){super(`${e} failed with code ${r}
|
|
1914
1914
|
|
|
1915
1915
|
${n}
|
|
@@ -2278,7 +2278,7 @@ Please see the 3.x to 4.x migration guide for details on how to update your app.
|
|
|
2278
2278
|
`)+`\r
|
|
2279
2279
|
\r
|
|
2280
2280
|
`+r)}function Gu(t,e,r,n,i,s){if(t.listenerCount("wsClientError")){let o=new Error(i);Error.captureStackTrace(o,Gu),t.emit("wsClientError",o,r,e)}else Ph(r,n,i,s)}});var IQ=S((sut,kQ)=>{h();var sF=class{constructor(e,r,n){this.etaBufferLength=e||100,this.valueBuffer=[n],this.timeBuffer=[r],this.eta="0"}update(e,r,n){this.valueBuffer.push(r),this.timeBuffer.push(e),this.calculate(n-r)}getTime(){return this.eta}calculate(e){let r=this.valueBuffer.length,n=Math.min(this.etaBufferLength,r),i=this.valueBuffer[r-1]-this.valueBuffer[r-n],s=this.timeBuffer[r-1]-this.timeBuffer[r-n],o=i/s;this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);let a=Math.ceil(e/o/1e3);isNaN(a)?this.eta="NULL":isFinite(a)?a>1e7?this.eta="INF":a<0?this.eta=0:this.eta=a:this.eta="INF"}};kQ.exports=sF});var aF=S((aut,NQ)=>{h();var Vu=require("readline"),oF=class{constructor(e){this.stream=e,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("\x1B7")}cursorRestore(){this.stream.isTTY&&this.stream.write("\x1B8")}cursor(e){this.stream.isTTY&&(e?this.stream.write("\x1B[?25h"):this.stream.write("\x1B[?25l"))}cursorTo(e=null,r=null){this.stream.isTTY&&Vu.cursorTo(this.stream,e,r)}cursorRelative(e=null,r=null){this.stream.isTTY&&(this.dy=this.dy+r,Vu.moveCursor(this.stream,e,r))}cursorRelativeReset(){this.stream.isTTY&&(Vu.moveCursor(this.stream,0,-this.dy),Vu.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&Vu.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&Vu.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&Vu.clearScreenDown(this.stream)}newline(){this.stream.write(`
|
|
2281
|
-
`),this.dy++}write(e,r=!1){this.linewrap===!0&&r===!1?this.stream.write(e.substr(0,this.getWidth())):this.stream.write(e)}lineWrapping(e){this.stream.isTTY&&(this.linewrap=e,e?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};NQ.exports=oF});var OQ=S((uut,RQ)=>{"use strict";h();RQ.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var MQ=S((put,BQ)=>{"use strict";h();var _Ne=OQ();BQ.exports=t=>typeof t=="string"?t.replace(_Ne(),""):t});var $Q=S((fut,cF)=>{"use strict";h();var LQ=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);cF.exports=LQ;cF.exports.default=LQ});var UQ=S((hut,jQ)=>{"use strict";h();jQ.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var zQ=S((yut,uF)=>{"use strict";h();var FNe=MQ(),kNe=$Q(),INe=UQ(),qQ=t=>{if(typeof t!="string"||t.length===0||(t=FNe(t),t.length===0))return 0;t=t.replace(INe()," ");let e=0;for(let r=0;r<t.length;r++){let n=t.codePointAt(r);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,e+=kNe(n)?2:1)}return e};uF.exports=qQ;uF.exports.default=qQ});var lF=S((but,GQ)=>{h();GQ.exports=function(e,r,n){if(r.autopadding!==!0)return e;function i(s,o){return(r.autopaddingChar+s).slice(-o)}switch(n){case"percentage":return i(e,3);default:return e}}});var pF=S((Dut,HQ)=>{h();HQ.exports=function(e,r){let n=Math.round(e*r.barsize),i=r.barsize-n;return r.barCompleteString.substr(0,n)+r.barGlue+r.barIncompleteString.substr(0,i)}});var dF=S((Cut,VQ)=>{h();VQ.exports=function(e,r,n){function i(o){return n?n*Math.round(o/n):o}function s(o){return(r.autopaddingChar+o).slice(-2)}return e>3600?s(Math.floor(e/3600))+"h"+s(i(e%3600/60))+"m":e>60?s(Math.floor(e/60))+"m"+s(i(e%60))+"s":e>10?s(i(e))+"s":s(e)+"s"}});var fF=S((Sut,KQ)=>{h();var NNe=zQ(),RNe=lF(),ONe=pF(),BNe=dF();KQ.exports=function(e,r,n){let i=e.format,s=e.formatTime||BNe,o=e.formatValue||RNe,a=e.formatBar||ONe,c=Math.floor(r.progress*100)+"",u=r.stopTime||Date.now(),l=Math.round((u-r.startTime)/1e3),p=Object.assign({},n,{bar:a(r.progress,e),percentage:o(c,e,"percentage"),total:o(r.total,e,"total"),value:o(r.value,e,"value"),eta:o(r.eta,e,"eta"),eta_formatted:s(r.eta,e,5),duration:o(l,e,"duration"),duration_formatted:s(l,e,1)});i=i.replace(/\{(\w+)\}/g,function(m,g){return typeof p[g]<"u"?p[g]:m});let d=Math.max(0,r.maxWidth-NNe(i)-2),f=Math.floor(d/2);switch(e.align){case"right":i=d>0?" ".repeat(d)+i:i;break;case"center":i=f>0?" ".repeat(f)+i:i;break;case"left":default:break}return i}});var e0=S((Put,WQ)=>{h();function Gt(t,e){return typeof t>"u"||t===null?e:t}WQ.exports={parse:function(e,r){let n={},i=Object.assign({},r,e);return n.throttleTime=1e3/Gt(i.fps,10),n.stream=Gt(i.stream,process.stderr),n.terminal=Gt(i.terminal,null),n.clearOnComplete=Gt(i.clearOnComplete,!1),n.stopOnComplete=Gt(i.stopOnComplete,!1),n.barsize=Gt(i.barsize,40),n.align=Gt(i.align,"left"),n.hideCursor=Gt(i.hideCursor,!1),n.linewrap=Gt(i.linewrap,!1),n.barGlue=Gt(i.barGlue,""),n.barCompleteChar=Gt(i.barCompleteChar,"="),n.barIncompleteChar=Gt(i.barIncompleteChar,"-"),n.format=Gt(i.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=Gt(i.formatTime,null),n.formatValue=Gt(i.formatValue,null),n.formatBar=Gt(i.formatBar,null),n.etaBufferLength=Gt(i.etaBuffer,10),n.etaAsynchronousUpdate=Gt(i.etaAsynchronousUpdate,!1),n.progressCalculationRelative=Gt(i.progressCalculationRelative,!1),n.synchronousUpdate=Gt(i.synchronousUpdate,!0),n.noTTYOutput=Gt(i.noTTYOutput,!1),n.notTTYSchedule=Gt(i.notTTYSchedule,2e3),n.emptyOnZero=Gt(i.emptyOnZero,!1),n.forceRedraw=Gt(i.forceRedraw,!1),n.autopadding=Gt(i.autopadding,!1),n.gracefulExit=Gt(i.gracefulExit,!1),n},assignDerivedOptions:function(e){return e.barCompleteString=e.barCompleteChar.repeat(e.barsize+1),e.barIncompleteString=e.barIncompleteChar.repeat(e.barsize+1),e.autopaddingChar=e.autopadding?Gt(e.autopaddingChar," "):"",e}}});var mF=S((Fut,YQ)=>{h();var JQ=IQ(),MNe=aF(),LNe=fF(),$Ne=e0(),jNe=require("events");YQ.exports=class extends jNe{constructor(e){super(),this.options=$Ne.assignDerivedOptions(e),this.terminal=this.options.terminal?this.options.terminal:new MNe(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new JQ(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:LNe}render(e=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let n=this.formatter(this.options,r,this.payload);(e||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=n)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(n),this.terminal.clearRight(),this.lastDrawnString=n,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(e,r,n){this.value=r||0,this.total=typeof e<"u"&&e>=0?e:100,this.startValue=r||0,this.payload=n||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new JQ(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",e,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(e,r={}){typeof e=="number"&&(this.value=e,this.eta.update(Date.now(),e,this.total));let n=(typeof e=="object"?e:r)||{};this.emit("update",this.total,this.value);for(let i in n)this.payload[i]=n[i];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let e=this.value/this.total;return this.options.progressCalculationRelative&&(e=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(e)&&(e=this.options&&this.options.emptyOnZero?0:1),e=Math.min(Math.max(e,0),1),e}increment(e=1,r={}){typeof e=="object"?this.update(this.value+1,e):this.update(this.value+e,r)}getTotal(){return this.total}setTotal(e){typeof e<"u"&&e>=0&&(this.total=e)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var QQ=S((Nut,XQ)=>{h();var UNe=mF(),qNe=e0();XQ.exports=class extends UNe{constructor(e,r){super(qNe.parse(e,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(e,r){this.timer&&(super.update(e,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(e,r,n){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(e,r,n),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var eZ=S((But,ZQ)=>{h();var zNe=aF(),GNe=mF(),HNe=e0(),VNe=require("events");ZQ.exports=class extends VNe{constructor(e,r){super(),this.bars=[],this.options=HNe.parse(e,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new zNe(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(e,r,n,i={}){let s=new GNe(Object.assign({},this.options,{terminal:this.terminal},i));return this.bars.push(s),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,s.start(e,r,n),this.emit("start")),s}remove(e){let r=this.bars.indexOf(e);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let e=0;e<this.bars.length;e++)e>0&&this.terminal.newline(),this.bars[e].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(e=>e.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let e=0;e<this.bars.length;e++)e>0&&this.terminal.newline(),this.bars[e].render(),this.bars[e].stop();this.terminal.newline()}this.emit("stop")}log(e){this.loggingBuffer.push(e)}}});var rZ=S((Lut,tZ)=>{h();tZ.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var iZ=S((jut,nZ)=>{h();nZ.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var oZ=S((qut,sZ)=>{h();sZ.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var cZ=S((Gut,aZ)=>{h();aZ.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var lZ=S((Vut,uZ)=>{h();var KNe=rZ(),WNe=iZ(),JNe=oZ(),YNe=cZ();uZ.exports={legacy:KNe,shades_classic:WNe,shades_grey:JNe,rect:YNe}});var fZ=S((Wut,dZ)=>{h();var pZ=QQ(),XNe=eZ(),QNe=lZ(),ZNe=fF(),eRe=lF(),tRe=pF(),rRe=dF();dZ.exports={Bar:pZ,SingleBar:pZ,MultiBar:XNe,Presets:QNe,Format:{Formatter:ZNe,BarFormat:tRe,ValueFormat:eRe,TimeFormat:rRe}}});var bZ=S((alt,vZ)=>{h();vZ.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var PRe={};Mh(PRe,{default:()=>TRe});module.exports=Eee(PRe);h();h();try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="eb39f874-52a1-498d-89ea-71d1bd31f873",t._sentryDebugIdIdentifier="sentry-dbid-eb39f874-52a1-498d-89ea-71d1bd31f873")}catch{}h();var JZ=require("../core/index.cjs"),YZ=require("../node/index.cjs"),XZ=require("../server/index.cjs"),QZ=Y(RF(),1);h();h();var kb=require("fs/promises");Td();nn();cp();Yt();var ar=Y(mr(),1),Op=require("node:path");Mi();yi();Hr();_r();Uc();var nEe="https://cdn.builder.io",Hq=async(t,e)=>{console.log(""),Et((0,ar.bgCyan)((0,ar.bold)((0,ar.white)(" figma migrate ")))+" "+(0,ar.dim)(Xe));let{builderPrivateKey:r,builderPublicKey:n}=await tr(t,e,{forceSpaceId:e.spaceId,builderPrivateKey:!0,builderPublicKey:!0});await nt("figma publish started",{spaceId:n});let i=await Kc(t);if(i.length>0){await nt("figma migrate with existing files",{spaceId:n}),L.warning(`${(0,ar.yellow)("This repo already has figma mappings in:")}
|
|
2281
|
+
`),this.dy++}write(e,r=!1){this.linewrap===!0&&r===!1?this.stream.write(e.substr(0,this.getWidth())):this.stream.write(e)}lineWrapping(e){this.stream.isTTY&&(this.linewrap=e,e?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};NQ.exports=oF});var OQ=S((uut,RQ)=>{"use strict";h();RQ.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var MQ=S((put,BQ)=>{"use strict";h();var _Ne=OQ();BQ.exports=t=>typeof t=="string"?t.replace(_Ne(),""):t});var $Q=S((fut,cF)=>{"use strict";h();var LQ=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);cF.exports=LQ;cF.exports.default=LQ});var UQ=S((hut,jQ)=>{"use strict";h();jQ.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var zQ=S((yut,uF)=>{"use strict";h();var FNe=MQ(),kNe=$Q(),INe=UQ(),qQ=t=>{if(typeof t!="string"||t.length===0||(t=FNe(t),t.length===0))return 0;t=t.replace(INe()," ");let e=0;for(let r=0;r<t.length;r++){let n=t.codePointAt(r);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,e+=kNe(n)?2:1)}return e};uF.exports=qQ;uF.exports.default=qQ});var lF=S((but,GQ)=>{h();GQ.exports=function(e,r,n){if(r.autopadding!==!0)return e;function i(s,o){return(r.autopaddingChar+s).slice(-o)}switch(n){case"percentage":return i(e,3);default:return e}}});var pF=S((Dut,HQ)=>{h();HQ.exports=function(e,r){let n=Math.round(e*r.barsize),i=r.barsize-n;return r.barCompleteString.substr(0,n)+r.barGlue+r.barIncompleteString.substr(0,i)}});var dF=S((Cut,VQ)=>{h();VQ.exports=function(e,r,n){function i(o){return n?n*Math.round(o/n):o}function s(o){return(r.autopaddingChar+o).slice(-2)}return e>3600?s(Math.floor(e/3600))+"h"+s(i(e%3600/60))+"m":e>60?s(Math.floor(e/60))+"m"+s(i(e%60))+"s":e>10?s(i(e))+"s":s(e)+"s"}});var fF=S((Sut,KQ)=>{h();var NNe=zQ(),RNe=lF(),ONe=pF(),BNe=dF();KQ.exports=function(e,r,n){let i=e.format,s=e.formatTime||BNe,o=e.formatValue||RNe,a=e.formatBar||ONe,c=Math.floor(r.progress*100)+"",u=r.stopTime||Date.now(),l=Math.round((u-r.startTime)/1e3),p=Object.assign({},n,{bar:a(r.progress,e),percentage:o(c,e,"percentage"),total:o(r.total,e,"total"),value:o(r.value,e,"value"),eta:o(r.eta,e,"eta"),eta_formatted:s(r.eta,e,5),duration:o(l,e,"duration"),duration_formatted:s(l,e,1)});i=i.replace(/\{(\w+)\}/g,function(m,g){return typeof p[g]<"u"?p[g]:m});let d=Math.max(0,r.maxWidth-NNe(i)-2),f=Math.floor(d/2);switch(e.align){case"right":i=d>0?" ".repeat(d)+i:i;break;case"center":i=f>0?" ".repeat(f)+i:i;break;case"left":default:break}return i}});var e0=S((Put,WQ)=>{h();function Gt(t,e){return typeof t>"u"||t===null?e:t}WQ.exports={parse:function(e,r){let n={},i=Object.assign({},r,e);return n.throttleTime=1e3/Gt(i.fps,10),n.stream=Gt(i.stream,process.stderr),n.terminal=Gt(i.terminal,null),n.clearOnComplete=Gt(i.clearOnComplete,!1),n.stopOnComplete=Gt(i.stopOnComplete,!1),n.barsize=Gt(i.barsize,40),n.align=Gt(i.align,"left"),n.hideCursor=Gt(i.hideCursor,!1),n.linewrap=Gt(i.linewrap,!1),n.barGlue=Gt(i.barGlue,""),n.barCompleteChar=Gt(i.barCompleteChar,"="),n.barIncompleteChar=Gt(i.barIncompleteChar,"-"),n.format=Gt(i.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=Gt(i.formatTime,null),n.formatValue=Gt(i.formatValue,null),n.formatBar=Gt(i.formatBar,null),n.etaBufferLength=Gt(i.etaBuffer,10),n.etaAsynchronousUpdate=Gt(i.etaAsynchronousUpdate,!1),n.progressCalculationRelative=Gt(i.progressCalculationRelative,!1),n.synchronousUpdate=Gt(i.synchronousUpdate,!0),n.noTTYOutput=Gt(i.noTTYOutput,!1),n.notTTYSchedule=Gt(i.notTTYSchedule,2e3),n.emptyOnZero=Gt(i.emptyOnZero,!1),n.forceRedraw=Gt(i.forceRedraw,!1),n.autopadding=Gt(i.autopadding,!1),n.gracefulExit=Gt(i.gracefulExit,!1),n},assignDerivedOptions:function(e){return e.barCompleteString=e.barCompleteChar.repeat(e.barsize+1),e.barIncompleteString=e.barIncompleteChar.repeat(e.barsize+1),e.autopaddingChar=e.autopadding?Gt(e.autopaddingChar," "):"",e}}});var mF=S((Fut,YQ)=>{h();var JQ=IQ(),MNe=aF(),LNe=fF(),$Ne=e0(),jNe=require("events");YQ.exports=class extends jNe{constructor(e){super(),this.options=$Ne.assignDerivedOptions(e),this.terminal=this.options.terminal?this.options.terminal:new MNe(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new JQ(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:LNe}render(e=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let n=this.formatter(this.options,r,this.payload);(e||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=n)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(n),this.terminal.clearRight(),this.lastDrawnString=n,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(e,r,n){this.value=r||0,this.total=typeof e<"u"&&e>=0?e:100,this.startValue=r||0,this.payload=n||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new JQ(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",e,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(e,r={}){typeof e=="number"&&(this.value=e,this.eta.update(Date.now(),e,this.total));let n=(typeof e=="object"?e:r)||{};this.emit("update",this.total,this.value);for(let i in n)this.payload[i]=n[i];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let e=this.value/this.total;return this.options.progressCalculationRelative&&(e=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(e)&&(e=this.options&&this.options.emptyOnZero?0:1),e=Math.min(Math.max(e,0),1),e}increment(e=1,r={}){typeof e=="object"?this.update(this.value+1,e):this.update(this.value+e,r)}getTotal(){return this.total}setTotal(e){typeof e<"u"&&e>=0&&(this.total=e)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var QQ=S((Nut,XQ)=>{h();var UNe=mF(),qNe=e0();XQ.exports=class extends UNe{constructor(e,r){super(qNe.parse(e,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(e,r){this.timer&&(super.update(e,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(e,r,n){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(e,r,n),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var eZ=S((But,ZQ)=>{h();var zNe=aF(),GNe=mF(),HNe=e0(),VNe=require("events");ZQ.exports=class extends VNe{constructor(e,r){super(),this.bars=[],this.options=HNe.parse(e,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new zNe(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(e,r,n,i={}){let s=new GNe(Object.assign({},this.options,{terminal:this.terminal},i));return this.bars.push(s),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,s.start(e,r,n),this.emit("start")),s}remove(e){let r=this.bars.indexOf(e);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let e=0;e<this.bars.length;e++)e>0&&this.terminal.newline(),this.bars[e].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(e=>e.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let e=0;e<this.bars.length;e++)e>0&&this.terminal.newline(),this.bars[e].render(),this.bars[e].stop();this.terminal.newline()}this.emit("stop")}log(e){this.loggingBuffer.push(e)}}});var rZ=S((Lut,tZ)=>{h();tZ.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var iZ=S((jut,nZ)=>{h();nZ.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var oZ=S((qut,sZ)=>{h();sZ.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var cZ=S((Gut,aZ)=>{h();aZ.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var lZ=S((Vut,uZ)=>{h();var KNe=rZ(),WNe=iZ(),JNe=oZ(),YNe=cZ();uZ.exports={legacy:KNe,shades_classic:WNe,shades_grey:JNe,rect:YNe}});var fZ=S((Wut,dZ)=>{h();var pZ=QQ(),XNe=eZ(),QNe=lZ(),ZNe=fF(),eRe=lF(),tRe=pF(),rRe=dF();dZ.exports={Bar:pZ,SingleBar:pZ,MultiBar:XNe,Presets:QNe,Format:{Formatter:ZNe,BarFormat:tRe,ValueFormat:eRe,TimeFormat:rRe}}});var bZ=S((alt,vZ)=>{h();vZ.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var PRe={};Mh(PRe,{default:()=>TRe});module.exports=Eee(PRe);h();h();try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f3ed1398-838b-4318-914d-9f6819574ca2",t._sentryDebugIdIdentifier="sentry-dbid-f3ed1398-838b-4318-914d-9f6819574ca2")}catch{}h();var JZ=require("../core/index.cjs"),YZ=require("../node/index.cjs"),XZ=require("../server/index.cjs"),QZ=Y(RF(),1);h();h();var kb=require("fs/promises");Td();nn();cp();Yt();var ar=Y(mr(),1),Op=require("node:path");Mi();yi();Hr();_r();Uc();var nEe="https://cdn.builder.io",Hq=async(t,e)=>{console.log(""),Et((0,ar.bgCyan)((0,ar.bold)((0,ar.white)(" figma migrate ")))+" "+(0,ar.dim)(Xe));let{builderPrivateKey:r,builderPublicKey:n}=await tr(t,e,{forceSpaceId:e.spaceId,builderPrivateKey:!0,builderPublicKey:!0});await nt("figma publish started",{spaceId:n});let i=await Kc(t);if(i.length>0){await nt("figma migrate with existing files",{spaceId:n}),L.warning(`${(0,ar.yellow)("This repo already has figma mappings in:")}
|
|
2282
2282
|
|
|
2283
2283
|
${i.map(u=>` - ${(0,Op.relative)(t.getAppRootDir(),u)}`).join(`
|
|
2284
2284
|
`)}
|
|
@@ -4041,7 +4041,7 @@ ${c}`),{success:!1,error:"backup-commit-hash-mismatch-in-metadata"}}return u.las
|
|
|
4041
4041
|
\r
|
|
4042
4042
|
`),C.destroy()}else{t.debug(`No proxy middleware available for WebSocket: ${F}`),C.writable&&C.write(`HTTP/1.1 404 Not Found\r
|
|
4043
4043
|
\r
|
|
4044
|
-
`),C.destroy();return}}};s.on("upgrade",y),o?.on("upgrade",y),TNe({ws:g,sys:t,credentials:e,fusionConfig:n,devServer:l,sharedState:p}),p.state="ready";let v=r.app||r.nativeApp?"builder://":r.dev?"http://localhost:1234":"https://builder.io",D=new URL(`${v}/app/projects/local`);D.searchParams.set("localEditUrl",a);let E=await t.getDeviceId();if(E&&D.searchParams.set("host",E),e.builderPublicKey&&D.searchParams.set("spaceId",e.builderPublicKey),r.jsonOutput){let b={type:"server_ready",data:{proxyUrl:a,httpsProxyUrl:c,customHttpsProxyUrl:u,fusionEditorUrl:n.nativeApp?null:D.href,urlHost:v,command:n.devCommand,serverUrl:n.serverUrl,credentials:e,nativeApp:n.nativeApp}};console.log(JSON.stringify(b))}r.open===!1?n.isLocal&&console.log(`\u{1F517} Access Builder.io at: ${D.href}`):(L.info(`OPEN BROWSER: ${D.href}`),await Rp(D.href)),setTimeout(()=>{p.editorReady=!0},100)}catch(m){p.state="init-error",p.isFinalState=!0,p.errorMessage=m instanceof Error?m.message:String(m),t.Sentry?.captureException(m,{level:"fatal"})}}function TNe({ws:t,sys:e,fusionConfig:r,credentials:n,devServer:i,sharedState:s}){t.register("initializeSession",async a=>{let c,u,l;return typeof a[0]=="object"&&a[0]?{sessionId:c,customInstructions:u,privacyMode:l}=a[0]:typeof a[0]=="string"&&(c=a[0]),(await Ah(e,n,r,i,c,s,u,l||r.privacyMode)).getSessionId()}),t.register("connectToEventLoop",async(a,c)=>{let u=await Hu();if(!u)throw new Error("Server not found");let l=t.clients().get(c);if(!l)throw new Error("Client not found");let p=u.getSessionId(),d=u.connectToEventLoop(!0,f=>{f&&!f.timestamp&&(f.timestamp=Date.now()),t.notify(`${p}/event`,c,[JSON.stringify(f)])});l.on("close",d)}),t.register("setFeatureFlags",async a=>{iq(a[0])});function o(a){t.register(a,async([c,...u])=>{r.isLocal||console.log("WS request: ",a,JSON.stringify(u));let l=await Hu();if(!l)throw new Error("Server not found");try{let p=l[a];if(typeof p!="function")throw new Error(`Method ${a} not found on codeGenServer`);return p.apply(l,u)}catch(p){throw e.Sentry?.captureException(p,{tags:{functionName:a},extra:{args:u}}),p}})}o("stopEventLoop"),o("abort"),o("abortToolCall"),o("abortSetupCommand"),o("setPrivacyMode"),o("clearSession"),o("loadHistory"),o("loadMoreTurns"),o("getAllFiles"),o("sendFeedback"),o("setCustomInstructions"),o("sendMessage"),o("configureDevOrchestrator"),o("restoreFromCompletionId"),o("restoreBeforeCompletionId"),o("undoLastUserMessage"),o("pushChanges"),o("pullLatestFromRemote"),o("abortMerge"),o("syncChangesFromRemote"),o("pushRepoV2"),o("readFile"),o("writeFile"),o("deleteFile"),o("fileExists"),o("manualCommit"),o("uploadBackup"),o("getDiff"),o("toolFullfilment"),o("createTerminal"),o("writeTerminal"),o("updateTerminal"),o("signalTerminal"),o("disposeTerminal"),o("collectRepoMetrics"),o("switchSessionMode"),t.register("ping",()=>(s.lastRequestTime=performance.now(),{version:Xe,supports:["customInstructions","newChat","clearSession","appCustomInstructions"]})),t.register("getBuilderRules",async()=>{let a=await Hu();if(!a){let c=e.resolve(e.getAppRootDir(),".builderrules");return await e.exists(c)?await e.readFile(c):null}try{return await a.readFile(".builderrules",!0)}catch{return null}}),t.register("setBuilderRules",async a=>{let c=await Hu(),u=a[1];if(!c){let l=e.resolve(e.getAppRootDir(),".builderrules");u?await e.writeFile(l,u):await e.exists(l)&&await e.unlink(l);return}u?await c.writeFile(".builderrules",u,!0):await c.deleteFile(".builderrules",!0)}),t.register("subscribeTerminal",async(a,c)=>{let[u,{terminalId:l}]=a,p=await Hu();if(!p)throw new Error("Server not found");return p.subscribeTerminal({terminalId:l,onData:d=>t.notify(`${u}/terminal/${l}`,c,[d]),onExit:d=>t.notify(`${u}/terminal/${l}/exit`,c,[d])}),{ok:!0}})}async function PNe(t,e,r,n,i,s,o,a){let c=new uo({sys:t,credentials:e,position:"fusion",sessionOrCompletionId:r.sessionId??i,mode:"quality-v4",maxTokens:8e4,mcpServers:!0,fusionConfig:r,privacyMode:a,builtInCustomInstructions:[{id:"debugging-errors",name:"debugging-errors",type:"agent-mode",description:"If the user is experiencing an error, or debugging is mentioned by the user.",content:lQ},...o??[]],fusionContext:{devServerOrchestrator:n,git:!!r.projectId,gitAutoInit:!0}});r.projectId&&c.setDebug(!0);try{await c.initializeSession()}catch(u){throw s.state="session-error",u}return s.state="active-session",s.isFinalState=!0,c}function Hu(){return xd||Promise.resolve(void 0)}function Ah(t,e,r,n,i,s,o,a){return xd||(xd=PNe(t,e,r,n,i,s,o,a)),xd}function ANe(t,e,r){if(e.isLocal)return()=>{};let s=24*(3600*1e3),o=Date.now(),a=setInterval(()=>{let c=Date.now()-o,u=Math.floor(c/s);u>1&&t.Sentry?.captureException(new Error(`Rogue devtools detected: ${u} days`),{extra:{timeSinceStart:c},contexts:{flyIo:r,fusionConfig:{...e}}})},s*2);return()=>clearInterval(a)}var lc=Y(mr(),1);_r();nn();h();var Wu=Y(require("@sentry/node"),1),So=Y(mr(),1);Yt();nn();Pn();var HZ=Y(require("crypto"),1);Hr();_r();var DF=Y(fZ(),1);h();h();h();h();function hF({onlyFirst:t=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,t?void 0:"g")}var nRe=hF();function Fh(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(nRe,"")}h();h();function mZ(t){return t===161||t===164||t===167||t===168||t===170||t===173||t===174||t>=176&&t<=180||t>=182&&t<=186||t>=188&&t<=191||t===198||t===208||t===215||t===216||t>=222&&t<=225||t===230||t>=232&&t<=234||t===236||t===237||t===240||t===242||t===243||t>=247&&t<=250||t===252||t===254||t===257||t===273||t===275||t===283||t===294||t===295||t===299||t>=305&&t<=307||t===312||t>=319&&t<=322||t===324||t>=328&&t<=331||t===333||t===338||t===339||t===358||t===359||t===363||t===462||t===464||t===466||t===468||t===470||t===472||t===474||t===476||t===593||t===609||t===708||t===711||t>=713&&t<=715||t===717||t===720||t>=728&&t<=731||t===733||t===735||t>=768&&t<=879||t>=913&&t<=929||t>=931&&t<=937||t>=945&&t<=961||t>=963&&t<=969||t===1025||t>=1040&&t<=1103||t===1105||t===8208||t>=8211&&t<=8214||t===8216||t===8217||t===8220||t===8221||t>=8224&&t<=8226||t>=8228&&t<=8231||t===8240||t===8242||t===8243||t===8245||t===8251||t===8254||t===8308||t===8319||t>=8321&&t<=8324||t===8364||t===8451||t===8453||t===8457||t===8467||t===8470||t===8481||t===8482||t===8486||t===8491||t===8531||t===8532||t>=8539&&t<=8542||t>=8544&&t<=8555||t>=8560&&t<=8569||t===8585||t>=8592&&t<=8601||t===8632||t===8633||t===8658||t===8660||t===8679||t===8704||t===8706||t===8707||t===8711||t===8712||t===8715||t===8719||t===8721||t===8725||t===8730||t>=8733&&t<=8736||t===8739||t===8741||t>=8743&&t<=8748||t===8750||t>=8756&&t<=8759||t===8764||t===8765||t===8776||t===8780||t===8786||t===8800||t===8801||t>=8804&&t<=8807||t===8810||t===8811||t===8814||t===8815||t===8834||t===8835||t===8838||t===8839||t===8853||t===8857||t===8869||t===8895||t===8978||t>=9312&&t<=9449||t>=9451&&t<=9547||t>=9552&&t<=9587||t>=9600&&t<=9615||t>=9618&&t<=9621||t===9632||t===9633||t>=9635&&t<=9641||t===9650||t===9651||t===9654||t===9655||t===9660||t===9661||t===9664||t===9665||t>=9670&&t<=9672||t===9675||t>=9678&&t<=9681||t>=9698&&t<=9701||t===9711||t===9733||t===9734||t===9737||t===9742||t===9743||t===9756||t===9758||t===9792||t===9794||t===9824||t===9825||t>=9827&&t<=9829||t>=9831&&t<=9834||t===9836||t===9837||t===9839||t===9886||t===9887||t===9919||t>=9926&&t<=9933||t>=9935&&t<=9939||t>=9941&&t<=9953||t===9955||t===9960||t===9961||t>=9963&&t<=9969||t===9972||t>=9974&&t<=9977||t===9979||t===9980||t===9982||t===9983||t===10045||t>=10102&&t<=10111||t>=11094&&t<=11097||t>=12872&&t<=12879||t>=57344&&t<=63743||t>=65024&&t<=65039||t===65533||t>=127232&&t<=127242||t>=127248&&t<=127277||t>=127280&&t<=127337||t>=127344&&t<=127373||t===127375||t===127376||t>=127387&&t<=127404||t>=917760&&t<=917999||t>=983040&&t<=1048573||t>=1048576&&t<=1114109}function hZ(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function gZ(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9776&&t<=9783||t>=9800&&t<=9811||t===9855||t>=9866&&t<=9871||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12773||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t===94192||t===94193||t>=94208&&t<=100343||t>=100352&&t<=101589||t>=101631&&t<=101640||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t>=119552&&t<=119638||t>=119648&&t<=119670||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128727||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129673||t>=129679&&t<=129734||t>=129742&&t<=129756||t>=129759&&t<=129769||t>=129776&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}function iRe(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function yZ(t,{ambiguousAsWide:e=!1}={}){return iRe(t),hZ(t)||gZ(t)||e&&mZ(t)?2:1}var xZ=Y(bZ(),1),sRe=new Intl.Segmenter,oRe=/^\p{Default_Ignorable_Code_Point}$/u;function Ku(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:n=!1}=e;if(n||(t=Fh(t)),t.length===0)return 0;let i=0,s={ambiguousAsWide:!r};for(let{segment:o}of sRe.segment(t)){let a=o.codePointAt(0);if(!(a<=31||a>=127&&a<=159)&&!(a>=8203&&a<=8207||a===65279)&&!(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)&&!(a>=55296&&a<=57343)&&!(a>=65024&&a<=65039)&&!oRe.test(o)){if((0,xZ.default)().test(o)){i+=2;continue}i+=yZ(a,s)}}return i}h();var DZ=(t=0)=>e=>`\x1B[${e+t}m`,EZ=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,CZ=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,ur={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},flt=Object.keys(ur.modifier),aRe=Object.keys(ur.color),cRe=Object.keys(ur.bgColor),mlt=[...aRe,...cRe];function uRe(){let t=new Map;for(let[e,r]of Object.entries(ur)){for(let[n,i]of Object.entries(r))ur[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=ur[n],t.set(i[0],i[1]);Object.defineProperty(ur,e,{value:r,enumerable:!1})}return Object.defineProperty(ur,"codes",{value:t,enumerable:!1}),ur.color.close="\x1B[39m",ur.bgColor.close="\x1B[49m",ur.color.ansi=DZ(),ur.color.ansi256=EZ(),ur.color.ansi16m=CZ(),ur.bgColor.ansi=DZ(10),ur.bgColor.ansi256=EZ(10),ur.bgColor.ansi16m=CZ(10),Object.defineProperties(ur,{rgbToAnsi256:{value:(e,r,n)=>e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>ur.rgbToAnsi256(...ur.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,i;if(e>=232)r=((e-232)*10+8)/255,n=r,i=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(r,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>ur.ansi256ToAnsi(ur.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>ur.ansi256ToAnsi(ur.hexToAnsi256(e)),enumerable:!1}}),ur}var lRe=uRe(),wZ=lRe;var r0=new Set(["\x1B","\x9B"]),pRe=39,yF="\x07",PZ="[",dRe="]",AZ="m",t0=`${dRe}8;;`,SZ=t=>`${r0.values().next().value}${PZ}${t}${AZ}`,TZ=t=>`${r0.values().next().value}${t0}${t}${yF}`,fRe=t=>t.split(" ").map(e=>Ku(e)),gF=(t,e,r)=>{let n=[...e],i=!1,s=!1,o=Ku(Fh(t.at(-1)));for(let[a,c]of n.entries()){let u=Ku(c);if(o+u<=r?t[t.length-1]+=c:(t.push(c),o=0),r0.has(c)&&(i=!0,s=n.slice(a+1,a+1+t0.length).join("")===t0),i){s?c===yF&&(i=!1,s=!1):c===AZ&&(i=!1);continue}o+=u,o===r&&a<n.length-1&&(t.push(""),o=0)}!o&&t.at(-1).length>0&&t.length>1&&(t[t.length-2]+=t.pop())},mRe=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(Ku(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},hRe=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let n="",i,s,o=fRe(t),a=[""];for(let[p,d]of t.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a.at(-1).trimStart());let f=Ku(a.at(-1));if(p!==0&&(f>=e&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),f=0),(f>0||r.trim===!1)&&(a[a.length-1]+=" ",f++)),r.hard&&o[p]>e){let m=e-f,g=1+Math.floor((o[p]-m-1)/e);Math.floor((o[p]-1)/e)<g&&a.push(""),gF(a,d,e);continue}if(f+o[p]>e&&f>0&&o[p]>0){if(r.wordWrap===!1&&f<e){gF(a,d,e);continue}a.push("")}if(f+o[p]>e&&r.wordWrap===!1){gF(a,d,e);continue}a[a.length-1]+=d}r.trim!==!1&&(a=a.map(p=>mRe(p)));let c=a.join(`
|
|
4044
|
+
`),C.destroy();return}}};s.on("upgrade",y),o?.on("upgrade",y),TNe({ws:g,sys:t,credentials:e,fusionConfig:n,devServer:l,sharedState:p}),p.state="ready";let v=r.app||r.nativeApp?"builder://":r.dev?"http://localhost:1234":"https://builder.io",D=new URL(`${v}/app/projects/local`);D.searchParams.set("localEditUrl",a);let E=await t.getDeviceId();if(E&&D.searchParams.set("host",E),e.builderPublicKey&&D.searchParams.set("spaceId",e.builderPublicKey),r.jsonOutput){let b={type:"server_ready",data:{proxyUrl:a,httpsProxyUrl:c,customHttpsProxyUrl:u,fusionEditorUrl:n.nativeApp?null:D.href,urlHost:v,command:n.devCommand,serverUrl:n.serverUrl,credentials:e,nativeApp:n.nativeApp}};console.log(JSON.stringify(b))}r.open===!1?n.isLocal&&console.log(`\u{1F517} Access Builder.io at: ${D.href}`):(L.info(`OPEN BROWSER: ${D.href}`),await Rp(D.href)),setTimeout(()=>{p.editorReady=!0},100)}catch(m){p.state="init-error",p.isFinalState=!0,p.errorMessage=m instanceof Error?m.message:String(m),t.Sentry?.captureException(m,{level:"fatal"})}}function TNe({ws:t,sys:e,fusionConfig:r,credentials:n,devServer:i,sharedState:s}){t.register("initializeSession",async a=>{let c,u,l;return typeof a[0]=="object"&&a[0]?{sessionId:c,customInstructions:u,privacyMode:l}=a[0]:typeof a[0]=="string"&&(c=a[0]),(await Ah(e,n,r,i,c,s,u,l||r.privacyMode)).getSessionId()}),t.register("connectToEventLoop",async(a,c)=>{let u=await Hu();if(!u)throw new Error("Server not found");let l=t.clients().get(c);if(!l)throw new Error("Client not found");let p=u.getSessionId(),d=u.connectToEventLoop(!0,f=>{f&&!f.timestamp&&(f.timestamp=Date.now()),t.notify(`${p}/event`,c,[JSON.stringify(f)])});l.on("close",d)}),t.register("setFeatureFlags",async a=>{iq(a[0])});function o(a){t.register(a,async([c,...u])=>{r.isLocal||console.log("WS request: ",a,JSON.stringify(u));let l=await Hu();if(!l)throw new Error("Server not found");try{let p=l[a];if(typeof p!="function")throw new Error(`Method ${a} not found on codeGenServer`);return await p.apply(l,u)}catch(p){throw e.Sentry?.captureException(p,{tags:{functionName:a},extra:{args:u}}),p}})}o("stopEventLoop"),o("abort"),o("abortToolCall"),o("abortSetupCommand"),o("setPrivacyMode"),o("clearSession"),o("loadHistory"),o("loadMoreTurns"),o("getAllFiles"),o("sendFeedback"),o("setCustomInstructions"),o("sendMessage"),o("configureDevOrchestrator"),o("restoreFromCompletionId"),o("restoreBeforeCompletionId"),o("undoLastUserMessage"),o("pushChanges"),o("pullLatestFromRemote"),o("abortMerge"),o("syncChangesFromRemote"),o("pushRepoV2"),o("readFile"),o("writeFile"),o("deleteFile"),o("fileExists"),o("manualCommit"),o("uploadBackup"),o("getDiff"),o("toolFullfilment"),o("createTerminal"),o("writeTerminal"),o("updateTerminal"),o("signalTerminal"),o("disposeTerminal"),o("collectRepoMetrics"),o("switchSessionMode"),t.register("ping",()=>(s.lastRequestTime=performance.now(),{version:Xe,supports:["customInstructions","newChat","clearSession","appCustomInstructions"]})),t.register("getBuilderRules",async()=>{let a=await Hu();if(!a){let c=e.resolve(e.getAppRootDir(),".builderrules");return await e.exists(c)?await e.readFile(c):null}try{return await a.readFile(".builderrules",!0)}catch{return null}}),t.register("setBuilderRules",async a=>{let c=await Hu(),u=a[1];if(!c){let l=e.resolve(e.getAppRootDir(),".builderrules");u?await e.writeFile(l,u):await e.exists(l)&&await e.unlink(l);return}u?await c.writeFile(".builderrules",u,!0):await c.deleteFile(".builderrules",!0)}),t.register("subscribeTerminal",async(a,c)=>{let[u,{terminalId:l}]=a,p=await Hu();if(!p)throw new Error("Server not found");return p.subscribeTerminal({terminalId:l,onData:d=>t.notify(`${u}/terminal/${l}`,c,[d]),onExit:d=>t.notify(`${u}/terminal/${l}/exit`,c,[d])}),{ok:!0}})}async function PNe(t,e,r,n,i,s,o,a){let c=new uo({sys:t,credentials:e,position:"fusion",sessionOrCompletionId:r.sessionId??i,mode:"quality-v4",maxTokens:8e4,mcpServers:!0,fusionConfig:r,privacyMode:a,builtInCustomInstructions:[{id:"debugging-errors",name:"debugging-errors",type:"agent-mode",description:"If the user is experiencing an error, or debugging is mentioned by the user.",content:lQ},...o??[]],fusionContext:{devServerOrchestrator:n,git:!!r.projectId,gitAutoInit:!0}});r.projectId&&c.setDebug(!0);try{await c.initializeSession()}catch(u){throw s.state="session-error",u}return s.state="active-session",s.isFinalState=!0,c}function Hu(){return xd||Promise.resolve(void 0)}function Ah(t,e,r,n,i,s,o,a){return xd||(xd=PNe(t,e,r,n,i,s,o,a)),xd}function ANe(t,e,r){if(e.isLocal)return()=>{};let s=24*(3600*1e3),o=Date.now(),a=setInterval(()=>{let c=Date.now()-o,u=Math.floor(c/s);u>1&&t.Sentry?.captureException(new Error(`Rogue devtools detected: ${u} days`),{extra:{timeSinceStart:c},contexts:{flyIo:r,fusionConfig:{...e}}})},s*2);return()=>clearInterval(a)}var lc=Y(mr(),1);_r();nn();h();var Wu=Y(require("@sentry/node"),1),So=Y(mr(),1);Yt();nn();Pn();var HZ=Y(require("crypto"),1);Hr();_r();var DF=Y(fZ(),1);h();h();h();h();function hF({onlyFirst:t=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,t?void 0:"g")}var nRe=hF();function Fh(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(nRe,"")}h();h();function mZ(t){return t===161||t===164||t===167||t===168||t===170||t===173||t===174||t>=176&&t<=180||t>=182&&t<=186||t>=188&&t<=191||t===198||t===208||t===215||t===216||t>=222&&t<=225||t===230||t>=232&&t<=234||t===236||t===237||t===240||t===242||t===243||t>=247&&t<=250||t===252||t===254||t===257||t===273||t===275||t===283||t===294||t===295||t===299||t>=305&&t<=307||t===312||t>=319&&t<=322||t===324||t>=328&&t<=331||t===333||t===338||t===339||t===358||t===359||t===363||t===462||t===464||t===466||t===468||t===470||t===472||t===474||t===476||t===593||t===609||t===708||t===711||t>=713&&t<=715||t===717||t===720||t>=728&&t<=731||t===733||t===735||t>=768&&t<=879||t>=913&&t<=929||t>=931&&t<=937||t>=945&&t<=961||t>=963&&t<=969||t===1025||t>=1040&&t<=1103||t===1105||t===8208||t>=8211&&t<=8214||t===8216||t===8217||t===8220||t===8221||t>=8224&&t<=8226||t>=8228&&t<=8231||t===8240||t===8242||t===8243||t===8245||t===8251||t===8254||t===8308||t===8319||t>=8321&&t<=8324||t===8364||t===8451||t===8453||t===8457||t===8467||t===8470||t===8481||t===8482||t===8486||t===8491||t===8531||t===8532||t>=8539&&t<=8542||t>=8544&&t<=8555||t>=8560&&t<=8569||t===8585||t>=8592&&t<=8601||t===8632||t===8633||t===8658||t===8660||t===8679||t===8704||t===8706||t===8707||t===8711||t===8712||t===8715||t===8719||t===8721||t===8725||t===8730||t>=8733&&t<=8736||t===8739||t===8741||t>=8743&&t<=8748||t===8750||t>=8756&&t<=8759||t===8764||t===8765||t===8776||t===8780||t===8786||t===8800||t===8801||t>=8804&&t<=8807||t===8810||t===8811||t===8814||t===8815||t===8834||t===8835||t===8838||t===8839||t===8853||t===8857||t===8869||t===8895||t===8978||t>=9312&&t<=9449||t>=9451&&t<=9547||t>=9552&&t<=9587||t>=9600&&t<=9615||t>=9618&&t<=9621||t===9632||t===9633||t>=9635&&t<=9641||t===9650||t===9651||t===9654||t===9655||t===9660||t===9661||t===9664||t===9665||t>=9670&&t<=9672||t===9675||t>=9678&&t<=9681||t>=9698&&t<=9701||t===9711||t===9733||t===9734||t===9737||t===9742||t===9743||t===9756||t===9758||t===9792||t===9794||t===9824||t===9825||t>=9827&&t<=9829||t>=9831&&t<=9834||t===9836||t===9837||t===9839||t===9886||t===9887||t===9919||t>=9926&&t<=9933||t>=9935&&t<=9939||t>=9941&&t<=9953||t===9955||t===9960||t===9961||t>=9963&&t<=9969||t===9972||t>=9974&&t<=9977||t===9979||t===9980||t===9982||t===9983||t===10045||t>=10102&&t<=10111||t>=11094&&t<=11097||t>=12872&&t<=12879||t>=57344&&t<=63743||t>=65024&&t<=65039||t===65533||t>=127232&&t<=127242||t>=127248&&t<=127277||t>=127280&&t<=127337||t>=127344&&t<=127373||t===127375||t===127376||t>=127387&&t<=127404||t>=917760&&t<=917999||t>=983040&&t<=1048573||t>=1048576&&t<=1114109}function hZ(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function gZ(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9776&&t<=9783||t>=9800&&t<=9811||t===9855||t>=9866&&t<=9871||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12773||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t===94192||t===94193||t>=94208&&t<=100343||t>=100352&&t<=101589||t>=101631&&t<=101640||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t>=119552&&t<=119638||t>=119648&&t<=119670||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128727||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129673||t>=129679&&t<=129734||t>=129742&&t<=129756||t>=129759&&t<=129769||t>=129776&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}function iRe(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function yZ(t,{ambiguousAsWide:e=!1}={}){return iRe(t),hZ(t)||gZ(t)||e&&mZ(t)?2:1}var xZ=Y(bZ(),1),sRe=new Intl.Segmenter,oRe=/^\p{Default_Ignorable_Code_Point}$/u;function Ku(t,e={}){if(typeof t!="string"||t.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:n=!1}=e;if(n||(t=Fh(t)),t.length===0)return 0;let i=0,s={ambiguousAsWide:!r};for(let{segment:o}of sRe.segment(t)){let a=o.codePointAt(0);if(!(a<=31||a>=127&&a<=159)&&!(a>=8203&&a<=8207||a===65279)&&!(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)&&!(a>=55296&&a<=57343)&&!(a>=65024&&a<=65039)&&!oRe.test(o)){if((0,xZ.default)().test(o)){i+=2;continue}i+=yZ(a,s)}}return i}h();var DZ=(t=0)=>e=>`\x1B[${e+t}m`,EZ=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,CZ=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,ur={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},flt=Object.keys(ur.modifier),aRe=Object.keys(ur.color),cRe=Object.keys(ur.bgColor),mlt=[...aRe,...cRe];function uRe(){let t=new Map;for(let[e,r]of Object.entries(ur)){for(let[n,i]of Object.entries(r))ur[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=ur[n],t.set(i[0],i[1]);Object.defineProperty(ur,e,{value:r,enumerable:!1})}return Object.defineProperty(ur,"codes",{value:t,enumerable:!1}),ur.color.close="\x1B[39m",ur.bgColor.close="\x1B[49m",ur.color.ansi=DZ(),ur.color.ansi256=EZ(),ur.color.ansi16m=CZ(),ur.bgColor.ansi=DZ(10),ur.bgColor.ansi256=EZ(10),ur.bgColor.ansi16m=CZ(10),Object.defineProperties(ur,{rgbToAnsi256:{value:(e,r,n)=>e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>ur.rgbToAnsi256(...ur.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,i;if(e>=232)r=((e-232)*10+8)/255,n=r,i=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(r,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>ur.ansi256ToAnsi(ur.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>ur.ansi256ToAnsi(ur.hexToAnsi256(e)),enumerable:!1}}),ur}var lRe=uRe(),wZ=lRe;var r0=new Set(["\x1B","\x9B"]),pRe=39,yF="\x07",PZ="[",dRe="]",AZ="m",t0=`${dRe}8;;`,SZ=t=>`${r0.values().next().value}${PZ}${t}${AZ}`,TZ=t=>`${r0.values().next().value}${t0}${t}${yF}`,fRe=t=>t.split(" ").map(e=>Ku(e)),gF=(t,e,r)=>{let n=[...e],i=!1,s=!1,o=Ku(Fh(t.at(-1)));for(let[a,c]of n.entries()){let u=Ku(c);if(o+u<=r?t[t.length-1]+=c:(t.push(c),o=0),r0.has(c)&&(i=!0,s=n.slice(a+1,a+1+t0.length).join("")===t0),i){s?c===yF&&(i=!1,s=!1):c===AZ&&(i=!1);continue}o+=u,o===r&&a<n.length-1&&(t.push(""),o=0)}!o&&t.at(-1).length>0&&t.length>1&&(t[t.length-2]+=t.pop())},mRe=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(Ku(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},hRe=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let n="",i,s,o=fRe(t),a=[""];for(let[p,d]of t.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a.at(-1).trimStart());let f=Ku(a.at(-1));if(p!==0&&(f>=e&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),f=0),(f>0||r.trim===!1)&&(a[a.length-1]+=" ",f++)),r.hard&&o[p]>e){let m=e-f,g=1+Math.floor((o[p]-m-1)/e);Math.floor((o[p]-1)/e)<g&&a.push(""),gF(a,d,e);continue}if(f+o[p]>e&&f>0&&o[p]>0){if(r.wordWrap===!1&&f<e){gF(a,d,e);continue}a.push("")}if(f+o[p]>e&&r.wordWrap===!1){gF(a,d,e);continue}a[a.length-1]+=d}r.trim!==!1&&(a=a.map(p=>mRe(p)));let c=a.join(`
|
|
4045
4045
|
`),u=[...c],l=0;for(let[p,d]of u.entries()){if(n+=d,r0.has(d)){let{groups:m}=new RegExp(`(?:\\${PZ}(?<code>\\d+)m|\\${t0}(?<uri>.*)${yF})`).exec(c.slice(l))||{groups:{}};if(m.code!==void 0){let g=Number.parseFloat(m.code);i=g===pRe?void 0:g}else m.uri!==void 0&&(s=m.uri.length===0?void 0:m.uri)}let f=wZ.codes.get(Number(i));u[p+1]===`
|
|
4046
4046
|
`?(s&&(n+=TZ("")),i&&f&&(n+=SZ(f))):d===`
|
|
4047
4047
|
`&&(i&&f&&(n+=SZ(i)),s&&(n+=TZ(s))),l+=d.length}return n};function kh(t,e,r){return String(t).normalize().replaceAll(`\r
|