@builder.io/dev-tools 1.65.1-beta.202606121012.1a361bc → 1.65.1-beta.202606121024.bf2bd60

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 CHANGED
@@ -1,4 +1,4 @@
1
- var MRe=Object.create;var xy=Object.defineProperty;var PRe=Object.getOwnPropertyDescriptor;var LRe=Object.getOwnPropertyNames;var _Re=Object.getPrototypeOf,URe=Object.prototype.hasOwnProperty;var L=(t,e)=>()=>(t&&(e=t(t=0)),e);var N=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Fy=(t,e)=>{for(var r in e)xy(t,r,{get:e[r],enumerable:!0})},dY=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of LRe(e))!URe.call(t,i)&&i!==r&&xy(t,i,{get:()=>e[i],enumerable:!(n=PRe(e,i))||n.enumerable});return t};var z=(t,e,r)=>(r=t!=null?MRe(_Re(t)):{},dY(e||!t||!t.__esModule?xy(r,"default",{value:t,enumerable:!0}):r,t)),zr=t=>dY(xy({},"__esModule",{value:!0}),t);var h=L(()=>{(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"1a361bc313f1e9a2181e04c337e999a7e992e17d"}}catch{}})()});function lu(t){let e=t[t.length-1];return e&&typeof e=="object"&&!(e instanceof Error)&&!Array.isArray(e)&&"loggerOptions"in e?{callArgs:t.slice(0,-1),options:e.loggerOptions}:{callArgs:t,options:{}}}function GRe(t,e){return`[${t.toUpperCase()}]`+e.map(r=>{if(r instanceof Error)return r.stack??r.message;if(typeof r=="object"&&r!==null)try{return JSON.stringify(r)}catch{return String(r)}return String(r)}).join(" ")}function hY(){let t=process.env.FUSION_ENVIRONMENT;return t==="cloud"||t==="cloud-v2"}function ky(t,e,r,n){let i={severity:e,message:GRe(r,n),timestamp:new Date().toISOString()};r&&(i.context=r),t.write(JSON.stringify(i)+`
1
+ var MRe=Object.create;var xy=Object.defineProperty;var PRe=Object.getOwnPropertyDescriptor;var LRe=Object.getOwnPropertyNames;var _Re=Object.getPrototypeOf,URe=Object.prototype.hasOwnProperty;var L=(t,e)=>()=>(t&&(e=t(t=0)),e);var N=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Fy=(t,e)=>{for(var r in e)xy(t,r,{get:e[r],enumerable:!0})},dY=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of LRe(e))!URe.call(t,i)&&i!==r&&xy(t,i,{get:()=>e[i],enumerable:!(n=PRe(e,i))||n.enumerable});return t};var z=(t,e,r)=>(r=t!=null?MRe(_Re(t)):{},dY(e||!t||!t.__esModule?xy(r,"default",{value:t,enumerable:!0}):r,t)),zr=t=>dY(xy({},"__esModule",{value:!0}),t);var h=L(()=>{(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"bf2bd60b11bff286081a4a4e5de6f96ec8d8ace3"}}catch{}})()});function lu(t){let e=t[t.length-1];return e&&typeof e=="object"&&!(e instanceof Error)&&!Array.isArray(e)&&"loggerOptions"in e?{callArgs:t.slice(0,-1),options:e.loggerOptions}:{callArgs:t,options:{}}}function GRe(t,e){return`[${t.toUpperCase()}]`+e.map(r=>{if(r instanceof Error)return r.stack??r.message;if(typeof r=="object"&&r!==null)try{return JSON.stringify(r)}catch{return String(r)}return String(r)}).join(" ")}function hY(){let t=process.env.FUSION_ENVIRONMENT;return t==="cloud"||t==="cloud-v2"}function ky(t,e,r,n){let i={severity:e,message:GRe(r,n),timestamp:new Date().toISOString()};r&&(i.context=r),t.write(JSON.stringify(i)+`
2
2
  `)}function ORe(t,e,r){return{debug(...n){if(!e())return;let{callArgs:i,options:s}=lu(n);ky(s.stderr?process.stderr:process.stdout,"DEBUG",r,i)},info(...n){if(t>gu.info)return;let{callArgs:i,options:s}=lu(n);s.debug&&!e()||ky(s.stderr?process.stderr:process.stdout,"INFO",r,i)},warn(...n){if(t>gu.warn)return;let{callArgs:i,options:s}=lu(n);s.debug&&!e()||ky(process.stderr,"WARNING",r,i)},error(...n){if(t>gu.error)return;let{callArgs:i,options:s}=lu(n);s.debug&&!e()||ky(process.stderr,"ERROR",r,i)}}}function td(t){return t?`[${t}]`:""}function KRe(t,e,r){return{debug(...n){if(!e())return;let{callArgs:i,options:s}=lu(n);s.stderr?console.error(td(r),...i):console.debug(td(r),...i)},info(...n){if(gu.info<t)return;let{callArgs:i,options:s}=lu(n);s.debug&&!e()||(s.stderr?console.error(td(r),...i):console.log(td(r),...i))},warn(...n){if(gu.warn<t)return;let{callArgs:i,options:s}=lu(n);s.debug&&!e()||console.warn(td(r),...i)},error(...n){if(gu.error<t)return;let{callArgs:i,options:s}=lu(n);s.debug&&!e()||console.error(td(r),...i)}}}function CY(t){mY=t}function ve(t,e){let r=typeof e?.debug=="function"?e.debug:e?.debug!==void 0?()=>e.debug:()=>mY||!!process.env.DEBUG,n=e?.level??process.env.LOG_LEVEL?.toLowerCase();return hY()?ORe(fY(n??"info"),r,t):KRe(fY(n??"info"),r,t)}function fY(t){return gu[t]??gu.info}function IY(){if(!hY())return;let t=process.stderr.write.bind(process.stderr);process.stderr.write=function(e,r,n){let i=typeof r=="function"?r:n,s=typeof r=="string"?r:void 0,o=typeof e=="string"?e:Buffer.from(e).toString("utf8"),a=o.trim();if(a.startsWith("{"))try{if(typeof JSON.parse(a).severity=="string")return s?t(e,s,i):t(e,i)}catch{}let A={severity:"ERROR",message:a||o,timestamp:new Date().toISOString(),stream:"stderr"},c=JSON.stringify(A)+`
3
3
  `;return i?t(c,i):t(c)}}function EY(t="process",e=r=>process.exit(r)){let r=ve(t),n=i=>Promise.resolve(e(i)).catch(()=>{}).finally(()=>process.exit(i));process.on("uncaughtException",i=>{r.error("Uncaught exception:",i),n(1)}),process.on("unhandledRejection",i=>{r.error("Unhandled rejection:",i instanceof Error?i:String(i)),n(1)})}var gu,mY,It=L(()=>{"use strict";h();gu={debug:0,info:1,warn:2,error:3};mY=!1});var yY=N((Lvt,BY)=>{h();function Tk(t){return t==null?[]:Array.isArray(t)?t:[t]}function HRe(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]}BY.exports=function(t,e){t=t||[],e=e||{};var r,n,i,s,o,a={_:[]},A=0,c=0,u=0,l=t.length;let d=e.alias!==void 0,g=e.unknown!==void 0,p=e.default!==void 0;if(e.alias=e.alias||{},e.string=Tk(e.string),e.boolean=Tk(e.boolean),d)for(r in e.alias)for(n=e.alias[r]=Tk(e.alias[r]),A=0;A<n.length;A++)(e.alias[n[A]]=n.concat(r)).splice(A,1);for(A=e.boolean.length;A-- >0;)for(n=e.alias[e.boolean[A]]||[],c=n.length;c-- >0;)e.boolean.push(n[c]);for(A=e.string.length;A-- >0;)for(n=e.alias[e.string[A]]||[],c=n.length;c-- >0;)e.string.push(n[c]);if(p){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),A=0;A<n.length;A++)e[s].push(n[A])}let f=g?Object.keys(e.alias):[];for(A=0;A<l;A++){if(i=t[A],i==="--"){a._=a._.concat(t.slice(++A));break}for(c=0;c<i.length&&i.charCodeAt(c)===45;c++);if(c===0)a._.push(i);else if(i.substring(c,c+3)==="no-"){if(s=i.substring(c+3),g&&!~f.indexOf(s))return e.unknown(i);a[s]=!1}else{for(u=c+1;u<i.length&&i.charCodeAt(u)!==61;u++);for(s=i.substring(c,u),o=i.substring(++u)||A+1===l||(""+t[A+1]).charCodeAt(0)===45||t[++A],n=c===2?[s]:s,u=0;u<n.length;u++){if(s=n[u],g&&!~f.indexOf(s))return e.unknown("-".repeat(c)+s);HRe(a,s,u+1<n.length||o,e)}}}if(p)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 JRe(){if(Lm!==void 0)return Lm;try{return Lm=require("prettier"),Lm}catch{return Lm=null,null}}function jRe(t){let e=[],r=eg.default.dirname(t);for(;r!==eg.default.dirname(r);){let n=eg.default.join(r,".prettierignore");Nk.default.existsSync(n)&&e.push(n);let i=eg.default.join(r,".git");if(Nk.default.existsSync(i))break;r=eg.default.dirname(r)}return e}function YRe(t){if(t)try{let r=(0,QY.createRequire)(t)("prettier");if(r)return r}catch{}return JRe()}async function ec(t,e,r,n){try{let i=eg.default.resolve(t,n??"file.tsx"),s=YRe(i);if(!s)return e;if(n){let A=jRe(i);if((await s.getFileInfo(i,{ignorePath:A.length>0?A:void 0})).ignored)return e}let o=await s.resolveConfig(i);return await s.format(e,{...o,filepath:n,parser:r})}catch{return e}}var QY,eg,Nk,Lm,Mk=L(()=>{"use strict";h();QY=require("node:module"),eg=z(require("node:path"),1),Nk=z(require("node:fs"),1)});var Pk,rd,Ry,Ty,DY,tg,Lk,_k,rg,wY,nd=L(()=>{"use strict";h();Pk="preview-url",rd="framework",Ry="platform",Ty="node",DY="/~builder-connect",tg="/~builder-connected",Lk="/~builder-dev-tools",_k="/~builder-dev-tools.js",rg="/~builder-dev-tools-close",wY="/mappings"});var Ny=N((Hvt,bY)=>{"use strict";h();var Uk={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"},qRe={up:(t=1)=>"\x1B[S".repeat(t),down:(t=1)=>"\x1B[T".repeat(t)},$Re={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?Uk.up():"");return t&&(e+=Uk.left),e}};bY.exports={cursor:Uk,scroll:qRe,erase:$Re,beep:"\x07"}});var Br=N((jvt,Gk)=>{h();var Py=process||{},vY=Py.argv||[],My=Py.env||{},VRe=!(My.NO_COLOR||vY.includes("--no-color"))&&(!!My.FORCE_COLOR||vY.includes("--color")||Py.platform==="win32"||(Py.stdout||{}).isTTY&&My.TERM!=="dumb"||!!My.CI),WRe=(t,e,r=t)=>n=>{let i=""+n,s=i.indexOf(e,t.length);return~s?t+zRe(i,e,r,s)+e:t+i+e},zRe=(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)},SY=(t=VRe)=>{let e=t?WRe:()=>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")}};Gk.exports=SY();Gk.exports.createColors=SY});function XRe({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 UY(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(ZRe,"")}function GY(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function _m(t,e={}){if(typeof t!="string"||t.length===0||(e={ambiguousIsNarrow:!0,...e},t=UY(t),t.length===0))return 0;t=t.replace(nTe()," ");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(tTe.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}function oTe(){let t=new Map;for(let[e,r]of Object.entries(Lr)){for(let[n,i]of Object.entries(r))Lr[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Lr[n],t.set(i[0],i[1]);Object.defineProperty(Lr,e,{value:r,enumerable:!1})}return Object.defineProperty(Lr,"codes",{value:t,enumerable:!1}),Lr.color.close="\x1B[39m",Lr.bgColor.close="\x1B[49m",Lr.color.ansi=xY(),Lr.color.ansi256=FY(),Lr.color.ansi16m=kY(),Lr.bgColor.ansi=xY(Ok),Lr.bgColor.ansi256=FY(Ok),Lr.bgColor.ansi16m=kY(Ok),Object.defineProperties(Lr,{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=>Lr.rgbToAnsi256(...Lr.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)=>Lr.ansi256ToAnsi(Lr.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>Lr.ansi256ToAnsi(Lr.hexToAnsi256(e)),enumerable:!1}}),Lr}function NY(t,e,r){return String(t).normalize().replace(/\r\n/g,`
4
4
  `).split(`
@@ -75,7 +75,7 @@ ${$Y}${n.trimStart()}`),r=3+(0,ng.stripVTControlCharacters)(n.trimStart()).lengt
75
75
  `),p(),i()};return{start:I,stop:y,message:(B="")=>{a=m(B??a)}}}});function $t(t,e=""){return t.ts.createSourceFile("module.tsx",typeof e=="string"?e:"",t.ts.ScriptTarget.Latest,void 0)}function jy(t,e=""){let r=$t(t,e?.trim());if(r.statements.length===0)throw new Error(`No statements found in code: ${e}`);return r.statements[0]}function Kn(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()+`
76
76
  `:n.printNode(t.ts.EmitHint.Unspecified,e,t.ts.createSourceFile("module.tsx","",t.ts.ScriptTarget.Latest)).trim()+`
77
77
  `}return""}var Yr=L(()=>{"use strict";h()});var r9=N((aSt,t9)=>{"use strict";h();t9.exports=function(){if(process.env.npm_config_user_agent)return kTe(process.env.npm_config_user_agent)};function kTe(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 ro(t){return t.endsWith(".mapper.tsx")||t.endsWith(".mapper.jsx")||t.endsWith(".mapper.ts")||t.endsWith(".mapper.js")||t.endsWith(".mapper.mjs")}function Vt(t,e,r){e=Xo(e),r=Xo(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=Xo(t.normalize(i)),i.startsWith(".")||(i="./"+i),i}function Xo(t){return t.startsWith("\\\\?\\")?t:t.replace(/\\/g,"/")}function sg(t,e){let r=t.extname(e),n=t.basename(e,r).split(/[\/\\]/),i=n[n.length-1];return n9(i==="index"?t.basename(t.dirname(e)):i)}function n9(t){return yr(t).replace(/ /g,"")}function no(t,e){let r=t.extname(e),n=Xo(t.basename(e,r)).split("/").pop();return yr(n==="index"?t.basename(t.dirname(e)):n)}function Qr(t,e){let r=Xo(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 or(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 yr(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 as(t){return t.sort((e,r)=>e.name.toLocaleLowerCase().localeCompare(r.name.toLocaleLowerCase()))}async function hr(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 s9(t){return(await t.hash(t.getAppRootDir())).substring(0,8)}function Gm(t){return typeof t=="number"}function ad(t){return typeof t=="boolean"}function Hi(t){return typeof t=="string"}function Ad(t){return typeof t=="string"?/^[A-Z][A-Za-z0-9]*$/.test(t):!1}function Ns(t){return JSON.parse(JSON.stringify(t))}function Yy(t,e,r){for(let n of e)if(t.dirname(r).includes(n))return!0;return!1}function o9(){try{let t=(0,i9.default)();if(t?.name)return t.name}catch{}return"npm"}function RTe(){return process.platform.startsWith("win")}function it(){return process.pkg?"@builder.io/agent":RTe()?'"@builder.io/dev-tools"':"builder.io"}function Zk(t){return t.replace(/[^a-zA-Z0-9-_]/g,"_")}var i9,St=L(()=>{"use strict";h();i9=z(r9(),1)});function Ji(t){let e=t.join(t.getAppRootDir(),"tsconfig.json");return t.exists(e)}async function As(t,e){async function r(i,s){if(s>10)return;let o=await t.readdir(i);for(let a of o){if(TTe.includes(a))continue;let A=t.join(i,a),c=await t.stat(A);if(c){if(c.isFile()&&a.startsWith("builder-registry."))return A;if(c.isDirectory()){let u=await r(A,s+1);if(u)return u}}}}let n=await r(t.getAppRootDir(),0);if(!n){let s=`builder-registry.${await Ji(t)?"ts":"js"}`;return t.join(e,s)}return n}async function Zo(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 a9(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 Om(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 A=await Om(t,o,r);if(A)return A}}))).find(s=>typeof s=="string")}var TTe,Si=L(()=>{"use strict";h();TTe=["node_modules","dist","build","public"]});async function Sn(t,e,r){if(!Array.isArray(e)||e.length===0)throw new Error(`createTsProgram() Invalid filePaths: ${e}`);let n=await a9(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 A=Km.get(a);if(!A){try{t.statSync(a).isFile()?A={exists:!0,content:t.readFileSync(a)}:A={exists:!1}}catch{A={exists:!1}}Km.set(a,A)}return A.exists}if(!s.has(a))if(t.existsSync(a)){let c=t.statSync(a);s.set(a,c.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:()=>`
78
- `,getSourceFile:a=>{if(a=t.normalize(a),a.includes("node_modules")){let c=Km.get(a);if(c)return $t(t,c.content)}let A;try{A=t.readFileSync(a)}catch{console.error(`Could not read: ${a}`),A==null}if(A==null){let c=t.basename(a),u=t.extname(c).toLowerCase();if(a.startsWith(i)&&u===".ts"&&(A=c9.get(c),A==null&&typeof self<"u"&&typeof fetch=="function"))throw new $y(c)}return a.includes("node_modules")&&(A?Km.set(a,{exists:!0,content:A}):Km.set(a,{exists:!1})),$t(t,A)},readFile:a=>{let A=t.readFileSync(a);return typeof A=="string"?A:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return NTe(t,o,e,r)}catch(a){if(a instanceof $y){await MTe(t,a.libName);continue}throw t.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${e[0]}`,{cause:a})}}function NTe(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=A9.get(s);if(!o){let a=t.ts.readConfigFile(s,A=>{let c=t.readFileSync(A);return typeof c=="string"?c: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:(c,u)=>t.readdirSync(c),fileExists:c=>t.existsSync(c),readFile:c=>t.readFileSync(c)||void 0},t.dirname(s),void 0,s).options,A9.set(s,o))}o&&(i.options=Ns(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 cd(t,e,r){r||(r=await Sn(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 MTe(t,e){let r=`https://cdn.jsdelivr.net/npm/typescript@${t.ts.version}/lib/${e}`;qy.has(e)||qy.set(e,fetch(r).then(n=>n.text()).then(n=>{c9.set(e,n)})),await qy.get(e),qy.delete(e)}async function u9(t,e){let r=await t.readFile(e.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${e.filePath}`}],code:null,output:null}:eR(t,{code:r,filePath:e.filePath,compilerOptions:e.compilerOptions})}function eR(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 $y,c9,qy,Km,A9,io=L(()=>{"use strict";h();Yr();St();Si();$y=class{libName;constructor(e){this.libName=e}};c9=new Map,qy=new Map,Km=new Map,A9=new Map});var PTe,ft,Xr=L(()=>{"use strict";h();PTe="1.65.1-beta.202606121012.1a361bc",ft=process.env.OVERRIDE_VERSION??PTe});async function og(t){let e=[],r=await Zo(t,t.getRepoRootDir());if(r){let n=await g9(r,t);e.push(...n)}return e}async function g9(t,e){let r=[];if(t&&typeof t=="object"){let n=new Set(Object.keys({...t.dependencies,...t.devDependencies}));for(let i of LTe)if(n.has(i)&&!r.some(s=>s.name===i)){let s={name:i};l9.has(i)&&(s.version=await l9.get(i)(e)),r.push(s)}}return r}function tR(t){let e=parseInt(t);return Number.isNaN(e)?void 0:e}var l9,LTe,ag=L(()=>{"use strict";h();Si();St();l9=new Map([["next",async t=>{if(!t.spawnSync)return;let e=o9(),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,A]=s.split(".");return{major:tR(o),minor:tR(a),patch:tR(A)}}]]),LTe=["@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 so(t){let e=p9(t),r=await t.readFile(e);return typeof r=="string"?JSON.parse(r):{}}async function oo(t,e){e=typeof e=="object"&&e!=null?e:{};let r=p9(t);await t.writeFile(r,JSON.stringify(e??{},null,2))}function p9(t){let e=t.getAppRootDir();return t.join(e,"node_modules",".builder","builder-cache.json")}var Ag=L(()=>{"use strict";h()});async function Ha(t,e,r){let n={envKey:r,envValue:null,file:""};for(let i of e){let s=t.join(t.getAppRootDir(),i),o=await _Te(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 _Te(t,e){let r=await t.readFile(e);return typeof r=="string"?d9(r):null}function d9(t){let e={},r=t.replace(/\r\n?/gm,`
78
+ `,getSourceFile:a=>{if(a=t.normalize(a),a.includes("node_modules")){let c=Km.get(a);if(c)return $t(t,c.content)}let A;try{A=t.readFileSync(a)}catch{console.error(`Could not read: ${a}`),A==null}if(A==null){let c=t.basename(a),u=t.extname(c).toLowerCase();if(a.startsWith(i)&&u===".ts"&&(A=c9.get(c),A==null&&typeof self<"u"&&typeof fetch=="function"))throw new $y(c)}return a.includes("node_modules")&&(A?Km.set(a,{exists:!0,content:A}):Km.set(a,{exists:!1})),$t(t,A)},readFile:a=>{let A=t.readFileSync(a);return typeof A=="string"?A:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return NTe(t,o,e,r)}catch(a){if(a instanceof $y){await MTe(t,a.libName);continue}throw t.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${e[0]}`,{cause:a})}}function NTe(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=A9.get(s);if(!o){let a=t.ts.readConfigFile(s,A=>{let c=t.readFileSync(A);return typeof c=="string"?c: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:(c,u)=>t.readdirSync(c),fileExists:c=>t.existsSync(c),readFile:c=>t.readFileSync(c)||void 0},t.dirname(s),void 0,s).options,A9.set(s,o))}o&&(i.options=Ns(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 cd(t,e,r){r||(r=await Sn(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 MTe(t,e){let r=`https://cdn.jsdelivr.net/npm/typescript@${t.ts.version}/lib/${e}`;qy.has(e)||qy.set(e,fetch(r).then(n=>n.text()).then(n=>{c9.set(e,n)})),await qy.get(e),qy.delete(e)}async function u9(t,e){let r=await t.readFile(e.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${e.filePath}`}],code:null,output:null}:eR(t,{code:r,filePath:e.filePath,compilerOptions:e.compilerOptions})}function eR(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 $y,c9,qy,Km,A9,io=L(()=>{"use strict";h();Yr();St();Si();$y=class{libName;constructor(e){this.libName=e}};c9=new Map,qy=new Map,Km=new Map,A9=new Map});var PTe,ft,Xr=L(()=>{"use strict";h();PTe="1.65.1-beta.202606121024.bf2bd60",ft=process.env.OVERRIDE_VERSION??PTe});async function og(t){let e=[],r=await Zo(t,t.getRepoRootDir());if(r){let n=await g9(r,t);e.push(...n)}return e}async function g9(t,e){let r=[];if(t&&typeof t=="object"){let n=new Set(Object.keys({...t.dependencies,...t.devDependencies}));for(let i of LTe)if(n.has(i)&&!r.some(s=>s.name===i)){let s={name:i};l9.has(i)&&(s.version=await l9.get(i)(e)),r.push(s)}}return r}function tR(t){let e=parseInt(t);return Number.isNaN(e)?void 0:e}var l9,LTe,ag=L(()=>{"use strict";h();Si();St();l9=new Map([["next",async t=>{if(!t.spawnSync)return;let e=o9(),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,A]=s.split(".");return{major:tR(o),minor:tR(a),patch:tR(A)}}]]),LTe=["@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 so(t){let e=p9(t),r=await t.readFile(e);return typeof r=="string"?JSON.parse(r):{}}async function oo(t,e){e=typeof e=="object"&&e!=null?e:{};let r=p9(t);await t.writeFile(r,JSON.stringify(e??{},null,2))}function p9(t){let e=t.getAppRootDir();return t.join(e,"node_modules",".builder","builder-cache.json")}var Ag=L(()=>{"use strict";h()});async function Ha(t,e,r){let n={envKey:r,envValue:null,file:""};for(let i of e){let s=t.join(t.getAppRootDir(),i),o=await _Te(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 _Te(t,e){let r=await t.readFile(e);return typeof r=="string"?d9(r):null}function d9(t){let e={},r=t.replace(/\r\n?/gm,`
79
79
  `),n;for(;(n=UTe.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,`
80
80
  `),s=s.replace(/\\r/g,"\r")),e[i]=s}return e}async function Ja(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+=`
81
81
 
@@ -1276,7 +1276,7 @@ Restarting server after Builder Devtools update...
1276
1276
  <h3>How's Devtools working for you?</h3>
1277
1277
  <p>We'd love your feedback!</p>
1278
1278
  </div>
1279
- \`,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",a=>{a.preventDefault(),a.stopPropagation(),Ee(t,!1),window.open(Ur(),"builder")}),t.getElementById("components-link").addEventListener("click",a=>{a.preventDefault(),a.stopPropagation();let c=t.querySelector(".nav-cmp-list .section-content");c.scrollTop=0,oe(t,"nav-cmp-list"),ai(t)}),t.getElementById("settings-link").addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),oe(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),Ee(t,!1),window.open(je(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",a=>{a.preventDefault(),a.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(),Ht(e.checked)}),e.checked=it(),Ht(e.checked)}var Dt=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>\`,si(e),ui(e),oi(e),ri(e),ti(e),ci(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.65.1-beta.202606121012.1a361bc"}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)}
1279
+ \`,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",a=>{a.preventDefault(),a.stopPropagation(),Ee(t,!1),window.open(Ur(),"builder")}),t.getElementById("components-link").addEventListener("click",a=>{a.preventDefault(),a.stopPropagation();let c=t.querySelector(".nav-cmp-list .section-content");c.scrollTop=0,oe(t,"nav-cmp-list"),ai(t)}),t.getElementById("settings-link").addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),oe(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),Ee(t,!1),window.open(je(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",a=>{a.preventDefault(),a.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(),Ht(e.checked)}),e.checked=it(),Ht(e.checked)}var Dt=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>\`,si(e),ui(e),oi(e),ri(e),ti(e),ci(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.65.1-beta.202606121024.bf2bd60"}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)}
1280
1280
  </style>\`,Nt=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=lo+\`<main>
1281
1281
  <aside>
1282
1282
  <div class="logo"></div>
@@ -1315,7 +1315,7 @@ Restarting server after Builder Devtools update...
1315
1315
  </nav>
1316
1316
  </section>
1317
1317
  </main>
1318
- \`,po();let r=new URL(Fr,ot);r.searchParams.set(Br,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 jr()).isValid||fo()},fo=()=>{customElements.get("builder-dev-tools-overview")||customElements.define("builder-dev-tools-overview",Nt);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",at),customElements.get("builder-dev-tools-menu")||customElements.define("builder-dev-tools-menu",Dt);let t=document.querySelector("builder-dev-tools-menu");t||(t=document.createElement("builder-dev-tools-menu"),t.setAttribute("data-version","1.65.1-beta.202606121012.1a361bc"),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.65.1-beta.202606121012.1a361bc"),mo());})();`)}async function _ne(t){return Une(t,`<!doctype html>
1318
+ \`,po();let r=new URL(Fr,ot);r.searchParams.set(Br,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 jr()).isValid||fo()},fo=()=>{customElements.get("builder-dev-tools-overview")||customElements.define("builder-dev-tools-overview",Nt);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",at),customElements.get("builder-dev-tools-menu")||customElements.define("builder-dev-tools-menu",Dt);let t=document.querySelector("builder-dev-tools-menu");t||(t=document.createElement("builder-dev-tools-menu"),t.setAttribute("data-version","1.65.1-beta.202606121024.bf2bd60"),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.65.1-beta.202606121024.bf2bd60"),mo());})();`)}async function _ne(t){return Une(t,`<!doctype html>
1319
1319
  <html lang="en" dir="ltr">
1320
1320
  <head>
1321
1321
  <meta charset="utf-8" />
@@ -1519,7 +1519,7 @@ ${t.content.trim()}
1519
1519
  `,e}var _6e,Jie=L(()=>{"use strict";h();_6e="This is a report from a background worker, NOT a user message. Review the results and take appropriate action (e.g., send findings to the user, update memory)."});var jie=L(()=>{"use strict";h()});var Yie=L(()=>{"use strict";h()});var qie=L(()=>{"use strict";h()});var Cr,KL,U6e,$ie,Vie,G6e,O6e,YJt,qJt,$Jt,Wie=L(()=>{"use strict";h();Cr=require("zod"),KL=/^https:\/\/github\.com\/[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+(?:\.git)?\/?$/,U6e=2*1024*1024*1024,$ie=50,Vie=1,G6e=Cr.z.object({projectName:Cr.z.string().trim().min(1).max(200).optional(),devToolsVersion:Cr.z.string().trim().min(1).max(64).optional(),selection:Cr.z.preprocess(t=>{if(typeof t!="string")return t;let e=t.trim();if(e)try{return JSON.parse(e)}catch{return t}},Cr.z.record(Cr.z.string(),Cr.z.array(Cr.z.string().min(1)).max(1e4))).optional(),githubRepoUrl:Cr.z.string().trim().regex(KL,"must be a public github.com repo URL").optional(),connectedProjectId:Cr.z.string().trim().min(1).max(128).optional()}),O6e=Cr.z.object({name:Cr.z.string().trim().min(1).max(512),mimetype:Cr.z.string().trim().min(1).max(255),declaredSize:Cr.z.number().int().positive().max(U6e)}),YJt=Cr.z.object({attachments:Cr.z.array(O6e).min(Vie).max($ie)}),qJt=Cr.z.object({jobId:Cr.z.string().min(1),gcsObject:Cr.z.string().min(1),ownerId:Cr.z.string().min(1),mimetype:Cr.z.string().min(1),originalName:Cr.z.string().min(1),idx:Cr.z.number().int().nonnegative()}),$Jt=Cr.z.object({...G6e.shape,uploads:Cr.z.array(Cr.z.string().min(1)).min(Vie).max($ie)})});function Js(t){let e=t.code;return e?ose.has(e)?"dns_resolution_failed":e==="ECONNREFUSED"?"tcp_connection_refused":e==="ECONNRESET"||e==="EPIPE"?"tcp_connection_reset":ise.has(e)?"tcp_connection_timeout":e==="ENETUNREACH"||e==="ENETDOWN"?"tcp_network_unreachable":e==="EHOSTUNREACH"?"tcp_host_unreachable":zie.has(e)?"tls_self_signed_cert":Xie.has(e)?"tls_cert_expired":Zie.has(e)?"tls_cert_not_yet_valid":tse.has(e)?"tls_cert_hostname_mismatch":ese.has(e)?"tls_cert_invalid":nse.has(e)?"tls_handshake_failed":rse.has(e)?"tls_protocol_error":sse.has(e)?"proxy_tunnel_failed":"unknown_error":"unknown_error"}function HL(t){if(t.cause&&"code"in t.cause)return Js(t.cause);let e=t.message.toLowerCase();return e.includes("failed to fetch")||e.includes("network")?"tcp_connection_refused":e.includes("timeout")||e.includes("timed out")?"tcp_connection_timeout":e.includes("dns")||e.includes("not found")?"dns_resolution_failed":e.includes("certificate")||e.includes("ssl")?e.includes("expired")?"tls_cert_expired":e.includes("self-signed")||e.includes("self signed")?"tls_self_signed_cert":"tls_cert_invalid":"unknown_error"}function c0(t){if(!t)return;if(["tcp_connection_timeout","tcp_host_unreachable","tcp_network_unreachable"].includes(t))return"ip_whitelisting_required";if(["dns_resolution_failed","dns_timeout","dns_wrong_ip"].includes(t))return"dns_misconfiguration";if(["tls_self_signed_cert","tls_cert_expired","tls_cert_not_yet_valid","tls_cert_invalid","tls_cert_hostname_mismatch","tls_handshake_failed","tls_protocol_error"].includes(t))return"self_signed_certificate";if(["tcp_connection_refused","tcp_connection_reset"].includes(t))return"firewall_blocking";if(["proxy_auth_required","proxy_connection_failed","proxy_tunnel_failed"].includes(t))return"corporate_proxy_required";if(t==="http_service_unavailable"||t==="http_server_error")return"server_unavailable"}function u0(t){let e=t.toLowerCase();return e.includes("dns resolution failed")||e.includes("dns resolution")||e.includes("no addresses found")?{connectivityErrorCode:"dns_resolution_failed",checkType:"dns"}:e.includes("connection attempt failed")||e.includes("connection timed out")||e.includes("connection timeout")||e.includes("etimedout")||e.includes("timed out")?{connectivityErrorCode:"tcp_connection_timeout",checkType:"tcp"}:e.includes("econnrefused")||e.includes("connection refused")?{connectivityErrorCode:"tcp_connection_refused",checkType:"tcp"}:e.includes("enotfound")||e.includes("getaddrinfo")||e.includes("eai_again")||e.includes("enodata")?{connectivityErrorCode:"dns_resolution_failed",checkType:"dns"}:e.includes("network unreachable")?{connectivityErrorCode:"tcp_network_unreachable",checkType:"tcp"}:null}var zie,Xie,Zie,ese,tse,rse,nse,ise,sse,ose,ju=L(()=>{"use strict";h();zie=new Set(["DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN"]),Xie=new Set(["CERT_HAS_EXPIRED","ERROR_IN_CERT_NOT_AFTER_FIELD"]),Zie=new Set(["CERT_NOT_YET_VALID","ERROR_IN_CERT_NOT_BEFORE_FIELD"]),ese=new Set(["UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","INVALID_CA","CERT_SIGNATURE_FAILURE","CERT_REVOKED","CERT_REJECTED","CERT_UNTRUSTED","CERT_CHAIN_TOO_LONG","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","UNABLE_TO_DECRYPT_CERT_SIGNATURE"]),tse=new Set(["HOSTNAME_MISMATCH","ERR_TLS_CERT_ALTNAME_INVALID"]),rse=new Set(["ERR_TLS_INVALID_PROTOCOL_VERSION","ERR_TLS_INVALID_PROTOCOL_METHOD","ERR_TLS_PROTOCOL_VERSION_CONFLICT","ERR_TLS_INVALID_STATE","ERR_TLS_INVALID_CONTEXT","ERR_TLS_RENEGOTIATION_DISABLED","ERR_TLS_REQUIRED_SERVER_NAME","ERR_TLS_SESSION_ATTACK","ERR_TLS_SNI_FROM_SERVER","ERR_TLS_DH_PARAM_SIZE","ERR_SSL_WRONG_VERSION_NUMBER","EPROTO"]),nse=new Set(["ERR_TLS_HANDSHAKE_TIMEOUT","ERR_SSL_HANDSHAKE_FAILURE"]),ise=new Set(["ETIMEDOUT","ESOCKETTIMEDOUT","ERR_SOCKET_CONNECTION_TIMEOUT","ERR_HTTP_REQUEST_TIMEOUT"]),sse=new Set(["ERR_PROXY_INVALID_CONFIG","ERR_PROXY_TUNNEL","ERR_TUNNEL_CONNECTION_FAILED"]),ose=new Set(["ENOTFOUND","EAI_AGAIN","ENODATA"])});var js=L(()=>{"use strict";h();uie();lie();mie();RL();Iie();TL();i0();Rie();Tie();Nie();Lie();_ie();Uie();Gie();Oie();Jie();jie();Yie();qie();Wie();ju()});function ase({devServerUrl:t,proxyOrigin:e,proxyDefaultOrigin:r,proxyDestination:n}){let i;if(t)try{i=new URL(t)}catch{}return!e&&i&&(IA(i.hostname)?(e=`${i.protocol}//${i.hostname}:*`,r=i.origin):(e=i.origin,r=i.origin)),!r&&e&&(e.includes("*")||!e.startsWith("https://")&&!e.startsWith("http://")||(r=e)),{proxyOrigin:e,proxyDefaultOrigin:r,proxyDestination:n}}function IA(t){let e=typeof t=="string"?t:t.hostname;return e=e.replace(/^\[|\]$/g,""),e==="localhost"||e==="127.0.0.1"||e==="::1"||e==="0.0.0.0"}var hI=L(()=>{"use strict";h()});function Ase(){let t=process.env.FUSION_IDE_PORT;if(!t)return null;let e=Number(t);return Number.isFinite(e)&&e>0?e:null}async function cse(){let t=Ase();if(!t)return null;try{let e=await fetch(`http://127.0.0.1:${t}/context`,{signal:AbortSignal.timeout(300)});return e.ok?await e.json():null}catch{return null}}async function use(t){let e=Ase();if(!e)return null;try{let r=new URL(`http://127.0.0.1:${e}/diagnostics`);t&&r.searchParams.set("file",t);let n=await fetch(r.toString(),{signal:AbortSignal.timeout(500)});return n.ok?await n.json():null}catch{return null}}function lse(t){let e=[];if(t.file){let r=t.line!=null?`:${t.line+1}`:"";e.push(`Active file: ${t.file}${r}`)}return t.selection&&e.push(`Selected text:
1520
1520
  ${t.selection}`),e.join(`
1521
1521
  `)}function gse(t){let{diagnostics:e}=t;if(e.length===0)return"No diagnostics found.";let r=[`IDE diagnostics (${e.length}):`];for(let n of e.slice(0,50)){let i=n.source?` (${n.source})`:"";r.push(` [${n.severity}] ${n.file}:${n.line+1}: ${n.message}${i}`)}return e.length>50&&r.push(` \u2026 and ${e.length-50} more`),r.join(`
1522
- `)}var JL=L(()=>{"use strict";h()});function mI(t){let r="^"+t.replace(/([.+^=!:${}()|[\]\\\/^])/g,"\\$1").replace(/\*/g,".*").replace(/\?/g,".")+"$";return new RegExp(r)}function K6e(t){return t.replace(/\\\r?\n/g,"")}function jL(t){let e=K6e(t),r=e.match(/^timeout\s+(\d+[smhd]?)\s+(.+)$/i);return r?r[2]:e}function CI(t){let e=[],r="",n=!1,i="";for(let s=0;s<t.length;s++){let o=t[s],a=t[s+1];if(!n&&(o==='"'||o==="'")){let A=0;for(let c=s-1;c>=0&&t[c]==="\\";c--)A++;A%2===0&&(n=!0,i=o),r+=o}else if(n&&o===i){let A=0;for(let c=s-1;c>=0&&t[c]==="\\";c--)A++;A%2===0&&(n=!1,i=""),r+=o}else n?r+=o:o==="&"&&a==="&"||o==="|"&&a==="|"?(e.push(r.trim()),r="",s++):o===";"||o==="|"?(e.push(r.trim()),r=""):r+=o}return r.trim()&&e.push(r.trim()),e.filter(Boolean)}function dse(t){let e=jL(t);return CI(e).some(n=>{let i=n.trim();for(;/^\w+=\S*\s/.test(i);)i=i.replace(/^\w+=\S*\s+/,"");let s=i.split(/\s/)[0],o=s.includes("/")?s.split("/").pop():s;return!H6e.has(o)})}function II(t,e={policies:pse}){let r=jL(t);if(/`|\$\(/.test(r))return{policy:"injection_prevention",message:"Command substitution and backticks are prohibited to prevent injection attacks.",command:r};let n=[...e.policies].sort((a,A)=>A.priority-a.priority),i=(a,A)=>{for(let c of n){let u=c.patterns.map(l=>typeof l=="string"?mI(l):l);for(let l of u)if(l.test(a)){if(e.allowOverrides&&e.allowOverrides.map(p=>typeof p=="string"?mI(p):p).some(p=>p.test(a)))continue;return{policy:c.name,message:c.errorMessage,command:a,matchedPattern:l.source}}}return null},s=i(r,!0);if(s)return s;let o=CI(r);for(let a of o){let A=i(a,!1);if(A)return A}return null}function l0(t,e=[],r=[],n){let i=jL(t);if(n&&II(i,n)||/`|\$\(/.test(i))return!1;let s=Array.isArray(e)&&e.length>0?typeof e[0]=="string"?e.map(mI):e:[],o=Array.isArray(r)&&r.length>0?typeof r[0]=="string"?r.map(mI):r:[];return CI(i).every(A=>o.some(u=>u.test(A))?s.some(u=>u.test(A)):s.length>0?s.some(u=>u.test(A)):!0)}function g0(t={}){return{policies:pse,...t}}function p0(t){return t.map(mI)}var pse,H6e,EI=L(()=>{"use strict";h();pse=[{name:"git_project_creation",description:"Prevents git operations that could cause permanent data loss",patterns:[/\bgit\s+clone\b/,/\bgit\s+checkout\s+-b\s+\S+/,/\bgit\s+switch\s+\S+/,/\bgit\s+branch\s+(?!-[dlDrav])(?!--(?:all|list|remote|verbose)\b)\S/,/\bgit\s+init\b/,/\bgit\s+remote\b/,/\bgit\s+clean\s+-[fF]/,/\bgit\s+commit\s+--amend/,/\bgit\s+rm\b/,/\bgit\s+mv\b/,/\bgit\s+tag\b/,/\bgit\s+restore\s+(?!--staged\b)(?!--source\b)(?!--\s)\S+\s*$/,/\bgit\s+reset\s+--hard/,/\bgit\s+reset\s+--mixed/,/\bgit\s+stash\s+drop/,/\bgit\s+stash\s+clear/],errorMessage:"Git operations that could cause permanent data loss are not supported. This includes branch switching, creating new branches, cloning repositories, or destructive operations. File-specific operations like 'git checkout -- file.json' or 'git checkout --ours file.json' are allowed for merge conflict resolution.",priority:95},{name:"git_operations",description:"Prevents direct .git directory manipulation",patterns:[/\.git\b/,/\/\.git\//,/\\\.git\\/,/\.git\//,/\.git$/],errorMessage:"Direct .git operations are prohibited for security reasons. Use proper git commands instead of manipulating .git directly.",priority:100},{name:"system_files",description:"Prevents access to critical system files",patterns:[/\/etc\/passwd/,/\/etc\/shadow/,/\/etc\/sudoers/,/\/proc\/self/,/\/sys\//,/\bsudo\s/,/\bsu\s+(root|admin)/],errorMessage:"Access to system files is prohibited for security reasons.",priority:90},{name:"network_commands",description:"Prevents potentially dangerous network operations",patterns:[/\bnc\s.*-e/,/\btelnet\b/,/\bftp\b.*<<</,/\bcurl\s+.*\|\s*(sh|bash)/,/\bwget\s+.*\|\s*(sh|bash)/],errorMessage:"Potentially dangerous network operations are restricted.",priority:80},{name:"file_permissions",description:"Prevents dangerous file permission changes",patterns:[/\bchmod\s+(777|755).*\/$/,/\bchown\s+root/,/\bchgrp\s+root/,/\bchmod\s+.*[+]s/,/\bchmod\s+777\s+\/etc/,/\bchmod\s+777\s+\/$/],errorMessage:"Dangerous file permission operations are prohibited.",priority:70},{name:"environment_manipulation",description:"Prevents dangerous environment variable manipulation",patterns:[/export\s+PATH=.*:/,/export\s+LD_LIBRARY_PATH/,/export\s+LD_PRELOAD/,/\$\{IFS\}/],errorMessage:"Environment variable manipulation that could compromise security is not allowed.",priority:60},{name:"code_execution",description:"Prevents various code execution patterns",patterns:[/\beval\s+/,/\bexec\s+\/bin\/(sh|bash)/,/\bsource\s+\/dev/,/\.\s+\/dev/,/\.\s+\/proc/,/\bdd\s+.*of=.*\|/],errorMessage:"Arbitrary code execution patterns are prohibited.",priority:50},{name:"data_exfiltration",description:"Prevents potential data exfiltration",patterns:[/\btar\s+.*\|.*nc\b/,/\bcat\s+.*\|.*curl\b/,/\bfind\s+.*-exec.*\|/,/\bbase64\s+.*\|.*curl/,/\btar\s+czf\s+-.*\|\s*nc/,/\bfind\s+\/.*-name.*\+.*\|\s*base64/,/\bcat\s+\/etc\/passwd\s*\|/],errorMessage:"Commands that could be used for data exfiltration are blocked.",priority:40},{name:"virtual_files_access",description:"Prevents Bash commands from referencing virtual file paths that only exist in the LLM context",patterns:[/\bdesign-system-docs\b/],errorMessage:"The 'design-system-docs/' directory is a virtual path that does not exist on the filesystem. These files are only accessible through the Read, Glob, and Grep tools. Do not use Bash commands (like cat, ls, cd, find, etc.) to access them.",priority:35}];H6e=new Set(["echo","cd","find","ls","rm","cp","mv","git","gh","rg","pwd","head","lsof","kill","ps","tr","awk","cat","grep","sed","tail","touch","mkdir","env","printenv","sleep","export","wc","curl","which","whoami","uname","date","dirname","basename","realpath","readlink","stat","file","diff","sort","uniq","tee","xargs","chmod","chown","test","true","false","builderio"])});async function J6e(t){return(await YL).getRandomValues(new Uint8Array(t))}async function j6e(t){let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",r=Math.pow(2,8)-Math.pow(2,8)%e.length,n="";for(;n.length<t;){let i=await J6e(t-n.length);for(let s of i)s<r&&(n+=e[s%e.length])}return n}async function Y6e(t){return await j6e(t)}async function q6e(t){let e=await(await YL).subtle.digest("SHA-256",new TextEncoder().encode(t));return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function qL(t){if(t||(t=43),t<43||t>128)throw`Expected a length between 43 and 128. Received ${t}.`;let e=await Y6e(t),r=await q6e(e);return{code_verifier:e,code_challenge:r}}var YL,fse=L(()=>{h();YL=globalThis.crypto?.webcrypto??globalThis.crypto??import("node:crypto").then(t=>t.webcrypto)});var T,Yu,f0,qu,h0,ui,hse,mse,Fjt,$6e,V6e,VL,Ys,BI,Cse,li,mo,Co,gi,m0,Ise,yI,Ese,Bse,WL,Hg,Ze,zL,yse,$u,kjt,Bc,W6e,C0,z6e,QI,wf,Qse,X6e,Z6e,eqe,tqe,rqe,nqe,XL,iqe,ZL,I0,Dse,E0,sqe,oqe,B0,aqe,DI,wI,Aqe,bI,yc,cqe,vI,y0,Q0,D0,Rjt,w0,b0,v0,wse,bse,vse,e_,Sse,SI,bf,xse,uqe,t_,r_,n_,i_,s_,lqe,o_,a_,A_,gqe,pqe,dqe,fqe,hqe,mqe,Cqe,Iqe,Eqe,c_,Bqe,yqe,u_,l_,g_,Qqe,Dqe,wqe,p_,bqe,d_,f_,vqe,Sqe,Fse,h_,m_,Vu,Tjt,xqe,xI,C_,kse,FI,Fqe,I_,kqe,Rqe,Tqe,Nqe,Mqe,Pqe,Lqe,d0,_qe,Uqe,E_,Jg,kI,Gqe,Oqe,Kqe,Hqe,Jqe,jqe,Yqe,qqe,$qe,Vqe,Wqe,zqe,Xqe,Zqe,e$e,B_,t$e,r$e,Wu,n$e,i$e,s$e,o$e,y_,a$e,A$e,Q_,c$e,Njt,Mjt,Pjt,Ljt,_jt,Ujt,je,$L,ma=L(()=>{h();T=z(require("zod/v4"),1),Yu="2025-11-25",f0=[Yu,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],qu="io.modelcontextprotocol/related-task",h0="2.0",ui=T.custom(t=>t!==null&&(typeof t=="object"||typeof t=="function")),hse=T.union([T.string(),T.number().int()]),mse=T.string(),Fjt=T.looseObject({ttl:T.union([T.number(),T.null()]).optional(),pollInterval:T.number().optional()}),$6e=T.object({ttl:T.number().optional()}),V6e=T.object({taskId:T.string()}),VL=T.looseObject({progressToken:hse.optional(),[qu]:V6e.optional()}),Ys=T.object({_meta:VL.optional()}),BI=Ys.extend({task:$6e.optional()}),Cse=t=>BI.safeParse(t).success,li=T.object({method:T.string(),params:Ys.loose().optional()}),mo=T.object({_meta:VL.optional()}),Co=T.object({method:T.string(),params:mo.loose().optional()}),gi=T.looseObject({_meta:VL.optional()}),m0=T.union([T.string(),T.number().int()]),Ise=T.object({jsonrpc:T.literal(h0),id:m0,...li.shape}).strict(),yI=t=>Ise.safeParse(t).success,Ese=T.object({jsonrpc:T.literal(h0),...Co.shape}).strict(),Bse=t=>Ese.safeParse(t).success,WL=T.object({jsonrpc:T.literal(h0),id:m0,result:gi}).strict(),Hg=t=>WL.safeParse(t).success;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(Ze||(Ze={}));zL=T.object({jsonrpc:T.literal(h0),id:m0.optional(),error:T.object({code:T.number().int(),message:T.string(),data:T.unknown().optional()})}).strict(),yse=t=>zL.safeParse(t).success,$u=T.union([Ise,Ese,WL,zL]),kjt=T.union([WL,zL]),Bc=gi.strict(),W6e=mo.extend({requestId:m0.optional(),reason:T.string().optional()}),C0=Co.extend({method:T.literal("notifications/cancelled"),params:W6e}),z6e=T.object({src:T.string(),mimeType:T.string().optional(),sizes:T.array(T.string()).optional(),theme:T.enum(["light","dark"]).optional()}),QI=T.object({icons:T.array(z6e).optional()}),wf=T.object({name:T.string(),title:T.string().optional()}),Qse=wf.extend({...wf.shape,...QI.shape,version:T.string(),websiteUrl:T.string().optional(),description:T.string().optional()}),X6e=T.intersection(T.object({applyDefaults:T.boolean().optional()}),T.record(T.string(),T.unknown())),Z6e=T.preprocess(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,T.intersection(T.object({form:X6e.optional(),url:ui.optional()}),T.record(T.string(),T.unknown()).optional())),eqe=T.looseObject({list:ui.optional(),cancel:ui.optional(),requests:T.looseObject({sampling:T.looseObject({createMessage:ui.optional()}).optional(),elicitation:T.looseObject({create:ui.optional()}).optional()}).optional()}),tqe=T.looseObject({list:ui.optional(),cancel:ui.optional(),requests:T.looseObject({tools:T.looseObject({call:ui.optional()}).optional()}).optional()}),rqe=T.object({experimental:T.record(T.string(),ui).optional(),sampling:T.object({context:ui.optional(),tools:ui.optional()}).optional(),elicitation:Z6e.optional(),roots:T.object({listChanged:T.boolean().optional()}).optional(),tasks:eqe.optional()}),nqe=Ys.extend({protocolVersion:T.string(),capabilities:rqe,clientInfo:Qse}),XL=li.extend({method:T.literal("initialize"),params:nqe}),iqe=T.object({experimental:T.record(T.string(),ui).optional(),logging:ui.optional(),completions:ui.optional(),prompts:T.object({listChanged:T.boolean().optional()}).optional(),resources:T.object({subscribe:T.boolean().optional(),listChanged:T.boolean().optional()}).optional(),tools:T.object({listChanged:T.boolean().optional()}).optional(),tasks:tqe.optional()}),ZL=gi.extend({protocolVersion:T.string(),capabilities:iqe,serverInfo:Qse,instructions:T.string().optional()}),I0=Co.extend({method:T.literal("notifications/initialized"),params:mo.optional()}),Dse=t=>I0.safeParse(t).success,E0=li.extend({method:T.literal("ping"),params:Ys.optional()}),sqe=T.object({progress:T.number(),total:T.optional(T.number()),message:T.optional(T.string())}),oqe=T.object({...mo.shape,...sqe.shape,progressToken:hse}),B0=Co.extend({method:T.literal("notifications/progress"),params:oqe}),aqe=Ys.extend({cursor:mse.optional()}),DI=li.extend({params:aqe.optional()}),wI=gi.extend({nextCursor:mse.optional()}),Aqe=T.enum(["working","input_required","completed","failed","cancelled"]),bI=T.object({taskId:T.string(),status:Aqe,ttl:T.union([T.number(),T.null()]),createdAt:T.string(),lastUpdatedAt:T.string(),pollInterval:T.optional(T.number()),statusMessage:T.optional(T.string())}),yc=gi.extend({task:bI}),cqe=mo.merge(bI),vI=Co.extend({method:T.literal("notifications/tasks/status"),params:cqe}),y0=li.extend({method:T.literal("tasks/get"),params:Ys.extend({taskId:T.string()})}),Q0=gi.merge(bI),D0=li.extend({method:T.literal("tasks/result"),params:Ys.extend({taskId:T.string()})}),Rjt=gi.loose(),w0=DI.extend({method:T.literal("tasks/list")}),b0=wI.extend({tasks:T.array(bI)}),v0=li.extend({method:T.literal("tasks/cancel"),params:Ys.extend({taskId:T.string()})}),wse=gi.merge(bI),bse=T.object({uri:T.string(),mimeType:T.optional(T.string()),_meta:T.record(T.string(),T.unknown()).optional()}),vse=bse.extend({text:T.string()}),e_=T.string().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),Sse=bse.extend({blob:e_}),SI=T.enum(["user","assistant"]),bf=T.object({audience:T.array(SI).optional(),priority:T.number().min(0).max(1).optional(),lastModified:T.iso.datetime({offset:!0}).optional()}),xse=T.object({...wf.shape,...QI.shape,uri:T.string(),description:T.optional(T.string()),mimeType:T.optional(T.string()),annotations:bf.optional(),_meta:T.optional(T.looseObject({}))}),uqe=T.object({...wf.shape,...QI.shape,uriTemplate:T.string(),description:T.optional(T.string()),mimeType:T.optional(T.string()),annotations:bf.optional(),_meta:T.optional(T.looseObject({}))}),t_=DI.extend({method:T.literal("resources/list")}),r_=wI.extend({resources:T.array(xse)}),n_=DI.extend({method:T.literal("resources/templates/list")}),i_=wI.extend({resourceTemplates:T.array(uqe)}),s_=Ys.extend({uri:T.string()}),lqe=s_,o_=li.extend({method:T.literal("resources/read"),params:lqe}),a_=gi.extend({contents:T.array(T.union([vse,Sse]))}),A_=Co.extend({method:T.literal("notifications/resources/list_changed"),params:mo.optional()}),gqe=s_,pqe=li.extend({method:T.literal("resources/subscribe"),params:gqe}),dqe=s_,fqe=li.extend({method:T.literal("resources/unsubscribe"),params:dqe}),hqe=mo.extend({uri:T.string()}),mqe=Co.extend({method:T.literal("notifications/resources/updated"),params:hqe}),Cqe=T.object({name:T.string(),description:T.optional(T.string()),required:T.optional(T.boolean())}),Iqe=T.object({...wf.shape,...QI.shape,description:T.optional(T.string()),arguments:T.optional(T.array(Cqe)),_meta:T.optional(T.looseObject({}))}),Eqe=DI.extend({method:T.literal("prompts/list")}),c_=wI.extend({prompts:T.array(Iqe)}),Bqe=Ys.extend({name:T.string(),arguments:T.record(T.string(),T.string()).optional()}),yqe=li.extend({method:T.literal("prompts/get"),params:Bqe}),u_=T.object({type:T.literal("text"),text:T.string(),annotations:bf.optional(),_meta:T.record(T.string(),T.unknown()).optional()}),l_=T.object({type:T.literal("image"),data:e_,mimeType:T.string(),annotations:bf.optional(),_meta:T.record(T.string(),T.unknown()).optional()}),g_=T.object({type:T.literal("audio"),data:e_,mimeType:T.string(),annotations:bf.optional(),_meta:T.record(T.string(),T.unknown()).optional()}),Qqe=T.object({type:T.literal("tool_use"),name:T.string(),id:T.string(),input:T.record(T.string(),T.unknown()),_meta:T.record(T.string(),T.unknown()).optional()}),Dqe=T.object({type:T.literal("resource"),resource:T.union([vse,Sse]),annotations:bf.optional(),_meta:T.record(T.string(),T.unknown()).optional()}),wqe=xse.extend({type:T.literal("resource_link")}),p_=T.union([u_,l_,g_,wqe,Dqe]),bqe=T.object({role:SI,content:p_}),d_=gi.extend({description:T.string().optional(),messages:T.array(bqe)}),f_=Co.extend({method:T.literal("notifications/prompts/list_changed"),params:mo.optional()}),vqe=T.object({title:T.string().optional(),readOnlyHint:T.boolean().optional(),destructiveHint:T.boolean().optional(),idempotentHint:T.boolean().optional(),openWorldHint:T.boolean().optional()}),Sqe=T.object({taskSupport:T.enum(["required","optional","forbidden"]).optional()}),Fse=T.object({...wf.shape,...QI.shape,description:T.string().optional(),inputSchema:T.object({type:T.literal("object"),properties:T.record(T.string(),ui).optional(),required:T.array(T.string()).optional()}).catchall(T.unknown()),outputSchema:T.object({type:T.literal("object"),properties:T.record(T.string(),ui).optional(),required:T.array(T.string()).optional()}).catchall(T.unknown()).optional(),annotations:vqe.optional(),execution:Sqe.optional(),_meta:T.record(T.string(),T.unknown()).optional()}),h_=DI.extend({method:T.literal("tools/list")}),m_=wI.extend({tools:T.array(Fse)}),Vu=gi.extend({content:T.array(p_).default([]),structuredContent:T.record(T.string(),T.unknown()).optional(),isError:T.boolean().optional()}),Tjt=Vu.or(gi.extend({toolResult:T.unknown()})),xqe=BI.extend({name:T.string(),arguments:T.record(T.string(),T.unknown()).optional()}),xI=li.extend({method:T.literal("tools/call"),params:xqe}),C_=Co.extend({method:T.literal("notifications/tools/list_changed"),params:mo.optional()}),kse=T.object({autoRefresh:T.boolean().default(!0),debounceMs:T.number().int().nonnegative().default(300)}),FI=T.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),Fqe=Ys.extend({level:FI}),I_=li.extend({method:T.literal("logging/setLevel"),params:Fqe}),kqe=mo.extend({level:FI,logger:T.string().optional(),data:T.unknown()}),Rqe=Co.extend({method:T.literal("notifications/message"),params:kqe}),Tqe=T.object({name:T.string().optional()}),Nqe=T.object({hints:T.array(Tqe).optional(),costPriority:T.number().min(0).max(1).optional(),speedPriority:T.number().min(0).max(1).optional(),intelligencePriority:T.number().min(0).max(1).optional()}),Mqe=T.object({mode:T.enum(["auto","required","none"]).optional()}),Pqe=T.object({type:T.literal("tool_result"),toolUseId:T.string().describe("The unique identifier for the corresponding tool call."),content:T.array(p_).default([]),structuredContent:T.object({}).loose().optional(),isError:T.boolean().optional(),_meta:T.record(T.string(),T.unknown()).optional()}),Lqe=T.discriminatedUnion("type",[u_,l_,g_]),d0=T.discriminatedUnion("type",[u_,l_,g_,Qqe,Pqe]),_qe=T.object({role:SI,content:T.union([d0,T.array(d0)]),_meta:T.record(T.string(),T.unknown()).optional()}),Uqe=BI.extend({messages:T.array(_qe),modelPreferences:Nqe.optional(),systemPrompt:T.string().optional(),includeContext:T.enum(["none","thisServer","allServers"]).optional(),temperature:T.number().optional(),maxTokens:T.number().int(),stopSequences:T.array(T.string()).optional(),metadata:ui.optional(),tools:T.array(Fse).optional(),toolChoice:Mqe.optional()}),E_=li.extend({method:T.literal("sampling/createMessage"),params:Uqe}),Jg=gi.extend({model:T.string(),stopReason:T.optional(T.enum(["endTurn","stopSequence","maxTokens"]).or(T.string())),role:SI,content:Lqe}),kI=gi.extend({model:T.string(),stopReason:T.optional(T.enum(["endTurn","stopSequence","maxTokens","toolUse"]).or(T.string())),role:SI,content:T.union([d0,T.array(d0)])}),Gqe=T.object({type:T.literal("boolean"),title:T.string().optional(),description:T.string().optional(),default:T.boolean().optional()}),Oqe=T.object({type:T.literal("string"),title:T.string().optional(),description:T.string().optional(),minLength:T.number().optional(),maxLength:T.number().optional(),format:T.enum(["email","uri","date","date-time"]).optional(),default:T.string().optional()}),Kqe=T.object({type:T.enum(["number","integer"]),title:T.string().optional(),description:T.string().optional(),minimum:T.number().optional(),maximum:T.number().optional(),default:T.number().optional()}),Hqe=T.object({type:T.literal("string"),title:T.string().optional(),description:T.string().optional(),enum:T.array(T.string()),default:T.string().optional()}),Jqe=T.object({type:T.literal("string"),title:T.string().optional(),description:T.string().optional(),oneOf:T.array(T.object({const:T.string(),title:T.string()})),default:T.string().optional()}),jqe=T.object({type:T.literal("string"),title:T.string().optional(),description:T.string().optional(),enum:T.array(T.string()),enumNames:T.array(T.string()).optional(),default:T.string().optional()}),Yqe=T.union([Hqe,Jqe]),qqe=T.object({type:T.literal("array"),title:T.string().optional(),description:T.string().optional(),minItems:T.number().optional(),maxItems:T.number().optional(),items:T.object({type:T.literal("string"),enum:T.array(T.string())}),default:T.array(T.string()).optional()}),$qe=T.object({type:T.literal("array"),title:T.string().optional(),description:T.string().optional(),minItems:T.number().optional(),maxItems:T.number().optional(),items:T.object({anyOf:T.array(T.object({const:T.string(),title:T.string()}))}),default:T.array(T.string()).optional()}),Vqe=T.union([qqe,$qe]),Wqe=T.union([jqe,Yqe,Vqe]),zqe=T.union([Wqe,Gqe,Oqe,Kqe]),Xqe=BI.extend({mode:T.literal("form").optional(),message:T.string(),requestedSchema:T.object({type:T.literal("object"),properties:T.record(T.string(),zqe),required:T.array(T.string()).optional()})}),Zqe=BI.extend({mode:T.literal("url"),message:T.string(),elicitationId:T.string(),url:T.string().url()}),e$e=T.union([Xqe,Zqe]),B_=li.extend({method:T.literal("elicitation/create"),params:e$e}),t$e=mo.extend({elicitationId:T.string()}),r$e=Co.extend({method:T.literal("notifications/elicitation/complete"),params:t$e}),Wu=gi.extend({action:T.enum(["accept","decline","cancel"]),content:T.preprocess(t=>t===null?void 0:t,T.record(T.string(),T.union([T.string(),T.number(),T.boolean(),T.array(T.string())])).optional())}),n$e=T.object({type:T.literal("ref/resource"),uri:T.string()}),i$e=T.object({type:T.literal("ref/prompt"),name:T.string()}),s$e=Ys.extend({ref:T.union([i$e,n$e]),argument:T.object({name:T.string(),value:T.string()}),context:T.object({arguments:T.record(T.string(),T.string()).optional()}).optional()}),o$e=li.extend({method:T.literal("completion/complete"),params:s$e}),y_=gi.extend({completion:T.looseObject({values:T.array(T.string()).max(100),total:T.optional(T.number().int()),hasMore:T.optional(T.boolean())})}),a$e=T.object({uri:T.string().startsWith("file://"),name:T.string().optional(),_meta:T.record(T.string(),T.unknown()).optional()}),A$e=li.extend({method:T.literal("roots/list"),params:Ys.optional()}),Q_=gi.extend({roots:T.array(a$e)}),c$e=Co.extend({method:T.literal("notifications/roots/list_changed"),params:mo.optional()}),Njt=T.union([E0,XL,o$e,I_,yqe,Eqe,t_,n_,o_,pqe,fqe,xI,h_,y0,D0,w0,v0]),Mjt=T.union([C0,B0,I0,c$e,vI]),Pjt=T.union([Bc,Jg,kI,Wu,Q_,Q0,b0,yc]),Ljt=T.union([E0,E_,B_,A$e,y0,D0,w0,v0]),_jt=T.union([C0,B0,Rqe,mqe,A_,C_,f_,vI,r$e]),Ujt=T.union([Bc,ZL,y_,d_,c_,r_,i_,a_,Vu,m_,Q0,b0,yc]),je=class t extends Error{constructor(e,r,n){super(`MCP error ${e}: ${r}`),this.code=e,this.data=n,this.name="McpError"}static fromError(e,r,n){if(e===Ze.UrlElicitationRequired&&n){let i=n;if(i.elicitations)return new $L(i.elicitations,r)}return new t(e,r,n)}},$L=class extends je{constructor(e,r=`URL elicitation${e.length>1?"s":""} required`){super(Ze.UrlElicitationRequired,r,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}});var ce,pi,Tse,D_,u$e,Nse,Mse,Pse,Rse,l$e,g$e,Lse,Kjt,Hjt,w_=L(()=>{h();ce=z(require("zod/v4"),1),pi=ce.url().superRefine((t,e)=>{if(!URL.canParse(t))return e.addIssue({code:ce.ZodIssueCode.custom,message:"URL must be parseable",fatal:!0}),ce.NEVER}).refine(t=>{let e=new URL(t);return e.protocol!=="javascript:"&&e.protocol!=="data:"&&e.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Tse=ce.looseObject({resource:ce.string().url(),authorization_servers:ce.array(pi).optional(),jwks_uri:ce.string().url().optional(),scopes_supported:ce.array(ce.string()).optional(),bearer_methods_supported:ce.array(ce.string()).optional(),resource_signing_alg_values_supported:ce.array(ce.string()).optional(),resource_name:ce.string().optional(),resource_documentation:ce.string().optional(),resource_policy_uri:ce.string().url().optional(),resource_tos_uri:ce.string().url().optional(),tls_client_certificate_bound_access_tokens:ce.boolean().optional(),authorization_details_types_supported:ce.array(ce.string()).optional(),dpop_signing_alg_values_supported:ce.array(ce.string()).optional(),dpop_bound_access_tokens_required:ce.boolean().optional()}),D_=ce.looseObject({issuer:ce.string(),authorization_endpoint:pi,token_endpoint:pi,registration_endpoint:pi.optional(),scopes_supported:ce.array(ce.string()).optional(),response_types_supported:ce.array(ce.string()),response_modes_supported:ce.array(ce.string()).optional(),grant_types_supported:ce.array(ce.string()).optional(),token_endpoint_auth_methods_supported:ce.array(ce.string()).optional(),token_endpoint_auth_signing_alg_values_supported:ce.array(ce.string()).optional(),service_documentation:pi.optional(),revocation_endpoint:pi.optional(),revocation_endpoint_auth_methods_supported:ce.array(ce.string()).optional(),revocation_endpoint_auth_signing_alg_values_supported:ce.array(ce.string()).optional(),introspection_endpoint:ce.string().optional(),introspection_endpoint_auth_methods_supported:ce.array(ce.string()).optional(),introspection_endpoint_auth_signing_alg_values_supported:ce.array(ce.string()).optional(),code_challenge_methods_supported:ce.array(ce.string()).optional(),client_id_metadata_document_supported:ce.boolean().optional()}),u$e=ce.looseObject({issuer:ce.string(),authorization_endpoint:pi,token_endpoint:pi,userinfo_endpoint:pi.optional(),jwks_uri:pi,registration_endpoint:pi.optional(),scopes_supported:ce.array(ce.string()).optional(),response_types_supported:ce.array(ce.string()),response_modes_supported:ce.array(ce.string()).optional(),grant_types_supported:ce.array(ce.string()).optional(),acr_values_supported:ce.array(ce.string()).optional(),subject_types_supported:ce.array(ce.string()),id_token_signing_alg_values_supported:ce.array(ce.string()),id_token_encryption_alg_values_supported:ce.array(ce.string()).optional(),id_token_encryption_enc_values_supported:ce.array(ce.string()).optional(),userinfo_signing_alg_values_supported:ce.array(ce.string()).optional(),userinfo_encryption_alg_values_supported:ce.array(ce.string()).optional(),userinfo_encryption_enc_values_supported:ce.array(ce.string()).optional(),request_object_signing_alg_values_supported:ce.array(ce.string()).optional(),request_object_encryption_alg_values_supported:ce.array(ce.string()).optional(),request_object_encryption_enc_values_supported:ce.array(ce.string()).optional(),token_endpoint_auth_methods_supported:ce.array(ce.string()).optional(),token_endpoint_auth_signing_alg_values_supported:ce.array(ce.string()).optional(),display_values_supported:ce.array(ce.string()).optional(),claim_types_supported:ce.array(ce.string()).optional(),claims_supported:ce.array(ce.string()).optional(),service_documentation:ce.string().optional(),claims_locales_supported:ce.array(ce.string()).optional(),ui_locales_supported:ce.array(ce.string()).optional(),claims_parameter_supported:ce.boolean().optional(),request_parameter_supported:ce.boolean().optional(),request_uri_parameter_supported:ce.boolean().optional(),require_request_uri_registration:ce.boolean().optional(),op_policy_uri:pi.optional(),op_tos_uri:pi.optional(),client_id_metadata_document_supported:ce.boolean().optional()}),Nse=ce.object({...u$e.shape,...D_.pick({code_challenge_methods_supported:!0}).shape}),Mse=ce.object({access_token:ce.string(),id_token:ce.string().optional(),token_type:ce.string(),expires_in:ce.coerce.number().optional(),scope:ce.string().optional(),refresh_token:ce.string().optional()}).strip(),Pse=ce.object({error:ce.string(),error_description:ce.string().optional(),error_uri:ce.string().optional()}),Rse=pi.optional().or(ce.literal("").transform(()=>{})),l$e=ce.object({redirect_uris:ce.array(pi),token_endpoint_auth_method:ce.string().optional(),grant_types:ce.array(ce.string()).optional(),response_types:ce.array(ce.string()).optional(),client_name:ce.string().optional(),client_uri:pi.optional(),logo_uri:Rse,scope:ce.string().optional(),contacts:ce.array(ce.string()).optional(),tos_uri:Rse,policy_uri:ce.string().optional(),jwks_uri:pi.optional(),jwks:ce.any().optional(),software_id:ce.string().optional(),software_version:ce.string().optional(),software_statement:ce.string().optional()}).strip(),g$e=ce.object({client_id:ce.string(),client_secret:ce.string().optional(),client_id_issued_at:ce.number().optional(),client_secret_expires_at:ce.number().optional()}).strip(),Lse=l$e.merge(g$e),Kjt=ce.object({error:ce.string(),error_description:ce.string().optional()}).strip(),Hjt=ce.object({token:ce.string(),token_type_hint:ce.string().optional()}).strip()});function _se(t){let e=typeof t=="string"?new URL(t):new URL(t.href);return e.hash="",e}function Use({requestedResource:t,configuredResource:e}){let r=typeof t=="string"?new URL(t):new URL(t.href),n=typeof e=="string"?new URL(e):new URL(e.href);if(r.origin!==n.origin||r.pathname.length<n.pathname.length)return!1;let i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/",s=n.pathname.endsWith("/")?n.pathname:n.pathname+"/";return i.startsWith(s)}var Gse=L(()=>{h()});var ln,RI,EA,Qc,BA,TI,NI,jg,Dc,MI,PI,LI,Yg,_I,UI,qg,GI,OI,Ose,b_=L(()=>{h();ln=class extends Error{constructor(e,r){super(e),this.errorUri=r,this.name=this.constructor.name}toResponseObject(){let e={error:this.errorCode,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}get errorCode(){return this.constructor.errorCode}},RI=class extends ln{};RI.errorCode="invalid_request";EA=class extends ln{};EA.errorCode="invalid_client";Qc=class extends ln{};Qc.errorCode="invalid_grant";BA=class extends ln{};BA.errorCode="unauthorized_client";TI=class extends ln{};TI.errorCode="unsupported_grant_type";NI=class extends ln{};NI.errorCode="invalid_scope";jg=class extends ln{};jg.errorCode="access_denied";Dc=class extends ln{};Dc.errorCode="server_error";MI=class extends ln{};MI.errorCode="temporarily_unavailable";PI=class extends ln{};PI.errorCode="unsupported_response_type";LI=class extends ln{};LI.errorCode="unsupported_token_type";Yg=class extends ln{};Yg.errorCode="invalid_token";_I=class extends ln{};_I.errorCode="method_not_allowed";UI=class extends ln{};UI.errorCode="too_many_requests";qg=class extends ln{};qg.errorCode="invalid_client_metadata";GI=class extends ln{};GI.errorCode="insufficient_scope";OI=class extends ln{};OI.errorCode="invalid_target";Ose={[RI.errorCode]:RI,[EA.errorCode]:EA,[Qc.errorCode]:Qc,[BA.errorCode]:BA,[TI.errorCode]:TI,[NI.errorCode]:NI,[jg.errorCode]:jg,[Dc.errorCode]:Dc,[MI.errorCode]:MI,[PI.errorCode]:PI,[LI.errorCode]:LI,[Yg.errorCode]:Yg,[_I.errorCode]:_I,[UI.errorCode]:UI,[qg.errorCode]:qg,[GI.errorCode]:GI,[OI.errorCode]:OI}});function p$e(t){return["client_secret_basic","client_secret_post","none"].includes(t)}function d$e(t,e){let r=t.client_secret!==void 0;return e.length===0?r?"client_secret_post":"none":"token_endpoint_auth_method"in t&&t.token_endpoint_auth_method&&p$e(t.token_endpoint_auth_method)&&e.includes(t.token_endpoint_auth_method)?t.token_endpoint_auth_method:r&&e.includes("client_secret_basic")?"client_secret_basic":r&&e.includes("client_secret_post")?"client_secret_post":e.includes("none")?"none":r?"client_secret_post":"none"}function f$e(t,e,r,n){let{client_id:i,client_secret:s}=e;switch(t){case"client_secret_basic":h$e(i,s,r);return;case"client_secret_post":m$e(i,s,n);return;case"none":C$e(i,n);return;default:throw new Error(`Unsupported client authentication method: ${t}`)}}function h$e(t,e,r){if(!e)throw new Error("client_secret_basic authentication requires a client_secret");let n=btoa(`${t}:${e}`);r.set("Authorization",`Basic ${n}`)}function m$e(t,e,r){r.set("client_id",t),e&&r.set("client_secret",e)}function C$e(t,e){e.set("client_id",t)}async function Hse(t){let e=t instanceof Response?t.status:void 0,r=t instanceof Response?await t.text():t;try{let n=Pse.parse(JSON.parse(r)),{error:i,error_description:s,error_uri:o}=n,a=Ose[i]||Dc;return new a(s||"",o)}catch(n){let i=`${e?`HTTP ${e}: `:""}Invalid OAuth error response: ${n}. Raw body: ${r}`;return new Dc(i)}}async function Ca(t,e){try{return await x_(t,e)}catch(r){if(r instanceof EA||r instanceof BA)return await t.invalidateCredentials?.("all"),await x_(t,e);if(r instanceof Qc)return await t.invalidateCredentials?.("tokens"),await x_(t,e);throw r}}async function x_(t,{serverUrl:e,authorizationCode:r,scope:n,resourceMetadataUrl:i,fetchFn:s}){let o=await t.discoveryState?.(),a,A,c,u=i;if(!u&&o?.resourceMetadataUrl&&(u=new URL(o.resourceMetadataUrl)),o?.authorizationServerUrl){if(A=o.authorizationServerUrl,a=o.resourceMetadata,c=o.authorizationServerMetadata??await HI(A,{fetchFn:s}),!a)try{a=await KI(e,{resourceMetadataUrl:u},s)}catch{}(c!==o.authorizationServerMetadata||a!==o.resourceMetadata)&&await t.saveDiscoveryState?.({authorizationServerUrl:String(A),resourceMetadataUrl:u?.toString(),resourceMetadata:a,authorizationServerMetadata:c})}else{let I=await w$e(e,{resourceMetadataUrl:u,fetchFn:s});A=I.authorizationServerUrl,c=I.authorizationServerMetadata,a=I.resourceMetadata,await t.saveDiscoveryState?.({authorizationServerUrl:String(A),resourceMetadataUrl:u?.toString(),resourceMetadata:a,authorizationServerMetadata:c})}let l=await E$e(e,t,a),d=await Promise.resolve(t.clientInformation());if(!d){if(r!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");let I=c?.client_id_metadata_document_supported===!0,y=t.clientMetadataUrl;if(y&&!I$e(y))throw new qg(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${y}`);if(I&&y)d={client_id:y},await t.saveClientInformation?.(d);else{if(!t.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");let E=await S$e(A,{metadata:c,clientMetadata:t.clientMetadata,fetchFn:s});await t.saveClientInformation(E),d=E}}let g=!t.redirectUrl;if(r!==void 0||g){let I=await v$e(t,A,{metadata:c,resource:l,authorizationCode:r,fetchFn:s});return await t.saveTokens(I),"AUTHORIZED"}let p=await t.tokens();if(p?.refresh_token)try{let I=await T_(A,{metadata:c,clientInformation:d,refreshToken:p.refresh_token,resource:l,addClientAuthentication:t.addClientAuthentication,fetchFn:s});return await t.saveTokens(I),"AUTHORIZED"}catch(I){if(!(!(I instanceof ln)||I instanceof Dc))throw I}let f=t.state?await t.state():void 0,{authorizationUrl:m,codeVerifier:C}=await b$e(A,{metadata:c,clientInformation:d,state:f,redirectUrl:t.redirectUrl,scope:n||a?.scopes_supported?.join(" ")||t.clientMetadata.scope,resource:l});return await t.saveCodeVerifier(C),await t.redirectToAuthorization(m),"REDIRECT"}function I$e(t){if(!t)return!1;try{let e=new URL(t);return e.protocol==="https:"&&e.pathname!=="/"}catch{return!1}}async function E$e(t,e,r){let n=_se(t);if(e.validateResourceURL)return await e.validateResourceURL(n,r?.resource);if(r){if(!Use({requestedResource:n,configuredResource:r.resource}))throw new Error(`Protected resource ${r.resource} does not match expected ${n} (or origin)`);return new URL(r.resource)}}function zu(t){let e=t.headers.get("WWW-Authenticate");if(!e)return{};let[r,n]=e.split(" ");if(r.toLowerCase()!=="bearer"||!n)return{};let i=F_(t,"resource_metadata")||void 0,s;if(i)try{s=new URL(i)}catch{}let o=F_(t,"scope")||void 0,a=F_(t,"error")||void 0;return{resourceMetadataUrl:s,scope:o,error:a}}function F_(t,e){let r=t.headers.get("WWW-Authenticate");if(!r)return null;let n=new RegExp(`${e}=(?:"([^"]+)"|([^\\s,]+))`),i=r.match(n);return i?i[1]||i[2]:null}async function KI(t,e,r=fetch){let n=await Q$e(t,"oauth-protected-resource",r,{protocolVersion:e?.protocolVersion,metadataUrl:e?.resourceMetadataUrl});if(!n||n.status===404)throw await n?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!n.ok)throw await n.body?.cancel(),new Error(`HTTP ${n.status} trying to load well-known OAuth protected resource metadata.`);return Tse.parse(await n.json())}async function k_(t,e,r=fetch){try{return await r(t,{headers:e})}catch(n){if(n instanceof TypeError)return e?k_(t,void 0,r):void 0;throw n}}function B$e(t,e="",r={}){return e.endsWith("/")&&(e=e.slice(0,-1)),r.prependPathname?`${e}/.well-known/${t}`:`/.well-known/${t}${e}`}async function Kse(t,e,r=fetch){return await k_(t,{"MCP-Protocol-Version":e},r)}function y$e(t,e){return!t||t.status>=400&&t.status<500&&e!=="/"}async function Q$e(t,e,r,n){let i=new URL(t),s=n?.protocolVersion??Yu,o;if(n?.metadataUrl)o=new URL(n.metadataUrl);else{let A=B$e(e,i.pathname);o=new URL(A,n?.metadataServerUrl??i),o.search=i.search}let a=await Kse(o,s,r);if(!n?.metadataUrl&&y$e(a,i.pathname)){let A=new URL(`/.well-known/${e}`,i);a=await Kse(A,s,r)}return a}function D$e(t){let e=typeof t=="string"?new URL(t):t,r=e.pathname!=="/",n=[];if(!r)return n.push({url:new URL("/.well-known/oauth-authorization-server",e.origin),type:"oauth"}),n.push({url:new URL("/.well-known/openid-configuration",e.origin),type:"oidc"}),n;let i=e.pathname;return i.endsWith("/")&&(i=i.slice(0,-1)),n.push({url:new URL(`/.well-known/oauth-authorization-server${i}`,e.origin),type:"oauth"}),n.push({url:new URL(`/.well-known/openid-configuration${i}`,e.origin),type:"oidc"}),n.push({url:new URL(`${i}/.well-known/openid-configuration`,e.origin),type:"oidc"}),n}async function HI(t,{fetchFn:e=fetch,protocolVersion:r=Yu}={}){let n={"MCP-Protocol-Version":r,Accept:"application/json"},i=D$e(t);for(let{url:s,type:o}of i){let a=await k_(s,n,e);if(a){if(!a.ok){if(await a.body?.cancel(),a.status>=400&&a.status<500)continue;throw new Error(`HTTP ${a.status} trying to load ${o==="oauth"?"OAuth":"OpenID provider"} metadata from ${s}`)}return o==="oauth"?D_.parse(await a.json()):Nse.parse(await a.json())}}}async function w$e(t,e){let r,n;try{r=await KI(t,{resourceMetadataUrl:e?.resourceMetadataUrl},e?.fetchFn),r.authorization_servers&&r.authorization_servers.length>0&&(n=r.authorization_servers[0])}catch{}n||(n=String(new URL("/",t)));let i=await HI(n,{fetchFn:e?.fetchFn});return{authorizationServerUrl:n,authorizationServerMetadata:i,resourceMetadata:r}}async function b$e(t,{metadata:e,clientInformation:r,redirectUrl:n,scope:i,state:s,resource:o}){let a;if(e){if(a=new URL(e.authorization_endpoint),!e.response_types_supported.includes(v_))throw new Error(`Incompatible auth server: does not support response type ${v_}`);if(e.code_challenge_methods_supported&&!e.code_challenge_methods_supported.includes(S_))throw new Error(`Incompatible auth server: does not support code challenge method ${S_}`)}else a=new URL("/authorize",t);let A=await qL(),c=A.code_verifier,u=A.code_challenge;return a.searchParams.set("response_type",v_),a.searchParams.set("client_id",r.client_id),a.searchParams.set("code_challenge",u),a.searchParams.set("code_challenge_method",S_),a.searchParams.set("redirect_uri",String(n)),s&&a.searchParams.set("state",s),i&&a.searchParams.set("scope",i),i?.includes("offline_access")&&a.searchParams.append("prompt","consent"),o&&a.searchParams.set("resource",o.href),{authorizationUrl:a,codeVerifier:c}}function Jse(t,e,r){return new URLSearchParams({grant_type:"authorization_code",code:t,code_verifier:e,redirect_uri:String(r)})}async function R_(t,{metadata:e,tokenRequestParams:r,clientInformation:n,addClientAuthentication:i,resource:s,fetchFn:o}){let a=e?.token_endpoint?new URL(e.token_endpoint):new URL("/token",t),A=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(s&&r.set("resource",s.href),i)await i(A,r,a,e);else if(n){let u=e?.token_endpoint_auth_methods_supported??[],l=d$e(n,u);f$e(l,n,A,r)}let c=await(o??fetch)(a,{method:"POST",headers:A,body:r});if(!c.ok)throw await Hse(c);return Mse.parse(await c.json())}async function jse(t,{metadata:e,clientInformation:r,authorizationCode:n,codeVerifier:i,redirectUri:s,resource:o,addClientAuthentication:a,fetchFn:A}){let c=Jse(n,i,s);return R_(t,{metadata:e,tokenRequestParams:c,clientInformation:r,addClientAuthentication:a,resource:o,fetchFn:A})}async function T_(t,{metadata:e,clientInformation:r,refreshToken:n,resource:i,addClientAuthentication:s,fetchFn:o}){let a=new URLSearchParams({grant_type:"refresh_token",refresh_token:n}),A=await R_(t,{metadata:e,tokenRequestParams:a,clientInformation:r,addClientAuthentication:s,resource:i,fetchFn:o});return{refresh_token:n,...A}}async function v$e(t,e,{metadata:r,resource:n,authorizationCode:i,fetchFn:s}={}){let o=t.clientMetadata.scope,a;if(t.prepareTokenRequest&&(a=await t.prepareTokenRequest(o)),!a){if(!i)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!t.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");let c=await t.codeVerifier();a=Jse(i,c,t.redirectUrl)}let A=await t.clientInformation();return R_(e,{metadata:r,tokenRequestParams:a,clientInformation:A??void 0,addClientAuthentication:t.addClientAuthentication,resource:n,fetchFn:s})}async function S$e(t,{metadata:e,clientMetadata:r,fetchFn:n}){let i;if(e){if(!e.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(e.registration_endpoint)}else i=new URL("/register",t);let s=await(n??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!s.ok)throw await Hse(s);return Lse.parse(await s.json())}var Tn,v_,S_,vf=L(()=>{h();fse();ma();w_();w_();Gse();b_();Tn=class extends Error{constructor(e){super(e??"Unauthorized")}};v_="code",S_="S256"});function x$e(){return Yse.default.randomBytes(32).toString("base64url")}function N_(t,e=5){let r=e*60*1e3;return Date.now()>=t-r}function F$e(t){return t instanceof Qc||t instanceof EA||t instanceof Yg||t instanceof jg||t instanceof BA}function k$e(t){return t instanceof EA||t instanceof BA}var Yse,S0,M_=L(()=>{"use strict";h();Yse=z(require("node:crypto"),1);b_();vf();S0=class{serverUrl;serverName;_clientMetadata;identity;store;redirect;onWarning;currentState=null;currentCodeVerifier=null;saveCodeVerifierCalled=!1;constructor(e){this.serverUrl=e.serverUrl,this.serverName=e.serverName,this._clientMetadata=e.clientMetadata,this.identity=e.identity,this.store=e.store,this.redirect=e.redirect,this.onWarning=e.onWarning}get redirectUrl(){return this.redirect.redirectUrl}get clientMetadata(){return this._clientMetadata}async discoverOAuthMetadata(e){let r=await this.store.getMetadata(),n=await this.store.isDiscoveryFailed(),i=!!(r?.clientId&&r.authorizationEndpoint&&r.tokenEndpoint);if(!e&&i)return!0;if(!e&&n)return!1;e&&n&&await this.store.invalidateCredentials("discovery");try{let s,o;try{let l=await KI(this.serverUrl);s=l.authorization_servers?.[0],o=l.resource}catch{}if(!s){let l=await this.probeWwwAuthenticate();if(l)try{let d=await KI(this.serverUrl,{resourceMetadataUrl:l});s=d.authorization_servers?.[0],o=d.resource}catch{}}let a=s||this.serverUrl,A=await HI(a);if(!A)try{let l=new URL(a);l.pathname&&l.pathname!=="/"&&l.origin!==a&&(A=await HI(l.origin))}catch{}if(!A)return await this.store.markDiscoveryFailed("No authorization server metadata found"),!1;let c=r?.clientId??"",u=r?.clientSecret;if(!c&&A.registration_endpoint)try{let l=await fetch(A.registration_endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(this._clientMetadata)});if(l.ok){let d=await l.json();c=d.client_id,u=d.client_secret}else this.warn("Dynamic client registration failed",void 0,{status:l.status})}catch(l){this.warn("Dynamic client registration threw",l)}return await this.store.saveMetadata({clientId:c,clientSecret:u,scope:[],authorizationEndpoint:A.authorization_endpoint,tokenEndpoint:A.token_endpoint,registrationEndpoint:A.registration_endpoint,resource:o,discoveredAt:Date.now()}),!0}catch(s){let o=s instanceof Error?s.message:"Discovery failed";return await this.store.markDiscoveryFailed(o),this.warn("OAuth discovery failed",s),!1}}async probeWwwAuthenticate(){let e=async i=>{try{let s=await fetch(this.serverUrl,i);return await s.body?.cancel().catch(()=>{}),s.status!==401?{reached:!0}:{reached:!0,url:zu(s).resourceMetadataUrl}}catch{return{reached:!1}}},r=await e({method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json, text/event-stream"},body:JSON.stringify({jsonrpc:"2.0",id:0,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"mcp-oauth-probe",version:"0.0.0"}}})});if(r.reached)return r.url;let n=await e({method:"GET"});return n.reached?n.url:void 0}async clientInformation(){let e=await this.store.getMetadata();if(e?.clientId)return{client_id:e.clientId,...e.clientSecret&&{client_secret:e.clientSecret}}}async saveClientInformation(e){let r=await this.store.getMetadata();if(!r){await this.store.saveMetadata({clientId:e.client_id,clientSecret:e.client_secret,scope:[],authorizationEndpoint:"",tokenEndpoint:"",discoveredAt:Date.now()});return}await this.store.saveMetadata({...r,clientId:e.client_id,clientSecret:e.client_secret})}async tokens(){let e=await this.store.getTokens();if(e?.accessToken){if(N_(e.expiresAt)){if(e.refreshToken)try{let r=await this.refreshTokens(e.refreshToken);if(r)return r}catch(r){this.warn("OAuth token refresh failed",r)}return}return{access_token:e.accessToken,token_type:e.tokenType||"Bearer",expires_in:Math.floor((e.expiresAt-Date.now())/1e3),...e.refreshToken&&{refresh_token:e.refreshToken}}}}async refreshTokens(e){let r=await this.clientInformation();if(!r)return;let n=await this.store.getMetadata(),i=n?.resource,s=n?.tokenEndpoint?n.tokenEndpoint.replace(/\/token$/,""):this.serverUrl,o;try{o=await T_(s,{...n?.tokenEndpoint&&{metadata:{authorization_endpoint:n.authorizationEndpoint,token_endpoint:n.tokenEndpoint}},clientInformation:r,refreshToken:e,...i&&{resource:new URL(i)}})}catch(a){if(F$e(a)){let A=k$e(a)?"all":"tokens";try{await this.invalidateCredentials(A)}catch(c){this.warn("Failed to invalidate credentials after permanent OAuth failure",c,{invalidationScope:A})}}throw a}return await this.saveTokens(o),o}async saveTokens(e){await this.persistTokens(e)}async persistTokens(e,r){let n=e.expires_in?Date.now()+e.expires_in*1e3:Date.now()+36e5;await this.store.saveTokens({accessToken:e.access_token,refreshToken:e.refresh_token||void 0,expiresAt:n,tokenType:e.token_type||"Bearer",...r?.clientId&&{clientId:r.clientId},...r?.clientSecret&&{clientSecret:r.clientSecret}})}async redirectToAuthorization(e){await this.redirect.onAuthorizationRequired(e)}async saveCodeVerifier(e){if(this.saveCodeVerifierCalled)return;if(this.saveCodeVerifierCalled=!0,this.currentCodeVerifier=e,!this.currentState){this.warn("No state available when saving code verifier",new Error("No state available when saving code verifier"));return}let r=await this.store.getMetadata();if(!r){this.warn("No metadata found when saving code verifier",new Error("No metadata found for server"));return}let n=Date.now(),i=n+1800*1e3;await this.store.saveOAuthState({state:this.currentState,codeVerifier:e,serverId:this.identity.serverId,ownerId:this.identity.ownerId,userId:this.identity.userId??null,sessionId:this.identity.sessionId,serverUrl:this.serverUrl,serverName:this.serverName,authorizationEndpoint:r.authorizationEndpoint,tokenEndpoint:r.tokenEndpoint,clientId:r.clientId,clientSecret:r.clientSecret,scope:r.scope||[],resource:r.resource,createdAt:n,expiresAt:i})}async codeVerifier(){if(!this.currentCodeVerifier)throw new Error("Code verifier not found");return this.currentCodeVerifier}async state(){return this.currentState||(this.currentState=x$e()),this.currentState}async invalidateCredentials(e="tokens"){await this.store.invalidateCredentials(e),(e==="verifier"||e==="all")&&(this.currentState=null,this.currentCodeVerifier=null,this.saveCodeVerifierCalled=!1)}async handleCallback(e,r){if(!r)throw new Error("Missing OAuth state parameter");let n=await this.store.consumeOAuthState(r);if(!n)throw new Error("Invalid or expired OAuth state");let i=n.tokenEndpoint.replace(/\/token$/,""),s=await jse(i,{metadata:{authorization_endpoint:n.authorizationEndpoint,token_endpoint:n.tokenEndpoint},clientInformation:{client_id:n.clientId,...n.clientSecret&&{client_secret:n.clientSecret}},authorizationCode:e,codeVerifier:n.codeVerifier,redirectUri:this.redirect.redirectUrl,...n.resource&&{resource:new URL(n.resource)}});return await this.persistTokens(s,{clientId:n.clientId,clientSecret:n.clientSecret}),s}warn(e,r,n){this.onWarning?.(e,r,{serverUrl:this.serverUrl,serverName:this.serverName,...n})}}});function R$e(t){let e=process.env.BUILDER_DEV_TOOLS_CREDS_DIR;return e||t||(0,x0.join)((0,qse.homedir)(),".builder","config","mcp")}function Xu(t){if((0,Ia.existsSync)(t))try{let e=(0,Ia.readFileSync)(t,"utf8");return e.trim()?JSON.parse(e):void 0}catch{return}}function JI(t,e){let r=JSON.stringify(e,null,2);(0,Ia.writeFileSync)(t,r,{mode:384,encoding:"utf8"});try{(0,Ia.chmodSync)(t,384)}catch{}}function T$e(t){return!!t.oauthMetadata||!!t.discoveryFailed||!!t.discoveryError}var qse,x0,Ia,wc,F0=L(()=>{"use strict";h();qse=require("node:os"),x0=require("node:path"),Ia=require("node:fs");wc=class{serverUrl;dir;serversPath;tokensPath;pkceStates=new Map;constructor(e){this.serverUrl=e.serverUrl,this.dir=R$e(e.baseDir),this.serversPath=(0,x0.join)(this.dir,"servers.json"),this.tokensPath=(0,x0.join)(this.dir,"tokens.json")}async getMetadata(){return Xu(this.serversPath)?.[this.serverUrl]?.oauthMetadata}async saveMetadata(e){this.ensureDir();let r=Xu(this.serversPath)??{},n=r[this.serverUrl]??{};r[this.serverUrl]={...n,oauthMetadata:e,discoveryFailed:!1,discoveryError:void 0},JI(this.serversPath,r)}async markDiscoveryFailed(e){this.ensureDir();let r=Xu(this.serversPath)??{},n=r[this.serverUrl]??{};r[this.serverUrl]={...n,discoveryFailed:!0,discoveryError:e},JI(this.serversPath,r)}async isDiscoveryFailed(){return!!Xu(this.serversPath)?.[this.serverUrl]?.discoveryFailed}async getTokens(){let r=Xu(this.tokensPath)?.[this.serverUrl];if(r)return{accessToken:r.accessToken,refreshToken:r.refreshToken||void 0,expiresAt:r.expiresAt,tokenType:r.tokenType||"Bearer"}}async saveTokens(e){this.ensureDir();let r=Xu(this.tokensPath)??{};r[this.serverUrl]={accessToken:e.accessToken,refreshToken:e.refreshToken,expiresAt:e.expiresAt,tokenType:e.tokenType||"Bearer",obtainedAt:Date.now(),obtainedFrom:"local"},JI(this.tokensPath,r)}async invalidateCredentials(e){(e==="tokens"||e==="all")&&this.removeTokenEntry(),(e==="client"||e==="all")&&this.updateServerEntry(r=>{let{oauthMetadata:n,...i}=r;return{...i,discoveryFailed:!1,discoveryError:void 0}}),(e==="discovery"||e==="all")&&this.updateServerEntry(r=>({...r,discoveryFailed:!1,discoveryError:void 0})),(e==="verifier"||e==="all")&&this.pkceStates.clear()}async saveOAuthState(e){this.pkceStates.set(e.state,e)}async consumeOAuthState(e){let r=this.pkceStates.get(e);if(r&&(this.pkceStates.delete(e),!(r.expiresAt<Date.now())))return r}ensureDir(){(0,Ia.existsSync)(this.dir)||(0,Ia.mkdirSync)(this.dir,{recursive:!0,mode:448})}removeTokenEntry(){let e=Xu(this.tokensPath);!e||!(this.serverUrl in e)||(delete e[this.serverUrl],this.ensureDir(),JI(this.tokensPath,e))}updateServerEntry(e){let r=Xu(this.serversPath)??{},n=r[this.serverUrl]??{},i=e(n);T$e(i)?r[this.serverUrl]=i:delete r[this.serverUrl],this.ensureDir(),JI(this.serversPath,r)}}});function N$e(){try{return L_.default.statSync("/.dockerenv"),!0}catch{return!1}}function M$e(){try{return L_.default.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function __(){return P_===void 0&&(P_=N$e()||M$e()),P_}var L_,P_,$se=L(()=>{h();L_=z(require("node:fs"),1)});function $g(){return U_===void 0&&(U_=P$e()||__()),U_}var Vse,U_,P$e,G_=L(()=>{h();Vse=z(require("node:fs"),1);$se();P$e=()=>{try{return Vse.default.statSync("/run/.containerenv"),!0}catch{return!1}}});var O_,zse,k0,Wse,Zu,K_=L(()=>{h();O_=z(require("node:process"),1),zse=z(require("node:os"),1),k0=z(require("node:fs"),1);G_();Wse=()=>{if(O_.default.platform!=="linux")return!1;if(zse.default.release().toLowerCase().includes("microsoft"))return!$g();try{if(k0.default.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!$g()}catch{}return k0.default.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")||k0.default.existsSync("/run/WSL")?!$g():!1},Zu=O_.default.env.__IS_WSL_TEST__?Wse:Wse()});var H_,jI,L$e,_$e,J_,Xse=L(()=>{h();H_=z(require("node:process"),1),jI=z(require("node:fs/promises"),1);K_();K_();L$e=(()=>{let t="/mnt/",e;return async function(){if(e)return e;let r="/etc/wsl.conf",n=!1;try{await jI.default.access(r,jI.constants.F_OK),n=!0}catch{}if(!n)return t;let i=await jI.default.readFile(r,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):t}})(),_$e=async()=>`${await L$e()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,J_=async()=>Zu?_$e():`${H_.default.env.SYSTEMROOT||H_.default.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`});function el(t,e,r){let n=i=>Object.defineProperty(t,e,{value:i,enumerable:!0,writable:!0});return Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get(){let i=r();return n(i),i},set(i){n(i)}}),t}var Zse=L(()=>{h()});async function j_(){if(toe.default.platform!=="darwin")throw new Error("macOS only");let{stdout:t}=await U$e("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]),r=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(t)?.groups.id??"com.apple.Safari";return r==="com.apple.safari"?"com.apple.Safari":r}var eoe,toe,roe,U$e,noe=L(()=>{h();eoe=require("node:util"),toe=z(require("node:process"),1),roe=require("node:child_process"),U$e=(0,eoe.promisify)(roe.execFile)});async function ooe(t,{humanReadableOutput:e=!0,signal:r}={}){if(ioe.default.platform!=="darwin")throw new Error("macOS only");let n=e?[]:["-ss"],i={};r&&(i.signal=r);let{stdout:s}=await G$e("osascript",["-e",t,n],i);return s.trim()}var ioe,soe,Y_,G$e,aoe=L(()=>{h();ioe=z(require("node:process"),1),soe=require("node:util"),Y_=require("node:child_process"),G$e=(0,soe.promisify)(Y_.execFile)});async function q_(t){return ooe(`tell application "Finder" to set app_path to application file id "${t}" as string
1522
+ `)}var JL=L(()=>{"use strict";h()});function mI(t){let r="^"+t.replace(/([.+^=!:${}()|[\]\\\/^])/g,"\\$1").replace(/\*/g,".*").replace(/\?/g,".")+"$";return new RegExp(r)}function K6e(t){return t.replace(/\\\r?\n/g,"")}function jL(t){let e=K6e(t),r=e.match(/^timeout\s+(\d+[smhd]?)\s+(.+)$/i);return r?r[2]:e}function CI(t){let e=[],r="",n=!1,i="";for(let s=0;s<t.length;s++){let o=t[s],a=t[s+1];if(!n&&(o==='"'||o==="'")){let A=0;for(let c=s-1;c>=0&&t[c]==="\\";c--)A++;A%2===0&&(n=!0,i=o),r+=o}else if(n&&o===i){let A=0;for(let c=s-1;c>=0&&t[c]==="\\";c--)A++;A%2===0&&(n=!1,i=""),r+=o}else n?r+=o:o==="&"&&a==="&"||o==="|"&&a==="|"?(e.push(r.trim()),r="",s++):o===";"||o==="|"?(e.push(r.trim()),r=""):r+=o}return r.trim()&&e.push(r.trim()),e.filter(Boolean)}function dse(t){let e=jL(t);return CI(e).some(n=>{let i=n.trim();for(;/^\w+=\S*\s/.test(i);)i=i.replace(/^\w+=\S*\s+/,"");let s=i.split(/\s/)[0],o=s.includes("/")?s.split("/").pop():s;return!H6e.has(o)})}function II(t,e={policies:pse}){let r=jL(t);if(/`|\$\(/.test(r))return{policy:"injection_prevention",message:"Command substitution and backticks are prohibited to prevent injection attacks.",command:r};let n=[...e.policies].sort((a,A)=>A.priority-a.priority),i=(a,A)=>{for(let c of n){let u=c.patterns.map(l=>typeof l=="string"?mI(l):l);for(let l of u)if(l.test(a)){if(e.allowOverrides&&e.allowOverrides.map(p=>typeof p=="string"?mI(p):p).some(p=>p.test(a)))continue;return{policy:c.name,message:c.errorMessage,command:a,matchedPattern:l.source}}}return null},s=i(r,!0);if(s)return s;let o=CI(r);for(let a of o){let A=i(a,!1);if(A)return A}return null}function l0(t,e=[],r=[],n){let i=jL(t);if(n&&II(i,n)||/`|\$\(/.test(i))return!1;let s=Array.isArray(e)&&e.length>0?typeof e[0]=="string"?e.map(mI):e:[],o=Array.isArray(r)&&r.length>0?typeof r[0]=="string"?r.map(mI):r:[];return CI(i).every(A=>o.some(u=>u.test(A))?s.some(u=>u.test(A)):s.length>0?s.some(u=>u.test(A)):!0)}function g0(t={}){return{policies:pse,...t}}function p0(t){return t.map(mI)}var pse,H6e,EI=L(()=>{"use strict";h();pse=[{name:"git_project_creation",description:"Prevents git operations that could cause permanent data loss",patterns:[/\bgit\s+clone\b/,/\bgit\s+checkout\s+-b\s+\S+/,/\bgit\s+switch\s+\S+/,/\bgit\s+branch\s+(?!-[dlDrav])(?!--(?:all|list|remote|verbose)\b)\S/,/\bgit\s+init\b/,/\bgit\s+remote\b/,/\bgit\s+clean\s+-[fF]/,/\bgit\s+commit\s+--amend/,/\bgit\s+rm\b/,/\bgit\s+mv\b/,/\bgit\s+tag\b/,/\bgit\s+restore\s+(?!--staged\b)(?!--source\b)(?!--\s)\S+\s*$/,/\bgit\s+reset\s+--hard/,/\bgit\s+reset\s+--mixed/,/\bgit\s+stash\s+drop/,/\bgit\s+stash\s+clear/],errorMessage:"Git operations that could cause permanent data loss are not supported. This includes branch switching, creating new branches, cloning repositories, or destructive operations. File-specific operations like 'git checkout -- file.json' or 'git checkout --ours file.json' are allowed for merge conflict resolution.",priority:95},{name:"git_operations",description:"Prevents direct .git directory manipulation",patterns:[/\.git\b/,/\/\.git\//,/\\\.git\\/,/\.git\//,/\.git$/],errorMessage:"Direct .git operations are prohibited for security reasons. Use proper git commands instead of manipulating .git directly.",priority:100},{name:"system_files",description:"Prevents access to critical system files",patterns:[/\/etc\/passwd/,/\/etc\/shadow/,/\/etc\/sudoers/,/\/proc\/self/,/\/sys\//,/\bsudo\s/,/\bsu\s+(root|admin)/],errorMessage:"Access to system files is prohibited for security reasons.",priority:90},{name:"network_commands",description:"Prevents potentially dangerous network operations",patterns:[/\bnc\s.*-e/,/\btelnet\b/,/\bftp\b.*<<</,/\bcurl\s+.*\|\s*(sh|bash)/,/\bwget\s+.*\|\s*(sh|bash)/],errorMessage:"Potentially dangerous network operations are restricted.",priority:80},{name:"file_permissions",description:"Prevents dangerous file permission changes",patterns:[/\bchmod\s+(777|755).*\/$/,/\bchown\s+root/,/\bchgrp\s+root/,/\bchmod\s+.*[+]s/,/\bchmod\s+777\s+\/etc/,/\bchmod\s+777\s+\/$/],errorMessage:"Dangerous file permission operations are prohibited.",priority:70},{name:"environment_manipulation",description:"Prevents dangerous environment variable manipulation",patterns:[/export\s+PATH=.*:/,/export\s+LD_LIBRARY_PATH/,/export\s+LD_PRELOAD/,/\$\{IFS\}/],errorMessage:"Environment variable manipulation that could compromise security is not allowed.",priority:60},{name:"code_execution",description:"Prevents various code execution patterns",patterns:[/\beval\s+/,/\bexec\s+\/bin\/(sh|bash)/,/\bsource\s+\/dev/,/\.\s+\/dev/,/\.\s+\/proc/,/\bdd\s+.*of=.*\|/],errorMessage:"Arbitrary code execution patterns are prohibited.",priority:50},{name:"data_exfiltration",description:"Prevents potential data exfiltration",patterns:[/\btar\s+.*\|.*nc\b/,/\bcat\s+.*\|.*curl\b/,/\bfind\s+.*-exec.*\|/,/\bbase64\s+.*\|.*curl/,/\btar\s+czf\s+-.*\|\s*nc/,/\bfind\s+\/.*-name.*\+.*\|\s*base64/,/\bcat\s+\/etc\/passwd\s*\|/],errorMessage:"Commands that could be used for data exfiltration are blocked.",priority:40},{name:"virtual_files_access",description:"Prevents Bash commands from referencing virtual file paths that only exist in the LLM context",patterns:[/\bdesign-system-docs\b/],errorMessage:"The 'design-system-docs/' directory is a virtual path that does not exist on the filesystem. These files are only accessible through the Read, Glob, and Grep tools. Do not use Bash commands (like cat, ls, cd, find, etc.) to access them.",priority:35}];H6e=new Set(["echo","cd","find","ls","rm","cp","mv","git","gh","rg","pwd","head","lsof","kill","ps","tr","awk","cat","grep","sed","tail","touch","mkdir","env","printenv","sleep","export","wc","curl","which","whoami","uname","date","dirname","basename","realpath","readlink","stat","file","diff","sort","uniq","tee","xargs","chmod","chown","test","true","false","builderio","builder"])});async function J6e(t){return(await YL).getRandomValues(new Uint8Array(t))}async function j6e(t){let e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",r=Math.pow(2,8)-Math.pow(2,8)%e.length,n="";for(;n.length<t;){let i=await J6e(t-n.length);for(let s of i)s<r&&(n+=e[s%e.length])}return n}async function Y6e(t){return await j6e(t)}async function q6e(t){let e=await(await YL).subtle.digest("SHA-256",new TextEncoder().encode(t));return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function qL(t){if(t||(t=43),t<43||t>128)throw`Expected a length between 43 and 128. Received ${t}.`;let e=await Y6e(t),r=await q6e(e);return{code_verifier:e,code_challenge:r}}var YL,fse=L(()=>{h();YL=globalThis.crypto?.webcrypto??globalThis.crypto??import("node:crypto").then(t=>t.webcrypto)});var T,Yu,f0,qu,h0,ui,hse,mse,Fjt,$6e,V6e,VL,Ys,BI,Cse,li,mo,Co,gi,m0,Ise,yI,Ese,Bse,WL,Hg,Ze,zL,yse,$u,kjt,Bc,W6e,C0,z6e,QI,wf,Qse,X6e,Z6e,eqe,tqe,rqe,nqe,XL,iqe,ZL,I0,Dse,E0,sqe,oqe,B0,aqe,DI,wI,Aqe,bI,yc,cqe,vI,y0,Q0,D0,Rjt,w0,b0,v0,wse,bse,vse,e_,Sse,SI,bf,xse,uqe,t_,r_,n_,i_,s_,lqe,o_,a_,A_,gqe,pqe,dqe,fqe,hqe,mqe,Cqe,Iqe,Eqe,c_,Bqe,yqe,u_,l_,g_,Qqe,Dqe,wqe,p_,bqe,d_,f_,vqe,Sqe,Fse,h_,m_,Vu,Tjt,xqe,xI,C_,kse,FI,Fqe,I_,kqe,Rqe,Tqe,Nqe,Mqe,Pqe,Lqe,d0,_qe,Uqe,E_,Jg,kI,Gqe,Oqe,Kqe,Hqe,Jqe,jqe,Yqe,qqe,$qe,Vqe,Wqe,zqe,Xqe,Zqe,e$e,B_,t$e,r$e,Wu,n$e,i$e,s$e,o$e,y_,a$e,A$e,Q_,c$e,Njt,Mjt,Pjt,Ljt,_jt,Ujt,je,$L,ma=L(()=>{h();T=z(require("zod/v4"),1),Yu="2025-11-25",f0=[Yu,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],qu="io.modelcontextprotocol/related-task",h0="2.0",ui=T.custom(t=>t!==null&&(typeof t=="object"||typeof t=="function")),hse=T.union([T.string(),T.number().int()]),mse=T.string(),Fjt=T.looseObject({ttl:T.union([T.number(),T.null()]).optional(),pollInterval:T.number().optional()}),$6e=T.object({ttl:T.number().optional()}),V6e=T.object({taskId:T.string()}),VL=T.looseObject({progressToken:hse.optional(),[qu]:V6e.optional()}),Ys=T.object({_meta:VL.optional()}),BI=Ys.extend({task:$6e.optional()}),Cse=t=>BI.safeParse(t).success,li=T.object({method:T.string(),params:Ys.loose().optional()}),mo=T.object({_meta:VL.optional()}),Co=T.object({method:T.string(),params:mo.loose().optional()}),gi=T.looseObject({_meta:VL.optional()}),m0=T.union([T.string(),T.number().int()]),Ise=T.object({jsonrpc:T.literal(h0),id:m0,...li.shape}).strict(),yI=t=>Ise.safeParse(t).success,Ese=T.object({jsonrpc:T.literal(h0),...Co.shape}).strict(),Bse=t=>Ese.safeParse(t).success,WL=T.object({jsonrpc:T.literal(h0),id:m0,result:gi}).strict(),Hg=t=>WL.safeParse(t).success;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(Ze||(Ze={}));zL=T.object({jsonrpc:T.literal(h0),id:m0.optional(),error:T.object({code:T.number().int(),message:T.string(),data:T.unknown().optional()})}).strict(),yse=t=>zL.safeParse(t).success,$u=T.union([Ise,Ese,WL,zL]),kjt=T.union([WL,zL]),Bc=gi.strict(),W6e=mo.extend({requestId:m0.optional(),reason:T.string().optional()}),C0=Co.extend({method:T.literal("notifications/cancelled"),params:W6e}),z6e=T.object({src:T.string(),mimeType:T.string().optional(),sizes:T.array(T.string()).optional(),theme:T.enum(["light","dark"]).optional()}),QI=T.object({icons:T.array(z6e).optional()}),wf=T.object({name:T.string(),title:T.string().optional()}),Qse=wf.extend({...wf.shape,...QI.shape,version:T.string(),websiteUrl:T.string().optional(),description:T.string().optional()}),X6e=T.intersection(T.object({applyDefaults:T.boolean().optional()}),T.record(T.string(),T.unknown())),Z6e=T.preprocess(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,T.intersection(T.object({form:X6e.optional(),url:ui.optional()}),T.record(T.string(),T.unknown()).optional())),eqe=T.looseObject({list:ui.optional(),cancel:ui.optional(),requests:T.looseObject({sampling:T.looseObject({createMessage:ui.optional()}).optional(),elicitation:T.looseObject({create:ui.optional()}).optional()}).optional()}),tqe=T.looseObject({list:ui.optional(),cancel:ui.optional(),requests:T.looseObject({tools:T.looseObject({call:ui.optional()}).optional()}).optional()}),rqe=T.object({experimental:T.record(T.string(),ui).optional(),sampling:T.object({context:ui.optional(),tools:ui.optional()}).optional(),elicitation:Z6e.optional(),roots:T.object({listChanged:T.boolean().optional()}).optional(),tasks:eqe.optional()}),nqe=Ys.extend({protocolVersion:T.string(),capabilities:rqe,clientInfo:Qse}),XL=li.extend({method:T.literal("initialize"),params:nqe}),iqe=T.object({experimental:T.record(T.string(),ui).optional(),logging:ui.optional(),completions:ui.optional(),prompts:T.object({listChanged:T.boolean().optional()}).optional(),resources:T.object({subscribe:T.boolean().optional(),listChanged:T.boolean().optional()}).optional(),tools:T.object({listChanged:T.boolean().optional()}).optional(),tasks:tqe.optional()}),ZL=gi.extend({protocolVersion:T.string(),capabilities:iqe,serverInfo:Qse,instructions:T.string().optional()}),I0=Co.extend({method:T.literal("notifications/initialized"),params:mo.optional()}),Dse=t=>I0.safeParse(t).success,E0=li.extend({method:T.literal("ping"),params:Ys.optional()}),sqe=T.object({progress:T.number(),total:T.optional(T.number()),message:T.optional(T.string())}),oqe=T.object({...mo.shape,...sqe.shape,progressToken:hse}),B0=Co.extend({method:T.literal("notifications/progress"),params:oqe}),aqe=Ys.extend({cursor:mse.optional()}),DI=li.extend({params:aqe.optional()}),wI=gi.extend({nextCursor:mse.optional()}),Aqe=T.enum(["working","input_required","completed","failed","cancelled"]),bI=T.object({taskId:T.string(),status:Aqe,ttl:T.union([T.number(),T.null()]),createdAt:T.string(),lastUpdatedAt:T.string(),pollInterval:T.optional(T.number()),statusMessage:T.optional(T.string())}),yc=gi.extend({task:bI}),cqe=mo.merge(bI),vI=Co.extend({method:T.literal("notifications/tasks/status"),params:cqe}),y0=li.extend({method:T.literal("tasks/get"),params:Ys.extend({taskId:T.string()})}),Q0=gi.merge(bI),D0=li.extend({method:T.literal("tasks/result"),params:Ys.extend({taskId:T.string()})}),Rjt=gi.loose(),w0=DI.extend({method:T.literal("tasks/list")}),b0=wI.extend({tasks:T.array(bI)}),v0=li.extend({method:T.literal("tasks/cancel"),params:Ys.extend({taskId:T.string()})}),wse=gi.merge(bI),bse=T.object({uri:T.string(),mimeType:T.optional(T.string()),_meta:T.record(T.string(),T.unknown()).optional()}),vse=bse.extend({text:T.string()}),e_=T.string().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),Sse=bse.extend({blob:e_}),SI=T.enum(["user","assistant"]),bf=T.object({audience:T.array(SI).optional(),priority:T.number().min(0).max(1).optional(),lastModified:T.iso.datetime({offset:!0}).optional()}),xse=T.object({...wf.shape,...QI.shape,uri:T.string(),description:T.optional(T.string()),mimeType:T.optional(T.string()),annotations:bf.optional(),_meta:T.optional(T.looseObject({}))}),uqe=T.object({...wf.shape,...QI.shape,uriTemplate:T.string(),description:T.optional(T.string()),mimeType:T.optional(T.string()),annotations:bf.optional(),_meta:T.optional(T.looseObject({}))}),t_=DI.extend({method:T.literal("resources/list")}),r_=wI.extend({resources:T.array(xse)}),n_=DI.extend({method:T.literal("resources/templates/list")}),i_=wI.extend({resourceTemplates:T.array(uqe)}),s_=Ys.extend({uri:T.string()}),lqe=s_,o_=li.extend({method:T.literal("resources/read"),params:lqe}),a_=gi.extend({contents:T.array(T.union([vse,Sse]))}),A_=Co.extend({method:T.literal("notifications/resources/list_changed"),params:mo.optional()}),gqe=s_,pqe=li.extend({method:T.literal("resources/subscribe"),params:gqe}),dqe=s_,fqe=li.extend({method:T.literal("resources/unsubscribe"),params:dqe}),hqe=mo.extend({uri:T.string()}),mqe=Co.extend({method:T.literal("notifications/resources/updated"),params:hqe}),Cqe=T.object({name:T.string(),description:T.optional(T.string()),required:T.optional(T.boolean())}),Iqe=T.object({...wf.shape,...QI.shape,description:T.optional(T.string()),arguments:T.optional(T.array(Cqe)),_meta:T.optional(T.looseObject({}))}),Eqe=DI.extend({method:T.literal("prompts/list")}),c_=wI.extend({prompts:T.array(Iqe)}),Bqe=Ys.extend({name:T.string(),arguments:T.record(T.string(),T.string()).optional()}),yqe=li.extend({method:T.literal("prompts/get"),params:Bqe}),u_=T.object({type:T.literal("text"),text:T.string(),annotations:bf.optional(),_meta:T.record(T.string(),T.unknown()).optional()}),l_=T.object({type:T.literal("image"),data:e_,mimeType:T.string(),annotations:bf.optional(),_meta:T.record(T.string(),T.unknown()).optional()}),g_=T.object({type:T.literal("audio"),data:e_,mimeType:T.string(),annotations:bf.optional(),_meta:T.record(T.string(),T.unknown()).optional()}),Qqe=T.object({type:T.literal("tool_use"),name:T.string(),id:T.string(),input:T.record(T.string(),T.unknown()),_meta:T.record(T.string(),T.unknown()).optional()}),Dqe=T.object({type:T.literal("resource"),resource:T.union([vse,Sse]),annotations:bf.optional(),_meta:T.record(T.string(),T.unknown()).optional()}),wqe=xse.extend({type:T.literal("resource_link")}),p_=T.union([u_,l_,g_,wqe,Dqe]),bqe=T.object({role:SI,content:p_}),d_=gi.extend({description:T.string().optional(),messages:T.array(bqe)}),f_=Co.extend({method:T.literal("notifications/prompts/list_changed"),params:mo.optional()}),vqe=T.object({title:T.string().optional(),readOnlyHint:T.boolean().optional(),destructiveHint:T.boolean().optional(),idempotentHint:T.boolean().optional(),openWorldHint:T.boolean().optional()}),Sqe=T.object({taskSupport:T.enum(["required","optional","forbidden"]).optional()}),Fse=T.object({...wf.shape,...QI.shape,description:T.string().optional(),inputSchema:T.object({type:T.literal("object"),properties:T.record(T.string(),ui).optional(),required:T.array(T.string()).optional()}).catchall(T.unknown()),outputSchema:T.object({type:T.literal("object"),properties:T.record(T.string(),ui).optional(),required:T.array(T.string()).optional()}).catchall(T.unknown()).optional(),annotations:vqe.optional(),execution:Sqe.optional(),_meta:T.record(T.string(),T.unknown()).optional()}),h_=DI.extend({method:T.literal("tools/list")}),m_=wI.extend({tools:T.array(Fse)}),Vu=gi.extend({content:T.array(p_).default([]),structuredContent:T.record(T.string(),T.unknown()).optional(),isError:T.boolean().optional()}),Tjt=Vu.or(gi.extend({toolResult:T.unknown()})),xqe=BI.extend({name:T.string(),arguments:T.record(T.string(),T.unknown()).optional()}),xI=li.extend({method:T.literal("tools/call"),params:xqe}),C_=Co.extend({method:T.literal("notifications/tools/list_changed"),params:mo.optional()}),kse=T.object({autoRefresh:T.boolean().default(!0),debounceMs:T.number().int().nonnegative().default(300)}),FI=T.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),Fqe=Ys.extend({level:FI}),I_=li.extend({method:T.literal("logging/setLevel"),params:Fqe}),kqe=mo.extend({level:FI,logger:T.string().optional(),data:T.unknown()}),Rqe=Co.extend({method:T.literal("notifications/message"),params:kqe}),Tqe=T.object({name:T.string().optional()}),Nqe=T.object({hints:T.array(Tqe).optional(),costPriority:T.number().min(0).max(1).optional(),speedPriority:T.number().min(0).max(1).optional(),intelligencePriority:T.number().min(0).max(1).optional()}),Mqe=T.object({mode:T.enum(["auto","required","none"]).optional()}),Pqe=T.object({type:T.literal("tool_result"),toolUseId:T.string().describe("The unique identifier for the corresponding tool call."),content:T.array(p_).default([]),structuredContent:T.object({}).loose().optional(),isError:T.boolean().optional(),_meta:T.record(T.string(),T.unknown()).optional()}),Lqe=T.discriminatedUnion("type",[u_,l_,g_]),d0=T.discriminatedUnion("type",[u_,l_,g_,Qqe,Pqe]),_qe=T.object({role:SI,content:T.union([d0,T.array(d0)]),_meta:T.record(T.string(),T.unknown()).optional()}),Uqe=BI.extend({messages:T.array(_qe),modelPreferences:Nqe.optional(),systemPrompt:T.string().optional(),includeContext:T.enum(["none","thisServer","allServers"]).optional(),temperature:T.number().optional(),maxTokens:T.number().int(),stopSequences:T.array(T.string()).optional(),metadata:ui.optional(),tools:T.array(Fse).optional(),toolChoice:Mqe.optional()}),E_=li.extend({method:T.literal("sampling/createMessage"),params:Uqe}),Jg=gi.extend({model:T.string(),stopReason:T.optional(T.enum(["endTurn","stopSequence","maxTokens"]).or(T.string())),role:SI,content:Lqe}),kI=gi.extend({model:T.string(),stopReason:T.optional(T.enum(["endTurn","stopSequence","maxTokens","toolUse"]).or(T.string())),role:SI,content:T.union([d0,T.array(d0)])}),Gqe=T.object({type:T.literal("boolean"),title:T.string().optional(),description:T.string().optional(),default:T.boolean().optional()}),Oqe=T.object({type:T.literal("string"),title:T.string().optional(),description:T.string().optional(),minLength:T.number().optional(),maxLength:T.number().optional(),format:T.enum(["email","uri","date","date-time"]).optional(),default:T.string().optional()}),Kqe=T.object({type:T.enum(["number","integer"]),title:T.string().optional(),description:T.string().optional(),minimum:T.number().optional(),maximum:T.number().optional(),default:T.number().optional()}),Hqe=T.object({type:T.literal("string"),title:T.string().optional(),description:T.string().optional(),enum:T.array(T.string()),default:T.string().optional()}),Jqe=T.object({type:T.literal("string"),title:T.string().optional(),description:T.string().optional(),oneOf:T.array(T.object({const:T.string(),title:T.string()})),default:T.string().optional()}),jqe=T.object({type:T.literal("string"),title:T.string().optional(),description:T.string().optional(),enum:T.array(T.string()),enumNames:T.array(T.string()).optional(),default:T.string().optional()}),Yqe=T.union([Hqe,Jqe]),qqe=T.object({type:T.literal("array"),title:T.string().optional(),description:T.string().optional(),minItems:T.number().optional(),maxItems:T.number().optional(),items:T.object({type:T.literal("string"),enum:T.array(T.string())}),default:T.array(T.string()).optional()}),$qe=T.object({type:T.literal("array"),title:T.string().optional(),description:T.string().optional(),minItems:T.number().optional(),maxItems:T.number().optional(),items:T.object({anyOf:T.array(T.object({const:T.string(),title:T.string()}))}),default:T.array(T.string()).optional()}),Vqe=T.union([qqe,$qe]),Wqe=T.union([jqe,Yqe,Vqe]),zqe=T.union([Wqe,Gqe,Oqe,Kqe]),Xqe=BI.extend({mode:T.literal("form").optional(),message:T.string(),requestedSchema:T.object({type:T.literal("object"),properties:T.record(T.string(),zqe),required:T.array(T.string()).optional()})}),Zqe=BI.extend({mode:T.literal("url"),message:T.string(),elicitationId:T.string(),url:T.string().url()}),e$e=T.union([Xqe,Zqe]),B_=li.extend({method:T.literal("elicitation/create"),params:e$e}),t$e=mo.extend({elicitationId:T.string()}),r$e=Co.extend({method:T.literal("notifications/elicitation/complete"),params:t$e}),Wu=gi.extend({action:T.enum(["accept","decline","cancel"]),content:T.preprocess(t=>t===null?void 0:t,T.record(T.string(),T.union([T.string(),T.number(),T.boolean(),T.array(T.string())])).optional())}),n$e=T.object({type:T.literal("ref/resource"),uri:T.string()}),i$e=T.object({type:T.literal("ref/prompt"),name:T.string()}),s$e=Ys.extend({ref:T.union([i$e,n$e]),argument:T.object({name:T.string(),value:T.string()}),context:T.object({arguments:T.record(T.string(),T.string()).optional()}).optional()}),o$e=li.extend({method:T.literal("completion/complete"),params:s$e}),y_=gi.extend({completion:T.looseObject({values:T.array(T.string()).max(100),total:T.optional(T.number().int()),hasMore:T.optional(T.boolean())})}),a$e=T.object({uri:T.string().startsWith("file://"),name:T.string().optional(),_meta:T.record(T.string(),T.unknown()).optional()}),A$e=li.extend({method:T.literal("roots/list"),params:Ys.optional()}),Q_=gi.extend({roots:T.array(a$e)}),c$e=Co.extend({method:T.literal("notifications/roots/list_changed"),params:mo.optional()}),Njt=T.union([E0,XL,o$e,I_,yqe,Eqe,t_,n_,o_,pqe,fqe,xI,h_,y0,D0,w0,v0]),Mjt=T.union([C0,B0,I0,c$e,vI]),Pjt=T.union([Bc,Jg,kI,Wu,Q_,Q0,b0,yc]),Ljt=T.union([E0,E_,B_,A$e,y0,D0,w0,v0]),_jt=T.union([C0,B0,Rqe,mqe,A_,C_,f_,vI,r$e]),Ujt=T.union([Bc,ZL,y_,d_,c_,r_,i_,a_,Vu,m_,Q0,b0,yc]),je=class t extends Error{constructor(e,r,n){super(`MCP error ${e}: ${r}`),this.code=e,this.data=n,this.name="McpError"}static fromError(e,r,n){if(e===Ze.UrlElicitationRequired&&n){let i=n;if(i.elicitations)return new $L(i.elicitations,r)}return new t(e,r,n)}},$L=class extends je{constructor(e,r=`URL elicitation${e.length>1?"s":""} required`){super(Ze.UrlElicitationRequired,r,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}});var ce,pi,Tse,D_,u$e,Nse,Mse,Pse,Rse,l$e,g$e,Lse,Kjt,Hjt,w_=L(()=>{h();ce=z(require("zod/v4"),1),pi=ce.url().superRefine((t,e)=>{if(!URL.canParse(t))return e.addIssue({code:ce.ZodIssueCode.custom,message:"URL must be parseable",fatal:!0}),ce.NEVER}).refine(t=>{let e=new URL(t);return e.protocol!=="javascript:"&&e.protocol!=="data:"&&e.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Tse=ce.looseObject({resource:ce.string().url(),authorization_servers:ce.array(pi).optional(),jwks_uri:ce.string().url().optional(),scopes_supported:ce.array(ce.string()).optional(),bearer_methods_supported:ce.array(ce.string()).optional(),resource_signing_alg_values_supported:ce.array(ce.string()).optional(),resource_name:ce.string().optional(),resource_documentation:ce.string().optional(),resource_policy_uri:ce.string().url().optional(),resource_tos_uri:ce.string().url().optional(),tls_client_certificate_bound_access_tokens:ce.boolean().optional(),authorization_details_types_supported:ce.array(ce.string()).optional(),dpop_signing_alg_values_supported:ce.array(ce.string()).optional(),dpop_bound_access_tokens_required:ce.boolean().optional()}),D_=ce.looseObject({issuer:ce.string(),authorization_endpoint:pi,token_endpoint:pi,registration_endpoint:pi.optional(),scopes_supported:ce.array(ce.string()).optional(),response_types_supported:ce.array(ce.string()),response_modes_supported:ce.array(ce.string()).optional(),grant_types_supported:ce.array(ce.string()).optional(),token_endpoint_auth_methods_supported:ce.array(ce.string()).optional(),token_endpoint_auth_signing_alg_values_supported:ce.array(ce.string()).optional(),service_documentation:pi.optional(),revocation_endpoint:pi.optional(),revocation_endpoint_auth_methods_supported:ce.array(ce.string()).optional(),revocation_endpoint_auth_signing_alg_values_supported:ce.array(ce.string()).optional(),introspection_endpoint:ce.string().optional(),introspection_endpoint_auth_methods_supported:ce.array(ce.string()).optional(),introspection_endpoint_auth_signing_alg_values_supported:ce.array(ce.string()).optional(),code_challenge_methods_supported:ce.array(ce.string()).optional(),client_id_metadata_document_supported:ce.boolean().optional()}),u$e=ce.looseObject({issuer:ce.string(),authorization_endpoint:pi,token_endpoint:pi,userinfo_endpoint:pi.optional(),jwks_uri:pi,registration_endpoint:pi.optional(),scopes_supported:ce.array(ce.string()).optional(),response_types_supported:ce.array(ce.string()),response_modes_supported:ce.array(ce.string()).optional(),grant_types_supported:ce.array(ce.string()).optional(),acr_values_supported:ce.array(ce.string()).optional(),subject_types_supported:ce.array(ce.string()),id_token_signing_alg_values_supported:ce.array(ce.string()),id_token_encryption_alg_values_supported:ce.array(ce.string()).optional(),id_token_encryption_enc_values_supported:ce.array(ce.string()).optional(),userinfo_signing_alg_values_supported:ce.array(ce.string()).optional(),userinfo_encryption_alg_values_supported:ce.array(ce.string()).optional(),userinfo_encryption_enc_values_supported:ce.array(ce.string()).optional(),request_object_signing_alg_values_supported:ce.array(ce.string()).optional(),request_object_encryption_alg_values_supported:ce.array(ce.string()).optional(),request_object_encryption_enc_values_supported:ce.array(ce.string()).optional(),token_endpoint_auth_methods_supported:ce.array(ce.string()).optional(),token_endpoint_auth_signing_alg_values_supported:ce.array(ce.string()).optional(),display_values_supported:ce.array(ce.string()).optional(),claim_types_supported:ce.array(ce.string()).optional(),claims_supported:ce.array(ce.string()).optional(),service_documentation:ce.string().optional(),claims_locales_supported:ce.array(ce.string()).optional(),ui_locales_supported:ce.array(ce.string()).optional(),claims_parameter_supported:ce.boolean().optional(),request_parameter_supported:ce.boolean().optional(),request_uri_parameter_supported:ce.boolean().optional(),require_request_uri_registration:ce.boolean().optional(),op_policy_uri:pi.optional(),op_tos_uri:pi.optional(),client_id_metadata_document_supported:ce.boolean().optional()}),Nse=ce.object({...u$e.shape,...D_.pick({code_challenge_methods_supported:!0}).shape}),Mse=ce.object({access_token:ce.string(),id_token:ce.string().optional(),token_type:ce.string(),expires_in:ce.coerce.number().optional(),scope:ce.string().optional(),refresh_token:ce.string().optional()}).strip(),Pse=ce.object({error:ce.string(),error_description:ce.string().optional(),error_uri:ce.string().optional()}),Rse=pi.optional().or(ce.literal("").transform(()=>{})),l$e=ce.object({redirect_uris:ce.array(pi),token_endpoint_auth_method:ce.string().optional(),grant_types:ce.array(ce.string()).optional(),response_types:ce.array(ce.string()).optional(),client_name:ce.string().optional(),client_uri:pi.optional(),logo_uri:Rse,scope:ce.string().optional(),contacts:ce.array(ce.string()).optional(),tos_uri:Rse,policy_uri:ce.string().optional(),jwks_uri:pi.optional(),jwks:ce.any().optional(),software_id:ce.string().optional(),software_version:ce.string().optional(),software_statement:ce.string().optional()}).strip(),g$e=ce.object({client_id:ce.string(),client_secret:ce.string().optional(),client_id_issued_at:ce.number().optional(),client_secret_expires_at:ce.number().optional()}).strip(),Lse=l$e.merge(g$e),Kjt=ce.object({error:ce.string(),error_description:ce.string().optional()}).strip(),Hjt=ce.object({token:ce.string(),token_type_hint:ce.string().optional()}).strip()});function _se(t){let e=typeof t=="string"?new URL(t):new URL(t.href);return e.hash="",e}function Use({requestedResource:t,configuredResource:e}){let r=typeof t=="string"?new URL(t):new URL(t.href),n=typeof e=="string"?new URL(e):new URL(e.href);if(r.origin!==n.origin||r.pathname.length<n.pathname.length)return!1;let i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/",s=n.pathname.endsWith("/")?n.pathname:n.pathname+"/";return i.startsWith(s)}var Gse=L(()=>{h()});var ln,RI,EA,Qc,BA,TI,NI,jg,Dc,MI,PI,LI,Yg,_I,UI,qg,GI,OI,Ose,b_=L(()=>{h();ln=class extends Error{constructor(e,r){super(e),this.errorUri=r,this.name=this.constructor.name}toResponseObject(){let e={error:this.errorCode,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}get errorCode(){return this.constructor.errorCode}},RI=class extends ln{};RI.errorCode="invalid_request";EA=class extends ln{};EA.errorCode="invalid_client";Qc=class extends ln{};Qc.errorCode="invalid_grant";BA=class extends ln{};BA.errorCode="unauthorized_client";TI=class extends ln{};TI.errorCode="unsupported_grant_type";NI=class extends ln{};NI.errorCode="invalid_scope";jg=class extends ln{};jg.errorCode="access_denied";Dc=class extends ln{};Dc.errorCode="server_error";MI=class extends ln{};MI.errorCode="temporarily_unavailable";PI=class extends ln{};PI.errorCode="unsupported_response_type";LI=class extends ln{};LI.errorCode="unsupported_token_type";Yg=class extends ln{};Yg.errorCode="invalid_token";_I=class extends ln{};_I.errorCode="method_not_allowed";UI=class extends ln{};UI.errorCode="too_many_requests";qg=class extends ln{};qg.errorCode="invalid_client_metadata";GI=class extends ln{};GI.errorCode="insufficient_scope";OI=class extends ln{};OI.errorCode="invalid_target";Ose={[RI.errorCode]:RI,[EA.errorCode]:EA,[Qc.errorCode]:Qc,[BA.errorCode]:BA,[TI.errorCode]:TI,[NI.errorCode]:NI,[jg.errorCode]:jg,[Dc.errorCode]:Dc,[MI.errorCode]:MI,[PI.errorCode]:PI,[LI.errorCode]:LI,[Yg.errorCode]:Yg,[_I.errorCode]:_I,[UI.errorCode]:UI,[qg.errorCode]:qg,[GI.errorCode]:GI,[OI.errorCode]:OI}});function p$e(t){return["client_secret_basic","client_secret_post","none"].includes(t)}function d$e(t,e){let r=t.client_secret!==void 0;return e.length===0?r?"client_secret_post":"none":"token_endpoint_auth_method"in t&&t.token_endpoint_auth_method&&p$e(t.token_endpoint_auth_method)&&e.includes(t.token_endpoint_auth_method)?t.token_endpoint_auth_method:r&&e.includes("client_secret_basic")?"client_secret_basic":r&&e.includes("client_secret_post")?"client_secret_post":e.includes("none")?"none":r?"client_secret_post":"none"}function f$e(t,e,r,n){let{client_id:i,client_secret:s}=e;switch(t){case"client_secret_basic":h$e(i,s,r);return;case"client_secret_post":m$e(i,s,n);return;case"none":C$e(i,n);return;default:throw new Error(`Unsupported client authentication method: ${t}`)}}function h$e(t,e,r){if(!e)throw new Error("client_secret_basic authentication requires a client_secret");let n=btoa(`${t}:${e}`);r.set("Authorization",`Basic ${n}`)}function m$e(t,e,r){r.set("client_id",t),e&&r.set("client_secret",e)}function C$e(t,e){e.set("client_id",t)}async function Hse(t){let e=t instanceof Response?t.status:void 0,r=t instanceof Response?await t.text():t;try{let n=Pse.parse(JSON.parse(r)),{error:i,error_description:s,error_uri:o}=n,a=Ose[i]||Dc;return new a(s||"",o)}catch(n){let i=`${e?`HTTP ${e}: `:""}Invalid OAuth error response: ${n}. Raw body: ${r}`;return new Dc(i)}}async function Ca(t,e){try{return await x_(t,e)}catch(r){if(r instanceof EA||r instanceof BA)return await t.invalidateCredentials?.("all"),await x_(t,e);if(r instanceof Qc)return await t.invalidateCredentials?.("tokens"),await x_(t,e);throw r}}async function x_(t,{serverUrl:e,authorizationCode:r,scope:n,resourceMetadataUrl:i,fetchFn:s}){let o=await t.discoveryState?.(),a,A,c,u=i;if(!u&&o?.resourceMetadataUrl&&(u=new URL(o.resourceMetadataUrl)),o?.authorizationServerUrl){if(A=o.authorizationServerUrl,a=o.resourceMetadata,c=o.authorizationServerMetadata??await HI(A,{fetchFn:s}),!a)try{a=await KI(e,{resourceMetadataUrl:u},s)}catch{}(c!==o.authorizationServerMetadata||a!==o.resourceMetadata)&&await t.saveDiscoveryState?.({authorizationServerUrl:String(A),resourceMetadataUrl:u?.toString(),resourceMetadata:a,authorizationServerMetadata:c})}else{let I=await w$e(e,{resourceMetadataUrl:u,fetchFn:s});A=I.authorizationServerUrl,c=I.authorizationServerMetadata,a=I.resourceMetadata,await t.saveDiscoveryState?.({authorizationServerUrl:String(A),resourceMetadataUrl:u?.toString(),resourceMetadata:a,authorizationServerMetadata:c})}let l=await E$e(e,t,a),d=await Promise.resolve(t.clientInformation());if(!d){if(r!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");let I=c?.client_id_metadata_document_supported===!0,y=t.clientMetadataUrl;if(y&&!I$e(y))throw new qg(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${y}`);if(I&&y)d={client_id:y},await t.saveClientInformation?.(d);else{if(!t.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");let E=await S$e(A,{metadata:c,clientMetadata:t.clientMetadata,fetchFn:s});await t.saveClientInformation(E),d=E}}let g=!t.redirectUrl;if(r!==void 0||g){let I=await v$e(t,A,{metadata:c,resource:l,authorizationCode:r,fetchFn:s});return await t.saveTokens(I),"AUTHORIZED"}let p=await t.tokens();if(p?.refresh_token)try{let I=await T_(A,{metadata:c,clientInformation:d,refreshToken:p.refresh_token,resource:l,addClientAuthentication:t.addClientAuthentication,fetchFn:s});return await t.saveTokens(I),"AUTHORIZED"}catch(I){if(!(!(I instanceof ln)||I instanceof Dc))throw I}let f=t.state?await t.state():void 0,{authorizationUrl:m,codeVerifier:C}=await b$e(A,{metadata:c,clientInformation:d,state:f,redirectUrl:t.redirectUrl,scope:n||a?.scopes_supported?.join(" ")||t.clientMetadata.scope,resource:l});return await t.saveCodeVerifier(C),await t.redirectToAuthorization(m),"REDIRECT"}function I$e(t){if(!t)return!1;try{let e=new URL(t);return e.protocol==="https:"&&e.pathname!=="/"}catch{return!1}}async function E$e(t,e,r){let n=_se(t);if(e.validateResourceURL)return await e.validateResourceURL(n,r?.resource);if(r){if(!Use({requestedResource:n,configuredResource:r.resource}))throw new Error(`Protected resource ${r.resource} does not match expected ${n} (or origin)`);return new URL(r.resource)}}function zu(t){let e=t.headers.get("WWW-Authenticate");if(!e)return{};let[r,n]=e.split(" ");if(r.toLowerCase()!=="bearer"||!n)return{};let i=F_(t,"resource_metadata")||void 0,s;if(i)try{s=new URL(i)}catch{}let o=F_(t,"scope")||void 0,a=F_(t,"error")||void 0;return{resourceMetadataUrl:s,scope:o,error:a}}function F_(t,e){let r=t.headers.get("WWW-Authenticate");if(!r)return null;let n=new RegExp(`${e}=(?:"([^"]+)"|([^\\s,]+))`),i=r.match(n);return i?i[1]||i[2]:null}async function KI(t,e,r=fetch){let n=await Q$e(t,"oauth-protected-resource",r,{protocolVersion:e?.protocolVersion,metadataUrl:e?.resourceMetadataUrl});if(!n||n.status===404)throw await n?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!n.ok)throw await n.body?.cancel(),new Error(`HTTP ${n.status} trying to load well-known OAuth protected resource metadata.`);return Tse.parse(await n.json())}async function k_(t,e,r=fetch){try{return await r(t,{headers:e})}catch(n){if(n instanceof TypeError)return e?k_(t,void 0,r):void 0;throw n}}function B$e(t,e="",r={}){return e.endsWith("/")&&(e=e.slice(0,-1)),r.prependPathname?`${e}/.well-known/${t}`:`/.well-known/${t}${e}`}async function Kse(t,e,r=fetch){return await k_(t,{"MCP-Protocol-Version":e},r)}function y$e(t,e){return!t||t.status>=400&&t.status<500&&e!=="/"}async function Q$e(t,e,r,n){let i=new URL(t),s=n?.protocolVersion??Yu,o;if(n?.metadataUrl)o=new URL(n.metadataUrl);else{let A=B$e(e,i.pathname);o=new URL(A,n?.metadataServerUrl??i),o.search=i.search}let a=await Kse(o,s,r);if(!n?.metadataUrl&&y$e(a,i.pathname)){let A=new URL(`/.well-known/${e}`,i);a=await Kse(A,s,r)}return a}function D$e(t){let e=typeof t=="string"?new URL(t):t,r=e.pathname!=="/",n=[];if(!r)return n.push({url:new URL("/.well-known/oauth-authorization-server",e.origin),type:"oauth"}),n.push({url:new URL("/.well-known/openid-configuration",e.origin),type:"oidc"}),n;let i=e.pathname;return i.endsWith("/")&&(i=i.slice(0,-1)),n.push({url:new URL(`/.well-known/oauth-authorization-server${i}`,e.origin),type:"oauth"}),n.push({url:new URL(`/.well-known/openid-configuration${i}`,e.origin),type:"oidc"}),n.push({url:new URL(`${i}/.well-known/openid-configuration`,e.origin),type:"oidc"}),n}async function HI(t,{fetchFn:e=fetch,protocolVersion:r=Yu}={}){let n={"MCP-Protocol-Version":r,Accept:"application/json"},i=D$e(t);for(let{url:s,type:o}of i){let a=await k_(s,n,e);if(a){if(!a.ok){if(await a.body?.cancel(),a.status>=400&&a.status<500)continue;throw new Error(`HTTP ${a.status} trying to load ${o==="oauth"?"OAuth":"OpenID provider"} metadata from ${s}`)}return o==="oauth"?D_.parse(await a.json()):Nse.parse(await a.json())}}}async function w$e(t,e){let r,n;try{r=await KI(t,{resourceMetadataUrl:e?.resourceMetadataUrl},e?.fetchFn),r.authorization_servers&&r.authorization_servers.length>0&&(n=r.authorization_servers[0])}catch{}n||(n=String(new URL("/",t)));let i=await HI(n,{fetchFn:e?.fetchFn});return{authorizationServerUrl:n,authorizationServerMetadata:i,resourceMetadata:r}}async function b$e(t,{metadata:e,clientInformation:r,redirectUrl:n,scope:i,state:s,resource:o}){let a;if(e){if(a=new URL(e.authorization_endpoint),!e.response_types_supported.includes(v_))throw new Error(`Incompatible auth server: does not support response type ${v_}`);if(e.code_challenge_methods_supported&&!e.code_challenge_methods_supported.includes(S_))throw new Error(`Incompatible auth server: does not support code challenge method ${S_}`)}else a=new URL("/authorize",t);let A=await qL(),c=A.code_verifier,u=A.code_challenge;return a.searchParams.set("response_type",v_),a.searchParams.set("client_id",r.client_id),a.searchParams.set("code_challenge",u),a.searchParams.set("code_challenge_method",S_),a.searchParams.set("redirect_uri",String(n)),s&&a.searchParams.set("state",s),i&&a.searchParams.set("scope",i),i?.includes("offline_access")&&a.searchParams.append("prompt","consent"),o&&a.searchParams.set("resource",o.href),{authorizationUrl:a,codeVerifier:c}}function Jse(t,e,r){return new URLSearchParams({grant_type:"authorization_code",code:t,code_verifier:e,redirect_uri:String(r)})}async function R_(t,{metadata:e,tokenRequestParams:r,clientInformation:n,addClientAuthentication:i,resource:s,fetchFn:o}){let a=e?.token_endpoint?new URL(e.token_endpoint):new URL("/token",t),A=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(s&&r.set("resource",s.href),i)await i(A,r,a,e);else if(n){let u=e?.token_endpoint_auth_methods_supported??[],l=d$e(n,u);f$e(l,n,A,r)}let c=await(o??fetch)(a,{method:"POST",headers:A,body:r});if(!c.ok)throw await Hse(c);return Mse.parse(await c.json())}async function jse(t,{metadata:e,clientInformation:r,authorizationCode:n,codeVerifier:i,redirectUri:s,resource:o,addClientAuthentication:a,fetchFn:A}){let c=Jse(n,i,s);return R_(t,{metadata:e,tokenRequestParams:c,clientInformation:r,addClientAuthentication:a,resource:o,fetchFn:A})}async function T_(t,{metadata:e,clientInformation:r,refreshToken:n,resource:i,addClientAuthentication:s,fetchFn:o}){let a=new URLSearchParams({grant_type:"refresh_token",refresh_token:n}),A=await R_(t,{metadata:e,tokenRequestParams:a,clientInformation:r,addClientAuthentication:s,resource:i,fetchFn:o});return{refresh_token:n,...A}}async function v$e(t,e,{metadata:r,resource:n,authorizationCode:i,fetchFn:s}={}){let o=t.clientMetadata.scope,a;if(t.prepareTokenRequest&&(a=await t.prepareTokenRequest(o)),!a){if(!i)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!t.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");let c=await t.codeVerifier();a=Jse(i,c,t.redirectUrl)}let A=await t.clientInformation();return R_(e,{metadata:r,tokenRequestParams:a,clientInformation:A??void 0,addClientAuthentication:t.addClientAuthentication,resource:n,fetchFn:s})}async function S$e(t,{metadata:e,clientMetadata:r,fetchFn:n}){let i;if(e){if(!e.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(e.registration_endpoint)}else i=new URL("/register",t);let s=await(n??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!s.ok)throw await Hse(s);return Lse.parse(await s.json())}var Tn,v_,S_,vf=L(()=>{h();fse();ma();w_();w_();Gse();b_();Tn=class extends Error{constructor(e){super(e??"Unauthorized")}};v_="code",S_="S256"});function x$e(){return Yse.default.randomBytes(32).toString("base64url")}function N_(t,e=5){let r=e*60*1e3;return Date.now()>=t-r}function F$e(t){return t instanceof Qc||t instanceof EA||t instanceof Yg||t instanceof jg||t instanceof BA}function k$e(t){return t instanceof EA||t instanceof BA}var Yse,S0,M_=L(()=>{"use strict";h();Yse=z(require("node:crypto"),1);b_();vf();S0=class{serverUrl;serverName;_clientMetadata;identity;store;redirect;onWarning;currentState=null;currentCodeVerifier=null;saveCodeVerifierCalled=!1;constructor(e){this.serverUrl=e.serverUrl,this.serverName=e.serverName,this._clientMetadata=e.clientMetadata,this.identity=e.identity,this.store=e.store,this.redirect=e.redirect,this.onWarning=e.onWarning}get redirectUrl(){return this.redirect.redirectUrl}get clientMetadata(){return this._clientMetadata}async discoverOAuthMetadata(e){let r=await this.store.getMetadata(),n=await this.store.isDiscoveryFailed(),i=!!(r?.clientId&&r.authorizationEndpoint&&r.tokenEndpoint);if(!e&&i)return!0;if(!e&&n)return!1;e&&n&&await this.store.invalidateCredentials("discovery");try{let s,o;try{let l=await KI(this.serverUrl);s=l.authorization_servers?.[0],o=l.resource}catch{}if(!s){let l=await this.probeWwwAuthenticate();if(l)try{let d=await KI(this.serverUrl,{resourceMetadataUrl:l});s=d.authorization_servers?.[0],o=d.resource}catch{}}let a=s||this.serverUrl,A=await HI(a);if(!A)try{let l=new URL(a);l.pathname&&l.pathname!=="/"&&l.origin!==a&&(A=await HI(l.origin))}catch{}if(!A)return await this.store.markDiscoveryFailed("No authorization server metadata found"),!1;let c=r?.clientId??"",u=r?.clientSecret;if(!c&&A.registration_endpoint)try{let l=await fetch(A.registration_endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(this._clientMetadata)});if(l.ok){let d=await l.json();c=d.client_id,u=d.client_secret}else this.warn("Dynamic client registration failed",void 0,{status:l.status})}catch(l){this.warn("Dynamic client registration threw",l)}return await this.store.saveMetadata({clientId:c,clientSecret:u,scope:[],authorizationEndpoint:A.authorization_endpoint,tokenEndpoint:A.token_endpoint,registrationEndpoint:A.registration_endpoint,resource:o,discoveredAt:Date.now()}),!0}catch(s){let o=s instanceof Error?s.message:"Discovery failed";return await this.store.markDiscoveryFailed(o),this.warn("OAuth discovery failed",s),!1}}async probeWwwAuthenticate(){let e=async i=>{try{let s=await fetch(this.serverUrl,i);return await s.body?.cancel().catch(()=>{}),s.status!==401?{reached:!0}:{reached:!0,url:zu(s).resourceMetadataUrl}}catch{return{reached:!1}}},r=await e({method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json, text/event-stream"},body:JSON.stringify({jsonrpc:"2.0",id:0,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"mcp-oauth-probe",version:"0.0.0"}}})});if(r.reached)return r.url;let n=await e({method:"GET"});return n.reached?n.url:void 0}async clientInformation(){let e=await this.store.getMetadata();if(e?.clientId)return{client_id:e.clientId,...e.clientSecret&&{client_secret:e.clientSecret}}}async saveClientInformation(e){let r=await this.store.getMetadata();if(!r){await this.store.saveMetadata({clientId:e.client_id,clientSecret:e.client_secret,scope:[],authorizationEndpoint:"",tokenEndpoint:"",discoveredAt:Date.now()});return}await this.store.saveMetadata({...r,clientId:e.client_id,clientSecret:e.client_secret})}async tokens(){let e=await this.store.getTokens();if(e?.accessToken){if(N_(e.expiresAt)){if(e.refreshToken)try{let r=await this.refreshTokens(e.refreshToken);if(r)return r}catch(r){this.warn("OAuth token refresh failed",r)}return}return{access_token:e.accessToken,token_type:e.tokenType||"Bearer",expires_in:Math.floor((e.expiresAt-Date.now())/1e3),...e.refreshToken&&{refresh_token:e.refreshToken}}}}async refreshTokens(e){let r=await this.clientInformation();if(!r)return;let n=await this.store.getMetadata(),i=n?.resource,s=n?.tokenEndpoint?n.tokenEndpoint.replace(/\/token$/,""):this.serverUrl,o;try{o=await T_(s,{...n?.tokenEndpoint&&{metadata:{authorization_endpoint:n.authorizationEndpoint,token_endpoint:n.tokenEndpoint}},clientInformation:r,refreshToken:e,...i&&{resource:new URL(i)}})}catch(a){if(F$e(a)){let A=k$e(a)?"all":"tokens";try{await this.invalidateCredentials(A)}catch(c){this.warn("Failed to invalidate credentials after permanent OAuth failure",c,{invalidationScope:A})}}throw a}return await this.saveTokens(o),o}async saveTokens(e){await this.persistTokens(e)}async persistTokens(e,r){let n=e.expires_in?Date.now()+e.expires_in*1e3:Date.now()+36e5;await this.store.saveTokens({accessToken:e.access_token,refreshToken:e.refresh_token||void 0,expiresAt:n,tokenType:e.token_type||"Bearer",...r?.clientId&&{clientId:r.clientId},...r?.clientSecret&&{clientSecret:r.clientSecret}})}async redirectToAuthorization(e){await this.redirect.onAuthorizationRequired(e)}async saveCodeVerifier(e){if(this.saveCodeVerifierCalled)return;if(this.saveCodeVerifierCalled=!0,this.currentCodeVerifier=e,!this.currentState){this.warn("No state available when saving code verifier",new Error("No state available when saving code verifier"));return}let r=await this.store.getMetadata();if(!r){this.warn("No metadata found when saving code verifier",new Error("No metadata found for server"));return}let n=Date.now(),i=n+1800*1e3;await this.store.saveOAuthState({state:this.currentState,codeVerifier:e,serverId:this.identity.serverId,ownerId:this.identity.ownerId,userId:this.identity.userId??null,sessionId:this.identity.sessionId,serverUrl:this.serverUrl,serverName:this.serverName,authorizationEndpoint:r.authorizationEndpoint,tokenEndpoint:r.tokenEndpoint,clientId:r.clientId,clientSecret:r.clientSecret,scope:r.scope||[],resource:r.resource,createdAt:n,expiresAt:i})}async codeVerifier(){if(!this.currentCodeVerifier)throw new Error("Code verifier not found");return this.currentCodeVerifier}async state(){return this.currentState||(this.currentState=x$e()),this.currentState}async invalidateCredentials(e="tokens"){await this.store.invalidateCredentials(e),(e==="verifier"||e==="all")&&(this.currentState=null,this.currentCodeVerifier=null,this.saveCodeVerifierCalled=!1)}async handleCallback(e,r){if(!r)throw new Error("Missing OAuth state parameter");let n=await this.store.consumeOAuthState(r);if(!n)throw new Error("Invalid or expired OAuth state");let i=n.tokenEndpoint.replace(/\/token$/,""),s=await jse(i,{metadata:{authorization_endpoint:n.authorizationEndpoint,token_endpoint:n.tokenEndpoint},clientInformation:{client_id:n.clientId,...n.clientSecret&&{client_secret:n.clientSecret}},authorizationCode:e,codeVerifier:n.codeVerifier,redirectUri:this.redirect.redirectUrl,...n.resource&&{resource:new URL(n.resource)}});return await this.persistTokens(s,{clientId:n.clientId,clientSecret:n.clientSecret}),s}warn(e,r,n){this.onWarning?.(e,r,{serverUrl:this.serverUrl,serverName:this.serverName,...n})}}});function R$e(t){let e=process.env.BUILDER_DEV_TOOLS_CREDS_DIR;return e||t||(0,x0.join)((0,qse.homedir)(),".builder","config","mcp")}function Xu(t){if((0,Ia.existsSync)(t))try{let e=(0,Ia.readFileSync)(t,"utf8");return e.trim()?JSON.parse(e):void 0}catch{return}}function JI(t,e){let r=JSON.stringify(e,null,2);(0,Ia.writeFileSync)(t,r,{mode:384,encoding:"utf8"});try{(0,Ia.chmodSync)(t,384)}catch{}}function T$e(t){return!!t.oauthMetadata||!!t.discoveryFailed||!!t.discoveryError}var qse,x0,Ia,wc,F0=L(()=>{"use strict";h();qse=require("node:os"),x0=require("node:path"),Ia=require("node:fs");wc=class{serverUrl;dir;serversPath;tokensPath;pkceStates=new Map;constructor(e){this.serverUrl=e.serverUrl,this.dir=R$e(e.baseDir),this.serversPath=(0,x0.join)(this.dir,"servers.json"),this.tokensPath=(0,x0.join)(this.dir,"tokens.json")}async getMetadata(){return Xu(this.serversPath)?.[this.serverUrl]?.oauthMetadata}async saveMetadata(e){this.ensureDir();let r=Xu(this.serversPath)??{},n=r[this.serverUrl]??{};r[this.serverUrl]={...n,oauthMetadata:e,discoveryFailed:!1,discoveryError:void 0},JI(this.serversPath,r)}async markDiscoveryFailed(e){this.ensureDir();let r=Xu(this.serversPath)??{},n=r[this.serverUrl]??{};r[this.serverUrl]={...n,discoveryFailed:!0,discoveryError:e},JI(this.serversPath,r)}async isDiscoveryFailed(){return!!Xu(this.serversPath)?.[this.serverUrl]?.discoveryFailed}async getTokens(){let r=Xu(this.tokensPath)?.[this.serverUrl];if(r)return{accessToken:r.accessToken,refreshToken:r.refreshToken||void 0,expiresAt:r.expiresAt,tokenType:r.tokenType||"Bearer"}}async saveTokens(e){this.ensureDir();let r=Xu(this.tokensPath)??{};r[this.serverUrl]={accessToken:e.accessToken,refreshToken:e.refreshToken,expiresAt:e.expiresAt,tokenType:e.tokenType||"Bearer",obtainedAt:Date.now(),obtainedFrom:"local"},JI(this.tokensPath,r)}async invalidateCredentials(e){(e==="tokens"||e==="all")&&this.removeTokenEntry(),(e==="client"||e==="all")&&this.updateServerEntry(r=>{let{oauthMetadata:n,...i}=r;return{...i,discoveryFailed:!1,discoveryError:void 0}}),(e==="discovery"||e==="all")&&this.updateServerEntry(r=>({...r,discoveryFailed:!1,discoveryError:void 0})),(e==="verifier"||e==="all")&&this.pkceStates.clear()}async saveOAuthState(e){this.pkceStates.set(e.state,e)}async consumeOAuthState(e){let r=this.pkceStates.get(e);if(r&&(this.pkceStates.delete(e),!(r.expiresAt<Date.now())))return r}ensureDir(){(0,Ia.existsSync)(this.dir)||(0,Ia.mkdirSync)(this.dir,{recursive:!0,mode:448})}removeTokenEntry(){let e=Xu(this.tokensPath);!e||!(this.serverUrl in e)||(delete e[this.serverUrl],this.ensureDir(),JI(this.tokensPath,e))}updateServerEntry(e){let r=Xu(this.serversPath)??{},n=r[this.serverUrl]??{},i=e(n);T$e(i)?r[this.serverUrl]=i:delete r[this.serverUrl],this.ensureDir(),JI(this.serversPath,r)}}});function N$e(){try{return L_.default.statSync("/.dockerenv"),!0}catch{return!1}}function M$e(){try{return L_.default.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function __(){return P_===void 0&&(P_=N$e()||M$e()),P_}var L_,P_,$se=L(()=>{h();L_=z(require("node:fs"),1)});function $g(){return U_===void 0&&(U_=P$e()||__()),U_}var Vse,U_,P$e,G_=L(()=>{h();Vse=z(require("node:fs"),1);$se();P$e=()=>{try{return Vse.default.statSync("/run/.containerenv"),!0}catch{return!1}}});var O_,zse,k0,Wse,Zu,K_=L(()=>{h();O_=z(require("node:process"),1),zse=z(require("node:os"),1),k0=z(require("node:fs"),1);G_();Wse=()=>{if(O_.default.platform!=="linux")return!1;if(zse.default.release().toLowerCase().includes("microsoft"))return!$g();try{if(k0.default.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!$g()}catch{}return k0.default.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")||k0.default.existsSync("/run/WSL")?!$g():!1},Zu=O_.default.env.__IS_WSL_TEST__?Wse:Wse()});var H_,jI,L$e,_$e,J_,Xse=L(()=>{h();H_=z(require("node:process"),1),jI=z(require("node:fs/promises"),1);K_();K_();L$e=(()=>{let t="/mnt/",e;return async function(){if(e)return e;let r="/etc/wsl.conf",n=!1;try{await jI.default.access(r,jI.constants.F_OK),n=!0}catch{}if(!n)return t;let i=await jI.default.readFile(r,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):t}})(),_$e=async()=>`${await L$e()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,J_=async()=>Zu?_$e():`${H_.default.env.SYSTEMROOT||H_.default.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`});function el(t,e,r){let n=i=>Object.defineProperty(t,e,{value:i,enumerable:!0,writable:!0});return Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get(){let i=r();return n(i),i},set(i){n(i)}}),t}var Zse=L(()=>{h()});async function j_(){if(toe.default.platform!=="darwin")throw new Error("macOS only");let{stdout:t}=await U$e("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]),r=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(t)?.groups.id??"com.apple.Safari";return r==="com.apple.safari"?"com.apple.Safari":r}var eoe,toe,roe,U$e,noe=L(()=>{h();eoe=require("node:util"),toe=z(require("node:process"),1),roe=require("node:child_process"),U$e=(0,eoe.promisify)(roe.execFile)});async function ooe(t,{humanReadableOutput:e=!0,signal:r}={}){if(ioe.default.platform!=="darwin")throw new Error("macOS only");let n=e?[]:["-ss"],i={};r&&(i.signal=r);let{stdout:s}=await G$e("osascript",["-e",t,n],i);return s.trim()}var ioe,soe,Y_,G$e,aoe=L(()=>{h();ioe=z(require("node:process"),1),soe=require("node:util"),Y_=require("node:child_process"),G$e=(0,soe.promisify)(Y_.execFile)});async function q_(t){return ooe(`tell application "Finder" to set app_path to application file id "${t}" as string
1523
1523
  tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}var Aoe=L(()=>{h();aoe()});async function V_(t=O$e){let{stdout:e}=await t("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),r=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(e);if(!r)throw new $_(`Cannot find Windows browser in stdout: ${JSON.stringify(e)}`);let{id:n}=r.groups,i=n.lastIndexOf("."),s=n.lastIndexOf("-"),o=i===-1?void 0:n.slice(0,i),a=s===-1?void 0:n.slice(0,s);return R0[n]??R0[o]??R0[a]??{name:n,id:n}}var coe,uoe,O$e,R0,kYt,$_,loe=L(()=>{h();coe=require("node:util"),uoe=require("node:child_process"),O$e=(0,coe.promisify)(uoe.execFile),R0={MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},MSEdgeBHTML:{name:"Edge Beta",id:"com.microsoft.edge.beta"},MSEdgeDHTML:{name:"Edge Dev",id:"com.microsoft.edge.dev"},AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},ChromeBHTML:{name:"Chrome Beta",id:"com.google.chrome.beta"},ChromeDHTML:{name:"Chrome Dev",id:"com.google.chrome.dev"},ChromiumHTM:{name:"Chromium",id:"org.chromium.Chromium"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveDHTML:{name:"Brave Dev",id:"com.brave.Browser.dev"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},OperaStable:{name:"Opera",id:"com.operasoftware.Opera"},VivaldiHTM:{name:"Vivaldi",id:"com.vivaldi.Vivaldi"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"}},kYt=new Map(Object.entries(R0)),$_=class extends Error{}});async function W_(){if(T0.default.platform==="darwin"){let t=await j_();return{name:await q_(t),id:t}}if(T0.default.platform==="linux"){let{stdout:t}=await K$e("xdg-mime",["query","default","x-scheme-handler/http"]),e=t.trim();return{name:H$e(e.replace(/.desktop$/,"").replace("-"," ")),id:e}}if(T0.default.platform==="win32")return V_();throw new Error("Only macOS, Linux, and Windows are supported")}var goe,T0,poe,K$e,H$e,doe=L(()=>{h();goe=require("node:util"),T0=z(require("node:process"),1),poe=require("node:child_process");noe();Aoe();loe();K$e=(0,goe.promisify)(poe.execFile),H$e=t=>t.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,e=>e.toUpperCase())});async function j$e(){let t=await J_(),e=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,r=Z_.Buffer.from(e,"utf16le").toString("base64"),{stdout:n}=await J$e(t,["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand",r],{encoding:"utf8"}),i=n.trim(),s={ChromeHTML:"com.google.chrome",BraveHTML:"com.brave.Browser",MSEdgeHTM:"com.microsoft.edge",FirefoxURL:"org.mozilla.firefox"};return s[i]?{id:s[i]}:{}}function Coe(t){if(typeof t=="string"||Array.isArray(t))return t;let{[hoe]:e}=t;if(!e)throw new Error(`${hoe} is not supported`);return e}function P0({[Sf]:t},{wsl:e}){if(e&&Zu)return Coe(e);if(!t)throw new Error(`${Sf} is not supported`);return Coe(t)}var X_,Z_,eU,Ioe,Eoe,tU,M0,J$e,z_,foe,Sf,hoe,moe,N0,Y$e,Vg,L0,rU=L(()=>{h();X_=z(require("node:process"),1),Z_=require("node:buffer"),eU=z(require("node:path"),1),Ioe=require("node:url"),Eoe=require("node:util"),tU=z(require("node:child_process"),1),M0=z(require("node:fs/promises"),1);Xse();Zse();doe();G_();J$e=(0,Eoe.promisify)(tU.default.execFile),z_=eU.default.dirname((0,Ioe.fileURLToPath)("file:///C:/bundled/open/index.js")),foe=eU.default.join(z_,"xdg-open"),{platform:Sf,arch:hoe}=X_.default;moe=async(t,e)=>{let r;for(let n of t)try{return await e(n)}catch(i){r=i}throw r},N0=async t=>{if(t={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...t},Array.isArray(t.app))return moe(t.app,a=>N0({...t,app:a}));let{name:e,arguments:r=[]}=t.app??{};if(r=[...r],Array.isArray(e))return moe(e,a=>N0({...t,app:{name:a,arguments:r}}));if(e==="browser"||e==="browserPrivate"){let a={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","com.brave.Browser":"brave","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","com.microsoft.edgemac":"edge","microsoft-edge.desktop":"edge"},A={chrome:"--incognito",brave:"--incognito",firefox:"--private-window",edge:"--inPrivate"},c=Zu?await j$e():await W_();if(c.id in a){let u=a[c.id];return e==="browserPrivate"&&r.push(A[u]),N0({...t,app:{name:Vg[u],arguments:r}})}throw new Error(`${c.name} is not supported as a default browser`)}let n,i=[],s={};if(Sf==="darwin")n="open",t.wait&&i.push("--wait-apps"),t.background&&i.push("--background"),t.newInstance&&i.push("--new"),e&&i.push("-a",e);else if(Sf==="win32"||Zu&&!$g()&&!e){n=await J_(),i.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),Zu||(s.windowsVerbatimArguments=!0);let a=["Start"];t.wait&&a.push("-Wait"),e?(a.push(`"\`"${e}\`""`),t.target&&r.push(t.target)):t.target&&a.push(`"${t.target}"`),r.length>0&&(r=r.map(A=>`"\`"${A}\`""`),a.push("-ArgumentList",r.join(","))),t.target=Z_.Buffer.from(a.join(" "),"utf16le").toString("base64")}else{if(e)n=e;else{let a=!z_||z_==="/",A=!1;try{await M0.default.access(foe,M0.constants.X_OK),A=!0}catch{}n=X_.default.versions.electron??(Sf==="android"||a||!A)?"xdg-open":foe}r.length>0&&i.push(...r),t.wait||(s.stdio="ignore",s.detached=!0)}Sf==="darwin"&&r.length>0&&i.push("--args",...r),t.target&&i.push(t.target);let o=tU.default.spawn(n,i,s);return t.wait?new Promise((a,A)=>{o.once("error",A),o.once("close",c=>{if(!t.allowNonzeroExitCode&&c>0){A(new Error(`Exited with code ${c}`));return}a(o)})}):(o.unref(),o)},Y$e=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a `target`");return N0({...e,target:t})};Vg={};el(Vg,"chrome",()=>P0({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));el(Vg,"brave",()=>P0({darwin:"brave browser",win32:"brave",linux:["brave-browser","brave"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",x64:["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe","/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]}}));el(Vg,"firefox",()=>P0({darwin:"firefox",win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));el(Vg,"edge",()=>P0({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));el(Vg,"browser",()=>"browser");el(Vg,"browserPrivate",()=>"browserPrivate");L0=Y$e});async function $$e(t){await L0(t)}function V$e(t){process.stderr.write(t)}function nU(t,e,r){t.writeHead(e,{"Content-Type":"text/plain; charset=utf-8"}),t.end(r)}function iU(t,e,r){t.writeHead(e,{"Content-Type":"text/html; charset=utf-8"}),t.end(r)}function W$e(){return`<!doctype html>
1524
1524
  <html lang="en">
1525
1525
  <head>
@@ -2362,7 +2362,7 @@ ${l}`):r.push(l))}catch(a){this.#e.Sentry?.captureException(a,{tags:{operation:"
2362
2362
  `).map(i=>i.split(" ")[1]).filter(i=>i&&!i.includes("HEAD"));if(n.length>0)return`origin/${n[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,folderName:i}){let s=this.#_e(i);try{if(!(await this.git(["branch","--show-current"],{cwd:s})).trim())throw new Error("Could not determine current branch");let a=await this.#at(s),A;try{A=(await this.git(["merge-base",a,"HEAD"],{cwd:s})).trim()}catch(l){throw l instanceof Ko&&l.code===128?new Pp(a,{cause:l}):l}let c=["--no-pager","diff",A];r?c.push("--raw","--numstat","--no-renames"):e!==void 0&&c.push(`-U${e}`),c.push("--"),n&&n.length>0&&c.push(...n);let u=await this.git(c,{cwd:s});return!u||u.trim()===""?[]:CH(u,r)}catch(o){throw o instanceof Pp||this.#t.error("getDiffFromParentBranch error:",o),o}}},NH=(t,e)=>e.filter(r=>!t?.disabledTools?.includes(r))});async function Rl(t){try{await L0(t)}catch{console.log(`
2363
2363
  Could not open browser automatically.`),console.log(`Please open this URL manually:
2364
2364
  ${t}
2365
- `)}}var LB=L(()=>{"use strict";h();rU()});async function Cx(t,e,r){let n=t.isAbsolute(e)?e:t.resolve(t.cwd(),e),i=await t.readFile(n);if(!i)throw new Error(`Failed to read ${r} file: ${n}`);return $.info(`\u{1F4C4} Loaded ${r} from file: ${n}`),i}async function Cht(t,e,r){let n=r.httpsServerFiles?.key,i=r.httpsServerFiles?.cert,s=r.httpsServerFiles?.ca,o={...r.httpsServerOptions,key:n?await Cx(t,n,"key"):r.httpsServerOptions?.key,cert:i?await Cx(t,i,"cert"):r.httpsServerOptions?.cert,ca:s?await Cx(t,s,"ca"):r.httpsServerOptions?.ca},a=Object.fromEntries(Object.entries(o).filter(([A,c])=>c!==void 0));if(Object.keys(a).length!==0)return a}async function Tl(t,e){let r=t.cwd(),n=!!e.local||!e.projectId,i={workingDirectory:r,projectId:e.projectId,branchName:e.branchName,commitMode:"commits",mode:"init-and-launch",isLocal:n,allowedCommands:["npm *","pnpm *","yarn *","yarn","bun *","bun","gh *","wc *","gradle *","gradle","rg *","./gradlew *","./gradlew","expo *","expo","adb *","adb","vp *","vp","git *","export *","rails *","gem *","bundle *","rake *","echo *","cd *","find *","ls *","rm *","cp *","mv *","pwd","curl *","npx tsc *","head *","lsof *","kill *","ps *","tr *","awk *","cat *","grep *","sed *","tail *","touch *","mkdir *","tee *","true","uniq *","test *","false","npx *","sort *","env","dirname","basename *","realpath *","readlink *","stat *","file *","diff *","xargs *","chmod *","which *","whoami","uname *","uname","date","date *","printenv *","sleep *","netlify *","node *","tsx *","builderio *","builder *","open *","xcrun *","xcodebuild *","xcode-select *","xed *","agvtool *"]};if(e.configJson)try{let d=JSON.parse(e.configJson);i=Object.assign({},i,d),i.isLocal?n=!0:i.projectId&&(n=!1,i.isLocal=!1)}catch(d){t.Sentry?.captureException(d)}else{let d=await tQe(t,e);if(d&&await t.exists(d))try{let g=await t.readFile(d);if(g){let p=JSON.parse(g);i=Object.assign({},i,p)}}catch(g){t.Sentry?.captureException(g)}}i.command&&(i.devCommand||(i.devCommand=i.command),delete i.command);let s=e.c||e.command,o=e.p||e.port,a=e.installCommand,A=e.serverUrl,c=e.interactive&&!e.configJson&&!e.fusionInit&&n&&!e.chat;if(A)c=!1,i.serverUrl=A,s||(i.devCommand="");else if(s&&o){c=!1;let d="http://localhost";if(i.serverUrl)try{let g=new URL(i.serverUrl);d=`${g.protocol}//${g.hostname}`}catch{d="http://localhost"}i.serverUrl=`${d}:${o}`,i.devCommand=s}else s&&i.autoDetectDevServer&&(c=!1,i.devCommand=s);s&&o&&(c=!1),o&&!A&&(i.serverUrl=`http://localhost:${o}`),a&&(i.setupCommand=a),s&&(i.devCommand=s),s&&!i.serverUrl&&(i.autoDetectDevServer=!0,i.autoSuggestPort=!0),typeof e.authenticateProxy=="boolean"&&(i.authenticateProxy=e.authenticateProxy),typeof e.privacyMode=="boolean"&&e.privacyMode&&(i.privacyMode=Object.assign({},i.privacyMode,{enabled:!0})),typeof e.autoDetectDevServer=="boolean"&&(i.autoDetectDevServer=e.autoDetectDevServer);let u=e.runInPty??e["run-in-pty"];if(typeof u=="boolean"&&(i.runInPty=u),typeof e.https=="boolean"&&(i.https=e.https),e.localHttpsDomain&&(i.localHttpsDomain=e.localHttpsDomain),typeof e.nativeApp=="boolean"&&(i.nativeApp=e.nativeApp),e.disabledTools){let d=e.disabledTools.split(",").map(g=>g.trim());i.disabledTools=d}if(i.httpsServerOptions=await Cht(t,e,i),c&&!e.chat){if(!i.devCommand){let d=await lr({message:"Enter the command to run for the dev server (e.g. 'npm run dev')",placeholder:"npm run dev",validate:g=>{if(g.trim()===""||g.length===0)return"Command cannot be empty"}});if(qe(d))return Je("Goodbye! \u{1F44B}"),await(0,qH.exit)(1);i.devCommand=d}if(!i.serverUrl){let d=await lr({message:"Enter the dev server URL to proxy to (e.g. http://localhost:3000)",placeholder:"http://localhost:3000",validate:p=>{let f=p.trim();if(!f)return"Dev server URL cannot be empty";if(/^\d+$/.test(f)){let m=Number(f);return m<0||m>65535?"Invalid port number, must be between 0 and 65535":void 0}try{new URL(f)}catch{return"Enter a valid URL or port number"}}});if(qe(d))return Je("Goodbye! \u{1F44B}"),await(0,qH.exit)(1);let g=d.trim();/^\d+$/.test(g)?i.serverUrl=`http://localhost:${g}`:i.serverUrl=new URL(g).href}await $H(t,i,e)}if(e.sessionId&&(i.sessionId=e.sessionId),typeof i.fusionServerPort=="string"){let d=parseInt(i.fusionServerPort);if(!isNaN(d))i.fusionServerPort=d;else throw new Error(`Invalid fusionServerPort: ${i.fusionServerPort}. Expected a number between 0 and 65535, got "${i.fusionServerPort}".`)}let l=i.privacyMode?.encryptionKeyPath;if(l&&i.privacyMode)try{let g=(await Cx(t,l,"encryption key")).trim();i.privacyMode.encryptKey=g,delete i.privacyMode.encryptionKeyPath}catch(d){let g=new Error(`Failed to load encryption key from path: ${l}`,{cause:d});throw t.Sentry?.captureException(g),$.warn(g.message),g}return i}async function $H(t,e,r){let n=await tQe(t,r);await t.writeFile(n,JSON.stringify(Iht(e,"workingDirectory","projectId","authenticateProxy","privacyMode"),null,2))}function rQe(t,e){let r=av(e);t.Sentry?.setTag("isLocal",r.isLocal),t.Sentry?.setTag("commitMode",r.commitMode),t.Sentry?.setTag("pvcCreationSource",r.pvcCreationSource??"unknown"),t.Sentry?.setTag("snapshot",r.syncBranch?"true":"false");let n=r.workspace?.folders.find(i=>i.enableGit)?.originalRepoUrl;if(n){let i=fI.some(s=>n.endsWith(s))?n:"custom-repo";t.Sentry?.setTag("repoUrl",i)}t.Sentry?.setContext("fusionConfig",{...r}),t.Sentry?.getCurrentScope().setContext("fusionConfig",{...r})}var qH,tQe,Iht,_B=L(()=>{"use strict";h();js();rr();qH=require("process");lp();tQe=async(t,e)=>{if(e.configPath){let A=t.resolve(t.cwd(),e.configPath);if(await t.exists(A))return A;throw new Error(`Fusion config file not found: ${A}`)}let r=["builder.config.json","fusion.config.json"],n=t.cwd(),i=t.join(n,r[0]),s=t.join(n,r[1]),o=await t.exists(i),a=await t.exists(s);if(o&&a)throw new Error(`Both builder.config.json and fusion.config.json were found in your project.
2365
+ `)}}var LB=L(()=>{"use strict";h();rU()});async function Cx(t,e,r){let n=t.isAbsolute(e)?e:t.resolve(t.cwd(),e),i=await t.readFile(n);if(!i)throw new Error(`Failed to read ${r} file: ${n}`);return $.info(`\u{1F4C4} Loaded ${r} from file: ${n}`),i}async function Cht(t,e,r){let n=r.httpsServerFiles?.key,i=r.httpsServerFiles?.cert,s=r.httpsServerFiles?.ca,o={...r.httpsServerOptions,key:n?await Cx(t,n,"key"):r.httpsServerOptions?.key,cert:i?await Cx(t,i,"cert"):r.httpsServerOptions?.cert,ca:s?await Cx(t,s,"ca"):r.httpsServerOptions?.ca},a=Object.fromEntries(Object.entries(o).filter(([A,c])=>c!==void 0));if(Object.keys(a).length!==0)return a}async function Tl(t,e){let r=t.cwd(),n=!!e.local||!e.projectId,i={workingDirectory:r,projectId:e.projectId,branchName:e.branchName,commitMode:"commits",mode:"init-and-launch",isLocal:n,allowedCommands:["npm *","pnpm *","yarn *","yarn","bun *","bun","gh *","wc *","gradle *","gradle","rg *","./gradlew *","./gradlew","expo *","expo","adb *","adb","vp *","vp","git *","export *","rails *","gem *","bundle *","rake *","echo *","cd *","find *","ls *","rm *","cp *","mv *","pwd","curl *","npx tsc *","head *","lsof *","kill *","ps *","tr *","awk *","cat *","grep *","sed *","tail *","touch *","mkdir *","tee *","true","uniq *","test *","false","npx *","sort *","env","dirname","basename *","realpath *","readlink *","stat *","file *","diff *","xargs *","chmod *","which *","whoami","uname *","uname","date","date *","printenv *","sleep *","netlify *","node *","tsx *","builderio *","builder *","open *","xcrun *","xcodebuild *","xcode-select *","xed *","agvtool *","terraform *","gcloud *"]};if(e.configJson)try{let d=JSON.parse(e.configJson);i=Object.assign({},i,d),i.isLocal?n=!0:i.projectId&&(n=!1,i.isLocal=!1)}catch(d){t.Sentry?.captureException(d)}else{let d=await tQe(t,e);if(d&&await t.exists(d))try{let g=await t.readFile(d);if(g){let p=JSON.parse(g);i=Object.assign({},i,p)}}catch(g){t.Sentry?.captureException(g)}}i.command&&(i.devCommand||(i.devCommand=i.command),delete i.command);let s=e.c||e.command,o=e.p||e.port,a=e.installCommand,A=e.serverUrl,c=e.interactive&&!e.configJson&&!e.fusionInit&&n&&!e.chat;if(A)c=!1,i.serverUrl=A,s||(i.devCommand="");else if(s&&o){c=!1;let d="http://localhost";if(i.serverUrl)try{let g=new URL(i.serverUrl);d=`${g.protocol}//${g.hostname}`}catch{d="http://localhost"}i.serverUrl=`${d}:${o}`,i.devCommand=s}else s&&i.autoDetectDevServer&&(c=!1,i.devCommand=s);s&&o&&(c=!1),o&&!A&&(i.serverUrl=`http://localhost:${o}`),a&&(i.setupCommand=a),s&&(i.devCommand=s),s&&!i.serverUrl&&(i.autoDetectDevServer=!0,i.autoSuggestPort=!0),typeof e.authenticateProxy=="boolean"&&(i.authenticateProxy=e.authenticateProxy),typeof e.privacyMode=="boolean"&&e.privacyMode&&(i.privacyMode=Object.assign({},i.privacyMode,{enabled:!0})),typeof e.autoDetectDevServer=="boolean"&&(i.autoDetectDevServer=e.autoDetectDevServer);let u=e.runInPty??e["run-in-pty"];if(typeof u=="boolean"&&(i.runInPty=u),typeof e.https=="boolean"&&(i.https=e.https),e.localHttpsDomain&&(i.localHttpsDomain=e.localHttpsDomain),typeof e.nativeApp=="boolean"&&(i.nativeApp=e.nativeApp),e.disabledTools){let d=e.disabledTools.split(",").map(g=>g.trim());i.disabledTools=d}if(i.httpsServerOptions=await Cht(t,e,i),c&&!e.chat){if(!i.devCommand){let d=await lr({message:"Enter the command to run for the dev server (e.g. 'npm run dev')",placeholder:"npm run dev",validate:g=>{if(g.trim()===""||g.length===0)return"Command cannot be empty"}});if(qe(d))return Je("Goodbye! \u{1F44B}"),await(0,qH.exit)(1);i.devCommand=d}if(!i.serverUrl){let d=await lr({message:"Enter the dev server URL to proxy to (e.g. http://localhost:3000)",placeholder:"http://localhost:3000",validate:p=>{let f=p.trim();if(!f)return"Dev server URL cannot be empty";if(/^\d+$/.test(f)){let m=Number(f);return m<0||m>65535?"Invalid port number, must be between 0 and 65535":void 0}try{new URL(f)}catch{return"Enter a valid URL or port number"}}});if(qe(d))return Je("Goodbye! \u{1F44B}"),await(0,qH.exit)(1);let g=d.trim();/^\d+$/.test(g)?i.serverUrl=`http://localhost:${g}`:i.serverUrl=new URL(g).href}await $H(t,i,e)}if(e.sessionId&&(i.sessionId=e.sessionId),typeof i.fusionServerPort=="string"){let d=parseInt(i.fusionServerPort);if(!isNaN(d))i.fusionServerPort=d;else throw new Error(`Invalid fusionServerPort: ${i.fusionServerPort}. Expected a number between 0 and 65535, got "${i.fusionServerPort}".`)}let l=i.privacyMode?.encryptionKeyPath;if(l&&i.privacyMode)try{let g=(await Cx(t,l,"encryption key")).trim();i.privacyMode.encryptKey=g,delete i.privacyMode.encryptionKeyPath}catch(d){let g=new Error(`Failed to load encryption key from path: ${l}`,{cause:d});throw t.Sentry?.captureException(g),$.warn(g.message),g}return i}async function $H(t,e,r){let n=await tQe(t,r);await t.writeFile(n,JSON.stringify(Iht(e,"workingDirectory","projectId","authenticateProxy","privacyMode"),null,2))}function rQe(t,e){let r=av(e);t.Sentry?.setTag("isLocal",r.isLocal),t.Sentry?.setTag("commitMode",r.commitMode),t.Sentry?.setTag("pvcCreationSource",r.pvcCreationSource??"unknown"),t.Sentry?.setTag("snapshot",r.syncBranch?"true":"false");let n=r.workspace?.folders.find(i=>i.enableGit)?.originalRepoUrl;if(n){let i=fI.some(s=>n.endsWith(s))?n:"custom-repo";t.Sentry?.setTag("repoUrl",i)}t.Sentry?.setContext("fusionConfig",{...r}),t.Sentry?.getCurrentScope().setContext("fusionConfig",{...r})}var qH,tQe,Iht,_B=L(()=>{"use strict";h();js();rr();qH=require("process");lp();tQe=async(t,e)=>{if(e.configPath){let A=t.resolve(t.cwd(),e.configPath);if(await t.exists(A))return A;throw new Error(`Fusion config file not found: ${A}`)}let r=["builder.config.json","fusion.config.json"],n=t.cwd(),i=t.join(n,r[0]),s=t.join(n,r[1]),o=await t.exists(i),a=await t.exists(s);if(o&&a)throw new Error(`Both builder.config.json and fusion.config.json were found in your project.
2366
2366
  Please use only builder.config.json and remove fusion.config.json.
2367
2367
  You can migrate any settings from fusion.config.json to builder.config.json before removing it.`);for(let A of r){let c=t.join(n,A);if(await t.exists(c))return c}return t.join(n,r[0])},Iht=(t,...e)=>{let r={};if(t&&typeof t=="object")for(let n in t)(!t.hasOwnProperty||t.hasOwnProperty(n))&&(e.includes(n)||(r[n]=t[n]));return r}});function Bht(t){let e=[".npm",".local",".cache"];try{let r=`/${t}`,n=`/${t}-backup`;if(ti.existsSync(n)){let i=ti.readdirSync(n);for(let s of i)if(!e.includes(s)){let o=yi.join(r,s);if(!ti.existsSync(o))try{ti.cpSync(yi.join(n,s),o,{recursive:!0,force:!0})}catch(a){WH.error(`Failed to restore ${s} for ${t}: ${a}`)}}}}catch(r){WH.error(`Failed to restore ${t} backup: ${r}`)}}var ti,ri,yi,VH,iQe,Ix,WH,Eht,nQe,tm,zH=L(()=>{"use strict";h();ti=z(require("node:fs"),1),ri=z(require("fs/promises"),1),yi=z(require("node:path"),1);ha();Ec();js();VH=z(require("dns/promises"),1);It();iQe=z(require("net"),1),Ix=require("undici");Yv();ko();lp();ko();WH=ve("Init"),Eht=t=>!!(t.name&&t.path),nQe=t=>!!(t.name&&t.path&&t.repoName&&t.repoUrl),tm=class{logIdCounter=0;initStatusLogs=[];sys;config;debug=!0;#r=WH;initState={isRunning:!1,isComplete:!1,success:!1,currentStep:"initial",error:void 0,repos:[]};constructor(e){this.sys=e.sys,this.config=e,this.debug=e.debug??!0}async checkout(e,r,n){let i=r?["checkout","-B",e,r]:["checkout","-B",e];await this.git(i,n)}async execAsync(e,r,n,i){return Xs(e,r,{cwd:n,sys:this.sys,retry:i})}async git(e,r,n,i,s){return Xs("git",e,{cwd:r,sys:this.sys,retry:n,skipLogging:s,timeout:i??(e[0].includes("clone")?600*1e3:60*1e3)})}async performBackup({sys:e,credentials:r,fusionConfig:n,volumePath:i,repositories:s,isConnectedToProvider:o,forcedFullBackup:a}){try{this.#r.info("Performing backup operation");let A=s.filter(p=>p.enableGit);if(A.length===0)throw new Error("No repository with git enabled found for backup");if(!n.branchName)throw new Error("Backup mode: No branch name found");if(!n.projectId)throw new Error("Backup mode: No project ID found");let c=[];for(let p of A){let f=yi.join(i,p.path);if(!ti.existsSync(f))throw new Error(`Backup mode: Repository directory does not exist at ${f}`);if(!ti.existsSync(yi.join(f,".git")))throw new Error(`Backup mode: Git repository not initialized at ${f}`);let{featureBranch:m,currentBranch:C}=await cv({sys:e,gitWorkingDirectory:f,strict:!a});c.push({repo:p,repoPath:f,featureBranch:m,currentBranch:C})}let u={};for(let{repo:p,repoPath:f}of c)try{let m=await Xs("git",["rev-parse","HEAD"],{cwd:f,sys:e,skipLogging:!0});m.trim()&&(u[p.name||p.path]=m.trim())}catch{}await jv(e,r,{commits:u,projectId:n.projectId,branchName:n.branchName},this.debug);let l=performance.now(),d=[];for(let{repo:p,repoPath:f,featureBranch:m,currentBranch:C}of c){this.#r.info(`Creating backup for AI branch: ${C} (${p.name||p.path})`);let I=await Hv({sys:e,credentials:r,projectId:n.projectId,branchName:n.branchName,repoPath:f,aiBranch:C,featureBranch:m,workspace:n.workspace,isConnectedToProvider:o,forcedFullBackup:a,debug:!0,canAbortMerge:!1,folderName:p.name||p.path,repoUrl:p.originalRepoUrl??p.repoUrl});if(!I.success)throw new Error(`Backup upload failed for ${p.name||p.path}: ${I.reason||"Unknown error"}`);this.#r.info(`Backup uploaded successfully for ${p.name||p.path}`),d.push(I.backupEntry)}let g=performance.now()-l;await Jv(r,d,g,this.debug)}catch(A){let c=new Error("Failed to perform git backup",{cause:A});throw this.config.sys.Sentry?.captureException(c,{tags:{launchMode:this.config.fusionConfig.mode,forcedFullBackup:a,isConnectedToProvider:o}}),c}}async performRegularBackup(e){await this.performBackup({...e,isConnectedToProvider:!0,forcedFullBackup:!1})}async performOfflineBackup(e){await this.performBackup({...e,isConnectedToProvider:!1,forcedFullBackup:!1})}async performForcedFullBackup(e){await this.performBackup({...e,isConnectedToProvider:!1,forcedFullBackup:!0})}async init(){let e=this.config;this.clearInitLogs(),this.initState.isRunning=!0,this.initState.isComplete=!1;let r=e.fusionConfig.workspace?.folders?.filter(Eht)??[];this.addInitLog("log",`Starting initialization with ${r.length} repositories`,{step:"init"});try{if(!r.length){let i="At least one repository must be configured";throw new Error(i)}if(!e.sys){let i="DevToolsSys is required in config";throw this.addInitLog("error",i,{step:"validation",error:i}),new Error(i)}let n=wE(e.fusionConfig);switch(e.fusionConfig.mode){case"backup":{try{await this.performRegularBackup({sys:e.sys,credentials:e.credentials,fusionConfig:e.fusionConfig,volumePath:n,repositories:r})}catch(i){this.#r.info(`Online backup failed: ${i}. Attempting offline backup...`),await this.performOfflineBackup({sys:e.sys,credentials:e.credentials,fusionConfig:e.fusionConfig,volumePath:n,repositories:r})}break}case"backup-force-full":{try{await this.performRegularBackup({sys:e.sys,credentials:e.credentials,fusionConfig:e.fusionConfig,volumePath:n,repositories:r})}catch(i){this.#r.info(`Online backup failed: ${i}. Attempting offline backup...`);try{await this.performOfflineBackup({sys:e.sys,credentials:e.credentials,fusionConfig:e.fusionConfig,volumePath:n,repositories:r})}catch(s){this.#r.info(`Offline backup failed: ${s}. Attempting forced full offline backup...`),await this.performForcedFullBackup({sys:e.sys,credentials:e.credentials,fusionConfig:e.fusionConfig,volumePath:n,repositories:r})}}break}case"init-and-launch":{await this.step1CheckDirectories(n,r),this.addInitLog("log","Directories checked",{step:"check-directories"}),await this.step2ConfigureGitRepositories(n,r),this.addInitLog("log","Git repositories configured",{step:"configure-git-repos"}),await this.step3ConfigureGitUser(n,r),this.addInitLog("log","Git user configured",{step:"configure-git-user"}),await this.step4CollectRepoInfo(e,n,r),this.addInitLog("log","Repo info collected",{step:"collect-repo-info"});break}default:throw new Error(`Invalid mode: ${e.fusionConfig.mode}`)}return this.addInitLog("complete","Initialization completed successfully",{step:"init-success",success:!0}),!0}catch(n){let i=n instanceof Error?n.message:String(n),s=this.initStatusLogs.some(o=>o.type==="error"&&o.step&&o.step!=="init-failed");return this.addInitLog("complete",`Initialization failed with error: ${i}`,{step:s?void 0:"init-failed",success:!1,error:i}),e.sys.Sentry?.captureException(n,{tags:{operation:"init",...e.sentryTags}}),!1}}addInitLog(e,r,n){let i={id:++this.logIdCounter,timestamp:new Date().toISOString(),type:e,message:r,step:n?.step,error:n?.error,success:n?.success};this.#r.debug(`${i.type} ${i.message}`),this.initStatusLogs.push(i),this.initStatusLogs.length>1e3&&this.initStatusLogs.splice(0,this.initStatusLogs.length-1e3),n?.step&&(this.initState.currentStep=n.step),e==="complete"&&(this.initState.isComplete=!0,this.initState.isRunning=!1,this.initState.success=n?.success??!1,this.initState.error=n?.error??this.initState.error,n?.gitDiagnostics&&(this.initState.gitDiagnostics=n.gitDiagnostics)),e==="error"&&n?.error&&(this.initState.error=n.error,n?.gitDiagnostics&&(this.initState.gitDiagnostics=n.gitDiagnostics))}clearInitLogs(){this.initStatusLogs.length=0,this.logIdCounter=0,this.initState.isRunning=!1,this.initState.isComplete=!1,this.initState.success=!1,this.initState.currentStep="initial",this.initState.error=void 0,this.initState.gitDiagnostics=void 0}async hasFilesButNoGit(e){if(ti.existsSync(e))try{let n=(await ri.readdir(e)).length>0,i=ti.existsSync(yi.join(e,".git"));return n&&!i}catch{return!1}return!1}async step1CheckDirectories(e,r){this.addInitLog("log","Checking directories",{step:"check-directories"}),ti.existsSync(e)||await ri.mkdir(e,{recursive:!0}),e.startsWith("/root")&&Bht("root"),this.addInitLog("log",`Volume directory exists: ${e}`,{step:"check-directories"});for(let n of r){let i=yi.join(e,n.path);if(ti.existsSync(i))this.addInitLog("log",`Directory already exists: ${i}`,{step:"check-directories"});else{this.addInitLog("log",`Creating directory: ${i}`,{step:"create-directories"});try{await ri.mkdir(i,{recursive:!0})}catch(s){let o=`Failed to create directory for ${n.repoName} at ${i}: ${s}`;throw this.addInitLog("error",o,{step:"create-directories",error:o}),new Error(o,{cause:s})}}}}async step2ConfigureGitRepositories(e,r){this.addInitLog("log","Configuring git repositories",{step:"configure-git-repos"});let n=yi.join(e,"temp-cloning"),i=async()=>{ti.existsSync(n)&&(this.addInitLog("log",`Removing temp cloning directory: ${n}`,{step:"configure-git-repos"}),await ri.rm(n,{recursive:!0,force:!0}))};await i(),this.addInitLog("log",`Creating temp cloning path: ${n}`,{step:"configure-git-repos"}),await ri.mkdir(n,{recursive:!0});let s=await this.fetchGitConfigsOnce(),o=r.find(a=>a.enableGit);try{for(let a of r){let A=yi.join(e,a.path),c=a===o;this.addInitLog("log",`Processing repository: ${a.repoName}`,{step:"configure-git-repos"});let u=await this.isGitConfigured(A),l=!u;if(this.config.fusionConfig.rebuildGit&&u&&(this.addInitLog("log",`rebuildGit flag set, removing existing repo for ${a.repoName} to re-clone`,{step:"check-existing-git"}),await ri.rm(A,{recursive:!0,force:!0}),l=!0),u&&!l){if(a.enableGit&&s){let d=r.filter(g=>g.enableGit).length;this.applyGitConfig(a,s,c,d)}await this.cleanupLockFiles(A);try{a.enableGit?(this.addInitLog("log",`Git already configured for ${a.repoName}, validating repo`,{step:"check-existing-git"}),await this.validateGitRepo(A)):this.addInitLog("log",`Git already configured for ${a.repoName}, skipping validation because it's not main repo`,{step:"check-existing-git"})}catch(d){let g=`Git repo is in bad state for ${a.repoName}, will re-clone: ${d}`;this.config.sys.Sentry?.captureMessage(g,{level:"warning",tags:{operation:"init",...this.config.sentryTags},extra:{repoName:a.repoName,repoPath:A}}),this.addInitLog("error",g,{step:"check-existing-git",error:g})}if(!l){if(this.addInitLog("log","Git repo is in good state, checking remote URL",{step:"check-existing-git"}),a.initializationCommand){this.addInitLog("log","Skipping remote URL update because it has an initialization command",{step:"update-remote-url"});continue}if(!nQe(a))throw new Error("Remote URL update failed because repoUrl is undefined");if(await this.getGitRemoteUrl(A))try{await this.git(["remote","set-url","origin",a.repoUrl],A)}catch(f){let m=`Failed to update git remote URL for ${a.repoName}: ${f}`;throw this.addInitLog("error",m,{step:"update-remote-url",error:m}),new Error(m)}else{this.addInitLog("log",`Adding remote origin for ${a.repoName}`,{step:"check-existing-git"});try{await this.git(["remote","add","origin",a.repoUrl],A)}catch(f){let m=`Failed to add git remote origin for ${a.repoName}: ${f}`;throw this.addInitLog("error",m,{step:"check-existing-git",error:m}),new Error(m)}}let g=this.config.fusionConfig.branchType==="code-review",p=this.config.fusionConfig.prNumber;if(g&&c&&p!=null){let f=this.config.fusionConfig.isFork,m=this.config.fusionConfig.featureBranch;if(!f&&!m)throw new Error(`Non-fork PR #${p} requires featureBranch in fusion config to know which branch to fetch from origin`);let C=m||`pr-${p}`,I=f?`pull/${p}/head`:C,y=this.config.fusionConfig.aiBranch||C;this.addInitLog("log",`${f?"Fork ":""}PR detected on already-cloned primary - syncing PR #${p} into branch ${y}`,{step:"clone-repo"});try{await this.git(["fetch","origin",I],A);let B=(await this.git(["rev-parse","FETCH_HEAD"],A)).trim();await this.checkout(y,B,A),this.addInitLog("log",`Checked out PR #${p} on branch ${y}`,{step:"clone-repo"})}catch(B){let E=`Failed to sync PR #${p} on primary repo ${a.repoName}: ${B}`;throw this.addInitLog("error",E,{step:"clone-repo",error:E}),new Error(E,{cause:B})}}if(this.config.fusionConfig.syncBranch&&a.enableGit&&(!g||!c)){let f=a.branchName||"main";try{let m=(await this.git(["rev-parse","HEAD"],A)).trim(),I=(await this.git(["ls-remote","origin",f],A)).trim().split(/\s/)[0]||"";m===I?this.addInitLog("log",`Snapshot git is already up-to-date with origin/${f}`,{step:"snapshot-git-sync"}):(this.addInitLog("log",`Snapshot git is behind origin/${f}, syncing...`,{step:"snapshot-git-sync"}),await this.git(["pull","--ff-only","origin",f],A),this.addInitLog("log",`Git synced to origin/${f}`,{step:"snapshot-git-sync"}))}catch(m){this.addInitLog("error",`Failed to sync git from snapshot: ${m}`,{step:"snapshot-git-sync",error:String(m)})}}if(this.config.fusionConfig.pvcCreationSource==="snapshot"&&a.backupMetadata&&a.enableGit){let f=this.config.fusionConfig.aiBranch||a.backupMetadata.check.backup.gitBranchName;if(await this.isBackupAlreadyApplied(A,f,a.backupMetadata.check.backup.lastCommitHash))this.addInitLog("log",`Backup already applied for ${a.repoName} (branch ${f} exists), skipping restore`,{step:"snapshot-backup-restore"}),await this.git(["checkout",f],A);else{this.addInitLog("log",`Snapshot volume detected with backup, downloading backup for ${a.repoName}`,{step:"snapshot-backup-restore"});let C=await p8(this.config.sys,a.backupMetadata);if(C.success)try{await this.restoreFromPartialBackup({repo:a,repoPath:A,backupResult:C}),this.addInitLog("log",`Restored backup on snapshot volume for ${a.repoName}`,{step:"snapshot-backup-restore"})}catch(I){throw this.addInitLog("error",`Failed to restore backup on snapshot volume: ${I}`,{step:"snapshot-backup-restore",error:String(I)}),I}else throw this.addInitLog("error",`Failed to download backup for snapshot restore: ${C.error}`,{step:"snapshot-backup-restore",error:C.error.message}),C.error}}}}if(l){if(await this.hasFilesButNoGit(A)){let m="Code directory already exists but is not a git repo";throw this.addInitLog("error",m,{step:"check-existing-git",error:m}),new Error(m)}let g=a.backupMetadata?await p8(this.config.sys,a.backupMetadata):void 0;if(g&&!g.success)throw this.addInitLog("error",`Failed to download backup for ${a.repoName}: ${g.error}`,{step:"clone-repo",error:g.error.message}),g.error;g?.success&&this.sys.Sentry?.setTag("backup",g.partial?"partial":"full");let p=yi.join(n,a.path),f=!1;if(a.initializationCommand){this.addInitLog("log","Running initialization command.",{step:"init-command"});let m=await this.runInitializationCommand({repo:a,tempCloningDir:n,repoPath:p,initCommand:a.initializationCommand});if(f=m.outcome,f)this.addInitLog("log",`Successfully initialized ${a.repoName}`,{step:"init-command"});else{let C=m.error?.message||"Failed to run initialization command.";throw this.addInitLog("error",C,{step:"init-command",error:C}),new Error(C)}}else{if(!nQe(a))throw new Error("repoUrl or repoName is undefined");if(this.addInitLog("log",`Cloning repository: ${a.repoName}`,{step:"clone-repo"}),f=await this.cloneRepository({repo:a,repoPath:p,backupResult:g,isPrimary:c}),f)this.addInitLog("log",`Successfully cloned ${a.repoName}`,{step:"clone-repo"});else{let m=`Failed to clone repository ${a.repoName}`;throw this.addInitLog("error",m,{step:"clone-repo",error:m}),new Error(m)}}if(g&&g.success&&g.partial)try{await this.restoreFromPartialBackup({repo:a,repoPath:p,backupResult:g})}catch(m){throw m}if(process.platform==="win32"&&ti.existsSync(A)){if((await ri.readdir(A)).length>0){let C=`Target directory ${A} already exists and is not empty. Cannot safely rename.`;throw this.addInitLog("error",C,{step:"configure-git-repos",error:C}),new Error(C)}this.addInitLog("log",`Removing empty directory before rename (Windows workaround): ${A}`,{step:"configure-git-repos"}),await ri.rm(A,{recursive:!0,force:!0})}await ri.rename(p,A),await this.markGitSafe(A)}}}catch(a){throw this.addInitLog("error",`Failed to configure git repositories: ${a}`,{step:"configure-git-repos",error:String(a)}),a}finally{await i()}}async step3ConfigureGitUser(e,r){this.addInitLog("log","Configuring git user",{step:"configure-git-user"});for(let n of r){let i=yi.join(e,n.path);this.addInitLog("log",`Setting git user for ${n.repoName}`,{step:"configure-git-user"});try{await this.git(["config","user.email","builder-bot@builder.io"],i),await this.git(["config","user.name","Builder.io"],i)}catch(s){let o=`Failed to configure git user for ${n.repoName}: ${s}`;throw this.addInitLog("error",o,{step:"configure-git-user",error:o}),new Error(o)}}}async step4CollectRepoInfo(e,r,n){this.addInitLog("log","Collecting repo info",{step:"collect-repo-info"}),this.initState.repos=[];for(let i of n){let s=yi.join(r,i.path);try{let o=await this.git(["rev-parse","HEAD"],s),a=await this.git(["branch","--show-current"],s),A={repoName:i.repoName||i.path,enabledGit:!!i.enableGit,lastCommitHash:o.trim(),branch:a.trim()};this.initState.repos.push(A),this.addInitLog("log",`Collected repo info: ${JSON.stringify(A)}`,{step:"collect-repo-info"})}catch(o){e.sys.Sentry?.captureException(o,{tags:{operation:"init",...e.sentryTags}})}}}async isGitConfigured(e){try{return await this.git(["rev-parse","--is-inside-work-tree"],e,void 0,void 0,!0),!0}catch{return!1}}async getGitRemoteUrl(e){try{return(await this.git(["config","--get","remote.origin.url"],e)).trim()}catch{return null}}isStandardGitHost(e){let r=["github.com","gitlab.com","bitbucket.org"];try{let n=new URL(e);return r.some(i=>n.hostname===i||n.hostname.endsWith(`.${i}`))}catch{return!1}}async checkHostConnectivity(e){try{let r=e.startsWith("git@")||e.startsWith("ssh://"),n,i;if(r){let s=e.match(/^(?:ssh:\/\/)?(?:[^@]+@)?([^/:]+)(?::|\/)/);if(!s)return{reachable:!1,error:"Invalid SSH repository URL format"};n=s[1],i=22}else{let s=e.match(/^https?:\/\/(?:[^@]+@)?([^/:?#]+)/);if(!s)return{reachable:!1,error:"Invalid repository URL format"};n=s[1],i=443}this.addInitLog("log",`Checking connectivity to host: ${n}:${i}`,{step:"clone-repo"});try{let s=[];try{s=await VH.default.resolve4(n),s.length>0&&this.addInitLog("log",`DNS resolved ${n} to IPv4: ${s.join(", ")}`,{step:"clone-repo"})}catch{s=await VH.default.resolve6(n),s.length>0&&this.addInitLog("log",`DNS resolved ${n} to IPv6: ${s.join(", ")}`,{step:"clone-repo"})}if(s.length===0)return{reachable:!1,hostname:n,error:`DNS resolution failed: no addresses found for ${n}`}}catch(s){let o=s instanceof Error?s.message:String(s);return{reachable:!1,hostname:n,error:`DNS resolution failed for ${n}: ${o}`}}try{let s=await this.checkConnectivityDirect(n,i);if(s.reachable)return s;let o=process.env.HTTP_PROXY||process.env.http_proxy;return o?(this.addInitLog("log",`Direct connection failed, trying proxy: ${o}`,{step:"clone-repo"}),await this.checkConnectivityViaProxy(n,i,o)):s}catch(s){let o=s instanceof Error?s.message:String(s);return{reachable:!1,hostname:n,error:`Connection attempt failed: ${o}`}}}catch(r){return{reachable:!1,error:`Unexpected error during connectivity check: ${r instanceof Error?r.message:String(r)}`}}}async checkConnectivityDirect(e,r){let i=iQe.default.createConnection({host:e,port:r,timeout:5e3});return await new Promise(s=>{i.on("connect",()=>{i.destroy(),this.addInitLog("log",`Successfully connected to ${e}:${r}`,{step:"clone-repo"}),s({reachable:!0,hostname:e})}),i.on("error",o=>{i.destroy(),this.addInitLog("error",`Connection failed to ${e}:${r}: ${o.message}`,{step:"clone-repo",error:o.message}),s({reachable:!1,hostname:e,error:`Cannot connect to ${e}:${r}: ${o.message}`})}),i.on("timeout",()=>{i.destroy(),this.addInitLog("error",`Connection timeout to ${e}:${r} (${5e3/1e3}s)`,{step:"clone-repo",error:`Connection timeout to ${e}:${r} after ${5e3/1e3} seconds`}),s({reachable:!1,hostname:e,error:`Connection timeout to ${e}:${r} after ${5e3/1e3} seconds`})})})}async checkConnectivityViaProxy(e,r,n){try{this.addInitLog("log",`Attempting proxy connection to ${e}:${r} via proxy`,{step:"clone-repo"});let i=new URL(n),s=`${i.protocol}//${i.host}`,o=new Ix.ProxyAgent({uri:s,token:i.username&&i.password?`Basic ${Buffer.from(`${i.username}:${i.password}`).toString("base64")}`:void 0}),a=r===443?`https://${e}`:`http://${e}:${r}`;return await(0,Ix.fetch)(a,{dispatcher:o,signal:AbortSignal.timeout(3e4)}),this.addInitLog("log",`Successfully connected via proxy to ${e}:${r}`,{step:"clone-repo"}),{reachable:!0,hostname:e}}catch(i){return{reachable:!1,hostname:e,error:`Proxy connection failed: ${i instanceof Error?i.message:String(i)}`}}}async ensureParentDirExists(e){let r=yi.dirname(e);return await ri.mkdir(r,{recursive:!0}),r}async cleanupLockFiles(e){let r=yi.join(e,".git");try{let i=(await ri.readdir(r)).filter(o=>o.endsWith(".lock"));if(i.length===0)return;let s=[];for(let o of i){let a=yi.join(r,o);try{await ri.unlink(a),s.push(o)}catch(A){this.config.sys.Sentry?.captureException(new Error(`Failed to remove ${o} for ${e}: ${A}`),{tags:{operation:"init",...this.config.sentryTags}})}}s.length>0&&this.config.sys.Sentry?.captureMessage(`Lock files found for ${e} and removed: ${s.join(", ")}`,{tags:{operation:"init",...this.config.sentryTags}})}catch(n){this.config.sys.Sentry?.captureException(new Error(`Failed to cleanup lock files for ${e}: ${n}`),{tags:{operation:"init",...this.config.sentryTags}})}}async validateGitRepo(e){try{await this.git(["fsck","--connectivity-only"],e)}catch(r){throw new Error("Git repo is in bad state",{cause:r})}}async isBackupAlreadyApplied(e,r,n){try{let i=(await this.git(["rev-parse","--verify",`refs/heads/${r}`],e)).trim();return i?(await this.git(["merge-base","--is-ancestor",n,i],e),!0):!1}catch{return!1}}async restoreFromPartialBackup({repo:e,repoPath:r,backupResult:n}){try{this.addInitLog("log",`Checking for git backup for ${e.repoName}`,{step:"apply-partial-backup"});let i=async()=>{try{await this.git(["remote","remove","backup"],r)}catch(s){this.addInitLog("error",`Failed to cleanup restore: ${s}`,{step:"apply-partial-backup",error:String(s)})}};if(!n.bundlePath){try{this.addInitLog("log",`Found empty git backup, applying it to ${e.repoName}`,{step:"apply-partial-backup"});let s=this.config.fusionConfig.aiBranch||n.gitBranchName;s&&await this.checkout(s,n.lastCommitHash||void 0,r)}catch(s){if(n.lastCommitHash)throw s;this.addInitLog("log",`Empty backup \u2014 could not create branch (repo may have no commits yet): ${s}`,{step:"apply-partial-backup"})}return}try{this.addInitLog("log",`Found git backup, applying it to ${e.repoName}`,{step:"apply-partial-backup"});try{await this.git(["remote","remove","backup"],r)}catch{}await this.git(["remote","add","backup",n.bundlePath],r),await this.git(["fetch","backup"],r);let s=n.gitBranchName,o=this.config.fusionConfig.aiBranch||s;o!==s?(this.addInitLog("log",`Creating new branch ${o} from backup/${s}`,{step:"apply-partial-backup"}),await this.git(["branch",o,`backup/${s}`],r),await this.git(["checkout",o],r)):await this.checkout(s,`backup/${s}`,r),this.addInitLog("log",`Successfully restored from backup to branch ${o}`,{step:"apply-partial-backup"}),await i(),this.addInitLog("log",`Cleaned up backup for ${e.repoName}`,{step:"apply-partial-backup"})}catch(s){throw await i(),this.addInitLog("error",String(s),{step:"apply-partial-backup",error:String(s)}),s}}catch(i){let s=new Error(`Failed to check git backup for ${e.repoName}. Cannot proceed without backup recovery.`,{cause:i});throw this.addInitLog("error",s.message,{step:"apply-partial-backup",error:String(i)}),s}}async initializeGitRepo(e,r){await this.git(["init"],e),await this.git(["add","."],e),await this.git(["branch","-M","main"],e),await this.git([...r?["-c","user.email=team@builder.io","-c","user.name=Builder.io"]:[],"commit","-m","Initial setup"],e)}async fetchGitConfigsOnce(){if(this.config.fusionConfig.projectId)try{let e=await mh(this.config.credentials,this.config.fusionConfig.projectId,this.debug);if(e.success)return Object.keys(e.gitConfigs).length>0?e.gitConfigs:void 0;e.gitDiagnostics&&(this.initState.gitDiagnostics=e.gitDiagnostics),this.config.sys.Sentry?.captureException(e.error,{tags:{operation:"init",endpoint:"fetch-git-configs",...this.config.sentryTags},extra:{gitDiagnostics:e.gitDiagnostics}})}catch(e){this.config.sys.Sentry?.captureException(new Error("Failed to fetch git configs in InitStateMachine",{cause:e instanceof Error?e:new Error(String(e))}),{tags:{operation:"init",endpoint:"fetch-git-configs",...this.config.sentryTags}})}}applyGitConfig(e,r,n,i){if(e.initializationCommand||e.repoUrl?.startsWith("ssh://")||e.repoUrl?.startsWith("git@"))return;let s;if(e.repoName&&r[e.repoName]?s=e.repoName:n&&(s=Object.keys(r)[0]),!s)return;let o=r[s];o?.url&&(e.repoUrl=o.url,n&&(e.repoName=s),(o.provider==="github"||o.provider==="selfHostedGithub")&&o.token&&(n&&(process.env.GH_TOKEN=o.token),i>1&&(process.env[mx(e.name)]=o.token)))}async runInitializationCommand({repo:e,tempCloningDir:r,repoPath:n,initCommand:i}){this.addInitLog("log",`Init command paths args: tempCloningDir: ${r} repoPath: ${n}`,{step:"init-command"});try{this.addInitLog("log",`Executing initialization command in ${r}`,{step:"init-command"});let s=process.env.SHELL||process.env.COMSPEC||"/bin/sh";try{let o=CA(s,i,{stdio:["ignore","pipe","pipe"],cwd:r,env:{...process.env,TERM:"dumb"}},!0),a=[],A=[];o.stdout?.on("data",c=>{a.push(c);let u=c.toString().trim();u&&this.addInitLog("log",u,{step:"init-command"})}),o.stderr?.on("data",c=>{A.push(c);let u=c.toString().trim();u&&this.addInitLog("error",u,{step:"init-command"})}),await new Promise((c,u)=>{o.on("error",l=>{u(l)}),o.on("close",l=>{if(l===0)c();else{let d=Buffer.concat(a).toString().trim(),g=Buffer.concat(A).toString().trim(),p=[`Command exited with code ${l}`,g&&`stderr: ${g}`,d&&`stdout: ${d}`].filter(Boolean).join(`
2368
2368
  `);u(new Error(p))}})})}catch(o){let a=new Error("Failed to execute initCommand.",{cause:o});return this.addInitLog("error",a.message+`: ${o}`,{step:"init-command",error:String(o)}),{outcome:!1,error:a}}return{outcome:!0}}catch(s){return this.addInitLog("error",`Failed to run initialization command: ${s}`,{step:"init-command",error:String(s)}),{outcome:!1,error:s instanceof Error?s:new Error(String(s))}}}async cloneRepository({repo:e,repoPath:r,backupResult:n,isPrimary:i}){let s=[e.branchName??"main",null,"main","master"];if(n&&n.success&&!n.partial){if(!n.bundlePath)throw new Error("Full backups must have a bundle path");this.addInitLog("log",`Downloaded full git backup, cloning it to ${r}`,{step:"clone-repo"});try{let a=await this.ensureParentDirExists(r);await this.git(["clone",n.bundlePath,r],a,void 0,600*1e3),await this.markGitSafe(r);for(let u of s)if(u)try{await this.git(["checkout",u],r)}catch{continue}await this.checkout(n.gitBranchName,n.lastCommitHash,r);let A=(await this.git(["branch","--show-current"],r)).trim(),c=(await this.git(["rev-parse","HEAD"],r)).trim();if(A!==n.gitBranchName)throw new Error(`Backup branch ${n.gitBranchName} does not match local branch ${A}`);if(c!==n.lastCommitHash)throw new Error(`Backup commit hash ${n.lastCommitHash} does not match local commit hash ${c}`);return!0}catch(a){throw this.addInitLog("error",`Failed to clone git backup for ${e.repoName}: ${a}`,{step:"clone-repo",error:String(a)}),a}}let o=process.env.TEST_NEEDS_GIT_INIT==="1";if(!this.isStandardGitHost(e.repoUrl)){this.addInitLog("log",`Non-standard git host detected, checking connectivity to ${e.repoUrl}`,{step:"clone-repo"});let a=await this.checkHostConnectivity(e.repoUrl);if(!a.reachable){let A=`Git host unreachable: ${a.hostname||"unknown host"}. ${a.error||"Network connectivity check failed"}. This host may be behind a firewall or VPN.`,c=a.error?u0(a.error):null,u={provider:LL(e.repoUrl),hostname:a.hostname||"",sourceIp:"",repoName:e.repoName||"",issue:"network",...c&&{connectivityErrorCode:c.connectivityErrorCode,checkType:c.checkType,likelyCause:c0(c.connectivityErrorCode)}};throw this.addInitLog("error",A,{step:"clone-repo",error:A,gitDiagnostics:u}),this.config.sys.Sentry?.captureException(new Error("Git host unreachable"),{tags:{operation:"init",...this.config.sentryTags},extra:{repo:e,connectivityResult:a,gitDiagnostics:u}}),new Error(A)}this.addInitLog("log",`Host connectivity verified for ${a.hostname}`,{step:"clone-repo"})}for(let a of s)try{let A=process.env.FUSION_TEMPLATE_DIR&&process.env.FUSION_TEMPLATE_DIR.trim().length>0?process.env.FUSION_TEMPLATE_DIR:"/template";if(ti.existsSync(A)&&e.repoName===Qf){if(this.addInitLog("log",`Starting copy of template to ${r}`,{step:"clone-repo"}),await this.execAsync("rm",["-rf",r],"/"),await this.execAsync("cp",["-a",A,r],"/"),this.addInitLog("log",`Copied from template for ${e.repoName}`,{step:"clone-repo"}),o)try{await this.initializeGitRepo(r,o)}catch(c){let u=`Failed to initialize git repo for ${e.repoName} after template copy: ${c}`;throw this.addInitLog("error",u,{step:"clone-repo",error:String(c)}),new Error(u)}return!0}else{let c=LL(e.repoUrl),u=c==="github"||c==="gitlab"||c==="selfHostedGithub",l=e.resetGit!==void 0?e.resetGit:_L.includes(e.repoName),d=n&&n.success&&n.partial,g=this.config.fusionConfig.isFork&&this.config.fusionConfig.prNumber,p=l&&e.enableGit&&!d&&!g,f=!e.enableGit||p?["clone","--depth","1"]:u?["clone","--filter=blob:none"]:["clone"];a&&f.push("-b",a),f.push(e.repoUrl,r),this.addInitLog("log",`Cloning repository: ${e.repoName} with branch: ${a||"default"}`,{step:"clone-repo"});let m=await this.ensureParentDirExists(r);if(await this.git(f,m,void 0,600*1e3),await this.markGitSafe(r),this.config.fusionConfig.isFork&&this.config.fusionConfig.prNumber&&i){let C=this.config.fusionConfig.prNumber,I=this.config.fusionConfig.featureBranch||`pr-${C}`;this.addInitLog("log",`Fork PR detected - fetching PR #${C} using refs/pulls/${C}/head into branch ${I}`,{step:"clone-repo"});try{await this.git(["fetch","origin",`pull/${C}/head:${I}`],r),await this.git(["switch",I],r),this.addInitLog("log",`Successfully checked out fork PR #${C} on branch ${I}`,{step:"clone-repo"})}catch(y){let B=`Failed to fetch fork PR #${C}: ${y}`;throw this.addInitLog("error",B,{step:"clone-repo",error:String(y)}),new Error(B,{cause:y})}}return p&&(ti.rmSync(yi.join(r,".git"),{recursive:!0,force:!0}),await this.initializeGitRepo(r,o),this.addInitLog("log",`Cleared git history for ${e.repoName}`,{step:"clone-repo"})),!0}}catch(A){this.addInitLog("error",`Clone failed for branch ${a||"default"}: ${A}`,{step:"clone-repo",error:String(A)}),await ri.rm(r,{recursive:!0,force:!0}).catch(()=>{});continue}return!1}async markGitSafe(e){try{let r=await this.git(["config","--global","--get-all","safe.directory"],e);if(r.trim().split(`
@@ -5218,7 +5218,7 @@ OPEN: ${(0,Hl.dim)(d)}`),n=Qi(),n.start(`Waiting for ${t.name} authentication`))
5218
5218
  Please set the FIGMA_PERSONAL_TOKEN environment variable.`);if(!a&&r.builderPrivateKey)throw new Error(`No Builder private key found.
5219
5219
  Please set the BUILDER_PRIVATE_KEY environment variable.`);if(!o&&r.builderPublicKey)throw new Error(`No Builder public key found.
5220
5220
  Please set the BUILDER_PUBLIC_KEY environment variable.`);return{figmaAuth:A,builderPublicKey:o,builderPrivateKey:a,userId:s,spaceName:i}}if((r.requireFigmaAuth==="always"||!A&&r.requireFigmaAuth==="if-unset")&&(A=await bEt(t,r.silent?{silent:!0,onAuthStatus:r.onAuthStatus}:void 0),Rx(t,{figmaAuth:A},n)),r.force||!a&&r.builderPrivateKey||!o&&r.builderPublicKey){let{privateKey:u,spaceId:l,spaceName:d,userId:g}=await vEt(t,r.forceSpaceId,r.silent?{silent:!0,onAuthStatus:r.onAuthStatus}:void 0);if(r.forceSpaceId&&l!==r.forceSpaceId)throw new Error(`OAuth flow returned space ${(0,Hl.yellow)(l)}, however the command specified --spaceId=${(0,Hl.green)(r.forceSpaceId)}`);o=l,a=u,i=d,s=g,await _z(s),await Zo(t,t.getAppRootDir())&&!await q4(t,l,void 0,!1)&&!r.silent&&$.warn("Unable to set public api key in an existing .env file or create a new one. Please ensure you have write access in the current directory."),Rx(t,{builderPublicKey:o,builderPrivateKey:a,spaceName:i,userId:s,timestamp:new Date().toISOString()},n)}return s?t.Sentry?.setUser({id:s,username:process.env.USER||process.env.USERNAME||"unknown"}):o&&t.Sentry?.setUser({id:o,username:process.env.USER||process.env.USERNAME||"unknown"}),(i||o)&&t.Sentry?.setContext("builder",{spaceId:o,spaceName:i,userId:s}),{figmaAuth:A,builderPublicKey:o,builderPrivateKey:a,spaceName:i,userId:s,timestamp:c}},wEt="RHr2ed743waC2g2ZHMEJSn6O0NQ08L"});var d0e=N((Dhr,p0e)=>{h();var z4=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"}};p0e.exports=z4});var Z4=N((bhr,f0e)=>{h();var Op=require("readline"),X4=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&&Op.cursorTo(this.stream,e,r)}cursorRelative(e=null,r=null){this.stream.isTTY&&(this.dy=this.dy+r,Op.moveCursor(this.stream,e,r))}cursorRelativeReset(){this.stream.isTTY&&(Op.moveCursor(this.stream,0,-this.dy),Op.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&Op.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&Op.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&Op.clearScreenDown(this.stream)}newline(){this.stream.write(`
5221
- `),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)}};f0e.exports=X4});var m0e=N((Shr,eJ)=>{"use strict";h();var h0e=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);eJ.exports=h0e;eJ.exports.default=h0e});var I0e=N((Fhr,C0e)=>{"use strict";h();C0e.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 B0e=N((Rhr,tJ)=>{"use strict";h();var zEt=pU(),XEt=m0e(),ZEt=I0e(),E0e=t=>{if(typeof t!="string"||t.length===0||(t=zEt(t),t.length===0))return 0;t=t.replace(ZEt()," ");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+=XEt(n)?2:1)}return e};tJ.exports=E0e;tJ.exports.default=E0e});var rJ=N((Nhr,y0e)=>{h();y0e.exports=function(e,r,n){if(r.autopadding!==!0)return e;function i(s,o){return(r.autopaddingChar+s).slice(-o)}return n==="percentage"?i(e,3):e}});var nJ=N((Phr,Q0e)=>{h();Q0e.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 iJ=N((_hr,D0e)=>{h();D0e.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 sJ=N((Ghr,w0e)=>{h();var eBt=B0e(),tBt=rJ(),rBt=nJ(),nBt=iJ();w0e.exports=function(e,r,n){let i=e.format,s=e.formatTime||nBt,o=e.formatValue||tBt,a=e.formatBar||rBt,A=Math.floor(r.progress*100)+"",c=r.stopTime||Date.now(),u=Math.round((c-r.startTime)/1e3),l=Object.assign({},n,{bar:a(r.progress,e),percentage:o(A,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(u,e,"duration"),duration_formatted:s(u,e,1)});i=i.replace(/\{(\w+)\}/g,function(p,f){return typeof l[f]<"u"?l[f]:p});let d=Math.max(0,r.maxWidth-eBt(i)-2),g=Math.floor(d/2);switch(e.align){case"right":i=d>0?" ".repeat(d)+i:i;break;case"center":i=g>0?" ".repeat(g)+i:i;break;default:break}return i}});var Vx=N((Khr,b0e)=>{h();function Er(t,e){return typeof t>"u"||t===null?e:t}b0e.exports={parse:function(e,r){let n={},i=Object.assign({},r,e);return n.throttleTime=1e3/Er(i.fps,10),n.stream=Er(i.stream,process.stderr),n.terminal=Er(i.terminal,null),n.clearOnComplete=Er(i.clearOnComplete,!1),n.stopOnComplete=Er(i.stopOnComplete,!1),n.barsize=Er(i.barsize,40),n.align=Er(i.align,"left"),n.hideCursor=Er(i.hideCursor,!1),n.linewrap=Er(i.linewrap,!1),n.barGlue=Er(i.barGlue,""),n.barCompleteChar=Er(i.barCompleteChar,"="),n.barIncompleteChar=Er(i.barIncompleteChar,"-"),n.format=Er(i.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=Er(i.formatTime,null),n.formatValue=Er(i.formatValue,null),n.formatBar=Er(i.formatBar,null),n.etaBufferLength=Er(i.etaBuffer,10),n.etaAsynchronousUpdate=Er(i.etaAsynchronousUpdate,!1),n.progressCalculationRelative=Er(i.progressCalculationRelative,!1),n.synchronousUpdate=Er(i.synchronousUpdate,!0),n.noTTYOutput=Er(i.noTTYOutput,!1),n.notTTYSchedule=Er(i.notTTYSchedule,2e3),n.emptyOnZero=Er(i.emptyOnZero,!1),n.forceRedraw=Er(i.forceRedraw,!1),n.autopadding=Er(i.autopadding,!1),n.gracefulExit=Er(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?Er(e.autopaddingChar," "):"",e}}});var oJ=N((jhr,S0e)=>{h();var v0e=d0e(),iBt=Z4(),sBt=sJ(),oBt=Vx(),aBt=require("events");S0e.exports=class extends aBt{constructor(e){super(),this.options=oBt.assignDerivedOptions(e),this.terminal=this.options.terminal?this.options.terminal:new iBt(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 v0e(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:sBt}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 v0e(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 F0e=N(($hr,x0e)=>{h();var ABt=oJ(),cBt=Vx();x0e.exports=class extends ABt{constructor(e,r){super(cBt.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 R0e=N((zhr,k0e)=>{h();var uBt=Z4(),lBt=oJ(),gBt=Vx(),pBt=require("events");k0e.exports=class extends pBt{constructor(e,r){super(),this.bars=[],this.options=gBt.parse(e,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new uBt(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 lBt(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 N0e=N((Zhr,T0e)=>{h();T0e.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var P0e=N((tmr,M0e)=>{h();M0e.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var _0e=N((nmr,L0e)=>{h();L0e.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var G0e=N((smr,U0e)=>{h();U0e.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var K0e=N((amr,O0e)=>{h();var dBt=N0e(),fBt=P0e(),hBt=_0e(),mBt=G0e();O0e.exports={legacy:dBt,shades_classic:fBt,shades_grey:hBt,rect:mBt}});var j0e=N((cmr,J0e)=>{h();var H0e=F0e(),CBt=R0e(),IBt=K0e(),EBt=sJ(),BBt=rJ(),yBt=nJ(),QBt=iJ();J0e.exports={Bar:H0e,SingleBar:H0e,MultiBar:CBt,Presets:IBt,Format:{Formatter:EBt,BarFormat:yBt,ValueFormat:BBt,TimeFormat:QBt}}});var X0e=N((Rmr,z0e)=>{h();z0e.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-\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-\uDED8\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\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\uDD3C-\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-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\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\uDE70]|\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\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 Rvt={};Fy(Rvt,{default:()=>kvt});module.exports=zr(Rvt);h();h();(function(){try{var 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]="acc3df25-9138-4bda-baa9-5d703c8fdcdc",t._sentryDebugIdIdentifier="sentry-dbid-acc3df25-9138-4bda-baa9-5d703c8fdcdc")}catch{}})();h();It();var FRe=require("../core/index.cjs"),kRe=require("../node/index.cjs"),RRe=require("../server/index.cjs"),TRe=z(yY(),1);h();h();var $x=require("fs/promises");Mk();Tr();gI();rr();var Jr=z(Br(),1),gm=require("node:path");Ps();Us();mr();Xr();Rf();var xEt="https://cdn.builder.io",o0e=async(t,e)=>{console.log(""),sr((0,Jr.bgCyan)((0,Jr.bold)((0,Jr.white)(" figma migrate ")))+" "+(0,Jr.dim)(ft));let{builderPrivateKey:r,builderPublicKey:n}=await Wt(t,e,{forceSpaceId:e.spaceId,builderPrivateKey:!0,builderPublicKey:!0});await Rt("figma publish started",{spaceId:n});let i=await lI(t);if(i.length>0){await Rt("figma migrate with existing files",{spaceId:n}),$.warning(`${(0,Jr.yellow)("This repo already has figma mappings in:")}
5221
+ `),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)}};f0e.exports=X4});var m0e=N((Shr,eJ)=>{"use strict";h();var h0e=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);eJ.exports=h0e;eJ.exports.default=h0e});var I0e=N((Fhr,C0e)=>{"use strict";h();C0e.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 B0e=N((Rhr,tJ)=>{"use strict";h();var zEt=pU(),XEt=m0e(),ZEt=I0e(),E0e=t=>{if(typeof t!="string"||t.length===0||(t=zEt(t),t.length===0))return 0;t=t.replace(ZEt()," ");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+=XEt(n)?2:1)}return e};tJ.exports=E0e;tJ.exports.default=E0e});var rJ=N((Nhr,y0e)=>{h();y0e.exports=function(e,r,n){if(r.autopadding!==!0)return e;function i(s,o){return(r.autopaddingChar+s).slice(-o)}return n==="percentage"?i(e,3):e}});var nJ=N((Phr,Q0e)=>{h();Q0e.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 iJ=N((_hr,D0e)=>{h();D0e.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 sJ=N((Ghr,w0e)=>{h();var eBt=B0e(),tBt=rJ(),rBt=nJ(),nBt=iJ();w0e.exports=function(e,r,n){let i=e.format,s=e.formatTime||nBt,o=e.formatValue||tBt,a=e.formatBar||rBt,A=Math.floor(r.progress*100)+"",c=r.stopTime||Date.now(),u=Math.round((c-r.startTime)/1e3),l=Object.assign({},n,{bar:a(r.progress,e),percentage:o(A,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(u,e,"duration"),duration_formatted:s(u,e,1)});i=i.replace(/\{(\w+)\}/g,function(p,f){return typeof l[f]<"u"?l[f]:p});let d=Math.max(0,r.maxWidth-eBt(i)-2),g=Math.floor(d/2);switch(e.align){case"right":i=d>0?" ".repeat(d)+i:i;break;case"center":i=g>0?" ".repeat(g)+i:i;break;default:break}return i}});var Vx=N((Khr,b0e)=>{h();function Er(t,e){return typeof t>"u"||t===null?e:t}b0e.exports={parse:function(e,r){let n={},i=Object.assign({},r,e);return n.throttleTime=1e3/Er(i.fps,10),n.stream=Er(i.stream,process.stderr),n.terminal=Er(i.terminal,null),n.clearOnComplete=Er(i.clearOnComplete,!1),n.stopOnComplete=Er(i.stopOnComplete,!1),n.barsize=Er(i.barsize,40),n.align=Er(i.align,"left"),n.hideCursor=Er(i.hideCursor,!1),n.linewrap=Er(i.linewrap,!1),n.barGlue=Er(i.barGlue,""),n.barCompleteChar=Er(i.barCompleteChar,"="),n.barIncompleteChar=Er(i.barIncompleteChar,"-"),n.format=Er(i.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=Er(i.formatTime,null),n.formatValue=Er(i.formatValue,null),n.formatBar=Er(i.formatBar,null),n.etaBufferLength=Er(i.etaBuffer,10),n.etaAsynchronousUpdate=Er(i.etaAsynchronousUpdate,!1),n.progressCalculationRelative=Er(i.progressCalculationRelative,!1),n.synchronousUpdate=Er(i.synchronousUpdate,!0),n.noTTYOutput=Er(i.noTTYOutput,!1),n.notTTYSchedule=Er(i.notTTYSchedule,2e3),n.emptyOnZero=Er(i.emptyOnZero,!1),n.forceRedraw=Er(i.forceRedraw,!1),n.autopadding=Er(i.autopadding,!1),n.gracefulExit=Er(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?Er(e.autopaddingChar," "):"",e}}});var oJ=N((jhr,S0e)=>{h();var v0e=d0e(),iBt=Z4(),sBt=sJ(),oBt=Vx(),aBt=require("events");S0e.exports=class extends aBt{constructor(e){super(),this.options=oBt.assignDerivedOptions(e),this.terminal=this.options.terminal?this.options.terminal:new iBt(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 v0e(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:sBt}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 v0e(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 F0e=N(($hr,x0e)=>{h();var ABt=oJ(),cBt=Vx();x0e.exports=class extends ABt{constructor(e,r){super(cBt.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 R0e=N((zhr,k0e)=>{h();var uBt=Z4(),lBt=oJ(),gBt=Vx(),pBt=require("events");k0e.exports=class extends pBt{constructor(e,r){super(),this.bars=[],this.options=gBt.parse(e,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new uBt(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 lBt(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 N0e=N((Zhr,T0e)=>{h();T0e.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var P0e=N((tmr,M0e)=>{h();M0e.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var _0e=N((nmr,L0e)=>{h();L0e.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var G0e=N((smr,U0e)=>{h();U0e.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var K0e=N((amr,O0e)=>{h();var dBt=N0e(),fBt=P0e(),hBt=_0e(),mBt=G0e();O0e.exports={legacy:dBt,shades_classic:fBt,shades_grey:hBt,rect:mBt}});var j0e=N((cmr,J0e)=>{h();var H0e=F0e(),CBt=R0e(),IBt=K0e(),EBt=sJ(),BBt=rJ(),yBt=nJ(),QBt=iJ();J0e.exports={Bar:H0e,SingleBar:H0e,MultiBar:CBt,Presets:IBt,Format:{Formatter:EBt,BarFormat:yBt,ValueFormat:BBt,TimeFormat:QBt}}});var X0e=N((Rmr,z0e)=>{h();z0e.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-\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-\uDED8\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\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]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\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]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\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\uDD3C-\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-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\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\uDE70]|\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\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]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\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 Rvt={};Fy(Rvt,{default:()=>kvt});module.exports=zr(Rvt);h();h();(function(){try{var 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]="be236ef5-5c35-42e6-a4fa-ef146df956d7",t._sentryDebugIdIdentifier="sentry-dbid-be236ef5-5c35-42e6-a4fa-ef146df956d7")}catch{}})();h();It();var FRe=require("../core/index.cjs"),kRe=require("../node/index.cjs"),RRe=require("../server/index.cjs"),TRe=z(yY(),1);h();h();var $x=require("fs/promises");Mk();Tr();gI();rr();var Jr=z(Br(),1),gm=require("node:path");Ps();Us();mr();Xr();Rf();var xEt="https://cdn.builder.io",o0e=async(t,e)=>{console.log(""),sr((0,Jr.bgCyan)((0,Jr.bold)((0,Jr.white)(" figma migrate ")))+" "+(0,Jr.dim)(ft));let{builderPrivateKey:r,builderPublicKey:n}=await Wt(t,e,{forceSpaceId:e.spaceId,builderPrivateKey:!0,builderPublicKey:!0});await Rt("figma publish started",{spaceId:n});let i=await lI(t);if(i.length>0){await Rt("figma migrate with existing files",{spaceId:n}),$.warning(`${(0,Jr.yellow)("This repo already has figma mappings in:")}
5222
5222
 
5223
5223
  ${i.map(c=>` - ${(0,gm.relative)(t.getAppRootDir(),c)}`).join(`
5224
5224
  `)}